Finished scanstations base view

ref #93
This commit is contained in:
Nicolai Ort 2021-03-10 17:16:50 +01:00
parent 83e782c7c5
commit 85fa9d942e

View File

@ -1,16 +1,16 @@
<script>
import { _ } from "svelte-i18n";
import store from "../../store";
// import AddContactModal from "./AddContactModal.svelte";
import AddScanStationModal from "./AddScanStationModal.svelte";
import ScanStationsOverview from "./ScanStationsOverview.svelte";
export let modal_open = false;
let current_contacts = [];
let current_stations = [];
</script>
<section class="container p-5">
<span class="mb-1 text-3xl font-extrabold leading-tight">
Scanstations
{#if store.state.jwtinfo.userdetails.permissions.includes('CONTACT:CREATE')}
{#if store.state.jwtinfo.userdetails.permissions.includes('STATION:CREATE')}
<button
on:click={() => {
modal_open = true;
@ -21,9 +21,9 @@
</button>
{/if}
</span>
<ContactsOverview bind:current_contacts />
<ScanStationsOverview bind:current_stations />
</section>
<!-- {#if store.state.jwtinfo.userdetails.permissions.includes('CONTACT:CREATE')}
<AddContactModal bind:current_contacts bind:modal_open />
{/if} -->
{#if store.state.jwtinfo.userdetails.permissions.includes('STATION:CREATE')}
<AddScanStationModal bind:current_stations bind:modal_open />
{/if}