feat: add report printing and deletion functionality
- Implemented a new feature to print security reports with structured JSON observations, enhancing report accessibility. - Added a deletion function for reports, allowing users to remove reports with confirmation prompts. - Updated the CybersecurityWizcard component to include action buttons for printing and deleting reports, improving user interaction. - Enhanced the backend with a mutation to handle report deletions, ensuring proper cleanup of associated artifacts.
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
<script lang="ts">
|
||||
import CybersecurityWizcard from '$lib/components/ti/CybersecurityWizcard.svelte';
|
||||
import { resolve } from '$app/paths';
|
||||
import { browser } from '$app/environment';
|
||||
import { onMount } from 'svelte';
|
||||
// Usar tipo amplo para evitar conflitos de tipagem do import dinâmico no build
|
||||
let Comp: any = null;
|
||||
onMount(async () => {
|
||||
const mod = await import('$lib/components/ti/CybersecurityWizcard.svelte');
|
||||
Comp = mod.default;
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -23,7 +30,13 @@
|
||||
<a href={resolve('/ti')} class="btn btn-outline btn-primary">Voltar para TI</a>
|
||||
</header>
|
||||
|
||||
<CybersecurityWizcard />
|
||||
{#if browser && Comp}
|
||||
<svelte:component this={Comp} />
|
||||
{:else}
|
||||
<div class="alert">
|
||||
<span>Carregando módulo de cibersegurança…</span>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user