UI_HR_CLAIMS_MODULE_FILTER
This commit is contained in:
parent
4e85d3d73f
commit
dda99d9948
BIN
assets/claimHistory.png
Normal file
BIN
assets/claimHistory.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 331 B |
@ -500,7 +500,7 @@ class _hrDashboardState extends State<hrDashboard>
|
|||||||
|
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(5),
|
// padding: const EdgeInsets.all(5),
|
||||||
// height: MediaQuery.of(context).size.height * 0.08,
|
// height: MediaQuery.of(context).size.height * 0.08,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color:
|
color:
|
||||||
@ -515,11 +515,16 @@ class _hrDashboardState extends State<hrDashboard>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: TabBar(
|
child: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
TabBar(
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
labelPadding: const EdgeInsets.symmetric(
|
labelPadding: EdgeInsets.zero,
|
||||||
horizontal: 0, vertical: 0),
|
// labelPadding: const EdgeInsets.symmetric(
|
||||||
|
// horizontal: 0, vertical: 0),
|
||||||
// indicator: BoxDecoration(
|
// indicator: BoxDecoration(
|
||||||
// color: const Color(0xFF00999E), // Selected tab background
|
// color: const Color(0xFF00999E), // Selected tab background
|
||||||
// borderRadius: BorderRadius.circular(12),
|
// borderRadius: BorderRadius.circular(12),
|
||||||
@ -533,6 +538,7 @@ class _hrDashboardState extends State<hrDashboard>
|
|||||||
// ),
|
// ),
|
||||||
dividerColor: Colors.transparent,
|
dividerColor: Colors.transparent,
|
||||||
indicatorColor: Colors.transparent,
|
indicatorColor: Colors.transparent,
|
||||||
|
indicatorPadding: EdgeInsets.zero,
|
||||||
labelColor: Colors.white,
|
labelColor: Colors.white,
|
||||||
unselectedLabelColor: const Color(0xFF828282),
|
unselectedLabelColor: const Color(0xFF828282),
|
||||||
// tabs: visibleTabs,
|
// tabs: visibleTabs,
|
||||||
@ -564,6 +570,8 @@ class _hrDashboardState extends State<hrDashboard>
|
|||||||
// isSelected: selectedIndex == 3),
|
// isSelected: selectedIndex == 3),
|
||||||
// ],
|
// ],
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 16),
|
SizedBox(height: 16),
|
||||||
// Expanded TabBarView
|
// Expanded TabBarView
|
||||||
@ -695,7 +703,8 @@ class CustomTab extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Tab(
|
return Tab(
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: const EdgeInsets.symmetric(horizontal: 6),
|
// margin: const EdgeInsets.symmetric(horizontal: 6),
|
||||||
|
margin: const EdgeInsets.only(right: 6),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
|
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isSelected ? const Color(0xFF00999E) : Colors.white,
|
color: isSelected ? const Color(0xFF00999E) : Colors.white,
|
||||||
@ -716,8 +725,8 @@ class CustomTab extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
// mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Icon(icon,
|
Icon(icon,
|
||||||
size: 18,
|
size: 18,
|
||||||
|
|||||||
@ -46,9 +46,11 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
Map<String, TextEditingController> controllers = {};
|
Map<String, TextEditingController> controllers = {};
|
||||||
List<dynamic> reversedDataPolicy = [];
|
List<dynamic> reversedDataPolicy = [];
|
||||||
List<Map<String, dynamic>> originalData = [];
|
List<Map<String, dynamic>> originalData = [];
|
||||||
String? selectedPolicyType;
|
String? selectedPolicyTypeName;
|
||||||
// int? selectedPolicyType;
|
String? selectedClaimStatusName;
|
||||||
String? selectedClaimStatus;
|
int? selectedPolicyType;
|
||||||
|
int? selectedClaimStatus;
|
||||||
|
|
||||||
dynamic empClientId;
|
dynamic empClientId;
|
||||||
List<Map<String, dynamic>> getClaimPolicies = [];
|
List<Map<String, dynamic>> getClaimPolicies = [];
|
||||||
Map<String, dynamic> getClaimPoliciesApi = {};
|
Map<String, dynamic> getClaimPoliciesApi = {};
|
||||||
@ -95,7 +97,7 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
|
|
||||||
print("TextCXOnte - $controllers");
|
print("TextCXOnte - $controllers");
|
||||||
|
|
||||||
getCDPoliciesDetails();
|
getClaimsPoliciesDetails();
|
||||||
// getApiData();
|
// getApiData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +109,7 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getCDPoliciesDetails() async {
|
Future<void> getClaimsPoliciesDetails() async {
|
||||||
print('9');
|
print('9');
|
||||||
setState(() {
|
setState(() {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
@ -168,6 +170,10 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
print('originalData - $getClaimPolicies');
|
print('originalData - $getClaimPolicies');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
getClaimPolicies = [];
|
||||||
|
originalData = getClaimPolicies;
|
||||||
|
filteredData = List.from(originalData);
|
||||||
|
print('originalData - $getClaimPolicies');
|
||||||
print('Request failed: ${response['code']}');
|
print('Request failed: ${response['code']}');
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -182,6 +188,26 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
void applyFilter() {
|
void applyFilter() {
|
||||||
final data = claim_Detials();
|
final data = claim_Detials();
|
||||||
print("data -- $data");
|
print("data -- $data");
|
||||||
|
getClaimList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void reset() {
|
||||||
|
setState(() {
|
||||||
|
controllers.forEach((key, controller) {
|
||||||
|
controller.clear();
|
||||||
|
});
|
||||||
|
|
||||||
|
selectedPolicyType = null;
|
||||||
|
selectedPolicyTypeName = null;
|
||||||
|
selectedClaimStatus = null;
|
||||||
|
selectedClaimStatusName = null;
|
||||||
|
_currentPage = 1;
|
||||||
|
|
||||||
|
getClaimList();
|
||||||
|
});
|
||||||
|
|
||||||
|
final data = claim_Detials();
|
||||||
|
print("restdata -- $data");
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -189,6 +215,7 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
// TODO: implement build
|
// TODO: implement build
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
// color: Colors.red.shade50,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(10), // 👈 set your desired radius
|
borderRadius: BorderRadius.circular(10), // 👈 set your desired radius
|
||||||
),
|
),
|
||||||
@ -199,19 +226,24 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
// Text("DAer"),
|
|
||||||
// _buildClaimsDataTable(context),
|
|
||||||
SingleChildScrollView(
|
|
||||||
child: _buildClaimsDataTable(context),
|
child: _buildClaimsDataTable(context),
|
||||||
),
|
),
|
||||||
],
|
// Expanded(
|
||||||
),
|
// child: Container(
|
||||||
),
|
// child: Column(
|
||||||
),
|
// children: [
|
||||||
|
// // Text("DAer"),
|
||||||
|
// // _buildClaimsDataTable(context),
|
||||||
|
// SingleChildScrollView(
|
||||||
|
// scrollDirection: Axis.vertical,
|
||||||
|
// child: _buildClaimsDataTable(context),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -254,203 +286,410 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Column(
|
return ListView.builder(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
itemCount: _paginatedData.length + 2, // +1 for header, +1 for pagination
|
||||||
children: [
|
itemBuilder: (context, index) {
|
||||||
// Header row
|
if (index == 0) return _buildHeader();
|
||||||
Container(
|
if (index == _paginatedData.length + 1)
|
||||||
|
return _buildPagination(context);
|
||||||
|
|
||||||
|
final item = _paginatedData[index - 1];
|
||||||
|
return _buildDataRow(item);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
// return Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// // Header row
|
||||||
|
// Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: Color(0xFF00A6A6),
|
||||||
|
// borderRadius: BorderRadius.circular(6),
|
||||||
|
// ),
|
||||||
|
// padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||||
|
// child: Row(
|
||||||
|
// children: [
|
||||||
|
// Expanded(
|
||||||
|
// flex: 4,
|
||||||
|
// child: Text(
|
||||||
|
// 'Name',
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Colors.white, fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 4,
|
||||||
|
// child: Text(
|
||||||
|
// 'Policy Name',
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Colors.white, fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 3,
|
||||||
|
// child: Text(
|
||||||
|
// 'Claim Number',
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Colors.white, fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 2,
|
||||||
|
// child: Text(
|
||||||
|
// 'Status',
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Colors.white, fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 3,
|
||||||
|
// child: Text(
|
||||||
|
// 'Claim Amount',
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Colors.white, fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 3,
|
||||||
|
// child: Text(
|
||||||
|
// 'Record Date',
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Colors.white, fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 2,
|
||||||
|
// child: Text(
|
||||||
|
// 'Action',
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Colors.white, fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
//
|
||||||
|
// const SizedBox(height: 6),
|
||||||
|
//
|
||||||
|
// SingleChildScrollView(
|
||||||
|
// scrollDirection: Axis.vertical,
|
||||||
|
// child: Column(
|
||||||
|
// children: _paginatedData.mapIndexed((index, item) {
|
||||||
|
// return Container(
|
||||||
|
// // margin: const EdgeInsets.only(bottom: 8),
|
||||||
|
// padding:
|
||||||
|
// const EdgeInsets.symmetric(vertical: 5, horizontal: 16),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: Colors.white,
|
||||||
|
// border: Border(
|
||||||
|
// bottom: BorderSide(
|
||||||
|
// // color: Color(0xFFA1A1A1),
|
||||||
|
// color: Color(0xFFD7E9EB),
|
||||||
|
// width: 1,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// // color: index % 2 == 0 ? Color(0xFFE6FAFB) : Colors.white,
|
||||||
|
// borderRadius: BorderRadius.circular(6),
|
||||||
|
// ),
|
||||||
|
// child: Row(
|
||||||
|
// children: [
|
||||||
|
// Expanded(
|
||||||
|
// flex: 4,
|
||||||
|
// child: Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// item['emp_name'] ?? '-',
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Color(0xFF000000),
|
||||||
|
// fontWeight: FontWeight.w400,
|
||||||
|
// fontSize: 12),
|
||||||
|
// ),
|
||||||
|
// Text(
|
||||||
|
// item['emp_code'] ?? '-',
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Color(0xFF585757),
|
||||||
|
// fontWeight: FontWeight.w300,
|
||||||
|
// fontSize: 10),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 4,
|
||||||
|
// child: Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// item['emp_name'] ?? '-',
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Color(0xFF000000),
|
||||||
|
// fontWeight: FontWeight.w400,
|
||||||
|
// fontSize: 12),
|
||||||
|
// ),
|
||||||
|
// Text(
|
||||||
|
// item['policy_no'] ?? '-',
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Color(0xFF585757),
|
||||||
|
// fontWeight: FontWeight.w300,
|
||||||
|
// fontSize: 10),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 3,
|
||||||
|
// child: Text(
|
||||||
|
// "${item['claim_no'] ?? ''}",
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Color(0xFF000000),
|
||||||
|
// fontWeight: FontWeight.w400,
|
||||||
|
// fontSize: 12),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 2,
|
||||||
|
// child: Container(
|
||||||
|
// padding: const EdgeInsets.symmetric(
|
||||||
|
// horizontal: 4, vertical: 4),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: Color(0xFF7BD9B6),
|
||||||
|
// // color: (item['emp_is_active'] == "1")
|
||||||
|
// // ? Color(0xFF7BD9B6)
|
||||||
|
// // : Color(0xFFFFA6A6),
|
||||||
|
// borderRadius: BorderRadius.circular(6),
|
||||||
|
// ),
|
||||||
|
// child: Align(
|
||||||
|
// alignment: Alignment.center,
|
||||||
|
// child: Text(
|
||||||
|
// "${item['status'] ?? ''}",
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Color(0xFF000000),
|
||||||
|
// fontWeight: FontWeight.w500,
|
||||||
|
// fontSize: 12,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 3,
|
||||||
|
// child: Text(
|
||||||
|
// "${item['claim_amount'] ?? ''}",
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Color(0xFF000000),
|
||||||
|
// fontWeight: FontWeight.w400,
|
||||||
|
// fontSize: 12),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 3,
|
||||||
|
// child: Text(
|
||||||
|
// "${item['ticket_created_date'] ?? ''}",
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// color: Color(0xFF000000),
|
||||||
|
// fontWeight: FontWeight.w400,
|
||||||
|
// fontSize: 12),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 2,
|
||||||
|
// child: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// children: [
|
||||||
|
// GestureDetector(
|
||||||
|
// onTap: () {},
|
||||||
|
// child: Container(
|
||||||
|
// height: 30,
|
||||||
|
// width: 30,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: Color(0xFFE6F5F6),
|
||||||
|
// borderRadius: BorderRadius.circular(12)),
|
||||||
|
// child: Icon(Icons.credit_card,
|
||||||
|
// color: Color(0xFF3D3D3D)),
|
||||||
|
// // child: Image.asset(
|
||||||
|
// // 'assets/ecard.jpg',
|
||||||
|
// // height: 20,
|
||||||
|
// // fit: BoxFit.cover,
|
||||||
|
// // ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }).toList(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
//
|
||||||
|
// Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
// children: [
|
||||||
|
// Padding(
|
||||||
|
// padding: const EdgeInsets.symmetric(vertical: 12),
|
||||||
|
// child: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// children: [
|
||||||
|
// DropdownButton<int>(
|
||||||
|
// value: _rowsPerPage,
|
||||||
|
// items: [5, 10, 15, 20, 50].map((int value) {
|
||||||
|
// return DropdownMenuItem<int>(
|
||||||
|
// value: value,
|
||||||
|
// child: Text(
|
||||||
|
// ' $value ',
|
||||||
|
// style: GoogleFonts.poppins(fontSize: 15),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }).toList(),
|
||||||
|
// onChanged: (newValue) {
|
||||||
|
// setState(() {
|
||||||
|
// _rowsPerPage = newValue!;
|
||||||
|
// _currentPage =
|
||||||
|
// 1; // Reset to first page when rows per page changes
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// IconButton(
|
||||||
|
// onPressed: _currentPage > 1
|
||||||
|
// ? () {
|
||||||
|
// setState(() {
|
||||||
|
// _currentPage--;
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// : null,
|
||||||
|
// icon: Icon(Icons.chevron_left),
|
||||||
|
// ),
|
||||||
|
// for (int i = 1;
|
||||||
|
// i <= (filteredData.length / _rowsPerPage).ceil();
|
||||||
|
// i++)
|
||||||
|
// Padding(
|
||||||
|
// padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
|
// child: ElevatedButton(
|
||||||
|
// style: ElevatedButton.styleFrom(
|
||||||
|
// backgroundColor: _currentPage == i
|
||||||
|
// ? Color(0xFF00A6A6)
|
||||||
|
// : Colors.grey[300],
|
||||||
|
// foregroundColor:
|
||||||
|
// _currentPage == i ? Colors.white : Colors.black,
|
||||||
|
// minimumSize: Size(36, 36),
|
||||||
|
// padding: EdgeInsets.zero,
|
||||||
|
// ),
|
||||||
|
// onPressed: () {
|
||||||
|
// setState(() {
|
||||||
|
// _currentPage = i;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// child: Text(i.toString()),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// IconButton(
|
||||||
|
// onPressed: _currentPage <
|
||||||
|
// (filteredData.length / _rowsPerPage).ceil()
|
||||||
|
// ? () {
|
||||||
|
// setState(() {
|
||||||
|
// _currentPage++;
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// : null,
|
||||||
|
// icon: Icon(Icons.chevron_right),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildHeader() {
|
||||||
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFF00A6A6),
|
color: Color(0xFF00A6A6),
|
||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||||
child: Row(
|
child: const Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(flex: 4, child: Text('Name', style: _headerStyle)),
|
||||||
flex: 4,
|
Expanded(flex: 4, child: Text('Policy Name', style: _headerStyle)),
|
||||||
child: Text(
|
Expanded(flex: 3, child: Text('Claim Number', style: _headerStyle)),
|
||||||
'Name',
|
Expanded(flex: 4, child: Text('Status', style: _headerStyle)),
|
||||||
style: GoogleFonts.poppins(
|
Expanded(flex: 3, child: Text('Claim Amount', style: _headerStyle)),
|
||||||
color: Colors.white, fontWeight: FontWeight.bold),
|
Expanded(flex: 3, child: Text('Record Date', style: _headerStyle)),
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 4,
|
|
||||||
child: Text(
|
|
||||||
'Policy Name',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.white, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Text(
|
|
||||||
'Claim Number',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.white, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
child: Text(
|
child: Text('Action',
|
||||||
'Status',
|
textAlign: TextAlign.center, style: _headerStyle)),
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.white, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Text(
|
|
||||||
'Claim Amount',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.white, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Text(
|
|
||||||
'Record Date',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.white, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 2,
|
|
||||||
child: Text(
|
|
||||||
'Action',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.white, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const SizedBox(height: 6),
|
Widget _buildDataRow(Map<String, dynamic> item) {
|
||||||
|
|
||||||
SingleChildScrollView(
|
|
||||||
scrollDirection: Axis.vertical,
|
|
||||||
child: Column(
|
|
||||||
children: _paginatedData.mapIndexed((index, item) {
|
|
||||||
return Container(
|
return Container(
|
||||||
// margin: const EdgeInsets.only(bottom: 8),
|
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 16),
|
||||||
padding:
|
margin: const EdgeInsets.only(top: 10),
|
||||||
const EdgeInsets.symmetric(vertical: 5, horizontal: 16),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Color(0xFFE0F7F9),
|
||||||
border: Border(
|
border: const Border(
|
||||||
bottom: BorderSide(
|
bottom: BorderSide(color: Color(0xFFD7E9EB), width: 1),
|
||||||
// color: Color(0xFFA1A1A1),
|
|
||||||
color: Color(0xFFD7E9EB),
|
|
||||||
width: 1,
|
|
||||||
),
|
),
|
||||||
),
|
borderRadius: BorderRadius.circular(8),
|
||||||
// color: index % 2 == 0 ? Color(0xFFE6FAFB) : Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(6),
|
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(item['emp_name'] ?? '-', style: _dataBold),
|
||||||
item['emp_name'] ?? '-',
|
Text(item['emp_code'] ?? '-', style: _dataSub),
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF000000),
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
fontSize: 12),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
item['emp_code'] ?? '-',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF585757),
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
fontSize: 10),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(item['policy_type'] ?? '-', style: _dataBold),
|
||||||
item['emp_name'] ?? '-',
|
Text(item['client_policy_no'] ?? '-', style: _dataSub),
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF000000),
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
fontSize: 12),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
item['policy_no'] ?? '-',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF585757),
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
fontSize: 10),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: Text(
|
child: Text(item['claim_no'] ?? '-', style: _dataBold),
|
||||||
"${item['claim_no'] ?? ''}",
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF000000),
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
fontSize: 12),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 4,
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.bottomLeft,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding:
|
||||||
horizontal: 4, vertical: 4),
|
const EdgeInsets.symmetric(horizontal: 14, vertical: 4),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFF7BD9B6),
|
color: Color(0xFF7BD9B6),
|
||||||
// color: (item['emp_is_active'] == "1")
|
|
||||||
// ? Color(0xFF7BD9B6)
|
|
||||||
// : Color(0xFFFFA6A6),
|
|
||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
),
|
),
|
||||||
child: Align(
|
child: Text(item['status'] ?? '-', style: _dataBold)),
|
||||||
alignment: Alignment.center,
|
|
||||||
child: Text(
|
|
||||||
"${item['status'] ?? ''}",
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF000000),
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
fontSize: 12,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Text(
|
|
||||||
"${item['claim_amount'] ?? ''}",
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF000000),
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
fontSize: 12),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: Text(
|
child: Text(item['claim_amount'] ?? '-', style: _dataBold),
|
||||||
"${item['ticket_created_date'] ?? ''}",
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF000000),
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
fontSize: 12),
|
|
||||||
),
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 3,
|
||||||
|
child: Text(item['ticket_created_date'] ?? '-', style: _dataBold),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
@ -463,15 +702,16 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
height: 30,
|
height: 30,
|
||||||
width: 30,
|
width: 30,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFE6F5F6),
|
color: Color(0xFF86D1D4),
|
||||||
borderRadius: BorderRadius.circular(12)),
|
borderRadius: BorderRadius.circular(8),
|
||||||
child: Icon(Icons.credit_card,
|
),
|
||||||
color: Color(0xFF3D3D3D)),
|
child: Padding(
|
||||||
// child: Image.asset(
|
padding: EdgeInsets.all(6), // You can adjust this value
|
||||||
// 'assets/ecard.jpg',
|
child: Image.asset(
|
||||||
// height: 20,
|
'assets/claimHistory.png',
|
||||||
// fit: BoxFit.cover,
|
fit: BoxFit.contain,
|
||||||
// ),
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -480,13 +720,27 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}).toList(),
|
}
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
Row(
|
static final _dataBold = GoogleFonts.poppins(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
fontSize: 12,
|
||||||
children: [
|
fontWeight: FontWeight.w400,
|
||||||
|
color: Color(0xFF000000),
|
||||||
|
);
|
||||||
|
|
||||||
|
static final _dataSub = GoogleFonts.poppins(
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
color: Color(0xFF585757),
|
||||||
|
);
|
||||||
|
|
||||||
|
static const _headerStyle = TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildPagination(BuildContext context) {
|
||||||
|
return Row(mainAxisAlignment: MainAxisAlignment.end, children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -545,8 +799,8 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: _currentPage <
|
onPressed:
|
||||||
(filteredData.length / _rowsPerPage).ceil()
|
_currentPage < (filteredData.length / _rowsPerPage).ceil()
|
||||||
? () {
|
? () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_currentPage++;
|
_currentPage++;
|
||||||
@ -558,10 +812,7 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
]);
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildName(BuildContext context) {
|
Widget _buildName(BuildContext context) {
|
||||||
@ -808,6 +1059,39 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
Widget _buildPolicyType(BuildContext context) {
|
Widget _buildPolicyType(BuildContext context) {
|
||||||
List<dynamic> ticketTypeList = getClaimPoliciesApi['ticket_type'] ?? [];
|
List<dynamic> ticketTypeList = getClaimPoliciesApi['ticket_type'] ?? [];
|
||||||
|
|
||||||
|
// Get type_name from ticket_type id
|
||||||
|
String? getTypeNameById(int? id) {
|
||||||
|
if (id == null) return null;
|
||||||
|
final match = ticketTypeList.firstWhere(
|
||||||
|
(e) => e['ticket_type'] == id,
|
||||||
|
orElse: () => null,
|
||||||
|
);
|
||||||
|
return match != null ? match['type_name'] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get id from type_name
|
||||||
|
int? getIdByTypeName(String? typeName) {
|
||||||
|
print("getIdByTypeName");
|
||||||
|
print("getIdByTypeName - $typeName");
|
||||||
|
final match = ticketTypeList.firstWhere(
|
||||||
|
(e) => e['type_name'] == typeName,
|
||||||
|
orElse: () => null,
|
||||||
|
);
|
||||||
|
|
||||||
|
print("match - $match");
|
||||||
|
|
||||||
|
if (match != null && match is Map) {
|
||||||
|
final map = match as Map;
|
||||||
|
final id = map['ticket_type'];
|
||||||
|
print("Returning ticket_type: $id");
|
||||||
|
return id is int ? id : int.tryParse(id.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
print("no match or invalid map");
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: MediaQuery.of(context).size.width * 0.22,
|
width: MediaQuery.of(context).size.width * 0.22,
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -821,32 +1105,21 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
child: DropdownSearch<String>(
|
child: DropdownSearch<String>(
|
||||||
selectedItem: selectedPolicyType,
|
selectedItem: selectedPolicyTypeName,
|
||||||
items: (String? filter, _) {
|
items: (String? filter, _) {
|
||||||
List<String> allItems = ticketTypeList
|
return ticketTypeList
|
||||||
.map<String>((item) => item['type_name'].toString())
|
.map<String>((item) => item['type_name'].toString())
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
if (filter == null || filter.isEmpty) return allItems;
|
|
||||||
|
|
||||||
return allItems
|
|
||||||
.where((element) =>
|
|
||||||
element.toLowerCase().contains(filter.toLowerCase()))
|
|
||||||
.toList();
|
|
||||||
},
|
},
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
// Find corresponding ticket_type ID
|
selectedPolicyTypeName = value;
|
||||||
var selectedItem = ticketTypeList.firstWhere(
|
selectedPolicyType = getIdByTypeName(value);
|
||||||
(e) => e['type_name'] == value,
|
|
||||||
orElse: () => null,
|
|
||||||
);
|
|
||||||
if (selectedItem != null) {
|
|
||||||
print(
|
|
||||||
"Selected ticket_type: ${selectedItem['ticket_type']}");
|
|
||||||
selectedPolicyType = selectedItem['ticket_type'];
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
print(
|
||||||
|
"Selected selectedPolicyTypeName: $selectedPolicyTypeName");
|
||||||
|
print("Selected selectedPolicyType: $selectedPolicyType");
|
||||||
},
|
},
|
||||||
decoratorProps: DropDownDecoratorProps(
|
decoratorProps: DropDownDecoratorProps(
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
@ -871,7 +1144,7 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
popupProps: PopupProps.menu(
|
popupProps: const PopupProps.menu(
|
||||||
showSearchBox: true,
|
showSearchBox: true,
|
||||||
searchFieldProps: TextFieldProps(
|
searchFieldProps: TextFieldProps(
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
@ -891,12 +1164,46 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
|
|
||||||
Widget _buildClaimStatus(BuildContext context) {
|
Widget _buildClaimStatus(BuildContext context) {
|
||||||
List<dynamic> claimStatusList = getClaimPoliciesApi['claim_status'] ?? [];
|
List<dynamic> claimStatusList = getClaimPoliciesApi['claim_status'] ?? [];
|
||||||
|
|
||||||
|
// Get type_name from ticket_type id
|
||||||
|
String? getTypeNameById(int? id) {
|
||||||
|
if (id == null) return null;
|
||||||
|
final match = claimStatusList.firstWhere(
|
||||||
|
(e) => e['id'] == id,
|
||||||
|
orElse: () => null,
|
||||||
|
);
|
||||||
|
return match != null ? match['claim_status'] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get id from type_name
|
||||||
|
int? getIdByTypeName(String? typeName) {
|
||||||
|
print("getIdByTypeName");
|
||||||
|
print("getIdByTypeName - $typeName");
|
||||||
|
final match = claimStatusList.firstWhere(
|
||||||
|
(e) => e['claim_status'] == typeName,
|
||||||
|
orElse: () => null,
|
||||||
|
);
|
||||||
|
|
||||||
|
print("match - $match");
|
||||||
|
|
||||||
|
if (match != null && match is Map) {
|
||||||
|
final map = match as Map;
|
||||||
|
final id = map['id'];
|
||||||
|
print("Returning id: $id");
|
||||||
|
return id is int ? id : int.tryParse(id.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
print("no match or invalid map");
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: MediaQuery.of(context).size.width * 0.22,
|
width: MediaQuery.of(context).size.width * 0.22,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
const Text(
|
||||||
"Claim Status",
|
"Claim Status",
|
||||||
style: TextStyle(fontSize: 12),
|
style: TextStyle(fontSize: 12),
|
||||||
),
|
),
|
||||||
@ -906,33 +1213,55 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
child: DropdownSearch<String>(
|
child: DropdownSearch<String>(
|
||||||
selectedItem: selectedClaimStatus,
|
selectedItem: selectedClaimStatusName,
|
||||||
items: (String? filter, _) {
|
items: (String? filter, _) {
|
||||||
List<String> allItems = claimStatusList
|
return claimStatusList
|
||||||
.map<String>((item) => item['claim_status'].toString())
|
.map<String>((item) => item['claim_status'].toString())
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
if (filter == null || filter.isEmpty) return allItems;
|
|
||||||
|
|
||||||
return allItems
|
|
||||||
.where((element) =>
|
|
||||||
element.toLowerCase().contains(filter.toLowerCase()))
|
|
||||||
.toList();
|
|
||||||
},
|
},
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
// Find corresponding ticket_type ID
|
selectedClaimStatusName = value;
|
||||||
var selectedItem = claimStatusList.firstWhere(
|
selectedClaimStatus = getIdByTypeName(value);
|
||||||
(e) => e['claim_status'] == value,
|
|
||||||
orElse: () => null,
|
|
||||||
);
|
|
||||||
if (selectedItem != null) {
|
|
||||||
print(
|
|
||||||
"Selected ticket_type: ${selectedItem['ticket_type']}");
|
|
||||||
selectedClaimStatus = selectedItem['ticket_type'];
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
print(
|
||||||
|
"Selected selectedClaimStatusName: $selectedClaimStatusName");
|
||||||
|
print("Selected selectedClaimStatus: $selectedClaimStatus");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// selectedItem: selectedClaimStatus,
|
||||||
|
// selectedItem: getTypeNameById(selectedClaimStatus),
|
||||||
|
// items: (String? filter, _) {
|
||||||
|
// List<String> allItems = claimStatusList
|
||||||
|
// .map<String>((item) => item['claim_status'].toString())
|
||||||
|
// .toList();
|
||||||
|
//
|
||||||
|
// if (filter == null || filter.isEmpty) return allItems;
|
||||||
|
//
|
||||||
|
// return allItems
|
||||||
|
// .where((element) =>
|
||||||
|
// element.toLowerCase().contains(filter.toLowerCase()))
|
||||||
|
// .toList();
|
||||||
|
// },
|
||||||
|
|
||||||
|
//
|
||||||
|
// onChanged: (value) {
|
||||||
|
// if (!mounted) return;
|
||||||
|
// print("Selected ticket_type11: $value");
|
||||||
|
//
|
||||||
|
// final id = getIdByTypeName(value);
|
||||||
|
// print("getIdByTypeName returned: $id");
|
||||||
|
//
|
||||||
|
// if (id != null) {
|
||||||
|
// setState(() {
|
||||||
|
// selectedClaimStatus = id;
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// print("No match found for $value");
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
|
||||||
decoratorProps: DropDownDecoratorProps(
|
decoratorProps: DropDownDecoratorProps(
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
constraints: BoxConstraints(maxHeight: 200),
|
constraints: BoxConstraints(maxHeight: 200),
|
||||||
@ -1032,7 +1361,8 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
ElevatedButton.icon(
|
Expanded(
|
||||||
|
child: ElevatedButton.icon(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
applyFilter();
|
applyFilter();
|
||||||
},
|
},
|
||||||
@ -1053,8 +1383,15 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ElevatedButton.icon(
|
),
|
||||||
onPressed: () {},
|
SizedBox(
|
||||||
|
width: 10,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: ElevatedButton.icon(
|
||||||
|
onPressed: () {
|
||||||
|
reset();
|
||||||
|
},
|
||||||
icon: const Icon(Icons.refresh_outlined,
|
icon: const Icon(Icons.refresh_outlined,
|
||||||
color: Colors.white, size: 18),
|
color: Colors.white, size: 18),
|
||||||
label: const Text(
|
label: const Text(
|
||||||
@ -1072,6 +1409,7 @@ class _ClaimsPolicieState extends State<ClaimsPolicies> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
import file_picker
|
||||||
import firebase_auth
|
import firebase_auth
|
||||||
import firebase_core
|
import firebase_core
|
||||||
import google_sign_in_ios
|
import google_sign_in_ios
|
||||||
@ -14,6 +15,7 @@ import smart_auth
|
|||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
|
FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin"))
|
||||||
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
|
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
|
||||||
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
|
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
|
||||||
FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))
|
FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user