@feedmepos/mf-inventory-portal 1.7.11 → 1.7.12-dev.2
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-DE5q8pJt.js +1434 -0
- package/dist/{ApprovalView-Dn0-OeH0.js → ApprovalView-tn3kgVnm.js} +9 -9
- package/dist/{BindingsDialog-BVVu8xWS.js → BindingsDialog-BcpMSsbG.js} +2 -2
- package/dist/{BindingsPicker-krMKURKj.js → BindingsPicker-D-XtjmkW.js} +2 -2
- package/dist/{BindingsTable-CLiGmTHB.js → BindingsTable-CpQ6DVv6.js} +4 -4
- package/dist/BulkReceiveRequestView-BOUrL6ir.js +2657 -0
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BYtJnIsF.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Bu9YI9f7.js} +1 -1
- package/dist/{ClosingDraftView-fUMDbnI6.js → ClosingDraftView-BQkusa3K.js} +19 -19
- package/dist/{ClosingHistoryView-Cfvkxwlh.js → ClosingHistoryView-DNmUcfKW.js} +5 -5
- package/dist/{ClosingTemplateView-DtIeSknz.js → ClosingTemplateView-BGMMQIlm.js} +16 -16
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-Bz7CjD7v.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BlrhLlmx.js} +1 -1
- package/dist/{DefaultView-BbN62d8p.js → DefaultView-DbW7mva7.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-91UH3oJ8.js → DeliveryOrderPrintPreview-C6gqP8ro.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DDunnzgw.js → EmailDialog.vue_vue_type_script_setup_true_lang-XU50lg6w.js} +2259 -2254
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CKlpaNGP.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-D-3eipuP.js} +6 -6
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DOqGzn08.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CfmhYGml.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CxdQsFqQ.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DyEY4i7p.js} +2 -2
- package/dist/{FmMultiselectDialog-Dg70WmLs.js → FmMultiselectDialog-DCzjYd3G.js} +2 -2
- package/dist/{FmMultiselectDialog-BEVkUX96.js → FmMultiselectDialog-zWGXAdy0.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-RQ44PYLb.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Ple3fGYg.js} +6 -6
- package/dist/{ImportView-C0hAMz8m.js → ImportView-pEnmvGQZ.js} +499 -496
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-C6SNYEJl.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-zneEDRRK.js} +1 -1
- package/dist/{IngredientGroupView-CRGyWM_X.js → IngredientGroupView-C4LKT2no.js} +5 -5
- package/dist/{IngredientsView-C7CVkoou.js → IngredientsView-BuAz_kTx.js} +18 -17
- package/dist/{IntegrationExplorerView-2nvAOHbA.js → IntegrationExplorerView-C2BSURrj.js} +4 -4
- package/dist/{IntegrationView-CYSaTE2T.js → IntegrationView-D_mBNCCe.js} +14 -14
- package/dist/{InventoryBindingForm-CezLMw2l.js → InventoryBindingForm-bZo-006V.js} +1 -1
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-DJg4Yogw.js +563 -0
- package/dist/{InventoryBindingSummary-QOztXyC8.js → InventoryBindingSummary-BB9KGZ2m.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BT0zK5o_.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DXUTZvuO.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-_w5kZ9SM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BaBJdjs1.js} +1 -1
- package/dist/{ProductionView-BveNOlcK.js → ProductionView-Dl-Cyg38.js} +7 -7
- package/dist/{PublishView-bmecemJd.js → PublishView-C3X5HiH6.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-CDvO6BLm.js → PurchaseOrderPrintPreview-CSrsukQD.js} +2 -2
- package/dist/{ReceiveRequestView-CwVQ-KzO.js → ReceiveRequestView-DHfHO1hN.js} +14 -14
- package/dist/RecipeView-CDWEAe2t.js +3625 -0
- package/dist/{SettingsView-DJcAum3t.js → SettingsView-BLIWAA-o.js} +4 -4
- package/dist/{StockView-GDvWxpOJ.js → StockView-C0v3io9V.js} +21 -21
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DcCO7HHD.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DlECppRw.js} +1 -1
- package/dist/{SupplierView-C3S8tTyF.js → SupplierView-J61tPOTo.js} +12 -12
- package/dist/{SurchargeView-skaVlUu3.js → SurchargeView-BACvlFV2.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-BrBgjPjN.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DJ08rDXE.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BcvXD9Kt.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CSLs6e0k.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BO6vRibE.js → TransferDetails.vue_vue_type_script_setup_true_lang-C_cRs9Cy.js} +1639 -1575
- package/dist/{TransferTemplateView-j6GNvA2S.js → TransferTemplateView-CEAAZaYQ.js} +20 -20
- package/dist/{UnitCostHistoryView-0H_0-DbA.js → UnitCostHistoryView-rmgLm5vt.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DJa1AaL2.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-o1eSDUbx.js} +4 -4
- package/dist/{UnitView-CSD1Gnsb.js → UnitView-C0xIGsAy.js} +8 -8
- package/dist/WarehouseView-RPXyVYIR.js +1082 -0
- package/dist/{WastageTemplateView-kvuJXBiI.js → WastageTemplateView-DrEDl-Cn.js} +14 -14
- package/dist/api/changelog.d.ts +132 -0
- package/dist/api/purchase-order.d.ts +2 -0
- package/dist/{app-Bon7qTu5.js → app-DxdWfyxo.js} +10046 -9137
- package/dist/app.d.ts +906 -15
- package/dist/app.js +1 -1
- package/dist/{closing-template-BjekEF5s.js → closing-template-DLkEPmhO.js} +1 -1
- package/dist/{date2-BXEHP1It.js → date2-_HV-UUr-.js} +5 -5
- package/dist/{dayjs.min-iFbgqyzU.js → dayjs.min-B4ZBHgnH.js} +1 -1
- package/dist/{decimal-BIi1j8fj.js → decimal-BP9r-3Fd.js} +2 -2
- package/dist/{defineDeepModel-IMW3a6OW.js → defineDeepModel-512Elkp4.js} +1 -1
- package/dist/{duplicate-template-DFciXweZ.js → duplicate-template-B5Wg73Th.js} +1 -1
- package/dist/{feature-CNI4MMSc.js → feature-CqyeXw0w.js} +2 -2
- package/dist/{format-time-from-id-DDH3ceGb.js → format-time-from-id-CBkBQaBx.js} +1 -1
- package/dist/{format-unit-display-Dp383g0F.js → format-unit-display-DNWWwkbf.js} +27 -27
- package/dist/{import-export.helper-BPK_S1mX.js → import-export.helper-BSz6k4kC.js} +6 -6
- package/dist/{index-BeP05_CC.js → index-BcC1HW4y.js} +3 -3
- package/dist/{index-BbhrAzLH.js → index-DCGTaCsW.js} +1 -1
- package/dist/{index-D20KUiXn.js → index-Dxc2IYXi.js} +3306 -3232
- package/dist/{inventory-core-dart.default-B7F_lZ7E.js → inventory-core-dart.default-BbZy6Cok.js} +1 -1
- package/dist/{lz-string-C_xIP_0T.js → lz-string-RCKGmlTu.js} +1 -1
- package/dist/{netsuite-a6M2ml9V.js → netsuite-tMIpKK4c.js} +3 -2
- package/dist/{number-4OG2ZSmc.js → number-Bf8QDJ39.js} +3 -3
- package/dist/{predefined-templates-CjXICvUU.js → predefined-templates-Bh5ObypP.js} +1 -1
- package/dist/{purchase-order-template-CXdomQWy.js → purchase-order-template-Cdeh8-im.js} +1 -1
- package/dist/{recalculationUtils-CEAhd7BW.js → recalculationUtils-CJ02T70y.js} +1 -1
- package/dist/{rules-Dvr47IAA.js → rules-BrpDaHZu.js} +2 -2
- package/dist/{stock-Caf05ukJ.js → stock-BP1CvvEN.js} +3 -3
- package/dist/{stock-DEOhLNew.js → stock-Ca3ejqyO.js} +1 -1
- package/dist/stores/bulk-job.d.ts +13 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-BvHSfhV9.js → supplier-CikAplrR.js} +2 -2
- package/dist/{surcharge-Cu0KfPTD.js → surcharge-z_QfAREF.js} +8 -8
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-D71zOsgd.js → uom-rules-BU0EkWV5.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DZzvq4UK.js → use-ingredient-select-dialog-DxxL31dH.js} +2 -2
- package/dist/{use-inventory-binding-dialog-C1focrkJ.js → use-inventory-binding-dialog-oRxuJqJI.js} +2 -2
- package/dist/{use-template-enabled-locations-DMcKtqkt.js → use-template-enabled-locations-CcQMhBXm.js} +2 -2
- package/dist/{use-transfer-locations-DJttEyyP.js → use-transfer-locations-ByuoGAkE.js} +2 -2
- package/dist/{useHrmPermission-DaLaaQR9.js → useHrmPermission-VmapATbV.js} +1 -1
- package/dist/{useNavigationMenu-CoX50gGK.js → useNavigationMenu-D6vXqC9N.js} +2 -2
- package/dist/{useSseClient-DTpRYQC7.js → useSseClient-Dzsg1Vj-.js} +1 -1
- package/dist/views/changelog/components/ChangelogDialog.vue.d.ts +19 -0
- package/dist/views/changelog/components/ChangelogFloatingButton.vue.d.ts +2 -0
- package/dist/views/changelog/components/ChangelogPanel.spec.d.ts +1 -0
- package/dist/views/changelog/components/ChangelogPanel.vue.d.ts +20 -0
- package/dist/views/changelog/composables/change-path.d.ts +10 -0
- package/dist/views/changelog/composables/commit-message.d.ts +9 -0
- package/dist/views/changelog/composables/commit-message.spec.d.ts +1 -0
- package/dist/views/changelog/composables/json-line-diff.d.ts +10 -0
- package/dist/views/changelog/composables/json-line-diff.spec.d.ts +1 -0
- package/dist/views/changelog/composables/use-changelog.d.ts +90 -0
- package/dist/views/changelog/composables/use-changelog.spec.d.ts +1 -0
- package/dist/views/changelog/composables/use-inventory-record-commits.d.ts +97 -0
- package/dist/views/changelog/composables/use-inventory-record-commits.spec.d.ts +1 -0
- package/dist/views/changelog/composables/use-snapshot-diff.d.ts +29 -0
- package/dist/views/changelog/composables/use-snapshot-diff.spec.d.ts +1 -0
- package/dist/views/changelog/composables/value-tree.d.ts +14 -0
- package/dist/views/changelog/composables/value-tree.spec.d.ts +1 -0
- package/dist/views/import/helper/submit-rows.d.ts +13 -0
- package/dist/views/import/helper/submit-rows.spec.d.ts +1 -0
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +2 -0
- package/dist/views/ingredients/components/inventory-binding/RecipeBindingBreakdown.vue.d.ts +25 -0
- package/dist/views/ingredients/components/inventory-binding/composables/recipe-breakdown.d.ts +34 -0
- package/dist/views/ingredients/components/inventory-binding/composables/recipe-breakdown.spec.d.ts +1 -0
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +2 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +4 -0
- package/dist/views/receive-request/components/email-dialog/EmailDialog.spec.d.ts +1 -0
- package/dist/views/receive-request/components/email-dialog/EmailDialogProps.d.ts +23 -9
- package/dist/views/recipe/composables/use-recipe-table.d.ts +11 -0
- package/dist/{vue-i18n-BC7M3p_r.js → vue-i18n-DApbl4qi.js} +540 -540
- package/dist/{xlsx.util-D7HlgjJM.js → xlsx.util-B75j3mbr.js} +2 -2
- package/package.json +3 -3
- package/dist/App-C_6oyWjy.js +0 -311
- package/dist/BulkReceiveRequestView-FKdv9h5_.js +0 -2595
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CJ1HyFqS.js +0 -441
- package/dist/RecipeView-B32tleCa.js +0 -3584
- package/dist/WarehouseView-Cua66P5F.js +0 -1079
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
import { defineComponent as oe, computed as x, reactive as te, resolveComponent as B, createElementBlock as c, openBlock as d, createVNode as u, createElementVNode as n, createCommentVNode as v, withCtx as I, createBlock as w, toDisplayString as p, unref as i, Fragment as U, renderList as G, nextTick as le } from "vue";
|
|
2
|
-
import { a as ie, t as se, v as de, F as re } from "./app-Bon7qTu5.js";
|
|
3
|
-
import { a as h, c as ae } from "./number-4OG2ZSmc.js";
|
|
4
|
-
import { u as ue } from "./use-inventory-binding-dialog-C1focrkJ.js";
|
|
5
|
-
import { b as $, c as A } from "./rules-Dvr47IAA.js";
|
|
6
|
-
import { _ as me, c as ce, d as pe } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-RQ44PYLb.js";
|
|
7
|
-
import { useI18n as ye } from "@feedmepos/mf-common";
|
|
8
|
-
const fe = { class: "flex flex-col gap-24" }, ve = { class: "flex flex-col gap-16" }, be = { class: "flex items-center" }, _e = { class: "flex-1 fm-typo-en-title-sm-600" }, xe = { class: "flex flex-col" }, ge = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, he = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Ve = { class: "flex flex-col w-full border-b border-fm-color-neutral-gray-100" }, ke = {
|
|
9
|
-
class: "flex items-center",
|
|
10
|
-
style: { "min-height": "48px" }
|
|
11
|
-
}, Be = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Ie = { class: "flex flex-col" }, we = { class: "line-clamp-1" }, Fe = { class: "w-[200px]" }, Ue = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "w-[52px]"
|
|
14
|
-
}, Ce = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400 px-8"
|
|
17
|
-
}, Ee = {
|
|
18
|
-
key: 0,
|
|
19
|
-
class: "flex flex-col gap-16"
|
|
20
|
-
}, Ge = { class: "flex items-center" }, Ae = { class: "flex-1 fm-typo-en-title-sm-600" }, Re = { class: "flex flex-col" }, Se = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Pe = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Te = { class: "flex flex-col w-full border-b border-fm-color-neutral-gray-100" }, Me = {
|
|
21
|
-
key: 0,
|
|
22
|
-
class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400"
|
|
23
|
-
}, Ne = {
|
|
24
|
-
class: "flex items-center",
|
|
25
|
-
style: { "min-height": "48px" }
|
|
26
|
-
}, $e = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, ze = { class: "flex flex-col" }, De = { class: "w-[200px]" }, Ke = {
|
|
27
|
-
key: 0,
|
|
28
|
-
class: "w-[52px]"
|
|
29
|
-
}, je = { class: "flex flex-col gap-16" }, Le = { class: "flex items-center" }, Oe = { class: "flex-1 fm-typo-en-title-sm-600" }, Ye = { class: "flex flex-col" }, We = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, qe = { class: "flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, He = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[150px] px-16" }, Je = {
|
|
30
|
-
key: 0,
|
|
31
|
-
class: "flex flex-col border-b border-fm-color-neutral-gray-100"
|
|
32
|
-
}, Qe = {
|
|
33
|
-
class: "flex items-center w-full",
|
|
34
|
-
style: { "min-height": "48px" }
|
|
35
|
-
}, Xe = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12 text-fm-color-typo-secondary line-clamp-1" }, Ze = {
|
|
36
|
-
key: 0,
|
|
37
|
-
class: "w-[52px]"
|
|
38
|
-
}, en = { class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400 px-12 pb-4" }, nn = {
|
|
39
|
-
key: 1,
|
|
40
|
-
class: "flex flex-col border-b border-fm-color-neutral-gray-100"
|
|
41
|
-
}, on = {
|
|
42
|
-
class: "flex items-center w-full",
|
|
43
|
-
style: { "min-height": "48px" }
|
|
44
|
-
}, tn = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, ln = { class: "line-clamp-1 w-full" }, sn = { class: "w-[150px]" }, dn = {
|
|
45
|
-
key: 0,
|
|
46
|
-
class: "w-[52px]"
|
|
47
|
-
}, rn = { class: "flex flex-col px-12 pb-4" }, vn = /* @__PURE__ */ oe({
|
|
48
|
-
__name: "InventoryBindingForm",
|
|
49
|
-
props: {
|
|
50
|
-
id: {},
|
|
51
|
-
modelValue: { default: () => [] },
|
|
52
|
-
excludeBindingId: {},
|
|
53
|
-
rules: { default: () => [] },
|
|
54
|
-
iframeMode: { type: Boolean },
|
|
55
|
-
disabled: { type: Boolean },
|
|
56
|
-
readonly: { type: Boolean },
|
|
57
|
-
enableIngredientGroup: { type: Boolean }
|
|
58
|
-
},
|
|
59
|
-
emits: ["update:modelValue", "click:pick-inventory-bindings"],
|
|
60
|
-
setup(z, { emit: D }) {
|
|
61
|
-
const { t: m } = ye(), g = ie(), R = x(() => g.recipeById), V = x(() => g.skuById), K = x(() => g.skuGroupById), s = z, b = D, S = x(() => se({
|
|
62
|
-
parentId: s.id,
|
|
63
|
-
bindings: s.modelValue,
|
|
64
|
-
recipes: g.recipes.map((t) => t._id === s.id ? {
|
|
65
|
-
...t,
|
|
66
|
-
contains: s.modelValue
|
|
67
|
-
} : t),
|
|
68
|
-
skus: g.skus.map((t) => t._id === s.id ? {
|
|
69
|
-
...t,
|
|
70
|
-
convert: {
|
|
71
|
-
inventoryBindings: s.modelValue
|
|
72
|
-
}
|
|
73
|
-
} : t),
|
|
74
|
-
skuGroups: g.skuGroups
|
|
75
|
-
}).inventoryBindings.filter((t) => "error" in t && t.error).map((t) => t).filter((t) => t.reason === de.enum.circularDependency)), C = x(
|
|
76
|
-
() => new Set(S.value.map((e) => {
|
|
77
|
-
var l;
|
|
78
|
-
return (l = e.bindingPaths[0]) == null ? void 0 : l.id;
|
|
79
|
-
}))
|
|
80
|
-
), j = x(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: L, promptRecipesBinding: O, promptIngredientGroupsBinding: Y } = ue();
|
|
81
|
-
async function W() {
|
|
82
|
-
if (s.iframeMode) {
|
|
83
|
-
b("click:pick-inventory-bindings", "RECIPE");
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
O(
|
|
87
|
-
s.modelValue,
|
|
88
|
-
(e) => b("update:modelValue", e),
|
|
89
|
-
s.id ? [s.id] : []
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
const q = x(() => s.modelValue.filter((e) => e.type === "SKU_GROUP"));
|
|
93
|
-
async function H() {
|
|
94
|
-
Y(
|
|
95
|
-
s.modelValue,
|
|
96
|
-
(e) => b("update:modelValue", e),
|
|
97
|
-
s.id ? [s.id] : []
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
const P = x(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
|
|
101
|
-
async function J() {
|
|
102
|
-
if (s.iframeMode) {
|
|
103
|
-
b("click:pick-inventory-bindings", "SKU");
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
L(
|
|
107
|
-
s.modelValue,
|
|
108
|
-
(e) => b("update:modelValue", e),
|
|
109
|
-
s.excludeBindingId,
|
|
110
|
-
s.id ? [s.id] : []
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
function T(e, l, t) {
|
|
114
|
-
const a = +l;
|
|
115
|
-
let f = t;
|
|
116
|
-
l.length > 0 && isFinite(a) ? f = t.map((y) => (y.id !== e || (y.amount = ae(a)), y)) : f = t.map((y) => (y.id !== e || (y.amount = { amount: 0, precision: 0 }), y)), b("update:modelValue", f);
|
|
117
|
-
}
|
|
118
|
-
function F(e, l) {
|
|
119
|
-
const t = l.filter((a) => a.id !== e);
|
|
120
|
-
b("update:modelValue", t);
|
|
121
|
-
}
|
|
122
|
-
function M(e) {
|
|
123
|
-
var t, a;
|
|
124
|
-
if (e.type !== re.enum.SKU)
|
|
125
|
-
throw new Error("Non-SKU binding does not have unit");
|
|
126
|
-
if (!((t = V.value[e.id]) == null ? void 0 : t.unit))
|
|
127
|
-
throw new Error(`Cannot find ingredient: ${e.id}`);
|
|
128
|
-
return (a = V.value[e.id]) == null ? void 0 : a.unit;
|
|
129
|
-
}
|
|
130
|
-
function Q(e) {
|
|
131
|
-
return !V.value[e.id];
|
|
132
|
-
}
|
|
133
|
-
function X(e) {
|
|
134
|
-
return { amount: e.amount, measurement: e.measurement };
|
|
135
|
-
}
|
|
136
|
-
function Z(e, l, t) {
|
|
137
|
-
const a = t.map((f) => f.id !== e ? f : {
|
|
138
|
-
...f,
|
|
139
|
-
amount: l.amount,
|
|
140
|
-
measurement: l.measurement
|
|
141
|
-
});
|
|
142
|
-
b("update:modelValue", a);
|
|
143
|
-
}
|
|
144
|
-
const N = te({});
|
|
145
|
-
function ee(e) {
|
|
146
|
-
return N[e.id] ?? {
|
|
147
|
-
modelValue: {
|
|
148
|
-
amount: e.amount,
|
|
149
|
-
measurement: e.measurement
|
|
150
|
-
},
|
|
151
|
-
amountAsString: h(e.amount)
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
function ne(e, l) {
|
|
155
|
-
le(() => {
|
|
156
|
-
N[e.id] = {
|
|
157
|
-
modelValue: {
|
|
158
|
-
amount: e.amount,
|
|
159
|
-
measurement: e.measurement
|
|
160
|
-
},
|
|
161
|
-
amountAsString: l
|
|
162
|
-
};
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
return (e, l) => {
|
|
166
|
-
const t = B("FmFormGroup"), a = B("FmButton"), f = B("FmTooltip"), y = B("FmTextField"), E = B("FmIcon");
|
|
167
|
-
return d(), c("div", fe, [
|
|
168
|
-
u(t, {
|
|
169
|
-
disabled: e.disabled,
|
|
170
|
-
"model-value": e.modelValue,
|
|
171
|
-
rules: [
|
|
172
|
-
...e.rules,
|
|
173
|
-
() => S.value.length ? "There is a binding error in your configuration" : !0
|
|
174
|
-
]
|
|
175
|
-
}, {
|
|
176
|
-
label: I(() => l[0] || (l[0] = [
|
|
177
|
-
n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Define the inventory bindings for this recipe or ingredient. ", -1)
|
|
178
|
-
])),
|
|
179
|
-
_: 1
|
|
180
|
-
}, 8, ["disabled", "model-value", "rules"]),
|
|
181
|
-
n("div", ve, [
|
|
182
|
-
n("div", be, [
|
|
183
|
-
n("div", _e, p(i(m)("inventory.inventoryBindings.recipe")), 1),
|
|
184
|
-
e.readonly ? v("", !0) : (d(), w(a, {
|
|
185
|
-
key: 0,
|
|
186
|
-
variant: "secondary",
|
|
187
|
-
"text-color": "primary",
|
|
188
|
-
"border-color": "primary",
|
|
189
|
-
label: i(m)("inventory.inventoryBindings.linkRecipe"),
|
|
190
|
-
"prepend-icon": "link",
|
|
191
|
-
onClick: W
|
|
192
|
-
}, null, 8, ["label"]))
|
|
193
|
-
]),
|
|
194
|
-
n("div", xe, [
|
|
195
|
-
n("div", ge, [
|
|
196
|
-
n("div", he, p(i(m)("inventory.inventoryBindings.recipe")), 1),
|
|
197
|
-
l[1] || (l[1] = n("div", { class: "w-[200px]" }, null, -1)),
|
|
198
|
-
l[2] || (l[2] = n("div", { class: "w-[52px]" }, null, -1))
|
|
199
|
-
]),
|
|
200
|
-
(d(!0), c(U, null, G(j.value, (o) => (d(), w(t, {
|
|
201
|
-
key: o.id,
|
|
202
|
-
disabled: e.disabled,
|
|
203
|
-
modelValue: +i(h)(o.amount ?? { amount: 1, precision: 0 }),
|
|
204
|
-
rules: [i($)(0), i(A)(-1)]
|
|
205
|
-
}, {
|
|
206
|
-
default: I(({ invalid: k }) => {
|
|
207
|
-
var _;
|
|
208
|
-
return [
|
|
209
|
-
n("div", Ve, [
|
|
210
|
-
n("div", ke, [
|
|
211
|
-
n("div", Be, [
|
|
212
|
-
n("div", Ie, [
|
|
213
|
-
u(f, {
|
|
214
|
-
zIndex: 51,
|
|
215
|
-
variant: "plain",
|
|
216
|
-
placement: "top",
|
|
217
|
-
content: (_ = R.value[o.id]) == null ? void 0 : _.name
|
|
218
|
-
}, {
|
|
219
|
-
default: I(() => {
|
|
220
|
-
var r;
|
|
221
|
-
return [
|
|
222
|
-
n("span", we, p((r = R.value[o.id]) == null ? void 0 : r.name), 1)
|
|
223
|
-
];
|
|
224
|
-
}),
|
|
225
|
-
_: 2
|
|
226
|
-
}, 1032, ["content"])
|
|
227
|
-
])
|
|
228
|
-
]),
|
|
229
|
-
n("div", Fe, [
|
|
230
|
-
u(y, {
|
|
231
|
-
class: "w-full",
|
|
232
|
-
disabled: e.disabled,
|
|
233
|
-
modelValue: +i(h)(o.amount ?? { amount: 1, precision: 0 }),
|
|
234
|
-
"onUpdate:modelValue": (r) => T(o.id, r, e.modelValue),
|
|
235
|
-
invalid: k
|
|
236
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
237
|
-
]),
|
|
238
|
-
e.readonly ? v("", !0) : (d(), c("div", Ue, [
|
|
239
|
-
u(a, {
|
|
240
|
-
disabled: e.disabled,
|
|
241
|
-
type: "button",
|
|
242
|
-
variant: "plain",
|
|
243
|
-
icon: "delete",
|
|
244
|
-
"icon-color": "#000000",
|
|
245
|
-
onClick: (r) => F(o.id, e.modelValue)
|
|
246
|
-
}, null, 8, ["disabled", "onClick"])
|
|
247
|
-
]))
|
|
248
|
-
]),
|
|
249
|
-
C.value.has(o.id) ? (d(), c("div", Ce, [
|
|
250
|
-
u(E, {
|
|
251
|
-
name: "error",
|
|
252
|
-
color: "system-error-300",
|
|
253
|
-
size: "sm"
|
|
254
|
-
}),
|
|
255
|
-
n("div", null, p(i(m)("inventory.inventoryBindings.circularError")), 1)
|
|
256
|
-
])) : v("", !0)
|
|
257
|
-
])
|
|
258
|
-
];
|
|
259
|
-
}),
|
|
260
|
-
_: 2
|
|
261
|
-
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
262
|
-
])
|
|
263
|
-
]),
|
|
264
|
-
e.enableIngredientGroup ? (d(), c("div", Ee, [
|
|
265
|
-
n("div", Ge, [
|
|
266
|
-
n("div", Ae, p(i(m)("inventory.inventoryBindings.ingredientGroup")), 1),
|
|
267
|
-
e.readonly ? v("", !0) : (d(), w(a, {
|
|
268
|
-
key: 0,
|
|
269
|
-
variant: "secondary",
|
|
270
|
-
"text-color": "primary",
|
|
271
|
-
"border-color": "primary",
|
|
272
|
-
label: i(m)("inventory.inventoryBindings.linkIngredientGroup"),
|
|
273
|
-
"prepend-icon": "link",
|
|
274
|
-
onClick: H
|
|
275
|
-
}, null, 8, ["label"]))
|
|
276
|
-
]),
|
|
277
|
-
n("div", Re, [
|
|
278
|
-
n("div", Se, [
|
|
279
|
-
n("div", Pe, p(i(m)("inventory.inventoryBindings.ingredientGroup")), 1),
|
|
280
|
-
l[3] || (l[3] = n("div", { class: "w-[200px]" }, null, -1)),
|
|
281
|
-
l[4] || (l[4] = n("div", { class: "w-[52px]" }, null, -1))
|
|
282
|
-
]),
|
|
283
|
-
(d(!0), c(U, null, G(q.value, (o) => (d(), w(t, {
|
|
284
|
-
key: o.id,
|
|
285
|
-
disabled: e.disabled,
|
|
286
|
-
modelValue: +i(h)(o.amount ?? { amount: 1, precision: 0 }),
|
|
287
|
-
rules: [i($)(0), i(A)(0)]
|
|
288
|
-
}, {
|
|
289
|
-
default: I(({ invalid: k }) => {
|
|
290
|
-
var _;
|
|
291
|
-
return [
|
|
292
|
-
n("div", Te, [
|
|
293
|
-
C.value.has(o.id) ? (d(), c("div", Me, [
|
|
294
|
-
u(E, {
|
|
295
|
-
name: "error",
|
|
296
|
-
color: "system-error-300",
|
|
297
|
-
size: "sm"
|
|
298
|
-
}),
|
|
299
|
-
n("div", null, p(i(m)("inventory.inventoryBindings.circularError")), 1)
|
|
300
|
-
])) : v("", !0),
|
|
301
|
-
n("div", Ne, [
|
|
302
|
-
n("div", $e, [
|
|
303
|
-
n("div", ze, p((_ = K.value[o.id]) == null ? void 0 : _.name), 1)
|
|
304
|
-
]),
|
|
305
|
-
n("div", De, [
|
|
306
|
-
u(y, {
|
|
307
|
-
class: "w-full",
|
|
308
|
-
disabled: e.disabled,
|
|
309
|
-
modelValue: +i(h)(o.amount ?? { amount: 1, precision: 0 }),
|
|
310
|
-
"onUpdate:modelValue": (r) => T(o.id, r, e.modelValue),
|
|
311
|
-
invalid: k
|
|
312
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
313
|
-
]),
|
|
314
|
-
e.readonly ? v("", !0) : (d(), c("div", Ke, [
|
|
315
|
-
u(a, {
|
|
316
|
-
disabled: e.disabled,
|
|
317
|
-
type: "button",
|
|
318
|
-
variant: "plain",
|
|
319
|
-
icon: "delete",
|
|
320
|
-
"icon-color": "#000000",
|
|
321
|
-
onClick: (r) => F(o.id, e.modelValue)
|
|
322
|
-
}, null, 8, ["disabled", "onClick"])
|
|
323
|
-
]))
|
|
324
|
-
])
|
|
325
|
-
])
|
|
326
|
-
];
|
|
327
|
-
}),
|
|
328
|
-
_: 2
|
|
329
|
-
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
330
|
-
])
|
|
331
|
-
])) : v("", !0),
|
|
332
|
-
n("div", je, [
|
|
333
|
-
n("div", Le, [
|
|
334
|
-
n("div", Oe, p(i(m)("inventory.inventoryBindings.ingredient")), 1),
|
|
335
|
-
e.readonly ? v("", !0) : (d(), w(a, {
|
|
336
|
-
key: 0,
|
|
337
|
-
variant: "secondary",
|
|
338
|
-
"text-color": "primary",
|
|
339
|
-
"border-color": "primary",
|
|
340
|
-
label: i(m)("inventory.inventoryBindings.linkIngredient"),
|
|
341
|
-
"prepend-icon": "link",
|
|
342
|
-
onClick: J
|
|
343
|
-
}, null, 8, ["label"]))
|
|
344
|
-
]),
|
|
345
|
-
n("div", Ye, [
|
|
346
|
-
n("div", We, [
|
|
347
|
-
n("div", qe, p(i(m)("inventory.inventoryBindings.ingredient")), 1),
|
|
348
|
-
n("div", He, p(i(m)("inventory.inventoryBindings.amount")), 1),
|
|
349
|
-
l[5] || (l[5] = n("div", { class: "w-[52px]" }, null, -1))
|
|
350
|
-
]),
|
|
351
|
-
(d(!0), c(U, null, G(P.value, (o, k) => {
|
|
352
|
-
var _;
|
|
353
|
-
return d(), c(U, {
|
|
354
|
-
key: o.id
|
|
355
|
-
}, [
|
|
356
|
-
Q(o) ? (d(), c("div", Je, [
|
|
357
|
-
n("div", Qe, [
|
|
358
|
-
n("div", Xe, p(o.id), 1),
|
|
359
|
-
e.readonly ? v("", !0) : (d(), c("div", Ze, [
|
|
360
|
-
u(a, {
|
|
361
|
-
disabled: e.disabled,
|
|
362
|
-
type: "button",
|
|
363
|
-
variant: "tertiary",
|
|
364
|
-
icon: "delete",
|
|
365
|
-
onClick: (r) => F(o.id, e.modelValue)
|
|
366
|
-
}, null, 8, ["disabled", "onClick"])
|
|
367
|
-
]))
|
|
368
|
-
]),
|
|
369
|
-
n("div", en, [
|
|
370
|
-
u(E, {
|
|
371
|
-
name: "error",
|
|
372
|
-
color: "system-error-300",
|
|
373
|
-
size: "sm"
|
|
374
|
-
}),
|
|
375
|
-
n("div", null, p(i(m)("inventory.inventoryBindings.missingIngredient")), 1)
|
|
376
|
-
])
|
|
377
|
-
])) : (d(), c("div", nn, [
|
|
378
|
-
n("div", on, [
|
|
379
|
-
n("div", tn, [
|
|
380
|
-
u(f, {
|
|
381
|
-
zIndex: 51,
|
|
382
|
-
variant: "plain",
|
|
383
|
-
placement: "top",
|
|
384
|
-
content: (_ = V.value[o.id]) == null ? void 0 : _.name
|
|
385
|
-
}, {
|
|
386
|
-
default: I(() => {
|
|
387
|
-
var r;
|
|
388
|
-
return [
|
|
389
|
-
n("span", ln, p((r = V.value[o.id]) == null ? void 0 : r.name), 1)
|
|
390
|
-
];
|
|
391
|
-
}),
|
|
392
|
-
_: 2
|
|
393
|
-
}, 1032, ["content"])
|
|
394
|
-
]),
|
|
395
|
-
n("div", sn, [
|
|
396
|
-
u(me, {
|
|
397
|
-
"model-value": X(o),
|
|
398
|
-
"onUpdate:modelValue": (r) => r && Z(o.id, r, e.modelValue),
|
|
399
|
-
"onUpdate:amount": (r) => ne(o, r),
|
|
400
|
-
unit: M(o),
|
|
401
|
-
placement: k === P.value.length - 1 ? "top" : "bottom",
|
|
402
|
-
"convert-amount-on-change-unit": "",
|
|
403
|
-
disabled: e.readonly
|
|
404
|
-
}, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement", "disabled"])
|
|
405
|
-
]),
|
|
406
|
-
e.readonly ? v("", !0) : (d(), c("div", dn, [
|
|
407
|
-
u(a, {
|
|
408
|
-
disabled: e.disabled,
|
|
409
|
-
type: "button",
|
|
410
|
-
variant: "tertiary",
|
|
411
|
-
icon: "delete",
|
|
412
|
-
onClick: (r) => F(o.id, e.modelValue)
|
|
413
|
-
}, null, 8, ["disabled", "onClick"])
|
|
414
|
-
]))
|
|
415
|
-
]),
|
|
416
|
-
n("div", rn, [
|
|
417
|
-
u(t, {
|
|
418
|
-
modelValue: +i(h)(o.amount ?? { amount: 1, precision: 0 }),
|
|
419
|
-
rules: [i(A)(0)]
|
|
420
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
421
|
-
u(t, {
|
|
422
|
-
modelValue: ee(o),
|
|
423
|
-
rules: [
|
|
424
|
-
i(ce)(),
|
|
425
|
-
i(pe)(M(o)),
|
|
426
|
-
() => C.value.has(o.id) ? i(m)("inventory.inventoryBindings.invalidWarning") : !0
|
|
427
|
-
]
|
|
428
|
-
}, null, 8, ["modelValue", "rules"])
|
|
429
|
-
])
|
|
430
|
-
]))
|
|
431
|
-
], 64);
|
|
432
|
-
}), 128))
|
|
433
|
-
])
|
|
434
|
-
])
|
|
435
|
-
]);
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
export {
|
|
440
|
-
vn as _
|
|
441
|
-
};
|