comparison client/src/components/Bottlenecks.vue @ 5574:271888ef85bc surveysperbottleneckid

Finalize use of bottleneck id instead of name. Main feaure is the restructuring of the /surveys endpoint. The endpoint now takes queryparameters as qualifiers. /surveys?id={id} returns surveys to a given bottleck {id} /surveys?name={name} & date={date} returns surveys for given {name} of a bottleneck and {date} for a surveydate. This is needed mainly because there is some backwards incompatibility when reviewing sounding results where the summary of a sr import contains only the name instead of the id of the according bottleneck. To bridge this mismatch the survey endpoint could be queried for the sr to review given the surveydate and the name of the bottleneck. Premise is here, that a date and a bottleneck's name is specific enough to identify the correct survey with the correct bottleneck.
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 21 Jul 2021 14:33:35 +0200
parents 3b842e951317
children 94ef43fac0eb
comparison
equal deleted inserted replaced
5573:5d95f3b7c45f 5574:271888ef85bc
174 this.openBottleneck = null; 174 this.openBottleneck = null;
175 this.openBottleneckSurveys = null; 175 this.openBottleneckSurveys = null;
176 } else { 176 } else {
177 this.loading = bottleneck; 177 this.loading = bottleneck;
178 HTTP.get( 178 HTTP.get(
179 "/surveys/" + encodeURIComponent(bottleneck.properties.bottleneck_id), 179 "/surveys?id=" +
180 encodeURIComponent(bottleneck.properties.bottleneck_id),
180 { 181 {
181 headers: { 182 headers: {
182 "X-Gemma-Auth": localStorage.getItem("token"), 183 "X-Gemma-Auth": localStorage.getItem("token"),
183 "Content-type": "text/xml; charset=UTF-8" 184 "Content-type": "text/xml; charset=UTF-8"
184 } 185 }