@feedmepos/mf-inventory-portal 1.8.0-dev.8 → 1.8.0
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-C8i7vBxz.js → App-BPdZMhM8.js} +515 -536
- package/dist/{ApprovalView-GHgTeCBV.js → ApprovalView-UzjSuZ2L.js} +26 -25
- package/dist/{BindingsDialog-C4-S2CWk.js → BindingsDialog-Cb6WRlKq.js} +2 -2
- package/dist/{BindingsPicker-C7YUArBj.js → BindingsPicker-CtD4U4lv.js} +2 -2
- package/dist/{BindingsTable-1Zoqi4ZS.js → BindingsTable-CX-3403K.js} +10 -10
- package/dist/BulkReceiveRequestPage-CUq1Lmww.js +2839 -0
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DFSg0-gv.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-C5cA-lGH.js} +1 -1
- package/dist/{ClosingDraftView-CnWFyWSE.js → ClosingDraftView-Ca_SvdWQ.js} +748 -746
- package/dist/{ClosingHistoryView-Bkm0voU6.js → ClosingHistoryView-DzkeJYoe.js} +7 -7
- package/dist/{ClosingTemplateView-Bz81JTsg.js → ClosingTemplateView-DSrelbso.js} +22 -21
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-6s-24euf.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BuOuXPy1.js} +1 -1
- package/dist/{DefaultView-1RRzbPB3.js → DefaultView-Dw-7Y8vD.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-KcLqjOj1.js → DeliveryOrderPrintPreview-C5qJsv_O.js} +15 -15
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-r0Q0qhoK.js → EmailDialog.vue_vue_type_script_setup_true_lang-D8od7aKT.js} +9847 -9723
- package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-Cwmk3NLS.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-ChekXW32.js} +11 -10
- package/dist/FeatureCapabilityGate-C-IM5_7n.js +82 -0
- package/dist/FeaturePageGate.vue_vue_type_script_setup_true_lang-DEDU1XUC.js +189 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-pzIzIWpX.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B861gqIJ.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B6cFB4vX.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Ckli_nZx.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D_o6pX9i.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BEjFoMJJ.js} +2 -2
- package/dist/{FmMultiselectDialog-CC_Na_p1.js → FmMultiselectDialog-CShFKSIW.js} +2 -2
- package/dist/{FmMultiselectDialog-D0GhmOQ9.js → FmMultiselectDialog-Ci-6NMsV.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DQlSMRoB.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Dkx5vVap.js} +105 -99
- package/dist/ImportView-7ij7RUHI.js +1540 -0
- package/dist/{IngredientsView-B2I2OPSb.js → IngredientsView-fIPtTyFD.js} +367 -365
- package/dist/{IntegrationExplorerView-WK1EmwLA.js → IntegrationExplorerView-DLYT4T-I.js} +1537 -1620
- package/dist/IntegrationPlatformView-CwywuK_y.js +13385 -0
- package/dist/{IntegrationView-CeaL92Yj.js → IntegrationView-DnyVHXge.js} +2380 -2340
- package/dist/{InventoryBindingForm-DgtaDM0I.js → InventoryBindingForm-BBs8v7CL.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CqDN355J.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang--pI5wz_M.js} +134 -134
- package/dist/{InventoryBindingSummary-C_W456aj.js → InventoryBindingSummary-CwIrQ8lG.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-DJSbskyn.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-D6-lo7iI.js → PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-0F-yOcPC.js} +1 -1
- package/dist/PremiumUpgradePage.vue_vue_type_script_setup_true_lang-DGAxPOEh.js +58 -0
- package/dist/ProductionRunDetailPage-C_WC4qfP.js +2317 -0
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-DwBY6gIb.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BIkoMOM2.js} +3051 -3161
- package/dist/ProductionRunPage-DuzVrjbZ.js +954 -0
- package/dist/{PublishView-Dv-W6ntx.js → PublishView-BVg44yke.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-D1TAnJd_.js → PurchaseOrderPrintPreview-CNx6unyj.js} +17 -17
- package/dist/{ReceiveRequestView-Rc_uw_Ad.js → ReceiveRequestView-DeNrYOUt.js} +17 -16
- package/dist/RecipeView-De3pLsPR.js +3272 -0
- package/dist/{SettingsView-K5wAt8oo.js → SettingsView-B5ud0KtI.js} +398 -425
- package/dist/StockView-4N3NRjY8.js +3003 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CsRLy0xI.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DvlRRKdt.js} +1 -1
- package/dist/{SupplierView-CLVupRN0.js → SupplierView-fC9oe5nu.js} +21 -20
- package/dist/{SurchargeView-CToB_z5v.js → SurchargeView-H6rv7u8A.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CvqIw9q6.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DFdrmR2Z.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-BivHE94R.js +332 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Df01LqHp.js +4953 -0
- package/dist/TransferTemplateView-CVUnofkI.js +2347 -0
- package/dist/{UnitCostHistoryView-BMB2MeTh.js → UnitCostHistoryView-DjD2WAFI.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-Dn8Y8zfp.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CE0zHU6c.js} +4 -4
- package/dist/{UnitView-Bl8jws6R.js → UnitView-DCfsbE8e.js} +111 -106
- package/dist/{WarehouseView-BurSM1jg.js → WarehouseView-BCebmbcj.js} +12 -11
- package/dist/{WastageTemplateView-DRfJ9LGR.js → WastageTemplateView-BXYNMBun.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 +2 -0
- package/dist/api/integration-sync-log.d.ts +0 -13
- package/dist/api/inventory.d.ts +9 -9
- package/dist/api/license.d.ts +0 -1
- package/dist/api/netsuite-explorer.d.ts +1 -0
- package/dist/api/stock.d.ts +1 -1
- package/dist/{app-Duum3eHx.js → app-VtVYHCDF.js} +9785 -9546
- package/dist/app.d.ts +151 -14
- package/dist/app.js +1 -1
- package/dist/bulk-edit-simulation.helper-Nd6CtWGf.js +178 -0
- package/dist/{closing-template-BE41yfue.js → closing-template-LCe0U9w9.js} +4 -4
- package/dist/components/FeatureCapabilityGate.vue.d.ts +3 -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/MultiLocationSelector.vue.d.ts +6 -6
- package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
- package/dist/components/PremiumUpgradePage.vue.d.ts +2 -0
- 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-DrhO3BxU.js → date2-Cfb6DXM4.js} +1 -1
- package/dist/{dayjs.min-CQp6EpOp.js → dayjs.min-BOndKK7B.js} +1 -1
- package/dist/{decimal-Cq0qUT4r.js → decimal-nbuisP61.js} +2 -2
- package/dist/{defineDeepModel-DRC39nJs.js → defineDeepModel-DKySrdwp.js} +5 -5
- package/dist/{duplicate-template-j2ymeDNH.js → duplicate-template-BxcKb3Jp.js} +1 -1
- package/dist/{feature-C0hQza5A.js → feature-VDUlSvM1.js} +435 -359
- package/dist/feature-flags/core.d.ts +1 -0
- package/dist/feature-flags/vue.d.ts +22 -1
- package/dist/{format-time-from-id-BmJoI3jT.js → format-time-from-id-CfVH4LZ_.js} +1 -1
- package/dist/{format-unit-display-CRgIMXsD.js → format-unit-display-BjTeAtgS.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-CuFZDvIr.js → id-to-date-Jr9SlHLO.js} +1 -1
- package/dist/{import-export.helper-B43zbsbj.js → import-export.helper-FT9Wbigh.js} +17 -17
- package/dist/{index-BYDjs08n.js → index-BV9b3Ulp.js} +2234 -2163
- package/dist/{index-DXNYZeq3.js → index-By5-VjVg.js} +1 -1
- package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
- package/dist/{index-Cwvg7EHd.js → index-DXHVgUHU.js} +3 -3
- package/dist/index-eGvSlWMU.js +1892 -0
- package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
- package/dist/{lz-string-6DgW1cPF.js → lz-string-BAzqO9xf.js} +1 -1
- package/dist/menu-usage-module-Bq_KLsO4.js +74 -0
- package/dist/{netsuite-BSpmyaE1.js → netsuite-BhGuduqd.js} +254 -263
- package/dist/netsuite-explorer-9Qj7qAum.js +79 -0
- package/dist/{predefined-templates-C0jtb4T7.js → predefined-templates-BlRafgnc.js} +1 -1
- package/dist/production-run-list-DR1WsaBR.js +61 -0
- package/dist/{purchase-order-template-B5Pjddfi.js → purchase-order-template-By_Zxu1b.js} +1 -1
- package/dist/{recalculationUtils-DtJWwWSj.js → recalculationUtils-VsBar7jB.js} +1 -1
- package/dist/router/name.d.ts +2 -1
- package/dist/{row-action.enum-BDDJNSi0.js → row-action.enum-76yLYmPA.js} +1 -1
- package/dist/rules-fOcvgt4t.js +243 -0
- package/dist/{stock-BKMDvf5S.js → stock-C-dQaxY2.js} +1 -1
- package/dist/stock-Dh0KXA1P.js +78 -0
- package/dist/stores/feature.d.ts +26 -2
- package/dist/stores/feature.load-state.spec.d.ts +1 -0
- package/dist/stores/integration/netsuite.d.ts +2 -2
- package/dist/stores/inventory.no-location.spec.d.ts +1 -0
- package/dist/stores/location.d.ts +42 -42
- package/dist/stores/supplier.d.ts +48 -48
- package/dist/stores/warehouse.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/{supplier-Cv8HRNou.js → supplier-XHHHN8vZ.js} +2 -2
- package/dist/{surcharge-ktE1pRyy.js → surcharge-0-oBiYoF.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-DCnXmEkb.js → uom-rules-DrRuSFgM.js} +1 -1
- package/dist/{use-ingredient-select-dialog-CYUUVrCI.js → use-ingredient-select-dialog-mQ7aQChK.js} +2 -2
- package/dist/{use-inventory-binding-dialog-Dugj9i-6.js → use-inventory-binding-dialog-5Wu0ItnH.js} +2 -2
- package/dist/{use-template-enabled-locations-BlZ7WAqX.js → use-template-enabled-locations-CgpPMl8g.js} +2 -2
- package/dist/{use-transfer-locations-CUDFnsVH.js → use-transfer-locations-DZ6B7eMT.js} +14 -14
- package/dist/{useHrmPermission-BOwmXi9H.js → useHrmPermission-BaGxz4EV.js} +1 -1
- package/dist/{useNavigationMenu-CbNKFBwx.js → useNavigationMenu-CyP39v3U.js} +39 -39
- package/dist/{useSseClient-CdyQh47h.js → useSseClient-CaD4MVg0.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
- package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
- package/dist/views/changelog/composables/use-snapshot-diff.d.ts +2 -2
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
- package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
- package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +19 -19
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
- package/dist/views/import/helper/submit-rows.d.ts +1 -1
- package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
- package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +3 -1
- package/dist/views/integration/IntegrationPlatformView.vue.d.ts +24 -0
- package/dist/views/integration/components/IntegrationCard.vue.d.ts +3 -3
- 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/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
- package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
- 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/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
- 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 +6 -6
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +48 -48
- 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 +42 -42
- 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 +54 -54
- 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 +8 -8
- package/dist/views/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
- package/dist/views/recipe/helper/import-recipe.d.ts +30 -0
- package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
- package/dist/views/settings/PlanLicenseDisplay.vue.d.ts +1 -14
- 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/supplier/components/SupplierForm.vue.d.ts +4 -4
- package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
- package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
- 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 +4 -4
- package/dist/{PlanTierBadge.vue_vue_type_script_setup_true_lang-BSR_nyHY.js → vue-KHCpiw_e.js} +101 -80
- package/dist/{vue-i18n-dSKy66Jh.js → vue-i18n-D6btLtve.js} +513 -513
- package/dist/{xlsx.util-pjzuMquw.js → xlsx.util-Dr5i_LBa.js} +2 -2
- package/package.json +71 -66
- package/dist/BulkReceiveRequestView-Lakk8011.js +0 -2656
- package/dist/FeatureCapabilityGate-C6t1VwKD.js +0 -74
- package/dist/ImportView-DCcdEvy4.js +0 -1291
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BMDjCk9T.js +0 -72
- package/dist/ProductionRunDetailView-C9rxLBbL.js +0 -2312
- package/dist/ProductionRunView-DvMdVGz1.js +0 -930
- package/dist/RecipeView-ByUaGc4w.js +0 -3428
- package/dist/StockView-B3EjdjVx.js +0 -2615
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BGPuaJlU.js +0 -299
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-8ydaQEw-.js +0 -4836
- package/dist/TransferTemplateView-BnfALwmw.js +0 -2326
- package/dist/menu-usage-module-BdjYEk3s.js +0 -57
- package/dist/number-5ZeFx-wN.js +0 -138
- package/dist/rules-CinZKpvV.js +0 -98
- package/dist/stock-1n-4iyqz.js +0 -75
- package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { d as i } from "./app-VtVYHCDF.js";
|
|
2
|
+
import { useCoreStore as $ } from "@feedmepos/mf-common";
|
|
3
|
+
const B = i((n, s) => {
|
|
4
|
+
const u = $();
|
|
5
|
+
function o() {
|
|
6
|
+
var e;
|
|
7
|
+
return ((e = u.currentBusiness.value) == null ? void 0 : e._id) ?? "";
|
|
8
|
+
}
|
|
9
|
+
return {
|
|
10
|
+
// ============================ Orders ============================
|
|
11
|
+
/**
|
|
12
|
+
* Look up a single NetSuite order by its internal ID.
|
|
13
|
+
*/
|
|
14
|
+
async readOrderById(e, r) {
|
|
15
|
+
const t = o(), a = `${n.netSuiteBackendUrl}/${t}/v2/explorer/order/${e}/${r}`;
|
|
16
|
+
return await s.get(a);
|
|
17
|
+
},
|
|
18
|
+
async readOrderTypeById(e) {
|
|
19
|
+
const r = o(), t = `${n.netSuiteBackendUrl}/${r}/v2/explorer/order/type/${encodeURIComponent(e)}`;
|
|
20
|
+
return (await s.get(t)).recordType;
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* List NetSuite records by date range, cross-referenced with FM POs.
|
|
24
|
+
* Returns records with purchaseOrderSeqNo (null = unsynced, number = synced).
|
|
25
|
+
*/
|
|
26
|
+
async browseOrdersByDateRange(e, r, t, a) {
|
|
27
|
+
const d = o(), c = `${n.netSuiteBackendUrl}/${d}/v2/explorer/order/${e}/${r}`;
|
|
28
|
+
return await s.post(c, {
|
|
29
|
+
startDate: t,
|
|
30
|
+
endDate: a
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* Query NetSuite records by IDs or date range using unified endpoint.
|
|
35
|
+
* Supports lookup by recordIds, transactionIds, or date range.
|
|
36
|
+
* Returns standardized NSOrderExplorerResultDto[] format with sync status.
|
|
37
|
+
*/
|
|
38
|
+
async browseOrdersByFilter(e, r, t) {
|
|
39
|
+
const a = o(), d = `${n.netSuiteBackendUrl}/${a}/v2/explorer/order/query/${e}/${r}`;
|
|
40
|
+
return await s.post(d, t);
|
|
41
|
+
},
|
|
42
|
+
// ============================ Items ============================
|
|
43
|
+
/**
|
|
44
|
+
* List NetSuite items from the `item` table.
|
|
45
|
+
* Pass an optional filter object to narrow results (e.g. { itemtype: 'InvtPart' }).
|
|
46
|
+
*/
|
|
47
|
+
async browseItemsByFilter(e) {
|
|
48
|
+
const r = o(), t = `${n.netSuiteBackendUrl}/${r}/v2/explorer/item/query`;
|
|
49
|
+
return await s.post(t, e ? { where: e } : {});
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* Look up a single NetSuite item by its internal ID.
|
|
53
|
+
*/
|
|
54
|
+
async readItemById(e, r) {
|
|
55
|
+
const t = o(), a = `${n.netSuiteBackendUrl}/${t}/v2/explorer/item/${e}/${r}`;
|
|
56
|
+
return await s.get(a);
|
|
57
|
+
},
|
|
58
|
+
// ============================ Vendors ============================
|
|
59
|
+
/**
|
|
60
|
+
* List NetSuite vendors from the `vendor` table.
|
|
61
|
+
* Pass an optional raw SuiteQL WHERE clause to narrow results.
|
|
62
|
+
*/
|
|
63
|
+
async browseVendorsByFilter(e) {
|
|
64
|
+
const r = o(), t = `${n.netSuiteBackendUrl}/${r}/v2/explorer/vendor/query`;
|
|
65
|
+
return await s.post(t, e ? { where: e } : {});
|
|
66
|
+
},
|
|
67
|
+
async readVendorById(e) {
|
|
68
|
+
const r = o(), t = `${n.netSuiteBackendUrl}/${r}/v2/explorer/vendor/${e}`;
|
|
69
|
+
return await s.get(t);
|
|
70
|
+
},
|
|
71
|
+
async triggerWebHook(e) {
|
|
72
|
+
const r = o(), t = `${n.netSuiteBackendUrl}/${r}/v2/explorer/trigger-webhook`;
|
|
73
|
+
await s.post(t, e);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
export {
|
|
78
|
+
B as useNetSuiteExplorerApi
|
|
79
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as qn, j as Wn, y as zn } from "./app-
|
|
1
|
+
import { d as qn, j as Wn, y as zn } from "./app-VtVYHCDF.js";
|
|
2
2
|
import { defineStore as Vn } from "pinia";
|
|
3
3
|
import { ref as mt, computed as Kn } from "vue";
|
|
4
4
|
import { useCoreStore as Yn } from "@feedmepos/mf-common";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const l = [
|
|
2
|
+
{ key: "all", label: "All" },
|
|
3
|
+
{ key: "drafts", label: "Drafts" },
|
|
4
|
+
{ key: "active", label: "Active" },
|
|
5
|
+
{ key: "history", label: "History" }
|
|
6
|
+
], u = {
|
|
7
|
+
drafts: ["DRAFT"],
|
|
8
|
+
active: ["REQUESTING", "PREPARING"],
|
|
9
|
+
history: ["CLOSED", "CANCEL"]
|
|
10
|
+
}, c = {
|
|
11
|
+
DRAFT: 0,
|
|
12
|
+
REQUESTING: 1,
|
|
13
|
+
PREPARING: 2,
|
|
14
|
+
CLOSED: 3,
|
|
15
|
+
CANCEL: 4
|
|
16
|
+
};
|
|
17
|
+
function m(t) {
|
|
18
|
+
const n = c[t];
|
|
19
|
+
if (n == null) throw new Error(`Unsupported production run status: ${t}`);
|
|
20
|
+
return n;
|
|
21
|
+
}
|
|
22
|
+
function R(t, n) {
|
|
23
|
+
return n === "all" ? !0 : u[n].includes(t.status);
|
|
24
|
+
}
|
|
25
|
+
function N(t) {
|
|
26
|
+
const n = t.activityLogs;
|
|
27
|
+
if (!n.length) return null;
|
|
28
|
+
const e = n[n.length - 1];
|
|
29
|
+
return { action: e.action, at: e.performedAt };
|
|
30
|
+
}
|
|
31
|
+
function d(t, n) {
|
|
32
|
+
var r;
|
|
33
|
+
const e = n.replace(new RegExp(`\\s+#${t.runNo}$`), "");
|
|
34
|
+
return ((r = t.runName) == null ? void 0 : r.trim()) || `${e} #${t.runNo}`;
|
|
35
|
+
}
|
|
36
|
+
function p(t) {
|
|
37
|
+
var r;
|
|
38
|
+
const n = String(t.runNo).padStart(12, "0"), e = (r = t.runName) == null ? void 0 : r.trim().toLowerCase();
|
|
39
|
+
return e ? `0:${e}` : `1:${n}`;
|
|
40
|
+
}
|
|
41
|
+
function f(t, n, e = () => null) {
|
|
42
|
+
var o;
|
|
43
|
+
const r = n.trim().toLowerCase().replace(/^#/, "");
|
|
44
|
+
return r ? [
|
|
45
|
+
((o = t.runName) == null ? void 0 : o.trim()) ?? "",
|
|
46
|
+
`${t.runNo}`,
|
|
47
|
+
...t.plan.items.map((a) => {
|
|
48
|
+
var s;
|
|
49
|
+
return ((s = e(a.skuId)) == null ? void 0 : s.name) ?? "";
|
|
50
|
+
})
|
|
51
|
+
].some((a) => a.toLowerCase().includes(r)) : !0;
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
l as P,
|
|
55
|
+
N as a,
|
|
56
|
+
f as b,
|
|
57
|
+
m as c,
|
|
58
|
+
p as d,
|
|
59
|
+
R as m,
|
|
60
|
+
d as p
|
|
61
|
+
};
|
package/dist/router/name.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IntegrationPlatformRouteName } from '@feedmepos/integration-portal';
|
|
1
2
|
export declare enum RouteName {
|
|
2
3
|
LOADING = "DEFAULT",
|
|
3
4
|
INGREDIENTS = "INGREDIENTS",
|
|
@@ -30,4 +31,4 @@ export declare enum RouteName {
|
|
|
30
31
|
IFRAME_INVENTORY_BINDINGS_DIALOG = "IFRAME_INVENTORY_BINDINGS_DIALOG",
|
|
31
32
|
IFRAME_INVENTORY_BINDINGS_PICKER = "IFRAME_INVENTORY_BINDINGS_PICKER"
|
|
32
33
|
}
|
|
33
|
-
export declare function getReadableRouteName(route: RouteName, t: Translator): string | undefined;
|
|
34
|
+
export declare function getReadableRouteName(route: RouteName | IntegrationPlatformRouteName, t: Translator): string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as r } from "vue";
|
|
2
|
-
import { _ as o } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as o } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-ChekXW32.js";
|
|
3
3
|
var e = /* @__PURE__ */ ((t) => (t.Add = "Add", t.Create = "Create", t.Print = "Print", t.PrintCustom = "PrintCustom", t.PrintPdf = "PrintPdf", t.Export = "Export", t.Update = "Update", t.Details = "Details", t.Edit = "Edit", t.Delete = "Delete", t.Publish = "Publish", t.Duplicate = "Duplicate", t.Email = "Email", t))(e || {});
|
|
4
4
|
const i = {
|
|
5
5
|
Add: {
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { s as u } from "./app-VtVYHCDF.js";
|
|
2
|
+
import { c as l, d as h } from "./date2-Cfb6DXM4.js";
|
|
3
|
+
import { F as $ } from "./decimal-nbuisP61.js";
|
|
4
|
+
function F(t, n) {
|
|
5
|
+
return u.convertPrecision({
|
|
6
|
+
value: t,
|
|
7
|
+
precision: n
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function T(t, n) {
|
|
11
|
+
return u.subtract([t, n]);
|
|
12
|
+
}
|
|
13
|
+
function O(t, n) {
|
|
14
|
+
return u.add([t, n]);
|
|
15
|
+
}
|
|
16
|
+
function L(t, n) {
|
|
17
|
+
return u.multiply([t, n]);
|
|
18
|
+
}
|
|
19
|
+
function S(t, n) {
|
|
20
|
+
return u.multiply([t, n]);
|
|
21
|
+
}
|
|
22
|
+
function R(t, n) {
|
|
23
|
+
const r = +c(t), o = +c(n);
|
|
24
|
+
return r / o;
|
|
25
|
+
}
|
|
26
|
+
function q(t, n) {
|
|
27
|
+
return u.divideSignificant([t, n]);
|
|
28
|
+
}
|
|
29
|
+
function A(t) {
|
|
30
|
+
const n = t == null ? "" : String(t).trim();
|
|
31
|
+
if (n === "" || n === "undefined") return "is empty";
|
|
32
|
+
const r = Number(n);
|
|
33
|
+
if (!isFinite(r)) return "is not a number";
|
|
34
|
+
if (u.validateNumber(r) !== null)
|
|
35
|
+
return "has too many digits";
|
|
36
|
+
const o = (e) => {
|
|
37
|
+
var p;
|
|
38
|
+
const i = /^([+-]?)(\d*\.?\d+)(?:e([+-]?\d+))?$/i.exec(e);
|
|
39
|
+
if (!i) return null;
|
|
40
|
+
const [, a, d, M = "0"] = i, N = ((p = d.split(".")[1]) == null ? void 0 : p.length) ?? 0, f = d.replace(".", "").replace(/^0+/, "");
|
|
41
|
+
if (!f) return "0";
|
|
42
|
+
const b = f.replace(/0+$/, "");
|
|
43
|
+
return `${a === "-" ? "-" : ""}${b}e${Number(M) - N + f.length - b.length}`;
|
|
44
|
+
};
|
|
45
|
+
return o(n.replace(/\.(?=e|$)/i, ".0")) !== o(String(r)) ? "has too many digits" : null;
|
|
46
|
+
}
|
|
47
|
+
function B(t, n) {
|
|
48
|
+
return t.precision >= n ? t : u.convertPrecision({ value: t, precision: n });
|
|
49
|
+
}
|
|
50
|
+
function g(t) {
|
|
51
|
+
if (t.amount === 0) return u.fromNumber(0);
|
|
52
|
+
const n = y(t.amount), r = t.precision - n;
|
|
53
|
+
return u.convertPrecision({ value: t, precision: Math.max(0, r) });
|
|
54
|
+
}
|
|
55
|
+
function c(t, n = !0) {
|
|
56
|
+
return n ? Number(t.amount / Math.pow(10, t.precision)).toFixed(t.precision) : Number(t.amount / Math.pow(10, t.precision)).toString();
|
|
57
|
+
}
|
|
58
|
+
function V(t, n) {
|
|
59
|
+
n = n ?? P(t);
|
|
60
|
+
const r = n, o = t.toFixed(r), e = o.includes(".") ? o.replace(/0+$/, "") : o;
|
|
61
|
+
return e.endsWith(".") ? e.slice(0, e.length - 1) : e;
|
|
62
|
+
}
|
|
63
|
+
function C(t, n = !1, r = 2) {
|
|
64
|
+
const o = Number(t.amount / Math.pow(10, t.precision)), e = o.toFixed(
|
|
65
|
+
Number.isInteger(o) ? 2 : Math.min(4, Math.max(2, r))
|
|
66
|
+
);
|
|
67
|
+
return n ? `${e} ${t.currency}` : t.currency === "MYR" ? `RM ${e}` : `${t.currency} ${e}`;
|
|
68
|
+
}
|
|
69
|
+
function Y(t) {
|
|
70
|
+
return {
|
|
71
|
+
...t,
|
|
72
|
+
amount: Math.abs(t.amount)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function P(t) {
|
|
76
|
+
if (!isFinite(t)) return 0;
|
|
77
|
+
let n = 1, r = 0;
|
|
78
|
+
for (; Math.round(t * n) / n !== t; )
|
|
79
|
+
n *= 10, r++;
|
|
80
|
+
return r;
|
|
81
|
+
}
|
|
82
|
+
function k(t, n = 0, r = !1) {
|
|
83
|
+
let o = 0;
|
|
84
|
+
return Number.isNaN(Number(t)) || (r || Number(t) >= 0) && (o = Number(t)), {
|
|
85
|
+
amount: Number((o * 10 ** n).toFixed(0)),
|
|
86
|
+
precision: n
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function y(t) {
|
|
90
|
+
const n = `${t}`, r = n.replace(/0*$/g, "");
|
|
91
|
+
return n.length - r.length;
|
|
92
|
+
}
|
|
93
|
+
function j(t, n) {
|
|
94
|
+
if (!n)
|
|
95
|
+
return t.precision;
|
|
96
|
+
const r = y(n.conversion.amount);
|
|
97
|
+
return t.precision - n.conversion.precision + r;
|
|
98
|
+
}
|
|
99
|
+
const U = (t) => `${t}`.length && s()(t) === !0;
|
|
100
|
+
function Z(t, n = {}) {
|
|
101
|
+
if (t == null)
|
|
102
|
+
throw new Error("Value cannot be null or undefined");
|
|
103
|
+
const { minPrecision: r = 2, maxPrecision: o = 2, locale: e = "en-US" } = n;
|
|
104
|
+
if (r > o)
|
|
105
|
+
throw new Error("minPrecision cannot be greater than maxPrecision");
|
|
106
|
+
let i = 0;
|
|
107
|
+
switch (typeof t) {
|
|
108
|
+
case "number": {
|
|
109
|
+
i = t;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
case "string": {
|
|
113
|
+
i = Number(t);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case "object": {
|
|
117
|
+
if (t.amount === void 0 || t.precision === void 0)
|
|
118
|
+
throw new Error("Invalid AdjustmentAmount object");
|
|
119
|
+
i = $.toDouble(t);
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
default:
|
|
123
|
+
throw new Error("Invalid value type");
|
|
124
|
+
}
|
|
125
|
+
return i.toLocaleString(e, {
|
|
126
|
+
minimumFractionDigits: r,
|
|
127
|
+
maximumFractionDigits: o
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function H() {
|
|
131
|
+
return function(n) {
|
|
132
|
+
return !!n || "Required";
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function m(t) {
|
|
136
|
+
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "amount") && Object.prototype.hasOwnProperty.call(t, "precision");
|
|
137
|
+
}
|
|
138
|
+
function I(t, n) {
|
|
139
|
+
const r = typeof t == "object" ? +c(t) : t;
|
|
140
|
+
function o(e) {
|
|
141
|
+
return Object.prototype.hasOwnProperty.call(e, "length");
|
|
142
|
+
}
|
|
143
|
+
return function(i) {
|
|
144
|
+
return m(i) && (i = +c(i)), Number.isFinite(+i) && (i = +i), o(i) ? i.length >= r ? !0 : typeof n == "function" ? n(i.length) : n ?? `Must be at least ${r}` : typeof i == "number" ? i >= r ? !0 : typeof n == "function" ? n(i) : n ?? `Must be at least ${r}` : `Cannot validate at least ${r}`;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function W(t) {
|
|
148
|
+
const n = typeof t == "object" ? +c(t) : t;
|
|
149
|
+
function r(o) {
|
|
150
|
+
return Object.prototype.hasOwnProperty.call(o, "length");
|
|
151
|
+
}
|
|
152
|
+
return function(e, i) {
|
|
153
|
+
return m(e) && (e = +c(e)), r(e) ? e.length > n ? !0 : typeof i == "function" ? i(e.length) : i ?? `Must be more than ${n}` : typeof e == "number" ? e > n ? !0 : typeof i == "function" ? i(e) : i ?? `Must be more than ${n}` : `Cannot validate more than ${n}`;
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function z(t, n) {
|
|
157
|
+
return t instanceof Date && n instanceof Date ? function(o) {
|
|
158
|
+
const e = new Date(o);
|
|
159
|
+
return isNaN(e.getTime()) ? "Invalid date" : e.getTime() < t.getTime() ? `Date must be at least ${l(t)} ${h(t)}` : e.getTime() >= n.getTime() ? `Date must be less than ${l(n)} ${h(n)}` : !0;
|
|
160
|
+
} : typeof t == "number" && typeof n == "number" ? function(o) {
|
|
161
|
+
const e = +o;
|
|
162
|
+
return isNaN(e) ? "Invalid number" : e < t ? `Value must be at least ${t}` : e >= n ? `Value must be less than ${n}` : !0;
|
|
163
|
+
} : function() {
|
|
164
|
+
return "Progamming error: invalid range parameter.";
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function s() {
|
|
168
|
+
return function(t) {
|
|
169
|
+
if (t = String(t), t.trim().length === 0) return !0;
|
|
170
|
+
const n = A(t);
|
|
171
|
+
return n !== null ? n === "has too many digits" ? "Number has too many digits" : "Must be a number" : !0;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function G(t, n) {
|
|
175
|
+
return typeof t == "number" ? function(o) {
|
|
176
|
+
const e = s()(o);
|
|
177
|
+
return typeof e == "string" ? e : u.fromNumber(+o).precision > t ? `Precision cannot be more than ${t} decimal point.` : !0;
|
|
178
|
+
} : function(o) {
|
|
179
|
+
const e = s()(o);
|
|
180
|
+
if (typeof e == "string")
|
|
181
|
+
return e;
|
|
182
|
+
const i = j(t, n);
|
|
183
|
+
return u.fromNumber(+o).precision > i ? `Precision cannot be more than ${i} decimal point.` : !0;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function J(t, n) {
|
|
187
|
+
return function(o) {
|
|
188
|
+
const e = s()(o);
|
|
189
|
+
if (typeof e == "string")
|
|
190
|
+
return e;
|
|
191
|
+
const i = u.fromNumber(+o);
|
|
192
|
+
return i.precision > t ? typeof n == "function" ? n(i.precision) : n ?? `Precision cannot be more than ${t}` : !0;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function K(t, n, r) {
|
|
196
|
+
return function(e) {
|
|
197
|
+
if (e === n) return !0;
|
|
198
|
+
const i = t.find((a) => a.value === e);
|
|
199
|
+
return i ? r ? r(i) : `Already used in ${i.label}` : !0;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function Q(t) {
|
|
203
|
+
let n = typeof t == "number" ? u.fromNumber(t) : t;
|
|
204
|
+
n = g(n);
|
|
205
|
+
const r = c(n);
|
|
206
|
+
return function(e) {
|
|
207
|
+
if (!m(e)) {
|
|
208
|
+
if (e = +e, s()(e) !== !0) return !0;
|
|
209
|
+
e = u.fromNumber(e);
|
|
210
|
+
}
|
|
211
|
+
return e = g(e), e.amount % n.amount === 0 && e.precision <= n.precision ? !0 : `${c(e)} must be a multiple of ${r}`;
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
export {
|
|
215
|
+
I as A,
|
|
216
|
+
z as B,
|
|
217
|
+
s as I,
|
|
218
|
+
G as M,
|
|
219
|
+
H as R,
|
|
220
|
+
K as U,
|
|
221
|
+
c as a,
|
|
222
|
+
g as b,
|
|
223
|
+
Q as c,
|
|
224
|
+
C as d,
|
|
225
|
+
J as e,
|
|
226
|
+
W as f,
|
|
227
|
+
j as g,
|
|
228
|
+
S as h,
|
|
229
|
+
P as i,
|
|
230
|
+
Y as j,
|
|
231
|
+
L as k,
|
|
232
|
+
O as l,
|
|
233
|
+
F as m,
|
|
234
|
+
V as n,
|
|
235
|
+
Z as o,
|
|
236
|
+
T as p,
|
|
237
|
+
q,
|
|
238
|
+
R as r,
|
|
239
|
+
U as s,
|
|
240
|
+
k as t,
|
|
241
|
+
B as u,
|
|
242
|
+
A as v
|
|
243
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { u as p } from "./stock-C-dQaxY2.js";
|
|
2
|
+
import { a as r, s as B, u as d, Z as k, _ as m } from "./app-VtVYHCDF.js";
|
|
3
|
+
import { computed as f, ref as v } from "vue";
|
|
4
|
+
function y() {
|
|
5
|
+
return {
|
|
6
|
+
stockBalance: {
|
|
7
|
+
_id: "",
|
|
8
|
+
items: []
|
|
9
|
+
},
|
|
10
|
+
productBalance: []
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const S = B.fromNumber(0), g = {
|
|
14
|
+
id: "",
|
|
15
|
+
balance: S,
|
|
16
|
+
closing: null,
|
|
17
|
+
costs: null
|
|
18
|
+
}, c = v(y()), w = () => {
|
|
19
|
+
const u = r(), l = f(() => {
|
|
20
|
+
var n;
|
|
21
|
+
const t = (n = c.value.stockBalance.skus) == null ? void 0 : n.groupBy((o) => o.id), a = (o) => {
|
|
22
|
+
var e;
|
|
23
|
+
return ((e = t == null ? void 0 : t.get(o)) == null ? void 0 : e[0]) ?? { ...g, id: o };
|
|
24
|
+
};
|
|
25
|
+
return u.skus.map((o) => a(o._id));
|
|
26
|
+
}), i = p();
|
|
27
|
+
return {
|
|
28
|
+
// state
|
|
29
|
+
get stockBalance() {
|
|
30
|
+
return {
|
|
31
|
+
...c.value.stockBalance,
|
|
32
|
+
skus: l.value
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
set stockBalance(t) {
|
|
36
|
+
c.value.stockBalance = t;
|
|
37
|
+
},
|
|
38
|
+
get productBalance() {
|
|
39
|
+
return c.value.productBalance;
|
|
40
|
+
},
|
|
41
|
+
set productBalance(t) {
|
|
42
|
+
c.value.productBalance = t;
|
|
43
|
+
},
|
|
44
|
+
// actions
|
|
45
|
+
async readStockBalance() {
|
|
46
|
+
this.stockBalance = await i.readStockBalance();
|
|
47
|
+
},
|
|
48
|
+
async readProductBalance() {
|
|
49
|
+
this.productBalance = [];
|
|
50
|
+
const t = r(), a = d().currentLocation, n = k({
|
|
51
|
+
recipes: t.recipes,
|
|
52
|
+
skus: t.skus,
|
|
53
|
+
skuGroups: [],
|
|
54
|
+
inventoryBindingMapping: {},
|
|
55
|
+
stockBalance: this.stockBalance,
|
|
56
|
+
customAttributes: m.buildCustomAttributeContext({
|
|
57
|
+
profile: a.doc.profile ?? null,
|
|
58
|
+
settingCustomAttributes: a.customAttributes ?? null
|
|
59
|
+
})
|
|
60
|
+
// silent: true
|
|
61
|
+
});
|
|
62
|
+
function o(e, s) {
|
|
63
|
+
return Object.prototype.hasOwnProperty.call(e, s);
|
|
64
|
+
}
|
|
65
|
+
for (const e in n.convertCountdown)
|
|
66
|
+
if (o(n.convertCountdown, e)) {
|
|
67
|
+
const s = n.convertCountdown[e];
|
|
68
|
+
this.productBalance.push({
|
|
69
|
+
id: e,
|
|
70
|
+
count: s
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
w as u
|
|
78
|
+
};
|
package/dist/stores/feature.d.ts
CHANGED
|
@@ -7,8 +7,10 @@ export declare enum InventoryModule {
|
|
|
7
7
|
export interface FeatureState {
|
|
8
8
|
isLoaded: boolean;
|
|
9
9
|
flags: LocationFeatureFlag[];
|
|
10
|
+
premium: boolean;
|
|
10
11
|
warehouseQuota: WarehouseLicense[];
|
|
11
|
-
|
|
12
|
+
costing: boolean;
|
|
13
|
+
enableEditOrderCosting: boolean;
|
|
12
14
|
enableBackdatePo: boolean;
|
|
13
15
|
/** @deprecated TODO: remove */
|
|
14
16
|
autoReceiveWarehouse: boolean;
|
|
@@ -58,23 +60,34 @@ export interface FeatureState {
|
|
|
58
60
|
*/
|
|
59
61
|
report_portal_po_forecast_days_default: number;
|
|
60
62
|
}
|
|
63
|
+
export type FeatureLoadStatus = 'idle' | 'loading' | 'ready' | 'error';
|
|
64
|
+
export type LocationFeatureWait = 'ready' | 'error' | 'superseded';
|
|
65
|
+
export declare const FEATURE_LOAD_TIMEOUT_MS = 30000;
|
|
61
66
|
export declare const useFeatureStore: () => {
|
|
62
67
|
readonly businessDbName: string;
|
|
63
68
|
readonly isWarehouse: boolean;
|
|
64
69
|
readonly restaurantPosVersion: string | null | undefined;
|
|
65
70
|
readonly enableTotalCost: boolean;
|
|
71
|
+
readonly enableEditOrderCosting: boolean;
|
|
66
72
|
readonly enableBackdatePo: boolean;
|
|
67
73
|
/** @deprecated TODO: remove */
|
|
68
74
|
readonly autoReceiveWarehouse: boolean;
|
|
69
75
|
/** @deprecated TODO: remove */
|
|
70
76
|
readonly manualReceive: boolean;
|
|
71
77
|
readonly isLoaded: boolean;
|
|
78
|
+
readonly loadState: {
|
|
79
|
+
dbName: string | null;
|
|
80
|
+
status: FeatureLoadStatus;
|
|
81
|
+
};
|
|
82
|
+
/** Reloads the current location's flags; a no-op before `init` has run. */
|
|
83
|
+
retryLoad(): Promise<void>;
|
|
72
84
|
readonly flags: {
|
|
73
85
|
name: string;
|
|
74
86
|
enabled: boolean;
|
|
75
87
|
beta: boolean;
|
|
76
88
|
value?: string | number | boolean | null | undefined;
|
|
77
89
|
}[];
|
|
90
|
+
readonly premium: boolean;
|
|
78
91
|
readonly warehouseQuota: {
|
|
79
92
|
id: string;
|
|
80
93
|
expiredAt: string;
|
|
@@ -114,5 +127,16 @@ export declare const useFeatureStore: () => {
|
|
|
114
127
|
readonly poForecastDaysConstraint: string | null;
|
|
115
128
|
readonly poForecastDaysDefault: number;
|
|
116
129
|
init(): Promise<void>;
|
|
117
|
-
|
|
130
|
+
/**
|
|
131
|
+
* Waits, bounded by FEATURE_LOAD_TIMEOUT_MS, for the flags of `dbName` to be
|
|
132
|
+
* confirmed. `ready` includes a confirmed outlet refreshing in the background.
|
|
133
|
+
* `error` means the flags are unknown (failed or stalled), never "off".
|
|
134
|
+
* `superseded` means the outlet changed or `signal` aborted, so the caller's
|
|
135
|
+
* work is stale and must stop. With `retryOnError`, an outlet already in error
|
|
136
|
+
* reloads first, so a caller's own refresh doubles as the flag retry.
|
|
137
|
+
*/
|
|
138
|
+
awaitLocationFeatures(dbName: string | null | undefined, options?: {
|
|
139
|
+
signal?: AbortSignal;
|
|
140
|
+
retryOnError?: boolean;
|
|
141
|
+
}): Promise<LocationFeatureWait>;
|
|
118
142
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -262,9 +262,9 @@ export declare function useNetSuiteStore(): {
|
|
|
262
262
|
deletedAt?: string | null | undefined;
|
|
263
263
|
supplierCache?: {
|
|
264
264
|
_rev?: string | null | undefined;
|
|
265
|
-
email?: string | null | undefined;
|
|
266
265
|
internal?: "restaurant" | "warehouse" | null | undefined;
|
|
267
266
|
contactName?: string | null | undefined;
|
|
267
|
+
email?: string | null | undefined;
|
|
268
268
|
phoneNumber?: string | null | undefined;
|
|
269
269
|
supplyItems?: {
|
|
270
270
|
skuId: string;
|
|
@@ -291,6 +291,7 @@ export declare function useNetSuiteStore(): {
|
|
|
291
291
|
} | null | undefined;
|
|
292
292
|
_id: string;
|
|
293
293
|
name: string;
|
|
294
|
+
registrationNumber: string;
|
|
294
295
|
address: {
|
|
295
296
|
line2?: string | null | undefined;
|
|
296
297
|
line1: string;
|
|
@@ -299,7 +300,6 @@ export declare function useNetSuiteStore(): {
|
|
|
299
300
|
postcode: string;
|
|
300
301
|
country: string;
|
|
301
302
|
};
|
|
302
|
-
registrationNumber: string;
|
|
303
303
|
} | null | undefined;
|
|
304
304
|
custentity_financeapproval?: boolean | null | undefined;
|
|
305
305
|
businessId: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|