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:
Kifungo A
2025-06-05 07:51:28 +02:00
committed by GitHub
parent 22370d0b91
commit 382d169b4b
+5 -4
View File
@@ -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