refactor: modals refactored

This commit is contained in:
2025-09-05 14:25:36 +04:00
parent 7694b4ae03
commit d0c734d481
24 changed files with 292 additions and 97 deletions

View File

@ -13,7 +13,7 @@ const CreateStatusButton: FC = () => {
title: "Создание колонки",
withCloseButton: true,
innerProps: {
onComplete: statusesCrud.onCreate,
onChange: values => statusesCrud.onCreate(values.name),
},
});
};

View File

@ -19,8 +19,8 @@ const StatusMobile: FC<Props> = ({ status, board }) => {
title: "Редактирование статуса",
withCloseButton: true,
innerProps: {
onComplete: name => statusesCrud.onUpdate(status.id, { name }),
defaultValue: status.name,
onChange: values => statusesCrud.onUpdate(status.id, values),
value: status,
},
});
};

View File

@ -18,8 +18,8 @@ const BoardMobile: FC<Props> = ({ board }) => {
title: "Редактирование доски",
withCloseButton: true,
innerProps: {
onComplete: name => boardsCrud.onUpdate(board.id, { name }),
defaultValue: board.name,
onChange: values => boardsCrud.onUpdate(board.id, values),
value: board,
},
});
};

View File

@ -14,7 +14,7 @@ const CreateBoardButton: FC<Props> = ({ onCreateBoard }) => {
title: "Создание доски",
withCloseButton: true,
innerProps: {
onComplete: onCreateBoard,
onChange: values => onCreateBoard(values.name),
},
});
};

View File

@ -13,7 +13,7 @@ const CreateProjectButton: FC = () => {
title: "Создание проекта",
withCloseButton: true,
innerProps: {
onComplete: projectsCrud.onCreate,
onChange: values => projectsCrud.onCreate(values.name),
},
});
};

View File

@ -25,8 +25,8 @@ const ProjectMobile: FC<Props> = ({
title: "Редактирование проекта",
withCloseButton: true,
innerProps: {
onComplete: name => projectsCrud.onUpdate(project.id, { name }),
defaultValue: project.name,
onChange: values => projectsCrud.onUpdate(project.id, values),
value: project,
},
});
};