From 6a91bd53e2f26d72a407a266b660cbfae0902a20 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Mon, 15 Feb 2021 17:52:20 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fixed=20null=20addresses=20in=20?= =?UTF-8?q?ContactsOverview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #50 --- src/components/ContactsOverview.svelte | 55 +++++++++++++++----------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/src/components/ContactsOverview.svelte b/src/components/ContactsOverview.svelte index 35538de8..31fcc9df 100644 --- a/src/components/ContactsOverview.svelte +++ b/src/components/ContactsOverview.svelte @@ -2,9 +2,11 @@ import { _ } from "svelte-i18n"; import Toastify from "toastify-js"; import { GroupContactService } from "@odit/lfk-client-js"; - const promise = GroupContactService.groupContactControllerGetAll().then(result=>{ - current_contacts=result; - }) + const promise = GroupContactService.groupContactControllerGetAll().then( + (result) => { + current_contacts = result; + } + ); import store from "../store"; import ContactsEmptyState from "./ContactsEmptyState.svelte"; $: searchvalue = ""; @@ -77,18 +79,18 @@
- {#if t.groups.length>0} - {#each t.groups as g} - {#if g.responseType==="RUNNERORGANIZATION"} - {g.name} - {:else} - {g.name} - {/if} - {/each} + {#if t.groups.length > 0} + {#each t.groups as g} + {#if g.responseType === 'RUNNERORGANIZATION'} + {g.name} + {:else} + {g.name} + {/if} + {/each} {:else}no groups{/if}
@@ -98,11 +100,13 @@
- {t.address.address1}
- {t.address.address2 || ''}
- {t.address.postalcode} - {t.address.city} - {t.address.country} + {#if t.address.address1 !== null} + {t.address.address1}
+ {t.address.address2 || ''}
+ {t.address.postalcode} + {t.address.city} + {t.address.country} + {/if}
@@ -119,16 +123,19 @@ Delete