getClientDetails Api changes
This commit is contained in:
parent
01f99fa2ca
commit
4baa4ea75a
@ -1,4 +1,4 @@
|
||||
API_URL=https://app.nhanceindia.in/enrolment/employeeRest/
|
||||
API_URL_POST=https://app.nhanceindia.in/zenith/employeeRest/
|
||||
BASE_HREF=/hr/
|
||||
ENV=production
|
||||
API_URL=https://venbait.in/enrollment/employeeRest/
|
||||
API_URL_POST=https://venbait.in/nhance/dev/employeeRest/
|
||||
BASE_HREF=/nhance/hr/dev/
|
||||
ENV=development
|
||||
@ -244,7 +244,7 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
|
||||
// prefs.setString('enrollmentEmp_status', enrollmentEmp_status);
|
||||
}
|
||||
|
||||
getClientLogoAndDetails(empClientId, empClientBranchId, post['data']);
|
||||
getClientLogoAndDetails(empClientId, empClientBranchId,enrollmentClient_id,enrollmentEmpClientBranchId, post['data']);
|
||||
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
final _postToken = prefs.getString('_postToken');
|
||||
@ -284,8 +284,7 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
|
||||
'enrollmentAllowed_modules', jsonEncode(enrollmentAllowed_modules));
|
||||
// enrollmentEmp_status = decodedToken['emp_status'];
|
||||
// prefs.setString('enrollmentEmp_status', enrollmentEmp_status);
|
||||
getClientLogoAndDetails(
|
||||
enrollmentClient_id, enrollmentEmpClientBranchId, data['data']);
|
||||
getClientLogoAndDetails(empClientId,empClientBranchId,enrollmentClient_id, enrollmentEmpClientBranchId, data['data']);
|
||||
print('Successfully Login');
|
||||
|
||||
// Redirect to another page
|
||||
@ -350,9 +349,9 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> getClientLogoAndDetails(client_id, empRefId, token) async {
|
||||
Future<void> getClientLogoAndDetails(empClientId,empClientBranchId,enrollmentClientId, enrollmentClientBranchId, token) async {
|
||||
var url = Uri.parse(Environment.apiUrl +
|
||||
'getClientDetails?client_id=$client_id&client_branch_id=$empRefId');
|
||||
'getClientDetails?post_client_id=$empClientId&post_branch_id=$empClientBranchId&pre_client_id=$enrollmentClientId&pre_branch_id=$enrollmentClientBranchId');
|
||||
try {
|
||||
var response = await http.get(
|
||||
url,
|
||||
|
||||
@ -33,8 +33,11 @@ class ApiService {
|
||||
if (_token == null) {
|
||||
await _initializeToken();
|
||||
}
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
final empClientId = prefs.getString('empClientId');
|
||||
final empClientBranchId = prefs.getString('empClientBranchId');
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}getClientDetails?client_id=$clientId&emp_code=$empCode&client_branch_id=$branchID');
|
||||
'${Environment.apiUrl}getClientDetails?post_client_id=$empClientId&post_branch_id=$empClientBranchId&pre_client_id=$clientId&pre_branch_id=$branchID');
|
||||
final headers = {
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user