mirror of
https://github.com/ever-co/ever-gauzy.git
synced 2026-10-02 01:54:50 +08:00
feat(desktop-ipc): persist time slot id on return (#8986)
Store the time slot ID in local storage when returning to a time slot. Also destructure event arguments for clarity.
This commit is contained in:
@@ -759,15 +759,16 @@ export function ipcTimer(
|
||||
|
||||
ipcMain.on('return_time_slot', async (event, arg) => {
|
||||
try {
|
||||
log.info(`Return To Timeslot Last Timeslot ID: ${arg.timeSlotId} and Timer ID: ${arg.timerId}`);
|
||||
|
||||
const { timeSlotId, timerId } = arg;
|
||||
log.info(`Return To Timeslot Last Timeslot ID: ${timeSlotId} and Timer ID: ${timerId}`);
|
||||
LocalStore.updateAdditionalSetting({ timeSlotId });
|
||||
await timerHandler.processWithQueue(
|
||||
`gauzy-queue`,
|
||||
{
|
||||
type: 'update-timer-time-slot',
|
||||
data: {
|
||||
id: arg.timerId,
|
||||
timeSlotId: arg.timeSlotId
|
||||
id: timerId,
|
||||
timeSlotId
|
||||
}
|
||||
},
|
||||
knex
|
||||
|
||||
Reference in New Issue
Block a user