mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 11:18:17 +00:00
feat: enhance customs clearance process for forwarders
- Added logic in to determine if a company can clear its own customs. - Updated component to support upload-only mode for forwarders. - Removed customs clearing agent fields from and related schema. - Introduced component to handle customs clearing agent selection. - Created for viewing details of assigned bookings. - Implemented and modal for document uploads by forwarders. - Updated API services to accommodate new customs clearing logic.
This commit is contained in:
@@ -1183,7 +1183,7 @@ export class ContractsController {
|
||||
@MixedAudience(FREIGHT_PERMS.contracts.createBooking)
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Initiate a bare booking instance under an import/export contract (ONE_TIME or GENERAL) — no cargo, no date; enters per-booking clearance (AWAITING_DOCUMENTS). ONE_TIME customs instances are opened by the customer (or GL); GENERAL customs comes from a shipment request.',
|
||||
'Initiate a bare booking instance under an import/export contract (ONE_TIME or GENERAL) — no cargo, no date; enters per-booking clearance (AWAITING_DOCUMENTS). A without-customs instance names its clearing agent here (transitAgentId, or the typed agent fields). ONE_TIME customs instances are opened by the customer (or GL); GENERAL customs comes from a shipment request.',
|
||||
})
|
||||
async initiateBooking(
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
@@ -1198,7 +1198,16 @@ export class ContractsController {
|
||||
}
|
||||
return this.contractBookingService.initiateUnderContract(
|
||||
id,
|
||||
{ contractRouteId: dto?.contractRouteId },
|
||||
{
|
||||
contractRouteId: dto?.contractRouteId,
|
||||
// Who clears customs is named here, at initiation — the forwarder
|
||||
// uploads the documents on the bare instance, so it must be on the
|
||||
// job before that phase, not at completion.
|
||||
transitAgentId: dto?.transitAgentId,
|
||||
customsClearingAgent: dto?.customsClearingAgent,
|
||||
customsClearingAgentEmail: dto?.customsClearingAgentEmail,
|
||||
customsClearingAgentPhone: dto?.customsClearingAgentPhone,
|
||||
},
|
||||
{ id: user?.id ?? user?.sub },
|
||||
user,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user