diff --git a/.env.development b/.env.development index 8902263..a8e67cb 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -API_URL=https://venbait.in/nhance/dev/employeeRest/ -BASE_HREF=/nhance/app/dev/ -ENV=development \ No newline at end of file +API_URL=https://dev.venbait.in/nhance/uat/employeeRest/ +BASE_HREF=/nhance/app/uat/ +ENV=production \ No newline at end of file diff --git a/.env.production b/.env.production index 10a94c8..a8e67cb 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -API_URL=https://venbait.in/nhance/uat/employeeRest/ +API_URL=https://dev.venbait.in/nhance/uat/employeeRest/ BASE_HREF=/nhance/app/uat/ ENV=production \ No newline at end of file diff --git a/.env.test b/.env.test index 99da8dc..a8e67cb 100644 --- a/.env.test +++ b/.env.test @@ -1,3 +1,3 @@ -API_URL=https://venbait.in/nhance/test/employeeRest/ -BASE_HREF=/nhance/app/test/ -ENV=test \ No newline at end of file +API_URL=https://dev.venbait.in/nhance/uat/employeeRest/ +BASE_HREF=/nhance/app/uat/ +ENV=production \ No newline at end of file diff --git a/lib/hrPolicyDetails.dart b/lib/hrPolicyDetails.dart index b6665c6..a7a521d 100644 --- a/lib/hrPolicyDetails.dart +++ b/lib/hrPolicyDetails.dart @@ -85,13 +85,11 @@ class _HrPolicyDetailsState extends State } Future getPolicyDetails() async { - setState(() { - _isLoading = true; - }); try { setState(() { if (argumentsData != null && argumentsData is Map) { if (argumentsData['type'] == 'GPA') { + _isLoading = true; clientPolicyId = argumentsData['client_policy_id']; clientId = argumentsData['client_id']; policyType = argumentsData['type']; @@ -100,6 +98,7 @@ class _HrPolicyDetailsState extends State inceptionType = int.parse(int_inception_type); getEmployeeAndDependence(clientId, clientPolicyId); } else if (argumentsData['type'] == 'GMC') { + _isLoading = true; clientPolicyId = argumentsData['client_policy_id']; clientId = argumentsData['client_id']; policyType = argumentsData['type']; @@ -108,6 +107,7 @@ class _HrPolicyDetailsState extends State inceptionType = int.parse(int_inception_type); getEmployeeAndDependence(clientId, clientPolicyId); } else if (argumentsData['type'] == 'SI TopUp') { + _isLoading = true; clientPolicyId = argumentsData['client_policy_id']; clientId = argumentsData['client_id']; policyType = argumentsData['type']; @@ -116,6 +116,7 @@ class _HrPolicyDetailsState extends State inceptionType = int.parse(int_inception_type); getEmployeeAndDependence(clientId, clientPolicyId); } else if (argumentsData['type'] == 'Dependent AddOn') { + _isLoading = true; clientPolicyId = argumentsData['client_policy_id']; clientId = argumentsData['client_id']; policyType = argumentsData['type']; @@ -127,6 +128,7 @@ class _HrPolicyDetailsState extends State } }); } catch (e) { + _isLoading = false; print('Exception occurred: $e'); } finally { setState(() { @@ -136,10 +138,9 @@ class _HrPolicyDetailsState extends State } Future getEmployeeAndDependence(clintID, getPolicyNo) async { - isLoading = true; - setState(() { - _isLoading = true; - }); + // setState(() { + // _isLoading = true; + // }); try { final response = await apiService.getEmployeeAndDependenceToApi( clintID!, getPolicyNo!, empRefId!); @@ -154,11 +155,13 @@ class _HrPolicyDetailsState extends State print(filteredData); }); } else { + isLoading = false; // ToastHelper.showWarningToast( // context, 'Request failed with status: ${response.statusCode}'); print('Request failed with status: ${response['code']}'); } } catch (e) { + _isLoading = false; print('Exception occurred: $e'); } finally { setState(() {