Trying to fix some whack ass bugs

This commit is contained in:
2025-09-17 16:08:28 -05:00
parent 92854382db
commit d4842fdacd
7 changed files with 45 additions and 62 deletions

View File

@@ -344,9 +344,11 @@ export const endOfShiftUpdate = action({
timeZone: 'America/Chicago',
}),
);
const day = now.getDay(), hour = now.getHours(), minute = now.getMinutes();
const day = now.getDay(),
hour = now.getHours(),
minute = now.getMinutes();
if (day == 0 || day === 6) return;
const message = (day === 5) ? 'Enjoying the weekend' : 'End of shift';
const message = day === 5 ? 'Enjoying the weekend' : 'End of shift';
if (hour === 17) {
await ctx.runMutation(api.statuses.updateAllStatuses, { message });
} else if (hour === 16) {