Skip to content

Commit

Permalink
adjust end time by a minute
Browse files Browse the repository at this point in the history
Signed-off-by: Nilesh Gupta <[email protected]>
  • Loading branch information
ngu04 committed Nov 8, 2024
1 parent 05f0508 commit c0e556e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/components/Staff/UpdateStaffForTimeRangeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ export const UpdateStaffForTimeRangeForm = ({
};

const handleSubmitForm = () => {
let adjustedEndTime = endTime;
if (endTime.hour() === 0 && endTime.minute() === 0) {
adjustedEndTime = moment(endTime).subtract(1, 'minute');
}
const adjustedEndTime = moment(endTime).subtract(1, 'minute');

const ess: IUpdateStaffForTimeRangeData = {
startDayAt: startDate,
Expand Down

0 comments on commit c0e556e

Please sign in to comment.