updated draw winner
This commit is contained in:
parent
ab66002dc5
commit
e6a59cef21
|
|
@ -2745,6 +2745,16 @@ class _GroupDetailsPageState extends State<GroupDetailsPage> with SingleTickerPr
|
|||
(draw) => draw.month == currentMonth && draw.year == currentYear,
|
||||
) ?? (sortedDraws.isNotEmpty ? sortedDraws.first : null);
|
||||
|
||||
// DEBUG: Check winner data
|
||||
if (currentDraw != null) {
|
||||
print('🎯 Draw found for month ${currentDraw.month}/${currentDraw.year}');
|
||||
print('🎯 Winner ID: ${currentDraw.winnerId}');
|
||||
print('🎯 Winner object: ${currentDraw.winner}');
|
||||
print('🎯 Winner name: ${currentDraw.winner?.fullName}');
|
||||
} else {
|
||||
print('🎯 No draw found');
|
||||
}
|
||||
|
||||
// If we're showing latest draw (not current month), update display names
|
||||
String displayCurrentMonth = currentMonthName;
|
||||
int displayCurrentYear = currentYear;
|
||||
|
|
@ -2958,13 +2968,16 @@ class _GroupDetailsPageState extends State<GroupDetailsPage> with SingleTickerPr
|
|||
color: Colors.green.shade700,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4.h),
|
||||
Text(
|
||||
currentDraw?.winner?.fullName ?? 'Not Conducted',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: currentDraw?.winner?.fullName != null ? Colors.green.shade800 : Colors.grey.shade500,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: currentDraw?.winner?.fullName != null ? Colors.green.shade900 : Colors.grey.shade500,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue