|
|
|
@ -14,11 +14,11 @@ import 'package:mohem_flutter_app/models/dashboard/get_accural_ticket_balance_mo
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/list_menu.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/list_menu.dart';
|
|
|
|
|
|
|
|
import 'package:mohem_flutter_app/models/eit_attachment_ticket_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/itg/itg_main_response.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/itg/itg_main_response.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/itg/itg_response_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/itg/itg_response_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/sso_auth_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/sso_auth_model.dart';
|
|
|
|
import 'package:platform_device_id_plus/platform_device_id.dart';
|
|
|
|
|
|
|
|
// import 'package:platform_device_id/platform_device_id.dart';
|
|
|
|
// import 'package:platform_device_id/platform_device_id.dart';
|
|
|
|
|
|
|
|
|
|
|
|
// import 'package:platform_device_id/platform_device_id.dart';
|
|
|
|
// import 'package:platform_device_id/platform_device_id.dart';
|
|
|
|
@ -33,7 +33,7 @@ class DashboardApiClient {
|
|
|
|
|
|
|
|
|
|
|
|
Future<GetAttendanceTracking?> getAttendanceTracking() async {
|
|
|
|
Future<GetAttendanceTracking?> getAttendanceTracking() async {
|
|
|
|
String url = "${ApiConsts.erpRest}GET_Attendance_Tracking";
|
|
|
|
String url = "${ApiConsts.erpRest}GET_Attendance_Tracking";
|
|
|
|
Map<String, dynamic> postParams = {};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
@ -47,7 +47,7 @@ class DashboardApiClient {
|
|
|
|
|
|
|
|
|
|
|
|
Future<GenericResponseModel?> getOpenNotifications() async {
|
|
|
|
Future<GenericResponseModel?> getOpenNotifications() async {
|
|
|
|
String url = "${ApiConsts.erpRest}GET_OPEN_NOTIFICATIONS";
|
|
|
|
String url = "${ApiConsts.erpRest}GET_OPEN_NOTIFICATIONS";
|
|
|
|
Map<String, dynamic> postParams = {};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
@ -61,7 +61,7 @@ class DashboardApiClient {
|
|
|
|
|
|
|
|
|
|
|
|
Future<GenericResponseModel?> getCOCNotifications() async {
|
|
|
|
Future<GenericResponseModel?> getCOCNotifications() async {
|
|
|
|
String url = "${ApiConsts.cocRest}Mohemm_ITG_ReviewerAdmin_Pending_Tasks";
|
|
|
|
String url = "${ApiConsts.cocRest}Mohemm_ITG_ReviewerAdmin_Pending_Tasks";
|
|
|
|
Map<String, dynamic> postParams = {"Date": DateUtil.getISODateFormat(DateTime.now()), "EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{"Date": DateUtil.getISODateFormat(DateTime.now()), "EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
@ -75,7 +75,7 @@ class DashboardApiClient {
|
|
|
|
|
|
|
|
|
|
|
|
Future<ItgFormsModel?> getItgFormsPendingTask() async {
|
|
|
|
Future<ItgFormsModel?> getItgFormsPendingTask() async {
|
|
|
|
String url = "${ApiConsts.cocRest}ITGFormsPendingTasks";
|
|
|
|
String url = "${ApiConsts.cocRest}ITGFormsPendingTasks";
|
|
|
|
Map<String, dynamic> postParams = {};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
@ -89,13 +89,13 @@ class DashboardApiClient {
|
|
|
|
|
|
|
|
|
|
|
|
Future<List<GetAccrualBalancesList>> getAccrualBalances(String effectiveDate, {String? empID}) async {
|
|
|
|
Future<List<GetAccrualBalancesList>> getAccrualBalances(String effectiveDate, {String? empID}) async {
|
|
|
|
String url = "${ApiConsts.erpRest}GET_ACCRUAL_BALANCES";
|
|
|
|
String url = "${ApiConsts.erpRest}GET_ACCRUAL_BALANCES";
|
|
|
|
Map<String, dynamic> postParams = {"P_EFFECTIVE_DATE": effectiveDate};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{"P_EFFECTIVE_DATE": effectiveDate};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
|
|
|
|
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
|
|
|
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
|
|
|
return responseData.getAccrualBalancesList ?? [];
|
|
|
|
return responseData.getAccrualBalancesList ?? <GetAccrualBalancesList>[];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
url,
|
|
|
|
url,
|
|
|
|
postParams,
|
|
|
|
postParams,
|
|
|
|
@ -104,13 +104,13 @@ class DashboardApiClient {
|
|
|
|
|
|
|
|
|
|
|
|
Future<List<GetTicketAccuralBalanceModel>> getTicketAccuralBalance(String effectiveDate, {String? empID}) async {
|
|
|
|
Future<List<GetTicketAccuralBalanceModel>> getTicketAccuralBalance(String effectiveDate, {String? empID}) async {
|
|
|
|
String url = "${ApiConsts.erpRest}GET_TICKET_ACCRUAL_BALANCES";
|
|
|
|
String url = "${ApiConsts.erpRest}GET_TICKET_ACCRUAL_BALANCES";
|
|
|
|
Map<String, dynamic> postParams = {"P_EFFECTIVE_DATE": effectiveDate};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{"P_EFFECTIVE_DATE": effectiveDate};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
|
|
|
|
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
|
|
|
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
|
|
|
return responseData.getAccrualBalancesTicketList ?? [];
|
|
|
|
return responseData.getAccrualBalancesTicketList ?? <GetTicketAccuralBalanceModel>[];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
url,
|
|
|
|
url,
|
|
|
|
postParams,
|
|
|
|
postParams,
|
|
|
|
@ -119,7 +119,7 @@ class DashboardApiClient {
|
|
|
|
|
|
|
|
|
|
|
|
Future<GenericResponseModel?> getOpenMissingSwipes() async {
|
|
|
|
Future<GenericResponseModel?> getOpenMissingSwipes() async {
|
|
|
|
String url = "${ApiConsts.erpRest}GET_OPEN_MISSING_SWIPES";
|
|
|
|
String url = "${ApiConsts.erpRest}GET_OPEN_MISSING_SWIPES";
|
|
|
|
Map<String, dynamic> postParams = {};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
@ -134,12 +134,12 @@ class DashboardApiClient {
|
|
|
|
//Menus List
|
|
|
|
//Menus List
|
|
|
|
Future<List<ListMenu>> getListMenu() async {
|
|
|
|
Future<List<ListMenu>> getListMenu() async {
|
|
|
|
String url = "${ApiConsts.erpRest}GET_MENU";
|
|
|
|
String url = "${ApiConsts.erpRest}GET_MENU";
|
|
|
|
Map<String, dynamic> postParams = {};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
|
|
|
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
|
|
|
return responseData.listMenu ?? [];
|
|
|
|
return responseData.listMenu ?? <ListMenu>[];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
url,
|
|
|
|
url,
|
|
|
|
postParams,
|
|
|
|
postParams,
|
|
|
|
@ -149,7 +149,7 @@ class DashboardApiClient {
|
|
|
|
//GET_MENU_ENTRIES
|
|
|
|
//GET_MENU_ENTRIES
|
|
|
|
Future<GenericResponseModel?> getGetMenuEntries() async {
|
|
|
|
Future<GenericResponseModel?> getGetMenuEntries() async {
|
|
|
|
String url = "${ApiConsts.erpRest}GET_MENU_ENTRIES";
|
|
|
|
String url = "${ApiConsts.erpRest}GET_MENU_ENTRIES";
|
|
|
|
Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
@ -163,7 +163,7 @@ class DashboardApiClient {
|
|
|
|
|
|
|
|
|
|
|
|
Future<GenericResponseModel?> getEventActivity() async {
|
|
|
|
Future<GenericResponseModel?> getEventActivity() async {
|
|
|
|
String url = "${ApiConsts.erpRest}Get_EventActivity";
|
|
|
|
String url = "${ApiConsts.erpRest}Get_EventActivity";
|
|
|
|
Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
@ -177,7 +177,7 @@ class DashboardApiClient {
|
|
|
|
|
|
|
|
|
|
|
|
Future<GenericResponseModel?> getTicketBookingRedirection() async {
|
|
|
|
Future<GenericResponseModel?> getTicketBookingRedirection() async {
|
|
|
|
String url = "${ApiConsts.erpRest}GET_PORTAL_REDIRECTION";
|
|
|
|
String url = "${ApiConsts.erpRest}GET_PORTAL_REDIRECTION";
|
|
|
|
Map<String, dynamic> postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
(json) {
|
|
|
|
(json) {
|
|
|
|
@ -191,7 +191,7 @@ class DashboardApiClient {
|
|
|
|
|
|
|
|
|
|
|
|
Future<GenericResponseModel?> getTicketBalance() async {
|
|
|
|
Future<GenericResponseModel?> getTicketBalance() async {
|
|
|
|
String url = "${ApiConsts.erpRest}GET_TICKET_BALANCE";
|
|
|
|
String url = "${ApiConsts.erpRest}GET_TICKET_BALANCE";
|
|
|
|
Map<String, dynamic> postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
|
|
|
|
|
|
|
|
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
@ -208,7 +208,7 @@ class DashboardApiClient {
|
|
|
|
String url = "${ApiConsts.ssoAuthRedirection}?grantType=mohemm";
|
|
|
|
String url = "${ApiConsts.ssoAuthRedirection}?grantType=mohemm";
|
|
|
|
//https://sso-uat.hmg.com/api/auth/connect?grantType=mohemm'
|
|
|
|
//https://sso-uat.hmg.com/api/auth/connect?grantType=mohemm'
|
|
|
|
// Map<String, dynamic> postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
|
|
|
|
// Map<String, dynamic> postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
|
|
|
|
Map<String, dynamic> postParams = {
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{
|
|
|
|
"ClientId": clientID,
|
|
|
|
"ClientId": clientID,
|
|
|
|
// "ClientId": "a9f4d1a0596d4aea8f830992ec4bdac1",
|
|
|
|
// "ClientId": "a9f4d1a0596d4aea8f830992ec4bdac1",
|
|
|
|
"PersonId": AppState().memberInformationList?.eMPLOYEENUMBER,
|
|
|
|
"PersonId": AppState().memberInformationList?.eMPLOYEENUMBER,
|
|
|
|
@ -227,18 +227,34 @@ class DashboardApiClient {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future<dynamic> getBookingSSOFinalRedirection({required String token}) async {
|
|
|
|
Future<GetEitAttachmentTicket?> getTicketEitPDFDownload({required String peiExtraInfoId}) async {
|
|
|
|
token =
|
|
|
|
String url = "${ApiConsts.erpRest}GET_EIT_ATTACHMENTS";
|
|
|
|
"eyJhbGciOiJSUzI1NiIsImtpZCI6IjhjZTE2OWM0YjIwYjQ2ZWM5YTQyOTU3Y2ZhODUzNzQ1IiwidHlwIjoiSldUIn0.eyJ0ZW5hbnRfaWQiOiJhOWY0ZDFhMDU5NmQ0YWVhOGY4MzA5OTJlYzRiZGFjMSIsImVpZCI6IjExNzkzMCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6Ijk2MDI0OGM1NzA3YzQ3MmFhYTEzM2I1N2ZhODE1ZmVhIiwibGFuZ3VhZ2UiOiJVUyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6IjExNzkzMEBobWcuY29tIiwiZXhwIjoxNzgyNDc1NzY5LCJpc3MiOiJodHRwczovL3Nzby11YXQuaG1nLmNvbSIsImF1ZCI6ImE5ZjRkMWEwNTk2ZDRhZWE4ZjgzMDk5MmVjNGJkYWMxIn0.rJcLVsG8D0XECyLERCTD2uqGeWyvp-OBVGE9uL2qKrX4etFUHgdFt_5kYF6edFTtGy-0PIZadHDmv7e-IOhVWHm5HVMClaukiXoRXR8cDN8XA1wfme3Kd-U5PXN-IRh49AyRTzLO0rYNPvH81ScosWGlsFSkOvA-0hJNa2adHdtvgNvB8wJshSU5p7sAmF8mjdDY6aInG19etu2iEuUDwHHA4ZY_ts4hboHo8fE392hFaYGonExoD7bpW5RMx5xKWeRCmWpG_PK8Aw_z1jGzdB9PANus4pteRGuln1J-kmo2lQC9pVrSyZATAKp1HfgfyZ_vUhaHEfM69cMWaCslJQ";
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{
|
|
|
|
var request = http.MultipartRequest('POST', Uri.parse('https://ek.techmaster.in/SSO/HMG'));
|
|
|
|
"P_PERSON_EXTRA_INFO_ID": peiExtraInfoId,
|
|
|
|
request.fields.addAll({'JWTToken': token});
|
|
|
|
"PersonId": AppState().memberInformationList?.eMPLOYEENUMBER,
|
|
|
|
|
|
|
|
"Username": AppState().memberInformationList?.eMPLOYEENUMBER,
|
|
|
|
// request.headers.addAll(headers);
|
|
|
|
"Language": "US",
|
|
|
|
|
|
|
|
"SessionId": AppState().postParamsObject?.pSessionId,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
postParams.addAll(AppState().postParamsJson);
|
|
|
|
|
|
|
|
return await ApiClient().postJsonForObject(
|
|
|
|
|
|
|
|
(json) {
|
|
|
|
|
|
|
|
GetEitAttachmentTicket responseData = GetEitAttachmentTicket.fromJson(json);
|
|
|
|
|
|
|
|
return responseData;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
url,
|
|
|
|
|
|
|
|
postParams,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<dynamic> getBookingSSOFinalRedirection({required String token}) async {
|
|
|
|
|
|
|
|
// token =
|
|
|
|
|
|
|
|
// "eyJhbGciOiJSUzI1NiIsImtpZCI6IjhjZTE2OWM0YjIwYjQ2ZWM5YTQyOTU3Y2ZhODUzNzQ1IiwidHlwIjoiSldUIn0.eyJ0ZW5hbnRfaWQiOiJhOWY0ZDFhMDU5NmQ0YWVhOGY4MzA5OTJlYzRiZGFjMSIsImVpZCI6IjExNzkzMCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6Ijk2MDI0OGM1NzA3YzQ3MmFhYTEzM2I1N2ZhODE1ZmVhIiwibGFuZ3VhZ2UiOiJVUyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6IjExNzkzMEBobWcuY29tIiwiZXhwIjoxNzgyNDc1NzY5LCJpc3MiOiJodHRwczovL3Nzby11YXQuaG1nLmNvbSIsImF1ZCI6ImE5ZjRkMWEwNTk2ZDRhZWE4ZjgzMDk5MmVjNGJkYWMxIn0.rJcLVsG8D0XECyLERCTD2uqGeWyvp-OBVGE9uL2qKrX4etFUHgdFt_5kYF6edFTtGy-0PIZadHDmv7e-IOhVWHm5HVMClaukiXoRXR8cDN8XA1wfme3Kd-U5PXN-IRh49AyRTzLO0rYNPvH81ScosWGlsFSkOvA-0hJNa2adHdtvgNvB8wJshSU5p7sAmF8mjdDY6aInG19etu2iEuUDwHHA4ZY_ts4hboHo8fE392hFaYGonExoD7bpW5RMx5xKWeRCmWpG_PK8Aw_z1jGzdB9PANus4pteRGuln1J-kmo2lQC9pVrSyZATAKp1HfgfyZ_vUhaHEfM69cMWaCslJQ";
|
|
|
|
|
|
|
|
http.MultipartRequest request = http.MultipartRequest('POST', Uri.parse('https://ek.techmaster.in/SSO/HMG'));
|
|
|
|
|
|
|
|
request.fields.addAll(<String, String>{'JWTToken': token});
|
|
|
|
http.StreamedResponse response = await request.send();
|
|
|
|
http.StreamedResponse response = await request.send();
|
|
|
|
if (response.statusCode == 302) {
|
|
|
|
if (response.statusCode == 302) {
|
|
|
|
print("================== post ==========");
|
|
|
|
String res = await response.stream.bytesToString();
|
|
|
|
var res = await response.stream.bytesToString();
|
|
|
|
|
|
|
|
return response.headers["location"];
|
|
|
|
return response.headers["location"];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
print(response.reasonPhrase);
|
|
|
|
print(response.reasonPhrase);
|
|
|
|
@ -256,7 +272,7 @@ class DashboardApiClient {
|
|
|
|
String payrollCode = "",
|
|
|
|
String payrollCode = "",
|
|
|
|
}) async {
|
|
|
|
}) async {
|
|
|
|
String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC";
|
|
|
|
String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC";
|
|
|
|
var uuid = Uuid();
|
|
|
|
Uuid uuid = Uuid();
|
|
|
|
String? deviceId = "";
|
|
|
|
String? deviceId = "";
|
|
|
|
// Generate a v4 (random) id
|
|
|
|
// Generate a v4 (random) id
|
|
|
|
if (Platform.isAndroid) {
|
|
|
|
if (Platform.isAndroid) {
|
|
|
|
@ -266,7 +282,7 @@ class DashboardApiClient {
|
|
|
|
IosDeviceInfo iosInfo = await DeviceInfoPlugin().iosInfo;
|
|
|
|
IosDeviceInfo iosInfo = await DeviceInfoPlugin().iosInfo;
|
|
|
|
deviceId = iosInfo.identifierForVendor;
|
|
|
|
deviceId = iosInfo.identifierForVendor;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Map<String, dynamic> postParams = {
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{
|
|
|
|
"UID": deviceId, //uuid.v4(), //Mobile Id
|
|
|
|
"UID": deviceId, //uuid.v4(), //Mobile Id
|
|
|
|
// "UID": uuid.v4(), //Mobile Id
|
|
|
|
// "UID": uuid.v4(), //Mobile Id
|
|
|
|
"Latitude": lat,
|
|
|
|
"Latitude": lat,
|
|
|
|
@ -292,10 +308,10 @@ class DashboardApiClient {
|
|
|
|
//Mark Fake Location
|
|
|
|
//Mark Fake Location
|
|
|
|
Future<GenericResponseModel?> markFakeLocation({String lat = "0", String? long = "0", required String sourceName}) async {
|
|
|
|
Future<GenericResponseModel?> markFakeLocation({String lat = "0", String? long = "0", required String sourceName}) async {
|
|
|
|
String url = "${ApiConsts.swpRest}CreateIssueInfo";
|
|
|
|
String url = "${ApiConsts.swpRest}CreateIssueInfo";
|
|
|
|
var uuid = Uuid();
|
|
|
|
Uuid uuid = Uuid();
|
|
|
|
// Generate a v4 (random) id
|
|
|
|
// Generate a v4 (random) id
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> postParams = {
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{
|
|
|
|
"UID": uuid.v4(), //Mobile Id
|
|
|
|
"UID": uuid.v4(), //Mobile Id
|
|
|
|
"Latitude": lat,
|
|
|
|
"Latitude": lat,
|
|
|
|
"Longitude": long,
|
|
|
|
"Longitude": long,
|
|
|
|
@ -319,7 +335,7 @@ class DashboardApiClient {
|
|
|
|
Future<MohemmItgResponseItem?> getITGPageNotification() async {
|
|
|
|
Future<MohemmItgResponseItem?> getITGPageNotification() async {
|
|
|
|
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetPageNotification";
|
|
|
|
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetPageNotification";
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> postParams = {
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{
|
|
|
|
"EmployeeNumber": AppState().getUserName,
|
|
|
|
"EmployeeNumber": AppState().getUserName,
|
|
|
|
"ItgEnableAt": "After Service Submission", //Mobile Id
|
|
|
|
"ItgEnableAt": "After Service Submission", //Mobile Id
|
|
|
|
"ItgServiceName": "Login",
|
|
|
|
"ItgServiceName": "Login",
|
|
|
|
@ -341,7 +357,7 @@ class DashboardApiClient {
|
|
|
|
Future<ItgMainRes?> submitItgForm({required String comment, required String masterId, required List<Map<String, dynamic>> itgList, required int serviceId}) async {
|
|
|
|
Future<ItgMainRes?> submitItgForm({required String comment, required String masterId, required List<Map<String, dynamic>> itgList, required int serviceId}) async {
|
|
|
|
String url = "${ApiConsts.cocRest}Mohemm_ITG_Survey_Response";
|
|
|
|
String url = "${ApiConsts.cocRest}Mohemm_ITG_Survey_Response";
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> postParams = {
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{
|
|
|
|
"EmployeeNumber": AppState().getUserName,
|
|
|
|
"EmployeeNumber": AppState().getUserName,
|
|
|
|
"ItgComments": comment,
|
|
|
|
"ItgComments": comment,
|
|
|
|
"ItgNotificationMasterId": masterId,
|
|
|
|
"ItgNotificationMasterId": masterId,
|
|
|
|
@ -362,7 +378,7 @@ class DashboardApiClient {
|
|
|
|
Future<ItgMainRes?> getAdvertisementDetail(String masterID) async {
|
|
|
|
Future<ItgMainRes?> getAdvertisementDetail(String masterID) async {
|
|
|
|
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetPageNotificationDetails";
|
|
|
|
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetPageNotificationDetails";
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> postParams = {
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{
|
|
|
|
"EmployeeNumber": AppState().getUserName,
|
|
|
|
"EmployeeNumber": AppState().getUserName,
|
|
|
|
"ItgNotificationMasterId": masterID, //Mobile Id
|
|
|
|
"ItgNotificationMasterId": masterID, //Mobile Id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -380,7 +396,7 @@ class DashboardApiClient {
|
|
|
|
Future setAdvertisementViewed(String masterID, int advertisementId, String? ackValue) async {
|
|
|
|
Future setAdvertisementViewed(String masterID, int advertisementId, String? ackValue) async {
|
|
|
|
String url = "${ApiConsts.cocRest}Mohemm_ITG_UpdateAdvertisementAsViewed";
|
|
|
|
String url = "${ApiConsts.cocRest}Mohemm_ITG_UpdateAdvertisementAsViewed";
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> postParams = {
|
|
|
|
Map<String, dynamic> postParams = <String, dynamic>{
|
|
|
|
"ItgNotificationMasterId": masterID,
|
|
|
|
"ItgNotificationMasterId": masterID,
|
|
|
|
"EmployeeNumber": AppState().memberInformationList!.eMPLOYEENUMBER.toString(),
|
|
|
|
"EmployeeNumber": AppState().memberInformationList!.eMPLOYEENUMBER.toString(),
|
|
|
|
"ItgAdvertisementId": advertisementId,
|
|
|
|
"ItgAdvertisementId": advertisementId,
|
|
|
|
|