feat(helpdesk): add ticket notification types
Add ticket:created/assigned/reply/status labels and muteable notification types. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
6419c9676f
commit
94cd7c5626
2 changed files with 12 additions and 0 deletions
|
|
@ -74,6 +74,14 @@ export function notificationLabel(type?: string | null): string {
|
||||||
return "Bank transfer";
|
return "Bank transfer";
|
||||||
case "shipment:completed":
|
case "shipment:completed":
|
||||||
return "Shipment completed";
|
return "Shipment completed";
|
||||||
|
case "ticket:created":
|
||||||
|
return "New ticket";
|
||||||
|
case "ticket:assigned":
|
||||||
|
return "Ticket assigned";
|
||||||
|
case "ticket:reply":
|
||||||
|
return "New reply";
|
||||||
|
case "ticket:status":
|
||||||
|
return "Ticket updated";
|
||||||
default:
|
default:
|
||||||
return type ?? "Notification";
|
return type ?? "Notification";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,10 @@ export const MUTEABLE_NOTIFICATION_TYPES = [
|
||||||
{ label: "Bank withdrawal", value: "finance:withdraw" },
|
{ label: "Bank withdrawal", value: "finance:withdraw" },
|
||||||
{ label: "Bank transfer", value: "finance:transfer" },
|
{ label: "Bank transfer", value: "finance:transfer" },
|
||||||
{ label: "Shipment completed", value: "shipment:completed" },
|
{ label: "Shipment completed", value: "shipment:completed" },
|
||||||
|
{ label: "New tickets", value: "ticket:created" },
|
||||||
|
{ label: "Ticket assigned", value: "ticket:assigned" },
|
||||||
|
{ label: "Ticket replies", value: "ticket:reply" },
|
||||||
|
{ label: "Ticket status changes", value: "ticket:status" },
|
||||||
] as const;
|
] as const;
|
||||||
export type MuteableNotificationType = (typeof MUTEABLE_NOTIFICATION_TYPES)[number]["value"];
|
export type MuteableNotificationType = (typeof MUTEABLE_NOTIFICATION_TYPES)[number]["value"];
|
||||||
export const MUTEABLE_NOTIFICATION_VALUES = MUTEABLE_NOTIFICATION_TYPES.map((t) => t.value);
|
export const MUTEABLE_NOTIFICATION_VALUES = MUTEABLE_NOTIFICATION_TYPES.map((t) => t.value);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue