past draws

This commit is contained in:
Deep Koluguri 2025-11-06 00:17:41 -05:00
parent 4045a61406
commit ede5b15ade
1 changed files with 42 additions and 47 deletions

View File

@ -92,23 +92,30 @@ class _GroupDetailsPageState extends State<GroupDetailsPage> with SingleTickerPr
iconTheme: IconThemeData(color: Colors.grey.shade800), iconTheme: IconThemeData(color: Colors.grey.shade800),
elevation: 0, elevation: 0,
actions: [ actions: [
if (widget.group.isForming) // Actions menu - always visible
PopupMenuButton<String>( PopupMenuButton<String>(
icon: Icon(Icons.person_add, size: 24.w, color: Colors.blue.shade600), icon: Icon(Icons.more_vert, size: 24.w, color: Colors.grey.shade700),
onSelected: (value) { tooltip: 'More Options',
if (value == 'select') { onSelected: (value) {
_showMemberSelectionDialog(context); if (value == 'select' && widget.group.isForming) {
} else if (value == 'add_user') { _showMemberSelectionDialog(context);
_showAddUserDialog(context); } else if (value == 'add_user' && widget.group.isForming) {
} _showAddUserDialog(context);
}, } else if (value == 'add_past_draw') {
itemBuilder: (context) => [ _showAddPastDrawDialog(context);
} else if (value == 'add_past_payments') {
_showAddPastPaymentsDialog(context);
}
},
itemBuilder: (context) => [
// Add members options (only for forming groups)
if (widget.group.isForming) ...[
PopupMenuItem( PopupMenuItem(
value: 'select', value: 'select',
child: Row( child: Row(
children: [ children: [
Icon(Icons.people_alt, color: Colors.blue.shade600), Icon(Icons.people_alt, color: Colors.blue.shade600),
SizedBox(width: 8.w), SizedBox(width: 12.w),
const Text('Select Members'), const Text('Select Members'),
], ],
), ),
@ -118,48 +125,36 @@ class _GroupDetailsPageState extends State<GroupDetailsPage> with SingleTickerPr
child: Row( child: Row(
children: [ children: [
Icon(Icons.person_add, color: Colors.green.shade600), Icon(Icons.person_add, color: Colors.green.shade600),
SizedBox(width: 8.w), SizedBox(width: 12.w),
const Text('Add New User'), const Text('Add New User'),
], ],
), ),
), ),
const PopupMenuDivider(),
], ],
), // Backfill options (always available)
// Backfill menu for imported/active groups PopupMenuItem(
if (widget.group.isActive) value: 'add_past_draw',
PopupMenuButton<String>( child: Row(
icon: Icon(Icons.more_vert, size: 24.w, color: Colors.grey.shade700), children: [
tooltip: 'More Options', Icon(Icons.history, color: Colors.blue.shade600),
onSelected: (value) { SizedBox(width: 12.w),
if (value == 'add_past_draw') { const Text('Add Past Draw Result'),
_showAddPastDrawDialog(context); ],
} else if (value == 'add_past_payments') {
_showAddPastPaymentsDialog(context);
}
},
itemBuilder: (context) => [
PopupMenuItem(
value: 'add_past_draw',
child: Row(
children: [
Icon(Icons.history, color: Colors.blue.shade600),
SizedBox(width: 12.w),
const Text('Add Past Draw Result'),
],
),
), ),
PopupMenuItem( ),
value: 'add_past_payments', PopupMenuItem(
child: Row( value: 'add_past_payments',
children: [ child: Row(
Icon(Icons.payment_outlined, color: Colors.green.shade600), children: [
SizedBox(width: 12.w), Icon(Icons.payment_outlined, color: Colors.green.shade600),
const Text('Add Past Payments'), SizedBox(width: 12.w),
], const Text('Add Past Payments'),
), ],
), ),
], ),
), ],
),
], ],
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: Size.fromHeight(64.h), preferredSize: Size.fromHeight(64.h),