Skip to content
Snippets Groups Projects
Commit 1481d5a5 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Use ParametersReference in ParametersView.

parent e1c78a47
Branches
Tags
No related merge requests found
......@@ -9,6 +9,7 @@
import type { Writable } from "svelte/store"
import { session } from "$app/stores"
import ParameterReferences from "$lib/components/parameters/ParameterReferences.svelte"
import type { Reform, ReformChangeParameter } from "$lib/reforms"
import { ReformChangeType } from "$lib/reforms"
import type { SelfTargetAProps } from "$lib/urls"
......@@ -94,25 +95,7 @@
<div>Unité : {parameter.unit}</div>
{/if}
{#if parameter.reference !== undefined}
<div>
Références :
{#if typeof parameter.reference === "string"}
{parameter.reference}
{:else if Array.isArray(parameter.reference)}
<ul class="list-disc list-inside">
{#each parameter.reference as reference}
<li>{reference}</li>
{/each}
</ul>
{:else}
<dl>
{#each Object.entries(parameter.reference) as [instant, reference]}
<dt>{instant}</dt>
<dd class="ml-4">{reference}</dd>
{/each}
</dl>
{/if}
</div>
<ParameterReferences referencesByInstant={parameter.reference} />
{/if}
{#if parameterRepositoryUrl !== undefined}
<div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment