Skip to main content
Sign in
Snippets Groups Projects
Commit 9e98d0ed authored by Dorine Lambinet's avatar Dorine Lambinet
Browse files

Réduit la hauteur de l'éditeur de cas type

parent 79139db6
Branches
Tags
1 merge request!37Améliore l'UI d'édition du cas type
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
{#each [...iterItemIdAndPersonCouples(personById, items)] as { id, person } (id)} {#each [...iterItemIdAndPersonCouples(personById, items)] as { id, person } (id)}
<li <li
animate:flip={{ duration: flipDurationMs }} animate:flip={{ duration: flipDurationMs }}
class="bg-gray-200 rounded-3xl w-28 py-1 text-center text-gray-700 text-sm font-semibold my-2" class="bg-gray-200 rounded-3xl w-28 text-center text-gray-700 text-sm font-semibold my-1"
> >
<div class="group flex items-center justify-between ml-4 mr-2 "> <div class="group flex items-center justify-between ml-4 mr-2 ">
<div> <div>
... ...
......
...@@ -394,12 +394,14 @@ ...@@ -394,12 +394,14 @@
</script> </script>
<h3 class="font-bold text-xl mx-5">Composition du cas type&nbsp;:</h3> <h3 class="font-bold text-xl mx-5">Composition du cas type&nbsp;:</h3>
<section class="bg-white border-gray-200 p-2 m-3 rounded-sm mx-5"> <section class="bg-gray-100 border-gray-200 rounded-sm mx-5 my-2 py-2">
<div class="flex justify-center gap-2">
<div class="flex items-center"> <div class="flex items-center">
<label class="ml-2 mr-2"> <PictoFemme />
<label class="mx-2 text-sm">
Nombre d'adultes Nombre d'adultes
<input <input
class="w-10 p-1 rounded mt-2 focus:border-le-bleu focus:text-le-bleu" class="text-base w-10 p-1 rounded focus:border-le-bleu focus:text-le-bleu"
min={1} min={1}
on:change={changeAdultsCount} on:change={changeAdultsCount}
step="1" step="1"
...@@ -407,13 +409,13 @@ ...@@ -407,13 +409,13 @@
value={adultsId.length} value={adultsId.length}
/> />
</label> </label>
<PictoFemme />
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
<label class="ml-2 mr-2"> <PictoEnfant />
<label class="mx-2 text-sm">
Nombre d'enfants Nombre d'enfants
<input <input
class="w-10 p-1 rounded mt-2 focus:border-le-bleu focus:text-le-bleu" class="text-base w-10 p-1 rounded focus:border-le-bleu focus:text-le-bleu"
min={0} min={0}
on:change={changeChildrenCount} on:change={changeChildrenCount}
step="1" step="1"
...@@ -421,13 +423,14 @@ ...@@ -421,13 +423,14 @@
value={childrenId.length} value={childrenId.length}
/> />
</label> </label>
<PictoEnfant /> </div>
</div> </div>
<div class="flex justify-center">
{#each [...iterGroupEntities(entityByKey)] as groupEntity} {#each [...iterGroupEntities(entityByKey)] as groupEntity}
{#if !hiddenEntitiesKeyPlural.includes(groupEntity.key_plural)} {#if !hiddenEntitiesKeyPlural.includes(groupEntity.key_plural)}
<section> <section class="m-2">
<h1 class="font-bold mt-4 mb-1 text-lg"> <h1 class="font-bold mt-4 mb-1 text-base">
{groupEntity.composition_label ?? {groupEntity.composition_label ??
groupEntity.label_plural ?? groupEntity.label_plural ??
groupEntity.key_plural}&nbsp;: groupEntity.key_plural}&nbsp;:
...@@ -437,7 +440,7 @@ ...@@ -437,7 +440,7 @@
{/if} --> {/if} -->
{#if countGroups(situation, groupEntity) === 1} {#if countGroups(situation, groupEntity) === 1}
<div class="mb-3"> <div class="mb-3">
<label class="text-base"> <label class="text-sm">
<input <input
checked checked
class="rounded" class="rounded"
...@@ -449,11 +452,11 @@ ...@@ -449,11 +452,11 @@
</label> </label>
</div> </div>
{/if} {/if}
<ul class="ml-4"> <ul class="mr-2">
{#each [...iterGroups(situation, groupEntity)] as [groupId, group], index (`${groupEntity.key_plural}.${index}`)} {#each [...iterGroups(situation, groupEntity)] as [groupId, group], index (`${groupEntity.key_plural}.${index}`)}
<li> <li>
{#if countGroups(situation, groupEntity) > 1} {#if countGroups(situation, groupEntity) > 1}
<div class="flex items-center font-bold mt-4"> <div class="flex items-center mt-2 text-sm">
<div> <div>
{group.name ?? groupId}&nbsp;: {group.name ?? groupId}&nbsp;:
</div> </div>
...@@ -488,9 +491,9 @@ ...@@ -488,9 +491,9 @@
</div> </div>
{/if} {/if}
<dl class="border-l-2 pl-4 border-black"> <dl class="ml-2 border-l pl-2 mt-2 border-black">
{#each groupEntity.roles as role} {#each groupEntity.roles as role}
<dt class=""> <dt class="text-sm">
{role.label ?? {role.label ??
(role.max === undefined || role.max > 1 (role.max === undefined || role.max > 1
? role.key_plural ? role.key_plural
...@@ -518,11 +521,11 @@ ...@@ -518,11 +521,11 @@
</ul> </ul>
{#if countGroups(situation, groupEntity) > 1} {#if countGroups(situation, groupEntity) > 1}
<button <button
class="text-black hover:text-le-bleu w-64 ml-2" class="text-black hover:text-le-bleu "
on:click={() => addGroup(groupEntity.key)} on:click={() => addGroup(groupEntity.key)}
type="button" type="button"
> >
<div class="mt-2 text-base flex items-center"> <div class="mt-2 text-sm flex items-center">
<svg <svg
class="fill-current inline mr-1" class="fill-current inline mr-1"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
...@@ -540,6 +543,7 @@ ...@@ -540,6 +543,7 @@
</section> </section>
{/if} {/if}
{/each} {/each}
</div>
</section> </section>
<section class="border-t border-b-0 border-r-0 border-l-0 mt-5 mx-5"> <section class="border-t border-b-0 border-r-0 border-l-0 mt-5 mx-5">
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment