Skip to content

Commit

Permalink
add requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CREDO23 committed Oct 18, 2024
1 parent d517bf1 commit 9746b83
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export function AddDailyPlanWorkHourModal(props: IAddDailyPlanWorkHoursModalProp
setLoading(true);

// Update the plan work time only if the user changed it
plan &&
plan.workTimePlanned !== workTimePlanned &&
(await updateDailyPlan({ workTimePlanned }, plan.id ?? ''));
if (plan && plan.workTimePlanned !== workTimePlanned) {
await updateDailyPlan({ workTimePlanned }, plan.id ?? '');
}

startTimer();

Expand Down Expand Up @@ -87,7 +87,7 @@ export function AddDailyPlanWorkHourModal(props: IAddDailyPlanWorkHoursModalProp
<Button
variant="default"
type="submit"
disabled={loading || (requirePlan ? (hasWorkHours ? false : true) : false)}
disabled={loading || (requirePlan && !hasWorkHours)}
className="py-3 px-5 min-w-[10rem] rounded-md font-light text-md dark:text-white"
onClick={handleSubmit}
>
Expand Down

0 comments on commit 9746b83

Please sign in to comment.