Merge branch 'freight_feature/profile' of github.com:Tria-plc/edr-platform into freight_feature/profile

This commit is contained in:
Marshal
2026-06-24 23:56:07 +00:00
88 changed files with 4215 additions and 3624 deletions

View File

@@ -261,6 +261,54 @@ export class PricingDataSeeder {
isActive: true,
displayOrder: i + 1,
})),
{
code: "GRAIN",
cargoTypeName: "Grain / Cereals",
showFreeTextBox: false,
requiresDirectorApproval: false,
isActive: true,
displayOrder: 1,
},
{
code: "FERTILIZER",
cargoTypeName: "Fertilizer",
showFreeTextBox: false,
requiresDirectorApproval: false,
isActive: true,
displayOrder: 2,
},
{
code: "CEMENT",
cargoTypeName: "Cement / Clinker",
showFreeTextBox: false,
requiresDirectorApproval: false,
isActive: true,
displayOrder: 3,
},
{
code: "STEEL",
cargoTypeName: "Steel / Rebar",
showFreeTextBox: false,
requiresDirectorApproval: true,
isActive: true,
displayOrder: 4,
},
{
code: "MACHINERY",
cargoTypeName: "Heavy Machinery",
showFreeTextBox: false,
requiresDirectorApproval: true,
isActive: true,
displayOrder: 5,
},
{
code: "OTHER_BULK",
cargoTypeName: "Other Bulk Cargo",
showFreeTextBox: false,
requiresDirectorApproval: false,
isActive: true,
displayOrder: 6,
},
],
{ conflictPaths: { code: true } },
);
@@ -484,15 +532,29 @@ private async seedWeightLimits(wlRepo: any, ctRepo: any): Promise<void> {
slByCode: Map<string, any>,
cargoByCode: Map<string, any>,
): Promise<void> {
const djibouti = yardByCode.get("DJIBOUTI")!;
const addis = yardByCode.get("ADDIS_ABABA")!;
const railContainer = stByCode.get("RAIL_CONTAINER")!;
const railBulk = stByCode.get("RAIL_BULK")!;
const maersk = slByCode.get("MAERSK")!;
const grain = cargoByCode.get("GRAIN")!;
const twenty = ctByCode.get("20FT")!;
const forty = ctByCode.get("40FT")!;
const twentyReefer = ctByCode.get("20FT_REEFER")!;
const djibouti = yardByCode.get("DJIBOUTI");
const addis = yardByCode.get("ADDIS_ABABA");
const railContainer = stByCode.get("RAIL_CONTAINER");
const railBulk = stByCode.get("RAIL_BULK");
const maersk = slByCode.get("MAERSK");
const grain = cargoByCode.get("GRAIN");
const twenty = ctByCode.get("20FT");
const forty = ctByCode.get("40FT");
const twentyReefer = ctByCode.get("20FT_REEFER");
const missing: string[] = [];
if (!djibouti) missing.push("yard:DJIBOUTI");
if (!addis) missing.push("yard:ADDIS_ABABA");
if (!railContainer) missing.push("serviceType:RAIL_CONTAINER");
if (!railBulk) missing.push("serviceType:RAIL_BULK");
if (!grain) missing.push("cargoType:GRAIN");
if (!twenty) missing.push("containerType:20FT");
if (!forty) missing.push("containerType:40FT");
if (!twentyReefer) missing.push("containerType:20FT_REEFER");
if (missing.length > 0) {
this.logger.warn(`seedDraftBookings: skipping — missing reference data: ${missing.join(", ")}`);
return;
}
const drafts = [
{