From bb1a6fcdac0ab48079e10a77f55b5b60147861c8 Mon Sep 17 00:00:00 2001 From: Dorine Lambinet <dorine.lambinet@gmail.com> Date: Mon, 8 Aug 2022 10:00:48 +0200 Subject: [PATCH] =?UTF-8?q?Positionne=20les=20boutons=20=C3=A0=20v=C3=A9rf?= =?UTF-8?q?ier=20et=20historique=20plus=20proche=20de=20l'input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VariableReferredValueParameter.svelte | 137 +++++++++--------- 1 file changed, 69 insertions(+), 68 deletions(-) diff --git a/src/lib/components/variables/VariableReferredValueParameter.svelte b/src/lib/components/variables/VariableReferredValueParameter.svelte index 496b9c5ca..f96a9603d 100644 --- a/src/lib/components/variables/VariableReferredValueParameter.svelte +++ b/src/lib/components/variables/VariableReferredValueParameter.svelte @@ -102,7 +102,7 @@ <VariableReferredParameterHeader {depth} parameter={billParameter} /> <div - class="flex items-center justify-start rounded bg-gray-100 p-2 pb-2" + class="flex flex-wrap items-center justify-start rounded bg-gray-100 p-2 pb-2 " id="situation_color_code_lawside" > <div> @@ -118,81 +118,82 @@ </span> {#if valueError !== null}<p class="text-red-500">{valueError}</p>{/if} - </div> - - <div class="flex items-baseline bg-gray-100 p-2 text-xs text-gray-600"> - <div class="flex items-center"> - <div class="flex"> - <a - class="link2 flex border-r border-gray-700 px-1 pr-2 text-sm tracking-wide" - href="/parameters/{billParameter.name}/edit" - target="_blank" - > - {#if lastReviewOrChange < "2020"} - <!-- Inspired from Material Icons name: Warning / with white symbol inside --> - <svg - aria-hidden="true" - class="block h-5 w-5 fill-current text-[#FFAC33]" - viewBox="0 0 24 22" - xmlns="http://www.w3.org/2000/svg" - > - <path - d="M0.124322 18.4377C-0.240619 19.1041 0.241623 19.918 1.00142 19.918H20.6259C21.3857 19.918 21.868 19.1041 21.503 18.4377L11.6908 0.519686C11.3113 -0.173228 10.316 -0.173229 9.93658 0.519685L0.124322 18.4377ZM11.8591 16.8375C11.8591 17.3898 11.4114 17.8375 10.8591 17.8375H10.7682C10.2159 17.8375 9.76822 17.3898 9.76822 16.8375V16.627C9.76822 16.0747 10.2159 15.627 10.7682 15.627H10.8591C11.4114 15.627 11.8591 16.0747 11.8591 16.627V16.8375ZM11.8591 12.7416C11.8591 13.2938 11.4114 13.7416 10.8591 13.7416H10.7682C10.2159 13.7416 9.76822 13.2938 9.76822 12.7416V7.3298C9.76822 6.77751 10.2159 6.3298 10.7682 6.3298H10.8591C11.4114 6.3298 11.8591 6.77751 11.8591 7.3298V12.7416Z" - /> - </svg> - <span - class="pl-2" - title="La dernière relecture date du {dateFormatter.format( - new Date(lastReviewOrChange), - )}">À vérifier</span - > - {:else} - <!-- Inspired from Material Icons name: New Releases / with white symbol inside --> - <svg - aria-hidden="true" - class="block h-5 w-5 text-white" - viewBox="0 0 24 23" - xmlns="http://www.w3.org/2000/svg" - > - <path - d="M22 10.5L19.56 7.71L19.9 4.02L16.29 3.2L14.4 0L11 1.46L7.6 0L5.71 3.19L2.1 4L2.44 7.7L0 10.5L2.44 13.29L2.1 16.99L5.71 17.81L7.6 21L11 19.53L14.4 20.99L16.29 17.8L19.9 16.98L19.56 13.29L22 10.5ZM9.09 15.22L5.29 11.41L6.77 9.93L9.09 12.26L14.94 6.39L16.42 7.87L9.09 15.22Z" - fill="#13CC03" - /> - <path - d="M9.09004 15.2187L5.29004 11.4087L6.77004 9.92867L9.09004 12.2587L14.94 6.38867L16.42 7.86867L9.09004 15.2187Z" - fill="white" - /> - </svg> - <span - class="pl-1" - title="La dernière relecture date du {dateFormatter.format( - new Date(lastReviewOrChange), - )}">Vérifié</span - > - {/if} - </a> - <div> + <div class="flex items-baseline p-2 text-xs text-gray-600"> + <div class="flex items-center"> + <div class="flex"> <a - class="link2 ml-2 flex items-center text-sm tracking-wide text-gray-600" - href="/parameters/{billParameter.name}" + class="link2 flex border-r border-gray-700 px-1 pr-2 text-sm tracking-wide" + href="/parameters/{billParameter.name}/edit" target="_blank" > - <!--Remixicon.com - history-fill --> - <svg - aria-hidden="true" - class="mr-1 inline h-4 w-4 fill-current stroke-transparent text-gray-600" - viewBox="0 0 24 24" - xmlns="http://www.w3.org/2000/svg" - ><path - d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12h2c0 4.418 3.582 8 8 8s8-3.582 8-8-3.582-8-8-8C9.536 4 7.332 5.114 5.865 6.865L8 9H2V3l2.447 2.446C6.28 3.336 8.984 2 12 2zm1 5v4.585l3.243 3.243-1.415 1.415L11 12.413V7h2z" - /></svg - >Historique</a - > + {#if lastReviewOrChange < "2020"} + <!-- Inspired from Material Icons name: Warning / with white symbol inside --> + <svg + aria-hidden="true" + class="block h-5 w-5 fill-current text-[#FFAC33]" + viewBox="0 0 24 22" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="M0.124322 18.4377C-0.240619 19.1041 0.241623 19.918 1.00142 19.918H20.6259C21.3857 19.918 21.868 19.1041 21.503 18.4377L11.6908 0.519686C11.3113 -0.173228 10.316 -0.173229 9.93658 0.519685L0.124322 18.4377ZM11.8591 16.8375C11.8591 17.3898 11.4114 17.8375 10.8591 17.8375H10.7682C10.2159 17.8375 9.76822 17.3898 9.76822 16.8375V16.627C9.76822 16.0747 10.2159 15.627 10.7682 15.627H10.8591C11.4114 15.627 11.8591 16.0747 11.8591 16.627V16.8375ZM11.8591 12.7416C11.8591 13.2938 11.4114 13.7416 10.8591 13.7416H10.7682C10.2159 13.7416 9.76822 13.2938 9.76822 12.7416V7.3298C9.76822 6.77751 10.2159 6.3298 10.7682 6.3298H10.8591C11.4114 6.3298 11.8591 6.77751 11.8591 7.3298V12.7416Z" + /> + </svg> + <span + class="pl-2" + title="La dernière relecture date du {dateFormatter.format( + new Date(lastReviewOrChange), + )}">À vérifier</span + > + {:else} + <!-- Inspired from Material Icons name: New Releases / with white symbol inside --> + <svg + aria-hidden="true" + class="block h-5 w-5 text-white" + viewBox="0 0 24 23" + xmlns="http://www.w3.org/2000/svg" + > + <path + d="M22 10.5L19.56 7.71L19.9 4.02L16.29 3.2L14.4 0L11 1.46L7.6 0L5.71 3.19L2.1 4L2.44 7.7L0 10.5L2.44 13.29L2.1 16.99L5.71 17.81L7.6 21L11 19.53L14.4 20.99L16.29 17.8L19.9 16.98L19.56 13.29L22 10.5ZM9.09 15.22L5.29 11.41L6.77 9.93L9.09 12.26L14.94 6.39L16.42 7.87L9.09 15.22Z" + fill="#13CC03" + /> + <path + d="M9.09004 15.2187L5.29004 11.4087L6.77004 9.92867L9.09004 12.2587L14.94 6.38867L16.42 7.86867L9.09004 15.2187Z" + fill="white" + /> + </svg> + <span + class="pl-1" + title="La dernière relecture date du {dateFormatter.format( + new Date(lastReviewOrChange), + )}">Vérifié</span + > + {/if} + </a> + + <div> + <a + class="link2 ml-2 flex items-center text-sm tracking-wide text-gray-600" + href="/parameters/{billParameter.name}" + target="_blank" + > + <!--Remixicon.com - history-fill --> + <svg + aria-hidden="true" + class="mr-1 inline h-4 w-4 fill-current stroke-transparent text-gray-600" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + ><path + d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12h2c0 4.418 3.582 8 8 8s8-3.582 8-8-3.582-8-8-8C9.536 4 7.332 5.114 5.865 6.865L8 9H2V3l2.447 2.446C6.28 3.336 8.984 2 12 2zm1 5v4.585l3.243 3.243-1.415 1.415L11 12.413V7h2z" + /></svg + >Historique</a + > + </div> </div> </div> </div> </div> + {#if ["impot_revenu.calcul_impot_revenu.plaf_qf.general", "impot_revenu.calcul_impot_revenu.plaf_qf.celib", "impot_revenu.calcul_impot_revenu.plaf_qf.celib_enf", "impot_revenu.calcul_impot_revenu.plaf_qf.reduc_postplafond", "impot_revenu.calcul_impot_revenu.plaf_qf.reduc_postplafond_veuf", "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.plaf_GuadMarReu", "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.plaf_GuyMay", "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.taux_GuadMarReu", "impot_revenu.calcul_impot_revenu.plaf_qf.abat_dom.taux_GuyMay", "impot_revenu.calcul_impot_revenu.plaf_qf.decote.seuil_celib", "impot_revenu.calcul_impot_revenu.plaf_qf.decote.seuil_couple", "impot_revenu.calcul_impot_revenu.plaf_qf.decote.taux"].includes(billParameter.name)} <div class="mt-2"> <button -- GitLab