CHANGE_
This commit is contained in:
parent
653dd27018
commit
ce018606ea
@ -1,3 +1,3 @@
|
|||||||
API_URL=https://venbait.in/nhance/dev/employeeRest/
|
API_URL=https://dev.venbait.in/nhance/uat/employeeRest/
|
||||||
BASE_HREF=/nhance/app/dev/
|
BASE_HREF=/nhance/app/uat/
|
||||||
ENV=development
|
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/
|
BASE_HREF=/nhance/app/uat/
|
||||||
ENV=production
|
ENV=production
|
||||||
@ -1,3 +1,3 @@
|
|||||||
API_URL=https://venbait.in/nhance/test/employeeRest/
|
API_URL=https://dev.venbait.in/nhance/uat/employeeRest/
|
||||||
BASE_HREF=/nhance/app/test/
|
BASE_HREF=/nhance/app/uat/
|
||||||
ENV=test
|
ENV=production
|
||||||
@ -85,13 +85,11 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getPolicyDetails() async {
|
Future<void> getPolicyDetails() async {
|
||||||
setState(() {
|
|
||||||
_isLoading = true;
|
|
||||||
});
|
|
||||||
try {
|
try {
|
||||||
setState(() {
|
setState(() {
|
||||||
if (argumentsData != null && argumentsData is Map<String, dynamic>) {
|
if (argumentsData != null && argumentsData is Map<String, dynamic>) {
|
||||||
if (argumentsData['type'] == 'GPA') {
|
if (argumentsData['type'] == 'GPA') {
|
||||||
|
_isLoading = true;
|
||||||
clientPolicyId = argumentsData['client_policy_id'];
|
clientPolicyId = argumentsData['client_policy_id'];
|
||||||
clientId = argumentsData['client_id'];
|
clientId = argumentsData['client_id'];
|
||||||
policyType = argumentsData['type'];
|
policyType = argumentsData['type'];
|
||||||
@ -100,6 +98,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
inceptionType = int.parse(int_inception_type);
|
inceptionType = int.parse(int_inception_type);
|
||||||
getEmployeeAndDependence(clientId, clientPolicyId);
|
getEmployeeAndDependence(clientId, clientPolicyId);
|
||||||
} else if (argumentsData['type'] == 'GMC') {
|
} else if (argumentsData['type'] == 'GMC') {
|
||||||
|
_isLoading = true;
|
||||||
clientPolicyId = argumentsData['client_policy_id'];
|
clientPolicyId = argumentsData['client_policy_id'];
|
||||||
clientId = argumentsData['client_id'];
|
clientId = argumentsData['client_id'];
|
||||||
policyType = argumentsData['type'];
|
policyType = argumentsData['type'];
|
||||||
@ -108,6 +107,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
inceptionType = int.parse(int_inception_type);
|
inceptionType = int.parse(int_inception_type);
|
||||||
getEmployeeAndDependence(clientId, clientPolicyId);
|
getEmployeeAndDependence(clientId, clientPolicyId);
|
||||||
} else if (argumentsData['type'] == 'SI TopUp') {
|
} else if (argumentsData['type'] == 'SI TopUp') {
|
||||||
|
_isLoading = true;
|
||||||
clientPolicyId = argumentsData['client_policy_id'];
|
clientPolicyId = argumentsData['client_policy_id'];
|
||||||
clientId = argumentsData['client_id'];
|
clientId = argumentsData['client_id'];
|
||||||
policyType = argumentsData['type'];
|
policyType = argumentsData['type'];
|
||||||
@ -116,6 +116,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
inceptionType = int.parse(int_inception_type);
|
inceptionType = int.parse(int_inception_type);
|
||||||
getEmployeeAndDependence(clientId, clientPolicyId);
|
getEmployeeAndDependence(clientId, clientPolicyId);
|
||||||
} else if (argumentsData['type'] == 'Dependent AddOn') {
|
} else if (argumentsData['type'] == 'Dependent AddOn') {
|
||||||
|
_isLoading = true;
|
||||||
clientPolicyId = argumentsData['client_policy_id'];
|
clientPolicyId = argumentsData['client_policy_id'];
|
||||||
clientId = argumentsData['client_id'];
|
clientId = argumentsData['client_id'];
|
||||||
policyType = argumentsData['type'];
|
policyType = argumentsData['type'];
|
||||||
@ -127,6 +128,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
_isLoading = false;
|
||||||
print('Exception occurred: $e');
|
print('Exception occurred: $e');
|
||||||
} finally {
|
} finally {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -136,10 +138,9 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getEmployeeAndDependence(clintID, getPolicyNo) async {
|
Future<void> getEmployeeAndDependence(clintID, getPolicyNo) async {
|
||||||
isLoading = true;
|
// setState(() {
|
||||||
setState(() {
|
// _isLoading = true;
|
||||||
_isLoading = true;
|
// });
|
||||||
});
|
|
||||||
try {
|
try {
|
||||||
final response = await apiService.getEmployeeAndDependenceToApi(
|
final response = await apiService.getEmployeeAndDependenceToApi(
|
||||||
clintID!, getPolicyNo!, empRefId!);
|
clintID!, getPolicyNo!, empRefId!);
|
||||||
@ -154,11 +155,13 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
print(filteredData);
|
print(filteredData);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
isLoading = false;
|
||||||
// ToastHelper.showWarningToast(
|
// ToastHelper.showWarningToast(
|
||||||
// context, 'Request failed with status: ${response.statusCode}');
|
// context, 'Request failed with status: ${response.statusCode}');
|
||||||
print('Request failed with status: ${response['code']}');
|
print('Request failed with status: ${response['code']}');
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
_isLoading = false;
|
||||||
print('Exception occurred: $e');
|
print('Exception occurred: $e');
|
||||||
} finally {
|
} finally {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user