Merge pull request #1461 from Tria-plc/freight_feature/usermanagement

feat(contracts): implement staff cancellation of contracts with reaso…
This commit is contained in:
marshal
2026-08-29 14:36:08 +03:00
committed by GitHub
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 }),