feat: overdue tasks

This commit is contained in:
2025-05-06 12:35:35 +03:00
parent f510c8c415
commit 2c11c3b21a
5 changed files with 66 additions and 14 deletions

View File

@@ -57,7 +57,7 @@ const ProfileCalendar: FunctionComponent = () => {
const [isEditModal, setIsEditModal] = useState(false);
const [editContent, setEditContent] = useState<ITask | null>(null);
const [calendarDate, setCalendarDate] = useState<Nullable<Date>>();
const [tags, setTags] = useState<ITags>({ first: "", second: "" });
const [tags, setTags] = useState<ITags>({ first: "", second: "", overdue: false });
const [showDeleteDialog, setShowDeleteDialog] = useState(false);
const {
@@ -206,7 +206,7 @@ const ProfileCalendar: FunctionComponent = () => {
};
setTasks(tasks.map((task) => (task.id === eTask.id ? eTask : task)));
localStorage.setItem("tasks", JSON.stringify(tasks.map((task) => (task.id === eTask.id ? eTask : task))));
setTags({ first: "", second: "" });
setTags({ first: "", second: "", overdue: false });
};
const pt = {
@@ -236,7 +236,7 @@ const ProfileCalendar: FunctionComponent = () => {
tagsList={example_tags}
value={tags}
onClose={() => {
setTags({ first: "", second: "" });
setTags({ first: "", second: "", overdue: false });
}}
onChange={setTags}
/>
@@ -256,7 +256,7 @@ const ProfileCalendar: FunctionComponent = () => {
setIsEdit(false);
setEditContent(null);
setIsEditModal(false);
setTags({ first: "", second: "" });
setTags({ first: "", second: "", overdue: false });
setCalendarDate(null);
}}
>
@@ -359,7 +359,7 @@ const ProfileCalendar: FunctionComponent = () => {
})}
onClick={() => {
if (!isEditModal) return;
setTags({ first: editContent.tags[0], second: editContent.tags[1] });
setTags({ first: editContent.tags[0], second: editContent.tags[1], overdue: false });
setOpenModalTags(true);
}}
>