@feedmepos/mf-inventory-portal 1.2.10 → 1.2.11-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-DYqxMYB9.js → App-7THD1njR.js} +1 -1
- package/dist/{ApprovalView-DGwyBskr.js → ApprovalView-DMEJRr68.js} +2 -2
- package/dist/{BindingsDialog-DPTaXP5d.js → BindingsDialog-BNzLPDnk.js} +2 -2
- package/dist/{BindingsPicker-Bf0njj4d.js → BindingsPicker-b6IVAFK_.js} +1 -1
- package/dist/{BindingsTable-BPe63ZWt.js → BindingsTable-C-4XGO_N.js} +1 -1
- package/dist/{ClosingDraftView-ChH3hzk5.js → ClosingDraftView-DVTloUym.js} +2 -2
- package/dist/{ClosingTemplateView-Ck92tjyp.js → ClosingTemplateView-C-eHKV0N.js} +3 -3
- package/dist/{DeliveryOrderPrintPreview-DH6Zb9fP.js → DeliveryOrderPrintPreview-ChIV_Wxd.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-cSUU8S9I.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DPkGmSYU.js} +3 -3
- package/dist/{FmMultiselectDialog-BTYol2SU.js → FmMultiselectDialog-aRqxOX4h.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-YbBghEyh.js → FmUnitInput.vue_vue_type_script_setup_true_lang-_MPI8AAx.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Dnme2biR.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BiHvGyAN.js} +1 -1
- package/dist/{IngredientGroupView--T3MBGwZ.js → IngredientGroupView-DtExVKaV.js} +2 -2
- package/dist/{IngredientsView-DZyx9OC9.js → IngredientsView-DQUK8EMq.js} +384 -376
- package/dist/{IntegrationView-evwSnY6R.js → IntegrationView-LnHPQMs8.js} +3 -3
- package/dist/{InventoryBindingForm-PaQ8Cq5r.js → InventoryBindingForm-Cm9TOWWe.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ah0DptUu.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DwGz8gLR.js} +3 -3
- package/dist/{InventoryBindingSummary-CrI4xTEO.js → InventoryBindingSummary-BQ6ysLf9.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DxTP40bM.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B_ASTDtr.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B-ttqDcQ.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DdFHN7A8.js} +1 -1
- package/dist/{PublishView-D2WXGfZr.js → PublishView-Dg_U3hW1.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-B1QrfsNt.js → PurchaseOrderPrintPreview-DnwHiTGF.js} +1 -1
- package/dist/{ReceiveRequestView-BtdOm43O.js → ReceiveRequestView-CIzZf6q8.js} +8 -8
- package/dist/{RecipeView-okupvj-0.js → RecipeView-BQeJBUvu.js} +3 -3
- package/dist/{StockView-Bb9AQQlK.js → StockView-D6RmCUZZ.js} +7 -7
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BOJrQc5Z.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BAcaiBqq.js} +1 -1
- package/dist/{SupplierView-CPG7eyiI.js → SupplierView-DmJXuznz.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DuaXDXxy.js → TransferDetails.vue_vue_type_script_setup_true_lang-9wk6mQHT.js} +5 -5
- package/dist/{TransferTemplateView-BLVlhF0T.js → TransferTemplateView-wcXRmuoK.js} +7 -7
- package/dist/{UnitView-BIoDigC1.js → UnitView-C1cxS42T.js} +3 -3
- package/dist/{WarehouseView-C5SVRgJG.js → WarehouseView-643lOh1p.js} +1 -1
- package/dist/app-CsyUwsea.js +129065 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-DgyNw_vj.js → closing-template-DaHVCTUh.js} +1 -1
- package/dist/{decimal-CvU6JXwM.js → decimal-DveC9JMl.js} +1 -1
- package/dist/{format-unit-display-ChcvhEq_.js → format-unit-display-_9FgoZom.js} +3 -3
- package/dist/{index-L2DfU-le.js → index-CZmm0Xbi.js} +1 -1
- package/dist/{index-UnM6VgqL.js → index-ChAOZMz9.js} +1 -1
- package/dist/{purchase-order-template-BGNA5mhv.js → purchase-order-template-D2kAwN4O.js} +1 -1
- package/dist/{stock-BzHLD7VH.js → stock-CL0X5Bnh.js} +1 -1
- package/dist/{supplier-DjmGXRXx.js → supplier-D3mOSUzY.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-DEtTZkz4.js → use-ingredient-select-dialog-Ba-l0gZ1.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DUVVkJpV.js → use-inventory-binding-dialog-CpaprD6M.js} +1 -1
- package/dist/views/ingredients/helper/import-export.helper.d.ts +1 -0
- package/package.json +2 -2
- package/dist/app-BpzSrMFG.js +0 -154797
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { ref as N, defineComponent as
|
|
2
|
-
import { a as
|
|
3
|
-
import { useDialog as De, useSnackbar as
|
|
1
|
+
import { ref as N, defineComponent as ve, computed as w, resolveComponent as A, openBlock as v, createElementBlock as F, Fragment as ee, unref as a, createVNode as m, withModifiers as Ht, createCommentVNode as j, withCtx as T, createElementVNode as s, toDisplayString as U, normalizeClass as ne, renderList as ce, createBlock as z, h as X, renderSlot as Ce, createTextVNode as Je, mergeModels as ct, onMounted as Wt, watch as Tt, useModel as Yt, isRef as mt, createSlots as Vt, normalizeStyle as qt, Teleport as pt, normalizeProps as Gt, guardReactiveProps as Kt } from "vue";
|
|
2
|
+
import { a as fe, e as W, f as St, S as Jt, b as Ee, h as Ge, i as Qt, D as vt, j as Re, A as Be, k as It, l as Ct, m as Oe, t as Ft, n as Zt, o as $e, p as Le, U as Xt, q as en, M as tn, r as ft, s as yt, c as Qe, v as je, _ as nn, w as gt, x as on, y as bt, z as $t, B as ln, C as Et, E as sn, G as an, I as rn, H as dn, J as un, N as cn, K as mn, u as pn, L as vn, O as fn, P as yn, Q as gn, T as ht, V as bn } from "./app-CsyUwsea.js";
|
|
3
|
+
import { useDialog as De, useSnackbar as Me, components as He, useProxiedModel as _t, useDialogChild as hn, useBreakpoints as _n } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as xn, _ as kn } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
-
import { useI18n as
|
|
5
|
+
import { useI18n as ye, useCoreStore as we } from "@feedmepos/mf-common";
|
|
6
6
|
import { defineStore as wn, storeToRefs as Tn } from "pinia";
|
|
7
|
-
import { g as Vn, _ as We, S as Ye, a as Sn } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as In } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as qe } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { g as Vn, _ as We, S as Ye, a as Sn } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BAcaiBqq.js";
|
|
8
|
+
import { _ as In } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DwGz8gLR.js";
|
|
9
|
+
import { _ as qe } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-BiHvGyAN.js";
|
|
10
10
|
import { _ as _e } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
11
11
|
import { _ as Cn } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
|
|
12
|
-
import { u as
|
|
13
|
-
import { u as
|
|
12
|
+
import { u as Mt } from "./purchase-order-template-D2kAwN4O.js";
|
|
13
|
+
import { u as At } from "./closing-template-DaHVCTUh.js";
|
|
14
14
|
import { r as Fn } from "./random-CSbEbElR.js";
|
|
15
15
|
import "./array-Ca8T3f_G.js";
|
|
16
|
-
import { u as $n } from "./FmMultiselectDialog-
|
|
16
|
+
import { u as $n } from "./FmMultiselectDialog-aRqxOX4h.js";
|
|
17
17
|
const Ke = wn("ingredientForm", function() {
|
|
18
|
-
const o = De(), b =
|
|
18
|
+
const o = De(), b = Me(), l = fe(), c = N(!1), { t: h } = ye(), k = N();
|
|
19
19
|
function f() {
|
|
20
|
-
const
|
|
20
|
+
const u = {
|
|
21
21
|
sku: {},
|
|
22
22
|
mode: W.CREATE,
|
|
23
23
|
show: !0,
|
|
24
|
-
"onUpdate:show"(
|
|
25
|
-
k.value.show =
|
|
24
|
+
"onUpdate:show"(d) {
|
|
25
|
+
k.value.show = d;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
k.value =
|
|
28
|
+
k.value = u;
|
|
29
29
|
}
|
|
30
|
-
async function n(
|
|
31
|
-
const
|
|
32
|
-
sku: St(
|
|
30
|
+
async function n(u) {
|
|
31
|
+
const d = {
|
|
32
|
+
sku: St(u),
|
|
33
33
|
mode: W.UPDATE,
|
|
34
34
|
show: !0,
|
|
35
35
|
"onUpdate:show"(p) {
|
|
36
36
|
k.value.show = p;
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
k.value =
|
|
39
|
+
k.value = d;
|
|
40
40
|
}
|
|
41
|
-
async function r(
|
|
41
|
+
async function r(u) {
|
|
42
42
|
c.value = !0;
|
|
43
43
|
try {
|
|
44
|
-
await l.deleteSku(
|
|
44
|
+
await l.deleteSku(u), b.open({
|
|
45
45
|
title: "Success",
|
|
46
|
-
message: `Deleted ${
|
|
46
|
+
message: `Deleted ${u.name}`,
|
|
47
47
|
type: "success"
|
|
48
48
|
});
|
|
49
|
-
} catch (
|
|
50
|
-
|
|
49
|
+
} catch (d) {
|
|
50
|
+
d instanceof Jt && xn(d) ? o.open({
|
|
51
51
|
title: "Cannot delete ingredient",
|
|
52
52
|
contentComponent: kn,
|
|
53
53
|
contentComponentProps: {
|
|
54
|
-
subject: (
|
|
55
|
-
items:
|
|
54
|
+
subject: (u == null ? void 0 : u.name) ?? "",
|
|
55
|
+
items: d.errorResponse.message
|
|
56
56
|
},
|
|
57
57
|
secondaryActions: {
|
|
58
58
|
text: "Close",
|
|
59
59
|
close: !0
|
|
60
60
|
}
|
|
61
|
-
}) : console.log("unable to delete ingredient",
|
|
62
|
-
title: `Cannot delete ${
|
|
61
|
+
}) : console.log("unable to delete ingredient", d), b.open({
|
|
62
|
+
title: `Cannot delete ${u.name}`,
|
|
63
63
|
message: "Please try again.",
|
|
64
64
|
type: "error"
|
|
65
|
-
}), console.error("failed to delete ingredient",
|
|
65
|
+
}), console.error("failed to delete ingredient", d);
|
|
66
66
|
} finally {
|
|
67
67
|
c.value = !1;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function y(
|
|
70
|
+
function y(u) {
|
|
71
71
|
o.open({
|
|
72
|
-
title: h("inventory.ingredient.delete.title", [(
|
|
72
|
+
title: h("inventory.ingredient.delete.title", [(u == null ? void 0 : u.name) ?? ""]),
|
|
73
73
|
closeButton: !1,
|
|
74
74
|
message: h("inventory.ingredient.delete.message"),
|
|
75
75
|
primaryActions: {
|
|
@@ -81,7 +81,7 @@ const Ke = wn("ingredientForm", function() {
|
|
|
81
81
|
text: h("common.cancel"),
|
|
82
82
|
close: !0
|
|
83
83
|
}
|
|
84
|
-
}).onPrimary(() => r(
|
|
84
|
+
}).onPrimary(() => r(u));
|
|
85
85
|
}
|
|
86
86
|
return {
|
|
87
87
|
createIngredient: f,
|
|
@@ -93,21 +93,21 @@ const Ke = wn("ingredientForm", function() {
|
|
|
93
93
|
}), En = {
|
|
94
94
|
key: 0,
|
|
95
95
|
class: "flex items-center gap-8"
|
|
96
|
-
},
|
|
96
|
+
}, Mn = { class: "flex flex-col gap-1" }, An = { class: "fm-typo-en-heading-lg-600" }, Un = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rn = {
|
|
97
97
|
key: 0,
|
|
98
98
|
class: "fm-typo-en-body-md-400 text-fm-color-system-warning-300"
|
|
99
99
|
}, Bn = {
|
|
100
100
|
key: 1,
|
|
101
101
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
102
|
-
}, On = { class: "flex flex-col gap-2 mt-4" }, Dn = { class: "flex items-center gap-2 fm-typo-en-body-md-400" }, Nn = { class: "flex flex-wrap gap-2" }, zn = { class: "flex flex-col" }, Ln = { class: "flex flex-col bg-fm-color-bg-secondary font-mono p-4 rounded-md" }, jn = { class: "text-fm-color-typo-tertiary flex-shrink-0 fm-typo-en-body-md-400 whitespace-pre flex items-center" }, Hn = { class: "px-2 py-1 rounded-md bg-blue-200 border-2 border-blue-400" }, Wn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Yn = /* @__PURE__ */
|
|
102
|
+
}, On = { class: "flex flex-col gap-2 mt-4" }, Dn = { class: "flex items-center gap-2 fm-typo-en-body-md-400" }, Nn = { class: "flex flex-wrap gap-2" }, zn = { class: "flex flex-col" }, Ln = { class: "flex flex-col bg-fm-color-bg-secondary font-mono p-4 rounded-md" }, jn = { class: "text-fm-color-typo-tertiary flex-shrink-0 fm-typo-en-body-md-400 whitespace-pre flex items-center" }, Hn = { class: "px-2 py-1 rounded-md bg-blue-200 border-2 border-blue-400" }, Wn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Yn = /* @__PURE__ */ ve({
|
|
103
103
|
__name: "ItemSubsidiaryTreeDialog",
|
|
104
104
|
props: {
|
|
105
105
|
skuId: {},
|
|
106
106
|
itemName: {},
|
|
107
107
|
itemCode: {}
|
|
108
108
|
},
|
|
109
|
-
setup(
|
|
110
|
-
const o =
|
|
109
|
+
setup(i) {
|
|
110
|
+
const o = i, { t: b } = ye(), l = we(), c = Ee(), h = N(!1), k = w(() => {
|
|
111
111
|
var p;
|
|
112
112
|
return ((p = l.sessionUser.value) == null ? void 0 : p.role.isAdmin) ?? !1;
|
|
113
113
|
}), f = w(() => c.getSkuSubsidiaries(o.skuId)), n = w(() => {
|
|
@@ -126,23 +126,23 @@ const Ke = wn("ingredientForm", function() {
|
|
|
126
126
|
function r(p, _ = [], I = !1) {
|
|
127
127
|
const $ = [];
|
|
128
128
|
return p.forEach((g, D) => {
|
|
129
|
-
const C = D === p.length - 1,
|
|
130
|
-
let
|
|
131
|
-
for (let
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const
|
|
129
|
+
const C = D === p.length - 1, le = [..._, C];
|
|
130
|
+
let Q = "";
|
|
131
|
+
for (let te = 0; te < _.length; te++)
|
|
132
|
+
Q += _[te] ? " " : "│ ";
|
|
133
|
+
Q += C ? "└── " : "├── ";
|
|
134
|
+
const me = n.value.has(g.id), oe = g.isAssigned === !0, se = I && !oe;
|
|
135
135
|
if ($.push({
|
|
136
136
|
id: g.id,
|
|
137
137
|
name: g.name,
|
|
138
|
-
prefix: _.length === 0 ? "" :
|
|
139
|
-
isHighlighted:
|
|
138
|
+
prefix: _.length === 0 ? "" : Q,
|
|
139
|
+
isHighlighted: me,
|
|
140
140
|
isDirectlyBound: oe,
|
|
141
|
-
isParentIncludedChild:
|
|
141
|
+
isParentIncludedChild: se,
|
|
142
142
|
isRoot: _.length === 0
|
|
143
143
|
}), g.children && g.children.length > 0) {
|
|
144
|
-
const
|
|
145
|
-
$.push(...r(g.children,
|
|
144
|
+
const te = I || oe && f.value.includeChildren;
|
|
145
|
+
$.push(...r(g.children, le, te));
|
|
146
146
|
}
|
|
147
147
|
}), $;
|
|
148
148
|
}
|
|
@@ -154,24 +154,24 @@ const Ke = wn("ingredientForm", function() {
|
|
|
154
154
|
}
|
|
155
155
|
return I;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function u(p, _) {
|
|
158
158
|
return p.map((I) => _.has(I.id) || I.isAssigned === !0 ? {
|
|
159
159
|
...I,
|
|
160
160
|
// Recursively filter children
|
|
161
|
-
children: I.children ?
|
|
161
|
+
children: I.children ? u(I.children, _) : []
|
|
162
162
|
} : null).filter(Boolean);
|
|
163
163
|
}
|
|
164
|
-
const
|
|
164
|
+
const d = w(() => {
|
|
165
165
|
let p = f.value.subsidiaryTree;
|
|
166
166
|
if ((!p || p.length === 0) && (p = c.getBusinessSubsidiaryTree()), !k.value) {
|
|
167
167
|
const _ = y(p);
|
|
168
|
-
p =
|
|
168
|
+
p = u(p, _);
|
|
169
169
|
}
|
|
170
170
|
return r(p, []);
|
|
171
171
|
});
|
|
172
172
|
return (p, _) => {
|
|
173
|
-
const I =
|
|
174
|
-
return v(), F(
|
|
173
|
+
const I = A("FmButton"), $ = A("FmDialog");
|
|
174
|
+
return v(), F(ee, null, [
|
|
175
175
|
a(c).isEnabled ? (v(), F("div", En, [
|
|
176
176
|
m(I, {
|
|
177
177
|
"prepend-icon": "info",
|
|
@@ -186,8 +186,8 @@ const Ke = wn("ingredientForm", function() {
|
|
|
186
186
|
dismissAway: ""
|
|
187
187
|
}, {
|
|
188
188
|
"dialog-header": T(() => [
|
|
189
|
-
s("div",
|
|
190
|
-
s("div",
|
|
189
|
+
s("div", Mn, [
|
|
190
|
+
s("div", An, U(a(b)("inventory.integration.netsuite.subsidiaryHierarchy.title")), 1),
|
|
191
191
|
s("p", Un, " Name: " + U(o.itemName), 1),
|
|
192
192
|
s("p", Pn, " Code: " + U(o.itemCode), 1),
|
|
193
193
|
k.value ? (v(), F("p", Rn, " All subsidiaries are shown since you are an admin. ")) : (v(), F("p", Bn, " Only showing subsidiaries in your business path and bound subsidiaries. ")),
|
|
@@ -195,7 +195,7 @@ const Ke = wn("ingredientForm", function() {
|
|
|
195
195
|
s("div", Dn, [
|
|
196
196
|
_[2] || (_[2] = s("span", { class: "font-semibold" }, "Include Children Subsidiaries:", -1)),
|
|
197
197
|
s("span", {
|
|
198
|
-
class:
|
|
198
|
+
class: ne(
|
|
199
199
|
f.value.includeChildren ? "text-green-600 font-semibold" : "text-red-600 font-semibold"
|
|
200
200
|
)
|
|
201
201
|
}, U(f.value.includeChildren ? "Yes" : "No"), 3)
|
|
@@ -221,7 +221,7 @@ const Ke = wn("ingredientForm", function() {
|
|
|
221
221
|
default: T(() => [
|
|
222
222
|
s("div", zn, [
|
|
223
223
|
s("div", Ln, [
|
|
224
|
-
(v(!0), F(
|
|
224
|
+
(v(!0), F(ee, null, ce(d.value, (g) => (v(), F("div", {
|
|
225
225
|
key: g.id,
|
|
226
226
|
class: "flex items-stretch"
|
|
227
227
|
}, [
|
|
@@ -238,13 +238,13 @@ const Ke = wn("ingredientForm", function() {
|
|
|
238
238
|
_: 2
|
|
239
239
|
}, 1024)) : (v(), F("div", {
|
|
240
240
|
key: 1,
|
|
241
|
-
class:
|
|
241
|
+
class: ne([
|
|
242
242
|
"px-2 py-1 rounded-md flex-1",
|
|
243
243
|
g.isDirectlyBound ? "border-2 bg-green-200 border-green-400" : "bg-fm-color-bg-primary border border-fm-color-border-secondary"
|
|
244
244
|
])
|
|
245
245
|
}, [
|
|
246
246
|
s("span", {
|
|
247
|
-
class:
|
|
247
|
+
class: ne([
|
|
248
248
|
g.isHighlighted ? "fm-typo-en-body-md-600 text-fm-color-typo-primary" : "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
249
249
|
])
|
|
250
250
|
}, U(g.name), 3)
|
|
@@ -260,13 +260,13 @@ const Ke = wn("ingredientForm", function() {
|
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
function qn() {
|
|
263
|
-
const { updateIngredient:
|
|
263
|
+
const { updateIngredient: i, deleteIngredient: o } = Ke(), b = fe(), l = Ee();
|
|
264
264
|
De();
|
|
265
|
-
const { t: c } =
|
|
265
|
+
const { t: c } = ye();
|
|
266
266
|
async function h(f, n) {
|
|
267
267
|
const r = St(n);
|
|
268
268
|
if (f === Re.Edit) {
|
|
269
|
-
await
|
|
269
|
+
await i(r);
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
272
|
if (f === Re.Delete) {
|
|
@@ -288,15 +288,15 @@ function qn() {
|
|
|
288
288
|
size: 300,
|
|
289
289
|
cell(f) {
|
|
290
290
|
const n = f.row.original, r = b.skuBindingFlattenCache[n._id], y = r == null ? void 0 : r.inventoryBindings.some(
|
|
291
|
-
(
|
|
291
|
+
(u) => "error" in u && u.reason === "circularDependency"
|
|
292
292
|
);
|
|
293
|
-
return
|
|
294
|
-
y ?
|
|
293
|
+
return X("div", { class: "flex items-center w-full gap-4" }, [
|
|
294
|
+
y ? X(
|
|
295
295
|
He.FmTooltip,
|
|
296
296
|
{ class: "text-left" },
|
|
297
297
|
{
|
|
298
298
|
default() {
|
|
299
|
-
return
|
|
299
|
+
return X(He.FmIcon, {
|
|
300
300
|
name: "info",
|
|
301
301
|
color: "system-error-300",
|
|
302
302
|
size: "sm"
|
|
@@ -317,10 +317,10 @@ function qn() {
|
|
|
317
317
|
accessorFn: (f) => xt(f),
|
|
318
318
|
cell(f) {
|
|
319
319
|
const n = f.row.original, r = xt(n);
|
|
320
|
-
return
|
|
320
|
+
return X(
|
|
321
321
|
He.FmTooltip,
|
|
322
322
|
{ zIndex: 51, content: r },
|
|
323
|
-
|
|
323
|
+
X(
|
|
324
324
|
"span",
|
|
325
325
|
{
|
|
326
326
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -337,7 +337,7 @@ function qn() {
|
|
|
337
337
|
header: () => c("inventory.ingredient.status.title"),
|
|
338
338
|
cell(f) {
|
|
339
339
|
const n = f.row.original.isInactive;
|
|
340
|
-
return
|
|
340
|
+
return X(
|
|
341
341
|
"span",
|
|
342
342
|
{
|
|
343
343
|
class: [
|
|
@@ -356,15 +356,15 @@ function qn() {
|
|
|
356
356
|
header: () => "NetSuite Subsidiary",
|
|
357
357
|
cell(f) {
|
|
358
358
|
const n = f.row.original, { flattenedSubsidiaryNames: r } = l.getSkuSubsidiaries(n._id);
|
|
359
|
-
return
|
|
360
|
-
|
|
359
|
+
return X("div", { class: "flex gap-2 items-start" }, [
|
|
360
|
+
X(
|
|
361
361
|
"span",
|
|
362
362
|
{
|
|
363
363
|
class: "flex-1 line-clamp-2 text-ellipsis break-all whitespace-pre-wrap"
|
|
364
364
|
},
|
|
365
365
|
r.join(", ")
|
|
366
366
|
),
|
|
367
|
-
|
|
367
|
+
X(Yn, { skuId: n._id, itemName: n.name, itemCode: n.code })
|
|
368
368
|
]);
|
|
369
369
|
},
|
|
370
370
|
enableSorting: !1,
|
|
@@ -390,16 +390,16 @@ function qn() {
|
|
|
390
390
|
}
|
|
391
391
|
] };
|
|
392
392
|
}
|
|
393
|
-
function xt(
|
|
393
|
+
function xt(i) {
|
|
394
394
|
var o;
|
|
395
|
-
if (
|
|
396
|
-
const b = (o =
|
|
395
|
+
if (i.trackingMeasurement) {
|
|
396
|
+
const b = (o = i.unit.measurements) == null ? void 0 : o.find((l) => l.id === i.trackingMeasurement);
|
|
397
397
|
if (b)
|
|
398
398
|
return `${b.name} (${b.abbrev})`;
|
|
399
399
|
}
|
|
400
|
-
return `${
|
|
400
|
+
return `${i.unit.name} (${i.unit.abbrev})`;
|
|
401
401
|
}
|
|
402
|
-
const Gn = /* @__PURE__ */
|
|
402
|
+
const Gn = /* @__PURE__ */ ve({
|
|
403
403
|
__name: "ConvertForm",
|
|
404
404
|
props: {
|
|
405
405
|
modelValue: {},
|
|
@@ -408,39 +408,39 @@ const Gn = /* @__PURE__ */ pe({
|
|
|
408
408
|
readonly: { type: Boolean }
|
|
409
409
|
},
|
|
410
410
|
emits: ["update:modelValue"],
|
|
411
|
-
setup(
|
|
412
|
-
const b =
|
|
413
|
-
var
|
|
414
|
-
return (
|
|
411
|
+
setup(i, { emit: o }) {
|
|
412
|
+
const b = i, l = w(() => {
|
|
413
|
+
var d;
|
|
414
|
+
return (d = b.rootValue) == null ? void 0 : d.unit;
|
|
415
415
|
}), c = w(() => {
|
|
416
|
-
var
|
|
417
|
-
return (
|
|
418
|
-
}), h = o, { t: k } =
|
|
416
|
+
var d;
|
|
417
|
+
return (d = b.rootValue) == null ? void 0 : d._id;
|
|
418
|
+
}), h = o, { t: k } = ye(), f = w({
|
|
419
419
|
get() {
|
|
420
420
|
return !!b.modelValue;
|
|
421
421
|
},
|
|
422
|
-
set(
|
|
423
|
-
|
|
422
|
+
set(d) {
|
|
423
|
+
d ? h("update:modelValue", {
|
|
424
424
|
measurement: null,
|
|
425
425
|
inventoryBindings: []
|
|
426
426
|
}) : h("update:modelValue", null);
|
|
427
427
|
}
|
|
428
428
|
}), n = w(() => Vn(l.value));
|
|
429
|
-
function r(
|
|
429
|
+
function r(d) {
|
|
430
430
|
const p = b.modelValue ?? {};
|
|
431
|
-
p.measurement =
|
|
431
|
+
p.measurement = d ? `${d}` : null, h("update:modelValue", p);
|
|
432
432
|
}
|
|
433
|
-
function y(
|
|
433
|
+
function y(d) {
|
|
434
434
|
const p = b.modelValue ?? {};
|
|
435
|
-
p.inventoryBindings =
|
|
435
|
+
p.inventoryBindings = d, h("update:modelValue", p);
|
|
436
436
|
}
|
|
437
|
-
const
|
|
437
|
+
const u = w(() => {
|
|
438
438
|
if (!b.modelValue) return null;
|
|
439
|
-
const
|
|
440
|
-
return
|
|
439
|
+
const d = b.modelValue;
|
|
440
|
+
return d.measurement ? n.value.find((p) => p.value === d.measurement) ?? null : n.value.find((p) => p.value === null) ?? null;
|
|
441
441
|
});
|
|
442
|
-
return (
|
|
443
|
-
const _ =
|
|
442
|
+
return (d, p) => {
|
|
443
|
+
const _ = A("FmSwitch"), I = A("FmSelect"), $ = A("FmCard");
|
|
444
444
|
return v(), z($, {
|
|
445
445
|
variant: "outlined",
|
|
446
446
|
class: "p-16 flex flex-col gap-16"
|
|
@@ -455,25 +455,25 @@ const Gn = /* @__PURE__ */ pe({
|
|
|
455
455
|
label: a(k)("inventory.ingredient.convertible.title"),
|
|
456
456
|
sublabel: a(k)("inventory.ingredient.convertible.subtitle"),
|
|
457
457
|
labelPlacement: "right",
|
|
458
|
-
disabled:
|
|
458
|
+
disabled: d.readonly
|
|
459
459
|
}, null, 8, ["model-value", "label", "sublabel", "disabled"]),
|
|
460
|
-
f.value ? (v(), F(
|
|
460
|
+
f.value ? (v(), F(ee, { key: 0 }, [
|
|
461
461
|
s("div", null, [
|
|
462
462
|
m(I, {
|
|
463
463
|
label: a(k)("inventory.ingredient.convertible.convertTo"),
|
|
464
|
-
modelValue: (g =
|
|
464
|
+
modelValue: (g = u.value) == null ? void 0 : g.value,
|
|
465
465
|
"onUpdate:modelValue": r,
|
|
466
466
|
items: n.value,
|
|
467
|
-
disabled:
|
|
467
|
+
disabled: d.readonly
|
|
468
468
|
}, null, 8, ["label", "modelValue", "items", "disabled"])
|
|
469
469
|
]),
|
|
470
470
|
m(In, {
|
|
471
471
|
id: c.value,
|
|
472
|
-
"model-value": ((D =
|
|
472
|
+
"model-value": ((D = d.modelValue) == null ? void 0 : D.inventoryBindings) ?? [],
|
|
473
473
|
"onUpdate:modelValue": y,
|
|
474
474
|
"exclude-binding-id": c.value,
|
|
475
475
|
rules: [a(Be)(1)],
|
|
476
|
-
readonly:
|
|
476
|
+
readonly: d.readonly
|
|
477
477
|
}, null, 8, ["id", "model-value", "exclude-binding-id", "rules", "readonly"])
|
|
478
478
|
], 64)) : j("", !0)
|
|
479
479
|
];
|
|
@@ -492,7 +492,7 @@ function ke() {
|
|
|
492
492
|
const Kn = {
|
|
493
493
|
key: 0,
|
|
494
494
|
class: "flex flex-col gap-4"
|
|
495
|
-
}, Fe = /* @__PURE__ */
|
|
495
|
+
}, Fe = /* @__PURE__ */ ve({
|
|
496
496
|
__name: "FmLockableField",
|
|
497
497
|
props: {
|
|
498
498
|
locked: { type: Boolean },
|
|
@@ -504,9 +504,9 @@ const Kn = {
|
|
|
504
504
|
tooltipPlacement: {},
|
|
505
505
|
tooltipZIndex: {}
|
|
506
506
|
},
|
|
507
|
-
setup(
|
|
507
|
+
setup(i) {
|
|
508
508
|
return (o, b) => {
|
|
509
|
-
const l =
|
|
509
|
+
const l = A("FmLabel"), c = A("FmIcon"), h = A("FmTooltip"), k = A("FmField");
|
|
510
510
|
return o.locked ? (v(), F("div", Kn, [
|
|
511
511
|
Ce(o.$slots, "label", {}, () => [
|
|
512
512
|
m(l, {
|
|
@@ -541,7 +541,7 @@ const Kn = {
|
|
|
541
541
|
default: T(() => [
|
|
542
542
|
Ce(o.$slots, "modelValue", {}, () => [
|
|
543
543
|
s("div", {
|
|
544
|
-
class:
|
|
544
|
+
class: ne([
|
|
545
545
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary",
|
|
546
546
|
"line-clamp-1 text-ellipsis break-all"
|
|
547
547
|
])
|
|
@@ -553,7 +553,7 @@ const Kn = {
|
|
|
553
553
|
]),
|
|
554
554
|
Ce(o.$slots, "helper-text", {}, () => [
|
|
555
555
|
s("div", {
|
|
556
|
-
class:
|
|
556
|
+
class: ne([
|
|
557
557
|
"fm-typo-en-body-sm-400 line-clamp-1",
|
|
558
558
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"
|
|
559
559
|
])
|
|
@@ -574,10 +574,10 @@ const Kn = {
|
|
|
574
574
|
}, So = { class: "flex flex-col" }, Io = { class: "flex items-center justify-between" }, Co = { class: "fm-typo-en-title-sm-600" }, Fo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, $o = {
|
|
575
575
|
key: 0,
|
|
576
576
|
class: "flex flex-col gap-8"
|
|
577
|
-
}, Eo = { class: "flex flex-wrap gap-8" },
|
|
577
|
+
}, Eo = { class: "flex flex-wrap gap-8" }, Mo = {
|
|
578
578
|
key: 6,
|
|
579
579
|
class: "flex flex-col gap-12"
|
|
580
|
-
},
|
|
580
|
+
}, Ao = { class: "flex flex-col" }, Uo = { class: "flex items-center justify-between" }, Po = { class: "fm-typo-en-title-sm-600" }, Ro = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Bo = {
|
|
581
581
|
key: 0,
|
|
582
582
|
class: "flex flex-col gap-8"
|
|
583
583
|
}, Oo = { class: "flex flex-wrap gap-8" }, Do = {
|
|
@@ -586,7 +586,7 @@ const Kn = {
|
|
|
586
586
|
}, No = { class: "flex flex-col" }, zo = { class: "flex items-center justify-between" }, Lo = { class: "fm-typo-en-title-sm-600" }, jo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ho = {
|
|
587
587
|
key: 0,
|
|
588
588
|
class: "flex flex-col gap-8"
|
|
589
|
-
}, Wo = { class: "flex flex-wrap gap-8" }, Yo = /* @__PURE__ */
|
|
589
|
+
}, Wo = { class: "flex flex-wrap gap-8" }, Yo = /* @__PURE__ */ ve({
|
|
590
590
|
__name: "IngredientForm",
|
|
591
591
|
props: /* @__PURE__ */ ct({
|
|
592
592
|
mode: {},
|
|
@@ -600,29 +600,29 @@ const Kn = {
|
|
|
600
600
|
searchModifiers: {}
|
|
601
601
|
}),
|
|
602
602
|
emits: /* @__PURE__ */ ct(["update:modelValue", "click:submit", "update:purchaseOrderTemplateIds", "update:wastageTemplateIds", "update:closingTemplateIds"], ["update:search"]),
|
|
603
|
-
setup(
|
|
603
|
+
setup(i, { expose: o, emit: b }) {
|
|
604
604
|
var ot;
|
|
605
|
-
const { t: l } =
|
|
606
|
-
|
|
607
|
-
const h =
|
|
605
|
+
const { t: l } = ye(), c = De();
|
|
606
|
+
Me();
|
|
607
|
+
const h = Mt(), k = It(), f = At(), n = i, r = b, y = fe(), u = we(), d = Qe(), p = Ee(), _ = w(() => p.isEnabled);
|
|
608
608
|
N(void 0);
|
|
609
609
|
const I = N([]), $ = N([]), g = N([]), D = N(!1);
|
|
610
610
|
function C(e) {
|
|
611
611
|
if (e.length === 0) return;
|
|
612
612
|
const t = e[0], S = n.modelValue ?? {
|
|
613
|
-
unit: y.units.find((
|
|
613
|
+
unit: y.units.find((M) => M)
|
|
614
614
|
};
|
|
615
615
|
S.unit || (S.unit = t, r("update:modelValue", S));
|
|
616
616
|
}
|
|
617
617
|
Wt(() => {
|
|
618
|
-
C(y.units), n.mode === W.CREATE && (
|
|
618
|
+
C(y.units), n.mode === W.CREATE && (d.mustUsePoTemplate && Q(), d.enableWastageTemplate && me(), d.enableClosingTemplate && oe());
|
|
619
619
|
}), Tt([() => y.units], ([e]) => {
|
|
620
620
|
C(e);
|
|
621
621
|
});
|
|
622
|
-
function
|
|
622
|
+
function le() {
|
|
623
623
|
r("click:submit");
|
|
624
624
|
}
|
|
625
|
-
async function
|
|
625
|
+
async function Q() {
|
|
626
626
|
I.value = [], D.value = !0;
|
|
627
627
|
try {
|
|
628
628
|
const [e] = await Promise.all([h.readTemplates()]).delayed(1e3);
|
|
@@ -633,7 +633,7 @@ const Kn = {
|
|
|
633
633
|
D.value = !1;
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
async function
|
|
636
|
+
async function me() {
|
|
637
637
|
$.value = [], D.value = !0;
|
|
638
638
|
try {
|
|
639
639
|
const [e] = await Promise.all([k.readTemplates()]).delayed(
|
|
@@ -659,7 +659,7 @@ const Kn = {
|
|
|
659
659
|
D.value = !1;
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
const
|
|
662
|
+
const se = w({
|
|
663
663
|
get() {
|
|
664
664
|
var e;
|
|
665
665
|
return ((e = n.modelValue) == null ? void 0 : e.code) ?? "";
|
|
@@ -670,7 +670,7 @@ const Kn = {
|
|
|
670
670
|
} : {};
|
|
671
671
|
t.code = e, r("update:modelValue", t);
|
|
672
672
|
}
|
|
673
|
-
}),
|
|
673
|
+
}), te = w({
|
|
674
674
|
get() {
|
|
675
675
|
var e;
|
|
676
676
|
return ((e = n.modelValue) == null ? void 0 : e.isInactive) ?? !1;
|
|
@@ -681,7 +681,7 @@ const Kn = {
|
|
|
681
681
|
} : {};
|
|
682
682
|
t.isInactive = e, r("update:modelValue", t);
|
|
683
683
|
}
|
|
684
|
-
}),
|
|
684
|
+
}), ae = w({
|
|
685
685
|
get() {
|
|
686
686
|
var e;
|
|
687
687
|
return ((e = n.modelValue) == null ? void 0 : e.name) ?? "";
|
|
@@ -699,7 +699,7 @@ const Kn = {
|
|
|
699
699
|
return e ? +Ct(e) : 0;
|
|
700
700
|
},
|
|
701
701
|
set(e) {
|
|
702
|
-
var S,
|
|
702
|
+
var S, M, q, L;
|
|
703
703
|
const t = n.modelValue ? {
|
|
704
704
|
...n.modelValue
|
|
705
705
|
} : {};
|
|
@@ -707,12 +707,12 @@ const Kn = {
|
|
|
707
707
|
costPerUnit: {
|
|
708
708
|
amount: 0,
|
|
709
709
|
precision: 2,
|
|
710
|
-
currency: ((S = Oe(
|
|
710
|
+
currency: ((S = Oe(u.currentCountry.value)) == null ? void 0 : S.currency) ?? "MYR"
|
|
711
711
|
},
|
|
712
|
-
measurement: (L = (q = (
|
|
713
|
-
(
|
|
714
|
-
var
|
|
715
|
-
return
|
|
712
|
+
measurement: (L = (q = (M = n.modelValue) == null ? void 0 : M.unit) == null ? void 0 : q.measurements) == null ? void 0 : L.find(
|
|
713
|
+
(ie) => {
|
|
714
|
+
var de;
|
|
715
|
+
return ie.id === ((de = n.modelValue) == null ? void 0 : de.trackingMeasurement);
|
|
716
716
|
}
|
|
717
717
|
)
|
|
718
718
|
}), t.defaultCost.costPerUnit = {
|
|
@@ -721,18 +721,18 @@ const Kn = {
|
|
|
721
721
|
}, r("update:modelValue", t);
|
|
722
722
|
}
|
|
723
723
|
}), be = w(() => {
|
|
724
|
-
var t, S,
|
|
724
|
+
var t, S, M;
|
|
725
725
|
const e = ((t = n.modelValue) == null ? void 0 : t.unit) ?? y.units.find((q) => q);
|
|
726
726
|
return e ? {
|
|
727
727
|
_id: e._id,
|
|
728
728
|
measurement: (S = n.modelValue) == null ? void 0 : S.trackingMeasurement,
|
|
729
|
-
name: ((
|
|
729
|
+
name: ((M = e.measurements.find((q) => {
|
|
730
730
|
var L;
|
|
731
731
|
return q.id === ((L = n.modelValue) == null ? void 0 : L.trackingMeasurement);
|
|
732
|
-
})) == null ? void 0 :
|
|
732
|
+
})) == null ? void 0 : M.name) ?? e.name
|
|
733
733
|
} : null;
|
|
734
734
|
}), Te = w(
|
|
735
|
-
() => y.units.flatMap(({ name: e, _id: t, abbrev: S, measurements:
|
|
735
|
+
() => y.units.flatMap(({ name: e, _id: t, abbrev: S, measurements: M }) => [
|
|
736
736
|
{
|
|
737
737
|
label: `${e}`,
|
|
738
738
|
value: null,
|
|
@@ -743,36 +743,36 @@ const Kn = {
|
|
|
743
743
|
value: { _id: t },
|
|
744
744
|
displayAsSection: !1
|
|
745
745
|
},
|
|
746
|
-
...
|
|
747
|
-
label: `${L} (${
|
|
746
|
+
...M.map(({ id: q, name: L, abbrev: ie }) => ({
|
|
747
|
+
label: `${L} (${ie})`,
|
|
748
748
|
value: { _id: t, measurement: q },
|
|
749
749
|
displayAsSection: !1
|
|
750
750
|
}))
|
|
751
751
|
])
|
|
752
|
-
), V = Yt(
|
|
752
|
+
), V = Yt(i, "search"), B = w(
|
|
753
753
|
() => new Zt(Te.value, ["label", "value"], {
|
|
754
754
|
caseSensitive: !1,
|
|
755
755
|
sort: !0
|
|
756
756
|
})
|
|
757
757
|
), G = w(() => B.value.search(V.value));
|
|
758
758
|
function P(e) {
|
|
759
|
-
var t, S,
|
|
760
|
-
return ((S = (t = n.modelValue) == null ? void 0 : t.unit) == null ? void 0 : S._id) === ((
|
|
759
|
+
var t, S, M, q, L;
|
|
760
|
+
return ((S = (t = n.modelValue) == null ? void 0 : t.unit) == null ? void 0 : S._id) === ((M = e.value) == null ? void 0 : M._id) && ((q = n.modelValue) == null ? void 0 : q.trackingMeasurement) === ((L = e.value) == null ? void 0 : L.measurement);
|
|
761
761
|
}
|
|
762
762
|
function x(e) {
|
|
763
|
-
var
|
|
763
|
+
var ie, de;
|
|
764
764
|
if (!e) return;
|
|
765
|
-
const { _id: t, measurement: S } = e,
|
|
765
|
+
const { _id: t, measurement: S } = e, M = S || void 0, q = y.units.find((Ie) => Ie._id === t);
|
|
766
766
|
if (!q)
|
|
767
767
|
return;
|
|
768
768
|
const L = n.modelValue ?? {};
|
|
769
|
-
L.unit = q, L.trackingMeasurement =
|
|
770
|
-
measurement: q.measurements.find((Ie) => Ie.id ===
|
|
769
|
+
L.unit = q, L.trackingMeasurement = M, L.convert && (L.convert.measurement = M || null), d.enableTotalCost && (L.defaultCost = {
|
|
770
|
+
measurement: q.measurements.find((Ie) => Ie.id === M),
|
|
771
771
|
costPerUnit: {
|
|
772
|
-
...((
|
|
772
|
+
...((ie = L.defaultCost) == null ? void 0 : ie.costPerUnit) ?? {
|
|
773
773
|
amount: 0,
|
|
774
774
|
precision: 2,
|
|
775
|
-
currency: ((
|
|
775
|
+
currency: ((de = Oe(u.currentCountry.value)) == null ? void 0 : de.currency) ?? "MYR"
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
}), r("update:modelValue", L);
|
|
@@ -793,7 +793,7 @@ const Kn = {
|
|
|
793
793
|
).map((e) => ({
|
|
794
794
|
label: l(`inventory.ingredient.valuationMethod.${e}`),
|
|
795
795
|
value: e
|
|
796
|
-
}))),
|
|
796
|
+
}))), pe = w({
|
|
797
797
|
get() {
|
|
798
798
|
var e;
|
|
799
799
|
return ((e = n.modelValue) == null ? void 0 : e.valuation) ?? "WAVG";
|
|
@@ -834,24 +834,24 @@ const Kn = {
|
|
|
834
834
|
() => {
|
|
835
835
|
var e, t, S;
|
|
836
836
|
return (e = n.modelValue) != null && e._id ? ((S = y.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : S.filter(
|
|
837
|
-
(
|
|
837
|
+
(M) => M.from === "INGREDIENT"
|
|
838
838
|
)) ?? [] : [];
|
|
839
839
|
}
|
|
840
|
-
),
|
|
840
|
+
), ue = w(
|
|
841
841
|
() => {
|
|
842
842
|
var e, t, S;
|
|
843
843
|
return (e = n.modelValue) != null && e._id ? ((S = y.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : S.filter(
|
|
844
|
-
(
|
|
844
|
+
(M) => M.from === "RECIPE"
|
|
845
845
|
)) ?? [] : [];
|
|
846
846
|
}
|
|
847
847
|
), Ve = w(
|
|
848
848
|
() => {
|
|
849
849
|
var e, t, S;
|
|
850
|
-
return (e = n.modelValue) != null && e._id ? ((S = y.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : S.filter((
|
|
850
|
+
return (e = n.modelValue) != null && e._id ? ((S = y.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : S.filter((M) => M.from === "MENU")) ?? [] : [];
|
|
851
851
|
}
|
|
852
852
|
), xe = w(
|
|
853
853
|
() => y.skus.map((e) => ({ label: e.name, value: e.code }))
|
|
854
|
-
),
|
|
854
|
+
), Ae = N((ot = n.modelValue) == null ? void 0 : ot.code);
|
|
855
855
|
function Ue(e) {
|
|
856
856
|
var S;
|
|
857
857
|
const t = e.el;
|
|
@@ -859,13 +859,13 @@ const Kn = {
|
|
|
859
859
|
}
|
|
860
860
|
const Pe = w(
|
|
861
861
|
() => {
|
|
862
|
-
var e, t, S,
|
|
863
|
-
return ((
|
|
864
|
-
(
|
|
865
|
-
var
|
|
866
|
-
return
|
|
862
|
+
var e, t, S, M, q, L;
|
|
863
|
+
return ((M = (S = (t = (e = n.modelValue) == null ? void 0 : e.unit) == null ? void 0 : t.measurements) == null ? void 0 : S.find(
|
|
864
|
+
(ie) => {
|
|
865
|
+
var de;
|
|
866
|
+
return ie.id === ((de = n.modelValue) == null ? void 0 : de.trackingMeasurement);
|
|
867
867
|
}
|
|
868
|
-
)) == null ? void 0 :
|
|
868
|
+
)) == null ? void 0 : M.abbrev) ?? ((L = (q = n.modelValue) == null ? void 0 : q.unit) == null ? void 0 : L.abbrev);
|
|
869
869
|
}
|
|
870
870
|
), he = w({
|
|
871
871
|
get() {
|
|
@@ -873,39 +873,39 @@ const Kn = {
|
|
|
873
873
|
return ((t = (e = n.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.low) ?? ke().low;
|
|
874
874
|
},
|
|
875
875
|
set(e) {
|
|
876
|
-
var
|
|
877
|
-
const t = ((
|
|
876
|
+
var M;
|
|
877
|
+
const t = ((M = n.modelValue) == null ? void 0 : M.thresholds) ?? ke();
|
|
878
878
|
t.low = e;
|
|
879
879
|
const S = n.modelValue ? {
|
|
880
880
|
...n.modelValue
|
|
881
881
|
} : {};
|
|
882
882
|
S.thresholds = t, r("update:modelValue", S);
|
|
883
883
|
}
|
|
884
|
-
}),
|
|
884
|
+
}), re = w({
|
|
885
885
|
get() {
|
|
886
886
|
var e, t;
|
|
887
887
|
return ((t = (e = n.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.mid) ?? ke().mid;
|
|
888
888
|
},
|
|
889
889
|
set(e) {
|
|
890
|
-
var
|
|
891
|
-
const t = ((
|
|
890
|
+
var M;
|
|
891
|
+
const t = ((M = n.modelValue) == null ? void 0 : M.thresholds) ?? ke();
|
|
892
892
|
t.mid = e;
|
|
893
893
|
const S = n.modelValue ? {
|
|
894
894
|
...n.modelValue
|
|
895
895
|
} : {};
|
|
896
896
|
S.thresholds = t, r("update:modelValue", S);
|
|
897
897
|
}
|
|
898
|
-
}), Se = w(() =>
|
|
898
|
+
}), Se = w(() => d.mustUsePoTemplate && n.mode === W.CREATE && I.value.length > 0 ? I.value.map((e) => ({
|
|
899
899
|
label: e.name || "Template",
|
|
900
900
|
value: e._id || "template_" + e.name
|
|
901
901
|
})) : []), Ze = w(() => Se.value.filter(
|
|
902
902
|
(e) => (n.purchaseOrderTemplateIds ?? []).includes(e.value)
|
|
903
|
-
)), Xe = w(() =>
|
|
903
|
+
)), Xe = w(() => d.enableWastageTemplate && n.mode === W.CREATE && $.value.length > 0 ? $.value.map((e) => ({
|
|
904
904
|
label: e.name || "Template",
|
|
905
905
|
value: e._id || "template_" + e.name
|
|
906
906
|
})) : []), et = w(() => Xe.value.filter(
|
|
907
907
|
(e) => (n.wastageTemplateIds ?? []).includes(e.value)
|
|
908
|
-
)), tt = w(() =>
|
|
908
|
+
)), tt = w(() => d.enableClosingTemplate && n.mode === W.CREATE && g.value.length > 0 ? g.value.map((e) => ({
|
|
909
909
|
label: e.name || "Template",
|
|
910
910
|
value: e._id || "template_" + e.name
|
|
911
911
|
})) : []), nt = w(() => tt.value.filter(
|
|
@@ -983,13 +983,13 @@ const Kn = {
|
|
|
983
983
|
};
|
|
984
984
|
}
|
|
985
985
|
return (e, t) => {
|
|
986
|
-
const S =
|
|
986
|
+
const S = A("FmTextField"), M = A("FmLabel"), q = A("FmField"), L = A("FmIcon"), ie = A("FmMenuHeader"), de = A("FmMenuDivider"), Ie = A("FmMenuItem"), Nt = A("FmMenu"), lt = A("FmFormGroup"), zt = A("FmSelect"), st = A("FmSwitch"), at = A("FmStepperField"), Ne = A("FmButton"), ze = A("FmChip"), Lt = A("FmForm");
|
|
987
987
|
return v(), z(Lt, {
|
|
988
988
|
disabled: e.disabled,
|
|
989
989
|
ref_key: "formRef",
|
|
990
990
|
ref: R,
|
|
991
991
|
class: "flex flex-col gap-32",
|
|
992
|
-
onValidationSuccess:
|
|
992
|
+
onValidationSuccess: le
|
|
993
993
|
}, {
|
|
994
994
|
default: T(() => {
|
|
995
995
|
var rt, it, dt, ut;
|
|
@@ -1000,17 +1000,17 @@ const Kn = {
|
|
|
1000
1000
|
"tooltip-message": "This field is managed by NetSuite",
|
|
1001
1001
|
"tooltip-z-index": 50,
|
|
1002
1002
|
label: a(l)("inventory.ingredient.code"),
|
|
1003
|
-
"model-value":
|
|
1004
|
-
"onUpdate:modelValue": t[1] || (t[1] = (E) =>
|
|
1003
|
+
"model-value": se.value,
|
|
1004
|
+
"onUpdate:modelValue": t[1] || (t[1] = (E) => se.value = E),
|
|
1005
1005
|
locked: _.value,
|
|
1006
1006
|
disabled: e.disabled
|
|
1007
1007
|
}, {
|
|
1008
1008
|
default: T(() => [
|
|
1009
1009
|
m(S, {
|
|
1010
1010
|
label: a(l)("inventory.ingredient.code"),
|
|
1011
|
-
"model-value":
|
|
1012
|
-
"onUpdate:modelValue": t[0] || (t[0] = (E) =>
|
|
1013
|
-
rules: [a(Le)(), a(Xt)(xe.value,
|
|
1011
|
+
"model-value": se.value,
|
|
1012
|
+
"onUpdate:modelValue": t[0] || (t[0] = (E) => se.value = E),
|
|
1013
|
+
rules: [a(Le)(), a(Xt)(xe.value, Ae.value)],
|
|
1014
1014
|
"label-mark": "required"
|
|
1015
1015
|
}, null, 8, ["label", "model-value", "rules"])
|
|
1016
1016
|
]),
|
|
@@ -1022,16 +1022,16 @@ const Kn = {
|
|
|
1022
1022
|
"tooltip-message": "This field is managed by NetSuite",
|
|
1023
1023
|
"tooltip-z-index": 50,
|
|
1024
1024
|
label: a(l)("inventory.ingredient.name"),
|
|
1025
|
-
"model-value":
|
|
1026
|
-
"onUpdate:modelValue": t[3] || (t[3] = (E) =>
|
|
1025
|
+
"model-value": ae.value,
|
|
1026
|
+
"onUpdate:modelValue": t[3] || (t[3] = (E) => ae.value = E),
|
|
1027
1027
|
locked: _.value,
|
|
1028
1028
|
disabled: e.disabled
|
|
1029
1029
|
}, {
|
|
1030
1030
|
default: T(() => [
|
|
1031
1031
|
m(S, {
|
|
1032
1032
|
label: a(l)("inventory.ingredient.name"),
|
|
1033
|
-
"model-value":
|
|
1034
|
-
"onUpdate:modelValue": t[2] || (t[2] = (E) =>
|
|
1033
|
+
"model-value": ae.value,
|
|
1034
|
+
"onUpdate:modelValue": t[2] || (t[2] = (E) => ae.value = E),
|
|
1035
1035
|
rules: [a(Le)()],
|
|
1036
1036
|
"label-mark": "required"
|
|
1037
1037
|
}, null, 8, ["label", "model-value", "rules"])
|
|
@@ -1056,7 +1056,7 @@ const Kn = {
|
|
|
1056
1056
|
"label-mark": "required"
|
|
1057
1057
|
}, {
|
|
1058
1058
|
label: T(() => [
|
|
1059
|
-
m(
|
|
1059
|
+
m(M, {
|
|
1060
1060
|
label: a(l)("inventory.ingredient.unit")
|
|
1061
1061
|
}, null, 8, ["label"])
|
|
1062
1062
|
]),
|
|
@@ -1064,7 +1064,7 @@ const Kn = {
|
|
|
1064
1064
|
m(Nt, null, {
|
|
1065
1065
|
"menu-button": T(() => [
|
|
1066
1066
|
m(q, {
|
|
1067
|
-
class:
|
|
1067
|
+
class: ne([
|
|
1068
1068
|
"fm-typo-en-body-lg-400",
|
|
1069
1069
|
{
|
|
1070
1070
|
"text-fm-color-typo-primary": !e.disabled,
|
|
@@ -1075,9 +1075,9 @@ const Kn = {
|
|
|
1075
1075
|
"append-icon": "expand_more"
|
|
1076
1076
|
}, {
|
|
1077
1077
|
default: T(() => {
|
|
1078
|
-
var
|
|
1078
|
+
var Z;
|
|
1079
1079
|
return [
|
|
1080
|
-
Je(U((
|
|
1080
|
+
Je(U((Z = be.value) == null ? void 0 : Z.name), 1)
|
|
1081
1081
|
];
|
|
1082
1082
|
}),
|
|
1083
1083
|
_: 2
|
|
@@ -1087,7 +1087,7 @@ const Kn = {
|
|
|
1087
1087
|
s("div", Xn, [
|
|
1088
1088
|
m(S, {
|
|
1089
1089
|
modelValue: V.value,
|
|
1090
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
1090
|
+
"onUpdate:modelValue": t[4] || (t[4] = (Z) => V.value = Z),
|
|
1091
1091
|
placeholder: "Filter options"
|
|
1092
1092
|
}, {
|
|
1093
1093
|
prepend: T(() => [
|
|
@@ -1099,18 +1099,18 @@ const Kn = {
|
|
|
1099
1099
|
class: "overflow-x-hidden overflow-y-auto max-h-[300px]",
|
|
1100
1100
|
onVnodeMounted: Ue
|
|
1101
1101
|
}, [
|
|
1102
|
-
(v(!0), F(
|
|
1103
|
-
|
|
1104
|
-
m(
|
|
1105
|
-
label:
|
|
1102
|
+
(v(!0), F(ee, null, ce(G.value, (Z, jt) => (v(), F(ee, { key: jt }, [
|
|
1103
|
+
Z.displayAsSection ? (v(), F(ee, { key: 0 }, [
|
|
1104
|
+
m(ie, {
|
|
1105
|
+
label: Z.label
|
|
1106
1106
|
}, null, 8, ["label"]),
|
|
1107
|
-
m(
|
|
1107
|
+
m(de)
|
|
1108
1108
|
], 64)) : (v(), z(Ie, {
|
|
1109
1109
|
key: 1,
|
|
1110
|
-
label:
|
|
1111
|
-
"model-value": P(
|
|
1112
|
-
onClick: (Vl) => x(
|
|
1113
|
-
"x-should-scroll-into": `${P(
|
|
1110
|
+
label: Z.label,
|
|
1111
|
+
"model-value": P(Z),
|
|
1112
|
+
onClick: (Vl) => x(Z.value),
|
|
1113
|
+
"x-should-scroll-into": `${P(Z)}`
|
|
1114
1114
|
}, null, 8, ["label", "model-value", "onClick", "x-should-scroll-into"]))
|
|
1115
1115
|
], 64))), 128))
|
|
1116
1116
|
], 512)
|
|
@@ -1124,19 +1124,19 @@ const Kn = {
|
|
|
1124
1124
|
]),
|
|
1125
1125
|
_: 1
|
|
1126
1126
|
}, 8, ["label", "helper-text", "model-value", "locked", "disabled"]),
|
|
1127
|
-
a(
|
|
1127
|
+
a(d).enableTotalCost ? (v(), z(Fe, {
|
|
1128
1128
|
key: 0,
|
|
1129
1129
|
"tooltip-message": "This field is managed by NetSuite",
|
|
1130
1130
|
"tooltip-z-index": 50,
|
|
1131
1131
|
label: a(l)("inventory.ingredient.valuationMethod.title"),
|
|
1132
|
-
"model-value": a(l)("inventory.ingredient.valuationMethod." +
|
|
1132
|
+
"model-value": a(l)("inventory.ingredient.valuationMethod." + pe.value),
|
|
1133
1133
|
locked: _.value,
|
|
1134
1134
|
disabled: e.disabled
|
|
1135
1135
|
}, {
|
|
1136
1136
|
label: T(() => [
|
|
1137
1137
|
m(_e, { "z-index": 50 }, {
|
|
1138
1138
|
default: T(() => [
|
|
1139
|
-
m(
|
|
1139
|
+
m(M, {
|
|
1140
1140
|
label: a(l)("inventory.ingredient.valuationMethod.title")
|
|
1141
1141
|
}, null, 8, ["label"])
|
|
1142
1142
|
]),
|
|
@@ -1147,14 +1147,14 @@ const Kn = {
|
|
|
1147
1147
|
m(zt, {
|
|
1148
1148
|
class: "col-span-2",
|
|
1149
1149
|
label: a(l)("inventory.ingredient.valuationMethod.title"),
|
|
1150
|
-
"model-value":
|
|
1151
|
-
"onUpdate:modelValue": t[5] || (t[5] = (E) =>
|
|
1150
|
+
"model-value": pe.value,
|
|
1151
|
+
"onUpdate:modelValue": t[5] || (t[5] = (E) => pe.value = E),
|
|
1152
1152
|
items: K.value
|
|
1153
1153
|
}, null, 8, ["label", "model-value", "items"])
|
|
1154
1154
|
]),
|
|
1155
1155
|
_: 1
|
|
1156
1156
|
}, 8, ["label", "model-value", "locked", "disabled"])) : j("", !0),
|
|
1157
|
-
a(
|
|
1157
|
+
a(d).enableTotalCost ? (v(), z(Fe, {
|
|
1158
1158
|
key: 1,
|
|
1159
1159
|
"tooltip-message": "This field is managed by NetSuite",
|
|
1160
1160
|
"tooltip-z-index": 50,
|
|
@@ -1165,7 +1165,7 @@ const Kn = {
|
|
|
1165
1165
|
label: T(() => [
|
|
1166
1166
|
m(_e, { "z-index": 50 }, {
|
|
1167
1167
|
default: T(() => [
|
|
1168
|
-
m(
|
|
1168
|
+
m(M, {
|
|
1169
1169
|
label: a(l)("inventory.ingredient.pricePerUnit")
|
|
1170
1170
|
}, null, 8, ["label"])
|
|
1171
1171
|
]),
|
|
@@ -1181,7 +1181,7 @@ const Kn = {
|
|
|
1181
1181
|
label: T(() => [
|
|
1182
1182
|
m(_e, { "z-index": 50 }, {
|
|
1183
1183
|
default: T(() => [
|
|
1184
|
-
m(
|
|
1184
|
+
m(M, {
|
|
1185
1185
|
label: a(l)("inventory.ingredient.pricePerUnit")
|
|
1186
1186
|
}, null, 8, ["label"])
|
|
1187
1187
|
]),
|
|
@@ -1189,9 +1189,9 @@ const Kn = {
|
|
|
1189
1189
|
})
|
|
1190
1190
|
]),
|
|
1191
1191
|
prepend: T(() => {
|
|
1192
|
-
var E,
|
|
1192
|
+
var E, Z;
|
|
1193
1193
|
return [
|
|
1194
|
-
s("div", eo, U(a(ft)(((E = a(
|
|
1194
|
+
s("div", eo, U(a(ft)(((E = a(u).currentCountry) == null ? void 0 : E.value) ?? a(yt)) === "MYR" ? "RM" : a(ft)(((Z = a(u).currentCountry) == null ? void 0 : Z.value) ?? a(yt))), 1)
|
|
1195
1195
|
];
|
|
1196
1196
|
}),
|
|
1197
1197
|
append: T(() => [
|
|
@@ -1212,8 +1212,8 @@ const Kn = {
|
|
|
1212
1212
|
e.mode !== a(W).CREATE ? (v(), F("div", no, [
|
|
1213
1213
|
m(st, {
|
|
1214
1214
|
label: a(l)("inventory.ingredient.status.inactive"),
|
|
1215
|
-
"model-value":
|
|
1216
|
-
"onUpdate:modelValue": t[8] || (t[8] = (E) =>
|
|
1215
|
+
"model-value": te.value,
|
|
1216
|
+
"onUpdate:modelValue": t[8] || (t[8] = (E) => te.value = E),
|
|
1217
1217
|
"label-placement": "right",
|
|
1218
1218
|
disabled: _.value
|
|
1219
1219
|
}, null, 8, ["label", "model-value", "disabled"]),
|
|
@@ -1235,10 +1235,10 @@ const Kn = {
|
|
|
1235
1235
|
name: a(l)("inventory.ingredient.bindedItems.ingredient"),
|
|
1236
1236
|
bindings: Y.value
|
|
1237
1237
|
}, null, 8, ["name", "bindings"])) : j("", !0),
|
|
1238
|
-
O.value &&
|
|
1238
|
+
O.value && ue.value.length ? (v(), z(qe, {
|
|
1239
1239
|
key: 1,
|
|
1240
1240
|
name: a(l)("inventory.ingredient.bindedItems.recipe"),
|
|
1241
|
-
bindings:
|
|
1241
|
+
bindings: ue.value
|
|
1242
1242
|
}, null, 8, ["name", "bindings"])) : j("", !0),
|
|
1243
1243
|
O.value && Ve.value.length ? (v(), z(qe, {
|
|
1244
1244
|
key: 2,
|
|
@@ -1258,7 +1258,7 @@ const Kn = {
|
|
|
1258
1258
|
]),
|
|
1259
1259
|
s("div", co, [
|
|
1260
1260
|
m(lt, {
|
|
1261
|
-
"model-value": { low: he.value, mid:
|
|
1261
|
+
"model-value": { low: he.value, mid: re.value },
|
|
1262
1262
|
rules: [Dt()]
|
|
1263
1263
|
}, null, 8, ["model-value", "rules"]),
|
|
1264
1264
|
s("div", mo, [
|
|
@@ -1298,15 +1298,15 @@ const Kn = {
|
|
|
1298
1298
|
s("div", go, [
|
|
1299
1299
|
s("div", bo, [
|
|
1300
1300
|
m(We, {
|
|
1301
|
-
days:
|
|
1301
|
+
days: re.value,
|
|
1302
1302
|
level: a(Ye).mid
|
|
1303
1303
|
}, null, 8, ["days", "level"])
|
|
1304
1304
|
]),
|
|
1305
1305
|
s("div", ho, [
|
|
1306
1306
|
s("div", _o, U(a(l)("inventory.ingredient.threshold.whenRemaining")), 1),
|
|
1307
1307
|
m(at, {
|
|
1308
|
-
modelValue:
|
|
1309
|
-
"onUpdate:modelValue": t[11] || (t[11] = (E) =>
|
|
1308
|
+
modelValue: re.value,
|
|
1309
|
+
"onUpdate:modelValue": t[11] || (t[11] = (E) => re.value = E),
|
|
1310
1310
|
rules: [a(Be)(0)]
|
|
1311
1311
|
}, {
|
|
1312
1312
|
append: T(() => t[14] || (t[14] = [
|
|
@@ -1331,7 +1331,7 @@ const Kn = {
|
|
|
1331
1331
|
s("div", xo, [
|
|
1332
1332
|
s("div", ko, [
|
|
1333
1333
|
m(We, {
|
|
1334
|
-
days:
|
|
1334
|
+
days: re.value + 1,
|
|
1335
1335
|
level: a(Ye).high
|
|
1336
1336
|
}, null, 8, ["days", "level"])
|
|
1337
1337
|
]),
|
|
@@ -1342,7 +1342,7 @@ const Kn = {
|
|
|
1342
1342
|
])
|
|
1343
1343
|
])
|
|
1344
1344
|
]),
|
|
1345
|
-
a(
|
|
1345
|
+
a(d).mustUsePoTemplate && e.mode === a(W).CREATE ? (v(), F("div", Vo, [
|
|
1346
1346
|
s("div", So, [
|
|
1347
1347
|
s("div", Io, [
|
|
1348
1348
|
m(_e, null, {
|
|
@@ -1363,7 +1363,7 @@ const Kn = {
|
|
|
1363
1363
|
]),
|
|
1364
1364
|
Ze.value.length > 0 ? (v(), F("div", $o, [
|
|
1365
1365
|
s("div", Eo, [
|
|
1366
|
-
(v(!0), F(
|
|
1366
|
+
(v(!0), F(ee, null, ce(Ze.value, (E) => (v(), z(ze, {
|
|
1367
1367
|
key: E.value,
|
|
1368
1368
|
label: E.label,
|
|
1369
1369
|
variant: "info",
|
|
@@ -1372,8 +1372,8 @@ const Kn = {
|
|
|
1372
1372
|
])
|
|
1373
1373
|
])) : j("", !0)
|
|
1374
1374
|
])) : j("", !0),
|
|
1375
|
-
a(
|
|
1376
|
-
s("div",
|
|
1375
|
+
a(d).enableWastageTemplate && e.mode === a(W).CREATE ? (v(), F("div", Mo, [
|
|
1376
|
+
s("div", Ao, [
|
|
1377
1377
|
s("div", Uo, [
|
|
1378
1378
|
m(_e, null, {
|
|
1379
1379
|
default: T(() => [
|
|
@@ -1393,7 +1393,7 @@ const Kn = {
|
|
|
1393
1393
|
]),
|
|
1394
1394
|
et.value.length > 0 ? (v(), F("div", Bo, [
|
|
1395
1395
|
s("div", Oo, [
|
|
1396
|
-
(v(!0), F(
|
|
1396
|
+
(v(!0), F(ee, null, ce(et.value, (E) => (v(), z(ze, {
|
|
1397
1397
|
key: E.value,
|
|
1398
1398
|
label: E.label,
|
|
1399
1399
|
variant: "info",
|
|
@@ -1402,7 +1402,7 @@ const Kn = {
|
|
|
1402
1402
|
])
|
|
1403
1403
|
])) : j("", !0)
|
|
1404
1404
|
])) : j("", !0),
|
|
1405
|
-
a(
|
|
1405
|
+
a(d).enableClosingTemplate && e.mode === a(W).CREATE ? (v(), F("div", Do, [
|
|
1406
1406
|
s("div", No, [
|
|
1407
1407
|
s("div", zo, [
|
|
1408
1408
|
m(_e, null, {
|
|
@@ -1423,7 +1423,7 @@ const Kn = {
|
|
|
1423
1423
|
]),
|
|
1424
1424
|
nt.value.length > 0 ? (v(), F("div", Ho, [
|
|
1425
1425
|
s("div", Wo, [
|
|
1426
|
-
(v(!0), F(
|
|
1426
|
+
(v(!0), F(ee, null, ce(nt.value, (E) => (v(), z(ze, {
|
|
1427
1427
|
key: E.value,
|
|
1428
1428
|
label: E.label,
|
|
1429
1429
|
variant: "info",
|
|
@@ -1448,7 +1448,7 @@ const Kn = {
|
|
|
1448
1448
|
}), qo = { class: "flex flex-col gap-32" }, Go = {
|
|
1449
1449
|
key: 0,
|
|
1450
1450
|
class: "flex justify-between items-center"
|
|
1451
|
-
}, Ko = { class: "flex gap-4" }, Jo = /* @__PURE__ */
|
|
1451
|
+
}, Ko = { class: "flex gap-4" }, Jo = /* @__PURE__ */ ve({
|
|
1452
1452
|
__name: "IngredientDialog",
|
|
1453
1453
|
props: {
|
|
1454
1454
|
show: { type: Boolean },
|
|
@@ -1456,8 +1456,8 @@ const Kn = {
|
|
|
1456
1456
|
mode: { default: W.READ }
|
|
1457
1457
|
},
|
|
1458
1458
|
emits: ["update:show"],
|
|
1459
|
-
setup(
|
|
1460
|
-
const o =
|
|
1459
|
+
setup(i) {
|
|
1460
|
+
const o = i, b = fe(), l = Qe(), c = Ee(), h = Mt(), k = It(), f = At(), n = Me(), { t: r } = ye(), y = _t(o, "show"), u = _t(o, "sku"), d = N([]), p = N([]), _ = N([]), I = w(
|
|
1461
1461
|
() => {
|
|
1462
1462
|
var V;
|
|
1463
1463
|
return c.isEnabled && c.netSuiteItemBySkuId.has((V = o.sku) == null ? void 0 : V._id);
|
|
@@ -1483,14 +1483,14 @@ const Kn = {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
return "";
|
|
1485
1485
|
}), D = N(), C = N(!1);
|
|
1486
|
-
async function
|
|
1486
|
+
async function le() {
|
|
1487
1487
|
C.value = !0;
|
|
1488
1488
|
try {
|
|
1489
|
-
await b.createSku(
|
|
1490
|
-
const V = b.skuByCode[
|
|
1491
|
-
l.enablePoTemplate &&
|
|
1489
|
+
await b.createSku(u.value);
|
|
1490
|
+
const V = b.skuByCode[u.value.code];
|
|
1491
|
+
l.enablePoTemplate && d.value.length > 0 && await me(V), l.enableWastageTemplate && p.value.length > 0 && await oe(V), l.enableClosingTemplate && _.value.length > 0 && await se(V), y.value = !1, n.open({
|
|
1492
1492
|
title: r("inventory.common.success"),
|
|
1493
|
-
message: r("inventory.ingredient.create.success", { name:
|
|
1493
|
+
message: r("inventory.ingredient.create.success", { name: u.value.name }),
|
|
1494
1494
|
type: "success"
|
|
1495
1495
|
});
|
|
1496
1496
|
} catch (V) {
|
|
@@ -1503,12 +1503,12 @@ const Kn = {
|
|
|
1503
1503
|
C.value = !1;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
|
-
async function
|
|
1506
|
+
async function Q() {
|
|
1507
1507
|
C.value = !0;
|
|
1508
1508
|
try {
|
|
1509
|
-
await b.updateSku(
|
|
1509
|
+
await b.updateSku(u.value), C.value = !1, y.value = !1, n.open({
|
|
1510
1510
|
title: r("inventory.common.success"),
|
|
1511
|
-
message: r("inventory.ingredient.update.success", { name:
|
|
1511
|
+
message: r("inventory.ingredient.update.success", { name: u.value.name }),
|
|
1512
1512
|
type: "success"
|
|
1513
1513
|
});
|
|
1514
1514
|
} catch (V) {
|
|
@@ -1521,10 +1521,10 @@ const Kn = {
|
|
|
1521
1521
|
C.value = !1;
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
|
-
async function
|
|
1524
|
+
async function me(V) {
|
|
1525
1525
|
var B, G, P, x;
|
|
1526
1526
|
try {
|
|
1527
|
-
for (const H of
|
|
1527
|
+
for (const H of d.value) {
|
|
1528
1528
|
const K = await h.getTemplate(H);
|
|
1529
1529
|
if (!K) {
|
|
1530
1530
|
console.warn(`Template with ID ${H} not found`);
|
|
@@ -1549,7 +1549,7 @@ const Kn = {
|
|
|
1549
1549
|
}
|
|
1550
1550
|
};
|
|
1551
1551
|
(((P = O.purchaseOrder.supplier) == null ? void 0 : P.internal) === bt.enum.warehouse || ((x = O.purchaseOrder.supplier) == null ? void 0 : x.internal) === bt.enum.restaurant) && (O.purchaseOrder.items = O.purchaseOrder.items.map(
|
|
1552
|
-
({ totalCost: Y, ...
|
|
1552
|
+
({ totalCost: Y, ...ue }) => ue
|
|
1553
1553
|
)), await h.updateTemplate(O), await new Promise((Y) => setTimeout(Y, 1e3));
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
@@ -1591,7 +1591,7 @@ const Kn = {
|
|
|
1591
1591
|
}), console.error("Error in updating wastage template", B);
|
|
1592
1592
|
}
|
|
1593
1593
|
}
|
|
1594
|
-
async function
|
|
1594
|
+
async function se(V) {
|
|
1595
1595
|
try {
|
|
1596
1596
|
for (const B of _.value) {
|
|
1597
1597
|
const G = await f.getTemplate(B);
|
|
@@ -1617,22 +1617,22 @@ const Kn = {
|
|
|
1617
1617
|
}), console.error("Error in updating closing template", B);
|
|
1618
1618
|
}
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1620
|
+
function te() {
|
|
1621
1621
|
var V, B;
|
|
1622
1622
|
(B = (V = D.value) == null ? void 0 : V.validateInputs) == null || B.call(V);
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1624
|
+
function ae() {
|
|
1625
1625
|
switch (o.mode) {
|
|
1626
1626
|
case W.READ:
|
|
1627
1627
|
return;
|
|
1628
1628
|
case W.UPDATE:
|
|
1629
|
-
return
|
|
1629
|
+
return Q();
|
|
1630
1630
|
case W.CREATE:
|
|
1631
|
-
return
|
|
1631
|
+
return le();
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
function ge(V) {
|
|
1635
|
-
|
|
1635
|
+
d.value = V;
|
|
1636
1636
|
}
|
|
1637
1637
|
function be(V) {
|
|
1638
1638
|
p.value = V;
|
|
@@ -1641,7 +1641,7 @@ const Kn = {
|
|
|
1641
1641
|
_.value = V;
|
|
1642
1642
|
}
|
|
1643
1643
|
return (V, B) => {
|
|
1644
|
-
const G =
|
|
1644
|
+
const G = A("FmChip"), P = A("FmButton"), x = A("FmSideSheet");
|
|
1645
1645
|
return v(), z(x, {
|
|
1646
1646
|
"model-value": a(y),
|
|
1647
1647
|
"onUpdate:modelValue": B[3] || (B[3] = (H) => mt(y) ? y.value = H : null),
|
|
@@ -1655,7 +1655,7 @@ const Kn = {
|
|
|
1655
1655
|
m(P, {
|
|
1656
1656
|
loading: C.value,
|
|
1657
1657
|
label: g.value,
|
|
1658
|
-
onClick:
|
|
1658
|
+
onClick: te
|
|
1659
1659
|
}, null, 8, ["loading", "label"]),
|
|
1660
1660
|
m(P, {
|
|
1661
1661
|
disabled: C.value,
|
|
@@ -1682,14 +1682,14 @@ const Kn = {
|
|
|
1682
1682
|
class: "w-full",
|
|
1683
1683
|
ref_key: "hasValidationExpose",
|
|
1684
1684
|
ref: D,
|
|
1685
|
-
modelValue: a(
|
|
1686
|
-
"onUpdate:modelValue": B[0] || (B[0] = (H) => mt(
|
|
1685
|
+
modelValue: a(u),
|
|
1686
|
+
"onUpdate:modelValue": B[0] || (B[0] = (H) => mt(u) ? u.value = H : null),
|
|
1687
1687
|
mode: V.mode,
|
|
1688
1688
|
disabled: C.value,
|
|
1689
|
-
purchaseOrderTemplateIds:
|
|
1689
|
+
purchaseOrderTemplateIds: d.value,
|
|
1690
1690
|
wastageTemplateIds: p.value,
|
|
1691
1691
|
closingTemplateIds: _.value,
|
|
1692
|
-
"onClick:submit": B[1] || (B[1] = (H) =>
|
|
1692
|
+
"onClick:submit": B[1] || (B[1] = (H) => ae()),
|
|
1693
1693
|
"onUpdate:purchaseOrderTemplateIds": ge,
|
|
1694
1694
|
"onUpdate:wastageTemplateIds": be,
|
|
1695
1695
|
"onUpdate:closingTemplateIds": Te
|
|
@@ -1711,13 +1711,13 @@ const Zo = {
|
|
|
1711
1711
|
precision: 0,
|
|
1712
1712
|
measurements: []
|
|
1713
1713
|
};
|
|
1714
|
-
function Xo(
|
|
1715
|
-
return !
|
|
1714
|
+
function Xo(i) {
|
|
1715
|
+
return !i || Object.keys(i).length === 0 ? "" : Object.entries(i).map(([o, b]) => `${o}: ${b}`).join(", ");
|
|
1716
1716
|
}
|
|
1717
|
-
function Ut(
|
|
1718
|
-
if (!
|
|
1717
|
+
function Ut(i) {
|
|
1718
|
+
if (!i || i.trim() === "")
|
|
1719
1719
|
return;
|
|
1720
|
-
const o = {}, b =
|
|
1720
|
+
const o = {}, b = i.split(",").map((l) => l.trim());
|
|
1721
1721
|
for (const l of b) {
|
|
1722
1722
|
const c = l.indexOf(":");
|
|
1723
1723
|
if (c > 0) {
|
|
@@ -1727,23 +1727,24 @@ function Ut(u) {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
1729
1729
|
}
|
|
1730
|
-
function el(
|
|
1730
|
+
function el(i) {
|
|
1731
1731
|
var b, l, c, h, k;
|
|
1732
1732
|
return {
|
|
1733
|
-
code:
|
|
1734
|
-
name:
|
|
1735
|
-
unit:
|
|
1736
|
-
baseUnit:
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1733
|
+
code: i.code,
|
|
1734
|
+
name: i.name,
|
|
1735
|
+
unit: i.unit.name,
|
|
1736
|
+
baseUnit: i.unit.abbrev,
|
|
1737
|
+
measurementName: ((b = i.unit.measurements.find((f) => f.id === i.trackingMeasurement)) == null ? void 0 : b.abbrev) ?? i.unit.abbrev,
|
|
1738
|
+
valuationMethod: i.valuation ?? "WAVG",
|
|
1739
|
+
pricePerUnit: (l = i.defaultCost) != null && l.costPerUnit ? +Ct((c = i.defaultCost) == null ? void 0 : c.costPerUnit) : 0,
|
|
1740
|
+
thresholdLow: ((h = i.thresholds) == null ? void 0 : h.low) ?? ke().low,
|
|
1741
|
+
thresholdMid: ((k = i.thresholds) == null ? void 0 : k.mid) ?? ke().mid,
|
|
1742
|
+
customAttributes: Xo(i.customAttributes)
|
|
1742
1743
|
};
|
|
1743
1744
|
}
|
|
1744
1745
|
function Pt() {
|
|
1745
1746
|
var c;
|
|
1746
|
-
const
|
|
1747
|
+
const i = [
|
|
1747
1748
|
{
|
|
1748
1749
|
id: "code",
|
|
1749
1750
|
name: "Code"
|
|
@@ -1759,9 +1760,13 @@ function Pt() {
|
|
|
1759
1760
|
{
|
|
1760
1761
|
id: "baseUnit",
|
|
1761
1762
|
name: "Base unit"
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
id: "measurementName",
|
|
1766
|
+
name: "Measurement Name"
|
|
1762
1767
|
}
|
|
1763
1768
|
], o = Qe(), b = we(), l = Oe(b.currentCountry.value);
|
|
1764
|
-
return o.enableTotalCost &&
|
|
1769
|
+
return o.enableTotalCost && i.push(
|
|
1765
1770
|
{
|
|
1766
1771
|
id: "valuationMethod",
|
|
1767
1772
|
name: "Valuation method"
|
|
@@ -1770,7 +1775,7 @@ function Pt() {
|
|
|
1770
1775
|
id: "pricePerUnit",
|
|
1771
1776
|
name: `Price per unit (${l == null ? void 0 : l.currency})`
|
|
1772
1777
|
}
|
|
1773
|
-
), ((c = b.currentBusiness.value) == null ? void 0 : c.menuVersion) === "v4" &&
|
|
1778
|
+
), ((c = b.currentBusiness.value) == null ? void 0 : c.menuVersion) === "v4" && i.push(
|
|
1774
1779
|
{
|
|
1775
1780
|
id: "thresholdLow",
|
|
1776
1781
|
name: "Show RED when remaining"
|
|
@@ -1779,13 +1784,13 @@ function Pt() {
|
|
|
1779
1784
|
id: "thresholdMid",
|
|
1780
1785
|
name: "Show YELLOW when remaining"
|
|
1781
1786
|
}
|
|
1782
|
-
),
|
|
1787
|
+
), i.push({
|
|
1783
1788
|
id: "customAttributes",
|
|
1784
1789
|
name: "Custom Attributes"
|
|
1785
|
-
}),
|
|
1790
|
+
}), i;
|
|
1786
1791
|
}
|
|
1787
1792
|
function tl() {
|
|
1788
|
-
const o =
|
|
1793
|
+
const o = fe().skus.map(el), l = we().currentBusiness.value, c = Pt(), h = [
|
|
1789
1794
|
["Business name:", l == null ? void 0 : l.name],
|
|
1790
1795
|
["Business ID:", l == null ? void 0 : l._id],
|
|
1791
1796
|
["Menu version", l == null ? void 0 : l.menuVersion],
|
|
@@ -1805,7 +1810,7 @@ function nl() {
|
|
|
1805
1810
|
], c = b.map((f) => `system:${f.id}`), h = $t(l, c), k = "FeedMe ingredients template.xlsx";
|
|
1806
1811
|
return Et(h, k), k;
|
|
1807
1812
|
}
|
|
1808
|
-
function ol(
|
|
1813
|
+
function ol(i) {
|
|
1809
1814
|
const [
|
|
1810
1815
|
o,
|
|
1811
1816
|
b,
|
|
@@ -1814,19 +1819,19 @@ function ol(u) {
|
|
|
1814
1819
|
h,
|
|
1815
1820
|
k,
|
|
1816
1821
|
...f
|
|
1817
|
-
] = an(
|
|
1818
|
-
if (!o || !o.length || o.some((
|
|
1822
|
+
] = an(i);
|
|
1823
|
+
if (!o || !o.length || o.some((d) => d.length && !d.startsWith("system:")))
|
|
1819
1824
|
throw new Error("Missing meta header. Excel file does not come from the template.");
|
|
1820
|
-
const n = o.map((
|
|
1825
|
+
const n = o.map((d) => d.split(":")[1]), y = ["code", "name", "unit", "baseUnit", "measurementName"].filter((d) => !n.includes(d));
|
|
1821
1826
|
if (y.length)
|
|
1822
1827
|
throw new Error(
|
|
1823
1828
|
`Missing meta headers (${y.join()}). Excel file does not come from the template.`
|
|
1824
1829
|
);
|
|
1825
|
-
return f.map((
|
|
1830
|
+
return f.map((d, p) => {
|
|
1826
1831
|
const _ = {};
|
|
1827
1832
|
for (const I in n) {
|
|
1828
1833
|
const $ = n[I];
|
|
1829
|
-
Object.assign(_, { [$]:
|
|
1834
|
+
Object.assign(_, { [$]: d[I] });
|
|
1830
1835
|
}
|
|
1831
1836
|
return {
|
|
1832
1837
|
index: p,
|
|
@@ -1834,41 +1839,44 @@ function ol(u) {
|
|
|
1834
1839
|
};
|
|
1835
1840
|
});
|
|
1836
1841
|
}
|
|
1837
|
-
function kt(
|
|
1842
|
+
function kt(i, o, b) {
|
|
1838
1843
|
var D;
|
|
1839
|
-
const c =
|
|
1844
|
+
const c = fe().units, h = new Array(), k = b.filter((C) => C.data.code === i.code);
|
|
1840
1845
|
k.length > 1 && h.push(
|
|
1841
|
-
`Code ${
|
|
1846
|
+
`Code ${i.code} is already used in row ${k.map((C) => C.index + 6).join()}.`
|
|
1842
1847
|
);
|
|
1843
|
-
const f = c.find((C) =>
|
|
1848
|
+
const f = c.find((C) => {
|
|
1849
|
+
var le, Q;
|
|
1850
|
+
return C.abbrev === i.baseUnit && ((le = C.name) == null ? void 0 : le.trim()) === ((Q = i.unit) == null ? void 0 : Q.trim());
|
|
1851
|
+
}), n = f == null ? void 0 : f.measurements.find((C) => C.abbrev === i.measurementName);
|
|
1844
1852
|
if (!f)
|
|
1845
|
-
h.push(`Cannot find base unit of symbol ${
|
|
1846
|
-
else if (
|
|
1847
|
-
const C = `Cannot find unit conversion for ${
|
|
1853
|
+
h.push(`Cannot find base unit of symbol ${i.baseUnit}.`);
|
|
1854
|
+
else if (i.baseUnit !== i.measurementName && !n) {
|
|
1855
|
+
const C = `Cannot find unit conversion for ${i.baseUnit} with symbol ${i.measurementName || "[empty]"}.`;
|
|
1848
1856
|
h.push(C);
|
|
1849
1857
|
}
|
|
1850
1858
|
const r = $e.options.find(
|
|
1851
|
-
(C) => C ===
|
|
1859
|
+
(C) => C === i.valuationMethod
|
|
1852
1860
|
);
|
|
1853
|
-
|
|
1854
|
-
`Expected valuation method to be one of ${$e.options.join()} but got ${
|
|
1861
|
+
i.valuationMethod && !r && h.push(
|
|
1862
|
+
`Expected valuation method to be one of ${$e.options.join()} but got ${i.valuationMethod} instead.`
|
|
1855
1863
|
);
|
|
1856
|
-
const
|
|
1864
|
+
const u = we().currentCountry.value, d = (C) => `${C}`.length && rn()(C) === !0, p = d(`${i.pricePerUnit}`) === !0 ? {
|
|
1857
1865
|
costPerUnit: {
|
|
1858
|
-
...Ft(Number(
|
|
1859
|
-
currency: ((D = Oe(
|
|
1866
|
+
...Ft(Number(i.pricePerUnit) || 0),
|
|
1867
|
+
currency: ((D = Oe(u)) == null ? void 0 : D.currency) ?? "MYR"
|
|
1860
1868
|
},
|
|
1861
1869
|
measurement: n
|
|
1862
|
-
} : void 0, _ =
|
|
1863
|
-
low: Number(
|
|
1864
|
-
mid: Number(
|
|
1865
|
-
} : void 0, I = "customAttributes" in
|
|
1870
|
+
} : void 0, _ = d(`${i.thresholdLow}`) && d(`${i.thresholdMid}`) ? {
|
|
1871
|
+
low: Number(i.thresholdLow) || 0,
|
|
1872
|
+
mid: Number(i.thresholdMid) || 0
|
|
1873
|
+
} : void 0, I = "customAttributes" in i ? Ut(i.customAttributes) : null;
|
|
1866
1874
|
return {
|
|
1867
1875
|
type: "create",
|
|
1868
1876
|
sku: {
|
|
1869
1877
|
_id: Qo(),
|
|
1870
|
-
code:
|
|
1871
|
-
name:
|
|
1878
|
+
code: i.code,
|
|
1879
|
+
name: i.name,
|
|
1872
1880
|
unit: f ?? c.find((C) => C) ?? Zo,
|
|
1873
1881
|
trackingMeasurement: n == null ? void 0 : n.id,
|
|
1874
1882
|
valuation: r,
|
|
@@ -1880,28 +1888,28 @@ function kt(u, o, b) {
|
|
|
1880
1888
|
excelRowNumber: o + 6
|
|
1881
1889
|
};
|
|
1882
1890
|
}
|
|
1883
|
-
function ll(
|
|
1891
|
+
function ll(i) {
|
|
1884
1892
|
try {
|
|
1885
|
-
const o = ol(
|
|
1893
|
+
const o = ol(i).filter((r) => r.data.code), l = fe().skus, c = sn(l, "code"), h = o.filter((r) => !c[r.data.code]), k = o.filter((r) => c[r.data.code]), f = h.map(
|
|
1886
1894
|
(r) => kt(r.data, r.index, o)
|
|
1887
1895
|
), n = k.map((r) => {
|
|
1888
|
-
const y = kt(r.data, r.index, o),
|
|
1889
|
-
let
|
|
1890
|
-
return "customAttributes" in r.data && (
|
|
1896
|
+
const y = kt(r.data, r.index, o), u = c[r.data.code];
|
|
1897
|
+
let d = u.customAttributes;
|
|
1898
|
+
return "customAttributes" in r.data && (d = Ut(r.data.customAttributes)), {
|
|
1891
1899
|
...y,
|
|
1892
1900
|
type: "update",
|
|
1893
|
-
original:
|
|
1901
|
+
original: u,
|
|
1894
1902
|
sku: {
|
|
1895
1903
|
// to maintain original props not in the import excel, e.g. inventory binding, etc...
|
|
1896
|
-
...
|
|
1897
|
-
code: y.sku.code ||
|
|
1898
|
-
name: y.sku.name ||
|
|
1899
|
-
unit: y.sku.unit ||
|
|
1900
|
-
trackingMeasurement: y.sku.trackingMeasurement ||
|
|
1901
|
-
valuation: y.sku.valuation ||
|
|
1902
|
-
defaultCost: y.sku.defaultCost ||
|
|
1903
|
-
thresholds: y.sku.thresholds ||
|
|
1904
|
-
customAttributes:
|
|
1904
|
+
...u,
|
|
1905
|
+
code: y.sku.code || u.code,
|
|
1906
|
+
name: y.sku.name || u.name,
|
|
1907
|
+
unit: y.sku.unit || u.unit,
|
|
1908
|
+
trackingMeasurement: y.sku.trackingMeasurement || u.trackingMeasurement,
|
|
1909
|
+
valuation: y.sku.valuation || u.valuation,
|
|
1910
|
+
defaultCost: y.sku.defaultCost || u.defaultCost,
|
|
1911
|
+
thresholds: y.sku.thresholds || u.thresholds,
|
|
1912
|
+
customAttributes: d
|
|
1905
1913
|
}
|
|
1906
1914
|
};
|
|
1907
1915
|
});
|
|
@@ -1922,7 +1930,7 @@ function ll(u) {
|
|
|
1922
1930
|
const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-col" }, rl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, il = {
|
|
1923
1931
|
key: 0,
|
|
1924
1932
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
1925
|
-
}, dl = { key: 0 }, wt = /* @__PURE__ */
|
|
1933
|
+
}, dl = { key: 0 }, wt = /* @__PURE__ */ ve({
|
|
1926
1934
|
__name: "ImportIngredientItem",
|
|
1927
1935
|
props: {
|
|
1928
1936
|
type: {},
|
|
@@ -1930,15 +1938,15 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
1930
1938
|
name: {},
|
|
1931
1939
|
errors: {}
|
|
1932
1940
|
},
|
|
1933
|
-
setup(
|
|
1941
|
+
setup(i) {
|
|
1934
1942
|
return (o, b) => {
|
|
1935
|
-
const l =
|
|
1943
|
+
const l = A("FmIcon"), c = A("FmTooltip");
|
|
1936
1944
|
return v(), F("div", sl, [
|
|
1937
1945
|
b[0] || (b[0] = s("div", null, "•", -1)),
|
|
1938
1946
|
s("div", al, [
|
|
1939
1947
|
s("div", rl, [
|
|
1940
1948
|
s("div", {
|
|
1941
|
-
class:
|
|
1949
|
+
class: ne({
|
|
1942
1950
|
"text-fm-color-system-error-300": o.errors.length
|
|
1943
1951
|
})
|
|
1944
1952
|
}, [
|
|
@@ -1949,7 +1957,7 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
1949
1957
|
m(c, { "z-index": 50 }, {
|
|
1950
1958
|
content: T(() => [
|
|
1951
1959
|
s("ol", null, [
|
|
1952
|
-
(v(!0), F(
|
|
1960
|
+
(v(!0), F(ee, null, ce(o.errors, (h, k) => (v(), F("li", { key: k }, U(h), 1))), 128))
|
|
1953
1961
|
])
|
|
1954
1962
|
]),
|
|
1955
1963
|
default: T(() => [
|
|
@@ -1964,7 +1972,7 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
1964
1972
|
])) : j("", !0)
|
|
1965
1973
|
]),
|
|
1966
1974
|
s("div", {
|
|
1967
|
-
class:
|
|
1975
|
+
class: ne([
|
|
1968
1976
|
"fm-typo-en-body-sm-400",
|
|
1969
1977
|
{
|
|
1970
1978
|
"text-fm-color-system-error-200": o.errors.length,
|
|
@@ -1985,20 +1993,20 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
1985
1993
|
}, yl = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, gl = {
|
|
1986
1994
|
key: 0,
|
|
1987
1995
|
class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
|
|
1988
|
-
}, bl = { class: "fm-typo-en-body-lg-600" }, hl = /* @__PURE__ */
|
|
1996
|
+
}, bl = { class: "fm-typo-en-body-lg-600" }, hl = /* @__PURE__ */ ve({
|
|
1989
1997
|
__name: "ImportIngredients",
|
|
1990
|
-
setup(
|
|
1991
|
-
const o = N(null), b = hn(), l =
|
|
1992
|
-
() => !!h.value.length || k.value.some((
|
|
1998
|
+
setup(i) {
|
|
1999
|
+
const o = N(null), b = hn(), l = Me(), c = N(!1), h = N(new Array()), k = N([]), f = N([]), n = w(
|
|
2000
|
+
() => !!h.value.length || k.value.some((d) => d.errors.length) || f.value.some((d) => d.errors.length)
|
|
1993
2001
|
), r = w(
|
|
1994
2002
|
() => !!k.value.length || !!f.value.length
|
|
1995
|
-
), { t: y } =
|
|
1996
|
-
async function d
|
|
2003
|
+
), { t: y } = ye();
|
|
2004
|
+
async function u(d) {
|
|
1997
2005
|
h.value = [], k.value = [], f.value = [];
|
|
1998
2006
|
try {
|
|
1999
2007
|
c.value = !0;
|
|
2000
2008
|
const [p] = await Promise.all([
|
|
2001
|
-
un(
|
|
2009
|
+
un(d),
|
|
2002
2010
|
// fake buffer
|
|
2003
2011
|
new Promise(($) => setTimeout($, 1e3))
|
|
2004
2012
|
]), _ = p.SheetNames.find(($) => $);
|
|
@@ -2029,14 +2037,14 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2029
2037
|
}), c.value = !1;
|
|
2030
2038
|
}
|
|
2031
2039
|
}
|
|
2032
|
-
return Tt(o, (
|
|
2033
|
-
|
|
2034
|
-
}), (
|
|
2035
|
-
const _ =
|
|
2040
|
+
return Tt(o, (d) => {
|
|
2041
|
+
d && u(d);
|
|
2042
|
+
}), (d, p) => {
|
|
2043
|
+
const _ = A("FmCircularProgress"), I = A("FmIcon"), $ = A("FmButton");
|
|
2036
2044
|
return v(), F("div", ul, [
|
|
2037
2045
|
s("div", cl, U(a(y)("inventory.ingredient.import.uploadDescription")), 1),
|
|
2038
2046
|
m(dn, {
|
|
2039
|
-
class:
|
|
2047
|
+
class: ne({
|
|
2040
2048
|
"w-full": !0,
|
|
2041
2049
|
"h-[200px]": !o.value
|
|
2042
2050
|
}),
|
|
@@ -2050,7 +2058,7 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2050
2058
|
fn: T(({ openFileDialog: g }) => [
|
|
2051
2059
|
s("div", ml, [
|
|
2052
2060
|
s("div", {
|
|
2053
|
-
class:
|
|
2061
|
+
class: ne([
|
|
2054
2062
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
2055
2063
|
{
|
|
2056
2064
|
"border border-fm-color-neutral-gray-100": c.value,
|
|
@@ -2070,7 +2078,7 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2070
2078
|
color: n.value ? "system-error-300" : void 0
|
|
2071
2079
|
}, null, 8, ["name", "color"])),
|
|
2072
2080
|
s("div", {
|
|
2073
|
-
class:
|
|
2081
|
+
class: ne([
|
|
2074
2082
|
"fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
|
|
2075
2083
|
{
|
|
2076
2084
|
"text-fm-color-typo-disabled": c.value,
|
|
@@ -2090,7 +2098,7 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2090
2098
|
]))
|
|
2091
2099
|
], 2),
|
|
2092
2100
|
h.value.length ? (v(), F("div", fl, [
|
|
2093
|
-
(v(!0), F(
|
|
2101
|
+
(v(!0), F(ee, null, ce(h.value, (D, C) => (v(), F("div", {
|
|
2094
2102
|
key: C,
|
|
2095
2103
|
class: "flex gap-8 items-center"
|
|
2096
2104
|
}, [
|
|
@@ -2109,14 +2117,14 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2109
2117
|
]), 1032, ["class", "label", "button-label"]),
|
|
2110
2118
|
r.value ? (v(), F("div", gl, [
|
|
2111
2119
|
s("div", bl, U(a(y)("inventory.ingredient.import.summary")), 1),
|
|
2112
|
-
(v(!0), F(
|
|
2120
|
+
(v(!0), F(ee, null, ce(k.value, (g) => (v(), z(wt, {
|
|
2113
2121
|
key: g.sku._id,
|
|
2114
2122
|
code: g.sku.code,
|
|
2115
2123
|
name: g.sku.name,
|
|
2116
2124
|
errors: g.errors,
|
|
2117
2125
|
type: "create"
|
|
2118
2126
|
}, null, 8, ["code", "name", "errors"]))), 128)),
|
|
2119
|
-
(v(!0), F(
|
|
2127
|
+
(v(!0), F(ee, null, ce(f.value, (g) => (v(), z(wt, {
|
|
2120
2128
|
key: g.sku._id,
|
|
2121
2129
|
code: g.sku.code,
|
|
2122
2130
|
name: g.sku.name,
|
|
@@ -2130,10 +2138,10 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2130
2138
|
}), _l = {
|
|
2131
2139
|
key: 0,
|
|
2132
2140
|
class: "flex items-center gap-1"
|
|
2133
|
-
}, xl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, kl = { class: "flex flex-col py-8" }, wl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Tl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ll = /* @__PURE__ */
|
|
2141
|
+
}, xl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, kl = { class: "flex flex-col py-8" }, wl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Tl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ll = /* @__PURE__ */ ve({
|
|
2134
2142
|
__name: "IngredientsView",
|
|
2135
|
-
setup(
|
|
2136
|
-
const o =
|
|
2143
|
+
setup(i) {
|
|
2144
|
+
const o = fe(), b = Ee(), l = w(() => [
|
|
2137
2145
|
{
|
|
2138
2146
|
type: "string",
|
|
2139
2147
|
key: "skuCode",
|
|
@@ -2168,7 +2176,7 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2168
2176
|
if (!c.value)
|
|
2169
2177
|
return o.skus;
|
|
2170
2178
|
const P = cn.build(c.value);
|
|
2171
|
-
return o.skus.filter((x) => b.isEnabled &&
|
|
2179
|
+
return o.skus.filter((x) => b.isEnabled && Q.value && h.value && !h.value.has(x._id) ? !1 : mn(
|
|
2172
2180
|
{
|
|
2173
2181
|
skuCode: x.code,
|
|
2174
2182
|
skuUnitAbbrev: x.unit.abbrev,
|
|
@@ -2176,29 +2184,29 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2176
2184
|
},
|
|
2177
2185
|
P
|
|
2178
2186
|
));
|
|
2179
|
-
}), f = pn(), n = De(), r = $n(), y =
|
|
2187
|
+
}), f = pn(), n = De(), r = $n(), y = Me(), { t: u } = ye(), { createIngredient: d, updateIngredient: p } = Ke(), { ingredientDialogProps: _, ingredientViewLoading: I } = Tn(Ke()), { columnDefs: $ } = qn();
|
|
2180
2188
|
function g(P) {
|
|
2181
2189
|
switch (P) {
|
|
2182
2190
|
case "add":
|
|
2183
|
-
return b.isEnabled ? void 0 :
|
|
2191
|
+
return b.isEnabled ? void 0 : d();
|
|
2184
2192
|
case "import":
|
|
2185
2193
|
return B();
|
|
2186
2194
|
case "export":
|
|
2187
2195
|
return V();
|
|
2188
2196
|
}
|
|
2189
2197
|
}
|
|
2190
|
-
const D = N(""), C = N(!1),
|
|
2198
|
+
const D = N(""), C = N(!1), le = w(() => C.value || I.value), Q = N(!0), { breakpoints: me } = _n(), oe = w(() => me.value.xs || me.value.sm), se = w(() => oe.value ? 10 : 20), te = vn(), ae = N(!1), ge = [
|
|
2191
2199
|
{
|
|
2192
2200
|
value: "import",
|
|
2193
|
-
label:
|
|
2201
|
+
label: u("common.import")
|
|
2194
2202
|
},
|
|
2195
2203
|
{
|
|
2196
2204
|
value: "export",
|
|
2197
|
-
label:
|
|
2205
|
+
label: u("common.export")
|
|
2198
2206
|
}
|
|
2199
2207
|
];
|
|
2200
2208
|
function be(P) {
|
|
2201
|
-
switch (
|
|
2209
|
+
switch (ae.value = !1, P) {
|
|
2202
2210
|
case "import":
|
|
2203
2211
|
return B();
|
|
2204
2212
|
case "export":
|
|
@@ -2208,62 +2216,62 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2208
2216
|
const Te = w(() => [
|
|
2209
2217
|
...b.isEnabled ? [] : [
|
|
2210
2218
|
{
|
|
2211
|
-
label:
|
|
2219
|
+
label: u("inventory.ingredient.create.title"),
|
|
2212
2220
|
value: "add",
|
|
2213
2221
|
isPrimary: !0,
|
|
2214
2222
|
prependIcon: "add"
|
|
2215
2223
|
}
|
|
2216
2224
|
],
|
|
2217
|
-
{ label:
|
|
2218
|
-
{ label:
|
|
2225
|
+
{ label: u("common.import"), value: "import" },
|
|
2226
|
+
{ label: u("common.export"), value: "export" }
|
|
2219
2227
|
]);
|
|
2220
2228
|
function V() {
|
|
2221
2229
|
const P = tl();
|
|
2222
2230
|
y.open({
|
|
2223
|
-
title:
|
|
2224
|
-
message:
|
|
2231
|
+
title: u("inventory.ingredient.export.success"),
|
|
2232
|
+
message: u("inventory.ingredient.export.filename", [P]),
|
|
2225
2233
|
type: "success"
|
|
2226
2234
|
});
|
|
2227
2235
|
}
|
|
2228
2236
|
function B() {
|
|
2229
2237
|
n.open({
|
|
2230
|
-
title:
|
|
2238
|
+
title: u("inventory.ingredient.import.title"),
|
|
2231
2239
|
contentComponent: hl,
|
|
2232
2240
|
overlay: !0,
|
|
2233
2241
|
closeButton: !0,
|
|
2234
2242
|
primaryActions: {
|
|
2235
|
-
text:
|
|
2243
|
+
text: u("common.import"),
|
|
2236
2244
|
close: !1
|
|
2237
2245
|
},
|
|
2238
2246
|
secondaryActions: {
|
|
2239
|
-
text:
|
|
2247
|
+
text: u("common.close"),
|
|
2240
2248
|
close: !0
|
|
2241
2249
|
},
|
|
2242
2250
|
tertiaryActions: {
|
|
2243
|
-
text:
|
|
2251
|
+
text: u("inventory.ingredient.import.actions.downloadTemplate"),
|
|
2244
2252
|
close: !1,
|
|
2245
2253
|
variant: "plain"
|
|
2246
2254
|
}
|
|
2247
2255
|
}).onPrimary((P) => {
|
|
2248
2256
|
if (!P) {
|
|
2249
2257
|
y.open({
|
|
2250
|
-
title:
|
|
2258
|
+
title: u("inventory.ingredient.import.error.noData"),
|
|
2251
2259
|
type: "error"
|
|
2252
2260
|
});
|
|
2253
2261
|
return;
|
|
2254
2262
|
}
|
|
2255
2263
|
if (!P.importCreateResult.length && !P.importUpdateResult.length) {
|
|
2256
2264
|
y.open({
|
|
2257
|
-
title:
|
|
2258
|
-
message:
|
|
2265
|
+
title: u("inventory.ingredient.import.error.invalidContent"),
|
|
2266
|
+
message: u("inventory.ingredient.import.error.noImportData"),
|
|
2259
2267
|
type: "error"
|
|
2260
2268
|
});
|
|
2261
2269
|
return;
|
|
2262
2270
|
}
|
|
2263
2271
|
if (P.importCreateResult.some((x) => x.errors.length) || P.importUpdateResult.some((x) => x.errors.length)) {
|
|
2264
2272
|
y.open({
|
|
2265
|
-
title:
|
|
2266
|
-
message:
|
|
2273
|
+
title: u("inventory.ingredient.import.error.invalidContent"),
|
|
2274
|
+
message: u("inventory.ingredient.import.error.hasErrors"),
|
|
2267
2275
|
type: "error"
|
|
2268
2276
|
});
|
|
2269
2277
|
return;
|
|
@@ -2279,16 +2287,16 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2279
2287
|
...P.importUpdateResult.map(({ sku: R }) => ({ type: "update", sku: R }))
|
|
2280
2288
|
], H = 100;
|
|
2281
2289
|
let K = 0;
|
|
2282
|
-
const
|
|
2290
|
+
const pe = () => {
|
|
2283
2291
|
K += H, y.open({
|
|
2284
|
-
title:
|
|
2292
|
+
title: u("inventory.ingredient.import.progress", [
|
|
2285
2293
|
Math.min(K, x.length),
|
|
2286
2294
|
x.length
|
|
2287
2295
|
])
|
|
2288
2296
|
});
|
|
2289
2297
|
}, J = new Array();
|
|
2290
2298
|
for (const R of x.chunk(100)) {
|
|
2291
|
-
|
|
2299
|
+
pe();
|
|
2292
2300
|
try {
|
|
2293
2301
|
const O = await o.importSkus({
|
|
2294
2302
|
create: R.filter((Y) => Y.type === "create").map((Y) => Y.sku),
|
|
@@ -2298,7 +2306,7 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2298
2306
|
} catch (O) {
|
|
2299
2307
|
J.push(
|
|
2300
2308
|
...R.map((Y) => {
|
|
2301
|
-
const
|
|
2309
|
+
const ue = {
|
|
2302
2310
|
module: bn.enum.sku,
|
|
2303
2311
|
_id: Y.sku._id,
|
|
2304
2312
|
name: Y.sku.name,
|
|
@@ -2306,24 +2314,24 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2306
2314
|
};
|
|
2307
2315
|
return {
|
|
2308
2316
|
data: Y.sku,
|
|
2309
|
-
error: [
|
|
2317
|
+
error: [ue]
|
|
2310
2318
|
};
|
|
2311
2319
|
})
|
|
2312
2320
|
);
|
|
2313
2321
|
}
|
|
2314
2322
|
}
|
|
2315
2323
|
y.open({
|
|
2316
|
-
title:
|
|
2324
|
+
title: u("inventory.ingredient.import.success"),
|
|
2317
2325
|
type: "success"
|
|
2318
2326
|
}), J.length && r.alert(
|
|
2319
2327
|
"Some operation failed",
|
|
2320
|
-
|
|
2328
|
+
X(
|
|
2321
2329
|
"div",
|
|
2322
2330
|
{ class: "flex flex-col gap-8" },
|
|
2323
2331
|
J.map(
|
|
2324
|
-
(R) =>
|
|
2325
|
-
|
|
2326
|
-
|
|
2332
|
+
(R) => X("div", { class: "flex flex-col" }, [
|
|
2333
|
+
X("div", { class: "fm-typo-en-body-lg-600" }, `(${R.data.code}) ${R.data.name}`),
|
|
2334
|
+
X(
|
|
2327
2335
|
"div",
|
|
2328
2336
|
{ class: "fm-typo-en-body-lg-400" },
|
|
2329
2337
|
`${R.error.map((O) => (O == null ? void 0 : O.message) ?? "Unknown error").join(", ")}`
|
|
@@ -2334,8 +2342,8 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2334
2342
|
);
|
|
2335
2343
|
} catch (x) {
|
|
2336
2344
|
y.open({
|
|
2337
|
-
title:
|
|
2338
|
-
message:
|
|
2345
|
+
title: u("inventory.ingredient.import.error.failed"),
|
|
2346
|
+
message: u("inventory.ingredient.import.error.systemMessage", [x == null ? void 0 : x.message]),
|
|
2339
2347
|
type: "error"
|
|
2340
2348
|
}), console.error("Error in importing skus", P, x);
|
|
2341
2349
|
} finally {
|
|
@@ -2343,15 +2351,15 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2343
2351
|
}
|
|
2344
2352
|
}
|
|
2345
2353
|
return (P, x) => {
|
|
2346
|
-
const H =
|
|
2354
|
+
const H = A("FmSwitch"), K = A("FmTable"), pe = A("FmCollapsibleTabs"), J = A("FmBottomSheet");
|
|
2347
2355
|
return v(), z(fn, {
|
|
2348
|
-
title: a(
|
|
2356
|
+
title: a(u)("inventory.ingredient.title"),
|
|
2349
2357
|
actions: Te.value,
|
|
2350
2358
|
"onClick:action": g
|
|
2351
2359
|
}, {
|
|
2352
2360
|
default: T(() => [
|
|
2353
2361
|
s("div", {
|
|
2354
|
-
class:
|
|
2362
|
+
class: ne([
|
|
2355
2363
|
"flex flex-col gap-8 max-h-full",
|
|
2356
2364
|
{
|
|
2357
2365
|
"p-0": oe.value,
|
|
@@ -2370,13 +2378,13 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2370
2378
|
}, {
|
|
2371
2379
|
default: T(() => [
|
|
2372
2380
|
a(b).isEnabled ? (v(), F("div", _l, [
|
|
2373
|
-
s("span", xl, U(a(
|
|
2381
|
+
s("span", xl, U(a(u)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
|
|
2374
2382
|
m(Sn),
|
|
2375
2383
|
m(Ge, null, {
|
|
2376
2384
|
default: T(() => [
|
|
2377
2385
|
m(H, {
|
|
2378
|
-
modelValue:
|
|
2379
|
-
"onUpdate:modelValue": x[0] || (x[0] = (R) =>
|
|
2386
|
+
modelValue: Q.value,
|
|
2387
|
+
"onUpdate:modelValue": x[0] || (x[0] = (R) => Q.value = R)
|
|
2380
2388
|
}, null, 8, ["modelValue"])
|
|
2381
2389
|
]),
|
|
2382
2390
|
_: 1
|
|
@@ -2387,17 +2395,17 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2387
2395
|
}, 8, ["search", "filter-attributes", "filter"]),
|
|
2388
2396
|
(v(), z(K, {
|
|
2389
2397
|
key: JSON.stringify(c.value),
|
|
2390
|
-
style: qt(a(
|
|
2398
|
+
style: qt(a(te).tableHeight),
|
|
2391
2399
|
"column-defs": a($),
|
|
2392
2400
|
"row-data": k.value,
|
|
2393
2401
|
"search-value": D.value,
|
|
2394
2402
|
columnVisibility: {
|
|
2395
2403
|
netsuiteSubsidiary: a(b).isEnabled
|
|
2396
2404
|
},
|
|
2397
|
-
loading: (!a(f)._currentLocation ||
|
|
2405
|
+
loading: (!a(f)._currentLocation || le.value) && a(b).isReady,
|
|
2398
2406
|
"loading-text": "Loading",
|
|
2399
2407
|
onRowClick: x[3] || (x[3] = (R) => a(p)(R.original)),
|
|
2400
|
-
"page-size":
|
|
2408
|
+
"page-size": se.value
|
|
2401
2409
|
}, {
|
|
2402
2410
|
"list-row": T((R) => [
|
|
2403
2411
|
m(gn, {
|
|
@@ -2405,19 +2413,19 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2405
2413
|
onRowClick: a(p)
|
|
2406
2414
|
}, Vt({
|
|
2407
2415
|
default: T((O) => {
|
|
2408
|
-
var Y,
|
|
2416
|
+
var Y, ue, Ve, xe, Ae, Ue, Pe, he, re, Se;
|
|
2409
2417
|
return [
|
|
2410
2418
|
s("div", kl, [
|
|
2411
2419
|
s("div", wl, [
|
|
2412
2420
|
m(a(ht), {
|
|
2413
|
-
render: (Ve = (
|
|
2414
|
-
props: (
|
|
2421
|
+
render: (Ve = (ue = (Y = O.code) == null ? void 0 : Y.column) == null ? void 0 : ue.columnDef) == null ? void 0 : Ve.cell,
|
|
2422
|
+
props: (Ae = (xe = O.code) == null ? void 0 : xe.getContext) == null ? void 0 : Ae.call(xe)
|
|
2415
2423
|
}, null, 8, ["render", "props"])
|
|
2416
2424
|
]),
|
|
2417
2425
|
s("div", Tl, [
|
|
2418
2426
|
m(a(ht), {
|
|
2419
2427
|
render: (he = (Pe = (Ue = O.name) == null ? void 0 : Ue.column) == null ? void 0 : Pe.columnDef) == null ? void 0 : he.cell,
|
|
2420
|
-
props: (Se = (
|
|
2428
|
+
props: (Se = (re = O.name) == null ? void 0 : re.getContext) == null ? void 0 : Se.call(re)
|
|
2421
2429
|
}, null, 8, ["render", "props"])
|
|
2422
2430
|
])
|
|
2423
2431
|
])
|
|
@@ -2428,7 +2436,7 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2428
2436
|
C.value ? {
|
|
2429
2437
|
name: "loading-text",
|
|
2430
2438
|
fn: T(() => [
|
|
2431
|
-
s("div", null, U(a(
|
|
2439
|
+
s("div", null, U(a(u)("inventory.ingredient.table.importing")), 1)
|
|
2432
2440
|
]),
|
|
2433
2441
|
key: "0"
|
|
2434
2442
|
} : void 0
|
|
@@ -2443,11 +2451,11 @@ const sl = { class: "flex items-center gap-12 pl-8" }, al = { class: "flex flex-
|
|
|
2443
2451
|
(v(), z(pt, { to: "body" }, [
|
|
2444
2452
|
m(J, {
|
|
2445
2453
|
"dismiss-away": "",
|
|
2446
|
-
modelValue:
|
|
2447
|
-
"onUpdate:modelValue": x[5] || (x[5] = (R) =>
|
|
2454
|
+
modelValue: ae.value,
|
|
2455
|
+
"onUpdate:modelValue": x[5] || (x[5] = (R) => ae.value = R)
|
|
2448
2456
|
}, {
|
|
2449
2457
|
default: T(() => [
|
|
2450
|
-
m(
|
|
2458
|
+
m(pe, {
|
|
2451
2459
|
class: "pb-8",
|
|
2452
2460
|
items: ge,
|
|
2453
2461
|
"onUpdate:modelValue": x[4] || (x[4] = (R) => be(R))
|