mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 21:15:41 +00:00
feat: enhance booking and audit log functionalities
- Implemented read-only locking for customer-requested container sizes and billing currency in the GlCreateBookingForm component. - Added functionality to lock partner quantities based on shipment requests in the ConsolidationPartnerPanel. - Introduced a new Leave action in the LogPassYardWorkModal to unassign bookings from trains. - Enhanced the AuditLogsPage to support filtering by action and added a Go button for direct navigation to entity detail pages. - Updated WagonCancellationsPage to handle odd-20ft credits requiring partner selection during rebooking. - Improved TrainScheduleV2DetailPage to allow manual loading of cargo and display warnings for unassigned bookings. - Added a new reference field to the audit logs for better searchability and tracking of actions. - Created a migration to add the reference column to the audit logs table and established an index for efficient querying. - Defined a registry for audit reference sources to streamline the retrieval of human identifiers for various entities.
This commit is contained in:
@@ -725,6 +725,30 @@ export class BookingsController {
|
||||
return this.wagonCancellationService.withdraw(cancellationId);
|
||||
}
|
||||
|
||||
@Get("wagon-cancellations/:cancellationId/rebook-partners")
|
||||
@ApiOperation({
|
||||
summary:
|
||||
"Consolidation partner candidates for rebooking an odd-20ft credit on the given day (GL picks who shares the rebooked wagon)",
|
||||
})
|
||||
async listRebookPartners(
|
||||
@Param("cancellationId", ParseUUIDPipe) cancellationId: string,
|
||||
@Query("scheduledDate") scheduledDate: string,
|
||||
@CurrentUser() user: TCurrentUser,
|
||||
) {
|
||||
await this.assertWagonCancellationActor(
|
||||
cancellationId,
|
||||
user,
|
||||
FREIGHT_PERMS.bookings.wagonCancellationRebook,
|
||||
);
|
||||
if (!scheduledDate) {
|
||||
throw new BadRequestException("scheduledDate is required.");
|
||||
}
|
||||
return this.wagonCancellationService.rebookPartnerCandidates(
|
||||
cancellationId,
|
||||
scheduledDate,
|
||||
);
|
||||
}
|
||||
|
||||
@Post("wagon-cancellations/:cancellationId/rebook")
|
||||
@ApiOperation({
|
||||
summary:
|
||||
|
||||
Reference in New Issue
Block a user