FIX_excel
This commit is contained in:
parent
eb9590b808
commit
3aad3c0538
File diff suppressed because one or more lines are too long
@ -2768,10 +2768,37 @@ class ApiService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Future<void> generateEndorsementExcel(managerId,searchValue) async {
|
Future<void> generateEndorsementExcel(
|
||||||
final url = Uri.parse(
|
managerId, {
|
||||||
'${Env.apiUrl}reports/endorsement-excel?manager_id=$managerId',
|
String? searchValue,
|
||||||
|
String? fromDate,
|
||||||
|
String? toDate,
|
||||||
|
String? endorsementType,
|
||||||
|
String? insurerId,
|
||||||
|
String? status,
|
||||||
|
String? verification,
|
||||||
|
String? agentId,
|
||||||
|
String? policyNumber,
|
||||||
|
}) async {
|
||||||
|
final queryParams = <String, String>{
|
||||||
|
'manager_id': managerId.toString(),
|
||||||
|
'from_date': fromDate ?? '',
|
||||||
|
'to_date': toDate ?? '',
|
||||||
|
'endorsement_type': endorsementType ?? '',
|
||||||
|
'insurer_id': insurerId ?? '',
|
||||||
|
'status': status ?? '',
|
||||||
|
'verification': verification ?? '',
|
||||||
|
'search': searchValue ?? '',
|
||||||
|
'agent_id': agentId ?? '',
|
||||||
|
'policy_number': policyNumber ?? '',
|
||||||
|
};
|
||||||
|
final url = Uri.parse('${Env.apiUrl}reports/endorsement-excel').replace(
|
||||||
|
queryParameters: queryParams,
|
||||||
);
|
);
|
||||||
|
// final url = Uri.parse('http://localhost/nhance_partner_be/reports/endorsement-excel').replace(
|
||||||
|
// queryParameters: queryParams,
|
||||||
|
// );
|
||||||
|
|
||||||
print('getPdfDownload endorsement-excel - $url');
|
print('getPdfDownload endorsement-excel - $url');
|
||||||
await _initializeToken();
|
await _initializeToken();
|
||||||
|
|
||||||
|
|||||||
@ -138,6 +138,9 @@ class claimListState extends ConsumerState<claimList> {
|
|||||||
(item['claim_number'] ?? '-').toLowerCase().contains(
|
(item['claim_number'] ?? '-').toLowerCase().contains(
|
||||||
query.toLowerCase(),
|
query.toLowerCase(),
|
||||||
) ||
|
) ||
|
||||||
|
(item['claim_status_value'] ?? '-').toLowerCase().contains(
|
||||||
|
query.toLowerCase(),
|
||||||
|
) ||
|
||||||
(_formatDate(
|
(_formatDate(
|
||||||
item['policy_end_date'] ?? '-',
|
item['policy_end_date'] ?? '-',
|
||||||
).toLowerCase()).contains(query.toLowerCase());
|
).toLowerCase()).contains(query.toLowerCase());
|
||||||
|
|||||||
@ -429,7 +429,35 @@ class endosementState extends ConsumerState<Endorsement> {
|
|||||||
|
|
||||||
Future<void> fetchEndorsementExcelReport() async {
|
Future<void> fetchEndorsementExcelReport() async {
|
||||||
final String searchValue = rightSearchController.text;
|
final String searchValue = rightSearchController.text;
|
||||||
final response = await apiService.generateEndorsementExcel(managerId,searchValue);
|
await apiService.generateEndorsementExcel(
|
||||||
|
managerId,
|
||||||
|
searchValue: searchValue,
|
||||||
|
fromDate: startController.text.isNotEmpty
|
||||||
|
? DateFormat('yyyy-MM-dd')
|
||||||
|
.format(DateFormat('dd-MM-yyyy').parse(startController.text))
|
||||||
|
: '',
|
||||||
|
toDate: endController.text.isNotEmpty
|
||||||
|
? DateFormat('yyyy-MM-dd')
|
||||||
|
.format(DateFormat('dd-MM-yyyy').parse(endController.text))
|
||||||
|
: '',
|
||||||
|
endorsementType: selectedEndorsementTypeVal?.toString() ?? '',
|
||||||
|
insurerId: selectedInsurerVal?.toString() ?? '',
|
||||||
|
status: selectedStatusVal == 'All'
|
||||||
|
? ''
|
||||||
|
: selectedStatusVal == 'Open'
|
||||||
|
? 'Open'
|
||||||
|
: selectedStatusVal == 'Closed'
|
||||||
|
? 'Closed'
|
||||||
|
: '',
|
||||||
|
verification: selectedVerificationVal == 2
|
||||||
|
? ''
|
||||||
|
: selectedVerificationVal == 0
|
||||||
|
? 'To Verify'
|
||||||
|
: selectedVerificationVal == 1
|
||||||
|
? 'Verified'
|
||||||
|
: '',
|
||||||
|
policyNumber: '',
|
||||||
|
);
|
||||||
// Map your controllers and IDs to the API parameters
|
// Map your controllers and IDs to the API parameters
|
||||||
// final String fromDate = controllers['startDate']!.text; // "11-01-2025"
|
// final String fromDate = controllers['startDate']!.text; // "11-01-2025"
|
||||||
// final String toDate = controllers['endDate']!.text; // "20-01-2025"
|
// final String toDate = controllers['endDate']!.text; // "20-01-2025"
|
||||||
|
|||||||
@ -121,9 +121,12 @@ class PosListState extends ConsumerState<PosList> {
|
|||||||
final isActiveStatus = item['is_active'] == "1" ? "active" : "inactive";
|
final isActiveStatus = item['is_active'] == "1" ? "active" : "inactive";
|
||||||
|
|
||||||
return (item['name'] ?? '').toString().toLowerCase().contains(q) ||
|
return (item['name'] ?? '').toString().toLowerCase().contains(q) ||
|
||||||
|
(item['pos_code'] ?? '').toString().toLowerCase().contains(q) ||
|
||||||
(item['email'] ?? '').toString().toLowerCase().contains(q) ||
|
(item['email'] ?? '').toString().toLowerCase().contains(q) ||
|
||||||
(item['mobile'] ?? '').toString().toLowerCase().contains(q) ||
|
(item['mobile'] ?? '').toString().toLowerCase().contains(q) ||
|
||||||
(item['address'] ?? '').toString().toLowerCase().contains(q) ||
|
(item['bank_name'] ?? '').toString().toLowerCase().contains(q) ||
|
||||||
|
(item['aadhar'] ?? '').toString().toLowerCase().contains(q) ||
|
||||||
|
(item['pan'] ?? '').toString().toLowerCase().contains(q) ||
|
||||||
(item['emp_id'] ?? item['agent_code'] ?? '')
|
(item['emp_id'] ?? item['agent_code'] ?? '')
|
||||||
.toString()
|
.toString()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user