@feedmepos/mf-inventory-portal 1.8.0-dev.1 → 1.8.0-dev.11
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-BTUjyQbn.js +1466 -0
- package/dist/{ApprovalView-C8_ax05b.js → ApprovalView-CTOTedxc.js} +26 -25
- package/dist/{BindingsDialog-t0ZY9eh5.js → BindingsDialog-C9v4TTzJ.js} +2 -2
- package/dist/{BindingsPicker-C0Qblmml.js → BindingsPicker-B5b0lavg.js} +8 -8
- package/dist/{BindingsTable-CsqUBbRA.js → BindingsTable-CQPan4pU.js} +4 -4
- package/dist/{BulkReceiveRequestView-DAG-TMox.js → BulkReceiveRequestView-BVrrjoYW.js} +21 -21
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-D4Z56y7h.js +151 -0
- package/dist/{ClosingDraftView-CdKp4Ny6.js → ClosingDraftView-5ETKikfT.js} +748 -746
- package/dist/ClosingHistoryView-GM0DRWhq.js +769 -0
- package/dist/{ClosingTemplateView-C326DL4q.js → ClosingTemplateView-Czz--dWq.js} +303 -291
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CXjubRbj.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-Bjs8hW_q.js} +1 -1
- package/dist/{DefaultView-CsIMmQAY.js → DefaultView-Baksd_Lk.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-eTrMvJzA.js → DeliveryOrderPrintPreview-CUdMQmLf.js} +9 -9
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-B7nBbxMo.js → EmailDialog.vue_vue_type_script_setup_true_lang-CDta65pB.js} +6228 -6216
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CrCdJfOf.js +47 -0
- package/dist/FeatureCapabilityGate-C34Z4k5D.js +74 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CI2KTzDs.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-C43lHbmc.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Db_FiSRe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CIMCZnY9.js} +2 -2
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-UbMV3dKh.js +120 -0
- package/dist/{FmMultiselectDialog-CYUxtxnS.js → FmMultiselectDialog-DYM4qyMH.js} +2 -2
- package/dist/FmMultiselectDialog-tbS01AI7.js +123 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DOkV11NN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DaOKC6RQ.js} +72 -73
- package/dist/ImportView-CPf8zj0t.js +1290 -0
- package/dist/{IngredientsView-CZ6E7cXf.js → IngredientsView-N4CH6zdo.js} +656 -649
- package/dist/{IntegrationExplorerView-B15ND4Fg.js → IntegrationExplorerView-Ds5fTNi3.js} +602 -614
- package/dist/IntegrationPlatformView-wuOLFIQR.js +13073 -0
- package/dist/{IntegrationView-hkNhsqx2.js → IntegrationView-Bhxwz6Ha.js} +2956 -2922
- package/dist/{InventoryBindingForm-SfuUF0_O.js → InventoryBindingForm-DWm9pOH_.js} +1 -1
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-TvwD5HcR.js +472 -0
- package/dist/{InventoryBindingSummary-DUcukkyJ.js → InventoryBindingSummary-DI6H0ehi.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-ngeYJhtg.js +79 -0
- package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-Cr1LFRUd.js +274 -0
- package/dist/PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-CtoPkGo2.js +79 -0
- package/dist/{ProductionRunDetailView-BwgRX-14.js → ProductionRunDetailView-rGGuDANE.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BbNXNhpr.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CTseB9Sn.js} +9 -9
- package/dist/{ProductionRunView-CZU7LY9-.js → ProductionRunView-BLBIYhKd.js} +16 -15
- package/dist/{PublishView-DS2FZ66p.js → PublishView-D_H_LAq2.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-CZa0MVAs.js → PurchaseOrderPrintPreview-DZy57dQ6.js} +7 -7
- package/dist/{ReceiveRequestView-Bk5b3nVB.js → ReceiveRequestView-qFQPah64.js} +15 -15
- package/dist/RecipeView-BPQ_MlxJ.js +3440 -0
- package/dist/SettingsView-DF_HGtkr.js +1032 -0
- package/dist/StockView-De_R8pxv.js +2651 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DdZg9T4n.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B3tBgcH7.js} +1 -1
- package/dist/{SupplierView-D8q6siZW.js → SupplierView-DvvB_Nn0.js} +577 -571
- package/dist/{SurchargeView-Db_5YFoR.js → SurchargeView-6gQPyGqi.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-WOVs4Fr1.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-D6gnQpe-.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-BtoP4XgE.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CiuRBHBL.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Bljc4Vuy.js → TransferDetails.vue_vue_type_script_setup_true_lang-B-1-jtmF.js} +1707 -1657
- package/dist/TransferTemplateView-Dcc9K-AJ.js +2343 -0
- package/dist/{UnitCostHistoryView-BqDiQ4IE.js → UnitCostHistoryView-e1MYu0_N.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BjSmg5LX.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DQWOi2ol.js} +4 -4
- package/dist/{UnitView-CM695-VI.js → UnitView-BaLqtGk3.js} +84 -84
- package/dist/{WarehouseView-BdidU4p6.js → WarehouseView-CKYdpZoP.js} +194 -189
- package/dist/{WastageTemplateView-DdhwdXT6.js → WastageTemplateView-DazO6lu1.js} +19 -18
- package/dist/api/feature-flags.d.ts +12 -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 +8 -0
- package/dist/{app-Cb5s4jMu.js → app-ZyQBMnlh.js} +6102 -6066
- package/dist/app.d.ts +36 -150
- package/dist/app.js +1 -1
- package/dist/{closing-template-DnqnpXxn.js → closing-template-BZfYcHAK.js} +1 -1
- package/dist/components/ChangeLocationComponent.vue.d.ts +21 -14
- package/dist/components/DeprecateSoonWarningDialog.vue.d.ts +22 -0
- package/dist/components/FeatureCapabilityBadge.vue.d.ts +29 -0
- package/dist/components/FeatureCapabilityGate.spec.d.ts +1 -0
- package/dist/components/FeatureCapabilityGate.vue.d.ts +29 -0
- package/dist/components/FmUnitInputRules.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/{PremiumBadge.vue.d.ts → PlanTierBadge.vue.d.ts} +5 -13
- package/dist/components/PlanUpgradeDialog.vue.d.ts +30 -0
- package/dist/composable/useNavigationMenu.d.ts +2 -1
- package/dist/{date2-BPhD_1Of.js → date2-CtVXF-Pl.js} +1 -1
- package/dist/{dayjs.min-Zbd6-uVD.js → dayjs.min-BG2xA9Zk.js} +1 -1
- package/dist/{decimal-Df6a50Ld.js → decimal-C0ERI9wc.js} +2 -2
- package/dist/{defineDeepModel-Brbsikbi.js → defineDeepModel-CAK0Fghp.js} +6 -6
- package/dist/{duplicate-template-B9kuShaF.js → duplicate-template-DwAQVTH7.js} +1 -1
- package/dist/{inventory-core-dart.default-DDRxXXnt.js → feature-1IL43YWw.js} +766 -398
- package/dist/feature-flags/core.d.ts +28 -0
- package/dist/feature-flags/core.spec.d.ts +1 -0
- package/dist/feature-flags/navigation-capabilities.d.ts +23 -0
- package/dist/feature-flags/navigation-capabilities.spec.d.ts +1 -0
- package/dist/feature-flags/plan-tier.d.ts +6 -0
- package/dist/feature-flags/plan-tier.spec.d.ts +1 -0
- package/dist/feature-flags/portal-feature-catalog.d.ts +19 -0
- package/dist/feature-flags/portal-feature-catalog.spec.d.ts +1 -0
- package/dist/feature-flags/vue.d.ts +16 -0
- package/dist/feature-flags/vue.spec.d.ts +1 -0
- package/dist/{format-time-from-id-DmUjUcVj.js → format-time-from-id-QIs7t8ML.js} +1 -1
- package/dist/{format-unit-display-CsQA0SQd.js → format-unit-display-DiTPPgut.js} +118 -119
- package/dist/helper/menu-usage-module.d.ts +1 -1
- package/dist/helper/number.d.ts +5 -1
- package/dist/helper/rules.d.ts +1 -1
- package/dist/id-to-date-DcuC_yKQ.js +67 -0
- package/dist/{import-export.helper-DCQ6oX9s.js → import-export.helper-grsZqa63.js} +16 -17
- package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
- package/dist/{index-UmM6gHJ1.js → index-DN5mjbXr.js} +1 -1
- package/dist/{index-C-mazZwS.js → index-DdSQrnuw.js} +3 -3
- package/dist/index-eGvSlWMU.js +1892 -0
- package/dist/{index-BXaIMGnI.js → index-twVxfWIB.js} +190 -190
- package/dist/{lz-string-Bibw5D_6.js → lz-string-DrKhkO_Q.js} +1 -1
- package/dist/{netsuite-Bev0OtQT.js → netsuite-C_EH9MVy.js} +9 -3
- package/dist/{predefined-templates-BHvUnTk_.js → predefined-templates-mWX1M2Dn.js} +1 -1
- package/dist/{purchase-order-template-DgOKEzhS.js → purchase-order-template-DZ3DsIUr.js} +1 -1
- package/dist/{recalculationUtils-Dv__DzZh.js → recalculationUtils-BZ5ccSeX.js} +1 -1
- package/dist/router/name.d.ts +2 -2
- package/dist/{row-action.enum-ncgDYAjP.js → row-action.enum-B2z1DXD9.js} +2 -2
- package/dist/rules-BpTWt_Y_.js +238 -0
- package/dist/stock-BO2mbTLO.js +74 -0
- package/dist/{stock-CxCRZo_D.js → stock-D9dhzEKk.js} +1 -1
- package/dist/stores/feature.d.ts +20 -2
- package/dist/stores/integration/netsuite.d.ts +2 -2
- package/dist/stores/inventory.d.ts +0 -47
- 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 +49 -49
- package/dist/stores/warehouse.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-CkZdeMcl.js → supplier-C-Ra1omj.js} +2 -2
- package/dist/{surcharge-FRSFqjGl.js → surcharge-BFDrFP1T.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-Cm1styDr.js → uom-rules-B8pou4DQ.js} +1 -1
- package/dist/{use-ingredient-select-dialog-ntAqHX04.js → use-ingredient-select-dialog-DJvcL3EP.js} +2 -2
- package/dist/use-inventory-binding-dialog-DQBcnw0G.js +113 -0
- package/dist/{use-template-enabled-locations-CIZqw-Z8.js → use-template-enabled-locations-CSgJma2Z.js} +2 -2
- package/dist/{use-transfer-locations-CM5vNttA.js → use-transfer-locations-CkeJ5Nng.js} +14 -14
- package/dist/{useHrmPermission-CslLuBoP.js → useHrmPermission-BDc1xULx.js} +1 -1
- package/dist/useNavigationMenu-B7jkRkTi.js +346 -0
- package/dist/{useSseClient-CCV4mPzD.js → useSseClient-Bxl6D4Xs.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/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 +18 -18
- 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/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 +1 -1
- package/dist/{components/PreviewBadge.vue.d.ts → views/integration/IntegrationPlatformView.vue.d.ts} +11 -13
- package/dist/views/integration/components/IntegrationCard.vue.d.ts +38 -0
- 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/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 +5 -5
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +39 -39
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +35 -35
- package/dist/views/receive-request/import/export.spec.d.ts +1 -0
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +34 -34
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +6 -6
- 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 +2 -2
- package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
- package/dist/views/{ingredient-group/IngredientGroupView.vue.d.ts → settings/FeatureFlagView.vue.d.ts} +0 -1
- package/dist/views/settings/PlanLicenseDisplay.spec.d.ts +1 -0
- package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → settings/PlanLicenseDisplay.vue.d.ts} +2 -2
- package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
- package/dist/views/stock/components/dialog/ConvertSkuDialog.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/warehouse/components/WarehouseForm.vue.d.ts +2 -2
- package/dist/{vue-i18n-C5j4EQhi.js → vue-i18n-gaCwgS41.js} +355 -355
- package/dist/{xlsx.util-B50OvX4z.js → xlsx.util-lW-27xp-.js} +2 -2
- package/package.json +71 -66
- package/dist/App-BXgpGzGR.js +0 -1476
- package/dist/ClosingHistoryView-Blyq9-BS.js +0 -761
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-zcEv1Swg.js +0 -243
- package/dist/FmMultiselectDialog-BAw-gp5K.js +0 -77
- package/dist/ImportView-BmotFC-3.js +0 -1302
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVCCpvS4.js +0 -51
- package/dist/IngredientGroupView-qrR9ksEn.js +0 -985
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-Zq81p_MF.js +0 -563
- package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BmfROiLM.js +0 -72
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-3e3kDsbN.js +0 -93
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-DX2MJqL4.js +0 -29
- package/dist/RecipeView-DvI6X-uN.js +0 -3625
- package/dist/SettingsView-sThYErMz.js +0 -698
- package/dist/StockView-Z9wGihT7.js +0 -2612
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
- package/dist/TransferTemplateView-DtsJzmUr.js +0 -2327
- package/dist/feature-Ckn5ra3z.js +0 -1136
- package/dist/number-y_W4pn_d.js +0 -138
- package/dist/random-CSbEbElR.js +0 -10
- package/dist/rules-CZTBvenw.js +0 -98
- package/dist/stock-XINW8JOM.js +0 -75
- package/dist/use-inventory-binding-dialog-DVIJO8Cl.js +0 -152
- package/dist/useNavigationMenu-CSinmNCY.js +0 -172
- 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/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +0 -37
- 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
- /package/dist/components/{FmFeatureFlagDialog.vue.d.ts → DeprecateSoonPill.vue.d.ts} +0 -0
package/dist/number-y_W4pn_d.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { w as o } from "./app-Cb5s4jMu.js";
|
|
2
|
-
import { F as l } from "./decimal-Df6a50Ld.js";
|
|
3
|
-
import "./dayjs.min-Zbd6-uVD.js";
|
|
4
|
-
function g(n, t) {
|
|
5
|
-
return o.convertPrecision({
|
|
6
|
-
value: n,
|
|
7
|
-
precision: t
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
function A(n, t) {
|
|
11
|
-
return o.subtract([n, t]);
|
|
12
|
-
}
|
|
13
|
-
function j(n, t) {
|
|
14
|
-
return o.add([n, t]);
|
|
15
|
-
}
|
|
16
|
-
function w(n, t) {
|
|
17
|
-
return o.multiply([n, t]);
|
|
18
|
-
}
|
|
19
|
-
function P(n, t) {
|
|
20
|
-
return o.multiply([n, t]);
|
|
21
|
-
}
|
|
22
|
-
function d(n, t) {
|
|
23
|
-
const r = +s(n), e = +s(t);
|
|
24
|
-
return r / e;
|
|
25
|
-
}
|
|
26
|
-
function F(n, t) {
|
|
27
|
-
n = c(n), t = c(t);
|
|
28
|
-
const r = d(n, t);
|
|
29
|
-
return m(r);
|
|
30
|
-
}
|
|
31
|
-
function N(n, t) {
|
|
32
|
-
return n.precision >= t ? n : o.convertPrecision({ value: n, precision: t });
|
|
33
|
-
}
|
|
34
|
-
function c(n) {
|
|
35
|
-
if (n.amount === 0) return m(0);
|
|
36
|
-
const t = f(n.amount), r = n.precision - t;
|
|
37
|
-
return o.convertPrecision({ value: n, precision: Math.max(0, r) });
|
|
38
|
-
}
|
|
39
|
-
function s(n, t = !0) {
|
|
40
|
-
return t ? Number(n.amount / Math.pow(10, n.precision)).toFixed(n.precision) : Number(n.amount / Math.pow(10, n.precision)).toString();
|
|
41
|
-
}
|
|
42
|
-
function x(n, t) {
|
|
43
|
-
t = t ?? a(n);
|
|
44
|
-
const r = t, e = n.toFixed(r), i = e.includes(".") ? e.replace(/0+$/, "") : e;
|
|
45
|
-
return i.endsWith(".") ? i.slice(0, i.length - 1) : i;
|
|
46
|
-
}
|
|
47
|
-
function M(n, t = !1, r = 2) {
|
|
48
|
-
const e = Number(n.amount / Math.pow(10, n.precision)), i = e.toFixed(
|
|
49
|
-
Number.isInteger(e) ? 2 : Math.min(4, Math.max(2, r))
|
|
50
|
-
);
|
|
51
|
-
return t ? `${i} ${n.currency}` : n.currency === "MYR" ? `RM ${i}` : `${n.currency} ${i}`;
|
|
52
|
-
}
|
|
53
|
-
function y(n) {
|
|
54
|
-
return {
|
|
55
|
-
...n,
|
|
56
|
-
amount: Math.abs(n.amount)
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function a(n) {
|
|
60
|
-
if (!isFinite(n)) return 0;
|
|
61
|
-
let t = 1, r = 0;
|
|
62
|
-
for (; Math.round(n * t) / t !== n; )
|
|
63
|
-
t *= 10, r++;
|
|
64
|
-
return r;
|
|
65
|
-
}
|
|
66
|
-
function m(n) {
|
|
67
|
-
const t = a(n);
|
|
68
|
-
return {
|
|
69
|
-
precision: t,
|
|
70
|
-
amount: n * 10 ** t
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function v(n, t = 0, r = !1) {
|
|
74
|
-
let e = 0;
|
|
75
|
-
return Number.isNaN(Number(n)) || (r || Number(n) >= 0) && (e = Number(n)), {
|
|
76
|
-
amount: Number((e * 10 ** t).toFixed(0)),
|
|
77
|
-
precision: t
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function f(n) {
|
|
81
|
-
const t = `${n}`, r = t.replace(/0*$/g, "");
|
|
82
|
-
return t.length - r.length;
|
|
83
|
-
}
|
|
84
|
-
function D(n, t) {
|
|
85
|
-
if (!t)
|
|
86
|
-
return n.precision;
|
|
87
|
-
const r = f(t.conversion.amount);
|
|
88
|
-
return n.precision - t.conversion.precision + r;
|
|
89
|
-
}
|
|
90
|
-
function $(n, t = {}) {
|
|
91
|
-
if (n == null)
|
|
92
|
-
throw new Error("Value cannot be null or undefined");
|
|
93
|
-
const { minPrecision: r = 2, maxPrecision: e = 2, locale: i = "en-US" } = t;
|
|
94
|
-
if (r > e)
|
|
95
|
-
throw new Error("minPrecision cannot be greater than maxPrecision");
|
|
96
|
-
let u = 0;
|
|
97
|
-
switch (typeof n) {
|
|
98
|
-
case "number": {
|
|
99
|
-
u = n;
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
case "string": {
|
|
103
|
-
u = Number(n);
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
case "object": {
|
|
107
|
-
if (n.amount === void 0 || n.precision === void 0)
|
|
108
|
-
throw new Error("Invalid AdjustmentAmount object");
|
|
109
|
-
u = l.toDouble(n);
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
default:
|
|
113
|
-
throw new Error("Invalid value type");
|
|
114
|
-
}
|
|
115
|
-
return u.toLocaleString(i, {
|
|
116
|
-
minimumFractionDigits: r,
|
|
117
|
-
maximumFractionDigits: e
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
export {
|
|
121
|
-
s as a,
|
|
122
|
-
c as b,
|
|
123
|
-
m as c,
|
|
124
|
-
M as d,
|
|
125
|
-
P as e,
|
|
126
|
-
a as f,
|
|
127
|
-
D as g,
|
|
128
|
-
y as h,
|
|
129
|
-
w as i,
|
|
130
|
-
j,
|
|
131
|
-
g as k,
|
|
132
|
-
$ as l,
|
|
133
|
-
A as m,
|
|
134
|
-
x as n,
|
|
135
|
-
F as o,
|
|
136
|
-
v as t,
|
|
137
|
-
N as u
|
|
138
|
-
};
|
package/dist/random-CSbEbElR.js
DELETED
package/dist/rules-CZTBvenw.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { c as f, a as u, g as d, b as m } from "./number-y_W4pn_d.js";
|
|
2
|
-
import { c as b, d as p } from "./date2-BPhD_1Of.js";
|
|
3
|
-
function M() {
|
|
4
|
-
return function(e) {
|
|
5
|
-
return !!e || "Required";
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
function s(n) {
|
|
9
|
-
return n && typeof n == "object" && Object.prototype.hasOwnProperty.call(n, "amount") && Object.prototype.hasOwnProperty.call(n, "precision");
|
|
10
|
-
}
|
|
11
|
-
function A(n, e) {
|
|
12
|
-
const o = typeof n == "object" ? +u(n) : n;
|
|
13
|
-
function i(t) {
|
|
14
|
-
return Object.prototype.hasOwnProperty.call(t, "length");
|
|
15
|
-
}
|
|
16
|
-
return function(r) {
|
|
17
|
-
return s(r) && (r = +u(r)), Number.isFinite(+r) && (r = +r), i(r) ? r.length >= o ? !0 : typeof e == "function" ? e(r.length) : e ?? `Must be at least ${o}` : typeof r == "number" ? r >= o ? !0 : typeof e == "function" ? e(r) : e ?? `Must be at least ${o}` : `Cannot validate at least ${o}`;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function $(n) {
|
|
21
|
-
const e = typeof n == "object" ? +u(n) : n;
|
|
22
|
-
function o(i) {
|
|
23
|
-
return Object.prototype.hasOwnProperty.call(i, "length");
|
|
24
|
-
}
|
|
25
|
-
return function(t, r) {
|
|
26
|
-
return s(t) && (t = +u(t)), o(t) ? t.length > e ? !0 : typeof r == "function" ? r(t.length) : r ?? `Must be more than ${e}` : typeof t == "number" ? t > e ? !0 : typeof r == "function" ? r(t) : r ?? `Must be more than ${e}` : `Cannot validate more than ${e}`;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function P(n, e) {
|
|
30
|
-
return n instanceof Date && e instanceof Date ? function(i) {
|
|
31
|
-
const t = new Date(i);
|
|
32
|
-
return isNaN(t.getTime()) ? "Invalid date" : t.getTime() < n.getTime() ? `Date must be at least ${b(n)} ${p(n)}` : t.getTime() >= e.getTime() ? `Date must be less than ${b(e)} ${p(e)}` : !0;
|
|
33
|
-
} : typeof n == "number" && typeof e == "number" ? function(i) {
|
|
34
|
-
const t = +i;
|
|
35
|
-
return isNaN(t) ? "Invalid number" : t < n ? `Value must be at least ${n}` : t >= e ? `Value must be less than ${e}` : !0;
|
|
36
|
-
} : function() {
|
|
37
|
-
return "Progamming error: invalid range parameter.";
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function c() {
|
|
41
|
-
return function(n) {
|
|
42
|
-
if (n = String(n), n.length === 0)
|
|
43
|
-
return !0;
|
|
44
|
-
const e = +n;
|
|
45
|
-
return isFinite(e) || "Must be a number";
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function j(n, e) {
|
|
49
|
-
return typeof n == "number" ? function(i) {
|
|
50
|
-
const t = c()(i);
|
|
51
|
-
return typeof t == "string" ? t : f(+i).precision > n ? `Precision cannot be more than ${n} decimal point.` : !0;
|
|
52
|
-
} : function(i) {
|
|
53
|
-
const t = c()(i);
|
|
54
|
-
if (typeof t == "string")
|
|
55
|
-
return t;
|
|
56
|
-
const r = d(n, e);
|
|
57
|
-
return f(+i).precision > r ? `Precision cannot be more than ${r} decimal point.` : !0;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function g(n, e) {
|
|
61
|
-
return function(i) {
|
|
62
|
-
const t = c()(i);
|
|
63
|
-
if (typeof t == "string")
|
|
64
|
-
return t;
|
|
65
|
-
const r = f(+i);
|
|
66
|
-
return r.precision > n ? typeof e == "function" ? e(r.precision) : e ?? `Precision cannot be more than ${n}` : !0;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function D(n, e, o) {
|
|
70
|
-
return function(t) {
|
|
71
|
-
if (t === e) return !0;
|
|
72
|
-
const r = n.find((a) => a.value === t);
|
|
73
|
-
return r ? o ? o(r) : `Already used in ${r.label}` : !0;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function N(n) {
|
|
77
|
-
let e = typeof n == "number" ? f(n) : n;
|
|
78
|
-
e = m(e);
|
|
79
|
-
const o = u(e);
|
|
80
|
-
return function(t) {
|
|
81
|
-
if (!s(t)) {
|
|
82
|
-
if (t = +t, Number.isNaN(t)) return !0;
|
|
83
|
-
t = f(t);
|
|
84
|
-
}
|
|
85
|
-
return t = m(t), t.amount % e.amount === 0 && t.precision <= e.precision ? !0 : `${u(t)} must be a multiple of ${o}`;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
export {
|
|
89
|
-
A,
|
|
90
|
-
P as B,
|
|
91
|
-
c as I,
|
|
92
|
-
j as M,
|
|
93
|
-
M as R,
|
|
94
|
-
D as U,
|
|
95
|
-
N as a,
|
|
96
|
-
g as b,
|
|
97
|
-
$ as c
|
|
98
|
-
};
|
package/dist/stock-XINW8JOM.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { u as i } from "./stock-CxCRZo_D.js";
|
|
2
|
-
import { a as s, Y as p } from "./app-Cb5s4jMu.js";
|
|
3
|
-
import { computed as k, ref as B } from "vue";
|
|
4
|
-
import { c as d } from "./number-y_W4pn_d.js";
|
|
5
|
-
function m() {
|
|
6
|
-
return {
|
|
7
|
-
stockBalance: {
|
|
8
|
-
_id: "",
|
|
9
|
-
items: []
|
|
10
|
-
},
|
|
11
|
-
productBalance: []
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
const v = d(0), f = {
|
|
15
|
-
id: "",
|
|
16
|
-
balance: v,
|
|
17
|
-
closing: null,
|
|
18
|
-
costs: null
|
|
19
|
-
}, n = B(m()), w = () => {
|
|
20
|
-
const r = s(), u = k(() => {
|
|
21
|
-
var a;
|
|
22
|
-
const o = (a = n.value.stockBalance.skus) == null ? void 0 : a.groupBy((t) => t.id), e = (t) => {
|
|
23
|
-
var c;
|
|
24
|
-
return ((c = o == null ? void 0 : o.get(t)) == null ? void 0 : c[0]) ?? { ...f, id: t };
|
|
25
|
-
};
|
|
26
|
-
return r.skus.map((t) => e(t._id));
|
|
27
|
-
}), l = i();
|
|
28
|
-
return {
|
|
29
|
-
// state
|
|
30
|
-
get stockBalance() {
|
|
31
|
-
return {
|
|
32
|
-
...n.value.stockBalance,
|
|
33
|
-
skus: u.value
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
set stockBalance(o) {
|
|
37
|
-
n.value.stockBalance = o;
|
|
38
|
-
},
|
|
39
|
-
get productBalance() {
|
|
40
|
-
return n.value.productBalance;
|
|
41
|
-
},
|
|
42
|
-
set productBalance(o) {
|
|
43
|
-
n.value.productBalance = o;
|
|
44
|
-
},
|
|
45
|
-
// actions
|
|
46
|
-
async readStockBalance() {
|
|
47
|
-
this.stockBalance = await l.readStockBalance();
|
|
48
|
-
},
|
|
49
|
-
async readProductBalance() {
|
|
50
|
-
this.productBalance = [];
|
|
51
|
-
const o = s(), e = p({
|
|
52
|
-
recipes: o.recipes,
|
|
53
|
-
skus: o.skus,
|
|
54
|
-
skuGroups: o.skuGroups,
|
|
55
|
-
inventoryBindingMapping: {},
|
|
56
|
-
stockBalance: this.stockBalance
|
|
57
|
-
// silent: true
|
|
58
|
-
});
|
|
59
|
-
function a(t, c) {
|
|
60
|
-
return Object.prototype.hasOwnProperty.call(t, c);
|
|
61
|
-
}
|
|
62
|
-
for (const t in e.convertCountdown)
|
|
63
|
-
if (a(e.convertCountdown, t)) {
|
|
64
|
-
const c = e.convertCountdown[t];
|
|
65
|
-
this.productBalance.push({
|
|
66
|
-
id: t,
|
|
67
|
-
count: c
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
export {
|
|
74
|
-
w as u
|
|
75
|
-
};
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { a as g } from "./FmMultiselectDialog-CYUxtxnS.js";
|
|
2
|
-
import { a as P } from "./app-Cb5s4jMu.js";
|
|
3
|
-
import { useDialog as E } from "@feedmepos/ui-library";
|
|
4
|
-
function A() {
|
|
5
|
-
const u = P(), _ = E();
|
|
6
|
-
async function b(e, m, s, f = []) {
|
|
7
|
-
var i, o;
|
|
8
|
-
const y = e.filter((n) => n.type === "SKU"), l = e.filter((n) => n.type !== "SKU"), c = /* @__PURE__ */ new Set();
|
|
9
|
-
if (s)
|
|
10
|
-
for (const n of u.skus)
|
|
11
|
-
!f.some((a) => a === n._id) && n._id !== s && !((o = (i = n.convert) == null ? void 0 : i.inventoryBindings) != null && o.some((a) => a.id === s)) || c.add(n._id);
|
|
12
|
-
const t = u.skus.map((n) => ({
|
|
13
|
-
label: n.name,
|
|
14
|
-
sublabel: `${n.code}${c.has(n._id) ? " (Cannot bind, will cause recursive binding)" : ""}`,
|
|
15
|
-
value: n,
|
|
16
|
-
disabled: c.has(n._id)
|
|
17
|
-
})), p = t.filter(
|
|
18
|
-
(n) => y.find((d) => d.id === n.value._id) && !c.has(n.value._id)
|
|
19
|
-
).map((n) => n.value);
|
|
20
|
-
_.open({
|
|
21
|
-
title: "Select ingredients",
|
|
22
|
-
contentComponent: g,
|
|
23
|
-
contentComponentProps: {
|
|
24
|
-
items: t,
|
|
25
|
-
modelValue: p,
|
|
26
|
-
virtualScroll: !0
|
|
27
|
-
},
|
|
28
|
-
primaryActions: {
|
|
29
|
-
text: "Confirm",
|
|
30
|
-
close: !0
|
|
31
|
-
},
|
|
32
|
-
secondaryActions: {
|
|
33
|
-
text: "Close",
|
|
34
|
-
close: !0,
|
|
35
|
-
variant: "tertiary"
|
|
36
|
-
}
|
|
37
|
-
}).onPrimary((n) => {
|
|
38
|
-
const d = [
|
|
39
|
-
...l,
|
|
40
|
-
...e.filter((a) => n.find((r) => r._id === a.id)),
|
|
41
|
-
...n.filter((a) => !e.find((r) => r.id === a._id)).map((a) => ({
|
|
42
|
-
type: "SKU",
|
|
43
|
-
id: a._id,
|
|
44
|
-
amount: {
|
|
45
|
-
amount: 1,
|
|
46
|
-
precision: 0
|
|
47
|
-
}
|
|
48
|
-
}))
|
|
49
|
-
];
|
|
50
|
-
m(d);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
async function v(e, m, s = []) {
|
|
54
|
-
var p;
|
|
55
|
-
const f = e.filter((i) => i.type === "RECIPE"), y = e.filter((i) => i.type !== "RECIPE"), l = /* @__PURE__ */ new Set();
|
|
56
|
-
if (s.length)
|
|
57
|
-
for (const i of u.recipes) {
|
|
58
|
-
const o = ((p = u.recipeBindingFlattenCache[i._id]) == null ? void 0 : p.inventoryBindings) ?? [], n = o.some(
|
|
59
|
-
(r) => r.bindingPaths.some((S) => s.some((h) => h === S.id))
|
|
60
|
-
), d = o.some(
|
|
61
|
-
(r) => "success" in r && s.includes(r.ingredient._id)
|
|
62
|
-
);
|
|
63
|
-
(s.some((r) => r === i._id) || n || d) && l.add(i._id);
|
|
64
|
-
}
|
|
65
|
-
const c = u.recipes.filter((i) => !s.includes(i._id)).map((i) => ({
|
|
66
|
-
label: i.name,
|
|
67
|
-
sublabel: l.has(i._id) ? "(Cannot bind, will cause recursive binding)" : `${i.contains.length} inventory bindings`,
|
|
68
|
-
value: i,
|
|
69
|
-
disabled: l.has(i._id)
|
|
70
|
-
})), t = c.filter(
|
|
71
|
-
(i) => f.find((o) => o.id === i.value._id) && !l.has(i.value._id)
|
|
72
|
-
).map((i) => i.value);
|
|
73
|
-
_.open({
|
|
74
|
-
title: "Select recipes",
|
|
75
|
-
contentComponent: g,
|
|
76
|
-
contentComponentProps: {
|
|
77
|
-
items: c,
|
|
78
|
-
modelValue: t,
|
|
79
|
-
virtualScroll: !0
|
|
80
|
-
},
|
|
81
|
-
primaryActions: {
|
|
82
|
-
text: "Confirm",
|
|
83
|
-
close: !0
|
|
84
|
-
},
|
|
85
|
-
secondaryActions: {
|
|
86
|
-
text: "Close",
|
|
87
|
-
close: !0,
|
|
88
|
-
variant: "tertiary"
|
|
89
|
-
}
|
|
90
|
-
}).onPrimary((i) => {
|
|
91
|
-
const o = [
|
|
92
|
-
...e.filter((n) => i.find((d) => d._id === n.id)),
|
|
93
|
-
...i.filter((n) => !e.find((d) => d.id === n._id)).map((n) => ({
|
|
94
|
-
type: "RECIPE",
|
|
95
|
-
id: n._id,
|
|
96
|
-
amount: {
|
|
97
|
-
amount: 1,
|
|
98
|
-
precision: 0
|
|
99
|
-
}
|
|
100
|
-
})),
|
|
101
|
-
...y
|
|
102
|
-
];
|
|
103
|
-
m(o);
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
async function C(e, m, s = []) {
|
|
107
|
-
const f = e.filter((t) => t.type === "SKU_GROUP"), y = e.filter((t) => t.type !== "SKU_GROUP"), l = u.skuGroups.filter((t) => !s.includes(t._id)).map((t) => ({
|
|
108
|
-
label: t.name,
|
|
109
|
-
value: t
|
|
110
|
-
})), c = l.filter((t) => f.find((p) => p.id === t.value._id)).map((t) => t.value);
|
|
111
|
-
_.open({
|
|
112
|
-
title: "Select ingredient group",
|
|
113
|
-
contentComponent: g,
|
|
114
|
-
contentComponentProps: {
|
|
115
|
-
items: l,
|
|
116
|
-
modelValue: c,
|
|
117
|
-
virtualScroll: !0
|
|
118
|
-
},
|
|
119
|
-
primaryActions: {
|
|
120
|
-
text: "Confirm",
|
|
121
|
-
close: !0
|
|
122
|
-
},
|
|
123
|
-
secondaryActions: {
|
|
124
|
-
text: "Close",
|
|
125
|
-
close: !0,
|
|
126
|
-
variant: "tertiary"
|
|
127
|
-
}
|
|
128
|
-
}).onPrimary((t) => {
|
|
129
|
-
const p = [
|
|
130
|
-
...e.filter((i) => t.find((o) => o._id === i.id)),
|
|
131
|
-
...t.filter((i) => !e.find((o) => o.id === i._id)).map((i) => ({
|
|
132
|
-
type: "SKU_GROUP",
|
|
133
|
-
id: i._id,
|
|
134
|
-
amount: {
|
|
135
|
-
amount: 1,
|
|
136
|
-
precision: 0
|
|
137
|
-
}
|
|
138
|
-
})),
|
|
139
|
-
...y
|
|
140
|
-
];
|
|
141
|
-
m(p);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
return {
|
|
145
|
-
promptIngredientsBinding: b,
|
|
146
|
-
promptRecipesBinding: v,
|
|
147
|
-
promptIngredientGroupsBinding: C
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
export {
|
|
151
|
-
A as u
|
|
152
|
-
};
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { computed as u } from "vue";
|
|
2
|
-
import { b, R as e, ac as v, ad as O, ab as U } from "./app-Cb5s4jMu.js";
|
|
3
|
-
import { useCoreStore as _, useI18n as A } from "@feedmepos/mf-common";
|
|
4
|
-
import { u as C } from "./feature-Ckn5ra3z.js";
|
|
5
|
-
const L = O.reduce(
|
|
6
|
-
(o, r) => {
|
|
7
|
-
var i;
|
|
8
|
-
return r.name && (o[r.name] = (i = r.meta) == null ? void 0 : i.validationManifest), o;
|
|
9
|
-
},
|
|
10
|
-
{}
|
|
11
|
-
);
|
|
12
|
-
function p() {
|
|
13
|
-
const o = _(), r = C(), { t: i } = A(), { isDev: N } = b(), l = (t) => v(t, i), c = u(
|
|
14
|
-
() => {
|
|
15
|
-
var t;
|
|
16
|
-
return ((t = o.sessionUser.value) == null ? void 0 : t.permissions) ?? [];
|
|
17
|
-
}
|
|
18
|
-
), h = (t = []) => t.length === 0 ? !0 : U(t, c.value).granted, a = (t) => {
|
|
19
|
-
const n = L[t];
|
|
20
|
-
return h(n == null ? void 0 : n.requiredCaslPermissions);
|
|
21
|
-
}, T = (t) => t.filter((n) => !n.hide).map((n) => n.children ? { ...n, children: T(n.children) } : n).filter((n) => !n.children || n.children.length > 0), I = (t) => t.map((n) => {
|
|
22
|
-
const { hide: s, children: E, ...R } = n, S = { ...R };
|
|
23
|
-
return E && (S.children = I(E)), S;
|
|
24
|
-
}), d = u(() => {
|
|
25
|
-
var s;
|
|
26
|
-
const t = [
|
|
27
|
-
{
|
|
28
|
-
label: "Non-Production Environment",
|
|
29
|
-
icon: "logo_dev",
|
|
30
|
-
disabled: !0,
|
|
31
|
-
hide: !N
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
label: l(e.STOCK),
|
|
35
|
-
children: [
|
|
36
|
-
{
|
|
37
|
-
label: i("inventory.stock.stock_balance.title"),
|
|
38
|
-
value: e.STOCK,
|
|
39
|
-
hide: !a(e.STOCK)
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
label: l(e.PRODUCTION_RUN),
|
|
43
|
-
value: e.PRODUCTION_RUN,
|
|
44
|
-
hide: !a(e.PRODUCTION_RUN) || !r.enableProductionRun
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: l(e.UNIT_COST_HISTORY),
|
|
48
|
-
value: e.UNIT_COST_HISTORY,
|
|
49
|
-
hide: !a(e.UNIT_COST_HISTORY) || !r.enableTotalCost
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
label: l(e.WASTAGE_TEMPLATE),
|
|
53
|
-
value: e.WASTAGE_TEMPLATE,
|
|
54
|
-
hide: !a(e.WASTAGE_TEMPLATE) || !r.enableWastageTemplate
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
label: i("inventory.closing.title"),
|
|
60
|
-
children: [
|
|
61
|
-
{
|
|
62
|
-
label: l(e.CLOSING_HISTORY),
|
|
63
|
-
value: e.CLOSING_HISTORY,
|
|
64
|
-
hide: !a(e.CLOSING_HISTORY)
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: l(e.CLOSING_TEMPLATE),
|
|
68
|
-
value: e.CLOSING_TEMPLATE,
|
|
69
|
-
hide: !a(e.CLOSING_TEMPLATE) || !r.enableClosingTemplate
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: l(e.CLOSING_DRAFT),
|
|
73
|
-
value: e.CLOSING_DRAFT,
|
|
74
|
-
hide: !a(e.CLOSING_DRAFT) || !r.enableClosingTemplate
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
label: l(e.INGREDIENTS),
|
|
80
|
-
value: e.INGREDIENTS,
|
|
81
|
-
hide: !a(e.INGREDIENTS)
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
label: l(e.INGREDIENT_GROUP),
|
|
85
|
-
value: e.INGREDIENT_GROUP,
|
|
86
|
-
hide: !a(e.INGREDIENT_GROUP) || !r.enableIngredientGroup
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
label: l(e.RECIPE),
|
|
90
|
-
value: e.RECIPE,
|
|
91
|
-
hide: !a(e.RECIPE)
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
label: l(e.UNIT),
|
|
95
|
-
value: e.UNIT,
|
|
96
|
-
hide: !a(e.UNIT)
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
label: i("inventory.transfer.title"),
|
|
100
|
-
children: [
|
|
101
|
-
{
|
|
102
|
-
label: l(e.RECEIVE_REQUEST),
|
|
103
|
-
value: e.RECEIVE_REQUEST,
|
|
104
|
-
hide: !a(e.RECEIVE_REQUEST)
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
label: l(e.RECEIVE_REQUEST_BULK),
|
|
108
|
-
value: e.RECEIVE_REQUEST_BULK,
|
|
109
|
-
hide: !a(e.RECEIVE_REQUEST_BULK) || !r.enableReceiveRequestBeta
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
label: l(e.APPROVAL),
|
|
113
|
-
value: e.APPROVAL,
|
|
114
|
-
hide: !a(e.APPROVAL)
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
label: l(e.SURCHARGE),
|
|
118
|
-
value: e.SURCHARGE,
|
|
119
|
-
hide: !a(e.SURCHARGE) || !r.enableSurcharge
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
label: l(e.TRANSFER_TEMPLATE),
|
|
123
|
-
value: e.TRANSFER_TEMPLATE,
|
|
124
|
-
hide: !a(e.TRANSFER_TEMPLATE) || !r.enablePoTemplate
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
label: l(e.SUPPLIER),
|
|
130
|
-
value: e.SUPPLIER,
|
|
131
|
-
hide: !a(e.SUPPLIER)
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
label: l(e.WAREHOUSE),
|
|
135
|
-
value: e.WAREHOUSE,
|
|
136
|
-
hide: !a(e.WAREHOUSE)
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
label: l(e.PUBLISH),
|
|
140
|
-
value: e.PUBLISH,
|
|
141
|
-
hide: !a(e.PUBLISH)
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
label: l(e.IMPORT),
|
|
145
|
-
value: e.IMPORT,
|
|
146
|
-
hide: !a(e.IMPORT) || !r.enableBulkImport
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
label: l(e.INTEGRATION),
|
|
150
|
-
value: e.INTEGRATION,
|
|
151
|
-
hide: !a(e.INTEGRATION)
|
|
152
|
-
}
|
|
153
|
-
], n = I(T(t));
|
|
154
|
-
return ((s = o.currentBusiness.value) == null ? void 0 : s.menuVersion) === "v3" ? n.filter(
|
|
155
|
-
(E) => E.value !== e.INGREDIENTS && E.value !== e.RECIPE && E.value !== e.UNIT && E.value !== e.PUBLISH
|
|
156
|
-
) : n;
|
|
157
|
-
}), P = u(() => {
|
|
158
|
-
function t(s) {
|
|
159
|
-
for (const E of s)
|
|
160
|
-
if (E.children && E.children.length > 0) {
|
|
161
|
-
const R = t(E.children);
|
|
162
|
-
if (R) return R;
|
|
163
|
-
} else if (E.value)
|
|
164
|
-
return E.value;
|
|
165
|
-
}
|
|
166
|
-
return t(d.value) ?? null;
|
|
167
|
-
});
|
|
168
|
-
return { menuItems: d, firstAccessibleRouteName: P };
|
|
169
|
-
}
|
|
170
|
-
export {
|
|
171
|
-
p as u
|
|
172
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ref as c } from "vue";
|
|
2
|
-
var n = /* @__PURE__ */ ((r) => (r.loading = "loading", r.error = "error", r.success = "success", r))(n || {});
|
|
3
|
-
function i(r) {
|
|
4
|
-
const e = c({
|
|
5
|
-
state: "loading"
|
|
6
|
-
/* loading */
|
|
7
|
-
}), s = async (a) => {
|
|
8
|
-
const t = a || r;
|
|
9
|
-
if (!t) {
|
|
10
|
-
e.value = { state: "error", error: new Error("No promise task provided") };
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
e.value = {
|
|
14
|
-
state: "loading"
|
|
15
|
-
/* loading */
|
|
16
|
-
};
|
|
17
|
-
try {
|
|
18
|
-
const o = await t();
|
|
19
|
-
e.value = { state: "success", data: o };
|
|
20
|
-
} catch (o) {
|
|
21
|
-
e.value = { state: "error", error: o };
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
return r && s(), { result: e, execute: s };
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
n as R,
|
|
28
|
-
i as u
|
|
29
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { IngredientGroupDialogProps } from './IngredientGroupDialogProps';
|
|
2
|
-
import { FormMode } from '@/components/form/form-mode.enum';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IngredientGroupDialogProps>, {
|
|
4
|
-
mode: FormMode;
|
|
5
|
-
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
"update:show": (show: boolean) => void;
|
|
7
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IngredientGroupDialogProps>, {
|
|
8
|
-
mode: FormMode;
|
|
9
|
-
}>>> & Readonly<{
|
|
10
|
-
"onUpdate:show"?: ((show: boolean) => any) | undefined;
|
|
11
|
-
}>, {
|
|
12
|
-
mode: FormMode;
|
|
13
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
|
-
export default _default;
|
|
15
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
17
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
-
} : {
|
|
20
|
-
type: import('vue').PropType<T[K]>;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
type __VLS_WithDefaults<P, D> = {
|
|
25
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
26
|
-
default: D[K];
|
|
27
|
-
}> : P[K];
|
|
28
|
-
};
|
|
29
|
-
type __VLS_Prettify<T> = {
|
|
30
|
-
[K in keyof T]: T[K];
|
|
31
|
-
} & {};
|