CHANGE_
This commit is contained in:
parent
653dd27018
commit
ce018606ea
@ -1,3 +1,3 @@
|
||||
API_URL=https://venbait.in/nhance/dev/employeeRest/
|
||||
BASE_HREF=/nhance/app/dev/
|
||||
ENV=development
|
||||
API_URL=https://dev.venbait.in/nhance/uat/employeeRest/
|
||||
BASE_HREF=/nhance/app/uat/
|
||||
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
|
||||
@ -1,3 +1,3 @@
|
||||
API_URL=https://venbait.in/nhance/test/employeeRest/
|
||||
BASE_HREF=/nhance/app/test/
|
||||
ENV=test
|
||||
API_URL=https://dev.venbait.in/nhance/uat/employeeRest/
|
||||
BASE_HREF=/nhance/app/uat/
|
||||
ENV=production
|
||||
@ -85,13 +85,11 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
||||
}
|
||||
|
||||
Future<void> getPolicyDetails() async {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
setState(() {
|
||||
if (argumentsData != null && argumentsData is Map<String, dynamic>) {
|
||||
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<hrPolicyDetails>
|
||||
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<hrPolicyDetails>
|
||||
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<hrPolicyDetails>
|
||||
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<hrPolicyDetails>
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
_isLoading = false;
|
||||
print('Exception occurred: $e');
|
||||
} finally {
|
||||
setState(() {
|
||||
@ -136,10 +138,9 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
||||
}
|
||||
|
||||
Future<void> 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<hrPolicyDetails>
|
||||
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(() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user