@feedmepos/mf-inventory-portal 1.2.49 → 1.2.50-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-w_Dbl-jn.js → App-DkCjc9Ei.js} +72 -68
- package/dist/{ApprovalView-CuOM9Ych.js → ApprovalView-CVBi-iKx.js} +34 -34
- package/dist/{BindingsDialog-DkMSnr51.js → BindingsDialog-D1EDPBOt.js} +2 -2
- package/dist/{BindingsPicker-DrXdWUTh.js → BindingsPicker-BhtMvuQY.js} +2 -2
- package/dist/{BindingsTable-Bj0eBYdU.js → BindingsTable-UI5TuSBx.js} +4 -4
- package/dist/{ClosingDraftView-D1oohB8Y.js → ClosingDraftView-Dsj4ZYEi.js} +19 -18
- package/dist/{ClosingHistoryView-BCYNhLDg.js → ClosingHistoryView-DoW-S9iS.js} +3 -3
- package/dist/{ClosingTemplateView-DIvZkCgT.js → ClosingTemplateView-vvlSzfDQ.js} +18 -17
- package/dist/{DeliveryOrderPrintPreview-C83_a-LI.js → DeliveryOrderPrintPreview-obetnJsJ.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bmas1qkC.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BQiI8aOT.js} +4 -4
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CQ_Er40u.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-B746F-IR.js} +12 -12
- package/dist/{FmMultiselectDialog-BtvZkE6p.js → FmMultiselectDialog-CCvkuTS3.js} +1 -1
- package/dist/FmMultiselectDialog-NSDOnWEh.js +621 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BN9OeQF3.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DWwF_0sR.js} +3 -3
- package/dist/{ImportView-CRdvYxW3.js → ImportView-COQQTu8N.js} +7 -7
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D6J1wcU6.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BeXoFMVr.js} +1 -1
- package/dist/{IngredientGroupView-DCdnjh-f.js → IngredientGroupView-RR_JvJ28.js} +108 -107
- package/dist/{IngredientsView-DhZadYV8.js → IngredientsView-C3X5o2k_.js} +126 -125
- package/dist/{IntegrationView-B_D6Sgj-.js → IntegrationView-B5eHHOqw.js} +80 -80
- package/dist/{InventoryBindingForm-CM47I9t9.js → InventoryBindingForm-BUmVxK-a.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BYKUWI9e.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-jXzjJ0Kk.js} +4 -4
- package/dist/{InventoryBindingSummary-BSuJMrFU.js → InventoryBindingSummary-BX1xdZX3.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9TTwcC8s.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BCcSPsw6.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D2vWMBZF.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BUPtyu3J.js} +2 -2
- package/dist/{PublishView-DxhE5g9_.js → PublishView-CzxnrErB.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-BzIwRI7z.js → PurchaseOrderPrintPreview-fVyn0zFN.js} +1 -1
- package/dist/ReceiveRequestView-CkYyKxe-.js +3028 -0
- package/dist/{RecipeView-Azx2MoPR.js → RecipeView-DFCFRYey.js} +83 -82
- package/dist/{StockView-D51RBHWQ.js → StockView-BRcgulQk.js} +113 -112
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-R0yauCbz.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BOYDCjdV.js} +1 -1
- package/dist/{SupplierView-BeHjJ0xJ.js → SupplierView-DIPr4lvP.js} +28 -27
- package/dist/SurchargeView-Cszy8Wqp.js +460 -0
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DG1p3Rim.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-v8ef-mpz.js} +2 -2
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js +84 -0
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-cPIomfPb.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-B-oyRnPC.js} +13 -13
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BZR_EozX.js → TransferDetails.vue_vue_type_script_setup_true_lang-BlLY3DLp.js} +15 -15
- package/dist/{TransferTemplateView-BwdhVKO4.js → TransferTemplateView-DSpZoO9t.js} +16 -16
- package/dist/{UnitView-BT23dBtV.js → UnitView-IJsE_qkc.js} +20 -19
- package/dist/{WarehouseView-PWigQlHk.js → WarehouseView-Dyd2kUli.js} +21 -20
- package/dist/{WastageTemplateView-BGO19Pux.js → WastageTemplateView-Dk_bWOam.js} +165 -164
- package/dist/api/netsuite.d.ts +8 -0
- package/dist/api/surcharge.d.ts +31 -0
- package/dist/{app-C0a15lwm.js → app-DavdITF-.js} +4511 -4408
- package/dist/app-DiX-EfV6.js +8167 -0
- package/dist/app.d.ts +52 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-C9jSN68K.js → closing-template-DR9_kQ8D.js} +1 -1
- package/dist/component-DpCUABT3.js +82 -0
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +8 -0
- package/dist/components/FmMultiselectDialogProps.d.ts +5 -0
- package/dist/{date2-DND2dkpu.js → date2-8GI9HBWH.js} +1 -1
- package/dist/{dayjs.min-CvewwBuM.js → dayjs.min-BlY4XBqj.js} +1 -1
- package/dist/{decimal-C11049RC.js → decimal-DL6mE527.js} +2 -2
- package/dist/{defineDeepModel-BYmk9G2K.js → defineDeepModel-BfjUieWa.js} +1 -1
- package/dist/{duplicate-template-CJLrmGdo.js → duplicate-template-Bgv9_gY3.js} +1 -1
- package/dist/{feature-D2GGGVQh.js → feature-Cw8ehb86.js} +3442 -2812
- package/dist/{format-time-from-id-DuUqVP8F.js → format-time-from-id-BGWQ_4he.js} +1 -1
- package/dist/{format-unit-display-BwBGMuCk.js → format-unit-display-DLGhl4yz.js} +11 -11
- package/dist/{import-export.helper-ejk_vT2V.js → import-export.helper-BquBG7Ja.js} +5 -5
- package/dist/{index-D65a-5cn.js → index-CU0XsNCT.js} +1 -1
- package/dist/{index-C9F5LU0v.js → index-CUO2gkjR.js} +3 -3
- package/dist/{index-Cy-YW3O0.js → index-E5tuyI2k.js} +1 -1
- package/dist/{lodash-DNLSknxF.js → lodash-CBzRp2rs.js} +1 -1
- package/dist/netsuite-fKE8zkqA.js +5402 -0
- package/dist/{purchase-order-template-C7J9I7o4.js → purchase-order-template-3KsyDF00.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/{rules-DQNuaKK6.js → rules-nrlXpIxl.js} +3 -3
- package/dist/{stock-bYU0NTHD.js → stock-BDzZUQ12.js} +1 -1
- package/dist/{stock-1aynIWpi.js → stock-BOXAynI6.js} +3 -3
- package/dist/stores/integration/netsuite.d.ts +5 -0
- package/dist/stores/surcharge.d.ts +18 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-B72SAF3j.js → supplier-ImcuOQDw.js} +2 -2
- package/dist/surcharge-B8ym7Px4.js +71 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-DO20RWUv.js → use-ingredient-select-dialog-DyzX-ffV.js} +2 -2
- package/dist/{use-inventory-binding-dialog-R2VQakMR.js → use-inventory-binding-dialog-CSGz0tLk.js} +2 -2
- package/dist/{use-template-enabled-locations-2-C7L_vyIF.js → use-template-enabled-locations-2-BgCxeCaB.js} +2 -2
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +714 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +5 -0
- package/dist/views/surcharge/SurchargeView.vue.d.ts +2 -0
- package/dist/vue-i18n-DQB_dR_X.js +2365 -0
- package/dist/{xlsx-DZcSBj-s.js → xlsx-qb-9b1qs.js} +1 -1
- package/dist/{xlsx.util-DMCjqrHn.js → xlsx.util-BCW4ouE2.js} +1 -1
- package/package.json +2 -2
- package/dist/FmMultiselectDialog-IU5C9o_F.js +0 -598
- package/dist/ReceiveRequestView-C5wqi0jE.js +0 -2913
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js +0 -162
- package/dist/app-uBuHtW8m.js +0 -8127
- package/dist/netsuite-TqUeqkqw.js +0 -5131
- package/dist/vue-i18n-BLzLoy1U.js +0 -2365
|
@@ -1,23 +1,24 @@
|
|
|
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
|
|
2
|
-
import { a as
|
|
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 i, 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 P, c as L, j as oe, u as Re } from "./app-DavdITF-.js";
|
|
3
3
|
import { useDialog as Ie, useSnackbar as Y, components as U, useProxiedModel as Se, useBreakpoints as Fe } from "@feedmepos/ui-library";
|
|
4
4
|
import { F as S } from "./form-mode.enum-BKiNVH6A.js";
|
|
5
|
-
import { useI18n as
|
|
5
|
+
import { useI18n as z, useCoreStore as Ge } from "@feedmepos/mf-common";
|
|
6
6
|
import { defineStore as ue, storeToRefs as ae } from "pinia";
|
|
7
|
-
import { D as
|
|
8
|
-
import { c as Ve
|
|
9
|
-
import { u as
|
|
10
|
-
import { _ as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
7
|
+
import { D as ie, R as K } from "./row-action.enum-BcW_L_nE.js";
|
|
8
|
+
import { c as Ve } from "./component-DpCUABT3.js";
|
|
9
|
+
import { u as Ce, _ as De } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
10
|
+
import { _ as Ae, F as le } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
11
|
+
import { _ as $e } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-B746F-IR.js";
|
|
12
|
+
import { d as de } from "./defineDeepModel-BfjUieWa.js";
|
|
13
|
+
import { I as Te, A as Ee, U as Me, R as ce } from "./rules-nrlXpIxl.js";
|
|
14
|
+
import { L as Ue, P as Be, D as Le } from "./app-DiX-EfV6.js";
|
|
15
|
+
import { u as Pe } from "./FmMultiselectDialog-CCvkuTS3.js";
|
|
15
16
|
import { r as me } from "./random-CSbEbElR.js";
|
|
16
|
-
import { u as
|
|
17
|
+
import { u as ze, R as Ne } from "./usePromise-CbVUCxhj.js";
|
|
17
18
|
const H = ue(
|
|
18
19
|
"ingredientGroupactions",
|
|
19
20
|
function() {
|
|
20
|
-
const _ = Ie(), f = Y(), k =
|
|
21
|
+
const _ = Ie(), f = Y(), k = P(), { t: l } = z(), v = A();
|
|
21
22
|
function e() {
|
|
22
23
|
const u = {
|
|
23
24
|
modelValue: {},
|
|
@@ -31,7 +32,7 @@ const H = ue(
|
|
|
31
32
|
}
|
|
32
33
|
async function a(u) {
|
|
33
34
|
const m = {
|
|
34
|
-
modelValue:
|
|
35
|
+
modelValue: L(u),
|
|
35
36
|
mode: S.UPDATE,
|
|
36
37
|
show: !0,
|
|
37
38
|
"onUpdate:show"(r) {
|
|
@@ -60,16 +61,16 @@ const H = ue(
|
|
|
60
61
|
}
|
|
61
62
|
function n(u, m, r) {
|
|
62
63
|
_.open({
|
|
63
|
-
title:
|
|
64
|
+
title: l("inventory.ingredient.delete.title", [(u == null ? void 0 : u.name) ?? ""]),
|
|
64
65
|
closeButton: !1,
|
|
65
|
-
message:
|
|
66
|
+
message: l("inventory.ingredient.delete.message"),
|
|
66
67
|
primaryActions: {
|
|
67
|
-
text:
|
|
68
|
+
text: l("common.delete"),
|
|
68
69
|
close: !0,
|
|
69
70
|
variant: "destructive"
|
|
70
71
|
},
|
|
71
72
|
secondaryActions: {
|
|
72
|
-
text:
|
|
73
|
+
text: l("common.cancel"),
|
|
73
74
|
close: !0
|
|
74
75
|
}
|
|
75
76
|
}).onPrimary(() => t(u, m, r));
|
|
@@ -90,7 +91,7 @@ const H = ue(
|
|
|
90
91
|
), Oe = ue(
|
|
91
92
|
"ingredientGroupTable",
|
|
92
93
|
function() {
|
|
93
|
-
const _ = A(!1), f = Y(), k =
|
|
94
|
+
const _ = A(!1), f = Y(), k = P(), l = H();
|
|
94
95
|
async function v() {
|
|
95
96
|
_.value = !0;
|
|
96
97
|
try {
|
|
@@ -106,11 +107,11 @@ const H = ue(
|
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
function e(t, n) {
|
|
109
|
-
switch (n =
|
|
110
|
+
switch (n = L(n), t) {
|
|
110
111
|
case K.Edit:
|
|
111
|
-
return
|
|
112
|
+
return l.updateIngredientGroup(n);
|
|
112
113
|
case K.Delete:
|
|
113
|
-
return
|
|
114
|
+
return l.deleteIngredientGroup(
|
|
114
115
|
n,
|
|
115
116
|
_,
|
|
116
117
|
() => v()
|
|
@@ -135,7 +136,7 @@ const H = ue(
|
|
|
135
136
|
header: "",
|
|
136
137
|
cell(t) {
|
|
137
138
|
return Ve(
|
|
138
|
-
[
|
|
139
|
+
[ie[K.Edit], ie[K.Delete]],
|
|
139
140
|
(n) => {
|
|
140
141
|
e(n, t.row.original);
|
|
141
142
|
}
|
|
@@ -159,21 +160,21 @@ const H = ue(
|
|
|
159
160
|
function qe(o) {
|
|
160
161
|
return {
|
|
161
162
|
addItem: () => {
|
|
162
|
-
const
|
|
163
|
-
o.items = [...o.items,
|
|
163
|
+
const l = o.create();
|
|
164
|
+
o.items = [...o.items, l];
|
|
164
165
|
},
|
|
165
|
-
updateItem: (
|
|
166
|
-
|
|
167
|
-
(v) => o.id(v) === o.id(
|
|
166
|
+
updateItem: (l) => {
|
|
167
|
+
l && (o.items = o.items.map(
|
|
168
|
+
(v) => o.id(v) === o.id(l) ? l : v
|
|
168
169
|
));
|
|
169
170
|
},
|
|
170
|
-
removeItem: (
|
|
171
|
-
o.items = o.items.filter((v) => o.id(v) !== o.id(
|
|
171
|
+
removeItem: (l) => {
|
|
172
|
+
o.items = o.items.filter((v) => o.id(v) !== o.id(l));
|
|
172
173
|
}
|
|
173
174
|
};
|
|
174
175
|
}
|
|
175
176
|
function fe(o) {
|
|
176
|
-
const _ =
|
|
177
|
+
const _ = Pe(), f = P(), k = G(() => [
|
|
177
178
|
{
|
|
178
179
|
id: "delete",
|
|
179
180
|
header: "",
|
|
@@ -411,7 +412,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
411
412
|
modelValue: {}
|
|
412
413
|
},
|
|
413
414
|
setup(o) {
|
|
414
|
-
const _ = o, { t: f } =
|
|
415
|
+
const _ = o, { t: f } = z(), k = Ge(), l = G(() => {
|
|
415
416
|
var g;
|
|
416
417
|
const n = /* @__PURE__ */ new Map(), s = k.restaurants.value.map((u) => u.customAttributes ?? {});
|
|
417
418
|
for (const u of s)
|
|
@@ -419,7 +420,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
419
420
|
n.has(m) || n.set(m, /* @__PURE__ */ new Set()), r && ((g = n.get(m)) == null || g.add(r));
|
|
420
421
|
return n;
|
|
421
422
|
}), v = G(() => [
|
|
422
|
-
...[...
|
|
423
|
+
...[...l.value.entries()].map(([s, g]) => ({
|
|
423
424
|
type: "string",
|
|
424
425
|
key: s,
|
|
425
426
|
entity: "restaurant",
|
|
@@ -460,19 +461,19 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
460
461
|
const g = R("FmTextField"), u = R("FmLabel"), m = R("FmFormGroup"), r = R("FmTable");
|
|
461
462
|
return F(), B("div", Ke, [
|
|
462
463
|
b(g, {
|
|
463
|
-
modelValue:
|
|
464
|
-
"onUpdate:modelValue": s[0] || (s[0] = (y) =>
|
|
465
|
-
label:
|
|
464
|
+
modelValue: i(e).name,
|
|
465
|
+
"onUpdate:modelValue": s[0] || (s[0] = (y) => i(e).name = y),
|
|
466
|
+
label: i(f)("inventory.ingredientGroup.form.rules.name"),
|
|
466
467
|
"label-mark": "required",
|
|
467
|
-
rules: [
|
|
468
|
+
rules: [i(ce)()]
|
|
468
469
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
469
470
|
c("div", je, [
|
|
470
471
|
c("div", He, [
|
|
471
472
|
b(u, {
|
|
472
|
-
label:
|
|
473
|
+
label: i(f)("inventory.ingredientGroup.form.rules.title"),
|
|
473
474
|
required: ""
|
|
474
475
|
}, null, 8, ["label"]),
|
|
475
|
-
b(
|
|
476
|
+
b(i(Le), {
|
|
476
477
|
modelValue: a.value,
|
|
477
478
|
"onUpdate:modelValue": s[1] || (s[1] = (y) => a.value = y),
|
|
478
479
|
attributes: v.value
|
|
@@ -493,32 +494,32 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
493
494
|
c("div", Qe, [
|
|
494
495
|
c("div", null, [
|
|
495
496
|
b(u, {
|
|
496
|
-
label:
|
|
497
|
+
label: i(f)("inventory.ingredientGroup.form.rules.ingredients"),
|
|
497
498
|
required: ""
|
|
498
499
|
}, null, 8, ["label"])
|
|
499
500
|
])
|
|
500
501
|
]),
|
|
501
502
|
b(m, {
|
|
502
|
-
"model-value":
|
|
503
|
+
"model-value": i(e).skuRefs,
|
|
503
504
|
rules: [
|
|
504
505
|
(y) => !!(y != null && y.length) || "At least one ingredient is required"
|
|
505
506
|
]
|
|
506
507
|
}, null, 8, ["model-value", "rules"])
|
|
507
508
|
]),
|
|
508
509
|
b(r, {
|
|
509
|
-
"row-data":
|
|
510
|
-
"column-defs":
|
|
511
|
-
"page-size":
|
|
510
|
+
"row-data": i(e).skuRefs,
|
|
511
|
+
"column-defs": i(t).columnDefs,
|
|
512
|
+
"page-size": i(e).skuRefs.length,
|
|
512
513
|
"shrink-at": 9999,
|
|
513
|
-
"column-visibility":
|
|
514
|
+
"column-visibility": i(t).columnVisibility,
|
|
514
515
|
"hide-footer": ""
|
|
515
516
|
}, null, 8, ["row-data", "column-defs", "page-size", "column-visibility"])
|
|
516
517
|
]),
|
|
517
|
-
c("div", We, $(
|
|
518
|
+
c("div", We, $(i(f)("inventory.ingredientGroup.form.defaultRule.defaultCheckbox")), 1)
|
|
518
519
|
]);
|
|
519
520
|
};
|
|
520
521
|
}
|
|
521
|
-
}), Ze = { class: "flex flex-col gap-16" }, et = { class: "flex flex-col gap-16" }, tt = { class: "flex flex-col" }, nt = { class: "flex items-center" }, st = { class: "flex-1" }, ot = { class: "flex flex-col gap-8" }, at = { class: "flex-1 fm-typo-en-title-sm-600" },
|
|
522
|
+
}), Ze = { class: "flex flex-col gap-16" }, et = { class: "flex flex-col gap-16" }, tt = { class: "flex flex-col" }, nt = { class: "flex items-center" }, st = { class: "flex-1" }, ot = { class: "flex flex-col gap-8" }, at = { class: "flex-1 fm-typo-en-title-sm-600" }, it = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary px-4" }, lt = { class: "flex flex-col gap-16" }, rt = { class: "flex flex-col gap-8" }, ut = { class: "flex-1 fm-typo-en-title-sm-600" }, dt = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ct = { class: "flex flex-col gap-12" }, mt = { class: "flex items-center" }, ft = { class: "flex-1 fm-typo-en-body-lg-600 line-clamp-1" }, pt = { key: 0 }, vt = {
|
|
522
523
|
key: 1,
|
|
523
524
|
class: "fm-typo-en-body-lg-400"
|
|
524
525
|
}, yt = /* @__PURE__ */ j({
|
|
@@ -531,14 +532,14 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
531
532
|
},
|
|
532
533
|
emits: ["validation-success"],
|
|
533
534
|
setup(o, { expose: _, emit: f }) {
|
|
534
|
-
const k = o,
|
|
535
|
+
const k = o, l = de("modelValue", {
|
|
535
536
|
watchProps: !0
|
|
536
|
-
}), v = f, { t: e } =
|
|
537
|
+
}), v = f, { t: e } = z(), a = qe({
|
|
537
538
|
get items() {
|
|
538
|
-
return
|
|
539
|
+
return l.rules ?? [];
|
|
539
540
|
},
|
|
540
541
|
set items(s) {
|
|
541
|
-
|
|
542
|
+
l.rules = s;
|
|
542
543
|
},
|
|
543
544
|
create: function() {
|
|
544
545
|
var s;
|
|
@@ -557,11 +558,11 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
557
558
|
return k.disabled;
|
|
558
559
|
},
|
|
559
560
|
get skuRefs() {
|
|
560
|
-
return
|
|
561
|
+
return l.defaultSkuRefs ?? [];
|
|
561
562
|
},
|
|
562
563
|
set skuRefs(s) {
|
|
563
|
-
|
|
564
|
-
const g = s.map((r) => r._id), u =
|
|
564
|
+
l.defaultSkuRefs = s;
|
|
565
|
+
const g = s.map((r) => r._id), u = l.rules;
|
|
565
566
|
if (!u) return;
|
|
566
567
|
const m = s.groupBy(
|
|
567
568
|
(r) => r._id,
|
|
@@ -579,7 +580,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
579
580
|
};
|
|
580
581
|
});
|
|
581
582
|
}
|
|
582
|
-
|
|
583
|
+
l.rules = [...u];
|
|
583
584
|
},
|
|
584
585
|
isDefaultList: !0
|
|
585
586
|
}), n = A();
|
|
@@ -609,17 +610,17 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
609
610
|
return [
|
|
610
611
|
c("div", Ze, [
|
|
611
612
|
b(u, {
|
|
612
|
-
label:
|
|
613
|
+
label: i(e)("inventory.ingredientGroup.form.name"),
|
|
613
614
|
"label-mark": "required",
|
|
614
|
-
rules: [
|
|
615
|
-
modelValue: l
|
|
616
|
-
"onUpdate:modelValue": g[0] || (g[0] = (d) => l
|
|
615
|
+
rules: [i(ce)()],
|
|
616
|
+
modelValue: i(l).name,
|
|
617
|
+
"onUpdate:modelValue": g[0] || (g[0] = (d) => i(l).name = d)
|
|
617
618
|
}, null, 8, ["label", "rules", "modelValue"]),
|
|
618
619
|
b(u, {
|
|
619
|
-
label:
|
|
620
|
+
label: i(e)("inventory.ingredientGroup.form.ref"),
|
|
620
621
|
"label-mark": "optional",
|
|
621
|
-
modelValue: l
|
|
622
|
-
"onUpdate:modelValue": g[1] || (g[1] = (d) => l
|
|
622
|
+
modelValue: i(l).ref,
|
|
623
|
+
"onUpdate:modelValue": g[1] || (g[1] = (d) => i(l).ref = d)
|
|
623
624
|
}, null, 8, ["label", "modelValue"])
|
|
624
625
|
]),
|
|
625
626
|
c("div", et, [
|
|
@@ -627,7 +628,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
627
628
|
c("div", nt, [
|
|
628
629
|
c("div", st, [
|
|
629
630
|
c("div", ot, [
|
|
630
|
-
c("div", at, $(
|
|
631
|
+
c("div", at, $(i(e)("inventory.ingredientGroup.form.defaultRule.title")), 1)
|
|
631
632
|
])
|
|
632
633
|
]),
|
|
633
634
|
c("div", null, [
|
|
@@ -637,13 +638,13 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
637
638
|
"prepend-icon": "link",
|
|
638
639
|
variant: "plain",
|
|
639
640
|
class: "border-1 rounded-lg border-fm-color-primary",
|
|
640
|
-
onClick:
|
|
641
|
+
onClick: i(t).promptAddIngredient,
|
|
641
642
|
size: "md"
|
|
642
643
|
}, null, 8, ["disabled", "onClick"])
|
|
643
644
|
])
|
|
644
645
|
]),
|
|
645
646
|
b(r, {
|
|
646
|
-
"model-value": l
|
|
647
|
+
"model-value": i(l).defaultSkuRefs,
|
|
647
648
|
rules: [
|
|
648
649
|
(d) => !!(d != null && d.length) || "At least one ingredient is required"
|
|
649
650
|
]
|
|
@@ -651,22 +652,22 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
651
652
|
]),
|
|
652
653
|
c("div", null, [
|
|
653
654
|
b(y, {
|
|
654
|
-
"row-data": l
|
|
655
|
-
"column-defs":
|
|
656
|
-
"column-visibility":
|
|
657
|
-
"page-size": (I = l
|
|
655
|
+
"row-data": i(l).defaultSkuRefs ?? [],
|
|
656
|
+
"column-defs": i(t).columnDefs,
|
|
657
|
+
"column-visibility": i(t).columnVisibility,
|
|
658
|
+
"page-size": (I = i(l).defaultSkuRefs) == null ? void 0 : I.length,
|
|
658
659
|
"shrink-at": 9999,
|
|
659
660
|
"hide-footer": ""
|
|
660
661
|
}, null, 8, ["row-data", "column-defs", "column-visibility", "page-size"])
|
|
661
662
|
]),
|
|
662
|
-
c("div",
|
|
663
|
+
c("div", it, $(i(e)("inventory.ingredientGroup.form.defaultRule.defaultCheckbox")), 1)
|
|
663
664
|
]),
|
|
664
|
-
c("div",
|
|
665
|
+
c("div", lt, [
|
|
665
666
|
c("div", rt, [
|
|
666
|
-
c("div", ut, $(
|
|
667
|
-
c("div", dt, $(
|
|
667
|
+
c("div", ut, $(i(e)("inventory.ingredientGroup.form.rules.title")), 1),
|
|
668
|
+
c("div", dt, $(i(e)("inventory.ingredientGroup.form.rules.description")), 1)
|
|
668
669
|
]),
|
|
669
|
-
(F(!0), B(pe, null, ve(l
|
|
670
|
+
(F(!0), B(pe, null, ve(i(l).rules, (d, p) => (F(), M(w, {
|
|
670
671
|
key: d.id,
|
|
671
672
|
variant: "outlined",
|
|
672
673
|
class: "p-16"
|
|
@@ -675,21 +676,21 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
675
676
|
c("div", ct, [
|
|
676
677
|
c("div", mt, [
|
|
677
678
|
c("div", ft, [
|
|
678
|
-
ye($(
|
|
679
|
+
ye($(i(e)("inventory.ingredientGroup.form.rules.rule_N", [p + 1])), 1),
|
|
679
680
|
d.name ? (F(), B("span", pt, ": ")) : se("", !0),
|
|
680
681
|
d.name ? (F(), B("span", vt, $(d.name), 1)) : se("", !0)
|
|
681
682
|
]),
|
|
682
683
|
b(m, {
|
|
683
684
|
variant: "tertiary",
|
|
684
685
|
icon: "delete",
|
|
685
|
-
onClick: (h) =>
|
|
686
|
+
onClick: (h) => i(a).removeItem(d)
|
|
686
687
|
}, null, 8, ["onClick"])
|
|
687
688
|
]),
|
|
688
689
|
c("div", null, [
|
|
689
690
|
(F(), M(Xe, {
|
|
690
691
|
key: d._id,
|
|
691
692
|
"model-value": d,
|
|
692
|
-
"onUpdate:modelValue":
|
|
693
|
+
"onUpdate:modelValue": i(a).updateItem,
|
|
693
694
|
disabled: s.disabled,
|
|
694
695
|
menu: s.menu
|
|
695
696
|
}, null, 8, ["model-value", "onUpdate:modelValue", "disabled", "menu"]))
|
|
@@ -702,8 +703,8 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
702
703
|
b(m, {
|
|
703
704
|
variant: "plain",
|
|
704
705
|
icon: "add",
|
|
705
|
-
label:
|
|
706
|
-
onClick:
|
|
706
|
+
label: i(e)("inventory.ingredientGroup.form.rules.addRule"),
|
|
707
|
+
onClick: i(a).addItem
|
|
707
708
|
}, null, 8, ["label", "onClick"])
|
|
708
709
|
])
|
|
709
710
|
])
|
|
@@ -725,9 +726,9 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
725
726
|
},
|
|
726
727
|
emits: ["update:show"],
|
|
727
728
|
setup(o) {
|
|
728
|
-
const _ = o, f =
|
|
729
|
+
const _ = o, f = P(), k = ze(() => f.readCachedMenu()), l = G(
|
|
729
730
|
() => k.result.value.state === Ne.success ? k.result.value.data : void 0
|
|
730
|
-
), v = Y(), { t: e } =
|
|
731
|
+
), v = Y(), { t: e } = z(), a = Se(_, "show");
|
|
731
732
|
function t() {
|
|
732
733
|
return {
|
|
733
734
|
_id: "",
|
|
@@ -740,7 +741,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
740
741
|
() => _.show,
|
|
741
742
|
(d) => {
|
|
742
743
|
if (!d) return;
|
|
743
|
-
let p =
|
|
744
|
+
let p = L(_.modelValue ?? t());
|
|
744
745
|
p.defaultSkuRefs && (p.defaultSkuRefs = p.defaultSkuRefs.map((h, V) => ({
|
|
745
746
|
...h,
|
|
746
747
|
priority: h.priority ?? V + 1
|
|
@@ -778,7 +779,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
778
779
|
}), m = A(), r = A(!1);
|
|
779
780
|
async function y() {
|
|
780
781
|
r.value = !0;
|
|
781
|
-
const d =
|
|
782
|
+
const d = L(n.value);
|
|
782
783
|
try {
|
|
783
784
|
await f.createSkuGroup(d), a.value = !1, v.open({
|
|
784
785
|
title: e("inventory.common.success"),
|
|
@@ -797,7 +798,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
797
798
|
}
|
|
798
799
|
async function w() {
|
|
799
800
|
r.value = !0;
|
|
800
|
-
const d =
|
|
801
|
+
const d = L(n.value);
|
|
801
802
|
try {
|
|
802
803
|
await f.updateSkuGroup(d), r.value = !1, a.value = !1, v.open({
|
|
803
804
|
title: e("inventory.common.success"),
|
|
@@ -831,7 +832,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
831
832
|
return (d, p) => {
|
|
832
833
|
const h = R("FmButton"), V = R("FmSideSheet");
|
|
833
834
|
return F(), M(V, {
|
|
834
|
-
"model-value":
|
|
835
|
+
"model-value": i(a),
|
|
835
836
|
"onUpdate:modelValue": p[3] || (p[3] = (D) => ge(a) ? a.value = D : null),
|
|
836
837
|
header: g.value,
|
|
837
838
|
"close-button": "",
|
|
@@ -847,15 +848,15 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
847
848
|
}, null, 8, ["loading", "label"]),
|
|
848
849
|
b(h, {
|
|
849
850
|
disabled: r.value,
|
|
850
|
-
label:
|
|
851
|
+
label: i(e)("common.close"),
|
|
851
852
|
variant: "tertiary",
|
|
852
853
|
onClick: p[2] || (p[2] = (D) => a.value = !1)
|
|
853
854
|
}, null, 8, ["disabled", "label"])
|
|
854
855
|
])
|
|
855
856
|
]),
|
|
856
857
|
default: T(() => [
|
|
857
|
-
|
|
858
|
-
menu:
|
|
858
|
+
l.value ? (F(), M(yt, {
|
|
859
|
+
menu: l.value,
|
|
859
860
|
class: "w-full",
|
|
860
861
|
ref_key: "hasValidationExpose",
|
|
861
862
|
ref: m,
|
|
@@ -871,10 +872,10 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
871
872
|
}, 8, ["model-value", "header"]);
|
|
872
873
|
};
|
|
873
874
|
}
|
|
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" },
|
|
875
|
+
}), 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" }, Pt = /* @__PURE__ */ j({
|
|
875
876
|
__name: "IngredientGroupView",
|
|
876
877
|
setup(o) {
|
|
877
|
-
const _ =
|
|
878
|
+
const _ = P(), f = G(() => _.skuGroups), k = Re(), { t: l } = z(), {
|
|
878
879
|
createIngredientGroup: v,
|
|
879
880
|
updateIngredientGroup: e,
|
|
880
881
|
importIngredientGroups: a,
|
|
@@ -890,20 +891,20 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
890
891
|
return t();
|
|
891
892
|
}
|
|
892
893
|
}
|
|
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 =
|
|
894
|
+
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 = Ce(), p = G(() => [
|
|
894
895
|
{
|
|
895
|
-
label:
|
|
896
|
+
label: l("inventory.ingredient.create.title"),
|
|
896
897
|
value: "add",
|
|
897
898
|
isPrimary: !0,
|
|
898
899
|
prependIcon: "add"
|
|
899
900
|
},
|
|
900
|
-
{ label:
|
|
901
|
-
{ label:
|
|
901
|
+
{ label: l("common.import"), value: "import" },
|
|
902
|
+
{ label: l("common.export"), value: "export" }
|
|
902
903
|
]);
|
|
903
904
|
return (h, V) => {
|
|
904
905
|
const D = R("FmTable");
|
|
905
|
-
return F(), M(
|
|
906
|
-
title: l
|
|
906
|
+
return F(), M(De, {
|
|
907
|
+
title: i(l)("inventory.ingredientGroup.title"),
|
|
907
908
|
actions: p.value,
|
|
908
909
|
"onClick:action": u
|
|
909
910
|
}, {
|
|
@@ -923,32 +924,32 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
923
924
|
"onUpdate:search": V[0] || (V[0] = (E) => m.value = E)
|
|
924
925
|
}, null, 8, ["search"]),
|
|
925
926
|
b(D, {
|
|
926
|
-
style: be(
|
|
927
|
-
"column-defs":
|
|
927
|
+
style: be(i(d).tableHeight),
|
|
928
|
+
"column-defs": i(n),
|
|
928
929
|
"row-data": f.value,
|
|
929
930
|
"search-value": m.value,
|
|
930
|
-
loading: !
|
|
931
|
+
loading: !i(k)._currentLocation || y.value,
|
|
931
932
|
"loading-text": "Loading",
|
|
932
|
-
onRowClick: V[1] || (V[1] = (E) =>
|
|
933
|
+
onRowClick: V[1] || (V[1] = (E) => i(e)(E.original)),
|
|
933
934
|
"page-size": I.value
|
|
934
935
|
}, {
|
|
935
936
|
"list-row": T((E) => [
|
|
936
|
-
b(
|
|
937
|
+
b(Ae, {
|
|
937
938
|
row: E,
|
|
938
|
-
onRowClick:
|
|
939
|
+
onRowClick: i(e)
|
|
939
940
|
}, ke({
|
|
940
941
|
default: T((N) => {
|
|
941
942
|
var J, Q, W, O, X, Z, ee, te, q, ne;
|
|
942
943
|
return [
|
|
943
944
|
c("div", kt, [
|
|
944
945
|
c("div", xt, [
|
|
945
|
-
b(
|
|
946
|
+
b(i(le), {
|
|
946
947
|
render: (W = (Q = (J = N.code) == null ? void 0 : J.column) == null ? void 0 : Q.columnDef) == null ? void 0 : W.cell,
|
|
947
948
|
props: (X = (O = N.code) == null ? void 0 : O.getContext) == null ? void 0 : X.call(O)
|
|
948
949
|
}, null, 8, ["render", "props"])
|
|
949
950
|
]),
|
|
950
951
|
c("div", ht, [
|
|
951
|
-
b(
|
|
952
|
+
b(i(le), {
|
|
952
953
|
render: (te = (ee = (Z = N.name) == null ? void 0 : Z.column) == null ? void 0 : ee.columnDef) == null ? void 0 : te.cell,
|
|
953
954
|
props: (ne = (q = N.name) == null ? void 0 : q.getContext) == null ? void 0 : ne.call(q)
|
|
954
955
|
}, null, 8, ["render", "props"])
|
|
@@ -961,7 +962,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
961
962
|
r.value ? {
|
|
962
963
|
name: "loading-text",
|
|
963
964
|
fn: T(() => [
|
|
964
|
-
c("div", null, $(l
|
|
965
|
+
c("div", null, $(i(l)("inventory.ingredient.table.importing")), 1)
|
|
965
966
|
]),
|
|
966
967
|
key: "0"
|
|
967
968
|
} : void 0
|
|
@@ -971,7 +972,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
971
972
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
972
973
|
], 2),
|
|
973
974
|
(F(), M(xe, { to: "body" }, [
|
|
974
|
-
b(bt, he(we(
|
|
975
|
+
b(bt, he(we(i(g))), null, 16)
|
|
975
976
|
]))
|
|
976
977
|
]),
|
|
977
978
|
_: 1
|
|
@@ -980,5 +981,5 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
980
981
|
}
|
|
981
982
|
});
|
|
982
983
|
export {
|
|
983
|
-
|
|
984
|
+
Pt as default
|
|
984
985
|
};
|