Skip to content

Commit

Permalink
Add task.isRelationDisabled attribute
Browse files Browse the repository at this point in the history
It allows to dissociate the behavior for disabling the change of dates
and the change on relations on a task.

Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
  • Loading branch information
lfasani committed Apr 8, 2024
1 parent 1f911f5 commit f1150e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/gantt/task-gantt-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export const TaskGanttContent: React.FC<TaskGanttContentProps> = ({
taskHalfHeight={taskHalfHeight}
isProgressChangeable={!task.isDisabled}
isDateChangeable={!task.isDisabled}
isRelationChangeable={!task.isDisabled}
isRelationChangeable={!task.isRelationDisabled}
authorizedRelations={authorizedRelations}
ganttRelationEvent={ganttRelationEvent}
isDelete={!task.isDisabled}
Expand Down
1 change: 1 addition & 0 deletions src/types/public-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export interface Task {
assignees?: string[];
styles?: Partial<ColorStyles>;
isDisabled?: boolean;
isRelationDisabled?: boolean;
/**
* Project or task
*/
Expand Down
1 change: 1 addition & 0 deletions stories/helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export function initTasks() {
id: "party",
progress: 0,
isDisabled: true,
isRelationDisabled: true,
type: "task",
},
];
Expand Down

0 comments on commit f1150e8

Please sign in to comment.