Scan reactive add

This commit is contained in:
2023-04-12 21:14:37 +02:00
parent 9811ede3b2
commit f5d14f2e18
3 changed files with 16 additions and 5 deletions

View File

@@ -5,6 +5,7 @@
import ScansOverview from "./ScansOverview.svelte";
$: current_scans = [];
export let modal_open = false;
let addScans;
</script>
<section class="container p-5">
@@ -21,9 +22,11 @@
</button>
{/if}
</span>
<ScansOverview bind:current_scans />
<ScansOverview bind:current_scans bind:addScans />
</section>
{#if store.state.jwtinfo.userdetails.permissions.includes('SCAN:CREATE')}
<AddScanModal bind:current_scans bind:modal_open />
<AddScanModal bind:modal_open on:created={(event)=>{
addScans(event.detail.scans)
}} />
{/if}