comparison client/src/components/importschedule/Importscheduledetail.vue @ 1999:c420add2dec2 importschedulerefac

small errors fixed
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 24 Jan 2019 14:24:00 +0100
parents ceb6aaff6c8b
children d8874f78fd7b
comparison
equal deleted inserted replaced
1998:ceb6aaff6c8b 1999:c420add2dec2
488 computed: { 488 computed: {
489 ...mapState("imports", ["importScheduleDetailVisible", "currentSchedule"]), 489 ...mapState("imports", ["importScheduleDetailVisible", "currentSchedule"]),
490 dialogLabel() { 490 dialogLabel() {
491 if (this.id) return this.$gettext("Import") + " " + this.id; 491 if (this.id) return this.$gettext("Import") + " " + this.id;
492 return this.$gettext("New Import"); 492 return this.$gettext("New Import");
493 },
494 isCredentialsRequired() {
495 switch (this.import_) {
496 case this.$options.IMPORTTYPES.WATERWAYGAUGES:
497 case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL:
498 return true;
499 default:
500 return false;
501 }
502 },
503 isURLRequired() {
504 switch (this.import_) {
505 case this.$options.IMPORTTYPES.BOTTLENECK:
506 case this.$options.IMPORTTYPES.WATERWAYAXIS:
507 case this.$options.IMPORTTYPES.GAUGEMEASUREMENT:
508 case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY:
509 case this.$options.IMPORTTYPES.WATERWAYAREA:
510 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION:
511 case this.$options.IMPORTTYPES.WATERWAYGAUGES:
512 case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL:
513 return true;
514 default:
515 return false;
516 }
517 },
518 isFeatureTypeRequired() {
519 switch (this.import_) {
520 case this.$options.IMPORTTYPES.WATERWAYAXIS:
521 case this.$options.IMPORTTYPES.WATERWAYAREA:
522 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION:
523 return true;
524 default:
525 return false;
526 }
527 },
528 isSortbyRequired() {
529 switch (this.import_) {
530 case this.$options.IMPORTTYPES.WATERWAYAXIS:
531 case this.$options.IMPORTTYPES.WATERWAYAREA:
532 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION:
533 return true;
534 default:
535 return false;
536 }
493 } 537 }
494 }, 538 },
495 methods: { 539 methods: {
496 setUrl(value) { 540 setUrl(value) {
497 this.url = value; 541 this.url = value;
686 !this.depth || 730 !this.depth ||
687 !this.sourceOrganization 731 !this.sourceOrganization
688 ) 732 )
689 return; 733 return;
690 const values = { 734 const values = {
691 los: this.LOS, 735 los: this.LOS * 1,
692 depth: this.depth 736 depth: this.depth * 1
693 }; 737 };
694 values["min-width"] = this.minWidth; 738 values["min-width"] = this.minWidth * 1;
695 values["max-width"] = this.maxWidth; 739 values["max-width"] = this.maxWidth * 1;
696 values["source-organization"] = this.sourceOrganization; 740 values["source-organization"] = this.sourceOrganization;
697 addAttribute(data, values); 741 addAttribute(data, values);
698 } 742 }
699 if (this.scheduled) data["cron"] = cron; 743 if (this.scheduled) data["cron"] = cron;
700 data["kind"] = IMPORTTYPEKIND[this.import_]; 744 data["kind"] = IMPORTTYPEKIND[this.import_];