Mercurial > gemma
changeset 4916:d456621404c2 fairway-marks-import
Make fairwaymark imports editable again.
In case you update a fairway mark import, you can not switch the type.
There is only the option to delete the existing import.
For information purposes is the type displayed.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 11 Feb 2020 16:51:09 +0100 |
parents | db134712519b |
children | 0098cfd602be |
files | client/src/components/importconfiguration/ScheduledImports.vue client/src/components/importconfiguration/types/Fairwaymarks.vue client/src/store/importschedule.js |
diffstat | 3 files changed, 18 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ScheduledImports.vue Tue Feb 11 16:13:57 2020 +0100 +++ b/client/src/components/importconfiguration/ScheduledImports.vue Tue Feb 11 16:51:09 2020 +0100 @@ -105,6 +105,7 @@ @featureTypeChanged="setFeatureType" @sortByChanged="setSortBy" @selectedMarkChanged="setSelectedMark" + :isUpdate="!this.id" :url="url" :featureType="featureType" :sortBy="sortBy"
--- a/client/src/components/importconfiguration/types/Fairwaymarks.vue Tue Feb 11 16:13:57 2020 +0100 +++ b/client/src/components/importconfiguration/types/Fairwaymarks.vue Tue Feb 11 16:51:09 2020 +0100 @@ -23,14 +23,19 @@ </small> </div> <div class="w-50 mt-2"> - <select v-model="selectedMark" class="form-control form-control-sm"> - <option - v-for="(option, value) in $options.FAIRWAYMARKS" - :key="value" - :value="value" - >{{ option }}</option - > - </select> + <template v-if="isUpdate"> + <select v-model="selectedMark" class="form-control form-control-sm"> + <option + v-for="(option, value) in $options.FAIRWAYMARKS" + :key="value" + :value="value" + >{{ option }}</option + > + </select> + </template> + <template v-else=""> + <span class="pl-1">{{ selectedMark }}</span> + </template> </div> </div> </div> @@ -94,8 +99,8 @@ * Thomas Junk <thomas.junk@intevation.de> */ export default { - name: "waterwayarea", - props: ["url", "featureType", "sortBy", "mark"], + name: "fairwaymarks", + props: ["url", "featureType", "sortBy", "mark", "isUpdate"], computed: { selectedMark: { get() {
--- a/client/src/store/importschedule.js Tue Feb 11 16:13:57 2020 +0100 +++ b/client/src/store/importschedule.js Tue Feb 11 16:51:09 2020 +0100 @@ -159,7 +159,8 @@ const { cron, url } = config; if (FAIRWAYMARKKINDS[kind]) { Vue.set(state.currentSchedule, "importType", "fairwaymarks"); - Vue.set(state.selectedMark), FAIRWAYMARKKINDS[kind]; + debugger; + Vue.set(state.currentSchedule, "selectedMark", FAIRWAYMARKKINDS[kind]); } else { Vue.set(state.currentSchedule, "importType", KINDIMPORTTYPE[kind]); }