fixed extimatedLoggoff time

This commit is contained in:
PxlLoewe
2025-07-18 17:46:28 -07:00
parent 15012820ab
commit adc11ec647
9 changed files with 61 additions and 60 deletions

View File

@@ -45,15 +45,10 @@ export const handleConnectDispatch =
});
}
const [logoffHours, logoffMinutes] = logoffTime.split(":").map(Number);
const connectedDispatcherEntry = await prisma.connectedDispatcher.create({
data: {
publicUser: getPublicUser(user) as any,
esimatedLogoutTime:
logoffHours !== undefined && logoffMinutes !== undefined
? getNextDateWithTime(logoffHours, logoffMinutes)
: null,
esimatedLogoutTime: logoffTime,
lastHeartbeat: new Date().toISOString(),
userId: user.id,
zone: selectedZone,