feat(contracts): implement staff cancellation of contracts with reason and notification

This commit is contained in:
Marshal
2026-08-29 11:31:13 +00:00
parent 978f1889c6
commit 6ac41cf078
13 changed files with 352 additions and 5 deletions

View File

@@ -288,6 +288,13 @@ export const contractsService = {
reject: (id: string, reason: string) =>
postContract<Freight.IContract>(C.STAFF_REJECT(id), { reason }),
/**
* Cancel a contract outright. Terminal — unlike {@link suspend} there is no
* way back; a new contract with the same details must be submitted instead.
*/
cancelByStaff: (id: string, reason: string) =>
postContract<Freight.IContract>(C.STAFF_CANCEL(id), { reason }),
/** Freeze a signed contract. Reversible — see {@link resume}. */
suspend: (id: string, reason: string) =>
postContract<Freight.IContract>(C.SUSPEND(id), { reason }),