Mercurial > gemma
comparison client/src/components/importoverview/LogDetail.vue @ 2605:11fd7ee37f10
overview2: added stretch zoom functionality
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 12 Mar 2019 17:08:49 +0100 |
parents | b9523d876d01 |
children | 13377f2a5c42 |
comparison
equal
deleted
inserted
replaced
2603:8d767359fddb | 2605:11fd7ee37f10 |
---|---|
1 <template> | 1 <template> |
2 <div> | 2 <div> |
3 <div class="d-flex fex-row"> | 3 <div class="d-flex fex-row"> |
4 <div v-if="entry.state == 'pending'"> | 4 <div v-if="hasAdditionalInfo"> |
5 <font-awesome-icon | 5 <font-awesome-icon |
6 v-if="entry.id === showAdditional" | 6 v-if="entry.id === showAdditional" |
7 @click="toggleAdditionalInfo" | 7 @click="toggleAdditionalInfo" |
8 class="my-auto mr-1 text-info pointer" | 8 class="my-auto mr-1 text-info pointer" |
9 icon="angle-down" | 9 icon="angle-down" |
15 class="my-auto mr-1 text-info pointer" | 15 class="my-auto mr-1 text-info pointer" |
16 icon="angle-right" | 16 icon="angle-right" |
17 fixed-width | 17 fixed-width |
18 ></font-awesome-icon> | 18 ></font-awesome-icon> |
19 <span class="text-info"><translate>Additional Info</translate></span> | 19 <span class="text-info"><translate>Additional Info</translate></span> |
20 <span class="text-info" v-if="isApprovedGaugeMeasurement"> | |
21 ({{ entry.summary.length }})</span | |
22 > | |
20 </div> | 23 </div> |
24 <StretchDetail v-if="isStretch" :entry="entry"></StretchDetail> | |
21 </div> | 25 </div> |
22 <AdditionalDetail | 26 <AdditionalDetail |
23 v-if="entry.id === showAdditional" | 27 v-if="entry.id === showAdditional" |
24 class="ml-2 d-flex flex-row" | 28 class="ml-2 d-flex flex-row" |
25 :entry="entry" | 29 :entry="entry" |
69 | 73 |
70 export default { | 74 export default { |
71 name: "logdetail", | 75 name: "logdetail", |
72 props: ["entry"], | 76 props: ["entry"], |
73 components: { | 77 components: { |
78 StretchDetail: () => import("./StretchDetails.vue"), | |
74 AdditionalDetail: () => import("./AdditionalDetail.vue"), | 79 AdditionalDetail: () => import("./AdditionalDetail.vue"), |
75 AdditionalLog: () => import("./AdditionalLog.vue") | 80 AdditionalLog: () => import("./AdditionalLog.vue") |
76 }, | 81 }, |
77 methods: { | 82 methods: { |
78 toggleAdditionalInfo() { | 83 toggleAdditionalInfo() { |
89 this.$store.commit("imports/showAdditionalLogsFor", this.entry.id); | 94 this.$store.commit("imports/showAdditionalLogsFor", this.entry.id); |
90 } | 95 } |
91 } | 96 } |
92 }, | 97 }, |
93 computed: { | 98 computed: { |
94 ...mapState("imports", ["showAdditional", "showLogs"]) | 99 ...mapState("imports", ["showAdditional", "showLogs"]), |
100 kind() { | |
101 return this.entry.kind.toUpperCase(); | |
102 }, | |
103 hasAdditionalInfo() { | |
104 return this.entry.state == "pending" && this.isApprovedGaugeMeasurement; | |
105 }, | |
106 isFairwayDimension() { | |
107 return this.kind === "FD"; | |
108 }, | |
109 isApprovedGaugeMeasurement() { | |
110 return this.kind === "AGM"; | |
111 }, | |
112 isBottleneck() { | |
113 return this.kind === "BN" || this.kind === "UBN"; | |
114 }, | |
115 isStretch() { | |
116 return this.kind === "ST"; | |
117 }, | |
118 isSoundingResult() { | |
119 return this.kind === "SR"; | |
120 } | |
95 } | 121 } |
96 }; | 122 }; |
97 </script> | 123 </script> |
98 | 124 |
99 <style lang="scss" scoped></style> | 125 <style lang="scss" scoped></style> |