mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 00:08:18 +00:00
add dispute functionality for contract duty and implement collection dates
This commit is contained in:
@@ -274,6 +274,20 @@ export class ContractTransitionService {
|
||||
// shared six templates are never written here.
|
||||
const snapshot = await this.resolveDocumentSnapshot(contract, documentSnapshot);
|
||||
|
||||
// Audit whatever staff changed in the accept dialog. The baseline is the
|
||||
// template this contract would otherwise have frozen as-is, so an untouched
|
||||
// accept diffs to nothing and records no revision.
|
||||
if (documentSnapshot) {
|
||||
const baseline = await this.resolveDocumentSnapshot(contract);
|
||||
await this.documentHistory.record({
|
||||
contractId,
|
||||
before: baseline,
|
||||
after: snapshot,
|
||||
actorId,
|
||||
actorRole: 'Reviewing staff',
|
||||
});
|
||||
}
|
||||
|
||||
await this.contractsRepository.update(contractId, {
|
||||
status: 'PENDING_APPROVAL',
|
||||
approvedByStaffId: actorId,
|
||||
|
||||
Reference in New Issue
Block a user