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),
elevation: 0,
actions: [
if (widget.group.isForming)
// Actions menu - always visible
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),
tooltip: 'More Options',
onSelected: (value) {
if (value == 'select') {
if (value == 'select' && widget.group.isForming) {
_showMemberSelectionDialog(context);
} else if (value == 'add_user') {
} else if (value == 'add_user' && widget.group.isForming) {
_showAddUserDialog(context);
} else if (value == 'add_past_draw') {
_showAddPastDrawDialog(context);
} else if (value == 'add_past_payments') {
_showAddPastPaymentsDialog(context);
}
},
itemBuilder: (context) => [
// Add members options (only for forming groups)
if (widget.group.isForming) ...[
PopupMenuItem(
value: 'select',
child: Row(
children: [
Icon(Icons.people_alt, color: Colors.blue.shade600),
SizedBox(width: 8.w),
SizedBox(width: 12.w),
const Text('Select Members'),
],
),
@ -118,26 +125,14 @@ class _GroupDetailsPageState extends State<GroupDetailsPage> with SingleTickerPr
child: Row(
children: [
Icon(Icons.person_add, color: Colors.green.shade600),
SizedBox(width: 8.w),
SizedBox(width: 12.w),
const Text('Add New User'),
],
),
),
const PopupMenuDivider(),
],
),
// Backfill menu for imported/active groups
if (widget.group.isActive)
PopupMenuButton<String>(
icon: Icon(Icons.more_vert, size: 24.w, color: Colors.grey.shade700),
tooltip: 'More Options',
onSelected: (value) {
if (value == 'add_past_draw') {
_showAddPastDrawDialog(context);
} else if (value == 'add_past_payments') {
_showAddPastPaymentsDialog(context);
}
},
itemBuilder: (context) => [
// Backfill options (always available)
PopupMenuItem(
value: 'add_past_draw',
child: Row(