diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 5f40cbc..dc2b5d5 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -279,7 +279,7 @@ "enterNewInfo": " أدخل معلومات جديدة بسبب تغيير حقيقي في التفاصيل الحالية (على سبيل المثال بسبب تغيير في الحالة الاجتماعية", "endDate": "تاريخ الانتهاء", "removeThisMember": "هل انت متأكد تريد ازالة هذا العضو؟", - "updateThisMember ": "هل انت متأكد تريد تحديث بيانات هذا العضو؟", + "wantUpdateThisMember ": "هل انت متأكد تريد تحديث بيانات هذا العضو؟", "addNewFamilyMember": "اضافة عضو جديد", "addRow": "اضافة صف جديد", "pleaseSelect": "الرجاء اختيار", @@ -407,6 +407,15 @@ "rateUI": ".1 كيف تريد تقييم التطبيق", "submitSurvey":"ارسال الاستبيان", "typeHere": "اكتب هنا", + "currentBalance": "الرصيد الحالي", + "currentLeaveBalance" : "رصيد الاجازات الحالي", + "calculatedDays": "الايام المحسوبه", + "totalDays": "مجموع الأيام", + "usedBalance": "المستخدم", + "infants":"رضيع", + "child":"طفل", + "adult": "بالغ", + "updateMember": "هل انت متأكد تريد تحديث بيانات هذا العضو؟", "profile": { "reset_password": { "label": "Reset Password", diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index c0cf46d..ec30ecc 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -276,7 +276,7 @@ "enterNewInfo": "Enter new Information because of a real change to the current details (e.g because of a change in marital status)", "endDate": "*End Date", "removeThisMember": "Are You Sure You Want to Remove this Member?", - "updateThisMember": "Are You Sure You Want to Update this Member?", + "wantUpdateThisMember": "Are You Sure You Want to Update this Member?", "addNewFamilyMember": "Add New Family Member", "addRow": "Add new row", "pleaseSelect": "Please Select *", @@ -407,6 +407,15 @@ "rateUI": "1. How would you rate this UI?", "submitSurvey":"Submit Survey", "typeHere": "Type here", + "currentBalance": "Current Balance", + "currentLeaveBalance" : "Current Leave Balance", + "calculatedDays": "Calculated Days", + "totalDays": "Total Days", + "usedBalance": "Used", + "infants":"Infants", + "child":"Child", + "adult": "Adult", + "updateMember": "Are You Sure You Want to Update this Member?", "profile": { "reset_password": { "label": "Reset Password", diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index bd3e603..2646e3b 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -379,6 +379,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = 99Z3UD3LJM; ENABLE_BITCODE = NO; @@ -391,6 +393,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemmtest; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -510,6 +513,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = 99Z3UD3LJM; ENABLE_BITCODE = NO; @@ -522,6 +527,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemmtest; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -536,6 +542,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = 99Z3UD3LJM; ENABLE_BITCODE = NO; @@ -548,6 +556,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemmtest; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; diff --git a/lib/api/api_client.dart b/lib/api/api_client.dart index 1a035a2..7a6f668 100644 --- a/lib/api/api_client.dart +++ b/lib/api/api_client.dart @@ -18,7 +18,8 @@ class APIError { APIError(this.errorCode, this.errorMessage); - Map toJson() => {'errorCode': errorCode, 'errorMessage': errorMessage}; + Map toJson() => + {'errorCode': errorCode, 'errorMessage': errorMessage}; @override String toString() { @@ -53,7 +54,8 @@ APIException _throwAPIException(Response response) { return APIException(APIException.INTERNAL_SERVER_ERROR); case 444: var downloadUrl = response.headers["location"]; - return APIException(APIException.UPGRADE_REQUIRED, arguments: downloadUrl); + return APIException(APIException.UPGRADE_REQUIRED, + arguments: downloadUrl); default: return APIException(APIException.OTHER); } @@ -66,8 +68,13 @@ 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); @@ -77,7 +84,12 @@ class ApiClient { var bodyJson = json.encode(jsonObject); print("body:$bodyJson"); } - var response = await postJsonForResponse(url, jsonObject, token: token, queryParameters: queryParameters, headers: _headers, retryTimes: retryTimes, isFormData: isFormData); + var response = await postJsonForResponse(url, jsonObject, + token: token, + queryParameters: queryParameters, + headers: _headers, + retryTimes: retryTimes, + isFormData: isFormData); // try { if (!kReleaseMode) { logger.i("res: " + response.body); @@ -90,7 +102,8 @@ class ApiClient { return factoryConstructor(jsonData); } else { APIError? apiError; - apiError = APIError(jsonData['ErrorCode'], jsonData['ErrorEndUserMessage']); + apiError = + APIError(jsonData['ErrorCode'], jsonData['ErrorEndUserMessage']); throw APIException(APIException.BAD_REQUEST, error: apiError); } // } catch (ex) { @@ -103,7 +116,11 @@ class ApiClient { } Future postJsonForResponse(String url, T jsonObject, - {String? token, Map? queryParameters, Map? headers, int retryTimes = 0, bool isFormData = false}) async { + {String? token, + Map? queryParameters, + Map? headers, + int retryTimes = 0, + bool isFormData = false}) async { String? requestBody; late Map stringObj; if (jsonObject != null) { @@ -117,13 +134,22 @@ class ApiClient { if (isFormData) { headers = {'Content-Type': 'application/x-www-form-urlencoded'}; - stringObj = ((jsonObject ?? {}) as Map).map((key, value) => MapEntry(key, value?.toString() ?? "")); + 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); + 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 { + Future _postForResponse(String url, requestBody, + {String? token, + Map? queryParameters, + Map? headers, + int retryTimes = 0}) async { try { var _headers = {}; if (token != null) { @@ -138,7 +164,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: 60)); + var response = + await _post(Uri.parse(url), body: requestBody, headers: _headers) + .timeout(Duration(seconds: 120)); if (response.statusCode >= 200 && response.statusCode < 300) { return response; @@ -149,7 +177,11 @@ class ApiClient { if (retryTimes > 0) { print('will retry after 3 seconds...'); await Future.delayed(Duration(seconds: 3)); - return await _postForResponse(url, requestBody, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1); + return await _postForResponse(url, requestBody, + token: token, + queryParameters: queryParameters, + headers: headers, + retryTimes: retryTimes - 1); } else { throw APIException(APIException.OTHER, arguments: e); } @@ -157,7 +189,11 @@ class ApiClient { if (retryTimes > 0) { print('will retry after 3 seconds...'); await Future.delayed(Duration(seconds: 3)); - return await _postForResponse(url, requestBody, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1); + return await _postForResponse(url, requestBody, + token: token, + queryParameters: queryParameters, + headers: headers, + retryTimes: retryTimes - 1); } else { throw APIException(APIException.OTHER, arguments: e); } @@ -167,23 +203,39 @@ class ApiClient { if (retryTimes > 0) { print('will retry after 3 seconds...'); await Future.delayed(Duration(seconds: 3)); - return await _postForResponse(url, requestBody, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1); + return await _postForResponse(url, requestBody, + token: token, + queryParameters: queryParameters, + headers: headers, + retryTimes: retryTimes - 1); } else { throw APIException(APIException.OTHER, arguments: e); } } } - Future getJsonForResponse(String url, {String? token, Map? queryParameters, Map? headers, int retryTimes = 0}) async { + Future getJsonForResponse(String url, + {String? token, + Map? queryParameters, + Map? headers, + int retryTimes = 0}) async { if (headers == null) { headers = {'Content-Type': 'application/json'}; } else { headers['Content-Type'] = 'application/json'; } - return await _getForResponse(url, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes); + return await _getForResponse(url, + token: token, + queryParameters: queryParameters, + headers: headers, + retryTimes: retryTimes); } - Future _getForResponse(String url, {String? token, Map? queryParameters, Map? headers, int retryTimes = 0}) async { + Future _getForResponse(String url, + {String? token, + Map? queryParameters, + Map? headers, + int retryTimes = 0}) async { try { var _headers = {}; if (token != null) { @@ -198,7 +250,8 @@ 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(Duration(seconds: 60)); if (response.statusCode >= 200 && response.statusCode < 300) { return response; @@ -209,7 +262,11 @@ class ApiClient { if (retryTimes > 0) { print('will retry after 3 seconds...'); await Future.delayed(Duration(seconds: 3)); - return await _getForResponse(url, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1); + return await _getForResponse(url, + token: token, + queryParameters: queryParameters, + headers: headers, + retryTimes: retryTimes - 1); } else { throw APIException(APIException.OTHER, arguments: e); } @@ -217,7 +274,11 @@ class ApiClient { if (retryTimes > 0) { print('will retry after 3 seconds...'); await Future.delayed(Duration(seconds: 3)); - return await _getForResponse(url, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1); + return await _getForResponse(url, + token: token, + queryParameters: queryParameters, + headers: headers, + retryTimes: retryTimes - 1); } else { throw APIException(APIException.OTHER, arguments: e); } @@ -227,14 +288,19 @@ class ApiClient { if (retryTimes > 0) { print('will retry after 3 seconds...'); await Future.delayed(Duration(seconds: 3)); - return await _getForResponse(url, token: token, queryParameters: queryParameters, headers: headers, retryTimes: retryTimes - 1); + return await _getForResponse(url, + token: token, + queryParameters: queryParameters, + headers: headers, + retryTimes: retryTimes - 1); } else { throw APIException(APIException.OTHER, arguments: e); } } } - Future _get(url, {Map? headers}) => _withClient((client) => client.get(url, headers: headers)); + Future _get(url, {Map? headers}) => + _withClient((client) => client.get(url, headers: headers)); bool _certificateCheck(X509Certificate cert, String host, int port) => true; @@ -248,5 +314,8 @@ class ApiClient { } } - Future _post(url, {Map? headers, body, Encoding? encoding}) => _withClient((client) => client.post(url, headers: headers, body: body, encoding: encoding)); + Future _post(url, + {Map? headers, body, Encoding? encoding}) => + _withClient((client) => + client.post(url, headers: headers, body: body, encoding: encoding)); } diff --git a/lib/api/dashboard_api_client.dart b/lib/api/dashboard_api_client.dart index 214ea05..dd3f182 100644 --- a/lib/api/dashboard_api_client.dart +++ b/lib/api/dashboard_api_client.dart @@ -3,6 +3,7 @@ import 'dart:async'; 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/classes/date_uitl.dart'; import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_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'; @@ -37,6 +38,20 @@ class DashboardApiClient { }, url, postParams); } + Future getCOCNotifications() async { + String url = "${ApiConsts.cocRest}Mohemm_ITG_ReviewerAdmin_Pending_Tasks"; + Map postParams = { + "Date": DateUtil.getISODateFormat(DateTime.now()), + "EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER + }; + + postParams.addAll(AppState().postParamsJson); + return await ApiClient().postJsonForObject((json) { + GenericResponseModel responseData = GenericResponseModel.fromJson(json); + return responseData; + }, url, postParams); + } + Future getItgFormsPendingTask() async { String url = "${ApiConsts.cocRest}ITGFormsPendingTasks"; Map postParams = {}; @@ -47,7 +62,8 @@ class DashboardApiClient { }, url, postParams); } - Future> getAccrualBalances(String effectiveDate) async { + Future> getAccrualBalances( + String effectiveDate) async { String url = "${ApiConsts.erpRest}GET_ACCRUAL_BALANCES"; Map postParams = {"P_EFFECTIVE_DATE": effectiveDate}; postParams.addAll(AppState().postParamsJson); @@ -81,7 +97,10 @@ 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) { GenericResponseModel responseData = GenericResponseModel.fromJson(json); @@ -90,7 +109,13 @@ class DashboardApiClient { } //Mark Attendance - Future markAttendance({String lat = "0", String? long = "0", required int pointType, String nfcValue = "", bool isGpsRequired = false, String QRValue = ""}) async { + Future markAttendance( + {String lat = "0", + String? long = "0", + required int pointType, + String nfcValue = "", + bool isGpsRequired = false, + String QRValue = ""}) async { String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC"; var uuid = Uuid(); // Generate a v4 (random) id diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index 645aaf8..12f818e 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -23,4 +23,4 @@ class SharedPrefsConsts { static String mohemmWifiSSID = "mohemmWifiSSID"; static String mohemmWifiPassword = "mohemmWifiPassword"; static String editItemForSale = "editItemForSale"; -} \ No newline at end of file +} diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index 4688cd3..117011b 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -295,7 +295,7 @@ class CodegenLoader extends AssetLoader{ "enterNewInfo": " أدخل معلومات جديدة بسبب تغيير حقيقي في التفاصيل الحالية (على سبيل المثال بسبب تغيير في الحالة الاجتماعية", "endDate": "تاريخ الانتهاء", "removeThisMember": "هل انت متأكد تريد ازالة هذا العضو؟", - "updateThisMember ": "هل انت متأكد تريد تحديث بيانات هذا العضو؟", + "wantUpdateThisMember ": "هل انت متأكد تريد تحديث بيانات هذا العضو؟", "addNewFamilyMember": "اضافة عضو جديد", "addRow": "اضافة صف جديد", "pleaseSelect": "الرجاء اختيار", @@ -423,6 +423,15 @@ class CodegenLoader extends AssetLoader{ "rateUI": ".1 كيف تريد تقييم التطبيق", "submitSurvey": "ارسال الاستبيان", "typeHere": "اكتب هنا", + "currentBalance": "الرصيد الحالي", + "currentLeaveBalance": "رصيد الاجازات الحالي", + "calculatedDays": "الايام المحسوبه", + "totalDays": "مجموع الأيام", + "usedBalance": "المستخدم", + "infants": "رضيع", + "child": "طفل", + "adult": "بالغ", + "updateMember": "هل انت متأكد تريد تحديث بيانات هذا العضو؟", "profile": { "reset_password": { "label": "Reset Password", @@ -735,7 +744,7 @@ static const Map en_US = { "enterNewInfo": "Enter new Information because of a real change to the current details (e.g because of a change in marital status)", "endDate": "*End Date", "removeThisMember": "Are You Sure You Want to Remove this Member?", - "updateThisMember": "Are You Sure You Want to Update this Member?", + "wantUpdateThisMember": "Are You Sure You Want to Update this Member?", "addNewFamilyMember": "Add New Family Member", "addRow": "Add new row", "pleaseSelect": "Please Select *", @@ -866,6 +875,15 @@ static const Map en_US = { "rateUI": "1. How would you rate this UI?", "submitSurvey": "Submit Survey", "typeHere": "Type here", + "currentBalance": "Current Balance", + "currentLeaveBalance": "Current Leave Balance", + "calculatedDays": "Calculated Days", + "totalDays": "Total Days", + "usedBalance": "Used", + "infants": "Infants", + "child": "Child", + "adult": "Adult", + "updateMember": "Are You Sure You Want to Update this Member?", "profile": { "reset_password": { "label": "Reset Password", diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 0934ff4..9ede892 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -280,7 +280,7 @@ abstract class LocaleKeys { static const enterNewInfo = 'enterNewInfo'; static const endDate = 'endDate'; static const removeThisMember = 'removeThisMember'; - static const updateThisMember = 'updateThisMember '; + static const wantUpdateThisMember = 'wantUpdateThisMember '; static const addNewFamilyMember = 'addNewFamilyMember'; static const addRow = 'addRow'; static const pleaseSelect = 'pleaseSelect'; @@ -408,6 +408,15 @@ abstract class LocaleKeys { static const rateUI = 'rateUI'; static const submitSurvey = 'submitSurvey'; static const typeHere = 'typeHere'; + static const currentBalance = 'currentBalance'; + static const currentLeaveBalance = 'currentLeaveBalance'; + static const calculatedDays = 'calculatedDays'; + static const totalDays = 'totalDays'; + static const usedBalance = 'usedBalance'; + static const infants = 'infants'; + static const child = 'child'; + static const adult = 'adult'; + static const updateMember = 'updateMember'; static const profile_reset_password_label = 'profile.reset_password.label'; static const profile_reset_password_username = 'profile.reset_password.username'; static const profile_reset_password_password = 'profile.reset_password.password'; diff --git a/lib/models/dashboard/mohemm_itg_pending_task_responseitem.dart b/lib/models/dashboard/mohemm_itg_pending_task_responseitem.dart new file mode 100644 index 0000000..c4c300a --- /dev/null +++ b/lib/models/dashboard/mohemm_itg_pending_task_responseitem.dart @@ -0,0 +1,44 @@ +class MohemmITGPendingTaskResponseItem { + int? escalation; + int? exceedTAT; + int? extendTATRequest; + int? open; + int? pendningWithReviewer; + int? waitingForAcceptance; + int? waitingToClose; + int? withInTAT; + + MohemmITGPendingTaskResponseItem( + {this.escalation, + this.exceedTAT, + this.extendTATRequest, + this.open, + this.pendningWithReviewer, + this.waitingForAcceptance, + this.waitingToClose, + this.withInTAT}); + + MohemmITGPendingTaskResponseItem.fromJson(Map json) { + escalation = json['escalation']; + exceedTAT = json['exceedTAT']; + extendTATRequest = json['extendTATRequest']; + open = json['open']; + pendningWithReviewer = json['pendningWithReviewer']; + waitingForAcceptance = json['waitingForAcceptance']; + waitingToClose = json['waitingToClose']; + withInTAT = json['withInTAT']; + } + + Map toJson() { + Map data = new Map(); + data['escalation'] = this.escalation; + data['exceedTAT'] = this.exceedTAT; + data['extendTATRequest'] = this.extendTATRequest; + data['open'] = this.open; + data['pendningWithReviewer'] = this.pendningWithReviewer; + data['waitingForAcceptance'] = this.waitingForAcceptance; + data['waitingToClose'] = this.waitingToClose; + data['withInTAT'] = this.withInTAT; + return data; + } +} diff --git a/lib/models/generic_response_model.dart b/lib/models/generic_response_model.dart index c6c605e..d12cb09 100644 --- a/lib/models/generic_response_model.dart +++ b/lib/models/generic_response_model.dart @@ -7,6 +7,7 @@ import 'package:mohem_flutter_app/models/dashboard/get_open_missing_swipes_list_ import 'package:mohem_flutter_app/models/dashboard/get_open_notifications_list.dart'; import 'package:mohem_flutter_app/models/dashboard/list_menu.dart'; import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart'; +import 'package:mohem_flutter_app/models/dashboard/mohemm_itg_pending_task_responseitem.dart'; import 'package:mohem_flutter_app/models/get_absence_collection_notification_body_list_model.dart'; import 'package:mohem_flutter_app/models/get_action_history_list_model.dart'; import 'package:mohem_flutter_app/models/get_approves_list_model.dart'; @@ -153,7 +154,8 @@ class GenericResponseModel { List? getConcurrentProgramsList; List? getAbsenceAttachmentsList; List? getAbsenceAttendanceTypesList; - List? getAbsenceCollectionNotificationBodyList; + List? + getAbsenceCollectionNotificationBodyList; List? getAbsenceDffStructureList; List? getAbsenceTransactionList; List? getAccrualBalancesList; @@ -178,7 +180,8 @@ class GenericResponseModel { List? getDayHoursTypeDetailsList; List? getDeductionsList; GetDefaultValueList? getDefaultValueList; - List? getEITCollectionNotificationBodyList; + List? + getEITCollectionNotificationBodyList; List? getEITDFFStructureList; List? getEITTransactionList; List? getEarningsList; @@ -232,7 +235,8 @@ class GenericResponseModel { List? getCCPDFFStructureModel; List? getSubordinatesAttdStatusList; List? getSubordinatesLeavesList; - List? getSubordinatesLeavesTotalVacationsList; + List? + getSubordinatesLeavesTotalVacationsList; List? getSummaryOfPaymentList; List? getSwipesList; List? getTermColsStructureList; @@ -247,6 +251,7 @@ class GenericResponseModel { List? getMowadhafhiProjects; List? getProjectDepartments; List? getDepartmentSections; + MohemmITGPendingTaskResponseItem? mohemmITGPendingTaskResponseItem; List? getPendingTransactionsFunctions; List? getPendingTransactionsDetails; List? getUserItemTypesList; @@ -293,7 +298,8 @@ class GenericResponseModel { String? mohemmWifiPassword; String? mohemmWifiSSID; NotificationAction? notificationAction; - List? notificationGetRespondAttributesList; + List? + notificationGetRespondAttributesList; List? notificationRespondRolesList; int? oracleOutPutNumber; String? pASSWORDEXPIREDMSG; @@ -664,13 +670,22 @@ class GenericResponseModel { addAttSuccessList!.add(AddAttSuccessList.fromJson(v)); }); } - addAttachmentList = json['AddAttachment_List'] != null ? AddAttachmentList.fromJson(json['AddAttachment_List']) : null; + addAttachmentList = json['AddAttachment_List'] != null + ? AddAttachmentList.fromJson(json['AddAttachment_List']) + : null; bCDomain = json['BC_Domain']; bCLogo = json['BC_Logo']; - basicMemberInformation = json['BasicMemberInformation'] != null ? BasicMemberInformationModel.fromJson(json['BasicMemberInformation']) : null; + basicMemberInformation = json['BasicMemberInformation'] != null + ? BasicMemberInformationModel.fromJson(json['BasicMemberInformation']) + : null; businessCardPrivilege = json['BusinessCardPrivilege']; - calculateAbsenceDuration = json['CalculateAbsenceDuration'] != null ? new CalculateAbsenceDuration.fromJson(json['CalculateAbsenceDuration']) : null; - cancelHRTransactionLIst = json['CancelHRTransactionLIst'] != null ? new CancelHRTransactionLIst.fromJson(json['CancelHRTransactionLIst']) : null; + calculateAbsenceDuration = json['CalculateAbsenceDuration'] != null + ? new CalculateAbsenceDuration.fromJson( + json['CalculateAbsenceDuration']) + : null; + cancelHRTransactionLIst = json['CancelHRTransactionLIst'] != null + ? new CancelHRTransactionLIst.fromJson(json['CancelHRTransactionLIst']) + : null; chatEmployeeLoginList = json['Chat_EmployeeLoginList']; companyBadge = json['CompanyBadge']; companyImage = json['CompanyImage']; @@ -685,7 +700,9 @@ class GenericResponseModel { }); } - createVacationRuleList = json['CreateVacationRuleList'] != null ? CreateVacationRuleList.fromJson(json['CreateVacationRuleList']) : null; + createVacationRuleList = json['CreateVacationRuleList'] != null + ? CreateVacationRuleList.fromJson(json['CreateVacationRuleList']) + : null; deleteAttachmentList = json['DeleteAttachmentList']; deleteVacationRuleList = json['DeleteVacationRuleList']; disableSessionList = json['DisableSessionList']; @@ -696,14 +713,17 @@ class GenericResponseModel { if (json['GetAbsenceAttendanceTypesList'] != null) { getAbsenceAttendanceTypesList = []; json['GetAbsenceAttendanceTypesList'].forEach((v) { - getAbsenceAttendanceTypesList!.add(GetAbsenceAttendanceTypesList.fromJson(v)); + getAbsenceAttendanceTypesList! + .add(GetAbsenceAttendanceTypesList.fromJson(v)); }); } if (json['GetAbsenceCollectionNotificationBodyList'] != null) { - getAbsenceCollectionNotificationBodyList = []; + getAbsenceCollectionNotificationBodyList = + []; json['GetAbsenceCollectionNotificationBodyList'].forEach((v) { - getAbsenceCollectionNotificationBodyList!.add(GetAbsenceCollectionNotificationBodyList.fromJson(v)); + getAbsenceCollectionNotificationBodyList! + .add(GetAbsenceCollectionNotificationBodyList.fromJson(v)); }); } @@ -721,7 +741,10 @@ class GenericResponseModel { }); } - getAccrualBalancesList = json["GetAccrualBalancesList"] == null ? null : List.from(json["GetAccrualBalancesList"].map((x) => GetAccrualBalancesList.fromJson(x))); + getAccrualBalancesList = json["GetAccrualBalancesList"] == null + ? null + : List.from(json["GetAccrualBalancesList"] + .map((x) => GetAccrualBalancesList.fromJson(x))); if (json['GetActionHistoryList'] != null) { getActionHistoryList = []; @@ -751,18 +774,22 @@ class GenericResponseModel { getAttachementList!.add(GetAttachementList.fromJson(v)); }); } - getAttendanceTrackingList = json["GetAttendanceTrackingList"] == null ? null : GetAttendanceTracking.fromMap(json["GetAttendanceTrackingList"]); + getAttendanceTrackingList = json["GetAttendanceTrackingList"] == null + ? null + : GetAttendanceTracking.fromMap(json["GetAttendanceTrackingList"]); if (json['GetBasicDetColsStructureList'] != null) { getBasicDetColsStructureList = []; json['GetBasicDetColsStructureList'].forEach((v) { - getBasicDetColsStructureList!.add(GetBasicDetColsStructureList.fromJson(v)); + getBasicDetColsStructureList! + .add(GetBasicDetColsStructureList.fromJson(v)); }); } // getBasicDetDffStructureList = json['GetBasicDetDffStructureList']; if (json['GetBasicDetDffStructureList'] != null) { getBasicDetDffStructureList = []; json['GetBasicDetDffStructureList'].forEach((v) { - getBasicDetDffStructureList!.add(GetBasicDetDffStructureList.fromJson(v)); + getBasicDetDffStructureList! + .add(GetBasicDetDffStructureList.fromJson(v)); }); } if (json['GetContactDffStructureList'] != null) { @@ -779,7 +806,8 @@ class GenericResponseModel { }); } - getCEICollectionNotificationBodyList = json['GetCEICollectionNotificationBodyList']; + getCEICollectionNotificationBodyList = + json['GetCEICollectionNotificationBodyList']; getCEIDFFStructureList = json['GetCEIDFFStructureList']; getCEITransactionList = json['GetCEITransactionList']; getCcpTransactionsList = json['GetCcpTransactionsList']; @@ -792,13 +820,46 @@ class GenericResponseModel { if (json['GetContactColsStructureList'] != null) { getContactColsStructureList = []; json['GetContactColsStructureList'].forEach((v) { - getContactColsStructureList!.add(GetContactColsStructureList.fromJson(v)); + getContactColsStructureList! + .add(GetContactColsStructureList.fromJson(v)); }); } getContactColsStructureList = json['GetContactColsStructureList']; getContactDetailsList = json['GetContactDetailsList']; getContactDffStructureList = json['GetContactDffStructureList']; - getContactNotificationBodyList = json["GetContactNotificationBodyList"] == null ? null : GetContactNotificationBodyList.fromJson(json["GetContactNotificationBodyList"]); + getContactNotificationBodyList = + json["GetContactNotificationBodyList"] == null + ? null + : GetContactNotificationBodyList.fromJson( + json["GetContactNotificationBodyList"]); + + if (json['GetContactColsStructureList'] != null) { + getContactColsStructureList = []; + json['GetContactColsStructureList'].forEach((v) { + getContactColsStructureList! + .add(GetContactColsStructureList.fromJson(v)); + }); + } + + if (json['GetContactDetailsList'] != null) { + getContactDetailsList = []; + json['GetContactDetailsList'].forEach((v) { + getContactDetailsList!.add(GetContactDetailsList.fromJson(v)); + }); + } + if (json['GetContactDffStructureList'] != null) { + getContactDffStructureList = []; + json['GetContactDffStructureList'].forEach((v) { + getContactDffStructureList!.add(GetContactDffStructureList.fromJson(v)); + }); + } + // getContactDetailsList = json['GetContactDetailsList']; + // getContactDffStructureList = json['GetContactDffStructureList']; + getContactNotificationBodyList = + json["GetContactNotificationBodyList"] == null + ? null + : GetContactNotificationBodyList.fromJson( + json["GetContactNotificationBodyList"]); if (json['GetCountriesList'] != null) { getCountriesList = []; @@ -820,10 +881,15 @@ class GenericResponseModel { getDeductionsList!.add(GetDeductionsList.fromJson(v)); }); } - getDefaultValueList = json['GetDefaultValueList'] != null ? GetDefaultValueList.fromJson(json['GetDefaultValueList']) : null; - getEITCollectionNotificationBodyList = json["GetEITCollectionNotificationBodyList"] == null - ? null - : List.from(json["GetEITCollectionNotificationBodyList"].map((x) => GetEitCollectionNotificationBodyList.fromJson(x))); + getDefaultValueList = json['GetDefaultValueList'] != null + ? GetDefaultValueList.fromJson(json['GetDefaultValueList']) + : null; + getEITCollectionNotificationBodyList = + json["GetEITCollectionNotificationBodyList"] == null + ? null + : List.from( + json["GetEITCollectionNotificationBodyList"].map( + (x) => GetEitCollectionNotificationBodyList.fromJson(x))); if (json['GetEITDFFStructureList'] != null) { getEITDFFStructureList = []; json['GetEITDFFStructureList'].forEach((v) { @@ -852,7 +918,8 @@ class GenericResponseModel { if (json['GetEmployeeBasicDetailsList'] != null) { getEmployeeBasicDetailsList = []; json['GetEmployeeBasicDetailsList'].forEach((v) { - getEmployeeBasicDetailsList!.add(GetEmployeeBasicDetailsList.fromJson(v)); + getEmployeeBasicDetailsList! + .add(GetEmployeeBasicDetailsList.fromJson(v)); }); } if (json['GetEmployeeContactsList'] != null) { @@ -870,25 +937,34 @@ class GenericResponseModel { if (json['GetEmployeeSubordinatesList'] != null) { getEmployeeSubordinatesList = []; json['GetEmployeeSubordinatesList'].forEach((v) { - getEmployeeSubordinatesList!.add(new GetEmployeeSubordinatesList.fromJson(v)); + getEmployeeSubordinatesList! + .add(new GetEmployeeSubordinatesList.fromJson(v)); }); } getFliexfieldStructureList = json['GetFliexfieldStructureList']; - getHrCollectionNotificationBodyList = json['GetHrCollectionNotificationBodyList']; + getHrCollectionNotificationBodyList = + json['GetHrCollectionNotificationBodyList']; getHrTransactionList = json['GetHrTransactionList']; - getItemCreationNtfBodyList = json['GetItemCreationNtfBodyList'] != null ? GetItemCreationNtfBodyList.fromJson(json['GetItemCreationNtfBodyList']) : null; + getItemCreationNtfBodyList = json['GetItemCreationNtfBodyList'] != null + ? GetItemCreationNtfBodyList.fromJson( + json['GetItemCreationNtfBodyList']) + : null; if (json['GetItemTypeNotificationsList'] != null) { getItemTypeNotificationsList = []; json['GetItemTypeNotificationsList'].forEach((v) { - getItemTypeNotificationsList!.add(GetItemTypeNotificationsList.fromJson(v)); + getItemTypeNotificationsList! + .add(GetItemTypeNotificationsList.fromJson(v)); }); } getItemTypesList = json['GetItemTypesList']; getLookupValuesList = json['GetLookupValuesList']; - getMenuEntriesList = json["GetMenuEntriesList"] == null ? null : List.from(json["GetMenuEntriesList"].map((x) => GetMenuEntriesList.fromJson(x))); + getMenuEntriesList = json["GetMenuEntriesList"] == null + ? null + : List.from(json["GetMenuEntriesList"] + .map((x) => GetMenuEntriesList.fromJson(x))); if (json['GetMoItemHistoryList'] != null) { getMoItemHistoryList = []; json['GetMoItemHistoryList'].forEach((v) { @@ -913,7 +989,8 @@ class GenericResponseModel { if (json['GetNotificationReassignModeList'] != null) { getNotificationReassignModeList = []; json['GetNotificationReassignModeList'].forEach((v) { - getNotificationReassignModeList!.add(GetNotificationReassignModeList.fromJson(v)); + getNotificationReassignModeList! + .add(GetNotificationReassignModeList.fromJson(v)); }); } @@ -924,8 +1001,13 @@ class GenericResponseModel { }); } - getOpenMissingSwipesList = json["GetOpenMissingSwipesList"] == null ? null : GetOpenMissingSwipesList.fromJson(json["GetOpenMissingSwipesList"]); - getOpenNotificationsList = json["GetOpenNotificationsList"] == null ? null : List.from(json["GetOpenNotificationsList"].map((x) => GetOpenNotificationsList.fromMap(x))); + getOpenMissingSwipesList = json["GetOpenMissingSwipesList"] == null + ? null + : GetOpenMissingSwipesList.fromJson(json["GetOpenMissingSwipesList"]); + getOpenNotificationsList = json["GetOpenNotificationsList"] == null + ? null + : List.from(json["GetOpenNotificationsList"] + .map((x) => GetOpenNotificationsList.fromMap(x))); getOpenNotificationsNumList = json['GetOpenNotificationsNumList']; getOpenPeriodDatesList = json['GetOpenPeriodDatesList']; getOrganizationsSalariesList = json['GetOrganizationsSalariesList']; @@ -945,17 +1027,26 @@ class GenericResponseModel { } // getPendingReqDetailsList = json['GetPendingReqDetailsList']; // getPendingReqFunctionsList = json['GetPendingReqFunctionsList']; - getPerformanceAppraisalList = - json['GetPerformanceAppraisalList'] == null ? null : List.from(json["GetPerformanceAppraisalList"].map((x) => GetPerformanceAppraisalList.fromJson(x))); + getPerformanceAppraisalList = json['GetPerformanceAppraisalList'] == null + ? null + : List.from( + json["GetPerformanceAppraisalList"] + .map((x) => GetPerformanceAppraisalList.fromJson(x))); getPhonesNotificationBodyList = - json["GetPhonesNotificationBodyList"] == null ? null : List.from(json["GetPhonesNotificationBodyList"].map((x) => GetPhonesNotificationBodyList.fromJson(x))); + json["GetPhonesNotificationBodyList"] == null + ? null + : List.from( + json["GetPhonesNotificationBodyList"] + .map((x) => GetPhonesNotificationBodyList.fromJson(x))); if (json['GetPoItemHistoryList'] != null) { getPoItemHistoryList = []; json['GetPoItemHistoryList'].forEach((v) { getPoItemHistoryList!.add(GetPoItemHistoryList.fromJson(v)); }); } - getPoNotificationBodyList = json['GetPoNotificationBodyList'] != null ? GetPoNotificationBodyList.fromJson(json['GetPoNotificationBodyList']) : null; + getPoNotificationBodyList = json['GetPoNotificationBodyList'] != null + ? GetPoNotificationBodyList.fromJson(json['GetPoNotificationBodyList']) + : null; getPrNotificationBodyList = json['GetPrNotificationBodyList']; if (json['GetQuotationAnalysisList'] != null) { getQuotationAnalysisList = []; @@ -965,13 +1056,15 @@ class GenericResponseModel { } getRFCEmployeeListList = json['GetRFCEmployeeListList']; getRespondAttributeValueList = json['GetRespondAttributeValueList']; - getSITCollectionNotificationBodyList = json['GetSITCollectionNotificationBodyList']; + getSITCollectionNotificationBodyList = + json['GetSITCollectionNotificationBodyList']; getSITDFFStructureList = json['GetSITDFFStructureList']; getSITTransactionList = json['GetSITTransactionList']; if (json['GetScheduleShiftsDetailsList'] != null) { getScheduleShiftsDetailsList = []; json['GetScheduleShiftsDetailsList'].forEach((v) { - getScheduleShiftsDetailsList!.add(GetScheduleShiftsDetailsList.fromJson(v)); + getScheduleShiftsDetailsList! + .add(GetScheduleShiftsDetailsList.fromJson(v)); }); } getShiftTypesList = json['GetShiftTypesList']; @@ -979,13 +1072,15 @@ class GenericResponseModel { if (json['GetStampMsNotificationBodyList'] != null) { getStampMsNotificationBodyList = []; json['GetStampMsNotificationBodyList'].forEach((v) { - getStampMsNotificationBodyList!.add(GetStampMsNotificationBodyList.fromJson(v)); + getStampMsNotificationBodyList! + .add(GetStampMsNotificationBodyList.fromJson(v)); }); } if (json['GetStampNsNotificationBodyList'] != null) { getStampNsNotificationBodyList = []; json['GetStampNsNotificationBodyList'].forEach((v) { - getStampNsNotificationBodyList!.add(GetStampNsNotificationBodyList.fromJson(v)); + getStampNsNotificationBodyList! + .add(GetStampNsNotificationBodyList.fromJson(v)); }); } @@ -999,9 +1094,11 @@ class GenericResponseModel { } if (json['GetSubordinatesLeavesTotalVacationsList'] != null) { - getSubordinatesLeavesTotalVacationsList = []; + getSubordinatesLeavesTotalVacationsList = + []; json['GetSubordinatesLeavesTotalVacationsList'].forEach((v) { - getSubordinatesLeavesTotalVacationsList!.add(new GetSubordinatesLeavesTotalVacationsList.fromJson(v)); + getSubordinatesLeavesTotalVacationsList! + .add(new GetSubordinatesLeavesTotalVacationsList.fromJson(v)); }); } if (json['GetSummaryOfPaymentList'] != null) { @@ -1070,7 +1167,11 @@ class GenericResponseModel { getDepartmentSections!.add(GetDepartmentSections.fromJson(v)); }); } - + if (json['Mohemm_ITG_Pending_Task_ResponseItem'] != null) { + mohemmITGPendingTaskResponseItem = + MohemmITGPendingTaskResponseItem.fromJson( + json['Mohemm_ITG_Pending_Task_ResponseItem']); + } if (json['Mohemm_ITG_SectionTopicsList'] != null) { getSectionTopics = []; json['Mohemm_ITG_SectionTopicsList'].forEach((v) { @@ -1081,14 +1182,16 @@ class GenericResponseModel { if (json['GetPendingReqFunctionsList'] != null) { getPendingTransactionsFunctions = []; json['GetPendingReqFunctionsList'].forEach((v) { - getPendingTransactionsFunctions!.add(GetPendingTransactionsFunctions.fromJson(v)); + getPendingTransactionsFunctions! + .add(GetPendingTransactionsFunctions.fromJson(v)); }); } if (json['GetPendingReqDetailsList'] != null) { getPendingTransactionsDetails = []; json['GetPendingReqDetailsList'].forEach((v) { - getPendingTransactionsDetails!.add(GetPendingTransactionsDetails.fromJson(v)); + getPendingTransactionsDetails! + .add(GetPendingTransactionsDetails.fromJson(v)); }); } @@ -1167,7 +1270,10 @@ class GenericResponseModel { listItemImagesDetails = json['List_ItemImagesDetails']; listItemMaster = json['List_ItemMaster']; listMedicineDetails = json['List_MedicineDetails']; - listMenu = json["List_Menu"] == null ? [] : List.from(json["List_Menu"].map((x) => ListMenu.fromJson(x))); + listMenu = json["List_Menu"] == null + ? [] + : List.from( + json["List_Menu"].map((x) => ListMenu.fromJson(x))); listNewEmployees = json['List_NewEmployees']; listRadScreen = json['List_RadScreen']; logInTokenID = json['LogInTokenID']; @@ -1177,29 +1283,44 @@ class GenericResponseModel { memberInformationList!.add(MemberInformationListModel.fromJson(v)); }); } - memberLoginList = json['MemberLoginList'] != null ? MemberLoginListModel.fromJson(json['MemberLoginList']) : null; - mohemmGetBusinessCardEnabledList = json['Mohemm_GetBusinessCardEnabledList']; + memberLoginList = json['MemberLoginList'] != null + ? MemberLoginListModel.fromJson(json['MemberLoginList']) + : null; + mohemmGetBusinessCardEnabledList = + json['Mohemm_GetBusinessCardEnabledList']; mohemmGetFavoriteReplacementsList = - json["Mohemm_GetFavoriteReplacementsList"] == null ? null : List.from(json["Mohemm_GetFavoriteReplacementsList"].map((x) => GetFavoriteReplacements.fromJson(x))); - - mohemmGetMobileDeviceInfobyEmpInfoList = json['Mohemm_GetMobileDeviceInfobyEmpInfoList']; + json["Mohemm_GetFavoriteReplacementsList"] == null + ? null + : List.from( + json["Mohemm_GetFavoriteReplacementsList"] + .map((x) => GetFavoriteReplacements.fromJson(x))); + + mohemmGetMobileDeviceInfobyEmpInfoList = + json['Mohemm_GetMobileDeviceInfobyEmpInfoList']; if (json['Mohemm_GetMobileLoginInfoList'] != null) { mohemmGetMobileLoginInfoList = []; json['Mohemm_GetMobileLoginInfoList'].forEach((v) { - mohemmGetMobileLoginInfoList!.add(GetMobileLoginInfoListModel.fromJson(v)); + mohemmGetMobileLoginInfoList! + .add(GetMobileLoginInfoListModel.fromJson(v)); }); } mohemmGetPatientIDList = json['Mohemm_GetPatientID_List']; mohemmITGResponseItem = json['Mohemm_ITG_ResponseItem']; - mohemmIsChangeIsActiveBusinessCardEnable = json['Mohemm_IsChangeIsActiveBusinessCardEnable']; - mohemmIsInsertBusinessCardEnable = json['Mohemm_IsInsertBusinessCardEnable']; + mohemmIsChangeIsActiveBusinessCardEnable = + json['Mohemm_IsChangeIsActiveBusinessCardEnable']; + mohemmIsInsertBusinessCardEnable = + json['Mohemm_IsInsertBusinessCardEnable']; mohemmWifiPassword = json['Mohemm_Wifi_Password']; mohemmWifiSSID = json['Mohemm_Wifi_SSID']; - notificationAction = json['NotificationAction'] != null ? NotificationAction.fromJson(json['NotificationAction']) : null; + notificationAction = json['NotificationAction'] != null + ? NotificationAction.fromJson(json['NotificationAction']) + : null; if (json['NotificationGetRespondAttributesList'] != null) { - notificationGetRespondAttributesList = []; + notificationGetRespondAttributesList = + []; json['NotificationGetRespondAttributesList'].forEach((v) { - notificationGetRespondAttributesList!.add(NotificationGetRespondAttributesList.fromJson(v)); + notificationGetRespondAttributesList! + .add(NotificationGetRespondAttributesList.fromJson(v)); }); } @@ -1224,7 +1345,8 @@ class GenericResponseModel { pQUESTION = json['P_QUESTION']; pSESSIONID = json['P_SESSION_ID']; pSchema = json['P_Schema']; - pharmacyStockAddPharmacyStockList = json['PharmacyStock_AddPharmacyStockList']; + pharmacyStockAddPharmacyStockList = + json['PharmacyStock_AddPharmacyStockList']; pharmacyStockGetOnHandList = json['PharmacyStock_GetOnHandList']; if (json['Privilege_List'] != null) { @@ -1236,7 +1358,10 @@ class GenericResponseModel { processTransactions = json['ProcessTransactions']; registerUserNameList = json['RegisterUserNameList']; - replacementList = json["ReplacementList"] == null ? null : List.from(json["ReplacementList"].map((x) => ReplacementList.fromJson(x))); + replacementList = json["ReplacementList"] == null + ? null + : List.from( + json["ReplacementList"].map((x) => ReplacementList.fromJson(x))); if (json['RespondAttributesList'] != null) { respondAttributesList = []; @@ -1255,26 +1380,51 @@ class GenericResponseModel { resubmitHrTransactionList = json['ResubmitHrTransactionList']; sFHGetPoNotificationBodyList = json['SFH_GetPoNotificationBodyList']; sFHGetPrNotificationBodyList = json['SFH_GetPrNotificationBodyList']; - startAbsenceApprovalProccess = json['StartAbsenceApprovalProccess'] != null ? StartAbsenceApprovalProccess.fromJson(json['StartAbsenceApprovalProccess']) : null; - startAddressApprovalProcessList = json['StartAddressApprovalProcessList'] != null ? StartAddressApprovalProcess.fromJson(json['StartAddressApprovalProcessList']) : null; + startAbsenceApprovalProccess = json['StartAbsenceApprovalProccess'] != null + ? StartAbsenceApprovalProccess.fromJson( + json['StartAbsenceApprovalProccess']) + : null; + startAddressApprovalProcessList = + json['StartAddressApprovalProcessList'] != null + ? StartAddressApprovalProcess.fromJson( + json['StartAddressApprovalProcessList']) + : null; startBasicDetApprProcessList = json['StartBasicDetApprProcessList']; startCeiApprovalProcess = json['StartCeiApprovalProcess']; startContactApprovalProcessList = json['StartContactApprovalProcessList']; - startEitApprovalProcess = json['StartEitApprovalProcess'] != null ? StartEitApprovalProcess.fromJson(json['StartEitApprovalProcess']) : null; + startEitApprovalProcess = json['StartEitApprovalProcess'] != null + ? StartEitApprovalProcess.fromJson(json['StartEitApprovalProcess']) + : null; startHrApprovalProcessList = json['StartHrApprovalProcessList']; - startPhonesApprovalProcessList = json['StartPhonesApprovalProcessList'] != null ? StartPhoneApprovalProcess.fromJson(json['startPhonesApprovalProcessList']) : null; + startPhonesApprovalProcessList = + json['StartPhonesApprovalProcessList'] != null + ? StartPhoneApprovalProcess.fromJson( + json['startPhonesApprovalProcessList']) + : null; startSitApprovalProcess = json['StartSitApprovalProcess']; startTermApprovalProcessList = json['StartTermApprovalProcessList']; - submitAddressTransactionList = json['SubmitAddressTransactionList'] != null ? SubmitAddressTransaction.fromJson(json['SubmitAddressTransactionList']) : null; - submitBasicDetTransactionList = json['SubmitBasicDetTransactionList'] != null ? SubmitBasicDetailsTransactionList.fromJson(json['SubmitBasicDetTransactionList']) : null; + submitAddressTransactionList = json['SubmitAddressTransactionList'] != null + ? SubmitAddressTransaction.fromJson( + json['SubmitAddressTransactionList']) + : null; + submitBasicDetTransactionList = + json['SubmitBasicDetTransactionList'] != null + ? SubmitBasicDetailsTransactionList.fromJson( + json['SubmitBasicDetTransactionList']) + : null; submitCEITransactionList = json['SubmitCEITransactionList']; submitCcpTransactionList = json['SubmitCcpTransactionList']; - submitContactTransactionList = json['SubmitContactTransactionList'] != null ? SubmitContactTransactionList.fromJson(json['SubmitContactTransactionList']) : null; - submitEITTransactionList = json['SubmitEITTransactionList'] != null ? SubmitEITTransactionList.fromJson(json['SubmitEITTransactionList']) : null; + submitContactTransactionList = json['SubmitContactTransactionList'] != null + ? SubmitContactTransactionList.fromJson( + json['SubmitContactTransactionList']) + : null; + submitEITTransactionList = json['SubmitEITTransactionList'] != null + ? SubmitEITTransactionList.fromJson(json['SubmitEITTransactionList']) + : null; submitHrTransactionList = json['SubmitHrTransactionList']; submitPhonesTransactionList = json['SubmitPhonesTransactionList']; @@ -1289,7 +1439,10 @@ class GenericResponseModel { }); } - sumbitAbsenceTransactionList = json['SumbitAbsenceTransactionList'] != null ? new SumbitAbsenceTransactionList.fromJson(json['SumbitAbsenceTransactionList']) : null; + sumbitAbsenceTransactionList = json['SumbitAbsenceTransactionList'] != null + ? new SumbitAbsenceTransactionList.fromJson( + json['SumbitAbsenceTransactionList']) + : null; tokenID = json['TokenID']; updateAttachmentList = json['UpdateAttachmentList']; @@ -1297,10 +1450,13 @@ class GenericResponseModel { if (json['UpdateItemTypeSuccessList'] != null) { updateItemTypeSuccessList = []; json['UpdateItemTypeSuccessList'].forEach((v) { - updateItemTypeSuccessList!.add(new UpdateItemTypeSuccessList.fromJson(v)); + updateItemTypeSuccessList! + .add(new UpdateItemTypeSuccessList.fromJson(v)); }); } - updateUserItemTypesList = json['UpdateUserItemTypesList'] != null ? new UpdateUserItemTypesList.fromJson(json['UpdateUserItemTypesList']) : null; + updateUserItemTypesList = json['UpdateUserItemTypesList'] != null + ? new UpdateUserItemTypesList.fromJson(json['UpdateUserItemTypesList']) + : null; updateVacationRuleList = json['UpdateVacationRuleList']; vHREmployeeLoginList = json['VHR_EmployeeLoginList']; vHRGetEmployeeDetailsList = json['VHR_GetEmployeeDetailsList']; @@ -1308,9 +1464,16 @@ class GenericResponseModel { vHRGetProjectByCodeList = json['VHR_GetProjectByCodeList']; vHRIsVerificationCodeValid = json['VHR_IsVerificationCodeValid']; - validateAbsenceTransactionList = json['ValidateAbsenceTransactionList'] != null ? ValidateAbsenceTransactionList.fromJson(json['ValidateAbsenceTransactionList']) : null; + validateAbsenceTransactionList = + json['ValidateAbsenceTransactionList'] != null + ? ValidateAbsenceTransactionList.fromJson( + json['ValidateAbsenceTransactionList']) + : null; - validateEITTransactionList = json['ValidateEITTransactionList'] != null ? ValidateEITTransactionList.fromJson(json['ValidateEITTransactionList']) : null; + validateEITTransactionList = json['ValidateEITTransactionList'] != null + ? ValidateEITTransactionList.fromJson( + json['ValidateEITTransactionList']) + : null; validatePhonesTransactionList = json['ValidatePhonesTransactionList']; if (json['VrItemTypesList'] != null) { @@ -1325,7 +1488,8 @@ class GenericResponseModel { wFLookUpList!.add(WFLookUpList.fromJson(v)); }); } - eLearningGETEMPLOYEEPROFILEList = json['eLearning_GET_EMPLOYEE_PROFILEList']; + eLearningGETEMPLOYEEPROFILEList = + json['eLearning_GET_EMPLOYEE_PROFILEList']; eLearningLOGINList = json['eLearning_LOGINList']; eLearningValidateLoginList = json['eLearning_ValidateLoginList']; eLearningValidate_LoginList = json['eLearning_Validate_LoginList']; @@ -1364,7 +1528,8 @@ class GenericResponseModel { data['VidaUpdatedResponse'] = this.vidaUpdatedResponse; if (this.addAttSuccessList != null) { - data['AddAttSuccessList'] = this.addAttSuccessList!.map((v) => v.toJson()).toList(); + data['AddAttSuccessList'] = + this.addAttSuccessList!.map((v) => v.toJson()).toList(); } if (this.addAttachmentList != null) { data['AddAttachment_List'] = this.addAttachmentList!.toJson(); @@ -1377,7 +1542,8 @@ class GenericResponseModel { } data['BusinessCardPrivilege'] = this.businessCardPrivilege; if (this.calculateAbsenceDuration != null) { - data['CalculateAbsenceDuration'] = this.calculateAbsenceDuration!.toJson(); + data['CalculateAbsenceDuration'] = + this.calculateAbsenceDuration!.toJson(); } if (this.cancelHRTransactionLIst != null) { data['CancelHRTransactionLIst'] = this.calculateAbsenceDuration!.toJson(); @@ -1403,35 +1569,45 @@ class GenericResponseModel { data['GetAbsenceAttachmentsList'] = this.getAbsenceAttachmentsList; if (this.getAbsenceAttendanceTypesList != null) { - data['GetAbsenceAttendanceTypesList'] = this.getAbsenceAttendanceTypesList!.map((v) => v.toJson()).toList(); + data['GetAbsenceAttendanceTypesList'] = + this.getAbsenceAttendanceTypesList!.map((v) => v.toJson()).toList(); } if (this.getAbsenceCollectionNotificationBodyList != null) { - data['GetAbsenceCollectionNotificationBodyList'] = this.getAbsenceCollectionNotificationBodyList!.map((v) => v.toJson()).toList(); + data['GetAbsenceCollectionNotificationBodyList'] = this + .getAbsenceCollectionNotificationBodyList! + .map((v) => v.toJson()) + .toList(); } if (this.getAbsenceDffStructureList != null) { - data['GetAbsenceDffStructureList'] = this.getAbsenceDffStructureList!.map((v) => v.toJson()).toList(); + data['GetAbsenceDffStructureList'] = + this.getAbsenceDffStructureList!.map((v) => v.toJson()).toList(); } if (this.getAbsenceTransactionList != null) { - data['GetAbsenceTransactionList'] = this.getAbsenceTransactionList!.map((v) => v.toJson()).toList(); + data['GetAbsenceTransactionList'] = + this.getAbsenceTransactionList!.map((v) => v.toJson()).toList(); } data['GetAccrualBalancesList'] = this.getAccrualBalancesList; if (this.getActionHistoryList != null) { - data['GetActionHistoryList'] = this.getActionHistoryList!.map((v) => v.toJson()).toList(); + data['GetActionHistoryList'] = + this.getActionHistoryList!.map((v) => v.toJson()).toList(); } data['GetAddressDffStructureList'] = this.getAddressDffStructureList; - data['GetAddressNotificationBodyList'] = this.getAddressNotificationBodyList; + data['GetAddressNotificationBodyList'] = + this.getAddressNotificationBodyList; if (this.getApprovesList != null) { - data['GetApprovesList'] = this.getApprovesList!.map((v) => v.toJson()).toList(); + data['GetApprovesList'] = + this.getApprovesList!.map((v) => v.toJson()).toList(); } if (this.getAttachementList != null) { - data['GetAttachementList'] = this.getAttachementList!.map((v) => v.toJson()).toList(); + data['GetAttachementList'] = + this.getAttachementList!.map((v) => v.toJson()).toList(); } data['GetAttendanceTrackingList'] = this.getAttendanceTrackingList; @@ -1439,92 +1615,116 @@ class GenericResponseModel { data['GetBasicDetDffStructureList'] = this.getBasicDetDffStructureList; if (this.getBasicDetNtfBodyList != null) { - data['GetBasicDetNtfBodyList'] = this.getBasicDetNtfBodyList!.map((v) => v.toJson()).toList(); + data['GetBasicDetNtfBodyList'] = + this.getBasicDetNtfBodyList!.map((v) => v.toJson()).toList(); } - data['GetCEICollectionNotificationBodyList'] = this.getCEICollectionNotificationBodyList; + data['GetCEICollectionNotificationBodyList'] = + this.getCEICollectionNotificationBodyList; data['GetCEIDFFStructureList'] = this.getCEIDFFStructureList; data['GetCEITransactionList'] = this.getCEITransactionList; data['GetCcpTransactionsList'] = this.getCcpTransactionsList; if (this.getContactDetailsList != null) { - data['GetContactDetailsList'] = this.getContactDetailsList!.map((v) => v.toJson()).toList(); + data['GetContactDetailsList'] = + this.getContactDetailsList!.map((v) => v.toJson()).toList(); } if (this.getContactColsStructureList != null) { - data['GetContactColsStructureList'] = this.getContactColsStructureList!.map((v) => v.toJson()).toList(); + data['GetContactColsStructureList'] = + this.getContactColsStructureList!.map((v) => v.toJson()).toList(); } if (this.getContactDffStructureList != null) { - data['GetContactDffStructureList'] = this.getContactDffStructureList!.map((v) => v.toJson()).toList(); + data['GetContactDffStructureList'] = + this.getContactDffStructureList!.map((v) => v.toJson()).toList(); } data['GetContactColsStructureList'] = this.getContactColsStructureList; data['GetContactDetailsList'] = this.getContactDetailsList; data['GetContactDffStructureList'] = this.getContactDffStructureList; - data['GetContactNotificationBodyList'] = this.getContactNotificationBodyList; + data['GetContactNotificationBodyList'] = + this.getContactNotificationBodyList; data['GetCountriesList'] = this.getCountriesList; if (this.getDayHoursTypeDetailsList != null) { - data['GetDayHoursTypeDetailsList'] = this.getDayHoursTypeDetailsList!.map((v) => v.toJson()).toList(); + data['GetDayHoursTypeDetailsList'] = + this.getDayHoursTypeDetailsList!.map((v) => v.toJson()).toList(); } if (this.getDeductionsList != null) { - data['GetDeductionsList'] = this.getDeductionsList!.map((v) => v.toJson()).toList(); + data['GetDeductionsList'] = + this.getDeductionsList!.map((v) => v.toJson()).toList(); } if (this.getDefaultValueList != null) { data['GetDefaultValueList'] = this.getDefaultValueList!.toJson(); } - data['GetEITCollectionNotificationBodyList'] = this.getEITCollectionNotificationBodyList; + data['GetEITCollectionNotificationBodyList'] = + this.getEITCollectionNotificationBodyList; if (this.getEITDFFStructureList != null) { - data['GetEITDFFStructureList'] = this.getEITDFFStructureList!.map((v) => v.toJson()).toList(); + data['GetEITDFFStructureList'] = + this.getEITDFFStructureList!.map((v) => v.toJson()).toList(); } if (this.getEITTransactionList != null) { - data['GetEITTransactionList'] = this.getEITTransactionList!.map((v) => v.toJson()).toList(); + data['GetEITTransactionList'] = + this.getEITTransactionList!.map((v) => v.toJson()).toList(); } if (this.getEarningsList != null) { - data['GetEarningsList'] = this.getEarningsList!.map((v) => v.toJson()).toList(); + data['GetEarningsList'] = + this.getEarningsList!.map((v) => v.toJson()).toList(); } if (this.getEmployeeAddressList != null) { - data['GetEmployeeAddressList'] = this.getEmployeeAddressList!.map((v) => v.toJson()).toList(); + data['GetEmployeeAddressList'] = + this.getEmployeeAddressList!.map((v) => v.toJson()).toList(); } if (this.getEmployeeBasicDetailsList != null) { - data['GetEmployeeBasicDetailsList'] = this.getEmployeeBasicDetailsList!.map((v) => v.toJson()).toList(); + data['GetEmployeeBasicDetailsList'] = + this.getEmployeeBasicDetailsList!.map((v) => v.toJson()).toList(); } if (this.getEmployeeContactsList != null) { - data['GetEmployeeContactsList'] = this.getEmployeeContactsList!.map((v) => v.toJson()).toList(); + data['GetEmployeeContactsList'] = + this.getEmployeeContactsList!.map((v) => v.toJson()).toList(); } if (this.getEmployeePhonesList != null) { - data['GetEmployeePhonesList'] = this.getEmployeePhonesList!.map((v) => v.toJson()).toList(); + data['GetEmployeePhonesList'] = + this.getEmployeePhonesList!.map((v) => v.toJson()).toList(); } if (this.getEmployeeSubordinatesList != null) { - data['GetEmployeeSubordinatesList'] = this.getEmployeeSubordinatesList!.map((v) => v.toJson()).toList(); + data['GetEmployeeSubordinatesList'] = + this.getEmployeeSubordinatesList!.map((v) => v.toJson()).toList(); } data['GetFliexfieldStructureList'] = this.getFliexfieldStructureList; - data['GetHrCollectionNotificationBodyList'] = this.getHrCollectionNotificationBodyList; + data['GetHrCollectionNotificationBodyList'] = + this.getHrCollectionNotificationBodyList; data['GetHrTransactionList'] = this.getHrTransactionList; if (this.getItemCreationNtfBodyList != null) { - data['GetItemCreationNtfBodyList'] = this.getItemCreationNtfBodyList!.toJson(); + data['GetItemCreationNtfBodyList'] = + this.getItemCreationNtfBodyList!.toJson(); } if (this.getItemTypeNotificationsList != null) { - data['GetItemTypeNotificationsList'] = this.getItemTypeNotificationsList!.map((v) => v.toJson()).toList(); + data['GetItemTypeNotificationsList'] = + this.getItemTypeNotificationsList!.map((v) => v.toJson()).toList(); } data['GetItemTypesList'] = this.getItemTypesList; data['GetLookupValuesList'] = this.getLookupValuesList; data['GetMenuEntriesList'] = this.getMenuEntriesList; if (this.getMoItemHistoryList != null) { - data['GetMoItemHistoryList'] = this.getMoItemHistoryList!.map((v) => v.toJson()).toList(); + data['GetMoItemHistoryList'] = + this.getMoItemHistoryList!.map((v) => v.toJson()).toList(); } if (this.getMoNotificationBodyList != null) { - data['GetMoNotificationBodyList'] = this.getMoNotificationBodyList!.map((v) => v.toJson()).toList(); + data['GetMoNotificationBodyList'] = + this.getMoNotificationBodyList!.map((v) => v.toJson()).toList(); } if (this.getNotificationButtonsList != null) { - data['GetNotificationButtonsList'] = this.getNotificationButtonsList!.map((v) => v.toJson()).toList(); + data['GetNotificationButtonsList'] = + this.getNotificationButtonsList!.map((v) => v.toJson()).toList(); } if (getNotificationReassignModeList != null) { - data['GetNotificationReassignModeList'] = getNotificationReassignModeList!.map((v) => v.toJson()).toList(); + data['GetNotificationReassignModeList'] = + getNotificationReassignModeList!.map((v) => v.toJson()).toList(); } data['GetObjectValuesList'] = this.getObjectValuesList; @@ -1534,73 +1734,91 @@ class GenericResponseModel { data['GetOpenPeriodDatesList'] = this.getOpenPeriodDatesList; data['GetOrganizationsSalariesList'] = this.getOrganizationsSalariesList; if (this.getPaymentInformationList != null) { - data['GetPaymentInformationList'] = this.getPaymentInformationList!.map((v) => v.toJson()).toList(); + data['GetPaymentInformationList'] = + this.getPaymentInformationList!.map((v) => v.toJson()).toList(); } if (this.getPayslipList != null) { - data['GetPayslipList'] = this.getPayslipList!.map((v) => v.toJson()).toList(); + data['GetPayslipList'] = + this.getPayslipList!.map((v) => v.toJson()).toList(); } // data['GetPendingReqDetailsList'] = this.getPendingReqDetailsList; // data['GetPendingReqFunctionsList'] = this.getPendingReqFunctionsList; data['GetPerformanceAppraisalList'] = this.getPerformanceAppraisalList; data['GetPhonesNotificationBodyList'] = this.getPhonesNotificationBodyList; if (this.getPoItemHistoryList != null) { - data['GetPoItemHistoryList'] = this.getPoItemHistoryList!.map((v) => v.toJson()).toList(); + data['GetPoItemHistoryList'] = + this.getPoItemHistoryList!.map((v) => v.toJson()).toList(); } if (this.getPoNotificationBodyList != null) { - data['GetPoNotificationBodyList'] = this.getPoNotificationBodyList!.toJson(); + data['GetPoNotificationBodyList'] = + this.getPoNotificationBodyList!.toJson(); } data['GetPrNotificationBodyList'] = this.getPrNotificationBodyList; if (this.getQuotationAnalysisList != null) { - data['GetQuotationAnalysisList'] = this.getQuotationAnalysisList!.map((v) => v.toJson()).toList(); + data['GetQuotationAnalysisList'] = + this.getQuotationAnalysisList!.map((v) => v.toJson()).toList(); } data['GetRFCEmployeeListList'] = this.getRFCEmployeeListList; data['GetRespondAttributeValueList'] = this.getRespondAttributeValueList; - data['GetSITCollectionNotificationBodyList'] = this.getSITCollectionNotificationBodyList; + data['GetSITCollectionNotificationBodyList'] = + this.getSITCollectionNotificationBodyList; data['GetSITDFFStructureList'] = this.getSITDFFStructureList; data['GetSITTransactionList'] = this.getSITTransactionList; if (this.getScheduleShiftsDetailsList != null) { - data['GetScheduleShiftsDetailsList'] = this.getScheduleShiftsDetailsList!.map((v) => v.toJson()).toList(); + data['GetScheduleShiftsDetailsList'] = + this.getScheduleShiftsDetailsList!.map((v) => v.toJson()).toList(); } data['GetShiftTypesList'] = this.getShiftTypesList; if (this.getStampMsNotificationBodyList != null) { - data['GetStampMsNotificationBodyList'] = this.getStampMsNotificationBodyList!.map((v) => v.toJson()).toList(); + data['GetStampMsNotificationBodyList'] = + this.getStampMsNotificationBodyList!.map((v) => v.toJson()).toList(); } if (this.getStampNsNotificationBodyList != null) { - data['GetStampNsNotificationBodyList'] = this.getStampNsNotificationBodyList!.map((v) => v.toJson()).toList(); + data['GetStampNsNotificationBodyList'] = + this.getStampNsNotificationBodyList!.map((v) => v.toJson()).toList(); } - data['GetStampNsNotificationBodyList'] = this.getStampNsNotificationBodyList; + data['GetStampNsNotificationBodyList'] = + this.getStampNsNotificationBodyList; data['GetSubordinatesAttdStatusList'] = this.getSubordinatesAttdStatusList; data['GetSubordinatesLeavesList'] = this.getSubordinatesLeavesList; if (this.getSubordinatesLeavesList != null) { - data['GetSubordinatesLeavesList'] = this.getSubordinatesLeavesList!.map((v) => v.toJson()).toList(); + data['GetSubordinatesLeavesList'] = + this.getSubordinatesLeavesList!.map((v) => v.toJson()).toList(); } if (this.getSubordinatesLeavesTotalVacationsList != null) { - data['GetSubordinatesLeavesTotalVacationsList'] = this.getSubordinatesLeavesTotalVacationsList!.map((v) => v.toJson()).toList(); + data['GetSubordinatesLeavesTotalVacationsList'] = this + .getSubordinatesLeavesTotalVacationsList! + .map((v) => v.toJson()) + .toList(); } if (this.getSummaryOfPaymentList != null) { - data['GetSummaryOfPaymentList'] = this.getSummaryOfPaymentList!.map((v) => v.toJson()).toList(); + data['GetSummaryOfPaymentList'] = + this.getSummaryOfPaymentList!.map((v) => v.toJson()).toList(); } data['GetSwipesList'] = this.getSwipesList; data['GetTermColsStructureList'] = this.getTermColsStructureList; data['GetTermDffStructureList'] = this.getTermDffStructureList; data['GetTermNotificationBodyList'] = this.getTermNotificationBodyList; if (this.getTimeCardSummaryList != null) { - data['GetTimeCardSummaryList'] = this.getTimeCardSummaryList!.map((v) => v.toJson()).toList(); + data['GetTimeCardSummaryList'] = + this.getTimeCardSummaryList!.map((v) => v.toJson()).toList(); } data['GetUserItemTypesList'] = this.getUserItemTypesList; if (this.getVacationRulesList != null) { - data['GetVacationRulesList'] = this.getVacationRulesList!.map((v) => v.toJson()).toList(); + data['GetVacationRulesList'] = + this.getVacationRulesList!.map((v) => v.toJson()).toList(); } data['GetVaccinationOnHandList'] = this.getVaccinationOnHandList; data['GetVaccinationsList'] = this.getVaccinationsList; if (getValueSetValuesList != null) { - data['GetValueSetValuesList'] = getValueSetValuesList!.map((v) => v.toJson()).toList(); + data['GetValueSetValuesList'] = + getValueSetValuesList!.map((v) => v.toJson()).toList(); } if (getWorkList != null) { data['GetWorkList'] = getWorkList!.map((v) => v.toJson()).toList(); @@ -1631,19 +1849,26 @@ class GenericResponseModel { data['List_RadScreen'] = this.listRadScreen; data['LogInTokenID'] = this.logInTokenID; if (this.memberInformationList != null) { - data['MemberInformationList'] = this.memberInformationList!.map((v) => v.toJson()).toList(); + data['MemberInformationList'] = + this.memberInformationList!.map((v) => v.toJson()).toList(); } data['MemberLoginList'] = this.memberLoginList; - data['Mohemm_GetBusinessCardEnabledList'] = this.mohemmGetBusinessCardEnabledList; - data['Mohemm_GetFavoriteReplacementsList'] = this.mohemmGetFavoriteReplacementsList; - data['Mohemm_GetMobileDeviceInfobyEmpInfoList'] = this.mohemmGetMobileDeviceInfobyEmpInfoList; + data['Mohemm_GetBusinessCardEnabledList'] = + this.mohemmGetBusinessCardEnabledList; + data['Mohemm_GetFavoriteReplacementsList'] = + this.mohemmGetFavoriteReplacementsList; + data['Mohemm_GetMobileDeviceInfobyEmpInfoList'] = + this.mohemmGetMobileDeviceInfobyEmpInfoList; if (this.mohemmGetMobileLoginInfoList != null) { - data['Mohemm_GetMobileLoginInfoList'] = this.mohemmGetMobileLoginInfoList!.map((v) => v.toJson()).toList(); + data['Mohemm_GetMobileLoginInfoList'] = + this.mohemmGetMobileLoginInfoList!.map((v) => v.toJson()).toList(); } data['Mohemm_GetPatientID_List'] = this.mohemmGetPatientIDList; data['Mohemm_ITG_ResponseItem'] = this.mohemmITGResponseItem; - data['Mohemm_IsChangeIsActiveBusinessCardEnable'] = this.mohemmIsChangeIsActiveBusinessCardEnable; - data['Mohemm_IsInsertBusinessCardEnable'] = this.mohemmIsInsertBusinessCardEnable; + data['Mohemm_IsChangeIsActiveBusinessCardEnable'] = + this.mohemmIsChangeIsActiveBusinessCardEnable; + data['Mohemm_IsInsertBusinessCardEnable'] = + this.mohemmIsInsertBusinessCardEnable; data['Mohemm_Wifi_Password'] = this.mohemmWifiPassword; data['Mohemm_Wifi_SSID'] = this.mohemmWifiSSID; @@ -1652,11 +1877,13 @@ class GenericResponseModel { } if (notificationGetRespondAttributesList != null) { - data['NotificationGetRespondAttributesList'] = notificationGetRespondAttributesList!.map((v) => v.toJson()).toList(); + data['NotificationGetRespondAttributesList'] = + notificationGetRespondAttributesList!.map((v) => v.toJson()).toList(); } if (notificationRespondRolesList != null) { - data['NotificationRespondRolesList'] = notificationRespondRolesList!.map((v) => v).toList(); + data['NotificationRespondRolesList'] = + notificationRespondRolesList!.map((v) => v).toList(); } data['OracleOutPutNumber'] = this.oracleOutPutNumber; @@ -1673,45 +1900,55 @@ class GenericResponseModel { data['P_QUESTION'] = this.pQUESTION; data['P_SESSION_ID'] = this.pSESSIONID; data['P_Schema'] = this.pSchema; - data['PharmacyStock_AddPharmacyStockList'] = this.pharmacyStockAddPharmacyStockList; + data['PharmacyStock_AddPharmacyStockList'] = + this.pharmacyStockAddPharmacyStockList; data['PharmacyStock_GetOnHandList'] = this.pharmacyStockGetOnHandList; if (this.privilegeList != null) { - data['Privilege_List'] = this.privilegeList!.map((v) => v.toJson()).toList(); + data['Privilege_List'] = + this.privilegeList!.map((v) => v.toJson()).toList(); } data['ProcessTransactions'] = this.processTransactions; data['RegisterUserNameList'] = this.registerUserNameList; data['ReplacementList'] = this.replacementList; if (respondAttributesList != null) { - data['RespondAttributesList'] = respondAttributesList!.map((v) => v.toJson()).toList(); + data['RespondAttributesList'] = + respondAttributesList!.map((v) => v.toJson()).toList(); } data['RespondRolesList'] = this.respondRolesList; - data['ResubmitAbsenceTransactionList'] = this.resubmitAbsenceTransactionList; + data['ResubmitAbsenceTransactionList'] = + this.resubmitAbsenceTransactionList; data['ResubmitEITTransactionList'] = this.resubmitEITTransactionList; data['ResubmitHrTransactionList'] = this.resubmitHrTransactionList; data['SFH_GetPoNotificationBodyList'] = this.sFHGetPoNotificationBodyList; data['SFH_GetPrNotificationBodyList'] = this.sFHGetPrNotificationBodyList; if (this.startAbsenceApprovalProccess != null) { - data['StartAbsenceApprovalProccess'] = this.startAbsenceApprovalProccess!.toJson(); + data['StartAbsenceApprovalProccess'] = + this.startAbsenceApprovalProccess!.toJson(); } - data['StartAddressApprovalProcessList'] = this.startAddressApprovalProcessList; + data['StartAddressApprovalProcessList'] = + this.startAddressApprovalProcessList; data['StartBasicDetApprProcessList'] = this.startBasicDetApprProcessList; data['StartCeiApprovalProcess'] = this.startCeiApprovalProcess; - data['StartContactApprovalProcessList'] = this.startContactApprovalProcessList; + data['StartContactApprovalProcessList'] = + this.startContactApprovalProcessList; if (this.startEitApprovalProcess != null) { data['StartEitApprovalProcess'] = this.startEitApprovalProcess!.toJson(); } data['StartHrApprovalProcessList'] = this.startHrApprovalProcessList; - data['StartPhonesApprovalProcessList'] = this.startPhonesApprovalProcessList; + data['StartPhonesApprovalProcessList'] = + this.startPhonesApprovalProcessList; data['StartSitApprovalProcess'] = this.startSitApprovalProcess; data['StartTermApprovalProcessList'] = this.startTermApprovalProcessList; if (this.submitAddressTransactionList != null) { - data['SubmitAddressTransactionList'] = this.submitAddressTransactionList!.toJson(); + data['SubmitAddressTransactionList'] = + this.submitAddressTransactionList!.toJson(); } if (this.submitBasicDetTransactionList != null) { - data['SubmitBasicDetTransactionList'] = this.submitBasicDetTransactionList!.toJson(); + data['SubmitBasicDetTransactionList'] = + this.submitBasicDetTransactionList!.toJson(); } data['SubmitCEITransactionList'] = this.submitCEITransactionList; @@ -1719,7 +1956,8 @@ class GenericResponseModel { data['SubmitContactTransactionList'] = this.submitContactTransactionList; if (this.submitEITTransactionList != null) { - data['SubmitEITTransactionList'] = this.submitEITTransactionList!.toJson(); + data['SubmitEITTransactionList'] = + this.submitEITTransactionList!.toJson(); } data['SubmitHrTransactionList'] = this.submitHrTransactionList; @@ -1729,17 +1967,20 @@ class GenericResponseModel { data['SubordinatesOnLeavesList'] = this.subordinatesOnLeavesList; if (this.subordinatesOnLeavesList != null) { - data['SubordinatesOnLeavesList'] = this.subordinatesOnLeavesList!.map((v) => v.toJson()).toList(); + data['SubordinatesOnLeavesList'] = + this.subordinatesOnLeavesList!.map((v) => v.toJson()).toList(); } if (this.sumbitAbsenceTransactionList != null) { - data['SumbitAbsenceTransactionList'] = this.sumbitAbsenceTransactionList!.toJson(); + data['SumbitAbsenceTransactionList'] = + this.sumbitAbsenceTransactionList!.toJson(); } data['TokenID'] = this.tokenID; data['UpdateAttachmentList'] = this.updateAttachmentList; data['UpdateEmployeeImageList'] = this.updateEmployeeImageList; if (this.updateItemTypeSuccessList != null) { - data['UpdateItemTypeSuccessList'] = this.updateItemTypeSuccessList!.map((v) => v.toJson()).toList(); + data['UpdateItemTypeSuccessList'] = + this.updateItemTypeSuccessList!.map((v) => v.toJson()).toList(); } if (this.updateUserItemTypesList != null) { data['UpdateUserItemTypesList'] = this.updateUserItemTypesList!.toJson(); @@ -1752,19 +1993,22 @@ class GenericResponseModel { data['VHR_IsVerificationCodeValid'] = this.vHRIsVerificationCodeValid; if (validateAbsenceTransactionList != null) { - data['ValidateAbsenceTransactionList'] = validateAbsenceTransactionList!.toJson(); + data['ValidateAbsenceTransactionList'] = + validateAbsenceTransactionList!.toJson(); } if (validateEITTransactionList != null) { data['ValidateEITTransactionList'] = validateEITTransactionList!.toJson(); } data['ValidatePhonesTransactionList'] = this.validatePhonesTransactionList; if (vrItemTypesList != null) { - data['VrItemTypesList'] = vrItemTypesList!.map((v) => v.toJson()).toList(); + data['VrItemTypesList'] = + vrItemTypesList!.map((v) => v.toJson()).toList(); } if (wFLookUpList != null) { data['WFLookUpList'] = wFLookUpList!.map((v) => v.toJson()).toList(); } - data['eLearning_GET_EMPLOYEE_PROFILEList'] = this.eLearningGETEMPLOYEEPROFILEList; + data['eLearning_GET_EMPLOYEE_PROFILEList'] = + this.eLearningGETEMPLOYEEPROFILEList; data['eLearning_LOGINList'] = this.eLearningLOGINList; data['eLearning_ValidateLoginList'] = this.eLearningValidateLoginList; data['eLearning_Validate_LoginList'] = this.eLearningValidateLoginList; diff --git a/lib/provider/dashboard_provider_model.dart b/lib/provider/dashboard_provider_model.dart index b5d5dad..40e1ab5 100644 --- a/lib/provider/dashboard_provider_model.dart +++ b/lib/provider/dashboard_provider_model.dart @@ -15,6 +15,7 @@ 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/menu_entries.dart'; import 'package:mohem_flutter_app/models/dashboard/menus.dart'; +import 'package:mohem_flutter_app/models/dashboard/mohemm_itg_pending_task_responseitem.dart'; import 'package:mohem_flutter_app/models/generic_response_model.dart'; import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart'; @@ -59,10 +60,13 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { isAttendanceTrackingLoading = false; // isTimeRemainingInSeconds = calculateSeconds( "00:00:00"); if (attendanceTracking?.pSwipeIn != null) { - isTimeRemainingInSeconds = calculateSeconds(attendanceTracking!.pRemainingHours ?? "00:00:00"); - int totalShiftTimeInSeconds = calculateSeconds(attendanceTracking!.pScheduledHours ?? "00:00:00"); + isTimeRemainingInSeconds = + calculateSeconds(attendanceTracking!.pRemainingHours ?? "00:00:00"); + int totalShiftTimeInSeconds = + calculateSeconds(attendanceTracking!.pScheduledHours ?? "00:00:00"); progress = (isTimeRemainingInSeconds / totalShiftTimeInSeconds); - endTime = DateTime.now().millisecondsSinceEpoch + Duration(seconds: isTimeRemainingInSeconds).inMilliseconds; + endTime = DateTime.now().millisecondsSinceEpoch + + Duration(seconds: isTimeRemainingInSeconds).inMilliseconds; } notifyListeners(); @@ -112,17 +116,32 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { ItgFormsModel? itgFormsModel; List? getOpenNotificationsList; - + MohemmITGPendingTaskResponseItem? cocCount; + int cocFinalCount = 0; //Work List API's & Methods Future fetchWorkListCounter(context, {bool showLoading = false}) async { try { if (showLoading) Utils.showLoading(context); - GenericResponseModel? genericResponseModel = await DashboardApiClient().getOpenNotifications(); + GenericResponseModel? genericResponseModel = + await DashboardApiClient().getOpenNotifications(); + isWorkListLoading = false; getOpenNotificationsList = genericResponseModel?.getOpenNotificationsList; + workListCounter = genericResponseModel?.pOPENNTFNUMBER ?? 0; + itgFormsModel = await DashboardApiClient().getItgFormsPendingTask(); workListCounter = workListCounter + (itgFormsModel?.totalCount ?? 0); + GenericResponseModel? cocGenericResponseModel = + await DashboardApiClient().getCOCNotifications(); + cocCount = cocGenericResponseModel?.mohemmITGPendingTaskResponseItem; + if (cocCount != null) { + cocFinalCount = (cocCount?.escalation ?? 0) + + (cocCount?.waitingToClose ?? 0) + + (cocCount?.waitingForAcceptance ?? 0) + + (cocCount?.extendTATRequest ?? 0); + workListCounter += cocFinalCount; + } if (showLoading) Utils.hideLoading(context); notifyListeners(); } catch (ex) { @@ -137,9 +156,12 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { //Missing Siwpe API's & Methods Future fetchMissingSwipe(context) async { try { - GenericResponseModel? genericResponseModel = await DashboardApiClient().getOpenMissingSwipes(); + GenericResponseModel? genericResponseModel = + await DashboardApiClient().getOpenMissingSwipes(); isMissingSwipeLoading = false; - missingSwipeCounter = genericResponseModel!.getOpenMissingSwipesList!.pOpenMissingSwipes ?? 0; + missingSwipeCounter = + genericResponseModel!.getOpenMissingSwipesList!.pOpenMissingSwipes ?? + 0; notifyListeners(); } catch (ex) { isMissingSwipeLoading = false; @@ -152,10 +174,12 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { //Leave and Ticket Balance API's & Methods Future fetchLeaveTicketBalance(context, DateTime date) async { try { - accrualList = await DashboardApiClient().getAccrualBalances(DateFormat("MM/dd/yyyy").format(date)); + accrualList = await DashboardApiClient() + .getAccrualBalances(DateFormat("MM/dd/yyyy").format(date)); isLeaveTicketBalanceLoading = false; leaveBalanceAccrual = accrualList![0]; - ticketBalance = (accrualList![1].accrualNetEntitlement ?? 0.0) + (accrualList![2].accrualNetEntitlement ?? 0.0); + ticketBalance = (accrualList![1].accrualNetEntitlement ?? 0.0) + + (accrualList![2].accrualNetEntitlement ?? 0.0); notifyListeners(); } catch (ex) { isLeaveTicketBalanceLoading = false; @@ -168,23 +192,36 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { //List Menu API's & Methods List drawerMenuItemList = [ - DrawerMenuItem("assets/images/drawer/my_profile.svg", LocaleKeys.myProfile.tr(), AppRoutes.profile), - DrawerMenuItem("assets/images/drawer/performance_evaluation.svg", LocaleKeys.performanceEvaluation.tr(), AppRoutes.performanceEvaluation), - DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.mowadhafhi.tr(), AppRoutes.mowadhafhi), - DrawerMenuItem("assets/images/drawer/pending_trasactions.svg", LocaleKeys.pendingTransactions.tr(), AppRoutes.pendingTransactions), - DrawerMenuItem("assets/images/drawer/change_password.svg", LocaleKeys.changePassword.tr(), AppRoutes.changePassword), + DrawerMenuItem("assets/images/drawer/my_profile.svg", + LocaleKeys.myProfile.tr(), AppRoutes.profile), + DrawerMenuItem("assets/images/drawer/performance_evaluation.svg", + LocaleKeys.performanceEvaluation.tr(), AppRoutes.performanceEvaluation), + DrawerMenuItem("assets/images/drawer/mowadhafi.svg", + LocaleKeys.mowadhafhi.tr(), AppRoutes.mowadhafhi), + DrawerMenuItem("assets/images/drawer/pending_trasactions.svg", + LocaleKeys.pendingTransactions.tr(), AppRoutes.pendingTransactions), + DrawerMenuItem("assets/images/drawer/change_password.svg", + LocaleKeys.changePassword.tr(), AppRoutes.changePassword), ]; void fetchListMenu() async { try { List menuList = await DashboardApiClient().getListMenu(); - List findMyRequest = menuList.where((element) => element.menuType == "E").toList(); + List findMyRequest = + menuList.where((element) => element.menuType == "E").toList(); if (findMyRequest.isNotEmpty) { - drawerMenuItemList.insert(3, DrawerMenuItem("assets/images/drawer/my_requests.svg", LocaleKeys.myRequest.tr(), AppRoutes.myRequests)); + drawerMenuItemList.insert( + 3, + DrawerMenuItem("assets/images/drawer/my_requests.svg", + LocaleKeys.myRequest.tr(), AppRoutes.myRequests)); } - List findMyTeam = menuList.where((element) => element.menuType == "M").toList(); + List findMyTeam = + menuList.where((element) => element.menuType == "M").toList(); if (findMyTeam.isNotEmpty) { - drawerMenuItemList.insert(2, DrawerMenuItem("assets/images/drawer/my_team.svg", LocaleKeys.myTeamMembers.tr(), AppRoutes.myTeam)); + drawerMenuItemList.insert( + 2, + DrawerMenuItem("assets/images/drawer/my_team.svg", + LocaleKeys.myTeamMembers.tr(), AppRoutes.myTeam)); } } catch (ex) { logger.wtf(ex); @@ -195,12 +232,19 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { //Menu Entries API's & Methods void fetchMenuEntries() async { try { - GenericResponseModel? genericResponseModel = await DashboardApiClient().getGetMenuEntries(); + GenericResponseModel? genericResponseModel = + await DashboardApiClient().getGetMenuEntries(); getMenuEntriesList = genericResponseModel!.getMenuEntriesList; homeMenus = parseMenus(getMenuEntriesList ?? []); if (homeMenus!.isNotEmpty) { - homeMenus!.first.menuEntiesList.insert(0, GetMenuEntriesList(requestType: "MONTHLY_ATTENDANCE", prompt: LocaleKeys.monthlyAttendance.tr())); - homeMenus!.first.menuEntiesList.add(GetMenuEntriesList(requestType: "VACATION_RULE", prompt: LocaleKeys.vacationRule.tr())); + homeMenus!.first.menuEntiesList.insert( + 0, + GetMenuEntriesList( + requestType: "MONTHLY_ATTENDANCE", + prompt: LocaleKeys.monthlyAttendance.tr())); + homeMenus!.first.menuEntiesList.add(GetMenuEntriesList( + requestType: "VACATION_RULE", + prompt: LocaleKeys.vacationRule.tr())); } isServicesMenusLoading = false; notifyListeners(); @@ -228,7 +272,12 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { List menus = []; for (int i = 0; i < getMenuEntriesList.length; i++) { if (getMenuEntriesList[i].parentMenuName!.isEmpty) { - menus.add(Menus(getMenuEntriesList[i], getMenuEntriesList.where((element) => getMenuEntriesList[i].menuName == element.parentMenuName).toList())); + menus.add(Menus( + getMenuEntriesList[i], + getMenuEntriesList + .where((element) => + getMenuEntriesList[i].menuName == element.parentMenuName) + .toList())); } } return menus; diff --git a/lib/ui/leave_balance/add_leave_balance_screen.dart b/lib/ui/leave_balance/add_leave_balance_screen.dart index 477f978..5fce5ec 100644 --- a/lib/ui/leave_balance/add_leave_balance_screen.dart +++ b/lib/ui/leave_balance/add_leave_balance_screen.dart @@ -205,7 +205,7 @@ class _AddLeaveBalanceScreenState extends State { ), 12.height, DynamicTextFieldWidget( - "Total Days", + LocaleKeys.totalDays.tr(), totalDays?.toString() ?? "Calculated days", isInputTypeNum: true, isEnable: false, diff --git a/lib/ui/leave_balance/leave_balance_screen.dart b/lib/ui/leave_balance/leave_balance_screen.dart index cb33825..f3a1f91 100644 --- a/lib/ui/leave_balance/leave_balance_screen.dart +++ b/lib/ui/leave_balance/leave_balance_screen.dart @@ -62,7 +62,7 @@ class _LeaveBalanceState extends State { physics: const BouncingScrollPhysics(), padding: const EdgeInsets.all(21), children: [ - const BalancesDashboardWidget("Current Leave Balance", true), + BalancesDashboardWidget(LocaleKeys.currentLeaveBalance.tr(), true), 12.height, absenceTransList == null ? const SizedBox() diff --git a/lib/ui/my_team/team_members.dart b/lib/ui/my_team/team_members.dart index 6240b0e..7ba015f 100644 --- a/lib/ui/my_team/team_members.dart +++ b/lib/ui/my_team/team_members.dart @@ -73,7 +73,7 @@ class _TeamMembersState extends State { var phoneNumber = Uri.parse('tel:${getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER}'); return InkWell( onTap: () async { - // Navigator.pushNamed(context, AppRoutes.employeeDetails, arguments: getEmployeeSubordinatesList[index]); + Navigator.pushNamed(context, AppRoutes.employeeDetails, arguments: getEmployeeSubordinatesList[index]); }, child: Row( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/ui/profile/add_update_family_member.dart b/lib/ui/profile/add_update_family_member.dart index fa01e30..5e5efee 100644 --- a/lib/ui/profile/add_update_family_member.dart +++ b/lib/ui/profile/add_update_family_member.dart @@ -48,7 +48,7 @@ class _AddUpdateFamilyMemberState extends State { } void callAddAndUpdateFamilyMember() async { - try { + try { Utils.showLoading(context); getBasicDetDffStructureList = await ProfileApiClient().getBasicDetDffStructure(); getContactColsStructureList = await ProfileApiClient().getContactColsStructureList(args['actionType']); @@ -199,8 +199,8 @@ class _AddUpdateFamilyMemberState extends State { }); } else { return DynamicTextFieldWidget( - (model!.sEGMENTPROMPT ?? "") + (model!.rEQUIREDFLAG == "Y" ? "*" : ""), - model!.getContactDetailsList!.sEGMENTVALUEDSP ?? "", + (model!.sEGMENTPROMPT ?? "") + (model!.rEQUIREDFLAG == "Y" ? "*" : "") , + ( model!.getContactDetailsList!.sEGMENTVALUEDSP ?? "")+ (model!.aPPLICATIONCOLUMNNAME == "NATIONAL_IDENTIFIER" ? "1-1111-1111-1" : ""), onChange: (text) { model!.getContactDetailsList!.sEGMENTVALUEDSP = text; }, @@ -357,7 +357,7 @@ class _AddUpdateFamilyMemberState extends State { void submitUpdateForm() async { - try { + try { List> values1 = getBasicDetDffStructureList!.map((e) { String? dateVal = ''; String? vatcherVal = ''; @@ -418,12 +418,7 @@ class _AddUpdateFamilyMemberState extends State { }).toList(); List> valuesFinal = [...values1, ...values2, ...values3]; Utils.showLoading(context); - if (args['actionType'] == "ADD") { - var relationID = null; - submitContactTransactionList = await ProfileApiClient().submitContactTransactionAddAndUpdate(args['actionType'], relationID, valuesFinal); - } else if (args['actionType'] == "UPDATE") { - submitContactTransactionList = await ProfileApiClient().submitContactTransactionAddAndUpdate(args['actionType'], args['relationID'], valuesFinal); - } + submitContactTransactionList = await ProfileApiClient().submitContactTransactionAddAndUpdate(args['actionType'], args['relationID'] ?? 0, valuesFinal); var transactionId = submitContactTransactionList!.pTRANSACTIONID; var itemKey = submitContactTransactionList!.pITEMKEY; Utils.hideLoading(context); diff --git a/lib/ui/profile/family_members.dart b/lib/ui/profile/family_members.dart index 0a0bb0c..52a6277 100644 --- a/lib/ui/profile/family_members.dart +++ b/lib/ui/profile/family_members.dart @@ -98,7 +98,7 @@ class _FamilyMembersState extends State { recognizer: TapGestureRecognizer() ..onTap = () async { relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID!.toInt(); - menuEntries.updateButton == 'Y'? showUpdateAlertDialog(context, relationId!.toInt(), 2, LocaleKeys.update.tr()):null; + menuEntries.updateButton == 'Y'? showUpdateAlertDialog(context, relationId!.toInt(), 2, "UPDATE"):null; } ) ], @@ -161,7 +161,7 @@ class _FamilyMembersState extends State { title: Text( LocaleKeys.confirm.tr(), ), - content: Text(LocaleKeys.updateThisMember.tr()), + content: Text(LocaleKeys.updateMember.tr()), actions: [ cancelButton, continueButton, diff --git a/lib/ui/work_list/work_list_screen.dart b/lib/ui/work_list/work_list_screen.dart index 2fa5156..6169b47 100644 --- a/lib/ui/work_list/work_list_screen.dart +++ b/lib/ui/work_list/work_list_screen.dart @@ -62,7 +62,14 @@ class _WorkListScreenState extends State { key: 'POAPPRV', disable: false), WorkListItemTypeModelData( - value: 0, name: 'ITG', fullName: LocaleKeys.ITGForms.tr(), active: false, color: [Color(0xffEB8C90), Color(0xffDE6C70)], icon: "assets/images/miss_swipe.svg", key: 'ITG', disable: false), + value: 0, + name: 'ITG', + fullName: LocaleKeys.ITGForms.tr(), + active: false, + color: [Color(0xffEB8C90), Color(0xffDE6C70)], + icon: "assets/images/miss_swipe.svg", + key: 'ITG', + disable: false), WorkListItemTypeModelData( value: 0, name: 'IC', @@ -73,7 +80,23 @@ class _WorkListScreenState extends State { key: 'INVITEM', disable: false), WorkListItemTypeModelData( - value: 0, name: 'STAMP', fullName: LocaleKeys.stamp.tr(), active: false, color: [Color(0xff32D892), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'STAMP', disable: false), + value: 0, + name: 'STAMP', + fullName: LocaleKeys.stamp.tr(), + active: false, + color: [Color(0xff32D892), Color(0xff1AB170)], + icon: "assets/images/miss_swipe.svg", + key: 'STAMP', + disable: false), + WorkListItemTypeModelData( + value: 0, + name: 'COC', + fullName: LocaleKeys.itemCreation.tr(), + active: false, + color: [Color(0xff787299), Color(0xff1AB170)], + icon: "assets/images/miss_swipe.svg", + key: 'COC', + disable: true) ]; int workListItemIndex = 0; @@ -98,8 +121,13 @@ class _WorkListScreenState extends State { workListItemTypes.forEach((workListElement) { if (workListElement.key == "ITG") { workListElement.value = providerData.itgFormsModel?.totalCount ?? 0; + } else if (workListElement.key == "COC") { + workListElement.value = providerData.cocFinalCount; } else { - var tempList = providerData.getOpenNotificationsList?.where((notificationElement) => notificationElement.itemType == workListElement.key).toList(); + var tempList = providerData.getOpenNotificationsList + ?.where((notificationElement) => + notificationElement.itemType == workListElement.key) + .toList(); if (tempList!.isNotEmpty) { workListElement.value = tempList.first.openNtfNumber ?? 0; } @@ -118,18 +146,26 @@ class _WorkListScreenState extends State { List requestAllList = []; for (int i = 0; i < (itgFormsModel?.requestType!.length ?? 0); i++) { itgFormsModel?.requestType![i].requestDetails?.forEach((element) { - element.requestType = itgFormsModel?.requestType![i].requestTypeCode; + element.requestType = + itgFormsModel?.requestType![i].requestTypeCode; }); - requestAllList = requestAllList + (itgFormsModel?.requestType![i].requestDetails ?? []); + requestAllList = requestAllList + + (itgFormsModel?.requestType![i].requestDetails ?? []); } AppState().setRequestAllList = requestAllList; - itgFormsModel?.requestType!.insert(0, RequestType(requestDetails: requestAllList, requestTypeCode: "all", requestTypeName: "All")); + itgFormsModel?.requestType!.insert( + 0, + RequestType( + requestDetails: requestAllList, + requestTypeCode: "all", + requestTypeName: "All")); if ((itgFormsModel?.requestType?.length ?? 0) > 0) { itgRequestTypeIndex = 0; } } else { itgRequestTypeIndex = null; - workList = await WorkListApiClient().getWorkList(pageNumber, workListItemTypes[workListItemIndex].key); + workList = await WorkListApiClient() + .getWorkList(pageNumber, workListItemTypes[workListItemIndex].key); AppState().setWorkList = workList; } Utils.hideLoading(context); @@ -171,13 +207,23 @@ class _WorkListScreenState extends State { child: ListView.separated( itemBuilder: (context, index) { return Container( - padding: const EdgeInsets.only(left: 21, right: 21, top: 8, bottom: 8), + padding: const EdgeInsets.only( + left: 21, right: 21, top: 8, bottom: 8), alignment: Alignment.center, - decoration: BoxDecoration(borderRadius: BorderRadius.circular(6), color: workListItemIndex == index ? MyColors.darkIconColor : MyColors.lightGreyEAColor), - child: ("${workListItemTypes[index].name} ${workListItemTypes[index].value > 0 ? "(${workListItemTypes[index].value})" : ""}") - .toText12(color: workListItemIndex == index ? MyColors.white : MyColors.black), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6), + color: workListItemIndex == index + ? MyColors.darkIconColor + : MyColors.lightGreyEAColor), + child: + ("${workListItemTypes[index].name} ${workListItemTypes[index].value > 0 ? "(${workListItemTypes[index].value})" : ""}") + .toText12( + color: workListItemIndex == index + ? MyColors.white + : MyColors.black), ).onPress(() { - if (workListItemIndex != index) { + if (workListItemIndex != index && + !workListItemTypes[index].disable) { workListItemIndex = index; if (workListItemTypes[index].value == 0) { workList = []; @@ -270,14 +316,17 @@ class _WorkListScreenState extends State { ); } - Widget itgRowItem(WorkListItemTypeModelData data, RequestDetails requestDetails, int index) { + Widget itgRowItem(WorkListItemTypeModelData data, + RequestDetails requestDetails, int index) { return InkWell( onTap: () async { AppState().setItgWorkListIndex = index; - var shouldReloadData = await Navigator.pushNamed(context, AppRoutes.itgDetail); + var shouldReloadData = + await Navigator.pushNamed(context, AppRoutes.itgDetail); if (shouldReloadData != null) { if (shouldReloadData.toString() == "delegate_reload") { - providerData.itgFormsModel!.totalCount = providerData.itgFormsModel!.totalCount! - 1; + providerData.itgFormsModel!.totalCount = + providerData.itgFormsModel!.totalCount! - 1; calculateCounter(); getWorkList(); } @@ -301,7 +350,8 @@ class _WorkListScreenState extends State { }, child: Container( width: double.infinity, - padding: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 10), + padding: + const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 10), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10), @@ -320,11 +370,20 @@ class _WorkListScreenState extends State { Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(4), - gradient: LinearGradient(transform: GradientRotation(.218), begin: Alignment.topRight, end: Alignment.bottomRight, colors: data.color), + gradient: LinearGradient( + transform: GradientRotation(.218), + begin: Alignment.topRight, + end: Alignment.bottomRight, + colors: data.color), ), child: Column( crossAxisAlignment: CrossAxisAlignment.center, - children: [SvgPicture.asset("assets/images/miss_swipe.svg", width: 20, height: 20, color: Colors.white), 2.height, data.name.toText10(color: Colors.white)], + children: [ + SvgPicture.asset("assets/images/miss_swipe.svg", + width: 20, height: 20, color: Colors.white), + 2.height, + data.name.toText10(color: Colors.white) + ], ).paddingAll(6), ), 8.width, @@ -350,12 +409,15 @@ class _WorkListScreenState extends State { ); } - Widget rowItem(WorkListItemTypeModelData data, WorkListResponseModel workData, int index) { + Widget rowItem(WorkListItemTypeModelData data, WorkListResponseModel workData, + int index) { return InkWell( onTap: () async { AppState().setWorkListIndex = index; var data = workList![index]; - var shouldReloadData = await Navigator.pushNamed(context, AppRoutes.workListDetail, arguments: workData); + var shouldReloadData = await Navigator.pushNamed( + context, AppRoutes.workListDetail, + arguments: workData); if (shouldReloadData != null) { if (shouldReloadData.toString() == "delegate_reload") { calculateCounter(); @@ -380,7 +442,8 @@ class _WorkListScreenState extends State { }, child: Container( width: double.infinity, - padding: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 10), + padding: + const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 10), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10), @@ -399,11 +462,20 @@ class _WorkListScreenState extends State { Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(4), - gradient: LinearGradient(transform: GradientRotation(.218), begin: Alignment.topRight, end: Alignment.bottomRight, colors: data.color), + gradient: LinearGradient( + transform: GradientRotation(.218), + begin: Alignment.topRight, + end: Alignment.bottomRight, + colors: data.color), ), child: Column( crossAxisAlignment: CrossAxisAlignment.center, - children: [SvgPicture.asset("assets/images/miss_swipe.svg", width: 20, height: 20, color: Colors.white), 2.height, data.name.toText10(color: Colors.white)], + children: [ + SvgPicture.asset("assets/images/miss_swipe.svg", + width: 20, height: 20, color: Colors.white), + 2.height, + data.name.toText10(color: Colors.white) + ], ).paddingAll(6), ), 8.width, diff --git a/lib/widgets/balances_dashboard_widget.dart b/lib/widgets/balances_dashboard_widget.dart index 2fd4b52..e546acf 100644 --- a/lib/widgets/balances_dashboard_widget.dart +++ b/lib/widgets/balances_dashboard_widget.dart @@ -8,6 +8,7 @@ import 'package:mohem_flutter_app/classes/utils.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; +import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_list_model.dart'; import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; import 'package:pie_chart/pie_chart.dart'; @@ -64,14 +65,14 @@ class _BalancesDashboardWidgetState extends State { if (widget.isLeaveBalance) { leaveBalanceAccrual = accrualList[0]; chartModelList = [ - PieChartModel("Current Balance", leaveBalanceAccrual?.accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""), - PieChartModel("Used", leaveBalanceAccrual?.accrualUsedEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""), + PieChartModel(LocaleKeys.currentBalance.tr(), leaveBalanceAccrual?.accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""), + PieChartModel(LocaleKeys.usedBalance.tr(), leaveBalanceAccrual?.accrualUsedEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""), ]; } else { chartModelList = [ - PieChartModel("Adult", accrualList[1].accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""), - PieChartModel("Child", accrualList[2].accrualNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""), - PieChartModel("infants", accrualList[3].accrualNetEntitlement?.toDouble() ?? 0, MyColors.pinkColor, titleAppend: ""), + PieChartModel(LocaleKeys.adult.tr(), accrualList[1].accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""), + PieChartModel(LocaleKeys.child.tr(), accrualList[2].accrualNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""), + PieChartModel(LocaleKeys.infants.tr(), accrualList[3].accrualNetEntitlement?.toDouble() ?? 0, MyColors.pinkColor, titleAppend: ""), ]; } } @@ -88,8 +89,8 @@ class _BalancesDashboardWidgetState extends State { if (leaveBalanceAccrual == null && widget.isLeaveBalance) { leaveBalanceAccrual = Provider.of(context, listen: false).leaveBalanceAccrual; chartModelList = [ - PieChartModel("Current Balance", leaveBalanceAccrual?.accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""), - PieChartModel("Used", leaveBalanceAccrual?.accrualUsedEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""), + PieChartModel(LocaleKeys.currentBalance.tr(), leaveBalanceAccrual?.accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""), + PieChartModel(LocaleKeys.usedBalance.tr(), leaveBalanceAccrual?.accrualUsedEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""), ]; } @@ -97,9 +98,9 @@ class _BalancesDashboardWidgetState extends State { ticketBalanceAccrualList = Provider.of(context, listen: false).accrualList ?? []; if (ticketBalanceAccrualList!.isNotEmpty) { chartModelList = [ - PieChartModel("Adult", ticketBalanceAccrualList![1].accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""), - PieChartModel("Child", ticketBalanceAccrualList![2].accrualNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""), - PieChartModel("infants", ticketBalanceAccrualList![3].accrualNetEntitlement?.toDouble() ?? 0, MyColors.pinkColor, titleAppend: ""), + PieChartModel(LocaleKeys.adult.tr(), ticketBalanceAccrualList![1].accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""), + PieChartModel(LocaleKeys.child.tr(), ticketBalanceAccrualList![2].accrualNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""), + PieChartModel(LocaleKeys.infants.tr(), ticketBalanceAccrualList![3].accrualNetEntitlement?.toDouble() ?? 0, MyColors.pinkColor, titleAppend: ""), ]; } }