Mercurial > gemma
comparison client/src/components/importconfiguration/types/Soundingresults.vue @ 3702:ee7dc0bea083
import_soundingresult: sysadmin sees full list of bottlenecks
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 19 Jun 2019 11:40:58 +0200 |
parents | 2d77a7447d09 |
children | 9eab897f66b6 |
comparison
equal
deleted
inserted
replaced
3701:519c6e01607f | 3702:ee7dc0bea083 |
---|---|
351 computed: { | 351 computed: { |
352 ...mapState("application", ["showContextBox"]), | 352 ...mapState("application", ["showContextBox"]), |
353 ...mapState("bottlenecks", ["bottlenecks"]), | 353 ...mapState("bottlenecks", ["bottlenecks"]), |
354 ...mapState("user", ["user"]), | 354 ...mapState("user", ["user"]), |
355 ...mapGetters("usermanagement", ["userCountries"]), | 355 ...mapGetters("usermanagement", ["userCountries"]), |
356 ...mapGetters("user", ["isSysAdmin"]), | |
356 importSoundingresultsLabel() { | 357 importSoundingresultsLabel() { |
357 return this.$gettext("Import Soundingresults"); | 358 return this.$gettext("Import Soundingresults"); |
358 }, | 359 }, |
359 disableUploadButton() { | 360 disableUploadButton() { |
360 if (this.importState === IMPORTSTATE.UPLOAD) return this.disableUpload; | 361 if (this.importState === IMPORTSTATE.UPLOAD) return this.disableUpload; |
367 return true; | 368 return true; |
368 return this.disableUpload; | 369 return this.disableUpload; |
369 }, | 370 }, |
370 availableBottlenecks() { | 371 availableBottlenecks() { |
371 const userCountrycode = this.userCountries[this.user]; | 372 const userCountrycode = this.userCountries[this.user]; |
372 if (userCountrycode === "global") return this.bottlenecks; | 373 if (userCountrycode === "global" || this.isSysAdmin) |
374 return this.bottlenecks; | |
373 return this.bottlenecks.filter( | 375 return this.bottlenecks.filter( |
374 bn => bn.properties.responsible_country === userCountrycode | 376 bn => bn.properties.responsible_country === userCountrycode |
375 ); | 377 ); |
376 }, | 378 }, |
377 placeholder() { | 379 placeholder() { |