Skip to main content
Sign in
Snippets Groups Projects
Commit a266fbb6 authored by Dorine Lambinet's avatar Dorine Lambinet Committed by Toufic Batache
Browse files

Aligne les unités et boutons delete sur les inputs

parent 6f0edd79
Branches
Tags
No related merge requests found
......@@ -37,6 +37,8 @@
export let scaleAtInstant: ScaleAtInstant | undefined | null
export let showErrors: boolean
let code2023 = true
const dispatch = createEventDispatcher()
let errors = globalErrors
......@@ -140,23 +142,23 @@
<tbody>
{#each [...iterArrayWithErrors(scaleAtInstant, errors)] as [bracketAtInstant, errorsAtIndex], index}
<tr>
<td>
<td class="">
{#if edit}
<button
class="rounded pr-1"
class="mt-8 rounded pr-1"
on:click={() => deleteBracket(index)}
title="Supprimer"
type="button"
>
<iconify-icon
class="ml-1 align-[-0.2rem] text-lg text-gray-600 hover:text-le-gris-dispositif"
class="ml-1 align-[0.2rem] text-lg text-gray-600 hover:text-le-gris-dispositif"
icon="mingcute-delete-fill"
/>
</button>
{/if}
</td>
<td class="p-1">
<div class="flex items-center">
<div class="flex items-end">
{#if edit}
<VariableReferredValueEdit
billValue={billScaleAtInstant?.[index]?.threshold}
......@@ -175,7 +177,7 @@
unitName={billParameter.threshold_unit}
/>
{/if}
<span class="ml-1 text-base">
<span class="mb-1 ml-1 text-base">
{getUnitShortLabel(billParameter.threshold_unit, date)}
</span>
{#if showErrors && errorAsKeyValueDictionary(errorAsKeyValueDictionary(errorsAtIndex).threshold).value !== undefined}
......@@ -239,7 +241,7 @@
{:else}
{#if usesBase}
<td class="border-l border-black p-1 pl-3">
<div class="flex items-center">
<div class="flex items-end">
{#if edit}
<VariableReferredValueEdit
billValue={asRateBracketAtInstantOrNullable(
......@@ -270,7 +272,7 @@
unitName={billParameter.threshold_unit}
/>
{/if}
<span class="ml-1 text-base">
<span class="mb-1 ml-1 text-base">
<!-- TODO: Should be parameter.base_unit. -->
{getUnitShortLabel(billParameter.threshold_unit, date)}
</span>
......@@ -285,7 +287,7 @@
</td>
{/if}
<td class="border-l border-black p-1 pl-3">
<div class="flex items-center">
<div class="flex items-end">
{#if edit}
<VariableReferredValueEdit
billValue={asRateBracketAtInstantOrNullable(
......@@ -315,7 +317,7 @@
unitName={asRateScaleParameter(billParameter).rate_unit}
/>
{/if}
<span class="ml-1 text-base">
<span class="mb-1 ml-1 text-base">
<!-- TODO: Should be parameter.base_unit. -->
{getUnitShortLabel(
asRateScaleParameter(billParameter).rate_unit,
......
......
......@@ -72,12 +72,12 @@
<div class="flex flex-col">
<!--Composant pour ajouter le code 2023, en vue du PLF 2024-->
<div
class="grid grid-cols-1"
class="mt-1 grid grid-cols-1"
class:grid-cols-2={isValueModified}
class:grid-cols-3={isBillActive && !isValueModified}
>
<span class="col-span-1 text-center font-serif text-sm text-gray-600">
code 2023</span
2 023</span
>
</div>
<div
......
......
......@@ -39,6 +39,8 @@
export let lawParameter: ValueParameter | undefined
export let name: string | undefined = undefined
let code2023 = true
let billLatestInstantValueCouplesArray: [string, ValueAtInstant][]
const dateFormatter = new Intl.DateTimeFormat("fr-FR", { dateStyle: "full" })
.format
......@@ -167,7 +169,7 @@
class="flex flex-wrap items-center justify-between gap-x-4 gap-y-2 rounded bg-gray-100 p-2 pb-2"
id="situation_color_code_lawside"
>
<div class="flex items-center">
<div class="flex items-end">
{#if edit}
<VariableReferredValueEdit
{billValue}
......@@ -184,7 +186,7 @@
/>
{/if}
<span class="ml-1 text-base">
<span class="mb-1 ml-1 text-base">
{getUnitShortLabel(billParameter.unit, date)}
</span>
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment