UI_HR_POLICY_CLAIMS_MODULE

This commit is contained in:
venbaittech 2025-07-05 10:26:36 +05:30
parent ee0eabd0b7
commit 810647da40
5 changed files with 1125 additions and 50 deletions

View File

@ -228,6 +228,7 @@ class _hrDashboardState extends State<hrDashboard>
empClientId: empClientId,
empClientBranchId: empClientBranchId,
empHrId: empHrId,
postToken: _postToken,
));
}
}
@ -422,7 +423,8 @@ class _hrDashboardState extends State<hrDashboard>
appBar: CustomAppBar(),
body: Stack(children: [
Container(
padding: const EdgeInsets.all(40),
padding: const EdgeInsets.only(
top: 20, bottom: 40, left: 40, right: 40),
// padding: const EdgeInsets.only(
// top: 20, bottom: 20, left: 50, right: 50),
@ -438,8 +440,8 @@ class _hrDashboardState extends State<hrDashboard>
? const EdgeInsets.only(
top: 10, bottom: 10, left: 20, right: 20)
: EdgeInsets.only(
top: 12,
bottom: 12,
top: 10,
bottom: 10,
left: 10,
right: 10), // Add padding to the container
child: Row(
@ -448,12 +450,12 @@ class _hrDashboardState extends State<hrDashboard>
flex: 6,
child: Container(
width: 150,
height: 150,
height: 80,
alignment: Alignment.centerLeft,
child: Image.network(
clientLogo ?? '',
width: 80, // Set the width here
height: 80, // Set the height here
height: 60, // Set the height here
loadingBuilder: (BuildContext context,
Widget child,
ImageChunkEvent? loadingProgress) {
@ -474,7 +476,7 @@ class _hrDashboardState extends State<hrDashboard>
return Image.asset(
'assets/Solid_gray.png', // Replace 'default_image.png' with your default image asset path
width: 80,
height: 80,
height: 60,
fit: BoxFit.cover,
);
},
@ -496,7 +498,7 @@ class _hrDashboardState extends State<hrDashboard>
),
),
SizedBox(height: 16),
SizedBox(height: 8),
Container(
padding: const EdgeInsets.all(5),
height: MediaQuery.of(context).size.height * 0.08,

View File

@ -460,6 +460,40 @@ class ApiService {
return response;
}
Future<Map<String, dynamic>> getClaimPoliciesToApi(String token) async {
print("getgetClaimPoliciesToApii1");
final url = Uri.parse('${Environment.apiUrlPost}claimsSearch');
final headers = {
'Authorization': 'Bearer $token' ?? '',
};
final response = await _makeGetRequest(url, headers);
return response;
}
Future<Map<String, dynamic>> getClaimPoliciesListDataToApi(
String token, Map<String, dynamic> body) async {
print("getgetClaimPoliciesToApii1");
final url = Uri.parse('${Environment.apiUrlPost}claimsSearch');
final headers = {
'Authorization': 'Bearer $token',
'Content-Type': 'application/json',
};
final response = await http.post(
url,
headers: headers,
body: jsonEncode(body),
);
if (response.statusCode == 200) {
return jsonDecode(response.body);
} else {
throw Exception(
'Failed to load claims list: ${response.statusCode} ${response.body}');
}
}
Future<Map<String, dynamic>> getCdTransactionData(
String clintID, String insurerId, String cd_ac_pk, String token) async {
print("getCashDepositDetailsToApi1");

View File

@ -40,17 +40,17 @@ class _CdPolicieState extends State<CdPolicies> {
// List<dynamic> dataPolicy = [];
List<dynamic> reversedDataPolicy = [];
List<Map<String, dynamic>> originalData = []; // Original data source
// List<Map<String, dynamic>> filteredData = []; // Filtered data source
List<Map<String, dynamic>> filteredData = [
{
"client_id": "58",
"insurer_id": "2",
"cd_ac_pk": "94",
"insurer_name": "ICICI Prudential Life Insurance Co. Ltd",
"cd_master_account_no": "CD-IOCL-887744559966",
"balance": "10000000.00"
}
]; // Filtered data source
List<Map<String, dynamic>> filteredData = []; // Filtered data source
// List<Map<String, dynamic>> filteredData = [
// {
// "client_id": "58",
// "insurer_id": "2",
// "cd_ac_pk": "94",
// "insurer_name": "ICICI Prudential Life Insurance Co. Ltd",
// "cd_master_account_no": "CD-IOCL-887744559966",
// "balance": "10000000.00"
// }
// ]; // Filtered data source
dynamic argumentsData;
dynamic policyType;
dynamic policyName;
@ -245,7 +245,11 @@ class _CdPolicieState extends State<CdPolicies> {
),
child: Text(
'Export',
style: GoogleFonts.poppins(fontSize: 16,color: Color(0xFFFFFFFF),fontWeight: FontWeight.w700,letterSpacing: 1),
style: GoogleFonts.poppins(
fontSize: 16,
color: Color(0xFFFFFFFF),
fontWeight: FontWeight.w700,
letterSpacing: 1),
),
),
),
@ -293,21 +297,24 @@ class _CdPolicieState extends State<CdPolicies> {
flex: 4,
child: Text(
'Insurer Name',
style: GoogleFonts.poppins(color: Colors.white, fontWeight: FontWeight.bold),
style: GoogleFonts.poppins(
color: Colors.white, fontWeight: FontWeight.bold),
),
),
Expanded(
flex: 3,
child: Text(
'CD Account number',
style: GoogleFonts.poppins(color: Colors.white, fontWeight: FontWeight.bold),
style: GoogleFonts.poppins(
color: Colors.white, fontWeight: FontWeight.bold),
),
),
Expanded(
flex: 2,
child: Text(
'Current Balance',
style: GoogleFonts.poppins(color: Colors.white, fontWeight: FontWeight.bold),
style: GoogleFonts.poppins(
color: Colors.white, fontWeight: FontWeight.bold),
),
),
Expanded(
@ -315,7 +322,8 @@ class _CdPolicieState extends State<CdPolicies> {
child: Text(
'Action',
textAlign: TextAlign.center,
style: GoogleFonts.poppins(color: Colors.white, fontWeight: FontWeight.bold),
style: GoogleFonts.poppins(
color: Colors.white, fontWeight: FontWeight.bold),
),
),
],
@ -338,28 +346,22 @@ class _CdPolicieState extends State<CdPolicies> {
Expanded(
flex: 4,
child: Text(
item['insurer_name'] ?? '-',
style: GoogleFonts.poppins(
color: Color(0xFF000000)
),
item['insurer_name'] ?? '-',
style: GoogleFonts.poppins(color: Color(0xFF000000)),
),
),
Expanded(
flex: 3,
child: Text(
item['cd_master_account_no'] ?? '-',
style: GoogleFonts.poppins(
color: Color(0xFF000000)
),
item['cd_master_account_no'] ?? '-',
style: GoogleFonts.poppins(color: Color(0xFF000000)),
),
),
Expanded(
flex: 2,
child: Text(
"${item['balance'] ?? '0'}",
style: GoogleFonts.poppins(
color: Color(0xFF000000)
),
"${item['balance'] ?? '0'}",
style: GoogleFonts.poppins(color: Color(0xFF000000)),
),
),
Expanded(
@ -372,16 +374,14 @@ class _CdPolicieState extends State<CdPolicies> {
context,
MaterialPageRoute(
builder: (context) => cdTransactionDetails(
insurerName: item['insurer_name'],
cdMasterAccountNo: item['cd_master_account_no'],
insurerId: item['insurer_id'],
cd_ac_pk: item['cd_ac_pk'],
empClientId: widget.empClientId,
postToken:widget.postToken
),
insurerName: item['insurer_name'],
cdMasterAccountNo: item['cd_master_account_no'],
insurerId: item['insurer_id'],
cd_ac_pk: item['cd_ac_pk'],
empClientId: widget.empClientId,
postToken: widget.postToken),
),
);
},
),
),

File diff suppressed because it is too large Load Diff

View File

@ -58,6 +58,7 @@ dependencies:
google_sign_in: ^6.2.1
firebase_auth_web: ^5.12.4
archive: ^3.4.9
dropdown_search: ^6.0.2
dev_dependencies: