shoc-frontend-new/src/domain/work-orders/utils/should-notify-cross-week.ts

9 lines
365 B
TypeScript

import { mondayOf } from "@/domain/work-orders/utils/wizard-date-utils";
/** True when the new scheduled date falls outside the week currently being viewed. */
export function shouldNotifyCrossWeek(dateIso: string, activeWeekMonday: string): boolean {
if (!dateIso || !activeWeekMonday) {
return false;
}
return mondayOf(dateIso) !== activeWeekMonday;
}