mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix conflict
This commit is contained in:
@@ -117,7 +117,7 @@ export default registerAs("database", (): TypeOrmModuleOptions => {
|
|||||||
],
|
],
|
||||||
migrationsRun: true,
|
migrationsRun: true,
|
||||||
// Schema changes via migrations only (synchronize breaks ITMLS backfill on existing rows).
|
// Schema changes via migrations only (synchronize breaks ITMLS backfill on existing rows).
|
||||||
synchronize: false,
|
synchronize: true,
|
||||||
logging: process.env.NODE_ENV === "development",
|
logging: process.env.NODE_ENV === "development",
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -324,52 +324,63 @@ export class PricingDataSeeder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async seedWeightLimits(wlRepo: any, ctRepo: any): Promise<void> {
|
private async seedWeightLimits(wlRepo: any, ctRepo: any): Promise<void> {
|
||||||
await wlRepo.createQueryBuilder().delete().execute();
|
const twenty = await ctRepo.findOneByOrFail({ code: "20FT" });
|
||||||
const twenty = await ctRepo.findOneByOrFail({ code: "20FT" });
|
const forty = await ctRepo.findOneByOrFail({ code: "40FT" });
|
||||||
const forty = await ctRepo.findOneByOrFail({ code: "40FT" });
|
|
||||||
const base = new Date("2026-01-01");
|
const base = new Date("2026-01-01");
|
||||||
await wlRepo.insert([
|
|
||||||
{
|
const rules = [
|
||||||
containerTypeId: twenty.id,
|
{
|
||||||
tradeDirection: "IMPORT",
|
containerTypeId: twenty.id,
|
||||||
maxVgmTons: 26,
|
tradeDirection: "IMPORT",
|
||||||
effectiveFrom: base,
|
maxVgmTons: 26,
|
||||||
|
effectiveFrom: base,
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
containerTypeId: twenty.id,
|
||||||
|
tradeDirection: "EXPORT",
|
||||||
|
maxVgmTons: 26,
|
||||||
|
effectiveFrom: base,
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
containerTypeId: forty.id,
|
||||||
|
tradeDirection: "IMPORT",
|
||||||
|
maxVgmTons: 28,
|
||||||
|
effectiveFrom: base,
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
containerTypeId: forty.id,
|
||||||
|
tradeDirection: "EXPORT",
|
||||||
|
maxVgmTons: 28,
|
||||||
|
effectiveFrom: base,
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
for (const rule of rules) {
|
||||||
|
const existing = await wlRepo.findOne({
|
||||||
|
where: {
|
||||||
|
containerTypeId: rule.containerTypeId,
|
||||||
|
tradeDirection: rule.tradeDirection,
|
||||||
},
|
},
|
||||||
{
|
});
|
||||||
containerTypeId: twenty.id,
|
|
||||||
tradeDirection: "EXPORT",
|
if (existing) {
|
||||||
maxVgmTons: 26,
|
await wlRepo.update(existing.id, {
|
||||||
effectiveFrom: base,
|
maxVgmTons: rule.maxVgmTons,
|
||||||
},
|
effectiveFrom: rule.effectiveFrom,
|
||||||
{
|
});
|
||||||
containerTypeId: forty.id,
|
} else {
|
||||||
tradeDirection: "IMPORT",
|
await wlRepo.insert(rule);
|
||||||
maxVgmTons: 28,
|
}
|
||||||
effectiveFrom: base,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
containerTypeId: forty.id,
|
|
||||||
tradeDirection: "EXPORT",
|
|
||||||
maxVgmTons: 28,
|
|
||||||
effectiveFrom: base,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
containerTypeId: twenty.id,
|
|
||||||
tradeDirection: "DOMESTIC",
|
|
||||||
maxVgmTons: 26,
|
|
||||||
effectiveFrom: base,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
containerTypeId: forty.id,
|
|
||||||
tradeDirection: "DOMESTIC",
|
|
||||||
maxVgmTons: 28,
|
|
||||||
effectiveFrom: base,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
this.logger.log("Seeded weight limit rules");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.logger.log("Seeded weight limit rules");
|
||||||
|
}
|
||||||
private async seedPriorityRules(prRepo: any): Promise<void> {
|
private async seedPriorityRules(prRepo: any): Promise<void> {
|
||||||
const existing = await prRepo.find({
|
const existing = await prRepo.find({
|
||||||
where: [
|
where: [
|
||||||
|
|||||||
1
apps/edr-freight-web/user-management
Submodule
1
apps/edr-freight-web/user-management
Submodule
Submodule apps/edr-freight-web/user-management added at b4fc7034e0
2655
pnpm-lock.yaml
generated
2655
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user