chore: restored location autofill

This commit is contained in:
2025-10-12 00:25:15 +02:00
parent cafdbb9653
commit 3713289339
3 changed files with 5 additions and 23 deletions
@@ -55,17 +55,6 @@
{{ cp }}
</option>
</select>
<label for="fill-checkpoint" class="g-checkbox">
<input
type="checkbox"
name="fill-checkpoint"
id="fill-checkpoint"
v-model="autofillCheckpointName"
@change="onAutofillChange()"
/>
<span> {{ $t('order-train-picker.autofill-checkpoint-id') }}</span>
</label>
</div>
<div class="content">
@@ -131,10 +120,7 @@ const selectedSceneryId = ref<string | null>(null);
const selectedCheckpointName = ref<string | null>(null);
const selectedRegion = ref('eu');
const autofillCheckpointName = ref(false);
onMounted(() => {
autofillCheckpointName.value = StorageManager.getBooleanValue('fill-checkpoint');
fetchSceneriesData();
});
@@ -223,10 +209,6 @@ function selectCheckpointOption() {
checkpointNameList.value.length == 0 ? null : checkpointNameList.value[0];
}
function onAutofillChange() {
StorageManager.setBooleanValue('fill-checkpoint', autofillCheckpointName.value);
}
function fillOrderData(train: API.ActiveTrains.Data) {
if (!selectedScenery.value) return;
@@ -234,7 +216,7 @@ function fillOrderData(train: API.ActiveTrains.Data) {
store.orderData.header.A = train.trainNo.toString();
store.orderData.header.C = train.currentStationName;
store.orderData.header.D = scenery.stationName;
store.orderData.header.D = selectedCheckpointName.value || scenery.stationName;
store.orderData.footer.V = train.driverName;
store.orderData.footer.W = scenery.dispatcherName;
+2 -2
View File
@@ -82,9 +82,9 @@
"A-placeholder": "Train / shunting composition number",
"B": "B Date",
"C": "C Location of train {'|'} Location of shunting composition",
"C-placeholder": "Line or post name",
"C-placeholder": "Name of the post / line / scenery",
"D": "D Location of issuer",
"D-placeholder": "Post name"
"D-placeholder": "Name of the post / scenery"
},
"22": {
"text": "Applies to left-track traffic",
+2 -2
View File
@@ -82,9 +82,9 @@
"A-placeholder": "Numer pociągu lub manewru",
"B": "B Data",
"C": "C Lokalizacja pociągu {'|'} składu manewrowego",
"C-placeholder": "Nazwa posterunku lub szlaku",
"C-placeholder": "Nazwa posterunku / szlaku / scenerii",
"D": "D Lokalizacja nadawcy",
"D-placeholder": "Nazwa posterunku"
"D-placeholder": "Nazwa posterunku / scenerii"
},
"22": {
"text": "Dotyczy jazdy torem lewym",