|
|
|
@ -1,7 +1,9 @@
|
|
|
|
import 'package:easy_localization/src/public_ext.dart';
|
|
|
|
import 'package:easy_localization/src/public_ext.dart';
|
|
|
|
|
|
|
|
import 'package:expandable/expandable.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:mohem_flutter_app/config/routes.dart';
|
|
|
|
import 'package:mohem_flutter_app/config/routes.dart';
|
|
|
|
import 'package:mohem_flutter_app/extensions/int_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/extensions/widget_extensions.dart';
|
|
|
|
import 'package:mohem_flutter_app/generated/locale_keys.g.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_item_creation_ntf_body_list_model.dart';
|
|
|
|
@ -39,66 +41,72 @@ class RequestFragment extends StatelessWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget poLinesDataView() {
|
|
|
|
Widget poLinesDataView() {
|
|
|
|
return ListView.separated(
|
|
|
|
return ExpandableNotifier(
|
|
|
|
shrinkWrap: true,
|
|
|
|
child: ListView.separated(
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemBuilder: (cxt, index) => Column(
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
itemBuilder: (cxt, index) => ExpandablePanel(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
header: poLinesList[index].iTEMDESCRIPTION!.toText14(),
|
|
|
|
children: [
|
|
|
|
collapsed: Column(
|
|
|
|
ItemDetailGrid(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
ItemDetailViewCol(LocaleKeys.code.tr(), poLinesList[index].iTEMCODE ?? ""),
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
ItemDetailViewCol(LocaleKeys.mfg.tr(), poLinesList[index].uOM ?? ""),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.lineType.tr(), poLinesList[index].qUANTITY?.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].rEQUESTOR ?? ""),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.requester.tr(), poLinesList[index].pRNUM ?? ""),
|
|
|
|
|
|
|
|
Container(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
12.height,
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
DefaultButton(LocaleKeys.itemHistory.tr(), () {
|
|
|
|
ItemDetailGrid(
|
|
|
|
Navigator.pushNamed(
|
|
|
|
ItemDetailViewCol(LocaleKeys.code.tr(), poLinesList[index].iTEMCODE ?? ""),
|
|
|
|
cxt,
|
|
|
|
ItemDetailViewCol(LocaleKeys.mfg.tr(), poLinesList[index].uOM ?? ""),
|
|
|
|
AppRoutes.itemHistory,
|
|
|
|
),
|
|
|
|
arguments: ItemHistoryScreenParams(title: LocaleKeys.itemHistory.tr(), isMO: false, pItemId: poLinesList[index].iTEMID),
|
|
|
|
ItemDetailGrid(
|
|
|
|
);
|
|
|
|
ItemDetailViewCol(LocaleKeys.lineType.tr(), poLinesList[index].qUANTITY?.toString() ?? ""),
|
|
|
|
}).expanded,
|
|
|
|
ItemDetailViewCol(LocaleKeys.unit.tr(), poLinesList[index].uOM ?? ""),
|
|
|
|
12.width,
|
|
|
|
),
|
|
|
|
DefaultButton(LocaleKeys.quotationAnalysis.tr(), () {
|
|
|
|
ItemDetailGrid(
|
|
|
|
Navigator.pushNamed(
|
|
|
|
ItemDetailViewCol(LocaleKeys.price.tr(), poLinesList[index].uNITPRICE?.toString() ?? ""),
|
|
|
|
cxt,
|
|
|
|
ItemDetailViewCol(LocaleKeys.lineAmount.tr(), poLinesList[index].lINEAMOUNT?.toString() ?? ""),
|
|
|
|
AppRoutes.itemHistory,
|
|
|
|
),
|
|
|
|
arguments: ItemHistoryScreenParams(
|
|
|
|
ItemDetailGrid(
|
|
|
|
isItemHistory: false, isMO: false, title: LocaleKeys.quotationAnalysis.tr(), pItemId: poLinesList[index].iTEMID, pPoHeaderId: poLinesList[index].pOHEADERID),
|
|
|
|
ItemDetailViewCol(LocaleKeys.quantity.tr(), poLinesList[index].qUANTITY?.toString() ?? ""),
|
|
|
|
);
|
|
|
|
ItemDetailViewCol(LocaleKeys.lineDiscount.tr(), poLinesList[index].lINEDISCPERCENTAGE?.toString() ?? ""),
|
|
|
|
}).expanded,
|
|
|
|
),
|
|
|
|
|
|
|
|
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].rEQUESTOR ?? ""),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.requester.tr(), poLinesList[index].pRNUM ?? ""),
|
|
|
|
|
|
|
|
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),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}).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,
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
),
|
|
|
|
],
|
|
|
|
expanded: const SizedBox(),
|
|
|
|
).objectContainerView(title: poLinesList[index].iTEMDESCRIPTION!),
|
|
|
|
).objectContainerView(),
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
itemCount: poLinesList.length);
|
|
|
|
itemCount: poLinesList.length),
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget moNotificationDataView() {
|
|
|
|
Widget moNotificationDataView() {
|
|
|
|
|