Mercurial > gemma
changeset 1308:0e9dd3cd7b53
import sounding result: fixed form fields for POST
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 23 Nov 2018 12:04:26 +0100 |
parents | 541a5488f0e7 |
children | 3c91930367ee |
files | client/src/components/map/contextbox/ImportSoundingresults.vue |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/map/contextbox/ImportSoundingresults.vue Fri Nov 23 11:25:28 2018 +0100 +++ b/client/src/components/map/contextbox/ImportSoundingresults.vue Fri Nov 23 12:04:26 2018 +0100 @@ -1,8 +1,7 @@ <template> <div> <h6 class="mb-0 py-2 px-3 border-bottom d-flex align-items-center"> - <font-awesome-icon icon="upload" class="mr-2"></font-awesome-icon> - Import Soundingresults + <font-awesome-icon icon="upload" class="mr-2"></font-awesome-icon>Import Soundingresults </h6> <div v-if="editState" class="ml-auto mr-auto mt-4 w-95"> <div class="d-flex flex-row input-group mb-4"> @@ -195,8 +194,13 @@ confirm() { let formData = new FormData(); formData.append("token", this.token); + const mapping = { + bottleneck: "bottleneck", + importDate: "date", + depthReference: "depth-reference" + }; ["bottleneck", "importDate", "depthReference"].forEach(x => { - if (this[x]) formData.append(x, this[x]); + if (this[x]) formData.append(mapping[x], this[x]); }); HTTP.post("/imports/soundingresult", formData, { headers: {