From 6d8488d2c31f038001fbcdb30ab542a1639c0a05 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Thu, 2 Mar 2023 13:58:49 +0200 Subject: [PATCH] fix: shipping zones label --- static/components/stall-details/stall-details.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/components/stall-details/stall-details.js b/static/components/stall-details/stall-details.js index ab81ef1..0caf1a3 100644 --- a/static/components/stall-details/stall-details.js +++ b/static/components/stall-details/stall-details.js @@ -35,16 +35,20 @@ async function stallDetails(path) { this.inkey ) this.stall = data + this.stall.shipping_zones.forEach( + z => + (z.label = z.name + ? `${z.name} (${z.countries.join(', ')})` + : z.countries.join(', ')) + ) console.log('### this.stall', this.stall) } catch (error) { LNbits.utils.notifyApiError(error) } } - }, created: async function () { await this.getStall() - console.log('### this.zoneOptions', this.zoneOptions) } }) }