@feedmepos/mf-inventory-portal 1.2.30-dev.1 → 1.2.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-kX4bqoEe.js → App-CZJre5y8.js} +57 -55
- package/dist/{ApprovalView-DCNKqVE2.js → ApprovalView-CnxHxojY.js} +34 -28
- package/dist/{BindingsDialog-d7f1f8gf.js → BindingsDialog-C6lCOPNs.js} +2 -2
- package/dist/{BindingsPicker-2HJOx0QW.js → BindingsPicker-DZtFKLQ5.js} +6 -5
- package/dist/{BindingsTable-CPAjxOZG.js → BindingsTable-BmQGLuJ4.js} +28 -24
- package/dist/{ClosingDraftView-CUng41eo.js → ClosingDraftView-KLtlh31f.js} +183 -175
- package/dist/{ClosingHistoryView-CcGc2NwU.js → ClosingHistoryView-Rf1yMhMj.js} +43 -41
- package/dist/ClosingTemplateView-C_IiKnGx.js +2019 -0
- package/dist/{DeliveryOrderPrintPreview-BsM-CCc5.js → DeliveryOrderPrintPreview-UF7V005U.js} +15 -14
- package/dist/FmDroppableField-J0xUsOTV.js +154 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-cuggJ5Xd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BcMvEdc0.js} +74 -72
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js +279 -0
- package/dist/{FmMultiselectDialog-BGbrqXUF.js → FmMultiselectDialog-B0aKuf2o.js} +1 -1
- package/dist/FmMultiselectDialog-BasrjBFA.js +597 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-isogcN1O.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CaYJJkXz.js} +51 -49
- package/dist/{ImportView-wAVrMEwL.js → ImportView-DRSoz0uM.js} +81 -74
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVUF4I2Q.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DA8SlWPy.js} +5 -5
- package/dist/{IngredientGroupView-BZczeXdL.js → IngredientGroupView-D5Laak2-.js} +73 -65
- package/dist/{IngredientsView-D5N5Y1ZY.js → IngredientsView-TG3fPQhR.js} +358 -345
- package/dist/{IntegrationView-Hrslmuc1.js → IntegrationView-CElpjyo7.js} +219 -209
- package/dist/{InventoryBindingForm-DH6wgxOG.js → InventoryBindingForm-CBgxRYBd.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Drr5vD6f.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ys5GBHoQ.js} +41 -40
- package/dist/{InventoryBindingSummary-BU1ehpQZ.js → InventoryBindingSummary-OK3vNWhi.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1ueC4GfZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9QRntUlk.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-FHcU1zZt.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bc01NoOn.js} +22 -21
- package/dist/{PublishView-CQtj0f31.js → PublishView-CLMfiLjP.js} +26 -23
- package/dist/{PurchaseOrderPrintPreview-BQyXtHST.js → PurchaseOrderPrintPreview-Dy77yWDC.js} +10 -9
- package/dist/{ReceiveRequestView-Dm-h_SrY.js → ReceiveRequestView-BhD-NaHE.js} +478 -462
- package/dist/{RecipeView-DNNRvr1w.js → RecipeView-RWaO94w_.js} +73 -64
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js +251 -0
- package/dist/{StockView-CaOm5BCx.js → StockView-D5t8OxaG.js} +292 -282
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Z91XRszD.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-3Asf1TGd.js} +1 -1
- package/dist/{SupplierView-JSII9qwL.js → SupplierView-DiospFKq.js} +92 -80
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-DfCHteOF.js +177 -0
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CNtvx-LA.js +123 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Mehd4lGs.js → TransferDetails.vue_vue_type_script_setup_true_lang-p959Op4k.js} +318 -305
- package/dist/{TransferTemplateView-DyCpNKJd.js → TransferTemplateView-ePZFdZ0p.js} +228 -216
- package/dist/{UnitView-CqN7mlJ2.js → UnitView-Banlxw7y.js} +70 -63
- package/dist/{WarehouseView-gFWD-m8e.js → WarehouseView-BL-p5hbi.js} +123 -114
- package/dist/WastageTemplateView-B1pmSuW0.js +2288 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-EpEEb8EO.js +64040 -0
- package/dist/app-rgirz_52.js +8024 -0
- package/dist/app.d.ts +0 -21
- package/dist/app.js +6 -6
- package/dist/closing-template-zIjwO1_E.js +117 -0
- package/dist/date2-Dnc8Y81g.js +116 -0
- package/dist/dayjs.min-TdUgzmww.js +282 -0
- package/dist/{decimal-DfF_g5rc.js → decimal-C6s3GvGb.js} +4 -3
- package/dist/defineDeepModel-BSaaXVBF.js +19 -0
- package/dist/duplicate-template-Bw0H416G.js +34 -0
- package/dist/feature-C95Hao53.js +20162 -0
- package/dist/form-mode.enum-BKiNVH6A.js +4 -0
- package/dist/format-time-from-id-DlbHo6kY.js +15 -0
- package/dist/{format-unit-display-ivAljvlo.js → format-unit-display-QBS54q0R.js} +308 -297
- package/dist/{import-export.helper-B2MWv9v7.js → import-export.helper-CUKCKtP7.js} +56 -52
- package/dist/index-CFn_9RMm.js +45 -0
- package/dist/{index-DZaT0ZaL.js → index-S9Ak__QC.js} +1 -1
- package/dist/{index-BbhuWHyh.js → index-goD-WGVb.js} +16 -14
- package/dist/lodash-gq8IrP4j.js +3678 -0
- package/dist/netsuite-CnhAKyAO.js +4316 -0
- package/dist/{purchase-order-template-DdybMC_P.js → purchase-order-template-CBIpWdEW.js} +1 -1
- package/dist/router/shared.spec.d.ts +1 -0
- package/dist/row-action.enum-BcW_L_nE.js +67 -0
- package/dist/rules-DKklsaS1.js +201 -0
- package/dist/{stock-BYagIdsj.js → stock-3K93Mif9.js} +1 -1
- package/dist/{stock-V4ciPiBe.js → stock-BW8fen3H.js} +11 -10
- package/dist/style.css +1 -1
- package/dist/{supplier-CgtB1I9I.js → supplier-CObCSfot.js} +27 -26
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BIQovyZX.js → use-ingredient-select-dialog-DwvQiaVW.js} +4 -3
- package/dist/{use-inventory-binding-dialog-DyjicXgc.js → use-inventory-binding-dialog-CuLEHLDM.js} +4 -3
- package/dist/use-template-enabled-locations-2-DkUJeppb.js +111 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1 -1
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +0 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1 -13
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +0 -12
- package/dist/vue-i18n-CUznvVzc.js +2365 -0
- package/dist/xlsx-bT1p3YVR.js +24004 -0
- package/dist/xlsx.util-Cr9DpDFb.js +78 -0
- package/package.json +5 -5
- package/dist/ClosingTemplateView-D8IAdhDb.js +0 -2041
- package/dist/app-CnQ49Lyb.js +0 -131483
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as A,
|
|
3
|
-
import { useDialog as le, useSnackbar as
|
|
4
|
-
import { i as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { defineComponent as Y, ref as E, onMounted as ie, resolveComponent as F, openBlock as k, createElementBlock as B, Fragment as ue, createElementVNode as x, toDisplayString as ce, createVNode as y, createCommentVNode as q, computed as I, watch as de, createBlock as G, withCtx as U, unref as g, isRef as te, normalizeClass as me, normalizeStyle as pe, Teleport as fe, normalizeProps as ve, guardReactiveProps as ye } from "vue";
|
|
2
|
+
import { a as A, c as Q, S as ge, F as H, j as ne, u as be } from "./app-EpEEb8EO.js";
|
|
3
|
+
import { useDialog as le, useSnackbar as W, useProxiedModel as oe, useBreakpoints as _e } from "@feedmepos/ui-library";
|
|
4
|
+
import { i as Re, _ as he } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
+
import { F as C } from "./form-mode.enum-BKiNVH6A.js";
|
|
6
|
+
import { _ as re } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-DA8SlWPy.js";
|
|
7
|
+
import { defineStore as we, storeToRefs as Se } from "pinia";
|
|
8
|
+
import { D as ae, R as K } from "./row-action.enum-BcW_L_nE.js";
|
|
9
|
+
import { c as xe, _ as Ve, F as se } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
10
|
+
import { a as P, R as Ce, U as Ee, A as ke } from "./rules-DKklsaS1.js";
|
|
7
11
|
import { useI18n as O } from "@feedmepos/mf-common";
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
12
|
+
import { u as Fe, _ as Ie } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js";
|
|
13
|
+
import { _ as $e } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ys5GBHoQ.js";
|
|
14
|
+
import { _ as De } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
|
|
15
|
+
import { u as Ae } from "./feature-C95Hao53.js";
|
|
16
|
+
import { b as Be, d as Pe } from "./xlsx.util-Cr9DpDFb.js";
|
|
17
|
+
import { f as Ue } from "./date2-Dnc8Y81g.js";
|
|
18
|
+
import { _ as Te } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js";
|
|
10
19
|
const Me = {
|
|
11
20
|
key: 0,
|
|
12
21
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
13
|
-
}, Ge = { key: 1 }, Ne = { key: 0 }, Le = /* @__PURE__ */
|
|
22
|
+
}, Ge = { key: 1 }, Ne = { key: 0 }, Le = /* @__PURE__ */ Y({
|
|
14
23
|
__name: "DeleteDialog",
|
|
15
24
|
props: {
|
|
16
25
|
type: {},
|
|
@@ -28,7 +37,7 @@ const Me = {
|
|
|
28
37
|
!s.value && ((c = f.data) != null && c._id) && (s.value = !0, v.value = await A().getAffectedMenu((m = f.data) == null ? void 0 : m._id), s.value = !1);
|
|
29
38
|
}
|
|
30
39
|
return (c, m) => {
|
|
31
|
-
const w =
|
|
40
|
+
const w = F("FmSpacer"), r = F("FmCircularProgress");
|
|
32
41
|
return k(), B(ue, null, [
|
|
33
42
|
x("p", null, ce(c.message), 1),
|
|
34
43
|
s.value ? (k(), B("div", Me, [
|
|
@@ -51,8 +60,8 @@ const Me = {
|
|
|
51
60
|
], 64);
|
|
52
61
|
};
|
|
53
62
|
}
|
|
54
|
-
}), J =
|
|
55
|
-
const f = le(), v =
|
|
63
|
+
}), J = we("recipeForm", function() {
|
|
64
|
+
const f = le(), v = W(), s = A(), l = E(!1), c = E();
|
|
56
65
|
function m() {
|
|
57
66
|
const n = {
|
|
58
67
|
recipe: {},
|
|
@@ -66,7 +75,7 @@ const Me = {
|
|
|
66
75
|
}
|
|
67
76
|
async function w(n) {
|
|
68
77
|
const o = {
|
|
69
|
-
recipe:
|
|
78
|
+
recipe: Q(n),
|
|
70
79
|
mode: C.UPDATE,
|
|
71
80
|
show: !0,
|
|
72
81
|
"onUpdate:show"(u) {
|
|
@@ -84,9 +93,9 @@ const Me = {
|
|
|
84
93
|
type: "success"
|
|
85
94
|
});
|
|
86
95
|
} catch (o) {
|
|
87
|
-
o instanceof ge &&
|
|
96
|
+
o instanceof ge && Re(o) ? f.open({
|
|
88
97
|
title: "Cannot delete recipe",
|
|
89
|
-
contentComponent:
|
|
98
|
+
contentComponent: he,
|
|
90
99
|
contentComponentProps: {
|
|
91
100
|
subject: (n == null ? void 0 : n.name) ?? "",
|
|
92
101
|
items: o.errorResponse.message
|
|
@@ -136,12 +145,12 @@ const Me = {
|
|
|
136
145
|
function ze() {
|
|
137
146
|
const { updateRecipe: b, deleteRecipe: f } = J(), v = A(), { t: s } = O();
|
|
138
147
|
async function l(r, p) {
|
|
139
|
-
const n =
|
|
140
|
-
if (r ===
|
|
148
|
+
const n = Q(p);
|
|
149
|
+
if (r === K.Edit) {
|
|
141
150
|
await b(n);
|
|
142
151
|
return;
|
|
143
152
|
}
|
|
144
|
-
if (r ===
|
|
153
|
+
if (r === K.Delete) {
|
|
145
154
|
await f(n);
|
|
146
155
|
return;
|
|
147
156
|
}
|
|
@@ -173,8 +182,8 @@ function ze() {
|
|
|
173
182
|
id: "action",
|
|
174
183
|
header: "",
|
|
175
184
|
cell(r) {
|
|
176
|
-
return
|
|
177
|
-
[
|
|
185
|
+
return xe(
|
|
186
|
+
[ae[K.Edit], ae[K.Delete]],
|
|
178
187
|
(p) => {
|
|
179
188
|
l(p, r.row.original.original);
|
|
180
189
|
}
|
|
@@ -206,13 +215,13 @@ function ze() {
|
|
|
206
215
|
}
|
|
207
216
|
return { columnDefs: m, formatRowData: w };
|
|
208
217
|
}
|
|
209
|
-
const
|
|
218
|
+
const je = { class: "flex flex-col gap-40" }, Ke = {
|
|
210
219
|
key: 0,
|
|
211
220
|
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"
|
|
212
|
-
},
|
|
221
|
+
}, Ye = {
|
|
213
222
|
key: 0,
|
|
214
223
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
215
|
-
}, Oe = { key: 1 }, He = { class: "mt-32" }, qe = /* @__PURE__ */
|
|
224
|
+
}, Oe = { key: 1 }, He = { class: "mt-32" }, qe = /* @__PURE__ */ Y({
|
|
216
225
|
__name: "RecipeForm",
|
|
217
226
|
props: {
|
|
218
227
|
mode: {},
|
|
@@ -222,7 +231,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
222
231
|
emits: ["update:modelValue", "click:submit"],
|
|
223
232
|
setup(b, { expose: f, emit: v }) {
|
|
224
233
|
var R;
|
|
225
|
-
const s = b, l = v, c =
|
|
234
|
+
const s = b, l = v, c = Ae(), { t: m } = O(), w = I({
|
|
226
235
|
get() {
|
|
227
236
|
var t;
|
|
228
237
|
return ((t = s.modelValue) == null ? void 0 : t.name) ?? "";
|
|
@@ -231,7 +240,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
231
240
|
const a = s.modelValue ?? {};
|
|
232
241
|
a.name = t, l("update:modelValue", a);
|
|
233
242
|
}
|
|
234
|
-
}), r =
|
|
243
|
+
}), r = I({
|
|
235
244
|
get() {
|
|
236
245
|
var t;
|
|
237
246
|
return ((t = s.modelValue) == null ? void 0 : t.contains) ?? [];
|
|
@@ -240,7 +249,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
240
249
|
const a = s.modelValue ?? {};
|
|
241
250
|
a.contains = t, l("update:modelValue", a);
|
|
242
251
|
}
|
|
243
|
-
}), p =
|
|
252
|
+
}), p = I({
|
|
244
253
|
get() {
|
|
245
254
|
var t;
|
|
246
255
|
return ((t = s.modelValue) == null ? void 0 : t.customAttributes) ?? {};
|
|
@@ -278,26 +287,26 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
278
287
|
var a, $;
|
|
279
288
|
t && !e.value && ((a = s.modelValue) != null && a._id) && (e.value = !0, i.value = await u.getAffectedMenu(($ = s.modelValue) == null ? void 0 : $._id).delayed(500), e.value = !1);
|
|
280
289
|
}
|
|
281
|
-
const _ =
|
|
290
|
+
const _ = I(
|
|
282
291
|
() => u.recipes.map((t) => ({ label: t.name, value: t.name }))
|
|
283
292
|
), h = E((R = s.modelValue) == null ? void 0 : R.name);
|
|
284
293
|
return (t, a) => {
|
|
285
|
-
const $ =
|
|
294
|
+
const $ = F("FmTextField"), D = F("FmCard"), N = F("FmSwitch"), M = F("FmSpacer"), L = F("FmCircularProgress"), T = F("FmForm");
|
|
286
295
|
return k(), G(T, {
|
|
287
296
|
ref_key: "formRef",
|
|
288
297
|
ref: o,
|
|
289
298
|
onValidationSuccess: n
|
|
290
299
|
}, {
|
|
291
300
|
default: U(() => [
|
|
292
|
-
x("div",
|
|
301
|
+
x("div", je, [
|
|
293
302
|
y($, {
|
|
294
303
|
disabled: t.disabled,
|
|
295
304
|
label: g(m)("inventory.recipe.name"),
|
|
296
305
|
"model-value": w.value,
|
|
297
306
|
"onUpdate:modelValue": a[0] || (a[0] = (V) => w.value = V),
|
|
298
307
|
rules: [
|
|
299
|
-
g(
|
|
300
|
-
g(
|
|
308
|
+
g(Ce)(),
|
|
309
|
+
g(Ee)(_.value, h.value, (V) => `[${V.value}] already exists`)
|
|
301
310
|
],
|
|
302
311
|
"label-mark": "required"
|
|
303
312
|
}, null, 8, ["disabled", "label", "model-value", "rules"]),
|
|
@@ -308,12 +317,12 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
308
317
|
default: U(() => {
|
|
309
318
|
var V;
|
|
310
319
|
return [
|
|
311
|
-
y(
|
|
320
|
+
y($e, {
|
|
312
321
|
id: (V = t.modelValue) == null ? void 0 : V._id,
|
|
313
322
|
disabled: t.disabled,
|
|
314
323
|
"model-value": r.value,
|
|
315
324
|
"onUpdate:modelValue": a[1] || (a[1] = (z) => r.value = z),
|
|
316
|
-
rules: [g(
|
|
325
|
+
rules: [g(ke)(1)],
|
|
317
326
|
"enable-ingredient-group": g(c).enableIngredientGroup
|
|
318
327
|
}, null, 8, ["id", "disabled", "model-value", "rules", "enable-ingredient-group"])
|
|
319
328
|
];
|
|
@@ -321,7 +330,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
321
330
|
_: 1
|
|
322
331
|
})
|
|
323
332
|
]),
|
|
324
|
-
t.mode !== g(C).CREATE ? (k(), B("div",
|
|
333
|
+
t.mode !== g(C).CREATE ? (k(), B("div", Ke, [
|
|
325
334
|
y(N, {
|
|
326
335
|
label: "Show binded items",
|
|
327
336
|
modelValue: S.value,
|
|
@@ -329,7 +338,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
329
338
|
"label-placement": "right",
|
|
330
339
|
disabled: e.value
|
|
331
340
|
}, null, 8, ["modelValue", "disabled"]),
|
|
332
|
-
e.value ? (k(), B("div",
|
|
341
|
+
e.value ? (k(), B("div", Ye, [
|
|
333
342
|
y(M),
|
|
334
343
|
x("div", null, [
|
|
335
344
|
y(L, { size: "xl" })
|
|
@@ -344,7 +353,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
344
353
|
])) : q("", !0)
|
|
345
354
|
])) : q("", !0),
|
|
346
355
|
x("div", He, [
|
|
347
|
-
y(
|
|
356
|
+
y(De, {
|
|
348
357
|
entity: "inventoryRecipe",
|
|
349
358
|
modelValue: p.value,
|
|
350
359
|
"onUpdate:modelValue": a[3] || (a[3] = (V) => p.value = V)
|
|
@@ -355,7 +364,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
355
364
|
}, 512);
|
|
356
365
|
};
|
|
357
366
|
}
|
|
358
|
-
}), Je = { class: "flex gap-4" },
|
|
367
|
+
}), Je = { class: "flex gap-4" }, Qe = /* @__PURE__ */ Y({
|
|
359
368
|
__name: "RecipeDialog",
|
|
360
369
|
props: {
|
|
361
370
|
show: { type: Boolean },
|
|
@@ -364,7 +373,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
364
373
|
},
|
|
365
374
|
emits: ["update:show"],
|
|
366
375
|
setup(b) {
|
|
367
|
-
const f = b, v = A(), s =
|
|
376
|
+
const f = b, v = A(), s = W(), { t: l } = O(), c = oe(f, "show"), m = oe(f, "recipe"), w = I(() => {
|
|
368
377
|
switch (f.mode) {
|
|
369
378
|
case C.READ:
|
|
370
379
|
return "";
|
|
@@ -374,7 +383,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
374
383
|
return l("inventory.recipe.create.title");
|
|
375
384
|
}
|
|
376
385
|
return "";
|
|
377
|
-
}), r =
|
|
386
|
+
}), r = I(() => {
|
|
378
387
|
switch (f.mode) {
|
|
379
388
|
case C.READ:
|
|
380
389
|
return "";
|
|
@@ -388,14 +397,14 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
388
397
|
async function o() {
|
|
389
398
|
n.value = !0;
|
|
390
399
|
try {
|
|
391
|
-
const e =
|
|
400
|
+
const e = Q(m.value);
|
|
392
401
|
e.precision ?? (e.precision = 0), e.measurements ?? (e.measurements = []), await v.createRecipe(e), c.value = !1, s.open({
|
|
393
402
|
title: l("inventory.common.success"),
|
|
394
403
|
message: l("inventory.recipe.create.success", { name: m.value.name }),
|
|
395
404
|
type: "success"
|
|
396
405
|
});
|
|
397
406
|
} catch (e) {
|
|
398
|
-
e instanceof
|
|
407
|
+
e instanceof ne || s.open({
|
|
399
408
|
title: l("inventory.recipe.create.error.title"),
|
|
400
409
|
message: l("inventory.recipe.create.error.message"),
|
|
401
410
|
type: "error"
|
|
@@ -413,7 +422,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
413
422
|
type: "success"
|
|
414
423
|
});
|
|
415
424
|
} catch (e) {
|
|
416
|
-
e instanceof
|
|
425
|
+
e instanceof ne || s.open({
|
|
417
426
|
title: l("inventory.recipe.update.error.title"),
|
|
418
427
|
message: l("inventory.recipe.update.error.message"),
|
|
419
428
|
type: "error"
|
|
@@ -437,7 +446,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
437
446
|
}
|
|
438
447
|
}
|
|
439
448
|
return (e, d) => {
|
|
440
|
-
const _ =
|
|
449
|
+
const _ = F("FmButton"), h = F("FmSideSheet");
|
|
441
450
|
return k(), G(h, {
|
|
442
451
|
"model-value": g(c),
|
|
443
452
|
"onUpdate:modelValue": d[3] || (d[3] = (R) => te(c) ? c.value = R : null),
|
|
@@ -478,13 +487,13 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
|
|
|
478
487
|
};
|
|
479
488
|
}
|
|
480
489
|
});
|
|
481
|
-
function
|
|
490
|
+
function We(b) {
|
|
482
491
|
return !b || Object.keys(b).length === 0 ? "" : Object.entries(b).map(([f, v]) => `${f}: ${v}`).join(", ");
|
|
483
492
|
}
|
|
484
|
-
function
|
|
493
|
+
function Xe() {
|
|
485
494
|
const b = A(), f = b.recipes, v = b.recipeById, s = b.skuById, l = b.skuGroupById, c = f.flatMap((r, p) => {
|
|
486
495
|
var o;
|
|
487
|
-
const n =
|
|
496
|
+
const n = We(r.customAttributes);
|
|
488
497
|
if ((o = r.contains) != null && o.length) {
|
|
489
498
|
const u = r.contains.filter((e) => e.type === "RECIPE"), i = r.contains.filter((e) => e.type === "SKU"), S = r.contains.filter((e) => e.type === "SKU_GROUP");
|
|
490
499
|
return [
|
|
@@ -537,24 +546,24 @@ function Qe() {
|
|
|
537
546
|
...p === 0 ? [] : [["", "", "", "", "", "", ""]],
|
|
538
547
|
[r.name, "No bindings", "", "", "", "", n]
|
|
539
548
|
];
|
|
540
|
-
}), w =
|
|
541
|
-
|
|
549
|
+
}), w = Be(c, ["Name", "Type", "Code", "Item", "Amount", "Unit", "Custom Attributes"]);
|
|
550
|
+
Pe(w, `RECIPE_${Ue(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
|
|
542
551
|
}
|
|
543
|
-
const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
552
|
+
const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rt = /* @__PURE__ */ Y({
|
|
544
553
|
__name: "RecipeView",
|
|
545
554
|
setup(b) {
|
|
546
|
-
const f = A(), v =
|
|
547
|
-
le(),
|
|
555
|
+
const f = A(), v = I(() => f.recipes), s = be(), { createRecipe: l, updateRecipe: c } = J(), { recipeDialogProps: m, recipeViewLoading: w } = Se(J()), { columnDefs: r, formatRowData: p } = ze(), n = I(() => p(v.value));
|
|
556
|
+
le(), W(), E(!1);
|
|
548
557
|
function o(R) {
|
|
549
558
|
if (R === "add")
|
|
550
559
|
return l();
|
|
551
560
|
if (R === "export")
|
|
552
|
-
return
|
|
561
|
+
return Xe();
|
|
553
562
|
}
|
|
554
|
-
const u = E(""), i =
|
|
563
|
+
const u = E(""), i = I(() => w.value), { breakpoints: S } = _e(), e = I(() => S.value.xs || S.value.sm), d = I(() => e.value ? 10 : 20), _ = Fe(), { t: h } = O();
|
|
555
564
|
return (R, t) => {
|
|
556
|
-
const a =
|
|
557
|
-
return k(), G(
|
|
565
|
+
const a = F("FmTable");
|
|
566
|
+
return k(), G(Ie, {
|
|
558
567
|
title: g(h)("inventory.recipe.title"),
|
|
559
568
|
actions: [
|
|
560
569
|
{
|
|
@@ -577,7 +586,7 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
|
|
|
577
586
|
}
|
|
578
587
|
])
|
|
579
588
|
}, [
|
|
580
|
-
y(
|
|
589
|
+
y(Te, {
|
|
581
590
|
searchable: "",
|
|
582
591
|
search: u.value,
|
|
583
592
|
"onUpdate:search": t[0] || (t[0] = ($) => u.value = $)
|
|
@@ -593,24 +602,24 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
|
|
|
593
602
|
"page-size": d.value
|
|
594
603
|
}, {
|
|
595
604
|
"list-row": U(($) => [
|
|
596
|
-
y(
|
|
605
|
+
y(Ve, {
|
|
597
606
|
row: $,
|
|
598
607
|
onRowClick: (D) => g(c)(D.original)
|
|
599
608
|
}, {
|
|
600
609
|
default: U((D) => {
|
|
601
|
-
var N, M, L, T, V, z,
|
|
610
|
+
var N, M, L, T, V, z, X, Z, j, ee;
|
|
602
611
|
return [
|
|
603
612
|
x("div", Ze, [
|
|
604
613
|
x("div", et, [
|
|
605
|
-
y(g(
|
|
614
|
+
y(g(se), {
|
|
606
615
|
render: (L = (M = (N = D.recipe) == null ? void 0 : N.column) == null ? void 0 : M.columnDef) == null ? void 0 : L.cell,
|
|
607
616
|
props: (V = (T = D.recipe) == null ? void 0 : T.getContext) == null ? void 0 : V.call(T)
|
|
608
617
|
}, null, 8, ["render", "props"])
|
|
609
618
|
]),
|
|
610
619
|
x("div", tt, [
|
|
611
|
-
y(g(
|
|
612
|
-
render: (Z = (
|
|
613
|
-
props: (ee = (
|
|
620
|
+
y(g(se), {
|
|
621
|
+
render: (Z = (X = (z = D.ingredients) == null ? void 0 : z.column) == null ? void 0 : X.columnDef) == null ? void 0 : Z.cell,
|
|
622
|
+
props: (ee = (j = D.ingredients) == null ? void 0 : j.getContext) == null ? void 0 : ee.call(j)
|
|
614
623
|
}, null, 8, ["render", "props"])
|
|
615
624
|
])
|
|
616
625
|
])
|
|
@@ -623,7 +632,7 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
|
|
|
623
632
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
624
633
|
], 2),
|
|
625
634
|
(k(), G(fe, { to: "body" }, [
|
|
626
|
-
y(
|
|
635
|
+
y(Qe, ve(ye(g(m))), null, 16)
|
|
627
636
|
]))
|
|
628
637
|
]),
|
|
629
638
|
_: 1
|
|
@@ -632,5 +641,5 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
|
|
|
632
641
|
}
|
|
633
642
|
});
|
|
634
643
|
export {
|
|
635
|
-
|
|
644
|
+
Rt as default
|
|
636
645
|
};
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { defineComponent as U, resolveComponent as _, unref as w, openBlock as l, createElementBlock as d, renderSlot as $, createElementVNode as c, normalizeClass as h, createVNode as m, reactive as P, onUnmounted as j, ref as D, computed as C, Fragment as y, createTextVNode as R, toDisplayString as V, createCommentVNode as g, createBlock as s, renderList as T, withCtx as k, Teleport as N } from "vue";
|
|
2
|
+
import { useBreakpoints as X } from "@feedmepos/ui-library";
|
|
3
|
+
import { useCoreStore as Y } from "@feedmepos/mf-common";
|
|
4
|
+
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const G = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "group gap-8 inline-flex items-center relative select-none border-1 border-dashed rounded-md border-red-500 hover:border-opacity-30 transition-opacity"
|
|
8
|
+
}, J = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-full" }, K = /* @__PURE__ */ U({
|
|
9
|
+
__name: "FmAdminBadge",
|
|
10
|
+
props: {
|
|
11
|
+
class: { default: void 0 }
|
|
12
|
+
},
|
|
13
|
+
setup(v) {
|
|
14
|
+
const p = v, b = Y();
|
|
15
|
+
return (a, r) => {
|
|
16
|
+
var n;
|
|
17
|
+
const t = _("FmIcon");
|
|
18
|
+
return (n = w(b).sessionUser.value) != null && n.role.isAdmin ? (l(), d("div", G, [
|
|
19
|
+
$(a.$slots, "default", {}, void 0, !0),
|
|
20
|
+
c("div", {
|
|
21
|
+
class: h([
|
|
22
|
+
"fm-admin-badge",
|
|
23
|
+
"group-hover:opacity-20",
|
|
24
|
+
p.class,
|
|
25
|
+
{
|
|
26
|
+
absolute: !0,
|
|
27
|
+
"bottom-[-5px] right-[-8px] px-4 h-[25px] w-[25px] border-2 border-red-800": !0
|
|
28
|
+
}
|
|
29
|
+
])
|
|
30
|
+
}, [
|
|
31
|
+
c("span", J, [
|
|
32
|
+
m(t, {
|
|
33
|
+
name: "support_agent",
|
|
34
|
+
size: "sm",
|
|
35
|
+
outline: ""
|
|
36
|
+
})
|
|
37
|
+
])
|
|
38
|
+
], 2)
|
|
39
|
+
])) : $(a.$slots, "non-admin", { key: 1 }, void 0, !0);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}), F = /* @__PURE__ */ q(K, [["__scopeId", "data-v-643bdbae"]]), I = P({});
|
|
43
|
+
function Q() {
|
|
44
|
+
const v = `${Math.random()}`, p = new ResizeObserver((r) => {
|
|
45
|
+
const t = r.map((n) => n.target.scrollHeight).reduce((n, x) => n + x);
|
|
46
|
+
I[v] = t;
|
|
47
|
+
}), b = (r) => {
|
|
48
|
+
const t = r.el;
|
|
49
|
+
t && p.observe(t);
|
|
50
|
+
}, a = (r) => {
|
|
51
|
+
const t = r.el;
|
|
52
|
+
t && p.unobserve(t);
|
|
53
|
+
};
|
|
54
|
+
return j(() => {
|
|
55
|
+
p.disconnect(), delete I[v];
|
|
56
|
+
}), {
|
|
57
|
+
get tableHeight() {
|
|
58
|
+
return {
|
|
59
|
+
height: `calc(100dvh - ${Object.values(I).reduce((n, x) => n + x, 0) + 80}px)`
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
onMounted: b,
|
|
63
|
+
onUnmounted: a
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const W = {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: /* @__PURE__ */ h(["text-fm-color-typo-secondary fm-typo-en-body-sm-400"])
|
|
69
|
+
}, Z = { class: "bg-white flex-1" }, ee = { class: "fixed bottom-96 right-16" }, M = 3, re = /* @__PURE__ */ U({
|
|
70
|
+
__name: "SingleColumnLayout",
|
|
71
|
+
props: {
|
|
72
|
+
actions: { default: () => [] },
|
|
73
|
+
title: { default: "Title" },
|
|
74
|
+
description: {},
|
|
75
|
+
showBackButton: { type: Boolean },
|
|
76
|
+
defaultPadding: { type: Boolean },
|
|
77
|
+
breadcrumbs: { default: () => [] },
|
|
78
|
+
helperText: {}
|
|
79
|
+
},
|
|
80
|
+
emits: ["click:action"],
|
|
81
|
+
setup(v, { emit: p }) {
|
|
82
|
+
const b = v, a = p, r = D(!1), t = C(() => b.actions.find((i) => i.isPrimary)), n = C(() => b.actions.filter((i) => !i.isPrimary)), x = C(
|
|
83
|
+
() => n.value.map(
|
|
84
|
+
(i) => ({
|
|
85
|
+
label: i.label,
|
|
86
|
+
value: i.value
|
|
87
|
+
})
|
|
88
|
+
)
|
|
89
|
+
), { breakpoints: S } = X(), f = C(() => S.value.xs || S.value.sm), A = Q();
|
|
90
|
+
return (i, o) => {
|
|
91
|
+
var O;
|
|
92
|
+
const u = _("FmButton"), H = _("FmMenuItem"), z = _("FmMenu"), E = _("FmCollapsibleTabs"), L = _("FmBottomSheet");
|
|
93
|
+
return l(), d(y, null, [
|
|
94
|
+
c("div", {
|
|
95
|
+
class: h([
|
|
96
|
+
"flex flex-col w-full bg-white h-full",
|
|
97
|
+
{
|
|
98
|
+
"gap-12": f.value
|
|
99
|
+
}
|
|
100
|
+
])
|
|
101
|
+
}, [
|
|
102
|
+
c("div", {
|
|
103
|
+
onVnodeMounted: o[3] || (o[3] = //@ts-ignore
|
|
104
|
+
(...e) => w(A).onMounted && w(A).onMounted(...e)),
|
|
105
|
+
class: h([
|
|
106
|
+
"flex gap-8 items-center",
|
|
107
|
+
{
|
|
108
|
+
"p-12 border-b-[1px] border-b-fm-color-neutral-gray-100": f.value,
|
|
109
|
+
"px-24 py-16": !f.value
|
|
110
|
+
}
|
|
111
|
+
])
|
|
112
|
+
}, [
|
|
113
|
+
c("div", {
|
|
114
|
+
class: h([
|
|
115
|
+
"flex-1 flex flex-col gap-4 fm-typo-en-title-md-600 bg-white",
|
|
116
|
+
{
|
|
117
|
+
"py-12": f.value
|
|
118
|
+
}
|
|
119
|
+
])
|
|
120
|
+
}, [
|
|
121
|
+
c("div", null, [
|
|
122
|
+
R(V(i.title) + " ", 1),
|
|
123
|
+
$(i.$slots, "headerInfo")
|
|
124
|
+
]),
|
|
125
|
+
i.helperText ? (l(), d("div", W, V(i.helperText), 1)) : g("", !0)
|
|
126
|
+
], 2),
|
|
127
|
+
f.value ? (l(), d(y, { key: 0 }, [
|
|
128
|
+
n.value.length ? (l(), s(u, {
|
|
129
|
+
key: 0,
|
|
130
|
+
variant: "tertiary",
|
|
131
|
+
"prepend-icon": "more_vert",
|
|
132
|
+
onClick: o[0] || (o[0] = (e) => r.value = !0)
|
|
133
|
+
})) : g("", !0)
|
|
134
|
+
], 64)) : (l(), d(y, { key: 1 }, [
|
|
135
|
+
(l(!0), d(y, null, T(n.value.slice(0, M), (e) => (l(), d(y, {
|
|
136
|
+
key: e.value
|
|
137
|
+
}, [
|
|
138
|
+
e.isAdminOnly ? (l(), s(F, { key: 0 }, {
|
|
139
|
+
default: k(() => [
|
|
140
|
+
m(u, {
|
|
141
|
+
label: e.label,
|
|
142
|
+
"prepend-icon": e.prependIcon,
|
|
143
|
+
variant: e.variant,
|
|
144
|
+
"bg-color": e.variant ? void 0 : "neutral-gray-100",
|
|
145
|
+
"text-color": e.variant ? void 0 : "neutral-gray-400",
|
|
146
|
+
onClick: (B) => a("click:action", e.value)
|
|
147
|
+
}, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color", "onClick"])
|
|
148
|
+
]),
|
|
149
|
+
_: 2
|
|
150
|
+
}, 1024)) : (l(), s(u, {
|
|
151
|
+
key: 1,
|
|
152
|
+
label: e.label,
|
|
153
|
+
"prepend-icon": e.prependIcon,
|
|
154
|
+
variant: e.variant,
|
|
155
|
+
"bg-color": e.variant ? void 0 : "neutral-gray-100",
|
|
156
|
+
"text-color": e.variant ? void 0 : "neutral-gray-400",
|
|
157
|
+
onClick: (B) => a("click:action", e.value)
|
|
158
|
+
}, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color", "onClick"]))
|
|
159
|
+
], 64))), 128)),
|
|
160
|
+
n.value.length > M ? (l(), s(z, { key: 0 }, {
|
|
161
|
+
"menu-button": k(() => [
|
|
162
|
+
m(u, {
|
|
163
|
+
label: "More",
|
|
164
|
+
"append-icon": "expand_more",
|
|
165
|
+
"bg-color": "neutral-gray-100",
|
|
166
|
+
"text-color": "neutral-gray-400"
|
|
167
|
+
})
|
|
168
|
+
]),
|
|
169
|
+
default: k(() => [
|
|
170
|
+
(l(!0), d(y, null, T(n.value.slice(M), (e, B) => (l(), s(H, {
|
|
171
|
+
key: B,
|
|
172
|
+
label: e.label,
|
|
173
|
+
onClick: (te) => a("click:action", e.value)
|
|
174
|
+
}, null, 8, ["label", "onClick"]))), 128))
|
|
175
|
+
]),
|
|
176
|
+
_: 1
|
|
177
|
+
})) : g("", !0),
|
|
178
|
+
(O = t.value) != null && O.isAdminOnly ? (l(), s(F, { key: 1 }, {
|
|
179
|
+
default: k(() => [
|
|
180
|
+
m(u, {
|
|
181
|
+
label: t.value.label,
|
|
182
|
+
"prepend-icon": t.value.prependIcon,
|
|
183
|
+
onClick: o[1] || (o[1] = (e) => a("click:action", t.value.value))
|
|
184
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
185
|
+
]),
|
|
186
|
+
_: 1
|
|
187
|
+
})) : t.value ? (l(), s(u, {
|
|
188
|
+
key: 2,
|
|
189
|
+
label: t.value.label,
|
|
190
|
+
"prepend-icon": t.value.prependIcon,
|
|
191
|
+
onClick: o[2] || (o[2] = (e) => a("click:action", t.value.value))
|
|
192
|
+
}, null, 8, ["label", "prepend-icon"])) : g("", !0)
|
|
193
|
+
], 64))
|
|
194
|
+
], 2),
|
|
195
|
+
c("div", Z, [
|
|
196
|
+
$(i.$slots, "default")
|
|
197
|
+
])
|
|
198
|
+
], 2),
|
|
199
|
+
t.value && f.value ? (l(), s(N, {
|
|
200
|
+
key: 0,
|
|
201
|
+
to: "body"
|
|
202
|
+
}, [
|
|
203
|
+
c("div", ee, [
|
|
204
|
+
t.value.isAdminOnly ? (l(), s(F, { key: 0 }, {
|
|
205
|
+
default: k(() => [
|
|
206
|
+
m(u, {
|
|
207
|
+
label: t.value.label,
|
|
208
|
+
"prepend-icon": t.value.prependIcon,
|
|
209
|
+
onClick: o[4] || (o[4] = (e) => a("click:action", t.value.value)),
|
|
210
|
+
variant: "fab"
|
|
211
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
212
|
+
]),
|
|
213
|
+
_: 1
|
|
214
|
+
})) : (l(), s(u, {
|
|
215
|
+
key: 1,
|
|
216
|
+
label: t.value.label,
|
|
217
|
+
"prepend-icon": t.value.prependIcon,
|
|
218
|
+
onClick: o[5] || (o[5] = (e) => a("click:action", t.value.value)),
|
|
219
|
+
variant: "fab"
|
|
220
|
+
}, null, 8, ["label", "prepend-icon"]))
|
|
221
|
+
])
|
|
222
|
+
])) : g("", !0),
|
|
223
|
+
n.value.length ? (l(), s(N, {
|
|
224
|
+
key: 1,
|
|
225
|
+
to: "body"
|
|
226
|
+
}, [
|
|
227
|
+
m(L, {
|
|
228
|
+
"dismiss-away": "",
|
|
229
|
+
"no-header": "",
|
|
230
|
+
modelValue: r.value,
|
|
231
|
+
"onUpdate:modelValue": o[7] || (o[7] = (e) => r.value = e)
|
|
232
|
+
}, {
|
|
233
|
+
default: k(() => [
|
|
234
|
+
m(E, {
|
|
235
|
+
class: "pb-8",
|
|
236
|
+
items: x.value,
|
|
237
|
+
"onUpdate:modelValue": o[6] || (o[6] = (e) => (a("click:action", e), r.value = !1))
|
|
238
|
+
}, null, 8, ["items"])
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 8, ["modelValue"])
|
|
242
|
+
])) : g("", !0)
|
|
243
|
+
], 64);
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
export {
|
|
248
|
+
F,
|
|
249
|
+
re as _,
|
|
250
|
+
Q as u
|
|
251
|
+
};
|