From 0127acb91530b4fe2a08d41e256a616324155736 Mon Sep 17 00:00:00 2001 From: Greenscreener Date: Sat, 23 Jan 2021 11:00:21 +0100 Subject: [PATCH] =?UTF-8?q?Added=20proper=20zIP=20hendlov=C3=A1n=C3=AD=20P?= =?UTF-8?q?S=C4=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- form/res-judicata/src/components/edit/Guide.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/form/res-judicata/src/components/edit/Guide.vue b/form/res-judicata/src/components/edit/Guide.vue index f90688e..f346b40 100644 --- a/form/res-judicata/src/components/edit/Guide.vue +++ b/form/res-judicata/src/components/edit/Guide.vue @@ -294,11 +294,13 @@ export default { watch: { selected:{ handler(newVal) { + const addressFields = newVal.fulladdress.split(", "); + this.zaloba.soud.nazev = newVal.name || "" - this.zaloba.soud.sidlo.uliceacislopopisne = newVal.address.split(", ")[0]|| "" - this.zaloba.soud.sidlo.mesto = newVal.address.split(", ")[1] || "" - this.zaloba.soud.sidlo.psc = "" - this.zaloba.soud.sidlo.stat = "Česká republika" + this.zaloba.soud.sidlo.uliceacislopopisne = addressFields[0]|| "" + this.zaloba.soud.sidlo.mesto = addressFields[addressFields.length-2].split(" ").slice(2).join(" ") || "" + this.zaloba.soud.sidlo.psc = addressFields[addressFields.length-2].split(" ").slice(0,2).join(" ") || "" + this.zaloba.soud.sidlo.stat = addressFields[addressFields.length-1] || "" }, deep: true } @@ -369,4 +371,4 @@ export default { }, } - \ No newline at end of file +