From bd1de417643fb18bb30abb78d9f1dc0c16c565bf Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 27 Jun 2025 15:40:50 +0200 Subject: [PATCH] fix: cargo warnings --- src/locales/en.json | 3 +-- src/locales/pl.json | 3 +-- src/utils/vehicleUtils.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 1e4731a..6b8b166 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -332,8 +332,7 @@ "warning_wt_20_pn": "PN: exceeded gauge (Innofreight - C45)", "warning_un1965_twr": "TWR: LPG (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 - empty tank (UN 1202)", + "warning_un1202_tn": "TN: diesel fuel (UN 1202)", "warning_military_pn": "PN: military transport" } } \ No newline at end of file diff --git a/src/locales/pl.json b/src/locales/pl.json index 894967c..482729e 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -331,8 +331,7 @@ "warning_wt_20_pn": "PN: przekroczona skrajnia (Innofreight - C45)", "warning_un1965_twr": "TWR: gazy węglowodorowe skroplone (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 - puste cysterny (UN 1202)", + "warning_un1202_tn": "TN: olej napędowy (UN 1202)", "warning_military_pn": "PN: transport wojskowy" } } \ No newline at end of file diff --git a/src/utils/vehicleUtils.ts b/src/utils/vehicleUtils.ts index a4f1905..5d4a73e 100644 --- a/src/utils/vehicleUtils.ts +++ b/src/utils/vehicleUtils.ts @@ -110,7 +110,7 @@ export function getCargoWarnings(stockList: IStock[]) { 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.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'); } });