Skip to content
Snippets Groups Projects
Unverified Commit cd7d72f1 authored by Dorine Lambinet's avatar Dorine Lambinet
Browse files

Inverse le bouton historique et le bouton "à jour"

parent 8a9fc338
No related branches found
No related tags found
1 merge request!307Arborescence des paramètres
...@@ -294,37 +294,10 @@ ...@@ -294,37 +294,10 @@
/> />
</div> </div>
<div class="flex justify-end bg-gray-100 py-2 pl-2 pr-4"> <div class="flex justify-end bg-gray-100 px-4 py-2">
<a
class="lx-link-simple ml-2 flex items-center text-sm text-gray-600"
rel="noreferrer"
href="/parameters/{billParameter.name}"
onclick={() => {
trackLawEditParameterHistory()
}}
target="_blank"
>
<iconify-icon
class="mr-1 align-[-0.3rem] text-base"
icon="ri-history-line"
></iconify-icon>Historique
</a>
</div>
<div class="rounded-b bg-le-gris-dispositif-ultralight px-2 py-2">
<div class="flex items-center justify-between">
{#if billLatestInstant !== "0001-01-01"} {#if billLatestInstant !== "0001-01-01"}
<!--Date du paramètre-->
<p class="pb-2 text-xs">
{#if showScaleAsValue}
Valeur
{:else}
Barème
{/if} en vigueur depuis le {billLatestInstantSplit[1]}/{billLatestInstantSplit[0]}&nbsp;:
</p>
{/if}
<button <button
class="hover:decoration-none flex px-1 pb-2 pr-2 text-sm tracking-wide text-black underline decoration-dotted hover:decoration-solid" class="hover:decoration-none flex pb-2 pl-1 text-sm tracking-wide text-black underline decoration-dotted hover:decoration-solid"
rel="noreferrer" rel="noreferrer"
onclick={() => { onclick={() => {
goto(`/parameters/${billParameter.name}/edit`) goto(`/parameters/${billParameter.name}/edit`)
...@@ -335,7 +308,7 @@ ...@@ -335,7 +308,7 @@
class="text-center text-xs" class="text-center text-xs"
title="La dernière relecture date du {dateFormatter( title="La dernière relecture date du {dateFormatter(
new Date(lastReviewOrChange), new Date(lastReviewOrChange),
)}. Cliquer pour proposer une modification du paramètre." )}. Cliquer pour proposer une mise à jour du paramètre."
> >
{#if lastReviewOrChange < (new Date().getFullYear() - 2).toString()} {#if lastReviewOrChange < (new Date().getFullYear() - 2).toString()}
<iconify-icon <iconify-icon
...@@ -356,6 +329,35 @@ ...@@ -356,6 +329,35 @@
{/if} {/if}
</span> </span>
</button> </button>
{/if}
</div>
<div class="rounded-b bg-le-gris-dispositif-ultralight px-2 py-2">
<div class="flex items-center justify-between">
{#if billLatestInstant !== "0001-01-01"}
<!--Date du paramètre-->
<p class="pb-2 text-xs">
{#if showScaleAsValue}
Valeur
{:else}
Barème
{/if} en vigueur depuis le {billLatestInstantSplit[1]}/{billLatestInstantSplit[0]}&nbsp;:
</p>
{/if}
<a
class="lx-link-simple flex items-center px-2 text-sm text-gray-600"
rel="noreferrer"
href="/parameters/{billParameter.name}"
onclick={() => {
trackLawEditParameterHistory()
}}
target="_blank"
>
<iconify-icon
class="mr-1 align-[-0.3rem] text-base"
icon="ri-history-line"
></iconify-icon>Historique
</a>
</div> </div>
{#if billLatestInstant !== "0001-01-01" || (billReferences !== undefined && billReferences.length > 0)} {#if billLatestInstant !== "0001-01-01" || (billReferences !== undefined && billReferences.length > 0)}
<!--Référence législative--> <!--Référence législative-->
......
...@@ -281,20 +281,49 @@ ...@@ -281,20 +281,49 @@
{/if} {/if}
</div> </div>
<a {#if billLatestInstant !== "0001-01-01"}
class="lx-link-simple mx-1 flex items-center text-sm text-gray-600" <!--Date du paramètre-->
rel="noreferrer"
href="/parameters/{billParameter.name}" <button
class="hover:decoration-none flex items-center pl-1 text-sm tracking-wide text-black underline decoration-dotted hover:decoration-solid"
onclick={() => { onclick={() => {
trackLawEditParameterHistory() goto(`/parameters/${billParameter.name}/edit`)
trackLawEditParameterStatus()
}} }}
target="_blank" >
{#if lastReviewOrChange === undefined || lastReviewOrChange < (new Date().getFullYear() - 2).toString()}
<span
class="text-center text-xs"
title={lastReviewOrChange === undefined
? "Ce paramètre n'a jamais été relu. . Cliquer pour proposer une mise à jour du paramètre."
: `La dernière relecture date du ${dateFormatter(
new Date(lastReviewOrChange),
)}. Cliquer pour proposer une mise à jour du paramètre.`}
> >
<iconify-icon <iconify-icon
class="mr-1 align-[-0.3rem] text-base" class="mr-1 align-[-0.3rem] text-xs text-[#FFAC33]"
icon="ri-history-line" icon="material-symbols:warning-rounded"
></iconify-icon>Historique width="20"
</a> height="20"
></iconify-icon>à&nbsp;vérifier</span
>
{:else}
<span
class="text-center text-xs"
title="La dernière relecture date du {dateFormatter(
new Date(lastReviewOrChange),
)}. Cliquer pour proposer une mise à jour du paramètre."
>
<iconify-icon
class="mr-1 align-[-0.3rem] text-sm text-le-vert-validation"
icon="material-symbols:new-releases"
width="20"
height="20"
></iconify-icon>à&nbsp;jour
</span>
{/if}
</button>
{/if}
{#if isRevaluationActive || isBillActive || isParametricReformActive} {#if isRevaluationActive || isBillActive || isParametricReformActive}
<div <div
...@@ -356,53 +385,28 @@ ...@@ -356,53 +385,28 @@
<!-- Fin du paramètre à supprimer après PLF 2025--> <!-- Fin du paramètre à supprimer après PLF 2025-->
</div> </div>
<div class="rounded-b bg-le-gris-dispositif-ultralight px-2 py-2"> <div class="rounded-b bg-le-gris-dispositif-ultralight px-2 py-2">
<div class="flex items-center justify-between"> <div class="flex items-start justify-between">
{#if billLatestInstant !== "0001-01-01"} {#if billLatestInstant !== "0001-01-01"}
<!--Date du paramètre-->
<p class="pb-2 text-xs"> <p class="pb-2 text-xs">
Valeur en vigueur depuis le {billLatestInstantSplit[1]}/{billLatestInstantSplit[0]}&nbsp;: Valeur en vigueur depuis le {billLatestInstantSplit[1]}/{billLatestInstantSplit[0]}&nbsp;:
</p> </p>
<button {/if}
class="hover:decoration-none flex px-1 pb-2 pr-2 text-sm tracking-wide text-black underline decoration-dotted hover:decoration-solid" <a
class="lx-link-simple flex items-center px-2 text-sm text-gray-600"
rel="noreferrer"
href="/parameters/{billParameter.name}"
onclick={() => { onclick={() => {
goto(`/parameters/${billParameter.name}/edit`) trackLawEditParameterHistory()
trackLawEditParameterStatus()
}} }}
> target="_blank"
{#if lastReviewOrChange === undefined || lastReviewOrChange < (new Date().getFullYear() - 2).toString()}
<span
class="text-center text-xs"
title={lastReviewOrChange === undefined
? "Ce paramètre n'a jamais été relu. . Cliquer pour proposer une modification du paramètre."
: `La dernière relecture date du ${dateFormatter(
new Date(lastReviewOrChange),
)}. Cliquer pour proposer une modification du paramètre.`}
>
<iconify-icon
class="mr-1 align-[-0.3rem] text-xs text-[#FFAC33]"
icon="material-symbols:warning-rounded"
width="20"
height="20"
></iconify-icon>à&nbsp;vérifier</span
>
{:else}
<span
class="text-center text-xs"
title="La dernière relecture date du {dateFormatter(
new Date(lastReviewOrChange),
)}. Cliquer pour proposer une modification du paramètre."
> >
<iconify-icon <iconify-icon
class="mr-1 align-[-0.3rem] text-sm text-le-vert-validation" class="mr-1 align-[-0.3rem] text-base"
icon="material-symbols:new-releases" icon="ri-history-line"
width="20" ></iconify-icon>Historique
height="20" </a>
></iconify-icon>à&nbsp;jour
</span>
{/if}
</button>
{/if}
</div> </div>
{#if billLatestInstant !== "0001-01-01" || (billReferences !== undefined && billReferences.length > 0)} {#if billLatestInstant !== "0001-01-01" || (billReferences !== undefined && billReferences.length > 0)}
{#if billReferences !== undefined && billReferences.length > 0} {#if billReferences !== undefined && billReferences.length > 0}
<ul> <ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment