From f218dab93effab1e07b44264a6feddbaa9eebf55 Mon Sep 17 00:00:00 2001 From: Sultan khan Date: Wed, 1 Jul 2026 10:53:11 +0300 Subject: [PATCH] PR changes done. --- assets/langs/ar-SA.json | 15 +- assets/langs/en-US.json | 15 +- lib/generated/codegen_loader.g.dart | 18 +- lib/generated/locale_keys.g.dart | 7 + .../get_pr_notification_body_list_model.dart | 54 +- .../worklist_fragments/info_fragments.dart | 1 + .../worklist_fragments/request_fragment.dart | 634 ++++++++++++------ 7 files changed, 505 insertions(+), 239 deletions(-) diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index f3552d5..f956a2f 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -667,9 +667,16 @@ "incidentDetails": "تفاصيل الحادث", "ticketNumber": "رقم التذكرة", "ticketId": "معرف التذكرة", - "pleaseSelectProject": "الرجاء اختيار مشروع", - "viewAttachment" : "عرض المرفق", - "parkingQr": "وقوف السيارات QR", - "startNow": "ابدأ الآن" + "pleaseSelectProject": "الرجاء اختيار مشروع", + "viewAttachment" : "عرض المرفق", + "parkingQr": "وقوف السيارات QR", + "startNow": "ابدأ الآن", + "destination_type": "نوع الوجهة", + "source_organization_name": "اسم منظمة المصدر", + "destination_organization_name": "اسم منظمة الوجهة", + "costCenter": "مركز التكلفة", + "priceSAR": "السعر (ريال سعودي)", + "amountSAR": "المبلغ (ريال سعودي)", + "amuLastThreeMonths": "AMU (آخر 3 أشهر)" } diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index a227a73..6be72ed 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -665,8 +665,15 @@ "incidentDetails": "Incident Details", "ticketNumber": "Ticket Number", "ticketId": "Ticket ID", - "pleaseSelectProject": "Please select a project", - "viewAttachment" : "View Attachment", - "parkingQr": "Parking QR", - "startNow": "Start Now" + "pleaseSelectProject": "Please select a project", + "viewAttachment" : "View Attachment", + "parkingQr": "Parking QR", + "startNow": "Start Now", + "destination_type": "Destination Type", + "source_organization_name": "Source Organization Name", + "destination_organization_name": "Destination Organization Name", + "costCenter": "Cost Center", + "priceSAR": "Price (SAR)", + "amountSAR": "Amount (SAR)", + "amuLastThreeMonths": "AMU (Last 3 months)" } \ No newline at end of file diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index f186a22..516fe03 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -683,7 +683,14 @@ class CodegenLoader extends AssetLoader{ "pleaseSelectProject": "الرجاء اختيار مشروع", "viewAttachment": "عرض المرفق", "parkingQr": "وقوف السيارات QR", - "startNow": "ابدأ الآن" + "startNow": "ابدأ الآن", + "destination_type": "نوع الوجهة", + "source_organization_name": "اسم منظمة المصدر", + "destination_organization_name": "اسم منظمة الوجهة", + "costCenter": "مركز التكلفة", + "priceSAR": "السعر (ريال سعودي)", + "amountSAR": "المبلغ (ريال سعودي)", + "amuLastThreeMonths": "AMU (آخر 3 أشهر)" }; static const Map _en_US = { "mohemm": "Mohemm", @@ -1354,7 +1361,14 @@ static const Map _en_US = { "pleaseSelectProject": "Please select a project", "viewAttachment": "View Attachment", "parkingQr": "Parking QR", - "startNow": "Start Now" + "startNow": "Start Now", + "destination_type": "Destination Type", + "source_organization_name": "Source Organization Name", + "destination_organization_name": "Destination Organization Name", + "costCenter": "Cost Center", + "priceSAR": "Price (SAR)", + "amountSAR": "Amount (SAR)", + "amuLastThreeMonths": "AMU (Last 3 months)" }; static const Map> mapLocales = {"ar_SA": _ar_SA, "en_US": _en_US}; } diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 972583a..2d5cb51 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -656,5 +656,12 @@ abstract class LocaleKeys { static const viewAttachment = 'viewAttachment'; static const parkingQr = 'parkingQr'; static const startNow = 'startNow'; + static const destination_type = 'destination_type'; + static const source_organization_name = 'source_organization_name'; + static const destination_organization_name = 'destination_organization_name'; + static const costCenter = 'costCenter'; + static const priceSAR = 'priceSAR'; + static const amountSAR = 'amountSAR'; + static const amuLastThreeMonths = 'amuLastThreeMonths'; } diff --git a/lib/models/get_pr_notification_body_list_model.dart b/lib/models/get_pr_notification_body_list_model.dart index dfc8b39..35b7f2d 100644 --- a/lib/models/get_pr_notification_body_list_model.dart +++ b/lib/models/get_pr_notification_body_list_model.dart @@ -5,12 +5,13 @@ class GetPrNotificationBodyList { String? pINFORMATION; String? pQUESTION; - GetPrNotificationBodyList( - {this.pRHeader, - this.pRLines, - this.pCURRENCYCODE, - this.pINFORMATION, - this.pQUESTION}); + GetPrNotificationBodyList({ + this.pRHeader, + this.pRLines, + this.pCURRENCYCODE, + this.pINFORMATION, + this.pQUESTION, + }); GetPrNotificationBodyList.fromJson(Map json) { if (json['PRHeader'] != null) { @@ -78,21 +79,28 @@ class PRLines { int? tOROWNUM; num? uNITPRICE; String? uOM; + String? dESTINATIONTYPE; + String? sOURCEORGANIZATIONNAME; + String? dESTINATIONORGANIZATIONNAME; - PRLines( - {this.cOSTCENTER, - this.dESCRIPTION, - this.fROMROWNUM, - this.iTEMAMU, - this.iTEMCODE, - this.lINEAMOUNT, - this.lINENUM, - this.nOOFROWS, - this.qUANTITY, - this.rOWNUM, - this.tOROWNUM, - this.uNITPRICE, - this.uOM}); + PRLines({ + this.cOSTCENTER, + this.dESCRIPTION, + this.fROMROWNUM, + this.iTEMAMU, + this.iTEMCODE, + this.lINEAMOUNT, + this.lINENUM, + this.nOOFROWS, + this.qUANTITY, + this.rOWNUM, + this.tOROWNUM, + this.uNITPRICE, + this.uOM, + this.dESTINATIONTYPE, + this.sOURCEORGANIZATIONNAME, + this.dESTINATIONORGANIZATIONNAME, + }); PRLines.fromJson(Map json) { cOSTCENTER = json['COST_CENTER']; @@ -108,6 +116,9 @@ class PRLines { tOROWNUM = json['TO_ROW_NUM']; uNITPRICE = json['UNIT_PRICE']; uOM = json['UOM']; + dESTINATIONTYPE = json['DESTINATION_TYPE']; + sOURCEORGANIZATIONNAME = json['SOURCE_ORGANIZATION_NAME']; + dESTINATIONORGANIZATIONNAME = json['DESTINATION_ORGANIZATION_NAME']; } Map toJson() { @@ -125,6 +136,9 @@ class PRLines { data['TO_ROW_NUM'] = this.tOROWNUM; data['UNIT_PRICE'] = this.uNITPRICE; data['UOM'] = this.uOM; + data['DESTINATION_TYPE'] = this.dESTINATIONTYPE; + data['SOURCE_ORGANIZATION_NAME'] = this.sOURCEORGANIZATIONNAME; + data['DESTINATION_ORGANIZATION_NAME'] = this.dESTINATIONORGANIZATIONNAME; return data; } } diff --git a/lib/ui/work_list/worklist_fragments/info_fragments.dart b/lib/ui/work_list/worklist_fragments/info_fragments.dart index 541d347..31850ae 100644 --- a/lib/ui/work_list/worklist_fragments/info_fragments.dart +++ b/lib/ui/work_list/worklist_fragments/info_fragments.dart @@ -602,6 +602,7 @@ class InfoFragment extends StatelessWidget { ItemDetailViewCol( LocaleKeys.responder.tr(), workListData!.rESPONDER ?? ""), ), + Column( children: getPRHeaderValues(), ) diff --git a/lib/ui/work_list/worklist_fragments/request_fragment.dart b/lib/ui/work_list/worklist_fragments/request_fragment.dart index b2bc0b6..7ea6596 100644 --- a/lib/ui/work_list/worklist_fragments/request_fragment.dart +++ b/lib/ui/work_list/worklist_fragments/request_fragment.dart @@ -13,7 +13,8 @@ import 'package:mohem_flutter_app/models/get_item_creation_ntf_body_list_model.d 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/models/get_pr_information_list.dart'; -import 'package:mohem_flutter_app/models/get_pr_notification_body_list_model.dart' as get_pr_notification_body_list_model; +import 'package:mohem_flutter_app/models/get_pr_notification_body_list_model.dart' + as get_pr_notification_body_list_model; 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'; @@ -51,250 +52,465 @@ class RequestFragment extends StatelessWidget { Widget poLinesDataView(BuildContext context) { return ExpandableNotifier( child: ListView.separated( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemBuilder: (cxt, index) => ExpandablePanel( - header: poLinesList[index].iTEMDESCRIPTION!.toText14(), - collapsed: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.code.tr(), poLinesList[index].iTEMCODE ?? ""), - ItemDetailViewCol(LocaleKeys.mfg.tr(), poLinesList[index].mFG ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.lineType.tr(), poLinesList[index].lINETYPE?.toString() ?? ""), - ItemDetailViewCol(LocaleKeys.unit.tr(), poLinesList[index].uOM ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.price.tr(), poLinesList[index].uNITPRICE?.toString() ?? ""), - ItemDetailViewCol(LocaleKeys.lineAmount.tr(), poLinesList[index].lINEAMOUNT?.toString() ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.quantity.tr(), poLinesList[index].qUANTITY?.toString() ?? ""), - ItemDetailViewCol(LocaleKeys.lineDiscount.tr(), poLinesList[index].lINEDISCPERCENTAGE?.toString() ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.needByDate.tr(), poLinesList[index].nEEDBYDATE ?? ""), - ItemDetailViewCol(LocaleKeys.promisedDate.tr(), poLinesList[index].pROMISEDDATE ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.deliverToLocation.tr(), poLinesList[index].dELIVERTOLOCATION ?? ""), - ItemDetailViewCol(LocaleKeys.requisitionNumber.tr(), poLinesList[index].pRNUM ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.requester.tr(), poLinesList[index].rEQUESTOR ?? ""), - Container(), - ), - 12.height, - Row( - children: [ - DefaultButton( - LocaleKeys.itemHistory.tr(), - () { + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: + (cxt, index) => + ExpandablePanel( + header: poLinesList[index].iTEMDESCRIPTION!.toText14(), + collapsed: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.code.tr(), + poLinesList[index].iTEMCODE ?? "", + ), + ItemDetailViewCol( + LocaleKeys.mfg.tr(), + poLinesList[index].mFG ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.lineType.tr(), + poLinesList[index].lINETYPE?.toString() ?? "", + ), + ItemDetailViewCol( + LocaleKeys.unit.tr(), + poLinesList[index].uOM ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.price.tr(), + poLinesList[index].uNITPRICE?.toString() ?? "", + ), + ItemDetailViewCol( + LocaleKeys.lineAmount.tr(), + poLinesList[index].lINEAMOUNT?.toString() ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.quantity.tr(), + poLinesList[index].qUANTITY?.toString() ?? "", + ), + ItemDetailViewCol( + LocaleKeys.lineDiscount.tr(), + poLinesList[index].lINEDISCPERCENTAGE?.toString() ?? + "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.needByDate.tr(), + poLinesList[index].nEEDBYDATE ?? "", + ), + ItemDetailViewCol( + LocaleKeys.promisedDate.tr(), + poLinesList[index].pROMISEDDATE ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.deliverToLocation.tr(), + poLinesList[index].dELIVERTOLOCATION ?? "", + ), + ItemDetailViewCol( + LocaleKeys.requisitionNumber.tr(), + poLinesList[index].pRNUM ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.requester.tr(), + poLinesList[index].rEQUESTOR ?? "", + ), + Container(), + ), + 12.height, + Row( + children: [ + DefaultButton(LocaleKeys.itemHistory.tr(), () { Navigator.pushNamed( cxt, AppRoutes.itemHistory, - arguments: ItemHistoryScreenParams(title: LocaleKeys.itemHistory.tr(), isMO: false, pItemId: poLinesList[index].iTEMID), + arguments: ItemHistoryScreenParams( + title: LocaleKeys.itemHistory.tr(), + isMO: false, + pItemId: poLinesList[index].iTEMID, + ), ); - }, - fontSize: 13, - ).expanded, - 12.width, - DefaultButton( - LocaleKeys.quotationAnalysis.tr(), - () { + }, fontSize: 13).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), + isItemHistory: false, + isMO: false, + title: LocaleKeys.quotationAnalysis.tr(), + pItemId: poLinesList[index].iTEMID, + pPoHeaderId: poLinesList[index].pOHEADERID, + ), + ); + }, fontSize: 13).expanded, + 12.width, + DefaultButton("PR Details", () { + getPRDetails( + context, + poLinesList[index].pOLINEID.toString(), ); - }, - fontSize: 13, - ).expanded, - 12.width, - DefaultButton( - "PR Details", - () { - getPRDetails(context, poLinesList[index].pOLINEID.toString()); - }, - fontSize: 13, - ).expanded, - ], - ) - ], - ), - expanded: const SizedBox(), - ).objectContainerView(), - separatorBuilder: (cxt, index) => 12.height, - itemCount: poLinesList.length), + }, fontSize: 13).expanded, + ], + ), + ], + ), + expanded: const SizedBox(), + ).objectContainerView(), + separatorBuilder: (cxt, index) => 12.height, + itemCount: poLinesList.length, + ), ); } Widget prLinesDataView() { return ExpandableNotifier( child: ListView.separated( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemBuilder: (cxt, index) => ExpandablePanel( - header: prLinesList[index].dESCRIPTION.toString().toText14(color: MyColors.textMixColor), - collapsed: Column( - children: [ - ItemDetailGrid( - ItemDetailViewCol("Cost Center", prLinesList[index].cOSTCENTER ?? ""), - ItemDetailViewCol("Code", prLinesList[index].iTEMCODE ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol("Unit", prLinesList[index].uOM ?? ""), - ItemDetailViewCol("Price (SAR)", prLinesList[index].uNITPRICE.toString() ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol("Amount (SAR)", prLinesList[index].lINEAMOUNT.toString() ?? ""), - ItemDetailViewCol("Quantity", prLinesList[index].qUANTITY.toString() ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol("AMU (Last 3 months)", prLinesList[index].iTEMAMU.toString() ?? ""), - Container(), - isItLast: true, - ), - // ItemDetailGrid( - // ItemDetailViewCol(getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTENAME!, getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTEVALUE ?? ""), - // Container(), - // isItLast: true, - // ), - ], - ), - expanded: const SizedBox(), - ).objectContainerView(), - separatorBuilder: (cxt, index) => 12.height, - itemCount: prLinesList.length), + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: + (cxt, index) => + ExpandablePanel( + header: prLinesList[index].dESCRIPTION.toString().toText14( + color: MyColors.textMixColor, + ), + collapsed: Column( + children: [ + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.costCenter.tr(), + prLinesList[index].cOSTCENTER ?? "", + ), + ItemDetailViewCol( + LocaleKeys.code.tr(), + prLinesList[index].iTEMCODE ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.unit.tr(), + prLinesList[index].uOM ?? "", + ), + ItemDetailViewCol( + LocaleKeys.priceSAR.tr(), + prLinesList[index].uNITPRICE.toString() ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.amountSAR.tr(), + prLinesList[index].lINEAMOUNT.toString() ?? "", + ), + ItemDetailViewCol( + LocaleKeys.quantity.tr(), + prLinesList[index].qUANTITY.toString() ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.destination_type.tr(), + prLinesList[index].dESTINATIONTYPE ?? "", + ), + ItemDetailViewCol( + LocaleKeys.destination_organization_name.tr(), + prLinesList[index].dESTINATIONORGANIZATIONNAME ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.amuLastThreeMonths.tr(), + prLinesList[index].iTEMAMU.toString() ?? "", + ), + Container(), + isItLast: true, + ), + // ItemDetailGrid( + // ItemDetailViewCol(getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTENAME!, getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTEVALUE ?? ""), + // Container(), + // isItLast: true, + // ), + ], + ), + expanded: const SizedBox(), + ).objectContainerView(), + separatorBuilder: (cxt, index) => 12.height, + itemCount: prLinesList.length, + ), ); } Widget moNotificationDataView() { return ListView.separated( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemBuilder: (cxt, index) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.code.tr(), moNotificationBodyList[index].iTEMCODE ?? ""), - ItemDetailViewCol(LocaleKeys.unit.tr(), moNotificationBodyList[index].uOM ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.quantity.tr(), moNotificationBodyList[index].qUANTITY?.toString() ?? ""), - ItemDetailViewCol(LocaleKeys.dateRequired.tr(), moNotificationBodyList[index].dATEREQUIRED ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.lineStatus.tr(), moNotificationBodyList[index].lINESTATUS ?? ""), - ItemDetailViewCol(LocaleKeys.statusDate.tr(), moNotificationBodyList[index].sTATUSDATE ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.transactionType.tr(), moNotificationBodyList[index].tRANSACTIONTYPENAME ?? ""), - ItemDetailViewCol(LocaleKeys.operatingUnit.tr(), moNotificationBodyList[index].oPERATINGUNIT ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.organizationCode.tr(), moNotificationBodyList[index].oRGANIZATIONCODE ?? ""), - ItemDetailViewCol(LocaleKeys.organization.tr(), moNotificationBodyList[index].oRGANIZATIONNAME ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.fromSubInventory.tr(), moNotificationBodyList[index].fROMSUBINVENTORY ?? ""), - ItemDetailViewCol(LocaleKeys.fromLocator.tr(), moNotificationBodyList[index].fROMLOCATOR ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.toSubInventory.tr(), moNotificationBodyList[index].tOSUBINVENTORY ?? ""), - ItemDetailViewCol(LocaleKeys.toLocator.tr(), moNotificationBodyList[index].tOLOCATOR ?? ""), - ), - ItemDetailGrid(ItemDetailViewCol(LocaleKeys.shipToLocator.tr(), moNotificationBodyList[index].sHIPTOLOCATION ?? ""), Container()), - 12.height, - 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); + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: + (cxt, index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.code.tr(), + moNotificationBodyList[index].iTEMCODE ?? "", + ), + ItemDetailViewCol( + LocaleKeys.unit.tr(), + moNotificationBodyList[index].uOM ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.quantity.tr(), + moNotificationBodyList[index].qUANTITY?.toString() ?? "", + ), + ItemDetailViewCol( + LocaleKeys.dateRequired.tr(), + moNotificationBodyList[index].dATEREQUIRED ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.lineStatus.tr(), + moNotificationBodyList[index].lINESTATUS ?? "", + ), + ItemDetailViewCol( + LocaleKeys.statusDate.tr(), + moNotificationBodyList[index].sTATUSDATE ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.transactionType.tr(), + moNotificationBodyList[index].tRANSACTIONTYPENAME ?? "", + ), + ItemDetailViewCol( + LocaleKeys.operatingUnit.tr(), + moNotificationBodyList[index].oPERATINGUNIT ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.organizationCode.tr(), + moNotificationBodyList[index].oRGANIZATIONCODE ?? "", + ), + ItemDetailViewCol( + LocaleKeys.organization.tr(), + moNotificationBodyList[index].oRGANIZATIONNAME ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.fromSubInventory.tr(), + moNotificationBodyList[index].fROMSUBINVENTORY ?? "", + ), + ItemDetailViewCol( + LocaleKeys.fromLocator.tr(), + moNotificationBodyList[index].fROMLOCATOR ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.toSubInventory.tr(), + moNotificationBodyList[index].tOSUBINVENTORY ?? "", + ), + ItemDetailViewCol( + LocaleKeys.toLocator.tr(), + moNotificationBodyList[index].tOLOCATOR ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.shipToLocator.tr(), + moNotificationBodyList[index].sHIPTOLOCATION ?? "", + ), + Container(), + ), + 12.height, + 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 itemCreationLinesView() { return ListView.separated( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemBuilder: (cxt, index) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.productName.tr(), itemCreationLines[index].pRODUCTNAME ?? ""), - ItemDetailViewCol(LocaleKeys.productDescription.tr(), itemCreationLines[index].pRODUCTDESCRIPTION ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.unitPrice.tr(), itemCreationLines[index].uNITPRICE?.toString() ?? ""), - ItemDetailViewCol(LocaleKeys.manufacturerName.tr(), itemCreationLines[index].uSERMANUFACTURERNAME ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.manufacturerPartName.tr(), itemCreationLines[index].uSERMFGPARTNUM ?? ""), - ItemDetailViewCol(LocaleKeys.supplierName.tr(), itemCreationLines[index].sUPPLIERNAME ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.supplierContact.tr(), itemCreationLines[index].sUPPLIERCONTACT ?? ""), - ItemDetailViewCol(LocaleKeys.chargeToPatient.tr(), itemCreationLines[index].cHARGETOPATIENT ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.justification.tr(), itemCreationLines[index].jUSTIFICATION ?? ""), - ItemDetailViewCol(LocaleKeys.itemCode.tr(), itemCreationLines[index].iTEMCODE ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.itemDescription.tr(), itemCreationLines[index].iTEMDESCRIPTION ?? ""), - ItemDetailViewCol(LocaleKeys.groupCode.tr(), itemCreationLines[index].iTEMGROUPCODE ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.groupDescription.tr(), itemCreationLines[index].iTEMGROUP ?? ""), - ItemDetailViewCol(LocaleKeys.subgroupCode.tr(), itemCreationLines[index].iTEMSUBGROUPCODE ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.subgroupDescription.tr(), itemCreationLines[index].iTEMSUBGROUP ?? ""), - ItemDetailViewCol(LocaleKeys.primaryUOM.tr(), itemCreationLines[index].pRIMARYUOM ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.manufacturerName.tr(), itemCreationLines[index].sTANDARDMANUFACTURERNAME ?? ""), - ItemDetailViewCol(LocaleKeys.manufacturerPartName.tr(), itemCreationLines[index].sTANDARDMFGPARTNUM ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.templateName.tr(), itemCreationLines[index].tEMPLATENAME ?? ""), - ItemDetailViewCol(LocaleKeys.itemCreationStatus.tr(), itemCreationLines[index].iTEMCREATIONSTATUS ?? ""), - ), - ItemDetailGrid( - ItemDetailViewCol(LocaleKeys.standardizationApprovalStatus.tr(), itemCreationLines[index].sTANDARDSTATUS ?? ""), - ItemDetailViewCol(LocaleKeys.standardizationApprovalRejectionReason.tr(), itemCreationLines[index].sTANDARDREJECTREASON ?? ""), - isItLast: true, - ), - ], - ).objectContainerView(title: itemCreationLines[index].iTEMDESCRIPTION!), - separatorBuilder: (cxt, index) => 12.height, - itemCount: itemCreationLines.length); + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: + (cxt, index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.productName.tr(), + itemCreationLines[index].pRODUCTNAME ?? "", + ), + ItemDetailViewCol( + LocaleKeys.productDescription.tr(), + itemCreationLines[index].pRODUCTDESCRIPTION ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.unitPrice.tr(), + itemCreationLines[index].uNITPRICE?.toString() ?? "", + ), + ItemDetailViewCol( + LocaleKeys.manufacturerName.tr(), + itemCreationLines[index].uSERMANUFACTURERNAME ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.manufacturerPartName.tr(), + itemCreationLines[index].uSERMFGPARTNUM ?? "", + ), + ItemDetailViewCol( + LocaleKeys.supplierName.tr(), + itemCreationLines[index].sUPPLIERNAME ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.supplierContact.tr(), + itemCreationLines[index].sUPPLIERCONTACT ?? "", + ), + ItemDetailViewCol( + LocaleKeys.chargeToPatient.tr(), + itemCreationLines[index].cHARGETOPATIENT ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.justification.tr(), + itemCreationLines[index].jUSTIFICATION ?? "", + ), + ItemDetailViewCol( + LocaleKeys.itemCode.tr(), + itemCreationLines[index].iTEMCODE ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.itemDescription.tr(), + itemCreationLines[index].iTEMDESCRIPTION ?? "", + ), + ItemDetailViewCol( + LocaleKeys.groupCode.tr(), + itemCreationLines[index].iTEMGROUPCODE ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.groupDescription.tr(), + itemCreationLines[index].iTEMGROUP ?? "", + ), + ItemDetailViewCol( + LocaleKeys.subgroupCode.tr(), + itemCreationLines[index].iTEMSUBGROUPCODE ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.subgroupDescription.tr(), + itemCreationLines[index].iTEMSUBGROUP ?? "", + ), + ItemDetailViewCol( + LocaleKeys.primaryUOM.tr(), + itemCreationLines[index].pRIMARYUOM ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.manufacturerName.tr(), + itemCreationLines[index].sTANDARDMANUFACTURERNAME ?? "", + ), + ItemDetailViewCol( + LocaleKeys.manufacturerPartName.tr(), + itemCreationLines[index].sTANDARDMFGPARTNUM ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.templateName.tr(), + itemCreationLines[index].tEMPLATENAME ?? "", + ), + ItemDetailViewCol( + LocaleKeys.itemCreationStatus.tr(), + itemCreationLines[index].iTEMCREATIONSTATUS ?? "", + ), + ), + ItemDetailGrid( + ItemDetailViewCol( + LocaleKeys.standardizationApprovalStatus.tr(), + itemCreationLines[index].sTANDARDSTATUS ?? "", + ), + ItemDetailViewCol( + LocaleKeys.standardizationApprovalRejectionReason.tr(), + itemCreationLines[index].sTANDARDREJECTREASON ?? "", + ), + isItLast: true, + ), + ], + ).objectContainerView( + title: itemCreationLines[index].iTEMDESCRIPTION!, + ), + separatorBuilder: (cxt, index) => 12.height, + itemCount: itemCreationLines.length, + ); } void getPRDetails(BuildContext context, String poLineID) async { try { Utils.showLoading(context); GetPRInformationList? getPRInformationList = GetPRInformationList(); - getPRInformationList = await WorkListApiClient().getPRDetailsForPO(poLineID); + getPRInformationList = await WorkListApiClient().getPRDetailsForPO( + poLineID, + ); Utils.hideLoading(context); Navigator.pushNamed( context, AppRoutes.itemHistory, arguments: ItemHistoryScreenParams( - isItemHistory: false, isMO: false, isPRInfo: true, getPRInformationList: getPRInformationList, title: "PR Details", pItemId: 0, pPoHeaderId: 0, pOLineID: poLineID), + isItemHistory: false, + isMO: false, + isPRInfo: true, + getPRInformationList: getPRInformationList, + title: "PR Details", + pItemId: 0, + pPoHeaderId: 0, + pOLineID: poLineID, + ), ); } catch (ex) { Utils.hideLoading(context);