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 isArretMaladie => typeCode == 'arret_maladie_am';
|
||||||
bool get isCongeAm => typeCode == 'conge_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.
|
/// Fin de période (jour inclus). Null si dates absentes / invalides.
|
||||||
DateTime? get dateFinJour {
|
DateTime? get dateFinJour {
|
||||||
final raw = dateFin;
|
final raw = dateFin;
|
||||||
|
|||||||
@@ -383,15 +383,31 @@ class _BulleTile extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Row(
|
||||||
card.titreAffiche,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
maxLines: 1,
|
children: [
|
||||||
overflow: TextOverflow.ellipsis,
|
Expanded(
|
||||||
style: GoogleFonts.merienda(
|
child: Text(
|
||||||
fontSize: 18,
|
card.titreAffiche,
|
||||||
fontWeight: FontWeight.w700,
|
maxLines: 2,
|
||||||
color: QuotidienTheme.ink,
|
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) ...[
|
if (card.dateDebut != null || card.dateFin != null) ...[
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
|||||||
Reference in New Issue
Block a user