On affiche l'état de la série (abandonnée ou terminée) dans vue Catalogue et Série.

This commit is contained in:
mathieu
2026-09-12 20:30:04 +02:00
parent d07795611d
commit 11fbdab9d9
4 changed files with 35 additions and 0 deletions
@@ -176,6 +176,7 @@ public sealed class ServiceSeries(MaBibliDbContext db, IServiceSouhaits souhaits
}
serie.Titre = titre;
serie.Etat = saisie.Etat;
serie.RecalculerFormes();
await db.SaveChangesAsync(ct);
@@ -497,6 +498,7 @@ public sealed class ServiceSeries(MaBibliDbContext db, IServiceSouhaits souhaits
SerieParenteId = serie.SerieParenteId,
Position = serie.Position,
AjoutePar = serie.AjoutePar,
Etat = serie.Etat,
Elements = serie.Elements
.OrderBy(e => e.Position)
.ThenBy(e => e.Id)
@@ -1,4 +1,5 @@
@using MaBibli.Shared.Dtos
@using MaBibli.Shared.Entites
@*
L'arbre des séries : rien d'autre que la descendance.
@@ -30,6 +31,12 @@
}
<a class="arbre-titre" href="@($"series/{Serie.Id}")">@Serie.Titre</a>
@if (Serie.Etat != EtatSerie.EnCours)
{
<span class="arbre-etat">
@(Serie.Etat == EtatSerie.Terminee ? "terminée" : "abandonnée")
</span>
}
<span class="arbre-compte">@Avancement()</span>
@if (ActionsActives)
@@ -1,4 +1,5 @@
@using MaBibli.Client.Services
@using MaBibli.Shared.Entites
@*
Un bloc de série au catalogue, replié ou déplié — et récursif, parce qu'un cycle est une
@@ -30,6 +31,12 @@
ce que le catalogue ne peut pas faire. *@
<a class="groupe-serie-titre" href="@($"series/{Entree.Serie!.Id}")">
<span class="groupe-serie-nom">@Entree.Serie!.Titre</span>
@if (Entree.Serie!.Etat != EtatSerie.EnCours)
{
<span class="groupe-serie-etat">
@(Entree.Serie!.Etat == EtatSerie.Terminee ? "terminée" : "abandonnée")
</span>
}
<span class="groupe-serie-compte">
@Libelles.CompteBloc(Entree.NombreLivres, Possedes, Total)
</span>
+19
View File
@@ -482,6 +482,15 @@ body {
overflow-wrap: anywhere;
}
.groupe-serie-etat {
font-size: 0.75rem;
padding: 0.2rem 0.5rem;
border-radius: 0.25rem;
background-color: var(--mb-fond-discret);
color: var(--mb-texte-doux);
white-space: nowrap;
}
.groupe-serie-compte {
color: var(--mb-texte-doux);
font-size: 0.85rem;
@@ -1374,6 +1383,16 @@ body {
white-space: nowrap;
}
.arbre-etat {
flex: 0 0 auto;
font-size: 0.75rem;
padding: 0.2rem 0.5rem;
border-radius: 0.25rem;
background-color: var(--mb-fond-discret);
color: var(--mb-texte-doux);
white-space: nowrap;
}
.arbre-actions {
flex: 0 0 auto;
display: flex;