mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 03:38:17 +00:00
Add ContractCourtBadge component and integrate into contract pages
- Introduced ContractCourtBadge to display the responsible party for contract actions. - Updated ContractStatusBadge to include new court badge. - Enhanced ClearanceDocumentsPage with additional filters for trade direction, freight type, and ownership. - Modified ContractRequestDetailPage and ContractRequestsPage to utilize ContractCourtBadge.
This commit is contained in:
@@ -99,16 +99,20 @@ export function ContractMilestonesTimeline({
|
||||
});
|
||||
}
|
||||
|
||||
// Every acted approval step, not just hazardous ones — this is the one
|
||||
// place the approval-time record shows up in the page's main content
|
||||
// (the sidebar's ContractApprovalStepsCard has the same times, but only
|
||||
// there, and only while the chain is still actionable).
|
||||
for (const step of contract.approvalSteps ?? []) {
|
||||
if (!(step.requiredRole in HAZARDOUS_APPROVAL_ROLE_PERMISSION)) continue;
|
||||
if (!step.actedAt) continue;
|
||||
const hazard = step.requiredRole in HAZARDOUS_APPROVAL_ROLE_PERMISSION;
|
||||
items.push({
|
||||
key: `hazard-${step.id}`,
|
||||
key: `step-${step.id}`,
|
||||
at: step.actedAt,
|
||||
title: CONTRACT_APPROVAL_ROLE_LABELS[step.requiredRole] ?? step.requiredRole,
|
||||
detail: step.status === "REJECTED" ? "Rejected" : "Approved",
|
||||
color: step.status === "REJECTED" ? "red" : "orange",
|
||||
icon: Flame,
|
||||
title: `${CONTRACT_APPROVAL_ROLE_LABELS[step.requiredRole] ?? step.requiredRole} ${step.status === "REJECTED" ? "rejected" : "approved"}`,
|
||||
detail: step.note ?? undefined,
|
||||
color: step.status === "REJECTED" ? "red" : hazard ? "orange" : "edr-green",
|
||||
icon: hazard ? Flame : ShieldCheck,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user