@feedmepos/mf-inventory-portal 0.0.23-dev.2 → 0.0.23-dev.21
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-DRE3c1lJ.js → App-CvIvF0fg.js} +59 -51
- package/dist/{ApprovalView-B4ZYcS3B.js → ApprovalView-BOn2HDVY.js} +20 -23
- package/dist/{BindingsDialog-Df1yrWHU.js → BindingsDialog-9qfADiSA.js} +7 -7
- package/dist/{BindingsPicker-BERMWh4w.js → BindingsPicker-CpV9uOqj.js} +7 -8
- package/dist/{BindingsTable-DRIapOWW.js → BindingsTable-BYScxUTj.js} +16 -20
- package/dist/ClosingDraftView-DM7-3zOd.js +1116 -0
- package/dist/{ClosingTemplateView-CbFn3Sdy.js → ClosingTemplateView-Cye5VPAM.js} +66 -76
- package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-AIKfZo3H.js} +1 -1
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CQUsooGm.js +282 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BHSGZyJL.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CFQc-CBX.js} +121 -119
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DH5IQchQ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-2r8mut0B.js} +7 -7
- package/dist/{IngredientGroupView-DoETcEvV.js → IngredientGroupView-RNokzPJa.js} +30 -36
- package/dist/IngredientsView-M7K_GAEO.js +1660 -0
- package/dist/{IntegrationView-D1HeBiGF.js → IntegrationView-D9a8d1sO.js} +18 -20
- package/dist/{InventoryBindingForm-Dmz9BQ37.js → InventoryBindingForm-B0Gx5N1p.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoyqVBOd.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DEOudgKD.js} +15 -17
- package/dist/{InventoryBindingSummary-DrpwiRGZ.js → InventoryBindingSummary-C16Nc5aN.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-yNEswIEI.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CZiypEex.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Br4_VUza.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BbYZwclN.js} +8 -8
- package/dist/{PurchaseOrderPrintPreview-cp671yWE.js → PurchaseOrderPrintPreview-DdKF8g0J.js} +13 -14
- package/dist/ReceiveRequestView-DBPRR6fz.js +4186 -0
- package/dist/{RecipeView-CD_dAWLo.js → RecipeView-CzUgVxKz.js} +58 -63
- package/dist/{StockView-DfUzFC1b.js → StockView-DCO3N1FS.js} +1338 -1446
- package/dist/{SupplierView-DB-zrNxh.js → SupplierView-CzV6DYSj.js} +2345 -783
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-00pcY0qu.js +1228 -0
- package/dist/TransferTemplateView-uL5PId9-.js +1265 -0
- package/dist/{UnitView-BlC9-WOA.js → UnitView-d-mCs-cS.js} +40 -44
- package/dist/{WarehouseView-CgEY87Lo.js → WarehouseView-B7z8m-Hv.js} +67 -73
- package/dist/api/adjustment-template.d.ts +23 -0
- package/dist/api/bill.d.ts +2 -2
- package/dist/api/closing-draft.d.ts +6 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/netsuite.d.ts +69 -0
- package/dist/app-CTCC1zfY.js +58871 -0
- package/dist/app.d.ts +56 -0
- package/dist/app.js +2 -2
- package/dist/components/FmMinMaxInputRules.d.ts +4 -1
- package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
- package/dist/components/row-action.enum.d.ts +1 -0
- package/dist/composable/defineDeepModel.d.ts +1 -1
- package/dist/{decimal-D7BCubZO.js → decimal-DhUR6QsF.js} +1 -1
- package/dist/{feature-BR-MsGYt.js → feature-DiGS5Fa4.js} +23 -9
- package/dist/format-unit-display-MRARpSlY.js +1210 -0
- package/dist/index-BSN3RnCl.js +12087 -0
- package/dist/netsuite-CIibMNer.js +251 -0
- package/dist/router/name.d.ts +2 -0
- package/dist/stock-COHpOTJk.js +110 -0
- package/dist/stores/feature.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +81 -0
- package/dist/stores/inventory.d.ts +1 -4
- package/dist/style.css +1 -1
- package/dist/{supplier-aBuwVukl.js → supplier-csNwTHYl.js} +15 -15
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-CLQ0LUmW.js → use-inventory-binding-dialog-172A48Xx.js} +10 -11
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
- package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
- package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
- package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +451 -0
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +2601 -0
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
- package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -192
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +24 -192
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -34
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +54 -54
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +54 -54
- package/dist/views/receive-request/helper/check-netsuite-subsidiary.helper.d.ts +1 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -8
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -96
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -96
- package/dist/{xlsx-BbtURTDy.js → xlsx-CH-bhcOL.js} +1 -1
- package/dist/{xlsx.util-zYS4OJFi.js → xlsx.util-4aHI7W-Z.js} +1 -1
- package/package.json +3 -3
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-7JYNssTm.js +0 -267
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js +0 -436
- package/dist/FmMultiselectDialog-Da9JMCYa.js +0 -415
- package/dist/IngredientsView-DHAhj9pV.js +0 -1613
- package/dist/ReceiveRequestView-C1WBlpho.js +0 -4082
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-2mzqFGCz.js +0 -1144
- package/dist/TransferTemplateView-CaAJrqU6.js +0 -1262
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-CAyFhmAz.js +0 -33457
- package/dist/date2-D9i5izMt.js +0 -117
- package/dist/dayjs.min-SJKP9zBL.js +0 -282
- package/dist/defineDeepModel-DS4Shctf.js +0 -13
- package/dist/format-time-from-id-CUby60uW.js +0 -15
- package/dist/format-unit-display-D25Al2JZ.js +0 -1198
- package/dist/fuzzy-BryBtMz_.js +0 -41
- package/dist/index-ByJbUSIQ.js +0 -45
- package/dist/index-CFA_VFyX.js +0 -10545
- package/dist/index-CTvgBOum.js +0 -22280
- package/dist/netsuite-D0G4B60k.js +0 -146
- package/dist/normalizeArguments-DP7Hrren.js +0 -1552
- package/dist/row-action.enum-PMKMRrZR.js +0 -50
- package/dist/rules-DxVY0b7F.js +0 -198
- package/dist/use-template-enabled-locations-2-BgTiwy_3.js +0 -86
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { defineComponent as oe, mergeModels as z, useModel as se, computed as v, ref as P, watch as
|
|
2
|
-
import {
|
|
3
|
-
import { I as k, g as j, c as ce, a as x, m as de, t as pe, b as fe, p as ve, l as be, u as ye } from "./rules-DxVY0b7F.js";
|
|
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 h, 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 { Q as I, I as k, G as L, z as ce, h as M, au as de, t as pe, y as fe, ab as ve, as as be, ar as ye } from "./app-CTCC1zfY.js";
|
|
4
3
|
import "@feedmepos/ui-library";
|
|
5
|
-
function
|
|
4
|
+
function G() {
|
|
6
5
|
return {
|
|
7
6
|
amount: I.reset()
|
|
8
7
|
};
|
|
@@ -12,32 +11,32 @@ function H() {
|
|
|
12
11
|
return k()(d.amountAsString);
|
|
13
12
|
};
|
|
14
13
|
}
|
|
15
|
-
function
|
|
16
|
-
return function(
|
|
17
|
-
return k()(
|
|
14
|
+
function Se(l) {
|
|
15
|
+
return function(t) {
|
|
16
|
+
return k()(t.amountAsString) !== !0 ? !0 : +t.amountAsString < l ? `Must be at least ${l}` : !0;
|
|
18
17
|
};
|
|
19
18
|
}
|
|
20
|
-
function
|
|
21
|
-
return function(
|
|
22
|
-
return k()(
|
|
19
|
+
function Ve(l) {
|
|
20
|
+
return function(t) {
|
|
21
|
+
return k()(t.amountAsString) !== !0 ? !0 : +t.amountAsString > l ? `Must be at most ${l}` : !0;
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
|
-
function
|
|
26
|
-
return function(
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
return d ?
|
|
30
|
-
const F = typeof
|
|
31
|
-
return ce(+
|
|
24
|
+
function E(l, d = !1) {
|
|
25
|
+
return function(r) {
|
|
26
|
+
const s = H()(r);
|
|
27
|
+
if (s != !0)
|
|
28
|
+
return d ? s : !0;
|
|
29
|
+
const F = typeof l == "number" ? l : L(l, r.modelValue.measurement);
|
|
30
|
+
return ce(+r.amountAsString).precision > F ? `Cannot exceed precision more than ${M({
|
|
32
31
|
amount: 1,
|
|
33
32
|
precision: F
|
|
34
33
|
})}` : !0;
|
|
35
34
|
};
|
|
36
35
|
}
|
|
37
|
-
function Le(
|
|
38
|
-
const d = de(
|
|
39
|
-
return function(
|
|
40
|
-
return d(
|
|
36
|
+
function Le(l) {
|
|
37
|
+
const d = de(l);
|
|
38
|
+
return function(r) {
|
|
39
|
+
return d(r.modelValue.amount);
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
42
|
const he = { class: "flex flex-col" }, Me = { 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 = {
|
|
@@ -46,16 +45,16 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
46
45
|
}, Pe = {
|
|
47
46
|
key: 0,
|
|
48
47
|
class: "line-clamp-1 text-ellipsis break-all"
|
|
49
|
-
}, 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 = {
|
|
50
49
|
key: 1,
|
|
51
50
|
class: "flex flex-col gap-4 pl-8 shrink-0"
|
|
52
|
-
},
|
|
51
|
+
}, Re = {
|
|
53
52
|
class: "flex items-center",
|
|
54
53
|
style: { "pointer-events": "none" }
|
|
55
|
-
},
|
|
54
|
+
}, Ue = {
|
|
56
55
|
class: "flex items-center",
|
|
57
56
|
style: { "pointer-events": "none" }
|
|
58
|
-
},
|
|
57
|
+
}, $e = /* @__PURE__ */ oe({
|
|
59
58
|
__name: "FmUnitInput",
|
|
60
59
|
props: /* @__PURE__ */ z({
|
|
61
60
|
modelValue: {},
|
|
@@ -105,112 +104,115 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
105
104
|
modelModifiers: {}
|
|
106
105
|
}),
|
|
107
106
|
emits: /* @__PURE__ */ z(["update:amount", "update:measurement"], ["update:modelValue"]),
|
|
108
|
-
setup(
|
|
109
|
-
const
|
|
110
|
-
var
|
|
111
|
-
return
|
|
107
|
+
setup(l, { emit: d }) {
|
|
108
|
+
const t = l, r = d, s = se(l, "modelValue"), F = k(), B = v(() => {
|
|
109
|
+
var n;
|
|
110
|
+
return L(t.unit, (n = s.value) == null ? void 0 : n.measurement);
|
|
112
111
|
}), c = P((() => {
|
|
113
|
-
var
|
|
114
|
-
const e = ((
|
|
115
|
-
return
|
|
112
|
+
var o;
|
|
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
|
+
return M(a);
|
|
116
115
|
})());
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
...
|
|
121
|
-
amount: pe(+e,
|
|
122
|
-
}),
|
|
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
|
+
n == !0 && (s.value = {
|
|
119
|
+
...s.value,
|
|
120
|
+
amount: pe(+e, o)
|
|
121
|
+
}), r("update:amount", e);
|
|
123
122
|
});
|
|
124
|
-
const
|
|
125
|
-
var
|
|
123
|
+
const Z = Symbol.for("fm:form-state"), D = ie(Z, null), A = v(() => t.disabled ?? (D == null ? void 0 : D.getDisabled()) ?? !1), J = P(), R = P(!1), $ = P(!1), K = v(() => R.value || $.value), X = v(() => {
|
|
124
|
+
var a;
|
|
125
|
+
const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +M(o.conversion) != 1).groupBy(
|
|
126
|
+
(o) => `${o.abbrev}${M(o.conversion)}`
|
|
127
|
+
).values()].map((o) => o[0]).flat();
|
|
126
128
|
return [
|
|
127
129
|
{
|
|
128
|
-
label: (
|
|
130
|
+
label: (a = t.unit) == null ? void 0 : a.abbrev,
|
|
129
131
|
value: null
|
|
130
132
|
},
|
|
131
|
-
...
|
|
132
|
-
label:
|
|
133
|
-
value:
|
|
133
|
+
...i.map((o) => ({
|
|
134
|
+
label: o.abbrev,
|
|
135
|
+
value: o.id
|
|
134
136
|
}))
|
|
135
137
|
];
|
|
136
|
-
}),
|
|
138
|
+
}), U = v({
|
|
137
139
|
get() {
|
|
138
|
-
var e,
|
|
139
|
-
return ((
|
|
140
|
+
var e, n;
|
|
141
|
+
return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.id) ?? null;
|
|
140
142
|
},
|
|
141
143
|
set(e) {
|
|
142
144
|
if (e == null)
|
|
143
|
-
|
|
144
|
-
...
|
|
145
|
+
s.value = {
|
|
146
|
+
...s.value ?? G(),
|
|
145
147
|
measurement: null
|
|
146
|
-
},
|
|
148
|
+
}, r("update:measurement", null);
|
|
147
149
|
else {
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
...
|
|
151
|
-
measurement:
|
|
152
|
-
},
|
|
150
|
+
const n = t.unit.measurements.find((i) => i.id === e) ?? null;
|
|
151
|
+
s.value = {
|
|
152
|
+
...s.value ?? G(),
|
|
153
|
+
measurement: n
|
|
154
|
+
}, r("update:measurement", n);
|
|
153
155
|
}
|
|
154
156
|
}
|
|
155
157
|
});
|
|
156
|
-
|
|
158
|
+
O(U, (e, n) => {
|
|
157
159
|
var m;
|
|
158
|
-
if (!
|
|
160
|
+
if (!t.convertAmountOnChangeUnit)
|
|
159
161
|
return;
|
|
160
|
-
const
|
|
162
|
+
const i = ((m = s.value) == null ? void 0 : m.amount) ?? I.reset(), a = t.unit.measurements.find((_) => _.id === n) ?? null, o = t.unit.measurements.find((_) => _.id === e) ?? null, p = a ? fe(i, a.conversion) : i, w = o ? ve(p, o.conversion) : p, N = L(t.unit, o), S = I.convertPrecision({
|
|
161
163
|
value: w,
|
|
162
164
|
precision: N
|
|
163
165
|
});
|
|
164
|
-
c.value =
|
|
166
|
+
c.value = M(S);
|
|
165
167
|
});
|
|
166
|
-
const
|
|
167
|
-
var e,
|
|
168
|
-
return ((
|
|
168
|
+
const C = v(() => {
|
|
169
|
+
var e, n;
|
|
170
|
+
return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.abbrev) ?? t.unit.abbrev;
|
|
169
171
|
}), Y = v(
|
|
170
172
|
() => {
|
|
171
173
|
var e;
|
|
172
|
-
return ((e =
|
|
173
|
-
(
|
|
174
|
+
return ((e = t.rules) == null ? void 0 : e.map(
|
|
175
|
+
(n) => (i) => typeof n == "function" ? n(i) : n
|
|
174
176
|
)) ?? [];
|
|
175
177
|
}
|
|
176
|
-
), ee = v(() => [...
|
|
178
|
+
), ee = v(() => [...t.applyDefaultRules ? [
|
|
177
179
|
H(),
|
|
178
|
-
typeof
|
|
180
|
+
typeof t.precision == "number" ? E(t.precision) : E(t.unit)
|
|
179
181
|
] : [], ...Y.value]);
|
|
180
|
-
function
|
|
181
|
-
const
|
|
182
|
+
function j(e) {
|
|
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;
|
|
182
184
|
return p.endsWith(".") ? p.slice(0, p.length - 1) : p;
|
|
183
185
|
}
|
|
184
186
|
function te() {
|
|
185
|
-
if (!
|
|
187
|
+
if (!t.stepper)
|
|
186
188
|
return;
|
|
187
|
-
const e = +c.value + +
|
|
188
|
-
c.value =
|
|
189
|
+
const e = +c.value + +M(t.stepper);
|
|
190
|
+
c.value = j(e);
|
|
189
191
|
}
|
|
190
192
|
function ne() {
|
|
191
|
-
if (!
|
|
193
|
+
if (!t.stepper)
|
|
192
194
|
return;
|
|
193
|
-
const e = +c.value - +
|
|
194
|
-
c.value =
|
|
195
|
+
const e = +c.value - +M(t.stepper);
|
|
196
|
+
c.value = j(e);
|
|
195
197
|
}
|
|
196
|
-
return (e,
|
|
197
|
-
const
|
|
198
|
+
return (e, n) => {
|
|
199
|
+
const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), p = b("FmMenu"), w = b("FmTooltip"), N = b("FmField"), S = b("FmFormGroup");
|
|
198
200
|
return f(), y("div", he, [
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
h(
|
|
201
|
+
u("div", Me, [
|
|
202
|
+
u("div", ge, [
|
|
203
|
+
h(i, {
|
|
202
204
|
label: e.label,
|
|
203
205
|
disabled: e.disabled,
|
|
204
206
|
required: e.labelMark === "required",
|
|
205
207
|
optional: e.labelMark === "optional"
|
|
206
208
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
207
209
|
]),
|
|
208
|
-
h(N, { focused:
|
|
209
|
-
default:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
h(N, { focused: K.value }, {
|
|
211
|
+
default: g(() => [
|
|
212
|
+
u("div", xe, [
|
|
213
|
+
T(e.$slots, "prepend"),
|
|
214
|
+
u("div", Fe, [
|
|
215
|
+
u("div", Ae, [
|
|
214
216
|
e.stepperOnly ? (f(), y("span", {
|
|
215
217
|
key: 0,
|
|
216
218
|
class: V({
|
|
@@ -218,14 +220,14 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
218
220
|
"text-fm-color-typo-primary": !A.value,
|
|
219
221
|
"text-fm-color-typo-disabled": A.value
|
|
220
222
|
})
|
|
221
|
-
},
|
|
223
|
+
}, x(c.value), 3)) : le((f(), y("input", {
|
|
222
224
|
key: 1,
|
|
223
225
|
type: "text",
|
|
224
226
|
ref_key: "inputRef",
|
|
225
|
-
ref:
|
|
226
|
-
onFocus:
|
|
227
|
-
onBlur:
|
|
228
|
-
"onUpdate:modelValue":
|
|
227
|
+
ref: J,
|
|
228
|
+
onFocus: n[0] || (n[0] = () => R.value = !0),
|
|
229
|
+
onBlur: n[1] || (n[1] = () => R.value = !1),
|
|
230
|
+
"onUpdate:modelValue": n[2] || (n[2] = (m) => c.value = m),
|
|
229
231
|
class: V({
|
|
230
232
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
231
233
|
"text-fm-color-typo-primary": !A.value,
|
|
@@ -235,35 +237,35 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
235
237
|
[ae, c.value]
|
|
236
238
|
])
|
|
237
239
|
]),
|
|
238
|
-
e.separator ? (f(), y("div", _e,
|
|
239
|
-
|
|
240
|
+
e.separator ? (f(), y("div", _e, x(e.separator), 1)) : q("", !0),
|
|
241
|
+
u("div", {
|
|
240
242
|
class: V([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
|
|
241
243
|
}, [
|
|
242
244
|
h(w, { "z-index": 51 }, {
|
|
243
|
-
content:
|
|
244
|
-
ue(
|
|
245
|
+
content: g(() => [
|
|
246
|
+
ue(x(C.value), 1)
|
|
245
247
|
]),
|
|
246
|
-
default:
|
|
247
|
-
e.disableUnit ? (f(), y("div", Pe,
|
|
248
|
+
default: g(() => [
|
|
249
|
+
e.disableUnit ? (f(), y("div", Pe, x(C.value), 1)) : (f(), W(p, {
|
|
248
250
|
key: 1,
|
|
249
|
-
onMenuChanged:
|
|
251
|
+
onMenuChanged: n[3] || (n[3] = (m) => $.value = m),
|
|
250
252
|
"z-index": 500,
|
|
251
253
|
placement: e.placement,
|
|
252
254
|
disabled: e.disabled
|
|
253
255
|
}, {
|
|
254
|
-
"menu-button":
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
h(
|
|
256
|
+
"menu-button": g(() => [
|
|
257
|
+
u("div", Ie, [
|
|
258
|
+
u("div", ke, x(C.value), 1),
|
|
259
|
+
h(a, { name: "keyboard_arrow_down" })
|
|
258
260
|
])
|
|
259
261
|
]),
|
|
260
|
-
default:
|
|
261
|
-
|
|
262
|
-
(f(!0), y(re, null, me(X.value, (m) => (f(),
|
|
262
|
+
default: g(() => [
|
|
263
|
+
u("div", Be, [
|
|
264
|
+
(f(!0), y(re, null, me(X.value, (m) => (f(), W(o, {
|
|
263
265
|
key: m.value ?? void 0,
|
|
264
266
|
label: m.label,
|
|
265
|
-
"model-value": m.value ==
|
|
266
|
-
onClick: (_) =>
|
|
267
|
+
"model-value": m.value == U.value,
|
|
268
|
+
onClick: (_) => U.value = m.value
|
|
267
269
|
}, null, 8, ["label", "model-value", "onClick"]))), 128))
|
|
268
270
|
])
|
|
269
271
|
]),
|
|
@@ -274,31 +276,31 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
274
276
|
})
|
|
275
277
|
], 2),
|
|
276
278
|
e.stepper ? (f(), y("div", De, [
|
|
277
|
-
|
|
279
|
+
u("div", {
|
|
278
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",
|
|
279
281
|
onClick: te
|
|
280
282
|
}, [
|
|
281
|
-
|
|
282
|
-
h(
|
|
283
|
+
u("div", Re, [
|
|
284
|
+
h(a, {
|
|
283
285
|
name: "expand_less",
|
|
284
286
|
size: "md"
|
|
285
287
|
})
|
|
286
288
|
])
|
|
287
289
|
]),
|
|
288
|
-
|
|
290
|
+
u("div", {
|
|
289
291
|
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",
|
|
290
292
|
onClick: ne
|
|
291
293
|
}, [
|
|
292
|
-
|
|
293
|
-
h(
|
|
294
|
+
u("div", Ue, [
|
|
295
|
+
h(a, {
|
|
294
296
|
name: "expand_more",
|
|
295
297
|
size: "md"
|
|
296
298
|
})
|
|
297
299
|
])
|
|
298
300
|
])
|
|
299
|
-
])) :
|
|
301
|
+
])) : q("", !0)
|
|
300
302
|
]),
|
|
301
|
-
|
|
303
|
+
T(e.$slots, "append")
|
|
302
304
|
])
|
|
303
305
|
]),
|
|
304
306
|
_: 3
|
|
@@ -306,7 +308,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
306
308
|
]),
|
|
307
309
|
h(S, {
|
|
308
310
|
class: "flex-1",
|
|
309
|
-
"model-value": { modelValue:
|
|
311
|
+
"model-value": { modelValue: s.value, amountAsString: String(c.value) },
|
|
310
312
|
info: e.labelInfo,
|
|
311
313
|
rules: ee.value,
|
|
312
314
|
"helper-text": e.helperText,
|
|
@@ -317,10 +319,10 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
317
319
|
}
|
|
318
320
|
});
|
|
319
321
|
export {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
322
|
+
Se as F,
|
|
323
|
+
$e as _,
|
|
324
|
+
Ve as a,
|
|
323
325
|
Le as b,
|
|
324
326
|
H as c,
|
|
325
|
-
|
|
327
|
+
E as d
|
|
326
328
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
2
|
-
import { a,
|
|
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 y } from "vue";
|
|
2
|
+
import { h as a, y as x } from "./app-CTCC1zfY.js";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
|
-
const v = { class: "flex flex-col" },
|
|
4
|
+
const v = { class: "flex flex-col" }, h = { 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" }, g = { class: "flex-1 py-8 px-16" }, b = {
|
|
5
5
|
class: "flex-0 py-8 px-16",
|
|
6
6
|
style: { "flex-basis": "120px" }
|
|
7
7
|
}, k = { class: "flex-1 py-8 px-16" }, B = {
|
|
@@ -23,7 +23,7 @@ const v = { class: "flex flex-col" }, b = { class: "flex flex-row fm-typo-en-bod
|
|
|
23
23
|
function c(e, i) {
|
|
24
24
|
var t;
|
|
25
25
|
if (e.measurement) {
|
|
26
|
-
const u =
|
|
26
|
+
const u = x(e.amount, e.measurement.conversion);
|
|
27
27
|
return `${a(u, !1)} ${(t = e.measurement) == null ? void 0 : t.abbrev}`;
|
|
28
28
|
}
|
|
29
29
|
return `${a(e.amount, !1)} ${i.abbrev}`;
|
|
@@ -32,11 +32,11 @@ const v = { class: "flex flex-col" }, b = { class: "flex flex-row fm-typo-en-bod
|
|
|
32
32
|
return e.unit !== void 0;
|
|
33
33
|
}
|
|
34
34
|
return (e, i) => (s(), n("div", v, [
|
|
35
|
-
r("div",
|
|
35
|
+
r("div", h, [
|
|
36
36
|
r("div", g, o(e.name), 1),
|
|
37
|
-
r("div",
|
|
37
|
+
r("div", b, o(l(m)("inventory.ingredient.bindedItems.amount")), 1)
|
|
38
38
|
]),
|
|
39
|
-
(s(!0), n(d, null,
|
|
39
|
+
(s(!0), n(d, null, y(e.bindings, (t) => (s(), n("div", {
|
|
40
40
|
key: t.id,
|
|
41
41
|
class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
|
|
42
42
|
}, [
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { ref as C, computed as
|
|
2
|
-
import { a as J, c as B,
|
|
3
|
-
import { useDialog as le, useSnackbar as Z, useProxiedModel as
|
|
4
|
-
import { F as h, D as ne, R as Q } from "./row-action.enum-PMKMRrZR.js";
|
|
1
|
+
import { ref as C, computed as F, defineComponent as Y, resolveComponent as S, openBlock as M, createBlock as O, withCtx as R, createElementVNode as x, createVNode as g, unref as l, createElementBlock as ee, toDisplayString as H, 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, c as h, d as B, e as ye, D as oe, f as Q, w as be, k as _e, A as xe, x as ne, m as se, u as ke, p as he, q as we, r as Se, s as Ie, v as ae } from "./app-CTCC1zfY.js";
|
|
3
|
+
import { useDialog as le, useSnackbar as Z, useProxiedModel as Fe, useBreakpoints as Ce } from "@feedmepos/ui-library";
|
|
5
4
|
import { useI18n as W } from "@feedmepos/mf-common";
|
|
6
|
-
import { defineStore as ie, storeToRefs as
|
|
7
|
-
import { c as xe, _ as ke, F as ae } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
8
|
-
import { u as he, _ as we, a as Se } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js";
|
|
5
|
+
import { defineStore as ie, storeToRefs as re } from "pinia";
|
|
9
6
|
import "./array-hChJVZLE.js";
|
|
10
|
-
import { d as Fe } from "./defineDeepModel-DS4Shctf.js";
|
|
11
|
-
import { R as Ie, A as Ce } from "./rules-DxVY0b7F.js";
|
|
12
|
-
import { F as re } from "./FmMultiselectDialog-Da9JMCYa.js";
|
|
13
7
|
const X = ie(
|
|
14
8
|
"ingredientGroupactions",
|
|
15
9
|
function() {
|
|
@@ -113,7 +107,7 @@ const X = ie(
|
|
|
113
107
|
);
|
|
114
108
|
}
|
|
115
109
|
}
|
|
116
|
-
const v =
|
|
110
|
+
const v = F(() => [
|
|
117
111
|
{
|
|
118
112
|
accessorKey: "name",
|
|
119
113
|
header: () => "Name"
|
|
@@ -130,8 +124,8 @@ const X = ie(
|
|
|
130
124
|
id: "action",
|
|
131
125
|
header: "",
|
|
132
126
|
cell(f) {
|
|
133
|
-
return
|
|
134
|
-
[
|
|
127
|
+
return ye(
|
|
128
|
+
[oe[Q.Edit], oe[Q.Delete]],
|
|
135
129
|
(y) => {
|
|
136
130
|
p(y, f.row.original);
|
|
137
131
|
}
|
|
@@ -166,7 +160,7 @@ const X = ie(
|
|
|
166
160
|
},
|
|
167
161
|
emits: ["validation-success"],
|
|
168
162
|
setup(U, { expose: c, emit: w }) {
|
|
169
|
-
const o =
|
|
163
|
+
const o = be("modelValue"), r = w, i = J(), p = le(), { t: v } = W(), f = C();
|
|
170
164
|
c({
|
|
171
165
|
validateInputs: () => {
|
|
172
166
|
var a;
|
|
@@ -181,7 +175,7 @@ const X = ie(
|
|
|
181
175
|
return (a = f.value) == null ? void 0 : a.resetInputs();
|
|
182
176
|
}
|
|
183
177
|
});
|
|
184
|
-
const y =
|
|
178
|
+
const y = F(() => i.skus.groupBy((a) => a.unit._id));
|
|
185
179
|
function A() {
|
|
186
180
|
var s;
|
|
187
181
|
const a = i.skus.filter((n) => {
|
|
@@ -198,7 +192,7 @@ const X = ie(
|
|
|
198
192
|
p.open({
|
|
199
193
|
title: v("inventory.closing.form.items.selectItem"),
|
|
200
194
|
closeButton: !0,
|
|
201
|
-
contentComponent:
|
|
195
|
+
contentComponent: ne,
|
|
202
196
|
contentComponentProps: {
|
|
203
197
|
modelValue: [(s = o.skus) == null ? void 0 : s[0]],
|
|
204
198
|
items: a,
|
|
@@ -237,7 +231,7 @@ const X = ie(
|
|
|
237
231
|
p.open({
|
|
238
232
|
title: v("inventory.closing.form.items.selectItem"),
|
|
239
233
|
closeButton: !0,
|
|
240
|
-
contentComponent:
|
|
234
|
+
contentComponent: ne,
|
|
241
235
|
contentComponentProps: {
|
|
242
236
|
modelValue: s,
|
|
243
237
|
items: a,
|
|
@@ -276,19 +270,19 @@ const X = ie(
|
|
|
276
270
|
return (a, s) => {
|
|
277
271
|
const n = S("FmTextField"), t = S("FmLabel"), e = S("FmField"), u = S("FmFormGroup"), _ = S("FmButton"), m = S("FmTable"), D = S("FmForm");
|
|
278
272
|
return M(), O(D, {
|
|
279
|
-
onValidationSuccess: s[5] || (s[5] = (
|
|
273
|
+
onValidationSuccess: s[5] || (s[5] = (I) => r("validation-success")),
|
|
280
274
|
ref_key: "formRef",
|
|
281
275
|
ref: f,
|
|
282
276
|
class: "flex flex-col gap-32"
|
|
283
277
|
}, {
|
|
284
278
|
default: R(() => {
|
|
285
|
-
var
|
|
279
|
+
var I, G, V, T, L;
|
|
286
280
|
return [
|
|
287
281
|
x("div", De, [
|
|
288
282
|
g(n, {
|
|
289
283
|
label: "Name",
|
|
290
284
|
"label-mark": "required",
|
|
291
|
-
rules: [l(
|
|
285
|
+
rules: [l(_e)()],
|
|
292
286
|
modelValue: l(o).name,
|
|
293
287
|
"onUpdate:modelValue": s[0] || (s[0] = (k) => l(o).name = k)
|
|
294
288
|
}, null, 8, ["rules", "modelValue"]),
|
|
@@ -320,8 +314,8 @@ const X = ie(
|
|
|
320
314
|
x("div", Te, [
|
|
321
315
|
s[6] || (s[6] = te(H("Select a main item to filter out substitutable items with same unit.") + " ")),
|
|
322
316
|
g(u, {
|
|
323
|
-
"model-value": ((
|
|
324
|
-
rules: [l(
|
|
317
|
+
"model-value": ((I = l(o)) == null ? void 0 : I.skus) ?? [],
|
|
318
|
+
rules: [l(xe)(1, "Required")]
|
|
325
319
|
}, null, 8, ["model-value", "rules"])
|
|
326
320
|
])
|
|
327
321
|
])
|
|
@@ -370,7 +364,7 @@ const X = ie(
|
|
|
370
364
|
},
|
|
371
365
|
emits: ["update:show"],
|
|
372
366
|
setup(U) {
|
|
373
|
-
const c = U, w = J(), o = Z(), { t: r } = W(), i =
|
|
367
|
+
const c = U, w = J(), o = Z(), { t: r } = W(), i = Fe(c, "show"), p = C({}), v = C(`${Math.random()}`);
|
|
374
368
|
ue(
|
|
375
369
|
() => c.show,
|
|
376
370
|
(t) => {
|
|
@@ -382,7 +376,7 @@ const X = ie(
|
|
|
382
376
|
}), v.value = `${Math.random()}`);
|
|
383
377
|
}
|
|
384
378
|
);
|
|
385
|
-
const f =
|
|
379
|
+
const f = F(() => {
|
|
386
380
|
switch (c.mode) {
|
|
387
381
|
case h.READ:
|
|
388
382
|
return "";
|
|
@@ -392,7 +386,7 @@ const X = ie(
|
|
|
392
386
|
return r("inventory.ingredient.create.title");
|
|
393
387
|
}
|
|
394
388
|
return "";
|
|
395
|
-
}), y =
|
|
389
|
+
}), y = F(() => {
|
|
396
390
|
switch (c.mode) {
|
|
397
391
|
case h.READ:
|
|
398
392
|
return "";
|
|
@@ -413,7 +407,7 @@ const X = ie(
|
|
|
413
407
|
type: "success"
|
|
414
408
|
});
|
|
415
409
|
} catch (e) {
|
|
416
|
-
e instanceof
|
|
410
|
+
e instanceof se || o.open({
|
|
417
411
|
title: r("inventory.ingredient.create.error.title"),
|
|
418
412
|
message: r("inventory.ingredient.create.error.message"),
|
|
419
413
|
type: "error"
|
|
@@ -432,7 +426,7 @@ const X = ie(
|
|
|
432
426
|
type: "success"
|
|
433
427
|
});
|
|
434
428
|
} catch (e) {
|
|
435
|
-
e instanceof
|
|
429
|
+
e instanceof se || o.open({
|
|
436
430
|
title: r("inventory.ingredient.update.error.title"),
|
|
437
431
|
message: r("inventory.ingredient.update.error.message"),
|
|
438
432
|
type: "error"
|
|
@@ -497,15 +491,15 @@ const X = ie(
|
|
|
497
491
|
}, 8, ["model-value", "header"]);
|
|
498
492
|
};
|
|
499
493
|
}
|
|
500
|
-
}), 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" },
|
|
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({
|
|
501
495
|
__name: "IngredientGroupView",
|
|
502
496
|
setup(U) {
|
|
503
|
-
const c = J(), w =
|
|
497
|
+
const c = J(), w = F(() => c.skuGroups), o = ke(), { t: r } = W(), {
|
|
504
498
|
createIngredientGroup: i,
|
|
505
499
|
updateIngredientGroup: p,
|
|
506
500
|
importIngredientGroups: v,
|
|
507
501
|
exportIngredientGroups: f
|
|
508
|
-
} = X(), { columnDefs: y, loading: A } =
|
|
502
|
+
} = X(), { columnDefs: y, loading: A } = re(Ae()), { ingredientGroupDialogProps: b } = re(X());
|
|
509
503
|
function d(D) {
|
|
510
504
|
switch (D) {
|
|
511
505
|
case "add":
|
|
@@ -516,7 +510,7 @@ const X = ie(
|
|
|
516
510
|
return f();
|
|
517
511
|
}
|
|
518
512
|
}
|
|
519
|
-
const a = C(""), s = C(!1), n =
|
|
513
|
+
const a = C(""), s = C(!1), n = F(() => s.value || A.value), { breakpoints: t } = Ce(), e = F(() => t.value.xs || t.value.sm), u = F(() => e.value ? 10 : 20), _ = he(), m = F(() => [
|
|
520
514
|
{
|
|
521
515
|
label: r("inventory.ingredient.create.title"),
|
|
522
516
|
value: "add",
|
|
@@ -526,7 +520,7 @@ const X = ie(
|
|
|
526
520
|
{ label: r("common.import"), value: "import" },
|
|
527
521
|
{ label: r("common.export"), value: "export" }
|
|
528
522
|
]);
|
|
529
|
-
return (D,
|
|
523
|
+
return (D, I) => {
|
|
530
524
|
const G = S("FmTable");
|
|
531
525
|
return M(), O(we, {
|
|
532
526
|
title: l(r)("inventory.ingredientGroup.title"),
|
|
@@ -546,7 +540,7 @@ const X = ie(
|
|
|
546
540
|
g(Se, {
|
|
547
541
|
searchable: "",
|
|
548
542
|
search: a.value,
|
|
549
|
-
"onUpdate:search":
|
|
543
|
+
"onUpdate:search": I[0] || (I[0] = (V) => a.value = V)
|
|
550
544
|
}, null, 8, ["search"]),
|
|
551
545
|
g(G, {
|
|
552
546
|
style: me(l(_).tableHeight),
|
|
@@ -555,11 +549,11 @@ const X = ie(
|
|
|
555
549
|
"search-value": a.value,
|
|
556
550
|
loading: !l(o)._currentLocation || n.value,
|
|
557
551
|
"loading-text": "Loading",
|
|
558
|
-
onRowClick:
|
|
552
|
+
onRowClick: I[1] || (I[1] = (V) => l(p)(V.original)),
|
|
559
553
|
"page-size": u.value
|
|
560
554
|
}, {
|
|
561
555
|
"list-row": R((V) => [
|
|
562
|
-
g(
|
|
556
|
+
g(Ie, {
|
|
563
557
|
row: V,
|
|
564
558
|
onRowClick: l(p)
|
|
565
559
|
}, pe({
|
|
@@ -606,5 +600,5 @@ const X = ie(
|
|
|
606
600
|
}
|
|
607
601
|
});
|
|
608
602
|
export {
|
|
609
|
-
|
|
603
|
+
Qe as default
|
|
610
604
|
};
|