@feedmepos/mf-inventory-portal 0.0.23-dev.3 → 0.0.23-dev.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-BREfwtck.js → App-Brc7GX7l.js} +85 -73
- package/dist/{ApprovalView-DCzLx24G.js → ApprovalView-CMRd7pcC.js} +24 -27
- package/dist/{BindingsDialog-CUcC8lue.js → BindingsDialog-DoakDtFI.js} +4 -4
- package/dist/{BindingsPicker-3VOdZBWI.js → BindingsPicker-BC3rjqKw.js} +8 -9
- package/dist/{BindingsTable-D5Lt6GOO.js → BindingsTable-xKRvhEV5.js} +18 -22
- package/dist/ClosingDraftView-DlaVbAHy.js +1190 -0
- package/dist/{ClosingTemplateView-CukthwOo.js → ClosingTemplateView-DFxLuV8k.js} +272 -286
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DjGGEGQ9.js +282 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DigsIOB0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DNEwc797.js} +116 -114
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DweLQVwq.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DlM-xGKh.js} +5 -5
- package/dist/{IngredientGroupView-CkD8x2CP.js → IngredientGroupView-C4bL0O5L.js} +63 -69
- package/dist/IngredientsView-CfS8FgxA.js +1657 -0
- package/dist/{IntegrationView-BfeV07OO.js → IntegrationView-aSAeFNtp.js} +92 -95
- package/dist/{InventoryBindingForm-BsSmth0U.js → InventoryBindingForm-C7rIUyV1.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CMV5e99K.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ba6WLcom.js} +25 -27
- package/dist/{InventoryBindingSummary-BHloDawE.js → InventoryBindingSummary-Ix92wSE6.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BjddpTCS.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-6BUIvm7C.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BZBa_99i.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Cd6LQ6Yz.js} +23 -24
- package/dist/{PurchaseOrderPrintPreview-CTdd-RuH.js → PurchaseOrderPrintPreview-DJSF8YaR.js} +13 -14
- package/dist/ReceiveRequestView-BUyShiP2.js +4188 -0
- package/dist/{RecipeView-CrmDQdc5.js → RecipeView-c0XB2_P8.js} +79 -85
- package/dist/{StockView-Xb3fQaiD.js → StockView-DNPNymCW.js} +1338 -1446
- package/dist/{SupplierView-CrtIiaz0.js → SupplierView-Cz0hgito.js} +2325 -787
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-ySR4KngR.js +1227 -0
- package/dist/TransferTemplateView-B7kzPdfT.js +1264 -0
- package/dist/{UnitView-C6BgrZ1G.js → UnitView-BKWbaZfc.js} +40 -44
- package/dist/{WarehouseView-Hhd76ybU.js → WarehouseView-BgE3teyT.js} +94 -100
- package/dist/api/adjustment-template.d.ts +23 -0
- package/dist/api/bill.d.ts +2 -2
- package/dist/api/closing-draft.d.ts +6 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/netsuite.d.ts +1 -1
- package/dist/app-Bkg0JUKr.js +84182 -0
- package/dist/app.d.ts +56 -0
- package/dist/app.js +2 -2
- package/dist/components/FmMinMaxInputRules.d.ts +4 -1
- package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
- package/dist/components/row-action.enum.d.ts +1 -0
- package/dist/composable/defineDeepModel.d.ts +1 -1
- package/dist/{decimal-rPKr5T-H.js → decimal-CZ3lFF__.js} +1 -1
- package/dist/{feature-z95vJnA1.js → feature-By_PNrnn.js} +23 -9
- package/dist/format-unit-display-ZlJT10zr.js +1207 -0
- package/dist/index-B4nO9Djl.js +12087 -0
- package/dist/router/name.d.ts +2 -0
- package/dist/stock-DNajb8lV.js +125 -0
- package/dist/stores/feature.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +69 -1
- package/dist/stores/inventory.d.ts +1 -4
- package/dist/style.css +1 -1
- package/dist/{supplier-BixmjZyl.js → supplier-eaFF1izE.js} +15 -15
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-BRygbm1p.js → use-inventory-binding-dialog-14JW4t6q.js} +10 -11
- package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
- package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
- package/dist/views/adjustment-template/import/export.d.ts +60 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
- package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
- package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
- package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +621 -0
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +3621 -0
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
- package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -192
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +25 -193
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -34
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +54 -54
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +54 -54
- package/dist/views/receive-request/helper/check-netsuite-subsidiary.helper.d.ts +1 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -8
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -96
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -96
- package/package.json +3 -3
- package/dist/FmDroppableField-8RzKjEdL.js +0 -154
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dwb3eBLo.js +0 -267
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CvtvzIt1.js +0 -436
- package/dist/FmMultiselectDialog-CKBcMDGC.js +0 -415
- package/dist/IngredientsView-DuK4YSD6.js +0 -1613
- package/dist/ReceiveRequestView-CgWNaYs1.js +0 -4104
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C9H41eg7.js +0 -1189
- package/dist/TransferTemplateView-Cc7VRbZ7.js +0 -1262
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-CwUHqg7h.js +0 -33462
- package/dist/date2-CHNm4ELK.js +0 -117
- package/dist/dayjs.min-FE3dpxHU.js +0 -282
- package/dist/defineDeepModel-Dc1zZzOi.js +0 -13
- package/dist/format-time-from-id-CaPj8EHN.js +0 -15
- package/dist/format-unit-display-Bkz5kW6p.js +0 -1198
- package/dist/fuzzy-DXqhGaFi.js +0 -41
- package/dist/index-BMJHz32O.js +0 -22277
- package/dist/index-Be5vGZdr.js +0 -45
- package/dist/index-D2juQPg6.js +0 -10545
- package/dist/netsuite-P0as0Moa.js +0 -194
- package/dist/normalizeArguments-DP7Hrren.js +0 -1552
- package/dist/row-action.enum-PMKMRrZR.js +0 -50
- package/dist/rules-BQz4NGht.js +0 -198
- package/dist/use-template-enabled-locations-2-Dd15d-ng.js +0 -86
- package/dist/xlsx-k2Rf0NcF.js +0 -24004
- package/dist/xlsx.util-CJxPf7XZ.js +0 -78
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as p, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
|
|
2
|
-
import { a,
|
|
2
|
+
import { i as a, J as y } from "./app-Bkg0JUKr.js";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
|
-
const v = { class: "flex flex-col" },
|
|
4
|
+
const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, h = { class: "flex-1 py-8 px-16" }, b = {
|
|
5
5
|
class: "flex-0 py-8 px-16",
|
|
6
6
|
style: { "flex-basis": "120px" }
|
|
7
7
|
}, k = { class: "flex-1 py-8 px-16" }, B = {
|
|
@@ -32,9 +32,9 @@ const v = { class: "flex flex-col" }, b = { class: "flex flex-row fm-typo-en-bod
|
|
|
32
32
|
return e.unit !== void 0;
|
|
33
33
|
}
|
|
34
34
|
return (e, i) => (s(), n("div", v, [
|
|
35
|
-
r("div",
|
|
36
|
-
r("div",
|
|
37
|
-
r("div",
|
|
35
|
+
r("div", g, [
|
|
36
|
+
r("div", h, o(e.name), 1),
|
|
37
|
+
r("div", b, o(l(m)("inventory.ingredient.bindedItems.amount")), 1)
|
|
38
38
|
]),
|
|
39
39
|
(s(!0), n(d, null, x(e.bindings, (t) => (s(), n("div", {
|
|
40
40
|
key: t.id,
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { ref as C, computed as
|
|
2
|
-
import { a as J,
|
|
3
|
-
import { useDialog as le, useSnackbar as Z, useProxiedModel as
|
|
4
|
-
import { F as h, D as ne, R as Q } from "./row-action.enum-PMKMRrZR.js";
|
|
1
|
+
import { ref as C, computed as F, defineComponent as Y, resolveComponent as S, openBlock as M, createBlock as O, withCtx as R, createElementVNode as x, createVNode as g, unref as l, createElementBlock as ee, toDisplayString as j, createTextVNode as te, watch as ue, isRef as ce, normalizeClass as de, normalizeStyle as me, createSlots as pe, Teleport as fe, normalizeProps as ve, guardReactiveProps as ge } from "vue";
|
|
2
|
+
import { a as J, d as h, e as B, f as ye, D as oe, h as Q, G as be, l as _e, A as xe, H as ne, n as se, u as ke, x as he, y as we, z as Se, B as Ie, E as ae } from "./app-Bkg0JUKr.js";
|
|
3
|
+
import { useDialog as le, useSnackbar as Z, useProxiedModel as Fe, useBreakpoints as Ce } from "@feedmepos/ui-library";
|
|
5
4
|
import { useI18n as W } from "@feedmepos/mf-common";
|
|
6
|
-
import { defineStore as ie, storeToRefs as
|
|
7
|
-
import { c as xe, _ as ke, F as ae } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
8
|
-
import { u as he, _ as we, a as Se } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CvtvzIt1.js";
|
|
5
|
+
import { defineStore as ie, storeToRefs as re } from "pinia";
|
|
9
6
|
import "./array-hChJVZLE.js";
|
|
10
|
-
import { d as Fe } from "./defineDeepModel-Dc1zZzOi.js";
|
|
11
|
-
import { R as Ie, A as Ce } from "./rules-BQz4NGht.js";
|
|
12
|
-
import { F as re } from "./FmMultiselectDialog-CKBcMDGC.js";
|
|
13
7
|
const X = ie(
|
|
14
8
|
"ingredientGroupactions",
|
|
15
9
|
function() {
|
|
@@ -70,7 +64,7 @@ const X = ie(
|
|
|
70
64
|
}
|
|
71
65
|
}).onPrimary(() => f(d, a, s));
|
|
72
66
|
}
|
|
73
|
-
function
|
|
67
|
+
function G() {
|
|
74
68
|
}
|
|
75
69
|
function b() {
|
|
76
70
|
}
|
|
@@ -78,12 +72,12 @@ const X = ie(
|
|
|
78
72
|
createIngredientGroup: p,
|
|
79
73
|
updateIngredientGroup: v,
|
|
80
74
|
deleteIngredientGroup: y,
|
|
81
|
-
importIngredientGroups:
|
|
75
|
+
importIngredientGroups: G,
|
|
82
76
|
exportIngredientGroups: b,
|
|
83
77
|
ingredientGroupDialogProps: i
|
|
84
78
|
};
|
|
85
79
|
}
|
|
86
|
-
),
|
|
80
|
+
), Ge = ie(
|
|
87
81
|
"ingredientGroupTable",
|
|
88
82
|
function() {
|
|
89
83
|
const c = C(!1), w = Z(), o = J(), r = X();
|
|
@@ -113,7 +107,7 @@ const X = ie(
|
|
|
113
107
|
);
|
|
114
108
|
}
|
|
115
109
|
}
|
|
116
|
-
const v =
|
|
110
|
+
const v = F(() => [
|
|
117
111
|
{
|
|
118
112
|
accessorKey: "name",
|
|
119
113
|
header: () => "Name"
|
|
@@ -130,8 +124,8 @@ const X = ie(
|
|
|
130
124
|
id: "action",
|
|
131
125
|
header: "",
|
|
132
126
|
cell(f) {
|
|
133
|
-
return
|
|
134
|
-
[
|
|
127
|
+
return ye(
|
|
128
|
+
[oe[Q.Edit], oe[Q.Delete]],
|
|
135
129
|
(y) => {
|
|
136
130
|
p(y, f.row.original);
|
|
137
131
|
}
|
|
@@ -151,7 +145,7 @@ const X = ie(
|
|
|
151
145
|
columnDefs: v
|
|
152
146
|
};
|
|
153
147
|
}
|
|
154
|
-
),
|
|
148
|
+
), Ae = { class: "flex flex-col gap-16" }, De = { class: "flex flex-col gap-8 cursor-pointer" }, Ve = {
|
|
155
149
|
key: 0,
|
|
156
150
|
class: "text-fm-color-typo-primary fm-typo-en-body-lg-400 line-clamp-1 break-all"
|
|
157
151
|
}, Ee = { class: "text-fm-color-typo-secondary" }, Re = {
|
|
@@ -166,7 +160,7 @@ const X = ie(
|
|
|
166
160
|
},
|
|
167
161
|
emits: ["validation-success"],
|
|
168
162
|
setup(U, { expose: c, emit: w }) {
|
|
169
|
-
const o =
|
|
163
|
+
const o = be("modelValue"), r = w, i = J(), p = le(), { t: v } = W(), f = C();
|
|
170
164
|
c({
|
|
171
165
|
validateInputs: () => {
|
|
172
166
|
var a;
|
|
@@ -181,8 +175,8 @@ const X = ie(
|
|
|
181
175
|
return (a = f.value) == null ? void 0 : a.resetInputs();
|
|
182
176
|
}
|
|
183
177
|
});
|
|
184
|
-
const y =
|
|
185
|
-
function
|
|
178
|
+
const y = F(() => i.skus.groupBy((a) => a.unit._id));
|
|
179
|
+
function G() {
|
|
186
180
|
var s;
|
|
187
181
|
const a = i.skus.filter((n) => {
|
|
188
182
|
var t;
|
|
@@ -198,7 +192,7 @@ const X = ie(
|
|
|
198
192
|
p.open({
|
|
199
193
|
title: v("inventory.closing.form.items.selectItem"),
|
|
200
194
|
closeButton: !0,
|
|
201
|
-
contentComponent:
|
|
195
|
+
contentComponent: ne,
|
|
202
196
|
contentComponentProps: {
|
|
203
197
|
modelValue: [(s = o.skus) == null ? void 0 : s[0]],
|
|
204
198
|
items: a,
|
|
@@ -237,7 +231,7 @@ const X = ie(
|
|
|
237
231
|
p.open({
|
|
238
232
|
title: v("inventory.closing.form.items.selectItem"),
|
|
239
233
|
closeButton: !0,
|
|
240
|
-
contentComponent:
|
|
234
|
+
contentComponent: ne,
|
|
241
235
|
contentComponentProps: {
|
|
242
236
|
modelValue: s,
|
|
243
237
|
items: a,
|
|
@@ -255,8 +249,8 @@ const X = ie(
|
|
|
255
249
|
}).onPrimary((n) => {
|
|
256
250
|
var u, _;
|
|
257
251
|
const t = ((u = o.skus) == null ? void 0 : u.slice(1)) ?? [], e = n.map((m) => {
|
|
258
|
-
const
|
|
259
|
-
return
|
|
252
|
+
const A = t.find((D) => (D == null ? void 0 : D._id) === m._id);
|
|
253
|
+
return A || B(m, ["unit"]);
|
|
260
254
|
});
|
|
261
255
|
o.skus = [(_ = o.skus) == null ? void 0 : _[0], ...e];
|
|
262
256
|
});
|
|
@@ -274,21 +268,21 @@ const X = ie(
|
|
|
274
268
|
}
|
|
275
269
|
];
|
|
276
270
|
return (a, s) => {
|
|
277
|
-
const n = S("FmTextField"), t = S("FmLabel"), e = S("FmField"), u = S("FmFormGroup"), _ = S("FmButton"), m = S("FmTable"),
|
|
278
|
-
return M(), O(
|
|
279
|
-
onValidationSuccess: s[5] || (s[5] = (
|
|
271
|
+
const n = S("FmTextField"), t = S("FmLabel"), e = S("FmField"), u = S("FmFormGroup"), _ = S("FmButton"), m = S("FmTable"), A = S("FmForm");
|
|
272
|
+
return M(), O(A, {
|
|
273
|
+
onValidationSuccess: s[5] || (s[5] = (I) => r("validation-success")),
|
|
280
274
|
ref_key: "formRef",
|
|
281
275
|
ref: f,
|
|
282
276
|
class: "flex flex-col gap-32"
|
|
283
277
|
}, {
|
|
284
278
|
default: R(() => {
|
|
285
|
-
var
|
|
279
|
+
var I, D, V, T, z;
|
|
286
280
|
return [
|
|
287
|
-
x("div",
|
|
281
|
+
x("div", Ae, [
|
|
288
282
|
g(n, {
|
|
289
283
|
label: "Name",
|
|
290
284
|
"label-mark": "required",
|
|
291
|
-
rules: [l(
|
|
285
|
+
rules: [l(_e)()],
|
|
292
286
|
modelValue: l(o).name,
|
|
293
287
|
"onUpdate:modelValue": s[0] || (s[0] = (k) => l(o).name = k)
|
|
294
288
|
}, null, 8, ["rules", "modelValue"]),
|
|
@@ -298,30 +292,30 @@ const X = ie(
|
|
|
298
292
|
modelValue: l(o).ref,
|
|
299
293
|
"onUpdate:modelValue": s[1] || (s[1] = (k) => l(o).ref = k)
|
|
300
294
|
}, null, 8, ["modelValue"]),
|
|
301
|
-
x("div",
|
|
295
|
+
x("div", De, [
|
|
302
296
|
g(t, {
|
|
303
297
|
label: "Main ingredient",
|
|
304
298
|
required: ""
|
|
305
299
|
}),
|
|
306
300
|
g(e, {
|
|
307
|
-
onClick: s[2] || (s[2] = (k) =>
|
|
301
|
+
onClick: s[2] || (s[2] = (k) => G())
|
|
308
302
|
}, {
|
|
309
303
|
default: R(() => {
|
|
310
|
-
var k, E, $,
|
|
304
|
+
var k, E, $, L, N, K, q, P, H;
|
|
311
305
|
return [
|
|
312
306
|
($ = (E = (k = l(o)) == null ? void 0 : k.skus) == null ? void 0 : E[0]) != null && $.name ? (M(), ee("span", Ve, [
|
|
313
|
-
x("span", Ee, "[" +
|
|
314
|
-
te(" " +
|
|
315
|
-
])) : (M(), ee("span", Re,
|
|
307
|
+
x("span", Ee, "[" + j((K = (N = (L = l(o)) == null ? void 0 : L.skus) == null ? void 0 : N[0]) == null ? void 0 : K.code) + "]", 1),
|
|
308
|
+
te(" " + j((H = (P = (q = l(o)) == null ? void 0 : q.skus) == null ? void 0 : P[0]) == null ? void 0 : H.name), 1)
|
|
309
|
+
])) : (M(), ee("span", Re, j("Click to select main item")))
|
|
316
310
|
];
|
|
317
311
|
}),
|
|
318
312
|
_: 1
|
|
319
313
|
}),
|
|
320
314
|
x("div", Te, [
|
|
321
|
-
s[6] || (s[6] = te(
|
|
315
|
+
s[6] || (s[6] = te(j("Select a main item to filter out substitutable items with same unit.") + " ")),
|
|
322
316
|
g(u, {
|
|
323
|
-
"model-value": ((
|
|
324
|
-
rules: [l(
|
|
317
|
+
"model-value": ((I = l(o)) == null ? void 0 : I.skus) ?? [],
|
|
318
|
+
rules: [l(xe)(1, "Required")]
|
|
325
319
|
}, null, 8, ["model-value", "rules"])
|
|
326
320
|
])
|
|
327
321
|
])
|
|
@@ -332,7 +326,7 @@ const X = ie(
|
|
|
332
326
|
x("div", null, [
|
|
333
327
|
g(_, {
|
|
334
328
|
label: "Add items",
|
|
335
|
-
disabled: (((V = (
|
|
329
|
+
disabled: (((V = (D = l(o)) == null ? void 0 : D.skus) == null ? void 0 : V.length) ?? 0) < 1,
|
|
336
330
|
onClick: s[3] || (s[3] = (k) => b()),
|
|
337
331
|
"prepend-icon": "add",
|
|
338
332
|
variant: "secondary",
|
|
@@ -352,7 +346,7 @@ const X = ie(
|
|
|
352
346
|
}),
|
|
353
347
|
draggable: "",
|
|
354
348
|
"hide-footer": "",
|
|
355
|
-
"page-size": ((
|
|
349
|
+
"page-size": ((z = l(o).skus) == null ? void 0 : z.length) ?? 0
|
|
356
350
|
}, null, 8, ["row-data", "page-size"])
|
|
357
351
|
])
|
|
358
352
|
];
|
|
@@ -370,7 +364,7 @@ const X = ie(
|
|
|
370
364
|
},
|
|
371
365
|
emits: ["update:show"],
|
|
372
366
|
setup(U) {
|
|
373
|
-
const c = U, w = J(), o = Z(), { t: r } = W(), i =
|
|
367
|
+
const c = U, w = J(), o = Z(), { t: r } = W(), i = Fe(c, "show"), p = C({}), v = C(`${Math.random()}`);
|
|
374
368
|
ue(
|
|
375
369
|
() => c.show,
|
|
376
370
|
(t) => {
|
|
@@ -382,7 +376,7 @@ const X = ie(
|
|
|
382
376
|
}), v.value = `${Math.random()}`);
|
|
383
377
|
}
|
|
384
378
|
);
|
|
385
|
-
const f =
|
|
379
|
+
const f = F(() => {
|
|
386
380
|
switch (c.mode) {
|
|
387
381
|
case h.READ:
|
|
388
382
|
return "";
|
|
@@ -392,7 +386,7 @@ const X = ie(
|
|
|
392
386
|
return r("inventory.ingredient.create.title");
|
|
393
387
|
}
|
|
394
388
|
return "";
|
|
395
|
-
}), y =
|
|
389
|
+
}), y = F(() => {
|
|
396
390
|
switch (c.mode) {
|
|
397
391
|
case h.READ:
|
|
398
392
|
return "";
|
|
@@ -402,7 +396,7 @@ const X = ie(
|
|
|
402
396
|
return r("common.add");
|
|
403
397
|
}
|
|
404
398
|
return "";
|
|
405
|
-
}),
|
|
399
|
+
}), G = C(), b = C(!1);
|
|
406
400
|
async function d() {
|
|
407
401
|
b.value = !0;
|
|
408
402
|
const t = B(p.value);
|
|
@@ -413,7 +407,7 @@ const X = ie(
|
|
|
413
407
|
type: "success"
|
|
414
408
|
});
|
|
415
409
|
} catch (e) {
|
|
416
|
-
e instanceof
|
|
410
|
+
e instanceof se || o.open({
|
|
417
411
|
title: r("inventory.ingredient.create.error.title"),
|
|
418
412
|
message: r("inventory.ingredient.create.error.message"),
|
|
419
413
|
type: "error"
|
|
@@ -432,7 +426,7 @@ const X = ie(
|
|
|
432
426
|
type: "success"
|
|
433
427
|
});
|
|
434
428
|
} catch (e) {
|
|
435
|
-
e instanceof
|
|
429
|
+
e instanceof se || o.open({
|
|
436
430
|
title: r("inventory.ingredient.update.error.title"),
|
|
437
431
|
message: r("inventory.ingredient.update.error.message"),
|
|
438
432
|
type: "error"
|
|
@@ -443,7 +437,7 @@ const X = ie(
|
|
|
443
437
|
}
|
|
444
438
|
function s() {
|
|
445
439
|
var t, e;
|
|
446
|
-
(e = (t =
|
|
440
|
+
(e = (t = G.value) == null ? void 0 : t.validateInputs) == null || e.call(t);
|
|
447
441
|
}
|
|
448
442
|
function n() {
|
|
449
443
|
switch (c.mode) {
|
|
@@ -484,7 +478,7 @@ const X = ie(
|
|
|
484
478
|
(M(), O(Me, {
|
|
485
479
|
class: "w-full",
|
|
486
480
|
ref_key: "hasValidationExpose",
|
|
487
|
-
ref:
|
|
481
|
+
ref: G,
|
|
488
482
|
key: v.value,
|
|
489
483
|
"model-value": p.value,
|
|
490
484
|
"onUpdate:modelValue": e[0] || (e[0] = (m) => p.value = m),
|
|
@@ -497,17 +491,17 @@ const X = ie(
|
|
|
497
491
|
}, 8, ["model-value", "header"]);
|
|
498
492
|
};
|
|
499
493
|
}
|
|
500
|
-
}),
|
|
494
|
+
}), ze = { class: "flex flex-col py-8" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Qe = /* @__PURE__ */ Y({
|
|
501
495
|
__name: "IngredientGroupView",
|
|
502
496
|
setup(U) {
|
|
503
|
-
const c = J(), w =
|
|
497
|
+
const c = J(), w = F(() => c.skuGroups), o = ke(), { t: r } = W(), {
|
|
504
498
|
createIngredientGroup: i,
|
|
505
499
|
updateIngredientGroup: p,
|
|
506
500
|
importIngredientGroups: v,
|
|
507
501
|
exportIngredientGroups: f
|
|
508
|
-
} = X(), { columnDefs: y, loading:
|
|
509
|
-
function d(
|
|
510
|
-
switch (
|
|
502
|
+
} = X(), { columnDefs: y, loading: G } = re(Ge()), { ingredientGroupDialogProps: b } = re(X());
|
|
503
|
+
function d(A) {
|
|
504
|
+
switch (A) {
|
|
511
505
|
case "add":
|
|
512
506
|
return i();
|
|
513
507
|
case "import":
|
|
@@ -516,7 +510,7 @@ const X = ie(
|
|
|
516
510
|
return f();
|
|
517
511
|
}
|
|
518
512
|
}
|
|
519
|
-
const a = C(""), s = C(!1), n =
|
|
513
|
+
const a = C(""), s = C(!1), n = F(() => s.value || G.value), { breakpoints: t } = Ce(), e = F(() => t.value.xs || t.value.sm), u = F(() => e.value ? 10 : 20), _ = he(), m = F(() => [
|
|
520
514
|
{
|
|
521
515
|
label: r("inventory.ingredient.create.title"),
|
|
522
516
|
value: "add",
|
|
@@ -526,8 +520,8 @@ const X = ie(
|
|
|
526
520
|
{ label: r("common.import"), value: "import" },
|
|
527
521
|
{ label: r("common.export"), value: "export" }
|
|
528
522
|
]);
|
|
529
|
-
return (
|
|
530
|
-
const
|
|
523
|
+
return (A, I) => {
|
|
524
|
+
const D = S("FmTable");
|
|
531
525
|
return M(), O(we, {
|
|
532
526
|
title: l(r)("inventory.ingredientGroup.title"),
|
|
533
527
|
actions: m.value,
|
|
@@ -546,37 +540,37 @@ const X = ie(
|
|
|
546
540
|
g(Se, {
|
|
547
541
|
searchable: "",
|
|
548
542
|
search: a.value,
|
|
549
|
-
"onUpdate:search":
|
|
543
|
+
"onUpdate:search": I[0] || (I[0] = (V) => a.value = V)
|
|
550
544
|
}, null, 8, ["search"]),
|
|
551
|
-
g(
|
|
545
|
+
g(D, {
|
|
552
546
|
style: me(l(_).tableHeight),
|
|
553
547
|
"column-defs": l(y),
|
|
554
548
|
"row-data": w.value,
|
|
555
549
|
"search-value": a.value,
|
|
556
550
|
loading: !l(o)._currentLocation || n.value,
|
|
557
551
|
"loading-text": "Loading",
|
|
558
|
-
onRowClick:
|
|
552
|
+
onRowClick: I[1] || (I[1] = (V) => l(p)(V.original)),
|
|
559
553
|
"page-size": u.value
|
|
560
554
|
}, {
|
|
561
555
|
"list-row": R((V) => [
|
|
562
|
-
g(
|
|
556
|
+
g(Ie, {
|
|
563
557
|
row: V,
|
|
564
558
|
onRowClick: l(p)
|
|
565
559
|
}, pe({
|
|
566
560
|
default: R((T) => {
|
|
567
|
-
var
|
|
561
|
+
var z, k, E, $, L, N, K, q, P, H;
|
|
568
562
|
return [
|
|
569
|
-
x("div",
|
|
570
|
-
x("div",
|
|
563
|
+
x("div", ze, [
|
|
564
|
+
x("div", Le, [
|
|
571
565
|
g(l(ae), {
|
|
572
|
-
render: (E = (k = (
|
|
573
|
-
props: (
|
|
566
|
+
render: (E = (k = (z = T.code) == null ? void 0 : z.column) == null ? void 0 : k.columnDef) == null ? void 0 : E.cell,
|
|
567
|
+
props: (L = ($ = T.code) == null ? void 0 : $.getContext) == null ? void 0 : L.call($)
|
|
574
568
|
}, null, 8, ["render", "props"])
|
|
575
569
|
]),
|
|
576
570
|
x("div", Ne, [
|
|
577
571
|
g(l(ae), {
|
|
578
572
|
render: (q = (K = (N = T.name) == null ? void 0 : N.column) == null ? void 0 : K.columnDef) == null ? void 0 : q.cell,
|
|
579
|
-
props: (
|
|
573
|
+
props: (H = (P = T.name) == null ? void 0 : P.getContext) == null ? void 0 : H.call(P)
|
|
580
574
|
}, null, 8, ["render", "props"])
|
|
581
575
|
])
|
|
582
576
|
])
|
|
@@ -587,7 +581,7 @@ const X = ie(
|
|
|
587
581
|
s.value ? {
|
|
588
582
|
name: "loading-text",
|
|
589
583
|
fn: R(() => [
|
|
590
|
-
x("div", null,
|
|
584
|
+
x("div", null, j(l(r)("inventory.ingredient.table.importing")), 1)
|
|
591
585
|
]),
|
|
592
586
|
key: "0"
|
|
593
587
|
} : void 0
|
|
@@ -606,5 +600,5 @@ const X = ie(
|
|
|
606
600
|
}
|
|
607
601
|
});
|
|
608
602
|
export {
|
|
609
|
-
|
|
603
|
+
Qe as default
|
|
610
604
|
};
|