From cdd0a01fab19574d25b039c509404af5eed1ddfe Mon Sep 17 00:00:00 2001 From: Ryan Pandya Date: Tue, 3 Dec 2024 21:13:05 -0800 Subject: [PATCH] Display and edit days, codes, and comments working. --- apps/web/components/dashboard/hours/EditableHourCode.tsx | 4 ++-- apps/web/components/dashboard/hours/EditableHourComment.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/components/dashboard/hours/EditableHourCode.tsx b/apps/web/components/dashboard/hours/EditableHourCode.tsx index a632556..b12d28e 100644 --- a/apps/web/components/dashboard/hours/EditableHourCode.tsx +++ b/apps/web/components/dashboard/hours/EditableHourCode.tsx @@ -31,7 +31,7 @@ export function EditableHourCode({ if (originalText === newCode) { // Nothing to do here console.log("Skipping."); - selectNext(i + 1); + selectHourCode(i + 1); return; } if (newCode == "") { @@ -51,7 +51,7 @@ export function EditableHourCode({ code: newCode ?? "", comment: hour.comment, }) - selectNext(i + 1); + selectHourCode(i + 1); }; return ( diff --git a/apps/web/components/dashboard/hours/EditableHourComment.tsx b/apps/web/components/dashboard/hours/EditableHourComment.tsx index 9eaab98..360d1e5 100644 --- a/apps/web/components/dashboard/hours/EditableHourComment.tsx +++ b/apps/web/components/dashboard/hours/EditableHourComment.tsx @@ -31,7 +31,7 @@ export function EditableHourComment({ let newComment: string | null = ref.current?.value ?? null; if (originalText == newComment) { // Nothing to do here - selectNext(hour.time + 1); + selectHourComment(hour.time + 1); return; } if (newComment == "") { @@ -50,7 +50,7 @@ export function EditableHourComment({ comment: newComment, code: hour.categoryCode.toString(), }) - selectNext(hour.time + 1); + selectHourComment(hour.time + 1); }; return (