This commit is contained in:
marshal
2026-06-25 10:37:21 +03:00
295 changed files with 16865 additions and 7724 deletions

View File

@@ -102,6 +102,12 @@ export class Batch5TestDataSeeder {
serviceTypeId: serviceType.id,
status: 'PAID',
paymentStatus: 'PAID',
scheduledDate: now,
contractType: 'SPOT',
equipmentReturn: 'TERMINAL',
paymentCurrency: 'ETB',
totalAmount: 0,
isGovernment: false,
tradeDirection: 'EXPORT',
freightType: 'BULK',
cargoTotalWeightVgm: seed.weight,

View File

@@ -89,6 +89,7 @@ export class WarehouseDemoSeeder {
): Promise<Booking> =>
bookingRepo.save(
bookingRepo.create({
...this.demoBookingDefaults(),
reference,
originYardId: direction === 'EXPORT' ? ethYard.id : djibYard.id,
destinationYardId: direction === 'EXPORT' ? djibYard.id : ethYard.id,
@@ -237,6 +238,7 @@ export class WarehouseDemoSeeder {
for (let i = 1; i <= 3; i++) {
const b = await bookingRepo.save(
bookingRepo.create({
...this.demoBookingDefaults(),
reference: `WH-DEMO-ARR-${i}`,
originYardId: djibYard.id,
destinationYardId: ethYard.id,
@@ -255,4 +257,15 @@ export class WarehouseDemoSeeder {
);
}
}
private demoBookingDefaults(): Partial<Booking> {
return {
scheduledDate: new Date(),
contractType: 'SPOT',
equipmentReturn: 'TERMINAL',
paymentCurrency: 'ETB',
totalAmount: 0,
isGovernment: false,
};
}
}