shared state reactivity - AddUserModal-Users-UsersOverview

ref #12
This commit is contained in:
2021-01-13 17:49:01 +01:00
parent e6fbf7aa5b
commit f7acbb1eaa
3 changed files with 23 additions and 25 deletions

View File

@@ -5,6 +5,7 @@
export let modal_open = false;
import UsersOverview from "./UsersOverview.svelte";
console.log(store.state.jwtinfo.userdetails.permissions);
let current_users=[];
</script>
<section class="container p-5">
@@ -22,9 +23,9 @@
{/if}
</span>
<p class="mb-8 text-lg text-gray-500">{$_('manage-admin-users')}</p>
<UsersOverview />
<UsersOverview bind:current_users />
</section>
{#if store.state.jwtinfo.userdetails.permissions.includes('USER:CREATE')}
<AddUserModal bind:modal_open />
<AddUserModal bind:current_users bind:modal_open />
{/if}