diff --git a/src/components/AddContactModal.svelte b/src/components/AddContactModal.svelte index 85115dea..7821a077 100644 --- a/src/components/AddContactModal.svelte +++ b/src/components/AddContactModal.svelte @@ -84,13 +84,12 @@ text: "Contact is being added...", duration: -1, }).showToast(); - const group=teams.concat(orgs).find(g=>g.id===selected_team) - console.log(group); + const groups=teams.concat(orgs).map(g=>g.id) let postdata = { - group: group, + groups: groups, firstname: firstname_input_value, lastname: lastname_input_value, - adress: { + address: { address1:address_input1_value, address2:address_input2_value||"", postalcode:address_zipcode_value, diff --git a/src/components/Contacts.svelte b/src/components/Contacts.svelte index f15451f9..17ae16a4 100644 --- a/src/components/Contacts.svelte +++ b/src/components/Contacts.svelte @@ -4,14 +4,13 @@ import AddContactModal from "./AddContactModal.svelte"; import ContactsOverview from "./ContactsOverview.svelte"; export let modal_open = false; - console.log(store.state.jwtinfo.userdetails.permissions); let current_contacts=[];
{$_('contacts')} - {#if store.state.jwtinfo.userdetails.permissions.includes('USER:CREATE')} + {#if store.state.jwtinfo.userdetails.permissions.includes('CONTACT:CREATE')}
-{#if store.state.jwtinfo.userdetails.permissions.includes('USER:CREATE')} +{#if store.state.jwtinfo.userdetails.permissions.includes('CONTACT:CREATE')} {/if} diff --git a/src/components/ContactsOverview.svelte b/src/components/ContactsOverview.svelte index 86546d2b..35538de8 100644 --- a/src/components/ContactsOverview.svelte +++ b/src/components/ContactsOverview.svelte @@ -24,7 +24,6 @@ {#if current_contacts.length === 0} {:else} - {JSON.stringify(current_contacts)}
- {t.address.address1}
{t.address.address2 || ''}
{t.address.postalcode}