Skip to content

Commit

Permalink
fix: timesheet not refresh when modify (#398)
Browse files Browse the repository at this point in the history
* RM#75175
  • Loading branch information
vhu-axelor authored Feb 9, 2024
1 parent 50895b5 commit 3488034
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/apps/hr/src/features/timesheetLineSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
fetchTimesheetLine as _fetchTimesheetLine,
updateTimesheetLine as _updateTimesheetLine,
} from '../api/timesheet-line-api';
import {fetchTimesheetById} from './timesheetSlice';

export const fetchTimesheetLine = createAsyncThunk(
'timesheetLine/fetchTimesheetLine',
Expand All @@ -52,7 +53,7 @@ export const createTimesheetLine = createAsyncThunk(
responseOptions: {isArrayResponse: false, showToast: true},
}).then(() =>
dispatch(
fetchTimesheetLine({timesheetId: data.timesheetLine.timesheetId}),
fetchTimesheetById({timesheetId: data.timesheetLine.timesheetId}),
),
);
},
Expand All @@ -68,7 +69,7 @@ export const updateTimesheetLine = createAsyncThunk(
getState,
responseOptions: {isArrayResponse: false, showToast: true},
}).then(() =>
dispatch(fetchTimesheetLine({timesheetId: data.timesheetId})),
dispatch(fetchTimesheetById({timesheetId: data.timesheetId})),
);
},
);
Expand All @@ -83,7 +84,7 @@ export const deleteTimesheetLine = createAsyncThunk(
getState,
responseOptions: {isArrayResponse: false, showToast: true},
}).then(() => {
dispatch(fetchTimesheetLine({timesheetId: data.timesheetId}));
dispatch(fetchTimesheetById({timesheetId: data.timesheetId}));
});
},
);
Expand Down

0 comments on commit 3488034

Please sign in to comment.