Skip to content

Commit

Permalink
fix: number timesheet to validate refresh issue (#401)
Browse files Browse the repository at this point in the history
* RM#75115
  • Loading branch information
vhu-axelor authored and lme-axelor committed Feb 14, 2024
1 parent 4c76d86 commit 7f100dc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const TimesheetDetailsButtons = ({
timesheetId: timesheet.id,
version: timesheet.version,
toStatus: 'confirm',
userId: user.id,
user: user,
}),
)
}
Expand Down Expand Up @@ -116,7 +116,7 @@ const TimesheetDetailsButtons = ({
timesheetId: timesheet.id,
version: timesheet.version,
toStatus: 'validate',
userId: user.id,
user: user,
}),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ const TimesheetRefusalPopup = ({
version: timesheet.version,
toStatus: 'refuse',
groundForRefusal: refusalMessage,
userId: user.id,
user: user,
}),
);
},
[dispatch, timesheet, user.id],
[dispatch, timesheet, user],
);

return (
Expand Down
5 changes: 4 additions & 1 deletion packages/apps/hr/src/features/timesheetSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ export const updateTimesheetStatus = createAsyncThunk(
dispatch(fetchTimesheetById({timesheetId: data.timesheetId}));
})
.then(() => {
dispatch(fetchTimesheet({userId: data.userId}));
dispatch(fetchTimesheet({userId: data.user.id}));
})
.then(() => {
dispatch(fetchTimesheetToValidate({user: data.user}));
});
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const TimesheetListScreen = ({navigation}) => {
timesheetId: timesheet.id,
version: timesheet.version,
toStatus: toStatus,
userId: user.id,
user: user,
}),
),
[dispatch, user],
Expand Down

0 comments on commit 7f100dc

Please sign in to comment.