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