@feedmepos/mf-inventory-portal 0.0.23-dev.31 → 0.0.23-dev.4
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-CEmWJ9lp.js → App-DReDvY0M.js} +73 -85
- package/dist/{ApprovalView-jDll4AVe.js → ApprovalView-BMZlYmRk.js} +27 -24
- package/dist/{BindingsDialog-BC_gRSif.js → BindingsDialog-Y2K4I7H7.js} +4 -4
- package/dist/{BindingsPicker-BJsGoBzM.js → BindingsPicker-DKBq9c37.js} +9 -8
- package/dist/{BindingsTable-DSdwNK_q.js → BindingsTable-45v4SDfp.js} +22 -18
- package/dist/{ClosingTemplateView-BzG16gl5.js → ClosingTemplateView-CKJVYSbj.js} +286 -272
- package/dist/FmDroppableField-8RzKjEdL.js +154 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DW2IOPST.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CMEOp-0r.js} +23 -22
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js +436 -0
- package/dist/FmMultiselectDialog-D7YtdoyJ.js +415 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DDuZEf_v.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.js} +49 -48
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CiNvnaaE.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-zjvFEF5C.js} +5 -5
- package/dist/{IngredientGroupView-DL8eBhkk.js → IngredientGroupView-BuP-HGeg.js} +69 -63
- package/dist/IngredientsView-DMRN-odY.js +1613 -0
- package/dist/{IntegrationView-BeFT5S24.js → IntegrationView-kYCaKG0o.js} +95 -92
- package/dist/{InventoryBindingForm-DJ3uwq_X.js → InventoryBindingForm-BXHq4h-n.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DIviTipZ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js} +27 -25
- package/dist/{InventoryBindingSummary-CvB5j9xq.js → InventoryBindingSummary-Bjasfc_v.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CQPdnXEF.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DM0C4raP.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BdscwUGn.js → PremiumBadge.vue_vue_type_script_setup_true_lang-C3O3JebE.js} +24 -23
- package/dist/{PurchaseOrderPrintPreview-3_6nBajH.js → PurchaseOrderPrintPreview-CmjkfTTS.js} +14 -13
- package/dist/{ReceiveRequestView-B_0UldQ7.js → ReceiveRequestView-aQZJO8sq.js} +1302 -1325
- package/dist/{RecipeView-D9p0Ou_I.js → RecipeView-DXO43tFi.js} +85 -79
- package/dist/{StockView-TIdUgG3O.js → StockView-D9no-mrA.js} +1446 -1338
- package/dist/{SupplierView-B1b9Otcr.js → SupplierView-DAx7E7sR.js} +787 -2325
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DCA0RUfu.js +1209 -0
- package/dist/TransferTemplateView-CfxdQF1t.js +1261 -0
- package/dist/{UnitView-BrpzJ7D3.js → UnitView-CQPGZ8-r.js} +44 -40
- package/dist/{WarehouseView-CjbdEy8o.js → WarehouseView-jy-RNCgy.js} +100 -94
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/api/closing.d.ts +0 -1
- package/dist/api/netsuite.d.ts +3 -3
- package/dist/app-KnSMkJBV.js +33496 -0
- package/dist/app.d.ts +0 -56
- package/dist/app.js +2 -2
- package/dist/components/FmMultiselectDialogProps.d.ts +0 -1
- package/dist/components/row-action.enum.d.ts +0 -1
- package/dist/composable/defineDeepModel.d.ts +1 -1
- package/dist/date2-CIeUqUIc.js +117 -0
- package/dist/dayjs.min-Df5jSnDJ.js +282 -0
- package/dist/{decimal-DHYZglKx.js → decimal-BAc9M88Q.js} +1 -1
- package/dist/defineDeepModel-BfuQAIoM.js +13 -0
- package/dist/{feature-G-NnqKcY.js → feature-dwB4OxRQ.js} +6 -12
- package/dist/format-time-from-id-BbvzyIN6.js +15 -0
- package/dist/{format-unit-display-BWqJsV_R.js → format-unit-display-BBWblJEt.js} +171 -162
- package/dist/fuzzy-B9ryZ9VZ.js +41 -0
- package/dist/index-BN0CY3sZ.js +22277 -0
- package/dist/index-Bj1fJum-.js +45 -0
- package/dist/index-C4yL_7rR.js +10545 -0
- package/dist/netsuite-ByWOS6tI.js +194 -0
- package/dist/normalizeArguments-DP7Hrren.js +1552 -0
- package/dist/router/name.d.ts +0 -2
- package/dist/row-action.enum-PMKMRrZR.js +50 -0
- package/dist/rules-C12nWDD1.js +198 -0
- package/dist/stores/feature.d.ts +0 -1
- package/dist/stores/integration/netsuite.d.ts +2 -70
- package/dist/stores/inventory.d.ts +4 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-DTUUR48O.js → supplier-DJC0UZWv.js} +15 -15
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-DvC_i-Ih.js → use-inventory-binding-dialog-PEQbFRvO.js} +11 -10
- package/dist/use-template-enabled-locations-2-k9g5t8tt.js +86 -0
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +192 -24
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +193 -25
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +0 -2
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +0 -6
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +0 -9
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +0 -9
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/xlsx-B4XHad7S.js +24004 -0
- package/dist/xlsx.util-BSO4SHJi.js +78 -0
- package/package.json +3 -3
- package/dist/ClosingDraftView-UfWdRXb-.js +0 -1190
- package/dist/IngredientsView-B_HC9fgq.js +0 -1657
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-jUYB4L8Y.js +0 -1275
- package/dist/TransferTemplateView-Dxk5b-2j.js +0 -1264
- package/dist/api/adjustment-template.d.ts +0 -23
- package/dist/api/closing-draft.d.ts +0 -6
- package/dist/app-AcMtTQ07.js +0 -84202
- package/dist/index-Bt8vaUdT.js +0 -12087
- package/dist/stock-VZXyPw2C.js +0 -125
- package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +0 -2
- package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +0 -18
- package/dist/views/adjustment-template/import/export.d.ts +0 -60
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +0 -2
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +0 -22
- package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +0 -6
- package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +0 -2
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +0 -1295
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +0 -16
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +0 -35
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +0 -20
- package/dist/views/adjustment-template/wastage-template/props.d.ts +0 -29
- package/dist/views/adjustment-template/wastage-template/table.d.ts +0 -1273
- package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +0 -2
- package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +0 -22
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +0 -621
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +0 -25
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +0 -3621
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +0 -1
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +0 -19
- package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +0 -4
- package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +0 -12
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +0 -13
- package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +0 -12
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { defineComponent as Y, ref as
|
|
2
|
-
import { a as I,
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { i as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { _ as
|
|
1
|
+
import { defineComponent as Y, ref as E, onMounted as re, resolveComponent as S, openBlock as C, createElementBlock as A, Fragment as ie, createElementVNode as w, toDisplayString as ce, createVNode as g, createCommentVNode as j, computed as V, watch as ue, createBlock as T, withCtx as P, unref as y, isRef as Z, normalizeClass as de, normalizeStyle as me, Teleport as pe, normalizeProps as fe, guardReactiveProps as ve } from "vue";
|
|
2
|
+
import { a as I, c as G, S as ye, F as ee, h as te, u as ge } from "./app-KnSMkJBV.js";
|
|
3
|
+
import { useDialog as be, useSnackbar as se, useProxiedModel as ne, useBreakpoints as _e } from "@feedmepos/ui-library";
|
|
4
|
+
import { i as we, _ as Re } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
+
import { F as x, D as oe, R as L } from "./row-action.enum-PMKMRrZR.js";
|
|
6
|
+
import { _ as le } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-zjvFEF5C.js";
|
|
7
|
+
import { defineStore as he, storeToRefs as xe } from "pinia";
|
|
8
|
+
import { c as Ce, _ as Ee, F as ae } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
+
import { a as z, R as Fe, U as Se, A as Ve } from "./rules-C12nWDD1.js";
|
|
10
|
+
import { useI18n as H } from "@feedmepos/mf-common";
|
|
11
|
+
import { u as ke, _ as De, a as Ie } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js";
|
|
12
|
+
import { _ as $e } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js";
|
|
13
|
+
import { t as Ae, d as Pe } from "./xlsx.util-BSO4SHJi.js";
|
|
14
|
+
import { f as Be } from "./date2-CIeUqUIc.js";
|
|
9
15
|
const Te = {
|
|
10
16
|
key: 0,
|
|
11
17
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
@@ -18,7 +24,7 @@ const Te = {
|
|
|
18
24
|
bindedItems: {}
|
|
19
25
|
},
|
|
20
26
|
setup(R) {
|
|
21
|
-
const p = R, v =
|
|
27
|
+
const p = R, v = E(p.bindedItems || []), r = E(!1);
|
|
22
28
|
re(() => {
|
|
23
29
|
l();
|
|
24
30
|
});
|
|
@@ -27,31 +33,31 @@ const Te = {
|
|
|
27
33
|
!r.value && ((c = p.data) != null && c._id) && (r.value = !0, v.value = await I().getAffectedMenu((i = p.data) == null ? void 0 : i._id), r.value = !1);
|
|
28
34
|
}
|
|
29
35
|
return (c, i) => {
|
|
30
|
-
const f =
|
|
31
|
-
return
|
|
36
|
+
const f = S("FmSpacer"), d = S("FmCircularProgress");
|
|
37
|
+
return C(), A(ie, null, [
|
|
32
38
|
w("p", null, ce(c.message), 1),
|
|
33
|
-
r.value ? (
|
|
39
|
+
r.value ? (C(), A("div", Te, [
|
|
34
40
|
g(f),
|
|
35
41
|
w("div", null, [
|
|
36
42
|
g(d, { size: "xl" })
|
|
37
43
|
]),
|
|
38
44
|
i[0] || (i[0] = w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
|
|
39
45
|
g(f)
|
|
40
|
-
])) : (
|
|
46
|
+
])) : (C(), A("div", Me, [
|
|
41
47
|
i[2] || (i[2] = w("br", null, null, -1)),
|
|
42
|
-
v.value.length > 0 ? (
|
|
48
|
+
v.value.length > 0 ? (C(), A("div", Ue, [
|
|
43
49
|
i[1] || (i[1] = w("p", { class: "fm-typo-en-body-lg-600" }, "Affected menu items:", -1)),
|
|
44
50
|
g(le, {
|
|
45
51
|
name: "Menu",
|
|
46
52
|
bindings: v.value
|
|
47
53
|
}, null, 8, ["bindings"])
|
|
48
|
-
])) :
|
|
54
|
+
])) : j("", !0)
|
|
49
55
|
]))
|
|
50
56
|
], 64);
|
|
51
57
|
};
|
|
52
58
|
}
|
|
53
|
-
}),
|
|
54
|
-
const p =
|
|
59
|
+
}), q = he("recipeForm", function() {
|
|
60
|
+
const p = be(), v = se(), r = I(), l = E(!1), c = E();
|
|
55
61
|
function i() {
|
|
56
62
|
const t = {
|
|
57
63
|
recipe: {},
|
|
@@ -83,9 +89,9 @@ const Te = {
|
|
|
83
89
|
type: "success"
|
|
84
90
|
});
|
|
85
91
|
} catch (a) {
|
|
86
|
-
a instanceof ye &&
|
|
92
|
+
a instanceof ye && we(a) ? p.open({
|
|
87
93
|
title: "Cannot delete recipe",
|
|
88
|
-
contentComponent:
|
|
94
|
+
contentComponent: Re,
|
|
89
95
|
contentComponentProps: {
|
|
90
96
|
subject: (t == null ? void 0 : t.name) ?? "",
|
|
91
97
|
items: a.errorResponse.message
|
|
@@ -132,21 +138,21 @@ const Te = {
|
|
|
132
138
|
recipeViewLoading: l
|
|
133
139
|
};
|
|
134
140
|
});
|
|
135
|
-
function
|
|
136
|
-
const { updateRecipe: R, deleteRecipe: p } =
|
|
141
|
+
function Le() {
|
|
142
|
+
const { updateRecipe: R, deleteRecipe: p } = q(), v = I(), { t: r } = H();
|
|
137
143
|
async function l(d, u) {
|
|
138
144
|
const t = G(u);
|
|
139
|
-
if (d ===
|
|
145
|
+
if (d === L.Edit) {
|
|
140
146
|
await R(t);
|
|
141
147
|
return;
|
|
142
148
|
}
|
|
143
|
-
if (d ===
|
|
149
|
+
if (d === L.Delete) {
|
|
144
150
|
await p(t);
|
|
145
151
|
return;
|
|
146
152
|
}
|
|
147
153
|
}
|
|
148
154
|
function c(d, u) {
|
|
149
|
-
const t = d.filter((e) => e.type ===
|
|
155
|
+
const t = d.filter((e) => e.type === ee.enum.SKU), a = d.filter((e) => e.type === ee.enum.RECIPE);
|
|
150
156
|
return [
|
|
151
157
|
...t.map((e) => ({ ...e, recipeIds: [...u] })),
|
|
152
158
|
...a.filter((e) => v.recipeById[e.id] && !u.has(e.id)).flatMap(
|
|
@@ -169,8 +175,8 @@ function ze() {
|
|
|
169
175
|
id: "action",
|
|
170
176
|
header: "",
|
|
171
177
|
cell(d) {
|
|
172
|
-
return
|
|
173
|
-
[
|
|
178
|
+
return Ce(
|
|
179
|
+
[oe[L.Edit], oe[L.Delete]],
|
|
174
180
|
(u) => {
|
|
175
181
|
l(u, d.row.original.original);
|
|
176
182
|
}
|
|
@@ -191,20 +197,20 @@ function ze() {
|
|
|
191
197
|
ingredients: c(t.contains, /* @__PURE__ */ new Set([t._id])).map((a) => {
|
|
192
198
|
var b, _, s, m, h;
|
|
193
199
|
const e = u.skuById[a.id];
|
|
194
|
-
return e ? a.recipeIds.slice(1).length ? `(linked recipe ${(b = u.recipeById[a.recipeIds.at(-1) ?? ""]) == null ? void 0 : b.name}) ${e.name} (${
|
|
200
|
+
return e ? a.recipeIds.slice(1).length ? `(linked recipe ${(b = u.recipeById[a.recipeIds.at(-1) ?? ""]) == null ? void 0 : b.name}) ${e.name} (${z(a.amount)}${((_ = a.measurement) == null ? void 0 : _.abbrev) ?? ((s = e == null ? void 0 : e.unit) == null ? void 0 : s.abbrev)})` : `${e.name} (${z(a.amount)}${((m = a.measurement) == null ? void 0 : m.abbrev) ?? ((h = e == null ? void 0 : e.unit) == null ? void 0 : h.abbrev)})` : null;
|
|
195
201
|
}).filter((a) => a).join(", "),
|
|
196
202
|
original: t
|
|
197
203
|
}));
|
|
198
204
|
}
|
|
199
205
|
return { columnDefs: i, formatRowData: f };
|
|
200
206
|
}
|
|
201
|
-
const
|
|
207
|
+
const ze = { class: "flex flex-col gap-40" }, Ye = {
|
|
202
208
|
key: 0,
|
|
203
209
|
class: "col-span-2 mt-16 border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
|
|
204
|
-
},
|
|
210
|
+
}, He = {
|
|
205
211
|
key: 0,
|
|
206
212
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
207
|
-
},
|
|
213
|
+
}, Ke = { key: 1 }, je = /* @__PURE__ */ Y({
|
|
208
214
|
__name: "RecipeForm",
|
|
209
215
|
props: {
|
|
210
216
|
mode: {},
|
|
@@ -214,7 +220,7 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
214
220
|
emits: ["update:modelValue", "click:submit"],
|
|
215
221
|
setup(R, { expose: p, emit: v }) {
|
|
216
222
|
var h;
|
|
217
|
-
const r = R, l = v, { t: c } =
|
|
223
|
+
const r = R, l = v, { t: c } = H(), i = V({
|
|
218
224
|
get() {
|
|
219
225
|
var n;
|
|
220
226
|
return ((n = r.modelValue) == null ? void 0 : n.name) ?? "";
|
|
@@ -236,7 +242,7 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
236
242
|
function d() {
|
|
237
243
|
l("click:submit");
|
|
238
244
|
}
|
|
239
|
-
const u =
|
|
245
|
+
const u = E();
|
|
240
246
|
p({
|
|
241
247
|
validateInputs: () => {
|
|
242
248
|
var n, o;
|
|
@@ -251,7 +257,7 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
251
257
|
(o = (n = u.value) == null ? void 0 : n.resetInputs) == null || o.call(n);
|
|
252
258
|
}
|
|
253
259
|
});
|
|
254
|
-
const t = I(), a =
|
|
260
|
+
const t = I(), a = E([]), e = E(!1), b = E(!1);
|
|
255
261
|
ue(e, async (n) => {
|
|
256
262
|
_(n);
|
|
257
263
|
});
|
|
@@ -261,77 +267,77 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
261
267
|
}
|
|
262
268
|
const s = V(
|
|
263
269
|
() => t.recipes.map((n) => ({ label: n.name, value: n.name }))
|
|
264
|
-
), m =
|
|
270
|
+
), m = E((h = r.modelValue) == null ? void 0 : h.name);
|
|
265
271
|
return (n, o) => {
|
|
266
|
-
const k =
|
|
267
|
-
return
|
|
272
|
+
const k = S("FmTextField"), K = S("FmCard"), $ = S("FmSwitch"), D = S("FmSpacer"), M = S("FmCircularProgress"), U = S("FmForm");
|
|
273
|
+
return C(), T(U, {
|
|
268
274
|
ref_key: "formRef",
|
|
269
275
|
ref: u,
|
|
270
276
|
onValidationSuccess: d
|
|
271
277
|
}, {
|
|
272
278
|
default: P(() => [
|
|
273
|
-
w("div",
|
|
279
|
+
w("div", ze, [
|
|
274
280
|
g(k, {
|
|
275
281
|
disabled: n.disabled,
|
|
276
282
|
label: y(c)("inventory.recipe.name"),
|
|
277
283
|
"model-value": i.value,
|
|
278
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
284
|
+
"onUpdate:modelValue": o[0] || (o[0] = (F) => i.value = F),
|
|
279
285
|
rules: [
|
|
280
|
-
y(
|
|
281
|
-
y(
|
|
286
|
+
y(Fe)(),
|
|
287
|
+
y(Se)(s.value, m.value, (F) => `[${F.value}] already exists`)
|
|
282
288
|
],
|
|
283
289
|
"label-mark": "required"
|
|
284
290
|
}, null, 8, ["disabled", "label", "model-value", "rules"]),
|
|
285
|
-
g(
|
|
291
|
+
g(K, {
|
|
286
292
|
variant: "outlined",
|
|
287
293
|
class: "p-16"
|
|
288
294
|
}, {
|
|
289
295
|
default: P(() => {
|
|
290
|
-
var
|
|
296
|
+
var F;
|
|
291
297
|
return [
|
|
292
|
-
g(
|
|
293
|
-
id: (
|
|
298
|
+
g($e, {
|
|
299
|
+
id: (F = n.modelValue) == null ? void 0 : F._id,
|
|
294
300
|
disabled: n.disabled,
|
|
295
301
|
"model-value": f.value,
|
|
296
302
|
"onUpdate:modelValue": o[1] || (o[1] = (B) => f.value = B),
|
|
297
|
-
rules: [y(
|
|
303
|
+
rules: [y(Ve)(1)]
|
|
298
304
|
}, null, 8, ["id", "disabled", "model-value", "rules"])
|
|
299
305
|
];
|
|
300
306
|
}),
|
|
301
307
|
_: 1
|
|
302
308
|
})
|
|
303
309
|
]),
|
|
304
|
-
n.mode !== y(x).CREATE ? (
|
|
310
|
+
n.mode !== y(x).CREATE ? (C(), A("div", Ye, [
|
|
305
311
|
w("div", null, [
|
|
306
312
|
g($, {
|
|
307
313
|
label: "Show binded items",
|
|
308
314
|
modelValue: e.value,
|
|
309
|
-
"onUpdate:modelValue": o[2] || (o[2] = (
|
|
315
|
+
"onUpdate:modelValue": o[2] || (o[2] = (F) => e.value = F),
|
|
310
316
|
"label-placement": "right",
|
|
311
317
|
disabled: b.value
|
|
312
318
|
}, null, 8, ["modelValue", "disabled"])
|
|
313
319
|
]),
|
|
314
|
-
b.value ? (
|
|
320
|
+
b.value ? (C(), A("div", He, [
|
|
315
321
|
g(D),
|
|
316
322
|
w("div", null, [
|
|
317
323
|
g(M, { size: "xl" })
|
|
318
324
|
]),
|
|
319
325
|
o[3] || (o[3] = w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
|
|
320
326
|
g(D)
|
|
321
|
-
])) : (
|
|
322
|
-
e.value && a.value.length ? (
|
|
327
|
+
])) : (C(), A("div", Ke, [
|
|
328
|
+
e.value && a.value.length ? (C(), T(le, {
|
|
323
329
|
key: 0,
|
|
324
330
|
name: "Menu",
|
|
325
331
|
bindings: a.value
|
|
326
|
-
}, null, 8, ["bindings"])) :
|
|
332
|
+
}, null, 8, ["bindings"])) : j("", !0)
|
|
327
333
|
]))
|
|
328
|
-
])) :
|
|
334
|
+
])) : j("", !0)
|
|
329
335
|
]),
|
|
330
336
|
_: 1
|
|
331
337
|
}, 512);
|
|
332
338
|
};
|
|
333
339
|
}
|
|
334
|
-
}),
|
|
340
|
+
}), qe = { class: "flex gap-4" }, Ge = /* @__PURE__ */ Y({
|
|
335
341
|
__name: "RecipeDialog",
|
|
336
342
|
props: {
|
|
337
343
|
show: { type: Boolean },
|
|
@@ -340,7 +346,7 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
340
346
|
},
|
|
341
347
|
emits: ["update:show"],
|
|
342
348
|
setup(R) {
|
|
343
|
-
const p = R, v = I(), r = se(), { t: l } =
|
|
349
|
+
const p = R, v = I(), r = se(), { t: l } = H(), c = ne(p, "show"), i = ne(p, "recipe"), f = V(() => {
|
|
344
350
|
switch (p.mode) {
|
|
345
351
|
case x.READ:
|
|
346
352
|
return "";
|
|
@@ -360,7 +366,7 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
360
366
|
return l("common.add");
|
|
361
367
|
}
|
|
362
368
|
return "";
|
|
363
|
-
}), u =
|
|
369
|
+
}), u = E(), t = E(!1);
|
|
364
370
|
async function a() {
|
|
365
371
|
t.value = !0;
|
|
366
372
|
try {
|
|
@@ -371,7 +377,7 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
371
377
|
type: "success"
|
|
372
378
|
});
|
|
373
379
|
} catch (s) {
|
|
374
|
-
s instanceof
|
|
380
|
+
s instanceof te || r.open({
|
|
375
381
|
title: l("inventory.recipe.create.error.title"),
|
|
376
382
|
message: l("inventory.recipe.create.error.message"),
|
|
377
383
|
type: "error"
|
|
@@ -389,7 +395,7 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
389
395
|
type: "success"
|
|
390
396
|
});
|
|
391
397
|
} catch (s) {
|
|
392
|
-
s instanceof
|
|
398
|
+
s instanceof te || r.open({
|
|
393
399
|
title: l("inventory.recipe.update.error.title"),
|
|
394
400
|
message: l("inventory.recipe.update.error.message"),
|
|
395
401
|
type: "error"
|
|
@@ -413,8 +419,8 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
413
419
|
}
|
|
414
420
|
}
|
|
415
421
|
return (s, m) => {
|
|
416
|
-
const h =
|
|
417
|
-
return
|
|
422
|
+
const h = S("FmButton"), n = S("FmSideSheet");
|
|
423
|
+
return C(), T(n, {
|
|
418
424
|
"model-value": y(c),
|
|
419
425
|
"onUpdate:modelValue": m[3] || (m[3] = (o) => Z(c) ? c.value = o : null),
|
|
420
426
|
header: f.value,
|
|
@@ -423,7 +429,7 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
423
429
|
"max-width": 500
|
|
424
430
|
}, {
|
|
425
431
|
"side-sheet-footer": P(() => [
|
|
426
|
-
w("div",
|
|
432
|
+
w("div", qe, [
|
|
427
433
|
g(h, {
|
|
428
434
|
loading: t.value,
|
|
429
435
|
label: d.value,
|
|
@@ -438,7 +444,7 @@ const Le = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
438
444
|
])
|
|
439
445
|
]),
|
|
440
446
|
default: P(() => [
|
|
441
|
-
g(
|
|
447
|
+
g(je, {
|
|
442
448
|
class: "w-full",
|
|
443
449
|
ref_key: "hasValidationExpose",
|
|
444
450
|
ref: u,
|
|
@@ -469,7 +475,7 @@ function Oe() {
|
|
|
469
475
|
"RECIPE",
|
|
470
476
|
"",
|
|
471
477
|
(_ = v[e.id]) == null ? void 0 : _.name,
|
|
472
|
-
|
|
478
|
+
z(e.amount),
|
|
473
479
|
"UNIT"
|
|
474
480
|
];
|
|
475
481
|
}
|
|
@@ -482,7 +488,7 @@ function Oe() {
|
|
|
482
488
|
"INGREDIENT",
|
|
483
489
|
(_ = r[e.id]) == null ? void 0 : _.code,
|
|
484
490
|
(s = r[e.id]) == null ? void 0 : s.name,
|
|
485
|
-
|
|
491
|
+
z(e.amount),
|
|
486
492
|
e.measurement ? e.measurement.abbrev : (h = (m = r[e.id]) == null ? void 0 : m.unit) == null ? void 0 : h.abbrev
|
|
487
493
|
];
|
|
488
494
|
}
|
|
@@ -493,23 +499,23 @@ function Oe() {
|
|
|
493
499
|
...d === 0 ? [] : [["", "", "", "", "", ""]],
|
|
494
500
|
[f.name, "No bindings", "", "", "", ""]
|
|
495
501
|
];
|
|
496
|
-
}), i =
|
|
497
|
-
|
|
502
|
+
}), i = Ae(l, ["Name", "Type", "Code", "Item", "Amount", "Unit"]);
|
|
503
|
+
Pe(i, `RECIPE_${Be(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
|
|
498
504
|
}
|
|
499
|
-
const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, We = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
505
|
+
const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, We = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mt = /* @__PURE__ */ Y({
|
|
500
506
|
__name: "RecipeView",
|
|
501
507
|
setup(R) {
|
|
502
|
-
const p = I(), v = V(() => p.recipes), r =
|
|
508
|
+
const p = I(), v = V(() => p.recipes), r = ge(), { createRecipe: l, updateRecipe: c } = q(), { recipeDialogProps: i, recipeViewLoading: f } = xe(q()), { columnDefs: d, formatRowData: u } = Le(), t = V(() => u(v.value));
|
|
503
509
|
function a(o) {
|
|
504
510
|
if (o === "add")
|
|
505
511
|
return l();
|
|
506
512
|
if (o === "export")
|
|
507
513
|
return Oe();
|
|
508
514
|
}
|
|
509
|
-
const e =
|
|
515
|
+
const e = E(""), b = V(() => f.value), { breakpoints: _ } = _e(), s = V(() => _.value.xs || _.value.sm), m = V(() => s.value ? 10 : 20), h = ke(), { t: n } = H();
|
|
510
516
|
return (o, k) => {
|
|
511
|
-
const
|
|
512
|
-
return
|
|
517
|
+
const K = S("FmTable");
|
|
518
|
+
return C(), T(De, {
|
|
513
519
|
title: y(n)("inventory.recipe.title"),
|
|
514
520
|
actions: [
|
|
515
521
|
{
|
|
@@ -532,12 +538,12 @@ const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-60
|
|
|
532
538
|
}
|
|
533
539
|
])
|
|
534
540
|
}, [
|
|
535
|
-
g(
|
|
541
|
+
g(Ie, {
|
|
536
542
|
searchable: "",
|
|
537
543
|
search: e.value,
|
|
538
544
|
"onUpdate:search": k[0] || (k[0] = ($) => e.value = $)
|
|
539
545
|
}, null, 8, ["search"]),
|
|
540
|
-
(
|
|
546
|
+
(C(), T(K, {
|
|
541
547
|
style: me(y(h).tableHeight),
|
|
542
548
|
"column-defs": y(d),
|
|
543
549
|
"row-data": t.value,
|
|
@@ -548,22 +554,22 @@ const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-60
|
|
|
548
554
|
"page-size": m.value
|
|
549
555
|
}, {
|
|
550
556
|
"list-row": P(($) => [
|
|
551
|
-
g(
|
|
557
|
+
g(Ee, {
|
|
552
558
|
row: $,
|
|
553
559
|
onRowClick: (D) => y(c)(D.original)
|
|
554
560
|
}, {
|
|
555
561
|
default: P((D) => {
|
|
556
|
-
var M, U,
|
|
562
|
+
var M, U, F, B, O, J, Q, W, N, X;
|
|
557
563
|
return [
|
|
558
564
|
w("div", Je, [
|
|
559
565
|
w("div", Qe, [
|
|
560
|
-
g(y(
|
|
561
|
-
render: (
|
|
566
|
+
g(y(ae), {
|
|
567
|
+
render: (F = (U = (M = D.recipe) == null ? void 0 : M.column) == null ? void 0 : U.columnDef) == null ? void 0 : F.cell,
|
|
562
568
|
props: (O = (B = D.recipe) == null ? void 0 : B.getContext) == null ? void 0 : O.call(B)
|
|
563
569
|
}, null, 8, ["render", "props"])
|
|
564
570
|
]),
|
|
565
571
|
w("div", We, [
|
|
566
|
-
g(y(
|
|
572
|
+
g(y(ae), {
|
|
567
573
|
render: (W = (Q = (J = D.ingredients) == null ? void 0 : J.column) == null ? void 0 : Q.columnDef) == null ? void 0 : W.cell,
|
|
568
574
|
props: (X = (N = D.ingredients) == null ? void 0 : N.getContext) == null ? void 0 : X.call(N)
|
|
569
575
|
}, null, 8, ["render", "props"])
|
|
@@ -577,7 +583,7 @@ const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-60
|
|
|
577
583
|
_: 1
|
|
578
584
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
579
585
|
], 2),
|
|
580
|
-
(
|
|
586
|
+
(C(), T(pe, { to: "body" }, [
|
|
581
587
|
g(Ge, fe(ve(y(i))), null, 16)
|
|
582
588
|
]))
|
|
583
589
|
]),
|
|
@@ -587,5 +593,5 @@ const Je = { class: "flex flex-col py-8" }, Qe = { class: "fm-typo-en-body-lg-60
|
|
|
587
593
|
}
|
|
588
594
|
});
|
|
589
595
|
export {
|
|
590
|
-
|
|
596
|
+
mt as default
|
|
591
597
|
};
|