FIX_repoens fixes

This commit is contained in:
sanjeev.p 2026-01-08 16:01:06 +05:30
parent 6e4e36fcb1
commit bd7d6a4eca
63 changed files with 255 additions and 126 deletions

File diff suppressed because one or more lines are too long

View File

@ -1830,6 +1830,7 @@ class ApiService {
Future<Map<String, dynamic>> getCommissionRateList(data) async {
print("getCommissionRateList------- $data}");
final url = Uri.parse('${Env.apiUrl}/invoice/commission-rate-list');
// final url = Uri.parse( 'http://localhost/nhance_partner_be/invoice/commission-rate-list');
print("getCommissionRateList 1");
// final token = await getToken(); // Fetch token

View File

@ -581,7 +581,8 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
@override
Widget build(BuildContext context) {
bool isMobile = ResponsiveLayout.isMobile(context);
return Container(
return SelectionArea(
child: Container(
// color: Colors.green,
decoration: BoxDecoration(
color: Color(0xffEDF6F5),
@ -628,7 +629,7 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
SizedBox(height: 30),
],
),
);
) );
}
Widget buildFormFields(BuildContext context) {

View File

@ -566,7 +566,8 @@ class _AddDialogState extends State<AddDialog> {
@override
Widget build(BuildContext context) {
return AlertDialog(
return SelectionArea(
child: AlertDialog(
backgroundColor: Colors.white,
content: Column(
mainAxisSize: MainAxisSize.min,
@ -778,7 +779,7 @@ class _AddDialogState extends State<AddDialog> {
),
),
],
);
) );
}
// 🔹 Example: Claims widget

View File

@ -171,7 +171,8 @@ class PolicyTabState extends ConsumerState<PolicyTab> {
final isMobile = ResponsiveLayout.isMobile(context);
return isLoading
? CircularProgressIndicator()
: Container(
: SelectionArea(
child: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: filteredData.isNotEmpty
@ -429,7 +430,7 @@ class PolicyTabState extends ConsumerState<PolicyTab> {
),
)
: Center(child: Text('No Available Data')),
);
) );
}
Widget buildDocPolicy(BuildContext context, bool isMobile) {

View File

@ -441,7 +441,8 @@ class QuotationTabState extends ConsumerState<QuotationTab> {
@override
Widget build(BuildContext context) {
bool isMobile = ResponsiveLayout.isMobile(context);
return Container(
return SelectionArea(
child: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: filteredData.isNotEmpty
@ -543,7 +544,7 @@ class QuotationTabState extends ConsumerState<QuotationTab> {
),
)
: Center(child: Text('No Available Data')),
);
) );
}
Widget _buildDataTable(BuildContext context) {

View File

@ -216,6 +216,7 @@ class TabEnquiryListState extends ConsumerState<TabEnquiryList> {
title: "Enquiry",
body: SafeArea(
child: SelectionArea(
child: isLoading
? const Center(child: CircularProgressIndicator())
: isMobile
@ -271,6 +272,7 @@ class TabEnquiryListState extends ConsumerState<TabEnquiryList> {
)
: _buildDesktopTabs(),
),
),
);
}

View File

@ -244,7 +244,8 @@ class _UpdateEndorsementDialogState extends State<UpdateEndorsementDialog> {
@override
Widget build(BuildContext context) {
return AlertDialog(
return SelectionArea(
child: AlertDialog(
backgroundColor: Colors.white,
// Add shape for a cleaner look
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
@ -308,7 +309,7 @@ class _UpdateEndorsementDialogState extends State<UpdateEndorsementDialog> {
),
),
],
);
) );
}
Widget endorsement(BuildContext context) {

View File

@ -353,7 +353,8 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
Widget build(BuildContext context) {
return MainLayout(
title: "Enquiry",
body: Container(
body: SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
child: Column(
@ -451,7 +452,7 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
],
),
),
);
));
}
Widget _buildContent(BuildContext context) {

View File

@ -183,7 +183,8 @@ class claimListState extends ConsumerState<claimList> {
Widget build(BuildContext context) {
return MainLayout(
title: "claims",
body: Container(
body: SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
child: Column(
@ -471,7 +472,7 @@ class claimListState extends ConsumerState<claimList> {
),
],
),
),
) ),
);
}

View File

@ -255,7 +255,8 @@ class endosementState extends ConsumerState<endosement> {
Widget build(BuildContext context) {
return MainLayout(
title: "Endorsement",
body: Container(
body: SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
child: Column(
@ -573,7 +574,7 @@ class endosementState extends ConsumerState<endosement> {
),
],
),
),
), ),
);
}

View File

@ -128,7 +128,8 @@ class ClaimsSubListState extends ConsumerState<ClaimsSubList> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width * 0.6,
child: Column(
@ -186,7 +187,7 @@ class ClaimsSubListState extends ConsumerState<ClaimsSubList> {
),
],
),
);
), );
}
Widget _buildDataTable1(BuildContext context) {

View File

@ -142,7 +142,8 @@ class EndrosmentSubListState extends ConsumerState<EndrosmentSubList> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width * 0.6,
child: Column(
@ -205,7 +206,7 @@ class EndrosmentSubListState extends ConsumerState<EndrosmentSubList> {
),
],
),
);
) );
}
Widget _buildDataTable1(BuildContext context) {

View File

@ -307,7 +307,8 @@ class BrokerState extends ConsumerState<Broker> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
@ -347,7 +348,7 @@ class BrokerState extends ConsumerState<Broker> {
),
],
),
);
) );
}
Widget buildFormFields() {

View File

@ -197,7 +197,8 @@ class BrokerListState extends ConsumerState<BrokerList> {
return MainLayout(
title: "Broker",
body: Container(
body: SelectionArea(
child: Container(
// padding: EdgeInsets.all(8.0),
// margin: EdgeInsets.all(10.0),
@ -365,7 +366,7 @@ class BrokerListState extends ConsumerState<BrokerList> {
),
],
),
),
), )
);
}

View File

@ -164,7 +164,8 @@ class EndorsementTypeListState extends ConsumerState<EndorsementTypeList> {
return MainLayout(
title: "Endorsement Type",
body: Container(
body: SelectionArea(
child: Container(
// padding: EdgeInsets.all(8.0),
// margin: EdgeInsets.all(10.0),
@ -326,7 +327,7 @@ class EndorsementTypeListState extends ConsumerState<EndorsementTypeList> {
),
],
),
),
), ),
);
}

View File

@ -260,7 +260,8 @@ class EndorsementTypeState extends ConsumerState<EndorsementType> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
@ -300,7 +301,7 @@ class EndorsementTypeState extends ConsumerState<EndorsementType> {
),
],
),
);
) );
}
Widget buildFormFields() {

View File

@ -245,7 +245,8 @@ class PaymentState extends ConsumerState<Payment> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
@ -285,7 +286,7 @@ class PaymentState extends ConsumerState<Payment> {
),
],
),
);
) );
}
Widget buildFormFields() {

View File

@ -164,7 +164,8 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
return MainLayout(
title: "Staff",
body: Container(
body: SelectionArea(
child: Container(
// padding: EdgeInsets.all(8.0),
// margin: EdgeInsets.all(10.0),
@ -344,7 +345,7 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
),
],
),
),
) ),
);
}

View File

@ -164,7 +164,8 @@ class VehicleTypeListState extends ConsumerState<VehicleTypeList> {
return MainLayout(
title: "Vehicle Type",
body: Container(
body: SelectionArea(
child: Container(
// padding: EdgeInsets.all(8.0),
// margin: EdgeInsets.all(10.0),
@ -326,7 +327,7 @@ class VehicleTypeListState extends ConsumerState<VehicleTypeList> {
),
],
),
),
) ),
);
}

View File

@ -260,7 +260,8 @@ class VehicleTypeState extends ConsumerState<VehicleType> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
@ -300,7 +301,7 @@ class VehicleTypeState extends ConsumerState<VehicleType> {
),
],
),
);
) );
}
Widget buildFormFields() {

View File

@ -277,7 +277,8 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
Widget build(BuildContext context) {
return MainLayout(
title: "Staff Attendance",
body: Container(
body: SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
child: Column(
@ -359,7 +360,7 @@ class AttendanceAllDetailsState extends ConsumerState<AttendanceAllDetails> {
),
],
),
),
), ),
);
}

View File

@ -282,7 +282,8 @@ class IndividualAttendanceDetailsState
Widget build(BuildContext context) {
return MainLayout(
title: "Staff Attendance",
body: Container(
body: SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
child: Column(
@ -367,7 +368,7 @@ class IndividualAttendanceDetailsState
),
],
),
),
),),
);
}

View File

@ -420,7 +420,8 @@ class AgentState extends ConsumerState<Agent> {
Widget build(BuildContext context) {
// managerId = ref.watch(managerIdProvider);
// userId = ref.watch(userProvider);
return AlertDialog(
return SelectionArea(
child: AlertDialog(
backgroundColor: Colors.white,
content: Container(
// color: Colors.yellow.shade50,
@ -542,7 +543,7 @@ class AgentState extends ConsumerState<Agent> {
],
),
),
);
),);
}
Widget buildFormFields() {

View File

@ -371,7 +371,8 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
@override
Widget build(BuildContext context) {
return AlertDialog(
return SelectionArea(
child:AlertDialog(
backgroundColor: Colors.white,
content: Container(
width: MediaQuery.of(context).size.width * 0.55,
@ -782,7 +783,7 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
],
),
),
);
),);
}
}

View File

@ -193,7 +193,8 @@ class AgentListState extends ConsumerState<AgentList> {
managerId = ref.watch(managerIdProvider);
return MainLayout(
title: "Partner",
body: Container(
body: SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
child: Column(
@ -480,7 +481,7 @@ class AgentListState extends ConsumerState<AgentList> {
),
],
),
),
),),
);
}

View File

@ -194,7 +194,8 @@ class PosListState extends ConsumerState<PosList> {
return MainLayout(
title: "Pos",
body: Container(
body: SelectionArea(
child: Container(
width: MediaQuery.of(context).size.width,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -385,7 +386,7 @@ class PosListState extends ConsumerState<PosList> {
),
],
),
),
),)
);
}

View File

@ -161,7 +161,8 @@ class ProfilePopUpState extends ConsumerState<ProfilePopUp> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child:Container(
padding: const EdgeInsets.all(6),
width: 450,
color: Colors.white,
@ -416,7 +417,7 @@ class ProfilePopUpState extends ConsumerState<ProfilePopUp> {
),
],
),
);
));
}
bool hasValidValue(dynamic value) {

View File

@ -313,7 +313,8 @@ class SalesExecutiveState extends ConsumerState<SalesExecutive> {
@override
Widget build(BuildContext context) {
return AlertDialog(
return SelectionArea(
child: AlertDialog(
backgroundColor: Colors.white,
content: Container(
// color: Colors.yellow.shade50,
@ -434,7 +435,7 @@ class SalesExecutiveState extends ConsumerState<SalesExecutive> {
],
),
),
);
),);
}
Widget buildFormFields() {

View File

@ -156,7 +156,8 @@ class SalesExecutiveListState extends ConsumerState<SalesExecutiveList> {
Widget build(BuildContext context) {
managerId = ref.watch(managerIdProvider);
return MainLayout(
return SelectionArea(
child:MainLayout(
title: "Sales Executive",
body: Container(
// padding: EdgeInsets.all(8.0),
@ -339,7 +340,7 @@ class SalesExecutiveListState extends ConsumerState<SalesExecutiveList> {
],
),
),
);
),);
}
Widget _buildDataTable(BuildContext context) {

View File

@ -344,7 +344,8 @@ class StaffState extends ConsumerState<Staff> {
@override
Widget build(BuildContext context) {
return AlertDialog(
return SelectionArea(
child:AlertDialog(
backgroundColor: Colors.white,
content: Container(
// color: Colors.yellow.shade50,
@ -465,7 +466,7 @@ class StaffState extends ConsumerState<Staff> {
],
),
),
);
),);
}
Widget buildFormFields() {

View File

@ -217,7 +217,8 @@ class StaffListState extends ConsumerState<StaffList> {
return MainLayout(
title: "Staff",
body: Container(
body: SelectionArea(
child:Container(
// padding: EdgeInsets.all(8.0),
// margin: EdgeInsets.all(10.0),
@ -401,7 +402,7 @@ class StaffListState extends ConsumerState<StaffList> {
),
],
),
),
),)
);
}

View File

@ -529,7 +529,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
),
),
)
: Container(
: SelectionArea( child : Container(
height: MediaQuery.of(context).size.height * 0.8,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
@ -775,7 +775,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
],
),
),
),
) ),
);
}

View File

@ -71,9 +71,9 @@ class _DashboardState extends ConsumerState<Dashboard>
Widget build(BuildContext context) {
return MainLayout(
title: "Dashboard",
body: SafeArea(
child: Container(
child: SelectionArea(
child:Container(
// color: Colors.amber.shade100,
child: Column(
children: [
@ -145,6 +145,6 @@ class _DashboardState extends ConsumerState<Dashboard>
),
),
),
);
));
}
}

View File

@ -529,7 +529,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
),
),
)
: Container(
: SelectionArea( child : Container(
height: MediaQuery.of(context).size.height * 0.8,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
@ -775,7 +775,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
],
),
),
),
), ),
);
}

View File

@ -422,7 +422,8 @@ class _BussinessDashboardState extends ConsumerState<BussinessDashboard> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child: Container(
margin: EdgeInsets.only(left: 10, right: 10, bottom: 10),
// color: Colors.amber.shade100,
child: Column(
@ -575,7 +576,7 @@ class _BussinessDashboardState extends ConsumerState<BussinessDashboard> {
// ],
],
),
);
) );
}
Widget insurerContainer() {

View File

@ -46,7 +46,8 @@ class _BarChartSample7State extends State<BarChartSample7> {
@override
Widget build(BuildContext context) {
return Padding(
return SelectionArea(
child: Padding(
padding: const EdgeInsets.all(24),
child: Column(
children: [
@ -183,7 +184,7 @@ class _BarChartSample7State extends State<BarChartSample7> {
),
],
),
);
) );
}
}

View File

@ -2101,7 +2101,8 @@ class UnassignedEnq extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Card(
return SelectionArea(
child: Card(
color: Colors.white,
// color: const Color(0xFFEAF6F4),
elevation: 1,
@ -2308,7 +2309,7 @@ class UnassignedEnq extends StatelessWidget {
],
),
),
);
) );
}
}

View File

@ -384,7 +384,8 @@ class _PartnerDashboardState extends ConsumerState<PartnerDashboard> {
final userId = ref.watch(userIdProvider);
final role = ref.watch(userRoleProvider);
return Column(
return SelectionArea(
child: Column(
children: [
Container(
margin: EdgeInsets.all(0),
@ -674,7 +675,7 @@ class _PartnerDashboardState extends ConsumerState<PartnerDashboard> {
),
),
],
);
) );
}
Widget actionIcon({

View File

@ -282,7 +282,8 @@ class _ProductivityDashboardState extends ConsumerState<ProductivityDashboard> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child: Container(
margin: EdgeInsets.only(left: 10, right: 10, bottom: 10),
// color: Colors.amber.shade100,
child: Column(
@ -346,6 +347,7 @@ class _ProductivityDashboardState extends ConsumerState<ProductivityDashboard> {
),
],
),
)
);
}

View File

@ -46,7 +46,8 @@ class BarChartSample4State extends State<BarChartSample4> {
@override
Widget build(BuildContext context) {
return AspectRatio(
return SelectionArea(
child: AspectRatio(
aspectRatio: 1.66,
child: Padding(
padding: const EdgeInsets.only(top: 16),
@ -100,7 +101,7 @@ class BarChartSample4State extends State<BarChartSample4> {
},
),
),
);
) );
}
List<BarChartGroupData> getData(double barsWidth) {

View File

@ -1940,7 +1940,8 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
Widget build(BuildContext context) {
return MainLayout(
title: "Enquiries",
body: Container(
body: SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(3.0),
@ -2035,7 +2036,7 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
),
],
),
),
), ),
);
}

View File

@ -571,7 +571,8 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListInline> {
Widget build(BuildContext context) {
return MainLayout(
title: "Enquiries",
body: Container(
body: SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
child: Column(
@ -672,7 +673,7 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListInline> {
),
],
),
),
),),
);
}

View File

@ -220,7 +220,8 @@ class _InvoiceListState extends ConsumerState<InvoiceList> {
Widget build(BuildContext context) {
return MainLayout(
title: "Pay Out",
body: Container(
body: SelectionArea(
child: Container(
// height: 30,
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
@ -303,7 +304,7 @@ class _InvoiceListState extends ConsumerState<InvoiceList> {
),
],
),
),
) ,) ,
);
}

View File

@ -390,7 +390,8 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
return MainLayout(
title: "Pay Out",
body: Stack(
body: SelectionArea(
child: Stack(
children: [
SingleChildScrollView(
padding: const EdgeInsets.all(16),
@ -1020,7 +1021,7 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
),
),
],
),
), ),
);
}

View File

@ -1292,7 +1292,13 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
_cell(p["policy_no"], colPolicy),
// _cell(p["issued_date"] ?? "-", colDate),
_cell(_formatDate(p['issued_date']), colDate),
_cell(p["agent_name"] ?? "-", colAgent),
// _cell(p["agent_name"] ?? "-", colAgent),
_cell(
(p["agent_code"] != null && p["agent_name"] != null)
? '${p["agent_code"]} - ${p["agent_name"]}'
: (p["agent_name"] ?? '-'),
colAgent,
),
_cell(p["customer_name"], colCustomer),
_cell("${p["premium_amount"]}", colPremium),
SizedBox(

View File

@ -669,6 +669,7 @@ class CreateProposal_QuickFormState
final String apiUrldata;
apiUrldata = '${Env.apiUrl}quotation/acceptOrRejectQuotation';
// final token = await getToken(); // Fetch token
print('handleProceed -2 ');
if (_token == null) {
@ -736,7 +737,8 @@ class CreateProposal_QuickFormState
@override
Widget build(BuildContext context) {
return FocusTraversalGroup(
return SelectionArea(
child: FocusTraversalGroup(
child: Column(
children: [
Container(
@ -1104,7 +1106,13 @@ class CreateProposal_QuickFormState
return DataRow(
cells: [
DataCell(
Text(item["agent_name"] ?? "-", style: _tableDataStyle),
// Text(item["agent_name"] ?? "-", style: _tableDataStyle),
Text(
(item['agent_code'] != null && item['agent_name'] != null)
? '${item['agent_code']} - ${item['agent_name']}'
: (item['agent_name'] ?? '-'),
style: _tableDataStyle,
),
),
DataCell(
Text(item["reg_no"] ?? "-", style: _tableDataStyle),
@ -1150,7 +1158,7 @@ class CreateProposal_QuickFormState
),
],
),
);
),);
}
Widget buildIdv(BuildContext context) {

View File

@ -324,7 +324,7 @@ class _SubRowWidgetState extends ConsumerState<SubRowWidget> {
// setState(() {
// getVehicleTypeData = List<Map<String, dynamic>>.from(
// response['data'],
// );
// ).where((item) => item['is_active'] == 1).toList();
// // print('EIL 3getVT-B4filterData : $getVehicleTypeData');
//
// filteredVehicleData = List.from(getVehicleTypeData);

View File

@ -540,6 +540,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
setState(() {
_resetKeyEnable = true;
});
_searchStaffController.clear();
print('refrshfilterDateRange');
// setState(() async {
final prefs = await SharedPreferences.getInstance();
@ -649,13 +650,12 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
if (response['status'] == 200) {
print('EIL 2getVT-Data - ${response['data']}');
setState(() {
getVehicleTypeData = List<Map<String, dynamic>>.from(
response['data'],
);
// print('EIL 3getVT-B4filterData : $getVehicleTypeData');
// getVehicleTypeData = List<Map<String, dynamic>>.from(response['data']);
getVehicleTypeData = List<Map<String, dynamic>>.from(response['data']).where((item) => item['is_active']?.toString() == '1').toList();
print('EIL 3getVT-B4filterData : $getVehicleTypeData');
filteredVehicleData = List.from(getVehicleTypeData);
// print('EIL 3getVT-AftfilterData : $filteredVehicleData');
print('EIL 3getVT-AftfilterData : $filteredVehicleData');
});
} else {
getVehicleTypeData = [];
@ -875,6 +875,52 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
}
void _applyFilter(String query) {
setState(() {
final List<dynamic> source =
(selectedIndex == 0) ? inProgressData : completedData;
final String q = query.trim().toLowerCase();
completedCurrentPage = 1;
// Reset filter
if (q.length < 2) {
filteredData = List<Map<String, dynamic>>.from(source);
return;
}
final List<Map<String, dynamic>> results = source.where((item) {
final map = item as Map<String, dynamic>;
final String regNo = safeString(map['reg_no']).toLowerCase().trim();
final String agentName = safeString(map['agent_name']).toLowerCase().trim();
if (q == 'new') { return regNo == 'new' || agentName == 'new'; }
// All searchable fields
final values = [
regNo,
agentName,
_s(map['agent_code']),
_s(map['assigned_to_name']),
_s(map['insured_name']),
_s(map['insurer_short_name']),
_s(map['broker_name']),
_s(map['payment_mode_value']),
_s(map['vehicle_type']),
_s(map['enquiry_status']),
_s(map['insurance_plan_type']),
_s(map['status']),
_s(_formatDate(map['created_on'])),
_s(_formatDate(map['updated_on'])),
];
return values.any((v) => v.contains(q));
}).cast<Map<String, dynamic>>().toList();
filteredData = results;
});
}
String _s(dynamic v) => (v ?? '').toString().toLowerCase().trim();
void _applyFilter_06012026(String query) {
setState(() {
final List<dynamic> source = (selectedIndex == 0)
? inProgressData
@ -1694,7 +1740,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
Widget build(BuildContext context) {
return MainLayout(
title: "Enquiries",
body: Container(
body: SelectionArea( child: Container(
width: MediaQuery
.of(context)
.size
@ -1775,7 +1821,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
),
],
),
),
), )
);
}
@ -2033,19 +2079,22 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
displayHeaders: [
"Received Date & Time",
"Assigned To",
"Partner",
"Partner Code",
"Partner Name",
"Insurer",
"Insured Name",
"Vehicle.No.",
"Assigned Date & Time",
"Premium",
"Payment Mode",
"Vehicle Type",
"Policy Number",
"Status",
],
keys: [
"created_on",
"assigned_to_name",
"agent_code",
"agent_name",
"insurer_short_name",
"insured_name",
@ -2053,6 +2102,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
"updated_on",
"premium_amount",
"payment_mode_value",
"vehicle_type",
"policy_number",
"status",
],

View File

@ -596,7 +596,8 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
Widget build(BuildContext context) {
return MainLayout(
title: "Enquiries",
body: Container(
body: SelectionArea(
child: Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
child: Column(
@ -693,7 +694,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
),
],
),
),
), ),
);
}

View File

@ -191,7 +191,8 @@ class MultipleFileWidgetState extends ConsumerState<MultipleFileWidget> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child: Container(
color: Color(0xFFFFFFFF),
child: Column(
@ -288,6 +289,6 @@ class MultipleFileWidgetState extends ConsumerState<MultipleFileWidget> {
),
],
),
);
),);
}
}

View File

@ -561,7 +561,8 @@ class QuotationTabState extends ConsumerState<QuotationPopUpTab> {
@override
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child: Container(
// height: MediaQuery.of(context).size.height,
// width: MediaQuery.of(context).size.width,
// padding: const EdgeInsets.all(16),
@ -577,6 +578,6 @@ class QuotationTabState extends ConsumerState<QuotationPopUpTab> {
),
)
: const Center(child: Text('No Available Data')),
);
),);
}
}

View File

@ -383,7 +383,8 @@ class RaiseEnqFormState extends ConsumerState<RaiseEnqForm> {
@override
Widget build(BuildContext context) {
// TODO: implement build
return Container(
return SelectionArea(
child:Container(
// color: Color(0xFFFCFCFC),
// margin: const EdgeInsets.symmetric(vertical: 8),
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 25),
@ -435,7 +436,7 @@ class RaiseEnqFormState extends ConsumerState<RaiseEnqForm> {
),
),
),
);
),);
}
Widget buildAgentName(BuildContext context, {fromHeader = true}) {

View File

@ -999,7 +999,8 @@ class PolicyStaffEnqListState extends ConsumerState<PolicyStaffEnqList> {
@override
Widget build(BuildContext context) {
return AlertDialog(
return SelectionArea(
child: AlertDialog(
backgroundColor: Color(0xfff8fafc),
contentPadding: const EdgeInsets.fromLTRB(24.0, 2.0, 24.0, 24.0),
titlePadding: const EdgeInsets.fromLTRB(24.0, 4.0, 24.0, 2.0),
@ -1054,7 +1055,7 @@ class PolicyStaffEnqListState extends ConsumerState<PolicyStaffEnqList> {
),
// ),
),
);
));
}
Widget buildDocRC(BuildContext context, bool isMobile) {

View File

@ -43,6 +43,7 @@ class TabEnquiryStaffListState extends ConsumerState<TabEnquiryStaffList> {
dynamic selectedBrokerName;
dynamic selectedAgentName;
dynamic selectedAgentCode;
dynamic selectedInsurer;
@override
@ -105,6 +106,7 @@ class TabEnquiryStaffListState extends ConsumerState<TabEnquiryStaffList> {
selectedVehicleType = data['enquiry']?['vehicle_type'];
selectedBrokerName = data['enquiry']?['broker_name'];
selectedAgentName = data['enquiry']?['agent_name'];
selectedAgentCode = data['enquiry']?['agent_code'];
selectedInsurer = data['enquiry']?['short_name'];
print(
'loadQuotationTab 4s -$selectedBrokerName $selectedInsuredName - $selectedVehicleNum - $selectedVehicleType',
@ -356,9 +358,15 @@ class TabEnquiryStaffListState extends ConsumerState<TabEnquiryStaffList> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Agent Name', style: _textStyle),
Text('Partner Name', style: _textStyle),
SizedBox(height: 10),
Text(selectedAgentName ?? '', style: _textDataStyle),
// Text(selectedAgentName ?? '', style: _textDataStyle),
Text(
'${selectedAgentCode?.trim().isNotEmpty == true ? selectedAgentCode : ''}'
'${selectedAgentCode?.trim().isNotEmpty == true && selectedAgentName?.trim().isNotEmpty == true ? ' - ' : ''}'
'${selectedAgentName?.trim().isNotEmpty == true ? selectedAgentName : ''}',
style: _textDataStyle,
),
],
);
}

View File

@ -303,7 +303,8 @@ class _AddDialogState extends ConsumerState<AssignStaffDialog> {
@override
Widget build(BuildContext context) {
return AlertDialog(
return SelectionArea(
child:AlertDialog(
backgroundColor: Colors.white,
content: showSuccess
? Column(
@ -397,7 +398,7 @@ class _AddDialogState extends ConsumerState<AssignStaffDialog> {
),
),
],
);
),);
}
// 🔹 Example: Claims widget

View File

@ -70,7 +70,8 @@ class _EnquiryFormState extends State<EnquiryForm> {
@override
Widget build(BuildContext context) {
return Container(
return SelectionArea(
child:Container(
margin: const EdgeInsets.all(20),
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
@ -170,6 +171,6 @@ class _EnquiryFormState extends State<EnquiryForm> {
],
),
),
);
));
}
}

View File

@ -35,7 +35,8 @@ class _EnquiryGroupState extends State<EnquiryGroup> {
@override
Widget build(BuildContext context) {
return Column(
return SelectionArea(
child:Column(
children: [
InkWell(
onTap: () => setState(() => _isExpanded = !_isExpanded),
@ -99,6 +100,6 @@ class _EnquiryGroupState extends State<EnquiryGroup> {
);
}).toList(),
],
);
));
}
}

View File

@ -91,7 +91,8 @@ class _EnquiryRowState extends State<EnquiryRow> {
Widget build(BuildContext context) {
final dateFormat = DateFormat('dd-MM-yyyy\nhh:mm a');
return Container(
return SelectionArea(
child:Container(
decoration: BoxDecoration(
color: _isEditMode ? const Color(0xFFf8f9fa) : Colors.white,
border: const Border(bottom: BorderSide(color: Color(0xFFf0f0f0))),
@ -250,6 +251,6 @@ class _EnquiryRowState extends State<EnquiryRow> {
],
),
),
);
));
}
}

View File

@ -518,7 +518,8 @@ class PolicyScreenState extends ConsumerState<PolicyScreen> {
Widget build(BuildContext context) {
return MainLayout(
title: 'policy',
body: Container(
body: SelectionArea(
child:Container(
// height: MediaQuery.of(context).size.height,
// width: MediaQuery.of(context).size.width,
// padding: const EdgeInsets.all(20),
@ -720,7 +721,7 @@ class PolicyScreenState extends ConsumerState<PolicyScreen> {
],
),
),
),
)),
);
}

View File

@ -258,6 +258,7 @@ class policylistState extends ConsumerState<policylist> {
: 'Click to Verify';
return (item['agent_name'] ?? '-').toLowerCase().contains(lowerQuery) ||
(item['agent_code'] ?? '-').toLowerCase().contains(lowerQuery) ||
(item['reg_no'] ?? '-').toLowerCase().contains(lowerQuery) ||
(item['insurer_name'] ?? '-').toLowerCase().contains(lowerQuery) ||
(item['insurer_short_name'] ?? '-').toLowerCase().contains(
@ -330,7 +331,8 @@ class policylistState extends ConsumerState<policylist> {
Widget build(BuildContext context) {
return MainLayout(
title: "Policy",
body: Container(
body: SelectionArea(
child:Container(
// color: Colors.yellow.shade50,
width: MediaQuery.of(context).size.width,
child: Column(
@ -405,7 +407,7 @@ class policylistState extends ConsumerState<policylist> {
),
],
),
),
),),
);
}

View File

@ -362,7 +362,8 @@ class createQuotatDialogState extends State<createQuotatDialog> {
@override
Widget build(BuildContext context) {
return AlertDialog(
return SelectionArea(
child: AlertDialog(
backgroundColor: Colors.white,
content: Column(
mainAxisSize: MainAxisSize.min,
@ -421,7 +422,7 @@ class createQuotatDialogState extends State<createQuotatDialog> {
),
),
],
);
),);
}
Widget buildFormFields(BuildContext context) {

View File

@ -280,7 +280,8 @@ class QuotationScreenState extends ConsumerState<QuotationScreen> {
return MainLayout(
title: 'quotation',
body: Container(
body: SelectionArea(
child:Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: SingleChildScrollView(
@ -493,7 +494,7 @@ class QuotationScreenState extends ConsumerState<QuotationScreen> {
],
),
),
),
),),
);
}