comparison 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
comparison
equal deleted inserted replaced
1829:b4b9089c2d79 1830:f1ac917ec4a0
182 </div> 182 </div>
183 <div v-if="!sortBy" class="d-flex flex-row"> 183 <div v-if="!sortBy" class="d-flex flex-row">
184 <small 184 <small
185 ><translate class="text-danger" 185 ><translate class="text-danger"
186 >Please enter SortBy</translate 186 >Please enter SortBy</translate
187 ></small
188 >
189 </div>
190 </div>
191 </div>
192 </div>
193 <div v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSIONS">
194 <div class="d-flex flex-row">
195 <div class="flex-column mt-3 mr-3 w-50">
196 <div class="flex-row text-left">
197 <small class="text-muted"> <translate>LOS</translate> </small>
198 </div>
199 <div class="w-100">
200 <input v-model="LOS" class="form-control" type="number" />
201 </div>
202 <div v-if="!LOS" class="d-flex flex-row">
203 <small
204 ><translate class="text-danger"
205 >Please enter a level of service</translate
206 ></small
207 >
208 </div>
209 </div>
210 <div class="flex-column mt-3 w-50">
211 <div class="flex-row text-left">
212 <small class="text-muted">
213 <translate>Depth</translate>
214 </small>
215 </div>
216 <div class="w-100">
217 <input v-model="depth" class="form-control" type="number" />
218 </div>
219 <div v-if="!depth" class="d-flex flex-row">
220 <small
221 ><translate class="text-danger"
222 >Please enter a depth</translate
223 ></small
224 >
225 </div>
226 </div>
227 </div>
228 <div class="d-flex flex-row">
229 <div class="flex-column mt-3 mr-3 w-50">
230 <div class="flex-row text-left">
231 <small class="text-muted">
232 <translate>MinWidth</translate>
233 </small>
234 </div>
235 <div class="w-100">
236 <input
237 v-model="minWidth"
238 class="form-control"
239 type="number"
240 />
241 </div>
242 <div v-if="!minWidth" class="d-flex flex-row">
243 <small
244 ><translate class="text-danger"
245 >Please enter a minimum width</translate
246 ></small
247 >
248 </div>
249 </div>
250 <div class="flex-column mt-3 w-50">
251 <div class="flex-row text-left">
252 <small class="text-muted">
253 <translate>MaxWidth</translate>
254 </small>
255 </div>
256 <div class="w-100">
257 <input
258 v-model="maxWidth"
259 class="form-control"
260 type="number"
261 />
262 </div>
263 <div v-if="!maxWidth" class="d-flex flex-row">
264 <small
265 ><translate class="text-danger"
266 >Please enter a maximum width</translate
267 ></small
268 >
269 </div>
270 </div>
271 </div>
272 <div class="d-flex flex-row">
273 <div class="flex-column mt-3 mr-3 w-50">
274 <div class="flex-row text-left">
275 <small class="text-muted">
276 <translate>Source orgranization</translate>
277 </small>
278 </div>
279 <div class="w-100">
280 <input
281 v-model="sourceOrganization"
282 class="form-control"
283 type="text"
284 />
285 </div>
286 <div v-if="!sourceOrganization" class="d-flex flex-row">
287 <small
288 ><translate class="text-danger"
289 >Please enter a source orgranization</translate
187 ></small 290 ></small
188 > 291 >
189 </div> 292 </div>
190 </div> 293 </div>
191 </div> 294 </div>
602 this.cronString = this.currentSchedule.cronString; 705 this.cronString = this.currentSchedule.cronString;
603 this.featureType = this.currentSchedule.featureType; 706 this.featureType = this.currentSchedule.featureType;
604 this.sortBy = this.currentSchedule.sortBy; 707 this.sortBy = this.currentSchedule.sortBy;
605 this.username = this.currentSchedule.username; 708 this.username = this.currentSchedule.username;
606 this.password = this.currentSchedule.password; 709 this.password = this.currentSchedule.password;
710 this.LOS = this.currentSchedule.LOS;
711 this.minWidth = this.currentSchedule.minWidth;
712 this.maxWidth = this.currentSchedule.maxWidth;
713 this.depth = this.currentSchedule.depth;
714 this.sourceOrganization = this.currentSchedule.sourceOrganization;
607 }, 715 },
608 isWeekly(cron) { 716 isWeekly(cron) {
609 return /0 \d{1,2} \d{1,2} \* \* \d{1}/.test(cron); 717 return /0 \d{1,2} \d{1,2} \* \* \d{1}/.test(cron);
610 }, 718 },
611 isMonthly(cron) { 719 isMonthly(cron) {
692 "feature-type": this.featureType 800 "feature-type": this.featureType
693 }); 801 });
694 } 802 }
695 if (this.isCredentialsRequired) { 803 if (this.isCredentialsRequired) {
696 if (!this.username || !this.password) return; 804 if (!this.username || !this.password) return;
697 addAttribute(data, { username: this.username }); 805 addAttribute(data, {
698 addAttribute(data, { password: this.password }); 806 username: this.username,
807 password: this.password
808 });
809 }
810 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSIONS) {
811 if (
812 !this.LOS ||
813 !this.minWidth ||
814 !this.maxWidth ||
815 !this.depth ||
816 !this.sourceOrganization
817 )
818 addAttribute(data, {
819 LOS: this.LOS,
820 minWidth: this.minWidth,
821 maxWidth: this.maxWidth,
822 depth: this.depth,
823 sourceOrganization: this.sourceOrganization
824 });
699 } 825 }
700 if (this.scheduled) data["cron"] = cron; 826 if (this.scheduled) data["cron"] = cron;
701 data["kind"] = IMPORTTYPEKIND[this.import_]; 827 data["kind"] = IMPORTTYPEKIND[this.import_];
702 data["send-email"] = this.eMailNotification; 828 data["send-email"] = this.eMailNotification;
703 if (!this.id) { 829 if (!this.id) {