@feedmepos/mf-inventory-portal 1.2.53 → 1.2.55-dev.1
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-BsfuPPE8.js → App-Dr4bSbWV.js} +75 -70
- package/dist/{ApprovalView-DpYZ90XA.js → ApprovalView-BrUi6das.js} +34 -34
- package/dist/{BindingsDialog-BV-jLs8M.js → BindingsDialog-DtsEDaFx.js} +2 -2
- package/dist/{BindingsPicker-B1hTzIMf.js → BindingsPicker-BDSimsxV.js} +2 -2
- package/dist/{BindingsTable-LQX4W3ew.js → BindingsTable-ArpmNkQm.js} +4 -4
- package/dist/{ClosingDraftView-BmeO2Js_.js → ClosingDraftView-D7qz1YGt.js} +19 -18
- package/dist/{ClosingHistoryView--gDKiBmN.js → ClosingHistoryView-ND9smQRb.js} +27 -27
- package/dist/{ClosingTemplateView-CeH6R1_D.js → ClosingTemplateView--1tzOPIu.js} +18 -17
- package/dist/{DeliveryOrderPrintPreview-uf9jap78.js → DeliveryOrderPrintPreview-Ctv1Qp_a.js} +1 -1
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-lA-iPoWZ.js +188 -0
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-mZtCQnzs.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-UJewH4Il.js} +12 -12
- package/dist/FmMultiselectDialog-Br5_D-b5.js +618 -0
- package/dist/{FmMultiselectDialog-B9qB5-LO.js → FmMultiselectDialog-BrJlUxMZ.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-27q4Oj88.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BvIdnKjl.js} +3 -3
- package/dist/{ImportView-D4k9msYw.js → ImportView-fEnHrPWZ.js} +7 -7
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BYoVIP2q.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVELkyVY.js} +1 -1
- package/dist/{IngredientGroupView-C20V_hvY.js → IngredientGroupView-B1owkM3C.js} +108 -107
- package/dist/{IngredientsView-DzsB-qrK.js → IngredientsView-BTKXnnw5.js} +126 -125
- package/dist/{IntegrationView-DFSUowj3.js → IntegrationView-C2jarXxh.js} +80 -80
- package/dist/{InventoryBindingForm-Dlnx6-L7.js → InventoryBindingForm-Gq8XfKbC.js} +1 -1
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-BVkTXQvA.js +403 -0
- package/dist/{InventoryBindingSummary-CgpN2hF0.js → InventoryBindingSummary-CqQu65hi.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-tv-itLDe.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DIukT297.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-3BHMqt41.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D2aU4Ij2.js} +2 -2
- package/dist/{PublishView-BtMTxpSh.js → PublishView-CBYg-KST.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DGCQUgF5.js → PurchaseOrderPrintPreview-C_jrGksW.js} +1 -1
- package/dist/ReceiveRequestView-iawt5dnN.js +2915 -0
- package/dist/{RecipeView-CPnCVxz2.js → RecipeView-Dv5BTxLT.js} +83 -82
- package/dist/{StockView-DYHl_yAy.js → StockView-oSkKCORB.js} +113 -112
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Desv7VmF.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BJ3gnpTq.js} +1 -1
- package/dist/{SupplierView-BtKlc0mc.js → SupplierView-tipIYgX7.js} +28 -27
- package/dist/SurchargeView-CW1lsyEC.js +460 -0
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-C2fsq7Kj.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-B3FZqxjr.js} +2 -2
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js +84 -0
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C6utSuyH.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D86rTw7c.js} +17 -17
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BMhCFnlM.js → TransferDetails.vue_vue_type_script_setup_true_lang-cGzs-dHw.js} +15 -15
- package/dist/{TransferTemplateView-D0_xhGDZ.js → TransferTemplateView-dSJSgnil.js} +82 -81
- package/dist/{UnitView-BAX2GeM3.js → UnitView-VHi5WMrF.js} +20 -19
- package/dist/{WarehouseView-CccEHOZw.js → WarehouseView-DLZaux-w.js} +21 -20
- package/dist/{WastageTemplateView-CMNtM1FX.js → WastageTemplateView-KyvwCkdu.js} +67 -66
- package/dist/api/netsuite.d.ts +8 -0
- package/dist/api/stock-estimate.d.ts +1 -0
- package/dist/api/surcharge.d.ts +31 -0
- package/dist/{app-D_U5i9il.js → app-Cq2T5z21.js} +4511 -4405
- package/dist/app-DiX-EfV6.js +8167 -0
- package/dist/app.d.ts +52 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-Bl0MMVQ3.js → closing-template-TwdeC6qT.js} +1 -1
- package/dist/component-DpCUABT3.js +82 -0
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +8 -0
- package/dist/components/FmMultiselectDialogProps.d.ts +5 -0
- package/dist/{date2-bUTaCyeL.js → date2-Dunl1OWI.js} +1 -1
- package/dist/{dayjs.min-CsC_tYI1.js → dayjs.min-D_81k3gd.js} +26 -26
- package/dist/{decimal-DLO8y7yi.js → decimal-B9DLzi9Y.js} +2 -2
- package/dist/{defineDeepModel-Qi54tGyL.js → defineDeepModel-B15nBS96.js} +1 -1
- package/dist/{duplicate-template-CMQSNAkP.js → duplicate-template-BSxFsv2u.js} +1 -1
- package/dist/{feature-C3Qi_YOQ.js → feature-KwyjpPTq.js} +8956 -6221
- package/dist/{format-time-from-id-CiF32HPN.js → format-time-from-id-BfL9V23H.js} +1 -1
- package/dist/{format-unit-display-CWaFU32C.js → format-unit-display-BfSLhflE.js} +11 -11
- package/dist/{import-export.helper-CmZ04MNQ.js → import-export.helper-TUsgMxew.js} +5 -5
- package/dist/{index-DWbh3c13.js → index-C2H5HeFF.js} +1 -1
- package/dist/{index-BV6lZh0u.js → index-CXtJlhZZ.js} +3 -3
- package/dist/{index-v0HfyjdJ.js → index-DTnKa-sF.js} +1 -1
- package/dist/{lodash-l5GzTb80.js → lodash-DRR2nS2T.js} +1 -1
- package/dist/{netsuite-DlEPiEX1.js → netsuite-CAFiEoX5.js} +2034 -1687
- package/dist/{purchase-order-template-C-MSW7Bo.js → purchase-order-template-CSJXceBK.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/{rules-BF70lxi7.js → rules-BdFLL1aa.js} +9 -9
- package/dist/{stock-CU4n1u6e.js → stock-B80FaSS2.js} +1 -1
- package/dist/{stock-FcnkYSxh.js → stock-CgsgvX9b.js} +3 -3
- package/dist/stores/feature.d.ts +4 -0
- package/dist/stores/integration/netsuite.d.ts +5 -0
- package/dist/stores/surcharge.d.ts +18 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-BV8FzK18.js → supplier-BsycjnD1.js} +2 -2
- package/dist/surcharge-BH6kETCu.js +71 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-FCv8J6-r.js → use-ingredient-select-dialog-B2cFOc3t.js} +2 -2
- package/dist/{use-inventory-binding-dialog-UNAoymW3.js → use-inventory-binding-dialog-CKUtJDHW.js} +2 -2
- package/dist/{use-template-enabled-locations-2-6TzeRZSX.js → use-template-enabled-locations-2-tPL4lEZ_.js} +2 -2
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +8 -1
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/views/surcharge/SurchargeView.vue.d.ts +2 -0
- package/dist/{vue-i18n-W40GsXxp.js → vue-i18n-BhCaMx-9.js} +213 -213
- package/dist/{xlsx-BD3jzYqf.js → xlsx-DJaY2xSF.js} +398 -398
- package/dist/{xlsx.util-DA4HjNKa.js → xlsx.util-CZq_uKdw.js} +1 -1
- package/package.json +3 -4
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BPPKetxg.js +0 -231
- package/dist/FmMultiselectDialog-C9pVEMlL.js +0 -598
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-DiKt7AYo.js +0 -375
- package/dist/ReceiveRequestView-AY3n7b7j.js +0 -2923
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js +0 -162
- package/dist/app-uBuHtW8m.js +0 -8127
- package/dist/cypress/component/receive-request/KDI-15-total-price-currency.cy.d.ts +0 -2
- package/dist/views/ingredients/helper/calculate-default-cost.d.ts +0 -9
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +0 -22
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ee, computed as _, reactive as ne, resolveComponent as k, openBlock as d, createElementBlock as p, createVNode as y, withCtx as U, createElementVNode as n, toDisplayString as m, unref as i, createBlock as B, createCommentVNode as v, Fragment as E, renderList as G, nextTick as oe } from "vue";
|
|
2
|
-
import { a as te, G as le, aj as ie, F as se } from "./app-D_U5i9il.js";
|
|
3
|
-
import { a as h, q as T, h as C, d as re } from "./rules-BF70lxi7.js";
|
|
4
|
-
import { u as de } from "./use-inventory-binding-dialog-UNAoymW3.js";
|
|
5
|
-
import { _ as ae, c as ue, d as me } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-27q4Oj88.js";
|
|
6
|
-
import { useI18n as ce } from "@feedmepos/mf-common";
|
|
7
|
-
const pe = { class: "flex flex-col gap-24" }, ye = { class: "flex flex-col gap-16" }, fe = { class: "flex items-center" }, ve = { class: "flex-1 fm-typo-en-title-sm-600" }, be = { 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" }, _e = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, xe = { class: "flex flex-col w-full border-b border-fm-color-neutral-gray-100" }, he = {
|
|
8
|
-
class: "flex items-center",
|
|
9
|
-
style: { "min-height": "48px" }
|
|
10
|
-
}, Ve = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Be = { class: "flex flex-col" }, ke = { class: "w-[200px]" }, Ie = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "w-[52px]"
|
|
13
|
-
}, we = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400 px-8"
|
|
16
|
-
}, Fe = {
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "flex flex-col gap-16"
|
|
19
|
-
}, Ue = { class: "flex items-center" }, Ee = { class: "flex-1 fm-typo-en-title-sm-600" }, Ge = { class: "flex flex-col" }, Ce = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Ae = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Re = { class: "flex flex-col w-full border-b border-fm-color-neutral-gray-100" }, Se = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400"
|
|
22
|
-
}, Pe = {
|
|
23
|
-
class: "flex items-center",
|
|
24
|
-
style: { "min-height": "48px" }
|
|
25
|
-
}, Ne = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Te = { class: "flex flex-col" }, Me = { class: "w-[200px]" }, De = {
|
|
26
|
-
key: 0,
|
|
27
|
-
class: "w-[52px]"
|
|
28
|
-
}, Ke = { class: "flex flex-col gap-16" }, $e = { class: "flex items-center" }, je = { class: "flex-1 fm-typo-en-title-sm-600" }, ze = { class: "flex flex-col" }, Le = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Oe = { class: "flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Ye = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[150px] px-16" }, qe = {
|
|
29
|
-
class: "flex items-center w-full",
|
|
30
|
-
style: { "min-height": "48px" }
|
|
31
|
-
}, We = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, He = { class: "line-clamp-1" }, Je = { class: "w-[150px]" }, Qe = {
|
|
32
|
-
key: 0,
|
|
33
|
-
class: "w-[52px]"
|
|
34
|
-
}, Xe = { class: "flex flex-col px-12 pb-4" }, sn = /* @__PURE__ */ ee({
|
|
35
|
-
__name: "InventoryBindingForm",
|
|
36
|
-
props: {
|
|
37
|
-
id: {},
|
|
38
|
-
modelValue: { default: () => [] },
|
|
39
|
-
excludeBindingId: {},
|
|
40
|
-
rules: { default: () => [] },
|
|
41
|
-
iframeMode: { type: Boolean },
|
|
42
|
-
disabled: { type: Boolean },
|
|
43
|
-
readonly: { type: Boolean },
|
|
44
|
-
enableIngredientGroup: { type: Boolean }
|
|
45
|
-
},
|
|
46
|
-
emits: ["update:modelValue", "click:pick-inventory-bindings"],
|
|
47
|
-
setup(M, { emit: D }) {
|
|
48
|
-
const { t: a } = ce(), x = te(), K = _(() => x.recipeById), I = _(() => x.skuById), $ = _(() => x.skuGroupById), s = M, b = D, A = _(() => le({
|
|
49
|
-
parentId: s.id,
|
|
50
|
-
bindings: s.modelValue,
|
|
51
|
-
recipes: x.recipes.map((o) => o._id === s.id ? {
|
|
52
|
-
...o,
|
|
53
|
-
contains: s.modelValue
|
|
54
|
-
} : o),
|
|
55
|
-
skus: x.skus.map((o) => o._id === s.id ? {
|
|
56
|
-
...o,
|
|
57
|
-
convert: {
|
|
58
|
-
inventoryBindings: s.modelValue
|
|
59
|
-
}
|
|
60
|
-
} : o),
|
|
61
|
-
skuGroups: x.skuGroups
|
|
62
|
-
}).inventoryBindings.filter((o) => "error" in o && o.error).map((o) => o).filter((o) => o.reason === ie.enum.circularDependency)), w = _(
|
|
63
|
-
() => new Set(A.value.map((e) => {
|
|
64
|
-
var t;
|
|
65
|
-
return (t = e.bindingPaths[0]) == null ? void 0 : t.id;
|
|
66
|
-
}))
|
|
67
|
-
), j = _(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: z, promptRecipesBinding: L, promptIngredientGroupsBinding: O } = de();
|
|
68
|
-
async function Y() {
|
|
69
|
-
if (s.iframeMode) {
|
|
70
|
-
b("click:pick-inventory-bindings", "RECIPE");
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
L(
|
|
74
|
-
s.modelValue,
|
|
75
|
-
(e) => b("update:modelValue", e),
|
|
76
|
-
s.id ? [s.id] : []
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
const q = _(() => s.modelValue.filter((e) => e.type === "SKU_GROUP"));
|
|
80
|
-
async function W() {
|
|
81
|
-
O(
|
|
82
|
-
s.modelValue,
|
|
83
|
-
(e) => b("update:modelValue", e),
|
|
84
|
-
s.id ? [s.id] : []
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
const R = _(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
|
|
88
|
-
async function H() {
|
|
89
|
-
if (s.iframeMode) {
|
|
90
|
-
b("click:pick-inventory-bindings", "SKU");
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
z(
|
|
94
|
-
s.modelValue,
|
|
95
|
-
(e) => b("update:modelValue", e),
|
|
96
|
-
s.excludeBindingId,
|
|
97
|
-
s.id ? [s.id] : []
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
function S(e, t, o) {
|
|
101
|
-
const r = +t;
|
|
102
|
-
let f = o;
|
|
103
|
-
t.length > 0 && isFinite(r) ? f = o.map((u) => (u.id !== e || (u.amount = re(r)), u)) : f = o.map((u) => (u.id !== e || (u.amount = { amount: 0, precision: 0 }), u)), b("update:modelValue", f);
|
|
104
|
-
}
|
|
105
|
-
function F(e, t) {
|
|
106
|
-
const o = t.filter((r) => r.id !== e);
|
|
107
|
-
b("update:modelValue", o);
|
|
108
|
-
}
|
|
109
|
-
function P(e) {
|
|
110
|
-
var o, r;
|
|
111
|
-
if (e.type !== se.enum.SKU)
|
|
112
|
-
throw new Error("Non-SKU binding does not have unit");
|
|
113
|
-
if (!((o = I.value[e.id]) == null ? void 0 : o.unit))
|
|
114
|
-
throw new Error(`Cannot find ingredient: ${e.id}`);
|
|
115
|
-
return (r = I.value[e.id]) == null ? void 0 : r.unit;
|
|
116
|
-
}
|
|
117
|
-
function J(e) {
|
|
118
|
-
return { amount: e.amount, measurement: e.measurement };
|
|
119
|
-
}
|
|
120
|
-
function Q(e, t, o) {
|
|
121
|
-
const r = o.map((f) => f.id !== e ? f : {
|
|
122
|
-
...f,
|
|
123
|
-
amount: t.amount,
|
|
124
|
-
measurement: t.measurement
|
|
125
|
-
});
|
|
126
|
-
b("update:modelValue", r);
|
|
127
|
-
}
|
|
128
|
-
const N = ne({});
|
|
129
|
-
function X(e) {
|
|
130
|
-
return N[e.id] ?? {
|
|
131
|
-
modelValue: {
|
|
132
|
-
amount: e.amount,
|
|
133
|
-
measurement: e.measurement
|
|
134
|
-
},
|
|
135
|
-
amountAsString: h(e.amount)
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
function Z(e, t) {
|
|
139
|
-
oe(() => {
|
|
140
|
-
N[e.id] = {
|
|
141
|
-
modelValue: {
|
|
142
|
-
amount: e.amount,
|
|
143
|
-
measurement: e.measurement
|
|
144
|
-
},
|
|
145
|
-
amountAsString: t
|
|
146
|
-
};
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
return (e, t) => {
|
|
150
|
-
const o = k("FmFormGroup"), r = k("FmButton"), f = k("FmTextField"), u = k("FmIcon");
|
|
151
|
-
return d(), p("div", pe, [
|
|
152
|
-
y(o, {
|
|
153
|
-
disabled: e.disabled,
|
|
154
|
-
"model-value": e.modelValue,
|
|
155
|
-
rules: [
|
|
156
|
-
...e.rules,
|
|
157
|
-
() => A.value.length ? "There is a binding error in your configuration" : !0
|
|
158
|
-
]
|
|
159
|
-
}, {
|
|
160
|
-
label: U(() => t[0] || (t[0] = [
|
|
161
|
-
n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Define the inventory bindings for this recipe or ingredient. ", -1)
|
|
162
|
-
])),
|
|
163
|
-
_: 1
|
|
164
|
-
}, 8, ["disabled", "model-value", "rules"]),
|
|
165
|
-
n("div", ye, [
|
|
166
|
-
n("div", fe, [
|
|
167
|
-
n("div", ve, m(i(a)("inventory.inventoryBindings.recipe")), 1),
|
|
168
|
-
e.readonly ? v("", !0) : (d(), B(r, {
|
|
169
|
-
key: 0,
|
|
170
|
-
variant: "secondary",
|
|
171
|
-
"text-color": "primary",
|
|
172
|
-
"border-color": "primary",
|
|
173
|
-
label: i(a)("inventory.inventoryBindings.linkRecipe"),
|
|
174
|
-
"prepend-icon": "link",
|
|
175
|
-
onClick: Y
|
|
176
|
-
}, null, 8, ["label"]))
|
|
177
|
-
]),
|
|
178
|
-
n("div", be, [
|
|
179
|
-
n("div", ge, [
|
|
180
|
-
n("div", _e, m(i(a)("inventory.inventoryBindings.recipe")), 1),
|
|
181
|
-
t[1] || (t[1] = n("div", { class: "w-[200px]" }, null, -1)),
|
|
182
|
-
t[2] || (t[2] = n("div", { class: "w-[52px]" }, null, -1))
|
|
183
|
-
]),
|
|
184
|
-
(d(!0), p(E, null, G(j.value, (l) => (d(), B(o, {
|
|
185
|
-
key: l.id,
|
|
186
|
-
disabled: e.disabled,
|
|
187
|
-
modelValue: +i(h)(l.amount ?? { amount: 1, precision: 0 }),
|
|
188
|
-
rules: [i(T)(0), i(C)(0)]
|
|
189
|
-
}, {
|
|
190
|
-
default: U(({ invalid: V }) => {
|
|
191
|
-
var g;
|
|
192
|
-
return [
|
|
193
|
-
n("div", xe, [
|
|
194
|
-
n("div", he, [
|
|
195
|
-
n("div", Ve, [
|
|
196
|
-
n("div", Be, m((g = K.value[l.id]) == null ? void 0 : g.name), 1)
|
|
197
|
-
]),
|
|
198
|
-
n("div", ke, [
|
|
199
|
-
y(f, {
|
|
200
|
-
class: "w-full",
|
|
201
|
-
disabled: e.disabled,
|
|
202
|
-
modelValue: +i(h)(l.amount ?? { amount: 1, precision: 0 }),
|
|
203
|
-
"onUpdate:modelValue": (c) => S(l.id, c, e.modelValue),
|
|
204
|
-
invalid: V
|
|
205
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
206
|
-
]),
|
|
207
|
-
e.readonly ? v("", !0) : (d(), p("div", Ie, [
|
|
208
|
-
y(r, {
|
|
209
|
-
disabled: e.disabled,
|
|
210
|
-
type: "button",
|
|
211
|
-
variant: "plain",
|
|
212
|
-
icon: "delete",
|
|
213
|
-
"icon-color": "#000000",
|
|
214
|
-
onClick: (c) => F(l.id, e.modelValue)
|
|
215
|
-
}, null, 8, ["disabled", "onClick"])
|
|
216
|
-
]))
|
|
217
|
-
]),
|
|
218
|
-
w.value.has(l.id) ? (d(), p("div", we, [
|
|
219
|
-
y(u, {
|
|
220
|
-
name: "error",
|
|
221
|
-
color: "system-error-300",
|
|
222
|
-
size: "sm"
|
|
223
|
-
}),
|
|
224
|
-
n("div", null, m(i(a)("inventory.inventoryBindings.circularError")), 1)
|
|
225
|
-
])) : v("", !0)
|
|
226
|
-
])
|
|
227
|
-
];
|
|
228
|
-
}),
|
|
229
|
-
_: 2
|
|
230
|
-
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
231
|
-
])
|
|
232
|
-
]),
|
|
233
|
-
e.enableIngredientGroup ? (d(), p("div", Fe, [
|
|
234
|
-
n("div", Ue, [
|
|
235
|
-
n("div", Ee, m(i(a)("inventory.inventoryBindings.ingredientGroup")), 1),
|
|
236
|
-
e.readonly ? v("", !0) : (d(), B(r, {
|
|
237
|
-
key: 0,
|
|
238
|
-
variant: "secondary",
|
|
239
|
-
"text-color": "primary",
|
|
240
|
-
"border-color": "primary",
|
|
241
|
-
label: i(a)("inventory.inventoryBindings.linkIngredientGroup"),
|
|
242
|
-
"prepend-icon": "link",
|
|
243
|
-
onClick: W
|
|
244
|
-
}, null, 8, ["label"]))
|
|
245
|
-
]),
|
|
246
|
-
n("div", Ge, [
|
|
247
|
-
n("div", Ce, [
|
|
248
|
-
n("div", Ae, m(i(a)("inventory.inventoryBindings.ingredientGroup")), 1),
|
|
249
|
-
t[3] || (t[3] = n("div", { class: "w-[200px]" }, null, -1)),
|
|
250
|
-
t[4] || (t[4] = n("div", { class: "w-[52px]" }, null, -1))
|
|
251
|
-
]),
|
|
252
|
-
(d(!0), p(E, null, G(q.value, (l) => (d(), B(o, {
|
|
253
|
-
key: l.id,
|
|
254
|
-
disabled: e.disabled,
|
|
255
|
-
modelValue: +i(h)(l.amount ?? { amount: 1, precision: 0 }),
|
|
256
|
-
rules: [i(T)(0), i(C)(0)]
|
|
257
|
-
}, {
|
|
258
|
-
default: U(({ invalid: V }) => {
|
|
259
|
-
var g;
|
|
260
|
-
return [
|
|
261
|
-
n("div", Re, [
|
|
262
|
-
w.value.has(l.id) ? (d(), p("div", Se, [
|
|
263
|
-
y(u, {
|
|
264
|
-
name: "error",
|
|
265
|
-
color: "system-error-300",
|
|
266
|
-
size: "sm"
|
|
267
|
-
}),
|
|
268
|
-
n("div", null, m(i(a)("inventory.inventoryBindings.circularError")), 1)
|
|
269
|
-
])) : v("", !0),
|
|
270
|
-
n("div", Pe, [
|
|
271
|
-
n("div", Ne, [
|
|
272
|
-
n("div", Te, m((g = $.value[l.id]) == null ? void 0 : g.name), 1)
|
|
273
|
-
]),
|
|
274
|
-
n("div", Me, [
|
|
275
|
-
y(f, {
|
|
276
|
-
class: "w-full",
|
|
277
|
-
disabled: e.disabled,
|
|
278
|
-
modelValue: +i(h)(l.amount ?? { amount: 1, precision: 0 }),
|
|
279
|
-
"onUpdate:modelValue": (c) => S(l.id, c, e.modelValue),
|
|
280
|
-
invalid: V
|
|
281
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
282
|
-
]),
|
|
283
|
-
e.readonly ? v("", !0) : (d(), p("div", De, [
|
|
284
|
-
y(r, {
|
|
285
|
-
disabled: e.disabled,
|
|
286
|
-
type: "button",
|
|
287
|
-
variant: "plain",
|
|
288
|
-
icon: "delete",
|
|
289
|
-
"icon-color": "#000000",
|
|
290
|
-
onClick: (c) => F(l.id, e.modelValue)
|
|
291
|
-
}, null, 8, ["disabled", "onClick"])
|
|
292
|
-
]))
|
|
293
|
-
])
|
|
294
|
-
])
|
|
295
|
-
];
|
|
296
|
-
}),
|
|
297
|
-
_: 2
|
|
298
|
-
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
299
|
-
])
|
|
300
|
-
])) : v("", !0),
|
|
301
|
-
n("div", Ke, [
|
|
302
|
-
n("div", $e, [
|
|
303
|
-
n("div", je, m(i(a)("inventory.inventoryBindings.ingredient")), 1),
|
|
304
|
-
e.readonly ? v("", !0) : (d(), B(r, {
|
|
305
|
-
key: 0,
|
|
306
|
-
variant: "secondary",
|
|
307
|
-
"text-color": "primary",
|
|
308
|
-
"border-color": "primary",
|
|
309
|
-
label: i(a)("inventory.inventoryBindings.linkIngredient"),
|
|
310
|
-
"prepend-icon": "link",
|
|
311
|
-
onClick: H
|
|
312
|
-
}, null, 8, ["label"]))
|
|
313
|
-
]),
|
|
314
|
-
n("div", ze, [
|
|
315
|
-
n("div", Le, [
|
|
316
|
-
n("div", Oe, m(i(a)("inventory.inventoryBindings.ingredient")), 1),
|
|
317
|
-
n("div", Ye, m(i(a)("inventory.inventoryBindings.amount")), 1),
|
|
318
|
-
t[5] || (t[5] = n("div", { class: "w-[52px]" }, null, -1))
|
|
319
|
-
]),
|
|
320
|
-
(d(!0), p(E, null, G(R.value, (l, V) => {
|
|
321
|
-
var g;
|
|
322
|
-
return d(), p("div", {
|
|
323
|
-
key: l.id,
|
|
324
|
-
class: "flex flex-col border-b border-fm-color-neutral-gray-100"
|
|
325
|
-
}, [
|
|
326
|
-
n("div", qe, [
|
|
327
|
-
n("div", We, [
|
|
328
|
-
n("span", He, m((g = I.value[l.id]) == null ? void 0 : g.name), 1)
|
|
329
|
-
]),
|
|
330
|
-
n("div", Je, [
|
|
331
|
-
y(ae, {
|
|
332
|
-
"model-value": J(l),
|
|
333
|
-
"onUpdate:modelValue": (c) => c && Q(l.id, c, e.modelValue),
|
|
334
|
-
"onUpdate:amount": (c) => Z(l, c),
|
|
335
|
-
unit: P(l),
|
|
336
|
-
placement: V === R.value.length - 1 ? "top" : "bottom",
|
|
337
|
-
"convert-amount-on-change-unit": "",
|
|
338
|
-
disabled: e.readonly
|
|
339
|
-
}, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement", "disabled"])
|
|
340
|
-
]),
|
|
341
|
-
e.readonly ? v("", !0) : (d(), p("div", Qe, [
|
|
342
|
-
y(r, {
|
|
343
|
-
disabled: e.disabled,
|
|
344
|
-
type: "button",
|
|
345
|
-
variant: "tertiary",
|
|
346
|
-
icon: "delete",
|
|
347
|
-
onClick: (c) => F(l.id, e.modelValue)
|
|
348
|
-
}, null, 8, ["disabled", "onClick"])
|
|
349
|
-
]))
|
|
350
|
-
]),
|
|
351
|
-
n("div", Xe, [
|
|
352
|
-
y(o, {
|
|
353
|
-
modelValue: +i(h)(l.amount ?? { amount: 1, precision: 0 }),
|
|
354
|
-
rules: [i(C)(0)]
|
|
355
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
356
|
-
y(o, {
|
|
357
|
-
modelValue: X(l),
|
|
358
|
-
rules: [
|
|
359
|
-
i(ue)(),
|
|
360
|
-
i(me)(P(l)),
|
|
361
|
-
() => w.value.has(l.id) ? i(a)("inventory.inventoryBindings.invalidWarning") : !0
|
|
362
|
-
]
|
|
363
|
-
}, null, 8, ["modelValue", "rules"])
|
|
364
|
-
])
|
|
365
|
-
]);
|
|
366
|
-
}), 128))
|
|
367
|
-
])
|
|
368
|
-
])
|
|
369
|
-
]);
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
export {
|
|
374
|
-
sn as _
|
|
375
|
-
};
|