2022-08-10 22:05:43 +02:00
|
|
|
<script lang="ts">
|
|
|
|
// import Icon from "@iconify/svelte"
|
|
|
|
// import searchIcon from "@iconify-icons/codicon/search"
|
|
|
|
import { TreeView } from "augmented-data-viewer"
|
|
|
|
|
|
|
|
// import { page } from "$app/stores"
|
|
|
|
import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte"
|
|
|
|
import Pagination from "$lib/components/Pagination.svelte"
|
2022-08-14 14:23:42 +02:00
|
|
|
import type { SectionTa } from "$lib/legal"
|
2022-08-13 12:18:09 +02:00
|
|
|
import { summarizeSectionTaProperties } from "$lib/summaries"
|
2022-08-10 22:05:43 +02:00
|
|
|
|
|
|
|
export let error: unknown
|
2022-08-13 12:18:09 +02:00
|
|
|
let sectionTaArray: SectionTa[]
|
|
|
|
export { sectionTaArray as section_ta }
|
2022-08-10 22:05:43 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<header class="prose my-6 max-w-full">
|
2022-08-13 12:18:09 +02:00
|
|
|
<h1>SECTION_TA</h1>
|
2022-08-10 22:05:43 +02:00
|
|
|
</header>
|
|
|
|
|
|
|
|
<!-- <form action={$page.url.pathname} class="mx-auto max-w-sm" method="get">
|
|
|
|
<div class="form-control">
|
|
|
|
<div class="input-group">
|
|
|
|
<input
|
|
|
|
class="input input-bordered"
|
|
|
|
name="q"
|
|
|
|
type="search"
|
|
|
|
bind:value={q}
|
|
|
|
/>
|
|
|
|
<button class="btn btn-square" type="submit">
|
|
|
|
<Icon icon={searchIcon} />
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-control">
|
|
|
|
<label class="label">
|
|
|
|
<span class="label-text">Législature</span>
|
|
|
|
<select
|
|
|
|
class="select select-bordered"
|
|
|
|
name="legislature"
|
|
|
|
bind:value={legislature}
|
|
|
|
>
|
|
|
|
<option value="">Toutes</option>
|
|
|
|
{#each Object.entries(Legislature) as [key, value]}
|
|
|
|
{#if value !== "*"}
|
|
|
|
<option {value}>{key}</option>
|
|
|
|
{/if}
|
|
|
|
{/each}
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</form> -->
|
|
|
|
|
|
|
|
{#if error != null}
|
|
|
|
<ErrorAlert {error} />
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
{#if error == null}
|
|
|
|
<TreeView
|
2022-08-13 12:18:09 +02:00
|
|
|
access={{ key: "section_ta" }}
|
2022-08-10 22:05:43 +02:00
|
|
|
frame={false}
|
|
|
|
open
|
2022-08-13 12:18:09 +02:00
|
|
|
summarize={summarizeSectionTaProperties}
|
|
|
|
value={sectionTaArray}
|
2022-08-10 22:05:43 +02:00
|
|
|
/>
|
|
|
|
|
2022-08-13 12:18:09 +02:00
|
|
|
<Pagination currentPageCount={sectionTaArray.length ?? 0} />
|
2022-08-10 22:05:43 +02:00
|
|
|
{/if}
|