@feedmepos/mf-inventory-portal 1.8.0-dev.1 → 1.8.0-dev.10
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-BjFIh5km.js +1466 -0
- package/dist/{ApprovalView-C8_ax05b.js → ApprovalView-CauRuf64.js} +26 -25
- package/dist/{BindingsDialog-t0ZY9eh5.js → BindingsDialog-U-tzIfGX.js} +2 -2
- package/dist/{BindingsPicker-C0Qblmml.js → BindingsPicker-CV_oghtz.js} +2 -2
- package/dist/{BindingsTable-CsqUBbRA.js → BindingsTable-TKSQxAxV.js} +4 -4
- package/dist/{BulkReceiveRequestView-DAG-TMox.js → BulkReceiveRequestView-Cyeq26qc.js} +21 -21
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BpJhboKU.js +151 -0
- package/dist/{ClosingDraftView-CdKp4Ny6.js → ClosingDraftView-UqeHsxyJ.js} +748 -746
- package/dist/ClosingHistoryView-Cr6cQq6j.js +769 -0
- package/dist/{ClosingTemplateView-C326DL4q.js → ClosingTemplateView-DZ0Mdc87.js} +303 -291
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CXjubRbj.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-C-OsCTxZ.js} +1 -1
- package/dist/{DefaultView-CsIMmQAY.js → DefaultView-DQKHG5Jl.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-eTrMvJzA.js → DeliveryOrderPrintPreview-Z_kBbMMO.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-B7nBbxMo.js → EmailDialog.vue_vue_type_script_setup_true_lang-Ce6Ly9pT.js} +6228 -6216
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BUYI8koH.js +47 -0
- package/dist/FeatureCapabilityGate-DOn2IVJb.js +74 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CI2KTzDs.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BJuo4lEh.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Db_FiSRe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZxz5hbo.js} +2 -2
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CiBhz5sq.js +120 -0
- package/dist/FmMultiselectDialog-Bx9cLdYs.js +123 -0
- package/dist/{FmMultiselectDialog-CYUxtxnS.js → FmMultiselectDialog-DvaWLGY5.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DOkV11NN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D6f1M96D.js} +72 -73
- package/dist/ImportView-1-cjN7ay.js +1290 -0
- package/dist/{IngredientsView-CZ6E7cXf.js → IngredientsView-JfKlUU2E.js} +656 -649
- package/dist/{IntegrationExplorerView-B15ND4Fg.js → IntegrationExplorerView-uElgWH8i.js} +602 -614
- package/dist/IntegrationPlatformView-g2dU5SG6.js +13061 -0
- package/dist/{IntegrationView-hkNhsqx2.js → IntegrationView-B9g888K4.js} +2956 -2922
- package/dist/{InventoryBindingForm-SfuUF0_O.js → InventoryBindingForm-DfGOKZWg.js} +1 -1
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CNjTdNL7.js +472 -0
- package/dist/{InventoryBindingSummary-DUcukkyJ.js → InventoryBindingSummary-CSii8B2X.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-D_Xk4SOH.js +79 -0
- package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-DJvfMOND.js +274 -0
- package/dist/PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-Bdjm0Y4w.js +79 -0
- package/dist/{ProductionRunDetailView-BwgRX-14.js → ProductionRunDetailView-HgH2Wp99.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BbNXNhpr.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-C88pjV2s.js} +9 -9
- package/dist/{ProductionRunView-CZU7LY9-.js → ProductionRunView-BkvQHeCP.js} +16 -15
- package/dist/{PublishView-DS2FZ66p.js → PublishView-CIei_T5e.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-CZa0MVAs.js → PurchaseOrderPrintPreview-Wmv7676h.js} +2 -2
- package/dist/{ReceiveRequestView-Bk5b3nVB.js → ReceiveRequestView-MqOIpIDB.js} +15 -15
- package/dist/RecipeView-WzXJX4JU.js +3440 -0
- package/dist/SettingsView-1YlgjyzB.js +1032 -0
- package/dist/StockView-C-dIRXPv.js +2651 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DdZg9T4n.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CewKTZzy.js} +1 -1
- package/dist/{SupplierView-D8q6siZW.js → SupplierView-53rHhQ63.js} +577 -571
- package/dist/{SurchargeView-Db_5YFoR.js → SurchargeView-DuJb5EUn.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-WOVs4Fr1.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-C_YmC-ZX.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-CyQujMzv.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Bljc4Vuy.js → TransferDetails.vue_vue_type_script_setup_true_lang-CMwqjlb0.js} +1722 -1672
- package/dist/TransferTemplateView-B6OGfKQr.js +2343 -0
- package/dist/{UnitCostHistoryView-BqDiQ4IE.js → UnitCostHistoryView-BVlq4BNG.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BjSmg5LX.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CULJEeCU.js} +4 -4
- package/dist/{UnitView-CM695-VI.js → UnitView-AuIJokVF.js} +84 -84
- package/dist/{WarehouseView-BdidU4p6.js → WarehouseView-Cjv8S1ov.js} +194 -189
- package/dist/{WastageTemplateView-DdhwdXT6.js → WastageTemplateView-mxSTzVSZ.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-OztWApio.js} +6085 -6053
- package/dist/app.d.ts +36 -150
- package/dist/app.js +1 -1
- package/dist/{closing-template-DnqnpXxn.js → closing-template-DIxXDgZQ.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-BTzYzk-x.js} +1 -1
- package/dist/{dayjs.min-Zbd6-uVD.js → dayjs.min-BIg6CfC4.js} +1 -1
- package/dist/{decimal-Df6a50Ld.js → decimal-B34w3X7O.js} +2 -2
- package/dist/{defineDeepModel-Brbsikbi.js → defineDeepModel-CrZAv12u.js} +1 -1
- package/dist/{duplicate-template-B9kuShaF.js → duplicate-template-BKVPhi40.js} +1 -1
- package/dist/{inventory-core-dart.default-DDRxXXnt.js → feature-BUVZ_ab3.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-DGLxhRFH.js} +1 -1
- package/dist/{format-unit-display-CsQA0SQd.js → format-unit-display-BhudItCc.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-BfwadWDS.js +67 -0
- package/dist/{import-export.helper-DCQ6oX9s.js → import-export.helper-BdQ_d-fT.js} +16 -17
- package/dist/{index-UmM6gHJ1.js → index-BTNI4XZ2.js} +1 -1
- package/dist/{index-C-mazZwS.js → index-B_hoeQNL.js} +3 -3
- package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
- package/dist/{index-BXaIMGnI.js → index-CCvxPS3E.js} +1 -1
- package/dist/index-eGvSlWMU.js +1892 -0
- package/dist/{lz-string-Bibw5D_6.js → lz-string-CVEGZpSC.js} +1 -1
- package/dist/{netsuite-Bev0OtQT.js → netsuite-DEhdSyBn.js} +9 -3
- package/dist/{predefined-templates-BHvUnTk_.js → predefined-templates-BTdQl7jj.js} +1 -1
- package/dist/{purchase-order-template-DgOKEzhS.js → purchase-order-template-DfMmpsrJ.js} +1 -1
- package/dist/{recalculationUtils-Dv__DzZh.js → recalculationUtils-Ds9Jcg0l.js} +1 -1
- package/dist/router/name.d.ts +2 -2
- package/dist/{row-action.enum-ncgDYAjP.js → row-action.enum-B2Y5YFbc.js} +2 -2
- package/dist/rules-D01xYhgI.js +238 -0
- package/dist/{stock-CxCRZo_D.js → stock-D3kBNq3e.js} +1 -1
- package/dist/stock-DyTC4Teu.js +74 -0
- 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-DaidezrO.js} +2 -2
- package/dist/{surcharge-FRSFqjGl.js → surcharge-C-PFvvlU.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-Cm1styDr.js → uom-rules-Un5bhcrm.js} +1 -1
- package/dist/{use-ingredient-select-dialog-ntAqHX04.js → use-ingredient-select-dialog-DV_hkAt9.js} +2 -2
- package/dist/use-inventory-binding-dialog-CTceyFrg.js +113 -0
- package/dist/{use-template-enabled-locations-CIZqw-Z8.js → use-template-enabled-locations-DGqw8tvz.js} +2 -2
- package/dist/{use-transfer-locations-CM5vNttA.js → use-transfer-locations-DgtKajec.js} +2 -2
- package/dist/{useHrmPermission-CslLuBoP.js → useHrmPermission-BMpZlah6.js} +1 -1
- package/dist/useNavigationMenu-D0NtXAnB.js +346 -0
- package/dist/{useSseClient-CCV4mPzD.js → useSseClient-CHZZxy7Z.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-mXrQUZTi.js} +519 -519
- package/dist/{xlsx.util-B50OvX4z.js → xlsx.util-CKx0NYTq.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
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
import { defineComponent as Y, ref as ue, computed as F, resolveComponent as E, createElementBlock as m, createCommentVNode as I, openBlock as a, createElementVNode as n, createVNode as y, toDisplayString as f, unref as s, Fragment as $, renderList as M, normalizeStyle as me, createTextVNode as ce, reactive as G, withCtx as A, createBlock as K, nextTick as pe } from "vue";
|
|
2
|
+
import { a as q, v as ye, w as fe, s as ve, F as _e } from "./app-OztWApio.js";
|
|
3
|
+
import { t as xe, n as ge, i as be, e as he, f as W, I as j, a as S } from "./rules-D01xYhgI.js";
|
|
4
|
+
import { u as Be } from "./use-inventory-binding-dialog-CTceyFrg.js";
|
|
5
|
+
import { useI18n as H } from "@feedmepos/mf-common";
|
|
6
|
+
import { _ as ke, c as Ie, d as Ve } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-D6f1M96D.js";
|
|
7
|
+
const N = { amount: 1, precision: 0 };
|
|
8
|
+
function J(v, u) {
|
|
9
|
+
return { amount: v.amount * u.amount, precision: v.precision + u.precision };
|
|
10
|
+
}
|
|
11
|
+
function we(v, u) {
|
|
12
|
+
const r = Q(u), p = J(v, r);
|
|
13
|
+
return ge(p.amount / 10 ** p.precision, p.precision);
|
|
14
|
+
}
|
|
15
|
+
function Q(v) {
|
|
16
|
+
if (v.trim().length === 0) return N;
|
|
17
|
+
const u = Number(v);
|
|
18
|
+
return Number.isFinite(u) ? xe(u, be(u)) : N;
|
|
19
|
+
}
|
|
20
|
+
function X(v, u, r = 0, p = /* @__PURE__ */ new Set(), R = N) {
|
|
21
|
+
if (p.has(v)) return [];
|
|
22
|
+
const x = new Set(p).add(v);
|
|
23
|
+
return u.contentsOf(v).flatMap((t, g) => {
|
|
24
|
+
const d = t.type === "RECIPE", c = J(t.amount ?? N, R), b = {
|
|
25
|
+
key: `${r}-${g}-${t.id}`,
|
|
26
|
+
name: u.bindingName(t),
|
|
27
|
+
amount: c,
|
|
28
|
+
unit: u.bindingUnit(t),
|
|
29
|
+
depth: r,
|
|
30
|
+
isRecipe: d
|
|
31
|
+
};
|
|
32
|
+
return d ? [b, ...X(t.id, u, r + 1, x, c)] : [b];
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const Fe = {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "flex flex-col pb-8 fm-typo-en-body-sm-400"
|
|
38
|
+
}, Ee = {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "flex items-center gap-4 px-12 text-fm-color-typo-secondary"
|
|
41
|
+
}, Re = {
|
|
42
|
+
key: 1,
|
|
43
|
+
class: "flex flex-col text-fm-color-typo-secondary"
|
|
44
|
+
}, Ce = { class: "flex-1 line-clamp-1" }, Ue = {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "text-fm-color-typo-disabled"
|
|
47
|
+
}, Ae = {
|
|
48
|
+
key: 2,
|
|
49
|
+
class: "flex gap-4 px-12 text-fm-color-system-warning-400"
|
|
50
|
+
}, $e = /* @__PURE__ */ Y({
|
|
51
|
+
__name: "RecipeBindingBreakdown",
|
|
52
|
+
props: {
|
|
53
|
+
recipeId: {},
|
|
54
|
+
multiplier: {}
|
|
55
|
+
},
|
|
56
|
+
setup(v) {
|
|
57
|
+
const u = v, { t: r } = H(), p = q(), R = {
|
|
58
|
+
contentsOf: (d) => {
|
|
59
|
+
var c;
|
|
60
|
+
return ((c = p.recipeById[d]) == null ? void 0 : c.contains) ?? [];
|
|
61
|
+
},
|
|
62
|
+
bindingName: (d) => {
|
|
63
|
+
var c, b;
|
|
64
|
+
switch (d.type) {
|
|
65
|
+
case "RECIPE":
|
|
66
|
+
return ((c = p.recipeById[d.id]) == null ? void 0 : c.name) ?? d.id;
|
|
67
|
+
default:
|
|
68
|
+
return ((b = p.skuById[d.id]) == null ? void 0 : b.name) ?? d.id;
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
// a binding measurement overrides the ingredient's base unit, same as deduction reads it
|
|
72
|
+
bindingUnit: (d) => {
|
|
73
|
+
var c, b;
|
|
74
|
+
return d.type === "RECIPE" ? "" : ((c = d.measurement) == null ? void 0 : c.abbrev) ?? ((b = p.skuById[d.id]) == null ? void 0 : b.unit.abbrev) ?? "";
|
|
75
|
+
}
|
|
76
|
+
}, x = ue(!1), t = F(() => X(u.recipeId, R)), g = F(() => Q(u.multiplier).precision > 0);
|
|
77
|
+
return (d, c) => {
|
|
78
|
+
const b = E("FmButton"), P = E("FmIcon");
|
|
79
|
+
return t.value.length || g.value ? (a(), m("div", Fe, [
|
|
80
|
+
t.value.length ? (a(), m("div", Ee, [
|
|
81
|
+
n("span", null, f(s(r)("inventory.inventoryBindings.itemsLinked", { count: t.value.length }, t.value.length)), 1),
|
|
82
|
+
y(b, {
|
|
83
|
+
type: "button",
|
|
84
|
+
variant: "plain",
|
|
85
|
+
icon: x.value ? "expand_less" : "expand_more",
|
|
86
|
+
onClick: c[0] || (c[0] = (h) => x.value = !x.value)
|
|
87
|
+
}, null, 8, ["icon"])
|
|
88
|
+
])) : I("", !0),
|
|
89
|
+
x.value ? (a(), m("div", Re, [
|
|
90
|
+
(a(!0), m($, null, M(t.value, (h) => (a(), m("div", {
|
|
91
|
+
key: h.key,
|
|
92
|
+
class: "flex gap-8 py-4 px-12",
|
|
93
|
+
style: me({ paddingLeft: `${12 + h.depth * 16}px` })
|
|
94
|
+
}, [
|
|
95
|
+
n("span", Ce, [
|
|
96
|
+
ce(f(h.name) + " ", 1),
|
|
97
|
+
h.isRecipe ? (a(), m("span", Ue, " (" + f(s(r)("inventory.inventoryBindings.recipe")) + ") ", 1)) : I("", !0)
|
|
98
|
+
]),
|
|
99
|
+
n("span", null, f(s(we)(h.amount, d.multiplier)) + " " + f(h.unit), 1)
|
|
100
|
+
], 4))), 128))
|
|
101
|
+
])) : I("", !0),
|
|
102
|
+
g.value ? (a(), m("div", Ae, [
|
|
103
|
+
y(P, {
|
|
104
|
+
name: "warning",
|
|
105
|
+
color: "system-warning-300",
|
|
106
|
+
size: "sm"
|
|
107
|
+
}),
|
|
108
|
+
n("div", null, f(s(r)("inventory.inventoryBindings.precisionWarning")), 1)
|
|
109
|
+
])) : I("", !0)
|
|
110
|
+
])) : I("", !0);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}), Ne = { class: "flex flex-col gap-24" }, Pe = { class: "flex flex-col gap-16" }, Te = { class: "flex items-center" }, Se = { class: "flex-1 fm-typo-en-title-sm-600" }, Me = { class: "flex flex-col" }, De = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, ze = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Le = {
|
|
114
|
+
class: "flex items-center",
|
|
115
|
+
style: { "min-height": "48px" }
|
|
116
|
+
}, Oe = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Ge = { class: "line-clamp-1" }, Ke = { class: "w-[200px]" }, We = {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: "w-[52px]"
|
|
119
|
+
}, je = {
|
|
120
|
+
key: 0,
|
|
121
|
+
class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400 px-8"
|
|
122
|
+
}, Ye = { class: "flex flex-col gap-16" }, qe = { class: "flex items-center" }, He = { class: "flex-1 fm-typo-en-title-sm-600" }, Je = { class: "flex flex-col" }, Qe = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Xe = { class: "flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Ze = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[150px] px-16" }, en = {
|
|
123
|
+
key: 0,
|
|
124
|
+
class: "flex flex-col border-b border-fm-color-neutral-gray-100"
|
|
125
|
+
}, nn = {
|
|
126
|
+
class: "flex items-center w-full",
|
|
127
|
+
style: { "min-height": "48px" }
|
|
128
|
+
}, tn = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12 text-fm-color-typo-secondary line-clamp-1" }, on = {
|
|
129
|
+
key: 0,
|
|
130
|
+
class: "w-[52px]"
|
|
131
|
+
}, ln = { class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400 px-12 pb-4" }, sn = {
|
|
132
|
+
key: 1,
|
|
133
|
+
class: "flex flex-col border-b border-fm-color-neutral-gray-100"
|
|
134
|
+
}, rn = {
|
|
135
|
+
class: "flex items-center w-full",
|
|
136
|
+
style: { "min-height": "48px" }
|
|
137
|
+
}, an = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, dn = { class: "line-clamp-1 w-full" }, un = { class: "w-[150px]" }, mn = {
|
|
138
|
+
key: 0,
|
|
139
|
+
class: "w-[52px]"
|
|
140
|
+
}, cn = { class: "flex flex-col px-12 pb-4" }, gn = /* @__PURE__ */ Y({
|
|
141
|
+
__name: "InventoryBindingForm",
|
|
142
|
+
props: {
|
|
143
|
+
id: {},
|
|
144
|
+
modelValue: { default: () => [] },
|
|
145
|
+
excludeBindingId: {},
|
|
146
|
+
rules: { default: () => [] },
|
|
147
|
+
iframeMode: { type: Boolean },
|
|
148
|
+
disabled: { type: Boolean },
|
|
149
|
+
readonly: { type: Boolean },
|
|
150
|
+
allowRecipeDecimal: { type: Boolean }
|
|
151
|
+
},
|
|
152
|
+
emits: ["update:modelValue", "click:pick-inventory-bindings"],
|
|
153
|
+
setup(v, { emit: u }) {
|
|
154
|
+
const { t: r } = H(), p = q(), R = F(() => p.recipeById), x = F(() => p.skuById), t = v, g = u, d = F(() => ye({
|
|
155
|
+
parentId: t.id,
|
|
156
|
+
bindings: t.modelValue,
|
|
157
|
+
recipes: p.recipes.map((o) => o._id === t.id ? {
|
|
158
|
+
...o,
|
|
159
|
+
contains: t.modelValue
|
|
160
|
+
} : o),
|
|
161
|
+
skus: p.skus.map((o) => o._id === t.id ? {
|
|
162
|
+
...o,
|
|
163
|
+
convert: {
|
|
164
|
+
inventoryBindings: t.modelValue
|
|
165
|
+
}
|
|
166
|
+
} : o),
|
|
167
|
+
skuGroups: []
|
|
168
|
+
}).inventoryBindings.filter((o) => "error" in o && o.error).map((o) => o).filter((o) => o.reason === fe.enum.circularDependency)), c = F(
|
|
169
|
+
() => new Set(d.value.map((e) => {
|
|
170
|
+
var i;
|
|
171
|
+
return (i = e.bindingPaths[0]) == null ? void 0 : i.id;
|
|
172
|
+
}))
|
|
173
|
+
), b = F(() => t.modelValue.filter((e) => e.type === "RECIPE")), P = { amount: 1, precision: 0 }, h = G({});
|
|
174
|
+
function C(e) {
|
|
175
|
+
return h[e.id] ?? S(e.amount ?? P);
|
|
176
|
+
}
|
|
177
|
+
function Z(e, i) {
|
|
178
|
+
h[e.id] = i, ie(e.id, i, t.modelValue);
|
|
179
|
+
}
|
|
180
|
+
const { promptIngredientsBinding: ee, promptRecipesBinding: ne } = Be();
|
|
181
|
+
async function te() {
|
|
182
|
+
if (t.iframeMode) {
|
|
183
|
+
g("click:pick-inventory-bindings", "RECIPE");
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
ne(
|
|
187
|
+
t.modelValue,
|
|
188
|
+
(e) => g("update:modelValue", e),
|
|
189
|
+
t.id ? [t.id] : []
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
const D = F(() => t.modelValue.filter((e) => e.type === "SKU") ?? []);
|
|
193
|
+
async function oe() {
|
|
194
|
+
if (t.iframeMode) {
|
|
195
|
+
g("click:pick-inventory-bindings", "SKU");
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
ee(
|
|
199
|
+
t.modelValue,
|
|
200
|
+
(e) => g("update:modelValue", e),
|
|
201
|
+
t.excludeBindingId,
|
|
202
|
+
t.id ? [t.id] : []
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
function ie(e, i, o) {
|
|
206
|
+
if (j()(i) !== !0) return;
|
|
207
|
+
const _ = +i;
|
|
208
|
+
let V = o;
|
|
209
|
+
i.length > 0 && isFinite(_) ? V = o.map((B) => (B.id !== e || (B.amount = ve.fromNumber(_)), B)) : V = o.map((B) => (B.id !== e || (B.amount = { amount: 0, precision: 0 }), B)), g("update:modelValue", V);
|
|
210
|
+
}
|
|
211
|
+
function T(e, i) {
|
|
212
|
+
delete h[e];
|
|
213
|
+
const o = i.filter((_) => _.id !== e);
|
|
214
|
+
g("update:modelValue", o);
|
|
215
|
+
}
|
|
216
|
+
function z(e) {
|
|
217
|
+
var o, _;
|
|
218
|
+
if (e.type !== _e.enum.SKU)
|
|
219
|
+
throw new Error("Non-SKU binding does not have unit");
|
|
220
|
+
if (!((o = x.value[e.id]) == null ? void 0 : o.unit))
|
|
221
|
+
throw new Error(`Cannot find ingredient: ${e.id}`);
|
|
222
|
+
return (_ = x.value[e.id]) == null ? void 0 : _.unit;
|
|
223
|
+
}
|
|
224
|
+
function le(e) {
|
|
225
|
+
return !x.value[e.id];
|
|
226
|
+
}
|
|
227
|
+
function se(e) {
|
|
228
|
+
return { amount: e.amount, measurement: e.measurement };
|
|
229
|
+
}
|
|
230
|
+
function re(e, i, o) {
|
|
231
|
+
const _ = o.map((V) => V.id !== e ? V : {
|
|
232
|
+
...V,
|
|
233
|
+
amount: i.amount,
|
|
234
|
+
measurement: i.measurement
|
|
235
|
+
});
|
|
236
|
+
g("update:modelValue", _);
|
|
237
|
+
}
|
|
238
|
+
const L = G({});
|
|
239
|
+
function ae(e) {
|
|
240
|
+
return L[e.id] ?? {
|
|
241
|
+
modelValue: {
|
|
242
|
+
amount: e.amount,
|
|
243
|
+
measurement: e.measurement
|
|
244
|
+
},
|
|
245
|
+
amountAsString: S(e.amount)
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function de(e, i) {
|
|
249
|
+
pe(() => {
|
|
250
|
+
L[e.id] = {
|
|
251
|
+
modelValue: {
|
|
252
|
+
amount: e.amount,
|
|
253
|
+
measurement: e.measurement
|
|
254
|
+
},
|
|
255
|
+
amountAsString: i
|
|
256
|
+
};
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
return (e, i) => {
|
|
260
|
+
const o = E("FmFormGroup"), _ = E("FmButton"), V = E("FmTooltip"), B = E("FmTextField"), O = E("FmIcon");
|
|
261
|
+
return a(), m("div", Ne, [
|
|
262
|
+
y(o, {
|
|
263
|
+
disabled: e.disabled,
|
|
264
|
+
"model-value": e.modelValue,
|
|
265
|
+
rules: [
|
|
266
|
+
...e.rules,
|
|
267
|
+
() => d.value.length ? "There is a binding error in your configuration" : !0
|
|
268
|
+
]
|
|
269
|
+
}, {
|
|
270
|
+
label: A(() => i[0] || (i[0] = [
|
|
271
|
+
n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Define the inventory bindings for this recipe or ingredient. ", -1)
|
|
272
|
+
])),
|
|
273
|
+
_: 1
|
|
274
|
+
}, 8, ["disabled", "model-value", "rules"]),
|
|
275
|
+
n("div", Pe, [
|
|
276
|
+
n("div", Te, [
|
|
277
|
+
n("div", Se, f(s(r)("inventory.inventoryBindings.recipe")), 1),
|
|
278
|
+
e.readonly ? I("", !0) : (a(), K(_, {
|
|
279
|
+
key: 0,
|
|
280
|
+
variant: "secondary",
|
|
281
|
+
"text-color": "primary",
|
|
282
|
+
"border-color": "primary",
|
|
283
|
+
label: s(r)("inventory.inventoryBindings.linkRecipe"),
|
|
284
|
+
"prepend-icon": "link",
|
|
285
|
+
onClick: te
|
|
286
|
+
}, null, 8, ["label"]))
|
|
287
|
+
]),
|
|
288
|
+
n("div", Me, [
|
|
289
|
+
n("div", De, [
|
|
290
|
+
n("div", ze, f(s(r)("inventory.inventoryBindings.recipe")), 1),
|
|
291
|
+
i[1] || (i[1] = n("div", { class: "w-[200px]" }, null, -1)),
|
|
292
|
+
i[2] || (i[2] = n("div", { class: "w-[52px]" }, null, -1))
|
|
293
|
+
]),
|
|
294
|
+
(a(!0), m($, null, M(b.value, (l) => {
|
|
295
|
+
var U;
|
|
296
|
+
return a(), m("div", {
|
|
297
|
+
key: l.id,
|
|
298
|
+
class: "flex flex-col w-full border-b border-fm-color-neutral-gray-100"
|
|
299
|
+
}, [
|
|
300
|
+
n("div", Le, [
|
|
301
|
+
n("div", Oe, [
|
|
302
|
+
y(V, {
|
|
303
|
+
zIndex: 51,
|
|
304
|
+
variant: "plain",
|
|
305
|
+
placement: "top",
|
|
306
|
+
content: (U = R.value[l.id]) == null ? void 0 : U.name
|
|
307
|
+
}, {
|
|
308
|
+
default: A(() => {
|
|
309
|
+
var w;
|
|
310
|
+
return [
|
|
311
|
+
n("span", Ge, f((w = R.value[l.id]) == null ? void 0 : w.name), 1)
|
|
312
|
+
];
|
|
313
|
+
}),
|
|
314
|
+
_: 2
|
|
315
|
+
}, 1032, ["content"])
|
|
316
|
+
]),
|
|
317
|
+
n("div", Ke, [
|
|
318
|
+
y(o, {
|
|
319
|
+
disabled: e.disabled,
|
|
320
|
+
modelValue: s(j)()(C(l)) === !0 ? +C(l) : C(l),
|
|
321
|
+
rules: [s(he)(e.allowRecipeDecimal ? 5 : 0), s(W)(-1)]
|
|
322
|
+
}, {
|
|
323
|
+
default: A(({ invalid: w }) => [
|
|
324
|
+
y(B, {
|
|
325
|
+
class: "w-full",
|
|
326
|
+
disabled: e.disabled,
|
|
327
|
+
modelValue: C(l),
|
|
328
|
+
"onUpdate:modelValue": (k) => Z(l, k),
|
|
329
|
+
invalid: w
|
|
330
|
+
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
331
|
+
]),
|
|
332
|
+
_: 2
|
|
333
|
+
}, 1032, ["disabled", "modelValue", "rules"])
|
|
334
|
+
]),
|
|
335
|
+
e.readonly ? I("", !0) : (a(), m("div", We, [
|
|
336
|
+
y(_, {
|
|
337
|
+
disabled: e.disabled,
|
|
338
|
+
type: "button",
|
|
339
|
+
variant: "plain",
|
|
340
|
+
icon: "delete",
|
|
341
|
+
"icon-color": "#000000",
|
|
342
|
+
onClick: (w) => T(l.id, e.modelValue)
|
|
343
|
+
}, null, 8, ["disabled", "onClick"])
|
|
344
|
+
]))
|
|
345
|
+
]),
|
|
346
|
+
y($e, {
|
|
347
|
+
"recipe-id": l.id,
|
|
348
|
+
multiplier: C(l)
|
|
349
|
+
}, null, 8, ["recipe-id", "multiplier"]),
|
|
350
|
+
c.value.has(l.id) ? (a(), m("div", je, [
|
|
351
|
+
y(O, {
|
|
352
|
+
name: "error",
|
|
353
|
+
color: "system-error-300",
|
|
354
|
+
size: "sm"
|
|
355
|
+
}),
|
|
356
|
+
n("div", null, f(s(r)("inventory.inventoryBindings.circularError")), 1)
|
|
357
|
+
])) : I("", !0)
|
|
358
|
+
]);
|
|
359
|
+
}), 128))
|
|
360
|
+
])
|
|
361
|
+
]),
|
|
362
|
+
n("div", Ye, [
|
|
363
|
+
n("div", qe, [
|
|
364
|
+
n("div", He, f(s(r)("inventory.inventoryBindings.ingredient")), 1),
|
|
365
|
+
e.readonly ? I("", !0) : (a(), K(_, {
|
|
366
|
+
key: 0,
|
|
367
|
+
variant: "secondary",
|
|
368
|
+
"text-color": "primary",
|
|
369
|
+
"border-color": "primary",
|
|
370
|
+
label: s(r)("inventory.inventoryBindings.linkIngredient"),
|
|
371
|
+
"prepend-icon": "link",
|
|
372
|
+
onClick: oe
|
|
373
|
+
}, null, 8, ["label"]))
|
|
374
|
+
]),
|
|
375
|
+
n("div", Je, [
|
|
376
|
+
n("div", Qe, [
|
|
377
|
+
n("div", Xe, f(s(r)("inventory.inventoryBindings.ingredient")), 1),
|
|
378
|
+
n("div", Ze, f(s(r)("inventory.inventoryBindings.amount")), 1),
|
|
379
|
+
i[3] || (i[3] = n("div", { class: "w-[52px]" }, null, -1))
|
|
380
|
+
]),
|
|
381
|
+
(a(!0), m($, null, M(D.value, (l, U) => {
|
|
382
|
+
var w;
|
|
383
|
+
return a(), m($, {
|
|
384
|
+
key: l.id
|
|
385
|
+
}, [
|
|
386
|
+
le(l) ? (a(), m("div", en, [
|
|
387
|
+
n("div", nn, [
|
|
388
|
+
n("div", tn, f(l.id), 1),
|
|
389
|
+
e.readonly ? I("", !0) : (a(), m("div", on, [
|
|
390
|
+
y(_, {
|
|
391
|
+
disabled: e.disabled,
|
|
392
|
+
type: "button",
|
|
393
|
+
variant: "tertiary",
|
|
394
|
+
icon: "delete",
|
|
395
|
+
onClick: (k) => T(l.id, e.modelValue)
|
|
396
|
+
}, null, 8, ["disabled", "onClick"])
|
|
397
|
+
]))
|
|
398
|
+
]),
|
|
399
|
+
n("div", ln, [
|
|
400
|
+
y(O, {
|
|
401
|
+
name: "error",
|
|
402
|
+
color: "system-error-300",
|
|
403
|
+
size: "sm"
|
|
404
|
+
}),
|
|
405
|
+
n("div", null, f(s(r)("inventory.inventoryBindings.missingIngredient")), 1)
|
|
406
|
+
])
|
|
407
|
+
])) : (a(), m("div", sn, [
|
|
408
|
+
n("div", rn, [
|
|
409
|
+
n("div", an, [
|
|
410
|
+
y(V, {
|
|
411
|
+
zIndex: 51,
|
|
412
|
+
variant: "plain",
|
|
413
|
+
placement: "top",
|
|
414
|
+
content: (w = x.value[l.id]) == null ? void 0 : w.name
|
|
415
|
+
}, {
|
|
416
|
+
default: A(() => {
|
|
417
|
+
var k;
|
|
418
|
+
return [
|
|
419
|
+
n("span", dn, f((k = x.value[l.id]) == null ? void 0 : k.name), 1)
|
|
420
|
+
];
|
|
421
|
+
}),
|
|
422
|
+
_: 2
|
|
423
|
+
}, 1032, ["content"])
|
|
424
|
+
]),
|
|
425
|
+
n("div", un, [
|
|
426
|
+
y(ke, {
|
|
427
|
+
"model-value": se(l),
|
|
428
|
+
"onUpdate:modelValue": (k) => k && re(l.id, k, e.modelValue),
|
|
429
|
+
"onUpdate:amount": (k) => de(l, k),
|
|
430
|
+
unit: z(l),
|
|
431
|
+
placement: U === D.value.length - 1 ? "top" : "bottom",
|
|
432
|
+
"convert-amount-on-change-unit": "",
|
|
433
|
+
disabled: e.readonly
|
|
434
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement", "disabled"])
|
|
435
|
+
]),
|
|
436
|
+
e.readonly ? I("", !0) : (a(), m("div", mn, [
|
|
437
|
+
y(_, {
|
|
438
|
+
disabled: e.disabled,
|
|
439
|
+
type: "button",
|
|
440
|
+
variant: "tertiary",
|
|
441
|
+
icon: "delete",
|
|
442
|
+
onClick: (k) => T(l.id, e.modelValue)
|
|
443
|
+
}, null, 8, ["disabled", "onClick"])
|
|
444
|
+
]))
|
|
445
|
+
]),
|
|
446
|
+
n("div", cn, [
|
|
447
|
+
y(o, {
|
|
448
|
+
modelValue: +s(S)(l.amount ?? { amount: 1, precision: 0 }),
|
|
449
|
+
rules: [s(W)(0)]
|
|
450
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
451
|
+
y(o, {
|
|
452
|
+
modelValue: ae(l),
|
|
453
|
+
rules: [
|
|
454
|
+
s(Ie)(),
|
|
455
|
+
s(Ve)(z(l)),
|
|
456
|
+
() => c.value.has(l.id) ? s(r)("inventory.inventoryBindings.invalidWarning") : !0
|
|
457
|
+
]
|
|
458
|
+
}, null, 8, ["modelValue", "rules"])
|
|
459
|
+
])
|
|
460
|
+
]))
|
|
461
|
+
], 64);
|
|
462
|
+
}), 128))
|
|
463
|
+
])
|
|
464
|
+
])
|
|
465
|
+
]);
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
export {
|
|
470
|
+
gn as _,
|
|
471
|
+
$e as a
|
|
472
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as l, resolveComponent as m, createBlock as c, openBlock as d, h as g } from "vue";
|
|
2
2
|
import { useI18n as p } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as u } from "@feedmepos/ui-library";
|
|
4
|
-
import { F as r } from "./app-
|
|
4
|
+
import { F as r } from "./app-OztWApio.js";
|
|
5
5
|
const w = /* @__PURE__ */ l({
|
|
6
6
|
__name: "InventoryBindingSummary",
|
|
7
7
|
props: {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as s, ref as a, onMounted as i, onBeforeUnmount as l, createElementBlock as c, openBlock as p } from "vue";
|
|
2
|
+
import { E as e, b as u, j as f } from "./index-C25C1Dg7.js";
|
|
3
|
+
const w = /* @__PURE__ */ s({
|
|
4
|
+
__name: "JsonViewer",
|
|
5
|
+
props: {
|
|
6
|
+
value: {}
|
|
7
|
+
},
|
|
8
|
+
setup(t) {
|
|
9
|
+
const r = t, n = a(null);
|
|
10
|
+
let o;
|
|
11
|
+
return i(() => {
|
|
12
|
+
o = new e({
|
|
13
|
+
parent: n.value,
|
|
14
|
+
doc: JSON.stringify(r.value, null, 2),
|
|
15
|
+
extensions: [u, f(), e.editable.of(!1), e.lineWrapping]
|
|
16
|
+
});
|
|
17
|
+
}), l(() => o.destroy()), (m, _) => (p(), c("div", {
|
|
18
|
+
ref_key: "container",
|
|
19
|
+
ref: n
|
|
20
|
+
}, null, 512));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
w as _
|
|
25
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineComponent as g, computed as u, ref as k, watch as m, resolveComponent as d, createBlock as N, openBlock as _, withCtx as p, createVNode as A, createElementVNode as C, normalizeClass as D } from "vue";
|
|
2
|
+
import { s as c } from "./app-OztWApio.js";
|
|
3
|
+
import { I as a } from "./rules-D01xYhgI.js";
|
|
4
|
+
const I = ["value", "disabled"], T = /* @__PURE__ */ g({
|
|
5
|
+
__name: "NumberPrecisionInput",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {},
|
|
8
|
+
label: {},
|
|
9
|
+
helperText: {},
|
|
10
|
+
step: {},
|
|
11
|
+
rules: {},
|
|
12
|
+
disabled: { type: Boolean }
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(f, { emit: b }) {
|
|
16
|
+
const o = f, n = b, y = u(() => c.fromNumber(o.step ?? 1).precision), t = k(o.modelValue.toString());
|
|
17
|
+
m(
|
|
18
|
+
() => o.modelValue,
|
|
19
|
+
(e) => {
|
|
20
|
+
t.value = e.toString();
|
|
21
|
+
},
|
|
22
|
+
{ immediate: !0 }
|
|
23
|
+
);
|
|
24
|
+
const i = (e) => e === "-" || e === ".", V = u(() => i(t.value) ? 0 : a()(t.value) === !0 ? +t.value : t.value), v = u(() => [a(), ...o.rules ?? []]);
|
|
25
|
+
m([() => t.value], ([e]) => {
|
|
26
|
+
i(e) ? n("update:modelValue", 0) : a()(e) === !0 && n("update:modelValue", +e);
|
|
27
|
+
});
|
|
28
|
+
const w = (e) => {
|
|
29
|
+
if (e.ctrlKey || e.altKey || e.metaKey || ["Backspace", "Tab", "Enter", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(
|
|
30
|
+
e.key
|
|
31
|
+
))
|
|
32
|
+
return;
|
|
33
|
+
const l = e.currentTarget, r = +`${l.value}${e.key}`;
|
|
34
|
+
if (isFinite(r)) {
|
|
35
|
+
if (a()(`${r}`) !== !0) {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
c.fromNumber(r).precision > y.value && e.preventDefault();
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
l.value.length === 0 && (e.key === "-" || e.key === ".") || e.preventDefault();
|
|
43
|
+
};
|
|
44
|
+
return (e, l) => {
|
|
45
|
+
const r = d("FmField"), s = d("FmFormGroup");
|
|
46
|
+
return _(), N(s, {
|
|
47
|
+
disabled: e.disabled,
|
|
48
|
+
modelValue: V.value,
|
|
49
|
+
rules: v.value,
|
|
50
|
+
"helper-text": e.helperText,
|
|
51
|
+
label: e.label
|
|
52
|
+
}, {
|
|
53
|
+
default: p(({ invalid: F }) => [
|
|
54
|
+
A(r, { invalid: F }, {
|
|
55
|
+
default: p(() => [
|
|
56
|
+
C("input", {
|
|
57
|
+
value: t.value,
|
|
58
|
+
onInput: l[0] || (l[0] = (h) => t.value = h.target.value),
|
|
59
|
+
onKeydown: w,
|
|
60
|
+
inputmode: "numeric",
|
|
61
|
+
class: D({
|
|
62
|
+
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
63
|
+
"text-fm-color-typo-primary": !e.disabled,
|
|
64
|
+
"text-fm-color-typo-disabled": e.disabled
|
|
65
|
+
}),
|
|
66
|
+
disabled: e.disabled
|
|
67
|
+
}, null, 42, I)
|
|
68
|
+
]),
|
|
69
|
+
_: 2
|
|
70
|
+
}, 1032, ["invalid"])
|
|
71
|
+
]),
|
|
72
|
+
_: 1
|
|
73
|
+
}, 8, ["disabled", "modelValue", "rules", "helper-text", "label"]);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
export {
|
|
78
|
+
T as _
|
|
79
|
+
};
|