From 38f852b3b252955aa9ceab4768a56d5d7191f871 Mon Sep 17 00:00:00 2001 From: totono Date: Tue, 18 Apr 2023 20:56:49 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix=20=E7=B7=A8=E9=9B=86=E7=A2=BA=E5=AE=9A?= =?UTF-8?q?=E3=83=9C=E3=82=BF=E3=83=B3=E6=8A=BC=E4=B8=8B=E6=99=82=E3=81=AE?= =?UTF-8?q?=E6=9C=AA=E6=9D=A5=E3=81=8B=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=81=AE=E3=83=90=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../elements/layouts/taskItem/buttons/EditConfirmButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/elements/layouts/taskItem/buttons/EditConfirmButton.tsx b/src/components/elements/layouts/taskItem/buttons/EditConfirmButton.tsx index 02bf571..8cf5051 100644 --- a/src/components/elements/layouts/taskItem/buttons/EditConfirmButton.tsx +++ b/src/components/elements/layouts/taskItem/buttons/EditConfirmButton.tsx @@ -36,8 +36,8 @@ return ( const isFuture = (task:InputState) => { if (task.limit_date == undefined) {return "No"} - let time = "" - if (task.limit_time == undefined) { time = "23:59"} + let time = task.limit_time; + if (task.limit_time == undefined) { time = "23:59"}; const now = dayjs(); const limit = dayjs(task.limit_date +" "+ time); if (now.isBefore(limit)){ From 24d53e50d891055faf76302bda528d7d66321901 Mon Sep 17 00:00:00 2001 From: totono Date: Tue, 18 Apr 2023 21:38:37 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feature=20-=20=E6=9C=9F=E9=99=90=E5=88=87?= =?UTF-8?q?=E3=82=8C=E3=82=BF=E3=82=B9=E3=82=AF=E3=81=AF=E8=A9=B3=E7=B4=B0?= =?UTF-8?q?=E5=85=A5=E5=8A=9B=E3=81=8C=E9=96=8B=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../elements/layouts/taskItem/Row.tsx | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/components/elements/layouts/taskItem/Row.tsx b/src/components/elements/layouts/taskItem/Row.tsx index 7f22e47..e17688b 100644 --- a/src/components/elements/layouts/taskItem/Row.tsx +++ b/src/components/elements/layouts/taskItem/Row.tsx @@ -7,6 +7,7 @@ import { InputState } from "../../Input/InputState"; import { Content } from "./Content"; import { Header } from "./Header"; import { listItemStyle } from "./rowStyle"; +import dayjs from "dayjs"; const { Panel } = Collapse; @@ -40,11 +41,32 @@ export const Row = ({ task, setFetch }: rowProps) => { }))(task); const [taskState, setTaskState] = useState(state); + // check task is overdue + const activeId = () => { + if (taskState.limit_date === undefined + || taskState.is_completed === "Yes" + || taskState.is_deleted === "Yes") { + return undefined; + } + let time = taskState.limit_time; + if (time === undefined) { + time = "23:59"; + } + const today = dayjs(); + const limit = dayjs(taskState.limit_date + " " + time); + if (today.isAfter(limit)) { + return taskState.id; + } else { + undefined + }; + }; + + return (
  • - + Date: Tue, 18 Apr 2023 21:40:45 +0900 Subject: [PATCH 3/3] release 5.0 --- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 30cba66..c4d1fd4 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4577,7 +4577,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "todo" -version = "0.4.3" +version = "0.5.0" dependencies = [ "chrono", "dotenv", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 842ac60..0726c31 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "todo" -version = "0.4.3" +version = "0.5.0" description = "todo" authors = ["totono"] license = "" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 085e577..0965bda 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "todo", - "version": "0.4.3" + "version": "0.5.0" }, "tauri": { "systemTray": {