add goverment booking

This commit is contained in:
Marshal
2026-07-31 00:41:51 +00:00
parent 34e4a7d13f
commit 65f18b4796
35 changed files with 913 additions and 88 deletions

View File

@@ -157,10 +157,14 @@ export class ContractViewModelBuilder {
pricing,
rateSchedule,
signatures,
canSignCustomer:
booking.status === 'CONTRACT_READY' && !hasCustomer,
canSignStaff:
booking.status === 'SIGNED_CUSTOMER' && hasCustomer && !hasStaff,
// Government contracts are generated at creation and signable at any
// time, in any order — no status gate, no customer-first sequencing.
canSignCustomer: booking.isGovernment
? !hasCustomer
: booking.status === 'CONTRACT_READY' && !hasCustomer,
canSignStaff: booking.isGovernment
? !hasStaff
: booking.status === 'SIGNED_CUSTOMER' && hasCustomer && !hasStaff,
hasContractDocument: hasContractFile,
hasCustomerSignature: hasCustomer,
hasStaffSignature: hasStaff,