@feedmepos/mf-inventory-portal 1.2.49 → 1.2.50-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-w_Dbl-jn.js → App-DAO7XF9h.js} +72 -68
- package/dist/{ApprovalView-CuOM9Ych.js → ApprovalView-BUHefc15.js} +34 -34
- package/dist/{BindingsDialog-DkMSnr51.js → BindingsDialog-Cx9ngX7X.js} +2 -2
- package/dist/{BindingsPicker-DrXdWUTh.js → BindingsPicker-CIZ9FVgv.js} +2 -2
- package/dist/{BindingsTable-Bj0eBYdU.js → BindingsTable-CMyZkvyn.js} +4 -4
- package/dist/{ClosingDraftView-D1oohB8Y.js → ClosingDraftView-D4CMfSvf.js} +19 -18
- package/dist/{ClosingHistoryView-BCYNhLDg.js → ClosingHistoryView-J_2EA-F4.js} +3 -3
- package/dist/{ClosingTemplateView-DIvZkCgT.js → ClosingTemplateView-Bz21bJLn.js} +18 -17
- package/dist/{DeliveryOrderPrintPreview-C83_a-LI.js → DeliveryOrderPrintPreview-D9xRJSBT.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bmas1qkC.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ifkxhq6-.js} +4 -4
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CQ_Er40u.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BcJ1ydJ1.js} +12 -12
- package/dist/FmMultiselectDialog-B5F93-xV.js +621 -0
- package/dist/{FmMultiselectDialog-BtvZkE6p.js → FmMultiselectDialog-Cxj6_Bbq.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BN9OeQF3.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CJsg-6qm.js} +3 -3
- package/dist/{ImportView-CRdvYxW3.js → ImportView-mq9p_YKN.js} +7 -7
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D6J1wcU6.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CvdNblLJ.js} +1 -1
- package/dist/{IngredientGroupView-DCdnjh-f.js → IngredientGroupView-1YQdweWW.js} +108 -107
- package/dist/{IngredientsView-DhZadYV8.js → IngredientsView-rZZDO37M.js} +126 -125
- package/dist/{IntegrationView-B_D6Sgj-.js → IntegrationView-0KCNTL9w.js} +80 -80
- package/dist/{InventoryBindingForm-CM47I9t9.js → InventoryBindingForm-Cz6tMVlQ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BYKUWI9e.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-9jHxMOEn.js} +4 -4
- package/dist/{InventoryBindingSummary-BSuJMrFU.js → InventoryBindingSummary-DarjH7Dn.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9TTwcC8s.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BR6U0SpT.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D2vWMBZF.js → PremiumBadge.vue_vue_type_script_setup_true_lang-C9ffyR0d.js} +2 -2
- package/dist/{PublishView-DxhE5g9_.js → PublishView-Bam4W7ko.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-BzIwRI7z.js → PurchaseOrderPrintPreview-DEKkUMB6.js} +1 -1
- package/dist/ReceiveRequestView-DDfHVcG2.js +3028 -0
- package/dist/{RecipeView-Azx2MoPR.js → RecipeView-CwwKtDRg.js} +83 -82
- package/dist/{StockView-D51RBHWQ.js → StockView-CVN5MKbj.js} +113 -112
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-R0yauCbz.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bm1MxmBR.js} +1 -1
- package/dist/{SupplierView-BeHjJ0xJ.js → SupplierView-BhnmPv7N.js} +28 -27
- package/dist/SurchargeView-nlkL3YIK.js +460 -0
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DG1p3Rim.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DdPVsOZY.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-cPIomfPb.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bp49G_dV.js} +13 -13
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BZR_EozX.js → TransferDetails.vue_vue_type_script_setup_true_lang-BQFBZ0CH.js} +15 -15
- package/dist/{TransferTemplateView-BwdhVKO4.js → TransferTemplateView-7AJGTAAy.js} +16 -16
- package/dist/{UnitView-BT23dBtV.js → UnitView-Dz4bgzmW.js} +20 -19
- package/dist/{WarehouseView-PWigQlHk.js → WarehouseView-DEYOa_Ol.js} +21 -20
- package/dist/{WastageTemplateView-BGO19Pux.js → WastageTemplateView-DdPkFfyQ.js} +165 -164
- package/dist/api/netsuite.d.ts +8 -0
- package/dist/api/surcharge.d.ts +31 -0
- package/dist/app-DiX-EfV6.js +8167 -0
- package/dist/{app-C0a15lwm.js → app-kim0oKgm.js} +4511 -4408
- package/dist/app.d.ts +52 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-C9jSN68K.js → closing-template-MLHUWgwA.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-DND2dkpu.js → date2-Ck1fxOS1.js} +1 -1
- package/dist/{dayjs.min-CvewwBuM.js → dayjs.min-CgHxLw1P.js} +1 -1
- package/dist/{decimal-C11049RC.js → decimal-DVjzMCmx.js} +2 -2
- package/dist/{defineDeepModel-BYmk9G2K.js → defineDeepModel-CLo1ie3w.js} +1 -1
- package/dist/{duplicate-template-CJLrmGdo.js → duplicate-template-B_f_fYhs.js} +1 -1
- package/dist/{feature-D2GGGVQh.js → feature-D4HcMaGK.js} +3442 -2812
- package/dist/{format-time-from-id-DuUqVP8F.js → format-time-from-id-CwtHJpC0.js} +1 -1
- package/dist/{format-unit-display-BwBGMuCk.js → format-unit-display-DRIOlVir.js} +11 -11
- package/dist/{import-export.helper-ejk_vT2V.js → import-export.helper-BrcydEPI.js} +5 -5
- package/dist/{index-D65a-5cn.js → index-ChruXaud.js} +1 -1
- package/dist/{index-Cy-YW3O0.js → index-D9dtwK1d.js} +1 -1
- package/dist/{index-C9F5LU0v.js → index-Wd74fJNj.js} +3 -3
- package/dist/{lodash-DNLSknxF.js → lodash-MkfFbMhZ.js} +1 -1
- package/dist/netsuite-D4cXyIr7.js +5402 -0
- package/dist/{purchase-order-template-C7J9I7o4.js → purchase-order-template-BdKUiSPI.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/{rules-DQNuaKK6.js → rules-KSzt3qOJ.js} +3 -3
- package/dist/{stock-bYU0NTHD.js → stock-BHWNLsBc.js} +1 -1
- package/dist/{stock-1aynIWpi.js → stock-DZliLQNR.js} +3 -3
- 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-B72SAF3j.js → supplier-CiMOpHKx.js} +2 -2
- package/dist/surcharge-CjdNdcm1.js +71 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-DO20RWUv.js → use-ingredient-select-dialog-CK_Ldhwm.js} +2 -2
- package/dist/{use-inventory-binding-dialog-R2VQakMR.js → use-inventory-binding-dialog-jfME3m3c.js} +2 -2
- package/dist/{use-template-enabled-locations-2-C7L_vyIF.js → use-template-enabled-locations-2-Dbk_RoRj.js} +2 -2
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +714 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +5 -0
- package/dist/views/surcharge/SurchargeView.vue.d.ts +2 -0
- package/dist/vue-i18n-DUlOMRWF.js +2365 -0
- package/dist/{xlsx-DZcSBj-s.js → xlsx-CiNXr9Ie.js} +1 -1
- package/dist/{xlsx.util-DMCjqrHn.js → xlsx.util-D81JjCsx.js} +1 -1
- package/package.json +2 -2
- package/dist/FmMultiselectDialog-IU5C9o_F.js +0 -598
- package/dist/ReceiveRequestView-C5wqi0jE.js +0 -2913
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js +0 -162
- package/dist/app-uBuHtW8m.js +0 -8127
- package/dist/netsuite-TqUeqkqw.js +0 -5131
- package/dist/vue-i18n-BLzLoy1U.js +0 -2365
|
@@ -1,21 +1,22 @@
|
|
|
1
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-
|
|
3
|
-
import { useDialog as
|
|
2
|
+
import { a as A, c as Q, S as ge, F as H, j as ne, u as be } from "./app-kim0oKgm.js";
|
|
3
|
+
import { useDialog as re, useSnackbar as W, useProxiedModel as oe, useBreakpoints as _e } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as Re, _ as he } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
5
|
import { F as C } from "./form-mode.enum-BKiNVH6A.js";
|
|
6
|
-
import { _ as
|
|
6
|
+
import { _ as le } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-CvdNblLJ.js";
|
|
7
7
|
import { defineStore as we, storeToRefs as Se } from "pinia";
|
|
8
8
|
import { D as ae, R as K } from "./row-action.enum-BcW_L_nE.js";
|
|
9
|
-
import { c as xe
|
|
10
|
-
import { a as P, R as
|
|
9
|
+
import { c as xe } from "./component-DpCUABT3.js";
|
|
10
|
+
import { a as P, R as Ve, U as Ce, A as Ee } from "./rules-KSzt3qOJ.js";
|
|
11
11
|
import { useI18n as O } from "@feedmepos/mf-common";
|
|
12
|
-
import { u as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { u as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
12
|
+
import { u as ke, _ as Fe } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
13
|
+
import { _ as Ie } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-9jHxMOEn.js";
|
|
14
|
+
import { _ as $e } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
|
|
15
|
+
import { u as De } from "./feature-D4HcMaGK.js";
|
|
16
|
+
import { _ as Ae, F as se } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
17
|
+
import { b as Be, d as Pe } from "./xlsx.util-D81JjCsx.js";
|
|
18
|
+
import { f as Ue } from "./date2-Ck1fxOS1.js";
|
|
19
|
+
import { _ as Te } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BcJ1ydJ1.js";
|
|
19
20
|
const Me = {
|
|
20
21
|
key: 0,
|
|
21
22
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
@@ -30,20 +31,20 @@ const Me = {
|
|
|
30
31
|
setup(b) {
|
|
31
32
|
const f = b, v = E(f.bindedItems || []), s = E(!1);
|
|
32
33
|
ie(() => {
|
|
33
|
-
|
|
34
|
+
r();
|
|
34
35
|
});
|
|
35
|
-
async function
|
|
36
|
+
async function r() {
|
|
36
37
|
var c, m;
|
|
37
38
|
!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);
|
|
38
39
|
}
|
|
39
40
|
return (c, m) => {
|
|
40
|
-
const w = F("FmSpacer"),
|
|
41
|
+
const w = F("FmSpacer"), l = F("FmCircularProgress");
|
|
41
42
|
return k(), B(ue, null, [
|
|
42
43
|
x("p", null, ce(c.message), 1),
|
|
43
44
|
s.value ? (k(), B("div", Me, [
|
|
44
45
|
y(w),
|
|
45
46
|
x("div", null, [
|
|
46
|
-
y(
|
|
47
|
+
y(l, { size: "xl" })
|
|
47
48
|
]),
|
|
48
49
|
m[0] || (m[0] = x("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
|
|
49
50
|
y(w)
|
|
@@ -51,7 +52,7 @@ const Me = {
|
|
|
51
52
|
m[2] || (m[2] = x("br", null, null, -1)),
|
|
52
53
|
v.value.length > 0 ? (k(), B("div", Ne, [
|
|
53
54
|
m[1] || (m[1] = x("p", { class: "fm-typo-en-body-lg-600" }, "Affected menu items:", -1)),
|
|
54
|
-
y(
|
|
55
|
+
y(le, {
|
|
55
56
|
name: "Menu",
|
|
56
57
|
bindings: v.value
|
|
57
58
|
}, null, 8, ["bindings"])
|
|
@@ -61,7 +62,7 @@ const Me = {
|
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
64
|
}), J = we("recipeForm", function() {
|
|
64
|
-
const f =
|
|
65
|
+
const f = re(), v = W(), s = A(), r = E(!1), c = E();
|
|
65
66
|
function m() {
|
|
66
67
|
const n = {
|
|
67
68
|
recipe: {},
|
|
@@ -84,8 +85,8 @@ const Me = {
|
|
|
84
85
|
};
|
|
85
86
|
c.value = o;
|
|
86
87
|
}
|
|
87
|
-
async function
|
|
88
|
-
|
|
88
|
+
async function l(n) {
|
|
89
|
+
r.value = !0;
|
|
89
90
|
try {
|
|
90
91
|
await s.deleteRecipe(n), v.open({
|
|
91
92
|
title: "Success",
|
|
@@ -110,7 +111,7 @@ const Me = {
|
|
|
110
111
|
type: "error"
|
|
111
112
|
}), console.error("failed to delete recipe", o);
|
|
112
113
|
} finally {
|
|
113
|
-
|
|
114
|
+
r.value = !1;
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
function p(n) {
|
|
@@ -132,33 +133,33 @@ const Me = {
|
|
|
132
133
|
data: n,
|
|
133
134
|
message: "You may not be able to delete this recipe if it is linked in any of the inventory modules."
|
|
134
135
|
}
|
|
135
|
-
}).onPrimary(() =>
|
|
136
|
+
}).onPrimary(() => l(n));
|
|
136
137
|
}
|
|
137
138
|
return {
|
|
138
139
|
createRecipe: m,
|
|
139
140
|
updateRecipe: w,
|
|
140
141
|
deleteRecipe: p,
|
|
141
142
|
recipeDialogProps: c,
|
|
142
|
-
recipeViewLoading:
|
|
143
|
+
recipeViewLoading: r
|
|
143
144
|
};
|
|
144
145
|
});
|
|
145
146
|
function ze() {
|
|
146
147
|
const { updateRecipe: b, deleteRecipe: f } = J(), v = A(), { t: s } = O();
|
|
147
|
-
async function l
|
|
148
|
+
async function r(l, p) {
|
|
148
149
|
const n = Q(p);
|
|
149
|
-
if (
|
|
150
|
+
if (l === K.Edit) {
|
|
150
151
|
await b(n);
|
|
151
152
|
return;
|
|
152
153
|
}
|
|
153
|
-
if (
|
|
154
|
+
if (l === K.Delete) {
|
|
154
155
|
await f(n);
|
|
155
156
|
return;
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
|
-
function c(
|
|
159
|
-
const n =
|
|
159
|
+
function c(l, p) {
|
|
160
|
+
const n = l.filter((i) => i.type === H.enum.SKU), o = l.filter(
|
|
160
161
|
(i) => i.type === H.enum.SKU_GROUP
|
|
161
|
-
), u =
|
|
162
|
+
), u = l.filter((i) => i.type === H.enum.RECIPE);
|
|
162
163
|
return [
|
|
163
164
|
...n.map((i) => ({ ...i, recipeIds: [...p] })),
|
|
164
165
|
...o.map((i) => ({ ...i, isGroup: !0, recipeIds: [...p] })),
|
|
@@ -181,11 +182,11 @@ function ze() {
|
|
|
181
182
|
{
|
|
182
183
|
id: "action",
|
|
183
184
|
header: "",
|
|
184
|
-
cell(
|
|
185
|
+
cell(l) {
|
|
185
186
|
return xe(
|
|
186
187
|
[ae[K.Edit], ae[K.Delete]],
|
|
187
188
|
(p) => {
|
|
188
|
-
|
|
189
|
+
r(p, l.row.original.original);
|
|
189
190
|
}
|
|
190
191
|
);
|
|
191
192
|
},
|
|
@@ -197,9 +198,9 @@ function ze() {
|
|
|
197
198
|
}
|
|
198
199
|
}
|
|
199
200
|
];
|
|
200
|
-
function w(
|
|
201
|
+
function w(l) {
|
|
201
202
|
const p = A();
|
|
202
|
-
return
|
|
203
|
+
return l.map((n) => ({
|
|
203
204
|
recipe: n.name,
|
|
204
205
|
ingredients: c(n.contains, /* @__PURE__ */ new Set([n._id])).map((o) => {
|
|
205
206
|
var i, S, e, d, _, h;
|
|
@@ -231,23 +232,23 @@ const je = { class: "flex flex-col gap-40" }, Ke = {
|
|
|
231
232
|
emits: ["update:modelValue", "click:submit"],
|
|
232
233
|
setup(b, { expose: f, emit: v }) {
|
|
233
234
|
var R;
|
|
234
|
-
const s = b,
|
|
235
|
+
const s = b, r = v, c = De(), { t: m } = O(), w = I({
|
|
235
236
|
get() {
|
|
236
237
|
var t;
|
|
237
238
|
return ((t = s.modelValue) == null ? void 0 : t.name) ?? "";
|
|
238
239
|
},
|
|
239
240
|
set(t) {
|
|
240
241
|
const a = s.modelValue ?? {};
|
|
241
|
-
a.name = t,
|
|
242
|
+
a.name = t, r("update:modelValue", a);
|
|
242
243
|
}
|
|
243
|
-
}),
|
|
244
|
+
}), l = I({
|
|
244
245
|
get() {
|
|
245
246
|
var t;
|
|
246
247
|
return ((t = s.modelValue) == null ? void 0 : t.contains) ?? [];
|
|
247
248
|
},
|
|
248
249
|
set(t) {
|
|
249
250
|
const a = s.modelValue ?? {};
|
|
250
|
-
a.contains = t,
|
|
251
|
+
a.contains = t, r("update:modelValue", a);
|
|
251
252
|
}
|
|
252
253
|
}), p = I({
|
|
253
254
|
get() {
|
|
@@ -258,11 +259,11 @@ const je = { class: "flex flex-col gap-40" }, Ke = {
|
|
|
258
259
|
const a = s.modelValue ? {
|
|
259
260
|
...s.modelValue
|
|
260
261
|
} : {};
|
|
261
|
-
a.customAttributes = t,
|
|
262
|
+
a.customAttributes = t, r("update:modelValue", a);
|
|
262
263
|
}
|
|
263
264
|
});
|
|
264
265
|
function n() {
|
|
265
|
-
|
|
266
|
+
r("click:submit");
|
|
266
267
|
}
|
|
267
268
|
const o = E();
|
|
268
269
|
f({
|
|
@@ -305,8 +306,8 @@ const je = { class: "flex flex-col gap-40" }, Ke = {
|
|
|
305
306
|
"model-value": w.value,
|
|
306
307
|
"onUpdate:modelValue": a[0] || (a[0] = (V) => w.value = V),
|
|
307
308
|
rules: [
|
|
308
|
-
g(
|
|
309
|
-
g(
|
|
309
|
+
g(Ve)(),
|
|
310
|
+
g(Ce)(_.value, h.value, (V) => `[${V.value}] already exists`)
|
|
310
311
|
],
|
|
311
312
|
"label-mark": "required"
|
|
312
313
|
}, null, 8, ["disabled", "label", "model-value", "rules"]),
|
|
@@ -317,12 +318,12 @@ const je = { class: "flex flex-col gap-40" }, Ke = {
|
|
|
317
318
|
default: U(() => {
|
|
318
319
|
var V;
|
|
319
320
|
return [
|
|
320
|
-
y(
|
|
321
|
+
y(Ie, {
|
|
321
322
|
id: (V = t.modelValue) == null ? void 0 : V._id,
|
|
322
323
|
disabled: t.disabled,
|
|
323
|
-
"model-value":
|
|
324
|
-
"onUpdate:modelValue": a[1] || (a[1] = (z) =>
|
|
325
|
-
rules: [g(
|
|
324
|
+
"model-value": l.value,
|
|
325
|
+
"onUpdate:modelValue": a[1] || (a[1] = (z) => l.value = z),
|
|
326
|
+
rules: [g(Ee)(1)],
|
|
326
327
|
"enable-ingredient-group": g(c).enableIngredientGroup
|
|
327
328
|
}, null, 8, ["id", "disabled", "model-value", "rules", "enable-ingredient-group"])
|
|
328
329
|
];
|
|
@@ -346,14 +347,14 @@ const je = { class: "flex flex-col gap-40" }, Ke = {
|
|
|
346
347
|
a[4] || (a[4] = x("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
|
|
347
348
|
y(M)
|
|
348
349
|
])) : S.value && i.value.length ? (k(), B("div", Oe, [
|
|
349
|
-
y(
|
|
350
|
+
y(le, {
|
|
350
351
|
name: "Menu",
|
|
351
352
|
bindings: i.value
|
|
352
353
|
}, null, 8, ["bindings"])
|
|
353
354
|
])) : q("", !0)
|
|
354
355
|
])) : q("", !0),
|
|
355
356
|
x("div", He, [
|
|
356
|
-
y(
|
|
357
|
+
y($e, {
|
|
357
358
|
entity: "inventoryRecipe",
|
|
358
359
|
modelValue: p.value,
|
|
359
360
|
"onUpdate:modelValue": a[3] || (a[3] = (V) => p.value = V)
|
|
@@ -373,24 +374,24 @@ const je = { class: "flex flex-col gap-40" }, Ke = {
|
|
|
373
374
|
},
|
|
374
375
|
emits: ["update:show"],
|
|
375
376
|
setup(b) {
|
|
376
|
-
const f = b, v = A(), s = W(), { t:
|
|
377
|
+
const f = b, v = A(), s = W(), { t: r } = O(), c = oe(f, "show"), m = oe(f, "recipe"), w = I(() => {
|
|
377
378
|
switch (f.mode) {
|
|
378
379
|
case C.READ:
|
|
379
380
|
return "";
|
|
380
381
|
case C.UPDATE:
|
|
381
|
-
return
|
|
382
|
+
return r("inventory.recipe.update.title");
|
|
382
383
|
case C.CREATE:
|
|
383
|
-
return
|
|
384
|
+
return r("inventory.recipe.create.title");
|
|
384
385
|
}
|
|
385
386
|
return "";
|
|
386
|
-
}),
|
|
387
|
+
}), l = I(() => {
|
|
387
388
|
switch (f.mode) {
|
|
388
389
|
case C.READ:
|
|
389
390
|
return "";
|
|
390
391
|
case C.UPDATE:
|
|
391
|
-
return
|
|
392
|
+
return r("common.save");
|
|
392
393
|
case C.CREATE:
|
|
393
|
-
return
|
|
394
|
+
return r("common.add");
|
|
394
395
|
}
|
|
395
396
|
return "";
|
|
396
397
|
}), p = E(), n = E(!1);
|
|
@@ -399,14 +400,14 @@ const je = { class: "flex flex-col gap-40" }, Ke = {
|
|
|
399
400
|
try {
|
|
400
401
|
const e = Q(m.value);
|
|
401
402
|
e.precision ?? (e.precision = 0), e.measurements ?? (e.measurements = []), await v.createRecipe(e), c.value = !1, s.open({
|
|
402
|
-
title:
|
|
403
|
-
message:
|
|
403
|
+
title: r("inventory.common.success"),
|
|
404
|
+
message: r("inventory.recipe.create.success", { name: m.value.name }),
|
|
404
405
|
type: "success"
|
|
405
406
|
});
|
|
406
407
|
} catch (e) {
|
|
407
408
|
e instanceof ne || s.open({
|
|
408
|
-
title:
|
|
409
|
-
message:
|
|
409
|
+
title: r("inventory.recipe.create.error.title"),
|
|
410
|
+
message: r("inventory.recipe.create.error.message"),
|
|
410
411
|
type: "error"
|
|
411
412
|
});
|
|
412
413
|
} finally {
|
|
@@ -417,14 +418,14 @@ const je = { class: "flex flex-col gap-40" }, Ke = {
|
|
|
417
418
|
n.value = !0;
|
|
418
419
|
try {
|
|
419
420
|
await v.updateRecipe(m.value), c.value = !1, s.open({
|
|
420
|
-
title:
|
|
421
|
-
message:
|
|
421
|
+
title: r("inventory.common.success"),
|
|
422
|
+
message: r("inventory.recipe.update.success", { name: m.value.name }),
|
|
422
423
|
type: "success"
|
|
423
424
|
});
|
|
424
425
|
} catch (e) {
|
|
425
426
|
e instanceof ne || s.open({
|
|
426
|
-
title:
|
|
427
|
-
message:
|
|
427
|
+
title: r("inventory.recipe.update.error.title"),
|
|
428
|
+
message: r("inventory.recipe.update.error.message"),
|
|
428
429
|
type: "error"
|
|
429
430
|
});
|
|
430
431
|
} finally {
|
|
@@ -459,12 +460,12 @@ const je = { class: "flex flex-col gap-40" }, Ke = {
|
|
|
459
460
|
x("div", Je, [
|
|
460
461
|
y(_, {
|
|
461
462
|
loading: n.value,
|
|
462
|
-
label:
|
|
463
|
+
label: l.value,
|
|
463
464
|
onClick: i
|
|
464
465
|
}, null, 8, ["loading", "label"]),
|
|
465
466
|
y(_, {
|
|
466
467
|
disabled: n.value,
|
|
467
|
-
label: g(
|
|
468
|
+
label: g(r)("common.close"),
|
|
468
469
|
variant: "tertiary",
|
|
469
470
|
onClick: d[2] || (d[2] = (R) => c.value = !1)
|
|
470
471
|
}, null, 8, ["disabled", "label"])
|
|
@@ -491,18 +492,18 @@ function We(b) {
|
|
|
491
492
|
return !b || Object.keys(b).length === 0 ? "" : Object.entries(b).map(([f, v]) => `${f}: ${v}`).join(", ");
|
|
492
493
|
}
|
|
493
494
|
function Xe() {
|
|
494
|
-
const b = A(), f = b.recipes, v = b.recipeById, s = b.skuById,
|
|
495
|
+
const b = A(), f = b.recipes, v = b.recipeById, s = b.skuById, r = b.skuGroupById, c = f.flatMap((l, p) => {
|
|
495
496
|
var o;
|
|
496
|
-
const n = We(
|
|
497
|
-
if ((o =
|
|
498
|
-
const u =
|
|
497
|
+
const n = We(l.customAttributes);
|
|
498
|
+
if ((o = l.contains) != null && o.length) {
|
|
499
|
+
const u = l.contains.filter((e) => e.type === "RECIPE"), i = l.contains.filter((e) => e.type === "SKU"), S = l.contains.filter((e) => e.type === "SKU_GROUP");
|
|
499
500
|
return [
|
|
500
501
|
...p === 0 ? [] : [["", "", "", "", "", "", ""]],
|
|
501
502
|
...u.map(
|
|
502
503
|
(e, d) => {
|
|
503
504
|
var _;
|
|
504
505
|
return [
|
|
505
|
-
d === 0 ?
|
|
506
|
+
d === 0 ? l.name : "",
|
|
506
507
|
"RECIPE",
|
|
507
508
|
"",
|
|
508
509
|
(_ = v[e.id]) == null ? void 0 : _.name,
|
|
@@ -516,7 +517,7 @@ function Xe() {
|
|
|
516
517
|
(e, d) => {
|
|
517
518
|
var _, h, R, t;
|
|
518
519
|
return [
|
|
519
|
-
!u.length && d === 0 ?
|
|
520
|
+
!u.length && d === 0 ? l.name : "",
|
|
520
521
|
"INGREDIENT",
|
|
521
522
|
(_ = s[e.id]) == null ? void 0 : _.code,
|
|
522
523
|
(h = s[e.id]) == null ? void 0 : h.name,
|
|
@@ -530,10 +531,10 @@ function Xe() {
|
|
|
530
531
|
(e, d) => {
|
|
531
532
|
var _, h;
|
|
532
533
|
return [
|
|
533
|
-
u.length === 0 && i.length === 0 && d === 0 ?
|
|
534
|
+
u.length === 0 && i.length === 0 && d === 0 ? l.name : "",
|
|
534
535
|
"SKU_GROUP",
|
|
535
|
-
((_ =
|
|
536
|
-
(h =
|
|
536
|
+
((_ = r[e.id]) == null ? void 0 : _.ref) || "",
|
|
537
|
+
(h = r[e.id]) == null ? void 0 : h.name,
|
|
537
538
|
P(e.amount),
|
|
538
539
|
"UNIT",
|
|
539
540
|
u.length === 0 && i.length === 0 && d === 0 ? n : ""
|
|
@@ -544,26 +545,26 @@ function Xe() {
|
|
|
544
545
|
}
|
|
545
546
|
return [
|
|
546
547
|
...p === 0 ? [] : [["", "", "", "", "", "", ""]],
|
|
547
|
-
[
|
|
548
|
+
[l.name, "No bindings", "", "", "", "", n]
|
|
548
549
|
];
|
|
549
550
|
}), w = Be(c, ["Name", "Type", "Code", "Item", "Amount", "Unit", "Custom Attributes"]);
|
|
550
551
|
Pe(w, `RECIPE_${Ue(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
|
|
551
552
|
}
|
|
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" },
|
|
553
|
+
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" }, ht = /* @__PURE__ */ Y({
|
|
553
554
|
__name: "RecipeView",
|
|
554
555
|
setup(b) {
|
|
555
|
-
const f = A(), v = I(() => f.recipes), s = be(), { createRecipe:
|
|
556
|
-
|
|
556
|
+
const f = A(), v = I(() => f.recipes), s = be(), { createRecipe: r, updateRecipe: c } = J(), { recipeDialogProps: m, recipeViewLoading: w } = Se(J()), { columnDefs: l, formatRowData: p } = ze(), n = I(() => p(v.value));
|
|
557
|
+
re(), W(), E(!1);
|
|
557
558
|
function o(R) {
|
|
558
559
|
if (R === "add")
|
|
559
|
-
return
|
|
560
|
+
return r();
|
|
560
561
|
if (R === "export")
|
|
561
562
|
return Xe();
|
|
562
563
|
}
|
|
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), _ =
|
|
564
|
+
const u = E(""), i = I(() => w.value), { breakpoints: S } = _e(), e = I(() => S.value.xs || S.value.sm), d = I(() => e.value ? 10 : 20), _ = ke(), { t: h } = O();
|
|
564
565
|
return (R, t) => {
|
|
565
566
|
const a = F("FmTable");
|
|
566
|
-
return k(), G(
|
|
567
|
+
return k(), G(Fe, {
|
|
567
568
|
title: g(h)("inventory.recipe.title"),
|
|
568
569
|
actions: [
|
|
569
570
|
{
|
|
@@ -593,7 +594,7 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
|
|
|
593
594
|
}, null, 8, ["search"]),
|
|
594
595
|
(k(), G(a, {
|
|
595
596
|
style: pe(g(_).tableHeight),
|
|
596
|
-
"column-defs": g(
|
|
597
|
+
"column-defs": g(l),
|
|
597
598
|
"row-data": n.value,
|
|
598
599
|
"search-value": u.value,
|
|
599
600
|
loading: !g(s)._currentLocation || i.value,
|
|
@@ -602,7 +603,7 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
|
|
|
602
603
|
"page-size": d.value
|
|
603
604
|
}, {
|
|
604
605
|
"list-row": U(($) => [
|
|
605
|
-
y(
|
|
606
|
+
y(Ae, {
|
|
606
607
|
row: $,
|
|
607
608
|
onRowClick: (D) => g(c)(D.original)
|
|
608
609
|
}, {
|
|
@@ -641,5 +642,5 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
|
|
|
641
642
|
}
|
|
642
643
|
});
|
|
643
644
|
export {
|
|
644
|
-
|
|
645
|
+
ht as default
|
|
645
646
|
};
|