mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 05:18:10 +00:00
chore: new cargo warning
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="warning" v-if="store.cargoWarnings.size > 0">
|
<div class="warning" v-if="store.cargoWarnings.size > 0">
|
||||||
{{ $t('cargo-warnings.title') }}
|
(!) <b>{{ $t('cargo-warnings.title') }}</b>
|
||||||
{{ [...store.cargoWarnings].map((v) => $t(`cargo-warnings.${v}`)).join('; ') }}
|
{{ [...store.cargoWarnings].map((v) => $t(`cargo-warnings.${v}`)).join('; ') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -327,11 +327,12 @@
|
|||||||
"418Vb_ZUE": "loose cargo (sand, stone)"
|
"418Vb_ZUE": "loose cargo (sand, stone)"
|
||||||
},
|
},
|
||||||
"cargo-warnings": {
|
"cargo-warnings": {
|
||||||
"title": "Cargo warnings:",
|
"title": "Rolling stock containing extra cargo warnings:",
|
||||||
"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_twr": "TWR: diesel fuel (UN 1202)",
|
||||||
"warning_un1202_tn": "TN: diesel fuel - empty tank (UN 1202)"
|
"warning_un1202_tn": "TN: diesel fuel - empty tank (UN 1202)",
|
||||||
|
"warning_military_pn": "PN: military transport"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-2
@@ -326,11 +326,12 @@
|
|||||||
"418Vb_ZUE": "drobnica, ładunki sypkie (piasek, kamień)"
|
"418Vb_ZUE": "drobnica, ładunki sypkie (piasek, kamień)"
|
||||||
},
|
},
|
||||||
"cargo-warnings": {
|
"cargo-warnings": {
|
||||||
"title": "Uwagi przewozowe:",
|
"title": "Skład z dodatkowymi uwagami przewozowymi:",
|
||||||
"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_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 - puste cysterny (UN 1202)",
|
||||||
|
"warning_military_pn": "PN: transport wojskowy"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -108,6 +108,7 @@ export function getCargoWarnings(stockList: IStock[]) {
|
|||||||
stockList.forEach((stockVehicle) => {
|
stockList.forEach((stockVehicle) => {
|
||||||
if (stockVehicle.vehicleRef.group == 'wagon-freight') {
|
if (stockVehicle.vehicleRef.group == 'wagon-freight') {
|
||||||
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.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(stockVehicle.cargo ? 'warning_un1202_twr' : 'warning_un1202_tn');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user