fix: cargo warnings

This commit is contained in:
2025-06-27 15:40:50 +02:00
parent 730275ea7c
commit bd1de41764
3 changed files with 3 additions and 5 deletions
+1 -2
View File
@@ -332,8 +332,7 @@
"warning_wt_20_pn": "PN: exceeded gauge (Innofreight - C45)", "warning_wt_20_pn": "PN: exceeded gauge (Innofreight - C45)",
"warning_un1965_twr": "TWR: LPG (UN 1965)", "warning_un1965_twr": "TWR: LPG (UN 1965)",
"warning_un1965_tn": "TN: LPG - empty tank (UN 1965)", "warning_un1965_tn": "TN: LPG - empty tank (UN 1965)",
"warning_un1202_twr": "TWR: diesel fuel (UN 1202)", "warning_un1202_tn": "TN: diesel fuel (UN 1202)",
"warning_un1202_tn": "TN: diesel fuel - empty tank (UN 1202)",
"warning_military_pn": "PN: military transport" "warning_military_pn": "PN: military transport"
} }
} }
+1 -2
View File
@@ -331,8 +331,7 @@
"warning_wt_20_pn": "PN: przekroczona skrajnia (Innofreight - C45)", "warning_wt_20_pn": "PN: przekroczona skrajnia (Innofreight - C45)",
"warning_un1965_twr": "TWR: gazy węglowodorowe skroplone (UN 1965)", "warning_un1965_twr": "TWR: gazy węglowodorowe skroplone (UN 1965)",
"warning_un1965_tn": "TN: gazy węglowodorowe skroplone - puste cysterny (UN 1965)", "warning_un1965_tn": "TN: gazy węglowodorowe skroplone - puste cysterny (UN 1965)",
"warning_un1202_twr": "TWR: olej napędowy (UN 1202)", "warning_un1202_tn": "TN: olej napędowy (UN 1202)",
"warning_un1202_tn": "TN: olej napędowy - puste cysterny (UN 1202)",
"warning_military_pn": "PN: transport wojskowy" "warning_military_pn": "PN: transport wojskowy"
} }
} }
+1 -1
View File
@@ -110,7 +110,7 @@ export function getCargoWarnings(stockList: IStock[]) {
if (stockVehicle.cargo && stockVehicle.cargo.id.startsWith('wt_20')) warnings.add('warning_wt_20_pn'); if (stockVehicle.cargo && stockVehicle.cargo.id.startsWith('wt_20')) warnings.add('warning_wt_20_pn');
else if (stockVehicle.cargo && /^(tank|vehicles|truck)/.test(stockVehicle.cargo.id)) warnings.add('warning_military_pn'); else if (stockVehicle.cargo && /^(tank|vehicles|truck)/.test(stockVehicle.cargo.id)) warnings.add('warning_military_pn');
else if (stockVehicle.vehicleRef.type.startsWith('WB117')) warnings.add(stockVehicle.cargo ? 'warning_un1965_twr' : 'warning_un1965_tn'); else if (stockVehicle.vehicleRef.type.startsWith('WB117')) warnings.add(stockVehicle.cargo ? 'warning_un1965_twr' : 'warning_un1965_tn');
else if (stockVehicle.vehicleRef.type.startsWith('445Rb')) warnings.add(stockVehicle.cargo ? 'warning_un1202_twr' : 'warning_un1202_tn'); else if (stockVehicle.vehicleRef.type.startsWith('445Rb')) warnings.add('warning_un1202_tn');
} }
}); });