diff --git a/analysis_options.yaml b/analysis_options.yaml
index a84033c..674be66 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -18,6 +18,7 @@ analyzer:
avoid_annotating_with_dynamic: error
unnecessary_null_checks: error
unnecessary_brace_in_string_interps: error
+ unnecessary_final: error
linter:
@@ -49,6 +50,7 @@ linter:
unnecessary_null_checks: true
unnecessary_brace_in_string_interps: true
unnecessary_string_interpolations: true
+ unnecessary_final: true
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
diff --git a/assets/images/call.svg b/assets/images/call.svg
new file mode 100644
index 0000000..f98d059
--- /dev/null
+++ b/assets/images/call.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/images/create_request.svg b/assets/images/create_request.svg
new file mode 100644
index 0000000..c5bdeea
--- /dev/null
+++ b/assets/images/create_request.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/drawer/change_password.svg b/assets/images/drawer/change_password.svg
new file mode 100644
index 0000000..7e953d2
--- /dev/null
+++ b/assets/images/drawer/change_password.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/drawer/employee_id.svg b/assets/images/drawer/employee_id.svg
new file mode 100644
index 0000000..b40b670
--- /dev/null
+++ b/assets/images/drawer/employee_id.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/images/drawer/logout.svg b/assets/images/drawer/logout.svg
new file mode 100644
index 0000000..acdc741
--- /dev/null
+++ b/assets/images/drawer/logout.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/drawer/mowadhafi.svg b/assets/images/drawer/mowadhafi.svg
new file mode 100644
index 0000000..b76f9b8
--- /dev/null
+++ b/assets/images/drawer/mowadhafi.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/drawer/my_profile.svg b/assets/images/drawer/my_profile.svg
new file mode 100644
index 0000000..45b9155
--- /dev/null
+++ b/assets/images/drawer/my_profile.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/images/drawer/my_requests.svg b/assets/images/drawer/my_requests.svg
new file mode 100644
index 0000000..223beee
--- /dev/null
+++ b/assets/images/drawer/my_requests.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/drawer/my_team.svg b/assets/images/drawer/my_team.svg
new file mode 100644
index 0000000..9eae21b
--- /dev/null
+++ b/assets/images/drawer/my_team.svg
@@ -0,0 +1,34 @@
+
diff --git a/assets/images/drawer/pending_trasactions.svg b/assets/images/drawer/pending_trasactions.svg
new file mode 100644
index 0000000..5975ca3
--- /dev/null
+++ b/assets/images/drawer/pending_trasactions.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/drawer/performance_evaluation.svg b/assets/images/drawer/performance_evaluation.svg
new file mode 100644
index 0000000..534b5a6
--- /dev/null
+++ b/assets/images/drawer/performance_evaluation.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/images/drawer/view_business_card.svg b/assets/images/drawer/view_business_card.svg
new file mode 100644
index 0000000..5544e05
--- /dev/null
+++ b/assets/images/drawer/view_business_card.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/images/profile_details.svg b/assets/images/profile_details.svg
new file mode 100644
index 0000000..9daf5ad
--- /dev/null
+++ b/assets/images/profile_details.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/images/team.svg b/assets/images/team.svg
new file mode 100644
index 0000000..aff9c19
--- /dev/null
+++ b/assets/images/team.svg
@@ -0,0 +1,34 @@
+
diff --git a/assets/images/user.svg b/assets/images/user.svg
new file mode 100644
index 0000000..13d9aed
--- /dev/null
+++ b/assets/images/user.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/view_attendance.svg b/assets/images/view_attendance.svg
new file mode 100644
index 0000000..256bf7a
--- /dev/null
+++ b/assets/images/view_attendance.svg
@@ -0,0 +1,8 @@
+
diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json
index 036dde0..7e3f8d7 100644
--- a/assets/langs/ar-SA.json
+++ b/assets/langs/ar-SA.json
@@ -31,6 +31,7 @@
"viewAllServices": "عرض جميع الخدمات",
"monthlyAttendance": "الحضور الشهري",
"vacationRule": "حكم اجازة",
+ "vacationType": "نوع الاجازة",
"startDateT": "تاريخ البدء",
"endDateT": "تاريخ الانتهاء",
"workFromHome": "العمل من المنزل",
@@ -96,6 +97,7 @@
"cancel": "إلغاء",
"requestedItems": "العناصر المطلوبة",
"request": "طلب",
+ "myRequest": "طلبي",
"actions": "أجراءات",
"delegate": "مندوب",
"request_info": "اطلب معلومات",
@@ -268,6 +270,7 @@
"paymentInformation": "معلومات الدفع",
"performance": "تقييم الاداء",
"performanceEvaluation": "تقييم الأداء في",
+ "performanceEvaluationIn": "تقييم أدائك في",
"amount": "مقدار",
"correctCurrentDatails": "تعديل او اكمال التفاصيل الحالية",
"selectType": " حدد نوع التغيير الذي تريد القيام به",
@@ -312,11 +315,63 @@
"requestType": "نوع الطلب",
"employeeDigitalID": "هويةالموظف الرقمية",
"businessCard": "بطاقة العمل",
+ "viewBusinessCard": "عرض بطاقة العمل",
+ "logout": "تسجيل خروج",
"checkOut": "وقت الخروج",
"regular": "منتظم",
"mark": "علامة",
"selectMethodOfAttendance": "اختر طريقة تسجيل الحضور",
"comeNearHMGWifi": "HMG wifi من فضلك اقترب من",
+ "deliverNotificationToMeRegardless": "تسليم الإخطارات إلي بغض النظر عن أي قواعد عامة",
+ "close": "أغلق",
+ "respond": "يرد",
+ "vacationRuleAdded": "تمت إضافة قاعدة الإجازة",
+ "selectTypeT": "اختر صنف",
+ "notification": "تنبيه",
+ "selectNotification": "حدد إعلام",
+ "ifAllSelectedYouWillSkip": "* إذا تم تحديد الكل ، فستنتقل إلى الخطوة 3",
+ "applyForVacationRule": "التقدم بطلب للحصول على قانون الإجازة",
+ "step1": "الخطوة 1",
+ "step2": "الخطوة 2",
+ "step3": "الخطوه 3",
+ "message": "رسالة",
+ "writeAMessage": "اكتب رسالة",
+ "notificationReassign": "إعادة تعيين الإخطار",
+ "selectEmployee": "حدد الموظف",
+ "searchEmployeeForReplacement": "ابحث عن موظف بديل",
+ "searchForEmployee": "ابحث عن موظف",
+ "pleaseSpecifyEndTime": "الرجاء تحديد وقت الانتهاء",
+ "pleaseSelectNotificationReassign": "يرجى تحديد إعادة تعيين الإخطار",
+ "pleaseSelectEmployeeForReplacement": "الرجاء تحديد موظف للاستبدال",
+ "pleaseSelectAction": "الرجاء تحديد الإجراء",
+ "pleaseSelectDate": "الرجاء تحديد التاريخ",
+ "todayAttendance": "حضور اليوم",
+ "viewAttendance": "عرض الحضور",
+ "teamMembers": "اعضاءالفريق",
+ "profileDetails": "الملف الشخصي",
+ "noResultsFound": "لايوجد نتائج",
+ "searchBy": "بحث بواسطة",
+ "myTeamMembers": "اعضاء فريقي",
+ "save": "حفظ",
+ "TurnNotificationsFor": "تفعيل الاشعارات",
+ "worklistSettings": "اعدادات الاشعارات",
+ "absenceType": "نوع الغياب",
+ "absenceCategory": "فئة الغياب",
+ "days": "أيام",
+ "hours": "ساعات",
+ "approvalStatus": "حالة القبول",
+ "absenceStatus": "حالة الغياب",
+ "subordinateLeave": "إجازة التابعيين",
+ "numberDays": "عدد الأيام",
+ "poweredBy": "مشغل بواسطة",
+ "cloudSolutions": "حلول السحابة",
+ "selectTemplate": "حدد قالب",
+ "myPostedAds": "إعلاناتي المنشورة",
+ "browseCategories": "تصفح الفئات",
+ "searchItems": "عناصر البحث",
+ "offerAndDiscounts": "العروض والخصومات",
+ "offerValid": "العرض صالح",
+ "offerExpired": "انتهى العرض",
"profile": {
"reset_password": {
"label": "Reset Password",
diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json
index 8f93658..9fbfa6f 100644
--- a/assets/langs/en-US.json
+++ b/assets/langs/en-US.json
@@ -31,6 +31,7 @@
"viewAllServices": "View All Services",
"monthlyAttendance": "Monthly Attendance",
"vacationRule": "Vacation Rule",
+ "vacationType": "Vacation Type",
"startDateT": "Start Date",
"endDateT": "End Date",
"workFromHome": "Work From Home",
@@ -93,6 +94,7 @@
"cancel": "Cancel",
"requestedItems": "Requested Items",
"request": "Request",
+ "myRequest": "My Request",
"actions": "Actions",
"delegate": "Delegate",
"request_info": "Request Info",
@@ -314,9 +316,62 @@
"regular": "Regular",
"mark": "Mark",
"performance": "Performance Evaluation",
- "performanceEvaluation": "Performance evaluation in",
+ "performanceEvaluationIn": "Your performance Evaluation in ",
+ "viewBusinessCard": "View Business Card",
+ "performanceEvaluation": "Performance Evaluation",
+ "logout": "Logout",
"selectMethodOfAttendance": "Select the method to mark the attendance",
"comeNearHMGWifi": "Please come near to HMG wifi",
+ "deliverNotificationToMeRegardless": "Deliver notifications to me regardless of any general rules",
+ "close": "Close",
+ "respond": "Respond",
+ "vacationRuleAdded": "Vacation rule added",
+ "selectTypeT": "Select Type",
+ "notification": "Notification",
+ "selectNotification": "Select Notification",
+ "ifAllSelectedYouWillSkip": "*If All is selected, you will skip to step 3",
+ "applyForVacationRule": "Apply for Vacation Rule",
+ "step1": "Step 1",
+ "step2": "Step 2",
+ "step3": "Step 3",
+ "message": "Message",
+ "writeAMessage": "Write a message",
+ "notificationReassign": "Notification Reassign",
+ "selectEmployee": "Select Employee",
+ "searchEmployeeForReplacement": "Search employee for replacement",
+ "searchForEmployee": "Search for Employee",
+ "pleaseSpecifyEndTime": "Please specify End Time",
+ "pleaseSelectNotificationReassign": "Please select notification reassign",
+ "pleaseSelectEmployeeForReplacement": "Please select employee for replacement",
+ "pleaseSelectAction": "Please select action",
+ "pleaseSelectDate": "Please select date",
+ "todayAttendance": "Today's Attendance",
+ "viewAttendance": "View Attendance",
+ "teamMembers": "Team Members",
+ "profileDetails": "Profile Details",
+ "noResultsFound": "No Results Found",
+ "searchBy": "Search by",
+ "myTeamMembers": "My Team Members",
+ "save": "Save",
+ "TurnNotificationsFor": "Turn on notifications for",
+ "worklistSettings": "Worklist Settings",
+ "absenceType": "Absence Type",
+ "absenceCategory": "Absence Category",
+ "days": "Days",
+ "hours": "Hours",
+ "approvalStatus": "Approval Status",
+ "absenceStatus": "Absence Status",
+ "poweredBy": "Powered By",
+ "cloudSolutions": "Cloud Solutions",
+ "subordinateLeave": "Subordinate Leave",
+ "numberDays": "Number of days",
+ "selectTemplate": "Select Template",
+ "myPostedAds": "My posted ads",
+ "browseCategories": "Browse Categories",
+ "searchItems": "Search Items",
+ "offerAndDiscounts": "Offer & Discounts",
+ "offerValid": "Offer Valid",
+ "offerExpired": "Offer Expired",
"profile": {
"reset_password": {
"label": "Reset Password",
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 7ca764b..f6164da 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 46;
+ objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
@@ -140,6 +140,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
AAF25E5FC427CABFCDCC628C /* [CP] Embed Pods Frameworks */,
+ 8E1FBB2EA6B3AEDD9488054A /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -156,7 +157,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1020;
+ LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -234,6 +235,23 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
+ 8E1FBB2EA6B3AEDD9488054A /* [CP] Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Copy Pods Resources";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -358,7 +376,10 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -482,7 +503,10 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -501,7 +525,10 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index a28140c..3db53b6 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
+ CADisableMinimumFrameDurationOnPhone
+
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
@@ -26,6 +28,10 @@
LaunchScreen
UIMainStoryboardFile
Main
+ NSCameraUsageDescription
+ This app requires camera access to capture & upload pictures.
+ NSPhotoLibraryUsageDescription
+ This app requires photo library access to select image as document & upload it.
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
@@ -39,6 +45,12 @@
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
+ LSApplicationQueriesSchemes
+
+ sms
+ tel
+ mailto
+
UIViewControllerBasedStatusBarAppearance
diff --git a/lib/api/api_client.dart b/lib/api/api_client.dart
index 2f53f78..3385815 100644
--- a/lib/api/api_client.dart
+++ b/lib/api/api_client.dart
@@ -67,7 +67,7 @@ class ApiClient {
factory ApiClient() => _instance;
Future postJsonForObject(FactoryConstructor factoryConstructor, String url, T jsonObject,
- {String? token, Map? queryParameters, Map? headers, int retryTimes = 0}) async {
+ {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);
@@ -76,7 +76,7 @@ class ApiClient {
print("Url:$url");
print("body:$jsonObject");
}
- var response = await postJsonForResponse(url, jsonObject, token: token, queryParameters: queryParameters, headers: _headers, retryTimes: retryTimes);
+ var response = await postJsonForResponse(url, jsonObject, token: token, queryParameters: queryParameters, headers: _headers, retryTimes: retryTimes, isFormData: isFormData);
// try {
if (!kReleaseMode) {
logger.i("res: " + response.body);
@@ -101,8 +101,10 @@ class ApiClient {
// }
}
- Future postJsonForResponse(String url, T jsonObject, {String? token, Map? queryParameters, Map? headers, int retryTimes = 0}) 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) {
requestBody = jsonEncode(jsonObject);
if (headers == null) {
@@ -112,7 +114,12 @@ class ApiClient {
}
}
- return await _postForResponse(url, requestBody, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes);
+ if (isFormData) {
+ headers = {'Content-Type': 'application/x-www-form-urlencoded'};
+ stringObj = ((jsonObject ?? {}) as Map).map((key, value) => MapEntry(key, value?.toString() ?? ""));
+ }
+
+ return await _postForResponse(url, isFormData ? stringObj : requestBody, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes);
}
Future _postForResponse(String url, requestBody, {String? token, Map? queryParameters, Map? headers, int retryTimes = 0}) async {
diff --git a/lib/api/dashboard_api_client.dart b/lib/api/dashboard_api_client.dart
index 1dd58b1..5b00e7f 100644
--- a/lib/api/dashboard_api_client.dart
+++ b/lib/api/dashboard_api_client.dart
@@ -5,6 +5,7 @@ import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/consts.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/list_menu.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:uuid/uuid.dart';
@@ -66,13 +67,13 @@ class DashboardApiClient {
}
//Menus List
- Future getListMenu() async {
+ Future> getListMenu() async {
String url = "${ApiConsts.erpRest}GET_MENU";
Map postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData;
+ return responseData.listMenu ?? [];
}, url, postParams);
}
diff --git a/lib/api/items_for_sale/items_for_sale_api_client.dart b/lib/api/items_for_sale/items_for_sale_api_client.dart
new file mode 100644
index 0000000..436ae6e
--- /dev/null
+++ b/lib/api/items_for_sale/items_for_sale_api_client.dart
@@ -0,0 +1,123 @@
+import 'dart:convert';
+
+import 'package:mohem_flutter_app/api/api_client.dart';
+import 'package:mohem_flutter_app/app_state/app_state.dart';
+import 'package:mohem_flutter_app/classes/consts.dart';
+import 'package:mohem_flutter_app/models/items_for_sale/get_employee_ads_list.dart';
+import 'package:mohem_flutter_app/models/items_for_sale/get_items_for_sale_list.dart';
+import 'package:mohem_flutter_app/models/items_for_sale/get_regions_list.dart';
+import 'package:mohem_flutter_app/models/items_for_sale/get_sale_categories_list.dart';
+import 'package:mohem_flutter_app/models/items_for_sale/item_review_model.dart';
+
+class ItemsForSaleApiClient {
+ static final ItemsForSaleApiClient _instance = ItemsForSaleApiClient._internal();
+
+ ItemsForSaleApiClient._internal();
+
+ factory ItemsForSaleApiClient() => _instance;
+
+ Future> getSaleCategories() async {
+ List getSaleCategoriesList = [];
+
+ String url = "${ApiConsts.cocRest}Mohemm_ITG_GetItemSaleCategory";
+ Map postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgPageSize": 10, "ItgPageNo": 1};
+
+ postParams.addAll(AppState().postParamsJson);
+ return await ApiClient().postJsonForObject((response) {
+ var body = json.decode(response['Mohemm_ITG_ResponseItem']);
+
+ GetSaleCategoriesList getSaleCategoriesListObj = new GetSaleCategoriesList();
+ getSaleCategoriesListObj.categoryID = 0;
+ getSaleCategoriesListObj.title = "All";
+ getSaleCategoriesListObj.titleAr = "الجميع";
+ getSaleCategoriesListObj.isActive = true;
+ getSaleCategoriesListObj.content =
+ '';
+
+ getSaleCategoriesList.add(getSaleCategoriesListObj);
+
+ body['result']['data'].forEach((v) {
+ getSaleCategoriesList.add(new GetSaleCategoriesList.fromJson(v));
+ });
+ return getSaleCategoriesList;
+ }, url, postParams);
+ }
+
+ Future> getItemsForSale(int itgPageNo, int itgCategoryID) async {
+ List getItemsForSaleList = [];
+
+ String url = "${ApiConsts.cocRest}Mohemm_ITG_GetItemForSale";
+ Map postParams = {
+ "EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
+ "ItgPageSize": 10,
+ "ItgPageNo": itgPageNo,
+ "ItgStatus": "Approved",
+ "ItgCategoryID": itgCategoryID
+ };
+
+ postParams.addAll(AppState().postParamsJson);
+ return await ApiClient().postJsonForObject((response) {
+ var body = json.decode(response['Mohemm_ITG_ResponseItem']);
+
+ body['result']['data'].forEach((v) {
+ getItemsForSaleList.add(new GetItemsForSaleList.fromJson(v));
+ });
+ return getItemsForSaleList;
+ }, url, postParams);
+ }
+
+ Future> getEmployeePostedAds() async {
+ List employeePostedAdsList = [];
+
+ String url = "${ApiConsts.cocRest}Mohemm_ITG_GetItemForSaleByEmployee";
+ Map postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgEmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
+
+ postParams.addAll(AppState().postParamsJson);
+ return await ApiClient().postJsonForObject((response) {
+ var body = json.decode(response['Mohemm_ITG_ResponseItem']);
+
+ body['result']['data'].forEach((v) {
+ employeePostedAdsList.add(new EmployeePostedAds.fromJson(v));
+ });
+ return employeePostedAdsList;
+ }, url, postParams);
+ }
+
+ Future> getRegions() async {
+ String url = "${ApiConsts.cocRest}Mohemm_ITG_GetRegion";
+ List getRegionsList = [];
+ Map postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgEmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
+ postParams.addAll(AppState().postParamsJson);
+ return await ApiClient().postJsonForObject((response) {
+ var body = json.decode(response['Mohemm_ITG_ResponseItem']);
+
+ body['result']['data'].forEach((v) {
+ getRegionsList.add(new GetRegionsList.fromJson(v));
+ });
+ return getRegionsList;
+ }, url, postParams);
+ }
+
+ Future addItemForSale(ItemReviewModel itemReviewModel, List