mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 06:00:55 +00:00
Refactor clearance terminology to document approval across services and UI components
This commit is contained in:
@@ -135,12 +135,14 @@ export function ClearanceReviewSection({
|
||||
const finalizeMutation = useMutation({
|
||||
mutationFn: () => bookingsService.finalizeClearance(bookingId),
|
||||
onSuccess: () => {
|
||||
toast.success("Clearance finalized");
|
||||
toast.success("Document approval finalized");
|
||||
refresh();
|
||||
},
|
||||
onError: (e) =>
|
||||
toast.error(
|
||||
e instanceof Error ? e.message : "Could not finalize clearance",
|
||||
e instanceof Error
|
||||
? e.message
|
||||
: "Could not finalize document approval",
|
||||
),
|
||||
});
|
||||
|
||||
@@ -366,7 +368,7 @@ export function ClearanceReviewSection({
|
||||
<Alert color="red" radius="md" icon={<AlertCircle size={16} />}>
|
||||
{finalizeMutation.error instanceof Error
|
||||
? finalizeMutation.error.message
|
||||
: "Could not finalize clearance."}
|
||||
: "Could not finalize document approval."}
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
@@ -445,7 +447,7 @@ export function ClearanceReviewSection({
|
||||
loading={finalizeMutation.isPending}
|
||||
onClick={() => finalizeMutation.mutate()}
|
||||
>
|
||||
Finalize clearance
|
||||
Finalize document approval
|
||||
</Button>
|
||||
</Group>
|
||||
</Paper>
|
||||
|
||||
@@ -68,7 +68,7 @@ export interface ContractClearanceReviewSectionProps {
|
||||
queriesLocked?: boolean;
|
||||
/**
|
||||
* ONE_TIME customs contracts use the phased milestone workflow. Hides the
|
||||
* legacy "Finalize clearance" shortcut; booking readiness follows delivery
|
||||
* legacy "Finalize document approval" shortcut; booking readiness follows delivery
|
||||
* order (import) or export release.
|
||||
*/
|
||||
phasedCustoms?: boolean;
|
||||
@@ -393,7 +393,7 @@ export function ContractClearanceReviewSection({
|
||||
<Alert color="red" radius="md" icon={<AlertCircle size={16} />}>
|
||||
{finalizeClearance.error instanceof Error
|
||||
? finalizeClearance.error.message
|
||||
: "Could not finalize clearance."}
|
||||
: "Could not finalize document approval."}
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
@@ -482,7 +482,7 @@ export function ContractClearanceReviewSection({
|
||||
})
|
||||
}
|
||||
>
|
||||
Finalize clearance
|
||||
Finalize document approval
|
||||
</Button>
|
||||
</Group>
|
||||
</Paper>
|
||||
|
||||
@@ -160,7 +160,8 @@ export default function BuildTrainModal({ opened, onClose, onBuilt }: BuildTrain
|
||||
onChange={(value) => setImportTrainNumber(value ?? "")}
|
||||
searchable
|
||||
clearable
|
||||
nothingFoundMessage="No free run numbers — add more in Dropdown Settings"
|
||||
nothingFoundMessage={importNumbers.emptyMessage}
|
||||
error={importNumbers.settingMissing ? importNumbers.emptyMessage : undefined}
|
||||
/>
|
||||
</Group>
|
||||
<Select
|
||||
|
||||
@@ -105,7 +105,8 @@ const EditTrainDetailsModal = ({ train, onClose }: EditTrainDetailsModalProps) =
|
||||
}}
|
||||
searchable
|
||||
clearable
|
||||
nothingFoundMessage="No free run numbers — add more in Dropdown Settings"
|
||||
nothingFoundMessage={importNumbers.emptyMessage}
|
||||
error={importNumbers.settingMissing ? importNumbers.emptyMessage : undefined}
|
||||
radius="md"
|
||||
/>
|
||||
<TextInput
|
||||
|
||||
Reference in New Issue
Block a user