@feedmepos/mf-inventory-portal 0.0.23-dev.24 → 0.0.23-dev.26
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-dQy0_X6Q.js → App-C0hXAs5E.js} +49 -45
- package/dist/{ApprovalView-CxwAuXae.js → ApprovalView-Db5Aq3gK.js} +15 -15
- package/dist/{BindingsDialog-BX8J03Uc.js → BindingsDialog-dKNKrWKv.js} +9 -9
- package/dist/{BindingsPicker-CAW_3sSv.js → BindingsPicker-dN1bNnc0.js} +5 -5
- package/dist/{BindingsTable-7UmxSmdW.js → BindingsTable-BA461fcU.js} +8 -8
- package/dist/{ClosingDraftView-DukJAMlK.js → ClosingDraftView-aRHVKTA6.js} +68 -69
- package/dist/{ClosingTemplateView-Dm7_gMTo.js → ClosingTemplateView-BYnC4Whw.js} +58 -61
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DN3N20Nb.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BdjeCWX1.js} +13 -13
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BrPRiS_u.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CP2euPwM.js} +46 -46
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bln1lReW.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C4aYGbW2.js} +7 -7
- package/dist/{IngredientGroupView-BKIJHeh9.js → IngredientGroupView-vdG6npct.js} +40 -40
- package/dist/{IngredientsView-Blnohl3I.js → IngredientsView-DWRAoLHx.js} +207 -210
- package/dist/{IntegrationView-Dna4bUA7.js → IntegrationView-Dp_A-Swf.js} +89 -90
- package/dist/{InventoryBindingForm-D6HSF8Wn.js → InventoryBindingForm-D_wSUUKv.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnWvwNjJ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-2Mnqz6HN.js} +27 -27
- package/dist/{InventoryBindingSummary-CNNCv8NX.js → InventoryBindingSummary-oyRdM7Pd.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CrMkMTAt.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CSabNdfV.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Cw3E2NKS.js → PremiumBadge.vue_vue_type_script_setup_true_lang-tu1Al7wM.js} +17 -18
- package/dist/{PurchaseOrderPrintPreview-PEN03dZK.js → PurchaseOrderPrintPreview-B4m8t90I.js} +1 -1
- package/dist/{ReceiveRequestView-rTUhjMLY.js → ReceiveRequestView-DIJb_dU2.js} +26 -27
- package/dist/{RecipeView-V1hx1AUG.js → RecipeView-Ch5KMGLJ.js} +47 -48
- package/dist/{StockView-B5nDn8nO.js → StockView-BVuzsMG7.js} +7 -7
- package/dist/{SupplierView-DyyRxm6k.js → SupplierView-DEC2LmtN.js} +203 -206
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D6oZOwHL.js → TransferDetails.vue_vue_type_script_setup_true_lang-9UZWws3P.js} +61 -62
- package/dist/{TransferTemplateView-OTR9Re51.js → TransferTemplateView-DAMQ_Whn.js} +144 -145
- package/dist/{UnitView-DGhm1JXD.js → UnitView-CFwHRgQ-.js} +3 -3
- package/dist/{WarehouseView-DMAvFisd.js → WarehouseView-HE71bVOX.js} +52 -52
- package/dist/app-CRSuR04o.js +84133 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-DuJEFEYp.js → decimal-B5DqWjel.js} +1 -1
- package/dist/{feature-BRqas45f.js → feature-DxNphYNO.js} +1 -1
- package/dist/{format-unit-display-G6VtlQe7.js → format-unit-display-D40MKAIU.js} +50 -53
- package/dist/{index-D3f51k-I.js → index-BWDsx2Ik.js} +1 -1
- package/dist/{stock-DZkj2LE0.js → stock-BAPZYfON.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-Cm5Cw3u7.js → supplier-Bp7xaTFX.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-DCt0wUiw.js → use-inventory-binding-dialog-cxY29PPx.js} +1 -1
- package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
- package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
- package/dist/views/adjustment-template/import/export.d.ts +60 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +1 -1
- package/package.json +1 -1
- package/dist/FmDroppableField-BqZcDO2v.js +0 -154
- package/dist/app-DQRbwx-z.js +0 -58903
- package/dist/netsuite-D4b5JceM.js +0 -251
- package/dist/xlsx-9Gc42bxv.js +0 -24004
- package/dist/xlsx.util-CEvUL8mk.js +0 -78
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as oe, mergeModels as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as oe, mergeModels as $, useModel as se, computed as v, ref as P, watch as z, 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 { Z as I, I as k, O as L, K as ce, i as h, aE as de, t as pe, J as fe, aj as ve, aC as be, aB as ye } from "./app-CRSuR04o.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
|
-
function
|
|
4
|
+
function E() {
|
|
5
5
|
return {
|
|
6
6
|
amount: I.reset()
|
|
7
7
|
};
|
|
@@ -21,13 +21,13 @@ function Ve(l) {
|
|
|
21
21
|
return k()(t.amountAsString) !== !0 ? !0 : +t.amountAsString > l ? `Must be at most ${l}` : !0;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function G(l, d = !1) {
|
|
25
25
|
return function(r) {
|
|
26
26
|
const s = H()(r);
|
|
27
27
|
if (s != !0)
|
|
28
28
|
return d ? s : !0;
|
|
29
29
|
const F = typeof l == "number" ? l : L(l, r.modelValue.measurement);
|
|
30
|
-
return ce(+r.amountAsString).precision > F ? `Cannot exceed precision more than ${
|
|
30
|
+
return ce(+r.amountAsString).precision > F ? `Cannot exceed precision more than ${h({
|
|
31
31
|
amount: 1,
|
|
32
32
|
precision: F
|
|
33
33
|
})}` : !0;
|
|
@@ -39,7 +39,7 @@ function Le(l) {
|
|
|
39
39
|
return d(r.modelValue.amount);
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
const
|
|
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 = {
|
|
@@ -51,12 +51,12 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
51
51
|
}, Re = {
|
|
52
52
|
class: "flex items-center",
|
|
53
53
|
style: { "pointer-events": "none" }
|
|
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__ */ $({
|
|
60
60
|
modelValue: {},
|
|
61
61
|
unit: {},
|
|
62
62
|
rules: {},
|
|
@@ -103,7 +103,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
103
103
|
modelValue: {},
|
|
104
104
|
modelModifiers: {}
|
|
105
105
|
}),
|
|
106
|
-
emits: /* @__PURE__ */
|
|
106
|
+
emits: /* @__PURE__ */ $(["update:amount", "update:measurement"], ["update:modelValue"]),
|
|
107
107
|
setup(l, { emit: d }) {
|
|
108
108
|
const t = l, r = d, s = se(l, "modelValue"), F = k(), B = v(() => {
|
|
109
109
|
var n;
|
|
@@ -111,19 +111,19 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
111
111
|
}), c = P((() => {
|
|
112
112
|
var o;
|
|
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
|
-
return
|
|
114
|
+
return h(a);
|
|
115
115
|
})());
|
|
116
|
-
|
|
116
|
+
z(c, (e) => {
|
|
117
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 J = Symbol.for("fm:form-state"), D = ie(J, null), A = v(() => t.disabled ?? (D == null ? void 0 : D.getDisabled()) ?? !1), K = P(), R = P(!1), j = P(!1), Q = v(() => R.value || j.value), X = v(() => {
|
|
124
124
|
var a;
|
|
125
|
-
const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +
|
|
126
|
-
(o) => `${o.abbrev}${
|
|
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
|
+
(o) => `${o.abbrev}${h(o.conversion)}`
|
|
127
127
|
).values()].map((o) => o[0]).flat();
|
|
128
128
|
return [
|
|
129
129
|
{
|
|
@@ -135,7 +135,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
135
135
|
value: o.id
|
|
136
136
|
}))
|
|
137
137
|
];
|
|
138
|
-
}),
|
|
138
|
+
}), C = v({
|
|
139
139
|
get() {
|
|
140
140
|
var e, n;
|
|
141
141
|
return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.id) ?? null;
|
|
@@ -143,19 +143,19 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
143
143
|
set(e) {
|
|
144
144
|
if (e == null)
|
|
145
145
|
s.value = {
|
|
146
|
-
...s.value ??
|
|
146
|
+
...s.value ?? E(),
|
|
147
147
|
measurement: null
|
|
148
148
|
}, r("update:measurement", null);
|
|
149
149
|
else {
|
|
150
150
|
const n = t.unit.measurements.find((i) => i.id === e) ?? null;
|
|
151
151
|
s.value = {
|
|
152
|
-
...s.value ??
|
|
152
|
+
...s.value ?? E(),
|
|
153
153
|
measurement: n
|
|
154
154
|
}, r("update:measurement", n);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
|
-
|
|
158
|
+
z(C, (e, n) => {
|
|
159
159
|
var m;
|
|
160
160
|
if (!t.convertAmountOnChangeUnit)
|
|
161
161
|
return;
|
|
@@ -163,9 +163,9 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
163
163
|
value: w,
|
|
164
164
|
precision: N
|
|
165
165
|
});
|
|
166
|
-
c.value =
|
|
166
|
+
c.value = h(S);
|
|
167
167
|
});
|
|
168
|
-
const
|
|
168
|
+
const U = v(() => {
|
|
169
169
|
var e, n;
|
|
170
170
|
return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.abbrev) ?? t.unit.abbrev;
|
|
171
171
|
}), Y = v(
|
|
@@ -177,37 +177,37 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
177
177
|
}
|
|
178
178
|
), ee = v(() => [...t.applyDefaultRules ? [
|
|
179
179
|
H(),
|
|
180
|
-
typeof t.precision == "number" ?
|
|
180
|
+
typeof t.precision == "number" ? G(t.precision) : G(t.unit)
|
|
181
181
|
] : [], ...Y.value]);
|
|
182
|
-
function
|
|
182
|
+
function O(e) {
|
|
183
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() {
|
|
187
187
|
if (!t.stepper)
|
|
188
188
|
return;
|
|
189
|
-
const e = +c.value + +
|
|
190
|
-
c.value =
|
|
189
|
+
const e = +c.value + +h(t.stepper);
|
|
190
|
+
c.value = O(e);
|
|
191
191
|
}
|
|
192
192
|
function ne() {
|
|
193
193
|
if (!t.stepper)
|
|
194
194
|
return;
|
|
195
|
-
const e = +c.value - +
|
|
196
|
-
c.value =
|
|
195
|
+
const e = +c.value - +h(t.stepper);
|
|
196
|
+
c.value = O(e);
|
|
197
197
|
}
|
|
198
198
|
return (e, n) => {
|
|
199
199
|
const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), p = b("FmMenu"), w = b("FmTooltip"), N = b("FmField"), S = b("FmFormGroup");
|
|
200
|
-
return f(), y("div",
|
|
201
|
-
u("div",
|
|
200
|
+
return f(), y("div", Me, [
|
|
201
|
+
u("div", he, [
|
|
202
202
|
u("div", ge, [
|
|
203
|
-
|
|
203
|
+
M(i, {
|
|
204
204
|
label: e.label,
|
|
205
205
|
disabled: e.disabled,
|
|
206
206
|
required: e.labelMark === "required",
|
|
207
207
|
optional: e.labelMark === "optional"
|
|
208
208
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
209
209
|
]),
|
|
210
|
-
|
|
210
|
+
M(N, { focused: Q.value }, {
|
|
211
211
|
default: g(() => [
|
|
212
212
|
u("div", xe, [
|
|
213
213
|
T(e.$slots, "prepend"),
|
|
@@ -224,7 +224,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
224
224
|
key: 1,
|
|
225
225
|
type: "text",
|
|
226
226
|
ref_key: "inputRef",
|
|
227
|
-
ref:
|
|
227
|
+
ref: K,
|
|
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),
|
|
@@ -241,22 +241,22 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
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(x(
|
|
246
|
+
ue(x(U.value), 1)
|
|
247
247
|
]),
|
|
248
248
|
default: g(() => [
|
|
249
|
-
e.disableUnit ? (f(), y("div", Pe, x(
|
|
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, x(
|
|
259
|
-
|
|
258
|
+
u("div", ke, x(U.value), 1),
|
|
259
|
+
M(a, { name: "keyboard_arrow_down" })
|
|
260
260
|
])
|
|
261
261
|
]),
|
|
262
262
|
default: g(() => [
|
|
@@ -264,8 +264,8 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
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,
|
|
267
|
-
"model-value": m.value ==
|
|
268
|
-
onClick: (_) =>
|
|
267
|
+
"model-value": m.value == C.value,
|
|
268
|
+
onClick: (_) => C.value = m.value
|
|
269
269
|
}, null, 8, ["label", "model-value", "onClick"]))), 128))
|
|
270
270
|
])
|
|
271
271
|
]),
|
|
@@ -281,7 +281,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
281
281
|
onClick: te
|
|
282
282
|
}, [
|
|
283
283
|
u("div", Re, [
|
|
284
|
-
|
|
284
|
+
M(a, {
|
|
285
285
|
name: "expand_less",
|
|
286
286
|
size: "md"
|
|
287
287
|
})
|
|
@@ -291,8 +291,8 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
291
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",
|
|
292
292
|
onClick: ne
|
|
293
293
|
}, [
|
|
294
|
-
u("div",
|
|
295
|
-
|
|
294
|
+
u("div", Ce, [
|
|
295
|
+
M(a, {
|
|
296
296
|
name: "expand_more",
|
|
297
297
|
size: "md"
|
|
298
298
|
})
|
|
@@ -306,7 +306,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
|
|
|
306
306
|
_: 3
|
|
307
307
|
}, 8, ["focused"])
|
|
308
308
|
]),
|
|
309
|
-
|
|
309
|
+
M(S, {
|
|
310
310
|
class: "flex-1",
|
|
311
311
|
"model-value": { modelValue: s.value, amountAsString: String(c.value) },
|
|
312
312
|
info: e.labelInfo,
|
|
@@ -320,9 +320,9 @@ const he = { class: "flex flex-col" }, Me = { 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,
|
|
327
|
-
|
|
327
|
+
G as d
|
|
328
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 {
|
|
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 { i as a, J as y } from "./app-CRSuR04o.js";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
|
-
const v = { class: "flex flex-col" },
|
|
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",
|
|
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" }, h = { 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 = y(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" }, h = { 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",
|
|
36
|
-
r("div",
|
|
35
|
+
r("div", g, [
|
|
36
|
+
r("div", h, o(e.name), 1),
|
|
37
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, x(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,5 +1,5 @@
|
|
|
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
|
|
2
|
-
import { a as J,
|
|
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 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, d as h, e as B, f as ye, D as oe, h as Q, G as be, l as _e, A as xe, H as ne, n as se, u as ke, x as he, y as we, z as Se, B as Ie, E as ae } from "./app-CRSuR04o.js";
|
|
3
3
|
import { useDialog as le, useSnackbar as Z, useProxiedModel as Fe, useBreakpoints as Ce } 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";
|
|
@@ -64,7 +64,7 @@ const X = ie(
|
|
|
64
64
|
}
|
|
65
65
|
}).onPrimary(() => f(d, a, s));
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function G() {
|
|
68
68
|
}
|
|
69
69
|
function b() {
|
|
70
70
|
}
|
|
@@ -72,12 +72,12 @@ const X = ie(
|
|
|
72
72
|
createIngredientGroup: p,
|
|
73
73
|
updateIngredientGroup: v,
|
|
74
74
|
deleteIngredientGroup: y,
|
|
75
|
-
importIngredientGroups:
|
|
75
|
+
importIngredientGroups: G,
|
|
76
76
|
exportIngredientGroups: b,
|
|
77
77
|
ingredientGroupDialogProps: i
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
),
|
|
80
|
+
), Ge = ie(
|
|
81
81
|
"ingredientGroupTable",
|
|
82
82
|
function() {
|
|
83
83
|
const c = C(!1), w = Z(), o = J(), r = X();
|
|
@@ -145,7 +145,7 @@ const X = ie(
|
|
|
145
145
|
columnDefs: v
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
),
|
|
148
|
+
), Ae = { class: "flex flex-col gap-16" }, De = { class: "flex flex-col gap-8 cursor-pointer" }, Ve = {
|
|
149
149
|
key: 0,
|
|
150
150
|
class: "text-fm-color-typo-primary fm-typo-en-body-lg-400 line-clamp-1 break-all"
|
|
151
151
|
}, Ee = { class: "text-fm-color-typo-secondary" }, Re = {
|
|
@@ -176,7 +176,7 @@ const X = ie(
|
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
178
|
const y = F(() => i.skus.groupBy((a) => a.unit._id));
|
|
179
|
-
function
|
|
179
|
+
function G() {
|
|
180
180
|
var s;
|
|
181
181
|
const a = i.skus.filter((n) => {
|
|
182
182
|
var t;
|
|
@@ -249,8 +249,8 @@ const X = ie(
|
|
|
249
249
|
}).onPrimary((n) => {
|
|
250
250
|
var u, _;
|
|
251
251
|
const t = ((u = o.skus) == null ? void 0 : u.slice(1)) ?? [], e = n.map((m) => {
|
|
252
|
-
const
|
|
253
|
-
return
|
|
252
|
+
const A = t.find((D) => (D == null ? void 0 : D._id) === m._id);
|
|
253
|
+
return A || B(m, ["unit"]);
|
|
254
254
|
});
|
|
255
255
|
o.skus = [(_ = o.skus) == null ? void 0 : _[0], ...e];
|
|
256
256
|
});
|
|
@@ -268,17 +268,17 @@ const X = ie(
|
|
|
268
268
|
}
|
|
269
269
|
];
|
|
270
270
|
return (a, s) => {
|
|
271
|
-
const n = S("FmTextField"), t = S("FmLabel"), e = S("FmField"), u = S("FmFormGroup"), _ = S("FmButton"), m = S("FmTable"),
|
|
272
|
-
return M(), O(
|
|
271
|
+
const n = S("FmTextField"), t = S("FmLabel"), e = S("FmField"), u = S("FmFormGroup"), _ = S("FmButton"), m = S("FmTable"), A = S("FmForm");
|
|
272
|
+
return M(), O(A, {
|
|
273
273
|
onValidationSuccess: s[5] || (s[5] = (I) => r("validation-success")),
|
|
274
274
|
ref_key: "formRef",
|
|
275
275
|
ref: f,
|
|
276
276
|
class: "flex flex-col gap-32"
|
|
277
277
|
}, {
|
|
278
278
|
default: R(() => {
|
|
279
|
-
var I,
|
|
279
|
+
var I, D, V, T, z;
|
|
280
280
|
return [
|
|
281
|
-
x("div",
|
|
281
|
+
x("div", Ae, [
|
|
282
282
|
g(n, {
|
|
283
283
|
label: "Name",
|
|
284
284
|
"label-mark": "required",
|
|
@@ -292,27 +292,27 @@ const X = ie(
|
|
|
292
292
|
modelValue: l(o).ref,
|
|
293
293
|
"onUpdate:modelValue": s[1] || (s[1] = (k) => l(o).ref = k)
|
|
294
294
|
}, null, 8, ["modelValue"]),
|
|
295
|
-
x("div",
|
|
295
|
+
x("div", De, [
|
|
296
296
|
g(t, {
|
|
297
297
|
label: "Main ingredient",
|
|
298
298
|
required: ""
|
|
299
299
|
}),
|
|
300
300
|
g(e, {
|
|
301
|
-
onClick: s[2] || (s[2] = (k) =>
|
|
301
|
+
onClick: s[2] || (s[2] = (k) => G())
|
|
302
302
|
}, {
|
|
303
303
|
default: R(() => {
|
|
304
|
-
var k, E, $,
|
|
304
|
+
var k, E, $, L, 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, "[" +
|
|
308
|
-
te(" " +
|
|
309
|
-
])) : (M(), ee("span", Re,
|
|
307
|
+
x("span", Ee, "[" + j((K = (N = (L = l(o)) == null ? void 0 : L.skus) == null ? void 0 : N[0]) == null ? void 0 : K.code) + "]", 1),
|
|
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
|
+
])) : (M(), ee("span", Re, j("Click to select main item")))
|
|
310
310
|
];
|
|
311
311
|
}),
|
|
312
312
|
_: 1
|
|
313
313
|
}),
|
|
314
314
|
x("div", Te, [
|
|
315
|
-
s[6] || (s[6] = te(
|
|
315
|
+
s[6] || (s[6] = te(j("Select a main item to filter out substitutable items with same unit.") + " ")),
|
|
316
316
|
g(u, {
|
|
317
317
|
"model-value": ((I = l(o)) == null ? void 0 : I.skus) ?? [],
|
|
318
318
|
rules: [l(xe)(1, "Required")]
|
|
@@ -326,7 +326,7 @@ const X = ie(
|
|
|
326
326
|
x("div", null, [
|
|
327
327
|
g(_, {
|
|
328
328
|
label: "Add items",
|
|
329
|
-
disabled: (((V = (
|
|
329
|
+
disabled: (((V = (D = l(o)) == null ? void 0 : D.skus) == null ? void 0 : V.length) ?? 0) < 1,
|
|
330
330
|
onClick: s[3] || (s[3] = (k) => b()),
|
|
331
331
|
"prepend-icon": "add",
|
|
332
332
|
variant: "secondary",
|
|
@@ -346,7 +346,7 @@ const X = ie(
|
|
|
346
346
|
}),
|
|
347
347
|
draggable: "",
|
|
348
348
|
"hide-footer": "",
|
|
349
|
-
"page-size": ((
|
|
349
|
+
"page-size": ((z = l(o).skus) == null ? void 0 : z.length) ?? 0
|
|
350
350
|
}, null, 8, ["row-data", "page-size"])
|
|
351
351
|
])
|
|
352
352
|
];
|
|
@@ -396,7 +396,7 @@ const X = ie(
|
|
|
396
396
|
return r("common.add");
|
|
397
397
|
}
|
|
398
398
|
return "";
|
|
399
|
-
}),
|
|
399
|
+
}), G = C(), b = C(!1);
|
|
400
400
|
async function d() {
|
|
401
401
|
b.value = !0;
|
|
402
402
|
const t = B(p.value);
|
|
@@ -437,7 +437,7 @@ const X = ie(
|
|
|
437
437
|
}
|
|
438
438
|
function s() {
|
|
439
439
|
var t, e;
|
|
440
|
-
(e = (t =
|
|
440
|
+
(e = (t = G.value) == null ? void 0 : t.validateInputs) == null || e.call(t);
|
|
441
441
|
}
|
|
442
442
|
function n() {
|
|
443
443
|
switch (c.mode) {
|
|
@@ -478,7 +478,7 @@ const X = ie(
|
|
|
478
478
|
(M(), O(Me, {
|
|
479
479
|
class: "w-full",
|
|
480
480
|
ref_key: "hasValidationExpose",
|
|
481
|
-
ref:
|
|
481
|
+
ref: G,
|
|
482
482
|
key: v.value,
|
|
483
483
|
"model-value": p.value,
|
|
484
484
|
"onUpdate:modelValue": e[0] || (e[0] = (m) => p.value = m),
|
|
@@ -491,7 +491,7 @@ const X = ie(
|
|
|
491
491
|
}, 8, ["model-value", "header"]);
|
|
492
492
|
};
|
|
493
493
|
}
|
|
494
|
-
}),
|
|
494
|
+
}), ze = { class: "flex flex-col py-8" }, Le = { 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
497
|
const c = J(), w = F(() => c.skuGroups), o = ke(), { t: r } = W(), {
|
|
@@ -499,9 +499,9 @@ const X = ie(
|
|
|
499
499
|
updateIngredientGroup: p,
|
|
500
500
|
importIngredientGroups: v,
|
|
501
501
|
exportIngredientGroups: f
|
|
502
|
-
} = X(), { columnDefs: y, loading:
|
|
503
|
-
function d(
|
|
504
|
-
switch (
|
|
502
|
+
} = X(), { columnDefs: y, loading: G } = re(Ge()), { ingredientGroupDialogProps: b } = re(X());
|
|
503
|
+
function d(A) {
|
|
504
|
+
switch (A) {
|
|
505
505
|
case "add":
|
|
506
506
|
return i();
|
|
507
507
|
case "import":
|
|
@@ -510,7 +510,7 @@ const X = ie(
|
|
|
510
510
|
return f();
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
const a = C(""), s = C(!1), n = F(() => s.value ||
|
|
513
|
+
const a = C(""), s = C(!1), n = F(() => s.value || G.value), { breakpoints: t } = Ce(), e = F(() => t.value.xs || t.value.sm), u = F(() => e.value ? 10 : 20), _ = he(), m = F(() => [
|
|
514
514
|
{
|
|
515
515
|
label: r("inventory.ingredient.create.title"),
|
|
516
516
|
value: "add",
|
|
@@ -520,8 +520,8 @@ const X = ie(
|
|
|
520
520
|
{ label: r("common.import"), value: "import" },
|
|
521
521
|
{ label: r("common.export"), value: "export" }
|
|
522
522
|
]);
|
|
523
|
-
return (
|
|
524
|
-
const
|
|
523
|
+
return (A, I) => {
|
|
524
|
+
const D = S("FmTable");
|
|
525
525
|
return M(), O(we, {
|
|
526
526
|
title: l(r)("inventory.ingredientGroup.title"),
|
|
527
527
|
actions: m.value,
|
|
@@ -542,7 +542,7 @@ const X = ie(
|
|
|
542
542
|
search: a.value,
|
|
543
543
|
"onUpdate:search": I[0] || (I[0] = (V) => a.value = V)
|
|
544
544
|
}, null, 8, ["search"]),
|
|
545
|
-
g(
|
|
545
|
+
g(D, {
|
|
546
546
|
style: me(l(_).tableHeight),
|
|
547
547
|
"column-defs": l(y),
|
|
548
548
|
"row-data": w.value,
|
|
@@ -558,19 +558,19 @@ const X = ie(
|
|
|
558
558
|
onRowClick: l(p)
|
|
559
559
|
}, pe({
|
|
560
560
|
default: R((T) => {
|
|
561
|
-
var
|
|
561
|
+
var z, k, E, $, L, N, K, q, P, H;
|
|
562
562
|
return [
|
|
563
|
-
x("div",
|
|
564
|
-
x("div",
|
|
563
|
+
x("div", ze, [
|
|
564
|
+
x("div", Le, [
|
|
565
565
|
g(l(ae), {
|
|
566
|
-
render: (E = (k = (
|
|
567
|
-
props: (
|
|
566
|
+
render: (E = (k = (z = T.code) == null ? void 0 : z.column) == null ? void 0 : k.columnDef) == null ? void 0 : E.cell,
|
|
567
|
+
props: (L = ($ = T.code) == null ? void 0 : $.getContext) == null ? void 0 : L.call($)
|
|
568
568
|
}, null, 8, ["render", "props"])
|
|
569
569
|
]),
|
|
570
570
|
x("div", Ne, [
|
|
571
571
|
g(l(ae), {
|
|
572
572
|
render: (q = (K = (N = T.name) == null ? void 0 : N.column) == null ? void 0 : K.columnDef) == null ? void 0 : q.cell,
|
|
573
|
-
props: (
|
|
573
|
+
props: (H = (P = T.name) == null ? void 0 : P.getContext) == null ? void 0 : H.call(P)
|
|
574
574
|
}, null, 8, ["render", "props"])
|
|
575
575
|
])
|
|
576
576
|
])
|
|
@@ -581,7 +581,7 @@ const X = ie(
|
|
|
581
581
|
s.value ? {
|
|
582
582
|
name: "loading-text",
|
|
583
583
|
fn: R(() => [
|
|
584
|
-
x("div", null,
|
|
584
|
+
x("div", null, j(l(r)("inventory.ingredient.table.importing")), 1)
|
|
585
585
|
]),
|
|
586
586
|
key: "0"
|
|
587
587
|
} : void 0
|