@feedmepos/mf-inventory-portal 1.2.30-dev.1 → 1.2.31-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-kX4bqoEe.js → App-DfKh34ES.js} +43 -41
- package/dist/{ApprovalView-DCNKqVE2.js → ApprovalView-DyoKsEqh.js} +34 -28
- package/dist/{BindingsDialog-d7f1f8gf.js → BindingsDialog-7rGLzkyA.js} +8 -8
- package/dist/{BindingsPicker-2HJOx0QW.js → BindingsPicker-Cj1DvhQN.js} +6 -5
- package/dist/{BindingsTable-CPAjxOZG.js → BindingsTable-CAreptqr.js} +28 -24
- package/dist/{ClosingDraftView-CUng41eo.js → ClosingDraftView-DoDGz9Y8.js} +183 -175
- package/dist/{ClosingHistoryView-CcGc2NwU.js → ClosingHistoryView-BJSE7ZSv.js} +43 -41
- package/dist/{ClosingTemplateView-D8IAdhDb.js → ClosingTemplateView-Dr2eJk4h.js} +94 -76
- package/dist/{DeliveryOrderPrintPreview-BsM-CCc5.js → DeliveryOrderPrintPreview-BzYLm6J6.js} +15 -14
- package/dist/FmDroppableField-J0xUsOTV.js +154 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-cuggJ5Xd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-16r_hkBE.js} +74 -72
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Csesow4V.js +279 -0
- package/dist/FmMultiselectDialog-BGhSjgbj.js +597 -0
- package/dist/{FmMultiselectDialog-BGbrqXUF.js → FmMultiselectDialog-DUrpqAkF.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-isogcN1O.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CSv7osJW.js} +51 -49
- package/dist/{ImportView-wAVrMEwL.js → ImportView-BAkyTU_3.js} +81 -74
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVUF4I2Q.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-z0IAsrH_.js} +5 -5
- package/dist/{IngredientGroupView-BZczeXdL.js → IngredientGroupView-D7gurA7T.js} +73 -65
- package/dist/{IngredientsView-D5N5Y1ZY.js → IngredientsView-hwfpMtTX.js} +358 -345
- package/dist/{IntegrationView-Hrslmuc1.js → IntegrationView-DwqzQ6E3.js} +1618 -1593
- package/dist/{InventoryBindingForm-DH6wgxOG.js → InventoryBindingForm-CwjM6Rqk.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Drr5vD6f.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BPr8PDwu.js} +41 -40
- package/dist/{InventoryBindingSummary-BU1ehpQZ.js → InventoryBindingSummary-B7UFFMkm.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1ueC4GfZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Djo2b2Ix.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-FHcU1zZt.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BSgGGiN6.js} +22 -21
- package/dist/{PublishView-CQtj0f31.js → PublishView-CA9gFV_r.js} +26 -23
- package/dist/{PurchaseOrderPrintPreview-BQyXtHST.js → PurchaseOrderPrintPreview-BeHd82Y0.js} +10 -9
- package/dist/{ReceiveRequestView-Dm-h_SrY.js → ReceiveRequestView-DEthRdM1.js} +472 -456
- package/dist/{RecipeView-DNNRvr1w.js → RecipeView-D45gkYHY.js} +73 -64
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js +251 -0
- package/dist/{StockView-CaOm5BCx.js → StockView-COx7A4Ac.js} +292 -282
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Z91XRszD.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DX35xDkm.js} +1 -1
- package/dist/{SupplierView-JSII9qwL.js → SupplierView-DHM3dJMZ.js} +92 -80
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-Bg2K2ULw.js +177 -0
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CyMEGFh5.js +123 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Mehd4lGs.js → TransferDetails.vue_vue_type_script_setup_true_lang-CVm2bXic.js} +318 -305
- package/dist/{TransferTemplateView-DyCpNKJd.js → TransferTemplateView-BtYozLuk.js} +228 -216
- package/dist/{UnitView-CqN7mlJ2.js → UnitView-B4mqodQa.js} +70 -63
- package/dist/{WarehouseView-gFWD-m8e.js → WarehouseView-CjDM8L_V.js} +123 -114
- package/dist/WastageTemplateView-Be4Y_zV8.js +2288 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/api/netsuite.d.ts +9 -3
- package/dist/app-DYsP0gKj.js +64121 -0
- package/dist/app-rgirz_52.js +8024 -0
- package/dist/app.js +6 -6
- package/dist/closing-template-BVy1ga2g.js +117 -0
- package/dist/date2-BO7HiZTk.js +116 -0
- package/dist/dayjs.min-HNt4C1ja.js +282 -0
- package/dist/{decimal-DfF_g5rc.js → decimal-BJ8rKm1R.js} +4 -3
- package/dist/defineDeepModel-CidpVmK7.js +19 -0
- package/dist/duplicate-template-C25Z0lvq.js +34 -0
- package/dist/feature-DCia3aqG.js +20162 -0
- package/dist/form-mode.enum-BKiNVH6A.js +4 -0
- package/dist/format-time-from-id-BPws326b.js +15 -0
- package/dist/{format-unit-display-ivAljvlo.js → format-unit-display-C2P3mS8l.js} +308 -297
- package/dist/{import-export.helper-B2MWv9v7.js → import-export.helper-Dt6ZMAPT.js} +56 -52
- package/dist/{index-DZaT0ZaL.js → index-6zxXdF-V.js} +1 -1
- package/dist/index-BjUDHtA2.js +45 -0
- package/dist/{index-BbhuWHyh.js → index-tZj47B-j.js} +16 -14
- package/dist/lodash-DLMgBu6M.js +3678 -0
- package/dist/netsuite-BSMLXIQa.js +4979 -0
- package/dist/{purchase-order-template-DdybMC_P.js → purchase-order-template-D5NGCbI2.js} +1 -1
- package/dist/router/shared.spec.d.ts +1 -0
- package/dist/row-action.enum-BcW_L_nE.js +67 -0
- package/dist/rules-BiaGzhvQ.js +201 -0
- package/dist/{stock-BYagIdsj.js → stock-DOCQ91Jh.js} +1 -1
- package/dist/{stock-V4ciPiBe.js → stock-Ty-89Ap8.js} +11 -10
- package/dist/stores/integration/netsuite.d.ts +5 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-CgtB1I9I.js → supplier-Dxb5ULjF.js} +27 -26
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BIQovyZX.js → use-ingredient-select-dialog-BI0yIG6A.js} +4 -3
- package/dist/{use-inventory-binding-dialog-DyjicXgc.js → use-inventory-binding-dialog-CbZC-VuL.js} +4 -3
- package/dist/use-template-enabled-locations-2-Dhttpl0B.js +111 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1 -1
- package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +6 -2
- package/dist/vue-i18n-Cqx7gNJF.js +2365 -0
- package/dist/xlsx-ex8Bmftq.js +24004 -0
- package/dist/xlsx.util-C8YXEqEl.js +78 -0
- package/package.json +2 -2
- package/dist/app-CnQ49Lyb.js +0 -131483
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import { ref as A, computed as
|
|
2
|
-
import { a as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { ref as A, computed as G, h as C, defineComponent as j, watch as re, resolveComponent as R, openBlock as F, createElementBlock as B, createVNode as b, unref as l, createElementVNode as c, toDisplayString as $, createBlock as M, withCtx as T, Fragment as pe, renderList as ve, createTextVNode as ye, createCommentVNode as se, isRef as ge, normalizeClass as _e, normalizeStyle as be, createSlots as ke, Teleport as xe, normalizeProps as he, guardReactiveProps as we } from "vue";
|
|
2
|
+
import { a as L, c as z, j as oe, u as Re } from "./app-DYsP0gKj.js";
|
|
3
|
+
import { useDialog as Ie, useSnackbar as Y, components as U, useProxiedModel as Se, useBreakpoints as Fe } from "@feedmepos/ui-library";
|
|
4
|
+
import { F as S } from "./form-mode.enum-BKiNVH6A.js";
|
|
5
|
+
import { useI18n as P, useCoreStore as Ge } from "@feedmepos/mf-common";
|
|
6
|
+
import { defineStore as ue, storeToRefs as ae } from "pinia";
|
|
7
|
+
import { D as le, R as K } from "./row-action.enum-BcW_L_nE.js";
|
|
8
|
+
import { c as Ve, _ as Ce, F as ie } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
+
import { u as De, _ as Ae } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
10
|
+
import { _ as $e } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Csesow4V.js";
|
|
11
|
+
import { d as de } from "./defineDeepModel-CidpVmK7.js";
|
|
12
|
+
import { I as Te, A as Ee, U as Me, R as ce } from "./rules-BiaGzhvQ.js";
|
|
13
|
+
import { x as Ue, N as Be, b as ze } from "./app-rgirz_52.js";
|
|
14
|
+
import { u as Le } from "./FmMultiselectDialog-DUrpqAkF.js";
|
|
7
15
|
import { r as me } from "./random-CSbEbElR.js";
|
|
8
|
-
import { u as
|
|
9
|
-
const H =
|
|
16
|
+
import { u as Pe, R as Ne } from "./usePromise-CbVUCxhj.js";
|
|
17
|
+
const H = ue(
|
|
10
18
|
"ingredientGroupactions",
|
|
11
19
|
function() {
|
|
12
|
-
const _ =
|
|
20
|
+
const _ = Ie(), f = Y(), k = L(), { t: i } = P(), v = A();
|
|
13
21
|
function e() {
|
|
14
22
|
const u = {
|
|
15
23
|
modelValue: {},
|
|
@@ -23,7 +31,7 @@ const H = ce(
|
|
|
23
31
|
}
|
|
24
32
|
async function a(u) {
|
|
25
33
|
const m = {
|
|
26
|
-
modelValue:
|
|
34
|
+
modelValue: z(u),
|
|
27
35
|
mode: S.UPDATE,
|
|
28
36
|
show: !0,
|
|
29
37
|
"onUpdate:show"(r) {
|
|
@@ -79,10 +87,10 @@ const H = ce(
|
|
|
79
87
|
ingredientGroupDialogProps: v
|
|
80
88
|
};
|
|
81
89
|
}
|
|
82
|
-
), Oe =
|
|
90
|
+
), Oe = ue(
|
|
83
91
|
"ingredientGroupTable",
|
|
84
92
|
function() {
|
|
85
|
-
const _ = A(!1), f =
|
|
93
|
+
const _ = A(!1), f = Y(), k = L(), i = H();
|
|
86
94
|
async function v() {
|
|
87
95
|
_.value = !0;
|
|
88
96
|
try {
|
|
@@ -98,7 +106,7 @@ const H = ce(
|
|
|
98
106
|
}
|
|
99
107
|
}
|
|
100
108
|
function e(t, n) {
|
|
101
|
-
switch (n =
|
|
109
|
+
switch (n = z(n), t) {
|
|
102
110
|
case K.Edit:
|
|
103
111
|
return i.updateIngredientGroup(n);
|
|
104
112
|
case K.Delete:
|
|
@@ -109,7 +117,7 @@ const H = ce(
|
|
|
109
117
|
);
|
|
110
118
|
}
|
|
111
119
|
}
|
|
112
|
-
const a =
|
|
120
|
+
const a = G(() => [
|
|
113
121
|
{
|
|
114
122
|
accessorKey: "name",
|
|
115
123
|
header: () => "Name"
|
|
@@ -126,8 +134,8 @@ const H = ce(
|
|
|
126
134
|
id: "action",
|
|
127
135
|
header: "",
|
|
128
136
|
cell(t) {
|
|
129
|
-
return
|
|
130
|
-
[
|
|
137
|
+
return Ve(
|
|
138
|
+
[le[K.Edit], le[K.Delete]],
|
|
131
139
|
(n) => {
|
|
132
140
|
e(n, t.row.original);
|
|
133
141
|
}
|
|
@@ -165,7 +173,7 @@ function qe(o) {
|
|
|
165
173
|
};
|
|
166
174
|
}
|
|
167
175
|
function fe(o) {
|
|
168
|
-
const _ =
|
|
176
|
+
const _ = Le(), f = L(), k = G(() => [
|
|
169
177
|
{
|
|
170
178
|
id: "delete",
|
|
171
179
|
header: "",
|
|
@@ -273,9 +281,9 @@ function fe(o) {
|
|
|
273
281
|
return C(U.FmTextField, {
|
|
274
282
|
modelValue: a.priority ?? e.row.index + 1,
|
|
275
283
|
rules: [
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
284
|
+
Te(),
|
|
285
|
+
Ee(1),
|
|
286
|
+
Me(
|
|
279
287
|
o.skuRefs.filter((t) => t._id !== a._id).map((t) => {
|
|
280
288
|
const n = f.skuById[t._id];
|
|
281
289
|
return {
|
|
@@ -396,28 +404,28 @@ function fe(o) {
|
|
|
396
404
|
}
|
|
397
405
|
};
|
|
398
406
|
}
|
|
399
|
-
const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, He = { class: "flex flex-col gap-4" },
|
|
407
|
+
const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, He = { class: "flex flex-col gap-4" }, Ye = { class: "flex flex-col gap-16" }, Je = { class: "flex flex-col" }, Qe = { class: "flex flex-col gap-4" }, We = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = /* @__PURE__ */ j({
|
|
400
408
|
__name: "IngredientGroupRuleField",
|
|
401
409
|
props: {
|
|
402
410
|
disabled: { type: Boolean },
|
|
403
411
|
modelValue: {}
|
|
404
412
|
},
|
|
405
413
|
setup(o) {
|
|
406
|
-
const _ = o, { t: f } =
|
|
414
|
+
const _ = o, { t: f } = P(), k = Ge(), i = G(() => {
|
|
407
415
|
var g;
|
|
408
416
|
const n = /* @__PURE__ */ new Map(), s = k.restaurants.value.map((u) => u.customAttributes ?? {});
|
|
409
417
|
for (const u of s)
|
|
410
418
|
for (const [m, r] of Object.entries(u))
|
|
411
419
|
n.has(m) || n.set(m, /* @__PURE__ */ new Set()), r && ((g = n.get(m)) == null || g.add(r));
|
|
412
420
|
return n;
|
|
413
|
-
}), v =
|
|
421
|
+
}), v = G(() => [
|
|
414
422
|
...[...i.value.entries()].map(([s, g]) => ({
|
|
415
423
|
type: "string",
|
|
416
424
|
key: s,
|
|
417
425
|
entity: "restaurant",
|
|
418
426
|
values: [...g]
|
|
419
427
|
}))
|
|
420
|
-
]), e =
|
|
428
|
+
]), e = de("modelValue", {
|
|
421
429
|
get default() {
|
|
422
430
|
return {
|
|
423
431
|
_id: `skuGroupRule_${(/* @__PURE__ */ new Date()).toISOString()}_${me(4)}`,
|
|
@@ -427,11 +435,11 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
427
435
|
};
|
|
428
436
|
},
|
|
429
437
|
watchProps: !0
|
|
430
|
-
}), a = A(e.rule ?
|
|
438
|
+
}), a = A(e.rule ? Ue.build(e.rule) : null);
|
|
431
439
|
re(
|
|
432
440
|
a,
|
|
433
441
|
(n) => {
|
|
434
|
-
e.rule = n ?
|
|
442
|
+
e.rule = n ? Be.build(n) : null;
|
|
435
443
|
},
|
|
436
444
|
{ deep: !0, immediate: !0 }
|
|
437
445
|
);
|
|
@@ -450,13 +458,13 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
450
458
|
});
|
|
451
459
|
return (n, s) => {
|
|
452
460
|
const g = R("FmTextField"), u = R("FmLabel"), m = R("FmFormGroup"), r = R("FmTable");
|
|
453
|
-
return
|
|
461
|
+
return F(), B("div", Ke, [
|
|
454
462
|
b(g, {
|
|
455
463
|
modelValue: l(e).name,
|
|
456
464
|
"onUpdate:modelValue": s[0] || (s[0] = (y) => l(e).name = y),
|
|
457
465
|
label: l(f)("inventory.ingredientGroup.form.rules.name"),
|
|
458
466
|
"label-mark": "required",
|
|
459
|
-
rules: [l(
|
|
467
|
+
rules: [l(ce)()]
|
|
460
468
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
461
469
|
c("div", je, [
|
|
462
470
|
c("div", He, [
|
|
@@ -464,7 +472,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
464
472
|
label: l(f)("inventory.ingredientGroup.form.rules.title"),
|
|
465
473
|
required: ""
|
|
466
474
|
}, null, 8, ["label"]),
|
|
467
|
-
b(l(
|
|
475
|
+
b(l(ze), {
|
|
468
476
|
modelValue: a.value,
|
|
469
477
|
"onUpdate:modelValue": s[1] || (s[1] = (y) => a.value = y),
|
|
470
478
|
attributes: v.value
|
|
@@ -480,9 +488,9 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
480
488
|
]
|
|
481
489
|
}, null, 8, ["model-value", "rules"])
|
|
482
490
|
]),
|
|
483
|
-
c("div",
|
|
484
|
-
c("div",
|
|
485
|
-
c("div",
|
|
491
|
+
c("div", Ye, [
|
|
492
|
+
c("div", Je, [
|
|
493
|
+
c("div", Qe, [
|
|
486
494
|
c("div", null, [
|
|
487
495
|
b(u, {
|
|
488
496
|
label: l(f)("inventory.ingredientGroup.form.rules.ingredients"),
|
|
@@ -523,9 +531,9 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
523
531
|
},
|
|
524
532
|
emits: ["validation-success"],
|
|
525
533
|
setup(o, { expose: _, emit: f }) {
|
|
526
|
-
const k = o, i =
|
|
534
|
+
const k = o, i = de("modelValue", {
|
|
527
535
|
watchProps: !0
|
|
528
|
-
}), v = f, { t: e } =
|
|
536
|
+
}), v = f, { t: e } = P(), a = qe({
|
|
529
537
|
get items() {
|
|
530
538
|
return i.rules ?? [];
|
|
531
539
|
},
|
|
@@ -590,7 +598,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
590
598
|
}
|
|
591
599
|
}), (s, g) => {
|
|
592
600
|
const u = R("FmTextField"), m = R("FmButton"), r = R("FmFormGroup"), y = R("FmTable"), w = R("FmCard"), x = R("FmForm");
|
|
593
|
-
return
|
|
601
|
+
return F(), M(x, {
|
|
594
602
|
onValidationSuccess: g[2] || (g[2] = (I) => v("validation-success")),
|
|
595
603
|
ref_key: "formRef",
|
|
596
604
|
ref: n,
|
|
@@ -603,7 +611,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
603
611
|
b(u, {
|
|
604
612
|
label: l(e)("inventory.ingredientGroup.form.name"),
|
|
605
613
|
"label-mark": "required",
|
|
606
|
-
rules: [l(
|
|
614
|
+
rules: [l(ce)()],
|
|
607
615
|
modelValue: l(i).name,
|
|
608
616
|
"onUpdate:modelValue": g[0] || (g[0] = (d) => l(i).name = d)
|
|
609
617
|
}, null, 8, ["label", "rules", "modelValue"]),
|
|
@@ -658,7 +666,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
658
666
|
c("div", ut, $(l(e)("inventory.ingredientGroup.form.rules.title")), 1),
|
|
659
667
|
c("div", dt, $(l(e)("inventory.ingredientGroup.form.rules.description")), 1)
|
|
660
668
|
]),
|
|
661
|
-
(
|
|
669
|
+
(F(!0), B(pe, null, ve(l(i).rules, (d, p) => (F(), M(w, {
|
|
662
670
|
key: d.id,
|
|
663
671
|
variant: "outlined",
|
|
664
672
|
class: "p-16"
|
|
@@ -668,8 +676,8 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
668
676
|
c("div", mt, [
|
|
669
677
|
c("div", ft, [
|
|
670
678
|
ye($(l(e)("inventory.ingredientGroup.form.rules.rule_N", [p + 1])), 1),
|
|
671
|
-
d.name ? (
|
|
672
|
-
d.name ? (
|
|
679
|
+
d.name ? (F(), B("span", pt, ": ")) : se("", !0),
|
|
680
|
+
d.name ? (F(), B("span", vt, $(d.name), 1)) : se("", !0)
|
|
673
681
|
]),
|
|
674
682
|
b(m, {
|
|
675
683
|
variant: "tertiary",
|
|
@@ -678,7 +686,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
678
686
|
}, null, 8, ["onClick"])
|
|
679
687
|
]),
|
|
680
688
|
c("div", null, [
|
|
681
|
-
(
|
|
689
|
+
(F(), M(Xe, {
|
|
682
690
|
key: d._id,
|
|
683
691
|
"model-value": d,
|
|
684
692
|
"onUpdate:modelValue": l(a).updateItem,
|
|
@@ -717,9 +725,9 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
717
725
|
},
|
|
718
726
|
emits: ["update:show"],
|
|
719
727
|
setup(o) {
|
|
720
|
-
const _ = o, f =
|
|
728
|
+
const _ = o, f = L(), k = Pe(() => f.readCachedMenu()), i = G(
|
|
721
729
|
() => k.result.value.state === Ne.success ? k.result.value.data : void 0
|
|
722
|
-
), v =
|
|
730
|
+
), v = Y(), { t: e } = P(), a = Se(_, "show");
|
|
723
731
|
function t() {
|
|
724
732
|
return {
|
|
725
733
|
_id: "",
|
|
@@ -732,7 +740,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
732
740
|
() => _.show,
|
|
733
741
|
(d) => {
|
|
734
742
|
if (!d) return;
|
|
735
|
-
let p =
|
|
743
|
+
let p = z(_.modelValue ?? t());
|
|
736
744
|
p.defaultSkuRefs && (p.defaultSkuRefs = p.defaultSkuRefs.map((h, V) => ({
|
|
737
745
|
...h,
|
|
738
746
|
priority: h.priority ?? V + 1
|
|
@@ -747,7 +755,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
747
755
|
n.value = p, s.value = p._id || `${Math.random()}`;
|
|
748
756
|
}
|
|
749
757
|
);
|
|
750
|
-
const g =
|
|
758
|
+
const g = G(() => {
|
|
751
759
|
switch (_.mode) {
|
|
752
760
|
case S.READ:
|
|
753
761
|
return "";
|
|
@@ -757,7 +765,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
757
765
|
return e("inventory.ingredientGroup.create.title");
|
|
758
766
|
}
|
|
759
767
|
return "";
|
|
760
|
-
}), u =
|
|
768
|
+
}), u = G(() => {
|
|
761
769
|
switch (_.mode) {
|
|
762
770
|
case S.READ:
|
|
763
771
|
return "";
|
|
@@ -770,7 +778,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
770
778
|
}), m = A(), r = A(!1);
|
|
771
779
|
async function y() {
|
|
772
780
|
r.value = !0;
|
|
773
|
-
const d =
|
|
781
|
+
const d = z(n.value);
|
|
774
782
|
try {
|
|
775
783
|
await f.createSkuGroup(d), a.value = !1, v.open({
|
|
776
784
|
title: e("inventory.common.success"),
|
|
@@ -778,7 +786,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
778
786
|
type: "success"
|
|
779
787
|
});
|
|
780
788
|
} catch (p) {
|
|
781
|
-
p instanceof
|
|
789
|
+
p instanceof oe || v.open({
|
|
782
790
|
title: e("inventory.ingredientGroup.create.error.title"),
|
|
783
791
|
message: e("inventory.ingredientGroup.create.error.message"),
|
|
784
792
|
type: "error"
|
|
@@ -789,7 +797,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
789
797
|
}
|
|
790
798
|
async function w() {
|
|
791
799
|
r.value = !0;
|
|
792
|
-
const d =
|
|
800
|
+
const d = z(n.value);
|
|
793
801
|
try {
|
|
794
802
|
await f.updateSkuGroup(d), r.value = !1, a.value = !1, v.open({
|
|
795
803
|
title: e("inventory.common.success"),
|
|
@@ -797,7 +805,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
797
805
|
type: "success"
|
|
798
806
|
});
|
|
799
807
|
} catch (p) {
|
|
800
|
-
p instanceof
|
|
808
|
+
p instanceof oe || v.open({
|
|
801
809
|
title: e("inventory.ingredientGroup.update.error.title"),
|
|
802
810
|
message: e("inventory.ingredientGroup.update.error.message"),
|
|
803
811
|
type: "error"
|
|
@@ -822,7 +830,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
822
830
|
}
|
|
823
831
|
return (d, p) => {
|
|
824
832
|
const h = R("FmButton"), V = R("FmSideSheet");
|
|
825
|
-
return
|
|
833
|
+
return F(), M(V, {
|
|
826
834
|
"model-value": l(a),
|
|
827
835
|
"onUpdate:modelValue": p[3] || (p[3] = (D) => ge(a) ? a.value = D : null),
|
|
828
836
|
header: g.value,
|
|
@@ -846,7 +854,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
846
854
|
])
|
|
847
855
|
]),
|
|
848
856
|
default: T(() => [
|
|
849
|
-
i.value ? (
|
|
857
|
+
i.value ? (F(), M(yt, {
|
|
850
858
|
menu: i.value,
|
|
851
859
|
class: "w-full",
|
|
852
860
|
ref_key: "hasValidationExpose",
|
|
@@ -857,21 +865,21 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
857
865
|
mode: d.mode,
|
|
858
866
|
disabled: r.value,
|
|
859
867
|
onValidationSuccess: p[1] || (p[1] = (D) => I())
|
|
860
|
-
}, null, 8, ["menu", "model-value", "mode", "disabled"])) : (
|
|
868
|
+
}, null, 8, ["menu", "model-value", "mode", "disabled"])) : (F(), B("div", gt, "Loading.."))
|
|
861
869
|
]),
|
|
862
870
|
_: 1
|
|
863
871
|
}, 8, ["model-value", "header"]);
|
|
864
872
|
};
|
|
865
873
|
}
|
|
866
|
-
}), kt = { class: "flex flex-col py-8" }, xt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ht = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" },
|
|
874
|
+
}), kt = { class: "flex flex-col py-8" }, xt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ht = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, zt = /* @__PURE__ */ j({
|
|
867
875
|
__name: "IngredientGroupView",
|
|
868
876
|
setup(o) {
|
|
869
|
-
const _ =
|
|
877
|
+
const _ = L(), f = G(() => _.skuGroups), k = Re(), { t: i } = P(), {
|
|
870
878
|
createIngredientGroup: v,
|
|
871
879
|
updateIngredientGroup: e,
|
|
872
880
|
importIngredientGroups: a,
|
|
873
881
|
exportIngredientGroups: t
|
|
874
|
-
} = H(), { columnDefs: n, loading: s } =
|
|
882
|
+
} = H(), { columnDefs: n, loading: s } = ae(Oe()), { ingredientGroupDialogProps: g } = ae(H());
|
|
875
883
|
function u(h) {
|
|
876
884
|
switch (h) {
|
|
877
885
|
case "add":
|
|
@@ -882,7 +890,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
882
890
|
return t();
|
|
883
891
|
}
|
|
884
892
|
}
|
|
885
|
-
const m = A(""), r = A(!1), y =
|
|
893
|
+
const m = A(""), r = A(!1), y = G(() => r.value || s.value), { breakpoints: w } = Fe(), x = G(() => w.value.xs || w.value.sm), I = G(() => x.value ? 10 : 20), d = De(), p = G(() => [
|
|
886
894
|
{
|
|
887
895
|
label: i("inventory.ingredient.create.title"),
|
|
888
896
|
value: "add",
|
|
@@ -894,7 +902,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
894
902
|
]);
|
|
895
903
|
return (h, V) => {
|
|
896
904
|
const D = R("FmTable");
|
|
897
|
-
return
|
|
905
|
+
return F(), M(Ae, {
|
|
898
906
|
title: l(i)("inventory.ingredientGroup.title"),
|
|
899
907
|
actions: p.value,
|
|
900
908
|
"onClick:action": u
|
|
@@ -909,7 +917,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
909
917
|
}
|
|
910
918
|
])
|
|
911
919
|
}, [
|
|
912
|
-
b(
|
|
920
|
+
b($e, {
|
|
913
921
|
searchable: "",
|
|
914
922
|
search: m.value,
|
|
915
923
|
"onUpdate:search": V[0] || (V[0] = (E) => m.value = E)
|
|
@@ -925,22 +933,22 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
925
933
|
"page-size": I.value
|
|
926
934
|
}, {
|
|
927
935
|
"list-row": T((E) => [
|
|
928
|
-
b(
|
|
936
|
+
b(Ce, {
|
|
929
937
|
row: E,
|
|
930
938
|
onRowClick: l(e)
|
|
931
939
|
}, ke({
|
|
932
940
|
default: T((N) => {
|
|
933
|
-
var
|
|
941
|
+
var J, Q, W, O, X, Z, ee, te, q, ne;
|
|
934
942
|
return [
|
|
935
943
|
c("div", kt, [
|
|
936
944
|
c("div", xt, [
|
|
937
|
-
b(l(
|
|
938
|
-
render: (W = (
|
|
945
|
+
b(l(ie), {
|
|
946
|
+
render: (W = (Q = (J = N.code) == null ? void 0 : J.column) == null ? void 0 : Q.columnDef) == null ? void 0 : W.cell,
|
|
939
947
|
props: (X = (O = N.code) == null ? void 0 : O.getContext) == null ? void 0 : X.call(O)
|
|
940
948
|
}, null, 8, ["render", "props"])
|
|
941
949
|
]),
|
|
942
950
|
c("div", ht, [
|
|
943
|
-
b(l(
|
|
951
|
+
b(l(ie), {
|
|
944
952
|
render: (te = (ee = (Z = N.name) == null ? void 0 : Z.column) == null ? void 0 : ee.columnDef) == null ? void 0 : te.cell,
|
|
945
953
|
props: (ne = (q = N.name) == null ? void 0 : q.getContext) == null ? void 0 : ne.call(q)
|
|
946
954
|
}, null, 8, ["render", "props"])
|
|
@@ -962,7 +970,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
962
970
|
_: 1
|
|
963
971
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
964
972
|
], 2),
|
|
965
|
-
(
|
|
973
|
+
(F(), M(xe, { to: "body" }, [
|
|
966
974
|
b(bt, he(we(l(g))), null, 16)
|
|
967
975
|
]))
|
|
968
976
|
]),
|
|
@@ -972,5 +980,5 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
972
980
|
}
|
|
973
981
|
});
|
|
974
982
|
export {
|
|
975
|
-
|
|
983
|
+
zt as default
|
|
976
984
|
};
|