@feedmepos/mf-inventory-portal 0.0.25-dev.9 → 0.0.26-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-9zSE_swt.js → App-CipfIdtR.js} +71 -72
- package/dist/ApprovalView-IC33yBg7.js +143 -0
- package/dist/{BindingsDialog-eGbOIQkw.js → BindingsDialog-EN6Kbnu7.js} +2 -2
- package/dist/{BindingsPicker-CVXrd29s.js → BindingsPicker-DQ_LEoqq.js} +3 -3
- package/dist/BindingsTable-DGXpAyM4.js +120 -0
- package/dist/ClosingDraftView-DR9xsW9I.js +1348 -0
- package/dist/ClosingTemplateView-CC1T7ovX.js +1804 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C9un0wCK.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CovzlB-s.js} +43 -43
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BRSABJnM.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BxEtsFXp.js} +29 -29
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DeRvrF7O.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B8H6vFJ5.js} +1 -1
- package/dist/{IngredientGroupView-ZWCOAljO.js → IngredientGroupView-DRPbXH8d.js} +24 -24
- package/dist/IngredientsView-DSHcH30X.js +1731 -0
- package/dist/{IntegrationView-DO3Ambro.js → IntegrationView-BgACk-jP.js} +605 -669
- package/dist/{InventoryBindingForm-BjtFP29c.js → InventoryBindingForm-Fs-CHoT-.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CFMZ4VsK.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DVHQjAEC.js} +63 -63
- package/dist/{InventoryBindingSummary-C6DkVX-B.js → InventoryBindingSummary-CHWMtGtk.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-nb1t6u2V.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cu9V-8Cf.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BcMAXo4F.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CyVRCAqv.js} +12 -12
- package/dist/PublishView-CI7o5a0F.js +222 -0
- package/dist/{PurchaseOrderPrintPreview-_MCAsdw9.js → PurchaseOrderPrintPreview-CO4a811o.js} +1 -1
- package/dist/ReceiveRequestView-KH5wY5BA.js +2562 -0
- package/dist/{RecipeView-dmmjklwh.js → RecipeView-DxVbUxOG.js} +47 -47
- package/dist/StockView-CiHPAaYh.js +1840 -0
- package/dist/{SupplierView-CO5460uC.js → SupplierView-DPj87kld.js} +448 -461
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CfPPCFh8.js +1566 -0
- package/dist/TransferTemplateView-3W29v8hd.js +1420 -0
- package/dist/{UnitView-DbYzxCXF.js → UnitView-WCtNQFf8.js} +23 -23
- package/dist/{WarehouseView-BII4SEVC.js → WarehouseView-tgFFbQY7.js} +40 -40
- package/dist/api/bill.d.ts +12 -2
- package/dist/api/closing-draft.d.ts +1 -0
- package/dist/api/inventory.d.ts +8 -7
- package/dist/api/netsuite.d.ts +22 -5
- package/dist/api/purchase-order.d.ts +6 -1
- package/dist/api/stock.d.ts +1 -0
- package/dist/{app-IM1yJnE8.js → app-Ba80HxT3.js} +38448 -34777
- package/dist/app.d.ts +965 -120
- package/dist/app.js +1 -1
- package/dist/components/FmDroppableField.vue.d.ts +1 -1
- package/dist/components/FmMultiselectDialog.d.ts +23 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -1
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -1
- package/dist/{decimal-DQUpCN-B.js → decimal-DFqusYHB.js} +1 -1
- package/dist/{format-unit-display-COuIZISg.js → format-unit-display-Bsod5Ra6.js} +232 -238
- package/dist/helper/country.d.ts +1 -0
- package/dist/helper/fuzzy.d.ts +1 -1
- package/dist/helper/number.d.ts +1 -1
- package/dist/index-0ekVGPtB.js +12197 -0
- package/dist/index-ZAEVHtfa.js +84 -0
- package/dist/{stock-BJUTiXXk.js → stock-Cn6EQvTz.js} +29 -25
- package/dist/stores/feature.d.ts +11 -6
- package/dist/stores/helper/generate-backend-urls.d.ts +0 -1
- package/dist/stores/integration/index.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +22 -5
- package/dist/stores/inventory.d.ts +141 -8
- package/dist/stores/location.d.ts +0 -9
- package/dist/stores/stock.d.ts +5 -0
- package/dist/stores/warehouse.d.ts +4 -7
- package/dist/style.css +1 -1
- package/dist/{supplier-CM-qQVyI.js → supplier-P1gi71dg.js} +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Cn79xFNg.js → use-ingredient-select-dialog-BW5imbB5.js} +1 -1
- package/dist/{use-inventory-binding-dialog-zwOG19YV.js → use-inventory-binding-dialog-BYxb8nXg.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +0 -24
- package/dist/views/adjustment-template/wastage-template/table.d.ts +0 -24
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +92 -8
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +4 -1
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +552 -48
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +1 -1
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +12 -36
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +12 -36
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +3 -3
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +4 -1
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +529 -489
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +8 -4
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +382 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +5 -2
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1238 -972
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1080 -1003
- package/dist/views/receive-request/import/XilnexImportDialog.vue.d.ts +22 -0
- package/dist/views/receive-request/import/XilnexImportForm.vue.d.ts +17 -0
- package/dist/views/receive-request/import/XilnexResult.vue.d.ts +17 -0
- package/dist/views/receive-request/import/export.d.ts +14 -0
- package/dist/views/receive-request/import/props.d.ts +7 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +6 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +220 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +0 -8
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +0 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +7 -2
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +530 -530
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +530 -530
- package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +305 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -14
- package/dist/vue-i18n-CjtRsQMl.js +2365 -0
- package/package.json +7 -7
- package/dist/ApprovalView-C2tg-wsm.js +0 -138
- package/dist/BindingsTable-CCsQEFnu.js +0 -145
- package/dist/ClosingDraftView-BI8b3CJ9.js +0 -1225
- package/dist/ClosingTemplateView-miJnC-ML.js +0 -1859
- package/dist/IngredientsView-5-pSX6y_.js +0 -1718
- package/dist/PublishView-DOMQdIJ7.js +0 -192
- package/dist/ReceiveRequestView-902hWGtz.js +0 -1877
- package/dist/StockView-C4lEYLXU.js +0 -7847
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-D6sZDCEY.js +0 -1328
- package/dist/TransferTemplateView-C9UwNTnY.js +0 -1371
- package/dist/components/FmAutocompleteTextField.vue.d.ts +0 -31
- package/dist/feature-DMBVVBsQ.js +0 -1005
- package/dist/index-CIrsMt6f.js +0 -35546
- package/dist/views/dev/components/AutocompleteTextField.vue.d.ts +0 -2
- package/dist/vue-i18n-CzPFJ9JY.js +0 -2365
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as D } from "./supplier-
|
|
3
|
-
import { P as F } from "./format-unit-display-
|
|
4
|
-
import { computed as f, defineComponent as
|
|
1
|
+
import { j as T, t as I, ao as w, u as R, at as B, aE as H, aF as z, aG as U } from "./app-Ba80HxT3.js";
|
|
2
|
+
import { u as D } from "./supplier-P1gi71dg.js";
|
|
3
|
+
import { P as F } from "./format-unit-display-Bsod5Ra6.js";
|
|
4
|
+
import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as V, openBlock as S, createElementBlock as N, normalizeStyle as $, createElementVNode as O, createVNode as J, withCtx as K, createBlock as g, createCommentVNode as A, Fragment as Q, renderList as X, unref as M } from "vue";
|
|
5
5
|
function Y(t, i, a) {
|
|
6
|
-
var
|
|
7
|
-
if (!!i.measurement === !!a && ((
|
|
6
|
+
var o;
|
|
7
|
+
if (!!i.measurement === !!a && ((o = i.measurement) == null ? void 0 : o.id) === a)
|
|
8
8
|
return i;
|
|
9
9
|
if (!a)
|
|
10
10
|
return {
|
|
11
11
|
costPerUnit: i.costPerUnit
|
|
12
12
|
};
|
|
13
|
-
const
|
|
14
|
-
return
|
|
13
|
+
const s = t.measurements.find((p) => p.id === a);
|
|
14
|
+
return s ? {
|
|
15
15
|
costPerUnit: i.costPerUnit,
|
|
16
|
-
measurement:
|
|
16
|
+
measurement: s
|
|
17
17
|
} : {
|
|
18
18
|
costPerUnit: i.costPerUnit
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function oe(t, i, a, l) {
|
|
22
22
|
var P, _, n;
|
|
23
23
|
if (l != null && l.manualTotalCost)
|
|
24
24
|
return l == null ? void 0 : l.manualTotalCost;
|
|
25
25
|
const u = (n = (_ = (P = l == null ? void 0 : l.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : _.find(
|
|
26
26
|
(e) => e.skuId === t._id
|
|
27
|
-
)) == null ? void 0 : n.defaultCost,
|
|
27
|
+
)) == null ? void 0 : n.defaultCost, s = t.defaultCost ? Y(t.unit, t.defaultCost, t.trackingMeasurement) : void 0, o = u ?? s, p = o == null ? void 0 : o.costPerUnit, y = p ? o != null && o.measurement ? +T(p) / +T(o == null ? void 0 : o.measurement.conversion) : +T(p) : void 0, v = y ? a ? y * +T(a.conversion) : y : void 0, h = v ? +T(i) * v : void 0;
|
|
28
28
|
return h ? {
|
|
29
|
-
...
|
|
29
|
+
...I(h ?? 0, 2),
|
|
30
30
|
currency: w()
|
|
31
31
|
} : {
|
|
32
32
|
amount: 0,
|
|
@@ -55,20 +55,20 @@ function L(t) {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const u = D(),
|
|
60
|
-
|
|
58
|
+
function se(t, i, a = !1, l = !1) {
|
|
59
|
+
const u = D(), s = R();
|
|
60
|
+
s.watchLocation(async () => {
|
|
61
61
|
var b;
|
|
62
62
|
await u.readSuppliers();
|
|
63
63
|
const n = t();
|
|
64
64
|
if ((b = n.supplier) != null && b._id) return;
|
|
65
|
-
const e = l ? u.suppliers[0] : u.businessSuppliers[0], r = (a ?
|
|
65
|
+
const e = l ? u.suppliers[0] : u.businessSuppliers[0], r = (a ? s.locations.filter((m) => m.doc._id !== s.currentLocation.doc._id) : s.locations)[0];
|
|
66
66
|
i({
|
|
67
67
|
...n,
|
|
68
68
|
supplier: e ? k(e) : r ? L(r) : n.supplier
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
|
-
const
|
|
71
|
+
const o = f(
|
|
72
72
|
() => {
|
|
73
73
|
var n, e;
|
|
74
74
|
return typeof ((e = (n = t()) == null ? void 0 : n.supplier) == null ? void 0 : e.internal) == "string" ? F.TRANSFER : F.PURCHASE;
|
|
@@ -80,15 +80,15 @@ function oe(t, i, a = !1, l = !1) {
|
|
|
80
80
|
},
|
|
81
81
|
set(n) {
|
|
82
82
|
const e = t() ?? {};
|
|
83
|
-
if (
|
|
84
|
-
const C = (l ? u.suppliers : u.businessSuppliers).find((
|
|
83
|
+
if (o.value === F.PURCHASE) {
|
|
84
|
+
const C = (l ? u.suppliers : u.businessSuppliers).find((E) => E._id === n);
|
|
85
85
|
i({
|
|
86
86
|
...e,
|
|
87
87
|
supplier: C ? k(C) : e.supplier
|
|
88
88
|
});
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
const b = (a ?
|
|
91
|
+
const b = (a ? s.locations.filter((m) => m.doc._id !== s.currentLocation.doc._id) : s.locations).find((m) => m.doc._id === n);
|
|
92
92
|
i({
|
|
93
93
|
...e,
|
|
94
94
|
supplier: b ? L(b) : e.supplier
|
|
@@ -99,10 +99,10 @@ function oe(t, i, a = !1, l = !1) {
|
|
|
99
99
|
return l ? [...e, ...n] : e;
|
|
100
100
|
}), c = f(() => {
|
|
101
101
|
var d;
|
|
102
|
-
const n = ((d =
|
|
103
|
-
return (a ?
|
|
102
|
+
const n = ((d = s._currentLocation) == null ? void 0 : d.type) === B.warehouse;
|
|
103
|
+
return (a ? s.locations.filter((r) => r.doc._id !== s.currentLocation.doc._id) : s.locations).filter((r) => n || r.acceptRequest).map(L);
|
|
104
104
|
}), P = f(() => {
|
|
105
|
-
if (
|
|
105
|
+
if (o.value === F.PURCHASE) {
|
|
106
106
|
const e = y.value.map((r) => ({
|
|
107
107
|
label: r.name,
|
|
108
108
|
value: r._id
|
|
@@ -121,11 +121,11 @@ function oe(t, i, a = !1, l = !1) {
|
|
|
121
121
|
}), _ = f(() => {
|
|
122
122
|
var r, b;
|
|
123
123
|
const n = (b = (r = t()) == null ? void 0 : r.supplier) == null ? void 0 : b._id;
|
|
124
|
-
if (
|
|
124
|
+
if (o.value === F.PURCHASE) {
|
|
125
125
|
const m = u.suppliers.find((C) => C._id === n);
|
|
126
126
|
return m ? k(m) : null;
|
|
127
127
|
}
|
|
128
|
-
const d =
|
|
128
|
+
const d = s.locations.find((m) => m.doc._id);
|
|
129
129
|
return d ? L(d) : null;
|
|
130
130
|
});
|
|
131
131
|
return {
|
|
@@ -137,9 +137,9 @@ function oe(t, i, a = !1, l = !1) {
|
|
|
137
137
|
selectedLocation: _
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
-
const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */
|
|
140
|
+
const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
|
|
141
141
|
__name: "FmFilterableMenuOptions",
|
|
142
|
-
props: /* @__PURE__ */
|
|
142
|
+
props: /* @__PURE__ */ q({
|
|
143
143
|
modelValue: {},
|
|
144
144
|
maxHeight: {},
|
|
145
145
|
width: {},
|
|
@@ -152,19 +152,19 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ x({
|
|
|
152
152
|
}),
|
|
153
153
|
emits: ["update:search"],
|
|
154
154
|
setup(t) {
|
|
155
|
-
const i = t, a =
|
|
155
|
+
const i = t, a = x(t, "search"), l = f(
|
|
156
156
|
() => new z(i.items, ["label", "sublabel"], i.options)
|
|
157
|
-
), u = f(() => l.value.search(a.value)),
|
|
158
|
-
return console.log({ stickyRef:
|
|
157
|
+
), u = f(() => l.value.search(a.value)), s = W();
|
|
158
|
+
return console.log({ stickyRef: s }), (o, p) => {
|
|
159
159
|
const y = V("FmButton"), v = V("FmTextField"), h = V("FmMenuItem");
|
|
160
|
-
return S(),
|
|
160
|
+
return S(), N("div", {
|
|
161
161
|
class: "relative",
|
|
162
|
-
style: $({ width:
|
|
162
|
+
style: $({ width: o.width })
|
|
163
163
|
}, [
|
|
164
|
-
|
|
164
|
+
O("div", {
|
|
165
165
|
class: "sticky top-0 bg-white mb-8",
|
|
166
166
|
ref_key: "stickyRef",
|
|
167
|
-
ref:
|
|
167
|
+
ref: s
|
|
168
168
|
}, [
|
|
169
169
|
J(v, {
|
|
170
170
|
modelValue: a.value,
|
|
@@ -177,24 +177,24 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ x({
|
|
|
177
177
|
variant: "tertiary",
|
|
178
178
|
"prepend-icon": "close",
|
|
179
179
|
onClick: p[0] || (p[0] = (c) => a.value = "")
|
|
180
|
-
})) :
|
|
180
|
+
})) : A("", !0)
|
|
181
181
|
]),
|
|
182
182
|
_: 1
|
|
183
183
|
}, 8, ["modelValue"])
|
|
184
184
|
], 512),
|
|
185
|
-
|
|
186
|
-
(S(!0),
|
|
185
|
+
O("div", Z, [
|
|
186
|
+
(S(!0), N(Q, null, X(u.value, (c, P) => (S(), g(h, {
|
|
187
187
|
key: P,
|
|
188
188
|
label: c.label,
|
|
189
189
|
sublabel: c.sublabel,
|
|
190
|
-
"model-value": M(U)(
|
|
191
|
-
onClick: () =>
|
|
190
|
+
"model-value": M(U)(o.modelValue, c.value),
|
|
191
|
+
onClick: () => o.handleItemChange(M(U)(o.modelValue, c.value), c),
|
|
192
192
|
onVnodeMounted: (_) => {
|
|
193
193
|
var n, e;
|
|
194
|
-
return M(U)(
|
|
194
|
+
return M(U)(o.modelValue, c.value) && ((n = _.el) == null || n.scrollIntoView({ behavior: "instant", block: "end" }), (e = _.el) == null || e.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
195
195
|
}
|
|
196
196
|
}, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
|
|
197
|
-
u.value.length ?
|
|
197
|
+
u.value.length ? A("", !0) : (S(), g(h, {
|
|
198
198
|
key: 0,
|
|
199
199
|
disabled: "",
|
|
200
200
|
label: "No options available"
|
|
@@ -206,6 +206,6 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ x({
|
|
|
206
206
|
});
|
|
207
207
|
export {
|
|
208
208
|
ae as _,
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
oe as c,
|
|
210
|
+
se as u
|
|
211
211
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as oe, mergeModels as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as oe, mergeModels as z, useModel as se, computed as v, ref as P, watch as O, inject as ie, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as M, withCtx as g, renderSlot as T, normalizeClass as V, toDisplayString as x, withDirectives as le, vModelText as ae, createCommentVNode as q, createTextVNode as ue, createBlock as W, Fragment as re, renderList as me } from "vue";
|
|
2
|
+
import { a0 as I, I as k, Q as L, L as ce, j as h, aC as de, t as pe, K as fe, ai as ve, aA as be, az as ye } from "./app-Ba80HxT3.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
4
|
function E() {
|
|
5
5
|
return {
|
|
@@ -26,10 +26,10 @@ function G(l, d = !1) {
|
|
|
26
26
|
const s = H()(r);
|
|
27
27
|
if (s != !0)
|
|
28
28
|
return d ? s : !0;
|
|
29
|
-
const
|
|
30
|
-
return ce(+r.amountAsString).precision >
|
|
29
|
+
const F = typeof l == "number" ? l : L(l, r.modelValue.measurement);
|
|
30
|
+
return ce(+r.amountAsString).precision > F ? `Cannot exceed precision more than ${h({
|
|
31
31
|
amount: 1,
|
|
32
|
-
precision:
|
|
32
|
+
precision: F
|
|
33
33
|
})}` : !0;
|
|
34
34
|
};
|
|
35
35
|
}
|
|
@@ -39,13 +39,13 @@ function Le(l) {
|
|
|
39
39
|
return d(r.modelValue.amount);
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { class: "flex-1" },
|
|
42
|
+
const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { class: "flex-1" }, xe = { class: "flex items-center gap-4" }, Fe = { class: "flex-1 flex gap-4" }, Ae = { class: "shrink-0 grow basis-2/5" }, _e = {
|
|
43
43
|
key: 0,
|
|
44
44
|
class: "text-fm-color-typo-secondary"
|
|
45
45
|
}, Pe = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "line-clamp-1 text-ellipsis break-all"
|
|
48
|
-
}, Ie = { class: "flex items-center gap-4" }, ke = { class: "line-clamp-1 text-ellipsis break-all" },
|
|
48
|
+
}, Ie = { class: "flex items-center gap-4" }, ke = { class: "line-clamp-1 text-ellipsis break-all" }, Be = { class: "max-w-[200px] flex flex-col gap-[1px]" }, De = {
|
|
49
49
|
key: 1,
|
|
50
50
|
class: "flex flex-col gap-4 pl-8 shrink-0"
|
|
51
51
|
}, Re = {
|
|
@@ -54,9 +54,9 @@ const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { c
|
|
|
54
54
|
}, Ce = {
|
|
55
55
|
class: "flex items-center",
|
|
56
56
|
style: { "pointer-events": "none" }
|
|
57
|
-
},
|
|
57
|
+
}, je = /* @__PURE__ */ oe({
|
|
58
58
|
__name: "FmUnitInput",
|
|
59
|
-
props: /* @__PURE__ */
|
|
59
|
+
props: /* @__PURE__ */ z({
|
|
60
60
|
modelValue: {},
|
|
61
61
|
unit: {},
|
|
62
62
|
rules: {},
|
|
@@ -103,9 +103,9 @@ const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { c
|
|
|
103
103
|
modelValue: {},
|
|
104
104
|
modelModifiers: {}
|
|
105
105
|
}),
|
|
106
|
-
emits: /* @__PURE__ */
|
|
106
|
+
emits: /* @__PURE__ */ z(["update:amount", "update:measurement"], ["update:modelValue"]),
|
|
107
107
|
setup(l, { emit: d }) {
|
|
108
|
-
const t = l, r = d, s = se(l, "modelValue"),
|
|
108
|
+
const t = l, r = d, s = se(l, "modelValue"), F = k(), B = v(() => {
|
|
109
109
|
var n;
|
|
110
110
|
return L(t.unit, (n = s.value) == null ? void 0 : n.measurement);
|
|
111
111
|
}), c = P((() => {
|
|
@@ -113,14 +113,14 @@ const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { c
|
|
|
113
113
|
const e = ((o = s.value) == null ? void 0 : o.amount) ?? I.reset(), n = be(e), i = t.formatMinimumPrecision ?? n.precision, a = ye(n, i);
|
|
114
114
|
return h(a);
|
|
115
115
|
})());
|
|
116
|
-
|
|
117
|
-
const n =
|
|
116
|
+
O(c, (e) => {
|
|
117
|
+
const n = F(e), i = t.precision ?? B.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
|
|
118
118
|
n == !0 && (s.value = {
|
|
119
119
|
...s.value,
|
|
120
120
|
amount: pe(+e, o)
|
|
121
121
|
}), r("update:amount", e);
|
|
122
122
|
});
|
|
123
|
-
const
|
|
123
|
+
const Q = Symbol.for("fm:form-state"), D = ie(Q, null), A = v(() => t.disabled ?? (D == null ? void 0 : D.getDisabled()) ?? !1), Z = P(), R = P(!1), j = P(!1), J = v(() => R.value || j.value), X = v(() => {
|
|
124
124
|
var a;
|
|
125
125
|
const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +h(o.conversion) != 1).groupBy(
|
|
126
126
|
(o) => `${o.abbrev}${h(o.conversion)}`
|
|
@@ -155,7 +155,7 @@ const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { c
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
|
-
|
|
158
|
+
O(C, (e, n) => {
|
|
159
159
|
var m;
|
|
160
160
|
if (!t.convertAmountOnChangeUnit)
|
|
161
161
|
return;
|
|
@@ -180,7 +180,7 @@ const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { c
|
|
|
180
180
|
typeof t.precision == "number" ? G(t.precision) : G(t.unit)
|
|
181
181
|
] : [], ...Y.value]);
|
|
182
182
|
function $(e) {
|
|
183
|
-
const n = t.precision ??
|
|
183
|
+
const n = t.precision ?? B.value, a = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > n ? t.formatMinimumPrecision : n, o = e.toFixed(a), p = o.includes(".") ? o.replace(/0+$/, "") : o;
|
|
184
184
|
return p.endsWith(".") ? p.slice(0, p.length - 1) : p;
|
|
185
185
|
}
|
|
186
186
|
function te() {
|
|
@@ -207,11 +207,11 @@ const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { c
|
|
|
207
207
|
optional: e.labelMark === "optional"
|
|
208
208
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
209
209
|
]),
|
|
210
|
-
M(N, { focused:
|
|
210
|
+
M(N, { focused: J.value }, {
|
|
211
211
|
default: g(() => [
|
|
212
|
-
u("div",
|
|
212
|
+
u("div", xe, [
|
|
213
213
|
T(e.$slots, "prepend"),
|
|
214
|
-
u("div",
|
|
214
|
+
u("div", Fe, [
|
|
215
215
|
u("div", Ae, [
|
|
216
216
|
e.stepperOnly ? (f(), y("span", {
|
|
217
217
|
key: 0,
|
|
@@ -220,11 +220,11 @@ const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { c
|
|
|
220
220
|
"text-fm-color-typo-primary": !A.value,
|
|
221
221
|
"text-fm-color-typo-disabled": A.value
|
|
222
222
|
})
|
|
223
|
-
},
|
|
223
|
+
}, x(c.value), 3)) : le((f(), y("input", {
|
|
224
224
|
key: 1,
|
|
225
225
|
type: "text",
|
|
226
226
|
ref_key: "inputRef",
|
|
227
|
-
ref:
|
|
227
|
+
ref: Z,
|
|
228
228
|
onFocus: n[0] || (n[0] = () => R.value = !0),
|
|
229
229
|
onBlur: n[1] || (n[1] = () => R.value = !1),
|
|
230
230
|
"onUpdate:modelValue": n[2] || (n[2] = (m) => c.value = m),
|
|
@@ -237,30 +237,30 @@ const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { c
|
|
|
237
237
|
[ae, c.value]
|
|
238
238
|
])
|
|
239
239
|
]),
|
|
240
|
-
e.separator ? (f(), y("div", _e,
|
|
240
|
+
e.separator ? (f(), y("div", _e, x(e.separator), 1)) : q("", !0),
|
|
241
241
|
u("div", {
|
|
242
242
|
class: V([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
|
|
243
243
|
}, [
|
|
244
244
|
M(w, { "z-index": 51 }, {
|
|
245
245
|
content: g(() => [
|
|
246
|
-
ue(
|
|
246
|
+
ue(x(U.value), 1)
|
|
247
247
|
]),
|
|
248
248
|
default: g(() => [
|
|
249
|
-
e.disableUnit ? (f(), y("div", Pe,
|
|
249
|
+
e.disableUnit ? (f(), y("div", Pe, x(U.value), 1)) : (f(), W(p, {
|
|
250
250
|
key: 1,
|
|
251
|
-
onMenuChanged: n[3] || (n[3] = (m) =>
|
|
251
|
+
onMenuChanged: n[3] || (n[3] = (m) => j.value = m),
|
|
252
252
|
"z-index": 500,
|
|
253
253
|
placement: e.placement,
|
|
254
254
|
disabled: e.disabled
|
|
255
255
|
}, {
|
|
256
256
|
"menu-button": g(() => [
|
|
257
257
|
u("div", Ie, [
|
|
258
|
-
u("div", ke,
|
|
258
|
+
u("div", ke, x(U.value), 1),
|
|
259
259
|
M(a, { name: "keyboard_arrow_down" })
|
|
260
260
|
])
|
|
261
261
|
]),
|
|
262
262
|
default: g(() => [
|
|
263
|
-
u("div",
|
|
263
|
+
u("div", Be, [
|
|
264
264
|
(f(!0), y(re, null, me(X.value, (m) => (f(), W(o, {
|
|
265
265
|
key: m.value ?? void 0,
|
|
266
266
|
label: m.label,
|
|
@@ -275,7 +275,7 @@ const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { c
|
|
|
275
275
|
_: 1
|
|
276
276
|
})
|
|
277
277
|
], 2),
|
|
278
|
-
e.stepper ? (f(), y("div",
|
|
278
|
+
e.stepper ? (f(), y("div", De, [
|
|
279
279
|
u("div", {
|
|
280
280
|
class: "w-24 h-12 flex items-center justify-center fm-corner-radius-sm bg-fm-color-neutral-gray-100 hover:bg-fm-color-neutral-gray-200",
|
|
281
281
|
onClick: te
|
|
@@ -320,7 +320,7 @@ const Me = { class: "flex flex-col" }, he = { class: "flex flex-col" }, ge = { c
|
|
|
320
320
|
});
|
|
321
321
|
export {
|
|
322
322
|
Se as F,
|
|
323
|
-
|
|
323
|
+
je as _,
|
|
324
324
|
Ve as a,
|
|
325
325
|
Le as b,
|
|
326
326
|
H as c,
|
|
@@ -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 {
|
|
2
|
+
import { j as a, K as y } from "./app-Ba80HxT3.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,13 +1,13 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { a as J,
|
|
3
|
-
import { useDialog as le, useSnackbar as Z, useProxiedModel as
|
|
1
|
+
import { ref as F, computed as C, defineComponent as Y, resolveComponent as S, openBlock as M, createBlock as O, withCtx as R, createElementVNode as x, createVNode as g, unref as l, createElementBlock as ee, toDisplayString as j, createTextVNode as te, watch as ue, isRef as ce, normalizeClass as de, normalizeStyle as me, createSlots as pe, Teleport as fe, normalizeProps as ve, guardReactiveProps as ge } from "vue";
|
|
2
|
+
import { a as J, e as h, f as B, h as ye, D as oe, i as Q, H as be, m as _e, A as xe, J as ne, q as se, u as ke, B as he, _ as we, C as Se, E as Ie, G as ae } from "./app-Ba80HxT3.js";
|
|
3
|
+
import { useDialog as le, useSnackbar as Z, useProxiedModel as Ce, useBreakpoints as Fe } from "@feedmepos/ui-library";
|
|
4
4
|
import { useI18n as W } from "@feedmepos/mf-common";
|
|
5
5
|
import { defineStore as ie, storeToRefs as re } from "pinia";
|
|
6
6
|
import "./array-hChJVZLE.js";
|
|
7
7
|
const X = ie(
|
|
8
8
|
"ingredientGroupactions",
|
|
9
9
|
function() {
|
|
10
|
-
const c = le(), w = Z(), o = J(), { t: r } = W(), i =
|
|
10
|
+
const c = le(), w = Z(), o = J(), { t: r } = W(), i = F();
|
|
11
11
|
function p() {
|
|
12
12
|
const d = {
|
|
13
13
|
modelValue: {},
|
|
@@ -80,7 +80,7 @@ const X = ie(
|
|
|
80
80
|
), Ge = ie(
|
|
81
81
|
"ingredientGroupTable",
|
|
82
82
|
function() {
|
|
83
|
-
const c =
|
|
83
|
+
const c = F(!1), w = Z(), o = J(), r = X();
|
|
84
84
|
async function i() {
|
|
85
85
|
c.value = !0;
|
|
86
86
|
try {
|
|
@@ -107,7 +107,7 @@ const X = ie(
|
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
const v =
|
|
110
|
+
const v = C(() => [
|
|
111
111
|
{
|
|
112
112
|
accessorKey: "name",
|
|
113
113
|
header: () => "Name"
|
|
@@ -160,7 +160,7 @@ const X = ie(
|
|
|
160
160
|
},
|
|
161
161
|
emits: ["validation-success"],
|
|
162
162
|
setup(U, { expose: c, emit: w }) {
|
|
163
|
-
const o = be("modelValue"), r = w, i = J(), p = le(), { t: v } = W(), f =
|
|
163
|
+
const o = be("modelValue"), r = w, i = J(), p = le(), { t: v } = W(), f = F();
|
|
164
164
|
c({
|
|
165
165
|
validateInputs: () => {
|
|
166
166
|
var a;
|
|
@@ -175,7 +175,7 @@ const X = ie(
|
|
|
175
175
|
return (a = f.value) == null ? void 0 : a.resetInputs();
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
|
-
const y =
|
|
178
|
+
const y = C(() => i.skus.groupBy((a) => a.unit._id));
|
|
179
179
|
function G() {
|
|
180
180
|
var s;
|
|
181
181
|
const a = i.skus.filter((n) => {
|
|
@@ -276,7 +276,7 @@ const X = ie(
|
|
|
276
276
|
class: "flex flex-col gap-32"
|
|
277
277
|
}, {
|
|
278
278
|
default: R(() => {
|
|
279
|
-
var I, D, V, T,
|
|
279
|
+
var I, D, V, T, L;
|
|
280
280
|
return [
|
|
281
281
|
x("div", Ae, [
|
|
282
282
|
g(n, {
|
|
@@ -301,10 +301,10 @@ const X = ie(
|
|
|
301
301
|
onClick: s[2] || (s[2] = (k) => G())
|
|
302
302
|
}, {
|
|
303
303
|
default: R(() => {
|
|
304
|
-
var k, E, $,
|
|
304
|
+
var k, E, $, z, N, K, q, P, H;
|
|
305
305
|
return [
|
|
306
306
|
($ = (E = (k = l(o)) == null ? void 0 : k.skus) == null ? void 0 : E[0]) != null && $.name ? (M(), ee("span", Ve, [
|
|
307
|
-
x("span", Ee, "[" + j((K = (N = (
|
|
307
|
+
x("span", Ee, "[" + j((K = (N = (z = l(o)) == null ? void 0 : z.skus) == null ? void 0 : N[0]) == null ? void 0 : K.code) + "]", 1),
|
|
308
308
|
te(" " + j((H = (P = (q = l(o)) == null ? void 0 : q.skus) == null ? void 0 : P[0]) == null ? void 0 : H.name), 1)
|
|
309
309
|
])) : (M(), ee("span", Re, j("Click to select main item")))
|
|
310
310
|
];
|
|
@@ -346,7 +346,7 @@ const X = ie(
|
|
|
346
346
|
}),
|
|
347
347
|
draggable: "",
|
|
348
348
|
"hide-footer": "",
|
|
349
|
-
"page-size": ((
|
|
349
|
+
"page-size": ((L = l(o).skus) == null ? void 0 : L.length) ?? 0
|
|
350
350
|
}, null, 8, ["row-data", "page-size"])
|
|
351
351
|
])
|
|
352
352
|
];
|
|
@@ -364,7 +364,7 @@ const X = ie(
|
|
|
364
364
|
},
|
|
365
365
|
emits: ["update:show"],
|
|
366
366
|
setup(U) {
|
|
367
|
-
const c = U, w = J(), o = Z(), { t: r } = W(), i =
|
|
367
|
+
const c = U, w = J(), o = Z(), { t: r } = W(), i = Ce(c, "show"), p = F({}), v = F(`${Math.random()}`);
|
|
368
368
|
ue(
|
|
369
369
|
() => c.show,
|
|
370
370
|
(t) => {
|
|
@@ -376,7 +376,7 @@ const X = ie(
|
|
|
376
376
|
}), v.value = `${Math.random()}`);
|
|
377
377
|
}
|
|
378
378
|
);
|
|
379
|
-
const f =
|
|
379
|
+
const f = C(() => {
|
|
380
380
|
switch (c.mode) {
|
|
381
381
|
case h.READ:
|
|
382
382
|
return "";
|
|
@@ -386,7 +386,7 @@ const X = ie(
|
|
|
386
386
|
return r("inventory.ingredient.create.title");
|
|
387
387
|
}
|
|
388
388
|
return "";
|
|
389
|
-
}), y =
|
|
389
|
+
}), y = C(() => {
|
|
390
390
|
switch (c.mode) {
|
|
391
391
|
case h.READ:
|
|
392
392
|
return "";
|
|
@@ -396,7 +396,7 @@ const X = ie(
|
|
|
396
396
|
return r("common.add");
|
|
397
397
|
}
|
|
398
398
|
return "";
|
|
399
|
-
}), G =
|
|
399
|
+
}), G = F(), b = F(!1);
|
|
400
400
|
async function d() {
|
|
401
401
|
b.value = !0;
|
|
402
402
|
const t = B(p.value);
|
|
@@ -491,10 +491,10 @@ const X = ie(
|
|
|
491
491
|
}, 8, ["model-value", "header"]);
|
|
492
492
|
};
|
|
493
493
|
}
|
|
494
|
-
}),
|
|
494
|
+
}), Le = { class: "flex flex-col py-8" }, ze = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Qe = /* @__PURE__ */ Y({
|
|
495
495
|
__name: "IngredientGroupView",
|
|
496
496
|
setup(U) {
|
|
497
|
-
const c = J(), w =
|
|
497
|
+
const c = J(), w = C(() => c.skuGroups), o = ke(), { t: r } = W(), {
|
|
498
498
|
createIngredientGroup: i,
|
|
499
499
|
updateIngredientGroup: p,
|
|
500
500
|
importIngredientGroups: v,
|
|
@@ -510,7 +510,7 @@ const X = ie(
|
|
|
510
510
|
return f();
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
const a =
|
|
513
|
+
const a = F(""), s = F(!1), n = C(() => s.value || G.value), { breakpoints: t } = Fe(), e = C(() => t.value.xs || t.value.sm), u = C(() => e.value ? 10 : 20), _ = he(), m = C(() => [
|
|
514
514
|
{
|
|
515
515
|
label: r("inventory.ingredient.create.title"),
|
|
516
516
|
value: "add",
|
|
@@ -558,13 +558,13 @@ const X = ie(
|
|
|
558
558
|
onRowClick: l(p)
|
|
559
559
|
}, pe({
|
|
560
560
|
default: R((T) => {
|
|
561
|
-
var
|
|
561
|
+
var L, k, E, $, z, N, K, q, P, H;
|
|
562
562
|
return [
|
|
563
|
-
x("div",
|
|
564
|
-
x("div",
|
|
563
|
+
x("div", Le, [
|
|
564
|
+
x("div", ze, [
|
|
565
565
|
g(l(ae), {
|
|
566
|
-
render: (E = (k = (
|
|
567
|
-
props: (
|
|
566
|
+
render: (E = (k = (L = T.code) == null ? void 0 : L.column) == null ? void 0 : k.columnDef) == null ? void 0 : E.cell,
|
|
567
|
+
props: (z = ($ = T.code) == null ? void 0 : $.getContext) == null ? void 0 : z.call($)
|
|
568
568
|
}, null, 8, ["render", "props"])
|
|
569
569
|
]),
|
|
570
570
|
x("div", Ne, [
|