Mercurial > gemma
diff client/src/components/importschedule/Importscheduledetail.vue @ 1830:f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 16 Jan 2019 16:59:48 +0100 |
parents | 0f98ef2531a5 |
children | 79283856f9cb |
line wrap: on
line diff
--- a/client/src/components/importschedule/Importscheduledetail.vue Wed Jan 16 16:34:47 2019 +0100 +++ b/client/src/components/importschedule/Importscheduledetail.vue Wed Jan 16 16:59:48 2019 +0100 @@ -190,6 +190,109 @@ </div> </div> </div> + <div v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSIONS"> + <div class="d-flex flex-row"> + <div class="flex-column mt-3 mr-3 w-50"> + <div class="flex-row text-left"> + <small class="text-muted"> <translate>LOS</translate> </small> + </div> + <div class="w-100"> + <input v-model="LOS" class="form-control" type="number" /> + </div> + <div v-if="!LOS" class="d-flex flex-row"> + <small + ><translate class="text-danger" + >Please enter a level of service</translate + ></small + > + </div> + </div> + <div class="flex-column mt-3 w-50"> + <div class="flex-row text-left"> + <small class="text-muted"> + <translate>Depth</translate> + </small> + </div> + <div class="w-100"> + <input v-model="depth" class="form-control" type="number" /> + </div> + <div v-if="!depth" class="d-flex flex-row"> + <small + ><translate class="text-danger" + >Please enter a depth</translate + ></small + > + </div> + </div> + </div> + <div class="d-flex flex-row"> + <div class="flex-column mt-3 mr-3 w-50"> + <div class="flex-row text-left"> + <small class="text-muted"> + <translate>MinWidth</translate> + </small> + </div> + <div class="w-100"> + <input + v-model="minWidth" + class="form-control" + type="number" + /> + </div> + <div v-if="!minWidth" class="d-flex flex-row"> + <small + ><translate class="text-danger" + >Please enter a minimum width</translate + ></small + > + </div> + </div> + <div class="flex-column mt-3 w-50"> + <div class="flex-row text-left"> + <small class="text-muted"> + <translate>MaxWidth</translate> + </small> + </div> + <div class="w-100"> + <input + v-model="maxWidth" + class="form-control" + type="number" + /> + </div> + <div v-if="!maxWidth" class="d-flex flex-row"> + <small + ><translate class="text-danger" + >Please enter a maximum width</translate + ></small + > + </div> + </div> + </div> + <div class="d-flex flex-row"> + <div class="flex-column mt-3 mr-3 w-50"> + <div class="flex-row text-left"> + <small class="text-muted"> + <translate>Source orgranization</translate> + </small> + </div> + <div class="w-100"> + <input + v-model="sourceOrganization" + class="form-control" + type="text" + /> + </div> + <div v-if="!sourceOrganization" class="d-flex flex-row"> + <small + ><translate class="text-danger" + >Please enter a source orgranization</translate + ></small + > + </div> + </div> + </div> + </div> <div class="d-flex flex-row"> <div class="flex-column mt-3 mr-4"> <div class="flex-row text-left"> @@ -604,6 +707,11 @@ this.sortBy = this.currentSchedule.sortBy; this.username = this.currentSchedule.username; this.password = this.currentSchedule.password; + this.LOS = this.currentSchedule.LOS; + this.minWidth = this.currentSchedule.minWidth; + this.maxWidth = this.currentSchedule.maxWidth; + this.depth = this.currentSchedule.depth; + this.sourceOrganization = this.currentSchedule.sourceOrganization; }, isWeekly(cron) { return /0 \d{1,2} \d{1,2} \* \* \d{1}/.test(cron); @@ -694,8 +802,26 @@ } if (this.isCredentialsRequired) { if (!this.username || !this.password) return; - addAttribute(data, { username: this.username }); - addAttribute(data, { password: this.password }); + addAttribute(data, { + username: this.username, + password: this.password + }); + } + if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSIONS) { + if ( + !this.LOS || + !this.minWidth || + !this.maxWidth || + !this.depth || + !this.sourceOrganization + ) + addAttribute(data, { + LOS: this.LOS, + minWidth: this.minWidth, + maxWidth: this.maxWidth, + depth: this.depth, + sourceOrganization: this.sourceOrganization + }); } if (this.scheduled) data["cron"] = cron; data["kind"] = IMPORTTYPEKIND[this.import_];