From 807d4b40464a8f7cb4b858a91f1480118cdfcef7 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Wed, 20 Apr 2022 16:47:55 +0300 Subject: [PATCH] item creation added. --- assets/langs/ar-SA.json | 27 ++ assets/langs/en-US.json | 27 ++ lib/api/worklist/worklist_api_client.dart | 32 ++ lib/generated/codegen_loader.g.dart | 54 ++++ lib/generated/locale_keys.g.dart | 27 ++ lib/models/generic_response_model.dart | 27 +- ...get_item_creation_ntf_body_list_model.dart | 292 ++++++++++++++++++ ...stamp_ns_notification_body_list_model.dart | 61 ++++ lib/ui/work_list/item_history_screen.dart | 2 +- .../fragments/info_fragments.dart | 106 +++++-- .../fragments/request_fragment.dart | 46 ++- .../missing_swipe/missing_swipe_screen.dart | 19 +- 12 files changed, 684 insertions(+), 36 deletions(-) create mode 100644 lib/models/get_item_creation_ntf_body_list_model.dart create mode 100644 lib/models/get_stamp_ns_notification_body_list_model.dart diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index daf43ef..4d1254f 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -177,6 +177,33 @@ "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", diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index f39f530..5409977 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -177,6 +177,33 @@ "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", diff --git a/lib/api/worklist/worklist_api_client.dart b/lib/api/worklist/worklist_api_client.dart index 625e700..7435919 100644 --- a/lib/api/worklist/worklist_api_client.dart +++ b/lib/api/worklist/worklist_api_client.dart @@ -8,6 +8,7 @@ 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'; @@ -15,6 +16,7 @@ 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'; @@ -150,6 +152,21 @@ class WorkListApiClient { }, url, postParams); } + Future> getStampNsNotificationBody(int pNotificationID, int pTransactionID) async { + String url = "${ApiConsts.erpRest}GET_STAMP_NS_NOTIFICATION_BODY"; + Map 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> getAbsenceNotificationBody(int pNotificationID, int pTransactionID) async { String url = "${ApiConsts.erpRest}GET_ABSENCE_NOTIFICATION_BODY"; Map postParams = { @@ -247,4 +264,19 @@ class WorkListApiClient { return responseData.getQuotationAnalysisList ?? []; }, url, postParams); } + + Future getItemCreationNtfBody(int pNotificationID, int pTransactionID) async { + String url = "${ApiConsts.erpRest}GET_ITEM_CREATION_NTF_BODY"; + Map 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); + } } diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index 30fa6f7..3bec4b3 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -193,6 +193,33 @@ class CodegenLoader extends AssetLoader{ "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", @@ -405,6 +432,33 @@ static const Map en_US = { "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", diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 3dbdb7c..43b5df8 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -178,6 +178,33 @@ abstract class LocaleKeys { 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'; diff --git a/lib/models/generic_response_model.dart b/lib/models/generic_response_model.dart index 138d686..1c19832 100644 --- a/lib/models/generic_response_model.dart +++ b/lib/models/generic_response_model.dart @@ -2,6 +2,7 @@ import 'package:mohem_flutter_app/models/get_absence_collection_notification_bod 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'; @@ -9,6 +10,7 @@ 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'; @@ -117,7 +119,7 @@ class GenericResponseModel { List? getFliexfieldStructureList; List? getHrCollectionNotificationBodyList; List? getHrTransactionList; - List? getItemCreationNtfBodyList; + GetItemCreationNtfBodyList? getItemCreationNtfBodyList; List? getItemTypeNotificationsList; List? getItemTypesList; List? getLookupValuesList; @@ -150,7 +152,7 @@ class GenericResponseModel { List? getScheduleShiftsDetailsList; List? getShiftTypesList; List? getStampMsNotificationBodyList; - List? getStampNsNotificationBodyList; + List? getStampNsNotificationBodyList; List? getSubordinatesAttdStatusList; List? getSubordinatesLeavesList; List? getSubordinatesLeavesTotalVacationsList; @@ -650,7 +652,9 @@ 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']; @@ -717,8 +721,13 @@ class GenericResponseModel { getStampMsNotificationBodyList!.add(new GetStampMsNotificationBodyList.fromJson(v)); }); } + if (json['GetStampNsNotificationBodyList'] != null) { + getStampNsNotificationBodyList = []; + json['GetStampNsNotificationBodyList'].forEach((v) { + getStampNsNotificationBodyList!.add(new GetStampNsNotificationBodyList.fromJson(v)); + }); + } - getStampNsNotificationBodyList = json['GetStampNsNotificationBodyList']; getSubordinatesAttdStatusList = json['GetSubordinatesAttdStatusList']; if (json['GetSubordinatesLeavesList'] != null) { @@ -1008,7 +1017,11 @@ 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; @@ -1061,6 +1074,10 @@ class GenericResponseModel { 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; diff --git a/lib/models/get_item_creation_ntf_body_list_model.dart b/lib/models/get_item_creation_ntf_body_list_model.dart new file mode 100644 index 0000000..83c81cb --- /dev/null +++ b/lib/models/get_item_creation_ntf_body_list_model.dart @@ -0,0 +1,292 @@ +class GetItemCreationNtfBodyList { + List? itemCreationHeader; + List? itemCreationLines; + String? pINFORMATION; + String? pQUESTION; + + GetItemCreationNtfBodyList({this.itemCreationHeader, this.itemCreationLines, this.pINFORMATION, this.pQUESTION}); + + GetItemCreationNtfBodyList.fromJson(Map json) { + if (json['ItemCreationHeader'] != null) { + itemCreationHeader = []; + json['ItemCreationHeader'].forEach((v) { + itemCreationHeader!.add(new ItemCreationHeader.fromJson(v)); + }); + } + if (json['ItemCreationLines'] != null) { + itemCreationLines = []; + json['ItemCreationLines'].forEach((v) { + itemCreationLines!.add(new ItemCreationLines.fromJson(v)); + }); + } + pINFORMATION = json['P_INFORMATION']; + pQUESTION = json['P_QUESTION']; + } + + Map toJson() { + final Map data = new Map(); + 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 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 toJson() { + final Map data = new Map(); + 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 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 toJson() { + final Map data = new Map(); + 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; + } +} diff --git a/lib/models/get_stamp_ns_notification_body_list_model.dart b/lib/models/get_stamp_ns_notification_body_list_model.dart new file mode 100644 index 0000000..4ce708c --- /dev/null +++ b/lib/models/get_stamp_ns_notification_body_list_model.dart @@ -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 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 toJson() { + final Map data = new Map(); + 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; + } +} \ No newline at end of file diff --git a/lib/ui/work_list/item_history_screen.dart b/lib/ui/work_list/item_history_screen.dart index 904e578..6cf80ca 100644 --- a/lib/ui/work_list/item_history_screen.dart +++ b/lib/ui/work_list/item_history_screen.dart @@ -175,7 +175,7 @@ class _ItemHistoryScreenState extends State { ItemDetailView(LocaleKeys.rfqQty.tr(), quotationAnalysisList[index].rFQQTY?.toString() ?? ""), ItemDetailView(LocaleKeys.rfqUOM.tr(), quotationAnalysisList[index].rFQUOM ?? ""), ], - ).objectContainerView(title: "${quotationAnalysisList[index].iTEMCODE}-${quotationAnalysisList[index].iTEMDESC}" ?? ""), + ).objectContainerView(title: "${quotationAnalysisList[index].iTEMCODE}-${quotationAnalysisList[index].iTEMDESC}"), separatorBuilder: (cxt, index) => 12.height, itemCount: quotationAnalysisList.length); } diff --git a/lib/ui/work_list/missing_swipe/fragments/info_fragments.dart b/lib/ui/work_list/missing_swipe/fragments/info_fragments.dart index d9ac454..df883c8 100644 --- a/lib/ui/work_list/missing_swipe/fragments/info_fragments.dart +++ b/lib/ui/work_list/missing_swipe/fragments/info_fragments.dart @@ -7,8 +7,10 @@ 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'; @@ -16,38 +18,50 @@ class InfoFragment extends StatelessWidget { WorkListResponseModel? workListData; List poHeaderList; List? getAbsenceCollectionNotifications; - List? getStampNotifications; + List? getStampMsNotifications; + List? getStampNsNotifications; + List itemCreationHeader; - InfoFragment({this.workListData, this.poHeaderList = const [], this.getAbsenceCollectionNotifications, this.getStampNotifications}); + InfoFragment( + {this.workListData, + this.poHeaderList = const [], + this.itemCreationHeader = const [], + this.getAbsenceCollectionNotifications, + this.getStampMsNotifications, + this.getStampNsNotifications}); @override Widget build(BuildContext context) { + List 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: ListView( - padding: const EdgeInsets.all(21), - children: [ - 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 ((getStampNotifications?.length ?? 0) > 0) getStampNotificationsListView(getStampNotifications ?? []).objectContainerView(title: "Stamp Notifications"), - if (poHeaderList.isNotEmpty) getPoNotificationsListView() - ], - ), + child: uiList.isEmpty + ? LocaleKeys.noDataAvailable.tr().toText16().center + : ListView( + padding: const EdgeInsets.all(21), + children: uiList, + ), ); } @@ -98,7 +112,7 @@ class InfoFragment extends StatelessWidget { itemCount: dataList.length); } - Widget getStampNotificationsListView(List list) { + Widget getStampMsNotificationsListView(List list) { return ListView.separated( shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), @@ -123,4 +137,44 @@ class InfoFragment extends StatelessWidget { separatorBuilder: (cxt, index) => 18.height, itemCount: list.length); } + + Widget getStampNsNotificationsListView(List 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 getItemCreationHeaderView() { + return ListView.separated( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: (cxt, index) => Column( + mainAxisSize: MainAxisSize.min, + children: [ + 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); + } } diff --git a/lib/ui/work_list/missing_swipe/fragments/request_fragment.dart b/lib/ui/work_list/missing_swipe/fragments/request_fragment.dart index 9d1f8cf..5773ffa 100644 --- a/lib/ui/work_list/missing_swipe/fragments/request_fragment.dart +++ b/lib/ui/work_list/missing_swipe/fragments/request_fragment.dart @@ -4,6 +4,7 @@ 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'; @@ -12,9 +13,15 @@ import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart'; class RequestFragment extends StatelessWidget { final List moNotificationBodyList; + final List itemCreationLines; final List poLinesList; - RequestFragment({Key? key, this.moNotificationBodyList = const [], this.poLinesList = const []}) : super(key: key); + RequestFragment({ + Key? key, + this.moNotificationBodyList = const [], + this.itemCreationLines = const [], + this.poLinesList = const [], + }) : super(key: key); @override Widget build(BuildContext context) { @@ -24,6 +31,7 @@ class RequestFragment extends StatelessWidget { children: [ if (moNotificationBodyList.isNotEmpty) moNotificationDataView(), if (poLinesList.isNotEmpty) poLinesDataView(), + if (itemCreationLines.isNotEmpty) itemCreationLinesView(), ], ); } @@ -112,4 +120,40 @@ class RequestFragment extends StatelessWidget { separatorBuilder: (cxt, index) => 12.height, itemCount: moNotificationBodyList.length); } + + Widget itemCreationLinesView() { + return ListView.separated( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: (cxt, index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + 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); + } } diff --git a/lib/ui/work_list/missing_swipe/missing_swipe_screen.dart b/lib/ui/work_list/missing_swipe/missing_swipe_screen.dart index 02d06d3..4416c76 100644 --- a/lib/ui/work_list/missing_swipe/missing_swipe_screen.dart +++ b/lib/ui/work_list/missing_swipe/missing_swipe_screen.dart @@ -15,10 +15,12 @@ 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'; @@ -50,7 +52,8 @@ class _MissingSwipeScreenState extends State { List notificationButtonsList = []; List actionHistoryList = []; List getAttachmentList = []; - List getStampNotifications = []; + List getStampMsNotifications = []; + List getStampNsNotifications = []; List getMoNotificationBodyList = []; List? getAbsenceCollectionNotifications; List getNotificationRespondAttributes = []; @@ -60,6 +63,7 @@ class _MissingSwipeScreenState extends State { GenericResponseModel? getICBody; GenericResponseModel? subordinatesLeavesModel; GetPoNotificationBodyList? getPoNotificationBody; + GetItemCreationNtfBodyList? getItemCreationNtfBody; bool isCloseAvailable = false; bool isApproveAvailable = false; @@ -87,11 +91,18 @@ class _MissingSwipeScreenState extends State { subordinatesLeavesModel = await WorkListApiClient().getSubordinatesLeaves("", ""); } if (workListData!.iTEMTYPE == "STAMP") { - getStampNotifications = await WorkListApiClient().getStampMsNotificationBody(workListData!.nOTIFICATIONID!, -999); + 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); } @@ -172,12 +183,14 @@ class _MissingSwipeScreenState extends State { poHeaderList: getPoNotificationBody?.pOHeader ?? [], workListData: workListData, getAbsenceCollectionNotifications: getAbsenceCollectionNotifications, - getStampNotifications: getStampNotifications), + 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),