@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
|
@@ -1,563 +0,0 @@
|
|
|
1
|
-
import { defineComponent as H, ref as ye, computed as w, resolveComponent as E, createElementBlock as u, createCommentVNode as x, openBlock as d, createElementVNode as n, createVNode as p, toDisplayString as c, unref as l, Fragment as G, renderList as T, normalizeStyle as fe, createTextVNode as ve, reactive as Y, withCtx as A, createBlock as S, nextTick as _e } from "vue";
|
|
2
|
-
import { a as J, t as xe, v as be, F as ge } from "./app-Cb5s4jMu.js";
|
|
3
|
-
import { t as he, n as ke, f as Be, a as P, c as Ve } from "./number-y_W4pn_d.js";
|
|
4
|
-
import { u as Ie } from "./use-inventory-binding-dialog-DVIJO8Cl.js";
|
|
5
|
-
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
6
|
-
import { b as q, c as O } from "./rules-CZTBvenw.js";
|
|
7
|
-
import { _ as we, c as Fe, d as Ee } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DOkV11NN.js";
|
|
8
|
-
const N = { amount: 1, precision: 0 };
|
|
9
|
-
function X(_, y) {
|
|
10
|
-
return { amount: _.amount * y.amount, precision: _.precision + y.precision };
|
|
11
|
-
}
|
|
12
|
-
function Ue(_, y) {
|
|
13
|
-
const a = Z(y), m = X(_, a);
|
|
14
|
-
return ke(m.amount / 10 ** m.precision, m.precision);
|
|
15
|
-
}
|
|
16
|
-
function Z(_) {
|
|
17
|
-
if (_.trim().length === 0) return N;
|
|
18
|
-
const y = Number(_);
|
|
19
|
-
return Number.isFinite(y) ? he(y, Be(y)) : N;
|
|
20
|
-
}
|
|
21
|
-
function ee(_, y, a = 0, m = /* @__PURE__ */ new Set(), U = N) {
|
|
22
|
-
if (m.has(_)) return [];
|
|
23
|
-
const k = new Set(m).add(_);
|
|
24
|
-
return y.contentsOf(_).flatMap((b, s) => {
|
|
25
|
-
const r = b.type === "RECIPE", f = X(b.amount ?? N, U), g = {
|
|
26
|
-
key: `${a}-${s}-${b.id}`,
|
|
27
|
-
name: y.bindingName(b),
|
|
28
|
-
amount: f,
|
|
29
|
-
unit: y.bindingUnit(b),
|
|
30
|
-
depth: a,
|
|
31
|
-
isRecipe: r
|
|
32
|
-
};
|
|
33
|
-
return r ? [g, ...ee(b.id, y, a + 1, k, f)] : [g];
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
const Re = {
|
|
37
|
-
key: 0,
|
|
38
|
-
class: "flex flex-col pb-8 fm-typo-en-body-sm-400"
|
|
39
|
-
}, Ce = {
|
|
40
|
-
key: 0,
|
|
41
|
-
class: "flex items-center gap-4 px-12 text-fm-color-typo-secondary"
|
|
42
|
-
}, Ae = {
|
|
43
|
-
key: 1,
|
|
44
|
-
class: "flex flex-col text-fm-color-typo-secondary"
|
|
45
|
-
}, Pe = { class: "flex-1 line-clamp-1" }, Ge = {
|
|
46
|
-
key: 0,
|
|
47
|
-
class: "text-fm-color-typo-disabled"
|
|
48
|
-
}, $e = {
|
|
49
|
-
key: 2,
|
|
50
|
-
class: "flex gap-4 px-12 text-fm-color-system-warning-400"
|
|
51
|
-
}, Se = /* @__PURE__ */ H({
|
|
52
|
-
__name: "RecipeBindingBreakdown",
|
|
53
|
-
props: {
|
|
54
|
-
recipeId: {},
|
|
55
|
-
multiplier: {}
|
|
56
|
-
},
|
|
57
|
-
setup(_) {
|
|
58
|
-
const y = _, { t: a } = Q(), m = J(), U = {
|
|
59
|
-
contentsOf: (r) => {
|
|
60
|
-
var f;
|
|
61
|
-
return ((f = m.recipeById[r]) == null ? void 0 : f.contains) ?? [];
|
|
62
|
-
},
|
|
63
|
-
bindingName: (r) => {
|
|
64
|
-
var f, g, R;
|
|
65
|
-
switch (r.type) {
|
|
66
|
-
case "RECIPE":
|
|
67
|
-
return ((f = m.recipeById[r.id]) == null ? void 0 : f.name) ?? r.id;
|
|
68
|
-
case "SKU_GROUP":
|
|
69
|
-
return ((g = m.skuGroupById[r.id]) == null ? void 0 : g.name) ?? r.id;
|
|
70
|
-
default:
|
|
71
|
-
return ((R = m.skuById[r.id]) == null ? void 0 : R.name) ?? r.id;
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
// a binding measurement overrides the ingredient's base unit, same as deduction reads it
|
|
75
|
-
bindingUnit: (r) => {
|
|
76
|
-
var f, g;
|
|
77
|
-
return r.type === "RECIPE" ? "" : ((f = r.measurement) == null ? void 0 : f.abbrev) ?? ((g = m.skuById[r.id]) == null ? void 0 : g.unit.abbrev) ?? "";
|
|
78
|
-
}
|
|
79
|
-
}, k = ye(!1), b = w(() => ee(y.recipeId, U)), s = w(() => Z(y.multiplier).precision > 0);
|
|
80
|
-
return (r, f) => {
|
|
81
|
-
const g = E("FmButton"), R = E("FmIcon");
|
|
82
|
-
return b.value.length || s.value ? (d(), u("div", Re, [
|
|
83
|
-
b.value.length ? (d(), u("div", Ce, [
|
|
84
|
-
n("span", null, c(l(a)("inventory.inventoryBindings.itemsLinked", { count: b.value.length }, b.value.length)), 1),
|
|
85
|
-
p(g, {
|
|
86
|
-
type: "button",
|
|
87
|
-
variant: "plain",
|
|
88
|
-
icon: k.value ? "expand_less" : "expand_more",
|
|
89
|
-
onClick: f[0] || (f[0] = (F) => k.value = !k.value)
|
|
90
|
-
}, null, 8, ["icon"])
|
|
91
|
-
])) : x("", !0),
|
|
92
|
-
k.value ? (d(), u("div", Ae, [
|
|
93
|
-
(d(!0), u(G, null, T(b.value, (F) => (d(), u("div", {
|
|
94
|
-
key: F.key,
|
|
95
|
-
class: "flex gap-8 py-4 px-12",
|
|
96
|
-
style: fe({ paddingLeft: `${12 + F.depth * 16}px` })
|
|
97
|
-
}, [
|
|
98
|
-
n("span", Pe, [
|
|
99
|
-
ve(c(F.name) + " ", 1),
|
|
100
|
-
F.isRecipe ? (d(), u("span", Ge, " (" + c(l(a)("inventory.inventoryBindings.recipe")) + ") ", 1)) : x("", !0)
|
|
101
|
-
]),
|
|
102
|
-
n("span", null, c(l(Ue)(F.amount, r.multiplier)) + " " + c(F.unit), 1)
|
|
103
|
-
], 4))), 128))
|
|
104
|
-
])) : x("", !0),
|
|
105
|
-
s.value ? (d(), u("div", $e, [
|
|
106
|
-
p(R, {
|
|
107
|
-
name: "warning",
|
|
108
|
-
color: "system-warning-300",
|
|
109
|
-
size: "sm"
|
|
110
|
-
}),
|
|
111
|
-
n("div", null, c(l(a)("inventory.inventoryBindings.precisionWarning")), 1)
|
|
112
|
-
])) : x("", !0)
|
|
113
|
-
])) : x("", !0);
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
}), Te = { class: "flex flex-col gap-24" }, Ne = { class: "flex flex-col gap-16" }, Me = { class: "flex items-center" }, De = { class: "flex-1 fm-typo-en-title-sm-600" }, ze = { class: "flex flex-col" }, Oe = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Ke = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Le = {
|
|
117
|
-
class: "flex items-center",
|
|
118
|
-
style: { "min-height": "48px" }
|
|
119
|
-
}, je = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, We = { class: "line-clamp-1" }, Ye = { class: "w-[200px]" }, qe = {
|
|
120
|
-
key: 0,
|
|
121
|
-
class: "w-[52px]"
|
|
122
|
-
}, He = {
|
|
123
|
-
key: 0,
|
|
124
|
-
class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400 px-8"
|
|
125
|
-
}, Je = {
|
|
126
|
-
key: 0,
|
|
127
|
-
class: "flex flex-col gap-16"
|
|
128
|
-
}, Qe = { class: "flex items-center" }, Xe = { class: "flex-1 fm-typo-en-title-sm-600" }, Ze = { class: "flex flex-col" }, en = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, nn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, on = { class: "flex flex-col w-full border-b border-fm-color-neutral-gray-100" }, tn = {
|
|
129
|
-
key: 0,
|
|
130
|
-
class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400"
|
|
131
|
-
}, ln = {
|
|
132
|
-
class: "flex items-center",
|
|
133
|
-
style: { "min-height": "48px" }
|
|
134
|
-
}, sn = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, rn = { class: "flex flex-col" }, dn = { class: "w-[200px]" }, an = {
|
|
135
|
-
key: 0,
|
|
136
|
-
class: "w-[52px]"
|
|
137
|
-
}, un = { class: "flex flex-col gap-16" }, cn = { class: "flex items-center" }, mn = { class: "flex-1 fm-typo-en-title-sm-600" }, pn = { class: "flex flex-col" }, yn = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, fn = { class: "flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, vn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[150px] px-16" }, _n = {
|
|
138
|
-
key: 0,
|
|
139
|
-
class: "flex flex-col border-b border-fm-color-neutral-gray-100"
|
|
140
|
-
}, xn = {
|
|
141
|
-
class: "flex items-center w-full",
|
|
142
|
-
style: { "min-height": "48px" }
|
|
143
|
-
}, bn = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12 text-fm-color-typo-secondary line-clamp-1" }, gn = {
|
|
144
|
-
key: 0,
|
|
145
|
-
class: "w-[52px]"
|
|
146
|
-
}, hn = { class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400 px-12 pb-4" }, kn = {
|
|
147
|
-
key: 1,
|
|
148
|
-
class: "flex flex-col border-b border-fm-color-neutral-gray-100"
|
|
149
|
-
}, Bn = {
|
|
150
|
-
class: "flex items-center w-full",
|
|
151
|
-
style: { "min-height": "48px" }
|
|
152
|
-
}, Vn = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, In = { class: "line-clamp-1 w-full" }, wn = { class: "w-[150px]" }, Fn = {
|
|
153
|
-
key: 0,
|
|
154
|
-
class: "w-[52px]"
|
|
155
|
-
}, En = { class: "flex flex-col px-12 pb-4" }, Sn = /* @__PURE__ */ H({
|
|
156
|
-
__name: "InventoryBindingForm",
|
|
157
|
-
props: {
|
|
158
|
-
id: {},
|
|
159
|
-
modelValue: { default: () => [] },
|
|
160
|
-
excludeBindingId: {},
|
|
161
|
-
rules: { default: () => [] },
|
|
162
|
-
iframeMode: { type: Boolean },
|
|
163
|
-
disabled: { type: Boolean },
|
|
164
|
-
readonly: { type: Boolean },
|
|
165
|
-
enableIngredientGroup: { type: Boolean },
|
|
166
|
-
allowRecipeDecimal: { type: Boolean }
|
|
167
|
-
},
|
|
168
|
-
emits: ["update:modelValue", "click:pick-inventory-bindings"],
|
|
169
|
-
setup(_, { emit: y }) {
|
|
170
|
-
const { t: a } = Q(), m = J(), U = w(() => m.recipeById), k = w(() => m.skuById), b = w(() => m.skuGroupById), s = _, r = y, f = w(() => xe({
|
|
171
|
-
parentId: s.id,
|
|
172
|
-
bindings: s.modelValue,
|
|
173
|
-
recipes: m.recipes.map((i) => i._id === s.id ? {
|
|
174
|
-
...i,
|
|
175
|
-
contains: s.modelValue
|
|
176
|
-
} : i),
|
|
177
|
-
skus: m.skus.map((i) => i._id === s.id ? {
|
|
178
|
-
...i,
|
|
179
|
-
convert: {
|
|
180
|
-
inventoryBindings: s.modelValue
|
|
181
|
-
}
|
|
182
|
-
} : i),
|
|
183
|
-
skuGroups: m.skuGroups
|
|
184
|
-
}).inventoryBindings.filter((i) => "error" in i && i.error).map((i) => i).filter((i) => i.reason === be.enum.circularDependency)), g = w(
|
|
185
|
-
() => new Set(f.value.map((e) => {
|
|
186
|
-
var t;
|
|
187
|
-
return (t = e.bindingPaths[0]) == null ? void 0 : t.id;
|
|
188
|
-
}))
|
|
189
|
-
), R = w(() => s.modelValue.filter((e) => e.type === "RECIPE")), F = { amount: 1, precision: 0 }, M = Y({});
|
|
190
|
-
function D(e) {
|
|
191
|
-
return M[e.id] ?? P(e.amount ?? F);
|
|
192
|
-
}
|
|
193
|
-
function ne(e, t) {
|
|
194
|
-
M[e.id] = t, L(e.id, t, s.modelValue);
|
|
195
|
-
}
|
|
196
|
-
const { promptIngredientsBinding: oe, promptRecipesBinding: te, promptIngredientGroupsBinding: ie } = Ie();
|
|
197
|
-
async function le() {
|
|
198
|
-
if (s.iframeMode) {
|
|
199
|
-
r("click:pick-inventory-bindings", "RECIPE");
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
te(
|
|
203
|
-
s.modelValue,
|
|
204
|
-
(e) => r("update:modelValue", e),
|
|
205
|
-
s.id ? [s.id] : []
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
const se = w(() => s.modelValue.filter((e) => e.type === "SKU_GROUP"));
|
|
209
|
-
async function re() {
|
|
210
|
-
ie(
|
|
211
|
-
s.modelValue,
|
|
212
|
-
(e) => r("update:modelValue", e),
|
|
213
|
-
s.id ? [s.id] : []
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
const K = w(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
|
|
217
|
-
async function de() {
|
|
218
|
-
if (s.iframeMode) {
|
|
219
|
-
r("click:pick-inventory-bindings", "SKU");
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
oe(
|
|
223
|
-
s.modelValue,
|
|
224
|
-
(e) => r("update:modelValue", e),
|
|
225
|
-
s.excludeBindingId,
|
|
226
|
-
s.id ? [s.id] : []
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
function L(e, t, i) {
|
|
230
|
-
const v = +t;
|
|
231
|
-
let I = i;
|
|
232
|
-
t.length > 0 && isFinite(v) ? I = i.map((B) => (B.id !== e || (B.amount = Ve(v)), B)) : I = i.map((B) => (B.id !== e || (B.amount = { amount: 0, precision: 0 }), B)), r("update:modelValue", I);
|
|
233
|
-
}
|
|
234
|
-
function $(e, t) {
|
|
235
|
-
delete M[e];
|
|
236
|
-
const i = t.filter((v) => v.id !== e);
|
|
237
|
-
r("update:modelValue", i);
|
|
238
|
-
}
|
|
239
|
-
function j(e) {
|
|
240
|
-
var i, v;
|
|
241
|
-
if (e.type !== ge.enum.SKU)
|
|
242
|
-
throw new Error("Non-SKU binding does not have unit");
|
|
243
|
-
if (!((i = k.value[e.id]) == null ? void 0 : i.unit))
|
|
244
|
-
throw new Error(`Cannot find ingredient: ${e.id}`);
|
|
245
|
-
return (v = k.value[e.id]) == null ? void 0 : v.unit;
|
|
246
|
-
}
|
|
247
|
-
function ae(e) {
|
|
248
|
-
return !k.value[e.id];
|
|
249
|
-
}
|
|
250
|
-
function ue(e) {
|
|
251
|
-
return { amount: e.amount, measurement: e.measurement };
|
|
252
|
-
}
|
|
253
|
-
function ce(e, t, i) {
|
|
254
|
-
const v = i.map((I) => I.id !== e ? I : {
|
|
255
|
-
...I,
|
|
256
|
-
amount: t.amount,
|
|
257
|
-
measurement: t.measurement
|
|
258
|
-
});
|
|
259
|
-
r("update:modelValue", v);
|
|
260
|
-
}
|
|
261
|
-
const W = Y({});
|
|
262
|
-
function me(e) {
|
|
263
|
-
return W[e.id] ?? {
|
|
264
|
-
modelValue: {
|
|
265
|
-
amount: e.amount,
|
|
266
|
-
measurement: e.measurement
|
|
267
|
-
},
|
|
268
|
-
amountAsString: P(e.amount)
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
function pe(e, t) {
|
|
272
|
-
_e(() => {
|
|
273
|
-
W[e.id] = {
|
|
274
|
-
modelValue: {
|
|
275
|
-
amount: e.amount,
|
|
276
|
-
measurement: e.measurement
|
|
277
|
-
},
|
|
278
|
-
amountAsString: t
|
|
279
|
-
};
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
return (e, t) => {
|
|
283
|
-
const i = E("FmFormGroup"), v = E("FmButton"), I = E("FmTooltip"), B = E("FmTextField"), z = E("FmIcon");
|
|
284
|
-
return d(), u("div", Te, [
|
|
285
|
-
p(i, {
|
|
286
|
-
disabled: e.disabled,
|
|
287
|
-
"model-value": e.modelValue,
|
|
288
|
-
rules: [
|
|
289
|
-
...e.rules,
|
|
290
|
-
() => f.value.length ? "There is a binding error in your configuration" : !0
|
|
291
|
-
]
|
|
292
|
-
}, {
|
|
293
|
-
label: A(() => t[0] || (t[0] = [
|
|
294
|
-
n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Define the inventory bindings for this recipe or ingredient. ", -1)
|
|
295
|
-
])),
|
|
296
|
-
_: 1
|
|
297
|
-
}, 8, ["disabled", "model-value", "rules"]),
|
|
298
|
-
n("div", Ne, [
|
|
299
|
-
n("div", Me, [
|
|
300
|
-
n("div", De, c(l(a)("inventory.inventoryBindings.recipe")), 1),
|
|
301
|
-
e.readonly ? x("", !0) : (d(), S(v, {
|
|
302
|
-
key: 0,
|
|
303
|
-
variant: "secondary",
|
|
304
|
-
"text-color": "primary",
|
|
305
|
-
"border-color": "primary",
|
|
306
|
-
label: l(a)("inventory.inventoryBindings.linkRecipe"),
|
|
307
|
-
"prepend-icon": "link",
|
|
308
|
-
onClick: le
|
|
309
|
-
}, null, 8, ["label"]))
|
|
310
|
-
]),
|
|
311
|
-
n("div", ze, [
|
|
312
|
-
n("div", Oe, [
|
|
313
|
-
n("div", Ke, c(l(a)("inventory.inventoryBindings.recipe")), 1),
|
|
314
|
-
t[1] || (t[1] = n("div", { class: "w-[200px]" }, null, -1)),
|
|
315
|
-
t[2] || (t[2] = n("div", { class: "w-[52px]" }, null, -1))
|
|
316
|
-
]),
|
|
317
|
-
(d(!0), u(G, null, T(R.value, (o) => {
|
|
318
|
-
var C;
|
|
319
|
-
return d(), u("div", {
|
|
320
|
-
key: o.id,
|
|
321
|
-
class: "flex flex-col w-full border-b border-fm-color-neutral-gray-100"
|
|
322
|
-
}, [
|
|
323
|
-
n("div", Le, [
|
|
324
|
-
n("div", je, [
|
|
325
|
-
p(I, {
|
|
326
|
-
zIndex: 51,
|
|
327
|
-
variant: "plain",
|
|
328
|
-
placement: "top",
|
|
329
|
-
content: (C = U.value[o.id]) == null ? void 0 : C.name
|
|
330
|
-
}, {
|
|
331
|
-
default: A(() => {
|
|
332
|
-
var V;
|
|
333
|
-
return [
|
|
334
|
-
n("span", We, c((V = U.value[o.id]) == null ? void 0 : V.name), 1)
|
|
335
|
-
];
|
|
336
|
-
}),
|
|
337
|
-
_: 2
|
|
338
|
-
}, 1032, ["content"])
|
|
339
|
-
]),
|
|
340
|
-
n("div", Ye, [
|
|
341
|
-
p(i, {
|
|
342
|
-
disabled: e.disabled,
|
|
343
|
-
modelValue: +D(o),
|
|
344
|
-
rules: [l(q)(e.allowRecipeDecimal ? 5 : 0), l(O)(-1)]
|
|
345
|
-
}, {
|
|
346
|
-
default: A(({ invalid: V }) => [
|
|
347
|
-
p(B, {
|
|
348
|
-
class: "w-full",
|
|
349
|
-
disabled: e.disabled,
|
|
350
|
-
modelValue: D(o),
|
|
351
|
-
"onUpdate:modelValue": (h) => ne(o, h),
|
|
352
|
-
invalid: V
|
|
353
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
354
|
-
]),
|
|
355
|
-
_: 2
|
|
356
|
-
}, 1032, ["disabled", "modelValue", "rules"])
|
|
357
|
-
]),
|
|
358
|
-
e.readonly ? x("", !0) : (d(), u("div", qe, [
|
|
359
|
-
p(v, {
|
|
360
|
-
disabled: e.disabled,
|
|
361
|
-
type: "button",
|
|
362
|
-
variant: "plain",
|
|
363
|
-
icon: "delete",
|
|
364
|
-
"icon-color": "#000000",
|
|
365
|
-
onClick: (V) => $(o.id, e.modelValue)
|
|
366
|
-
}, null, 8, ["disabled", "onClick"])
|
|
367
|
-
]))
|
|
368
|
-
]),
|
|
369
|
-
p(Se, {
|
|
370
|
-
"recipe-id": o.id,
|
|
371
|
-
multiplier: D(o)
|
|
372
|
-
}, null, 8, ["recipe-id", "multiplier"]),
|
|
373
|
-
g.value.has(o.id) ? (d(), u("div", He, [
|
|
374
|
-
p(z, {
|
|
375
|
-
name: "error",
|
|
376
|
-
color: "system-error-300",
|
|
377
|
-
size: "sm"
|
|
378
|
-
}),
|
|
379
|
-
n("div", null, c(l(a)("inventory.inventoryBindings.circularError")), 1)
|
|
380
|
-
])) : x("", !0)
|
|
381
|
-
]);
|
|
382
|
-
}), 128))
|
|
383
|
-
])
|
|
384
|
-
]),
|
|
385
|
-
e.enableIngredientGroup ? (d(), u("div", Je, [
|
|
386
|
-
n("div", Qe, [
|
|
387
|
-
n("div", Xe, c(l(a)("inventory.inventoryBindings.ingredientGroup")), 1),
|
|
388
|
-
e.readonly ? x("", !0) : (d(), S(v, {
|
|
389
|
-
key: 0,
|
|
390
|
-
variant: "secondary",
|
|
391
|
-
"text-color": "primary",
|
|
392
|
-
"border-color": "primary",
|
|
393
|
-
label: l(a)("inventory.inventoryBindings.linkIngredientGroup"),
|
|
394
|
-
"prepend-icon": "link",
|
|
395
|
-
onClick: re
|
|
396
|
-
}, null, 8, ["label"]))
|
|
397
|
-
]),
|
|
398
|
-
n("div", Ze, [
|
|
399
|
-
n("div", en, [
|
|
400
|
-
n("div", nn, c(l(a)("inventory.inventoryBindings.ingredientGroup")), 1),
|
|
401
|
-
t[3] || (t[3] = n("div", { class: "w-[200px]" }, null, -1)),
|
|
402
|
-
t[4] || (t[4] = n("div", { class: "w-[52px]" }, null, -1))
|
|
403
|
-
]),
|
|
404
|
-
(d(!0), u(G, null, T(se.value, (o) => (d(), S(i, {
|
|
405
|
-
key: o.id,
|
|
406
|
-
disabled: e.disabled,
|
|
407
|
-
modelValue: +l(P)(o.amount ?? { amount: 1, precision: 0 }),
|
|
408
|
-
rules: [l(q)(0), l(O)(0)]
|
|
409
|
-
}, {
|
|
410
|
-
default: A(({ invalid: C }) => {
|
|
411
|
-
var V;
|
|
412
|
-
return [
|
|
413
|
-
n("div", on, [
|
|
414
|
-
g.value.has(o.id) ? (d(), u("div", tn, [
|
|
415
|
-
p(z, {
|
|
416
|
-
name: "error",
|
|
417
|
-
color: "system-error-300",
|
|
418
|
-
size: "sm"
|
|
419
|
-
}),
|
|
420
|
-
n("div", null, c(l(a)("inventory.inventoryBindings.circularError")), 1)
|
|
421
|
-
])) : x("", !0),
|
|
422
|
-
n("div", ln, [
|
|
423
|
-
n("div", sn, [
|
|
424
|
-
n("div", rn, c((V = b.value[o.id]) == null ? void 0 : V.name), 1)
|
|
425
|
-
]),
|
|
426
|
-
n("div", dn, [
|
|
427
|
-
p(B, {
|
|
428
|
-
class: "w-full",
|
|
429
|
-
disabled: e.disabled,
|
|
430
|
-
modelValue: +l(P)(o.amount ?? { amount: 1, precision: 0 }),
|
|
431
|
-
"onUpdate:modelValue": (h) => L(o.id, h, e.modelValue),
|
|
432
|
-
invalid: C
|
|
433
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
434
|
-
]),
|
|
435
|
-
e.readonly ? x("", !0) : (d(), u("div", an, [
|
|
436
|
-
p(v, {
|
|
437
|
-
disabled: e.disabled,
|
|
438
|
-
type: "button",
|
|
439
|
-
variant: "plain",
|
|
440
|
-
icon: "delete",
|
|
441
|
-
"icon-color": "#000000",
|
|
442
|
-
onClick: (h) => $(o.id, e.modelValue)
|
|
443
|
-
}, null, 8, ["disabled", "onClick"])
|
|
444
|
-
]))
|
|
445
|
-
])
|
|
446
|
-
])
|
|
447
|
-
];
|
|
448
|
-
}),
|
|
449
|
-
_: 2
|
|
450
|
-
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
451
|
-
])
|
|
452
|
-
])) : x("", !0),
|
|
453
|
-
n("div", un, [
|
|
454
|
-
n("div", cn, [
|
|
455
|
-
n("div", mn, c(l(a)("inventory.inventoryBindings.ingredient")), 1),
|
|
456
|
-
e.readonly ? x("", !0) : (d(), S(v, {
|
|
457
|
-
key: 0,
|
|
458
|
-
variant: "secondary",
|
|
459
|
-
"text-color": "primary",
|
|
460
|
-
"border-color": "primary",
|
|
461
|
-
label: l(a)("inventory.inventoryBindings.linkIngredient"),
|
|
462
|
-
"prepend-icon": "link",
|
|
463
|
-
onClick: de
|
|
464
|
-
}, null, 8, ["label"]))
|
|
465
|
-
]),
|
|
466
|
-
n("div", pn, [
|
|
467
|
-
n("div", yn, [
|
|
468
|
-
n("div", fn, c(l(a)("inventory.inventoryBindings.ingredient")), 1),
|
|
469
|
-
n("div", vn, c(l(a)("inventory.inventoryBindings.amount")), 1),
|
|
470
|
-
t[5] || (t[5] = n("div", { class: "w-[52px]" }, null, -1))
|
|
471
|
-
]),
|
|
472
|
-
(d(!0), u(G, null, T(K.value, (o, C) => {
|
|
473
|
-
var V;
|
|
474
|
-
return d(), u(G, {
|
|
475
|
-
key: o.id
|
|
476
|
-
}, [
|
|
477
|
-
ae(o) ? (d(), u("div", _n, [
|
|
478
|
-
n("div", xn, [
|
|
479
|
-
n("div", bn, c(o.id), 1),
|
|
480
|
-
e.readonly ? x("", !0) : (d(), u("div", gn, [
|
|
481
|
-
p(v, {
|
|
482
|
-
disabled: e.disabled,
|
|
483
|
-
type: "button",
|
|
484
|
-
variant: "tertiary",
|
|
485
|
-
icon: "delete",
|
|
486
|
-
onClick: (h) => $(o.id, e.modelValue)
|
|
487
|
-
}, null, 8, ["disabled", "onClick"])
|
|
488
|
-
]))
|
|
489
|
-
]),
|
|
490
|
-
n("div", hn, [
|
|
491
|
-
p(z, {
|
|
492
|
-
name: "error",
|
|
493
|
-
color: "system-error-300",
|
|
494
|
-
size: "sm"
|
|
495
|
-
}),
|
|
496
|
-
n("div", null, c(l(a)("inventory.inventoryBindings.missingIngredient")), 1)
|
|
497
|
-
])
|
|
498
|
-
])) : (d(), u("div", kn, [
|
|
499
|
-
n("div", Bn, [
|
|
500
|
-
n("div", Vn, [
|
|
501
|
-
p(I, {
|
|
502
|
-
zIndex: 51,
|
|
503
|
-
variant: "plain",
|
|
504
|
-
placement: "top",
|
|
505
|
-
content: (V = k.value[o.id]) == null ? void 0 : V.name
|
|
506
|
-
}, {
|
|
507
|
-
default: A(() => {
|
|
508
|
-
var h;
|
|
509
|
-
return [
|
|
510
|
-
n("span", In, c((h = k.value[o.id]) == null ? void 0 : h.name), 1)
|
|
511
|
-
];
|
|
512
|
-
}),
|
|
513
|
-
_: 2
|
|
514
|
-
}, 1032, ["content"])
|
|
515
|
-
]),
|
|
516
|
-
n("div", wn, [
|
|
517
|
-
p(we, {
|
|
518
|
-
"model-value": ue(o),
|
|
519
|
-
"onUpdate:modelValue": (h) => h && ce(o.id, h, e.modelValue),
|
|
520
|
-
"onUpdate:amount": (h) => pe(o, h),
|
|
521
|
-
unit: j(o),
|
|
522
|
-
placement: C === K.value.length - 1 ? "top" : "bottom",
|
|
523
|
-
"convert-amount-on-change-unit": "",
|
|
524
|
-
disabled: e.readonly
|
|
525
|
-
}, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement", "disabled"])
|
|
526
|
-
]),
|
|
527
|
-
e.readonly ? x("", !0) : (d(), u("div", Fn, [
|
|
528
|
-
p(v, {
|
|
529
|
-
disabled: e.disabled,
|
|
530
|
-
type: "button",
|
|
531
|
-
variant: "tertiary",
|
|
532
|
-
icon: "delete",
|
|
533
|
-
onClick: (h) => $(o.id, e.modelValue)
|
|
534
|
-
}, null, 8, ["disabled", "onClick"])
|
|
535
|
-
]))
|
|
536
|
-
]),
|
|
537
|
-
n("div", En, [
|
|
538
|
-
p(i, {
|
|
539
|
-
modelValue: +l(P)(o.amount ?? { amount: 1, precision: 0 }),
|
|
540
|
-
rules: [l(O)(0)]
|
|
541
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
542
|
-
p(i, {
|
|
543
|
-
modelValue: me(o),
|
|
544
|
-
rules: [
|
|
545
|
-
l(Fe)(),
|
|
546
|
-
l(Ee)(j(o)),
|
|
547
|
-
() => g.value.has(o.id) ? l(a)("inventory.inventoryBindings.invalidWarning") : !0
|
|
548
|
-
]
|
|
549
|
-
}, null, 8, ["modelValue", "rules"])
|
|
550
|
-
])
|
|
551
|
-
]))
|
|
552
|
-
], 64);
|
|
553
|
-
}), 128))
|
|
554
|
-
])
|
|
555
|
-
])
|
|
556
|
-
]);
|
|
557
|
-
};
|
|
558
|
-
}
|
|
559
|
-
});
|
|
560
|
-
export {
|
|
561
|
-
Sn as _,
|
|
562
|
-
Se as a
|
|
563
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { defineComponent as V, computed as w, ref as h, watch as u, resolveComponent as i, createBlock as F, openBlock as g, withCtx as d, createVNode as A, createElementVNode as k, normalizeClass as K } from "vue";
|
|
2
|
-
import { c as s } from "./number-y_W4pn_d.js";
|
|
3
|
-
const _ = ["value", "disabled"], C = /* @__PURE__ */ V({
|
|
4
|
-
__name: "NumberPrecisionInput",
|
|
5
|
-
props: {
|
|
6
|
-
modelValue: {},
|
|
7
|
-
label: {},
|
|
8
|
-
helperText: {},
|
|
9
|
-
step: {},
|
|
10
|
-
rules: {},
|
|
11
|
-
disabled: { type: Boolean }
|
|
12
|
-
},
|
|
13
|
-
emits: ["update:modelValue"],
|
|
14
|
-
setup(m, { emit: p }) {
|
|
15
|
-
const r = m, n = p, c = w(() => s(r.step ?? 1).precision), l = h(r.modelValue.toString());
|
|
16
|
-
u(
|
|
17
|
-
() => r.modelValue,
|
|
18
|
-
(e) => {
|
|
19
|
-
l.value = e.toString();
|
|
20
|
-
},
|
|
21
|
-
{ immediate: !0 }
|
|
22
|
-
), u([() => l.value], ([e]) => {
|
|
23
|
-
e === "-" || e === "." ? n("update:modelValue", 0) : n("update:modelValue", +e);
|
|
24
|
-
});
|
|
25
|
-
const f = (e) => {
|
|
26
|
-
if (e.ctrlKey || e.altKey || e.metaKey || ["Backspace", "Tab", "Enter", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(
|
|
27
|
-
e.key
|
|
28
|
-
))
|
|
29
|
-
return;
|
|
30
|
-
const t = e.currentTarget, o = +`${t.value}${e.key}`;
|
|
31
|
-
if (isFinite(o)) {
|
|
32
|
-
s(o).precision > c.value && e.preventDefault();
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
t.value.length === 0 && (e.key === "-" || e.key === ".") || e.preventDefault();
|
|
36
|
-
};
|
|
37
|
-
return (e, t) => {
|
|
38
|
-
const o = i("FmField"), a = i("FmFormGroup");
|
|
39
|
-
return g(), F(a, {
|
|
40
|
-
disabled: e.disabled,
|
|
41
|
-
modelValue: e.modelValue,
|
|
42
|
-
rules: e.rules,
|
|
43
|
-
"helper-text": e.helperText,
|
|
44
|
-
label: e.label
|
|
45
|
-
}, {
|
|
46
|
-
default: d(({ invalid: b }) => [
|
|
47
|
-
A(o, { invalid: b }, {
|
|
48
|
-
default: d(() => [
|
|
49
|
-
k("input", {
|
|
50
|
-
value: l.value,
|
|
51
|
-
onInput: t[0] || (t[0] = (y) => l.value = y.target.value),
|
|
52
|
-
onKeydown: f,
|
|
53
|
-
inputmode: "numeric",
|
|
54
|
-
class: K({
|
|
55
|
-
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
56
|
-
"text-fm-color-typo-primary": !e.disabled,
|
|
57
|
-
"text-fm-color-typo-disabled": e.disabled
|
|
58
|
-
}),
|
|
59
|
-
disabled: e.disabled
|
|
60
|
-
}, null, 42, _)
|
|
61
|
-
]),
|
|
62
|
-
_: 2
|
|
63
|
-
}, 1032, ["invalid"])
|
|
64
|
-
]),
|
|
65
|
-
_: 1
|
|
66
|
-
}, 8, ["disabled", "modelValue", "rules", "helper-text", "label"]);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
export {
|
|
71
|
-
C as _
|
|
72
|
-
};
|