Merge branch 'master' of https://gitlab.com/mirza.shafique/mohem_flutter_app into development_sultan

merge-requests/1/merge
Sultan Khan 4 years ago
commit 06b3726d4a

@ -60,11 +60,150 @@
"doNotAddRepeatingLetters": "لا تقم بإضافة أحرف متكررة",
"itShouldContainSpecialCharacter": "يجب أن يحتوي على طابع خاص",
"confirmPasswordMustMatch": "يجب أن يتطابق تأكيد كلمة المرور",
"sms": "رسالة قصيرة",
"fingerPrint": "بصمة",
"face": "التعرف على الوجه",
"whatsapp": "واتس اب",
"reject": "يرفض",
"approve": "يوافق",
"cancel": "إلغاء",
"requestedItems": "العناصر المطلوبة",
"request": "طلب",
"actions": "أجراءات",
"delegate": "مندوب",
"request_info": "اطلب معلومات",
"attachments": "المرفقات",
"info": "معلومات",
"employeeNumber": "رقم الموظف",
"assignmentNumber": "رقم الواجب",
"employeeName": "اسم الموظف",
"scheduleDate": "تاريخ الجدول الزمني",
"shiftType": "نوع التحول",
"shift": "يحول",
"breakText": "استراحة",
"actualSwipeStart": "بدء التمرير الفعلي",
"actualSwipeEnd": "التمرير الفعلي للنهاية",
"approvedSwipeStart": "وافق انتقاد البدء",
"approvedSwipeStartReason": "تمت الموافقة على سبب بدء التمرير السريع",
"approvedSwipeEnd": "تمت الموافقة على تمرير النهاية",
"approvedSwipeEndReason": "الموافقة على سبب إنهاء التمرير",
"from": "من",
"to": "ل",
"sent": "أرسلت",
"closed": "مغلق",
"id": "هوية شخصية",
"responder": "المستجيب",
"jobTitle": "عنوان وظيفي",
"grade": "درجة",
"jobCategory": "تصنيف الوظيفة",
"category": "فئة",
"employeeEmailAddress": "عنوان البريد الإلكتروني للموظف",
"payrollBranch": "فرع الرواتب",
"yourChangeHasBeenSavedSuccessfully": "تم حفظ التغيير الخاص بك بنجاح",
"code": "شفرة",
"unit": "وحدة",
"quantity": "كمية",
"dateRequired": "التاريخ مطلوب",
"lineStatus": "حالة الخط",
"statusDate": "تاريخ الحالة",
"transactionType": "نوع المعاملة",
"operatingUnit": "وحدة التشغيل",
"organizationCode": "كود المنظمة",
"organization": "منظمة",
"fromSubInventory": "من الجرد الفرعي",
"fromLocator": "من محدد المواقع",
"toSubInventory": "إلى الجرد الفرعي",
"toLocator": "إلى محدد المواقع",
"shipToLocator": "شحن إلى محدد المواقع",
"itemHistory": "تاريخ العنصر",
"mfg": "مبدع",
"lineType": "نوع الخط",
"price": "السعر",
"lineAmount": "مبلغ الخط",
"lineDiscount": "خصم الخط٪",
"needByDate": "القادمة إلى الأمام",
"promisedDate": "التسجيل وعد",
"deliverToLocation": "تسليم إلى الموقع",
"requisitionNumber": "رقم الطلب",
"requester": "مقدم الطلب",
"quotationAnalysis": "تحليل الاقتباس",
"subject": "موضوعات",
"description": "وصف",
"supplier": "المورد",
"site": "موقع",
"buyer": "مشتر",
"preparer": "معد",
"creationDate": "تاريخ الإنشاء",
"shipToLocation": "الشحن الى الموقع",
"quotationNumber": "رقم الإقتباس",
"quotationDate": "تاريخ الاقتباس",
"paymentTerms": "شروط الدفع",
"currency": "عملة",
"grossAmount": "المبلغ الإجمالي",
"discountAmount": "مقدار الخصم",
"customDuty": "الرسوم الجمركية",
"shipHandle": "مقبض السفينة",
"otherCharges": "رسوم أخرى",
"totalPOAmountWithVAT": "إجمالي مبلغ الشراء مع ضريبة القيمة المضافة",
"totalPOAmountInWords": "إجمالي مبلغ أمر الشراء بالكلمات",
"requestNumber": "رقم الطلب",
"uom": "UOM",
"operatingCode": "كود التشغيل",
"poNumber": "PO عدد",
"revision": "مراجعة",
"quantityOrdered": "الكمية المطلوبة",
"quantityReceived": "الكمية المستلمة",
"bonusQuantity": "كمية المكافأة",
"purchasePrice": "سعر الشراء",
"discountPer": "خصم ٪",
"balanceQuantity": "كمية التوازن",
"netPrice": "السعر الصافي",
"closureStatus": "حالة الإغلاق",
"quotationNetPrice": "صافي سعر الاقتباس",
"quotationUOM": "اقتباس UOM",
"quotationQty": "اقتباس الكمية",
"itemCode": "رمز الصنف",
"vendorName": "اسم البائع",
"quotationMFGPartNumber": "رقم الجزء MFG الاقتباس",
"quotationDeliveryDate": "تاريخ تسليم عرض الأسعار",
"quotationBonusQuantity": "كمية مكافأة الاقتباس",
"quotationLineTotal": "مجموع خط الاقتباس",
"rfqUOM": "RFQ UOM",
"rfqQty": "RFQ الكمية",
"rfqNumber": "رقم RFQ",
"msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language",
"clickMe": "Click me",
"human": "Human",
"resources": "Resources",
"human": "بشري",
"resources": "موارد",
"details": "تفاصيل",
"noDataAvailable": "لا تتوافر بيانات",
"productName": "اسم المنتج",
"productDescription": "وصف المنتج",
"unitPrice": "سعر الوحده",
"manufacturerName": "اسم المصنع",
"manufacturerPartName": "اسم جزء الشركة المصنعة",
"supplierName": "اسم المورد",
"supplierContact": "الاتصال بالمورد",
"chargeToPatient": "المسؤول عن المريض",
"justification": "التبرير",
"itemDescription": "وصف السلعة",
"groupCode": "كود المجموعة",
"primaryUOM": "UOM الابتدائية",
"subgroupDescription": "وصف المجموعة الفرعية",
"subgroupCode": "رمز المجموعة الفرعية",
"groupDescription": "وصف المجموعة",
"templateName": "اسم القالب",
"itemCreationStatus": "حالة إنشاء العنصر",
"standardizationApprovalStatus": "حالة الموافقة على التقييس",
"standardizationApprovalRejectionReason": "سبب رفض الموافقة على التقييس",
"analyzedBy": "تحليل بواسطة",
"approvedDate": "تاريخ الموافقة",
"itemType": "نوع العنصر",
"relatedTo": "متعلق ب",
"requestDate": "تاريخ الطلب",
"analyzedDate": "تاريخ التحليل",
"urgent": "العاجلة",
"profile": {
"reset_password": {
"label": "Reset Password",

@ -60,11 +60,150 @@
"doNotAddRepeatingLetters": "Do not add repeating letters",
"itShouldContainSpecialCharacter": "It should contain special character",
"confirmPasswordMustMatch": "Confirm password must match",
"sms": "SMS",
"fingerPrint": "Fingerprint",
"face": "Face",
"whatsapp": "Whatsapp",
"reject": "Reject",
"approve": "Approve",
"cancel": "Cancel",
"requestedItems": "Requested Items",
"request": "Request",
"actions": "Actions",
"delegate": "Delegate",
"request_info": "Request Info",
"attachments": "Attachments",
"info": "Info.",
"employeeNumber": "Employee Number",
"assignmentNumber": "Assignment Number",
"employeeName": "Employee Name",
"scheduleDate": "Schedule Date",
"shiftType": "Shift Type",
"shift": "Shift",
"breakText": "Break",
"actualSwipeStart": "Actual Swipe Start",
"actualSwipeEnd": "Actual Swipe End",
"approvedSwipeStart": "Approved Swipe Start",
"approvedSwipeStartReason": "Approved Swipe Start Reason",
"approvedSwipeEnd": "Approved Swipe End",
"approvedSwipeEndReason": "Approved Swipe End Reason",
"from": "From",
"to": "To",
"sent": "Sent",
"closed": "Closed",
"id": "ID",
"responder": "Responder",
"jobTitle": "Job Title",
"grade": "Grade",
"jobCategory": "Job Category",
"category": "Category",
"employeeEmailAddress": "Employee Email Address",
"payrollBranch": "Payroll Branch",
"yourChangeHasBeenSavedSuccessfully": "Your change has been saved successfully",
"code": "Code",
"unit": "Unit",
"quantity": "Quantity",
"dateRequired": "Date Required",
"lineStatus": "Line Status",
"statusDate": "Status Date",
"transactionType": "Transaction Type",
"operatingUnit": "Operating Unit",
"organizationCode": "Organization Code",
"organization": "Organization",
"fromSubInventory": "From Sub Inventory",
"fromLocator": "From Locator",
"toSubInventory": "To Sub Inventory",
"toLocator": "To Locator",
"shipToLocator": "Ship To Locator",
"itemHistory": "Item History",
"mfg": "MFG",
"lineType": "Line Type",
"price": "Price",
"lineAmount": "Line Amount",
"lineDiscount": "Line Discount %",
"needByDate": "Need By Date",
"promisedDate": "Promised Date",
"deliverToLocation": "Deliver To Location",
"requisitionNumber": "Requisition Number",
"requester": "Requester",
"subject": "Subject",
"quotationAnalysis": "Quotation Analysis",
"description": "Description",
"supplier": "Supplier",
"site": "Site",
"buyer": "Buyer",
"preparer": "Preparer",
"creationDate": "Creation Date",
"shipToLocation": "Ship To Location",
"quotationNumber": "Quotation Number",
"quotationDate": "Quotation Date",
"paymentTerms": "Payment Terms",
"currency": "Currency",
"grossAmount": "Gross Amount",
"discountAmount": "Discount Amount",
"customDuty": "Custom Duty",
"shipHandle": "Ship Handle",
"otherCharges": "Other Charges",
"totalPOAmountWithVAT": "Total PO Amount With VAT",
"totalPOAmountInWords": "Total PO Amount In Words",
"requestNumber": "Request Number",
"uom": "UOM",
"operatingCode": "Operating Code",
"poNumber": "PO Number",
"revision": "Revision",
"quantityOrdered": "Quantity Ordered",
"quantityReceived": "Quantity Received",
"bonusQuantity": "Bonus Quantity",
"purchasePrice": "Purchase Price",
"discountPer": "Discount %",
"balanceQuantity": "Balance Quantity",
"netPrice": "Net Price",
"closureStatus": "Closure Status",
"quotationNetPrice": "Quotation Net Price",
"quotationUOM": "Quotation UOM",
"quotationQty": "Quotation Qty",
"itemCode": "item Code",
"vendorName": "Vendor Name",
"quotationMFGPartNumber": "Quotation MFG Part Number",
"quotationDeliveryDate": "Quotation Delivery Date",
"quotationBonusQuantity": "Quotation Bonus Quantity",
"quotationLineTotal": "Quotation Line Total",
"rfqUOM": "RFQ UOM",
"rfqQty": "RFQ Qty",
"rfqNumber": "RFQ Number",
"msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language",
"clickMe": "Click me",
"human": "Human",
"resources": "Resources",
"details": "Details",
"noDataAvailable": "No Data Available",
"productName": "Product Name",
"productDescription": "Product Description",
"unitPrice": "Unit Price",
"manufacturerName": "Manufacturer Name",
"manufacturerPartName": "Manufacturer Part Name",
"supplierName": "Supplier Name",
"supplierContact": "Supplier Contact",
"chargeToPatient": "Charge To Patient",
"justification": "Justification",
"itemDescription": "Item Description",
"groupCode": "Group Code",
"primaryUOM": "Primary UOM",
"subgroupDescription": "Subgroup Description",
"subgroupCode": "Subgroup Code",
"groupDescription": "Group Description",
"templateName": "Template Name",
"itemCreationStatus": "Item Creation Status",
"standardizationApprovalStatus": "Standardization Approval Status",
"standardizationApprovalRejectionReason": "Standardization Approval Rejection Reason",
"analyzedBy": "Analyzed By",
"approvedDate": "Approved Date",
"itemType": "Item Type",
"relatedTo": "Related To",
"requestDate": "Request Date",
"analyzedDate": "Analyzed Date",
"urgent": "Urgent",
"profile": {
"reset_password": {
"label": "Reset Password",

@ -76,7 +76,7 @@ class ApiClient {
print("body:$jsonObject");
}
var response = await postJsonForResponse(url, jsonObject, token: token, queryParameters: queryParameters, headers: _headers, retryTimes: retryTimes);
try {
// try {
if (!kReleaseMode) {
logger.i("res: " + response.body);
}
@ -88,13 +88,13 @@ class ApiClient {
apiError = APIError(jsonData['ErrorCode'], jsonData['ErrorMessage']);
throw APIException(APIException.BAD_REQUEST, error: apiError);
}
} catch (ex) {
if (ex is APIException) {
rethrow;
} else {
throw APIException(APIException.BAD_RESPONSE_FORMAT, arguments: ex);
}
}
// } catch (ex) {
// if (ex is APIException) {
// rethrow;
// } else {
// throw APIException(APIException.BAD_RESPONSE_FORMAT, arguments: ex);
// }
// }
}
Future<Response> postJsonForResponse<T>(String url, T jsonObject, {String? token, Map<String, dynamic>? queryParameters, Map<String, String>? headers, int retryTimes = 0}) async {
@ -162,6 +162,68 @@ class ApiClient {
}
}
Future<Response> getJsonForResponse<T>(String url, {String? token, Map<String, dynamic>? queryParameters, Map<String, String>? 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);
}
Future<Response> _getForResponse(String url, {String? token, Map<String, dynamic>? queryParameters, Map<String, String>? headers, int retryTimes = 0}) async {
try {
var _headers = <String, String>{};
if (token != null) {
_headers['Authorization'] = 'Bearer $token';
}
if (headers != null && headers.isNotEmpty) {
_headers.addAll(headers);
}
if (queryParameters != null) {
var queryString = new Uri(queryParameters: queryParameters).query;
url = url + '?' + queryString;
}
var response = await _get(Uri.parse(url), headers: _headers).timeout(Duration(seconds: 60));
if (response.statusCode >= 200 && response.statusCode < 300) {
return response;
} else {
throw _throwAPIException(response);
}
} on SocketException catch (e) {
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);
} else {
throw APIException(APIException.OTHER, arguments: e);
}
} on HttpException catch (e) {
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);
} else {
throw APIException(APIException.OTHER, arguments: e);
}
} on TimeoutException catch (e) {
throw APIException(APIException.TIMEOUT, arguments: e);
} on ClientException catch (e) {
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);
} else {
throw APIException(APIException.OTHER, arguments: e);
}
}
}
Future<Response> _get(url, {Map<String, String>? headers}) => _withClient((client) => client.get(url, headers: headers));
bool _certificateCheck(X509Certificate cert, String host, int port) => true;
Future<T> _withClient<T>(Future<T> Function(Client) fn) async {

@ -11,12 +11,12 @@ import 'package:mohem_flutter_app/models/member_login_list_model.dart';
import 'api_client.dart';
class DashbaordApiClient {
static final DashbaordApiClient _instance = DashbaordApiClient._internal();
class DashboardApiClient {
static final DashboardApiClient _instance = DashboardApiClient._internal();
DashbaordApiClient._internal();
DashboardApiClient._internal();
factory DashbaordApiClient() => _instance;
factory DashboardApiClient() => _instance;
Future<GetAttendanceTracking?> getAttendanceTracking() async {
String url = "${ApiConsts.erpRest}GET_Attendance_Tracking";

@ -47,6 +47,7 @@ class LoginApiClient {
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
AppState().setLogged = true;
return responseData;
}, url, postParams);
}
@ -82,7 +83,6 @@ class LoginApiClient {
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
AppState().setLogged = true;
AppState().postParamsObject?.setTokenID = responseData.tokenID;
AppState().postParamsObject?.mobileNumber = responseData.basicMemberInformation!.pMOBILENUMBER;
AppState().postParamsObject?.userName = AppState().getUserName;

@ -0,0 +1,282 @@
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/models/dashboard/itg_forms_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.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_attachement_list_model.dart';
import 'package:mohem_flutter_app/models/get_item_creation_ntf_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_mo_Item_history_list_model.dart';
import 'package:mohem_flutter_app/models/get_mo_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_notification_buttons_list_model.dart';
import 'package:mohem_flutter_app/models/get_po_Item_history_list_model.dart';
import 'package:mohem_flutter_app/models/get_po_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_quotation_analysis_list_model.dart';
import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
class WorkListApiClient {
static final WorkListApiClient _instance = WorkListApiClient._internal();
WorkListApiClient._internal();
factory WorkListApiClient() => _instance;
Future<List<WorkListResponseModel>?> getWorkList(int pPageNum, String pItemType) async {
String url = "${ApiConsts.erpRest}GET_WORKLIST";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_TYPE": "1",
"P_PAGE_NUM": pPageNum,
"P_PAGE_LIMIT": 50,
"P_ITEM_TYPE": pItemType,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.getWorkList;
}, url, postParams);
}
Future<ItgFormsModel?> getITGTaskCountRequestType() async {
String url = "${ApiConsts.cocRest}ITGGetTaskCountRequestType";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
ItgFormsModel responseData = ItgFormsModel.fromJson(json);
return responseData;
}, url, postParams);
}
Future<GenericResponseModel> getSubordinatesLeaves(String fromDate, String toDate) async {
String url = "${ApiConsts.erpRest}GET_SUBORDINATES_LEAVES";
Map<String, dynamic> postParams = {"P_DATE_FROM": "/Date(1639861200000+0300)/", "P_DATE_TO": "/Date(1640120400000+0300)/"};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
}
Future<List<GetAttachementList>> getAttachments(int pNotificationID) async {
String url = "${ApiConsts.erpRest}GET_ATTACHMENTS";
Map<String, dynamic> postParams = {"P_NOTIFICATION_ID": pNotificationID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getAttachementList ?? [];
}, url, postParams);
}
Future<List<GetActionHistoryList>> getActionHistory(int pNotificationID) async {
String url = "${ApiConsts.erpRest}GET_ACTION_HISTORY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getActionHistoryList ?? [];
}, url, postParams);
}
Future<List<GetNotificationButtonsList>> getNotificationButtons(int pNotificationID) async {
String url = "${ApiConsts.erpRest}GET_NOTIFICATION_BUTTONS";
Map<String, dynamic> postParams = {"P_NOTIFICATION_ID": pNotificationID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getNotificationButtonsList ?? [];
}, url, postParams);
}
Future<List<NotificationGetRespondAttributesList>> notificationGetRespondAttributes(int pNotificationID) async {
String url = "${ApiConsts.erpRest}NOTIFICATION_GET_RESPOND_ATTRIBUTES";
Map<String, dynamic> postParams = {"P_NOTIFICATION_ID": pNotificationID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.notificationGetRespondAttributesList ?? [];
}, url, postParams);
}
Future<GenericResponseModel> getBasicDetNTFBody(int pNotificationID, int pTransactionID) async {
String url = "${ApiConsts.erpRest}GET_BASIC_DET_NTF_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_TRANSACTION_ID": pTransactionID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
}
Future<MemberInformationListModel> getUserInformation(int pSelectedResopID, String selectedEmployeeNumber) async {
String url = "${ApiConsts.erpRest}Get_UserInformation";
Map<String, dynamic> postParams = {
"P_SELECTED_RESP_ID": pSelectedResopID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
postParams["P_SELECTED_EMPLOYEE_NUMBER"] = selectedEmployeeNumber;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.memberInformationList![0];
}, url, postParams);
}
Future<List<GetStampMsNotificationBodyList>> getStampMsNotificationBody(int pNotificationID, int pTransactionID) async {
String url = "${ApiConsts.erpRest}GET_STAMP_MS_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_TRANSACTION_ID": pTransactionID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getStampMsNotificationBodyList ?? [];
}, url, postParams);
}
Future<List<GetStampNsNotificationBodyList>> getStampNsNotificationBody(int pNotificationID, int pTransactionID) async {
String url = "${ApiConsts.erpRest}GET_STAMP_NS_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_TRANSACTION_ID": pTransactionID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getStampNsNotificationBodyList ?? [];
}, url, postParams);
}
Future<List<GetAbsenceCollectionNotificationBodyList>> getAbsenceNotificationBody(int pNotificationID, int pTransactionID) async {
String url = "${ApiConsts.erpRest}GET_ABSENCE_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_TRANSACTION_ID": pTransactionID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getAbsenceCollectionNotificationBodyList ?? [];
}, url, postParams);
}
Future<GenericResponseModel> postNotificationActions(Map<String, dynamic> postParams) async {
String url = "${ApiConsts.erpRest}NOTIFICATION_ACTIONS";
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
}
Future<List<GetMoNotificationBodyList>> getMoNotificationBody(int pNotificationID, int pTransactionID) async {
String url = "${ApiConsts.erpRest}GET_MO_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_TRANSACTION_ID": pTransactionID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getMoNotificationBodyList ?? [];
}, url, postParams);
}
Future<GetPoNotificationBodyList?> getPoNotificationBody(int pNotificationID, int pTransactionID) async {
String url = "${ApiConsts.erpRest}GET_PO_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_TRANSACTION_ID": pTransactionID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getPoNotificationBodyList;
}, url, postParams);
}
Future<List<GetMoItemHistoryList>> getMoItemHistory(int pItemID, int pOrgID) async {
String url = "${ApiConsts.erpRest}GET_MO_ITEM_HISTORY";
Map<String, dynamic> postParams = {
"P_ITEM_ID": pItemID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
"P_ORG_ID": pOrgID,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getMoItemHistoryList ?? [];
}, url, postParams);
}
Future<List<GetPoItemHistoryList>> getPoItemHistory(int pItemID) async {
String url = "${ApiConsts.erpRest}GET_PO_ITEM_HISTORY";
Map<String, dynamic> postParams = {
"P_ITEM_ID": pItemID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getPoItemHistoryList ?? [];
}, url, postParams);
}
Future<List<GetQuotationAnalysisList>> getQuotationAnalysis(int pItemID, int pPoHeaderId) async {
String url = "${ApiConsts.erpRest}GET_QUOTATION_ANALYSIS";
Map<String, dynamic> postParams = {
"P_ITEM_ID": pItemID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
"P_PO_HEADER_ID": pPoHeaderId,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getQuotationAnalysisList ?? [];
}, url, postParams);
}
Future<GetItemCreationNtfBodyList?> getItemCreationNtfBody(int pNotificationID, int pTransactionID) async {
String url = "${ApiConsts.erpRest}GET_ITEM_CREATION_NTF_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_TRANSACTION_ID": pTransactionID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getItemCreationNtfBodyList;
}, url, postParams);
}
}

@ -3,6 +3,7 @@ import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/member_login_list_model.dart';
import 'package:mohem_flutter_app/models/post_params_model.dart';
import 'package:mohem_flutter_app/models/privilege_list_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
class AppState {
static final AppState _instance = AppState._internal();
@ -43,7 +44,6 @@ class AppState {
String? get getUserName => _username;
set setUserPassword(_password) => password = _password;
MemberLoginListModel? _memberLoginList;
@ -63,4 +63,11 @@ class AppState {
List<PrivilegeListModel>? get privilegeListModel => _privilegeListModel;
set setPrivilegeListModel(List<PrivilegeListModel>? _privilegeListModel) => this._privilegeListModel = _privilegeListModel;
List<WorkListResponseModel>? workList;
set setWorkList(List<WorkListResponseModel>? _workList) => workList = _workList;
int? workListIndex;
set setWorkListIndex(int? _workListIndex) => workListIndex = _workListIndex;
}

@ -10,12 +10,14 @@ class MyColors {
static const Color textMixColor = Color(0xff2BB8A6);
static const Color backgroundColor = Color(0xffF8F8F8);
static const Color grey57Color = Color(0xff575757);
static const Color grey67Color = Color(0xff676767);
static const Color grey77Color = Color(0xff777777);
static const Color grey70Color = Color(0xff707070);
static const Color greyACColor = Color(0xffACACAC);
static const Color grey98Color = Color(0xff989898);
static const Color lightGreyEFColor = Color(0xffEFEFEF);
static const Color lightGreyEDColor = Color(0xffEDEDED);
static const Color lightGreyE6Color = Color(0xffE6E6E6);
static const Color lightGreyEAColor = Color(0xffEAEAEA);
static const Color darkWhiteColor = Color(0xffE0E0E0);
static const Color redColor = Color(0xffD02127);

@ -0,0 +1,448 @@
import 'package:intl/intl.dart';
class DateUtil {
/// convert String To Date function
/// [date] String we want to convert
static DateTime convertStringToDate(String date) {
// /Date(1585774800000+0300)/
if (date != null) {
const start = "/Date(";
const end = "+0300)";
final startIndex = date.indexOf(start);
final endIndex = date.indexOf(end, startIndex + start.length);
return DateTime.fromMillisecondsSinceEpoch(
int.parse(
date.substring(startIndex + start.length, endIndex),
),
);
} else
return DateTime.now();
}
static DateTime convertSimpleStringDateToDate(String date) {
return DateFormat("MM/dd/yyyy hh:mm:ss").parse(date);
}
static DateTime convertSimpleStringDateToDateddMMyyyy(String date) {
return DateFormat("MM/dd/yyyy hh:mm:ss").parse(date);
}
static DateTime convertStringToDateNoTimeZone(String date) {
// /Date(1585774800000+0300)/
if (date != null) {
const start = "/Date(";
const end = ")";
final startIndex = date.indexOf(start);
final endIndex = date.indexOf(end, startIndex + start.length);
return DateTime.fromMillisecondsSinceEpoch(
int.parse(
date.substring(startIndex + start.length, endIndex),
),
);
} else
return DateTime.now();
}
static DateTime convertStringToDateTime(String date) {
if (date != null) {
try {
var dateT = date.split('/');
var year = dateT[2].substring(0, 4);
var dateP = DateTime(int.parse(year), int.parse(dateT[1]), int.parse(dateT[0]));
return dateP;
} catch (e) {
print(e);
}
return DateTime.now();
} else
return DateTime.now();
}
static String convertDateToString(DateTime date) {
const start = "/Date(";
const end = "+0300)";
int milliseconds = date.millisecondsSinceEpoch;
return start + "$milliseconds" + end;
}
static String convertDateToStringLocation(DateTime date) {
const start = "/Date(";
const end = ")/";
int milliseconds = date.millisecondsSinceEpoch;
return start + "$milliseconds" + end;
}
static String formatDateToDate(DateTime date, bool isArabic) {
return DateFormat('dd MMM yyy', isArabic ? "ar_SA" : "en_US").format(date);
}
static String formatDateToTime(DateTime date) {
return DateFormat('hh:mm a').format(date);
}
static String yearMonthDay(DateTime dateTime) {
String dateFormat = '${dateTime.year}-${dateTime.month}-${dateTime.day}';
return dateFormat;
}
static String time(DateTime dateTime) {
String dateFormat = '${dateTime.hour}:${dateTime.minute}:00';
return dateFormat;
}
static String convertDateMSToJsonDate(utc) {
var dt = new DateTime.fromMicrosecondsSinceEpoch(utc);
return "/Date(" + (dt.millisecondsSinceEpoch * 1000).toString() + '+0300' + ")/";
}
/// check Date
/// [dateString] String we want to convert
static String checkDate(DateTime checkedTime) {
DateTime currentTime = DateTime.now();
if ((currentTime.year == checkedTime.year) && (currentTime.month == checkedTime.month) && (currentTime.day == checkedTime.day)) {
return "Today";
} else if ((currentTime.year == checkedTime.year) && (currentTime.month == checkedTime.month)) {
if ((currentTime.day - checkedTime.day) == 1) {
return "YESTERDAY";
} else if ((currentTime.day - checkedTime.day) == -1) {
return "Tomorrow";
}
if ((currentTime.day - checkedTime.day) <= -2) {
return "Next Week";
} else {
return "Old Date";
}
}
return "Old Date";
}
static String getDateFormatted(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getWeekDay(dateObj.weekday) + ", " + dateObj.day.toString() + " " + DateUtil.getMonth(dateObj.month) + " " + dateObj.year.toString();
}
static String getISODateFormat(DateTime dateTime) {
// 2020-04-30T00:00:00.000
return dateTime.toIso8601String();
}
/// get month by
/// [month] convert month number in to month name
static getMonth(int month) {
switch (month) {
case 1:
return "January";
case 2:
return "February";
case 3:
return "March";
case 4:
return "April";
case 5:
return "May";
case 6:
return "June";
case 7:
return "July";
case 8:
return "August";
case 9:
return "September";
case 10:
return "October";
case 11:
return "November";
case 12:
return "December";
}
}
/// get month by
/// [month] convert month number in to month name in Arabic
static getMonthArabic(int month) {
switch (month) {
case 1:
return "يناير";
case 2:
return " فبراير";
case 3:
return "مارس";
case 4:
return "أبريل";
case 5:
return "مايو";
case 6:
return "يونيو";
case 7:
return "يوليو";
case 8:
return "أغسطس";
case 9:
return "سبتمبر";
case 10:
return " اكتوبر";
case 11:
return " نوفمبر";
case 12:
return "ديسمبر";
}
}
static getMonthByName(String month) {
switch (month.toLowerCase()) {
case 'january':
return 1;
case 'february':
return 2;
case 'march':
return 3;
case 'april':
return 4;
case 'may':
return 5;
case 'june':
return 6;
case 'july':
return 7;
case 'august':
return 8;
case 'september':
return 9;
case 'october':
return 10;
case 'november':
return 11;
case 'december':
return 12;
}
}
static DateTime getMonthDateTime(String month, yearName) {
DateTime? date;
try {
date = DateTime(int.parse(yearName), getMonthByName(month));
} catch (e) {
print(e);
}
return date ?? DateTime.now();
}
/// get month by
/// [weekDay] convert week day in int to week day name
static getWeekDay(int weekDay) {
switch (weekDay) {
case 1:
return "Monday";
case 2:
return "Tuesday";
case 3:
return "Wednesday";
case 4:
return "Thursday";
case 5:
return "Friday";
case 6:
return "Saturday ";
case 7:
return "Sunday";
}
}
/// get month by
/// [weekDay] convert week day in int to week day name arabic
static getWeekDayArabic(int weekDay) {
switch (weekDay) {
case 1:
return "الاثنين";
case 2:
return "الثلاثاء";
case 3:
return "الاربعاء";
case 4:
return "الخميس";
case 5:
return "الجمعه";
case 6:
return "السبت ";
case 7:
return "الاحد";
}
}
static getWeekDayEnglish(int weekDay) {
switch (weekDay) {
case 1:
return "Monday";
case 2:
return "Tuesday";
case 3:
return "Wednesday";
case 4:
return "Thursday";
case 5:
return "Friday";
case 6:
return "Saturday ";
case 7:
return "Sunday";
}
}
/// get data formatted like Apr 26,2020
/// [dateTime] convert DateTime to data formatted
static String getMonthDayYearDateFormatted(DateTime dateTime) {
if (dateTime != null)
return getMonth(dateTime.month) + " " + dateTime.day.toString() + ", " + dateTime.year.toString();
else
return "";
}
/// get data formatted like Apr 26,2020
/// [dateTime] convert DateTime to data formatted Arabic
static String getMonthDayYearDateFormattedAr(DateTime dateTime) {
if (dateTime != null)
return getMonthArabic(dateTime.month) + " " + dateTime.day.toString() + ", " + dateTime.year.toString();
else
return "";
}
/// get data formatted like Thursday, Apr 26,2020
/// [dateTime] convert DateTime to date formatted
static String getWeekDayMonthDayYearDateFormatted(DateTime dateTime, String lang) {
// print(dateTime);
// print(dateTime.weekday);
// print(dateTime.weekday.getDayOfWeekEnumValue.value);
if (dateTime != null)
return lang == 'en'
? getWeekDayEnglish(dateTime.weekday) + ", " + getMonth(dateTime.month) + " " + dateTime.day.toString() + " " + dateTime.year.toString()
: getWeekDayArabic(dateTime.weekday) + ", " + dateTime.day.toString() + " " + getMonthArabic(dateTime.month) + " " + dateTime.year.toString();
else
return "";
}
static String getMonthDayYearLangDateFormatted(DateTime dateTime, String lang) {
if (dateTime != null)
return lang == 'en'
? getMonth(dateTime.month) + " " + dateTime.day.toString() + " " + dateTime.year.toString()
: dateTime.day.toString() + " " + getMonthArabic(dateTime.month) + " " + dateTime.year.toString();
else
return "";
}
/// get data formatted like 26/4/2020
static String getDayMonthYearLangDateFormatted(DateTime dateTime, String lang) {
if (dateTime != null)
return lang == 'en'
? dateTime.day.toString() + " " + getMonth(dateTime.month) + " " + dateTime.year.toString()
: dateTime.day.toString() + " " + getMonthArabic(dateTime.month) + " " + dateTime.year.toString();
else
return "";
}
static String getMonthYearLangDateFormatted(DateTime dateTime, String lang) {
if (dateTime != null)
return lang == 'en' ? getMonth(dateTime.month) + " " + dateTime.year.toString() : getMonthArabic(dateTime.month) + " " + dateTime.year.toString();
else
return "";
}
/// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted
static String getDayMonthYearDateFormatted(DateTime dateTime) {
if (dateTime != null)
return dateTime.day.toString() + "/" + dateTime.month.toString() + "/" + dateTime.year.toString();
else
return "";
}
/// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted
static String getDayMonthDateFormatted(DateTime dateTime) {
if (dateTime != null)
return DateFormat('dd/MM').format(dateTime);
else
return "";
}
/// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted according to language
static String getDayMonthYearDateFormattedLang(DateTime dateTime, bool isArabic) {
if (dateTime != null)
return DateFormat('dd/MM/yyyy', isArabic ? "ar_SA" : "en_US").format(dateTime);
else
return "";
}
/// get data formatted like 10:30 according to lang
static String formatDateToTimeLang(DateTime date, bool isArabic) {
return DateFormat('HH:mm', isArabic ? "ar_SA" : "en_US").format(date);
}
/// get data formatted like 26/4/2020 10:30
/// [dateTime] convert DateTime to data formatted
static String getDayMonthYearHourMinuteDateFormatted(DateTime dateTime) {
if (dateTime != null)
return dateTime.day.toString() + "/" + dateTime.month.toString() + "/" + dateTime.year.toString() + " " + DateFormat('HH:mm').format(dateTime);
else
return "";
}
/// get data formatted like 2020-8-13 09:43:00
/// [dateTime] convert DateTime to data formatted
static String getYearMonthDayHourMinSecDateFormatted(DateTime dateTime) {
if (dateTime != null)
return dateTime.year.toString() +
"-" +
dateTime.month.toString() +
"-" +
dateTime.day.toString() +
" " +
dateTime.hour.toString() +
":" +
dateTime.minute.toString() +
":" +
dateTime.second.toString();
else
return "";
}
static String getFormattedDate(DateTime dateTime, String formattedString) {
return DateFormat(formattedString).format(dateTime);
}
static convertISODateToJsonDate(String isoDate) {
return "/Date(" + DateFormat('mm-dd-yyy').parse(isoDate).millisecondsSinceEpoch.toString() + ")/";
}
// static String getDay(DayOfWeek dayOfWeek) {
// switch (dayOfWeek) {
// case DayOfWeek.Monday:
// return "Monday";
// break;
// case DayOfWeek.Tuesday:
// return "Tuesday";
// break;
// case DayOfWeek.Wednesday:
// return "Wednesday";
// break;
// case DayOfWeek.Thursday:
// return "Thursday";
// break;
// case DayOfWeek.Friday:
// return "Friday";
// break;
// case DayOfWeek.Saturday:
// return "Saturday";
// break;
// case DayOfWeek.Sunday:
// return "Sunday";
// break;
// }
// return "";
// }
}

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:mohem_flutter_app/config/routes.dart';
// import 'package:fluttertoast/fluttertoast.dart';
import 'package:mohem_flutter_app/exceptions/api_exception.dart';
@ -64,7 +65,7 @@ class Utils {
return await prefs.setString(key, value);
}
static void handleException(dynamic exception, Function(String)? onErrorMessage) {
static void handleException(dynamic exception, cxt, Function(String)? onErrorMessage) {
String errorMessage;
if (exception is APIException) {
if (exception.message == APIException.UNAUTHORIZED) {
@ -77,10 +78,22 @@ class Utils {
}
if (onErrorMessage != null) {
onErrorMessage(errorMessage);
} else {
if (errorMessage.contains("User session is not valid")) {
showDialog(
context: cxt,
builder: (cxt) => ConfirmDialog(
message: errorMessage,
onTap: (){
Navigator.pushNamedAndRemoveUntil(cxt, AppRoutes.login, (Route<dynamic> route) => false);
},
),
);
} else {
showToast(errorMessage);
}
}
}
static void confirmDialog(cxt, String message) {
showDialog(

@ -8,6 +8,7 @@ import 'package:mohem_flutter_app/ui/login/verify_last_login_screen.dart';
import 'package:mohem_flutter_app/ui/login/verify_login_screen.dart';
import 'package:mohem_flutter_app/ui/screens/eit/add_eit.dart';
import 'package:mohem_flutter_app/ui/screens/submenu_screen.dart';
import 'package:mohem_flutter_app/ui/work_list/item_history_screen.dart';
import 'package:mohem_flutter_app/ui/work_list/missing_swipe/missing_swipe_screen.dart';
import 'package:mohem_flutter_app/ui/work_list/work_list_screen.dart';
@ -30,6 +31,7 @@ class AppRoutes {
//Work List
static const String workList = "/workList";
static const String missingSwipe = "/missingSwipe";
static const String itemHistory = "/itemHistory";
static final Map<String, WidgetBuilder> routes = {
login: (context) => LoginScreen(),
@ -48,5 +50,6 @@ class AppRoutes {
//Work List
workList: (context) => WorkListScreen(),
missingSwipe: (context) => MissingSwipeScreen(),
itemHistory: (context) => ItemHistoryScreen(),
};
}

@ -4,4 +4,6 @@ extension IntExtensions on int {
Widget get height => SizedBox(height: toDouble());
Widget get width => SizedBox(width: toDouble());
Widget get makeItSquare => SizedBox(width: toDouble(), height: toDouble());
}

@ -1,15 +1,19 @@
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/cupertino.dart';
import 'package:intl/intl.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
extension CapExtension on String {
String get toCamelCase => "${this[0].toUpperCase()}${this.substring(1)}";
String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}';
String get allInCaps => this.toUpperCase();
String get capitalizeFirstofEach => this.trim().length > 0 ? this.trim().toLowerCase().split(" ").map((str) => str.inCaps).join(" ") : "";
}
extension EmailValidator on String {
Widget get toWidget => Text(this);
@ -65,9 +69,9 @@ extension EmailValidator on String {
style: TextStyle(height: 1, color: color ?? MyColors.darkTextColor, fontSize: 22, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText24({Color? color, bool isBold = false}) => Text(
Widget toText24({Color? color, bool isBold = false, bool considerHeight = true}) => Text(
this,
style: TextStyle(height: 23 / 24, color: color ?? MyColors.darkTextColor, fontSize: 24, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
style: TextStyle(height: considerHeight ? 23 / 24 : null, color: color ?? MyColors.darkTextColor, fontSize: 24, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText32({Color? color, bool isBold = false}) => Text(
@ -75,6 +79,38 @@ extension EmailValidator on String {
style: TextStyle(height: 32 / 32, color: color ?? MyColors.darkTextColor, fontSize: 32, letterSpacing: -1.92, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toSectionHeading({String upperHeading = "", String lowerHeading = ""}) {
String upper = "";
String lower = "";
String heading = this;
if (heading.isNotEmpty) {
List<String> data = heading.split(" ");
if (data.length > 1) {
upper = data[0];
data.removeAt(0);
lower = data.join(" ");
} else {
lower = data[0];
}
}
if (upperHeading.isNotEmpty) {
upper = upperHeading;
}
if (lowerHeading.isNotEmpty) {
lower = lowerHeading;
}
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (upper.isNotEmpty) upper.toText12(),
lower.toText24(isBold: true),
],
);
}
bool isValidEmail() {
return RegExp(r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$').hasMatch(this);
}

@ -1,23 +1,33 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:shimmer/shimmer.dart';
extension WidgetExtensions on Widget {
Widget onPress(VoidCallback onTap) => InkWell(onTap: onTap, child: this);
Widget get expanded => Expanded(child: this);
Widget get center => Center(child: this);
Widget paddingAll(double _value) => Padding(padding: EdgeInsets.all(_value), child: this);
Widget paddingOnly({double left = 0.0, double right = 0.0, double top = 0.0, double bottom = 0.0}) =>
Padding(padding: EdgeInsets.only(left: left, right: right, top: top, bottom: bottom), child: this);
Widget toShimmer({bool isShow=true}) =>isShow? Shimmer.fromColors(
Widget toShimmer({bool isShow = true}) => isShow
? Shimmer.fromColors(
baseColor: Color(0xffe8eff0),
highlightColor: Colors.white,
child: Container(
child: this,
color: Colors.white,
),
):Container(child: this,);
)
: Container(
child: this,
);
Widget animatedSwither() => AnimatedSwitcher(
duration: const Duration(milliseconds: 500),
@ -28,4 +38,30 @@ extension WidgetExtensions on Widget {
switchOutCurve: Curves.linearToEaseOut,
child: this,
);
Widget objectContainerView({String title = ""}) {
return Container(
padding: const EdgeInsets.only(top: 15, bottom: 15, left: 14, right: 14),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (title.isNotEmpty) title.toText16(),
if (title.isNotEmpty) 12.height,
this,
],
),
);
}
}

@ -76,11 +76,150 @@ class CodegenLoader extends AssetLoader{
"doNotAddRepeatingLetters": "لا تقم بإضافة أحرف متكررة",
"itShouldContainSpecialCharacter": "يجب أن يحتوي على طابع خاص",
"confirmPasswordMustMatch": "يجب أن يتطابق تأكيد كلمة المرور",
"sms": "رسالة قصيرة",
"fingerPrint": "بصمة",
"face": "التعرف على الوجه",
"whatsapp": "واتس اب",
"reject": "يرفض",
"approve": "يوافق",
"cancel": "إلغاء",
"requestedItems": "العناصر المطلوبة",
"request": "طلب",
"actions": "أجراءات",
"delegate": "مندوب",
"request_info": "اطلب معلومات",
"attachments": "المرفقات",
"info": "معلومات",
"employeeNumber": "رقم الموظف",
"assignmentNumber": "رقم الواجب",
"employeeName": "اسم الموظف",
"scheduleDate": "تاريخ الجدول الزمني",
"shiftType": "نوع التحول",
"shift": "يحول",
"breakText": "استراحة",
"actualSwipeStart": "بدء التمرير الفعلي",
"actualSwipeEnd": "التمرير الفعلي للنهاية",
"approvedSwipeStart": "وافق انتقاد البدء",
"approvedSwipeStartReason": "تمت الموافقة على سبب بدء التمرير السريع",
"approvedSwipeEnd": "تمت الموافقة على تمرير النهاية",
"approvedSwipeEndReason": "الموافقة على سبب إنهاء التمرير",
"from": "من",
"to": "ل",
"sent": "أرسلت",
"closed": "مغلق",
"id": "هوية شخصية",
"responder": "المستجيب",
"jobTitle": "عنوان وظيفي",
"grade": "درجة",
"jobCategory": "تصنيف الوظيفة",
"category": "فئة",
"employeeEmailAddress": "عنوان البريد الإلكتروني للموظف",
"payrollBranch": "فرع الرواتب",
"yourChangeHasBeenSavedSuccessfully": "تم حفظ التغيير الخاص بك بنجاح",
"code": "شفرة",
"unit": "وحدة",
"quantity": "كمية",
"dateRequired": "التاريخ مطلوب",
"lineStatus": "حالة الخط",
"statusDate": "تاريخ الحالة",
"transactionType": "نوع المعاملة",
"operatingUnit": "وحدة التشغيل",
"organizationCode": "كود المنظمة",
"organization": "منظمة",
"fromSubInventory": "من الجرد الفرعي",
"fromLocator": "من محدد المواقع",
"toSubInventory": "إلى الجرد الفرعي",
"toLocator": "إلى محدد المواقع",
"shipToLocator": "شحن إلى محدد المواقع",
"itemHistory": "تاريخ العنصر",
"mfg": "مبدع",
"lineType": "نوع الخط",
"price": "السعر",
"lineAmount": "مبلغ الخط",
"lineDiscount": "خصم الخط٪",
"needByDate": "القادمة إلى الأمام",
"promisedDate": "التسجيل وعد",
"deliverToLocation": "تسليم إلى الموقع",
"requisitionNumber": "رقم الطلب",
"requester": "مقدم الطلب",
"quotationAnalysis": "تحليل الاقتباس",
"subject": "موضوعات",
"description": "وصف",
"supplier": "المورد",
"site": "موقع",
"buyer": "مشتر",
"preparer": "معد",
"creationDate": "تاريخ الإنشاء",
"shipToLocation": "الشحن الى الموقع",
"quotationNumber": "رقم الإقتباس",
"quotationDate": "تاريخ الاقتباس",
"paymentTerms": "شروط الدفع",
"currency": "عملة",
"grossAmount": "المبلغ الإجمالي",
"discountAmount": "مقدار الخصم",
"customDuty": "الرسوم الجمركية",
"shipHandle": "مقبض السفينة",
"otherCharges": "رسوم أخرى",
"totalPOAmountWithVAT": "إجمالي مبلغ الشراء مع ضريبة القيمة المضافة",
"totalPOAmountInWords": "إجمالي مبلغ أمر الشراء بالكلمات",
"requestNumber": "رقم الطلب",
"uom": "UOM",
"operatingCode": "كود التشغيل",
"poNumber": "PO عدد",
"revision": "مراجعة",
"quantityOrdered": "الكمية المطلوبة",
"quantityReceived": "الكمية المستلمة",
"bonusQuantity": "كمية المكافأة",
"purchasePrice": "سعر الشراء",
"discountPer": "خصم ٪",
"balanceQuantity": "كمية التوازن",
"netPrice": "السعر الصافي",
"closureStatus": "حالة الإغلاق",
"quotationNetPrice": "صافي سعر الاقتباس",
"quotationUOM": "اقتباس UOM",
"quotationQty": "اقتباس الكمية",
"itemCode": "رمز الصنف",
"vendorName": "اسم البائع",
"quotationMFGPartNumber": "رقم الجزء MFG الاقتباس",
"quotationDeliveryDate": "تاريخ تسليم عرض الأسعار",
"quotationBonusQuantity": "كمية مكافأة الاقتباس",
"quotationLineTotal": "مجموع خط الاقتباس",
"rfqUOM": "RFQ UOM",
"rfqQty": "RFQ الكمية",
"rfqNumber": "رقم RFQ",
"msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language",
"clickMe": "Click me",
"human": "Human",
"resources": "Resources",
"human": "بشري",
"resources": "موارد",
"details": "تفاصيل",
"noDataAvailable": "لا تتوافر بيانات",
"productName": "اسم المنتج",
"productDescription": "وصف المنتج",
"unitPrice": "سعر الوحده",
"manufacturerName": "اسم المصنع",
"manufacturerPartName": "اسم جزء الشركة المصنعة",
"supplierName": "اسم المورد",
"supplierContact": "الاتصال بالمورد",
"chargeToPatient": "المسؤول عن المريض",
"justification": "التبرير",
"itemDescription": "وصف السلعة",
"groupCode": "كود المجموعة",
"primaryUOM": "UOM الابتدائية",
"subgroupDescription": "وصف المجموعة الفرعية",
"subgroupCode": "رمز المجموعة الفرعية",
"groupDescription": "وصف المجموعة",
"templateName": "اسم القالب",
"itemCreationStatus": "حالة إنشاء العنصر",
"standardizationApprovalStatus": "حالة الموافقة على التقييس",
"standardizationApprovalRejectionReason": "سبب رفض الموافقة على التقييس",
"analyzedBy": "تحليل بواسطة",
"approvedDate": "تاريخ الموافقة",
"itemType": "نوع العنصر",
"relatedTo": "متعلق ب",
"requestDate": "تاريخ الطلب",
"analyzedDate": "تاريخ التحليل",
"urgent": "العاجلة",
"profile": {
"reset_password": {
"label": "Reset Password",
@ -176,11 +315,150 @@ static const Map<String,dynamic> en_US = {
"doNotAddRepeatingLetters": "Do not add repeating letters",
"itShouldContainSpecialCharacter": "It should contain special character",
"confirmPasswordMustMatch": "Confirm password must match",
"sms": "SMS",
"fingerPrint": "Fingerprint",
"face": "Face",
"whatsapp": "Whatsapp",
"reject": "Reject",
"approve": "Approve",
"cancel": "Cancel",
"requestedItems": "Requested Items",
"request": "Request",
"actions": "Actions",
"delegate": "Delegate",
"request_info": "Request Info",
"attachments": "Attachments",
"info": "Info.",
"employeeNumber": "Employee Number",
"assignmentNumber": "Assignment Number",
"employeeName": "Employee Name",
"scheduleDate": "Schedule Date",
"shiftType": "Shift Type",
"shift": "Shift",
"breakText": "Break",
"actualSwipeStart": "Actual Swipe Start",
"actualSwipeEnd": "Actual Swipe End",
"approvedSwipeStart": "Approved Swipe Start",
"approvedSwipeStartReason": "Approved Swipe Start Reason",
"approvedSwipeEnd": "Approved Swipe End",
"approvedSwipeEndReason": "Approved Swipe End Reason",
"from": "From",
"to": "To",
"sent": "Sent",
"closed": "Closed",
"id": "ID",
"responder": "Responder",
"jobTitle": "Job Title",
"grade": "Grade",
"jobCategory": "Job Category",
"category": "Category",
"employeeEmailAddress": "Employee Email Address",
"payrollBranch": "Payroll Branch",
"yourChangeHasBeenSavedSuccessfully": "Your change has been saved successfully",
"code": "Code",
"unit": "Unit",
"quantity": "Quantity",
"dateRequired": "Date Required",
"lineStatus": "Line Status",
"statusDate": "Status Date",
"transactionType": "Transaction Type",
"operatingUnit": "Operating Unit",
"organizationCode": "Organization Code",
"organization": "Organization",
"fromSubInventory": "From Sub Inventory",
"fromLocator": "From Locator",
"toSubInventory": "To Sub Inventory",
"toLocator": "To Locator",
"shipToLocator": "Ship To Locator",
"itemHistory": "Item History",
"mfg": "MFG",
"lineType": "Line Type",
"price": "Price",
"lineAmount": "Line Amount",
"lineDiscount": "Line Discount %",
"needByDate": "Need By Date",
"promisedDate": "Promised Date",
"deliverToLocation": "Deliver To Location",
"requisitionNumber": "Requisition Number",
"requester": "Requester",
"subject": "Subject",
"quotationAnalysis": "Quotation Analysis",
"description": "Description",
"supplier": "Supplier",
"site": "Site",
"buyer": "Buyer",
"preparer": "Preparer",
"creationDate": "Creation Date",
"shipToLocation": "Ship To Location",
"quotationNumber": "Quotation Number",
"quotationDate": "Quotation Date",
"paymentTerms": "Payment Terms",
"currency": "Currency",
"grossAmount": "Gross Amount",
"discountAmount": "Discount Amount",
"customDuty": "Custom Duty",
"shipHandle": "Ship Handle",
"otherCharges": "Other Charges",
"totalPOAmountWithVAT": "Total PO Amount With VAT",
"totalPOAmountInWords": "Total PO Amount In Words",
"requestNumber": "Request Number",
"uom": "UOM",
"operatingCode": "Operating Code",
"poNumber": "PO Number",
"revision": "Revision",
"quantityOrdered": "Quantity Ordered",
"quantityReceived": "Quantity Received",
"bonusQuantity": "Bonus Quantity",
"purchasePrice": "Purchase Price",
"discountPer": "Discount %",
"balanceQuantity": "Balance Quantity",
"netPrice": "Net Price",
"closureStatus": "Closure Status",
"quotationNetPrice": "Quotation Net Price",
"quotationUOM": "Quotation UOM",
"quotationQty": "Quotation Qty",
"itemCode": "item Code",
"vendorName": "Vendor Name",
"quotationMFGPartNumber": "Quotation MFG Part Number",
"quotationDeliveryDate": "Quotation Delivery Date",
"quotationBonusQuantity": "Quotation Bonus Quantity",
"quotationLineTotal": "Quotation Line Total",
"rfqUOM": "RFQ UOM",
"rfqQty": "RFQ Qty",
"rfqNumber": "RFQ Number",
"msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language",
"clickMe": "Click me",
"human": "Human",
"resources": "Resources",
"details": "Details",
"noDataAvailable": "No Data Available",
"productName": "Product Name",
"productDescription": "Product Description",
"unitPrice": "Unit Price",
"manufacturerName": "Manufacturer Name",
"manufacturerPartName": "Manufacturer Part Name",
"supplierName": "Supplier Name",
"supplierContact": "Supplier Contact",
"chargeToPatient": "Charge To Patient",
"justification": "Justification",
"itemDescription": "Item Description",
"groupCode": "Group Code",
"primaryUOM": "Primary UOM",
"subgroupDescription": "Subgroup Description",
"subgroupCode": "Subgroup Code",
"groupDescription": "Group Description",
"templateName": "Template Name",
"itemCreationStatus": "Item Creation Status",
"standardizationApprovalStatus": "Standardization Approval Status",
"standardizationApprovalRejectionReason": "Standardization Approval Rejection Reason",
"analyzedBy": "Analyzed By",
"approvedDate": "Approved Date",
"itemType": "Item Type",
"relatedTo": "Related To",
"requestDate": "Request Date",
"analyzedDate": "Analyzed Date",
"urgent": "Urgent",
"profile": {
"reset_password": {
"label": "Reset Password",

@ -61,11 +61,150 @@ abstract class LocaleKeys {
static const doNotAddRepeatingLetters = 'doNotAddRepeatingLetters';
static const itShouldContainSpecialCharacter = 'itShouldContainSpecialCharacter';
static const confirmPasswordMustMatch = 'confirmPasswordMustMatch';
static const sms = 'sms';
static const fingerPrint = 'fingerPrint';
static const face = 'face';
static const whatsapp = 'whatsapp';
static const reject = 'reject';
static const approve = 'approve';
static const cancel = 'cancel';
static const requestedItems = 'requestedItems';
static const request = 'request';
static const actions = 'actions';
static const delegate = 'delegate';
static const request_info = 'request_info';
static const attachments = 'attachments';
static const info = 'info';
static const employeeNumber = 'employeeNumber';
static const assignmentNumber = 'assignmentNumber';
static const employeeName = 'employeeName';
static const scheduleDate = 'scheduleDate';
static const shiftType = 'shiftType';
static const shift = 'shift';
static const breakText = 'breakText';
static const actualSwipeStart = 'actualSwipeStart';
static const actualSwipeEnd = 'actualSwipeEnd';
static const approvedSwipeStart = 'approvedSwipeStart';
static const approvedSwipeStartReason = 'approvedSwipeStartReason';
static const approvedSwipeEnd = 'approvedSwipeEnd';
static const approvedSwipeEndReason = 'approvedSwipeEndReason';
static const from = 'from';
static const to = 'to';
static const sent = 'sent';
static const closed = 'closed';
static const id = 'id';
static const responder = 'responder';
static const jobTitle = 'jobTitle';
static const grade = 'grade';
static const jobCategory = 'jobCategory';
static const category = 'category';
static const employeeEmailAddress = 'employeeEmailAddress';
static const payrollBranch = 'payrollBranch';
static const yourChangeHasBeenSavedSuccessfully = 'yourChangeHasBeenSavedSuccessfully';
static const code = 'code';
static const unit = 'unit';
static const quantity = 'quantity';
static const dateRequired = 'dateRequired';
static const lineStatus = 'lineStatus';
static const statusDate = 'statusDate';
static const transactionType = 'transactionType';
static const operatingUnit = 'operatingUnit';
static const organizationCode = 'organizationCode';
static const organization = 'organization';
static const fromSubInventory = 'fromSubInventory';
static const fromLocator = 'fromLocator';
static const toSubInventory = 'toSubInventory';
static const toLocator = 'toLocator';
static const shipToLocator = 'shipToLocator';
static const itemHistory = 'itemHistory';
static const mfg = 'mfg';
static const lineType = 'lineType';
static const price = 'price';
static const lineAmount = 'lineAmount';
static const lineDiscount = 'lineDiscount';
static const needByDate = 'needByDate';
static const promisedDate = 'promisedDate';
static const deliverToLocation = 'deliverToLocation';
static const requisitionNumber = 'requisitionNumber';
static const requester = 'requester';
static const quotationAnalysis = 'quotationAnalysis';
static const subject = 'subject';
static const description = 'description';
static const supplier = 'supplier';
static const site = 'site';
static const buyer = 'buyer';
static const preparer = 'preparer';
static const creationDate = 'creationDate';
static const shipToLocation = 'shipToLocation';
static const quotationNumber = 'quotationNumber';
static const quotationDate = 'quotationDate';
static const paymentTerms = 'paymentTerms';
static const currency = 'currency';
static const grossAmount = 'grossAmount';
static const discountAmount = 'discountAmount';
static const customDuty = 'customDuty';
static const shipHandle = 'shipHandle';
static const otherCharges = 'otherCharges';
static const totalPOAmountWithVAT = 'totalPOAmountWithVAT';
static const totalPOAmountInWords = 'totalPOAmountInWords';
static const requestNumber = 'requestNumber';
static const uom = 'uom';
static const operatingCode = 'operatingCode';
static const poNumber = 'poNumber';
static const revision = 'revision';
static const quantityOrdered = 'quantityOrdered';
static const quantityReceived = 'quantityReceived';
static const bonusQuantity = 'bonusQuantity';
static const purchasePrice = 'purchasePrice';
static const discountPer = 'discountPer';
static const balanceQuantity = 'balanceQuantity';
static const netPrice = 'netPrice';
static const closureStatus = 'closureStatus';
static const quotationNetPrice = 'quotationNetPrice';
static const quotationUOM = 'quotationUOM';
static const quotationQty = 'quotationQty';
static const itemCode = 'itemCode';
static const vendorName = 'vendorName';
static const quotationMFGPartNumber = 'quotationMFGPartNumber';
static const quotationDeliveryDate = 'quotationDeliveryDate';
static const quotationBonusQuantity = 'quotationBonusQuantity';
static const quotationLineTotal = 'quotationLineTotal';
static const rfqUOM = 'rfqUOM';
static const rfqQty = 'rfqQty';
static const rfqNumber = 'rfqNumber';
static const msg = 'msg';
static const msg_named = 'msg_named';
static const clickMe = 'clickMe';
static const human = 'human';
static const resources = 'resources';
static const details = 'details';
static const noDataAvailable = 'noDataAvailable';
static const productName = 'productName';
static const productDescription = 'productDescription';
static const unitPrice = 'unitPrice';
static const manufacturerName = 'manufacturerName';
static const manufacturerPartName = 'manufacturerPartName';
static const supplierName = 'supplierName';
static const supplierContact = 'supplierContact';
static const chargeToPatient = 'chargeToPatient';
static const justification = 'justification';
static const itemDescription = 'itemDescription';
static const groupCode = 'groupCode';
static const primaryUOM = 'primaryUOM';
static const subgroupDescription = 'subgroupDescription';
static const subgroupCode = 'subgroupCode';
static const groupDescription = 'groupDescription';
static const templateName = 'templateName';
static const itemCreationStatus = 'itemCreationStatus';
static const standardizationApprovalStatus = 'standardizationApprovalStatus';
static const standardizationApprovalRejectionReason = 'standardizationApprovalRejectionReason';
static const analyzedBy = 'analyzedBy';
static const approvedDate = 'approvedDate';
static const itemType = 'itemType';
static const relatedTo = 'relatedTo';
static const requestDate = 'requestDate';
static const analyzedDate = 'analyzedDate';
static const urgent = 'urgent';
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';

@ -25,6 +25,9 @@ Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized();
await Firebase.initializeApp();
AppState().setPostParamsModel(
PostParamsModel(channel: 31, versionID: 3.2, mobileType: Platform.isAndroid ? "android" : "ios"),
);
runApp(
EasyLocalization(
supportedLocales: const [
@ -57,12 +60,12 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppProvider(
child: Sizer(
return Sizer(
builder: (context, orientation, deviceType) {
AppState().setPostParamsModel(
PostParamsModel(languageID: EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2, channel: 31, versionID: 3.2, mobileType: Platform.isAndroid ? "android" : "ios"),
);
print(AppState().postParamsObject?.toJson());
var obj = AppState().postParamsObject;
obj?.languageID = EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2;
AppState().setPostParamsModel(obj!);
return MaterialApp(
theme: AppTheme.getTheme(EasyLocalization.of(context)?.locale.languageCode == "ar"),
debugShowCheckedModeBanner: false,
@ -73,7 +76,6 @@ class MyApp extends StatelessWidget {
routes: AppRoutes.routes,
);
},
),
);
}
}

@ -93,7 +93,7 @@ class ItgFormsModel {
dynamic mohemmItgProjectsList;
dynamic mohemmItgTicketTypesList;
DateTime? referenceNumber;
dynamic requestType;
List<RequestType>? requestType;
int? totalCount;
int? statuseCode;
@ -137,7 +137,7 @@ class ItgFormsModel {
mohemmItgProjectsList: json["Mohemm_Itg_ProjectsList"],
mohemmItgTicketTypesList: json["Mohemm_Itg_TicketTypesList"],
referenceNumber: json["ReferenceNumber"] == null ? null : DateTime.parse(json["ReferenceNumber"]),
requestType: json["RequestType"],
requestType: json["RequestType"] == null ? <RequestType>[] : json['RequestType']!.map<RequestType>((v) => RequestType.fromJson(v)).toList(),
totalCount: json["TotalCount"] == null ? null : json["TotalCount"],
statuseCode: json["statuseCode"] == null ? null : json["statuseCode"],
);
@ -182,8 +182,74 @@ class ItgFormsModel {
"Mohemm_Itg_ProjectsList": mohemmItgProjectsList,
"Mohemm_Itg_TicketTypesList": mohemmItgTicketTypesList,
"ReferenceNumber": referenceNumber == null ? null : referenceNumber!.toIso8601String(),
"RequestType": requestType,
"RequestType": requestType == null ? null : requestType!.map((v) => v.toJson()).toList(),
"TotalCount": totalCount == null ? null : totalCount,
"statuseCode": statuseCode == null ? null : statuseCode,
};
}
class RequestType {
int? itemCount;
List<RequestDetails>? requestDetails;
String? requestTypeCode;
String? requestTypeName;
RequestType({this.itemCount, this.requestDetails, this.requestTypeCode, this.requestTypeName});
RequestType.fromJson(Map<String, dynamic> json) {
itemCount = json['ItemCount'];
if (json['RequestDetails'] != null) {
requestDetails = <RequestDetails>[];
json['RequestDetails'].forEach((v) {
requestDetails!.add(new RequestDetails.fromJson(v));
});
}
requestTypeCode = json['RequestTypeCode'];
requestTypeName = json['RequestTypeName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ItemCount'] = this.itemCount;
if (this.requestDetails != null) {
data['RequestDetails'] = this.requestDetails!.map((v) => v.toJson()).toList();
}
data['RequestTypeCode'] = this.requestTypeCode;
data['RequestTypeName'] = this.requestTypeName;
return data;
}
}
class RequestDetails {
int? iD;
int? itemID;
String? listID;
String? listName;
String? modifiedDate;
String? title;
String? uRL;
RequestDetails({this.iD, this.itemID, this.listID, this.listName, this.modifiedDate, this.title, this.uRL});
RequestDetails.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
itemID = json['ItemID'];
listID = json['ListID'];
listName = json['ListName'];
modifiedDate = json['ModifiedDate'];
title = json['Title'];
uRL = json['URL'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['ItemID'] = this.itemID;
data['ListID'] = this.listID;
data['ListName'] = this.listName;
data['ModifiedDate'] = this.modifiedDate;
data['Title'] = this.title;
data['URL'] = this.uRL;
return data;
}
}

@ -1,13 +1,30 @@
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_attachement_list_model.dart';
import 'package:mohem_flutter_app/models/get_basic_det_ntf_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_item_creation_ntf_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_mo_Item_history_list_model.dart';
import 'package:mohem_flutter_app/models/get_mo_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_notification_buttons_list_model.dart';
import 'package:mohem_flutter_app/models/get_po_Item_history_list_model.dart';
import 'package:mohem_flutter_app/models/get_po_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_quotation_analysis_list_model.dart';
import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/member_login_list_model.dart';
import 'package:mohem_flutter_app/models/notification_action_model.dart';
import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.dart';
import 'package:mohem_flutter_app/models/subordinates_on_leaves_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import 'basic_member_information_model.dart';
import 'get_mobile_login_info_list_model.dart';
import 'dashboard/get_accrual_balances_list_model.dart';
import 'dashboard/get_attendance_tracking_list_model.dart';
import 'dashboard/get_open_missing_swipes_list_model.dart';
import 'dashboard/get_open_notifications_list.dart';
import 'dashboard/list_menu.dart';
import 'dashboard/menu_entries.dart';
import 'get_mobile_login_info_list_model.dart';
import 'member_information_list_model.dart';
import 'privilege_list_model.dart';
@ -61,19 +78,19 @@ class GenericResponseModel {
String? forgetPasswordTokenID;
List<String>? getAbsenceAttachmentsList;
List<String>? getAbsenceAttendanceTypesList;
List<String>? getAbsenceCollectionNotificationBodyList;
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotificationBodyList;
List<String>? getAbsenceDffStructureList;
List<String>? getAbsenceTransactionList;
List<GetAccrualBalancesList>? getAccrualBalancesList;
List<String>? getActionHistoryList;
List<GetActionHistoryList>? getActionHistoryList;
List<String>? getAddressDffStructureList;
List<String>? getAddressNotificationBodyList;
List<String>? getApprovesList;
List<String>? getAttachementList;
List<GetAttachementList>? getAttachementList;
GetAttendanceTracking? getAttendanceTrackingList;
List<String>? getBasicDetColsStructureList;
List<String>? getBasicDetDffStructureList;
List<String>? getBasicDetNtfBodyList;
List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList;
List<String>? getCEICollectionNotificationBodyList;
List<String>? getCEIDFFStructureList;
List<String>? getCEITransactionList;
@ -102,14 +119,14 @@ class GenericResponseModel {
List<String>? getFliexfieldStructureList;
List<String>? getHrCollectionNotificationBodyList;
List<String>? getHrTransactionList;
List<String>? getItemCreationNtfBodyList;
GetItemCreationNtfBodyList? getItemCreationNtfBodyList;
List<String>? getItemTypeNotificationsList;
List<String>? getItemTypesList;
List<String>? getLookupValuesList;
List<GetMenuEntriesList>? getMenuEntriesList;
List<String>? getMoItemHistoryList;
List<String>? getMoNotificationBodyList;
List<String>? getNotificationButtonsList;
List<GetMoItemHistoryList>? getMoItemHistoryList;
List<GetMoNotificationBodyList>? getMoNotificationBodyList;
List<GetNotificationButtonsList>? getNotificationButtonsList;
List<String>? getNotificationReassignModeList;
List<String>? getObjectValuesList;
GetOpenMissingSwipesList? getOpenMissingSwipesList;
@ -123,10 +140,10 @@ class GenericResponseModel {
List<String>? getPendingReqFunctionsList;
List<String>? getPerformanceAppraisalList;
List<String>? getPhonesNotificationBodyList;
List<String>? getPoItemHistoryList;
List<String>? getPoNotificationBodyList;
List<GetPoItemHistoryList>? getPoItemHistoryList;
GetPoNotificationBodyList? getPoNotificationBodyList;
List<String>? getPrNotificationBodyList;
List<String>? getQuotationAnalysisList;
List<GetQuotationAnalysisList>? getQuotationAnalysisList;
List<String>? getRFCEmployeeListList;
List<String>? getRespondAttributeValueList;
List<String>? getSITCollectionNotificationBodyList;
@ -134,10 +151,10 @@ class GenericResponseModel {
List<String>? getSITTransactionList;
List<String>? getScheduleShiftsDetailsList;
List<String>? getShiftTypesList;
List<String>? getStampMsNotificationBodyList;
List<String>? getStampNsNotificationBodyList;
List<GetStampMsNotificationBodyList>? getStampMsNotificationBodyList;
List<GetStampNsNotificationBodyList>? getStampNsNotificationBodyList;
List<String>? getSubordinatesAttdStatusList;
List<String>? getSubordinatesLeavesList;
List<SubordinatesLeavesList>? getSubordinatesLeavesList;
List<String>? getSubordinatesLeavesTotalVacationsList;
List<String>? getSummaryOfPaymentList;
List<String>? getSwipesList;
@ -150,7 +167,7 @@ class GenericResponseModel {
List<String>? getVaccinationOnHandList;
List<String>? getVaccinationsList;
List<String>? getValueSetValuesList;
List<String>? getWorkList;
List<WorkListResponseModel>? getWorkList;
String? hRCertificateTemplate;
String? imgURLsList;
String? insertApInv;
@ -188,16 +205,16 @@ class GenericResponseModel {
bool? mohemmIsInsertBusinessCardEnable;
String? mohemmWifiPassword;
String? mohemmWifiSSID;
String? notificationAction;
String? notificationGetRespondAttributesList;
String? notificationRespondRolesList;
NotificationAction? notificationAction;
List<NotificationGetRespondAttributesList>? notificationGetRespondAttributesList;
List<String>? notificationRespondRolesList;
int? oracleOutPutNumber;
String? pASSWORDEXPIREDMSG;
String? pCOUNTRYCODE;
String? pCOUNTRYNAME;
String? pDESCFLEXCONTEXTCODE;
String? pDESCFLEXCONTEXTNAME;
Null? pForm;
String? pForm;
String? pINFORMATION;
int? pMBLID;
String? pNUMOFSUBORDINATES;
@ -238,7 +255,7 @@ class GenericResponseModel {
String? submitPhonesTransactionList;
String? submitSITTransactionList;
String? submitTermTransactionList;
String? subordinatesOnLeavesList;
List<SubordinatesLeavesList>? subordinatesOnLeavesList;
String? sumbitAbsenceTransactionList;
String? tokenID;
String? updateAttachmentList;
@ -567,19 +584,46 @@ class GenericResponseModel {
forgetPasswordTokenID = json['ForgetPasswordTokenID'];
getAbsenceAttachmentsList = json['GetAbsenceAttachmentsList'];
getAbsenceAttendanceTypesList = json['GetAbsenceAttendanceTypesList'];
getAbsenceCollectionNotificationBodyList = json['GetAbsenceCollectionNotificationBodyList'];
if (json['GetAbsenceCollectionNotificationBodyList'] != null) {
getAbsenceCollectionNotificationBodyList = <GetAbsenceCollectionNotificationBodyList>[];
json['GetAbsenceCollectionNotificationBodyList'].forEach((v) {
getAbsenceCollectionNotificationBodyList!.add(new GetAbsenceCollectionNotificationBodyList.fromJson(v));
});
}
getAbsenceDffStructureList = json['GetAbsenceDffStructureList'];
getAbsenceTransactionList = json['GetAbsenceTransactionList'];
getAccrualBalancesList = json["GetAccrualBalancesList"] == null ? null : List<GetAccrualBalancesList>.from(json["GetAccrualBalancesList"].map((x) => GetAccrualBalancesList.fromJson(x)));
getActionHistoryList = json['GetActionHistoryList'];
if (json['GetActionHistoryList'] != null) {
getActionHistoryList = <GetActionHistoryList>[];
json['GetActionHistoryList'].forEach((v) {
getActionHistoryList!.add(GetActionHistoryList.fromJson(v));
});
}
getAddressDffStructureList = json['GetAddressDffStructureList'];
getAddressNotificationBodyList = json['GetAddressNotificationBodyList'];
getApprovesList = json['GetApprovesList'];
getAttachementList = json['GetAttachementList'];
if (json['GetAttachementList'] != null) {
getAttachementList = <GetAttachementList>[];
json['GetAttachementList'].forEach((v) {
getAttachementList!.add(new GetAttachementList.fromJson(v));
});
}
getAttendanceTrackingList = json["GetAttendanceTrackingList"] == null ? null : GetAttendanceTracking.fromMap(json["GetAttendanceTrackingList"]);
getBasicDetColsStructureList = json['GetBasicDetColsStructureList'];
getBasicDetDffStructureList = json['GetBasicDetDffStructureList'];
getBasicDetNtfBodyList = json['GetBasicDetNtfBodyList'];
if (json['GetBasicDetNtfBodyList'] != null) {
getBasicDetNtfBodyList = <GetBasicDetNtfBodyList>[];
json['GetBasicDetNtfBodyList'].forEach((v) {
getBasicDetNtfBodyList!.add(new GetBasicDetNtfBodyList.fromJson(v));
});
}
getCEICollectionNotificationBodyList = json['GetCEICollectionNotificationBodyList'];
getCEIDFFStructureList = json['GetCEIDFFStructureList'];
getCEITransactionList = json['GetCEITransactionList'];
@ -608,14 +652,34 @@ class GenericResponseModel {
getFliexfieldStructureList = json['GetFliexfieldStructureList'];
getHrCollectionNotificationBodyList = json['GetHrCollectionNotificationBodyList'];
getHrTransactionList = json['GetHrTransactionList'];
getItemCreationNtfBodyList = json['GetItemCreationNtfBodyList'];
getItemCreationNtfBodyList = json['GetItemCreationNtfBodyList'] != null ? new GetItemCreationNtfBodyList.fromJson(json['GetItemCreationNtfBodyList']) : null;
getItemTypeNotificationsList = json['GetItemTypeNotificationsList'];
getItemTypesList = json['GetItemTypesList'];
getLookupValuesList = json['GetLookupValuesList'];
getMenuEntriesList = json["GetMenuEntriesList"] == null ? null : List<GetMenuEntriesList>.from(json["GetMenuEntriesList"].map((x) => GetMenuEntriesList.fromJson(x)));
getMoItemHistoryList = json['GetMoItemHistoryList'];
getMoNotificationBodyList = json['GetMoNotificationBodyList'];
getNotificationButtonsList = json['GetNotificationButtonsList'];
if (json['GetMoItemHistoryList'] != null) {
getMoItemHistoryList = <GetMoItemHistoryList>[];
json['GetMoItemHistoryList'].forEach((v) {
getMoItemHistoryList!.add(new GetMoItemHistoryList.fromJson(v));
});
}
if (json['GetMoNotificationBodyList'] != null) {
getMoNotificationBodyList = <GetMoNotificationBodyList>[];
json['GetMoNotificationBodyList'].forEach((v) {
getMoNotificationBodyList!.add(new GetMoNotificationBodyList.fromJson(v));
});
}
if (json['GetNotificationButtonsList'] != null) {
getNotificationButtonsList = <GetNotificationButtonsList>[];
json['GetNotificationButtonsList'].forEach((v) {
getNotificationButtonsList!.add(new GetNotificationButtonsList.fromJson(v));
});
}
getNotificationReassignModeList = json['GetNotificationReassignModeList'];
getObjectValuesList = json['GetObjectValuesList'];
getOpenMissingSwipesList = json["GetOpenMissingSwipesList"] == null ? null : GetOpenMissingSwipesList.fromJson(json["GetOpenMissingSwipesList"]);
@ -629,10 +693,20 @@ class GenericResponseModel {
getPendingReqFunctionsList = json['GetPendingReqFunctionsList'];
getPerformanceAppraisalList = json['GetPerformanceAppraisalList'];
getPhonesNotificationBodyList = json['GetPhonesNotificationBodyList'];
getPoItemHistoryList = json['GetPoItemHistoryList'];
getPoNotificationBodyList = json['GetPoNotificationBodyList'];
if (json['GetPoItemHistoryList'] != null) {
getPoItemHistoryList = <GetPoItemHistoryList>[];
json['GetPoItemHistoryList'].forEach((v) {
getPoItemHistoryList!.add(new GetPoItemHistoryList.fromJson(v));
});
}
getPoNotificationBodyList = json['GetPoNotificationBodyList'] != null ? new GetPoNotificationBodyList.fromJson(json['GetPoNotificationBodyList']) : null;
getPrNotificationBodyList = json['GetPrNotificationBodyList'];
getQuotationAnalysisList = json['GetQuotationAnalysisList'];
if (json['GetQuotationAnalysisList'] != null) {
getQuotationAnalysisList = <GetQuotationAnalysisList>[];
json['GetQuotationAnalysisList'].forEach((v) {
getQuotationAnalysisList!.add(new GetQuotationAnalysisList.fromJson(v));
});
}
getRFCEmployeeListList = json['GetRFCEmployeeListList'];
getRespondAttributeValueList = json['GetRespondAttributeValueList'];
getSITCollectionNotificationBodyList = json['GetSITCollectionNotificationBodyList'];
@ -640,10 +714,29 @@ class GenericResponseModel {
getSITTransactionList = json['GetSITTransactionList'];
getScheduleShiftsDetailsList = json['GetScheduleShiftsDetailsList'];
getShiftTypesList = json['GetShiftTypesList'];
getStampMsNotificationBodyList = json['GetStampMsNotificationBodyList'];
getStampNsNotificationBodyList = json['GetStampNsNotificationBodyList'];
if (json['GetStampMsNotificationBodyList'] != null) {
getStampMsNotificationBodyList = <GetStampMsNotificationBodyList>[];
json['GetStampMsNotificationBodyList'].forEach((v) {
getStampMsNotificationBodyList!.add(new GetStampMsNotificationBodyList.fromJson(v));
});
}
if (json['GetStampNsNotificationBodyList'] != null) {
getStampNsNotificationBodyList = <GetStampNsNotificationBodyList>[];
json['GetStampNsNotificationBodyList'].forEach((v) {
getStampNsNotificationBodyList!.add(new GetStampNsNotificationBodyList.fromJson(v));
});
}
getSubordinatesAttdStatusList = json['GetSubordinatesAttdStatusList'];
getSubordinatesLeavesList = json['GetSubordinatesLeavesList'];
if (json['GetSubordinatesLeavesList'] != null) {
getSubordinatesLeavesList = <SubordinatesLeavesList>[];
json['GetSubordinatesLeavesList'].forEach((v) {
getSubordinatesLeavesList!.add(SubordinatesLeavesList.fromJson(v));
});
}
getSubordinatesLeavesTotalVacationsList = json['GetSubordinatesLeavesTotalVacationsList'];
getSummaryOfPaymentList = json['GetSummaryOfPaymentList'];
getSwipesList = json['GetSwipesList'];
@ -656,7 +749,14 @@ class GenericResponseModel {
getVaccinationOnHandList = json['GetVaccinationOnHandList'];
getVaccinationsList = json['GetVaccinationsList'];
getValueSetValuesList = json['GetValueSetValuesList'];
getWorkList = json['GetWorkList'];
if (json['GetWorkList'] != null) {
getWorkList = <WorkListResponseModel>[];
json['GetWorkList'].forEach((v) {
getWorkList!.add(WorkListResponseModel.fromJson(v));
});
}
hRCertificateTemplate = json['HRCertificateTemplate'];
imgURLsList = json['ImgURLsList'];
insertApInv = json['InsertApInv'];
@ -695,7 +795,7 @@ class GenericResponseModel {
if (json['Mohemm_GetMobileLoginInfoList'] != null) {
mohemmGetMobileLoginInfoList = <GetMobileLoginInfoListModel>[];
json['Mohemm_GetMobileLoginInfoList'].forEach((v) {
mohemmGetMobileLoginInfoList!.add(new GetMobileLoginInfoListModel.fromJson(v));
mohemmGetMobileLoginInfoList!.add(GetMobileLoginInfoListModel.fromJson(v));
});
}
mohemmGetPatientIDList = json['Mohemm_GetPatientID_List'];
@ -704,9 +804,21 @@ class GenericResponseModel {
mohemmIsInsertBusinessCardEnable = json['Mohemm_IsInsertBusinessCardEnable'];
mohemmWifiPassword = json['Mohemm_Wifi_Password'];
mohemmWifiSSID = json['Mohemm_Wifi_SSID'];
notificationAction = json['NotificationAction'];
notificationGetRespondAttributesList = json['NotificationGetRespondAttributesList'];
notificationRespondRolesList = json['NotificationRespondRolesList'];
notificationAction = json['NotificationAction'] != null ? NotificationAction.fromJson(json['NotificationAction']) : null;
if (json['NotificationGetRespondAttributesList'] != null) {
notificationGetRespondAttributesList = <NotificationGetRespondAttributesList>[];
json['NotificationGetRespondAttributesList'].forEach((v) {
notificationGetRespondAttributesList!.add(NotificationGetRespondAttributesList.fromJson(v));
});
}
if (json['NotificationRespondRolesList'] != null) {
notificationRespondRolesList = <String>[];
json['NotificationGetRespondAttributesList'].forEach((v) {
// notificationRespondRolesList!.add(v);
});
}
oracleOutPutNumber = json['OracleOutPutNumber'];
pASSWORDEXPIREDMSG = json['PASSWORD_EXPIRED_MSG'];
pCOUNTRYCODE = json['P_COUNTRY_CODE'];
@ -761,7 +873,14 @@ class GenericResponseModel {
submitPhonesTransactionList = json['SubmitPhonesTransactionList'];
submitSITTransactionList = json['SubmitSITTransactionList'];
submitTermTransactionList = json['SubmitTermTransactionList'];
subordinatesOnLeavesList = json['SubordinatesOnLeavesList'];
if (json['SubordinatesOnLeavesList'] != null) {
subordinatesOnLeavesList = <SubordinatesLeavesList>[];
json['GetSubordinatesLeavesList'].forEach((v) {
subordinatesOnLeavesList!.add(SubordinatesLeavesList.fromJson(v));
});
}
sumbitAbsenceTransactionList = json['SumbitAbsenceTransactionList'];
tokenID = json['TokenID'];
updateAttachmentList = json['UpdateAttachmentList'];
@ -841,19 +960,35 @@ class GenericResponseModel {
data['ForgetPasswordTokenID'] = this.forgetPasswordTokenID;
data['GetAbsenceAttachmentsList'] = this.getAbsenceAttachmentsList;
data['GetAbsenceAttendanceTypesList'] = this.getAbsenceAttendanceTypesList;
data['GetAbsenceCollectionNotificationBodyList'] = this.getAbsenceCollectionNotificationBodyList;
if (this.getAbsenceCollectionNotificationBodyList != null) {
data['GetAbsenceCollectionNotificationBodyList'] = this.getAbsenceCollectionNotificationBodyList!.map((v) => v.toJson()).toList();
}
data['GetAbsenceDffStructureList'] = this.getAbsenceDffStructureList;
data['GetAbsenceTransactionList'] = this.getAbsenceTransactionList;
data['GetAccrualBalancesList'] = this.getAccrualBalancesList;
data['GetActionHistoryList'] = this.getActionHistoryList;
if (this.getActionHistoryList != null) {
data['GetActionHistoryList'] = this.getActionHistoryList!.map((v) => v.toJson()).toList();
}
data['GetAddressDffStructureList'] = this.getAddressDffStructureList;
data['GetAddressNotificationBodyList'] = this.getAddressNotificationBodyList;
data['GetApprovesList'] = this.getApprovesList;
data['GetAttachementList'] = this.getAttachementList;
if (this.getAttachementList != null) {
data['GetAttachementList'] = this.getAttachementList!.map((v) => v.toJson()).toList();
}
data['GetAttendanceTrackingList'] = this.getAttendanceTrackingList;
data['GetBasicDetColsStructureList'] = this.getBasicDetColsStructureList;
data['GetBasicDetDffStructureList'] = this.getBasicDetDffStructureList;
data['GetBasicDetNtfBodyList'] = this.getBasicDetNtfBodyList;
if (this.getBasicDetNtfBodyList != null) {
data['GetBasicDetNtfBodyList'] = this.getBasicDetNtfBodyList!.map((v) => v.toJson()).toList();
}
data['GetCEICollectionNotificationBodyList'] = this.getCEICollectionNotificationBodyList;
data['GetCEIDFFStructureList'] = this.getCEIDFFStructureList;
data['GetCEITransactionList'] = this.getCEITransactionList;
@ -882,14 +1017,27 @@ class GenericResponseModel {
data['GetFliexfieldStructureList'] = this.getFliexfieldStructureList;
data['GetHrCollectionNotificationBodyList'] = this.getHrCollectionNotificationBodyList;
data['GetHrTransactionList'] = this.getHrTransactionList;
data['GetItemCreationNtfBodyList'] = this.getItemCreationNtfBodyList;
if (this.getItemCreationNtfBodyList != null) {
data['GetItemCreationNtfBodyList'] = this.getItemCreationNtfBodyList!.toJson();
}
data['GetItemTypeNotificationsList'] = this.getItemTypeNotificationsList;
data['GetItemTypesList'] = this.getItemTypesList;
data['GetLookupValuesList'] = this.getLookupValuesList;
data['GetMenuEntriesList'] = this.getMenuEntriesList;
data['GetMoItemHistoryList'] = this.getMoItemHistoryList;
data['GetMoNotificationBodyList'] = this.getMoNotificationBodyList;
data['GetNotificationButtonsList'] = this.getNotificationButtonsList;
if (this.getMoItemHistoryList != null) {
data['GetMoItemHistoryList'] = this.getMoItemHistoryList!.map((v) => v.toJson()).toList();
}
if (this.getMoNotificationBodyList != null) {
data['GetMoNotificationBodyList'] = this.getMoNotificationBodyList!.map((v) => v.toJson()).toList();
}
if (this.getNotificationButtonsList != null) {
data['GetNotificationButtonsList'] = this.getNotificationButtonsList!.map((v) => v.toJson()).toList();
}
data['GetNotificationReassignModeList'] = this.getNotificationReassignModeList;
data['GetObjectValuesList'] = this.getObjectValuesList;
data['GetOpenMissingSwipesList'] = this.getOpenMissingSwipesList;
@ -903,10 +1051,17 @@ class GenericResponseModel {
data['GetPendingReqFunctionsList'] = this.getPendingReqFunctionsList;
data['GetPerformanceAppraisalList'] = this.getPerformanceAppraisalList;
data['GetPhonesNotificationBodyList'] = this.getPhonesNotificationBodyList;
data['GetPoItemHistoryList'] = this.getPoItemHistoryList;
data['GetPoNotificationBodyList'] = this.getPoNotificationBodyList;
if (this.getPoItemHistoryList != null) {
data['GetPoItemHistoryList'] = this.getPoItemHistoryList!.map((v) => v.toJson()).toList();
}
if (this.getPoNotificationBodyList != null) {
data['GetPoNotificationBodyList'] = this.getPoNotificationBodyList!.toJson();
}
data['GetPrNotificationBodyList'] = this.getPrNotificationBodyList;
data['GetQuotationAnalysisList'] = this.getQuotationAnalysisList;
if (this.getQuotationAnalysisList != null) {
data['GetQuotationAnalysisList'] = this.getQuotationAnalysisList!.map((v) => v.toJson()).toList();
}
data['GetRFCEmployeeListList'] = this.getRFCEmployeeListList;
data['GetRespondAttributeValueList'] = this.getRespondAttributeValueList;
data['GetSITCollectionNotificationBodyList'] = this.getSITCollectionNotificationBodyList;
@ -914,10 +1069,23 @@ class GenericResponseModel {
data['GetSITTransactionList'] = this.getSITTransactionList;
data['GetScheduleShiftsDetailsList'] = this.getScheduleShiftsDetailsList;
data['GetShiftTypesList'] = this.getShiftTypesList;
data['GetStampMsNotificationBodyList'] = this.getStampMsNotificationBodyList;
if (this.getStampMsNotificationBodyList != null) {
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;
data['GetSubordinatesAttdStatusList'] = this.getSubordinatesAttdStatusList;
data['GetSubordinatesLeavesList'] = this.getSubordinatesLeavesList;
if (this.getSubordinatesLeavesList != null) {
data['GetSubordinatesLeavesList'] = this.getSubordinatesLeavesList!.map((v) => v.toJson()).toList();
}
data['GetSubordinatesLeavesTotalVacationsList'] = this.getSubordinatesLeavesTotalVacationsList;
data['GetSummaryOfPaymentList'] = this.getSummaryOfPaymentList;
data['GetSwipesList'] = this.getSwipesList;
@ -930,7 +1098,11 @@ class GenericResponseModel {
data['GetVaccinationOnHandList'] = this.getVaccinationOnHandList;
data['GetVaccinationsList'] = this.getVaccinationsList;
data['GetValueSetValuesList'] = this.getValueSetValuesList;
data['GetWorkList'] = this.getWorkList;
if (getWorkList != null) {
data['GetWorkList'] = getWorkList!.map((v) => v.toJson()).toList();
}
data['HRCertificateTemplate'] = this.hRCertificateTemplate;
data['ImgURLsList'] = this.imgURLsList;
data['InsertApInv'] = this.insertApInv;
@ -972,9 +1144,19 @@ class GenericResponseModel {
data['Mohemm_IsInsertBusinessCardEnable'] = this.mohemmIsInsertBusinessCardEnable;
data['Mohemm_Wifi_Password'] = this.mohemmWifiPassword;
data['Mohemm_Wifi_SSID'] = this.mohemmWifiSSID;
data['NotificationAction'] = this.notificationAction;
data['NotificationGetRespondAttributesList'] = this.notificationGetRespondAttributesList;
data['NotificationRespondRolesList'] = this.notificationRespondRolesList;
if (this.notificationAction != null) {
data['NotificationAction'] = this.notificationAction!.toJson();
}
if (notificationGetRespondAttributesList != null) {
data['NotificationGetRespondAttributesList'] = notificationGetRespondAttributesList!.map((v) => v.toJson()).toList();
}
if (notificationRespondRolesList != null) {
data['NotificationRespondRolesList'] = notificationRespondRolesList!.map((v) => v).toList();
}
data['OracleOutPutNumber'] = this.oracleOutPutNumber;
data['PASSWORD_EXPIRED_MSG'] = this.pASSWORDEXPIREDMSG;
data['P_COUNTRY_CODE'] = this.pCOUNTRYCODE;
@ -1025,6 +1207,11 @@ class GenericResponseModel {
data['SubmitSITTransactionList'] = this.submitSITTransactionList;
data['SubmitTermTransactionList'] = this.submitTermTransactionList;
data['SubordinatesOnLeavesList'] = this.subordinatesOnLeavesList;
if (this.subordinatesOnLeavesList != null) {
data['SubordinatesOnLeavesList'] = this.subordinatesOnLeavesList!.map((v) => v.toJson()).toList();
}
data['SumbitAbsenceTransactionList'] = this.sumbitAbsenceTransactionList;
data['TokenID'] = this.tokenID;
data['UpdateAttachmentList'] = this.updateAttachmentList;

@ -0,0 +1,97 @@
class GetAbsenceCollectionNotificationBodyList {
List<CollectionNotification>? collectionNotification;
GetAbsenceCollectionNotificationBodyList({this.collectionNotification});
GetAbsenceCollectionNotificationBodyList.fromJson(Map<String, dynamic> json) {
if (json['Collection_Notification'] != null) {
collectionNotification = <CollectionNotification>[];
json['Collection_Notification'].forEach((v) {
collectionNotification!.add(new CollectionNotification.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.collectionNotification != null) {
data['Collection_Notification'] =
this.collectionNotification!.map((v) => v.toJson()).toList();
}
return data;
}
}
class CollectionNotification {
String? aCTION;
String? aPPLICATIONCOLUMNNAME;
String? dATATYPE;
String? dATEVALUE;
String? dESCFLEXCONTEXTCODE;
String? dESCFLEXNAME;
String? dISPLAYFLAG;
int? nUMBERVALUE;
String? pREVSEGMENTVALUEDSP;
String? sEGMENTNAME;
String? sEGMENTPROMPT;
int? sEGMENTSEQNUM;
String? sEGMENTVALUEDSP;
int? tRANSACTIONNUMBER;
String? vARCHAR2VALUE;
CollectionNotification(
{this.aCTION,
this.aPPLICATIONCOLUMNNAME,
this.dATATYPE,
this.dATEVALUE,
this.dESCFLEXCONTEXTCODE,
this.dESCFLEXNAME,
this.dISPLAYFLAG,
this.nUMBERVALUE,
this.pREVSEGMENTVALUEDSP,
this.sEGMENTNAME,
this.sEGMENTPROMPT,
this.sEGMENTSEQNUM,
this.sEGMENTVALUEDSP,
this.tRANSACTIONNUMBER,
this.vARCHAR2VALUE});
CollectionNotification.fromJson(Map<String, dynamic> json) {
aCTION = json['ACTION'];
aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME'];
dATATYPE = json['DATATYPE'];
dATEVALUE = json['DATE_VALUE'];
dESCFLEXCONTEXTCODE = json['DESC_FLEX_CONTEXT_CODE'];
dESCFLEXNAME = json['DESC_FLEX_NAME'];
dISPLAYFLAG = json['DISPLAY_FLAG'];
nUMBERVALUE = json['NUMBER_VALUE'];
pREVSEGMENTVALUEDSP = json['PREV_SEGMENT_VALUE_DSP'];
sEGMENTNAME = json['SEGMENT_NAME'];
sEGMENTPROMPT = json['SEGMENT_PROMPT'];
sEGMENTSEQNUM = json['SEGMENT_SEQ_NUM'];
sEGMENTVALUEDSP = json['SEGMENT_VALUE_DSP'];
tRANSACTIONNUMBER = json['TRANSACTION_NUMBER'];
vARCHAR2VALUE = json['VARCHAR2_VALUE'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ACTION'] = this.aCTION;
data['APPLICATION_COLUMN_NAME'] = this.aPPLICATIONCOLUMNNAME;
data['DATATYPE'] = this.dATATYPE;
data['DATE_VALUE'] = this.dATEVALUE;
data['DESC_FLEX_CONTEXT_CODE'] = this.dESCFLEXCONTEXTCODE;
data['DESC_FLEX_NAME'] = this.dESCFLEXNAME;
data['DISPLAY_FLAG'] = this.dISPLAYFLAG;
data['NUMBER_VALUE'] = this.nUMBERVALUE;
data['PREV_SEGMENT_VALUE_DSP'] = this.pREVSEGMENTVALUEDSP;
data['SEGMENT_NAME'] = this.sEGMENTNAME;
data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT;
data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM;
data['SEGMENT_VALUE_DSP'] = this.sEGMENTVALUEDSP;
data['TRANSACTION_NUMBER'] = this.tRANSACTIONNUMBER;
data['VARCHAR2_VALUE'] = this.vARCHAR2VALUE;
return data;
}
}

@ -0,0 +1,76 @@
class GetActionHistoryList {
String? aCTION;
String? aCTIONCODE;
String? eMAILADDRESS;
String? eMPLOYEEIMAGE;
int? fROMROWNUM;
bool? isFavorite;
String? nAME;
String? nOTE;
String? nOTIFICATIONDATE;
int? nOTIFICATIONID;
int? nOOFROWS;
String? pOSITIONTITLE;
int? rOWNUM;
int? sEQUENCE;
int? tOROWNUM;
String? uSERNAME;
GetActionHistoryList(
{this.aCTION,
this.aCTIONCODE,
this.eMAILADDRESS,
this.eMPLOYEEIMAGE,
this.fROMROWNUM,
this.isFavorite,
this.nAME,
this.nOTE,
this.nOTIFICATIONDATE,
this.nOTIFICATIONID,
this.nOOFROWS,
this.pOSITIONTITLE,
this.rOWNUM,
this.sEQUENCE,
this.tOROWNUM,
this.uSERNAME});
GetActionHistoryList.fromJson(Map<String, dynamic> json) {
aCTION = json['ACTION'];
aCTIONCODE = json['ACTION_CODE'];
eMAILADDRESS = json['EMAIL_ADDRESS'];
eMPLOYEEIMAGE = json['EMPLOYEE_IMAGE'];
fROMROWNUM = json['FROM_ROW_NUM'];
isFavorite = json['IsFavorite'];
nAME = json['NAME'];
nOTE = json['NOTE'];
nOTIFICATIONDATE = json['NOTIFICATION_DATE'];
nOTIFICATIONID = json['NOTIFICATION_ID'];
nOOFROWS = json['NO_OF_ROWS'];
pOSITIONTITLE = json['POSITION_TITLE'];
rOWNUM = json['ROW_NUM'];
sEQUENCE = json['SEQUENCE'];
tOROWNUM = json['TO_ROW_NUM'];
uSERNAME = json['USER_NAME'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ACTION'] = this.aCTION;
data['ACTION_CODE'] = this.aCTIONCODE;
data['EMAIL_ADDRESS'] = this.eMAILADDRESS;
data['EMPLOYEE_IMAGE'] = this.eMPLOYEEIMAGE;
data['FROM_ROW_NUM'] = this.fROMROWNUM;
data['IsFavorite'] = this.isFavorite;
data['NAME'] = this.nAME;
data['NOTE'] = this.nOTE;
data['NOTIFICATION_DATE'] = this.nOTIFICATIONDATE;
data['NOTIFICATION_ID'] = this.nOTIFICATIONID;
data['NO_OF_ROWS'] = this.nOOFROWS;
data['POSITION_TITLE'] = this.pOSITIONTITLE;
data['ROW_NUM'] = this.rOWNUM;
data['SEQUENCE'] = this.sEQUENCE;
data['TO_ROW_NUM'] = this.tOROWNUM;
data['USER_NAME'] = this.uSERNAME;
return data;
}
}

@ -0,0 +1,72 @@
class GetAttachementList {
int? aTTACHEDDOCUMENTID;
int? cATEGORYID;
int? dATATYPEID;
int? dOCUMENTID;
String? eNTITYNAME;
String? fILECONTENTTYPE;
String? fILEDATA;
int? fILEID;
String? fILENAME;
String? pK1VALUE;
String? pK2VALUE;
String? pK3VALUE;
String? pK4VALUE;
String? pK5VALUE;
int? sEQNUM;
GetAttachementList(
{this.aTTACHEDDOCUMENTID,
this.cATEGORYID,
this.dATATYPEID,
this.dOCUMENTID,
this.eNTITYNAME,
this.fILECONTENTTYPE,
this.fILEDATA,
this.fILEID,
this.fILENAME,
this.pK1VALUE,
this.pK2VALUE,
this.pK3VALUE,
this.pK4VALUE,
this.pK5VALUE,
this.sEQNUM});
GetAttachementList.fromJson(Map<String, dynamic> json) {
aTTACHEDDOCUMENTID = json['ATTACHED_DOCUMENT_ID'];
cATEGORYID = json['CATEGORY_ID'];
dATATYPEID = json['DATATYPE_ID'];
dOCUMENTID = json['DOCUMENT_ID'];
eNTITYNAME = json['ENTITY_NAME'];
fILECONTENTTYPE = json['FILE_CONTENT_TYPE'];
fILEDATA = json['FILE_DATA'];
fILEID = json['FILE_ID'];
fILENAME = json['FILE_NAME'];
pK1VALUE = json['PK1_VALUE'];
pK2VALUE = json['PK2_VALUE'];
pK3VALUE = json['PK3_VALUE'];
pK4VALUE = json['PK4_VALUE'];
pK5VALUE = json['PK5_VALUE'];
sEQNUM = json['SEQ_NUM'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ATTACHED_DOCUMENT_ID'] = this.aTTACHEDDOCUMENTID;
data['CATEGORY_ID'] = this.cATEGORYID;
data['DATATYPE_ID'] = this.dATATYPEID;
data['DOCUMENT_ID'] = this.dOCUMENTID;
data['ENTITY_NAME'] = this.eNTITYNAME;
data['FILE_CONTENT_TYPE'] = this.fILECONTENTTYPE;
data['FILE_DATA'] = this.fILEDATA;
data['FILE_ID'] = this.fILEID;
data['FILE_NAME'] = this.fILENAME;
data['PK1_VALUE'] = this.pK1VALUE;
data['PK2_VALUE'] = this.pK2VALUE;
data['PK3_VALUE'] = this.pK3VALUE;
data['PK4_VALUE'] = this.pK4VALUE;
data['PK5_VALUE'] = this.pK5VALUE;
data['SEQ_NUM'] = this.sEQNUM;
return data;
}
}

@ -0,0 +1,24 @@
class GetBasicDetNtfBodyList {
String? prevSegmentValueDsp;
String? segmentPrompt;
String? segmentValueDsp;
String? updatedFlag;
GetBasicDetNtfBodyList({this.prevSegmentValueDsp, this.segmentPrompt, this.segmentValueDsp, this.updatedFlag});
GetBasicDetNtfBodyList.fromJson(Map<String, dynamic> json) {
prevSegmentValueDsp = json['PREV_SEGMENT_VALUE_DSP'];
segmentPrompt = json['SEGMENT_PROMPT'];
segmentValueDsp = json['SEGMENT_VALUE_DSP'];
updatedFlag = json['UPDATED_FLAG'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PREV_SEGMENT_VALUE_DSP'] = this.prevSegmentValueDsp;
data['SEGMENT_PROMPT'] = this.segmentPrompt;
data['SEGMENT_VALUE_DSP'] = this.segmentValueDsp;
data['UPDATED_FLAG'] = this.updatedFlag;
return data;
}
}

@ -0,0 +1,292 @@
class GetItemCreationNtfBodyList {
List<ItemCreationHeader>? itemCreationHeader;
List<ItemCreationLines>? itemCreationLines;
String? pINFORMATION;
String? pQUESTION;
GetItemCreationNtfBodyList({this.itemCreationHeader, this.itemCreationLines, this.pINFORMATION, this.pQUESTION});
GetItemCreationNtfBodyList.fromJson(Map<String, dynamic> json) {
if (json['ItemCreationHeader'] != null) {
itemCreationHeader = <ItemCreationHeader>[];
json['ItemCreationHeader'].forEach((v) {
itemCreationHeader!.add(new ItemCreationHeader.fromJson(v));
});
}
if (json['ItemCreationLines'] != null) {
itemCreationLines = <ItemCreationLines>[];
json['ItemCreationLines'].forEach((v) {
itemCreationLines!.add(new ItemCreationLines.fromJson(v));
});
}
pINFORMATION = json['P_INFORMATION'];
pQUESTION = json['P_QUESTION'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.itemCreationHeader != null) {
data['ItemCreationHeader'] = this.itemCreationHeader!.map((v) => v.toJson()).toList();
}
if (this.itemCreationLines != null) {
data['ItemCreationLines'] = this.itemCreationLines!.map((v) => v.toJson()).toList();
}
data['P_INFORMATION'] = this.pINFORMATION;
data['P_QUESTION'] = this.pQUESTION;
return data;
}
}
class ItemCreationHeader {
String? aNALYZEDBY;
int? aNALYZEDBYID;
String? aNALYZEDDATE;
String? aPPROVEDDATE;
String? cATEGORY;
int? cATEGORYID;
String? iTEMTYPE;
String? oPERATINGUNIT;
int? oRGID;
int? rELATEDID;
String? rELATEDTO;
String? rEQUESTER;
int? rEQUESTERID;
String? rEQUESTDATE;
String? sTATUS;
int? tRANSACTIONHEADERID;
String? uRGENTFLAG;
String? uRGENTFLAGDISP;
String? wFITEMKEYANALYSIS;
String? wFITEMKEYAPPROVAL;
String? wFITEMTYPE;
ItemCreationHeader(
{this.aNALYZEDBY,
this.aNALYZEDBYID,
this.aNALYZEDDATE,
this.aPPROVEDDATE,
this.cATEGORY,
this.cATEGORYID,
this.iTEMTYPE,
this.oPERATINGUNIT,
this.oRGID,
this.rELATEDID,
this.rELATEDTO,
this.rEQUESTER,
this.rEQUESTERID,
this.rEQUESTDATE,
this.sTATUS,
this.tRANSACTIONHEADERID,
this.uRGENTFLAG,
this.uRGENTFLAGDISP,
this.wFITEMKEYANALYSIS,
this.wFITEMKEYAPPROVAL,
this.wFITEMTYPE});
ItemCreationHeader.fromJson(Map<String, dynamic> json) {
aNALYZEDBY = json['ANALYZED_BY'];
aNALYZEDBYID = json['ANALYZED_BY_ID'];
aNALYZEDDATE = json['ANALYZED_DATE'];
aPPROVEDDATE = json['APPROVED_DATE'];
cATEGORY = json['CATEGORY'];
cATEGORYID = json['CATEGORY_ID'];
iTEMTYPE = json['ITEM_TYPE'];
oPERATINGUNIT = json['OPERATING_UNIT'];
oRGID = json['ORG_ID'];
rELATEDID = json['RELATED_ID'];
rELATEDTO = json['RELATED_TO'];
rEQUESTER = json['REQUESTER'];
rEQUESTERID = json['REQUESTER_ID'];
rEQUESTDATE = json['REQUEST_DATE'];
sTATUS = json['STATUS'];
tRANSACTIONHEADERID = json['TRANSACTION_HEADER_ID'];
uRGENTFLAG = json['URGENT_FLAG'];
uRGENTFLAGDISP = json['URGENT_FLAG_DISP'];
wFITEMKEYANALYSIS = json['WF_ITEM_KEY_ANALYSIS'];
wFITEMKEYAPPROVAL = json['WF_ITEM_KEY_APPROVAL'];
wFITEMTYPE = json['WF_ITEM_TYPE'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ANALYZED_BY'] = this.aNALYZEDBY;
data['ANALYZED_BY_ID'] = this.aNALYZEDBYID;
data['ANALYZED_DATE'] = this.aNALYZEDDATE;
data['APPROVED_DATE'] = this.aPPROVEDDATE;
data['CATEGORY'] = this.cATEGORY;
data['CATEGORY_ID'] = this.cATEGORYID;
data['ITEM_TYPE'] = this.iTEMTYPE;
data['OPERATING_UNIT'] = this.oPERATINGUNIT;
data['ORG_ID'] = this.oRGID;
data['RELATED_ID'] = this.rELATEDID;
data['RELATED_TO'] = this.rELATEDTO;
data['REQUESTER'] = this.rEQUESTER;
data['REQUESTER_ID'] = this.rEQUESTERID;
data['REQUEST_DATE'] = this.rEQUESTDATE;
data['STATUS'] = this.sTATUS;
data['TRANSACTION_HEADER_ID'] = this.tRANSACTIONHEADERID;
data['URGENT_FLAG'] = this.uRGENTFLAG;
data['URGENT_FLAG_DISP'] = this.uRGENTFLAGDISP;
data['WF_ITEM_KEY_ANALYSIS'] = this.wFITEMKEYANALYSIS;
data['WF_ITEM_KEY_APPROVAL'] = this.wFITEMKEYAPPROVAL;
data['WF_ITEM_TYPE'] = this.wFITEMTYPE;
return data;
}
}
class ItemCreationLines {
String? cHARGETOPATIENT;
int? fROMROWNUM;
int? iNVENTORYITEMID;
String? iTEMCODE;
String? iTEMCREATIONSTATUS;
String? iTEMCREATIONSTATUSDISP;
String? iTEMDESCRIPTION;
String? iTEMGROUP;
String? iTEMGROUPCODE;
String? iTEMSUBGROUP;
String? iTEMSUBGROUPCODE;
String? iTEMTYPE;
String? jUSTIFICATION;
int? lINENUMBER;
int? nOOFROWS;
String? pRIMARYUOM;
String? pRIMARYUOMCODE;
String? pRODUCTDESCRIPTION;
String? pRODUCTNAME;
int? rOWNUM;
String? sTANARDSTATUSDISP;
int? sTANDARDMANUFACTURERID;
String? sTANDARDMANUFACTURERNAME;
String? sTANDARDMFGPARTNUM;
String? sTANDARDREJECTREASON;
String? sTANDARDSTATUS;
String? sUPPLIERCONTACT;
String? sUPPLIERNAME;
int? tEMPLATEID;
String? tEMPLATENAME;
int? tOROWNUM;
int? tRANSACTIONHEADERID;
int? tRANSACTIONLINEID;
int? uNITPRICE;
String? uSERMANUFACTURERNAME;
String? uSERMFGPARTNUM;
ItemCreationLines(
{this.cHARGETOPATIENT,
this.fROMROWNUM,
this.iNVENTORYITEMID,
this.iTEMCODE,
this.iTEMCREATIONSTATUS,
this.iTEMCREATIONSTATUSDISP,
this.iTEMDESCRIPTION,
this.iTEMGROUP,
this.iTEMGROUPCODE,
this.iTEMSUBGROUP,
this.iTEMSUBGROUPCODE,
this.iTEMTYPE,
this.jUSTIFICATION,
this.lINENUMBER,
this.nOOFROWS,
this.pRIMARYUOM,
this.pRIMARYUOMCODE,
this.pRODUCTDESCRIPTION,
this.pRODUCTNAME,
this.rOWNUM,
this.sTANARDSTATUSDISP,
this.sTANDARDMANUFACTURERID,
this.sTANDARDMANUFACTURERNAME,
this.sTANDARDMFGPARTNUM,
this.sTANDARDREJECTREASON,
this.sTANDARDSTATUS,
this.sUPPLIERCONTACT,
this.sUPPLIERNAME,
this.tEMPLATEID,
this.tEMPLATENAME,
this.tOROWNUM,
this.tRANSACTIONHEADERID,
this.tRANSACTIONLINEID,
this.uNITPRICE,
this.uSERMANUFACTURERNAME,
this.uSERMFGPARTNUM});
ItemCreationLines.fromJson(Map<String, dynamic> json) {
cHARGETOPATIENT = json['CHARGE_TO_PATIENT'];
fROMROWNUM = json['FROM_ROW_NUM'];
iNVENTORYITEMID = json['INVENTORY_ITEM_ID'];
iTEMCODE = json['ITEM_CODE'];
iTEMCREATIONSTATUS = json['ITEM_CREATION_STATUS'];
iTEMCREATIONSTATUSDISP = json['ITEM_CREATION_STATUS_DISP'];
iTEMDESCRIPTION = json['ITEM_DESCRIPTION'];
iTEMGROUP = json['ITEM_GROUP'];
iTEMGROUPCODE = json['ITEM_GROUP_CODE'];
iTEMSUBGROUP = json['ITEM_SUBGROUP'];
iTEMSUBGROUPCODE = json['ITEM_SUBGROUP_CODE'];
iTEMTYPE = json['ITEM_TYPE'];
jUSTIFICATION = json['JUSTIFICATION'];
lINENUMBER = json['LINE_NUMBER'];
nOOFROWS = json['NO_OF_ROWS'];
pRIMARYUOM = json['PRIMARY_UOM'];
pRIMARYUOMCODE = json['PRIMARY_UOM_CODE'];
pRODUCTDESCRIPTION = json['PRODUCT_DESCRIPTION'];
pRODUCTNAME = json['PRODUCT_NAME'];
rOWNUM = json['ROW_NUM'];
sTANARDSTATUSDISP = json['STANARD_STATUS_DISP'];
sTANDARDMANUFACTURERID = json['STANDARD_MANUFACTURER_ID'];
sTANDARDMANUFACTURERNAME = json['STANDARD_MANUFACTURER_NAME'];
sTANDARDMFGPARTNUM = json['STANDARD_MFG_PART_NUM'];
sTANDARDREJECTREASON = json['STANDARD_REJECT_REASON'];
sTANDARDSTATUS = json['STANDARD_STATUS'];
sUPPLIERCONTACT = json['SUPPLIER_CONTACT'];
sUPPLIERNAME = json['SUPPLIER_NAME'];
tEMPLATEID = json['TEMPLATE_ID'];
tEMPLATENAME = json['TEMPLATE_NAME'];
tOROWNUM = json['TO_ROW_NUM'];
tRANSACTIONHEADERID = json['TRANSACTION_HEADER_ID'];
tRANSACTIONLINEID = json['TRANSACTION_LINE_ID'];
uNITPRICE = json['UNIT_PRICE'];
uSERMANUFACTURERNAME = json['USER_MANUFACTURER_NAME'];
uSERMFGPARTNUM = json['USER_MFG_PART_NUM'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['CHARGE_TO_PATIENT'] = this.cHARGETOPATIENT;
data['FROM_ROW_NUM'] = this.fROMROWNUM;
data['INVENTORY_ITEM_ID'] = this.iNVENTORYITEMID;
data['ITEM_CODE'] = this.iTEMCODE;
data['ITEM_CREATION_STATUS'] = this.iTEMCREATIONSTATUS;
data['ITEM_CREATION_STATUS_DISP'] = this.iTEMCREATIONSTATUSDISP;
data['ITEM_DESCRIPTION'] = this.iTEMDESCRIPTION;
data['ITEM_GROUP'] = this.iTEMGROUP;
data['ITEM_GROUP_CODE'] = this.iTEMGROUPCODE;
data['ITEM_SUBGROUP'] = this.iTEMSUBGROUP;
data['ITEM_SUBGROUP_CODE'] = this.iTEMSUBGROUPCODE;
data['ITEM_TYPE'] = this.iTEMTYPE;
data['JUSTIFICATION'] = this.jUSTIFICATION;
data['LINE_NUMBER'] = this.lINENUMBER;
data['NO_OF_ROWS'] = this.nOOFROWS;
data['PRIMARY_UOM'] = this.pRIMARYUOM;
data['PRIMARY_UOM_CODE'] = this.pRIMARYUOMCODE;
data['PRODUCT_DESCRIPTION'] = this.pRODUCTDESCRIPTION;
data['PRODUCT_NAME'] = this.pRODUCTNAME;
data['ROW_NUM'] = this.rOWNUM;
data['STANARD_STATUS_DISP'] = this.sTANARDSTATUSDISP;
data['STANDARD_MANUFACTURER_ID'] = this.sTANDARDMANUFACTURERID;
data['STANDARD_MANUFACTURER_NAME'] = this.sTANDARDMANUFACTURERNAME;
data['STANDARD_MFG_PART_NUM'] = this.sTANDARDMFGPARTNUM;
data['STANDARD_REJECT_REASON'] = this.sTANDARDREJECTREASON;
data['STANDARD_STATUS'] = this.sTANDARDSTATUS;
data['SUPPLIER_CONTACT'] = this.sUPPLIERCONTACT;
data['SUPPLIER_NAME'] = this.sUPPLIERNAME;
data['TEMPLATE_ID'] = this.tEMPLATEID;
data['TEMPLATE_NAME'] = this.tEMPLATENAME;
data['TO_ROW_NUM'] = this.tOROWNUM;
data['TRANSACTION_HEADER_ID'] = this.tRANSACTIONHEADERID;
data['TRANSACTION_LINE_ID'] = this.tRANSACTIONLINEID;
data['UNIT_PRICE'] = this.uNITPRICE;
data['USER_MANUFACTURER_NAME'] = this.uSERMANUFACTURERNAME;
data['USER_MFG_PART_NUM'] = this.uSERMFGPARTNUM;
return data;
}
}

@ -0,0 +1,100 @@
class GetMoItemHistoryList {
String? dATEREQUIRED;
String? dESCRIPTION;
String? fROMLOCATOR;
int? fROMROWNUM;
String? fROMSUBINVENTORYCODE;
String? iTEMCODE;
String? lINESTATUSDIS;
int? nOOFROWS;
String? oPERATINGUNITNAME;
String? oRGANIZATIONCODE;
int? oRGANIZATIONID;
String? oRGANIZATIONNAME;
int? qUANTITY;
String? rEQUESTNUMBER;
int? rOWNUM;
String? sHIPTOLOCATION;
String? sTATUSDATE;
String? tOLOCATOR;
int? tOROWNUM;
String? tOSUBINVENTORYCODE;
String? tRANSACTIONTYPENAME;
String? uNITOFMEASURE;
GetMoItemHistoryList(
{this.dATEREQUIRED,
this.dESCRIPTION,
this.fROMLOCATOR,
this.fROMROWNUM,
this.fROMSUBINVENTORYCODE,
this.iTEMCODE,
this.lINESTATUSDIS,
this.nOOFROWS,
this.oPERATINGUNITNAME,
this.oRGANIZATIONCODE,
this.oRGANIZATIONID,
this.oRGANIZATIONNAME,
this.qUANTITY,
this.rEQUESTNUMBER,
this.rOWNUM,
this.sHIPTOLOCATION,
this.sTATUSDATE,
this.tOLOCATOR,
this.tOROWNUM,
this.tOSUBINVENTORYCODE,
this.tRANSACTIONTYPENAME,
this.uNITOFMEASURE});
GetMoItemHistoryList.fromJson(Map<String, dynamic> json) {
dATEREQUIRED = json['DATE_REQUIRED'];
dESCRIPTION = json['DESCRIPTION'];
fROMLOCATOR = json['FROM_LOCATOR'];
fROMROWNUM = json['FROM_ROW_NUM'];
fROMSUBINVENTORYCODE = json['FROM_SUBINVENTORY_CODE'];
iTEMCODE = json['ITEM_CODE'];
lINESTATUSDIS = json['LINE_STATUS_DIS'];
nOOFROWS = json['NO_OF_ROWS'];
oPERATINGUNITNAME = json['OPERATING_UNIT_NAME'];
oRGANIZATIONCODE = json['ORGANIZATION_CODE'];
oRGANIZATIONID = json['ORGANIZATION_ID'];
oRGANIZATIONNAME = json['ORGANIZATION_NAME'];
qUANTITY = json['QUANTITY'];
rEQUESTNUMBER = json['REQUEST_NUMBER'];
rOWNUM = json['ROW_NUM'];
sHIPTOLOCATION = json['SHIP_TO_LOCATION'];
sTATUSDATE = json['STATUS_DATE'];
tOLOCATOR = json['TO_LOCATOR'];
tOROWNUM = json['TO_ROW_NUM'];
tOSUBINVENTORYCODE = json['TO_SUBINVENTORY_CODE'];
tRANSACTIONTYPENAME = json['TRANSACTION_TYPE_NAME'];
uNITOFMEASURE = json['UNIT_OF_MEASURE'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DATE_REQUIRED'] = this.dATEREQUIRED;
data['DESCRIPTION'] = this.dESCRIPTION;
data['FROM_LOCATOR'] = this.fROMLOCATOR;
data['FROM_ROW_NUM'] = this.fROMROWNUM;
data['FROM_SUBINVENTORY_CODE'] = this.fROMSUBINVENTORYCODE;
data['ITEM_CODE'] = this.iTEMCODE;
data['LINE_STATUS_DIS'] = this.lINESTATUSDIS;
data['NO_OF_ROWS'] = this.nOOFROWS;
data['OPERATING_UNIT_NAME'] = this.oPERATINGUNITNAME;
data['ORGANIZATION_CODE'] = this.oRGANIZATIONCODE;
data['ORGANIZATION_ID'] = this.oRGANIZATIONID;
data['ORGANIZATION_NAME'] = this.oRGANIZATIONNAME;
data['QUANTITY'] = this.qUANTITY;
data['REQUEST_NUMBER'] = this.rEQUESTNUMBER;
data['ROW_NUM'] = this.rOWNUM;
data['SHIP_TO_LOCATION'] = this.sHIPTOLOCATION;
data['STATUS_DATE'] = this.sTATUSDATE;
data['TO_LOCATOR'] = this.tOLOCATOR;
data['TO_ROW_NUM'] = this.tOROWNUM;
data['TO_SUBINVENTORY_CODE'] = this.tOSUBINVENTORYCODE;
data['TRANSACTION_TYPE_NAME'] = this.tRANSACTIONTYPENAME;
data['UNIT_OF_MEASURE'] = this.uNITOFMEASURE;
return data;
}
}

@ -0,0 +1,104 @@
class GetMoNotificationBodyList {
String? dATEREQUIRED;
String? dESCRIPTION;
String? fROMLOCATOR;
int? fROMROWNUM;
String? fROMSUBINVENTORY;
String? iTEMCODE;
int? iTEMID;
int? lINENUMBER;
String? lINESTATUS;
int? nOOFROWS;
String? oPERATINGUNIT;
String? oRGANIZATIONCODE;
String? oRGANIZATIONNAME;
int? oRGID;
int? qUANTITY;
int? rOWNUM;
String? sHIPTOLOCATION;
String? sTATUSDATE;
String? tOLOCATOR;
int? tOROWNUM;
String? tOSUBINVENTORY;
String? tRANSACTIONTYPENAME;
String? uOM;
GetMoNotificationBodyList(
{this.dATEREQUIRED,
this.dESCRIPTION,
this.fROMLOCATOR,
this.fROMROWNUM,
this.fROMSUBINVENTORY,
this.iTEMCODE,
this.iTEMID,
this.lINENUMBER,
this.lINESTATUS,
this.nOOFROWS,
this.oPERATINGUNIT,
this.oRGANIZATIONCODE,
this.oRGANIZATIONNAME,
this.oRGID,
this.qUANTITY,
this.rOWNUM,
this.sHIPTOLOCATION,
this.sTATUSDATE,
this.tOLOCATOR,
this.tOROWNUM,
this.tOSUBINVENTORY,
this.tRANSACTIONTYPENAME,
this.uOM});
GetMoNotificationBodyList.fromJson(Map<String, dynamic> json) {
dATEREQUIRED = json['DATE_REQUIRED'];
dESCRIPTION = json['DESCRIPTION'];
fROMLOCATOR = json['FROM_LOCATOR'];
fROMROWNUM = json['FROM_ROW_NUM'];
fROMSUBINVENTORY = json['FROM_SUBINVENTORY'];
iTEMCODE = json['ITEM_CODE'];
iTEMID = json['ITEM_ID'];
lINENUMBER = json['LINE_NUMBER'];
lINESTATUS = json['LINE_STATUS'];
nOOFROWS = json['NO_OF_ROWS'];
oPERATINGUNIT = json['OPERATING_UNIT'];
oRGANIZATIONCODE = json['ORGANIZATION_CODE'];
oRGANIZATIONNAME = json['ORGANIZATION_NAME'];
oRGID = json['ORG_ID'];
qUANTITY = json['QUANTITY'];
rOWNUM = json['ROW_NUM'];
sHIPTOLOCATION = json['SHIP_TO_LOCATION'];
sTATUSDATE = json['STATUS_DATE'];
tOLOCATOR = json['TO_LOCATOR'];
tOROWNUM = json['TO_ROW_NUM'];
tOSUBINVENTORY = json['TO_SUBINVENTORY'];
tRANSACTIONTYPENAME = json['TRANSACTION_TYPE_NAME'];
uOM = json['UOM'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DATE_REQUIRED'] = this.dATEREQUIRED;
data['DESCRIPTION'] = this.dESCRIPTION;
data['FROM_LOCATOR'] = this.fROMLOCATOR;
data['FROM_ROW_NUM'] = this.fROMROWNUM;
data['FROM_SUBINVENTORY'] = this.fROMSUBINVENTORY;
data['ITEM_CODE'] = this.iTEMCODE;
data['ITEM_ID'] = this.iTEMID;
data['LINE_NUMBER'] = this.lINENUMBER;
data['LINE_STATUS'] = this.lINESTATUS;
data['NO_OF_ROWS'] = this.nOOFROWS;
data['OPERATING_UNIT'] = this.oPERATINGUNIT;
data['ORGANIZATION_CODE'] = this.oRGANIZATIONCODE;
data['ORGANIZATION_NAME'] = this.oRGANIZATIONNAME;
data['ORG_ID'] = this.oRGID;
data['QUANTITY'] = this.qUANTITY;
data['ROW_NUM'] = this.rOWNUM;
data['SHIP_TO_LOCATION'] = this.sHIPTOLOCATION;
data['STATUS_DATE'] = this.sTATUSDATE;
data['TO_LOCATOR'] = this.tOLOCATOR;
data['TO_ROW_NUM'] = this.tOROWNUM;
data['TO_SUBINVENTORY'] = this.tOSUBINVENTORY;
data['TRANSACTION_TYPE_NAME'] = this.tRANSACTIONTYPENAME;
data['UOM'] = this.uOM;
return data;
}
}

@ -0,0 +1,25 @@
class GetNotificationButtonsList {
String? bUTTONACTION;
String? bUTTONICON;
String? bUTTONLABEL;
int? bUTTONSEQ;
GetNotificationButtonsList(
{this.bUTTONACTION, this.bUTTONICON, this.bUTTONLABEL, this.bUTTONSEQ});
GetNotificationButtonsList.fromJson(Map<String, dynamic> json) {
bUTTONACTION = json['BUTTON_ACTION'];
bUTTONICON = json['BUTTON_ICON'];
bUTTONLABEL = json['BUTTON_LABEL'];
bUTTONSEQ = json['BUTTON_SEQ'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['BUTTON_ACTION'] = this.bUTTONACTION;
data['BUTTON_ICON'] = this.bUTTONICON;
data['BUTTON_LABEL'] = this.bUTTONLABEL;
data['BUTTON_SEQ'] = this.bUTTONSEQ;
return data;
}
}

@ -0,0 +1,92 @@
class GetPoItemHistoryList {
int? bALANCEQUANTITY;
int? bONUSQUANTITY;
String? bUYER;
String? cLOSEDCODE;
String? cREATIONDATE;
int? dISCOUNTPERCENTAGE;
int? fROMROWNUM;
int? iTEMID;
int? nETPRICE;
int? nOOFROWS;
String? oUNAME;
String? pONUMBER;
int? pURCHASEPRICE;
int? qUANTITYORDERED;
int? qUANTITYRECEIVED;
int? rEVISIONNUM;
int? rOWNUM;
String? sUPPLIER;
int? tOROWNUM;
String? uOM;
GetPoItemHistoryList(
{this.bALANCEQUANTITY,
this.bONUSQUANTITY,
this.bUYER,
this.cLOSEDCODE,
this.cREATIONDATE,
this.dISCOUNTPERCENTAGE,
this.fROMROWNUM,
this.iTEMID,
this.nETPRICE,
this.nOOFROWS,
this.oUNAME,
this.pONUMBER,
this.pURCHASEPRICE,
this.qUANTITYORDERED,
this.qUANTITYRECEIVED,
this.rEVISIONNUM,
this.rOWNUM,
this.sUPPLIER,
this.tOROWNUM,
this.uOM});
GetPoItemHistoryList.fromJson(Map<String, dynamic> json) {
bALANCEQUANTITY = json['BALANCE_QUANTITY'];
bONUSQUANTITY = json['BONUS_QUANTITY'];
bUYER = json['BUYER'];
cLOSEDCODE = json['CLOSED_CODE'];
cREATIONDATE = json['CREATION_DATE'];
dISCOUNTPERCENTAGE = json['DISCOUNT_PERCENTAGE'];
fROMROWNUM = json['FROM_ROW_NUM'];
iTEMID = json['ITEM_ID'];
nETPRICE = json['NET_PRICE'];
nOOFROWS = json['NO_OF_ROWS'];
oUNAME = json['OU_NAME'];
pONUMBER = json['PO_NUMBER'];
pURCHASEPRICE = json['PURCHASE_PRICE'];
qUANTITYORDERED = json['QUANTITY_ORDERED'];
qUANTITYRECEIVED = json['QUANTITY_RECEIVED'];
rEVISIONNUM = json['REVISION_NUM'];
rOWNUM = json['ROW_NUM'];
sUPPLIER = json['SUPPLIER'];
tOROWNUM = json['TO_ROW_NUM'];
uOM = json['UOM'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['BALANCE_QUANTITY'] = this.bALANCEQUANTITY;
data['BONUS_QUANTITY'] = this.bONUSQUANTITY;
data['BUYER'] = this.bUYER;
data['CLOSED_CODE'] = this.cLOSEDCODE;
data['CREATION_DATE'] = this.cREATIONDATE;
data['DISCOUNT_PERCENTAGE'] = this.dISCOUNTPERCENTAGE;
data['FROM_ROW_NUM'] = this.fROMROWNUM;
data['ITEM_ID'] = this.iTEMID;
data['NET_PRICE'] = this.nETPRICE;
data['NO_OF_ROWS'] = this.nOOFROWS;
data['OU_NAME'] = this.oUNAME;
data['PO_NUMBER'] = this.pONUMBER;
data['PURCHASE_PRICE'] = this.pURCHASEPRICE;
data['QUANTITY_ORDERED'] = this.qUANTITYORDERED;
data['QUANTITY_RECEIVED'] = this.qUANTITYRECEIVED;
data['REVISION_NUM'] = this.rEVISIONNUM;
data['ROW_NUM'] = this.rOWNUM;
data['SUPPLIER'] = this.sUPPLIER;
data['TO_ROW_NUM'] = this.tOROWNUM;
data['UOM'] = this.uOM;
return data;
}
}

@ -0,0 +1,242 @@
class GetPoNotificationBodyList {
List<POHeader>? pOHeader;
List<POLines>? pOLines;
String? pINFORMATION;
String? pQUESTION;
GetPoNotificationBodyList(
{this.pOHeader, this.pOLines, this.pINFORMATION, this.pQUESTION});
GetPoNotificationBodyList.fromJson(Map<String, dynamic> json) {
if (json['POHeader'] != null) {
pOHeader = <POHeader>[];
json['POHeader'].forEach((v) {
pOHeader!.add(new POHeader.fromJson(v));
});
}
if (json['POLines'] != null) {
pOLines = <POLines>[];
json['POLines'].forEach((v) {
pOLines!.add(new POLines.fromJson(v));
});
}
pINFORMATION = json['P_INFORMATION'];
pQUESTION = json['P_QUESTION'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.pOHeader != null) {
data['POHeader'] = this.pOHeader!.map((v) => v.toJson()).toList();
}
if (this.pOLines != null) {
data['POLines'] = this.pOLines!.map((v) => v.toJson()).toList();
}
data['P_INFORMATION'] = this.pINFORMATION;
data['P_QUESTION'] = this.pQUESTION;
return data;
}
}
class POHeader {
String? bUYER;
String? cOMMENTS;
String? cREATIONDATE;
String? cURRENCYNAME;
int? cUSTOMDUTY;
int? dISCOUNTAMOUNT;
int? gROSSAMOUNT;
String? lOCCUR;
int? lOCCURTOTPOAMT;
int? oTHERCHARGES;
String? pAYMENTTERMS;
String? pONUMBER;
String? pREPARER;
String? qUOTATIONDATE;
String? qUOTATIONNUMBER;
int? sALESTAX;
int? sHIPHANDLE;
String? sHIPTOLOCATIONNAME;
int? tOTALPODISCOUNT;
int? tOTPOAMT;
String? tOTPOAMTWORD;
String? vENDORNAME;
String? vENDORSITECODE;
POHeader(
{this.bUYER,
this.cOMMENTS,
this.cREATIONDATE,
this.cURRENCYNAME,
this.cUSTOMDUTY,
this.dISCOUNTAMOUNT,
this.gROSSAMOUNT,
this.lOCCUR,
this.lOCCURTOTPOAMT,
this.oTHERCHARGES,
this.pAYMENTTERMS,
this.pONUMBER,
this.pREPARER,
this.qUOTATIONDATE,
this.qUOTATIONNUMBER,
this.sALESTAX,
this.sHIPHANDLE,
this.sHIPTOLOCATIONNAME,
this.tOTALPODISCOUNT,
this.tOTPOAMT,
this.tOTPOAMTWORD,
this.vENDORNAME,
this.vENDORSITECODE});
POHeader.fromJson(Map<String, dynamic> json) {
bUYER = json['BUYER'];
cOMMENTS = json['COMMENTS'];
cREATIONDATE = json['CREATION_DATE'];
cURRENCYNAME = json['CURRENCY_NAME'];
cUSTOMDUTY = json['CUSTOM_DUTY'];
dISCOUNTAMOUNT = json['DISCOUNT_AMOUNT'];
gROSSAMOUNT = json['GROSS_AMOUNT'];
lOCCUR = json['LOC_CUR'];
lOCCURTOTPOAMT = json['LOC_CUR_TOT_PO_AMT'];
oTHERCHARGES = json['OTHER_CHARGES'];
pAYMENTTERMS = json['PAYMENT_TERMS'];
pONUMBER = json['PO_NUMBER'];
pREPARER = json['PREPARER'];
qUOTATIONDATE = json['QUOTATION_DATE'];
qUOTATIONNUMBER = json['QUOTATION_NUMBER'];
sALESTAX = json['SALES_TAX'];
sHIPHANDLE = json['SHIP_HANDLE'];
sHIPTOLOCATIONNAME = json['SHIP_TO_LOCATION_NAME'];
tOTALPODISCOUNT = json['TOTAL_PO_DISCOUNT'];
tOTPOAMT = json['TOT_PO_AMT'];
tOTPOAMTWORD = json['TOT_PO_AMT_WORD'];
vENDORNAME = json['VENDOR_NAME'];
vENDORSITECODE = json['VENDOR_SITE_CODE'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['BUYER'] = this.bUYER;
data['COMMENTS'] = this.cOMMENTS;
data['CREATION_DATE'] = this.cREATIONDATE;
data['CURRENCY_NAME'] = this.cURRENCYNAME;
data['CUSTOM_DUTY'] = this.cUSTOMDUTY;
data['DISCOUNT_AMOUNT'] = this.dISCOUNTAMOUNT;
data['GROSS_AMOUNT'] = this.gROSSAMOUNT;
data['LOC_CUR'] = this.lOCCUR;
data['LOC_CUR_TOT_PO_AMT'] = this.lOCCURTOTPOAMT;
data['OTHER_CHARGES'] = this.oTHERCHARGES;
data['PAYMENT_TERMS'] = this.pAYMENTTERMS;
data['PO_NUMBER'] = this.pONUMBER;
data['PREPARER'] = this.pREPARER;
data['QUOTATION_DATE'] = this.qUOTATIONDATE;
data['QUOTATION_NUMBER'] = this.qUOTATIONNUMBER;
data['SALES_TAX'] = this.sALESTAX;
data['SHIP_HANDLE'] = this.sHIPHANDLE;
data['SHIP_TO_LOCATION_NAME'] = this.sHIPTOLOCATIONNAME;
data['TOTAL_PO_DISCOUNT'] = this.tOTALPODISCOUNT;
data['TOT_PO_AMT'] = this.tOTPOAMT;
data['TOT_PO_AMT_WORD'] = this.tOTPOAMTWORD;
data['VENDOR_NAME'] = this.vENDORNAME;
data['VENDOR_SITE_CODE'] = this.vENDORSITECODE;
return data;
}
}
class POLines {
String? dELIVERTOLOCATION;
int? fROMROWNUM;
String? iTEMCODE;
String? iTEMDESCRIPTION;
int? iTEMID;
int? lINEAMOUNT;
int? lINEDISCPERCENTAGE;
int? lINENUM;
String? lINETYPE;
String? mFG;
String? nEEDBYDATE;
int? nOOFROWS;
int? pOHEADERID;
String? pROMISEDDATE;
String? pRNUM;
int? qUANTITY;
String? rEQUESTOR;
int? rOWNUM;
int? tOROWNUM;
int? uNITPRICE;
String? uOM;
POLines(
{this.dELIVERTOLOCATION,
this.fROMROWNUM,
this.iTEMCODE,
this.iTEMDESCRIPTION,
this.iTEMID,
this.lINEAMOUNT,
this.lINEDISCPERCENTAGE,
this.lINENUM,
this.lINETYPE,
this.mFG,
this.nEEDBYDATE,
this.nOOFROWS,
this.pOHEADERID,
this.pROMISEDDATE,
this.pRNUM,
this.qUANTITY,
this.rEQUESTOR,
this.rOWNUM,
this.tOROWNUM,
this.uNITPRICE,
this.uOM});
POLines.fromJson(Map<String, dynamic> json) {
dELIVERTOLOCATION = json['DELIVER_TO_LOCATION'];
fROMROWNUM = json['FROM_ROW_NUM'];
iTEMCODE = json['ITEM_CODE'];
iTEMDESCRIPTION = json['ITEM_DESCRIPTION'];
iTEMID = json['ITEM_ID'];
lINEAMOUNT = json['LINE_AMOUNT'];
lINEDISCPERCENTAGE = json['LINE_DISC_PERCENTAGE'];
lINENUM = json['LINE_NUM'];
lINETYPE = json['LINE_TYPE'];
mFG = json['MFG'];
nEEDBYDATE = json['NEED_BY_DATE'];
nOOFROWS = json['NO_OF_ROWS'];
pOHEADERID = json['PO_HEADER_ID'];
pROMISEDDATE = json['PROMISED_DATE'];
pRNUM = json['PR_NUM'];
qUANTITY = json['QUANTITY'];
rEQUESTOR = json['REQUESTOR'];
rOWNUM = json['ROW_NUM'];
tOROWNUM = json['TO_ROW_NUM'];
uNITPRICE = json['UNIT_PRICE'];
uOM = json['UOM'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DELIVER_TO_LOCATION'] = this.dELIVERTOLOCATION;
data['FROM_ROW_NUM'] = this.fROMROWNUM;
data['ITEM_CODE'] = this.iTEMCODE;
data['ITEM_DESCRIPTION'] = this.iTEMDESCRIPTION;
data['ITEM_ID'] = this.iTEMID;
data['LINE_AMOUNT'] = this.lINEAMOUNT;
data['LINE_DISC_PERCENTAGE'] = this.lINEDISCPERCENTAGE;
data['LINE_NUM'] = this.lINENUM;
data['LINE_TYPE'] = this.lINETYPE;
data['MFG'] = this.mFG;
data['NEED_BY_DATE'] = this.nEEDBYDATE;
data['NO_OF_ROWS'] = this.nOOFROWS;
data['PO_HEADER_ID'] = this.pOHEADERID;
data['PROMISED_DATE'] = this.pROMISEDDATE;
data['PR_NUM'] = this.pRNUM;
data['QUANTITY'] = this.qUANTITY;
data['REQUESTOR'] = this.rEQUESTOR;
data['ROW_NUM'] = this.rOWNUM;
data['TO_ROW_NUM'] = this.tOROWNUM;
data['UNIT_PRICE'] = this.uNITPRICE;
data['UOM'] = this.uOM;
return data;
}
}

@ -0,0 +1,84 @@
class GetQuotationAnalysisList {
int? fROMROWNUM;
String? iTEMCODE;
String? iTEMDESC;
int? nOOFROWS;
String? qUOTBONUSQTY;
String? qUOTDELIVERYDATE;
int? qUOTLINETOTAL;
String? qUOTMFGPARTNUM;
String? qUOTNUM;
int? qUOTQTY;
int? qUOTUNITPRICE;
String? qUOTUOM;
String? rFQNUM;
int? rFQQTY;
String? rFQUOM;
int? rOWNUM;
int? tOROWNUM;
String? vENDORNAME;
GetQuotationAnalysisList(
{this.fROMROWNUM,
this.iTEMCODE,
this.iTEMDESC,
this.nOOFROWS,
this.qUOTBONUSQTY,
this.qUOTDELIVERYDATE,
this.qUOTLINETOTAL,
this.qUOTMFGPARTNUM,
this.qUOTNUM,
this.qUOTQTY,
this.qUOTUNITPRICE,
this.qUOTUOM,
this.rFQNUM,
this.rFQQTY,
this.rFQUOM,
this.rOWNUM,
this.tOROWNUM,
this.vENDORNAME});
GetQuotationAnalysisList.fromJson(Map<String, dynamic> json) {
fROMROWNUM = json['FROM_ROW_NUM'];
iTEMCODE = json['ITEM_CODE'];
iTEMDESC = json['ITEM_DESC'];
nOOFROWS = json['NO_OF_ROWS'];
qUOTBONUSQTY = json['QUOT_BONUS_QTY'];
qUOTDELIVERYDATE = json['QUOT_DELIVERY_DATE'];
qUOTLINETOTAL = json['QUOT_LINE_TOTAL'];
qUOTMFGPARTNUM = json['QUOT_MFG_PART_NUM'];
qUOTNUM = json['QUOT_NUM'];
qUOTQTY = json['QUOT_QTY'];
qUOTUNITPRICE = json['QUOT_UNIT_PRICE'];
qUOTUOM = json['QUOT_UOM'];
rFQNUM = json['RFQ_NUM'];
rFQQTY = json['RFQ_QTY'];
rFQUOM = json['RFQ_UOM'];
rOWNUM = json['ROW_NUM'];
tOROWNUM = json['TO_ROW_NUM'];
vENDORNAME = json['VENDOR_NAME'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['FROM_ROW_NUM'] = this.fROMROWNUM;
data['ITEM_CODE'] = this.iTEMCODE;
data['ITEM_DESC'] = this.iTEMDESC;
data['NO_OF_ROWS'] = this.nOOFROWS;
data['QUOT_BONUS_QTY'] = this.qUOTBONUSQTY;
data['QUOT_DELIVERY_DATE'] = this.qUOTDELIVERYDATE;
data['QUOT_LINE_TOTAL'] = this.qUOTLINETOTAL;
data['QUOT_MFG_PART_NUM'] = this.qUOTMFGPARTNUM;
data['QUOT_NUM'] = this.qUOTNUM;
data['QUOT_QTY'] = this.qUOTQTY;
data['QUOT_UNIT_PRICE'] = this.qUOTUNITPRICE;
data['QUOT_UOM'] = this.qUOTUOM;
data['RFQ_NUM'] = this.rFQNUM;
data['RFQ_QTY'] = this.rFQQTY;
data['RFQ_UOM'] = this.rFQUOM;
data['ROW_NUM'] = this.rOWNUM;
data['TO_ROW_NUM'] = this.tOROWNUM;
data['VENDOR_NAME'] = this.vENDORNAME;
return data;
}
}

@ -0,0 +1,132 @@
class GetStampMsNotificationBodyList {
int? aCTUALWOBHRS;
int? aCTUALWOBSEC;
String? aPPROVEDENDREASONDESC;
String? aPPROVEDSTARTDATETIME;
String? aPPROVEDSTARTREASON;
String? aPPROVEDSTARTTIME;
int? aSSIGNMENTID;
int? aSSIGNMENTNUMBER;
String? bREAKNAME;
String? bUSINESSGROUPID;
String? eMPLOYEENAME;
int? eMPLOYEENUMBER;
String? eMPLOYMENTCATEGORY;
int? pAYROLLID;
String? pAYROLLNAME;
String? sCHEDULEDATE;
int? sEQNO;
String? sHTACTUALENDDATETIME;
String? sHTACTUALENDTIME;
String? sHTACTUALHRS;
int? sHTACTUALSEC;
String? sHTACTUALSTARTDATETIME;
String? sHTACTUALSTARTTIME;
String? sHTCODE;
int? sHTID;
String? sHTNAME;
String? sHTTYPE;
String? sHTTYPEDESC;
int? sUPERVISORID;
int? tKPERSONID;
GetStampMsNotificationBodyList(
{this.aCTUALWOBHRS,
this.aCTUALWOBSEC,
this.aPPROVEDENDREASONDESC,
this.aPPROVEDSTARTDATETIME,
this.aPPROVEDSTARTREASON,
this.aPPROVEDSTARTTIME,
this.aSSIGNMENTID,
this.aSSIGNMENTNUMBER,
this.bREAKNAME,
this.bUSINESSGROUPID,
this.eMPLOYEENAME,
this.eMPLOYEENUMBER,
this.eMPLOYMENTCATEGORY,
this.pAYROLLID,
this.pAYROLLNAME,
this.sCHEDULEDATE,
this.sEQNO,
this.sHTACTUALENDDATETIME,
this.sHTACTUALENDTIME,
this.sHTACTUALHRS,
this.sHTACTUALSEC,
this.sHTACTUALSTARTDATETIME,
this.sHTACTUALSTARTTIME,
this.sHTCODE,
this.sHTID,
this.sHTNAME,
this.sHTTYPE,
this.sHTTYPEDESC,
this.sUPERVISORID,
this.tKPERSONID});
GetStampMsNotificationBodyList.fromJson(Map<String, dynamic> json) {
aCTUALWOBHRS = json['ACTUAL_WOB_HRS'];
aCTUALWOBSEC = json['ACTUAL_WOB_SEC'];
aPPROVEDENDREASONDESC = json['APPROVED_END_REASON_DESC'];
aPPROVEDSTARTDATETIME = json['APPROVED_START_DATETIME'];
aPPROVEDSTARTREASON = json['APPROVED_START_REASON'];
aPPROVEDSTARTTIME = json['APPROVED_START_TIME'];
aSSIGNMENTID = json['ASSIGNMENT_ID'];
aSSIGNMENTNUMBER = json['ASSIGNMENT_NUMBER'];
bREAKNAME = json['BREAK_NAME'];
bUSINESSGROUPID = json['BUSINESS_GROUP_ID'];
eMPLOYEENAME = json['EMPLOYEE_NAME'];
eMPLOYEENUMBER = json['EMPLOYEE_NUMBER'];
eMPLOYMENTCATEGORY = json['EMPLOYMENT_CATEGORY'];
pAYROLLID = json['PAYROLL_ID'];
pAYROLLNAME = json['PAYROLL_NAME'];
sCHEDULEDATE = json['SCHEDULE_DATE'];
sEQNO = json['SEQ_NO'];
sHTACTUALENDDATETIME = json['SHT_ACTUAL_END_DATETIME'];
sHTACTUALENDTIME = json['SHT_ACTUAL_END_TIME'];
sHTACTUALHRS = json['SHT_ACTUAL_HRS'];
sHTACTUALSEC = json['SHT_ACTUAL_SEC'];
sHTACTUALSTARTDATETIME = json['SHT_ACTUAL_START_DATETIME'];
sHTACTUALSTARTTIME = json['SHT_ACTUAL_START_TIME'];
sHTCODE = json['SHT_CODE'];
sHTID = json['SHT_ID'];
sHTNAME = json['SHT_NAME'];
sHTTYPE = json['SHT_TYPE'];
sHTTYPEDESC = json['SHT_TYPE_DESC'];
sUPERVISORID = json['SUPERVISOR_ID'];
tKPERSONID = json['TK_PERSON_ID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ACTUAL_WOB_HRS'] = this.aCTUALWOBHRS;
data['ACTUAL_WOB_SEC'] = this.aCTUALWOBSEC;
data['APPROVED_END_REASON_DESC'] = this.aPPROVEDENDREASONDESC;
data['APPROVED_START_DATETIME'] = this.aPPROVEDSTARTDATETIME;
data['APPROVED_START_REASON'] = this.aPPROVEDSTARTREASON;
data['APPROVED_START_TIME'] = this.aPPROVEDSTARTTIME;
data['ASSIGNMENT_ID'] = this.aSSIGNMENTID;
data['ASSIGNMENT_NUMBER'] = this.aSSIGNMENTNUMBER;
data['BREAK_NAME'] = this.bREAKNAME;
data['BUSINESS_GROUP_ID'] = this.bUSINESSGROUPID;
data['EMPLOYEE_NAME'] = this.eMPLOYEENAME;
data['EMPLOYEE_NUMBER'] = this.eMPLOYEENUMBER;
data['EMPLOYMENT_CATEGORY'] = this.eMPLOYMENTCATEGORY;
data['PAYROLL_ID'] = this.pAYROLLID;
data['PAYROLL_NAME'] = this.pAYROLLNAME;
data['SCHEDULE_DATE'] = this.sCHEDULEDATE;
data['SEQ_NO'] = this.sEQNO;
data['SHT_ACTUAL_END_DATETIME'] = this.sHTACTUALENDDATETIME;
data['SHT_ACTUAL_END_TIME'] = this.sHTACTUALENDTIME;
data['SHT_ACTUAL_HRS'] = this.sHTACTUALHRS;
data['SHT_ACTUAL_SEC'] = this.sHTACTUALSEC;
data['SHT_ACTUAL_START_DATETIME'] = this.sHTACTUALSTARTDATETIME;
data['SHT_ACTUAL_START_TIME'] = this.sHTACTUALSTARTTIME;
data['SHT_CODE'] = this.sHTCODE;
data['SHT_ID'] = this.sHTID;
data['SHT_NAME'] = this.sHTNAME;
data['SHT_TYPE'] = this.sHTTYPE;
data['SHT_TYPE_DESC'] = this.sHTTYPEDESC;
data['SUPERVISOR_ID'] = this.sUPERVISORID;
data['TK_PERSON_ID'] = this.tKPERSONID;
return data;
}
}

@ -0,0 +1,61 @@
class GetStampNsNotificationBodyList {
int? aSSIGNMENTID;
String? aSSIGNMENTNUMBER;
int? bUSINESSGROUPID;
String? eMPLOYEENAME;
String? eMPLOYEENUMBER;
String? eMPLOYMENTCATEGORY;
int? pAYROLLID;
String? pAYROLLNAME;
int? pERSONID;
String? sCHEDULEDATE;
int? sUPERVISORID;
int? tKPERSONID;
GetStampNsNotificationBodyList(
{this.aSSIGNMENTID,
this.aSSIGNMENTNUMBER,
this.bUSINESSGROUPID,
this.eMPLOYEENAME,
this.eMPLOYEENUMBER,
this.eMPLOYMENTCATEGORY,
this.pAYROLLID,
this.pAYROLLNAME,
this.pERSONID,
this.sCHEDULEDATE,
this.sUPERVISORID,
this.tKPERSONID});
GetStampNsNotificationBodyList.fromJson(Map<String, dynamic> json) {
aSSIGNMENTID = json['ASSIGNMENT_ID'];
aSSIGNMENTNUMBER = json['ASSIGNMENT_NUMBER'];
bUSINESSGROUPID = json['BUSINESS_GROUP_ID'];
eMPLOYEENAME = json['EMPLOYEE_NAME'];
eMPLOYEENUMBER = json['EMPLOYEE_NUMBER'];
eMPLOYMENTCATEGORY = json['EMPLOYMENT_CATEGORY'];
pAYROLLID = json['PAYROLL_ID'];
pAYROLLNAME = json['PAYROLL_NAME'];
pERSONID = json['PERSON_ID'];
sCHEDULEDATE = json['SCHEDULE_DATE'];
sUPERVISORID = json['SUPERVISOR_ID'];
tKPERSONID = json['TK_PERSON_ID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ASSIGNMENT_ID'] = this.aSSIGNMENTID;
data['ASSIGNMENT_NUMBER'] = this.aSSIGNMENTNUMBER;
data['BUSINESS_GROUP_ID'] = this.bUSINESSGROUPID;
data['EMPLOYEE_NAME'] = this.eMPLOYEENAME;
data['EMPLOYEE_NUMBER'] = this.eMPLOYEENUMBER;
data['EMPLOYMENT_CATEGORY'] = this.eMPLOYMENTCATEGORY;
data['PAYROLL_ID'] = this.pAYROLLID;
data['PAYROLL_NAME'] = this.pAYROLLNAME;
data['PERSON_ID'] = this.pERSONID;
data['SCHEDULE_DATE'] = this.sCHEDULEDATE;
data['SUPERVISOR_ID'] = this.sUPERVISORID;
data['TK_PERSON_ID'] = this.tKPERSONID;
return data;
}
}

@ -32,7 +32,7 @@ class MemberInformationListModel {
String? fREQUENCY;
String? fREQUENCYMEANING;
int? fROMROWNUM;
String? gRADEID;
int? gRADEID;
String? gRADENAME;
String? hIREDATE;
int? jOBID;

@ -0,0 +1,18 @@
class NotificationAction {
String? pRETURNMSG;
String? pRETURNSTATUS;
NotificationAction({this.pRETURNMSG, this.pRETURNSTATUS});
NotificationAction.fromJson(Map<String, dynamic> json) {
pRETURNMSG = json['P_RETURN_MSG'];
pRETURNSTATUS = json['P_RETURN_STATUS'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['P_RETURN_MSG'] = this.pRETURNMSG;
data['P_RETURN_STATUS'] = this.pRETURNSTATUS;
return data;
}
}

@ -0,0 +1,24 @@
class NotificationGetRespondAttributesList {
String? attributeDisplayName;
String? attributeFormat;
String? attributeName;
String? attributeType;
NotificationGetRespondAttributesList({this.attributeDisplayName, this.attributeFormat, this.attributeName, this.attributeType});
NotificationGetRespondAttributesList.fromJson(Map<String, dynamic> json) {
attributeDisplayName = json['ATTRIBUTE_DISPLAY_NAME'];
attributeFormat = json['ATTRIBUTE_FORMAT'];
attributeName = json['ATTRIBUTE_NAME'];
attributeType = json['ATTRIBUTE_TYPE'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['ATTRIBUTE_DISPLAY_NAME'] = attributeDisplayName;
data['ATTRIBUTE_FORMAT'] = attributeFormat;
data['ATTRIBUTE_NAME'] = attributeName;
data['ATTRIBUTE_TYPE'] = attributeType;
return data;
}
}

@ -0,0 +1,68 @@
class SubordinatesLeavesList {
String? aBSENCEATTENDANCETYPENAME;
String? cALENDARENTRYDESC;
String? dATEEND;
String? dATESTART;
String? eMPLOYEEIMAGE;
String? eMPLOYEENAME;
String? eMPLOYEENUMBER;
String? eVENTDATE;
String? lEAVETYPE;
int? oRGANIZATIONID;
String? oRGANIZATIONNAME;
String? pOSITIONTITLE;
String? rEPLACEMENTNAME;
String? sTATUS;
SubordinatesLeavesList(
{this.aBSENCEATTENDANCETYPENAME,
this.cALENDARENTRYDESC,
this.dATEEND,
this.dATESTART,
this.eMPLOYEEIMAGE,
this.eMPLOYEENAME,
this.eMPLOYEENUMBER,
this.eVENTDATE,
this.lEAVETYPE,
this.oRGANIZATIONID,
this.oRGANIZATIONNAME,
this.pOSITIONTITLE,
this.rEPLACEMENTNAME,
this.sTATUS});
SubordinatesLeavesList.fromJson(Map<String, dynamic> json) {
aBSENCEATTENDANCETYPENAME = json['ABSENCE_ATTENDANCE_TYPE_NAME'];
cALENDARENTRYDESC = json['CALENDAR_ENTRY_DESC'];
dATEEND = json['DATE_END'];
dATESTART = json['DATE_START'];
eMPLOYEEIMAGE = json['EMPLOYEE_IMAGE'];
eMPLOYEENAME = json['EMPLOYEE_NAME'];
eMPLOYEENUMBER = json['EMPLOYEE_NUMBER'];
eVENTDATE = json['EVENT_DATE'];
lEAVETYPE = json['LEAVE_TYPE'];
oRGANIZATIONID = json['ORGANIZATION_ID'];
oRGANIZATIONNAME = json['ORGANIZATION_NAME'];
pOSITIONTITLE = json['POSITION_TITLE'];
rEPLACEMENTNAME = json['REPLACEMENT_NAME'];
sTATUS = json['STATUS'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ABSENCE_ATTENDANCE_TYPE_NAME'] = this.aBSENCEATTENDANCETYPENAME;
data['CALENDAR_ENTRY_DESC'] = this.cALENDARENTRYDESC;
data['DATE_END'] = this.dATEEND;
data['DATE_START'] = this.dATESTART;
data['EMPLOYEE_IMAGE'] = this.eMPLOYEEIMAGE;
data['EMPLOYEE_NAME'] = this.eMPLOYEENAME;
data['EMPLOYEE_NUMBER'] = this.eMPLOYEENUMBER;
data['EVENT_DATE'] = this.eVENTDATE;
data['LEAVE_TYPE'] = this.lEAVETYPE;
data['ORGANIZATION_ID'] = this.oRGANIZATIONID;
data['ORGANIZATION_NAME'] = this.oRGANIZATIONNAME;
data['POSITION_TITLE'] = this.pOSITIONTITLE;
data['REPLACEMENT_NAME'] = this.rEPLACEMENTNAME;
data['STATUS'] = this.sTATUS;
return data;
}
}

@ -0,0 +1,38 @@
import 'dart:ui';
class WorkListItemTypeModelData {
late int value;
late String name;
late String fullName;
late bool active;
late List<Color> color;
late String icon;
late String key;
late bool disable;
WorkListItemTypeModelData({required this.value, required this.name, required this.fullName, required this.active, required this.color, required this.icon, required this.key, required this.disable});
WorkListItemTypeModelData.fromJson(Map<String, dynamic> json) {
value = json['value'];
name = json['name'];
fullName = json['fullName'];
active = json['active'];
color = json['color'];
icon = json['icon'];
key = json['key'];
disable = json['disable'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['value'] = value;
data['name'] = name;
data['fullName'] = fullName;
data['active'] = active;
data['color'] = color;
data['icon'] = icon;
data['key'] = key;
data['disable'] = disable;
return data;
}
}

@ -0,0 +1,137 @@
class WorkListResponseModel {
String? bEGINDATE;
String? dUEDATE;
String? eNDDATE;
String? fROMROLE;
int? fROMROWNUM;
String? fROMUSER;
String? fUNCTIONNAME;
String? iTEMKEY;
String? iTEMTYPE;
String? iTEMTYPEDISPLAYNAME;
String? lANGUAGE;
String? mAILSTATUS;
String? mOREINFOROLE;
int? nOTIFICATIONID;
String? nOTIFICATIONNAME;
int? nOOFROWS;
String? oRIGINALRECIPIENT;
String? pONUMBER;
int? pRIORITY;
String? pRIORITYF;
String? pRNUMBER;
String? rECIPIENTROLE;
String? rEQUESTNUMBER;
String? rEQUESTTYPE;
String? rESPONDER;
int? rOWNUM;
String? sELECTEDEMPLOYEENUMBER;
String? sTATUS;
String? sUBJECT;
int? tOROWNUM;
String? tOUSER;
WorkListResponseModel(
{this.bEGINDATE,
this.dUEDATE,
this.eNDDATE,
this.fROMROLE,
this.fROMROWNUM,
this.fROMUSER,
this.fUNCTIONNAME,
this.iTEMKEY,
this.iTEMTYPE,
this.iTEMTYPEDISPLAYNAME,
this.lANGUAGE,
this.mAILSTATUS,
this.mOREINFOROLE,
this.nOTIFICATIONID,
this.nOTIFICATIONNAME,
this.nOOFROWS,
this.oRIGINALRECIPIENT,
this.pONUMBER,
this.pRIORITY,
this.pRIORITYF,
this.pRNUMBER,
this.rECIPIENTROLE,
this.rEQUESTNUMBER,
this.rEQUESTTYPE,
this.rESPONDER,
this.rOWNUM,
this.sELECTEDEMPLOYEENUMBER,
this.sTATUS,
this.sUBJECT,
this.tOROWNUM,
this.tOUSER});
WorkListResponseModel.fromJson(Map<String, dynamic> json) {
bEGINDATE = json['BEGIN_DATE'];
dUEDATE = json['DUE_DATE'];
eNDDATE = json['END_DATE'];
fROMROLE = json['FROM_ROLE'];
fROMROWNUM = json['FROM_ROW_NUM'];
fROMUSER = json['FROM_USER'];
fUNCTIONNAME = json['FUNCTION_NAME'];
iTEMKEY = json['ITEM_KEY'];
iTEMTYPE = json['ITEM_TYPE'];
iTEMTYPEDISPLAYNAME = json['ITEM_TYPE_DISPLAY_NAME'];
lANGUAGE = json['LANGUAGE'];
mAILSTATUS = json['MAIL_STATUS'];
mOREINFOROLE = json['MORE_INFO_ROLE'];
nOTIFICATIONID = json['NOTIFICATION_ID'];
nOTIFICATIONNAME = json['NOTIFICATION_NAME'];
nOOFROWS = json['NO_OF_ROWS'];
oRIGINALRECIPIENT = json['ORIGINAL_RECIPIENT'];
pONUMBER = json['PO_NUMBER'];
pRIORITY = json['PRIORITY'];
pRIORITYF = json['PRIORITY_F'];
pRNUMBER = json['PR_NUMBER'];
rECIPIENTROLE = json['RECIPIENT_ROLE'];
rEQUESTNUMBER = json['REQUEST_NUMBER'];
rEQUESTTYPE = json['REQUEST_TYPE'];
rESPONDER = json['RESPONDER'];
rOWNUM = json['ROW_NUM'];
sELECTEDEMPLOYEENUMBER = json['SELECTED_EMPLOYEE_NUMBER'];
sTATUS = json['STATUS'];
sUBJECT = json['SUBJECT'];
tOROWNUM = json['TO_ROW_NUM'];
tOUSER = json['TO_USER'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['BEGIN_DATE'] = this.bEGINDATE;
data['DUE_DATE'] = this.dUEDATE;
data['END_DATE'] = this.eNDDATE;
data['FROM_ROLE'] = this.fROMROLE;
data['FROM_ROW_NUM'] = this.fROMROWNUM;
data['FROM_USER'] = this.fROMUSER;
data['FUNCTION_NAME'] = this.fUNCTIONNAME;
data['ITEM_KEY'] = this.iTEMKEY;
data['ITEM_TYPE'] = this.iTEMTYPE;
data['ITEM_TYPE_DISPLAY_NAME'] = this.iTEMTYPEDISPLAYNAME;
data['LANGUAGE'] = this.lANGUAGE;
data['MAIL_STATUS'] = this.mAILSTATUS;
data['MORE_INFO_ROLE'] = this.mOREINFOROLE;
data['NOTIFICATION_ID'] = this.nOTIFICATIONID;
data['NOTIFICATION_NAME'] = this.nOTIFICATIONNAME;
data['NO_OF_ROWS'] = this.nOOFROWS;
data['ORIGINAL_RECIPIENT'] = this.oRIGINALRECIPIENT;
data['PO_NUMBER'] = this.pONUMBER;
data['PRIORITY'] = this.pRIORITY;
data['PRIORITY_F'] = this.pRIORITYF;
data['PR_NUMBER'] = this.pRNUMBER;
data['RECIPIENT_ROLE'] = this.rECIPIENTROLE;
data['REQUEST_NUMBER'] = this.rEQUESTNUMBER;
data['REQUEST_TYPE'] = this.rEQUESTTYPE;
data['RESPONDER'] = this.rESPONDER;
data['ROW_NUM'] = this.rOWNUM;
data['SELECTED_EMPLOYEE_NUMBER'] = this.sELECTEDEMPLOYEENUMBER;
data['STATUS'] = this.sTATUS;
data['SUBJECT'] = this.sUBJECT;
data['TO_ROW_NUM'] = this.tOROWNUM;
data['TO_USER'] = this.tOUSER;
return data;
}
}

@ -6,6 +6,7 @@ import 'package:mohem_flutter_app/api/dashboard_api_client.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_open_notifications_list.dart';
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
import 'package:mohem_flutter_app/models/dashboard/menus.dart';
@ -39,9 +40,9 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
List<GetMenuEntriesList>? getMenuEntriesList;
//Attendance Tracking API's & Methods
fetchAttendanceTracking() async {
void fetchAttendanceTracking(context) async {
try {
attendanceTracking = await DashbaordApiClient().getAttendanceTracking();
attendanceTracking = await DashboardApiClient().getAttendanceTracking();
isAttendanceTrackingLoading = false;
isTimeRemainingInSeconds = calculateSeconds("00:00:00");
endTime = DateTime.now().millisecondsSinceEpoch + Duration(seconds: isTimeRemainingInSeconds).inMilliseconds;
@ -50,7 +51,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
// notifyListeners();
} catch (ex) {
Utils.handleException(ex, null);
Utils.handleException(ex, context, null);
}
}
@ -67,31 +68,36 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
attendanceTracking?.pSwipeIn = "a";
isTimeRemainingInSeconds = calculateSeconds("00:10:30");
endTime = DateTime.now().millisecondsSinceEpoch + Duration(seconds: isTimeRemainingInSeconds).inMilliseconds;
notifyListeners();
}
ItgFormsModel? itgFormsModel;
List<GetOpenNotificationsList>? getOpenNotificationsList;
//Work List API's & Methods
fetchWorkListCounter() async {
Future fetchWorkListCounter(context, {bool showLoading = false}) async {
try {
GenericResponseModel? genericResponseModel = await DashbaordApiClient().getOpenNotifications();
if (showLoading) Utils.showLoading(context);
GenericResponseModel? genericResponseModel = await DashboardApiClient().getOpenNotifications();
isWorkListLoading = false;
getOpenNotificationsList = genericResponseModel?.getOpenNotificationsList;
workListCounter = genericResponseModel?.pOPENNTFNUMBER ?? 0;
ItgFormsModel? itgFormsModel = await DashbaordApiClient().getItgFormsPendingTask();
itgFormsModel = await DashboardApiClient().getItgFormsPendingTask();
workListCounter = workListCounter + (itgFormsModel?.totalCount ?? 0);
if (showLoading) Utils.hideLoading(context);
notifyListeners();
} catch (ex) {
isWorkListLoading = false;
logger.wtf(ex);
if (showLoading) Utils.hideLoading(context);
notifyListeners();
Utils.handleException(ex, null);
Utils.handleException(ex, context, null);
}
}
//Missing Siwpe API's & Methods
fetchMissingSwipe() async {
Future fetchMissingSwipe(context) async {
try {
GenericResponseModel? genericResponseModel = await DashbaordApiClient().getOpenMissingSwipes();
GenericResponseModel? genericResponseModel = await DashboardApiClient().getOpenMissingSwipes();
isMissingSwipeLoading = false;
missingSwipeCounter = genericResponseModel!.getOpenMissingSwipesList!.pOpenMissingSwipes ?? 0;
notifyListeners();
@ -99,14 +105,14 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
isMissingSwipeLoading = false;
logger.wtf(ex);
notifyListeners();
Utils.handleException(ex, null);
Utils.handleException(ex, context, null);
}
}
//Leave and Ticket Balance API's & Methods
fetchLeaveTicketBalance() async {
Future fetchLeaveTicketBalance(context) async {
try {
GenericResponseModel? genericResponseModel = await DashbaordApiClient().getAccrualBalances();
GenericResponseModel? genericResponseModel = await DashboardApiClient().getAccrualBalances();
isLeaveTicketBalanceLoading = false;
leaveBalance = genericResponseModel?.getAccrualBalancesList![0].accrualNetEntitlement ?? 0.0;
ticketBalance = (genericResponseModel?.getAccrualBalancesList![1].accrualNetEntitlement ?? 0.0) + (genericResponseModel?.getAccrualBalancesList![2].accrualNetEntitlement ?? 0.0);
@ -115,33 +121,33 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
isLeaveTicketBalanceLoading = false;
logger.wtf(ex);
notifyListeners();
Utils.handleException(ex, null);
Utils.handleException(ex, context, null);
}
}
//List Menu API's & Methods
fetchListMenu() async {
try {
GenericResponseModel? genericResponseModel = await DashbaordApiClient().getListMenu();
GenericResponseModel? genericResponseModel = await DashboardApiClient().getListMenu();
Map<String, String> map = {};
print(jsonEncode(genericResponseModel!.listMenu));
for (int i = 0; i < genericResponseModel!.listMenu!.length; i++) {
print(genericResponseModel!.listMenu![i]!.menuName ?? "");
map[genericResponseModel!.listMenu![i]!.menuName ?? ""] = i.toString();
for (int i = 0; i < genericResponseModel.listMenu!.length; i++) {
print(genericResponseModel.listMenu![i].menuName ?? "");
map[genericResponseModel.listMenu![i].menuName ?? ""] = i.toString();
}
logger.i(map);
notifyListeners();
} catch (ex) {
logger.wtf(ex);
notifyListeners();
Utils.handleException(ex, null);
Utils.handleException(ex, null, null);
}
}
//Menu Entries API's & Methods
fetchMenuEntries() async {
try {
GenericResponseModel? genericResponseModel = await DashbaordApiClient().getGetMenuEntries();
GenericResponseModel? genericResponseModel = await DashboardApiClient().getGetMenuEntries();
getMenuEntriesList = genericResponseModel!.getMenuEntriesList;
homeMenus = parseMenues(getMenuEntriesList ?? []);
isServicesMenusLoading = false;
@ -149,7 +155,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
} catch (ex) {
logger.wtf(ex);
notifyListeners();
Utils.handleException(ex, null);
Utils.handleException(ex, null, null);
}
}
@ -170,4 +176,8 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
// }
return menus;
}
void notify() {
notifyListeners();
}
}

@ -1,26 +0,0 @@
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
AppBar appBar(BuildContext context, {required String title}) {
return AppBar(
title: title.toText24(color: MyColors.darkTextColor),
centerTitle: false,
automaticallyImplyLeading: false,
backgroundColor: Colors.white,
actions: [
IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: Icon(
Icons.close,
color: MyColors.darkIconColor,
),
),
],
);
}

@ -1,30 +1,20 @@
import 'dart:convert';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/api/dashboard_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/config/routes.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_attendance_tracking_list_model.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/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/theme/colors.dart';
import 'package:mohem_flutter_app/ui/landing/widget/menus_widget.dart';
import 'package:mohem_flutter_app/ui/landing/widget/services_widget.dart';
import 'package:mohem_flutter_app/widgets/circular_avatar.dart';
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
import 'package:provider/provider.dart';
import 'package:shimmer/shimmer.dart';
import '../../main.dart';
class DashboardScreen extends StatefulWidget {
DashboardScreen({Key? key}) : super(key: key);
@ -36,16 +26,16 @@ class DashboardScreen extends StatefulWidget {
}
class _DashboardScreenState extends State<DashboardScreen> {
late var data;
late DashboardProviderModel data;
@override
void initState() {
super.initState();
data = Provider.of<DashboardProviderModel>(context, listen: false);
data.fetchAttendanceTracking();
data.fetchWorkListCounter();
data.fetchMissingSwipe();
data.fetchLeaveTicketBalance();
data.fetchAttendanceTracking(context);
data.fetchWorkListCounter(context);
data.fetchMissingSwipe(context);
data.fetchLeaveTicketBalance(context);
data.fetchMenuEntries();
}
@ -137,7 +127,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
gradient: const LinearGradient(transform: GradientRotation(.46), begin: Alignment.topRight, end: Alignment.bottomRight, colors: [
gradient: const LinearGradient(transform: GradientRotation(.46), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
]),
@ -222,7 +212,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
}))
.animatedSwither();
},
)),
),
),
),
9.width,
Expanded(

@ -83,7 +83,7 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
padding: EdgeInsets.only(left: 31, right: 31, top: 31, bottom: 16),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)),
gradient: const LinearGradient(transform: GradientRotation(.64), begin: Alignment.topRight, end: Alignment.bottomRight, colors: [
gradient: const LinearGradient(transform: GradientRotation(.64), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
]),
@ -156,7 +156,7 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
gradient: const LinearGradient(transform: GradientRotation(.64), begin: Alignment.topRight, end: Alignment.bottomRight, colors: [
gradient: const LinearGradient(transform: GradientRotation(.64), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
]),

@ -14,7 +14,7 @@ class MenusWidget extends StatelessWidget {
Widget build(BuildContext context) {
List<int> namesColor = [0xff125765, 0xff239D8F, 0xff2BB8A8, 0xff1D92AA];
return Consumer<DashboardProviderModel>(builder: (context, data, child) {
return Consumer<DashboardProviderModel>(builder: (cxt, data, child) {
return GridView(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 2 / 2, crossAxisSpacing: 9, mainAxisSpacing: 9),
padding: EdgeInsets.zero,
@ -24,7 +24,7 @@ class MenusWidget extends StatelessWidget {
children: [
data.isWorkListLoading
? MenuShimmer().onPress(() {
data.fetchWorkListCounter();
data.fetchWorkListCounter(context, showLoading: true);
})
: Container(
decoration: BoxDecoration(
@ -46,13 +46,13 @@ class MenusWidget extends StatelessWidget {
)
],
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
).onPress(() {
// Navigator.pushNamed(context, AppRoutes.workList);
data.fetchWorkListCounter();
).onPress(() async {
//await data.fetchWorkListCounter(context, showLoading: true);
Navigator.pushNamed(context, AppRoutes.workList);
}),
data.isMissingSwipeLoading
? MenuShimmer().onPress(() {
data.fetchWorkListCounter();
data.fetchWorkListCounter(context);
})
: Container(
decoration: BoxDecoration(
@ -79,7 +79,7 @@ class MenusWidget extends StatelessWidget {
}),
data.isLeaveTicketBalanceLoading
? MenuShimmer().onPress(() {
data.fetchWorkListCounter();
data.fetchWorkListCounter(context);
})
: Container(
decoration: BoxDecoration(
@ -106,7 +106,7 @@ class MenusWidget extends StatelessWidget {
}),
data.isLeaveTicketBalanceLoading
? MenuShimmer().onPress(() {
data.fetchWorkListCounter();
data.fetchWorkListCounter(context);
})
: Container(
decoration: BoxDecoration(

@ -69,7 +69,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, null);
Utils.handleException(ex, context, null);
}
}

@ -69,12 +69,13 @@ class _LoginScreenState extends State<LoginScreen> {
}
String? firebaseToken;
GetMobileLoginInfoListModel? loginInfo;
Future<void> checkFirebaseToken() async {
try {
Utils.showLoading(context);
firebaseToken = await _firebaseMessaging.getToken();
GetMobileLoginInfoListModel? loginInfo = await LoginApiClient().getMobileLoginInfoNEW(firebaseToken ?? "", Platform.isAndroid ? "android" : "ios");
loginInfo = await LoginApiClient().getMobileLoginInfoNEW(firebaseToken ?? "", Platform.isAndroid ? "android" : "ios");
loginInfo!.deviceToken = firebaseToken;
if (loginInfo == null) {
Utils.hideLoading(context);
print("Device token not found");
@ -87,7 +88,7 @@ class _LoginScreenState extends State<LoginScreen> {
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, null);
Utils.handleException(ex, context, null);
}
}
@ -112,14 +113,14 @@ class _LoginScreenState extends State<LoginScreen> {
}
Utils.hideLoading(context);
if (_autoLogin) {
Navigator.pushNamed(context, AppRoutes.verifyLastLogin);
Navigator.pushNamed(context, AppRoutes.verifyLastLogin, arguments: loginInfo);
} else {
Navigator.pushNamed(context, AppRoutes.verifyLogin, arguments: "$firebaseToken");
}
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, (msg) {
Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(context, msg);
});
}
@ -128,7 +129,7 @@ class _LoginScreenState extends State<LoginScreen> {
@override
Widget build(BuildContext context) {
username.text = "15153";
password.text="Riyadh@1234";
password.text = "Xy12345@";
return Scaffold(
body: Column(
children: [

@ -46,7 +46,7 @@ class _NewPasswordScreenState extends State<NewPasswordScreen> {
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, (msg) {
Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(context, msg);
});
}

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@ -7,6 +9,7 @@ import 'package:local_auth/local_auth.dart';
import 'package:mohem_flutter_app/api/login_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/date_uitl.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart';
import 'package:mohem_flutter_app/dialogs/otp_dialog.dart';
@ -16,6 +19,7 @@ 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/basic_member_information_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/get_mobile_login_info_list_model.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
class VerifyLastLoginScreen extends StatefulWidget {
@ -30,6 +34,7 @@ class VerifyLastLoginScreen extends StatefulWidget {
class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
final LocalAuthentication auth = LocalAuthentication();
List<BiometricType> _availableBioMetricType = [];
GetMobileLoginInfoListModel? mobileLoginInfoListModel;
@override
void initState() {
@ -40,6 +45,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
@override
Widget build(BuildContext context) {
mobileLoginInfoListModel ??= ModalRoute.of(context)!.settings.arguments as GetMobileLoginInfoListModel;
String empName = AppState().isArabic(context) ? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr! : AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn!;
return Scaffold(
appBar: AppBar(
@ -64,7 +70,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.welcomeBack.tr().toText12(),
empName.toText24(isBold: true),
mobileLoginInfoListModel!.employeeName!.toText24(isBold: true),
10.height,
LocaleKeys.wouldYouLikeToLoginWithCurrentUsername.tr().toText16(),
Container(
@ -88,14 +94,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
LocaleKeys.lastLoginDetails.tr().toText16(),
// Text(
// user.editedOn != null
// ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user.editedOn))
// : user.createdOn != null
// ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user.createdOn))
// : '--',
// style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
// ),
DateUtil.formatDateToDate(DateUtil.convertStringToDate(mobileLoginInfoListModel!.editedOn!), false).toText12(),
],
),
Row(
@ -103,24 +102,9 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
LocaleKeys.verificationType.tr().toText10(color: MyColors.grey57Color),
Text(
"SMS",
// " " + getType(user.logInType, context),
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
),
),
getVerificationType(mobileLoginInfoListModel!.loginType!).toText12(),
Expanded(child: SizedBox()),
// Text(
// user.editedOn != null
// ? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user.editedOn), false)
// : user.createdOn != null
// ? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user.createdOn), false)
// : '--',
// style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48),
// ),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(mobileLoginInfoListModel!.editedOn!)).toText12(),
],
)
],
@ -201,419 +185,18 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
if (mounted) setState(() {});
}
// authenticateUser(int type, {int isActive}) {
// GifLoaderDialogUtils.showMyDialog(context);
// if (type == 2 || type == 3) {
// fingrePrintBefore = type;
// }
// this.selectedOption = fingrePrintBefore != null ? fingrePrintBefore : type;
//
// switch (type) {
// case 1:
// this.loginWithSMS(type);
// break;
// case 2:
// this.loginWithFingurePrintFace(type, isActive);
// break;
// case 3:
// this.loginWithFingurePrintFace(type, isActive);
// break;
// case 4:
// this.loginWithSMS(type);
// break;
// default:
// break;
// }
// sharedPref.setInt(LAST_LOGIN, this.selectedOption); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN);
// }
//
// loginWithSMS(type) {
// //if (!el.disabled) {
// if (this.user != null && this.registerd_data == null) {
// this.checkUserAuthentication(type);
// } else {
// if (this.loginTokenID != null) {
// // Future.delayed(Duration(seconds: 1), () {
// this.sendActivationCode(type);
// // });
// } else {
// this.checkUserAuthentication(type);
// }
// }
// }
//
// checkUserAuthentication(type) {
// showLoader(true);
// var req = getCommonRequest(type: type);
// req.logInTokenID = "";
//
// var request = CheckPatientAuthenticationReq.fromJson(req.toJson());
//
// sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request);
// authService
// .checkPatientAuthentication(request)
// .then((value) => {
// GifLoaderDialogUtils.hideDialog(context),
// if (value['isSMSSent'])
// {
// sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']),
// this.loginTokenID = value['LogInTokenID'],
// sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request),
// // Future.delayed(Duration(seconds: 1), () {
// this.sendActivationCode(type)
// // })
// }
// else
// {
// if (value['IsAuthenticated']) {this.checkActivationCode()}
// }
// })
// .catchError((err) {
// print(err);
// GifLoaderDialogUtils.hideDialog(context);
// });
// }
//
// sendActivationCode(type) async {
// var request = this.getCommonRequest(type: type);
// request.sMSSignature = await SMSOTP.getSignature();
// GifLoaderDialogUtils.showMyDialog(context);
// if (healthId != null) {
// // final DateFormat dateFormat = DateFormat('MM/dd/yyyy');
// // final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy');
// request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob));
// request.healthId = healthId;
// request.isHijri = isHijri;
// await this.authService.sendActivationCodeRegister(request).then((result) {
// GifLoaderDialogUtils.hideDialog(context);
// if (result != null && result['isSMSSent'] == true) {
// this.startSMSService(type);
// }
// }).catchError((r) {
// GifLoaderDialogUtils.hideDialog(context);
// });
// } else {
// request.dob = "";
// request.healthId = "";
// request.isHijri = 0;
// await this.authService.sendActivationCode(request).then((result) {
// GifLoaderDialogUtils.hideDialog(context);
// if (result != null && result['isSMSSent'] == true) {
// this.startSMSService(type);
// }
// }).catchError((r) {
// GifLoaderDialogUtils.hideDialog(context);
// });
// }
// }
//
// var tempType;
//
// startSMSService(type) {
// tempType = type;
// new SMSOTP(
// context,
// type,
// this.mobileNumber,
// (value) {
// this.checkActivationCode(value: value);
// },
// () => {
// Navigator.pop(context),
// },
// ).displayDialog(context);
// }
//
// loginWithFingurePrintFace(type, int isActive) async {
// if (isActive == 1 || isActive == 0) {
// const iosStrings =
// const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
//
// try {
// authenticated = await auth.authenticateWithBiometrics(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, iOSAuthStrings: iosStrings);
// } on PlatformException catch (e) {
// GifLoaderDialogUtils.hideDialog(context);
// AppToast.showErrorToast(message: 'Please enable your Touch or Face ID');
// }
//
// if (authenticated == true) {
// // if (user != null && (user.logInType == 2 || user.logInType == 3)) {
// // this.checkActivationCode();
// // } else {
//
// var request = this.getCommonRequest(type: type);
// this.getMobileInfo(request);
// //}
// }
// }
// }
//
// getMobileInfo(request) {
// // GifLoaderDialogUtils.showMyDialog(context);
// this.authService.getLoginInfo(request).then((result) {
// GifLoaderDialogUtils.hideDialog(context);
// if (result['SMSLoginRequired'] == false) {
// this.loginTokenID = result['LogInTokenID'];
// this.patientOutSA = result['PatientOutSA'];
// // sms for register the biometric
// if (result['isSMSSent']) {
// setState(() {
// isMoreOption = true;
// this.onlySMSBox = true;
// // this.fingrePrintBefore = true;
// });
// //this.button();
// } else {
// setDefault();
// checkActivationCode();
// }
// } else {
// if (result['IsAuthenticated'] == true) {
// setState(() {
// isMoreOption = true;
// this.onlySMSBox = true;
// // this.fingrePrintBefore = true;
// });
// }
// }
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// print(err);
// });
// }
//
// setDefault() async {
// if (await sharedPref.getObject(IMEI_USER_DATA) != null) user = SelectDeviceIMEIRES.fromJson(await sharedPref.getObject(IMEI_USER_DATA));
//
// if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) {
// isMoreOption = true;
// this.registerd_data = CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN));
// }
//
// this.mobileNumber = this.registerd_data != null ? this.registerd_data.patientMobileNumber : int.parse(this.user.mobile);
// this.zipCode = this.registerd_data != null
// ? this.registerd_data.zipCode
// : this.user.outSA == true
// ? "971"
// : "966";
// this.patientOutSA = this.registerd_data != null
// ? this.registerd_data.zipCode == "966"
// ? 0
// : 1
// : this.user.outSA;
// if (this.registerd_data != null) {
// this.loginTokenID = await sharedPref.getString(LOGIN_TOKEN_ID);
// this.loginType = this.registerd_data.searchType;
// }
// var nhic = await sharedPref.getObject(NHIC_DATA);
// if (nhic != null) {
// final DateFormat dateFormat = DateFormat('MM/dd/yyyy');
// final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy');
// dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth']));
//
// isHijri = nhic['IsHijri'] ? 1 : 0;
// healthId = nhic['HealthId'];
// }
// this.deviceToken = await sharedPref.getString(PUSH_TOKEN);
// this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null
// ? await sharedPref.getInt(LAST_LOGIN)
// : user != null
// ? user.logInType
// : null;
//
// //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN);
// }
//
// getCommonRequest({type}) {
// var request = SendActivationRequest();
// request.patientMobileNumber = this.mobileNumber;
// request.mobileNo = '0' + this.mobileNumber.toString();
// request.deviceToken = this.deviceToken;
// request.projectOutSA = this.patientOutSA == true ? true : false;
// request.loginType = this.selectedOption;
// request.oTPSendType = type == 1 ? type : 2; //this.selectedOption == 1 ? 1 : 2;
// request.zipCode = this.zipCode;
//
// request.logInTokenID = this.loginTokenID ?? "";
//
// if (this.registerd_data != null) {
// request.searchType = this.registerd_data.searchType != null ? this.registerd_data.searchType : 1;
// request.patientID = this.registerd_data.patientID != null ? this.registerd_data.patientID : 0;
// request.patientIdentificationID = request.nationalID = this.registerd_data.patientIdentificationID != null ? this.registerd_data.patientIdentificationID : '0';
//
// request.isRegister = this.registerd_data.isRegister;
// } else {
// request.searchType = request.searchType != null ? request.searchType : 2;
// request.patientID = this.user.patientID != null ? this.user.patientID : 0;
// request.nationalID = request.nationalID != null ? request.nationalID : '0';
// request.patientIdentificationID = request.patientIdentificationID != null ? request.patientIdentificationID : '0';
// request.isRegister = false;
// }
// request.deviceTypeID = request.searchType;
// return request;
// }
//
// // checkActivationCode({value}) async {
// // // Navigator.pop(context);
// // GifLoaderDialogUtils.showMyDialog(context);
// // var request = this.getCommonRequest().toJson();
// // dynamic res;
// // if (healthId != null) {
// // request['DOB'] = dob;
// // request['HealthId'] = healthId;
// // request['IsHijri'] = isHijri;
// //
// // authService
// // .checkActivationCodeRegister(request, value)
// // .then((result) => {
// // res = result,
// // if (result is Map)
// // {
// // result = CheckActivationCode.fromJson(result),
// // if (this.registerd_data != null && this.registerd_data.isRegister == true)
// // {
// // widget.changePageViewIndex(1),
// // Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)),
// // }
// // }
// // else
// // {
// // // Navigator.of(context).pop(),
// // GifLoaderDialogUtils.hideDialog(context),
// // Future.delayed(Duration(seconds: 1), () {
// // AppToast.showErrorToast(message: result);
// // }),
// // }
// // })
// // .catchError((err) {
// // print(err);
// // GifLoaderDialogUtils.hideDialog(context);
// // Future.delayed(Duration(seconds: 1), () {
// // AppToast.showErrorToast(message: err);
// // startSMSService(tempType);
// // });
// // });
// // } else {
// // authService
// // .checkActivationCode(request, value)
// // .then((result) => {
// // res = result,
// // if (result is Map)
// // {
// // result = CheckActivationCode.fromJson(result),
// // if (this.registerd_data != null && this.registerd_data.isRegister == true)
// // {
// // widget.changePageViewIndex(1),
// // Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)),
// // }
// // else
// // {
// // sharedPref.remove(FAMILY_FILE),
// // result.list.isFamily = false,
// // userData = result.list,
// // sharedPref.setString(BLOOD_TYPE, result.patientBloodType),
// // authenticatedUserObject.user = result.list,
// // projectViewModel.setPrivilege(privilegeList: res),
// // sharedPref.setObject(MAIN_USER, result.list),
// // sharedPref.setObject(USER_PROFILE, result.list),
// // loginTokenID = result.logInTokenID,
// // sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
// // sharedPref.setString(TOKEN, result.authenticationTokenID),
// // checkIfUserAgreedBefore(result),
// // }
// // }
// // else
// // {
// // // // Navigator.of(context).pop(),
// // // GifLoaderDialogUtils.hideDialog(context),
// // // Future.delayed(Duration(seconds: 1), () {
// // // AppToast.showErrorToast(message: result);
// // // startSMSService(tempType);
// // // }),
// // }
// // })
// // .catchError((err) {
// // // print(err);
// // // GifLoaderDialogUtils.hideDialog(context);
// // // Future.delayed(Duration(seconds: 1), () {
// // // AppToast.showErrorToast(message: err);
// // // startSMSService(tempType);
// // // });
// // });
// // }
// // }
//
// // checkIfUserAgreedBefore(CheckActivationCode result) {
// // if (result.isNeedUserAgreement == true) {
// // //move to agreement page.
// // } else {
// // goToHome();
// // }
// // }
//
// insertIMEI() {
// authService.insertDeviceImei(selectedOption).then((value) => {}).catchError((err) {
// print(err);
// });
// }
//
// // getToDoCount() {
// // toDoProvider.setState(0, true, "0");
// // ClinicListService service = new ClinicListService();
// // service.getActiveAppointmentNo(context).then((res) {
// // if (res['MessageStatus'] == 1) {
// // toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
// // } else {}
// // }).catchError((err) {
// // print(err);
// // });
// // }
//
// // goToHome() async {
// // authenticatedUserObject.isLogin = true;
// // appointmentRateViewModel.isLogin = true;
// // projectViewModel.isLogin = true;
// // projectViewModel.user = authenticatedUserObject.user;
// // await authenticatedUserObject.getUser(getUser: true);
// //
// // // getToDoCount();
// //
// // appointmentRateViewModel
// // .getIsLastAppointmentRatedList()
// // .then((value) => {
// // getToDoCount(),
// // GifLoaderDialogUtils.hideDialog(AppGlobal.context),
// // if (appointmentRateViewModel.isHaveAppointmentNotRate)
// // {
// // Navigator.pushAndRemoveUntil(
// // context,
// // FadePage(
// // page: RateAppointmentDoctor(),
// // ),
// // (r) => false)
// // }
// // else
// // {
// // Navigator.pushAndRemoveUntil(
// // context,
// // FadePage(
// // page: LandingPage(),
// // ),
// // (r) => false)
// // },
// // insertIMEI()
// // })
// // .catchError((err) {
// // print(err);
// // });
// // }
//
// loading(flag) {
// // setState(() {
// // isLoading = flag;
// // });
// }
//
String getVerificationType(int type) {
if (type == 1) {
LocaleKeys.sms.tr();
} else if (type == 2) {
return LocaleKeys.fingerPrint.tr();
} else if (type == 3) {
return LocaleKeys.face.tr();
} else if (type == 4) {
return LocaleKeys.whatsapp.tr();
}
return "";
}
Future<bool> loginWithFaceIDAndBiometrics() async {
IOSAuthMessages iosStrings =
@ -654,8 +237,8 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
}
await LoginApiClient().checkMobileAppVersion();
await LoginApiClient().memberLogin(AppState().getUserName!, AppState().password!);
BasicMemberInformationModel? memberInformationModel = await LoginApiClient()
.mohemmSendActivationCodeByOTPNotificationType(checkBiometricIsAvailable(BiometricType.fingerprint) ? 1 : 0, AppState().memberLoginList?.pMOBILENUMBER, _flag, AppState().getUserName);
BasicMemberInformationModel? memberInformationModel = await LoginApiClient().mohemmSendActivationCodeByOTPNotificationType(
checkBiometricIsAvailable(BiometricType.fingerprint) ? 1 : 0, AppState().memberLoginList?.pMOBILENUMBER, _flag, AppState().getUserName);
Utils.hideLoading(context);
OtpDialog(
context,
@ -665,6 +248,15 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
Utils.showLoading(context);
try {
GenericResponseModel? genericResponseModel = await LoginApiClient().checkActivationCode(false, AppState().memberLoginList?.pMOBILENUMBER, value, AppState().getUserName);
GenericResponseModel? genericResponseModel1 = await LoginApiClient().insertMobileLoginInfoNEW(
AppState().memberLoginList?.pEMAILADDRESS ?? "",
genericResponseModel?.pSESSIONID ?? 0,
genericResponseModel?.memberInformationList![0].eMPLOYEENAME ?? "",
_flag,
AppState().memberLoginList?.pMOBILENUMBER ?? "",
AppState().getUserName!,
mobileLoginInfoListModel!.deviceToken!,
Platform.isAndroid ? "android" : "ios");
if (genericResponseModel?.errorMessage != null) {
Utils.showToast(genericResponseModel?.errorMessage ?? "");
// Navigator.pop(context);
@ -675,7 +267,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, null);
Utils.handleException(ex, context, null);
}
},
() => {

@ -692,7 +692,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, null);
Utils.handleException(ex, context, null);
}
},
() => {
@ -702,7 +702,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, null);
Utils.handleException(ex, context, null);
}
}
},

@ -99,7 +99,7 @@
// setState(() {});
// } catch (ex) {
// print(ex);
// Utils.handleException(ex, null);
// Utils.handleException(ex, context, null);
// Utils.hideLoading(context);
// }
// }
@ -132,7 +132,7 @@
// Utils.hideLoading(context);
// Navigator.pop(context);
// } catch (ex) {
// Utils.handleException(ex, null);
// Utils.handleException(ex, context, null);
// Utils.hideLoading(context);
// }
// }

@ -0,0 +1,182 @@
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/extensions/int_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/get_mo_Item_history_list_model.dart';
import 'package:mohem_flutter_app/models/get_po_Item_history_list_model.dart';
import 'package:mohem_flutter_app/models/get_quotation_analysis_list_model.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
class ItemHistoryScreenParams {
String? title;
bool isItemHistory;
bool isMO;
int? pItemId;
int? pPoHeaderId;
int? pOrgId;
ItemHistoryScreenParams({@required this.title, this.isItemHistory = true, this.isMO = true, this.pItemId, this.pPoHeaderId, this.pOrgId});
}
class ItemHistoryScreen extends StatefulWidget {
ItemHistoryScreen({Key? key}) : super(key: key);
@override
_ItemHistoryScreenState createState() {
return _ItemHistoryScreenState();
}
}
class _ItemHistoryScreenState extends State<ItemHistoryScreen> {
ItemHistoryScreenParams? _screenParams;
List<GetMoItemHistoryList> moItemHistoryList = [];
List<GetPoItemHistoryList> poItemHistoryList = [];
List<GetQuotationAnalysisList> quotationAnalysisList = [];
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
void loadData() {
if (_screenParams == null) {
_screenParams = ModalRoute.of(context)!.settings.arguments as ItemHistoryScreenParams;
getDataFromApi();
}
}
void getDataFromApi() async {
try {
Utils.showLoading(context);
if (_screenParams!.isItemHistory) {
if (_screenParams!.isMO) {
moItemHistoryList = await WorkListApiClient().getMoItemHistory(_screenParams!.pItemId!, _screenParams!.pOrgId!);
} else {
poItemHistoryList = await WorkListApiClient().getPoItemHistory(_screenParams!.pItemId!);
}
} else {
quotationAnalysisList = await WorkListApiClient().getQuotationAnalysis(_screenParams!.pItemId!, _screenParams!.pPoHeaderId!);
}
Utils.hideLoading(context);
setState(() {});
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
@override
Widget build(BuildContext context) {
loadData();
return Scaffold(
appBar: AppBarWidget(context, title: _screenParams?.title ?? ""),
backgroundColor: Colors.white,
body: ListView(
padding: const EdgeInsets.all(21),
physics: const BouncingScrollPhysics(),
children: [
if (moItemHistoryList.isNotEmpty) loadMoItemHistoryData(),
if (poItemHistoryList.isNotEmpty) loadPoItemHistoryData(),
if (quotationAnalysisList.isNotEmpty) loadQuotationAnalysisData()
],
),
);
}
Widget loadMoItemHistoryData() {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailView(LocaleKeys.requestNumber.tr(), moItemHistoryList[index].rEQUESTNUMBER ?? ""),
ItemDetailView(LocaleKeys.uom.tr(), moItemHistoryList[index].uNITOFMEASURE ?? ""),
ItemDetailView(LocaleKeys.quantity.tr(), moItemHistoryList[index].qUANTITY?.toString() ?? ""),
ItemDetailView(LocaleKeys.dateRequired.tr(), moItemHistoryList[index].dATEREQUIRED ?? ""),
ItemDetailView(LocaleKeys.lineStatus.tr(), moItemHistoryList[index].lINESTATUSDIS ?? ""),
ItemDetailView(LocaleKeys.statusDate.tr(), moItemHistoryList[index].sTATUSDATE ?? ""),
ItemDetailView(LocaleKeys.transactionType.tr(), moItemHistoryList[index].tRANSACTIONTYPENAME ?? ""),
ItemDetailView(LocaleKeys.organization.tr(), moItemHistoryList[index].oRGANIZATIONNAME ?? ""),
ItemDetailView(LocaleKeys.operatingCode.tr(), moItemHistoryList[index].oRGANIZATIONCODE ?? ""),
ItemDetailView(LocaleKeys.operatingUnit.tr(), moItemHistoryList[index].oPERATINGUNITNAME ?? ""),
ItemDetailView(LocaleKeys.fromSubInventory.tr(), moItemHistoryList[index].fROMSUBINVENTORYCODE ?? ""),
ItemDetailView(LocaleKeys.fromLocator.tr(), moItemHistoryList[index].fROMLOCATOR ?? ""),
ItemDetailView(LocaleKeys.toSubInventory.tr(), moItemHistoryList[index].tOSUBINVENTORYCODE ?? ""),
ItemDetailView(LocaleKeys.toLocator.tr(), moItemHistoryList[index].tOLOCATOR ?? ""),
ItemDetailView(LocaleKeys.shipToLocation.tr(), moItemHistoryList[index].sHIPTOLOCATION ?? ""),
],
).objectContainerView(),
separatorBuilder: (cxt, index) => 12.height,
itemCount: moItemHistoryList.length);
}
Widget loadPoItemHistoryData() {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailView(LocaleKeys.operatingUnit.tr(), poItemHistoryList[index].oUNAME ?? ""),
ItemDetailView(LocaleKeys.poNumber.tr(), poItemHistoryList[index].pONUMBER ?? ""),
ItemDetailView(LocaleKeys.revision.tr(), poItemHistoryList[index].rEVISIONNUM?.toString() ?? ""),
ItemDetailView(LocaleKeys.creationDate.tr(), poItemHistoryList[index].cREATIONDATE ?? ""),
ItemDetailView(LocaleKeys.supplier.tr(), poItemHistoryList[index].sUPPLIER ?? ""),
ItemDetailView(LocaleKeys.buyer.tr(), poItemHistoryList[index].bUYER ?? ""),
ItemDetailView(LocaleKeys.uom.tr(), poItemHistoryList[index].uOM ?? ""),
ItemDetailView(LocaleKeys.quantityOrdered.tr(), poItemHistoryList[index].qUANTITYORDERED?.toString() ?? ""),
ItemDetailView(LocaleKeys.quantityReceived.tr(), poItemHistoryList[index].qUANTITYRECEIVED?.toString() ?? ""),
ItemDetailView(LocaleKeys.bonusQuantity.tr(), poItemHistoryList[index].bONUSQUANTITY?.toString() ?? ""),
ItemDetailView(LocaleKeys.purchasePrice.tr(), poItemHistoryList[index].pURCHASEPRICE?.toString() ?? ""),
ItemDetailView(LocaleKeys.discountPer.tr(), poItemHistoryList[index].dISCOUNTPERCENTAGE?.toString() ?? ""),
ItemDetailView(LocaleKeys.balanceQuantity.tr(), poItemHistoryList[index].bALANCEQUANTITY?.toString() ?? ""),
ItemDetailView(LocaleKeys.netPrice.tr(), poItemHistoryList[index].nETPRICE?.toString() ?? ""),
ItemDetailView(LocaleKeys.closureStatus.tr(), poItemHistoryList[index].cLOSEDCODE ?? ""),
],
).objectContainerView(),
separatorBuilder: (cxt, index) => 12.height,
itemCount: poItemHistoryList.length);
}
Widget loadQuotationAnalysisData() {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailView(LocaleKeys.quotationNumber.tr(), quotationAnalysisList[index].qUOTNUM ?? ""),
ItemDetailView(LocaleKeys.vendorName.tr(), quotationAnalysisList[index].vENDORNAME ?? ""),
ItemDetailView(LocaleKeys.itemCode.tr(), quotationAnalysisList[index].iTEMCODE ?? ""),
ItemDetailView(LocaleKeys.description.tr(), quotationAnalysisList[index].iTEMDESC ?? ""),
ItemDetailView(LocaleKeys.quotationQty.tr(), quotationAnalysisList[index].qUOTQTY?.toString() ?? ""),
ItemDetailView(LocaleKeys.quotationUOM.tr(), quotationAnalysisList[index].qUOTUOM ?? ""),
ItemDetailView(LocaleKeys.quotationNetPrice.tr(), quotationAnalysisList[index].qUOTUNITPRICE?.toString() ?? ""),
ItemDetailView(LocaleKeys.quotationLineTotal.tr(), quotationAnalysisList[index].qUOTLINETOTAL?.toString() ?? ""),
ItemDetailView(LocaleKeys.quotationBonusQuantity.tr(), quotationAnalysisList[index].qUOTBONUSQTY ?? ""),
ItemDetailView(LocaleKeys.quotationDeliveryDate.tr(), quotationAnalysisList[index].qUOTDELIVERYDATE ?? ""),
ItemDetailView(LocaleKeys.quotationMFGPartNumber.tr(), quotationAnalysisList[index].qUOTMFGPARTNUM ?? ""),
ItemDetailView(LocaleKeys.rfqNumber.tr(), quotationAnalysisList[index].rFQNUM ?? ""),
ItemDetailView(LocaleKeys.rfqQty.tr(), quotationAnalysisList[index].rFQQTY?.toString() ?? ""),
ItemDetailView(LocaleKeys.rfqUOM.tr(), quotationAnalysisList[index].rFQUOM ?? ""),
],
).objectContainerView(title: "${quotationAnalysisList[index].iTEMCODE}-${quotationAnalysisList[index].iTEMDESC}"),
separatorBuilder: (cxt, index) => 12.height,
itemCount: quotationAnalysisList.length);
}
}

@ -1,39 +1,46 @@
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/date_uitl.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/get_action_history_list_model.dart';
import 'package:mohem_flutter_app/ui/work_list/sheets/delegate_sheet.dart';
import 'package:mohem_flutter_app/ui/work_list/sheets/request_more_info_sheet.dart';
import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
import 'package:mohem_flutter_app/widgets/circular_avatar.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'dart:math' as math;
class ActionsFragment extends StatelessWidget {
List<GetActionHistoryList> actionHistoryList;
ActionsFragment(this.actionHistoryList, {Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
height: double.infinity,
child: ListView.separated(
itemCount: actionsList.length,
itemCount: actionHistoryList.length,
padding: EdgeInsets.all(21),
itemBuilder: (context, index) {
return showItem(context, actionsList[index]);
return showItem(context, actionHistoryList[index]);
},
separatorBuilder: (BuildContext context, int index) {
return 16.height;
return 12.height;
},
),
);
}
Widget showItem(BuildContext context, Color color) {
Widget showItem(BuildContext context, GetActionHistoryList actionHistory) {
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
@ -47,94 +54,54 @@ class ActionsFragment extends StatelessWidget {
clipBehavior: Clip.antiAlias,
children: [
Positioned(
left: -21,
left: -20,
top: -10,
child: Transform.rotate(
angle: 125,
angle: 15,
child: Container(
width: 60,
height: 20,
color: color,
width: 50,
height: 30,
color: getStatusColor(actionHistory.aCTIONCODE!),
),
),
),
Column(
children: [
Padding(
padding: const EdgeInsets.only(left: 12, right: 12, top: 12),
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircularAvatar(),
12.width,
CircularAvatar(url: actionHistory.eMPLOYEEIMAGE ?? "", isImageBase64: true, height: 34, width: 34),
9.width,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Mahmoud Shrouf".toText16(),
6.height,
"Missing Swipe Request for Hussain, Mohammad has been approved"
.toText12(),
3.height,
actionHistory.nAME!.toText16(),
if ((actionHistory.nOTE ?? "").isNotEmpty) actionHistory.nOTE!.toText12(color: MyColors.grey57Color),
4.height,
Row(
children: [
"Submitted".toText10(),
12.width,
"On 07 Jan 2021"
.toText12(color: MyColors.lightTextColor)
actionHistory.aCTION!.toText10(),
8.width,
if (actionHistory.nOTIFICATIONDATE!.isNotEmpty)
DateUtil.formatDateToDate(DateUtil.convertSimpleStringDateToDateddMMyyyy(actionHistory.nOTIFICATIONDATE!), false).toText12(color: MyColors.lightTextColor),
],
)
],
),
)
],
),
],
),
),
12.height,
Container(
width: double.infinity,
height: 1,
color: MyColors.lightTextColor,
),
).paddingOnly(top: 19, left: 16, right: 16, bottom: 12),
Container(width: double.infinity, height: 1, color: MyColors.lightGreyEFColor),
Row(
children: [
Expanded(
child: InkWell(
onTap: () {
showMyBottomSheet(context,
child: RequestMoreInfoSheet());
},
child: Center(
child: "Request Info"
.toText12(isBold: true)
.paddingOnly(
left: 21, right: 21, top: 8, bottom: 8),
),
),
),
Center(
child: Container(
width: 1,
height: 45,
color: MyColors.lightTextColor,
),
),
Expanded(
child: InkWell(
onTap: () {
LocaleKeys.request_info.tr().toText12(color: MyColors.grey67Color).center.paddingOnly(top: 6, bottom: 6).onPress(() {
showMyBottomSheet(context, child: RequestMoreInfoSheet());
}).expanded,
Container(width: 1, height: 30, color: MyColors.lightGreyEFColor),
LocaleKeys.delegate.tr().toText12(color: MyColors.gradiantEndColor).center.paddingOnly(top: 6, bottom: 6).onPress(() {
showMyBottomSheet(context, child: DelegateSheet());
},
child: Center(
child: "Delegate"
.toText12(
color: MyColors.gradiantEndColor, isBold: true)
.paddingOnly(
left: 21, right: 21, top: 8, bottom: 8),
),
),
),
}).expanded,
],
),
],
@ -143,6 +110,20 @@ class ActionsFragment extends StatelessWidget {
),
);
}
Color getStatusColor(String code) {
if (code == "SUBMIT") {
return const Color(0xff2E303A);
} else if (code == "REJECTED") {
return const Color(0xffD02127);
} else if (code == "APPROVED") {
return const Color(0xff1FA269);
} else if (code == "REQUEST_INFO") {
return const Color(0xff2E303A);
} else {
return const Color(0xff2E303A);
}
}
}
List<Color> actionsList = [

@ -1,61 +1,54 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.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/models/get_attachement_list_model.dart';
class AttachmentsFragment extends StatelessWidget {
final List<GetAttachementList> getAttachmentList;
AttachmentsFragment(this.getAttachmentList);
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
height: double.infinity,
child: ListView.separated(
itemCount: 2,
padding: EdgeInsets.all(21),
return ListView.separated(
itemCount: getAttachmentList.length,
itemBuilder: (context, index) {
return showItem(attachmentsList[index]);
},
separatorBuilder: (BuildContext context, int index) {
return 21.height;
},
),
);
}
Widget showItem(Attachments attachments) {
return Container(
width: double.infinity,
padding: EdgeInsets.all(21),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
),
child: Row(
return Row(
children: [
SvgPicture.asset(attachments.icon),
SvgPicture.asset(determineFileIcon(getAttachmentList[index].fILECONTENTTYPE ?? "")),
12.width,
attachments.title.toText16()
(getAttachmentList[index].fILENAME?.capitalizeFirstofEach ?? "").toText16().expanded,
],
),
);
}
).objectContainerView().onPress(() {});
},
separatorBuilder: (BuildContext context, int index) => 12.height,
).paddingAll(21);
}
class Attachments {
String title;
String icon;
Attachments(this.title, this.icon);
String determineFileIcon(String fileContentType) {
String icon = "";
switch (fileContentType) {
case "pdf":
icon = "assets/images/pdf.svg";
break;
case "xls":
icon = "assets/images/xls.svg";
break;
case "xlsx":
icon = "assets/images/xls.svg";
break;
case "png":
icon = "assets/images/png.svg";
break;
case "jpg":
icon = "assets/images/jpg.svg";
break;
case "jpeg":
icon = "assets/images/jpg.svg";
break;
}
return icon;
}
}
List<Attachments> attachmentsList = [
Attachments("Attachment File Name.png", "assets/images/png.svg"),
Attachments("Attachment File Name.pdf", "assets/images/pdf.svg"),
];

@ -0,0 +1,72 @@
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.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/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
class DetailFragment extends StatefulWidget {
WorkListResponseModel? workListData;
MemberInformationListModel? memberInformationListModel;
DetailFragment(this.workListData, this.memberInformationListModel);
@override
State<DetailFragment> createState() => _DetailFragmentState();
}
class _DetailFragmentState extends State<DetailFragment> {
bool isOpened = false;
@override
Widget build(BuildContext context) {
return Column(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailView(LocaleKeys.from.tr(), widget.workListData!.fROMUSER ?? ""),
ItemDetailView(LocaleKeys.to.tr(), widget.workListData!.tOUSER ?? ""),
ItemDetailView(LocaleKeys.sent.tr(), widget.workListData!.bEGINDATE ?? ""),
ItemDetailView(LocaleKeys.closed.tr(), widget.workListData!.eNDDATE ?? ""),
ItemDetailView(LocaleKeys.id.tr(), widget.workListData!.nOTIFICATIONID?.toString() ?? ""),
ItemDetailView(LocaleKeys.responder.tr(), widget.workListData!.rESPONDER ?? ""),
],
).objectContainerView(),
12.height,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailView(LocaleKeys.employeeNumber.tr(), widget.memberInformationListModel!.eMPLOYEENUMBER ?? ""),
ItemDetailView(LocaleKeys.employeeName.tr(),
(AppState().isArabic(context) ? widget.memberInformationListModel!.eMPLOYEENAMEAr : widget.memberInformationListModel!.eMPLOYEENAMEEn) ?? ""),
ItemDetailView(LocaleKeys.jobTitle.tr(), makePositionName(widget.memberInformationListModel!.pOSITIONNAME ?? "")),
ItemDetailView(LocaleKeys.grade.tr(), widget.memberInformationListModel!.gRADENAME ?? ""),
ItemDetailView(LocaleKeys.jobCategory.tr(), makePositionName(widget.memberInformationListModel!.pOSITIONNAME ?? "")),
ItemDetailView(LocaleKeys.category.tr(), widget.memberInformationListModel!.eMPLOYMENTCATEGORYMEANING ?? ""),
ItemDetailView(LocaleKeys.employeeEmailAddress.tr(), widget.memberInformationListModel!.eMPLOYEEEMAILADDRESS ?? ""),
ItemDetailView(LocaleKeys.payrollBranch.tr(), widget.memberInformationListModel!.pAYROLLNAME ?? ""),
],
).objectContainerView(),
],
).paddingAll(21);
}
String makePositionName(String job) {
String jobName = "";
List<String> list = job.split(".").toList();
if (list.length > 1) {
list.removeLast();
jobName = list.join(" ");
}
return jobName;
}
}

@ -1,69 +1,180 @@
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/date_uitl.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/get_absence_collection_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_item_creation_ntf_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_po_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
class InfoFragment extends StatelessWidget {
WorkListResponseModel? workListData;
List<POHeader> poHeaderList;
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotifications;
List<GetStampMsNotificationBodyList>? getStampMsNotifications;
List<GetStampNsNotificationBodyList>? getStampNsNotifications;
List<ItemCreationHeader> itemCreationHeader;
InfoFragment(
{this.workListData,
this.poHeaderList = const <POHeader>[],
this.itemCreationHeader = const <ItemCreationHeader>[],
this.getAbsenceCollectionNotifications,
this.getStampMsNotifications,
this.getStampNsNotifications});
@override
Widget build(BuildContext context) {
List<Widget> uiList = [
if ((workListData?.iTEMTYPE ?? "") == "INVMOA")
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailView(LocaleKeys.from.tr(), workListData!.fROMUSER ?? ""),
ItemDetailView(LocaleKeys.to.tr(), workListData!.tOUSER ?? ""),
ItemDetailView(LocaleKeys.sent.tr(), workListData!.bEGINDATE ?? ""),
ItemDetailView(LocaleKeys.closed.tr(), workListData!.eNDDATE ?? ""),
ItemDetailView(LocaleKeys.id.tr(), workListData!.nOTIFICATIONID?.toString() ?? ""),
ItemDetailView(LocaleKeys.responder.tr(), workListData!.rESPONDER ?? ""),
ItemDetailView(LocaleKeys.subject.tr(), workListData!.sUBJECT ?? ""),
],
).objectContainerView(),
if ((getAbsenceCollectionNotifications?.length ?? 0) > 0) getAbsenceCollectionNotificationsListView(getAbsenceCollectionNotifications ?? []).objectContainerView(title: "Absence Notifications"),
if (getStampMsNotifications?.isNotEmpty ?? false) getStampMsNotificationsListView(getStampMsNotifications ?? []).objectContainerView(title: "Stamp Notifications"),
if (getStampNsNotifications?.isNotEmpty ?? false) getStampNsNotificationsListView(getStampNsNotifications ?? []).objectContainerView(title: "Stamp Notifications"),
if (poHeaderList.isNotEmpty) getPoNotificationsListView(),
if (itemCreationHeader.isNotEmpty) getItemCreationHeaderView()
];
return Container(
width: double.infinity,
height: double.infinity,
child: Column(
children: [
Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
child: uiList.isEmpty
? LocaleKeys.noDataAvailable.tr().toText16().center
: ListView(
padding: const EdgeInsets.all(21),
children: uiList,
),
],
),
margin: EdgeInsets.all(21),
padding: EdgeInsets.only(top: 21, bottom: 21, right: 16, left: 16),
child: Column(
children: [
Row(
);
}
Widget getPoNotificationsListView() {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: "Info Details".toText16(),
),
// Icon(Icons.keyboard_arrow_down_rounded),
ItemDetailView(LocaleKeys.description.tr(), workListData!.fROMUSER ?? ""),
ItemDetailView(LocaleKeys.from.tr(), workListData!.fROMUSER ?? ""),
ItemDetailView(LocaleKeys.to.tr(), workListData!.tOUSER ?? ""),
ItemDetailView(LocaleKeys.sent.tr(), workListData!.bEGINDATE ?? ""),
ItemDetailView(LocaleKeys.closed.tr(), workListData!.eNDDATE ?? ""),
ItemDetailView(LocaleKeys.id.tr(), workListData!.nOTIFICATIONID?.toString() ?? ""),
ItemDetailView(LocaleKeys.supplier.tr(), poHeaderList[index].vENDORNAME ?? ""),
ItemDetailView(LocaleKeys.site.tr(), poHeaderList[index].vENDORSITECODE ?? ""),
ItemDetailView(LocaleKeys.buyer.tr(), poHeaderList[index].bUYER ?? ""),
ItemDetailView(LocaleKeys.preparer.tr(), poHeaderList[index].pREPARER ?? ""),
ItemDetailView(LocaleKeys.creationDate.tr(), poHeaderList[index].cREATIONDATE ?? ""),
ItemDetailView(LocaleKeys.shipToLocation.tr(), poHeaderList[index].sHIPTOLOCATIONNAME ?? ""),
ItemDetailView(LocaleKeys.quotationNumber.tr(), poHeaderList[index].qUOTATIONNUMBER ?? ""),
ItemDetailView(LocaleKeys.quotationDate.tr(), poHeaderList[index].qUOTATIONDATE ?? ""),
ItemDetailView(LocaleKeys.paymentTerms.tr(), poHeaderList[index].pAYMENTTERMS ?? ""),
ItemDetailView(LocaleKeys.currency.tr(), poHeaderList[index].cURRENCYNAME ?? ""),
ItemDetailView(LocaleKeys.grossAmount.tr(), poHeaderList[index].gROSSAMOUNT?.toString() ?? ""),
ItemDetailView(LocaleKeys.discountAmount.tr(), poHeaderList[index].dISCOUNTAMOUNT?.toString() ?? ""),
ItemDetailView(LocaleKeys.customDuty.tr(), poHeaderList[index].cUSTOMDUTY?.toString() ?? ""),
ItemDetailView(LocaleKeys.shipHandle.tr(), poHeaderList[index].sHIPHANDLE?.toString() ?? ""),
ItemDetailView(LocaleKeys.otherCharges.tr(), poHeaderList[index].oTHERCHARGES?.toString() ?? ""),
ItemDetailView(LocaleKeys.totalPOAmountWithVAT.tr(), poHeaderList[index].qUOTATIONDATE ?? ""),
ItemDetailView(LocaleKeys.totalPOAmountInWords.tr(), poHeaderList[index].tOTPOAMTWORD ?? ""),
],
),
Column(
).objectContainerView(),
separatorBuilder: (cxt, index) => 4.height,
itemCount: poHeaderList.length);
}
Widget getAbsenceCollectionNotificationsListView(List<GetAbsenceCollectionNotificationBodyList> list) {
List<CollectionNotification> dataList = list.isEmpty ? [] : (list.first.collectionNotification ?? []);
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => ItemDetailView(dataList[index].sEGMENTPROMPT!, dataList[index].sEGMENTVALUEDSP!),
separatorBuilder: (cxt, index) => 4.height,
itemCount: dataList.length);
}
Widget getStampMsNotificationsListView(List<GetStampMsNotificationBodyList> list) {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => Column(
mainAxisSize: MainAxisSize.min,
children: [
12.height,
showItem("From:", "Alma Linde Mendoza"),
showItem("To:", "Al Yabis, Norah"),
showItem("Sent:", "1/26/2020 10:41:07 AM"),
showItem("ID:", "30581045"),
showItem("Closed:", "-"),
],
),
ItemDetailView(LocaleKeys.employeeNumber.tr(), list[index].eMPLOYEENUMBER.toString()),
ItemDetailView(LocaleKeys.assignmentNumber.tr(), list[index].aSSIGNMENTNUMBER.toString()),
ItemDetailView(LocaleKeys.employeeName.tr(), list[index].eMPLOYEENAME.toString()),
ItemDetailView(LocaleKeys.scheduleDate.tr(), DateUtil.formatDateToDate(DateUtil.convertStringToDate(list[index].sCHEDULEDATE.toString()), false)),
ItemDetailView(LocaleKeys.shiftType.tr(), list[index].sHTTYPEDESC.toString()),
ItemDetailView(LocaleKeys.shift.tr(), list[index].sHTNAME.toString()),
ItemDetailView(LocaleKeys.breakText.tr(), list[index].bREAKNAME.toString()),
ItemDetailView(LocaleKeys.actualSwipeStart.tr(), list[index].sHTACTUALSTARTTIME.toString()),
ItemDetailView(LocaleKeys.actualSwipeEnd.tr(), list[index].sHTACTUALENDTIME.toString()),
ItemDetailView(LocaleKeys.approvedSwipeStart.tr(), list[index].aPPROVEDSTARTTIME.toString()),
ItemDetailView(LocaleKeys.approvedSwipeStartReason.tr(), list[index].aPPROVEDSTARTREASON.toString()),
ItemDetailView(LocaleKeys.approvedSwipeEnd.tr(), ""),
ItemDetailView(LocaleKeys.approvedSwipeEndReason.tr(), list[index].aPPROVEDENDREASONDESC.toString()),
],
),
),
separatorBuilder: (cxt, index) => 18.height,
itemCount: list.length);
}
Widget getStampNsNotificationsListView(List<GetStampNsNotificationBodyList> list) {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => Column(
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailView(LocaleKeys.employeeNumber.tr(), list[index].eMPLOYEENUMBER.toString()),
ItemDetailView(LocaleKeys.assignmentNumber.tr(), list[index].aSSIGNMENTNUMBER.toString()),
ItemDetailView(LocaleKeys.employeeName.tr(), list[index].eMPLOYEENAME.toString()),
ItemDetailView(LocaleKeys.scheduleDate.tr(), DateUtil.formatDateToDate(DateUtil.convertStringToDate(list[index].sCHEDULEDATE.toString()), false)),
],
),
);
separatorBuilder: (cxt, index) => 18.height,
itemCount: list.length);
}
Widget showItem(String title, String value) {
return Padding(
padding: const EdgeInsets.only(top: 2, bottom: 2),
child: Row(
Widget getItemCreationHeaderView() {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => Column(
mainAxisSize: MainAxisSize.min,
children: [
title.toText12(isBold: true),
6.width,
title.toText12(isBold: false, color: MyColors.normalTextColor),
ItemDetailView(LocaleKeys.operatingUnit.tr(), itemCreationHeader[index].oPERATINGUNIT?.toString() ?? ""),
ItemDetailView(LocaleKeys.category.tr(), itemCreationHeader[index].cATEGORY?.toString() ?? ""),
ItemDetailView(LocaleKeys.requester.tr(), itemCreationHeader[index].rEQUESTER?.toString() ?? ""),
ItemDetailView(LocaleKeys.analyzedBy.tr(), itemCreationHeader[index].aNALYZEDBY.toString() ?? ""),
ItemDetailView(LocaleKeys.approvedDate.tr(), itemCreationHeader[index].aPPROVEDDATE?.toString() ?? ""),
ItemDetailView(LocaleKeys.itemType.tr(), itemCreationHeader[index].iTEMTYPE?.toString() ?? ""),
ItemDetailView(LocaleKeys.relatedTo.tr(), itemCreationHeader[index].rELATEDTO?.toString() ?? ""),
ItemDetailView(LocaleKeys.requestDate.tr(), DateUtil.formatDateToDate(DateUtil.convertStringToDate(itemCreationHeader[index].rEQUESTDATE.toString()), false) ?? ""),
ItemDetailView(LocaleKeys.analyzedDate.tr(), itemCreationHeader[index].aNALYZEDDATE?.toString() ?? ""),
ItemDetailView(LocaleKeys.urgent.tr(), itemCreationHeader[index].uRGENTFLAGDISP.toString() ?? ""),
],
),
);
).objectContainerView(),
separatorBuilder: (cxt, index) => 18.height,
itemCount: itemCreationHeader.length);
}
}

@ -1,87 +1,159 @@
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/config/routes.dart';
import 'package:mohem_flutter_app/extensions/int_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/get_item_creation_ntf_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_mo_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_po_notification_body_list_model.dart';
import 'package:mohem_flutter_app/ui/work_list/item_history_screen.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
class RequestFragment extends StatefulWidget {
@override
State<RequestFragment> createState() => _RequestFragmentState();
}
class RequestFragment extends StatelessWidget {
final List<GetMoNotificationBodyList> moNotificationBodyList;
final List<ItemCreationLines> itemCreationLines;
final List<POLines> poLinesList;
class _RequestFragmentState extends State<RequestFragment> {
bool isOpened = false;
RequestFragment({
Key? key,
this.moNotificationBodyList = const <GetMoNotificationBodyList>[],
this.itemCreationLines = const <ItemCreationLines>[],
this.poLinesList = const <POLines>[],
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
height: double.infinity,
child: Column(
return ListView(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(21),
children: [
Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
if (moNotificationBodyList.isNotEmpty) moNotificationDataView(),
if (poLinesList.isNotEmpty) poLinesDataView(),
if (itemCreationLines.isNotEmpty) itemCreationLinesView(),
],
),
margin: EdgeInsets.all(21),
padding: EdgeInsets.only(top: 21, bottom: 21, right: 16, left: 16),
child: Column(
);
}
Widget poLinesDataView() {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailView(LocaleKeys.code.tr(), poLinesList[index].iTEMCODE ?? ""),
ItemDetailView(LocaleKeys.mfg.tr(), poLinesList[index].uOM ?? ""),
ItemDetailView(LocaleKeys.lineType.tr(), poLinesList[index].qUANTITY?.toString() ?? ""),
ItemDetailView(LocaleKeys.unit.tr(), poLinesList[index].uOM ?? ""),
ItemDetailView(LocaleKeys.price.tr(), poLinesList[index].uNITPRICE?.toString() ?? ""),
ItemDetailView(LocaleKeys.lineAmount.tr(), poLinesList[index].lINEAMOUNT?.toString() ?? ""),
ItemDetailView(LocaleKeys.quantity.tr(), poLinesList[index].qUANTITY?.toString() ?? ""),
ItemDetailView(LocaleKeys.lineDiscount.tr(), poLinesList[index].lINEDISCPERCENTAGE?.toString() ?? ""),
ItemDetailView(LocaleKeys.needByDate.tr(), poLinesList[index].nEEDBYDATE ?? ""),
ItemDetailView(LocaleKeys.promisedDate.tr(), poLinesList[index].pROMISEDDATE ?? ""),
ItemDetailView(LocaleKeys.deliverToLocation.tr(), poLinesList[index].dELIVERTOLOCATION ?? ""),
ItemDetailView(LocaleKeys.requisitionNumber.tr(), poLinesList[index].rEQUESTOR ?? ""),
ItemDetailView(LocaleKeys.requester.tr(), poLinesList[index].pRNUM ?? ""),
12.height,
Row(
children: [
Expanded(
child: "Hardware Mobility 161 Messenger".toText16(),
),
Icon(Icons.keyboard_arrow_down_rounded),
DefaultButton(LocaleKeys.itemHistory.tr(), () {
Navigator.pushNamed(
cxt,
AppRoutes.itemHistory,
arguments: ItemHistoryScreenParams(title: LocaleKeys.itemHistory.tr(), isMO: false, pItemId: poLinesList[index].iTEMID),
);
}).expanded,
12.width,
DefaultButton(LocaleKeys.quotationAnalysis.tr(), () {
Navigator.pushNamed(
cxt,
AppRoutes.itemHistory,
arguments: ItemHistoryScreenParams(
isItemHistory: false, isMO: false, title: LocaleKeys.quotationAnalysis.tr(), pItemId: poLinesList[index].iTEMID, pPoHeaderId: poLinesList[index].pOHEADERID),
);
}).expanded,
],
),
Column(
)
],
).objectContainerView(title: poLinesList[index].iTEMDESCRIPTION!),
separatorBuilder: (cxt, index) => 12.height,
itemCount: poLinesList.length);
}
Widget moNotificationDataView() {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailView(LocaleKeys.code.tr(), moNotificationBodyList[index].iTEMCODE ?? ""),
ItemDetailView(LocaleKeys.unit.tr(), moNotificationBodyList[index].uOM ?? ""),
ItemDetailView(LocaleKeys.quantity.tr(), moNotificationBodyList[index].qUANTITY?.toString() ?? ""),
ItemDetailView(LocaleKeys.dateRequired.tr(), moNotificationBodyList[index].dATEREQUIRED ?? ""),
ItemDetailView(LocaleKeys.lineStatus.tr(), moNotificationBodyList[index].lINESTATUS ?? ""),
ItemDetailView(LocaleKeys.statusDate.tr(), moNotificationBodyList[index].sTATUSDATE ?? ""),
ItemDetailView(LocaleKeys.transactionType.tr(), moNotificationBodyList[index].tRANSACTIONTYPENAME ?? ""),
ItemDetailView(LocaleKeys.operatingUnit.tr(), moNotificationBodyList[index].oPERATINGUNIT ?? ""),
ItemDetailView(LocaleKeys.organizationCode.tr(), moNotificationBodyList[index].oRGANIZATIONCODE ?? ""),
ItemDetailView(LocaleKeys.organization.tr(), moNotificationBodyList[index].oRGANIZATIONNAME ?? ""),
ItemDetailView(LocaleKeys.fromSubInventory.tr(), moNotificationBodyList[index].fROMSUBINVENTORY ?? ""),
ItemDetailView(LocaleKeys.fromLocator.tr(), moNotificationBodyList[index].fROMLOCATOR ?? ""),
ItemDetailView(LocaleKeys.toSubInventory.tr(), moNotificationBodyList[index].tOSUBINVENTORY ?? ""),
ItemDetailView(LocaleKeys.toLocator.tr(), moNotificationBodyList[index].tOLOCATOR ?? ""),
ItemDetailView(LocaleKeys.shipToLocator.tr(), moNotificationBodyList[index].sHIPTOLOCATION ?? ""),
12.height,
showItem("Code:", "3188000067"),
showItem("Quantity:", "1"),
showItem("Line Status:", "Pending Approval"),
showItem("Transection Type:", "Move Order Issue:"),
showItem("Organization Code:", "SWD"),
showItem("From Subinventory:", "SWD_MSPS"),
showItem("To Subinventory:", "SWD_MSPS"),
showItem("Ship To Location :",
"SWD 11206-E.R. (Emergency Room)"),
showItem("Unit:", "Each"),
showItem("Date Required:", "12/23/2019 4:54:04 PM"),
showItem("Status Date:", "12/23/2019 4:54:04 PM"),
showItem("Operation Unit:", "Sehat Al Sewedi"),
showItem("Organization:", "Sehat Al Sewedi"),
showItem("From Locator:", "-"),
showItem("To Locator :", "-"),
],
),
],
),
),
],
),
DefaultButton(LocaleKeys.itemHistory.tr(), () {
Navigator.pushNamed(
cxt,
AppRoutes.itemHistory,
arguments: ItemHistoryScreenParams(title: LocaleKeys.itemHistory.tr(), pItemId: moNotificationBodyList[index].iTEMID, pOrgId: moNotificationBodyList[index].oRGID),
);
})
],
).objectContainerView(title: moNotificationBodyList[index].dESCRIPTION ?? ""),
separatorBuilder: (cxt, index) => 12.height,
itemCount: moNotificationBodyList.length);
}
Widget showItem(String title, String value) {
return Padding(
padding: const EdgeInsets.only(top: 2, bottom: 2),
child: Row(
Widget itemCreationLinesView() {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
title.toText12(isBold: true),
6.width,
title.toText12(isBold: false, color: MyColors.normalTextColor),
ItemDetailView(LocaleKeys.productName.tr(), itemCreationLines[index].pRODUCTNAME ?? ""),
ItemDetailView(LocaleKeys.productDescription.tr(), itemCreationLines[index].pRODUCTDESCRIPTION ?? ""),
ItemDetailView(LocaleKeys.unitPrice.tr(), itemCreationLines[index].uNITPRICE?.toString() ?? ""),
ItemDetailView(LocaleKeys.manufacturerName.tr(), itemCreationLines[index].uSERMANUFACTURERNAME ?? ""),
ItemDetailView(LocaleKeys.manufacturerPartName.tr(), itemCreationLines[index].uSERMFGPARTNUM ?? ""),
ItemDetailView(LocaleKeys.supplierName.tr(), itemCreationLines[index].sUPPLIERNAME ?? ""),
ItemDetailView(LocaleKeys.supplierContact.tr(), itemCreationLines[index].sUPPLIERCONTACT ?? ""),
ItemDetailView(LocaleKeys.chargeToPatient.tr(), itemCreationLines[index].cHARGETOPATIENT ?? ""),
ItemDetailView(LocaleKeys.justification.tr(), itemCreationLines[index].jUSTIFICATION ?? ""),
ItemDetailView(LocaleKeys.itemCode.tr(), itemCreationLines[index].iTEMCODE ?? ""),
ItemDetailView(LocaleKeys.itemDescription.tr(), itemCreationLines[index].iTEMDESCRIPTION ?? ""),
ItemDetailView(LocaleKeys.groupCode.tr(), itemCreationLines[index].iTEMGROUPCODE ?? ""),
ItemDetailView(LocaleKeys.groupDescription.tr(), itemCreationLines[index].iTEMGROUP ?? ""),
ItemDetailView(LocaleKeys.subgroupCode.tr(), itemCreationLines[index].iTEMSUBGROUPCODE ?? ""),
ItemDetailView(LocaleKeys.subgroupDescription.tr(), itemCreationLines[index].iTEMSUBGROUP ?? ""),
ItemDetailView(LocaleKeys.primaryUOM.tr(), itemCreationLines[index].pRIMARYUOM ?? ""),
ItemDetailView(LocaleKeys.manufacturerName.tr(), itemCreationLines[index].sTANDARDMANUFACTURERNAME ?? ""),
ItemDetailView(LocaleKeys.manufacturerPartName.tr(), itemCreationLines[index].sTANDARDMFGPARTNUM ?? ""),
ItemDetailView(LocaleKeys.templateName.tr(), itemCreationLines[index].tEMPLATENAME ?? ""),
ItemDetailView(LocaleKeys.itemCreationStatus.tr(), itemCreationLines[index].iTEMCREATIONSTATUS ?? ""),
ItemDetailView(LocaleKeys.standardizationApprovalStatus.tr(), itemCreationLines[index].sTANDARDSTATUS ?? ""),
ItemDetailView(LocaleKeys.standardizationApprovalRejectionReason.tr(), itemCreationLines[index].sTANDARDREJECTREASON ?? ""),
],
),
);
).objectContainerView(title: itemCreationLines[index].iTEMDESCRIPTION!),
separatorBuilder: (cxt, index) => 12.height,
itemCount: itemCreationLines.length);
}
}

@ -1,98 +1,442 @@
import 'dart:convert';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/ui/app_bar.dart';
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/generic_response_model.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_attachement_list_model.dart';
import 'package:mohem_flutter_app/models/get_item_creation_ntf_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_mo_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_notification_buttons_list_model.dart';
import 'package:mohem_flutter_app/models/get_po_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import 'package:mohem_flutter_app/ui/work_list/missing_swipe/fragments/actions_fragment.dart';
import 'package:mohem_flutter_app/ui/work_list/missing_swipe/fragments/attachments_fragment.dart';
import 'package:mohem_flutter_app/ui/work_list/missing_swipe/fragments/detail_fragment.dart';
import 'package:mohem_flutter_app/ui/work_list/missing_swipe/fragments/info_fragments.dart';
import 'package:mohem_flutter_app/ui/work_list/missing_swipe/fragments/request_fragment.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/widgets/dialogs/accept_reject_input_dialog.dart';
class MissingSwipeScreen extends StatefulWidget {
MissingSwipeScreen({Key? key}) : super(key: key);
@override
_MissingSwipeScreenState createState() {
return _MissingSwipeScreenState();
}
}
class _MissingSwipeScreenState extends State<MissingSwipeScreen> {
int tabIndex = 0;
PageController controller = PageController();
bool showFabOptions = false;
WorkListResponseModel? workListData;
MemberInformationListModel? memberInformationListModel;
List<GetNotificationButtonsList> notificationButtonsList = [];
List<GetActionHistoryList> actionHistoryList = [];
List<GetAttachementList> getAttachmentList = [];
List<GetStampMsNotificationBodyList> getStampMsNotifications = [];
List<GetStampNsNotificationBodyList> getStampNsNotifications = [];
List<GetMoNotificationBodyList> getMoNotificationBodyList = [];
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotifications;
List<NotificationGetRespondAttributesList> getNotificationRespondAttributes = [];
NotificationGetRespondAttributesList? notificationNoteInput;
GenericResponseModel? getBasicNTFBody;
GenericResponseModel? getICBody;
GenericResponseModel? subordinatesLeavesModel;
GetPoNotificationBodyList? getPoNotificationBody;
GetItemCreationNtfBodyList? getItemCreationNtfBody;
bool isCloseAvailable = false;
bool isApproveAvailable = false;
bool isRejectAvailable = false;
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
void getData() async {
try {
Utils.showLoading(context);
if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") {
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
}
if (workListData!.iTEMTYPE == "HRSSA") {
getBasicNTFBody = await WorkListApiClient().getBasicDetNTFBody(workListData!.nOTIFICATIONID!, -999);
getAbsenceCollectionNotifications = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID!, -999);
subordinatesLeavesModel = await WorkListApiClient().getSubordinatesLeaves("", "");
}
if (workListData!.iTEMTYPE == "STAMP") {
if (workListData!.rEQUESTTYPE == "STAMP_MS") {
getStampMsNotifications = await WorkListApiClient().getStampMsNotificationBody(workListData!.nOTIFICATIONID!, -999);
} else {
getStampNsNotifications = await WorkListApiClient().getStampNsNotificationBody(workListData!.nOTIFICATIONID!, -999);
}
}
if (workListData!.iTEMTYPE == "INVMOA") {
getMoNotificationBodyList = await WorkListApiClient().getMoNotificationBody(workListData!.nOTIFICATIONID!, -999);
}
if (workListData!.iTEMTYPE == "INVITEM") {
getItemCreationNtfBody = await WorkListApiClient().getItemCreationNtfBody(workListData!.nOTIFICATIONID!, -999);
}
if (workListData!.iTEMTYPE == "POAPPRV") {
getPoNotificationBody = await WorkListApiClient().getPoNotificationBody(workListData!.nOTIFICATIONID!, -999);
}
getNotificationRespondAttributes = await WorkListApiClient().notificationGetRespondAttributes(workListData!.nOTIFICATIONID!);
if (getNotificationRespondAttributes.isNotEmpty) {
notificationNoteInput = getNotificationRespondAttributes.first;
}
notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!);
actionHistoryList = await WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!);
getAttachmentList = await WorkListApiClient().getAttachments(workListData!.nOTIFICATIONID!);
if (notificationButtonsList.isNotEmpty) {
isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE");
isApproveAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "APPROVED");
isRejectAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "REJECTED");
}
Utils.hideLoading(context);
setState(() {});
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
void getDataFromState() {
if (workListData == null) {
workListData = AppState().workList![AppState().workListIndex!]; // ModalRoute.of(context)!.settings.arguments as WorkListResponseModel;
getData();
}
}
class MissingSwipeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 4,
child: Scaffold(
appBar: appBar(context, title: "Missing Swipe Request"),
body: Container(
width: double.infinity,
height: double.infinity,
child: Column(
getDataFromState();
return Scaffold(
appBar: AppBarWidget(context, title: LocaleKeys.details.tr()),
backgroundColor: Colors.white,
body: Stack(
children: [
Column(
children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(20), bottomRight: Radius.circular(20)),
gradient: LinearGradient(transform: GradientRotation(.46), begin: Alignment.topRight, end: Alignment.bottomRight, colors: [
padding: const EdgeInsets.only(left: 21, right: 21, top: 16, bottom: 16),
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(25),
bottomRight: Radius.circular(25),
),
gradient: LinearGradient(
transform: GradientRotation(.83),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
]),
],
),
clipBehavior: Clip.antiAlias,
child: TabBar(
indicatorColor: Colors.white,
labelColor: Colors.white,
tabs: [
Tab(
text: "Request",
),
Tab(
text: "Actions",
child: Row(
children: [
myTab(LocaleKeys.info.tr(), 0),
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") ? myTab(LocaleKeys.details.tr(), 1) : myTab(LocaleKeys.request.tr(), 1),
myTab(LocaleKeys.actions.tr(), 2),
myTab(LocaleKeys.attachments.tr(), 3),
],
),
Tab(
text: "Attachments",
),
Tab(
text: "Info.",
PageView(
controller: controller,
onPageChanged: (pageIndex) {
setState(() {
tabIndex = pageIndex;
});
},
children: [
InfoFragment(
poHeaderList: getPoNotificationBody?.pOHeader ?? [],
workListData: workListData,
getAbsenceCollectionNotifications: getAbsenceCollectionNotifications,
itemCreationHeader: getItemCreationNtfBody?.itemCreationHeader ?? [],
getStampMsNotifications: getStampMsNotifications),
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP")
? DetailFragment(workListData, memberInformationListModel)
: RequestFragment(
moNotificationBodyList: getMoNotificationBodyList,
poLinesList: getPoNotificationBody?.pOLines ?? [],
itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [],
),
ActionsFragment(actionHistoryList),
AttachmentsFragment(getAttachmentList),
],
).expanded,
if (isApproveAvailable || isRejectAvailable || isCloseAvailable)
Container(
padding: const EdgeInsets.only(top: 14, bottom: 14, left: 21, right: 21),
decoration: const BoxDecoration(
color: Colors.white,
border: Border(
top: BorderSide(
color: MyColors.lightGreyEFColor,
width: 1.0,
),
),
),
Expanded(
child: TabBarView(
child: Row(
children: [
RequestFragment(),
ActionsFragment(),
AttachmentsFragment(),
InfoFragment(),
if (isRejectAvailable)
DefaultButton(
LocaleKeys.reject.tr(),
() => performAction("REJECTED"),
colors: const [
Color(0xffE47A7E),
Color(0xffDE6D71),
],
).expanded,
if (isApproveAvailable && isRejectAvailable) 8.width,
if (isApproveAvailable)
DefaultButton(
LocaleKeys.approve.tr(),
() => performAction("APPROVED"),
colors: const [
Color(0xff28C884),
Color(0xff1BB271),
],
).expanded,
if (isCloseAvailable)
DefaultButton(
LocaleKeys.ok.tr(),
() => performAction("CLOSE"),
colors: const [
Color(0xff32D892),
Color(0xff1AB170),
],
).expanded,
8.width,
Container(
height: 43,
width: 43,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: MyColors.lightGreyE6Color,
),
child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor),
).onPress(() {
setState(() {
showFabOptions = true;
});
})
],
),
Container(
)
],
),
IgnorePointer(
ignoring: !showFabOptions,
child: AnimatedOpacity(
opacity: showFabOptions ? 1 : 0,
duration: const Duration(milliseconds: 250),
child: Container(
padding: const EdgeInsets.only(left: 21, right: 21, bottom: 75 - 12),
width: double.infinity,
height: 60,
padding: EdgeInsets.only(left: 21, right: 21),
child: Row(
height: double.infinity,
color: Colors.white.withOpacity(.67),
alignment: Alignment.bottomRight,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: DefaultButton(
"Reject",
() {},
colors: [
Color(0xffEB8C90),
Color(0xffDE6C70),
myFab("Skip", "assets/images/skip.svg").onPress(() {
if (AppState().workList!.length - 1 > AppState().workListIndex!) {
AppState().setWorkListIndex = AppState().workListIndex! + 1;
workListData = null;
showFabOptions = false;
getDataFromState();
} else if (AppState().workList!.length - 1 == AppState().workListIndex!) {
Navigator.pop(context);
}
}),
12.height,
...viewApiButtonsList(notificationButtonsList),
],
),
),
12.width,
Expanded(
child: DefaultButton(
"Approve",
() {},
colors: [
Color(0xff32D892),
Color(0xff1AB170),
).onPress(() {
setState(() {
showFabOptions = false;
});
}),
),
],
),
floatingActionButton: (!isApproveAvailable && !isRejectAvailable && !isCloseAvailable)
? Container(
height: 43,
width: 43,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: MyColors.lightGreyE6Color,
),
],
child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor),
).onPress(() {
setState(() {
showFabOptions = true;
});
})
: null,
);
}
List<Widget> viewApiButtonsList(List<GetNotificationButtonsList> notificationButtonsList) {
List<Widget> fabs = [];
for (int i = 0; i < notificationButtonsList.length; i++) {
if (notificationButtonsList[i].bUTTONACTION! == "REJECTED" || notificationButtonsList[i].bUTTONACTION! == "APPROVED" || notificationButtonsList[i].bUTTONACTION! == "CLOSE") {
continue;
}
fabs.add(myFab(notificationButtonsList[i].bUTTONLABEL!, notificationButtonsList[i].bUTTONICON ?? "", isIconAsset: false)
.paddingOnly(bottom: 12)
.onPress(() => handleFabAction(notificationButtonsList[i])));
}
return fabs;
}
void handleFabAction(GetNotificationButtonsList notificationButton) {
switch (notificationButton.bUTTONACTION) {
case "DELEGATE":
// do something
break;
case "REQUEST_INFO":
// do something else
break;
case "RFC":
// do something else
break;
case "UPDATE_ACTION":
// do something else
break;
}
}
Widget myTab(String title, int index) {
bool isSelected = (index == tabIndex);
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
title.toText12(color: isSelected ? Colors.white : Colors.white.withOpacity(.74), isCenter: true),
4.height,
Container(
height: 8,
width: 8,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: isSelected ? Colors.white : Colors.transparent,
),
)
).onPress(() {
setState(() {
showFabOptions = true;
});
})
],
).onPress(() {
controller.jumpToPage(index);
}).expanded;
}
Widget myFab(String title, String icon, {bool isIconAsset = true}) {
return Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
title.toText16(),
14.width,
Container(
height: 43,
width: 43,
padding: const EdgeInsets.all(12),
decoration: const BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(
transform: GradientRotation(.46),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
],
),
),
child: isIconAsset
? SvgPicture.asset(icon)
: Image.memory(
base64Decode(icon),
fit: BoxFit.cover,
),
)
],
);
}
void performAction(String actionMode) {
showDialog(
context: context,
builder: (cxt) => AcceptRejectInputDialog(
message: LocaleKeys.requestedItems.tr(),
notificationGetRespond: notificationNoteInput,
onTap: (note) {
Map<String, dynamic> payload = {
"P_ACTION_MODE": actionMode,
"P_APPROVER_INDEX": null,
"P_COMMENTS": "",
"P_FORWARD_TO_USER_NAME": "",
"P_NOTIFICATION_ID": workListData!.nOTIFICATIONID!,
"RespondAttributeList": [
if (notificationNoteInput != null) {notificationNoteInput!.attributeName: note}
],
};
performNotificationAction(payload);
},
),
);
}
void performNotificationAction(Map<String, dynamic> payload) async {
try {
Utils.showLoading(context);
GenericResponseModel model = await WorkListApiClient().postNotificationActions(payload);
Utils.hideLoading(context);
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
Navigator.pop(context, true);
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
}

@ -1,29 +1,122 @@
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/date_uitl.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/ui/app_bar.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.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/itg_forms_model.dart';
import 'package:mohem_flutter_app/models/worklist_item_type_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:provider/provider.dart';
class WorkListScreen extends StatefulWidget {
WorkListScreen({Key? key}) : super(key: key);
@override
State<WorkListScreen> createState() => _WorkListScreenState();
_WorkListScreenState createState() {
return _WorkListScreenState();
}
}
class _WorkListScreenState extends State<WorkListScreen> {
List<WorkListItemTypeModelData> workListItemTypes = [
WorkListItemTypeModelData(
value: 0, name: 'HR', fullName: 'Human Resource', active: false, color: [Color(0xff32D892), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'HRSSA', disable: false),
WorkListItemTypeModelData(
value: 0, name: 'MO', fullName: 'Move Order', active: false, color: [Color(0xff58DCFA), Color(0xff3CB9D5)], icon: "assets/images/miss_swipe.svg", key: 'INVMOA', disable: false),
WorkListItemTypeModelData(
value: 0, name: 'PR', fullName: 'Purchase Requisition', active: false, color: [Color(0xff48EACF), Color(0xff3DCAB3)], icon: "assets/images/miss_swipe.svg", key: 'REQAPPRV', disable: false),
WorkListItemTypeModelData(
value: 0, name: 'PO', fullName: 'Purchase Order', active: false, color: [Color(0xff5099E3), Color(0xff3670AA)], icon: "assets/images/miss_swipe.svg", key: 'POAPPRV', disable: false),
WorkListItemTypeModelData(
value: 0, name: 'ITG', fullName: 'ITG Forms', active: false, color: [Color(0xffEB8C90), Color(0xffDE6C70)], icon: "assets/images/miss_swipe.svg", key: 'ITG', disable: false),
WorkListItemTypeModelData(
value: 0, name: 'IC', fullName: 'Item Creation', active: false, color: [Color(0xff32D892), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'INVITEM', disable: false),
WorkListItemTypeModelData(
value: 0, name: 'STAMP', fullName: 'Stamp', active: false, color: [Color(0xff32D892), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'STAMP', disable: false),
];
int workListItemIndex = 0;
List<WorkListResponseModel>? workList;
int pageNumber = 1;
late DashboardProviderModel providerData;
@override
void initState() {
super.initState();
providerData = Provider.of<DashboardProviderModel>(context, listen: false);
calculateCounter();
getWorkList();
}
void calculateCounter() {
workListItemTypes.forEach((workListElement) {
if (workListElement.key == "ITG") {
workListElement.value = providerData.itgFormsModel?.totalCount ?? 0;
} else {
var tempList = providerData.getOpenNotificationsList?.where((notificationElement) => notificationElement.itemType == workListElement.key).toList();
if (tempList!.isNotEmpty) {
workListElement.value = tempList.first.openNtfNumber ?? 0;
}
}
});
}
ItgFormsModel? itgFormsModel;
int? itgRequestTypeIndex;
void getWorkList() async {
try {
Utils.showLoading(context);
if (workListItemTypes[workListItemIndex].key == "ITG") {
itgFormsModel = await WorkListApiClient().getITGTaskCountRequestType();
List<RequestDetails> requestAllList = [];
for (int i = 0; i < (itgFormsModel?.requestType!.length ?? 0); i++) {
requestAllList = requestAllList + (itgFormsModel?.requestType![i].requestDetails ?? []);
}
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);
AppState().setWorkList = workList;
}
Utils.hideLoading(context);
setState(() {});
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: appBar(
appBar: AppBarWidget(
context,
title: LocaleKeys.workList.tr(),
),
body: Container(
body: SizedBox(
width: double.infinity,
height: double.infinity,
child: Column(
@ -31,68 +124,93 @@ class _WorkListScreenState extends State<WorkListScreen> {
children: [
Container(
width: double.infinity,
height: 2,
color: MyColors.darkWhiteColor,
height: 1,
color: MyColors.lightGreyEFColor,
),
Container(
width: double.infinity,
SizedBox(
height: 40,
margin: EdgeInsets.only(
top: 21,
),
child: ListView.separated(
itemBuilder: (context, index) {
return Container(
padding: EdgeInsets.only(
left: 30,
right: 30,
),
padding: const EdgeInsets.only(left: 21, right: 21, top: 8, bottom: 8),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
color: tabList[index].isSelected
? MyColors.darkIconColor
: MyColors.lightGreyEAColor,
),
child: tabList[index].title.toText12(
color: tabList[index].isSelected
? MyColors.white
: MyColors.black,
),
);
},
separatorBuilder: (context, index) {
return 8.width;
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) {
workListItemIndex = index;
if (workListItemTypes[index].value == 0) {
workList = [];
} else {
workList = null;
}
setState(() {});
if (workListItemTypes[index].value > 0) {
getWorkList();
}
}
});
},
separatorBuilder: (context, index) => 8.width,
shrinkWrap: true,
itemCount: tabList.length,
itemCount: workListItemTypes.length,
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.only(
left: 21,
right: 21,
),
padding: const EdgeInsets.only(left: 21, right: 21),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
LocaleKeys.human.toText12(),
LocaleKeys.resources.tr().toText24(isBold: true),
],
).paddingOnly(top: 24, left: 21, right: 21),
24.height,
Expanded(
).paddingOnly(top: 21, bottom: 21),
workListItemTypes[workListItemIndex].fullName.toSectionHeading().paddingOnly(left: 21, right: 21),
if (itgRequestTypeIndex != null)
SizedBox(
height: 40,
child: ListView.separated(
itemBuilder: (context, index) {
return rowItem(typesList[index]);
RequestType type = itgFormsModel!.requestType![index];
return Container(
padding: const EdgeInsets.only(left: 21, right: 21, top: 8, bottom: 8),
alignment: Alignment.center,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(30), color: itgRequestTypeIndex == index ? MyColors.darkIconColor : MyColors.lightGreyEAColor),
child: ("${type.requestTypeName}").toText12(color: itgRequestTypeIndex == index ? MyColors.white : MyColors.black),
).onPress(() {
if (itgRequestTypeIndex != index) {
itgRequestTypeIndex = index;
setState(() {});
}
});
},
separatorBuilder: (context, index) {
return 12.height;
separatorBuilder: (context, index) => 8.width,
shrinkWrap: true,
itemCount: itgFormsModel?.requestType?.length ?? 0,
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.only(left: 21, right: 21),
),
).paddingOnly(top: 16, bottom: 16),
itgRequestTypeIndex != null
? Expanded(
child: ListView.separated(
physics: BouncingScrollPhysics(),
itemBuilder: (context, index) {
return itgRowItem(workListItemTypes[workListItemIndex], itgFormsModel!.requestType![itgRequestTypeIndex!].requestDetails![index]);
},
itemCount: typesList.length,
padding: EdgeInsets.only(left: 21, right: 21),
separatorBuilder: (context, index) => 12.height,
itemCount: itgFormsModel!.requestType![itgRequestTypeIndex!].requestDetails?.length ?? 0,
padding: const EdgeInsets.all(21),
),
)
: Expanded(
child: workList != null
? ((workList!).isEmpty
? "No History Available".toText16().center
: ListView.separated(
physics: const BouncingScrollPhysics(),
itemBuilder: (context, index) {
return rowItem(workListItemTypes[workListItemIndex], workList![index], index);
},
separatorBuilder: (context, index) => 12.height,
itemCount: workList?.length ?? 0,
padding: const EdgeInsets.all(21),
))
: const SizedBox(),
),
],
),
@ -100,14 +218,14 @@ class _WorkListScreenState extends State<WorkListScreen> {
);
}
Widget rowItem(Types types) {
Widget itgRowItem(WorkListItemTypeModelData data, RequestDetails requestDetails) {
return InkWell(
onTap: () {
Navigator.pushNamed(context, AppRoutes.missingSwipe);
},
child: Container(
width: double.infinity,
padding: EdgeInsets.all(12),
padding: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
@ -126,39 +244,101 @@ class _WorkListScreenState extends State<WorkListScreen> {
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
gradient: LinearGradient(
transform: GradientRotation(.46),
begin: Alignment.topRight,
end: Alignment.bottomRight,
colors: types.colors),
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)],
).paddingAll(6),
),
8.width,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
requestDetails.title!.toText12(color: MyColors.grey57Color),
10.height,
Row(
children: [
DateUtil.formatDateToDate(DateUtil.convertStringToDate(requestDetails.modifiedDate!), false).toText10(color: MyColors.lightTextColor).expanded,
SvgPicture.asset(
"assets/images/miss_swipe.svg",
"assets/images/arrow_next.svg",
color: MyColors.darkIconColor,
)
],
),
],
),
),
],
),
),
);
}
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.missingSwipe, arguments: workData);
if (shouldReloadData != null) {
workList!.remove(data);
AppState().setWorkList = workList;
if (data.iTEMTYPE == "ITG") {
} else {
providerData.getOpenNotificationsList?.forEach((element) {
if (element.itemType == data.iTEMTYPE) {
element.openNtfNumber = element.openNtfNumber! - 1;
}
});
providerData.workListCounter = providerData.workListCounter - 1;
providerData.notify();
}
calculateCounter();
if (mounted) setState(() {});
}
},
child: Container(
width: double.infinity,
padding: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
2.height,
types.title.toText10(color: Colors.white)
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
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)],
).paddingAll(6),
),
12.width,
8.width,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Missing Swipe Request".toText16(),
"Missing Swipe Request for Hussain, Mohammad has been approved"
.toText10(),
12.height,
workData.sUBJECT!.toText12(color: MyColors.grey57Color),
10.height,
Row(
children: [
Expanded(
child: "07 Jan 2021"
.toText10(color: MyColors.lightTextColor)),
DateUtil.formatDateToDate(DateUtil.convertSimpleStringDateToDate(workData.bEGINDATE!), false).toText10(color: MyColors.lightTextColor).expanded,
SvgPicture.asset(
"assets/images/arrow_next.svg",
color: MyColors.darkIconColor,
@ -174,33 +354,3 @@ class _WorkListScreenState extends State<WorkListScreen> {
);
}
}
class Tabs {
String title;
bool isSelected;
Tabs(this.title, this.isSelected);
}
List<Tabs> tabList = [
Tabs("All", true),
Tabs("HR", false),
Tabs("MO", false),
Tabs("PR", false),
Tabs("PO", false),
];
class Types {
String title;
List<Color> colors;
Types(this.title, this.colors);
}
List<Types> typesList = [
Types("HR", [Color(0xff32D892), Color(0xff1AB170)]),
Types("ITG", [Color(0xffEB8C90), Color(0xffDE6C70)]),
Types("PO", [Color(0xff5099E3), Color(0xff3670AA)]),
Types("PR", [Color(0xff48EACF), Color(0xff3DCAB3)]),
Types("MO", [Color(0xff58DCFA), Color(0xff3CB9D5)]),
];

@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.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';
AppBar AppBarWidget(BuildContext context, {required String title, bool showHomeButton = false}) {
return AppBar(
leadingWidth: 0,
// leading: GestureDetector(
// behavior: HitTestBehavior.opaque,
// onTap: Feedback.wrapForTap(() => Navigator.maybePop(context), context),
// child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
// ),
//titleSpacing: -1.44,
title: Row(
children: [
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: Feedback.wrapForTap(() => Navigator.maybePop(context), context),
child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
),
4.width,
title.toText24(color: MyColors.darkTextColor, isBold: true, considerHeight: false).expanded,
],
),
centerTitle: false,
elevation: 0,
backgroundColor: Colors.white,
actions: [
if (showHomeButton)
IconButton(
onPressed: () {
// Navigator.pushAndRemoveUntil(
// context,
// MaterialPageRoute(builder: (context) => LandingPage()),
// (Route<dynamic> route) => false,
// );
},
icon: const Icon(Icons.home, color: MyColors.darkIconColor),
),
],
);
}

@ -1,3 +1,5 @@
import 'dart:convert';
import 'package:flutter/material.dart';
class CircularAvatar extends StatelessWidget {
@ -5,8 +7,9 @@ class CircularAvatar extends StatelessWidget {
final double radius;
final double width;
final double height;
final bool isImageBase64;
CircularAvatar({Key? key, this.radius = 70.0, this.width = 70, this.height = 60, this.url}) : super(key: key);
CircularAvatar({Key? key, this.radius = 70.0, this.width = 70, this.height = 60, this.url, this.isImageBase64 = false}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -15,11 +18,24 @@ class CircularAvatar extends StatelessWidget {
height: height,
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
image: isImageBase64
? null
: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage(url ?? "https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png"),
),
),
child: isImageBase64 ? imageFromBase64String(url!) : null,
);
}
Widget imageFromBase64String(String base64String) {
return ClipRRect(
borderRadius: BorderRadius.circular(100),
child: Image.memory(
base64Decode(base64String),
fit: BoxFit.cover,
),
);
}
}

@ -0,0 +1,103 @@
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/extensions/int_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/notification_get_respond_attributes_list_model.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/input_widget.dart';
class AcceptRejectInputDialog extends StatelessWidget {
final String? title;
final String? message;
final String? okTitle;
final NotificationGetRespondAttributesList? notificationGetRespond;
final Function(String) onTap;
AcceptRejectInputDialog({Key? key, this.title, @required this.message, this.okTitle, required this.onTap, this.notificationGetRespond}) : super(key: key);
String note = "";
@override
Widget build(BuildContext context) {
return Dialog(
backgroundColor: Colors.white,
shape: const RoundedRectangleBorder(),
insetPadding: const EdgeInsets.only(left: 21, right: 21),
child: Padding(
padding: const EdgeInsets.only(left: 20, right: 20, top: 18, bottom: 28),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.only(top: 16.0),
child: Text(
title ?? LocaleKeys.confirm.tr(),
style: const TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96),
),
),
),
IconButton(
padding: EdgeInsets.zero,
icon: const Icon(Icons.close),
color: const Color(0xff2B353E),
constraints: const BoxConstraints(),
onPressed: () {
Navigator.pop(context);
},
)
],
),
Text(
message ?? "",
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff808080), letterSpacing: -0.48),
),
if (notificationGetRespond != null) ...[
14.height,
InputWidget(
"Enter a Note",
notificationGetRespond!.attributeDisplayName!,
TextEditingController(),
isBackgroundEnable: true,
lines: 3,
onChange: (String note) {
this.note = note;
},
),
],
28.height,
Row(
children: [
DefaultButton(
LocaleKeys.cancel.tr(),
() => Navigator.pop(context),
colors: const [MyColors.lightGreyEAColor, MyColors.lightGreyEAColor],
textColor: MyColors.darkTextColor,
).expanded,
10.width,
DefaultButton(
LocaleKeys.ok.tr(),
() {
Navigator.pop(context);
onTap(note);
},
colors: const [
Color(0xff28C884),
Color(0xff1BB271),
],
).expanded,
],
),
],
),
),
);
}
}

@ -0,0 +1,23 @@
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.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';
class ItemDetailView extends StatelessWidget {
final String title;
final String value;
const ItemDetailView(this.title, this.value, {Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"$title:".toText12(isBold: true, color: const Color(0xff2D3238)),
6.width,
(value.isEmpty ? "--" : value).toText12(color: MyColors.normalTextColor).expanded,
],
);
}
}
Loading…
Cancel
Save