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:
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 |
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user