UI_chnages Header_Highlight

This commit is contained in:
venbaittech 2025-11-25 18:29:36 +05:30
parent e295364c53
commit 6a78b1c6d2
25 changed files with 1046 additions and 555 deletions

File diff suppressed because one or more lines are too long

View File

@ -28,12 +28,14 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
Map<String, dynamic>? profileData;
String? _token;
OverlayEntry? _overlayEntry;
String? _activeMenu;
@override
void initState() {
super.initState();
_loadUser();
_initializeToken();
_setActiveMenu();
}
@override
@ -42,6 +44,33 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
super.dispose();
}
// Set active menu based on current route
void _setActiveMenu() {
WidgetsBinding.instance.addPostFrameCallback((_) {
final currentRoute = GoRouterState.of(context).uri.path;
setState(() {
if (currentRoute.contains('dashboard')) {
_activeMenu = 'Dashboard';
} else if (currentRoute.contains('enquiry')) {
_activeMenu = 'Enquiry';
} else if (currentRoute.contains('agent') ||
currentRoute.contains('staff')) {
_activeMenu = 'User';
} else if (currentRoute.contains('claim') ||
currentRoute.contains('endosement') ||
currentRoute.contains('policy') ||
currentRoute.contains('attendance')) {
_activeMenu = 'Reports';
} else if (currentRoute.contains('broker') ||
currentRoute.contains('payment')) {
_activeMenu = 'Masters';
} else if (currentRoute.contains('invoice')) {
_activeMenu = 'Pay Out';
}
});
});
}
Future<void> _initializeToken() async {
_token = await AuthService.getToken();
if (_token != null) {
@ -97,16 +126,20 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
if (key == 'User') ...[
_buildPopupItem(
label: "Partner",
onTap: () {
_hidePopup();
setState(() => _activeMenu = 'User');
context.go(AppRoutes.agentLst);
},
),
const SizedBox(height: 2),
_buildPopupItem(
label: "Staff",
onTap: () {
_hidePopup();
setState(() => _activeMenu = 'User');
context.go(AppRoutes.staffLst);
},
),
@ -115,8 +148,10 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
if (role == 'manager') ...[
_buildPopupItem(
label: "Attendance",
onTap: () {
_hidePopup();
setState(() => _activeMenu = 'Reports');
context.go(AppRoutes.allStaffAttendance);
},
),
@ -126,6 +161,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
label: "Claims",
onTap: () {
_hidePopup();
setState(() => _activeMenu = 'Reports');
context.go(AppRoutes.claimlist);
},
),
@ -141,6 +177,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
_buildPopupItem(
label: "Policy",
onTap: () {
setState(() => _activeMenu = 'Reports');
_hidePopup();
context.go(AppRoutes.policylist);
},
@ -153,6 +190,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
label: "Broker",
onTap: () {
_hidePopup();
setState(() => _activeMenu = 'Masters');
context.go(AppRoutes.brokerLst);
},
),
@ -161,6 +199,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
_buildPopupItem(
label: "Payment Mode",
onTap: () {
setState(() => _activeMenu = 'Masters');
_hidePopup();
context.go(AppRoutes.paymentModeLst);
},
@ -210,8 +249,10 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
_buildMenuItem(
icon: Icons.dashboard,
label: "Dashboard",
isActive: _activeMenu == 'Dashboard',
onTap: () async {
_hidePopup();
setState(() => _activeMenu = 'Dashboard');
await _clearDashboardFilters();
context.go(AppRoutes.dashboard);
},
@ -222,20 +263,22 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
// Enquiry
if (role != 'admin') ...[
_buildMenuItem(
icon: Icons.list_alt_rounded,
label: "Enquiry",
onTap: () async {
_hidePopup();
await _clearDashboardFilters();
if (roleId == 'agent') {
context.go(AppRoutes.enquiryLst);
} else {
context.go(AppRoutes.enquiryForStaff);
}
},
),
],
_buildMenuItem(
icon: Icons.list_alt_rounded,
label: "Enquiry",
isActive: _activeMenu == 'Enquiry',
onTap: () async {
_hidePopup();
setState(() => _activeMenu = 'Enquiry');
await _clearDashboardFilters();
if (roleId == 'agent') {
context.go(AppRoutes.enquiryLst);
} else {
context.go(AppRoutes.enquiryForStaff);
}
},
),
],
const SizedBox(width: 8),
@ -245,6 +288,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
icon: Icons.person_add_alt,
label: "User",
popupKey: 'User',
isActive: _activeMenu == 'User',
),
const SizedBox(width: 8),
],
@ -255,6 +299,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
icon: Icons.settings_suggest_outlined,
label: "Masters",
popupKey: 'Masters',
isActive: _activeMenu == 'Masters',
),
const SizedBox(width: 8),
],
@ -265,6 +310,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
icon: Icons.receipt_long,
label: "Reports",
popupKey: 'Reports',
isActive: _activeMenu == 'Reports',
),
const SizedBox(width: 8),
],
@ -272,10 +318,12 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
// Pay Out button for admin
if (role == 'admin') ...[
_buildMenuItem(
isActive: _activeMenu == 'Pay Out',
icon: Icons.checklist_outlined,
label: "Pay Out",
onTap: () async {
_hidePopup();
setState(() => _activeMenu = 'Pay Out');
await _clearDashboardFilters();
context.go(AppRoutes.invoiceList);
},
@ -361,7 +409,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
backgroundColor: const Color(0xFF2E7D6E),
child: Text(
profileData?['name']?.substring(0, 2).toUpperCase() ??
'P',
'A',
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
@ -449,6 +497,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
required IconData icon,
required String label,
required VoidCallback onTap,
bool isActive = false,
}) {
return InkWell(
onTap: onTap,
@ -457,18 +506,36 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
onEnter: (_) => _hidePopup(),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(6)),
decoration: BoxDecoration(
color: isActive
? const Color(0xFF2E7D6E).withOpacity(0.03)
: Colors.transparent,
borderRadius: BorderRadius.circular(6),
border: isActive
? Border(
bottom: BorderSide(
color: const Color(0xFF2E7D6E),
width: 2,
),
)
: null,
),
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(6)),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(icon, size: 18, color: Colors.black87),
Icon(
icon,
size: 18,
color: isActive ? const Color(0xFF2E7D6E) : Colors.black87,
),
const SizedBox(width: 6),
Text(
label,
style: GoogleFonts.inter(
color: Colors.black87,
color: isActive ? const Color(0xFF2E7D6E) : Colors.black87,
fontSize: 13,
fontWeight: FontWeight.w500,
fontWeight: isActive ? FontWeight.w600 : FontWeight.w500,
),
),
],
@ -483,6 +550,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
required IconData icon,
required String label,
required String popupKey,
bool isActive = false,
}) {
return Builder(
builder: (itemContext) {
@ -495,22 +563,44 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
},
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(6)),
decoration: BoxDecoration(
color: isActive
? const Color(0xFF2E7D6E).withOpacity(0.02)
: Colors.transparent,
borderRadius: BorderRadius.circular(6),
border: isActive
? Border(
bottom: BorderSide(
color: const Color(0xFF2E7D6E),
width: 2,
),
)
: null,
),
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(6)),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(icon, size: 18, color: Colors.black87),
Icon(
icon,
size: 18,
color: isActive ? const Color(0xFF2E7D6E) : Colors.black87,
),
const SizedBox(width: 6),
Text(
label,
style: GoogleFonts.inter(
color: Colors.black87,
color: isActive ? const Color(0xFF2E7D6E) : Colors.black87,
fontSize: 13,
fontWeight: FontWeight.w500,
fontWeight: isActive ? FontWeight.w600 : FontWeight.w500,
),
),
const SizedBox(width: 2),
Icon(Icons.arrow_drop_down, color: Colors.black87, size: 18),
Icon(
Icons.arrow_drop_down,
color: isActive ? const Color(0xFF2E7D6E) : Colors.black87,
size: 18,
),
],
),
),

View File

@ -177,49 +177,48 @@ class claimListState extends ConsumerState<claimList> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 30,
width: MediaQuery.of(context).size.width,
child: GestureDetector(
onTap: () {
context.go(AppRoutes.dashboard);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Tooltip(
message: 'Back',
child: IconButton(
icon: const Icon(
Icons.arrow_left_sharp,
size: 25,
color: Color(0xFF425B5B),
),
onPressed: () {
context.go(AppRoutes.dashboard);
},
splashRadius: 18,
hoverColor: Colors.black12,
padding: const EdgeInsets.all(4),
constraints: const BoxConstraints(),
),
),
const SizedBox(width: 5), // spacing between icon and text
Text(
"Claims",
style: GoogleFonts.inter(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
],
),
),
),
SizedBox(height: 5),
// Container(
// // height: 30,
// width: MediaQuery.of(context).size.width,
// child: GestureDetector(
// onTap: () {
// context.go(AppRoutes.dashboard);
// },
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Tooltip(
// message: 'Back',
// child: IconButton(
// icon: const Icon(
// Icons.arrow_left_sharp,
// size: 25,
// color: Color(0xFF425B5B),
// ),
// onPressed: () {
// context.go(AppRoutes.dashboard);
// },
// splashRadius: 18,
// hoverColor: Colors.black12,
// padding: const EdgeInsets.all(4),
// constraints: const BoxConstraints(),
// ),
// ),
// const SizedBox(width: 5), // spacing between icon and text
// Text(
// "Claims",
// style: GoogleFonts.poppins(
// fontSize: 12,
// fontWeight: FontWeight.w500,
// ),
// ),
// ],
// ),
// ),
// ),
//
// SizedBox(height: 5),
Expanded(
child: Container(
// color: Colors.green,
@ -236,18 +235,27 @@ class claimListState extends ConsumerState<claimList> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"Claims",
style: GoogleFonts.poppins(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
Spacer(),
ThemedSearchField(
hintText: 'Search',
backgroundColor: Color(0xFFF6F8F8),
backgroundColor: Color(0xFFFFFFFF),
txtHeight: 30,
// backgroundColor: Color(0xFFF6F8F8),
onChanged: filterData,
controller: _searchStaffController,
txtwidth: ResponsiveLayout.isMobile(context)
? MediaQuery.of(context).size.width * 0.6
: MediaQuery.of(context).size.width * 0.2,
: MediaQuery.of(context).size.width * 0.15,
),
Spacer(),
SizedBox(width: 10),
ExportBtn(
sheetName: "Claims",
fileName: "claim_list",
@ -318,11 +326,12 @@ class claimListState extends ConsumerState<claimList> {
],
),
),
SizedBox(height: 5),
SizedBox(height: 10),
if (!ResponsiveLayout.isMobile(context))
Container(
decoration: BoxDecoration(
color: const Color(0xFFEDF6F5),
// color: const Color(0xFFEDF6F5),
color: Color(0xFFF1F5F9),
borderRadius: BorderRadius.circular(6),
),
padding: const EdgeInsets.symmetric(
@ -369,7 +378,12 @@ class claimListState extends ConsumerState<claimList> {
],
),
),
Expanded(child: _buildDataTable(context)),
Expanded(
child: Container(
color: Colors.white,
child: _buildDataTable(context),
),
),
],
),
),
@ -429,7 +443,7 @@ class claimListState extends ConsumerState<claimList> {
final sno = startIndex + index;
return !ResponsiveLayout.isMobile(context)
? _buildDataRow(item, sno)
? Container(color: Colors.white, child: _buildDataRow(item, sno))
: _buildDataCard(item, sno);
},
);
@ -441,7 +455,7 @@ class claimListState extends ConsumerState<claimList> {
Widget _buildDataRow(Map<String, dynamic> item, sno) {
return Container(
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 16),
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
// margin: const EdgeInsets.only(top: 10),
decoration: BoxDecoration(
color: Colors.white,
@ -688,8 +702,7 @@ class claimListState extends ConsumerState<claimList> {
}
static final _dataBold = GoogleFonts.inter(
fontSize: 14,
fontSize: 11.5,
fontWeight: FontWeight.w400,
color: Color(0xFF000000),
);
@ -700,10 +713,12 @@ class claimListState extends ConsumerState<claimList> {
color: Color(0xFF585757),
);
static final _headerStyle = GoogleFonts.inter(
color: Colors.black,
fontWeight: FontWeight.bold,
static final _headerStyle = GoogleFonts.poppins(
fontSize: 11.2,
fontWeight: FontWeight.w500,
color: Color(0xFF1E293B),
);
static final _cardheaderStyle = GoogleFonts.inter(
color: Colors.black,
fontWeight: FontWeight.w600,

View File

@ -174,49 +174,48 @@ class endosementState extends ConsumerState<endosement> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 30,
width: MediaQuery.of(context).size.width,
child: GestureDetector(
onTap: () {
context.go(AppRoutes.dashboard);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Tooltip(
message: 'Back',
child: IconButton(
icon: const Icon(
Icons.arrow_left_sharp,
size: 25,
color: Color(0xFF425B5B),
),
onPressed: () {
context.go(AppRoutes.dashboard);
},
splashRadius: 18,
hoverColor: Colors.black12,
padding: const EdgeInsets.all(4),
constraints: const BoxConstraints(),
),
),
const SizedBox(width: 5), // spacing between icon and text
Text(
"Endorsement",
style: GoogleFonts.inter(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
],
),
),
),
SizedBox(height: 5),
// Container(
// height: 30,
// width: MediaQuery.of(context).size.width,
// child: GestureDetector(
// onTap: () {
// context.go(AppRoutes.dashboard);
// },
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Tooltip(
// message: 'Back',
// child: IconButton(
// icon: const Icon(
// Icons.arrow_left_sharp,
// size: 25,
// color: Color(0xFF425B5B),
// ),
// onPressed: () {
// context.go(AppRoutes.dashboard);
// },
// splashRadius: 18,
// hoverColor: Colors.black12,
// padding: const EdgeInsets.all(4),
// constraints: const BoxConstraints(),
// ),
// ),
// const SizedBox(width: 5), // spacing between icon and text
// Text(
// "Endorsement",
// style: GoogleFonts.poppins(
// fontSize: 14,
// fontWeight: FontWeight.w400,
// ),
// ),
// ],
// ),
// ),
// ),
//
// SizedBox(height: 5),
Expanded(
child: Container(
// color: Colors.green,
@ -233,17 +232,27 @@ class endosementState extends ConsumerState<endosement> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"Endorsement",
style: GoogleFonts.poppins(
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
Spacer(),
ThemedSearchField(
hintText: 'Search',
backgroundColor: Color(0xFFF6F8F8),
backgroundColor: Color(0xFFFFFFFF),
txtHeight: 30,
// backgroundColor: Color(0xFFF6F8F8),
onChanged: filterData,
controller: _searchStaffController,
txtwidth: ResponsiveLayout.isMobile(context)
? MediaQuery.of(context).size.width * 0.6
: MediaQuery.of(context).size.width * 0.2,
: MediaQuery.of(context).size.width * 0.15,
),
Spacer(),
SizedBox(width: 10),
ExportBtn(
sheetName: "Endorsement",
@ -311,15 +320,16 @@ class endosementState extends ConsumerState<endosement> {
],
),
),
SizedBox(height: 5),
SizedBox(height: 10),
if (!ResponsiveLayout.isMobile(context))
Container(
decoration: BoxDecoration(
color: Color(0xFFEDF6F5),
color: Color(0xFFF1F5F9),
// color: Color(0xFFEDF6F5),
borderRadius: BorderRadius.circular(6),
),
padding: const EdgeInsets.symmetric(
vertical: 12,
vertical: 8,
horizontal: 16,
),
child: Row(
@ -361,7 +371,12 @@ class endosementState extends ConsumerState<endosement> {
],
),
),
Expanded(child: _buildDataTable(context)),
Expanded(
child: Container(
color: Colors.white,
child: _buildDataTable(context),
),
),
],
),
),
@ -636,7 +651,7 @@ class endosementState extends ConsumerState<endosement> {
}
static final _dataBold = GoogleFonts.inter(
fontSize: 14,
fontSize: 11,
fontWeight: FontWeight.w400,
color: Color(0xFF000000),
@ -648,9 +663,10 @@ class endosementState extends ConsumerState<endosement> {
color: Color(0xFF585757),
);
static final _headerStyle = GoogleFonts.inter(
color: Colors.black,
fontWeight: FontWeight.bold,
static final _headerStyle = GoogleFonts.poppins(
fontSize: 11.2,
fontWeight: FontWeight.w500,
color: Color(0xFF1E293B),
);
static final _cardheaderStyle = GoogleFonts.inter(
color: Colors.black,

View File

@ -192,7 +192,15 @@ class BrokerListState extends ConsumerState<BrokerList> {
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [Text('Broker List', style: _headerStyle)],
children: [
Text(
'Broker',
style: GoogleFonts.poppins(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
],
),
),
),
@ -205,11 +213,11 @@ class BrokerListState extends ConsumerState<BrokerList> {
width: MediaQuery.of(context).size.width,
// margin: EdgeInsets.all(10.0),
decoration: BoxDecoration(
color: Colors.white,
// color: Colors.white,
borderRadius: BorderRadius.circular(15.0),
),
padding: EdgeInsets.all(15.0),
padding: EdgeInsets.all(8.0),
child: Column(
children: [
Container(
@ -239,7 +247,7 @@ class BrokerListState extends ConsumerState<BrokerList> {
txtHeight: 30,
onChanged: filterData,
controller: _searchStaffController,
txtwidth: MediaQuery.of(context).size.width * 0.2,
txtwidth: MediaQuery.of(context).size.width * 0.15,
),
SizedBox(width: 10),
@ -265,7 +273,7 @@ class BrokerListState extends ConsumerState<BrokerList> {
borderRadius: BorderRadius.circular(6),
),
padding: const EdgeInsets.symmetric(
vertical: 10,
vertical: 8,
horizontal: 16,
),
child: Row(
@ -290,7 +298,12 @@ class BrokerListState extends ConsumerState<BrokerList> {
],
),
),
Expanded(child: _buildDataTable(context)),
Expanded(
child: Container(
color: Colors.white,
child: _buildDataTable(context),
),
),
],
),
),
@ -455,7 +468,6 @@ class BrokerListState extends ConsumerState<BrokerList> {
static final _dataBold = GoogleFonts.inter(
fontSize: 11.5,
fontWeight: FontWeight.w400,
color: Color(0xFF000000),
);
@ -466,10 +478,9 @@ class BrokerListState extends ConsumerState<BrokerList> {
color: Color(0xFF585757),
);
static final _headerStyle = GoogleFonts.inter(
color: Color(0XFF1e293b),
fontSize: 12,
fontWeight: FontWeight.w600,
static final _headerStyle = GoogleFonts.poppins(
fontSize: 11.2,
fontWeight: FontWeight.w500,
color: Color(0xFF1E293B),
);
}

View File

@ -174,22 +174,36 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
// height: 30,
// color: Colors.red.shade50,
width: MediaQuery.of(context).size.width,
child: GestureDetector(
onTap: () {
context.go(AppRoutes.dashboard);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [Text('Payment List', style: _headerStyle)],
),
// Container(
// // height: 30,
// // color: Colors.red.shade50,
// width: MediaQuery.of(context).size.width,
// child: GestureDetector(
// onTap: () {
// context.go(AppRoutes.dashboard);
// },
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Text(
// 'Payment List',
// style: GoogleFonts.poppins(
// fontSize: 14,
// fontWeight: FontWeight.w500,
// ),
// ),
// ],
// ),
// ),
// ),
Text(
'Payment',
style: GoogleFonts.poppins(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
SizedBox(height: 5),
Expanded(
child: Container(
@ -198,11 +212,11 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
width: MediaQuery.of(context).size.width,
// margin: EdgeInsets.all(10.0),
decoration: BoxDecoration(
color: Colors.white,
// color: Colors.white,
borderRadius: BorderRadius.circular(15.0),
),
padding: EdgeInsets.all(15.0),
padding: EdgeInsets.all(8.0),
child: Column(
children: [
Container(
@ -232,7 +246,7 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
txtHeight: 30,
onChanged: filterData,
controller: _searchStaffController,
txtwidth: MediaQuery.of(context).size.width * 0.2,
txtwidth: MediaQuery.of(context).size.width * 0.15,
),
SizedBox(width: 10),
@ -253,7 +267,6 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
Container(
decoration: BoxDecoration(
color: Color(0xFFF1F5F9),
// color: Color(0xFFEDF6F5),
borderRadius: BorderRadius.circular(6),
),
@ -283,7 +296,12 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
],
),
),
Expanded(child: _buildDataTable(context)),
Expanded(
child: Container(
color: Colors.white,
child: _buildDataTable(context),
),
),
],
),
),
@ -462,10 +480,9 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
color: Color(0xFF585757),
);
static final _headerStyle = GoogleFonts.inter(
color: Color(0XFF1e293b),
fontSize: 12,
fontWeight: FontWeight.w600,
static final _headerStyle = GoogleFonts.poppins(
fontSize: 11.2,
fontWeight: FontWeight.w500,
color: Color(0xFF1E293B),
);
}

View File

@ -306,7 +306,7 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
onPressed: () {
context.go(AppRoutes.dashboard);
},
splashRadius: 18,
splashRadius: 1,
hoverColor: Colors.black12,
padding: const EdgeInsets.all(4),
constraints: const BoxConstraints(),
@ -315,9 +315,9 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
const SizedBox(width: 5), // spacing between icon and text
Text(
"Staff Attendance",
style: GoogleFonts.inter(
fontSize: ResponsiveLayout.isMobile(context) ? 14 : 18,
fontWeight: FontWeight.w600,
style: GoogleFonts.poppins(
fontSize: ResponsiveLayout.isMobile(context) ? 11 : 14,
fontWeight: FontWeight.w500,
),
),
],
@ -393,12 +393,14 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
ThemedSearchField(
hintText: 'Search',
backgroundColor: Color(0xFFF6F8F8),
backgroundColor: Color(0xFFFFFFFF),
txtHeight: 30,
// backgroundColor: Color(0xFFF6F8F8),
onChanged: filterData,
controller: _searchStaffController,
txtwidth: ResponsiveLayout.isMobile(context)
? MediaQuery.of(context).size.width * 0.6
: MediaQuery.of(context).size.width * 0.2,
: MediaQuery.of(context).size.width * 0.15,
),
ResponsiveLayout.isMobile(context)
? Spacer()
@ -423,10 +425,11 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
Container(
decoration: BoxDecoration(
color: Color(0xFFEDF6F5),
// color: Color(0xFFEDF6F5),
color: Color(0xFFF1F5F9),
borderRadius: BorderRadius.circular(6),
),
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Row(
children: [
Expanded(flex: 1, child: Text('S.No.', style: _headerStyle)),
@ -441,7 +444,12 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
ResponsiveLayout.isMobile(context)
? _buildDataTable(context)
: Expanded(child: _buildDataTable(context)),
: Expanded(
child: Container(
color: Colors.white,
child: _buildDataTable(context),
),
),
],
);
}
@ -478,7 +486,7 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
Widget _buildDataRow(Map<String, dynamic> item, sno) {
print('test 5');
return Container(
padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 16),
padding: const EdgeInsets.symmetric(vertical: 3, horizontal: 16),
// margin: const EdgeInsets.only(top: 10),
decoration: BoxDecoration(
color: Colors.white,
@ -515,7 +523,7 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
Expanded(
flex: 2,
child: Padding(
padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(4.0),
child: Row(
children: [
Tooltip(
@ -523,13 +531,13 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
child: IconButton(
icon: Image.asset(
"assets/miscellaneous/Edit.png",
height: 15,
height: 12,
width: 15,
),
onPressed: () {
handleEdit(item);
},
splashRadius: 28,
splashRadius: 18,
hoverColor: Colors.black12,
padding: const EdgeInsets.all(8),
constraints: const BoxConstraints(),
@ -614,7 +622,7 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
}
static final _dataBold = GoogleFonts.inter(
fontSize: 14,
fontSize: 12,
fontWeight: FontWeight.w400,
color: Color(0xFF000000),
@ -630,9 +638,10 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
// color: Colors.black,
// fontWeight: FontWeight.bold,
// );
static final _headerStyle = GoogleFonts.inter(
color: Colors.black,
fontWeight: FontWeight.bold,
static final _headerStyle = GoogleFonts.poppins(
fontSize: 11.2,
fontWeight: FontWeight.w500,
color: Color(0xFF1E293B),
);
static final _cardheaderStyle = GoogleFonts.inter(
color: Colors.black,

View File

@ -323,9 +323,9 @@ class IndividualAttendanceDetailsState
const SizedBox(width: 5), // spacing between icon and text
Text(
"Attendance",
style: GoogleFonts.inter(
fontSize: ResponsiveLayout.isMobile(context) ? 14 : 18,
fontWeight: FontWeight.w600,
style: GoogleFonts.poppins(
fontSize: ResponsiveLayout.isMobile(context) ? 11 : 14,
fontWeight: FontWeight.w500,
),
),
],
@ -401,12 +401,14 @@ class IndividualAttendanceDetailsState
ThemedSearchField(
hintText: 'Search',
backgroundColor: Color(0xFFF6F8F8),
backgroundColor: Color(0xFFFFFFFF),
txtHeight: 30,
// backgroundColor: Color(0xFFF6F8F8),
onChanged: filterData,
controller: _searchStaffController,
txtwidth: ResponsiveLayout.isMobile(context)
? MediaQuery.of(context).size.width * 0.6
: MediaQuery.of(context).size.width * 0.2,
: MediaQuery.of(context).size.width * 0.15,
),
ResponsiveLayout.isMobile(context)
? Spacer()
@ -441,10 +443,11 @@ class IndividualAttendanceDetailsState
Container(
decoration: BoxDecoration(
color: Color(0xFFEDF6F5),
color: Color(0xFFF1F5F9),
// color: Color(0xFFEDF6F5),
borderRadius: BorderRadius.circular(6),
),
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Row(
children: [
Expanded(flex: 1, child: Text('S.No.', style: _headerStyle)),
@ -463,7 +466,12 @@ class IndividualAttendanceDetailsState
ResponsiveLayout.isMobile(context)
? _buildDataTable(context)
: Expanded(child: _buildDataTable(context)),
: Expanded(
child: Container(
color: Colors.white,
child: _buildDataTable(context),
),
),
],
);
}
@ -500,7 +508,7 @@ class IndividualAttendanceDetailsState
Widget _buildDataRow(Map<String, dynamic> item, sno) {
print('test 5');
return Container(
padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 16),
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
// margin: const EdgeInsets.only(top: 10),
decoration: BoxDecoration(
color: Colors.white,
@ -603,7 +611,7 @@ class IndividualAttendanceDetailsState
}
static final _dataBold = GoogleFonts.inter(
fontSize: 14,
fontSize: 12,
fontWeight: FontWeight.w400,
color: Color(0xFF000000),
@ -619,9 +627,10 @@ class IndividualAttendanceDetailsState
// color: Colors.black,
// fontWeight: FontWeight.bold,
// );
static final _headerStyle = GoogleFonts.inter(
color: Colors.black,
fontWeight: FontWeight.bold,
static final _headerStyle = GoogleFonts.poppins(
fontSize: 11.2,
fontWeight: FontWeight.w500,
color: Color(0xFF1E293B),
);
static final _cardheaderStyle = GoogleFonts.inter(
color: Colors.black,

View File

@ -8,6 +8,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:http/http.dart' as http;
import 'package:nhance_partner/core/routing/routes.dart';
import 'package:nhance_partner/presentation/themes/indicators/text_field_theme.dart';
@ -366,9 +367,9 @@ class AgentState extends ConsumerState<Agent> {
const SizedBox(width: 5), // spacing between icon and text
Text(
"Partner",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
style: GoogleFonts.poppins(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
],
@ -384,7 +385,8 @@ class AgentState extends ConsumerState<Agent> {
padding: EdgeInsets.symmetric(horizontal: 14.0, vertical: 20.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.0),
color: Color(0xFFEDF6F5),
color: Colors.white,
// color: Color(0xFFEDF6F5),
),
child: Column(
children: [
@ -405,11 +407,15 @@ class AgentState extends ConsumerState<Agent> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.0),
color: Color(0xFF425B5B),
color: Color(0xFF2E7D6E),
// color: Color(0xFF425B5B),
),
child: Text(
'Save',
style: TextStyle(color: Colors.white),
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 12,
),
),
),
),
@ -478,6 +484,8 @@ class AgentState extends ConsumerState<Agent> {
ThemedFormField(
controller: controllers['name']!,
validator: (value) => Validators.requiredField(value, "name"),
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
txtwidth: MediaQuery.of(context).size.width * 0.26,
),
],
@ -493,6 +501,8 @@ class AgentState extends ConsumerState<Agent> {
ThemedFormField(
controller: controllers['email']!,
validator: (value) => Validators.email(value, "email"),
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[a-zA-Z0-9_@.]')),
],
@ -511,6 +521,8 @@ class AgentState extends ConsumerState<Agent> {
ThemedFormField(
controller: controllers['mobile']!,
validator: (value) => Validators.phone(value, "phNumber"),
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[ 0-9]')),
],
@ -531,6 +543,8 @@ class AgentState extends ConsumerState<Agent> {
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[a-zA-Z0-9]')),
],
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
validator: (value) => Validators.requiredField(value, "id"),
txtwidth: MediaQuery.of(context).size.width * 0.26,
),
@ -546,7 +560,8 @@ class AgentState extends ConsumerState<Agent> {
SizedBox(width: 10),
ThemedFormField(
controller: controllers['address']!,
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
txtwidth: MediaQuery.of(context).size.width * 0.26,
),
],
@ -567,6 +582,8 @@ class AgentState extends ConsumerState<Agent> {
ThemedUploadField(
hintText: selectedFileNames ?? "Upload Document",
txtwidth: MediaQuery.of(context).size.width * 0.26,
borderColor: Color(0xFFE2E8F0),
// highlightColor: Color(0xFF50A398),
onFileSelected: (fileName, file) {
print("Picked file: $fileName (${file.size} bytes)");
setState(() {
@ -595,7 +612,7 @@ class AgentState extends ConsumerState<Agent> {
// ),
// tooltip: 'To Remove Upload',
// ),
GestureDetector(
InkWell(
onTap: () => apiService.downloadFile(
apiUrl:
'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
@ -604,10 +621,10 @@ class AgentState extends ConsumerState<Agent> {
fileName: selectedFileNames,
),
child: Container(
padding: const EdgeInsets.all(5),
// padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: Color(0xFF425B5B),
// color: Color(0xFF425B5B),
// color: Colors.green.shade300,
),
child: Row(
@ -615,13 +632,14 @@ class AgentState extends ConsumerState<Agent> {
Text(
"Download",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w200,
color: Colors.white,
fontSize: 11,
fontWeight: FontWeight.w600,
// color: Colors.white,
color: Color(0xFF2E7D6E),
),
),
SizedBox(width: 5),
Icon(Icons.download, size: 13, color: Colors.white),
// SizedBox(width: 5),
// Icon(Icons.download, size: 13, color: Colors.white),
],
),
),
@ -775,8 +793,8 @@ class AgentState extends ConsumerState<Agent> {
);
}
static const _textStyle = TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
static final _textStyle = GoogleFonts.poppins(
fontSize: 12,
fontWeight: FontWeight.w500,
);
}

View File

@ -385,7 +385,8 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
Text(
"Incentive Files",
style: GoogleFonts.poppins(
fontSize: 18,
fontSize: 14,
color: Color(0xFF50A398),
fontWeight: FontWeight.w500,
),
),
@ -395,8 +396,9 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
child: IconButton(
icon: const Icon(
Icons.refresh,
size: 20,
color: Color(0xFF425B5B),
size: 18,
color: Color(0xFF2E7D6E),
// color: Color(0xFF425B5B),
),
onPressed: () {
refresh();
@ -412,8 +414,9 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
child: IconButton(
icon: const Icon(
Icons.close,
size: 20,
color: Color(0xFF425B5B),
size: 18,
// color: Color(0xFF425B5B),
color: Color(0xFF2E7D6E),
),
onPressed: () {
Navigator.pop(context);
@ -456,32 +459,80 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
agent['name'].toString(), // what to show
compareFn: (item, selectedItem) =>
item['id'] == selectedItem['id'], // compare by id
decoratorProps: DropDownDecoratorProps(
decoration: AppInputDecorations.dropdownDecoration(
label: "Select Partner",
),
),
decoratorProps: DropDownDecoratorProps(
decoration:
AppInputDecorations.dropdownDecoration(
label: "Select Partner",
).copyWith(
hintStyle: GoogleFonts.inter(
fontSize: 12,
color: Colors.black,
),
filled: true,
fillColor: Colors
.white, // 👈 makes the dropdown input white
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0xFFE2E8F0),
// color: Colors.white,
), // 👈 Normal border
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0xFFE2E8F0),
// color: Colors.white,
width: 1.5,
), // 👈 Focused border
),
contentPadding: EdgeInsets.symmetric(
horizontal: 8,
vertical: 6,
),
),
),
popupProps: PopupProps.menu(
fit: FlexFit.loose,
menuProps: MenuProps(backgroundColor: Colors.white),
showSearchBox: true,
searchFieldProps: TextFieldProps(
decoration: InputDecoration(
hintText: "Search partner...",
hintStyle: GoogleFonts.inter(
fontSize: 12,
color: Colors.black,
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.grey,
), // 👈 Normal border
borderSide: BorderSide(color: Colors.white),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.grey,
width: 1.5,
), // 👈 Focused border
// color: Colors.blue,
color: Color(0xFFEDF6F5),
width: 1,
),
),
),
),
// constraints: BoxConstraints(),
itemBuilder: (context, item, isDisabled, isSelected) {
return Container(
// color: isSelected ? Colors.blue.withOpacity(0.1) : null,
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 3,
),
child: Text(
item['name'].toString(),
style: GoogleFonts.inter(
fontSize: 12,
color: Colors.black,
),
),
);
},
),
onChanged: (agent) {
@ -509,7 +560,9 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
controller: controllers['agentId']!,
txtwidth: MediaQuery.of(context).size.width * 0.27,
txtheight: 40,
backgroundColor: Color(0xFFECECEC),
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
// backgroundColor: Color(0xFFECECEC),
readOnly: true,
// backgroundColor: Color(0xFFCBCBCB),
),
@ -539,10 +592,12 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
hintText: "Select Month",
txtwidth: MediaQuery.of(context).size.width * 0.27,
txtheight: 40,
backgroundColor: const Color(0xFFECECEC),
// backgroundColor: const Color(0xFFECECEC),
validator: (value) =>
Validators.requiredField(value, "date"),
borderColor: Colors.grey.shade300,
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
controller: controllers['date']!,
onDateSelected: (date) {
print("Picked Date: $date");
@ -576,7 +631,9 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
// }
// return null;
// },
backgroundColor: Color(0xFFECECEC),
// backgroundColor: Color(0xFFECECEC),
backgroundColor: Colors.white,
borderColor: Color(0xFFE2E8F0),
hintText:
(selectedFileNames == null ||
selectedFileNames!.isEmpty)
@ -603,7 +660,8 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
MediaQuery.of(context).size.width * 0.068,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF425B5B),
// backgroundColor: Color(0xFF425B5B),
backgroundColor: Color(0xFF2E7D6E),
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
@ -638,12 +696,13 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
Text('Files', style: _labelHeaderStyle),
ThemedSearchField(
hintText: 'Search',
backgroundColor: Color(0xFFECECEC),
backgroundColor: Colors.white,
// backgroundColor: Color(0xFFECECEC),
onChanged: filterData,
// onChanged: null,
controller: controllers['search']!,
txtwidth: MediaQuery.of(context).size.width * 0.18,
txtHeight: 35,
txtwidth: MediaQuery.of(context).size.width * 0.15,
txtHeight: 30,
),
],
),
@ -729,11 +788,11 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
final _labelStyle = GoogleFonts.poppins(
color: Colors.black,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w400,
fontSize: 12,
);
final _labelHeaderStyle = GoogleFonts.poppins(
fontSize: 14,
fontSize: 12,
fontWeight: FontWeight.w600,
);
@ -770,10 +829,14 @@ class IncentiveFileRow extends StatelessWidget {
padding: const EdgeInsets.all(6.0),
decoration: BoxDecoration(
color: const Color(0xFFF4F6F8),
borderRadius: BorderRadius.circular(8.0),
borderRadius: BorderRadius.circular(6.0),
border: Border.all(color: const Color(0xFFE3E3E3)),
),
child: const Icon(Icons.file_present, color: Color(0xFF838587)),
child: const Icon(
Icons.file_present,
color: Color(0xFF838587),
size: 18,
),
),
const SizedBox(width: 10),
Column(
@ -783,13 +846,22 @@ class IncentiveFileRow extends StatelessWidget {
width: 100,
child: Text(
fileName,
style: const TextStyle(fontWeight: FontWeight.w600),
style: GoogleFonts.poppins(
fontWeight: FontWeight.w400,
fontSize: 12,
),
overflow: TextOverflow.ellipsis,
softWrap: true,
maxLines: 1,
),
),
Text(date, style: const TextStyle(color: Color(0xFF6E6E6E))),
Text(
date,
style: GoogleFonts.poppins(
color: Color(0xFF6E6E6E),
fontSize: 10,
),
),
],
),
const Spacer(),
@ -798,12 +870,17 @@ class IncentiveFileRow extends StatelessWidget {
child: const Icon(
Icons.file_download_outlined,
color: Color(0xFF6E6E6E),
size: 18,
),
),
SizedBox(width: 10),
GestureDetector(
onTap: onDelete,
child: const Icon(Icons.delete_outlined, color: Color(0xFF6E6E6E)),
child: const Icon(
Icons.delete_outlined,
color: Color(0xFF6E6E6E),
size: 18,
),
),
],
),

View File

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import '../../../../core/routing/routes.dart';
import '../../../../core/services/api_service.dart';
@ -173,49 +174,49 @@ class AgentListState extends ConsumerState<AgentList> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
// height: 30,
// color: Colors.red.shade50,
width: MediaQuery.of(context).size.width,
child: GestureDetector(
onTap: () {
context.go(AppRoutes.dashboard);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Tooltip(
message: 'Back',
child: IconButton(
icon: const Icon(
Icons.arrow_left_sharp,
size: 25,
color: Color(0xFF425B5B),
),
onPressed: () {
context.go(AppRoutes.dashboard);
},
splashRadius: 18,
hoverColor: Colors.black12,
padding: const EdgeInsets.all(4),
constraints: const BoxConstraints(),
),
),
const SizedBox(width: 5), // spacing between icon and text
Text(
"Partner",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
],
),
),
),
// Container(
// // height: 30,
// // color: Colors.red.shade50,
// width: MediaQuery.of(context).size.width,
// child: GestureDetector(
// onTap: () {
// context.go(AppRoutes.dashboard);
// },
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// // Tooltip(
// // message: 'Back',
// // child: IconButton(
// // icon: const Icon(
// // Icons.arrow_left_sharp,
// // size: 25,
// // color: Color(0xFF425B5B),
// // ),
// // onPressed: () {
// // context.go(AppRoutes.dashboard);
// // },
// // splashRadius: 18,
// // hoverColor: Colors.black12,
// // padding: const EdgeInsets.all(4),
// // constraints: const BoxConstraints(),
// // ),
// // ),
// // const SizedBox(width: 5), // spacing between icon and text
// Text(
// "Partner",
// style: GoogleFonts.poppins(
// fontSize: 12,
// fontWeight: FontWeight.w500,
// ),
// ),
// ],
// ),
// ),
// ),
SizedBox(height: 10),
// SizedBox(height: 5),
Expanded(
child: Container(
// color: Colors.green,
@ -232,42 +233,56 @@ class AgentListState extends ConsumerState<AgentList> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"Partner",
style: GoogleFonts.poppins(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
Spacer(),
ThemedSearchField(
hintText: 'Search',
backgroundColor: Color(0xFFF6F8F8),
backgroundColor: Color(0xFFFFFFFF),
// backgroundColor: Color(0xFFF6F8F8),
txtHeight: 30,
onChanged: filterData,
controller: _searchController,
txtwidth: MediaQuery.of(context).size.width * 0.2,
txtwidth: MediaQuery.of(context).size.width * 0.15,
),
Spacer(),
GestureDetector(
SizedBox(width: 10),
InkWell(
onTap: () {
showUploadIncentiveModal(context);
},
child: Container(
padding: EdgeInsets.all(8.0),
padding: EdgeInsets.all(5.4),
decoration: BoxDecoration(
color: Color(0xFF425B5B),
color: const Color(0xFF2E7D6E),
// color: Color(0xFF425B5B),
borderRadius: BorderRadius.circular(8.0),
),
child: Row(
mainAxisSize: MainAxisSize.min,
// mainAxisSize: MainAxisSize.min,
children: [
Text(
'Incentive File',
style: TextStyle(
// Text(
// 'Incentive File',
// style: TextStyle(
// color: Colors.white,
// fontWeight: FontWeight.w600,
// fontSize: 12,
// ),
// ),
// SizedBox(width: 10),
Tooltip(
message: 'Incentive File',
child: Icon(
Icons.file_open_outlined,
color: Colors.white,
fontWeight: FontWeight.w600,
fontSize: 14,
size: 18,
),
),
SizedBox(width: 10),
Icon(
Icons.file_open_outlined,
color: Colors.white,
),
],
),
),
@ -301,29 +316,37 @@ class AgentListState extends ConsumerState<AgentList> {
),
SizedBox(width: 10),
GestureDetector(
InkWell(
onTap: () {
context.go('/agent/create');
},
child: Container(
padding: EdgeInsets.all(8.0),
padding: EdgeInsets.all(5.0),
decoration: BoxDecoration(
color: Color(0xFF425B5B),
// color: Color(0xFF425B5B),
color: const Color(0xFF2E7D6E),
borderRadius: BorderRadius.circular(8.0),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Create New Partner',
style: TextStyle(
// Text(
// 'Create New Partner',
// style: TextStyle(
// color: Colors.white,
// fontWeight: FontWeight.w600,
// fontSize: 12,
// ),
// ),
// SizedBox(width: 10),
Tooltip(
message: 'Create New Partner',
child: Icon(
Icons.add,
color: Colors.white,
fontWeight: FontWeight.w600,
fontSize: 14,
size: 18,
),
),
SizedBox(width: 10),
Icon(Icons.add, color: Colors.white),
],
),
),
@ -334,16 +357,18 @@ class AgentListState extends ConsumerState<AgentList> {
SizedBox(height: 10),
Container(
height: 50,
// height: 50,
decoration: BoxDecoration(
color: Color(0xFFEDF6F5),
color: Color(0xFFF1F5F9),
// color: Color(0xFFEDF6F5),
borderRadius: BorderRadius.circular(6),
),
padding: const EdgeInsets.symmetric(
vertical: 12,
vertical: 8,
horizontal: 16,
),
child: const Row(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
@ -382,7 +407,12 @@ class AgentListState extends ConsumerState<AgentList> {
),
),
Expanded(child: _buildClaimsDataTable(context)),
Expanded(
child: Container(
color: Colors.white,
child: _buildClaimsDataTable(context),
),
),
],
),
),
@ -455,7 +485,7 @@ class AgentListState extends ConsumerState<AgentList> {
Widget _buildDataRow(Map<String, dynamic> item, sno) {
return Container(
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 16),
padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 16),
// margin: const EdgeInsets.only(top: 10),
decoration: BoxDecoration(
color: Colors.white,
@ -495,7 +525,7 @@ class AgentListState extends ConsumerState<AgentList> {
child: Row(
children: [
Transform.scale(
scale: 0.6, // reduce size (0.70.9 works well)
scale: 0.4, // reduce size (0.70.9 works well)
child: Switch(
value: item['is_active'] == "1",
onChanged: (val) {
@ -509,8 +539,10 @@ class AgentListState extends ConsumerState<AgentList> {
);
print("Response - $response");
},
activeColor: Color(0xFF425B5B),
activeTrackColor: Color(0xFFB2D8D3),
// activeColor: Color(0xFF425B5B),
// activeTrackColor: Color(0xFFB2D8D3),
activeColor: Color(0xFF2E7D6E), // thumb when active
activeTrackColor: Color(0xFFDCFCE7), // track when active
inactiveThumbColor:
Colors.grey.shade400, // thumb when inactive
inactiveTrackColor:
@ -530,7 +562,7 @@ class AgentListState extends ConsumerState<AgentList> {
child: IconButton(
icon: Image.asset(
"assets/miscellaneous/Edit.png",
height: 15,
height: 12,
width: 15,
),
onPressed: () {
@ -550,7 +582,7 @@ class AgentListState extends ConsumerState<AgentList> {
children: [
Image.asset(
"assets/miscellaneous/Edit_muted.png",
height: 15,
height: 12,
width: 15,
),
],
@ -595,8 +627,8 @@ class AgentListState extends ConsumerState<AgentList> {
);
}
static final _dataBold = TextStyle(
fontSize: 14,
static final _dataBold = GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w400,
color: Color(0xFF000000),
);
@ -607,8 +639,9 @@ class AgentListState extends ConsumerState<AgentList> {
color: Color(0xFF585757),
);
static const _headerStyle = TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
static final _headerStyle = GoogleFonts.poppins(
fontSize: 11.2,
fontWeight: FontWeight.w500,
color: Color(0xFF1E293B),
);
}

View File

@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:http/http.dart' as http;
import 'package:nhance_partner/core/routing/routes.dart';
import 'package:nhance_partner/data/utils/toastNotification.dart';
@ -352,7 +353,7 @@ class StaffState extends ConsumerState<Staff> {
child: IconButton(
icon: const Icon(
Icons.arrow_left_sharp,
size: 35,
size: 25,
color: Color(0xFF425B5B),
),
onPressed: () {
@ -367,16 +368,16 @@ class StaffState extends ConsumerState<Staff> {
const SizedBox(width: 5), // spacing between icon and text
Text(
"Staff",
style: TextStyle(
style: GoogleFonts.poppins(
fontSize: 14,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w500,
),
),
],
),
),
),
SizedBox(height: 10),
// SizedBox(height: 10),
Expanded(
child: Container(
// color: Colors.green,
@ -385,8 +386,8 @@ class StaffState extends ConsumerState<Staff> {
padding: EdgeInsets.symmetric(horizontal: 14.0, vertical: 20.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.0),
// color: Colors.white,
color: Color(0xFFEDF6F5),
color: Colors.white,
// color: Color(0xFFEDF6F5),
),
child: Column(
children: [
@ -407,11 +408,15 @@ class StaffState extends ConsumerState<Staff> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.0),
color: Color(0xFF425B5B),
color: Color(0xFF2E7D6E),
// color: Color(0xFF425B5B),
),
child: Text(
'Save',
style: TextStyle(color: Colors.white),
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 12,
),
),
),
),
@ -480,6 +485,8 @@ class StaffState extends ConsumerState<Staff> {
Text("Full Name *", style: _textStyle),
SizedBox(width: 10),
ThemedFormField(
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
controller: controllers['name']!,
validator: (value) => Validators.requiredField(value, "name"),
txtwidth: MediaQuery.of(context).size.width * 0.26,
@ -496,6 +503,8 @@ class StaffState extends ConsumerState<Staff> {
SizedBox(width: 10),
ThemedFormField(
controller: controllers['email']!,
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
validator: (value) => Validators.email(value, "email"),
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[a-zA-Z0-9_@.]')),
@ -514,6 +523,8 @@ class StaffState extends ConsumerState<Staff> {
SizedBox(width: 10),
ThemedFormField(
controller: controllers['mobile']!,
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
validator: (value) => Validators.phone(value, "phNumber"),
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[ 0-9]')),
@ -532,6 +543,8 @@ class StaffState extends ConsumerState<Staff> {
SizedBox(width: 10),
ThemedFormField(
controller: controllers['code']!,
borderColor: Color(0xFFE2E8F0),
highlightColor: Color(0xFF50A398),
// validator: (value) => Validators.requiredField(value, "id"),
txtwidth: MediaQuery.of(context).size.width * 0.26,
),
@ -611,6 +624,25 @@ class StaffState extends ConsumerState<Staff> {
filled: true,
fillColor:
Colors.white, // 👈 makes the dropdown input white
isDense: true,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(
color: Color(0xFFE2E8F0),
width: 1,
),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(
color: Color(0xFFE2E8F0),
width: 1,
),
),
contentPadding: EdgeInsets.symmetric(
horizontal: 8,
vertical: 6,
),
),
),
@ -624,18 +656,26 @@ class StaffState extends ConsumerState<Staff> {
showSearchBox: true,
searchFieldProps: TextFieldProps(
autofocus: true,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(3),
filled: true,
fillColor: Colors.white,
hintText: "Search Role...",
hintStyle: GoogleFonts.inter(
fontSize: 12,
color: Colors.black,
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.white,
color: Color(0xFFE2E8F0),
// color: Colors.white,
), // 👈 Normal border
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.white,
color: Color(0xFFE2E8F0),
// color: Colors.white,
width: 1.5,
), // 👈 Focused border
),
@ -733,9 +773,31 @@ class StaffState extends ConsumerState<Staff> {
AppInputDecorations.dropdownDecoration(
label: "Select Handler",
).copyWith(
hintStyle: GoogleFonts.inter(
fontSize: 12,
color: Colors.black,
),
filled: true,
fillColor:
Colors.white, // 👈 makes the dropdown input white
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0xFFE2E8F0),
// color: Colors.white,
), // 👈 Normal border
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0xFFE2E8F0),
// color: Colors.white,
width: 1.5,
), // 👈 Focused border
),
contentPadding: EdgeInsets.symmetric(
horizontal: 8,
vertical: 6,
),
),
),
popupProps: PopupPropsMultiSelection.menu(
@ -745,10 +807,16 @@ class StaffState extends ConsumerState<Staff> {
menuProps: MenuProps(backgroundColor: Colors.white),
searchFieldProps: TextFieldProps(
autofocus: true,
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
hintText: "Search Handler...",
hintStyle: GoogleFonts.inter(
fontSize: 12,
color: Colors.black,
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white),
),
@ -847,8 +915,8 @@ class StaffState extends ConsumerState<Staff> {
);
}
static const _textStyle = TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
static final _textStyle = GoogleFonts.poppins(
fontSize: 12,
fontWeight: FontWeight.w500,
);
}

View File

@ -203,48 +203,48 @@ class StaffListState extends ConsumerState<StaffList> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
// height: 30,
// color: Colors.red.shade50,
width: MediaQuery.of(context).size.width,
child: GestureDetector(
onTap: () {
context.go(AppRoutes.dashboard);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text('Staff List', style: _headerStyle),
// Icon(
// Icons.arrow_left_sharp,
// size: 35,
// color: Color(0xFF425B5B),
// ),
// Tooltip(
// message: 'Back',
// child: IconButton(
// icon: const Icon(
// Icons.arrow_left_sharp,
// size: 25,
// color: Color(0xFF425B5B),
// ),
// onPressed: () {
// context.go(AppRoutes.dashboard);
// },
// splashRadius: 18,
// hoverColor: Colors.black12,
// padding: const EdgeInsets.all(4),
// constraints: const BoxConstraints(),
// ),
// ),
// const SizedBox(width: 15), // spacing between icon and text
],
),
),
),
SizedBox(height: 5),
// Container(
// // height: 30,
// // color: Colors.red.shade50,
// width: MediaQuery.of(context).size.width,
// child: GestureDetector(
// onTap: () {
// context.go(AppRoutes.dashboard);
// },
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Text('Staff List', style: _headerStyle),
// // Icon(
// // Icons.arrow_left_sharp,
// // size: 35,
// // color: Color(0xFF425B5B),
// // ),
// // Tooltip(
// // message: 'Back',
// // child: IconButton(
// // icon: const Icon(
// // Icons.arrow_left_sharp,
// // size: 25,
// // color: Color(0xFF425B5B),
// // ),
// // onPressed: () {
// // context.go(AppRoutes.dashboard);
// // },
// // splashRadius: 18,
// // hoverColor: Colors.black12,
// // padding: const EdgeInsets.all(4),
// // constraints: const BoxConstraints(),
// // ),
// // ),
// // const SizedBox(width: 15), // spacing between icon and text
// ],
// ),
// ),
// ),
//
// SizedBox(height: 5),
Expanded(
child: Container(
// color: Colors.green,
@ -252,12 +252,13 @@ class StaffListState extends ConsumerState<StaffList> {
width: MediaQuery.of(context).size.width,
// margin: EdgeInsets.all(10.0),
decoration: BoxDecoration(
color: Colors.white,
// color: Colors.white,
borderRadius: BorderRadius.circular(15.0),
),
padding: EdgeInsets.all(15.0),
padding: EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
// height: 40,
@ -266,6 +267,14 @@ class StaffListState extends ConsumerState<StaffList> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'Staff List',
style: GoogleFonts.poppins(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
Spacer(),
ThemedSearchField(
hintText: 'Search',
// backgroundColor: Color(0xFFF6F8F8),
@ -273,7 +282,7 @@ class StaffListState extends ConsumerState<StaffList> {
txtHeight: 30,
onChanged: filterData,
controller: _searchStaffController,
txtwidth: MediaQuery.of(context).size.width * 0.2,
txtwidth: MediaQuery.of(context).size.width * 0.15,
),
SizedBox(width: 10),
@ -302,13 +311,13 @@ class StaffListState extends ConsumerState<StaffList> {
],
),
Spacer(),
SizedBox(width: 10),
InkWell(
onTap: () {
context.go('/staff/create');
},
child: Container(
padding: EdgeInsets.all(6.5),
padding: EdgeInsets.all(4.8),
decoration: BoxDecoration(
color: const Color(0xFF2E7D6E),
borderRadius: BorderRadius.circular(8.0),
@ -331,7 +340,7 @@ class StaffListState extends ConsumerState<StaffList> {
],
),
),
SizedBox(height: 10),
SizedBox(height: 5),
Container(
decoration: BoxDecoration(
color: Color(0xFFF1F5F9),
@ -491,8 +500,8 @@ class StaffListState extends ConsumerState<StaffList> {
print("Response - $response");
},
activeColor: Color(0xFF2E7D6E), // thumb when active
// activeColor: Color(0xFF425B5B), // thumb when active
activeTrackColor: Color(0xFFDCFCE7), // track when active
// activeColor: Color(0xFF425B5B), // thumb when active
// activeTrackColor: Color(0xFFB2D8D3), // track when active
inactiveThumbColor:
Colors.grey.shade400, // thumb when inactive
@ -548,7 +557,7 @@ class StaffListState extends ConsumerState<StaffList> {
children: [
Image.asset(
"assets/miscellaneous/Edit_muted.png",
height: 15,
height: 12,
width: 15,
),
],
@ -594,7 +603,7 @@ class StaffListState extends ConsumerState<StaffList> {
}
static final _dataBold = GoogleFonts.inter(
fontSize: 11.5,
fontSize: 12,
fontWeight: FontWeight.w400,
color: Color(0xFF000000),
@ -606,10 +615,9 @@ class StaffListState extends ConsumerState<StaffList> {
color: Color(0xFF585757),
);
static final _headerStyle = GoogleFonts.inter(
color: Color(0XFF1e293b),
fontSize: 12,
fontWeight: FontWeight.w600,
static final _headerStyle = GoogleFonts.poppins(
fontSize: 11.2,
fontWeight: FontWeight.w500,
color: Color(0xFF1E293B),
);
}

View File

@ -2017,12 +2017,13 @@ Future<void> handleDashboardNavigation(
await prefs.setString('dashboardStatusProvider', status);
await prefs.setString('dashboardStaffIdProvider', staffId!);
// Navigate
if (role == 'manager') {
context.go(AppRoutes.enquiryForStaff);
} else {
context.go(AppRoutes.enquiryHandlerLst);
}
context.go(AppRoutes.enquiryForStaff);
// // Navigate
// if (role == 'manager') {
// context.go(AppRoutes.enquiryForStaff);
// } else {
// context.go(AppRoutes.enquiryHandlerLst);
// }
}
final _headerStyle = GoogleFonts.inter(

View File

@ -340,12 +340,13 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
print('managerId -- $managerId');
final userRole = ref.watch(userRoleProvider);
print('userRole -- $userRole');
if (userRole == 'staff') {
context.go(AppRoutes.enquiryForStaff);
} if (userRole == 'admin') {
} else if (userRole == 'admin') {
context.go(AppRoutes.payout);
} else {
context.go(AppRoutes.dashboard);
context.go(AppRoutes.dashboard);
}
} else {
ToastHelper.showErrorToast(context, data['message'] ?? 'Invalid OTP');

View File

@ -121,7 +121,10 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
Map<String, dynamic> dataDetails() {
final data = {
"agent_id": ((roleId == 'handler') || (roleId == 'manager'))
"agent_id":
((roleId == 'handler') ||
(roleId == 'manager') ||
(roleId == 'staff'))
? selectedAgent
: userId,
"name": controllers["name"]?.text,
@ -2808,7 +2811,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
'Proposal Created': const Color(0xFFF0F9FF), // Cyan 50
'Proposal Accepted': const Color(0xFFF0FDF4), // Green 50
'Proposal Rejected': const Color(0xFFFEF9C3), // Yellow 50
'Policy Created': const Color(0xFFEDE9FE), // Purple 50 (generated)
'Policy Created': const Color(0xFFF3F0FF), // Purple 50 (generated)
};
final Map<String, Color> statusBorderColors = {
@ -2816,7 +2819,8 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
'Proposal Created': const Color(0xFFBAE6FD), // Cyan 100
'Proposal Accepted': const Color(0xFFDCFCE7), // Green 100
'Proposal Rejected': const Color(0xFFFEF3C7), // Yellow 100
'Policy Created': const Color(0xFFD8B4FE), // Purple 200
'Policy Created': const Color(0xFFF0E4FF), // Purple 200
// 'Policy Created': const Color(0xFFE5CCFF), // Purple 200
};
final Map<String, Color> statusTextColors = {
@ -2839,7 +2843,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
});
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 8),
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 4),
child: Row(
children: [
Icon(
@ -2869,7 +2873,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
child: Text(
'$count',
style: GoogleFonts.inter(
fontSize: 12,
fontSize: 11,
color: Color(0xFF2563EB),
fontWeight: FontWeight.w500,
),
@ -2990,7 +2994,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
Container(
// width: double.infinity,
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.fromLTRB(12, 8, 12, 8),
margin: EdgeInsets.fromLTRB(12, 4, 12, 4),
child: _buildGroupHeader(status, items.length),
),
],
@ -3091,10 +3095,10 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
if (status != 'Proposal Accepted' &&
status != 'Proposal Rejected')
Padding(
padding: EdgeInsets.all(20),
padding: EdgeInsets.all(5),
child: Center(
child: Text(
'No records found',
'No enquiries found',
style: GoogleFonts.inter(
fontSize: 12,
color: Colors.grey,
@ -3148,6 +3152,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
// Assigned To
DataCell(
SizedBox(
// flex: 1,
width: 100,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -3213,7 +3218,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
// Vehicle No
DataCell(
SizedBox(
width: 85,
width: 95,
child: Builder(
builder: (buttonContext) => Material(
color: Colors.white,
@ -3282,40 +3287,74 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
DataCell(
SizedBox(
width: 40.0,
width: 50.0,
child: Row(
children: [
// Tooltip(
// message:
// 'Email : ${item["email"]}\n'
// 'Mobile : ${item["mobile"]}\n'
// 'Remarks : ${item["remarks"]}',
// decoration: BoxDecoration(
// color: Colors.white, // background color
// borderRadius: BorderRadius.circular(6),
// border: Border.all(color: Colors.grey, width: 1),
// ),
// textStyle: GoogleFonts.inter(
// color: Colors.black,
// fontSize: 12,
// ),
//
// padding: const EdgeInsets.symmetric(
// horizontal: 8,
// vertical: 4, // reduce tooltip height
// ),
// margin: const EdgeInsets.only(
// left: 10,
// ), // tooltip distance from widget
// waitDuration: Duration(milliseconds: 500),
// showDuration: Duration(seconds: 2),
// child: Icon(
// Icons.info_outline_rounded,
// size: 15,
// color: Colors.blue,
// ),
// ),
Tooltip(
message:
'Email : ${item["email"]}\n'
'Mobile : ${item["mobile"]}\n'
'Remarks : ${item["remarks"]}',
decoration: BoxDecoration(
color: Colors.white, // background color
borderRadius: BorderRadius.circular(6),
border: Border.all(color: Colors.grey, width: 1),
),
textStyle: GoogleFonts.inter(
color: Colors.black,
fontSize: 12,
),
richMessage: WidgetSpan(
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
// color: Colors.white,
color: Color(0xFFFFFCF2),
borderRadius: BorderRadius.circular(6),
// border: Border.all(color: Colors.blueGrey.shade100),
// border: Border.all(color: Colors.grey.shade400),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 4, // reduce tooltip height
// mainAxisSize: MainAxisSize.min,
children: [
_row("Email", item["email"]),
_row("Mobile", item["mobile"]),
_row("Remarks", item["remarks"]),
],
),
),
),
margin: const EdgeInsets.only(
left: 10,
), // tooltip distance from widget
padding: EdgeInsets
.zero, // important (remove default tooltip padding)
verticalOffset: 12, // distance from icon
waitDuration: Duration(milliseconds: 500),
showDuration: Duration(seconds: 2),
decoration: BoxDecoration(), // remove default yellow box
child: Icon(
Icons.info_outline_rounded,
size: 15,
color: Colors.blue,
),
),
IconButton(
padding: EdgeInsets.zero, // remove outer padding
constraints: BoxConstraints(
@ -3388,7 +3427,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
// )
// :
SizedBox(
width: 80,
width: 90,
child: Text(
item['premium_amount']?.toString() ?? '-',
style: _dataBold,
@ -3399,8 +3438,8 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
// Payment Mode
DataCell(
SizedBox(
width: 80,
child: Text(item['payment_mode'] ?? '-', style: _dataBold),
width: 100,
child: Text(item['payment_mode_value'] ?? '-', style: _dataBold),
),
),
@ -3453,15 +3492,21 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
border: Border.all(color: borderColor),
borderRadius: BorderRadius.circular(5),
),
child: Text(
item['status'] ?? '-',
style: GoogleFonts.inter(
fontSize: 11,
color: Color(0XFF1e293b),
// color: statusTextColors[status] ?? Colors.black,
fontWeight: FontWeight.w500,
),
// overflow: TextOverflow.clip, //
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
item['status'] ?? '-',
style: GoogleFonts.inter(
fontSize: 11,
color: Color(0XFF1e293b),
// color: statusTextColors[status] ?? Colors.black,
fontWeight: FontWeight.w500,
),
// overflow: TextOverflow.clip, //
),
],
),
),
),
@ -3507,11 +3552,11 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
// _buildHeaderCell('Broker *', 100),
_buildHeaderCell('Insurer *', 90),
_buildHeaderCell('Insured Name *', 120),
_buildHeaderCell('Vehicle No *', 100),
_buildHeaderCell('Vehicle No *', 110),
_buildHeaderCell('Action', 60),
// _buildHeaderCell('Assigned Date', 100),
_buildHeaderCell('Premium', 100),
_buildHeaderCell('Payment Mode', 100),
_buildHeaderCell('Payment Mode', 120),
_buildHeaderCell('Policy Number', 120),
_buildHeaderCell('Status', 100),
],
@ -3526,8 +3571,8 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
width: width,
child: Text(
label,
style: GoogleFonts.inter(
fontSize: 12,
style: GoogleFonts.poppins(
fontSize: 11,
fontWeight: FontWeight.w500,
color: Color(0xFF1E293B),
// color: Colors.black87,
@ -3537,6 +3582,44 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
);
}
Widget _row(String label, String value) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 2),
child: Row(
mainAxisSize: MainAxisSize.min,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(
width: 70,
child: Text(
"$label ",
style: GoogleFonts.poppins(
color: Colors.black,
fontSize: 10,
fontWeight: FontWeight.w500,
),
),
),
SizedBox(
width: 180,
child: Text(
value ?? '-',
softWrap: true,
maxLines: 5,
style: GoogleFonts.poppins(
color: Colors.black,
fontSize: 10,
fontWeight: FontWeight.w400,
),
),
),
],
),
);
}
static final _dataBold = GoogleFonts.inter(
fontSize: 11,

View File

@ -95,7 +95,10 @@ class RaiseEnqFormState extends ConsumerState<RaiseEnqForm> {
print('checking agent id $selectedAgent');
final data = {
"agent_id": ((roleId == 'handler') || (roleId == 'manager'))
"agent_id":
((roleId == 'handler') ||
(roleId == 'manager') ||
(roleId == 'staff'))
? selectedAgent
: userId,
"name": controllers["name"]?.text,

View File

@ -226,7 +226,8 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
selectedBroker = widget.selectedQuotationFrmListdata!['broker_id']
?.toString();
selectedPaymentMode = widget.selectedQuotationFrmListdata!['broker_id']
selectedPaymentMode = widget
.selectedQuotationFrmListdata!['payment_mode_id']
?.toString();
// controllers["insurer"]?.text = 'LIC';

View File

@ -130,6 +130,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
dynamic roleId;
dynamic enqBrokerName;
dynamic selectedPaymentMode;
List<Map<String, dynamic>> getVehicleTypeData = [];
List<Map<String, dynamic>> filteredVechicleData = [];
@ -435,7 +436,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
policyData['policy_number']?.toString() ?? '';
controllers["policyPaymentMode"]?.text =
policyData['payment_mode']?.toString() ?? '';
selectedPaymentMode = policyData['payment_mode_value']?.toString() ?? '';
controllers["issueDate"]?.text = fixInvalidDate(
policyData['issued_date'],
);
@ -509,7 +510,8 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
controllers["policyNumber"]?.text =
policyData['policy_number']?.toString() ?? '';
controllers["policyPaymentMode"]?.text =
policyData['payment_mode']?.toString() ?? '';
policyData['payment_mode_value']?.toString() ?? '';
selectedPaymentMode = policyData['payment_mode_value']?.toString() ?? '';
controllers["issueDate"]?.text =
_formatDate(policyData['issued_date']!.toString()) ?? '';
@ -1606,7 +1608,8 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
SizedBox(
width: MediaQuery.of(context).size.width * 0.075,
child: Text(
controllers['policyPaymentMode']?.text ?? 'Online',
selectedPaymentMode,
// controllers['policyPaymentMode']!.text,
style: GoogleFonts.inter(fontSize: 12),
),
),

View File

@ -227,7 +227,8 @@ class TabEnquiryStaffListState extends ConsumerState<TabEnquiryStaffList> {
horizontal: 16,
),
decoration: BoxDecoration(
color: Color(0xffEDF6F5),
// color: Color(0xffEDF6F5),
color: Color(0xFFF6FBFA),
// color: Color(0xFFE0F7F9),
border: const Border(
bottom: BorderSide(color: Color(0xFFEAEAEA), width: 1),
@ -352,7 +353,7 @@ class TabEnquiryStaffListState extends ConsumerState<TabEnquiryStaffList> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('AgentName', style: _textStyle),
Text('Agent Name', style: _textStyle),
SizedBox(height: 10),
Text(selectedAgentName ?? '', style: _textDataStyle),
],
@ -408,11 +409,11 @@ class TabEnquiryStaffListState extends ConsumerState<TabEnquiryStaffList> {
static final _textStyle = GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w400,
);
static final _textDataStyle = GoogleFonts.inter(
static final _textDataStyle = GoogleFonts.poppins(
fontSize: 12,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w500,
);
static final _headertextStyle = GoogleFonts.inter(

View File

@ -380,35 +380,35 @@ class policylistState extends ConsumerState<policylist> {
width: MediaQuery.of(context).size.width,
child: GestureDetector(
onTap: () {
context.go(AppRoutes.dashboard);
// context.go(AppRoutes.dashboard);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Tooltip(
message: 'Back',
child: IconButton(
icon: const Icon(
Icons.arrow_left_sharp,
size: 25,
color: Color(0xFF425B5B),
),
onPressed: () {
context.go(AppRoutes.dashboard);
},
splashRadius: 18,
hoverColor: Colors.black12,
padding: const EdgeInsets.all(4),
constraints: const BoxConstraints(),
),
),
const SizedBox(width: 5), // spacing between icon and text
// Tooltip(
// message: 'Back',
// child: IconButton(
// icon: const Icon(
// Icons.arrow_left_sharp,
// size: 18,
// color: Color(0xFF425B5B),
// ),
// onPressed: () {
// context.go(AppRoutes.dashboard);
// },
// splashRadius: 18,
// hoverColor: Colors.black12,
// padding: const EdgeInsets.all(4),
// constraints: const BoxConstraints(),
// ),
// ),
// const SizedBox(width: 5), // spacing between icon and text
Text(
"Policy",
style: GoogleFonts.inter(
fontSize: 18,
fontWeight: FontWeight.w600,
style: GoogleFonts.poppins(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
],
@ -577,12 +577,14 @@ class policylistState extends ConsumerState<policylist> {
: SizedBox.shrink(),
ThemedSearchField(
hintText: 'Search',
backgroundColor: Color(0xFFF6F8F8),
// backgroundColor: Color(0xFFF6F8F8),
backgroundColor: Color(0xFFFFFFFF),
txtHeight: 30,
onChanged: filterData,
controller: _searchStaffController,
txtwidth: ResponsiveLayout.isMobile(context)
? MediaQuery.of(context).size.width * 0.7
: MediaQuery.of(context).size.width * 0.2,
: MediaQuery.of(context).size.width * 0.15,
),
ResponsiveLayout.isMobile(context)
? Spacer()
@ -593,9 +595,10 @@ class policylistState extends ConsumerState<policylist> {
data: filteredData,
txt: !ResponsiveLayout.isMobile(context) ? true : false,
displayHeaders: [
"Received Date & Time",
"Partner",
// "Received Date & Time",
"Assigned To",
"Partner",
"Insurer",
"Vehicle.No.",
"Insured Name",
@ -604,9 +607,9 @@ class policylistState extends ConsumerState<policylist> {
"Policy Number",
],
keys: [
"updated_on",
"agent_name",
// "updated_on",
"assigned_to_name",
"agent_name",
"insurer_name",
"reg_no",
"insured_name",
@ -661,22 +664,23 @@ class policylistState extends ConsumerState<policylist> {
if (!ResponsiveLayout.isMobile(context))
Container(
decoration: BoxDecoration(
color: Color(0xFFEDF6F5),
color: Color(0xFFF1F5F9),
// color: Color(0xFFEDF6F5),
borderRadius: BorderRadius.circular(6),
),
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Row(
children: [
Expanded(
flex: 2,
child: Text('Recieved Date', style: _headerStyle),
),
Expanded(flex: 2, child: Text('Partner', style: _headerStyle)),
// Expanded(
// flex: 2,
// child: Text('Recieved Date', style: _headerStyle),
// ),
Expanded(
flex: 2,
child: Text('Assigned To', style: _headerStyle),
),
Expanded(flex: 2, child: Text('Partner', style: _headerStyle)),
Expanded(flex: 4, child: Text('Insurer', style: _headerStyle)),
Expanded(
@ -800,23 +804,24 @@ class policylistState extends ConsumerState<policylist> {
),
child: Row(
children: [
// Expanded(
// flex: 2,
// child: Text(
// _formatDate(item['updated_on']) ?? '-',
// style: _dataBold,
// softWrap: true,
// maxLines: 3,
// ),
// ),
Expanded(
flex: 2,
child: Text(
_formatDate(item['updated_on']) ?? '-',
style: _dataBold,
softWrap: true,
maxLines: 3,
),
child: Text(item['assigned_to_name'] ?? '-', style: _dataBold),
),
Expanded(
flex: 2,
child: Text(item['agent_name'] ?? '-', style: _dataBold),
),
Expanded(
flex: 2,
child: Text(item['assigned_to_name'] ?? '-', style: _dataBold),
),
Expanded(
flex: 4,
child: Text(
@ -871,14 +876,14 @@ class policylistState extends ConsumerState<policylist> {
child: Tooltip(
message: 'Download',
// color: Colors.white,
child:
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.end,
children: [
InkWell(
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
onTap: () => apiService.downloadFile(
apiUrl: 'api/policy/downloadPolicyFile?policy_id=$policyId&file_type=policy_pdf',
apiUrl:
'api/policy/downloadPolicyFile?policy_id=$policyId&file_type=policy_pdf',
apiId: policyId,
localFile: null,
fileName: fileName,
@ -887,16 +892,17 @@ class policylistState extends ConsumerState<policylist> {
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 5,
vertical: 8,
vertical: 6,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: Color(0xFF425B5B),
// color: Color(0xFF425B5B),
color: const Color(0xFF2E7D6E),
// color: Colors.green.shade300,
),
child: Row(
children: const [
Icon(Icons.download, size: 13, color: Colors.white),
Icon(Icons.download, size: 12, color: Colors.white),
],
),
),
@ -1097,7 +1103,7 @@ class policylistState extends ConsumerState<policylist> {
}
static final _dataBold = GoogleFonts.inter(
fontSize: 14,
fontSize: 11.5,
fontWeight: FontWeight.w400,
color: Color(0xFF000000),
@ -1109,9 +1115,10 @@ class policylistState extends ConsumerState<policylist> {
color: Color(0xFF585757),
);
static final _headerStyle = GoogleFonts.inter(
color: Colors.black,
fontWeight: FontWeight.bold,
static final _headerStyle = GoogleFonts.poppins(
fontSize: 11.2,
fontWeight: FontWeight.w500,
color: Color(0xFF1E293B),
);
static final _cardheaderStyle = GoogleFonts.inter(
color: Colors.black,

View File

@ -72,7 +72,7 @@ class ExportBtn extends HookWidget {
// );
// },
child: Container(
padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(7.0),
decoration: BoxDecoration(
color: const Color(0xFF2E7D6E),
// color: const Color(0xFF425B5B),
@ -94,8 +94,8 @@ class ExportBtn extends HookWidget {
// ?txt! ? SizedBox(width: 15) : null,
Image.asset(
"assets/miscellaneous/export.png",
height: 25,
width: 25,
height: 13,
width: 13,
),
// Icon(Icons.input_sharp, color: Colors.white),
// Image.asset("assets/miscellaneous/export", height: 15, width: 15),

View File

@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:intl/intl.dart';
import 'package:month_picker_dialog/month_picker_dialog.dart';
@ -11,6 +12,7 @@ class ThemedMonthField extends StatefulWidget {
this.txtheight,
this.backgroundColor,
this.borderColor,
this.highlightColor,
this.errorBorderColor,
this.onDateSelected,
this.controller,
@ -23,6 +25,7 @@ class ThemedMonthField extends StatefulWidget {
final Color? backgroundColor;
final Color? borderColor;
final Color? errorBorderColor;
final Color? highlightColor;
final TextEditingController? controller;
final Function(DateTime)? onDateSelected;
final String? Function(String? value)? validator; // new
@ -70,15 +73,16 @@ class _ThemedMonthFieldState extends State<ThemedMonthField> {
onTap: () => pickDate(context, field),
borderRadius: BorderRadius.circular(10),
child: Container(
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
padding: const EdgeInsets.symmetric(vertical: 1, horizontal: 15),
decoration: BoxDecoration(
color: widget.backgroundColor ?? Colors.white,
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: hasError
? (widget.errorBorderColor ?? Colors.red)
: (widget.borderColor ?? Colors.grey.shade50),
width: 1.5,
width: 1,
),
),
child: Row(
@ -89,8 +93,8 @@ class _ThemedMonthFieldState extends State<ThemedMonthField> {
widget.controller?.text.isNotEmpty == true
? widget.controller!.text
: widget.hintText ?? "Select Date",
style: TextStyle(
fontSize: 12,
style: GoogleFonts.inter(
fontSize: 11,
color: hasError ? Colors.red : Colors.black,
),
overflow: TextOverflow.ellipsis,
@ -98,7 +102,7 @@ class _ThemedMonthFieldState extends State<ThemedMonthField> {
),
const Icon(
Icons.calendar_today,
size: 16,
size: 12,
color: Colors.black,
),
],

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:intl/intl.dart';
import '../themes/indicators/month_field_theme.dart';
@ -29,7 +30,11 @@ class MonthFilterRow extends StatelessWidget {
Tooltip(
message: 'Filter',
child: IconButton(
icon: const Icon(Icons.filter_alt_outlined),
icon: const Icon(
Icons.filter_alt_outlined,
color: const Color(0xFF94A3B8),
size: 18,
),
onPressed: () {
if (formKey.currentState!.validate()) onFilter();
},
@ -38,7 +43,12 @@ class MonthFilterRow extends StatelessWidget {
Tooltip(
message: 'Refresh',
child: IconButton(
icon: const Icon(Icons.refresh),
splashRadius: 2,
icon: const Icon(
Icons.refresh,
color: const Color(0xFF94A3B8),
size: 18,
),
onPressed: onRefresh,
),
),
@ -58,7 +68,10 @@ class MonthFilterRow extends StatelessWidget {
Tooltip(
message: 'Filter',
child: IconButton(
icon: const Icon(Icons.filter_alt_outlined),
icon: const Icon(
Icons.filter_alt_outlined,
color: Color(0xFFF6F8F8),
),
onPressed: () {
if (formKey.currentState!.validate()) onFilter();
},
@ -67,7 +80,10 @@ class MonthFilterRow extends StatelessWidget {
Tooltip(
message: 'Refresh',
child: IconButton(
icon: const Icon(Icons.refresh),
icon: const Icon(
Icons.refresh,
color: Color(0xFFF6F8F8),
),
onPressed: onRefresh,
),
),
@ -86,7 +102,7 @@ class MonthFilterRow extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text('Month', style: _textStyle),
Text('Month', style: _textStyle),
const SizedBox(height: 5),
ThemedMonthField(
hintText: "Select Month",
@ -106,7 +122,7 @@ class MonthFilterRow extends StatelessWidget {
);
}
static const _textStyle = TextStyle(
static final _textStyle = GoogleFonts.poppins(
fontSize: 12,
fontWeight: FontWeight.w600,
);

View File

@ -700,26 +700,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
url: "https://pub.dev"
source: hosted
version: "11.0.2"
version: "10.0.9"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev"
source: hosted
version: "3.0.10"
version: "3.0.9"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "3.0.1"
lints:
dependency: transitive
description:
@ -1225,10 +1225,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
url: "https://pub.dev"
source: hosted
version: "0.7.6"
version: "0.7.4"
toastification:
dependency: "direct main"
description:
@ -1345,10 +1345,10 @@ packages:
dependency: transitive
description:
name: vector_math
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.1.4"
vm_service:
dependency: transitive
description: