mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
feat(bookings): add contract validity window and customs clearing features
- Introduced contract validity days, valid from and valid until fields in the booking model. - Updated booking acceptance logic to enforce validity window constraints. - Added customs clearing agent and first/last mile pickup/delivery coordinates to the booking model. - Implemented LocationPicker component for address selection with map integration using Leaflet. - Enhanced booking review step to display customs clearing agent details. - Updated API and DTOs to accommodate new booking fields. - Added migration scripts for database schema changes. - Implemented tests for booking acceptance and DTO transformations.
This commit is contained in:
@@ -365,6 +365,13 @@ export interface IBooking extends BaseEntity {
|
||||
adjustedByStaffId?: string | null;
|
||||
adjustedAt?: string | null;
|
||||
adjustmentReason?: string | null;
|
||||
/**
|
||||
* Contract validity window set by the backoffice at the accept step. Valid
|
||||
* from contractValidFrom through contractValidUntil (validFrom + N days).
|
||||
*/
|
||||
contractValidityDays?: number | null;
|
||||
contractValidFrom?: string | null;
|
||||
contractValidUntil?: string | null;
|
||||
paymentStatus: PaymentStatus;
|
||||
|
||||
shippingLineId?: string | null;
|
||||
@@ -376,8 +383,15 @@ export interface IBooking extends BaseEntity {
|
||||
|
||||
firstMileEnabled: boolean;
|
||||
firstMilePickupAddress?: string | null;
|
||||
firstMilePickupLat?: number | null;
|
||||
firstMilePickupLng?: number | null;
|
||||
lastMileEnabled: boolean;
|
||||
lastMileDeliveryAddress?: string | null;
|
||||
lastMileDeliveryLat?: number | null;
|
||||
lastMileDeliveryLng?: number | null;
|
||||
|
||||
customsClearingEnabled?: boolean;
|
||||
customsClearingAgent?: string | null;
|
||||
|
||||
equipmentReturn: "WITH_RETURN" | "WITHOUT_RETURN";
|
||||
originYard?: IYard | null;
|
||||
@@ -640,7 +654,13 @@ export interface CreateBookingDto {
|
||||
previousContractId?: string | undefined;
|
||||
serviceTypeId: string;
|
||||
firstMilePickupAddress?: string | undefined;
|
||||
firstMilePickupLat?: number | undefined;
|
||||
firstMilePickupLng?: number | undefined;
|
||||
lastMileDeliveryAddress?: string | undefined;
|
||||
lastMileDeliveryLat?: number | undefined;
|
||||
lastMileDeliveryLng?: number | undefined;
|
||||
customsClearingEnabled?: boolean | undefined;
|
||||
customsClearingAgent?: string | undefined;
|
||||
equipmentReturn: string;
|
||||
originYardId: string;
|
||||
destinationYardId: string;
|
||||
|
||||
Reference in New Issue
Block a user