feat(#173): icône dessin en haut à droite selon le type de bulle

Congés / arrêt maladie / absence — assets remplaçables dans
assets/images/cartes/.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-01 17:10:41 +02:00
co-authored by Cursor
parent 1f985f5b37
commit e91468616b
5 changed files with 40 additions and 9 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 910 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 KiB

+15
View File
@@ -104,6 +104,21 @@ class CarteBulle {
bool get isArretMaladie => typeCode == 'arret_maladie_am';
bool get isCongeAm => typeCode == 'conge_am';
/// Icône dessin (haut droite) selon le type de bulle.
String? get iconAsset {
switch (typeCode) {
case 'conge_am':
return 'assets/images/cartes/icon_carte_conges.png';
case 'arret_maladie_am':
return 'assets/images/cartes/icon_carte_maladie.png';
case 'absence_enfant':
case 'absence_enfant_modif':
return 'assets/images/cartes/icon_carte_absence.png';
default:
return null;
}
}
/// Fin de période (jour inclus). Null si dates absentes / invalides.
DateTime? get dateFinJour {
final raw = dateFin;
@@ -383,15 +383,31 @@ class _BulleTile extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
card.titreAffiche,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: GoogleFonts.merienda(
fontSize: 18,
fontWeight: FontWeight.w700,
color: QuotidienTheme.ink,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
card.titreAffiche,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: GoogleFonts.merienda(
fontSize: 18,
fontWeight: FontWeight.w700,
color: QuotidienTheme.ink,
),
),
),
if (card.iconAsset != null) ...[
const SizedBox(width: 8),
Image.asset(
card.iconAsset!,
width: 44,
height: 44,
fit: BoxFit.contain,
),
],
],
),
if (card.dateDebut != null || card.dateFin != null) ...[
const SizedBox(height: 10),