@feedmepos/mf-inventory-portal 1.8.0-dev.2 → 1.8.0-dev.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App-5GYyCfFq.js +1445 -0
- package/dist/{ApprovalView-RaXuWWSu.js → ApprovalView-DY1ayl1W.js} +26 -25
- package/dist/{BindingsDialog-DomvXijP.js → BindingsDialog-Dm7uKMfV.js} +2 -2
- package/dist/{BindingsPicker-DGnzxEs7.js → BindingsPicker-DhnMlj4x.js} +2 -2
- package/dist/{BindingsTable-DfG9kWrv.js → BindingsTable-Cxibcjka.js} +10 -10
- package/dist/BulkReceiveRequestPage-w4AA6BxB.js +2839 -0
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CVekIoiN.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-B3ESPbQp.js} +1 -1
- package/dist/{ClosingDraftView-C3n66bbh.js → ClosingDraftView-DMaONEZ7.js} +748 -746
- package/dist/ClosingHistoryView-BBYruOux.js +769 -0
- package/dist/{ClosingTemplateView-DwGloYxn.js → ClosingTemplateView-DcwgokRl.js} +22 -21
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-9eY_r8LF.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-a72IldDO.js} +1 -1
- package/dist/{DefaultView-JC_e4xgC.js → DefaultView-BVr_7JDn.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-BBCvI67S.js → DeliveryOrderPrintPreview-BXZFD3D5.js} +15 -15
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-H4FWc9ga.js → EmailDialog.vue_vue_type_script_setup_true_lang-Dne_9P3j.js} +10077 -9950
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CYkPbFSA.js +48 -0
- package/dist/FeatureCapabilityGate-DK_rTVyJ.js +82 -0
- package/dist/FeaturePageGate.vue_vue_type_script_setup_true_lang-DIhV51l7.js +189 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Q8Mptiv3.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B80EHMBT.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CE1_yyHe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C94IFGoH.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CGJi3f86.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-COZPDuAM.js} +2 -2
- package/dist/{FmMultiselectDialog-DCaRlBIy.js → FmMultiselectDialog-C1P22sj2.js} +2 -2
- package/dist/FmMultiselectDialog-Kb3IftHf.js +123 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-ClaLVtpK.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BqB71yfu.js} +105 -99
- package/dist/ImportView-EJ4u8NHM.js +1540 -0
- package/dist/{IngredientsView-DPj9lBTK.js → IngredientsView-Bxsgm4E7.js} +691 -689
- package/dist/{IntegrationExplorerView-CO2wpUR_.js → IntegrationExplorerView-owEaOVeG.js} +1537 -1620
- package/dist/IntegrationPlatformView-BuptPyjg.js +13385 -0
- package/dist/{IntegrationView-DIeZoey0.js → IntegrationView-DAcdY_d_.js} +2604 -2565
- package/dist/{InventoryBindingForm-Cj4_Chue.js → InventoryBindingForm-BvjY4zrn.js} +1 -1
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhbF-jgN.js +472 -0
- package/dist/{InventoryBindingSummary-yzGzd7jJ.js → InventoryBindingSummary-DPqm94GX.js} +1 -1
- package/dist/JsonViewer.vue_vue_type_script_setup_true_lang-C_hg75l0.js +25 -0
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DDsigNJ4.js +79 -0
- package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-CM3gtYZo.js +19 -0
- package/dist/PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-0F-yOcPC.js +79 -0
- package/dist/PremiumUpgradePage.vue_vue_type_script_setup_true_lang-DGAxPOEh.js +58 -0
- package/dist/ProductionRunDetailPage-BaPCJUqT.js +2317 -0
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BYyiiAWb.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CNRX3MYt.js} +3053 -3163
- package/dist/ProductionRunPage-B6Jsv9Hh.js +954 -0
- package/dist/{PublishView-CPK9NeVF.js → PublishView-DonUv6nP.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DosqWQeN.js → PurchaseOrderPrintPreview-CK3Cqdwp.js} +17 -17
- package/dist/{ReceiveRequestView-BxSkpK2t.js → ReceiveRequestView-CMAnKxzm.js} +17 -16
- package/dist/RecipeView-Bx13Bckq.js +3272 -0
- package/dist/SettingsView-D1MiAkD8.js +1005 -0
- package/dist/StockView-CsxTjVEd.js +3003 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-GdGJCuc0.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BT73j9SA.js} +1 -1
- package/dist/{SupplierView-BKxKoi_0.js → SupplierView-CFACoZya.js} +304 -301
- package/dist/{SurchargeView-Db4cwhZv.js → SurchargeView-CShhZa3x.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CpkF77Ow.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-B2OdmdI_.js} +2 -2
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js +71 -0
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-x3N2Oypo.js +332 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BISmGBJE.js +4953 -0
- package/dist/TransferTemplateView-kx2IPqEv.js +2347 -0
- package/dist/{UnitCostHistoryView-CqcyjCCd.js → UnitCostHistoryView-DgPWsXaB.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DO80_8SZ.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BtfJJgIP.js} +4 -4
- package/dist/{UnitView-BqdK1AM_.js → UnitView-aupXLRMk.js} +111 -106
- package/dist/{WarehouseView-COJM9IXM.js → WarehouseView-MTvbY4n4.js} +12 -11
- package/dist/{WastageTemplateView-DW3viTHN.js → WastageTemplateView-Bs9HL-LK.js} +19 -18
- package/dist/api/bill.d.ts +4 -2
- package/dist/api/bill.spec.d.ts +1 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/feature-flags.d.ts +4 -0
- package/dist/api/integration-sync-log.d.ts +0 -13
- package/dist/api/license.d.ts +0 -2
- package/dist/api/netsuite-explorer.d.ts +1 -0
- package/dist/api/stock.d.ts +1 -1
- package/dist/{app-yvK__CBL.js → app-D38sV2ls.js} +10177 -10126
- package/dist/app.d.ts +151 -164
- package/dist/app.js +1 -1
- package/dist/bulk-edit-simulation.helper-DgniL8FN.js +178 -0
- package/dist/{closing-template-DezidSM0.js → closing-template-D_NAj_mU.js} +4 -4
- package/dist/components/FeatureCapabilityBadge.vue.d.ts +4 -0
- package/dist/components/FeatureCapabilityGate.spec.d.ts +1 -0
- package/dist/components/FeatureCapabilityGate.vue.d.ts +5 -0
- package/dist/components/FeatureGateLayout.vue.d.ts +11 -0
- package/dist/components/FeaturePageGate.spec.d.ts +1 -0
- package/dist/components/FeaturePageGate.vue.d.ts +34 -0
- package/dist/components/FmAdminCollapsiblePanel.vue.d.ts +1 -1
- package/dist/components/FmDroppableField.vue.d.ts +1 -1
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +2 -2
- package/dist/components/FmUnitInputProps.d.ts +1 -0
- package/dist/components/FmUnitInputRules.d.ts +1 -1
- package/dist/components/HrmPermissionGuard.vue.d.ts +1 -1
- package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
- package/dist/{views/ingredient-group/IngredientGroupView.vue.d.ts → components/PremiumUpgradePage.vue.d.ts} +0 -1
- package/dist/components/TemplatePublishDialog.d.ts +2 -0
- package/dist/components/TemplatePublishDialog.spec.d.ts +1 -0
- package/dist/composable/defineApi.d.ts +1 -1
- package/dist/{date2-2XjepIqc.js → date2-CvgxwuM1.js} +1 -1
- package/dist/{dayjs.min-CNp5DLBB.js → dayjs.min-BOKV8T5Q.js} +1 -1
- package/dist/{decimal-Z7oJdGk8.js → decimal-5xyg1WLu.js} +2 -2
- package/dist/{defineDeepModel-CMxJn_H2.js → defineDeepModel-BwB9XcMu.js} +5 -5
- package/dist/{duplicate-template-BetV5oy_.js → duplicate-template-DvIgjm4K.js} +1 -1
- package/dist/{feature-CkWaZ-5K.js → feature-CsPbMoeJ.js} +2088 -2853
- package/dist/feature-flags/core.d.ts +3 -2
- package/dist/feature-flags/portal-feature-catalog.d.ts +1 -6
- package/dist/feature-flags/portal-feature-catalog.spec.d.ts +1 -0
- package/dist/feature-flags/vue.d.ts +24 -1
- package/dist/feature-flags/vue.spec.d.ts +1 -0
- package/dist/{format-time-from-id-DatSI9uD.js → format-time-from-id-DD6Ik9EK.js} +1 -1
- package/dist/{format-unit-display-DM5We5cx.js → format-unit-display-DG564AN3.js} +209 -208
- package/dist/helper/country.spec.d.ts +1 -0
- package/dist/helper/menu-usage-module.d.ts +2 -1
- package/dist/helper/number.d.ts +5 -1
- package/dist/helper/rules.d.ts +1 -1
- package/dist/{id-to-date-Dxw2jKhy.js → id-to-date-DoN7OM21.js} +1 -1
- package/dist/{import-export.helper-BOmADwUw.js → import-export.helper-CevBRFTZ.js} +17 -17
- package/dist/{index-7fz5sGDO.js → index-BIh1oTQH.js} +3 -3
- package/dist/{index-CIH9NCvs.js → index-BP3Avix6.js} +1 -1
- package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
- package/dist/index-eGvSlWMU.js +1892 -0
- package/dist/{index-ClYgfwW7.js → index-mzXhLwrZ.js} +2234 -2163
- package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
- package/dist/{lz-string-CCsc2X7t.js → lz-string-DMjWYCk6.js} +1 -1
- package/dist/menu-usage-module-Bq_KLsO4.js +74 -0
- package/dist/{netsuite-COumFXC2.js → netsuite-ZtoZBFBX.js} +254 -263
- package/dist/netsuite-explorer-h_vID_ao.js +79 -0
- package/dist/{predefined-templates-Bw9A9LNA.js → predefined-templates-CdurFRJ4.js} +1 -1
- package/dist/production-run-list-DR1WsaBR.js +61 -0
- package/dist/{purchase-order-template-BaZjdGq8.js → purchase-order-template-BVdCftEo.js} +1 -1
- package/dist/{recalculationUtils-t32wAurN.js → recalculationUtils-DBG8HGiJ.js} +1 -1
- package/dist/router/name.d.ts +2 -2
- package/dist/{row-action.enum-BDeudY4d.js → row-action.enum-CGyAg4dC.js} +1 -1
- package/dist/rules-DbFiOzUd.js +243 -0
- package/dist/{stock-B59sfN28.js → stock-BATH4SoA.js} +1 -1
- package/dist/stock-DXxsDPEO.js +78 -0
- package/dist/stores/feature.d.ts +40 -10
- package/dist/stores/feature.load-state.spec.d.ts +1 -0
- package/dist/stores/inventory.d.ts +0 -47
- package/dist/stores/inventory.no-location.spec.d.ts +1 -0
- package/dist/stores/supplier.d.ts +1 -1
- package/dist/stores/warehouse.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-DnbLJ_cS.js → supplier-CKXQmBZn.js} +2 -2
- package/dist/{surcharge-C1uE3uQa.js → surcharge-qupRJjjO.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-DjfyrFHJ.js → uom-rules-ALtgjANX.js} +1 -1
- package/dist/{use-ingredient-select-dialog-7A7fWyEH.js → use-ingredient-select-dialog-C1sJpjfV.js} +2 -2
- package/dist/use-inventory-binding-dialog-tl7-epun.js +113 -0
- package/dist/{use-template-enabled-locations-C-Hqqgzt.js → use-template-enabled-locations-DWk2ndDC.js} +2 -2
- package/dist/{use-transfer-locations-CqsXvOI2.js → use-transfer-locations-CsdYY996.js} +14 -14
- package/dist/{useHrmPermission-BzwD3Ctc.js → useHrmPermission-BtuqUrwj.js} +1 -1
- package/dist/{useNavigationMenu-PrZg9HS7.js → useNavigationMenu-DKxKXykI.js} +111 -117
- package/dist/{useSseClient-FCyLWq8k.js → useSseClient-CRfpltKK.js} +1 -1
- package/dist/views/changelog/composables/use-snapshot-diff.d.ts +2 -2
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1 -1
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
- package/dist/views/import/helper/submit-rows.d.ts +1 -1
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -1
- package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +3 -1
- package/dist/views/{ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts → integration/IntegrationPlatformView.vue.d.ts} +11 -24
- package/dist/views/integration/components/Synergy/importFn.spec.d.ts +1 -0
- package/dist/views/integration/components/Xilnex/importFn.spec.d.ts +1 -0
- package/dist/views/integration/helper/opening-balance.d.ts +22 -0
- package/dist/views/integration/helper/opening-balance.spec.d.ts +1 -0
- package/dist/views/production-run/ProductionRunDetailPage.spec.d.ts +1 -0
- package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → production-run/ProductionRunDetailPage.vue.d.ts} +2 -2
- package/dist/views/production-run/ProductionRunPage.vue.d.ts +2 -0
- package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +2 -2
- package/dist/views/production-run/features/detail/ProductionRunOverviewTab.vue.d.ts +4 -4
- package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +19 -9
- package/dist/views/production-run/features/lifecycle/CancelRunDialog.vue.d.ts +4 -4
- package/dist/views/production-run/features/lifecycle/CloseRunDialog.vue.d.ts +4 -4
- package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.vue.d.ts +14 -14
- package/dist/views/production-run/features/lifecycle/TargetReachedDialog.vue.d.ts +4 -4
- package/dist/views/production-run/features/planning/ProductionRunFormDialog.vue.d.ts +4 -4
- package/dist/views/production-run/features/planning/ProductionRunPlanner.vue.d.ts +1 -1
- package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.d.ts +6 -6
- package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +0 -1
- package/dist/views/production-run/shared/model/production-run-list.d.ts +1 -1
- package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.vue.d.ts +1 -1
- package/dist/views/production-run/shared/ui/ProductionRunInfoText.vue.d.ts +1 -1
- package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +2 -2
- package/dist/views/production-run/shared/ui/ProductionRunTextarea.vue.d.ts +3 -3
- package/dist/views/receive-request/composables/netsuite-order-label.d.ts +11 -0
- package/dist/views/receive-request/composables/netsuite-order-label.spec.d.ts +1 -0
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +9 -9
- package/dist/views/receive-request/composables/use-receive-request-form.spec.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +7 -7
- package/dist/views/receive-request/import/export.spec.d.ts +1 -0
- package/dist/views/receive-request-bulk/BulkReceiveRequestPage.vue.d.ts +2 -0
- package/dist/views/receive-request-bulk/components/CreateTransferWizard.spec.d.ts +1 -0
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +20 -20
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.readiness.spec.d.ts +1 -0
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +2 -2
- package/dist/views/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
- package/dist/views/recipe/helper/bulk-edit-simulation.helper.d.ts +0 -1
- package/dist/views/recipe/helper/import-recipe.d.ts +32 -2
- package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
- package/dist/views/settings/PlanLicenseDisplay.spec.d.ts +1 -0
- package/dist/views/settings/PlanLicenseDisplay.vue.d.ts +2 -0
- package/dist/views/stock/components/StockRecordCard.spec.d.ts +1 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +19 -865
- package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
- package/dist/views/stock/components/dialog/BillInventoryInfoDialog.spec.d.ts +1 -0
- package/dist/views/stock/components/dialog/BillInventoryInfoDialog.vue.d.ts +36 -0
- package/dist/views/stock/components/dialog/ConvertSkuDialog.spec.d.ts +1 -0
- package/dist/views/stock/composables/use-last-closing-summary.d.ts +4 -0
- package/dist/views/stock/composables/use-last-closing-summary.spec.d.ts +1 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
- package/dist/views/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
- package/dist/views/unit/composables/use-unit-form.spec.d.ts +1 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
- package/dist/vue-CVco8McV.js +290 -0
- package/dist/{vue-i18n-C34f-Tph.js → vue-i18n-C443zpcA.js} +450 -450
- package/dist/{xlsx.util-X4amwe_k.js → xlsx.util-5_47Kslf.js} +2 -2
- package/package.json +71 -66
- package/dist/App-DVHgBTHP.js +0 -1499
- package/dist/BulkReceiveRequestView-DxHWrfbi.js +0 -2656
- package/dist/ClosingHistoryView-kdpYGy1Y.js +0 -761
- package/dist/DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-5Cc08Svt.js +0 -58
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C1C8aDA6.js +0 -61
- package/dist/FmMultiselectDialog-yVPY5aBV.js +0 -77
- package/dist/ImportView-DQrVMzxN.js +0 -1302
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-7lT5UZc8.js +0 -51
- package/dist/IngredientGroupView-BMUnEaY7.js +0 -1000
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CaBOK7NC.js +0 -563
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DzzTPdyF.js +0 -72
- package/dist/ProductionRunDetailView-Cw-ecaey.js +0 -2312
- package/dist/ProductionRunView-C11eseXQ.js +0 -930
- package/dist/RecipeView-oHDWsT0P.js +0 -3624
- package/dist/SettingsView-QlUNwFhM.js +0 -983
- package/dist/StockView-a8LbVZ_7.js +0 -2614
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CCCj4WVF.js +0 -299
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CFNPXqt5.js +0 -4796
- package/dist/TransferTemplateView-CzwxOBMQ.js +0 -2326
- package/dist/menu-usage-module-BdjYEk3s.js +0 -57
- package/dist/number-gSLvxNqA.js +0 -138
- package/dist/portal-feature-catalog-yGIESKTc.js +0 -246
- package/dist/random-CSbEbElR.js +0 -10
- package/dist/rules-C1btu0Md.js +0 -98
- package/dist/stock-BF86TMW0.js +0 -75
- package/dist/use-inventory-binding-dialog-Cc1tjTfV.js +0 -152
- package/dist/usePromise-CbVUCxhj.js +0 -29
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -10
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -21
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
- package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
- package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +0 -31
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -77
- package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
|
@@ -1,1000 +0,0 @@
|
|
|
1
|
-
import { ref as C, computed as F, h as V, defineComponent as W, watch as ce, resolveComponent as R, createElementBlock as z, openBlock as G, createVNode as b, createElementVNode as c, unref as l, toDisplayString as E, createBlock as U, withCtx as M, Fragment as _e, renderList as be, createTextVNode as ke, createCommentVNode as le, isRef as xe, normalizeClass as he, normalizeStyle as we, createSlots as Re, Teleport as Ie, normalizeProps as Se, guardReactiveProps as Ge } from "vue";
|
|
2
|
-
import { a as O, c as N, j as ie, u as Fe } from "./app-yvK__CBL.js";
|
|
3
|
-
import { useDialog as Ve, useSnackbar as Q, components as L, useProxiedModel as Ce, useBreakpoints as De } from "@feedmepos/ui-library";
|
|
4
|
-
import { F as S } from "./form-mode.enum-BKiNVH6A.js";
|
|
5
|
-
import { useI18n as q, useCoreStore as Ae } from "@feedmepos/mf-common";
|
|
6
|
-
import { defineStore as me, storeToRefs as re } from "pinia";
|
|
7
|
-
import { D as ue, R as H } from "./row-action.enum-BDeudY4d.js";
|
|
8
|
-
import { c as $e } from "./component-BmLAdDiY.js";
|
|
9
|
-
import { u as Te, _ as Ee } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
10
|
-
import { _ as Me, F as de } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
|
|
11
|
-
import { _ as Pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CGJi3f86.js";
|
|
12
|
-
import { d as fe } from "./defineDeepModel-CMxJn_H2.js";
|
|
13
|
-
import { I as Ue, A as Be, U as Le, R as pe } from "./rules-C1btu0Md.js";
|
|
14
|
-
import { L as ze, P as Ne, D as Oe } from "./app-C39bYJmq.js";
|
|
15
|
-
import { u as qe } from "./FmMultiselectDialog-yVPY5aBV.js";
|
|
16
|
-
import { r as ve } from "./random-CSbEbElR.js";
|
|
17
|
-
import { u as Ke, R as je } from "./usePromise-CbVUCxhj.js";
|
|
18
|
-
import { _ as He } from "./DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-5Cc08Svt.js";
|
|
19
|
-
const J = me(
|
|
20
|
-
"ingredientGroupactions",
|
|
21
|
-
function() {
|
|
22
|
-
const _ = Ve(), p = Q(), k = O(), { t: i } = q(), v = C();
|
|
23
|
-
function e() {
|
|
24
|
-
const u = {
|
|
25
|
-
modelValue: {},
|
|
26
|
-
mode: S.CREATE,
|
|
27
|
-
show: !0,
|
|
28
|
-
"onUpdate:show"(m) {
|
|
29
|
-
v.value.show = m;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
v.value = u;
|
|
33
|
-
}
|
|
34
|
-
async function a(u) {
|
|
35
|
-
const m = {
|
|
36
|
-
modelValue: N(u),
|
|
37
|
-
mode: S.UPDATE,
|
|
38
|
-
show: !0,
|
|
39
|
-
"onUpdate:show"(r) {
|
|
40
|
-
v.value.show = r;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
v.value = m;
|
|
44
|
-
}
|
|
45
|
-
async function t(u, m, r) {
|
|
46
|
-
m.value = !0;
|
|
47
|
-
try {
|
|
48
|
-
await k.deleteSkuGroup(u), p.open({
|
|
49
|
-
title: "Success",
|
|
50
|
-
message: `Deleted ${u.name}`,
|
|
51
|
-
type: "success"
|
|
52
|
-
});
|
|
53
|
-
} catch (g) {
|
|
54
|
-
p.open({
|
|
55
|
-
title: `Cannot delete ${u.name}`,
|
|
56
|
-
message: "Please try again.",
|
|
57
|
-
type: "error"
|
|
58
|
-
}), console.error("failed to delete ingredient", g);
|
|
59
|
-
} finally {
|
|
60
|
-
m.value = !1, r();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function n(u, m, r) {
|
|
64
|
-
_.open({
|
|
65
|
-
title: i("inventory.ingredient.delete.title", [(u == null ? void 0 : u.name) ?? ""]),
|
|
66
|
-
closeButton: !1,
|
|
67
|
-
message: i("inventory.ingredient.delete.message"),
|
|
68
|
-
primaryActions: {
|
|
69
|
-
text: i("common.delete"),
|
|
70
|
-
close: !0,
|
|
71
|
-
variant: "destructive"
|
|
72
|
-
},
|
|
73
|
-
secondaryActions: {
|
|
74
|
-
text: i("common.cancel"),
|
|
75
|
-
close: !0
|
|
76
|
-
}
|
|
77
|
-
}).onPrimary(() => t(u, m, r));
|
|
78
|
-
}
|
|
79
|
-
function o() {
|
|
80
|
-
}
|
|
81
|
-
function y() {
|
|
82
|
-
}
|
|
83
|
-
return {
|
|
84
|
-
createIngredientGroup: e,
|
|
85
|
-
updateIngredientGroup: a,
|
|
86
|
-
deleteIngredientGroup: n,
|
|
87
|
-
importIngredientGroups: o,
|
|
88
|
-
exportIngredientGroups: y,
|
|
89
|
-
ingredientGroupDialogProps: v
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
), We = me(
|
|
93
|
-
"ingredientGroupTable",
|
|
94
|
-
function() {
|
|
95
|
-
const _ = C(!1), p = Q(), k = O(), i = J();
|
|
96
|
-
async function v() {
|
|
97
|
-
_.value = !0;
|
|
98
|
-
try {
|
|
99
|
-
await k.readInventory();
|
|
100
|
-
} catch (t) {
|
|
101
|
-
console.error("error on reading inventory", t), p.open({
|
|
102
|
-
title: "Error",
|
|
103
|
-
message: "Something went wrong, please try again.",
|
|
104
|
-
type: "error"
|
|
105
|
-
});
|
|
106
|
-
} finally {
|
|
107
|
-
_.value = !1;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function e(t, n) {
|
|
111
|
-
switch (n = N(n), t) {
|
|
112
|
-
case H.Edit:
|
|
113
|
-
return i.updateIngredientGroup(n);
|
|
114
|
-
case H.Delete:
|
|
115
|
-
return i.deleteIngredientGroup(
|
|
116
|
-
n,
|
|
117
|
-
_,
|
|
118
|
-
() => v()
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
const a = F(() => [
|
|
123
|
-
{
|
|
124
|
-
accessorKey: "name",
|
|
125
|
-
header: () => "Name"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
accessorKey: "skuRefs.length",
|
|
129
|
-
header: () => "No. of items"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
accessorKey: "ref",
|
|
133
|
-
header: () => "Reference"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: "action",
|
|
137
|
-
header: "",
|
|
138
|
-
cell(t) {
|
|
139
|
-
return $e(
|
|
140
|
-
[ue[H.Edit], ue[H.Delete]],
|
|
141
|
-
(n) => {
|
|
142
|
-
e(n, t.row.original);
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
},
|
|
146
|
-
enableSorting: !1,
|
|
147
|
-
size: 40,
|
|
148
|
-
meta: {
|
|
149
|
-
cellClass: "",
|
|
150
|
-
headerClass: ""
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
]);
|
|
154
|
-
return {
|
|
155
|
-
fetchIngredientGroups: v,
|
|
156
|
-
loading: _,
|
|
157
|
-
columnDefs: a
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
function Ye(s) {
|
|
162
|
-
return {
|
|
163
|
-
addItem: () => {
|
|
164
|
-
const i = s.create();
|
|
165
|
-
s.items = [...s.items, i];
|
|
166
|
-
},
|
|
167
|
-
updateItem: (i) => {
|
|
168
|
-
i && (s.items = s.items.map(
|
|
169
|
-
(v) => s.id(v) === s.id(i) ? i : v
|
|
170
|
-
));
|
|
171
|
-
},
|
|
172
|
-
removeItem: (i) => {
|
|
173
|
-
s.items = s.items.filter((v) => s.id(v) !== s.id(i));
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
function ge(s) {
|
|
178
|
-
const _ = qe(), p = O(), k = F(() => [
|
|
179
|
-
{
|
|
180
|
-
id: "delete",
|
|
181
|
-
header: "",
|
|
182
|
-
cell(e) {
|
|
183
|
-
const a = e.row.original;
|
|
184
|
-
return V(
|
|
185
|
-
"div",
|
|
186
|
-
{ class: "w-full flex justify-end" },
|
|
187
|
-
V(L.FmButton, {
|
|
188
|
-
class: "delete-button",
|
|
189
|
-
key: a._id,
|
|
190
|
-
type: "button",
|
|
191
|
-
icon: "delete",
|
|
192
|
-
variant: "tertiary",
|
|
193
|
-
size: "md",
|
|
194
|
-
disabled: s.disabled ?? !1,
|
|
195
|
-
onClick: () => {
|
|
196
|
-
s.skuRefs = s.skuRefs.filter((t) => t._id !== a._id);
|
|
197
|
-
}
|
|
198
|
-
})
|
|
199
|
-
);
|
|
200
|
-
},
|
|
201
|
-
enableSorting: !1,
|
|
202
|
-
size: 40,
|
|
203
|
-
meta: {
|
|
204
|
-
cellClass: "",
|
|
205
|
-
headerClass: ""
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
id: "skuRef",
|
|
210
|
-
header: () => "Ingredient",
|
|
211
|
-
accessorFn: (e) => {
|
|
212
|
-
var a, t;
|
|
213
|
-
return `${((a = p.skuById[e._id]) == null ? void 0 : a.name) ?? ""} (${((t = p.skuById[e._id]) == null ? void 0 : t.code) ?? ""})`;
|
|
214
|
-
},
|
|
215
|
-
cell: ({ row: e }) => {
|
|
216
|
-
const a = p.skuById[e.original._id];
|
|
217
|
-
return V(
|
|
218
|
-
"div",
|
|
219
|
-
{
|
|
220
|
-
class: "w-full flex flex-col"
|
|
221
|
-
},
|
|
222
|
-
[
|
|
223
|
-
V("div", { class: "fm-typo-en-body-lg-400 line-clamp-1" }, a.name),
|
|
224
|
-
V(
|
|
225
|
-
"div",
|
|
226
|
-
{ class: "fm-typo-en-body-md-400 line-clamp-1 text-fm-color-typo-secondary" },
|
|
227
|
-
a.code
|
|
228
|
-
)
|
|
229
|
-
]
|
|
230
|
-
);
|
|
231
|
-
},
|
|
232
|
-
size: "auto",
|
|
233
|
-
enableSorting: !1
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
id: "unit",
|
|
237
|
-
header: () => "Unit",
|
|
238
|
-
accessorFn: (e) => {
|
|
239
|
-
const a = p.skuById[e._id];
|
|
240
|
-
return a.unit.measurements.computeFirst(
|
|
241
|
-
(t) => t.id === e.trackingMeasurement ? t.name : null
|
|
242
|
-
) ?? a.unit.name;
|
|
243
|
-
},
|
|
244
|
-
enableSorting: !1
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
id: "unitOption",
|
|
248
|
-
header: () => "Unit",
|
|
249
|
-
accessorKey: "trackingMeasurement",
|
|
250
|
-
cell(e) {
|
|
251
|
-
const a = p.skuById[e.row.original._id];
|
|
252
|
-
if (!a) return null;
|
|
253
|
-
const t = [
|
|
254
|
-
{
|
|
255
|
-
label: a.unit.name,
|
|
256
|
-
sublabel: a.unit.abbrev,
|
|
257
|
-
value: null
|
|
258
|
-
},
|
|
259
|
-
...a.unit.measurements.map((n) => ({
|
|
260
|
-
label: n.name,
|
|
261
|
-
sublabel: n.abbrev,
|
|
262
|
-
value: n.id
|
|
263
|
-
}))
|
|
264
|
-
].filter((n) => !n.label.toLowerCase().includes("inactive"));
|
|
265
|
-
return V(L.FmSelect, {
|
|
266
|
-
modelValue: e.row.original.trackingMeasurement ?? null,
|
|
267
|
-
items: t,
|
|
268
|
-
disabled: s.disabled ?? !1,
|
|
269
|
-
"onUpdate:modelValue": (n) => {
|
|
270
|
-
s.skuRefs = s.skuRefs.map((o) => o._id === e.row.original._id ? { ...o, trackingMeasurement: n } : o);
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
},
|
|
274
|
-
enableSorting: !1
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
id: "priority",
|
|
278
|
-
header: () => "Priority",
|
|
279
|
-
accessorKey: "priority",
|
|
280
|
-
enableSorting: !0,
|
|
281
|
-
cell(e) {
|
|
282
|
-
const a = e.row.original;
|
|
283
|
-
return V(L.FmTextField, {
|
|
284
|
-
modelValue: a.priority ?? e.row.index + 1,
|
|
285
|
-
rules: [
|
|
286
|
-
Ue(),
|
|
287
|
-
Be(1),
|
|
288
|
-
Le(
|
|
289
|
-
s.skuRefs.filter((t) => t._id !== a._id).map((t) => {
|
|
290
|
-
const n = p.skuById[t._id];
|
|
291
|
-
return {
|
|
292
|
-
label: n == null ? void 0 : n.name,
|
|
293
|
-
value: t.priority
|
|
294
|
-
};
|
|
295
|
-
})
|
|
296
|
-
)
|
|
297
|
-
],
|
|
298
|
-
"onUpdate:modelValue": (t) => {
|
|
299
|
-
const n = Number(t);
|
|
300
|
-
isNaN(n) || (s.skuRefs = s.skuRefs.map((o) => o._id === e.row.original._id ? { ...o, priority: n } : o));
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
id: "default",
|
|
307
|
-
header: () => "",
|
|
308
|
-
accessorKey: "default",
|
|
309
|
-
cell(e) {
|
|
310
|
-
const a = p.skuById[e.row.original._id];
|
|
311
|
-
return a ? V(L.FmCheckbox, {
|
|
312
|
-
modelValue: e.row.original.default ?? !1,
|
|
313
|
-
value: a._id,
|
|
314
|
-
disabled: s.disabled ?? !1,
|
|
315
|
-
"onUpdate:modelValue": () => {
|
|
316
|
-
s.skuRefs = s.skuRefs.map((t) => t._id === e.row.original._id ? { ...t, default: !0 } : { ...t, default: !1 });
|
|
317
|
-
}
|
|
318
|
-
}) : null;
|
|
319
|
-
},
|
|
320
|
-
enableSorting: !1,
|
|
321
|
-
size: 40,
|
|
322
|
-
meta: {
|
|
323
|
-
cellClass: "",
|
|
324
|
-
headerClass: ""
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
id: "move",
|
|
329
|
-
header: "",
|
|
330
|
-
cell(e) {
|
|
331
|
-
const a = e.row.original;
|
|
332
|
-
return V("div", { class: "w-full flex justify-end" }, [
|
|
333
|
-
V(L.FmButton, {
|
|
334
|
-
key: a._id,
|
|
335
|
-
type: "button",
|
|
336
|
-
icon: "keyboard_arrow_up",
|
|
337
|
-
variant: "tertiary",
|
|
338
|
-
size: "md",
|
|
339
|
-
disabled: s.disabled ?? !1,
|
|
340
|
-
onClick: () => {
|
|
341
|
-
const t = [...s.skuRefs], n = t.findIndex((o) => o._id === a._id);
|
|
342
|
-
if (n > 0) {
|
|
343
|
-
const o = t[n - 1];
|
|
344
|
-
t[n - 1] = a, t[n] = o;
|
|
345
|
-
}
|
|
346
|
-
s.skuRefs = [...t];
|
|
347
|
-
}
|
|
348
|
-
}),
|
|
349
|
-
V(L.FmButton, {
|
|
350
|
-
key: a._id,
|
|
351
|
-
type: "button",
|
|
352
|
-
icon: "keyboard_arrow_down",
|
|
353
|
-
variant: "tertiary",
|
|
354
|
-
size: "md",
|
|
355
|
-
disabled: s.disabled ?? !1,
|
|
356
|
-
onClick: () => {
|
|
357
|
-
const t = [...s.skuRefs], n = t.findIndex((o) => o._id === a._id);
|
|
358
|
-
if (n < t.length - 1) {
|
|
359
|
-
const o = t[n + 1];
|
|
360
|
-
t[n + 1] = a, t[n] = o;
|
|
361
|
-
}
|
|
362
|
-
s.skuRefs = [...t];
|
|
363
|
-
}
|
|
364
|
-
})
|
|
365
|
-
]);
|
|
366
|
-
},
|
|
367
|
-
enableSorting: !1,
|
|
368
|
-
size: 40,
|
|
369
|
-
meta: {
|
|
370
|
-
cellClass: "",
|
|
371
|
-
headerClass: ""
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
]);
|
|
375
|
-
return {
|
|
376
|
-
get columnDefs() {
|
|
377
|
-
return k.value;
|
|
378
|
-
},
|
|
379
|
-
promptAddIngredient: async () => {
|
|
380
|
-
if (!s.isDefaultList && !s.allowOverride)
|
|
381
|
-
return _.alert("Not allowed", "You cannot add ingredients to this list.");
|
|
382
|
-
const v = p.skus.map((t) => ({
|
|
383
|
-
label: t.name,
|
|
384
|
-
sublabel: t.code,
|
|
385
|
-
value: t._id
|
|
386
|
-
})), e = (s.skuRefs ?? []).map((t) => t._id), a = await _.multiSelect(v, e, (t) => {
|
|
387
|
-
var o, y, u, m, r, g;
|
|
388
|
-
const n = (o = s.skuRefs) == null ? void 0 : o.findIndex((I) => I._id === t);
|
|
389
|
-
return {
|
|
390
|
-
_id: t,
|
|
391
|
-
trackingMeasurement: typeof n != "number" || n == -1 ? (y = p.skuById[t]) == null ? void 0 : y.trackingMeasurement : (m = (u = s.skuRefs) == null ? void 0 : u[n]) == null ? void 0 : m.trackingMeasurement,
|
|
392
|
-
priority: ((g = (r = s.skuRefs) == null ? void 0 : r[n]) == null ? void 0 : g.priority) ?? s.skuRefs.length,
|
|
393
|
-
default: !1
|
|
394
|
-
};
|
|
395
|
-
});
|
|
396
|
-
s.skuRefs = a ?? s.skuRefs;
|
|
397
|
-
},
|
|
398
|
-
columnVisibility: {
|
|
399
|
-
delete: s.isDefaultList || !!s.allowOverride,
|
|
400
|
-
unit: !s.isDefaultList && !s.allowOverride,
|
|
401
|
-
unitOption: s.isDefaultList || !!s.allowOverride,
|
|
402
|
-
// previous demo: sort priority by moving sku element in the array,
|
|
403
|
-
// new demo: sort priority using priority field.
|
|
404
|
-
// can reenable if this use case is requested to be restored
|
|
405
|
-
move: !1
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
const Je = { class: "flex flex-col gap-16" }, Qe = { class: "flex flex-col" }, Xe = { class: "flex flex-col gap-4" }, Ze = { class: "flex flex-col gap-16" }, et = { class: "flex flex-col" }, tt = { class: "flex flex-col gap-4" }, nt = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ot = /* @__PURE__ */ W({
|
|
410
|
-
__name: "IngredientGroupRuleField",
|
|
411
|
-
props: {
|
|
412
|
-
disabled: { type: Boolean },
|
|
413
|
-
modelValue: {}
|
|
414
|
-
},
|
|
415
|
-
setup(s) {
|
|
416
|
-
const _ = s, { t: p } = q(), k = Ae(), i = F(() => {
|
|
417
|
-
var y;
|
|
418
|
-
const n = /* @__PURE__ */ new Map(), o = k.restaurants.value.map((u) => u.customAttributes ?? {});
|
|
419
|
-
for (const u of o)
|
|
420
|
-
for (const [m, r] of Object.entries(u))
|
|
421
|
-
n.has(m) || n.set(m, /* @__PURE__ */ new Set()), r && ((y = n.get(m)) == null || y.add(r));
|
|
422
|
-
return n;
|
|
423
|
-
}), v = F(() => [
|
|
424
|
-
...[...i.value.entries()].map(([o, y]) => ({
|
|
425
|
-
type: "string",
|
|
426
|
-
key: o,
|
|
427
|
-
entity: "restaurant",
|
|
428
|
-
values: [...y]
|
|
429
|
-
}))
|
|
430
|
-
]), e = fe("modelValue", {
|
|
431
|
-
get default() {
|
|
432
|
-
return {
|
|
433
|
-
_id: `skuGroupRule_${(/* @__PURE__ */ new Date()).toISOString()}_${ve(4)}`,
|
|
434
|
-
name: "",
|
|
435
|
-
rule: null,
|
|
436
|
-
skuRefs: []
|
|
437
|
-
};
|
|
438
|
-
},
|
|
439
|
-
watchProps: !0
|
|
440
|
-
}), a = C(e.rule ? ze.build(e.rule) : null);
|
|
441
|
-
ce(
|
|
442
|
-
a,
|
|
443
|
-
(n) => {
|
|
444
|
-
e.rule = n ? Ne.build(n) : null;
|
|
445
|
-
},
|
|
446
|
-
{ deep: !0, immediate: !0 }
|
|
447
|
-
);
|
|
448
|
-
const t = ge({
|
|
449
|
-
get disabled() {
|
|
450
|
-
return _.disabled ?? !1;
|
|
451
|
-
},
|
|
452
|
-
get skuRefs() {
|
|
453
|
-
return e.skuRefs ?? [];
|
|
454
|
-
},
|
|
455
|
-
set skuRefs(n) {
|
|
456
|
-
e.skuRefs = n;
|
|
457
|
-
},
|
|
458
|
-
isDefaultList: !1,
|
|
459
|
-
allowOverride: !1
|
|
460
|
-
});
|
|
461
|
-
return (n, o) => {
|
|
462
|
-
const y = R("FmTextField"), u = R("FmLabel"), m = R("FmFormGroup"), r = R("FmTable");
|
|
463
|
-
return G(), z("div", Je, [
|
|
464
|
-
b(y, {
|
|
465
|
-
modelValue: l(e).name,
|
|
466
|
-
"onUpdate:modelValue": o[0] || (o[0] = (g) => l(e).name = g),
|
|
467
|
-
label: l(p)("inventory.ingredientGroup.form.rules.name"),
|
|
468
|
-
"label-mark": "required",
|
|
469
|
-
rules: [l(pe)()]
|
|
470
|
-
}, null, 8, ["modelValue", "label", "rules"]),
|
|
471
|
-
c("div", Qe, [
|
|
472
|
-
c("div", Xe, [
|
|
473
|
-
b(u, {
|
|
474
|
-
label: l(p)("inventory.ingredientGroup.form.rules.title"),
|
|
475
|
-
required: ""
|
|
476
|
-
}, null, 8, ["label"]),
|
|
477
|
-
b(l(Oe), {
|
|
478
|
-
modelValue: a.value,
|
|
479
|
-
"onUpdate:modelValue": o[1] || (o[1] = (g) => a.value = g),
|
|
480
|
-
attributes: v.value
|
|
481
|
-
}, null, 8, ["modelValue", "attributes"])
|
|
482
|
-
]),
|
|
483
|
-
b(m, {
|
|
484
|
-
"model-value": a.value,
|
|
485
|
-
rules: [
|
|
486
|
-
(g) => {
|
|
487
|
-
var I;
|
|
488
|
-
return !!((I = g == null ? void 0 : g.rules) != null && I.length) || "At least one rule is required";
|
|
489
|
-
}
|
|
490
|
-
]
|
|
491
|
-
}, null, 8, ["model-value", "rules"])
|
|
492
|
-
]),
|
|
493
|
-
c("div", Ze, [
|
|
494
|
-
c("div", et, [
|
|
495
|
-
c("div", tt, [
|
|
496
|
-
c("div", null, [
|
|
497
|
-
b(u, {
|
|
498
|
-
label: l(p)("inventory.ingredientGroup.form.rules.ingredients"),
|
|
499
|
-
required: ""
|
|
500
|
-
}, null, 8, ["label"])
|
|
501
|
-
])
|
|
502
|
-
]),
|
|
503
|
-
b(m, {
|
|
504
|
-
"model-value": l(e).skuRefs,
|
|
505
|
-
rules: [
|
|
506
|
-
(g) => !!(g != null && g.length) || "At least one ingredient is required"
|
|
507
|
-
]
|
|
508
|
-
}, null, 8, ["model-value", "rules"])
|
|
509
|
-
]),
|
|
510
|
-
b(r, {
|
|
511
|
-
"row-data": l(e).skuRefs,
|
|
512
|
-
"column-defs": l(t).columnDefs,
|
|
513
|
-
"page-size": l(e).skuRefs.length,
|
|
514
|
-
"shrink-at": 9999,
|
|
515
|
-
"column-visibility": l(t).columnVisibility,
|
|
516
|
-
"hide-footer": ""
|
|
517
|
-
}, null, 8, ["row-data", "column-defs", "page-size", "column-visibility"])
|
|
518
|
-
]),
|
|
519
|
-
c("div", nt, E(l(p)("inventory.ingredientGroup.form.defaultRule.defaultCheckbox")), 1)
|
|
520
|
-
]);
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
}), st = { class: "flex flex-col gap-16" }, at = { class: "flex flex-col gap-16" }, lt = { class: "flex flex-col" }, it = { class: "flex items-center" }, rt = { class: "flex-1" }, ut = { class: "flex flex-col gap-8" }, dt = { class: "flex-1 fm-typo-en-title-sm-600" }, ct = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary px-4" }, mt = { class: "flex flex-col gap-16" }, ft = { class: "flex flex-col gap-8" }, pt = { class: "flex-1 fm-typo-en-title-sm-600" }, vt = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "flex flex-col gap-12" }, yt = { class: "flex items-center" }, _t = { class: "flex-1 fm-typo-en-body-lg-600 line-clamp-1" }, bt = { key: 0 }, kt = {
|
|
524
|
-
key: 1,
|
|
525
|
-
class: "fm-typo-en-body-lg-400"
|
|
526
|
-
}, xt = /* @__PURE__ */ W({
|
|
527
|
-
__name: "IngredientGroupForm",
|
|
528
|
-
props: {
|
|
529
|
-
mode: {},
|
|
530
|
-
disabled: { type: Boolean },
|
|
531
|
-
modelValue: {},
|
|
532
|
-
menu: {}
|
|
533
|
-
},
|
|
534
|
-
emits: ["validation-success"],
|
|
535
|
-
setup(s, { expose: _, emit: p }) {
|
|
536
|
-
const k = s, i = fe("modelValue", {
|
|
537
|
-
watchProps: !0
|
|
538
|
-
}), v = p, { t: e } = q(), a = Ye({
|
|
539
|
-
get items() {
|
|
540
|
-
return i.rules ?? [];
|
|
541
|
-
},
|
|
542
|
-
set items(o) {
|
|
543
|
-
i.rules = o;
|
|
544
|
-
},
|
|
545
|
-
create: function() {
|
|
546
|
-
var o;
|
|
547
|
-
return {
|
|
548
|
-
_id: `skuGroupRule_${(/* @__PURE__ */ new Date()).toISOString()}_${ve(4)}`,
|
|
549
|
-
name: "",
|
|
550
|
-
rule: null,
|
|
551
|
-
skuRefs: ((o = k.modelValue) == null ? void 0 : o.defaultSkuRefs) ?? []
|
|
552
|
-
};
|
|
553
|
-
},
|
|
554
|
-
id: function(o) {
|
|
555
|
-
return o._id;
|
|
556
|
-
}
|
|
557
|
-
}), t = ge({
|
|
558
|
-
get disabled() {
|
|
559
|
-
return k.disabled;
|
|
560
|
-
},
|
|
561
|
-
get skuRefs() {
|
|
562
|
-
return i.defaultSkuRefs ?? [];
|
|
563
|
-
},
|
|
564
|
-
set skuRefs(o) {
|
|
565
|
-
i.defaultSkuRefs = o;
|
|
566
|
-
const y = o.map((r) => r._id), u = i.rules;
|
|
567
|
-
if (!u) return;
|
|
568
|
-
const m = o.groupBy(
|
|
569
|
-
(r) => r._id,
|
|
570
|
-
(r) => r.trackingMeasurement
|
|
571
|
-
);
|
|
572
|
-
for (const r of u) {
|
|
573
|
-
const g = r.skuRefs.filter((x) => y.includes(x._id)), I = o.filter(
|
|
574
|
-
(x) => !g.some((w) => w._id === x._id)
|
|
575
|
-
);
|
|
576
|
-
r.skuRefs = [...g, ...I].map((x) => {
|
|
577
|
-
var w;
|
|
578
|
-
return {
|
|
579
|
-
...x,
|
|
580
|
-
trackingMeasurement: ((w = m.get(x._id)) == null ? void 0 : w[0]) ?? null
|
|
581
|
-
};
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
|
-
i.rules = [...u];
|
|
585
|
-
},
|
|
586
|
-
isDefaultList: !0
|
|
587
|
-
}), n = C();
|
|
588
|
-
return _({
|
|
589
|
-
validateInputs: () => {
|
|
590
|
-
var o;
|
|
591
|
-
return (o = n.value) == null ? void 0 : o.validateInputs();
|
|
592
|
-
},
|
|
593
|
-
resetInputsValidation: () => {
|
|
594
|
-
var o;
|
|
595
|
-
return (o = n.value) == null ? void 0 : o.resetInputsValidation();
|
|
596
|
-
},
|
|
597
|
-
resetInputs: () => {
|
|
598
|
-
var o;
|
|
599
|
-
return (o = n.value) == null ? void 0 : o.resetInputs();
|
|
600
|
-
}
|
|
601
|
-
}), (o, y) => {
|
|
602
|
-
const u = R("FmTextField"), m = R("FmButton"), r = R("FmFormGroup"), g = R("FmTable"), I = R("FmCard"), x = R("FmForm");
|
|
603
|
-
return G(), U(x, {
|
|
604
|
-
onValidationSuccess: y[2] || (y[2] = (w) => v("validation-success")),
|
|
605
|
-
ref_key: "formRef",
|
|
606
|
-
ref: n,
|
|
607
|
-
class: "flex flex-col gap-64"
|
|
608
|
-
}, {
|
|
609
|
-
default: M(() => {
|
|
610
|
-
var w;
|
|
611
|
-
return [
|
|
612
|
-
c("div", st, [
|
|
613
|
-
b(u, {
|
|
614
|
-
label: l(e)("inventory.ingredientGroup.form.name"),
|
|
615
|
-
"label-mark": "required",
|
|
616
|
-
rules: [l(pe)()],
|
|
617
|
-
modelValue: l(i).name,
|
|
618
|
-
"onUpdate:modelValue": y[0] || (y[0] = (d) => l(i).name = d)
|
|
619
|
-
}, null, 8, ["label", "rules", "modelValue"]),
|
|
620
|
-
b(u, {
|
|
621
|
-
label: l(e)("inventory.ingredientGroup.form.ref"),
|
|
622
|
-
"label-mark": "optional",
|
|
623
|
-
modelValue: l(i).ref,
|
|
624
|
-
"onUpdate:modelValue": y[1] || (y[1] = (d) => l(i).ref = d)
|
|
625
|
-
}, null, 8, ["label", "modelValue"])
|
|
626
|
-
]),
|
|
627
|
-
c("div", at, [
|
|
628
|
-
c("div", lt, [
|
|
629
|
-
c("div", it, [
|
|
630
|
-
c("div", rt, [
|
|
631
|
-
c("div", ut, [
|
|
632
|
-
c("div", dt, E(l(e)("inventory.ingredientGroup.form.defaultRule.title")), 1)
|
|
633
|
-
])
|
|
634
|
-
]),
|
|
635
|
-
c("div", null, [
|
|
636
|
-
b(m, {
|
|
637
|
-
disabled: o.disabled,
|
|
638
|
-
label: "Add ingredient",
|
|
639
|
-
"prepend-icon": "link",
|
|
640
|
-
variant: "plain",
|
|
641
|
-
class: "border-1 rounded-lg border-fm-color-primary",
|
|
642
|
-
onClick: l(t).promptAddIngredient,
|
|
643
|
-
size: "md"
|
|
644
|
-
}, null, 8, ["disabled", "onClick"])
|
|
645
|
-
])
|
|
646
|
-
]),
|
|
647
|
-
b(r, {
|
|
648
|
-
"model-value": l(i).defaultSkuRefs,
|
|
649
|
-
rules: [
|
|
650
|
-
(d) => !!(d != null && d.length) || "At least one ingredient is required"
|
|
651
|
-
]
|
|
652
|
-
}, null, 8, ["model-value", "rules"])
|
|
653
|
-
]),
|
|
654
|
-
c("div", null, [
|
|
655
|
-
b(g, {
|
|
656
|
-
"row-data": l(i).defaultSkuRefs ?? [],
|
|
657
|
-
"column-defs": l(t).columnDefs,
|
|
658
|
-
"column-visibility": l(t).columnVisibility,
|
|
659
|
-
"page-size": (w = l(i).defaultSkuRefs) == null ? void 0 : w.length,
|
|
660
|
-
"shrink-at": 9999,
|
|
661
|
-
"hide-footer": ""
|
|
662
|
-
}, null, 8, ["row-data", "column-defs", "column-visibility", "page-size"])
|
|
663
|
-
]),
|
|
664
|
-
c("div", ct, E(l(e)("inventory.ingredientGroup.form.defaultRule.defaultCheckbox")), 1)
|
|
665
|
-
]),
|
|
666
|
-
c("div", mt, [
|
|
667
|
-
c("div", ft, [
|
|
668
|
-
c("div", pt, E(l(e)("inventory.ingredientGroup.form.rules.title")), 1),
|
|
669
|
-
c("div", vt, E(l(e)("inventory.ingredientGroup.form.rules.description")), 1)
|
|
670
|
-
]),
|
|
671
|
-
(G(!0), z(_e, null, be(l(i).rules, (d, f) => (G(), U(I, {
|
|
672
|
-
key: d.id,
|
|
673
|
-
variant: "outlined",
|
|
674
|
-
class: "p-16"
|
|
675
|
-
}, {
|
|
676
|
-
default: M(() => [
|
|
677
|
-
c("div", gt, [
|
|
678
|
-
c("div", yt, [
|
|
679
|
-
c("div", _t, [
|
|
680
|
-
ke(E(l(e)("inventory.ingredientGroup.form.rules.rule_N", [f + 1])), 1),
|
|
681
|
-
d.name ? (G(), z("span", bt, ": ")) : le("", !0),
|
|
682
|
-
d.name ? (G(), z("span", kt, E(d.name), 1)) : le("", !0)
|
|
683
|
-
]),
|
|
684
|
-
b(m, {
|
|
685
|
-
variant: "tertiary",
|
|
686
|
-
icon: "delete",
|
|
687
|
-
onClick: (h) => l(a).removeItem(d)
|
|
688
|
-
}, null, 8, ["onClick"])
|
|
689
|
-
]),
|
|
690
|
-
c("div", null, [
|
|
691
|
-
(G(), U(ot, {
|
|
692
|
-
key: d._id,
|
|
693
|
-
"model-value": d,
|
|
694
|
-
"onUpdate:modelValue": l(a).updateItem,
|
|
695
|
-
disabled: o.disabled,
|
|
696
|
-
menu: o.menu
|
|
697
|
-
}, null, 8, ["model-value", "onUpdate:modelValue", "disabled", "menu"]))
|
|
698
|
-
])
|
|
699
|
-
])
|
|
700
|
-
]),
|
|
701
|
-
_: 2
|
|
702
|
-
}, 1024))), 128)),
|
|
703
|
-
c("div", null, [
|
|
704
|
-
b(m, {
|
|
705
|
-
variant: "plain",
|
|
706
|
-
icon: "add",
|
|
707
|
-
label: l(e)("inventory.ingredientGroup.form.rules.addRule"),
|
|
708
|
-
onClick: l(a).addItem
|
|
709
|
-
}, null, 8, ["label", "onClick"])
|
|
710
|
-
])
|
|
711
|
-
])
|
|
712
|
-
];
|
|
713
|
-
}),
|
|
714
|
-
_: 1
|
|
715
|
-
}, 512);
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
}), ht = {
|
|
719
|
-
key: 0,
|
|
720
|
-
class: "text-fm-color-typo-primary fm-typo-en-body-lg-400"
|
|
721
|
-
}, wt = { class: "flex gap-4" }, Rt = /* @__PURE__ */ W({
|
|
722
|
-
__name: "IngredientGroupDialog",
|
|
723
|
-
props: {
|
|
724
|
-
show: { type: Boolean },
|
|
725
|
-
mode: { default: S.READ },
|
|
726
|
-
modelValue: {}
|
|
727
|
-
},
|
|
728
|
-
emits: ["update:show"],
|
|
729
|
-
setup(s) {
|
|
730
|
-
const _ = s, p = O(), k = Ke(() => p.readCachedMenu()), i = F(
|
|
731
|
-
() => k.result.value.state === je.success ? k.result.value.data : void 0
|
|
732
|
-
), v = Q(), { t: e } = q(), a = Ce(_, "show");
|
|
733
|
-
function t() {
|
|
734
|
-
return {
|
|
735
|
-
_id: "",
|
|
736
|
-
name: "",
|
|
737
|
-
rules: []
|
|
738
|
-
};
|
|
739
|
-
}
|
|
740
|
-
const n = C(t()), o = C(`${Math.random()}`);
|
|
741
|
-
ce(
|
|
742
|
-
() => _.show,
|
|
743
|
-
(d) => {
|
|
744
|
-
if (!d) return;
|
|
745
|
-
let f = N(_.modelValue ?? t());
|
|
746
|
-
f.defaultSkuRefs && (f.defaultSkuRefs = f.defaultSkuRefs.map((h, $) => ({
|
|
747
|
-
...h,
|
|
748
|
-
priority: h.priority ?? $ + 1
|
|
749
|
-
})));
|
|
750
|
-
for (let h = 0; f.rules && h < f.rules.length; h++) {
|
|
751
|
-
const $ = f.rules[h];
|
|
752
|
-
$.skuRefs = $.skuRefs.map((D, Y) => ({
|
|
753
|
-
...D,
|
|
754
|
-
priority: D.priority ?? Y + 1
|
|
755
|
-
}));
|
|
756
|
-
}
|
|
757
|
-
n.value = f, o.value = f._id || `${Math.random()}`;
|
|
758
|
-
}
|
|
759
|
-
);
|
|
760
|
-
const y = F(() => {
|
|
761
|
-
switch (_.mode) {
|
|
762
|
-
case S.READ:
|
|
763
|
-
return "";
|
|
764
|
-
case S.UPDATE:
|
|
765
|
-
return e("inventory.ingredientGroup.update.title");
|
|
766
|
-
case S.CREATE:
|
|
767
|
-
return e("inventory.ingredientGroup.create.title");
|
|
768
|
-
}
|
|
769
|
-
return "";
|
|
770
|
-
}), u = F(() => {
|
|
771
|
-
switch (_.mode) {
|
|
772
|
-
case S.READ:
|
|
773
|
-
return "";
|
|
774
|
-
case S.UPDATE:
|
|
775
|
-
return e("common.save");
|
|
776
|
-
case S.CREATE:
|
|
777
|
-
return e("common.add");
|
|
778
|
-
}
|
|
779
|
-
return "";
|
|
780
|
-
}), m = C(), r = C(!1);
|
|
781
|
-
async function g() {
|
|
782
|
-
r.value = !0;
|
|
783
|
-
const d = N(n.value);
|
|
784
|
-
try {
|
|
785
|
-
await p.createSkuGroup(d), a.value = !1, v.open({
|
|
786
|
-
title: e("inventory.common.success"),
|
|
787
|
-
message: e("inventory.ingredientGroup.create.success", { name: d.name }),
|
|
788
|
-
type: "success"
|
|
789
|
-
});
|
|
790
|
-
} catch (f) {
|
|
791
|
-
f instanceof ie || v.open({
|
|
792
|
-
title: e("inventory.ingredientGroup.create.error.title"),
|
|
793
|
-
message: e("inventory.ingredientGroup.create.error.message"),
|
|
794
|
-
type: "error"
|
|
795
|
-
});
|
|
796
|
-
} finally {
|
|
797
|
-
r.value = !1;
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
async function I() {
|
|
801
|
-
r.value = !0;
|
|
802
|
-
const d = N(n.value);
|
|
803
|
-
try {
|
|
804
|
-
await p.updateSkuGroup(d), r.value = !1, a.value = !1, v.open({
|
|
805
|
-
title: e("inventory.common.success"),
|
|
806
|
-
message: e("inventory.ingredientGroup.update.success", { name: d.name }),
|
|
807
|
-
type: "success"
|
|
808
|
-
});
|
|
809
|
-
} catch (f) {
|
|
810
|
-
f instanceof ie || v.open({
|
|
811
|
-
title: e("inventory.ingredientGroup.update.error.title"),
|
|
812
|
-
message: e("inventory.ingredientGroup.update.error.message"),
|
|
813
|
-
type: "error"
|
|
814
|
-
});
|
|
815
|
-
} finally {
|
|
816
|
-
r.value = !1;
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
function x() {
|
|
820
|
-
var d, f;
|
|
821
|
-
(f = (d = m.value) == null ? void 0 : d.validateInputs) == null || f.call(d);
|
|
822
|
-
}
|
|
823
|
-
function w() {
|
|
824
|
-
switch (_.mode) {
|
|
825
|
-
case S.READ:
|
|
826
|
-
return;
|
|
827
|
-
case S.UPDATE:
|
|
828
|
-
return I();
|
|
829
|
-
case S.CREATE:
|
|
830
|
-
return g();
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
return (d, f) => {
|
|
834
|
-
const h = R("FmButton"), $ = R("FmSideSheet");
|
|
835
|
-
return G(), U($, {
|
|
836
|
-
"model-value": l(a),
|
|
837
|
-
"onUpdate:modelValue": f[3] || (f[3] = (D) => xe(a) ? a.value = D : null),
|
|
838
|
-
header: y.value,
|
|
839
|
-
"close-button": "",
|
|
840
|
-
"dismiss-away": "",
|
|
841
|
-
"max-width": 800
|
|
842
|
-
}, {
|
|
843
|
-
"side-sheet-footer": M(() => [
|
|
844
|
-
c("div", wt, [
|
|
845
|
-
b(h, {
|
|
846
|
-
loading: r.value,
|
|
847
|
-
label: u.value,
|
|
848
|
-
onClick: x
|
|
849
|
-
}, null, 8, ["loading", "label"]),
|
|
850
|
-
b(h, {
|
|
851
|
-
disabled: r.value,
|
|
852
|
-
label: l(e)("common.close"),
|
|
853
|
-
variant: "tertiary",
|
|
854
|
-
onClick: f[2] || (f[2] = (D) => a.value = !1)
|
|
855
|
-
}, null, 8, ["disabled", "label"])
|
|
856
|
-
])
|
|
857
|
-
]),
|
|
858
|
-
default: M(() => [
|
|
859
|
-
i.value ? (G(), U(xt, {
|
|
860
|
-
menu: i.value,
|
|
861
|
-
class: "w-full",
|
|
862
|
-
ref_key: "hasValidationExpose",
|
|
863
|
-
ref: m,
|
|
864
|
-
key: o.value,
|
|
865
|
-
"model-value": n.value,
|
|
866
|
-
"onUpdate:modelValue": f[0] || (f[0] = (D) => n.value = D),
|
|
867
|
-
mode: d.mode,
|
|
868
|
-
disabled: r.value,
|
|
869
|
-
onValidationSuccess: f[1] || (f[1] = (D) => w())
|
|
870
|
-
}, null, 8, ["menu", "model-value", "mode", "disabled"])) : (G(), z("div", ht, "Loading.."))
|
|
871
|
-
]),
|
|
872
|
-
_: 1
|
|
873
|
-
}, 8, ["model-value", "header"]);
|
|
874
|
-
};
|
|
875
|
-
}
|
|
876
|
-
}), It = { class: "flex flex-col py-8" }, St = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Gt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, jt = /* @__PURE__ */ W({
|
|
877
|
-
__name: "IngredientGroupView",
|
|
878
|
-
setup(s) {
|
|
879
|
-
const _ = O(), p = F(() => _.skuGroups), k = Fe(), { t: i } = q(), {
|
|
880
|
-
createIngredientGroup: v,
|
|
881
|
-
updateIngredientGroup: e,
|
|
882
|
-
importIngredientGroups: a,
|
|
883
|
-
exportIngredientGroups: t
|
|
884
|
-
} = J(), { columnDefs: n, loading: o } = re(We()), { ingredientGroupDialogProps: y } = re(J()), u = C(!1);
|
|
885
|
-
let m;
|
|
886
|
-
function r(A) {
|
|
887
|
-
m = A, u.value = !0;
|
|
888
|
-
}
|
|
889
|
-
function g() {
|
|
890
|
-
const A = m;
|
|
891
|
-
m = void 0, A == null || A();
|
|
892
|
-
}
|
|
893
|
-
function I(A) {
|
|
894
|
-
switch (A) {
|
|
895
|
-
case "add":
|
|
896
|
-
return r(() => v());
|
|
897
|
-
case "import":
|
|
898
|
-
return r(() => a());
|
|
899
|
-
case "export":
|
|
900
|
-
return r(() => t());
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
const x = C(""), w = C(!1), d = F(() => w.value || o.value), { breakpoints: f } = De(), h = F(() => f.value.xs || f.value.sm), $ = F(() => h.value ? 10 : 20), D = Te(), Y = F(() => [
|
|
904
|
-
{
|
|
905
|
-
label: i("inventory.ingredient.create.title"),
|
|
906
|
-
value: "add",
|
|
907
|
-
isPrimary: !0,
|
|
908
|
-
prependIcon: "add"
|
|
909
|
-
},
|
|
910
|
-
{ label: i("common.import"), value: "import" },
|
|
911
|
-
{ label: i("common.export"), value: "export" }
|
|
912
|
-
]);
|
|
913
|
-
return (A, T) => {
|
|
914
|
-
const ye = R("FmTable");
|
|
915
|
-
return G(), U(Ee, {
|
|
916
|
-
title: l(i)("inventory.ingredientGroup.title"),
|
|
917
|
-
actions: Y.value,
|
|
918
|
-
"onClick:action": I
|
|
919
|
-
}, {
|
|
920
|
-
default: M(() => [
|
|
921
|
-
c("div", {
|
|
922
|
-
class: he([
|
|
923
|
-
"flex flex-col gap-8 max-h-full",
|
|
924
|
-
{
|
|
925
|
-
"p-0": h.value,
|
|
926
|
-
"px-24 ": !h.value
|
|
927
|
-
}
|
|
928
|
-
])
|
|
929
|
-
}, [
|
|
930
|
-
b(Pe, {
|
|
931
|
-
searchable: "",
|
|
932
|
-
search: x.value,
|
|
933
|
-
"onUpdate:search": T[0] || (T[0] = (P) => x.value = P)
|
|
934
|
-
}, null, 8, ["search"]),
|
|
935
|
-
b(ye, {
|
|
936
|
-
style: we(l(D).tableHeight),
|
|
937
|
-
"column-defs": l(n),
|
|
938
|
-
"row-data": p.value,
|
|
939
|
-
"search-value": x.value,
|
|
940
|
-
loading: !l(k)._currentLocation || d.value,
|
|
941
|
-
"loading-text": l(i)("inventory.common.loading"),
|
|
942
|
-
onRowClick: T[2] || (T[2] = (P) => r(() => l(e)(P.original))),
|
|
943
|
-
"page-size": $.value
|
|
944
|
-
}, {
|
|
945
|
-
"list-row": M((P) => [
|
|
946
|
-
b(Me, {
|
|
947
|
-
row: P,
|
|
948
|
-
onRowClick: T[1] || (T[1] = (B) => r(() => l(e)(B)))
|
|
949
|
-
}, Re({
|
|
950
|
-
default: M((B) => {
|
|
951
|
-
var X, Z, ee, K, te, ne, oe, se, j, ae;
|
|
952
|
-
return [
|
|
953
|
-
c("div", It, [
|
|
954
|
-
c("div", St, [
|
|
955
|
-
b(l(de), {
|
|
956
|
-
render: (ee = (Z = (X = B.code) == null ? void 0 : X.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ee.cell,
|
|
957
|
-
props: (te = (K = B.code) == null ? void 0 : K.getContext) == null ? void 0 : te.call(K)
|
|
958
|
-
}, null, 8, ["render", "props"])
|
|
959
|
-
]),
|
|
960
|
-
c("div", Gt, [
|
|
961
|
-
b(l(de), {
|
|
962
|
-
render: (se = (oe = (ne = B.name) == null ? void 0 : ne.column) == null ? void 0 : oe.columnDef) == null ? void 0 : se.cell,
|
|
963
|
-
props: (ae = (j = B.name) == null ? void 0 : j.getContext) == null ? void 0 : ae.call(j)
|
|
964
|
-
}, null, 8, ["render", "props"])
|
|
965
|
-
])
|
|
966
|
-
])
|
|
967
|
-
];
|
|
968
|
-
}),
|
|
969
|
-
_: 2
|
|
970
|
-
}, [
|
|
971
|
-
w.value ? {
|
|
972
|
-
name: "loading-text",
|
|
973
|
-
fn: M(() => [
|
|
974
|
-
c("div", null, E(l(i)("inventory.ingredient.table.importing")), 1)
|
|
975
|
-
]),
|
|
976
|
-
key: "0"
|
|
977
|
-
} : void 0
|
|
978
|
-
]), 1032, ["row"])
|
|
979
|
-
]),
|
|
980
|
-
_: 1
|
|
981
|
-
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "loading-text", "page-size"])
|
|
982
|
-
], 2),
|
|
983
|
-
(G(), U(Ie, { to: "body" }, [
|
|
984
|
-
b(Rt, Se(Ge(l(y))), null, 16),
|
|
985
|
-
b(He, {
|
|
986
|
-
modelValue: u.value,
|
|
987
|
-
"onUpdate:modelValue": T[3] || (T[3] = (P) => u.value = P),
|
|
988
|
-
"feature-name": "Ingredient Group",
|
|
989
|
-
onProceed: g
|
|
990
|
-
}, null, 8, ["modelValue"])
|
|
991
|
-
]))
|
|
992
|
-
]),
|
|
993
|
-
_: 1
|
|
994
|
-
}, 8, ["title", "actions"]);
|
|
995
|
-
};
|
|
996
|
-
}
|
|
997
|
-
});
|
|
998
|
-
export {
|
|
999
|
-
jt as default
|
|
1000
|
-
};
|