@feedmepos/mf-inventory-portal 1.2.30-dev.1 → 1.2.30
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-kX4bqoEe.js → App-CZJre5y8.js} +57 -55
- package/dist/{ApprovalView-DCNKqVE2.js → ApprovalView-CnxHxojY.js} +34 -28
- package/dist/{BindingsDialog-d7f1f8gf.js → BindingsDialog-C6lCOPNs.js} +2 -2
- package/dist/{BindingsPicker-2HJOx0QW.js → BindingsPicker-DZtFKLQ5.js} +6 -5
- package/dist/{BindingsTable-CPAjxOZG.js → BindingsTable-BmQGLuJ4.js} +28 -24
- package/dist/{ClosingDraftView-CUng41eo.js → ClosingDraftView-KLtlh31f.js} +183 -175
- package/dist/{ClosingHistoryView-CcGc2NwU.js → ClosingHistoryView-Rf1yMhMj.js} +43 -41
- package/dist/ClosingTemplateView-C_IiKnGx.js +2019 -0
- package/dist/{DeliveryOrderPrintPreview-BsM-CCc5.js → DeliveryOrderPrintPreview-UF7V005U.js} +15 -14
- package/dist/FmDroppableField-J0xUsOTV.js +154 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-cuggJ5Xd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BcMvEdc0.js} +74 -72
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js +279 -0
- package/dist/{FmMultiselectDialog-BGbrqXUF.js → FmMultiselectDialog-B0aKuf2o.js} +1 -1
- package/dist/FmMultiselectDialog-BasrjBFA.js +597 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-isogcN1O.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CaYJJkXz.js} +51 -49
- package/dist/{ImportView-wAVrMEwL.js → ImportView-DRSoz0uM.js} +81 -74
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVUF4I2Q.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DA8SlWPy.js} +5 -5
- package/dist/{IngredientGroupView-BZczeXdL.js → IngredientGroupView-D5Laak2-.js} +73 -65
- package/dist/{IngredientsView-D5N5Y1ZY.js → IngredientsView-TG3fPQhR.js} +358 -345
- package/dist/{IntegrationView-Hrslmuc1.js → IntegrationView-CElpjyo7.js} +219 -209
- package/dist/{InventoryBindingForm-DH6wgxOG.js → InventoryBindingForm-CBgxRYBd.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Drr5vD6f.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ys5GBHoQ.js} +41 -40
- package/dist/{InventoryBindingSummary-BU1ehpQZ.js → InventoryBindingSummary-OK3vNWhi.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1ueC4GfZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9QRntUlk.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-FHcU1zZt.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bc01NoOn.js} +22 -21
- package/dist/{PublishView-CQtj0f31.js → PublishView-CLMfiLjP.js} +26 -23
- package/dist/{PurchaseOrderPrintPreview-BQyXtHST.js → PurchaseOrderPrintPreview-Dy77yWDC.js} +10 -9
- package/dist/{ReceiveRequestView-Dm-h_SrY.js → ReceiveRequestView-BhD-NaHE.js} +478 -462
- package/dist/{RecipeView-DNNRvr1w.js → RecipeView-RWaO94w_.js} +73 -64
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js +251 -0
- package/dist/{StockView-CaOm5BCx.js → StockView-D5t8OxaG.js} +292 -282
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Z91XRszD.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-3Asf1TGd.js} +1 -1
- package/dist/{SupplierView-JSII9qwL.js → SupplierView-DiospFKq.js} +92 -80
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-DfCHteOF.js +177 -0
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CNtvx-LA.js +123 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Mehd4lGs.js → TransferDetails.vue_vue_type_script_setup_true_lang-p959Op4k.js} +318 -305
- package/dist/{TransferTemplateView-DyCpNKJd.js → TransferTemplateView-ePZFdZ0p.js} +228 -216
- package/dist/{UnitView-CqN7mlJ2.js → UnitView-Banlxw7y.js} +70 -63
- package/dist/{WarehouseView-gFWD-m8e.js → WarehouseView-BL-p5hbi.js} +123 -114
- package/dist/WastageTemplateView-B1pmSuW0.js +2288 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-EpEEb8EO.js +64040 -0
- package/dist/app-rgirz_52.js +8024 -0
- package/dist/app.d.ts +0 -21
- package/dist/app.js +6 -6
- package/dist/closing-template-zIjwO1_E.js +117 -0
- package/dist/date2-Dnc8Y81g.js +116 -0
- package/dist/dayjs.min-TdUgzmww.js +282 -0
- package/dist/{decimal-DfF_g5rc.js → decimal-C6s3GvGb.js} +4 -3
- package/dist/defineDeepModel-BSaaXVBF.js +19 -0
- package/dist/duplicate-template-Bw0H416G.js +34 -0
- package/dist/feature-C95Hao53.js +20162 -0
- package/dist/form-mode.enum-BKiNVH6A.js +4 -0
- package/dist/format-time-from-id-DlbHo6kY.js +15 -0
- package/dist/{format-unit-display-ivAljvlo.js → format-unit-display-QBS54q0R.js} +308 -297
- package/dist/{import-export.helper-B2MWv9v7.js → import-export.helper-CUKCKtP7.js} +56 -52
- package/dist/index-CFn_9RMm.js +45 -0
- package/dist/{index-DZaT0ZaL.js → index-S9Ak__QC.js} +1 -1
- package/dist/{index-BbhuWHyh.js → index-goD-WGVb.js} +16 -14
- package/dist/lodash-gq8IrP4j.js +3678 -0
- package/dist/netsuite-CnhAKyAO.js +4316 -0
- package/dist/{purchase-order-template-DdybMC_P.js → purchase-order-template-CBIpWdEW.js} +1 -1
- package/dist/router/shared.spec.d.ts +1 -0
- package/dist/row-action.enum-BcW_L_nE.js +67 -0
- package/dist/rules-DKklsaS1.js +201 -0
- package/dist/{stock-BYagIdsj.js → stock-3K93Mif9.js} +1 -1
- package/dist/{stock-V4ciPiBe.js → stock-BW8fen3H.js} +11 -10
- package/dist/style.css +1 -1
- package/dist/{supplier-CgtB1I9I.js → supplier-CObCSfot.js} +27 -26
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BIQovyZX.js → use-ingredient-select-dialog-DwvQiaVW.js} +4 -3
- package/dist/{use-inventory-binding-dialog-DyjicXgc.js → use-inventory-binding-dialog-CuLEHLDM.js} +4 -3
- package/dist/use-template-enabled-locations-2-DkUJeppb.js +111 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1 -1
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +0 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1 -13
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +0 -12
- package/dist/vue-i18n-CUznvVzc.js +2365 -0
- package/dist/xlsx-bT1p3YVR.js +24004 -0
- package/dist/xlsx.util-Cr9DpDFb.js +78 -0
- package/package.json +5 -5
- package/dist/ClosingTemplateView-D8IAdhDb.js +0 -2041
- package/dist/app-CnQ49Lyb.js +0 -131483
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as
|
|
3
|
-
import { useDialog as ue, useSnackbar as Z, useProxiedModel as
|
|
4
|
-
import { i as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { _ as
|
|
1
|
+
import { defineComponent as O, computed as b, openBlock as v, createElementBlock as w, createElementVNode as s, Fragment as K, renderList as G, toDisplayString as h, createCommentVNode as Q, ref as I, watch as oe, resolveComponent as $, createBlock as T, withCtx as A, createVNode as f, unref as i, isRef as le, normalizeClass as me, normalizeStyle as ce, Teleport as pe, normalizeProps as ve, guardReactiveProps as fe } from "vue";
|
|
2
|
+
import { a as Y, S as ye, c as ie, s as be, j as se, u as ge } from "./app-EpEEb8EO.js";
|
|
3
|
+
import { useDialog as ue, useSnackbar as Z, useProxiedModel as ae, useBreakpoints as xe } from "@feedmepos/ui-library";
|
|
4
|
+
import { i as _e, _ as he } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
+
import { F as U } from "./form-mode.enum-BKiNVH6A.js";
|
|
6
|
+
import { defineStore as Ve, storeToRefs as Ue } from "pinia";
|
|
7
|
+
import { D as re, R as q } from "./row-action.enum-BcW_L_nE.js";
|
|
8
|
+
import { c as we, _ as Ce, F as Se } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
+
import { useI18n as J } from "@feedmepos/mf-common";
|
|
10
|
+
import { u as Fe, _ as ke } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js";
|
|
11
|
+
import { R as H, A as Ee, a as W, d as $e, h as Ie } from "./rules-DKklsaS1.js";
|
|
12
|
+
import { F as Ae } from "./decimal-C6s3GvGb.js";
|
|
13
|
+
import { _ as De } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9QRntUlk.js";
|
|
14
|
+
import { _ as Re } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js";
|
|
15
|
+
import { u as Me } from "./netsuite-CnhAKyAO.js";
|
|
9
16
|
const Pe = { class: "flex flex-col gap-8" }, Te = {
|
|
10
17
|
key: 0,
|
|
11
18
|
class: "flex flex-col"
|
|
@@ -24,13 +31,13 @@ const Pe = { class: "flex flex-col gap-8" }, Te = {
|
|
|
24
31
|
}, He = { class: "flex-1 py-8 px-16" }, Ke = {
|
|
25
32
|
class: "flex-0 py-8 px-16",
|
|
26
33
|
style: { "flex-basis": "240px" }
|
|
27
|
-
}, Ge = /* @__PURE__ */
|
|
34
|
+
}, Ge = /* @__PURE__ */ O({
|
|
28
35
|
__name: "UnitUsedBy",
|
|
29
36
|
props: {
|
|
30
37
|
unit: {}
|
|
31
38
|
},
|
|
32
39
|
setup(S) {
|
|
33
|
-
const c = S, g =
|
|
40
|
+
const c = S, g = Y(), m = b(() => g.validateUnitUsage(c.unit)), l = b(() => m.value.filter((n) => n.from === "INGREDIENT")), a = b(() => m.value.filter((n) => n.from === "RECIPE")), d = b(() => m.value.filter((n) => n.from === "MENU"));
|
|
34
41
|
return (n, p) => (v(), w("div", Pe, [
|
|
35
42
|
p[3] || (p[3] = s("div", { class: "fm-typo-en-body-md-400" }, "Sorry, this unit is used in the following modules:", -1)),
|
|
36
43
|
l.value.length ? (v(), w("div", Te, [
|
|
@@ -67,7 +74,7 @@ const Pe = { class: "flex flex-col gap-8" }, Te = {
|
|
|
67
74
|
class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
|
|
68
75
|
}, [
|
|
69
76
|
s("div", ze, h(r.code) + " " + h(r.name), 1),
|
|
70
|
-
s("div", je, h((t = r.bindedIngredient) == null ? void 0 : t.slice(0, 3).map((
|
|
77
|
+
s("div", je, h((t = r.bindedIngredient) == null ? void 0 : t.slice(0, 3).map((F) => F.code).join(", ")) + " " + h(r.bindedIngredient && ((u = r.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((y = r.bindedIngredient) == null ? void 0 : y.length) - 3} more` : ""), 1)
|
|
71
78
|
]);
|
|
72
79
|
}), 128))
|
|
73
80
|
])) : Q("", !0),
|
|
@@ -86,14 +93,14 @@ const Pe = { class: "flex flex-col gap-8" }, Te = {
|
|
|
86
93
|
class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
|
|
87
94
|
}, [
|
|
88
95
|
s("div", He, h(r.code) + " " + h(r.name), 1),
|
|
89
|
-
s("div", Ke, h((t = r.bindedIngredient) == null ? void 0 : t.slice(0, 3).map((
|
|
96
|
+
s("div", Ke, h((t = r.bindedIngredient) == null ? void 0 : t.slice(0, 3).map((F) => F.code).join(", ")) + " " + h(r.bindedIngredient && ((u = r.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((y = r.bindedIngredient) == null ? void 0 : y.length) - 3} more` : ""), 1)
|
|
90
97
|
]);
|
|
91
98
|
}), 128))
|
|
92
99
|
])) : Q("", !0)
|
|
93
100
|
]));
|
|
94
101
|
}
|
|
95
|
-
}), X =
|
|
96
|
-
const c = ue(), g = Z(), m =
|
|
102
|
+
}), X = Ve("unitForm", function() {
|
|
103
|
+
const c = ue(), g = Z(), m = Y(), l = I(!1), a = I();
|
|
97
104
|
function d() {
|
|
98
105
|
const t = {
|
|
99
106
|
unit: {},
|
|
@@ -125,9 +132,9 @@ const Pe = { class: "flex flex-col gap-8" }, Te = {
|
|
|
125
132
|
type: "success"
|
|
126
133
|
});
|
|
127
134
|
} catch (u) {
|
|
128
|
-
u instanceof ye &&
|
|
135
|
+
u instanceof ye && _e(u) ? c.open({
|
|
129
136
|
title: "Cannot delete unit",
|
|
130
|
-
contentComponent:
|
|
137
|
+
contentComponent: he,
|
|
131
138
|
contentComponentProps: {
|
|
132
139
|
subject: (t == null ? void 0 : t.name) ?? "",
|
|
133
140
|
items: u.errorResponse.message
|
|
@@ -186,8 +193,8 @@ const Pe = { class: "flex flex-col gap-8" }, Te = {
|
|
|
186
193
|
unitViewLoading: l
|
|
187
194
|
};
|
|
188
195
|
});
|
|
189
|
-
function
|
|
190
|
-
const { updateUnit: S, deleteUnit: c } = X(), { t: g } =
|
|
196
|
+
function Oe() {
|
|
197
|
+
const { updateUnit: S, deleteUnit: c } = X(), { t: g } = J();
|
|
191
198
|
async function m(a, d) {
|
|
192
199
|
const n = ie(d);
|
|
193
200
|
if (a === q.Edit) {
|
|
@@ -216,8 +223,8 @@ function Je() {
|
|
|
216
223
|
id: "action",
|
|
217
224
|
header: "",
|
|
218
225
|
cell(a) {
|
|
219
|
-
return
|
|
220
|
-
[
|
|
226
|
+
return we(
|
|
227
|
+
[re[q.Edit], re[q.Delete]],
|
|
221
228
|
(d) => {
|
|
222
229
|
m(d, a.row.original);
|
|
223
230
|
}
|
|
@@ -232,7 +239,7 @@ function Je() {
|
|
|
232
239
|
}
|
|
233
240
|
] };
|
|
234
241
|
}
|
|
235
|
-
const
|
|
242
|
+
const Ye = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Qe = { class: "flex-1" }, We = { class: "flex-1" }, Xe = { class: "flex" }, Ze = { class: "flex items-center" }, et = { class: "fm-typo-en-body-lg-600 flex-grow" }, tt = { class: "flex flex-col gap-24" }, nt = { class: "flex gap-24" }, ot = { class: "flex-1" }, lt = { class: "flex-1" }, st = /* @__PURE__ */ O({
|
|
236
243
|
__name: "UnitForm",
|
|
237
244
|
props: {
|
|
238
245
|
mode: {},
|
|
@@ -241,7 +248,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
241
248
|
},
|
|
242
249
|
emits: ["update:modelValue", "click:submit"],
|
|
243
250
|
setup(S, { expose: c, emit: g }) {
|
|
244
|
-
const m = S, l = g, { t: a } =
|
|
251
|
+
const m = S, l = g, { t: a } = J();
|
|
245
252
|
function d() {
|
|
246
253
|
l("click:submit");
|
|
247
254
|
}
|
|
@@ -291,7 +298,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
291
298
|
if (typeof e == "number" && !isNaN(e)) {
|
|
292
299
|
const o = u.value.map((V) => ({
|
|
293
300
|
...V,
|
|
294
|
-
conversion:
|
|
301
|
+
conversion: be.convertPrecision({
|
|
295
302
|
value: V.conversion,
|
|
296
303
|
precision: e
|
|
297
304
|
})
|
|
@@ -316,37 +323,37 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
316
323
|
}
|
|
317
324
|
], l("update:modelValue", n.value);
|
|
318
325
|
}
|
|
319
|
-
function
|
|
326
|
+
function F(e) {
|
|
320
327
|
const o = n.value.measurements ?? [];
|
|
321
328
|
o.splice(e, 1), n.value.measurements = o, l("update:modelValue", n.value);
|
|
322
329
|
}
|
|
323
|
-
const
|
|
330
|
+
const E = I();
|
|
324
331
|
return c({
|
|
325
332
|
validateInputs: () => {
|
|
326
333
|
var e, o;
|
|
327
|
-
(o = (e =
|
|
334
|
+
(o = (e = E.value) == null ? void 0 : e.validateInputs) == null || o.call(e);
|
|
328
335
|
},
|
|
329
336
|
resetInputsValidation: () => {
|
|
330
337
|
var e, o;
|
|
331
|
-
(o = (e =
|
|
338
|
+
(o = (e = E.value) == null ? void 0 : e.resetInputsValidation) == null || o.call(e);
|
|
332
339
|
},
|
|
333
340
|
resetInputs: () => {
|
|
334
341
|
var e, o;
|
|
335
|
-
(o = (e =
|
|
342
|
+
(o = (e = E.value) == null ? void 0 : e.resetInputs) == null || o.call(e);
|
|
336
343
|
}
|
|
337
344
|
}), (e, o) => {
|
|
338
|
-
const V =
|
|
345
|
+
const V = $("FmTextField"), R = $("FmStepperField"), C = $("FmButton"), M = $("FmCard"), D = $("FmForm");
|
|
339
346
|
return v(), T(D, {
|
|
340
347
|
ref_key: "formRef",
|
|
341
|
-
ref:
|
|
348
|
+
ref: E,
|
|
342
349
|
class: "flex flex-col gap-40",
|
|
343
350
|
onValidationSuccess: d
|
|
344
351
|
}, {
|
|
345
352
|
default: A(() => {
|
|
346
353
|
var B;
|
|
347
354
|
return [
|
|
348
|
-
s("div",
|
|
349
|
-
s("div",
|
|
355
|
+
s("div", Ye, [
|
|
356
|
+
s("div", Je, [
|
|
350
357
|
s("div", Qe, [
|
|
351
358
|
f(V, {
|
|
352
359
|
disabled: e.disabled,
|
|
@@ -375,7 +382,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
375
382
|
label: i(a)("inventory.unit.precision"),
|
|
376
383
|
modelValue: t.value,
|
|
377
384
|
"onUpdate:modelValue": o[2] || (o[2] = (x) => t.value = x),
|
|
378
|
-
rules: [i(
|
|
385
|
+
rules: [i(Ee)(0)]
|
|
379
386
|
}, null, 8, ["disabled", "label", "modelValue", "rules"])
|
|
380
387
|
])
|
|
381
388
|
]),
|
|
@@ -401,7 +408,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
401
408
|
disabled: e.disabled,
|
|
402
409
|
variant: "tertiary",
|
|
403
410
|
"prepend-icon": "delete",
|
|
404
|
-
onClick: (
|
|
411
|
+
onClick: (k) => F(_)
|
|
405
412
|
}, null, 8, ["disabled", "onClick"])
|
|
406
413
|
]),
|
|
407
414
|
s("div", tt, [
|
|
@@ -412,7 +419,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
412
419
|
class: "col-span-2",
|
|
413
420
|
label: i(a)("inventory.unit.measurement.name"),
|
|
414
421
|
modelValue: e.modelValue.measurements[_].name,
|
|
415
|
-
"onUpdate:modelValue": (
|
|
422
|
+
"onUpdate:modelValue": (k) => e.modelValue.measurements[_].name = k,
|
|
416
423
|
rules: [i(H)()],
|
|
417
424
|
"label-mark": "required"
|
|
418
425
|
}, null, 8, ["disabled", "label", "modelValue", "onUpdate:modelValue", "rules"])
|
|
@@ -422,27 +429,27 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
422
429
|
disabled: e.disabled,
|
|
423
430
|
label: i(a)("inventory.unit.measurement.symbol"),
|
|
424
431
|
modelValue: e.modelValue.measurements[_].abbrev,
|
|
425
|
-
"onUpdate:modelValue": (
|
|
432
|
+
"onUpdate:modelValue": (k) => e.modelValue.measurements[_].abbrev = k,
|
|
426
433
|
rules: [i(H)()],
|
|
427
434
|
"label-mark": "required"
|
|
428
435
|
}, null, 8, ["disabled", "label", "modelValue", "onUpdate:modelValue", "rules"])
|
|
429
436
|
])
|
|
430
437
|
]),
|
|
431
|
-
f(
|
|
438
|
+
f(De, {
|
|
432
439
|
disabled: e.disabled,
|
|
433
440
|
class: "col-span-3",
|
|
434
441
|
label: i(a)("inventory.unit.measurement.conversion"),
|
|
435
442
|
"model-value": +i(W)(e.modelValue.measurements[_].conversion),
|
|
436
|
-
"onUpdate:modelValue": (
|
|
443
|
+
"onUpdate:modelValue": (k) => u.value = u.value.map(
|
|
437
444
|
(P, L) => L === _ ? {
|
|
438
445
|
...P,
|
|
439
|
-
conversion: i(
|
|
440
|
-
i(
|
|
446
|
+
conversion: i(Ae).toPrecision(
|
|
447
|
+
i($e)(k),
|
|
441
448
|
t.value
|
|
442
449
|
)
|
|
443
450
|
} : P
|
|
444
451
|
),
|
|
445
|
-
rules: [i(
|
|
452
|
+
rules: [i(Ie)(0)],
|
|
446
453
|
step: +i(W)({ amount: 1, precision: t.value }),
|
|
447
454
|
"helper-text": i(a)("inventory.unit.measurement.conversionHelper", {
|
|
448
455
|
measurementSymbol: e.modelValue.measurements[_].name || " measurement unit",
|
|
@@ -460,7 +467,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
460
467
|
}, 512);
|
|
461
468
|
};
|
|
462
469
|
}
|
|
463
|
-
}), at = { class: "flex gap-4" }, rt = /* @__PURE__ */
|
|
470
|
+
}), at = { class: "flex gap-4" }, rt = /* @__PURE__ */ O({
|
|
464
471
|
__name: "UnitDialog",
|
|
465
472
|
props: {
|
|
466
473
|
show: { type: Boolean },
|
|
@@ -469,7 +476,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
469
476
|
},
|
|
470
477
|
emits: ["update:show"],
|
|
471
478
|
setup(S) {
|
|
472
|
-
const c = S, g =
|
|
479
|
+
const c = S, g = Y(), m = Z(), { t: l } = J(), a = ae(c, "show"), d = ae(c, "unit"), n = b(() => {
|
|
473
480
|
switch (c.mode) {
|
|
474
481
|
case U.READ:
|
|
475
482
|
return "";
|
|
@@ -500,7 +507,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
500
507
|
type: "success"
|
|
501
508
|
});
|
|
502
509
|
} catch (e) {
|
|
503
|
-
e instanceof
|
|
510
|
+
e instanceof se || m.open({
|
|
504
511
|
title: l("inventory.unit.create.error.title"),
|
|
505
512
|
message: l("inventory.unit.create.error.message"),
|
|
506
513
|
type: "error"
|
|
@@ -518,7 +525,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
518
525
|
type: "success"
|
|
519
526
|
});
|
|
520
527
|
} catch (e) {
|
|
521
|
-
e instanceof
|
|
528
|
+
e instanceof se || m.open({
|
|
522
529
|
title: l("inventory.unit.update.error.title"),
|
|
523
530
|
message: l("inventory.unit.update.error.message"),
|
|
524
531
|
type: "error"
|
|
@@ -527,11 +534,11 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
527
534
|
t.value = !1;
|
|
528
535
|
}
|
|
529
536
|
}
|
|
530
|
-
function
|
|
537
|
+
function F() {
|
|
531
538
|
var e, o;
|
|
532
539
|
(o = (e = r.value) == null ? void 0 : e.validateInputs) == null || o.call(e);
|
|
533
540
|
}
|
|
534
|
-
function
|
|
541
|
+
function E() {
|
|
535
542
|
switch (c.mode) {
|
|
536
543
|
case U.READ:
|
|
537
544
|
return;
|
|
@@ -542,7 +549,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
542
549
|
}
|
|
543
550
|
}
|
|
544
551
|
return (e, o) => {
|
|
545
|
-
const V =
|
|
552
|
+
const V = $("FmButton"), R = $("FmSideSheet");
|
|
546
553
|
return v(), T(R, {
|
|
547
554
|
"model-value": i(a),
|
|
548
555
|
"onUpdate:modelValue": o[3] || (o[3] = (C) => le(a) ? a.value = C : null),
|
|
@@ -556,7 +563,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
556
563
|
f(V, {
|
|
557
564
|
loading: t.value,
|
|
558
565
|
label: p.value,
|
|
559
|
-
onClick:
|
|
566
|
+
onClick: F
|
|
560
567
|
}, null, 8, ["loading", "label"]),
|
|
561
568
|
f(V, {
|
|
562
569
|
disabled: t.value,
|
|
@@ -575,26 +582,26 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
575
582
|
"onUpdate:modelValue": o[0] || (o[0] = (C) => le(d) ? d.value = C : null),
|
|
576
583
|
mode: e.mode,
|
|
577
584
|
disabled: t.value,
|
|
578
|
-
"onClick:submit": o[1] || (o[1] = (C) =>
|
|
585
|
+
"onClick:submit": o[1] || (o[1] = (C) => E())
|
|
579
586
|
}, null, 8, ["modelValue", "mode", "disabled"])
|
|
580
587
|
]),
|
|
581
588
|
_: 1
|
|
582
589
|
}, 8, ["model-value", "header"]);
|
|
583
590
|
};
|
|
584
591
|
}
|
|
585
|
-
}), it = { class: "flex flex-col py-8" }, ut = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
592
|
+
}), it = { class: "flex flex-col py-8" }, ut = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, St = /* @__PURE__ */ O({
|
|
586
593
|
__name: "UnitView",
|
|
587
594
|
setup(S) {
|
|
588
|
-
const c =
|
|
595
|
+
const c = Y(), g = ge(), m = Me();
|
|
589
596
|
ue(), Z();
|
|
590
|
-
const { t: l } =
|
|
597
|
+
const { t: l } = J(), a = b(() => c.units), { createUnit: d, updateUnit: n } = X(), { unitDialogProps: p, unitViewLoading: r } = Ue(X()), { columnDefs: t } = Oe();
|
|
591
598
|
function u(M) {
|
|
592
599
|
switch (M) {
|
|
593
600
|
case "add":
|
|
594
601
|
return m.isEnabled ? void 0 : d();
|
|
595
602
|
}
|
|
596
603
|
}
|
|
597
|
-
const y = I(""),
|
|
604
|
+
const y = I(""), F = I(!1), E = b(() => F.value || r.value), { breakpoints: e } = xe(), o = b(() => e.value.xs || e.value.sm), V = b(() => o.value ? 10 : 20), R = Fe(), C = b(() => [
|
|
598
605
|
...m.isEnabled ? [] : [
|
|
599
606
|
{
|
|
600
607
|
label: l("inventory.unit.create.title"),
|
|
@@ -605,8 +612,8 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
605
612
|
]
|
|
606
613
|
]);
|
|
607
614
|
return (M, D) => {
|
|
608
|
-
const B =
|
|
609
|
-
return v(), T(
|
|
615
|
+
const B = $("FmTable");
|
|
616
|
+
return v(), T(ke, {
|
|
610
617
|
title: i(l)("inventory.unit.title"),
|
|
611
618
|
actions: C.value,
|
|
612
619
|
"onClick:action": u
|
|
@@ -621,7 +628,7 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
621
628
|
}
|
|
622
629
|
])
|
|
623
630
|
}, [
|
|
624
|
-
f(
|
|
631
|
+
f(Re, {
|
|
625
632
|
searchable: "",
|
|
626
633
|
search: y.value,
|
|
627
634
|
"onUpdate:search": D[0] || (D[0] = (x) => y.value = x)
|
|
@@ -631,22 +638,22 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
631
638
|
"column-defs": i(t),
|
|
632
639
|
"row-data": a.value,
|
|
633
640
|
"search-value": y.value,
|
|
634
|
-
loading: !i(g)._currentLocation ||
|
|
641
|
+
loading: !i(g)._currentLocation || E.value,
|
|
635
642
|
onRowClick: D[1] || (D[1] = (x) => i(n)(x.original)),
|
|
636
643
|
"page-size": V.value
|
|
637
644
|
}, {
|
|
638
645
|
"list-row": A((x) => [
|
|
639
|
-
f(
|
|
646
|
+
f(Ce, {
|
|
640
647
|
row: x,
|
|
641
648
|
onRowClick: i(n)
|
|
642
649
|
}, {
|
|
643
650
|
default: A((_) => {
|
|
644
|
-
var
|
|
651
|
+
var k, P, L, N, ee, z, te, j, ne;
|
|
645
652
|
return [
|
|
646
653
|
s("div", it, [
|
|
647
654
|
s("div", ut, [
|
|
648
|
-
f(i(
|
|
649
|
-
render: (L = (P = (
|
|
655
|
+
f(i(Se), {
|
|
656
|
+
render: (L = (P = (k = _.name) == null ? void 0 : k.column) == null ? void 0 : P.columnDef) == null ? void 0 : L.cell,
|
|
650
657
|
props: (ee = (N = _.name) == null ? void 0 : N.getContext) == null ? void 0 : ee.call(N)
|
|
651
658
|
}, null, 8, ["render", "props"])
|
|
652
659
|
]),
|
|
@@ -670,5 +677,5 @@ const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Qe
|
|
|
670
677
|
}
|
|
671
678
|
});
|
|
672
679
|
export {
|
|
673
|
-
|
|
680
|
+
St as default
|
|
674
681
|
};
|