Skip to content

Commit

Permalink
fix: add check for timesheet status in save
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan Buchanan committed Aug 17, 2021
1 parent b27eceb commit 66128c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion composables/useTimesheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ export default (
newTimesheetStatus: TimesheetStatus,
denialMessage?: string
) => {
if (!hasUnsavedChanges.value) return;
if (
newTimesheetStatus === timesheetStatus.value &&
!hasUnsavedChanges.value
)
return;

if (newTimesheetStatus === recordStatus.NEW && hasRestDayHours.value) {
const confirmation = confirm(
Expand Down

0 comments on commit 66128c4

Please sign in to comment.