feature: project URL

This commit is contained in:
2023-02-10 17:33:17 +01:00
parent 580e109dda
commit 817d48d17a
5 changed files with 22 additions and 11 deletions
+3 -1
View File
@@ -19,6 +19,7 @@
<tr v-for="(station, row) in sortedStationList" tabindex="0">
<td v-for="(value, propName) in headerNameList" @click="changeProperty(station, row, propName as string)">
<span v-if="propName === 'url'" :style="station.url ? 'color: gold' : 'color: gray;'">URL</span>
<span v-else-if="propName === 'projectUrl'" :style="station.projectUrl ? 'color: gold' : 'color: gray;'">URL</span>
<span v-else-if="propName === 'checkpoints'">{{ station[propName] ? 'POKAŻ' : 'DODAJ' }}</span>
@@ -76,6 +77,7 @@ export default defineComponent({
url: 'URL',
lines: 'Linie',
project: 'Projekt',
projectUrl: 'URL projektu',
reqLevel: 'Wym. poziom',
signalType: 'Sygnalizacja',
controlType: 'Sterowanie',
@@ -135,7 +137,7 @@ export default defineComponent({
return;
}
let newValue = prompt(`Zmień wartość dla rubryki ${this.headerNameList[propertyName]}`, oldValue);
let newValue = prompt(`Zmień wartość dla rubryki ${this.headerNameList[propertyName]}`, oldValue || '');
if (newValue == null) return;
(this.store.stationList[stationListRow] as any)[propertyName] =
typeof oldValue === 'number' ? parseInt(newValue) : newValue;