Commit 49ae1202 authored by Ermolaev Timur's avatar Ermolaev Timur

#104 Исправил кнопку

parent 57aae89a
...@@ -4,7 +4,7 @@ import { priorities } from "../../../constants"; ...@@ -4,7 +4,7 @@ import { priorities } from "../../../constants";
import CustomSelect from '../../UI/СustomSelect/СustomSelect' import CustomSelect from '../../UI/СustomSelect/СustomSelect'
function CalendarModalContent({ title, onChangeCurrentTaskHandler, description, priority, sendNewTaskHandler, deleteTaskHandler, startHour, endHour }) { function CalendarModalContent({ title, onChangeCurrentTaskHandler, description, priority, sendNewTaskHandler, deleteTaskHandler, startHour, endHour, id }) {
return (<> return (<>
<TextField <TextField
id="task-description-title" id="task-description-title"
...@@ -56,7 +56,7 @@ function CalendarModalContent({ title, onChangeCurrentTaskHandler, description, ...@@ -56,7 +56,7 @@ function CalendarModalContent({ title, onChangeCurrentTaskHandler, description,
</div> </div>
<div style={{ display: 'flex', gap: '20px', margin: '10px 0' }}> <div style={{ display: 'flex', gap: '20px', margin: '10px 0' }}>
<Button id='test_button_save_task' onClick={sendNewTaskHandler}>Сохранить</Button> <Button id='test_button_save_task' onClick={sendNewTaskHandler}>Сохранить</Button>
<Button onClick={deleteTaskHandler}>Удалить</Button> {id ? <Button onClick={deleteTaskHandler}>Удалить</Button> : null}
</div> </div>
</>); </>);
} }
......
...@@ -89,6 +89,7 @@ function MonthCalendarBody({ month, year, tasks, createTaskInCellHandler, curren ...@@ -89,6 +89,7 @@ function MonthCalendarBody({ month, year, tasks, createTaskInCellHandler, curren
title={currentTask.title} title={currentTask.title}
description={currentTask.description} description={currentTask.description}
priority={currentTask.priority} priority={currentTask.priority}
id={currentTask.id}
startHour={currentTask.infoForCell?.startHour} startHour={currentTask.infoForCell?.startHour}
endHour={currentTask.infoForCell?.endHour} endHour={currentTask.infoForCell?.endHour}
onChangeCurrentTaskHandler={(e) => { onChangeCurrentTaskHandler(e) }} onChangeCurrentTaskHandler={(e) => { onChangeCurrentTaskHandler(e) }}
......
import * as React from 'react'; import * as React from 'react';
import Box from '@mui/material/Box'; import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
import Modal from '@mui/material/Modal'; import Modal from '@mui/material/Modal';
const style = { const style = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment