parent
a7098df9cf
commit
45e7f6a0d1
@ -84,13 +84,12 @@
|
|||||||
text: "Contact is being added...",
|
text: "Contact is being added...",
|
||||||
duration: -1,
|
duration: -1,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
const group=teams.concat(orgs).find(g=>g.id===selected_team)
|
const groups=teams.concat(orgs).map(g=>g.id)
|
||||||
console.log(group);
|
|
||||||
let postdata = {
|
let postdata = {
|
||||||
group: group,
|
groups: groups,
|
||||||
firstname: firstname_input_value,
|
firstname: firstname_input_value,
|
||||||
lastname: lastname_input_value,
|
lastname: lastname_input_value,
|
||||||
adress: {
|
address: {
|
||||||
address1:address_input1_value,
|
address1:address_input1_value,
|
||||||
address2:address_input2_value||"",
|
address2:address_input2_value||"",
|
||||||
postalcode:address_zipcode_value,
|
postalcode:address_zipcode_value,
|
||||||
|
@ -4,14 +4,13 @@
|
|||||||
import AddContactModal from "./AddContactModal.svelte";
|
import AddContactModal from "./AddContactModal.svelte";
|
||||||
import ContactsOverview from "./ContactsOverview.svelte";
|
import ContactsOverview from "./ContactsOverview.svelte";
|
||||||
export let modal_open = false;
|
export let modal_open = false;
|
||||||
console.log(store.state.jwtinfo.userdetails.permissions);
|
|
||||||
let current_contacts=[];
|
let current_contacts=[];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section class="container p-5">
|
<section class="container p-5">
|
||||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||||
{$_('contacts')}
|
{$_('contacts')}
|
||||||
{#if store.state.jwtinfo.userdetails.permissions.includes('USER:CREATE')}
|
{#if store.state.jwtinfo.userdetails.permissions.includes('CONTACT:CREATE')}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
modal_open = true;
|
modal_open = true;
|
||||||
@ -25,6 +24,6 @@
|
|||||||
<ContactsOverview bind:current_contacts />
|
<ContactsOverview bind:current_contacts />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{#if store.state.jwtinfo.userdetails.permissions.includes('USER:CREATE')}
|
{#if store.state.jwtinfo.userdetails.permissions.includes('CONTACT:CREATE')}
|
||||||
<AddContactModal bind:current_contacts bind:modal_open />
|
<AddContactModal bind:current_contacts bind:modal_open />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
{#if current_contacts.length === 0}
|
{#if current_contacts.length === 0}
|
||||||
<ContactsEmptyState />
|
<ContactsEmptyState />
|
||||||
{:else}
|
{:else}
|
||||||
{JSON.stringify(current_contacts)}
|
|
||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
bind:value={searchvalue}
|
bind:value={searchvalue}
|
||||||
@ -99,7 +98,6 @@
|
|||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="ml-4">
|
<div class="ml-4">
|
||||||
<div class="text-sm font-medium text-gray-900">
|
<div class="text-sm font-medium text-gray-900">
|
||||||
<!-- {JSON.stringify(t.address)} -->
|
|
||||||
{t.address.address1}<br>
|
{t.address.address1}<br>
|
||||||
{t.address.address2 || ''}<br>
|
{t.address.address2 || ''}<br>
|
||||||
{t.address.postalcode}
|
{t.address.postalcode}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user