Skip to main content
Sign in
Snippets Groups Projects
Commit 2596a19b authored by David Smadja's avatar David Smadja
Browse files

Add openAll for "other parameters"

parent 1442cded
Branches
Tags
1 merge request!329Permettre d'ouvrir / fermer tous les paramètres
......@@ -27,7 +27,7 @@
lawParameter: NodeParameter | undefined
name?: string | undefined
revaluationParameter: NodeParameter | undefined
openAllParameters: boolean | undefined
openAllParameters: boolean | null
}
let {
......
......
......@@ -149,6 +149,8 @@
let openOtherParameters = $state(true)
let openAllParameters: boolean | null = $state(true)
let loadingAllParameters = $state(false)
let openAllOtherParameters: boolean | null = $state(false)
let loadingAllOtherParameters = $state(false)
</script>
{#if billDecomposition !== undefined || billVariable !== undefined}
......@@ -336,7 +338,7 @@
<!-- Ouvrir tout et fermer tout -->
<div class="absolute -left-8 top-8 h-full pl-4 pr-2">
<div class="sticky top-2 flex flex-col items-start gap-1">
{#if loadingAllParameters}
{#if loadingAllOtherParameters}
<!-- Loader unique à la place des deux pictos -->
<div
class="flex items-center text-xs uppercase tracking-wide text-neutral-400"
......@@ -353,10 +355,11 @@
title="Ouvrir tout"
class="flex cursor-pointer items-center bg-white text-xs uppercase tracking-wide text-neutral-400 hover:text-le-gris-dispositif-dark"
onclick={async () => {
loadingAllParameters = true
loadingAllOtherParameters = true
openAllOtherParameters = null
await new Promise((resolve) => setTimeout(resolve, 500))
openAllParameters = true
loadingAllParameters = false
openAllOtherParameters = true
loadingAllOtherParameters = false
}}
>
<iconify-icon icon="ri-folder-open-line" class="mr-1 text-base"
......@@ -369,10 +372,11 @@
title="Fermer tout"
class="flex cursor-pointer items-center bg-white text-xs uppercase tracking-wide text-neutral-400 hover:text-le-gris-dispositif-dark"
onclick={async () => {
loadingAllParameters = true
loadingAllOtherParameters = true
openAllOtherParameters = null
await new Promise((resolve) => setTimeout(resolve, 500))
openAllParameters = false
loadingAllParameters = false
openAllOtherParameters = false
loadingAllOtherParameters = false
}}
>
<iconify-icon
......@@ -421,7 +425,7 @@
revaluationParameter={revaluationParameter as
| NodeParameter
| undefined}
isOtherParametersdiv={true}
openAllParameters={openAllOtherParameters}
/>
{:else if billParameter.class === ParameterClass.Value}
<VariableReferredValueParameter
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment