mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-05 00:12:09 +00:00
Dispatchers see a one-line banner and a one-time toast while a Reactive/Emergency work order is past half of its SEV response window; the banner opens the board on exactly those work orders and dismisses for the session. Missed deadlines stay in the notification center until acknowledged, and Clear all skips them.
13 lines
562 B
TypeScript
13 lines
562 B
TypeScript
import { apiGet, apiPostNoContent } from "@/api/api";
|
|
import {
|
|
notificationFeedSchema,
|
|
type NotificationFeed,
|
|
} from "@/domain/notifications/types/notification-feed";
|
|
|
|
export const notificationsApi = {
|
|
feed: async (): Promise<NotificationFeed> =>
|
|
notificationFeedSchema.parse(await apiGet<unknown>("notifications")),
|
|
/** Records who acknowledged the missed response deadline in the work order's audit history. */
|
|
acknowledgeSlaBreach: (workOrderId: number): Promise<void> =>
|
|
apiPostNoContent(`notifications/sla/${workOrderId}/acknowledge`),
|
|
};
|