Mercurial > gemma
changeset 3274:c1beed689439
client: define stretches: inlined method
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Wed, 15 May 2019 15:40:53 +0200 |
parents | 050e72ce5cf7 |
children | 98b5119cf4c1 |
files | client/src/components/stretches/Stretches.vue |
diffstat | 1 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/stretches/Stretches.vue Wed May 15 15:31:33 2019 +0200 +++ b/client/src/components/stretches/Stretches.vue Wed May 15 15:40:53 2019 +0200 @@ -31,7 +31,7 @@ <a class="text-info" v-if="isInStaging(stretch.properties.name)" - @click="gotoStaging(getStagingLink(stretch.properties.name))" + @click="gotoStaging(stretch.properties.name)" > {{ stretch.properties.name }} <font-awesome-icon @@ -387,8 +387,9 @@ .includes(this.searchQuery.toLowerCase()); }); }, - gotoStaging(id) { - this.$router.push("/review/" + id); + gotoStaging(stretchName) { + let stretch = this.stretchesInStaging.find(s => s.name === stretchName); + if (stretch) this.$router.push("/review/" + stretch.id); }, isInStaging(stretchname) { for (let s of this.stretchesInStaging) { @@ -396,11 +397,6 @@ } return false; }, - getStagingLink(stretchname) { - for (let s of this.stretchesInStaging) { - if (s.name == stretchname) return s.id; - } - }, loadStagingData() { return new Promise((resolve, reject) => { HTTP.get("/imports?states=pending", {