@feedmepos/mf-inventory-portal 1.2.40-dev.1 → 1.2.40
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-0DyZL1Fq.js → App-CFp4VWkn.js} +3 -3
- package/dist/{ApprovalView-BmBq5TGO.js → ApprovalView-BR-qwJZU.js} +5 -5
- package/dist/{BindingsDialog-DtBdmYMs.js → BindingsDialog-DCEb7sT8.js} +11 -11
- package/dist/{BindingsPicker-BAGxi1ZC.js → BindingsPicker-CKQ5qIsY.js} +9 -9
- package/dist/{BindingsTable-DKlb_qiS.js → BindingsTable-DkRi1hCC.js} +24 -24
- package/dist/{ClosingDraftView-CEmvLMPP.js → ClosingDraftView-C_LQUzJ8.js} +8 -8
- package/dist/{ClosingHistoryView-DOmSMiGH.js → ClosingHistoryView-BbH6v1rk.js} +22 -22
- package/dist/{ClosingTemplateView-Bd1KfJL3.js → ClosingTemplateView-CM72EBRP.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-DoE0Bmx4.js → DeliveryOrderPrintPreview-5-7-1XU5.js} +9 -9
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-20eCsiTr.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DU2xeJtz.js} +61 -60
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-B05RFZv-.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-qkS1g4m3.js} +2 -2
- package/dist/{FmMultiselectDialog-i1uk7uNx.js → FmMultiselectDialog-C3b-iSE2.js} +1 -1
- package/dist/{FmMultiselectDialog-ChsBeANW.js → FmMultiselectDialog-DJUiGIHJ.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BpT8OBQX.js → FmUnitInput.vue_vue_type_script_setup_true_lang-dnE7g0iB.js} +3 -3
- package/dist/{ImportView-CCLgSwn2.js → ImportView-C-OH0lW1.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-EHwf-vCH.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DZaO7ghp.js} +1 -1
- package/dist/{IngredientGroupView-BnEyAtcY.js → IngredientGroupView-Bz2dANo0.js} +49 -49
- package/dist/{IngredientsView-DEN_EqXP.js → IngredientsView-CwVCJ2hv.js} +14 -14
- package/dist/{IntegrationView-Cu_gMMz_.js → IntegrationView-BKfzgu3o.js} +12 -12
- package/dist/{InventoryBindingForm-COw2tcQC.js → InventoryBindingForm-CNZ1tuxg.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DIv_DrTj.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CeQbJ5M-.js} +14 -14
- package/dist/{InventoryBindingSummary-Csajkxbi.js → InventoryBindingSummary-iJD9V9f7.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BE9UFVFI.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-4u88I-eh.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Da6ffJym.js → PremiumBadge.vue_vue_type_script_setup_true_lang-tZ7-qsUc.js} +2 -2
- package/dist/{PublishView-qCcwOaJ8.js → PublishView-DhIomByw.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-m2n6OT7Z.js → PurchaseOrderPrintPreview-1Jm8hmYB.js} +9 -9
- package/dist/ReceiveRequestView-CD-w_Cph.js +2821 -0
- package/dist/{RecipeView-Bp_59G4J.js → RecipeView-DVrcKtAa.js} +8 -8
- package/dist/{StockView-Co_sOnjs.js → StockView-BmwDyRwP.js} +15 -15
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Npu98N-x.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-crC3-G5l.js} +1 -1
- package/dist/{SupplierView-Bp4ez39s.js → SupplierView-CwTK_sYl.js} +11 -11
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-JTXbmabq.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-C8Yle9k2.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Dn2j9Xls.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CfZKi0So.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BSOi6Bbh.js → TransferDetails.vue_vue_type_script_setup_true_lang-jw2-Xg5Q.js} +374 -374
- package/dist/{TransferTemplateView-C5jzqjPy.js → TransferTemplateView-BCT6mq6u.js} +354 -354
- package/dist/{UnitView-XcXvbWUz.js → UnitView-Cuh2LX3K.js} +6 -6
- package/dist/{WarehouseView-B37E963Z.js → WarehouseView-DZ06EmIm.js} +5 -5
- package/dist/{WastageTemplateView-Dn2vSoCa.js → WastageTemplateView-CUAgAB-K.js} +14 -14
- package/dist/{app-CaXDnJ-Z.js → app-DsvKAAar.js} +334 -347
- package/dist/app.js +1 -1
- package/dist/{closing-template-CgLIA5Fw.js → closing-template-B4q3uNXW.js} +1 -1
- package/dist/{date2-Dc5sFY0E.js → date2-DPON4K9X.js} +1 -1
- package/dist/{dayjs.min-B-H7eU1F.js → dayjs.min-BUcpGcn-.js} +12 -12
- package/dist/{decimal-BEqE-6GW.js → decimal-O0r48Ccj.js} +2 -2
- package/dist/{defineDeepModel-CXxtm-xp.js → defineDeepModel-DKSKw3d8.js} +1 -1
- package/dist/{duplicate-template-BX6XhNvd.js → duplicate-template-AZR81F4P.js} +1 -1
- package/dist/feature-Chb7LGRV.js +20162 -0
- package/dist/{format-time-from-id-Dhlv9sZk.js → format-time-from-id-C0ju5W3p.js} +1 -1
- package/dist/{format-unit-display-B1WhMzNf.js → format-unit-display-CIh10egg.js} +247 -246
- package/dist/{import-export.helper-DaGtyevy.js → import-export.helper-Dz7WeOmz.js} +5 -5
- package/dist/{index-CqbsiJk1.js → index-6H1yTL5Z.js} +9 -9
- package/dist/{index-CikPk76E.js → index-BYYuUmlN.js} +3 -3
- package/dist/{index-B2ziwUTD.js → index-BiYceIQq.js} +1 -1
- package/dist/{lodash-rwAZ9bXl.js → lodash-CcF-iQsS.js} +1 -1
- package/dist/{netsuite-SdH9FL9h.js → netsuite-BSgSRRLZ.js} +3 -3
- package/dist/{purchase-order-template-Daxs7lNG.js → purchase-order-template-gLB1CO-a.js} +1 -1
- package/dist/{rules-81GqVkEm.js → rules-BRx1HG7R.js} +3 -3
- package/dist/{stock-BEmy7_Qs.js → stock-BJjMCR2I.js} +1 -1
- package/dist/{stock-CpYHrEjC.js → stock-qe8Qoouq.js} +3 -3
- package/dist/stores/inventory.d.ts +1 -1
- package/dist/{supplier-Bw4fRGiq.js → supplier-BLMn0x03.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CGTZ9UUP.js → use-ingredient-select-dialog-Djd_7uji.js} +2 -2
- package/dist/{use-inventory-binding-dialog-CUh7aMb7.js → use-inventory-binding-dialog-DvMtdhSZ.js} +2 -2
- package/dist/{use-template-enabled-locations-2-2oPspMus.js → use-template-enabled-locations-2-C0JE_mEH.js} +2 -2
- package/dist/views/receive-request/components/netsuite/NetSuitePanel.vue.d.ts +2 -3
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -3
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +2197 -490
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +0 -1430
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +0 -1
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -3
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +6 -6
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +7 -7
- package/dist/views/receive-request/constants/purchase-order-transaction-type.d.ts +4 -0
- package/dist/views/receive-request/helper/get-transfer-type.d.ts +2 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -3
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +2 -3
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +3 -4
- package/dist/{vue-i18n-Di6nYtv0.js → vue-i18n-gFHTGAs6.js} +378 -378
- package/dist/{xlsx-DXn_bv49.js → xlsx-QHyL0Tej.js} +1 -1
- package/dist/{xlsx.util-BawfHUuI.js → xlsx.util-d5-VGpcM.js} +1 -1
- package/package.json +3 -3
- package/dist/ReceiveRequestView-fhTKkIJA.js +0 -2866
- package/dist/feature-BsDnCbpL.js +0 -25312
- package/dist/helper/reactivity.d.ts +0 -11
- package/dist/helper/reactivity.spec.d.ts +0 -1
- package/dist/views/receive-request/components/transfer-form/composables/use-purchase-order-form-controller.d.ts +0 -13974
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as C, t as
|
|
3
|
-
import { u as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { H as M, u as E, L as R, O as B, x as U } from "./app-DsvKAAar.js";
|
|
2
|
+
import { a as C, t as H } from "./rules-BRx1HG7R.js";
|
|
3
|
+
import { u as D } from "./supplier-BLMn0x03.js";
|
|
4
|
+
import { P as T } from "./format-unit-display-CIh10egg.js";
|
|
5
|
+
import { computed as f, defineComponent as z, mergeModels as x, useModel as j, ref as q, resolveComponent as w, openBlock as L, createElementBlock as O, normalizeStyle as W, createElementVNode as I, createVNode as $, withCtx as J, createBlock as V, createCommentVNode as N, Fragment as K, renderList as Q, unref as g } from "vue";
|
|
6
|
+
import { F as X } from "./FmMultiselectDialog-DJUiGIHJ.js";
|
|
7
|
+
function Y(e, r, a) {
|
|
7
8
|
var o;
|
|
8
9
|
if (!!r.measurement === !!a && ((o = r.measurement) == null ? void 0 : o.id) === a)
|
|
9
10
|
return r;
|
|
@@ -19,33 +20,33 @@ function X(e, r, a) {
|
|
|
19
20
|
costPerUnit: r.costPerUnit
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
var
|
|
24
|
-
const
|
|
23
|
+
function re(e, r, a, u) {
|
|
24
|
+
var P, _, s;
|
|
25
|
+
const i = (s = (_ = (P = u == null ? void 0 : u.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : _.find(
|
|
25
26
|
(t) => t.skuId === e._id
|
|
26
27
|
)) == null ? void 0 : s.defaultCost;
|
|
27
28
|
if (u != null && u.manualTotalCost)
|
|
28
29
|
return {
|
|
29
30
|
cost: u.manualTotalCost,
|
|
30
31
|
skuDefaultCost: e.defaultCost ?? void 0,
|
|
31
|
-
supplierOverrideCost:
|
|
32
|
+
supplierOverrideCost: i ?? void 0
|
|
32
33
|
};
|
|
33
|
-
const n = e.defaultCost ?
|
|
34
|
+
const n = e.defaultCost ? Y(e.unit, e.defaultCost, e.trackingMeasurement) : void 0, o = i ?? n, p = o == null ? void 0 : o.costPerUnit, v = p ? o != null && o.measurement ? +C(p) / +C(o == null ? void 0 : o.measurement.conversion) : +C(p) : void 0, b = v ? a ? v * +C(a.conversion) : v : void 0, h = b ? +C(r) * b : void 0;
|
|
34
35
|
return {
|
|
35
36
|
cost: h ? {
|
|
36
|
-
...
|
|
37
|
-
currency:
|
|
37
|
+
...H(h ?? 0, 2),
|
|
38
|
+
currency: M()
|
|
38
39
|
} : {
|
|
39
40
|
amount: 0,
|
|
40
41
|
precision: 0,
|
|
41
|
-
currency:
|
|
42
|
+
currency: M()
|
|
42
43
|
},
|
|
43
44
|
skuDefaultCost: e.defaultCost ?? void 0,
|
|
44
|
-
supplierOverrideCost:
|
|
45
|
+
supplierOverrideCost: i ?? void 0
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
48
|
function k(e) {
|
|
48
|
-
const r =
|
|
49
|
+
const r = B.safeParse(e);
|
|
49
50
|
if (r.success) return r.data;
|
|
50
51
|
throw new Error("Invalid supplier data");
|
|
51
52
|
}
|
|
@@ -68,23 +69,23 @@ function S(e) {
|
|
|
68
69
|
preparationTime: e.preparationTime
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
-
const
|
|
72
|
+
function ae(e, r, a = !1, u = !1) {
|
|
73
|
+
const i = D(), n = E();
|
|
73
74
|
n.watchLocation(async () => {
|
|
74
75
|
var y;
|
|
75
|
-
await
|
|
76
|
+
await i.readSuppliers();
|
|
76
77
|
const s = e();
|
|
77
78
|
if ((y = s.supplier) != null && y._id) return;
|
|
78
|
-
const t = u ?
|
|
79
|
+
const t = u ? i.suppliers[0] : i.businessSuppliers[0], l = (a ? n.locations.filter((d) => d.doc._id !== n.currentLocation.doc._id) : n.locations)[0];
|
|
79
80
|
r({
|
|
80
81
|
...s,
|
|
81
|
-
supplier: t ? k(t) :
|
|
82
|
+
supplier: t ? k(t) : l ? S(l) : s.supplier
|
|
82
83
|
});
|
|
83
84
|
});
|
|
84
85
|
const o = f(
|
|
85
86
|
() => {
|
|
86
87
|
var s, t;
|
|
87
|
-
return typeof ((t = (s = e()) == null ? void 0 : s.supplier) == null ? void 0 : t.internal) == "string" ?
|
|
88
|
+
return typeof ((t = (s = e()) == null ? void 0 : s.supplier) == null ? void 0 : t.internal) == "string" ? T.TRANSFER : T.PURCHASE;
|
|
88
89
|
}
|
|
89
90
|
), p = f({
|
|
90
91
|
get() {
|
|
@@ -93,8 +94,8 @@ function re(e, r, a = !1, u = !1) {
|
|
|
93
94
|
},
|
|
94
95
|
set(s) {
|
|
95
96
|
const t = e() ?? {};
|
|
96
|
-
if (o.value ===
|
|
97
|
-
const F = (u ?
|
|
97
|
+
if (o.value === T.PURCHASE) {
|
|
98
|
+
const F = (u ? i.suppliers : i.businessSuppliers).find((A) => A._id === s);
|
|
98
99
|
r({
|
|
99
100
|
...t,
|
|
100
101
|
supplier: F ? k(F) : t.supplier
|
|
@@ -109,24 +110,24 @@ function re(e, r, a = !1, u = !1) {
|
|
|
109
110
|
supplier: y ? S(y) : t.supplier
|
|
110
111
|
});
|
|
111
112
|
}
|
|
112
|
-
}), v = f(() =>
|
|
113
|
+
}), v = f(() => i.locationSuppliers.map(k)), b = f(() => i.businessSuppliers.map(k)), h = f(() => {
|
|
113
114
|
const s = [...v.value], t = [...b.value];
|
|
114
115
|
return u ? [...t, ...s] : t;
|
|
115
116
|
}), c = f(() => {
|
|
116
117
|
var m;
|
|
117
|
-
const s = ((m = n._currentLocation) == null ? void 0 : m.type) ===
|
|
118
|
+
const s = ((m = n._currentLocation) == null ? void 0 : m.type) === R.warehouse;
|
|
118
119
|
return (a ? n.allLocations.filter(
|
|
119
|
-
(
|
|
120
|
-
) : n.allLocations).filter((
|
|
121
|
-
}),
|
|
122
|
-
if (o.value ===
|
|
123
|
-
const t = v.value.map((
|
|
124
|
-
label:
|
|
125
|
-
value:
|
|
126
|
-
})), m = b.value.map((
|
|
127
|
-
label:
|
|
120
|
+
(l) => l.doc._id !== n.currentLocation.doc._id
|
|
121
|
+
) : n.allLocations).filter((l) => s || l.acceptRequest).map(S);
|
|
122
|
+
}), P = f(() => {
|
|
123
|
+
if (o.value === T.PURCHASE) {
|
|
124
|
+
const t = v.value.map((l) => ({
|
|
125
|
+
label: l.name,
|
|
126
|
+
value: l._id
|
|
127
|
+
})), m = b.value.map((l) => ({
|
|
128
|
+
label: l.name,
|
|
128
129
|
sublabel: "Business supplier",
|
|
129
|
-
value:
|
|
130
|
+
value: l._id
|
|
130
131
|
}));
|
|
131
132
|
return u ? [...t, ...m] : m;
|
|
132
133
|
}
|
|
@@ -136,10 +137,10 @@ function re(e, r, a = !1, u = !1) {
|
|
|
136
137
|
value: t._id
|
|
137
138
|
}));
|
|
138
139
|
}), _ = f(() => {
|
|
139
|
-
var
|
|
140
|
-
const s = (y = (
|
|
141
|
-
if (o.value ===
|
|
142
|
-
const d =
|
|
140
|
+
var l, y;
|
|
141
|
+
const s = (y = (l = e()) == null ? void 0 : l.supplier) == null ? void 0 : y._id;
|
|
142
|
+
if (o.value === T.PURCHASE) {
|
|
143
|
+
const d = i.suppliers.find((F) => F._id === s);
|
|
143
144
|
return d ? k(d) : null;
|
|
144
145
|
}
|
|
145
146
|
const m = n.allLocations.find((d) => d.doc._id);
|
|
@@ -147,16 +148,16 @@ function re(e, r, a = !1, u = !1) {
|
|
|
147
148
|
});
|
|
148
149
|
return {
|
|
149
150
|
transferLocationModel: p,
|
|
150
|
-
transferLocationOptions:
|
|
151
|
+
transferLocationOptions: P,
|
|
151
152
|
locationOptionsTypePurchase: h,
|
|
152
153
|
locationOptionsTypePurchaseLocationLevel: v,
|
|
153
154
|
locationOptionsTypeTransfer: c,
|
|
154
155
|
selectedLocation: _
|
|
155
156
|
};
|
|
156
157
|
}
|
|
157
|
-
const Z = { class: "overflow-y-auto h-full pb-8" },
|
|
158
|
+
const Z = { class: "overflow-y-auto h-full pb-8" }, ie = /* @__PURE__ */ z({
|
|
158
159
|
__name: "FmFilterableMenuOptions",
|
|
159
|
-
props: /* @__PURE__ */
|
|
160
|
+
props: /* @__PURE__ */ x({
|
|
160
161
|
modelValue: {},
|
|
161
162
|
maxHeight: {},
|
|
162
163
|
width: {},
|
|
@@ -169,19 +170,19 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ H({
|
|
|
169
170
|
}),
|
|
170
171
|
emits: ["update:search"],
|
|
171
172
|
setup(e) {
|
|
172
|
-
const r = e, a =
|
|
173
|
-
() => new
|
|
173
|
+
const r = e, a = j(e, "search"), u = f(
|
|
174
|
+
() => new X(r.items, ["label", "sublabel"], {
|
|
174
175
|
caseSensitive: !1,
|
|
175
176
|
sort: !0
|
|
176
177
|
})
|
|
177
|
-
),
|
|
178
|
+
), i = f(() => u.value.search(a.value)), n = q();
|
|
178
179
|
return console.log({ stickyRef: n }), (o, p) => {
|
|
179
|
-
const v =
|
|
180
|
-
return L(),
|
|
180
|
+
const v = w("FmButton"), b = w("FmTextField"), h = w("FmMenuItem");
|
|
181
|
+
return L(), O("div", {
|
|
181
182
|
class: "relative",
|
|
182
183
|
style: W({ width: o.width })
|
|
183
184
|
}, [
|
|
184
|
-
|
|
185
|
+
I("div", {
|
|
185
186
|
class: "sticky top-0 bg-white mb-8",
|
|
186
187
|
ref_key: "stickyRef",
|
|
187
188
|
ref: n
|
|
@@ -191,7 +192,7 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ H({
|
|
|
191
192
|
"onUpdate:modelValue": p[1] || (p[1] = (c) => a.value = c),
|
|
192
193
|
placeholder: "Filter options"
|
|
193
194
|
}, {
|
|
194
|
-
append:
|
|
195
|
+
append: J(() => [
|
|
195
196
|
a.value ? (L(), V(v, {
|
|
196
197
|
key: 0,
|
|
197
198
|
variant: "tertiary",
|
|
@@ -202,19 +203,19 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ H({
|
|
|
202
203
|
_: 1
|
|
203
204
|
}, 8, ["modelValue"])
|
|
204
205
|
], 512),
|
|
205
|
-
|
|
206
|
-
(L(!0),
|
|
207
|
-
key:
|
|
206
|
+
I("div", Z, [
|
|
207
|
+
(L(!0), O(K, null, Q(i.value, (c, P) => (L(), V(h, {
|
|
208
|
+
key: P,
|
|
208
209
|
label: c.label,
|
|
209
210
|
sublabel: c.sublabel,
|
|
210
|
-
"model-value": g(
|
|
211
|
-
onClick: () => o.handleItemChange(g(
|
|
211
|
+
"model-value": g(U)(o.modelValue, c.value),
|
|
212
|
+
onClick: () => o.handleItemChange(g(U)(o.modelValue, c.value), c),
|
|
212
213
|
onVnodeMounted: (_) => {
|
|
213
214
|
var s, t;
|
|
214
|
-
return g(
|
|
215
|
+
return g(U)(o.modelValue, c.value) && ((s = _.el) == null || s.scrollIntoView({ behavior: "instant", block: "end" }), (t = _.el) == null || t.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
215
216
|
}
|
|
216
217
|
}, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
|
|
217
|
-
|
|
218
|
+
i.value.length ? N("", !0) : (L(), V(h, {
|
|
218
219
|
key: 0,
|
|
219
220
|
disabled: "",
|
|
220
221
|
label: "No options available"
|
|
@@ -225,7 +226,7 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ H({
|
|
|
225
226
|
}
|
|
226
227
|
});
|
|
227
228
|
export {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
ie as _,
|
|
230
|
+
re as c,
|
|
231
|
+
ae as u
|
|
231
232
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as I, computed as g, ref as z, resolveComponent as h, openBlock as n, createElementBlock as y, createVNode as _, withCtx as L, createElementVNode as f, toDisplayString as Y, unref as u, createBlock as p, createCommentVNode as w, Fragment as $, renderList as R, watch as E, mergeModels as O, useModel as C, renderSlot as H, normalizeClass as S } from "vue";
|
|
2
2
|
import { useCoreStore as W, useI18n as P } from "@feedmepos/mf-common";
|
|
3
|
-
import { u as q } from "./app-
|
|
4
|
-
import { d as U } from "./date2-
|
|
3
|
+
import { u as q } from "./app-DsvKAAar.js";
|
|
4
|
+
import { d as U } from "./date2-DPON4K9X.js";
|
|
5
5
|
import { useBreakpoints as G } from "@feedmepos/ui-library";
|
|
6
6
|
import { u as J, F as K } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
7
7
|
import { b as A } from "./app-uBuHtW8m.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore as p } from "pinia";
|
|
2
2
|
import { useDialog as y } from "@feedmepos/ui-library";
|
|
3
3
|
import { useI18n as v } from "@feedmepos/mf-common";
|
|
4
|
-
import { a } from "./FmMultiselectDialog-
|
|
4
|
+
import { a } from "./FmMultiselectDialog-DJUiGIHJ.js";
|
|
5
5
|
import { h as S } from "vue";
|
|
6
6
|
const w = p("inventoryMultiSelectDialog", () => {
|
|
7
7
|
const l = y(), { t: n } = v();
|
|
@@ -3,8 +3,8 @@ var De = (F, o, t) => o in F ? Ie(F, o, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var me = (F, o, t) => De(F, typeof o != "symbol" ? o + "" : o, t);
|
|
4
4
|
import { defineComponent as ge, computed as S, ref as L, watch as ke, openBlock as c, createElementBlock as h, normalizeStyle as j, Fragment as V, renderList as $, renderSlot as _e, createCommentVNode as O, useSlots as He, onMounted as $e, onUnmounted as Oe, reactive as q, resolveComponent as B, createElementVNode as I, createVNode as _, toDisplayString as ee, unref as H, createSlots as Ue, withCtx as w, createBlock as M, resolveDynamicComponent as fe, normalizeClass as he, withModifiers as Pe, Transition as Ee } from "vue";
|
|
5
5
|
import { useDialogChild as Ke } from "@feedmepos/ui-library";
|
|
6
|
-
import {
|
|
7
|
-
import { d as Ne } from "./index-
|
|
6
|
+
import { x as be } from "./app-DsvKAAar.js";
|
|
7
|
+
import { d as Ne } from "./index-BYYuUmlN.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { useI18n as je } from "@feedmepos/mf-common";
|
|
10
10
|
import { N as Ge, H as ye, b as ze } from "./app-uBuHtW8m.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as ie, mergeModels as W, useModel as le, computed as v, ref as B, watch as E, onBeforeUnmount as ae, inject as ue, resolveComponent as b, openBlock as d, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as F, renderSlot as G, normalizeClass as j, toDisplayString as _, withDirectives as re, vModelText as me, createCommentVNode as I, createTextVNode as ce, createBlock as U, Fragment as de, renderList as pe } from "vue";
|
|
2
|
-
import { l as fe } from "./lodash-
|
|
3
|
-
import { s as D } from "./app-
|
|
4
|
-
import { I as R, g as O, d as ve, a as M, c as be, t as ye, f as he, p as Me, b as ge, u as xe } from "./rules-
|
|
2
|
+
import { l as fe } from "./lodash-CcF-iQsS.js";
|
|
3
|
+
import { s as D } from "./app-DsvKAAar.js";
|
|
4
|
+
import { I as R, g as O, d as ve, a as M, c as be, t as ye, f as he, p as Me, b as ge, u as xe } from "./rules-BRx1HG7R.js";
|
|
5
5
|
import "@feedmepos/ui-library";
|
|
6
6
|
function H() {
|
|
7
7
|
return {
|
|
@@ -2,14 +2,14 @@ import { defineComponent as De, ref as F, computed as J, watch as ze, resolveCom
|
|
|
2
2
|
import { u as Ve, _ as ke } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
3
3
|
import { useCoreStore as Re, useI18n as je } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as We, useSnackbar as Oe, useDialog as Le, useBreakpoints as Je } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as Xe } from "./feature-
|
|
6
|
-
import { a as ie } from "./app-
|
|
7
|
-
import "./dayjs.min-
|
|
5
|
+
import { u as Xe } from "./feature-Chb7LGRV.js";
|
|
6
|
+
import { a as ie } from "./app-DsvKAAar.js";
|
|
7
|
+
import "./dayjs.min-BUcpGcn-.js";
|
|
8
8
|
import "./app-uBuHtW8m.js";
|
|
9
|
-
import { s as He, a as qe, d as Qe, t as Ce, r as Ye } from "./xlsx.util-
|
|
10
|
-
import { s as Ze, g as et, b as tt, d as Fe } from "./import-export.helper-
|
|
9
|
+
import { s as He, a as qe, d as Qe, t as Ce, r as Ye } from "./xlsx.util-d5-VGpcM.js";
|
|
10
|
+
import { s as Ze, g as et, b as tt, d as Fe } from "./import-export.helper-Dz7WeOmz.js";
|
|
11
11
|
import { r as nt } from "./random-CSbEbElR.js";
|
|
12
|
-
import { d as Ae, a as pe } from "./rules-
|
|
12
|
+
import { d as Ae, a as pe } from "./rules-BRx1HG7R.js";
|
|
13
13
|
import { F as ot } from "./FmDroppableField-J0xUsOTV.js";
|
|
14
14
|
function Ee() {
|
|
15
15
|
return `measurement_${(/* @__PURE__ */ new Date()).toISOString()}_${nt()}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
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, f as y } from "./rules-
|
|
2
|
+
import { a, f as y } from "./rules-BRx1HG7R.js";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
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",
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
2
|
-
import { a as L, c as z, j as oe, u as Re } from "./app-
|
|
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-DsvKAAar.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
5
|
import { useI18n as P, useCoreStore as Ge } from "@feedmepos/mf-common";
|
|
@@ -7,11 +7,11 @@ import { defineStore as ue, storeToRefs as ae } from "pinia";
|
|
|
7
7
|
import { D as le, R as K } from "./row-action.enum-BcW_L_nE.js";
|
|
8
8
|
import { c as Ve, _ as Ce, F as ie } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
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-
|
|
11
|
-
import { d as de } from "./defineDeepModel-
|
|
12
|
-
import { I as Te, A as Ee, U as Me, R as ce } from "./rules-
|
|
10
|
+
import { _ as $e } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-qkS1g4m3.js";
|
|
11
|
+
import { d as de } from "./defineDeepModel-DKSKw3d8.js";
|
|
12
|
+
import { I as Te, A as Ee, U as Me, R as ce } from "./rules-BRx1HG7R.js";
|
|
13
13
|
import { x as Ue, N as Be, b as ze } from "./app-uBuHtW8m.js";
|
|
14
|
-
import { u as Le } from "./FmMultiselectDialog-
|
|
14
|
+
import { u as Le } from "./FmMultiselectDialog-C3b-iSE2.js";
|
|
15
15
|
import { r as me } from "./random-CSbEbElR.js";
|
|
16
16
|
import { u as Pe, R as Ne } from "./usePromise-CbVUCxhj.js";
|
|
17
17
|
const H = ue(
|
|
@@ -48,12 +48,12 @@ const H = ue(
|
|
|
48
48
|
message: `Deleted ${u.name}`,
|
|
49
49
|
type: "success"
|
|
50
50
|
});
|
|
51
|
-
} catch (
|
|
51
|
+
} catch (y) {
|
|
52
52
|
f.open({
|
|
53
53
|
title: `Cannot delete ${u.name}`,
|
|
54
54
|
message: "Please try again.",
|
|
55
55
|
type: "error"
|
|
56
|
-
}), console.error("failed to delete ingredient",
|
|
56
|
+
}), console.error("failed to delete ingredient", y);
|
|
57
57
|
} finally {
|
|
58
58
|
m.value = !1, r();
|
|
59
59
|
}
|
|
@@ -76,14 +76,14 @@ const H = ue(
|
|
|
76
76
|
}
|
|
77
77
|
function s() {
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function g() {
|
|
80
80
|
}
|
|
81
81
|
return {
|
|
82
82
|
createIngredientGroup: e,
|
|
83
83
|
updateIngredientGroup: a,
|
|
84
84
|
deleteIngredientGroup: n,
|
|
85
85
|
importIngredientGroups: s,
|
|
86
|
-
exportIngredientGroups:
|
|
86
|
+
exportIngredientGroups: g,
|
|
87
87
|
ingredientGroupDialogProps: v
|
|
88
88
|
};
|
|
89
89
|
}
|
|
@@ -94,7 +94,7 @@ const H = ue(
|
|
|
94
94
|
async function v() {
|
|
95
95
|
_.value = !0;
|
|
96
96
|
try {
|
|
97
|
-
await k.
|
|
97
|
+
await k.readInventory();
|
|
98
98
|
} catch (t) {
|
|
99
99
|
console.error("error on reading inventory", t), f.open({
|
|
100
100
|
title: "Error",
|
|
@@ -382,12 +382,12 @@ function fe(o) {
|
|
|
382
382
|
sublabel: t.code,
|
|
383
383
|
value: t._id
|
|
384
384
|
})), e = (o.skuRefs ?? []).map((t) => t._id), a = await _.multiSelect(v, e, (t) => {
|
|
385
|
-
var s,
|
|
385
|
+
var s, g, u, m, r, y;
|
|
386
386
|
const n = (s = o.skuRefs) == null ? void 0 : s.findIndex((w) => w._id === t);
|
|
387
387
|
return {
|
|
388
388
|
_id: t,
|
|
389
|
-
trackingMeasurement: typeof n != "number" || n == -1 ? (
|
|
390
|
-
priority: ((
|
|
389
|
+
trackingMeasurement: typeof n != "number" || n == -1 ? (g = f.skuById[t]) == null ? void 0 : g.trackingMeasurement : (m = (u = o.skuRefs) == null ? void 0 : u[n]) == null ? void 0 : m.trackingMeasurement,
|
|
390
|
+
priority: ((y = (r = o.skuRefs) == null ? void 0 : r[n]) == null ? void 0 : y.priority) ?? o.skuRefs.length,
|
|
391
391
|
default: !1
|
|
392
392
|
};
|
|
393
393
|
});
|
|
@@ -412,18 +412,18 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
412
412
|
},
|
|
413
413
|
setup(o) {
|
|
414
414
|
const _ = o, { t: f } = P(), k = Ge(), i = G(() => {
|
|
415
|
-
var
|
|
415
|
+
var g;
|
|
416
416
|
const n = /* @__PURE__ */ new Map(), s = k.restaurants.value.map((u) => u.customAttributes ?? {});
|
|
417
417
|
for (const u of s)
|
|
418
418
|
for (const [m, r] of Object.entries(u))
|
|
419
|
-
n.has(m) || n.set(m, /* @__PURE__ */ new Set()), r && ((
|
|
419
|
+
n.has(m) || n.set(m, /* @__PURE__ */ new Set()), r && ((g = n.get(m)) == null || g.add(r));
|
|
420
420
|
return n;
|
|
421
421
|
}), v = G(() => [
|
|
422
|
-
...[...i.value.entries()].map(([s,
|
|
422
|
+
...[...i.value.entries()].map(([s, g]) => ({
|
|
423
423
|
type: "string",
|
|
424
424
|
key: s,
|
|
425
425
|
entity: "restaurant",
|
|
426
|
-
values: [...
|
|
426
|
+
values: [...g]
|
|
427
427
|
}))
|
|
428
428
|
]), e = de("modelValue", {
|
|
429
429
|
get default() {
|
|
@@ -457,11 +457,11 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
457
457
|
allowOverride: !1
|
|
458
458
|
});
|
|
459
459
|
return (n, s) => {
|
|
460
|
-
const
|
|
460
|
+
const g = R("FmTextField"), u = R("FmLabel"), m = R("FmFormGroup"), r = R("FmTable");
|
|
461
461
|
return F(), B("div", Ke, [
|
|
462
|
-
b(
|
|
462
|
+
b(g, {
|
|
463
463
|
modelValue: l(e).name,
|
|
464
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
464
|
+
"onUpdate:modelValue": s[0] || (s[0] = (y) => l(e).name = y),
|
|
465
465
|
label: l(f)("inventory.ingredientGroup.form.rules.name"),
|
|
466
466
|
"label-mark": "required",
|
|
467
467
|
rules: [l(ce)()]
|
|
@@ -474,16 +474,16 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
474
474
|
}, null, 8, ["label"]),
|
|
475
475
|
b(l(ze), {
|
|
476
476
|
modelValue: a.value,
|
|
477
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
477
|
+
"onUpdate:modelValue": s[1] || (s[1] = (y) => a.value = y),
|
|
478
478
|
attributes: v.value
|
|
479
479
|
}, null, 8, ["modelValue", "attributes"])
|
|
480
480
|
]),
|
|
481
481
|
b(m, {
|
|
482
482
|
"model-value": a.value,
|
|
483
483
|
rules: [
|
|
484
|
-
(
|
|
484
|
+
(y) => {
|
|
485
485
|
var w;
|
|
486
|
-
return !!((w =
|
|
486
|
+
return !!((w = y == null ? void 0 : y.rules) != null && w.length) || "At least one rule is required";
|
|
487
487
|
}
|
|
488
488
|
]
|
|
489
489
|
}, null, 8, ["model-value", "rules"])
|
|
@@ -501,7 +501,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
501
501
|
b(m, {
|
|
502
502
|
"model-value": l(e).skuRefs,
|
|
503
503
|
rules: [
|
|
504
|
-
(
|
|
504
|
+
(y) => !!(y != null && y.length) || "At least one ingredient is required"
|
|
505
505
|
]
|
|
506
506
|
}, null, 8, ["model-value", "rules"])
|
|
507
507
|
]),
|
|
@@ -521,7 +521,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
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" }, lt = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary px-4" }, it = { 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
522
|
key: 1,
|
|
523
523
|
class: "fm-typo-en-body-lg-400"
|
|
524
|
-
},
|
|
524
|
+
}, yt = /* @__PURE__ */ j({
|
|
525
525
|
__name: "IngredientGroupForm",
|
|
526
526
|
props: {
|
|
527
527
|
mode: {},
|
|
@@ -561,17 +561,17 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
561
561
|
},
|
|
562
562
|
set skuRefs(s) {
|
|
563
563
|
i.defaultSkuRefs = s;
|
|
564
|
-
const
|
|
564
|
+
const g = s.map((r) => r._id), u = i.rules;
|
|
565
565
|
if (!u) return;
|
|
566
566
|
const m = s.groupBy(
|
|
567
567
|
(r) => r._id,
|
|
568
568
|
(r) => r.trackingMeasurement
|
|
569
569
|
);
|
|
570
570
|
for (const r of u) {
|
|
571
|
-
const
|
|
572
|
-
(x) => !
|
|
571
|
+
const y = r.skuRefs.filter((x) => g.includes(x._id)), w = s.filter(
|
|
572
|
+
(x) => !y.some((I) => I._id === x._id)
|
|
573
573
|
);
|
|
574
|
-
r.skuRefs = [...
|
|
574
|
+
r.skuRefs = [...y, ...w].map((x) => {
|
|
575
575
|
var I;
|
|
576
576
|
return {
|
|
577
577
|
...x,
|
|
@@ -596,10 +596,10 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
596
596
|
var s;
|
|
597
597
|
return (s = n.value) == null ? void 0 : s.resetInputs();
|
|
598
598
|
}
|
|
599
|
-
}), (s,
|
|
600
|
-
const u = R("FmTextField"), m = R("FmButton"), r = R("FmFormGroup"),
|
|
599
|
+
}), (s, g) => {
|
|
600
|
+
const u = R("FmTextField"), m = R("FmButton"), r = R("FmFormGroup"), y = R("FmTable"), w = R("FmCard"), x = R("FmForm");
|
|
601
601
|
return F(), M(x, {
|
|
602
|
-
onValidationSuccess:
|
|
602
|
+
onValidationSuccess: g[2] || (g[2] = (I) => v("validation-success")),
|
|
603
603
|
ref_key: "formRef",
|
|
604
604
|
ref: n,
|
|
605
605
|
class: "flex flex-col gap-64"
|
|
@@ -613,13 +613,13 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
613
613
|
"label-mark": "required",
|
|
614
614
|
rules: [l(ce)()],
|
|
615
615
|
modelValue: l(i).name,
|
|
616
|
-
"onUpdate:modelValue":
|
|
616
|
+
"onUpdate:modelValue": g[0] || (g[0] = (d) => l(i).name = d)
|
|
617
617
|
}, null, 8, ["label", "rules", "modelValue"]),
|
|
618
618
|
b(u, {
|
|
619
619
|
label: l(e)("inventory.ingredientGroup.form.ref"),
|
|
620
620
|
"label-mark": "optional",
|
|
621
621
|
modelValue: l(i).ref,
|
|
622
|
-
"onUpdate:modelValue":
|
|
622
|
+
"onUpdate:modelValue": g[1] || (g[1] = (d) => l(i).ref = d)
|
|
623
623
|
}, null, 8, ["label", "modelValue"])
|
|
624
624
|
]),
|
|
625
625
|
c("div", et, [
|
|
@@ -650,7 +650,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
650
650
|
}, null, 8, ["model-value", "rules"])
|
|
651
651
|
]),
|
|
652
652
|
c("div", null, [
|
|
653
|
-
b(
|
|
653
|
+
b(y, {
|
|
654
654
|
"row-data": l(i).defaultSkuRefs ?? [],
|
|
655
655
|
"column-defs": l(t).columnDefs,
|
|
656
656
|
"column-visibility": l(t).columnVisibility,
|
|
@@ -675,7 +675,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
675
675
|
c("div", ct, [
|
|
676
676
|
c("div", mt, [
|
|
677
677
|
c("div", ft, [
|
|
678
|
-
|
|
678
|
+
ye($(l(e)("inventory.ingredientGroup.form.rules.rule_N", [p + 1])), 1),
|
|
679
679
|
d.name ? (F(), B("span", pt, ": ")) : se("", !0),
|
|
680
680
|
d.name ? (F(), B("span", vt, $(d.name), 1)) : se("", !0)
|
|
681
681
|
]),
|
|
@@ -713,7 +713,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
713
713
|
}, 512);
|
|
714
714
|
};
|
|
715
715
|
}
|
|
716
|
-
}),
|
|
716
|
+
}), gt = {
|
|
717
717
|
key: 0,
|
|
718
718
|
class: "text-fm-color-typo-primary fm-typo-en-body-lg-400"
|
|
719
719
|
}, _t = { class: "flex gap-4" }, bt = /* @__PURE__ */ j({
|
|
@@ -755,7 +755,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
755
755
|
n.value = p, s.value = p._id || `${Math.random()}`;
|
|
756
756
|
}
|
|
757
757
|
);
|
|
758
|
-
const
|
|
758
|
+
const g = G(() => {
|
|
759
759
|
switch (_.mode) {
|
|
760
760
|
case S.READ:
|
|
761
761
|
return "";
|
|
@@ -776,7 +776,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
776
776
|
}
|
|
777
777
|
return "";
|
|
778
778
|
}), m = A(), r = A(!1);
|
|
779
|
-
async function
|
|
779
|
+
async function y() {
|
|
780
780
|
r.value = !0;
|
|
781
781
|
const d = z(n.value);
|
|
782
782
|
try {
|
|
@@ -825,15 +825,15 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
825
825
|
case S.UPDATE:
|
|
826
826
|
return w();
|
|
827
827
|
case S.CREATE:
|
|
828
|
-
return
|
|
828
|
+
return y();
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
return (d, p) => {
|
|
832
832
|
const h = R("FmButton"), V = R("FmSideSheet");
|
|
833
833
|
return F(), M(V, {
|
|
834
834
|
"model-value": l(a),
|
|
835
|
-
"onUpdate:modelValue": p[3] || (p[3] = (D) =>
|
|
836
|
-
header:
|
|
835
|
+
"onUpdate:modelValue": p[3] || (p[3] = (D) => ge(a) ? a.value = D : null),
|
|
836
|
+
header: g.value,
|
|
837
837
|
"close-button": "",
|
|
838
838
|
"dismiss-away": "",
|
|
839
839
|
"max-width": 800
|
|
@@ -854,7 +854,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
854
854
|
])
|
|
855
855
|
]),
|
|
856
856
|
default: T(() => [
|
|
857
|
-
i.value ? (F(), M(
|
|
857
|
+
i.value ? (F(), M(yt, {
|
|
858
858
|
menu: i.value,
|
|
859
859
|
class: "w-full",
|
|
860
860
|
ref_key: "hasValidationExpose",
|
|
@@ -865,7 +865,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
865
865
|
mode: d.mode,
|
|
866
866
|
disabled: r.value,
|
|
867
867
|
onValidationSuccess: p[1] || (p[1] = (D) => I())
|
|
868
|
-
}, null, 8, ["menu", "model-value", "mode", "disabled"])) : (F(), B("div",
|
|
868
|
+
}, null, 8, ["menu", "model-value", "mode", "disabled"])) : (F(), B("div", gt, "Loading.."))
|
|
869
869
|
]),
|
|
870
870
|
_: 1
|
|
871
871
|
}, 8, ["model-value", "header"]);
|
|
@@ -879,7 +879,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
879
879
|
updateIngredientGroup: e,
|
|
880
880
|
importIngredientGroups: a,
|
|
881
881
|
exportIngredientGroups: t
|
|
882
|
-
} = H(), { columnDefs: n, loading: s } = ae(Oe()), { ingredientGroupDialogProps:
|
|
882
|
+
} = H(), { columnDefs: n, loading: s } = ae(Oe()), { ingredientGroupDialogProps: g } = ae(H());
|
|
883
883
|
function u(h) {
|
|
884
884
|
switch (h) {
|
|
885
885
|
case "add":
|
|
@@ -890,7 +890,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
890
890
|
return t();
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
|
-
const m = A(""), r = A(!1),
|
|
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(() => [
|
|
894
894
|
{
|
|
895
895
|
label: i("inventory.ingredient.create.title"),
|
|
896
896
|
value: "add",
|
|
@@ -927,7 +927,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
927
927
|
"column-defs": l(n),
|
|
928
928
|
"row-data": f.value,
|
|
929
929
|
"search-value": m.value,
|
|
930
|
-
loading: !l(k)._currentLocation ||
|
|
930
|
+
loading: !l(k)._currentLocation || y.value,
|
|
931
931
|
"loading-text": "Loading",
|
|
932
932
|
onRowClick: V[1] || (V[1] = (E) => l(e)(E.original)),
|
|
933
933
|
"page-size": I.value
|
|
@@ -971,7 +971,7 @@ const Ke = { class: "flex flex-col gap-16" }, je = { class: "flex flex-col" }, H
|
|
|
971
971
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
972
972
|
], 2),
|
|
973
973
|
(F(), M(xe, { to: "body" }, [
|
|
974
|
-
b(bt, he(we(l(
|
|
974
|
+
b(bt, he(we(l(g))), null, 16)
|
|
975
975
|
]))
|
|
976
976
|
]),
|
|
977
977
|
_: 1
|