update
This commit is contained in:
No files matched your search
@@ -33,15 +33,60 @@ class StatusPill extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final lower = status.toLowerCase();
|
||||
final color = lower.contains('selesai')
|
||||
? const Color(0xFF15803D)
|
||||
: lower.contains('dibatalkan')
|
||||
? const Color(0xFF6B7280)
|
||||
: lower.contains('warning') || lower.contains('target')
|
||||
? const Color(0xFFDC2626)
|
||||
: const Color(0xFF0F766E);
|
||||
return BadgeLabel(text: status, color: color);
|
||||
final normalized = status.trim();
|
||||
final lower = normalized.toLowerCase();
|
||||
if (normalized.isEmpty || lower == 'new') {
|
||||
return const BadgeLabel(text: 'NEW', color: Color(0xFFDC2626));
|
||||
}
|
||||
if (lower.contains('dibatalkan')) {
|
||||
return const Text(
|
||||
'Batal',
|
||||
style: TextStyle(color: Color(0xFF6B7280), fontWeight: FontWeight.w800),
|
||||
);
|
||||
}
|
||||
if (lower.contains('pemeriksaan sampel')) {
|
||||
return const Text(
|
||||
'Pemeriksaan Sampel',
|
||||
style: TextStyle(color: Color(0xFF15803D), fontWeight: FontWeight.w800),
|
||||
);
|
||||
}
|
||||
if (lower.contains('proses analisis sampel')) {
|
||||
return const Text(
|
||||
'Diperiksa',
|
||||
style: TextStyle(color: Color(0xFF111827), fontWeight: FontWeight.w900),
|
||||
);
|
||||
}
|
||||
if (lower.contains('draft')) {
|
||||
return const Text(
|
||||
'Draft',
|
||||
style: TextStyle(color: Color(0xFF15803D), fontWeight: FontWeight.w800),
|
||||
);
|
||||
}
|
||||
if (lower.contains('expertise')) {
|
||||
return const Text(
|
||||
'Expertise',
|
||||
style: TextStyle(color: Color(0xFF15803D), fontWeight: FontWeight.w900),
|
||||
);
|
||||
}
|
||||
if (lower.contains('decliend')) {
|
||||
return const Text(
|
||||
'Decliend',
|
||||
style: TextStyle(color: Color(0xFFDC2626), fontWeight: FontWeight.w900),
|
||||
);
|
||||
}
|
||||
if (lower.contains('selesai')) {
|
||||
return const BadgeLabel(text: 'Selesai', color: Color(0xFF15803D));
|
||||
}
|
||||
if (lower.contains('arsip')) {
|
||||
return const BadgeLabel(text: 'Arsip', color: Color(0xFF2563EB));
|
||||
}
|
||||
if (lower.contains('data vitek di terima')) {
|
||||
return const BadgeLabel(
|
||||
text: 'Data Vitek di Terima',
|
||||
color: Color(0xFFF59E0B),
|
||||
);
|
||||
}
|
||||
return BadgeLabel(text: normalized, color: const Color(0xFF0891B2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user