diff --git a/assets/images/EID_ARABIC_3.svg b/assets/images/EID_ARABIC_3.svg
new file mode 100644
index 0000000..483a836
--- /dev/null
+++ b/assets/images/EID_ARABIC_3.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/images/EID_Englsih_04.svg b/assets/images/EID_Englsih_04.svg
new file mode 100644
index 0000000..c2a75b5
--- /dev/null
+++ b/assets/images/EID_Englsih_04.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/assets/images/asddasd.svg b/assets/images/asddasd.svg
new file mode 100644
index 0000000..b91a675
--- /dev/null
+++ b/assets/images/asddasd.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/images/eid_banner.svg b/assets/images/eid_banner.svg
new file mode 100644
index 0000000..f8e4adb
--- /dev/null
+++ b/assets/images/eid_banner.svg
@@ -0,0 +1,606 @@
+
diff --git a/assets/images/greeting.svg b/assets/images/greeting.svg
new file mode 100644
index 0000000..0682c60
--- /dev/null
+++ b/assets/images/greeting.svg
@@ -0,0 +1,605 @@
+
diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json
index f09dfb4..f3552d5 100644
--- a/assets/langs/ar-SA.json
+++ b/assets/langs/ar-SA.json
@@ -533,7 +533,7 @@
"noWinner": "حزين! لم يفز أحد اليوم.",
"myTeam": "فريقي",
"youCanPlayDemo": "لكن يمكنك لعب العرض",
- "group" : "مجموعة",
+ "group": "مجموعة",
"searchGroup": "مجموعة البحث",
"connectHmgWifi": "قم بتوصيل HMG WIFI",
"connectedHmgWifi": "اتصال HMG WIFI",
@@ -577,20 +577,20 @@
"versionStatus": "حالة الإصدار",
"supplierNo": "رقم المورد",
"general": "عام",
- "requesterOperatingUnit":"وحدة تشغيل مقدم الطلب",
- "prepareEmpNum":"إعداد رقم الموظف",
- "supplierInfo" : "معلومات المورد",
+ "requesterOperatingUnit": "وحدة تشغيل مقدم الطلب",
+ "prepareEmpNum": "إعداد رقم الموظف",
+ "supplierInfo": "معلومات المورد",
"supplierAcNo": "رقم حساب المورد",
"supplierAcName": "اسم حساب المورد",
- "supplierIBAN" : "رقم IBAN للمورد",
- "supplierCRNo" :"رقم السجل التجاري",
- "suppliedAcNo" : "رقم الحساب المقدم",
- "patientRefundInvoice" : "فاتورة استرداد الأموال للمريض",
- "patientNumber" : "رقم المريض",
- "patientName" : "اسم المريض",
- "invoiceDate" : "تاريخ الفاتورة",
- "refundInvoice" :"فاتورة الاسترجاع",
- "hospitalClinic" : "عيادة المستشفى",
+ "supplierIBAN": "رقم IBAN للمورد",
+ "supplierCRNo": "رقم السجل التجاري",
+ "suppliedAcNo": "رقم الحساب المقدم",
+ "patientRefundInvoice": "فاتورة استرداد الأموال للمريض",
+ "patientNumber": "رقم المريض",
+ "patientName": "اسم المريض",
+ "invoiceDate": "تاريخ الفاتورة",
+ "refundInvoice": "فاتورة الاسترجاع",
+ "hospitalClinic": "عيادة المستشفى",
"graphicalAnalysis": "التحليل الرسومي",
"itemHistoryAnalysis": "تحليل تاريخ العنصر",
"pOno": "امر شراء #",
@@ -616,23 +616,23 @@
"members": "الأعضاء",
"searchByUserName": "البحث بواسطة اسم المستخدم",
"shareScreen": "مشاركة الشاشة",
- "start":"يبدأ",
- "about":"عن",
+ "start": "يبدأ",
+ "about": "عن",
"explore": "يستكشف",
"mazaya": "مازيا",
"benefits": "فوائد",
"mazayaDesc": "اكتشف الخصومات والعروض الخاصة المتاحة للموظفين",
- "viewallofferMazaya" : "أعرض كل المزايا",
+ "viewallofferMazaya": "أعرض كل المزايا",
"buyerName": "اسم المشتري",
"buyerNumber": "رقم المشتري",
"highestBidder": "أعلى مزايد",
"remarks": "ملاحظات",
"faHeader": "تفاصيل رأس الصفحة FA",
- "bookTypeCode": "رمز نوع الكتاب",
+ "bookTypeCode": "رمز نوع الكتاب",
"categoryCode": "رمز الفئة",
"categoryGroup": "مجموعة الفئات",
- "faLINES": "تفاصيل الأصول",
- "assetNumber": "رقم الأصول",
+ "faLINES": "تفاصيل الأصول",
+ "assetNumber": "رقم الأصول",
"assetDescription": "وصف الأصول",
"barCodeNumber": "رقم الباركود",
"datePlaceInService": "تاريخ وضعه في الخدمة",
@@ -640,7 +640,7 @@
"disposedDate": "تاريخ التخلص",
"netBookValue": "القيمة الدفترية الصافية",
"purchasedPrice": "سعر الشراء",
- "usefulLife": "العمر الإنتاجي",
+ "usefulLife": "العمر الإنتاجي",
"yearsUsed": "سنوات الاستخدام",
"faRequest": "طلب التخلص من FA",
"showMore": "عرض المزيد",
@@ -669,6 +669,7 @@
"ticketId": "معرف التذكرة",
"pleaseSelectProject": "الرجاء اختيار مشروع",
"viewAttachment" : "عرض المرفق",
- "parkingQr": "وقوف السيارات QR"
+ "parkingQr": "وقوف السيارات QR",
+ "startNow": "ابدأ الآن"
}
diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json
index 216fe85..a227a73 100644
--- a/assets/langs/en-US.json
+++ b/assets/langs/en-US.json
@@ -567,7 +567,7 @@
"addAtLeastOneAttachment": "Please add at least one attachment.",
"pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.",
"youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.",
- "requesterOperatingUnit":"Requester Operating Unit",
+ "requesterOperatingUnit": "Requester Operating Unit",
"generate": "Generate",
"paymentRequest": "Pay Request",
"paymentDetails": "Payment Details",
@@ -593,19 +593,19 @@
"versionStatus": "Version Status",
"supplierNo": "Supplier No",
"general": "General",
- "prepareEmpNum":"Prepare Employee Num",
- "supplierInfo" : "Supplier Information",
+ "prepareEmpNum": "Prepare Employee Num",
+ "supplierInfo": "Supplier Information",
"supplierAcNo": "Supplier Account No",
- "supplierAcName":"Supplier Account Name",
- "supplierIBAN" : "Supplier IBAN",
- "supplierCRNo" : "CR Number",
- "suppliedAcNo" : "Supplied Account No.",
- "patientRefundInvoice" : "Patient Refund Invoice",
- "patientNumber" : "Patient Number",
- "patientName" : "Patient Name",
- "invoiceDate" : "Invoice Date",
- "refundInvoice" :"Refund Invoice",
- "hospitalClinic" : "Hospital Clinic",
+ "supplierAcName": "Supplier Account Name",
+ "supplierIBAN": "Supplier IBAN",
+ "supplierCRNo": "CR Number",
+ "suppliedAcNo": "Supplied Account No.",
+ "patientRefundInvoice": "Patient Refund Invoice",
+ "patientNumber": "Patient Number",
+ "patientName": "Patient Name",
+ "invoiceDate": "Invoice Date",
+ "refundInvoice": "Refund Invoice",
+ "hospitalClinic": "Hospital Clinic",
"graphicalAnalysis": "Graphical Analysis",
"itemHistoryAnalysis": "Item History Analysis",
"pOno": "P.O #",
@@ -614,23 +614,23 @@
"qtyReceived": "Qty. Received",
"bonusQty": "Bonus Qty.",
"balQty": "Bal. Qty.",
- "start":"Start",
- "about":"About",
+ "start": "Start",
+ "about": "About",
"explore": "Explore",
"mazaya": "MAZAYA",
"benefits": "Benefits",
"mazayaDesc": "Discover special Discounts and offers available to Employees",
- "viewallofferMazaya" : "View All Offers",
+ "viewallofferMazaya": "View All Offers",
"buyerName": "Buyer Name",
"buyerNumber": "Buyer Number",
"highestBidder": "Highest Bidder",
"remarks": "Remarks",
"faHeader": "FA Header Details",
- "bookTypeCode": "Book Type Code",
+ "bookTypeCode": "Book Type Code",
"categoryCode": "Category Code",
"categoryGroup": "Category Group",
- "faLINES": "Asset Details",
- "assetNumber": "Asset Number",
+ "faLINES": "Asset Details",
+ "assetNumber": "Asset Number",
"assetDescription": "Asset Description",
"barCodeNumber": "BarCode Number",
"datePlaceInService": "Date place In Service",
@@ -638,9 +638,9 @@
"disposedDate": "Disposed Date",
"netBookValue": "Net Book Value",
"purchasedPrice": "Purchased Price",
- "usefulLife": "Useful Life",
+ "usefulLife": "Useful Life",
"yearsUsed": "Years Used",
- "faRequest":"FA Disposal Request",
+ "faRequest": "FA Disposal Request",
"showMore": "Show More",
"ticketDetails": "Ticket Details",
"currentTicketBalance": "Current Ticket Balance",
@@ -667,5 +667,6 @@
"ticketId": "Ticket ID",
"pleaseSelectProject": "Please select a project",
"viewAttachment" : "View Attachment",
- "parkingQr": "Parking QR"
+ "parkingQr": "Parking QR",
+ "startNow": "Start Now"
}
\ No newline at end of file
diff --git a/lib/api/api_client.dart b/lib/api/api_client.dart
index 91fd28a..7e346c8 100644
--- a/lib/api/api_client.dart
+++ b/lib/api/api_client.dart
@@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
+import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:http/http.dart';
import 'package:http/io_client.dart';
@@ -18,15 +19,11 @@ class APIError {
dynamic errorCode;
int? errorType;
String? errorMessage;
- int? errorStatusCode;
+ int? errorStatusCode;
+
APIError(this.errorCode, this.errorMessage, this.errorType, this.errorStatusCode);
- Map toJson() => {
- 'errorCode': errorCode,
- 'errorMessage': errorMessage,
- 'errorType': errorType,
- 'ErrorStatusCode': errorStatusCode
- };
+ Map toJson() => {'errorCode': errorCode, 'errorMessage': errorMessage, 'errorType': errorType, 'ErrorStatusCode': errorStatusCode};
@override
String toString() {
@@ -48,22 +45,22 @@ APIException _throwAPIException(Response response) {
APIError? apiError;
if (response.body != null && response.body.isNotEmpty) {
var jsonError = jsonDecode(response.body);
- apiError = APIError(jsonError['ErrorCode'], jsonError['ErrorMessage'], jsonError['ErrorType'],jsonError['ErrorStatusCode']);
+ apiError = APIError(jsonError['ErrorCode'], jsonError['ErrorMessage'], jsonError['ErrorType'], jsonError['ErrorStatusCode']);
}
return APIException(APIException.BAD_REQUEST, error: apiError);
case 401:
- return APIException(APIException.UNAUTHORIZED);
+ return const APIException(APIException.UNAUTHORIZED);
case 403:
- return APIException(APIException.FORBIDDEN);
+ return const APIException(APIException.FORBIDDEN);
case 404:
- return APIException(APIException.NOT_FOUND);
+ return const APIException(APIException.NOT_FOUND);
case 500:
- return APIException(APIException.INTERNAL_SERVER_ERROR);
+ return const APIException(APIException.INTERNAL_SERVER_ERROR);
case 444:
var downloadUrl = response.headers["location"];
return APIException(APIException.UPGRADE_REQUIRED, arguments: downloadUrl);
default:
- return APIException(APIException.OTHER);
+ return const APIException(APIException.OTHER);
}
}
@@ -74,8 +71,16 @@ class ApiClient {
factory ApiClient() => _instance;
- Future postJsonForObject(FactoryConstructor factoryConstructor, String url, T jsonObject,
- {String? token, Map? queryParameters, Map? headers, int retryTimes = 0, bool isFormData = false}) async {
+ Future postJsonForObject(
+ FactoryConstructor factoryConstructor,
+ String url,
+ T jsonObject, {
+ String? token,
+ Map? queryParameters,
+ Map? headers,
+ int retryTimes = 0,
+ bool isFormData = false,
+ }) async {
var _headers = {'Accept': 'application/json'};
if (headers != null && headers.isNotEmpty) {
_headers.addAll(headers);
@@ -121,8 +126,15 @@ class ApiClient {
}
}
- Future postJsonForResponse(String url, T jsonObject,
- {String? token, Map? queryParameters, Map? headers, int retryTimes = 0, bool isFormData = false}) async {
+ Future postJsonForResponse(
+ String url,
+ T jsonObject, {
+ String? token,
+ Map? queryParameters,
+ Map? headers,
+ int retryTimes = 0,
+ bool isFormData = false,
+ }) async {
String? requestBody;
late Map stringObj;
if (jsonObject != null) {
@@ -157,9 +169,9 @@ class ApiClient {
var queryString = new Uri(queryParameters: queryParameters).query;
url = url + '?' + queryString;
}
- var response = await _post(Uri.parse(url), body: requestBody, headers: _headers).timeout(Duration(seconds: 120));
+ var response = await _post(Uri.parse(url), body: requestBody, headers: _headers).timeout(const Duration(seconds: 120));
- if (response. statusCode >= 200 && response.statusCode < 300) {
+ if (response.statusCode >= 200 && response.statusCode < 300) {
return response;
} else {
throw _throwAPIException(response);
@@ -167,7 +179,7 @@ class ApiClient {
} on SocketException catch (e) {
if (retryTimes > 0) {
print('will retry after 3 seconds...');
- await Future.delayed(Duration(seconds: 3));
+ await Future.delayed(const Duration(seconds: 3));
return await _postForResponse(url, requestBody, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1);
} else {
throw APIException(APIException.OTHER, arguments: e);
@@ -175,7 +187,7 @@ class ApiClient {
} on HttpException catch (e) {
if (retryTimes > 0) {
print('will retry after 3 seconds...');
- await Future.delayed(Duration(seconds: 3));
+ await Future.delayed(const Duration(seconds: 3));
return await _postForResponse(url, requestBody, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1);
} else {
throw APIException(APIException.OTHER, arguments: e);
@@ -185,7 +197,7 @@ class ApiClient {
} on ClientException catch (e) {
if (retryTimes > 0) {
print('will retry after 3 seconds...');
- await Future.delayed(Duration(seconds: 3));
+ await Future.delayed(const Duration(seconds: 3));
return await _postForResponse(url, requestBody, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1);
} else {
throw APIException(APIException.OTHER, arguments: e);
@@ -224,7 +236,7 @@ class ApiClient {
var queryString = new Uri(queryParameters: queryParameters).query;
url = url + '?' + queryString;
}
- var response = await _get(Uri.parse(url), headers: _headers).timeout(Duration(seconds: 60));
+ var response = await _get(Uri.parse(url), headers: _headers).timeout(const Duration(seconds: 60));
if (response.statusCode >= 200 && response.statusCode < 300) {
return response;
@@ -234,7 +246,7 @@ class ApiClient {
} on SocketException catch (e) {
if (retryTimes > 0) {
print('will retry after 3 seconds...');
- await Future.delayed(Duration(seconds: 3));
+ await Future.delayed(const Duration(seconds: 3));
return await _getForResponse(url, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1);
} else {
throw APIException(APIException.OTHER, arguments: e);
@@ -242,7 +254,7 @@ class ApiClient {
} on HttpException catch (e) {
if (retryTimes > 0) {
print('will retry after 3 seconds...');
- await Future.delayed(Duration(seconds: 3));
+ await Future.delayed(const Duration(seconds: 3));
return await _getForResponse(url, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1);
} else {
throw APIException(APIException.OTHER, arguments: e);
@@ -252,7 +264,7 @@ class ApiClient {
} on ClientException catch (e) {
if (retryTimes > 0) {
print('will retry after 3 seconds...');
- await Future.delayed(Duration(seconds: 3));
+ await Future.delayed(const Duration(seconds: 3));
return await _getForResponse(url, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1);
} else {
throw APIException(APIException.OTHER, arguments: e);
diff --git a/lib/api/dashboard_api_client.dart b/lib/api/dashboard_api_client.dart
index 27fe289..df81621 100644
--- a/lib/api/dashboard_api_client.dart
+++ b/lib/api/dashboard_api_client.dart
@@ -15,12 +15,15 @@ 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/itg_forms_model.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/dashboard/courses_response_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/get_employee_parking_details_model.dart';
+import 'package:mohem_flutter_app/models/greetings/greeting_card_model.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/sso_auth_model.dart';
+// import 'package:platform_device_id/platform_device_id.dart';
import 'package:uuid/uuid.dart';
@@ -33,7 +36,7 @@ class DashboardApiClient {
Future getAttendanceTracking() async {
String url = "${ApiConsts.erpRest}GET_Attendance_Tracking";
- Map postParams = {};
+ Map postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
@@ -47,7 +50,7 @@ class DashboardApiClient {
Future getOpenNotifications() async {
String url = "${ApiConsts.erpRest}GET_OPEN_NOTIFICATIONS";
- Map postParams = {};
+ Map postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
@@ -61,7 +64,7 @@ class DashboardApiClient {
Future getCOCNotifications() async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_ReviewerAdmin_Pending_Tasks";
- Map postParams = {"Date": DateUtil.getISODateFormat(DateTime.now()), "EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
+ Map postParams = {"Date": DateUtil.getISODateFormat(DateTime.now()), "EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
@@ -75,7 +78,7 @@ class DashboardApiClient {
Future getItgFormsPendingTask() async {
String url = "${ApiConsts.cocRest}ITGFormsPendingTasks";
- Map postParams = {};
+ Map postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
@@ -89,13 +92,13 @@ class DashboardApiClient {
Future> getAccrualBalances(String effectiveDate, {String? empID}) async {
String url = "${ApiConsts.erpRest}GET_ACCRUAL_BALANCES";
- Map postParams = {"P_EFFECTIVE_DATE": effectiveDate};
+ Map postParams = {"P_EFFECTIVE_DATE": effectiveDate};
postParams.addAll(AppState().postParamsJson);
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData.getAccrualBalancesList ?? [];
+ return responseData.getAccrualBalancesList ?? [];
},
url,
postParams,
@@ -104,13 +107,13 @@ class DashboardApiClient {
Future> getTicketAccuralBalance(String effectiveDate, {String? empID}) async {
String url = "${ApiConsts.erpRest}GET_TICKET_ACCRUAL_BALANCES";
- Map postParams = {"P_EFFECTIVE_DATE": effectiveDate};
+ Map postParams = {"P_EFFECTIVE_DATE": effectiveDate};
postParams.addAll(AppState().postParamsJson);
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData.getAccrualBalancesTicketList ?? [];
+ return responseData.getAccrualBalancesTicketList ?? [];
},
url,
postParams,
@@ -119,7 +122,7 @@ class DashboardApiClient {
Future getOpenMissingSwipes() async {
String url = "${ApiConsts.erpRest}GET_OPEN_MISSING_SWIPES";
- Map postParams = {};
+ Map postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
@@ -134,12 +137,12 @@ class DashboardApiClient {
//Menus List
Future> getListMenu() async {
String url = "${ApiConsts.erpRest}GET_MENU";
- Map postParams = {};
+ Map postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData.listMenu ?? [];
+ return responseData.listMenu ?? [];
},
url,
postParams,
@@ -149,7 +152,7 @@ class DashboardApiClient {
//GET_MENU_ENTRIES
Future getGetMenuEntries() async {
String url = "${ApiConsts.erpRest}GET_MENU_ENTRIES";
- Map postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
+ Map postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
@@ -163,7 +166,7 @@ class DashboardApiClient {
Future getEventActivity() async {
String url = "${ApiConsts.erpRest}Get_EventActivity";
- Map postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
+ Map postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
@@ -177,7 +180,7 @@ class DashboardApiClient {
Future getTicketBookingRedirection() async {
String url = "${ApiConsts.erpRest}GET_PORTAL_REDIRECTION";
- Map postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
+ Map postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
@@ -191,7 +194,7 @@ class DashboardApiClient {
Future getTicketBalance() async {
String url = "${ApiConsts.erpRest}GET_TICKET_BALANCE";
- Map postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
+ Map postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
@@ -208,7 +211,7 @@ class DashboardApiClient {
String url = "${ApiConsts.ssoAuthRedirection}?grantType=mohemm";
//https://sso-uat.hmg.com/api/auth/connect?grantType=mohemm'
// Map postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
- Map postParams = {
+ Map postParams = {
"ClientId": clientID,
// "ClientId": "a9f4d1a0596d4aea8f830992ec4bdac1",
"PersonId": AppState().memberInformationList?.eMPLOYEENUMBER,
@@ -227,20 +230,35 @@ class DashboardApiClient {
);
}
+ Future getTicketEitPDFDownload({required String peiExtraInfoId}) async {
+ String url = "${ApiConsts.erpRest}GET_EIT_ATTACHMENTS";
+ Map postParams = {
+ "P_PERSON_EXTRA_INFO_ID": peiExtraInfoId,
+ "PersonId": AppState().memberInformationList?.eMPLOYEENUMBER,
+ "Username": AppState().memberInformationList?.eMPLOYEENUMBER,
+ "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 getBookingSSOFinalRedirection({required String token}) async {
// token =
// "eyJhbGciOiJSUzI1NiIsImtpZCI6IjhjZTE2OWM0YjIwYjQ2ZWM5YTQyOTU3Y2ZhODUzNzQ1IiwidHlwIjoiSldUIn0.eyJ0ZW5hbnRfaWQiOiJhOWY0ZDFhMDU5NmQ0YWVhOGY4MzA5OTJlYzRiZGFjMSIsImVpZCI6IjExNzkzMCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6Ijk2MDI0OGM1NzA3YzQ3MmFhYTEzM2I1N2ZhODE1ZmVhIiwibGFuZ3VhZ2UiOiJVUyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6IjExNzkzMEBobWcuY29tIiwiZXhwIjoxNzgyNDc1NzY5LCJpc3MiOiJodHRwczovL3Nzby11YXQuaG1nLmNvbSIsImF1ZCI6ImE5ZjRkMWEwNTk2ZDRhZWE4ZjgzMDk5MmVjNGJkYWMxIn0.rJcLVsG8D0XECyLERCTD2uqGeWyvp-OBVGE9uL2qKrX4etFUHgdFt_5kYF6edFTtGy-0PIZadHDmv7e-IOhVWHm5HVMClaukiXoRXR8cDN8XA1wfme3Kd-U5PXN-IRh49AyRTzLO0rYNPvH81ScosWGlsFSkOvA-0hJNa2adHdtvgNvB8wJshSU5p7sAmF8mjdDY6aInG19etu2iEuUDwHHA4ZY_ts4hboHo8fE392hFaYGonExoD7bpW5RMx5xKWeRCmWpG_PK8Aw_z1jGzdB9PANus4pteRGuln1J-kmo2lQC9pVrSyZATAKp1HfgfyZ_vUhaHEfM69cMWaCslJQ";
- // // var request = http.MultipartRequest('POST', Uri.parse('https://ek.techmaster.in/SSO/HMG'));
- var request = http.MultipartRequest('POST', Uri.parse('https://Paxes-release.techmaster.in/SSO/HMG')); // UAT
- // var request = http.MultipartRequest('POST', Uri.parse('https://paxes.com/sso/hmg')); // Prod
- request.fields.addAll({'JWTToken': token});
-
- // request.headers.addAll(headers);
-
+ http.MultipartRequest request = http.MultipartRequest('POST', Uri.parse('https://www.paxes.com/sso/hmg'));
+ // http.MultipartRequest request = http.MultipartRequest('POST', Uri.parse('https://ek.techmaster.in/SSO/HMG'));
+ request.fields.addAll({'JWTToken': token});
http.StreamedResponse response = await request.send();
if (response.statusCode == 302) {
- print("================== post ==========");
- var res = await response.stream.bytesToString();
+ String res = await response.stream.bytesToString();
return response.headers["location"];
} else {
print(response.reasonPhrase);
@@ -260,7 +278,7 @@ class DashboardApiClient {
var _mobileDeviceIdentifierPlugin = MobileDeviceIdentifier();
Codec stringToBase64 = utf8.fuse(base64);
String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC";
- var uuid = Uuid();
+ Uuid uuid = Uuid();
String? deviceId = "";
// Generate a v4 (random) id
if (Platform.isAndroid) {
@@ -272,7 +290,7 @@ class DashboardApiClient {
IosDeviceInfo iosInfo = await DeviceInfoPlugin().iosInfo;
deviceId = iosInfo.identifierForVendor;
}
- Map postParams = {
+ Map postParams = {
"UID": deviceId, //uuid.v4(), //Mobile Id
// "UID": uuid.v4(), //Mobile Id
"Latitude": lat,
@@ -298,10 +316,10 @@ class DashboardApiClient {
//Mark Fake Location
Future markFakeLocation({String lat = "0", String? long = "0", required String sourceName}) async {
String url = "${ApiConsts.swpRest}CreateIssueInfo";
- var uuid = Uuid();
+ Uuid uuid = Uuid();
// Generate a v4 (random) id
- Map postParams = {
+ Map postParams = {
"UID": uuid.v4(), //Mobile Id
"Latitude": lat,
"Longitude": long,
@@ -325,7 +343,7 @@ class DashboardApiClient {
Future getITGPageNotification() async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetPageNotification";
- Map postParams = {
+ Map postParams = {
"EmployeeNumber": AppState().getUserName,
"ItgEnableAt": "After Service Submission", //Mobile Id
"ItgServiceName": "Login",
@@ -347,7 +365,7 @@ class DashboardApiClient {
Future submitItgForm({required String comment, required String masterId, required List