Code Merged
This commit is contained in:
parent
fefc7d15db
commit
fba7f9a639
File diff suppressed because one or more lines are too long
@ -7,6 +7,7 @@ class Env {
|
||||
'API_URL',
|
||||
// defaultValue: 'https://partner.nhanceindia.in/partner_api/api/', /* Live build (enable index.html line 18) */
|
||||
defaultValue: 'https://venbait.in/nhance/partner/dev/api/', /* Test build (enable index.html line 19) */
|
||||
// defaultValue: 'http://localhost/nhance_partner_be/', /* localhost build (enable index.html line 19) */
|
||||
);
|
||||
// static const String baseUrl = String.fromEnvironment(
|
||||
// 'BASE_URL',
|
||||
|
||||
@ -92,14 +92,14 @@ class ApiService {
|
||||
// --------------------------- COMMON FILES __________________________________________
|
||||
|
||||
Future<Map<String, dynamic>> createUserData(data, path) async {
|
||||
print('path - $path');
|
||||
// print('path - $path');
|
||||
final url = Uri.parse('${Env.apiUrl}$path');
|
||||
|
||||
if (_token == null) {
|
||||
await _initializeToken();
|
||||
}
|
||||
|
||||
print("data------- $data}");
|
||||
// print("data------- $data}");
|
||||
|
||||
final headers = {
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
@ -204,8 +204,8 @@ class ApiService {
|
||||
final msg = data['message'] ?? "Already exists";
|
||||
final field = data['field'] ?? "";
|
||||
|
||||
print("$field - $value : $msg");
|
||||
print("EXIST REG");
|
||||
// print("$field - $value : $msg");
|
||||
// print("EXIST REG");
|
||||
|
||||
return {"message": msg, "field": field};
|
||||
} else {
|
||||
@ -229,7 +229,7 @@ class ApiService {
|
||||
Future<void> getPdfDownload1(path, id) async {
|
||||
|
||||
print('GetDownload');
|
||||
// final url = Uri.parse('https://venbait.in/nhance/partner/dev/$path');
|
||||
|
||||
final url = Uri.parse('${Env.apiUrl}$path');
|
||||
print('GetDownload - $url');
|
||||
await _initializeToken();
|
||||
@ -318,16 +318,16 @@ class ApiService {
|
||||
String path,
|
||||
String id,
|
||||
) async {
|
||||
print('getPdfDownload 1 - $path');
|
||||
print('Sa - getPdfDownload - $path');
|
||||
|
||||
// if (path.isEmpty) {
|
||||
// ToastHelper.showInfoToast(context, 'No file path found.');
|
||||
// return;
|
||||
// }
|
||||
// final url = Uri.parse('https://venbait.in/nhance/partner/dev/$path');
|
||||
|
||||
final url = Uri.parse('${Env.apiUrl}$path');
|
||||
// final url = Uri.parse('${Env.apiUrl}$path');
|
||||
print('getPdfDownload 2 - $url');
|
||||
print('Sb - getPdfDownload - $url');
|
||||
await _initializeToken();
|
||||
|
||||
if (_token == null) throw Exception('Token not found. Please log in.');
|
||||
@ -353,7 +353,7 @@ class ApiService {
|
||||
} else {
|
||||
final blob = html.Blob([response.bodyBytes]);
|
||||
final blobUrl = html.Url.createObjectUrlFromBlob(blob);
|
||||
print('getPdfDownload $blobUrl');
|
||||
print('Sc - getPdfDownload - $blobUrl');
|
||||
// --- filename resolution ---
|
||||
// String fileName = 'download_$id';
|
||||
// print('getPdfDownloadfileName $fileName');
|
||||
@ -371,10 +371,10 @@ class ApiService {
|
||||
// }
|
||||
|
||||
final contentDisp = response.headers['content-disposition'];
|
||||
print('getPdfDownloadcontentDisp $contentDisp');
|
||||
print('Sd getPdfDownloadcontentDisp $contentDisp');
|
||||
|
||||
String fileName = extractFileName(contentDisp, path.split('/').last);
|
||||
print('Resolved fileName: $fileName');
|
||||
print('Se Resolved fileName: $fileName');
|
||||
final anchor = html.AnchorElement(href: blobUrl)
|
||||
..setAttribute('download', fileName)
|
||||
..click();
|
||||
@ -399,7 +399,7 @@ class ApiService {
|
||||
} else if (response.statusCode == 500) {
|
||||
ToastHelper.show('No File Found', Colors.red);
|
||||
} else if (response.statusCode == 302) {
|
||||
print('getPdfDownload 3-PP-302');
|
||||
print('Sf getPdfDownload 3-PP-302');
|
||||
ToastHelper.show('No File Found', Colors.red);
|
||||
} else {
|
||||
ToastHelper.show('No File Found', Colors.red);
|
||||
@ -415,7 +415,7 @@ class ApiService {
|
||||
dynamic managerId,
|
||||
{DateTime? toDate, DateTime? fromDate}
|
||||
) async {
|
||||
print('getPdfDownload 1 - $path');
|
||||
print('Sq getxl 1 - $path');
|
||||
|
||||
dynamic pathVal;
|
||||
// if (path == 'Insurer') {
|
||||
@ -478,7 +478,7 @@ class ApiService {
|
||||
// print('Final Excel URL => $pathVal');
|
||||
|
||||
final url = Uri.parse('${Env.apiUrl}$pathVal'); // original
|
||||
print('getPdfDownload 2 - $url');
|
||||
print('sq1 2 - $url');
|
||||
await _initializeToken();
|
||||
|
||||
if (_token == null) throw Exception('Token not found. Please log in.');
|
||||
@ -504,12 +504,12 @@ class ApiService {
|
||||
} else {
|
||||
final blob = html.Blob([response.bodyBytes]);
|
||||
final blobUrl = html.Url.createObjectUrlFromBlob(blob);
|
||||
print('getPdfDownload $blobUrl');
|
||||
print('sq1 3 $blobUrl');
|
||||
final contentDisp = response.headers['content-disposition'];
|
||||
print('getPdfDownloadcontentDisp $contentDisp');
|
||||
|
||||
String fileName = extractFileName(contentDisp, path.split('/').last);
|
||||
print('Resolved fileName: $fileName');
|
||||
print('sq 4 Resolved fileName: $fileName');
|
||||
final anchor = html.AnchorElement(href: blobUrl)
|
||||
..setAttribute('download', fileName)
|
||||
..click();
|
||||
@ -534,7 +534,7 @@ class ApiService {
|
||||
} else if (response.statusCode == 500) {
|
||||
ToastHelper.show('No File Found', Colors.red);
|
||||
} else if (response.statusCode == 302) {
|
||||
print('getPdfDownload 3-PP-302');
|
||||
print('sq 3-PP-302');
|
||||
ToastHelper.show('No File Found', Colors.red);
|
||||
} else {
|
||||
ToastHelper.show('No File Found', Colors.red);
|
||||
@ -550,7 +550,7 @@ class ApiService {
|
||||
String month,
|
||||
dynamic managerId,
|
||||
) async {
|
||||
print('getPdfDownload 1 - $path');
|
||||
print('sm 1 - $path');
|
||||
|
||||
dynamic pathVal;
|
||||
|
||||
@ -558,8 +558,8 @@ class ApiService {
|
||||
'dashboard/downloadExcelStaffAndProduct?manager_id=$managerId&month=$month&sales_executive_id=$salesId&vehicle_type=$id';
|
||||
|
||||
final url = Uri.parse('${Env.apiUrl}$pathVal');
|
||||
// final url = Uri.parse('https://venbait.in/nhance/partner/dev/$path');
|
||||
print('getPdfDownload 2 - $url');
|
||||
|
||||
print('sm 2 - $url');
|
||||
await _initializeToken();
|
||||
|
||||
if (_token == null) throw Exception('Token not found. Please log in.');
|
||||
@ -585,12 +585,12 @@ class ApiService {
|
||||
} else {
|
||||
final blob = html.Blob([response.bodyBytes]);
|
||||
final blobUrl = html.Url.createObjectUrlFromBlob(blob);
|
||||
print('getPdfDownload $blobUrl');
|
||||
print('sm 3 $blobUrl');
|
||||
final contentDisp = response.headers['content-disposition'];
|
||||
print('getPdfDownloadcontentDisp $contentDisp');
|
||||
print('sm4 $contentDisp');
|
||||
|
||||
String fileName = extractFileName(contentDisp, path.split('/').last);
|
||||
print('Resolved fileName: $fileName');
|
||||
print('sm 5 Resolved fileName: $fileName');
|
||||
final anchor = html.AnchorElement(href: blobUrl)
|
||||
..setAttribute('download', fileName)
|
||||
..click();
|
||||
@ -615,7 +615,7 @@ class ApiService {
|
||||
} else if (response.statusCode == 500) {
|
||||
ToastHelper.show('No File Found', Colors.red);
|
||||
} else if (response.statusCode == 302) {
|
||||
print('getPdfDownload 3-PP-302');
|
||||
print('smno 3-PP-302');
|
||||
ToastHelper.show('No File Found', Colors.red);
|
||||
} else {
|
||||
ToastHelper.show('No File Found', Colors.red);
|
||||
@ -757,9 +757,7 @@ class ApiService {
|
||||
} else {
|
||||
url = Uri.parse('${Env.apiUrl}dashboard/agentDashboard?agent_id=$userId');
|
||||
}
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/agent/agentList?manager_id=${managerId}',
|
||||
// );
|
||||
|
||||
final headers = {
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'app-signature': Env.App_Signature,
|
||||
@ -850,9 +848,7 @@ class ApiService {
|
||||
'${Env.apiUrl}agent/agentIncentiveFileList?agent_id=${agentId}',
|
||||
);
|
||||
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/agent/agentIncentiveFileList?agent_id=${agentId}',
|
||||
// );
|
||||
|
||||
final headers = {
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'app-signature': Env.App_Signature,
|
||||
@ -903,10 +899,8 @@ class ApiService {
|
||||
if (_token == null) {
|
||||
await _initializeToken();
|
||||
}
|
||||
// final url = Uri.parse('${Env.apiUrl}/api/agent/agentList');
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/agent/findAgent?id=$id',
|
||||
// );
|
||||
// final url = Uri.parse('${Env.apiUrl}agent/agentList');
|
||||
|
||||
|
||||
final url = Uri.parse('${Env.apiUrl}agent/findAgent?id=$id');
|
||||
final headers = {
|
||||
@ -922,10 +916,7 @@ class ApiService {
|
||||
if (_token == null) {
|
||||
await _initializeToken();
|
||||
}
|
||||
// final url = Uri.parse('${Env.apiUrl}/api/agent/agentList');
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/agent/deleteAgentIncentiveFile?id=$id',
|
||||
// );
|
||||
// final url = Uri.parse('${Env.apiUrl}agent/agentList');
|
||||
|
||||
final url = Uri.parse('${Env.apiUrl}agent/deleteAgentIncentiveFile?id=$id');
|
||||
final headers = {
|
||||
@ -946,10 +937,6 @@ class ApiService {
|
||||
await _initializeToken();
|
||||
}
|
||||
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/staff/staffList?manager_id=${managerId}',
|
||||
// );
|
||||
|
||||
dynamic url;
|
||||
if (role == 'manager') {
|
||||
print('manager');
|
||||
@ -977,10 +964,8 @@ class ApiService {
|
||||
if (_token == null) {
|
||||
await _initializeToken();
|
||||
}
|
||||
// final url = Uri.parse('${Env.apiUrl}/api/staff/findStaff?id=$id');
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/staff/findStaff?id=$id',
|
||||
// );
|
||||
// final url = Uri.parse('${Env.apiUrl}staff/findStaff?id=$id');
|
||||
|
||||
|
||||
final url = Uri.parse('${Env.apiUrl}staff/findStaff?id=$id');
|
||||
final headers = {
|
||||
@ -1296,10 +1281,6 @@ class ApiService {
|
||||
await _initializeToken();
|
||||
}
|
||||
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/staff/staffList?manager_id=${managerId}',
|
||||
// );
|
||||
|
||||
final url = Uri.parse(
|
||||
'${Env.apiUrl}quotation/quotationList?manager_id=${managerId}',
|
||||
);
|
||||
@ -1375,9 +1356,7 @@ class ApiService {
|
||||
// else {
|
||||
// url = Uri.parse('${Env.apiUrl}endorsement/endorsementList?agent_id=$id');
|
||||
// }
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/agent/agentList?manager_id=${managerId}',
|
||||
// );
|
||||
|
||||
final headers = {
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'app-signature': Env.App_Signature,
|
||||
@ -1437,9 +1416,7 @@ class ApiService {
|
||||
// );
|
||||
// }
|
||||
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/agent/agentList?manager_id=${managerId}',
|
||||
// );
|
||||
|
||||
final headers = {
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'app-signature': Env.App_Signature,
|
||||
@ -1515,9 +1492,7 @@ class ApiService {
|
||||
url = Uri.parse('${Env.apiUrl}claim/ClaimList?staff_id=$userId');
|
||||
}
|
||||
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/agent/agentList?manager_id=${managerId}',
|
||||
// );
|
||||
|
||||
final headers = {
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'app-signature': Env.App_Signature,
|
||||
@ -1570,9 +1545,7 @@ class ApiService {
|
||||
} else {
|
||||
url = Uri.parse('${Env.apiUrl}endorsement/endorsementList?staff_id=$id');
|
||||
}
|
||||
// final url = Uri.parse(
|
||||
// 'https://venbait.in/nhance/partner/dev/api/agent/agentList?manager_id=${managerId}',
|
||||
// );
|
||||
|
||||
final headers = {
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'app-signature': Env.App_Signature,
|
||||
@ -2114,9 +2087,6 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Env.apiUrl}reports/policy-excel?manager_id=$managerId&from_date=${fromDate ?? ''}&to_date=${toDate ?? ''}&search=${searchValue ?? ''}',
|
||||
);
|
||||
|
||||
// final url = Uri.parse( 'http://localhost/nhance_partner_be/reports/policy-excel?manager_id=$managerId&from_date=${fromDate ?? ''}&to_date=${toDate ?? ''}&search=${searchValue ?? ''}', );
|
||||
|
||||
print('getPdfDownload policy-excel - $url');
|
||||
await _initializeToken();
|
||||
|
||||
|
||||
@ -156,7 +156,7 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
||||
updateData();
|
||||
}
|
||||
|
||||
// api/enquiry/enquiryList?enquiry_id=1
|
||||
// enquiry/enquiryList?enquiry_id=1
|
||||
Future<void> _initializeToken() async {
|
||||
_token = await AuthService.getToken();
|
||||
print("APISERTOKEN - $_token");
|
||||
@ -189,7 +189,7 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
||||
print('API Data - $getVehicleTypeData');
|
||||
|
||||
filteredVechicleData = List.from(getVehicleTypeData);
|
||||
print('originalData - $filteredVechicleData');
|
||||
// print('originalData - $filteredVechicleData');
|
||||
});
|
||||
} else {
|
||||
getVehicleTypeData = [];
|
||||
@ -220,7 +220,7 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
||||
print('API Data - $getInsurersData');
|
||||
|
||||
filteredInsurersData = List.from(getInsurersData);
|
||||
print('originalData - $filteredInsurersData');
|
||||
// print('originalData - $filteredInsurersData');
|
||||
});
|
||||
} else {
|
||||
getInsurersData = [];
|
||||
@ -1227,9 +1227,9 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
|
||||
@ -1258,9 +1258,9 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedIDProof,
|
||||
@ -1289,9 +1289,9 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedPrevPolicy,
|
||||
|
||||
@ -370,7 +370,7 @@ class _AddDialogState extends State<AddDialog> {
|
||||
print('API Data - $getClaimsTypeData');
|
||||
|
||||
filteredClaimsData = List.from(getClaimsTypeData);
|
||||
print('originalData - $filteredClaimsData');
|
||||
// print('originalData - $filteredClaimsData');
|
||||
});
|
||||
} else {
|
||||
getClaimsTypeData = [];
|
||||
@ -401,7 +401,7 @@ class _AddDialogState extends State<AddDialog> {
|
||||
print('API Data - $getEndrosmentType');
|
||||
|
||||
filteredEndrosmentData = List.from(getEndrosmentType);
|
||||
print('originalData - $filteredEndrosmentData');
|
||||
// print('originalData - $filteredEndrosmentData');
|
||||
});
|
||||
} else {
|
||||
getEndrosmentType = [];
|
||||
@ -1025,7 +1025,7 @@ class _AddDialogState extends State<AddDialog> {
|
||||
// // GestureDetector(
|
||||
// // onTap: () => apiService.downloadFile(
|
||||
// // apiUrl:
|
||||
// // 'api/agent/downloadAgentCertificateFile?agent_id=$selectedClaimId',
|
||||
// // 'agent/downloadAgentCertificateFile?agent_id=$selectedClaimId',
|
||||
// // apiId: selectedClaimId,
|
||||
// // localFile: docUploadedFile,
|
||||
// // fileName: selectedClaimFileNames,
|
||||
@ -1312,7 +1312,7 @@ class _AddDialogState extends State<AddDialog> {
|
||||
// // GestureDetector(
|
||||
// // onTap: () => apiService.downloadFile(
|
||||
// // apiUrl:
|
||||
// // 'api/agent/downloadAgentCertificateFile?agent_id=$selectedEndorsId',
|
||||
// // 'agent/downloadAgentCertificateFile?agent_id=$selectedEndorsId',
|
||||
// // apiId: selectedEndorsId,
|
||||
// // localFile: docUploadedEndorsFile,
|
||||
// // fileName: selectedFileNames,
|
||||
|
||||
@ -218,9 +218,9 @@ class PolicyTabState extends ConsumerState<PolicyTab> {
|
||||
// print("Upload ${widget.id}");
|
||||
// final selectedId = widget.id;
|
||||
// // final path =
|
||||
// // 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// // 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// final path =
|
||||
// 'api/policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_payment_receipt';
|
||||
// 'policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_payment_receipt';
|
||||
// apiService.getPdfDownload(path, selectedId);
|
||||
// },
|
||||
// child: Container(
|
||||
@ -439,9 +439,9 @@ class PolicyTabState extends ConsumerState<PolicyTab> {
|
||||
print("Upload ${widget.id}");
|
||||
final selectedId = widget.id;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_pdf';
|
||||
'policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_pdf';
|
||||
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -479,9 +479,9 @@ class PolicyTabState extends ConsumerState<PolicyTab> {
|
||||
print("Upload ${widget.id}");
|
||||
final selectedId = widget.id;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_payment_receipt';
|
||||
'policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_payment_receipt';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@ -735,7 +735,7 @@ class QuotationTabState extends ConsumerState<QuotationTab> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
apiUrl: 'api/quotation/downloadAdditionalUploadedFile?id=$selectedId',
|
||||
apiUrl: 'quotation/downloadAdditionalUploadedFile?id=$selectedId',
|
||||
apiId: selectedId,
|
||||
localFile: docUploadedFile,
|
||||
fileName: selectedFileNames,
|
||||
|
||||
@ -668,7 +668,7 @@ class _UpdateEndorsementDialogState extends State<UpdateEndorsementDialog> {
|
||||
// // GestureDetector(
|
||||
// // onTap: () => apiService.downloadFile(
|
||||
// // apiUrl:
|
||||
// // 'api/agent/downloadAgentCertificateFile?agent_id=$selectedEndorsId',
|
||||
// // 'agent/downloadAgentCertificateFile?agent_id=$selectedEndorsId',
|
||||
// // apiId: selectedEndorsId,
|
||||
// // localFile: docUploadedFile,
|
||||
// // fileName: selectedFileNames,
|
||||
|
||||
@ -206,7 +206,7 @@ class endosementState extends ConsumerState<endosement> {
|
||||
onTap: () {
|
||||
Navigator.pop(context); // Close the menu first
|
||||
apiService.downloadFile(
|
||||
apiUrl: 'api/endorsement/downloadEndorsementCompletionFile?id=$Id',
|
||||
apiUrl: 'endorsement/downloadEndorsementCompletionFile?id=$Id',
|
||||
apiId: Id,
|
||||
localFile: null,
|
||||
fileName: fileName,
|
||||
@ -665,7 +665,7 @@ class endosementState extends ConsumerState<endosement> {
|
||||
const SizedBox(width: 12),
|
||||
InkWell(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl: 'api/endorsement/downloadEndorsementCompletionFile?id=$Id',
|
||||
apiUrl: 'endorsement/downloadEndorsementCompletionFile?id=$Id',
|
||||
apiId: Id,
|
||||
localFile: null,
|
||||
fileName: fileName,
|
||||
|
||||
@ -229,9 +229,7 @@ class AgentState extends ConsumerState<Agent> {
|
||||
|
||||
final id = widget.id;
|
||||
final uri = Uri.parse(
|
||||
// isUpdating
|
||||
// ? 'https://venbait.in/nhance/partner/dev/api/agent/updateAgent'
|
||||
// : 'https://venbait.in/nhance/partner/dev/api/agent/createAgent',
|
||||
|
||||
isUpdating
|
||||
? '${Env.apiUrl}agent/updateAgent'
|
||||
: '${Env.apiUrl}agent/createAgent',
|
||||
@ -402,7 +400,7 @@ class AgentState extends ConsumerState<Agent> {
|
||||
// } else if (passportFileUrlFromApi != null) {
|
||||
// print("Download from API: $passportFileUrlFromApi");
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId';
|
||||
// 'agent/downloadAgentCertificateFile?agent_id=$selectedId';
|
||||
//
|
||||
// apiService.getPdfDownload(path, selectedId);
|
||||
// }
|
||||
@ -949,7 +947,7 @@ class AgentState extends ConsumerState<Agent> {
|
||||
InkWell(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiId: selectedId,
|
||||
localFile: docUploadedFile,
|
||||
fileName: selectedFileNames,
|
||||
@ -1039,7 +1037,7 @@ class AgentState extends ConsumerState<Agent> {
|
||||
// print("Raw file path: $passportFileUrlFromApi");
|
||||
//
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId';
|
||||
// 'agent/downloadAgentCertificateFile?agent_id=$selectedId';
|
||||
//
|
||||
// apiService.getPdfDownload(path, selectedId);
|
||||
// } else {
|
||||
@ -1084,7 +1082,7 @@ class AgentState extends ConsumerState<Agent> {
|
||||
// // print("Raw file path: $passportFileUrlFromApi");
|
||||
// //
|
||||
// // final path =
|
||||
// // 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId';
|
||||
// // 'agent/downloadAgentCertificateFile?agent_id=$selectedId';
|
||||
// //
|
||||
// // apiService.getPdfDownload(path, selectedId);
|
||||
// // } else {
|
||||
|
||||
@ -157,7 +157,7 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
|
||||
print('API Data - $getAgentData');
|
||||
|
||||
filteredData = List.from(getAgentData);
|
||||
print('originalData - $filteredData');
|
||||
// print('originalData - $filteredData');
|
||||
});
|
||||
} else {
|
||||
getAgentData = [];
|
||||
@ -190,7 +190,7 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
|
||||
print('API AgentIncentive - $getAgentIncentiveFileData');
|
||||
|
||||
filteredIncentiveData = List.from(getAgentIncentiveFileData);
|
||||
print('originalData - $filteredIncentiveData');
|
||||
// print('originalData - $filteredIncentiveData');
|
||||
});
|
||||
} else {
|
||||
getAgentIncentiveFileData = [];
|
||||
@ -234,7 +234,7 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
|
||||
|
||||
Future<void> uploadIncentiveData(Map<String, dynamic> dataSet) async {
|
||||
final uri = Uri.parse('${Env.apiUrl}agent/uploadAgentIncentiveFile');
|
||||
// 'https://venbait.in/nhance/partner/dev/api/agent/uploadAgentIncentiveFile',
|
||||
|
||||
if (_token == null) {
|
||||
throw Exception('Token not found. Please log in.');
|
||||
}
|
||||
@ -745,7 +745,7 @@ class UploadIncentiveModalState extends ConsumerState<UploadIncentiveModal> {
|
||||
print("Upload ${file['id']}");
|
||||
final selectedId = file['id'];
|
||||
final path =
|
||||
'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
onDelete: () async {
|
||||
|
||||
@ -109,7 +109,7 @@ class ProfileState extends ConsumerState<Profile> {
|
||||
print('API AgentIncentive - $getAgentIncentiveFileData');
|
||||
|
||||
filteredIncentiveData = List.from(getAgentIncentiveFileData);
|
||||
print('originalData - $filteredIncentiveData');
|
||||
// print('originalData - $filteredIncentiveData');
|
||||
|
||||
// Sort descending by created_on
|
||||
filteredIncentiveData.sort((a, b) {
|
||||
@ -289,10 +289,10 @@ class ProfileState extends ConsumerState<Profile> {
|
||||
roleId == 2 &&
|
||||
roleId == 3) {
|
||||
path =
|
||||
'api/staff/downloadManagerIncentiveFile?id=$latestId';
|
||||
'staff/downloadManagerIncentiveFile?id=$latestId';
|
||||
} else {
|
||||
path =
|
||||
'api/agent/downloadAgentIncentiveFile?id=$latestId';
|
||||
'agent/downloadAgentIncentiveFile?id=$latestId';
|
||||
}
|
||||
apiService.getPdfDownload(
|
||||
path,
|
||||
@ -384,10 +384,10 @@ class ProfileState extends ConsumerState<Profile> {
|
||||
roleId == 2 &&
|
||||
roleId == 3) {
|
||||
path =
|
||||
'api/staff/downloadManagerIncentiveFile?id=$selectedId';
|
||||
'staff/downloadManagerIncentiveFile?id=$selectedId';
|
||||
} else {
|
||||
path =
|
||||
'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
}
|
||||
apiService.getPdfDownload(
|
||||
path,
|
||||
@ -554,10 +554,10 @@ class ProfileState extends ConsumerState<Profile> {
|
||||
print('teRole - $roleId');
|
||||
|
||||
path =
|
||||
'api/staff/downloadManagerIncentiveFile?id=$latestId';
|
||||
'staff/downloadManagerIncentiveFile?id=$latestId';
|
||||
} else {
|
||||
path =
|
||||
'api/agent/downloadAgentIncentiveFile?id=$latestId';
|
||||
'agent/downloadAgentIncentiveFile?id=$latestId';
|
||||
}
|
||||
apiService.getPdfDownload(
|
||||
path,
|
||||
@ -649,10 +649,10 @@ class ProfileState extends ConsumerState<Profile> {
|
||||
roleId == 2 &&
|
||||
roleId == 3) {
|
||||
path =
|
||||
'api/staff/downloadManagerIncentiveFile?id=$selectedId';
|
||||
'staff/downloadManagerIncentiveFile?id=$selectedId';
|
||||
} else {
|
||||
path =
|
||||
'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
}
|
||||
apiService.getPdfDownload(
|
||||
path,
|
||||
|
||||
@ -43,7 +43,7 @@ class ProfilePopUpState extends ConsumerState<ProfilePopUp> {
|
||||
// if (id != null) {
|
||||
// getAgentList(id);
|
||||
//
|
||||
// // api/staff/managerIncentiveFileList?manager_id=1
|
||||
// // staff/managerIncentiveFileList?manager_id=1
|
||||
// }
|
||||
// });
|
||||
}
|
||||
@ -314,10 +314,10 @@ class ProfilePopUpState extends ConsumerState<ProfilePopUp> {
|
||||
|
||||
if (roleId == 1) {
|
||||
path =
|
||||
'api/staff/downloadManagerIncentiveFile?id=$latestId';
|
||||
'staff/downloadManagerIncentiveFile?id=$latestId';
|
||||
} else if (roleId != 1 && roleId != 2) {
|
||||
path =
|
||||
'api/agent/downloadAgentIncentiveFile?id=$latestId';
|
||||
'agent/downloadAgentIncentiveFile?id=$latestId';
|
||||
}
|
||||
apiService.getPdfDownload(path, latestId);
|
||||
},
|
||||
@ -397,10 +397,10 @@ class ProfilePopUpState extends ConsumerState<ProfilePopUp> {
|
||||
|
||||
if (roleId == 1) {
|
||||
path =
|
||||
'api/staff/downloadManagerIncentiveFile?id=$selectedId';
|
||||
'staff/downloadManagerIncentiveFile?id=$selectedId';
|
||||
} else if (roleId != 1 && roleId != 2) {
|
||||
path =
|
||||
'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
}
|
||||
apiService.getPdfDownload(
|
||||
path,
|
||||
|
||||
@ -188,9 +188,6 @@ class StaffState extends ConsumerState<Staff> {
|
||||
final bool isUpdating = widget.id != null && widget.id != 'Create';
|
||||
final String? id = isUpdating ? widget.id : null;
|
||||
final String apiUrldata;
|
||||
// apiUrldata = isUpdating
|
||||
// ? 'https://venbait.in/nhance/partner/dev/api/staff/updateStaff'
|
||||
// : 'https://venbait.in/nhance/partner/dev/api/staff/createStaff';
|
||||
|
||||
apiUrldata = isUpdating
|
||||
? '${Env.apiUrl}staff/updateStaff'
|
||||
|
||||
@ -1501,9 +1501,9 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
|
||||
@ -1535,9 +1535,9 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedIDProof,
|
||||
@ -1568,9 +1568,9 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedPrevPolicy,
|
||||
@ -1585,9 +1585,9 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -1623,9 +1623,9 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -1661,9 +1661,9 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
|
||||
print("QD597 Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
|
||||
@ -1725,9 +1725,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInlineTST> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
|
||||
@ -1763,9 +1763,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInlineTST> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedIDProof,
|
||||
@ -1799,9 +1799,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInlineTST> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedPrevPolicy,
|
||||
@ -1819,9 +1819,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInlineTST> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -1858,9 +1858,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInlineTST> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -1896,9 +1896,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInlineTST> {
|
||||
print("QD597 Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
|
||||
@ -2046,9 +2046,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
|
||||
@ -2084,9 +2084,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedIDProof,
|
||||
@ -2120,9 +2120,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedPrevPolicy,
|
||||
@ -2140,9 +2140,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -2179,9 +2179,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -2217,9 +2217,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("QD597 Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
@ -2547,9 +2547,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
onTap: () {
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -2593,9 +2593,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -2634,9 +2634,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("QD597 Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@ -649,14 +649,14 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
final response = await apiService.fetchMasterDropDown('vehicleType');
|
||||
|
||||
if (response['status'] == 200) {
|
||||
print('EIL 2getVT-Data - ${response['data']}');
|
||||
// print('EIL 2getVT-Data - ${response['data']}');
|
||||
setState(() {
|
||||
// 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');
|
||||
// print('EIL 3getVT-B4filterData : $getVehicleTypeData');
|
||||
filteredVehicleData = List.from(getVehicleTypeData);
|
||||
print('EIL 3getVT-AftfilterData : $filteredVehicleData');
|
||||
// print('EIL 3getVT-AftfilterData : $filteredVehicleData');
|
||||
});
|
||||
} else {
|
||||
getVehicleTypeData = [];
|
||||
@ -2924,7 +2924,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
child: InkWell(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/policy/downloadPolicyFile?policy_id=${item["policy_id"]}&file_type=policy_pdf',
|
||||
'policy/downloadPolicyFile?policy_id=${item["policy_id"]}&file_type=policy_pdf',
|
||||
apiId: item["policy_id"],
|
||||
localFile: null,
|
||||
fileName: item['policy_pdf_file_name'],
|
||||
@ -2946,6 +2946,11 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
} else {
|
||||
ToastHelper.showErrorToast(context, 'Please select payment mode');
|
||||
}
|
||||
if (item['vehicle_type'] != null) {
|
||||
_showPolicyUploadMenu(buttonContext, item);
|
||||
} else {
|
||||
ToastHelper.showErrorToast(context, 'Please select vehicle type');
|
||||
}
|
||||
},
|
||||
child: Tooltip(
|
||||
message: 'Click and Upload Policy PDF',
|
||||
@ -3090,8 +3095,8 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
try {
|
||||
|
||||
print('EIL 1getSVT-called');
|
||||
print('EIL 2getSVT-vehicle_type_id ${item['vehicle_type_id']}');
|
||||
print('EIL 3getSVT-vehicle_type ${item['vehicle_type']}');
|
||||
// print('EIL 2getSVT-vehicle_type_id ${item['vehicle_type_id']}');
|
||||
// print('EIL 3getSVT-vehicle_type ${item['vehicle_type']}');
|
||||
|
||||
final result = filteredVehicleData.firstWhere(
|
||||
(vt) {
|
||||
@ -3102,8 +3107,8 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
vt['vehicle_type'].toString().trim().toLowerCase() ==
|
||||
item['vehicle_type'].toString().trim().toLowerCase();
|
||||
|
||||
print('EIL 3getSVT-check id O:${vt['id']} | name O:${vt['vehicle_type']} '); // o means original
|
||||
print('EIL 4getSVT-check id M:$idMatch | name M:$nameMatch'); // M means match
|
||||
// print('EIL 3getSVT-check id O:${vt['id']} | name O:${vt['vehicle_type']} '); // o means original
|
||||
// print('EIL 4getSVT-check id M:$idMatch | name M:$nameMatch'); // M means match
|
||||
|
||||
return idMatch || nameMatch;
|
||||
},
|
||||
|
||||
@ -2305,9 +2305,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
|
||||
@ -2343,9 +2343,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedIDProof,
|
||||
@ -2379,9 +2379,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedPrevPolicy,
|
||||
@ -2399,9 +2399,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -2438,9 +2438,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -2476,9 +2476,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("QD597 Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
@ -2831,9 +2831,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
onTap: () {
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -2877,9 +2877,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -2918,9 +2918,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("QD597 Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -4914,7 +4914,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
child: InkWell(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/policy/downloadPolicyFile?policy_id=${item["policy_id"]}&file_type=policy_pdf',
|
||||
'policy/downloadPolicyFile?policy_id=${item["policy_id"]}&file_type=policy_pdf',
|
||||
apiId: item["policy_id"],
|
||||
localFile: null,
|
||||
fileName: item['policy_pdf_file_name'],
|
||||
|
||||
@ -2775,7 +2775,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
child: InkWell(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/policy/downloadPolicyFile?policy_id=${item["policy_id"]}&file_type=policy_pdf',
|
||||
'policy/downloadPolicyFile?policy_id=${item["policy_id"]}&file_type=policy_pdf',
|
||||
apiId: item["policy_id"],
|
||||
localFile: null,
|
||||
fileName: item['policy_pdf_file_name'],
|
||||
|
||||
@ -1599,9 +1599,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
|
||||
@ -1633,9 +1633,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedIDProof,
|
||||
@ -1666,9 +1666,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
});
|
||||
},
|
||||
onDownload: () => apiService.downloadFile(
|
||||
// apiUrl: 'api/agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
// apiUrl: 'agent/downloadAgentCertificateFile?agent_id=$selectedId',
|
||||
apiUrl:
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy',
|
||||
|
||||
apiId: selectedId.toString(),
|
||||
localFile: docUploadedPrevPolicy,
|
||||
@ -1683,9 +1683,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -1721,9 +1721,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -1759,9 +1759,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
|
||||
print("QD597 Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
|
||||
@ -1437,9 +1437,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
|
||||
onTap: () {
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -1483,9 +1483,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -1524,9 +1524,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
|
||||
print("QD597 Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@ -268,7 +268,7 @@ class MultipleFileWidgetState extends ConsumerState<MultipleFileWidget> {
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFiles?file_id=$fileId';
|
||||
'enquiry/downloadEnquiryFiles?file_id=$fileId';
|
||||
print("Uploadpath $path");
|
||||
apiService.getPdfDownload(path, fileId);
|
||||
},
|
||||
|
||||
@ -1064,9 +1064,9 @@ class PolicyStaffEnqListState extends ConsumerState<PolicyStaffEnqList> {
|
||||
// print("Upload $idget.id}{w");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -1105,9 +1105,9 @@ class PolicyStaffEnqListState extends ConsumerState<PolicyStaffEnqList> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -1142,9 +1142,9 @@ class PolicyStaffEnqListState extends ConsumerState<PolicyStaffEnqList> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -1179,11 +1179,11 @@ class PolicyStaffEnqListState extends ConsumerState<PolicyStaffEnqList> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = acceptedQuotationId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// final path =
|
||||
// 'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
// 'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
final path =
|
||||
'api/quotation/downloadAdditionalUploadedFile?id=$acceptedQuotationId';
|
||||
'quotation/downloadAdditionalUploadedFile?id=$acceptedQuotationId';
|
||||
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -2446,7 +2446,7 @@ class PolicyStaffEnqListState extends ConsumerState<PolicyStaffEnqList> {
|
||||
InkWell(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_pdf',
|
||||
'policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_pdf',
|
||||
apiId: choosedPolcyId,
|
||||
localFile: docPDFUploadedFile,
|
||||
fileName: selectedPDFFileNames,
|
||||
@ -2523,7 +2523,7 @@ class PolicyStaffEnqListState extends ConsumerState<PolicyStaffEnqList> {
|
||||
GestureDetector(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_payment_receipt',
|
||||
'policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_payment_receipt',
|
||||
apiId: choosedPolcyId,
|
||||
localFile: docUploadedFile,
|
||||
fileName: selectedFileNames,
|
||||
|
||||
@ -195,7 +195,7 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
|
||||
print('API Data - $getBrokerData');
|
||||
|
||||
filteredBrokerData = List.from(getBrokerData);
|
||||
print('originalData - $filteredBrokerData');
|
||||
// print('originalData - $filteredBrokerData');
|
||||
});
|
||||
} else {
|
||||
getBrokerData = [];
|
||||
@ -1320,9 +1320,9 @@ class CreateProposalFormState extends ConsumerState<CreateProposalForm> {
|
||||
// GestureDetector(
|
||||
// onTap: () => apiService.downloadFile(
|
||||
// // apiUrl:
|
||||
// // 'api/quotation/downloadAdditionalUploadedFile?id=$selectedId',
|
||||
// // 'quotation/downloadAdditionalUploadedFile?id=$selectedId',
|
||||
// apiUrl:
|
||||
// 'api/policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_pdf',
|
||||
// 'policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_pdf',
|
||||
// apiId: selectedId,
|
||||
// localFile: docUploadedFile,
|
||||
// fileName: selectedFileNames,
|
||||
|
||||
@ -291,9 +291,6 @@ class CreateQuotationFormState extends ConsumerState<CreateQuotationForm> {
|
||||
|
||||
print('id - $id');
|
||||
final uri = Uri.parse(
|
||||
// isUpdating
|
||||
// ? 'https://venbait.in/nhance/partner/dev/api/agent/updateAgent'
|
||||
// : 'https://venbait.in/nhance/partner/dev/api/agent/createAgent',
|
||||
isUpdating
|
||||
? '${Env.apiUrl}quotation/updateQuotation'
|
||||
: '${Env.apiUrl}quotation/createQuotation',
|
||||
@ -732,7 +729,7 @@ class CreateQuotationFormState extends ConsumerState<CreateQuotationForm> {
|
||||
GestureDetector(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/quotation/downloadAdditionalUploadedFile?id=$selectedId',
|
||||
'quotation/downloadAdditionalUploadedFile?id=$selectedId',
|
||||
apiId: selectedId,
|
||||
localFile: docUploadedFile,
|
||||
fileName: selectedFileNames,
|
||||
|
||||
@ -938,9 +938,9 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
|
||||
// print("Upload $idget.id}{w");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -979,9 +979,9 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -1016,9 +1016,9 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -1053,11 +1053,11 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = acceptedQuotationId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// final path =
|
||||
// 'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
// 'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
final path =
|
||||
'api/quotation/downloadAdditionalUploadedFile?id=$acceptedQuotationId';
|
||||
'quotation/downloadAdditionalUploadedFile?id=$acceptedQuotationId';
|
||||
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -1893,7 +1893,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
|
||||
InkWell(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_pdf',
|
||||
'policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_pdf',
|
||||
apiId: choosedPolcyId,
|
||||
localFile: docPDFUploadedFile,
|
||||
fileName: selectedPDFFileNames,
|
||||
@ -1970,7 +1970,7 @@ class PolicyStaffTabState extends ConsumerState<PolicyStaffTab> {
|
||||
GestureDetector(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_payment_receipt',
|
||||
'policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_payment_receipt',
|
||||
apiId: choosedPolcyId,
|
||||
localFile: docUploadedFile,
|
||||
fileName: selectedFileNames,
|
||||
|
||||
@ -140,7 +140,7 @@ class _AddDialogState extends ConsumerState<AssignStaffDialog> {
|
||||
print('API Data - $getInsurersData');
|
||||
|
||||
filteredInsurersData = List.from(getInsurersData);
|
||||
print('originalData - $filteredInsurersData');
|
||||
// print('originalData - $filteredInsurersData');
|
||||
});
|
||||
} else {
|
||||
getInsurersData = [];
|
||||
@ -171,7 +171,7 @@ class _AddDialogState extends ConsumerState<AssignStaffDialog> {
|
||||
print('API Data - $getBrokerData');
|
||||
|
||||
filteredBrokerData = List.from(getBrokerData);
|
||||
print('originalData - $filteredBrokerData');
|
||||
// print('originalData - $filteredBrokerData');
|
||||
});
|
||||
} else {
|
||||
getBrokerData = [];
|
||||
@ -209,7 +209,7 @@ class _AddDialogState extends ConsumerState<AssignStaffDialog> {
|
||||
print('API Data - $getStaffDetailsDataEnqAsgn');
|
||||
|
||||
filteredStaffDataEnqAsgn = List.from(getStaffDetailsDataEnqAsgn);
|
||||
print('originalData - $filteredStaffDataEnqAsgn');
|
||||
// print('originalData - $filteredStaffDataEnqAsgn');
|
||||
});
|
||||
} else {
|
||||
getStaffDetailsDataEnqAsgn = [];
|
||||
|
||||
@ -731,9 +731,9 @@ class PolicyScreenState extends ConsumerState<PolicyScreen> {
|
||||
// print("Upload $idget.id}{w");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -772,9 +772,9 @@ class PolicyScreenState extends ConsumerState<PolicyScreen> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -809,9 +809,9 @@ class PolicyScreenState extends ConsumerState<PolicyScreen> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -846,11 +846,11 @@ class PolicyScreenState extends ConsumerState<PolicyScreen> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = acceptedQuotationId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// final path =
|
||||
// 'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
// 'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
final path =
|
||||
'api/quotation/downloadAdditionalUploadedFile?id=$acceptedQuotationId';
|
||||
'quotation/downloadAdditionalUploadedFile?id=$acceptedQuotationId';
|
||||
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
@ -1358,7 +1358,7 @@ class PolicyScreenState extends ConsumerState<PolicyScreen> {
|
||||
GestureDetector(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_pdf',
|
||||
'policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_pdf',
|
||||
apiId: choosedPolcyId,
|
||||
localFile: docPDFUploadedFile,
|
||||
fileName: selectedPDFFileNames,
|
||||
@ -1431,7 +1431,7 @@ class PolicyScreenState extends ConsumerState<PolicyScreen> {
|
||||
GestureDetector(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_payment_receipt',
|
||||
'policy/downloadPolicyFile?policy_id=$choosedPolcyId&file_type=policy_payment_receipt',
|
||||
apiId: choosedPolcyId,
|
||||
localFile: docUploadedFile,
|
||||
fileName: selectedFileNames,
|
||||
|
||||
@ -805,7 +805,7 @@ class policylistState extends ConsumerState<policylist> {
|
||||
InkWell(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/policy/downloadPolicyFile?policy_id=$policyId&file_type=policy_pdf',
|
||||
'policy/downloadPolicyFile?policy_id=$policyId&file_type=policy_pdf',
|
||||
apiId: policyId,
|
||||
localFile: null,
|
||||
fileName: fileName,
|
||||
|
||||
@ -177,7 +177,7 @@ class createQuotatDialogState extends State<createQuotatDialog> {
|
||||
print('API Data - $getInsurersData');
|
||||
|
||||
filteredInsurersData = List.from(getInsurersData);
|
||||
print('originalData - $filteredInsurersData');
|
||||
// print('originalData - $filteredInsurersData');
|
||||
});
|
||||
} else {
|
||||
getInsurersData = [];
|
||||
@ -210,7 +210,7 @@ class createQuotatDialogState extends State<createQuotatDialog> {
|
||||
print('API Data - $getInsuranceTypeData');
|
||||
|
||||
filteredInsuranceData = List.from(getInsuranceTypeData);
|
||||
print('originalData - $filteredInsuranceData');
|
||||
// print('originalData - $filteredInsuranceData');
|
||||
});
|
||||
} else {
|
||||
getInsuranceTypeData = [];
|
||||
@ -249,9 +249,7 @@ class createQuotatDialogState extends State<createQuotatDialog> {
|
||||
|
||||
print('id - $id');
|
||||
final uri = Uri.parse(
|
||||
// isUpdating
|
||||
// ? 'https://venbait.in/nhance/partner/dev/api/agent/updateAgent'
|
||||
// : 'https://venbait.in/nhance/partner/dev/api/agent/createAgent',
|
||||
|
||||
isUpdating
|
||||
? '${Env.apiUrl}quotation/updateQuotation'
|
||||
: '${Env.apiUrl}quotation/createQuotation',
|
||||
@ -724,7 +722,7 @@ class createQuotatDialogState extends State<createQuotatDialog> {
|
||||
GestureDetector(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl:
|
||||
'api/quotation/downloadAdditionalUploadedFile?id=$selectedId',
|
||||
'quotation/downloadAdditionalUploadedFile?id=$selectedId',
|
||||
apiId: selectedId,
|
||||
localFile: docUploadedFile,
|
||||
fileName: selectedFileNames,
|
||||
|
||||
@ -502,7 +502,7 @@ class QuotationScreenState extends ConsumerState<QuotationScreen> {
|
||||
final isMobile = ResponsiveLayout.isMobile(context);
|
||||
return GestureDetector(
|
||||
onTap: () => apiService.downloadFile(
|
||||
apiUrl: 'api/quotation/downloadAdditionalUploadedFile?id=$selectedId',
|
||||
apiUrl: 'quotation/downloadAdditionalUploadedFile?id=$selectedId',
|
||||
apiId: selectedId,
|
||||
localFile: docUploadedFile,
|
||||
fileName: selectedFileNames,
|
||||
@ -541,9 +541,9 @@ class QuotationScreenState extends ConsumerState<QuotationScreen> {
|
||||
// print("Upload $idget.id}{w");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -582,9 +582,9 @@ class QuotationScreenState extends ConsumerState<QuotationScreen> {
|
||||
print("Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
@ -619,9 +619,9 @@ class QuotationScreenState extends ConsumerState<QuotationScreen> {
|
||||
print("QD597 Upload $selectedEnquiryId");
|
||||
final selectedId = selectedEnquiryId;
|
||||
// final path =
|
||||
// 'api/agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
// 'agent/downloadAgentIncentiveFile?id=$selectedId';
|
||||
final path =
|
||||
'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
'enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy';
|
||||
apiService.getPdfDownload(path, selectedId);
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@ -132,7 +132,7 @@ class _DateFilterRowState extends ConsumerState<DateFilterRow> {
|
||||
print('API Data - $getStaffDetailsData');
|
||||
|
||||
filteredStaffData = List.from(getStaffDetailsData);
|
||||
print('originalData - $filteredStaffData');
|
||||
// print('originalData - $filteredStaffData');
|
||||
});
|
||||
} else {
|
||||
getStaffDetailsData = [];
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
the `--base-href` argument provided to `flutter build`.
|
||||
-->
|
||||
<!-- <base href="$FLUTTER_BASE_HREF">-->
|
||||
<!-- <base href="/partner/"> Live build: also check env.dart (line 8)-->
|
||||
<base href="/nhance/partner/app/"> <!-- Testing build: also check env.dart (line 9) -->
|
||||
<!--<base href="/partner/"> <!– Live build: also check env.dart (line 8)–>-->
|
||||
<base href="/nhance/partner/app/"> <!-- Testing build: also check env.dart (line 9) -->
|
||||
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user