@feedmepos/mf-inventory-portal 1.2.7 → 1.2.8-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-BtLCesbn.js → App-BL2MW6zc.js} +1 -1
- package/dist/{ApprovalView-Ba4XBhGf.js → ApprovalView-C18JNyKG.js} +69 -68
- package/dist/{BindingsDialog-BbBUniCu.js → BindingsDialog-DxXGq2TK.js} +2 -2
- package/dist/{BindingsPicker-C3q3ROku.js → BindingsPicker-BsuXkTQv.js} +1 -1
- package/dist/{BindingsTable-BTxWMif_.js → BindingsTable-BeGm5MK6.js} +1 -1
- package/dist/{ClosingDraftView-DGITBnaY.js → ClosingDraftView-yzzV-yhQ.js} +203 -203
- package/dist/ClosingTemplateView-DgI8ANjn.js +1862 -0
- package/dist/{DeliveryOrderPrintPreview-CUaHpblV.js → DeliveryOrderPrintPreview-B3xmuRAQ.js} +8 -8
- package/dist/{FmAdminBadge-BdwGZY-f.js → FmAdminBadge-9bTzCMaP.js} +6 -6
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B1pioWnC.js +230 -0
- package/dist/{FmMultiselectDialog-BETfHs3j.js → FmMultiselectDialog-D4QIUWaf.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BNdbeRQp.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CwuM-hJU.js} +23 -23
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-VYMMcwLl.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BFeK6K0l.js} +1 -1
- package/dist/{IngredientGroupView-C4d9b3Td.js → IngredientGroupView-Ku7t3MgL.js} +12 -12
- package/dist/IngredientsView-CAn1-40w.js +2306 -0
- package/dist/{IntegrationView-CWFzRDWO.js → IntegrationView-DEtbdogx.js} +4 -4
- package/dist/{InventoryBindingForm-Cx0Prlq8.js → InventoryBindingForm-BqBGbblS.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-cpR3Sf2Y.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CpVc2nGE.js} +41 -41
- package/dist/{InventoryBindingSummary-l8XvpxVU.js → InventoryBindingSummary-dEM8P354.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BjRvIX-v.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-0AaD13Wg.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-gjuZveKy.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BqVwcG4Z.js} +11 -11
- package/dist/{PublishView-D2iUnDan.js → PublishView-CE2Ul9NM.js} +14 -14
- package/dist/{PurchaseOrderPrintPreview-DdLvM-wt.js → PurchaseOrderPrintPreview-C6Lg4V4I.js} +11 -11
- package/dist/{ReceiveRequestView-DpF5ZzvH.js → ReceiveRequestView-CDTT3m48.js} +148 -145
- package/dist/{RecipeView-Dvtm8o1Y.js → RecipeView-CROKnpq9.js} +49 -49
- package/dist/StockView-Wv700Rt6.js +2104 -0
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BdtRkUS6.js +158 -0
- package/dist/{SupplierView-7GtIJ3Fz.js → SupplierView-BNWtlH7a.js} +1133 -1015
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BvzSua6d.js +3058 -0
- package/dist/{TransferTemplateView-Cmvg-yvW.js → TransferTemplateView-DlxBMSPW.js} +131 -130
- package/dist/{UnitView-DjVm1iVX.js → UnitView-B56YIwiR.js} +59 -59
- package/dist/WarehouseView-C0d-uE4n.js +1066 -0
- package/dist/api/inventory.d.ts +8 -0
- package/dist/api/netsuite.d.ts +3 -0
- package/dist/api/purchase-order-template.d.ts +1 -0
- package/dist/api/purchase-order.d.ts +2 -0
- package/dist/api/shipment.d.ts +11 -0
- package/dist/api/warehouse.d.ts +3 -1
- package/dist/{app-Z-ylwRmy.js → app-Bo3plhvb.js} +17877 -17113
- package/dist/app.d.ts +96 -9
- package/dist/app.js +3 -3
- package/dist/closing-template-ByR3kWir.js +53 -0
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +9 -2
- package/dist/components/netsuite/SubsidiaryTreeDialog.vue.d.ts +2 -0
- package/dist/{decimal-D1pJ2776.js → decimal-YpqAHWnk.js} +1 -1
- package/dist/{format-unit-display-9BMm-8A4.js → format-unit-display-CpusApo9.js} +372 -404
- package/dist/{index-rEIM0AVC.js → index-BHD7bEuA.js} +1 -1
- package/dist/{index-BOl10vcm.js → index-CJTjmcUN.js} +1 -1
- package/dist/purchase-order-template-CNhjKd6p.js +41 -0
- package/dist/{stock-B8ewk80v.js → stock-BhgeS5mL.js} +1 -1
- package/dist/stores/feature.d.ts +10 -0
- package/dist/stores/integration/netsuite.d.ts +19 -0
- package/dist/stores/inventory.d.ts +1 -0
- package/dist/stores/location.d.ts +57 -1
- package/dist/stores/supplier.d.ts +96 -0
- package/dist/stores/warehouse.d.ts +4 -0
- package/dist/{supplier-DLSXYY1o.js → supplier-DG8JyhMj.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CTjwdY3T.js → use-ingredient-select-dialog-LIEBAng-.js} +5 -5
- package/dist/{use-inventory-binding-dialog-zXJB7MQY.js → use-inventory-binding-dialog-Df7DfQ1b.js} +8 -8
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +24 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientFormProps.d.ts +6 -0
- package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +2 -0
- package/dist/views/receive-request/components/delivery-order-form/CreateForm.vue.d.ts +16 -0
- package/dist/views/receive-request/components/delivery-order-form/CreateFormProps.d.ts +4 -0
- package/dist/views/receive-request/components/delivery-order-form/EditForm.vue.d.ts +16 -0
- package/dist/views/receive-request/components/delivery-order-form/EditFormProps.d.ts +4 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +60 -0
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +10 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +94 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +72 -1
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +8 -0
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -0
- package/dist/views/supplier/composables/use-supplier-table.d.ts +4 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +16 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -0
- package/package.json +3 -3
- package/dist/ClosingTemplateView-eRvwxXBq.js +0 -1908
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-lDkElrkF.js +0 -227
- package/dist/IngredientsView-BvqWuIVT.js +0 -1876
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +0 -59
- package/dist/StockView-CRDu_GQ_.js +0 -2086
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DbmLtbZt.js +0 -2494
- package/dist/WarehouseView-CBso3SXT.js +0 -1034
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as
|
|
1
|
+
import { defineComponent as K, computed as b, openBlock as v, createElementBlock as w, createElementVNode as s, Fragment as q, renderList as H, toDisplayString as V, createCommentVNode as Z, ref as R, watch as ee, resolveComponent as I, createBlock as T, withCtx as A, createVNode as f, unref as l, isRef as te, normalizeClass as ie, normalizeStyle as ue, Teleport as de, normalizeProps as me, guardReactiveProps as ce } from "vue";
|
|
2
|
+
import { a as O, e as U, S as pe, h as ve, D as ne, i as z, f as se, Y as fe, o as j, A as ye, k as J, Z as be, $ as ge, v as oe, u as xe, b as _e, K as he, _ as Ve, L as Ue, O as we, P as Ce } from "./app-Bo3plhvb.js";
|
|
3
3
|
import { useDialog as Se, useSnackbar as ae, useProxiedModel as le, useBreakpoints as ke } from "@feedmepos/ui-library";
|
|
4
|
-
import { i as Fe, _ as
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { useI18n as
|
|
7
|
-
import { F as De } from "./decimal-
|
|
8
|
-
import { _ as Ae } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { i as Fe, _ as $e } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
+
import { defineStore as Ee, storeToRefs as Ie } from "pinia";
|
|
6
|
+
import { useI18n as Y } from "@feedmepos/mf-common";
|
|
7
|
+
import { F as De } from "./decimal-YpqAHWnk.js";
|
|
8
|
+
import { _ as Ae } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-0AaD13Wg.js";
|
|
9
9
|
const Re = { class: "flex flex-col gap-8" }, Me = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "flex flex-col"
|
|
@@ -15,22 +15,22 @@ const Re = { class: "flex flex-col gap-8" }, Me = {
|
|
|
15
15
|
}, Be = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "flex flex-col"
|
|
18
|
-
},
|
|
18
|
+
}, Le = { class: "flex-1 py-8 px-16" }, Ne = {
|
|
19
19
|
class: "flex-0 py-8 px-16",
|
|
20
20
|
style: { "flex-basis": "240px" }
|
|
21
|
-
},
|
|
21
|
+
}, ze = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "flex flex-col"
|
|
24
24
|
}, je = { class: "flex-1 py-8 px-16" }, qe = {
|
|
25
25
|
class: "flex-0 py-8 px-16",
|
|
26
26
|
style: { "flex-basis": "240px" }
|
|
27
|
-
}, He = /* @__PURE__ */
|
|
27
|
+
}, He = /* @__PURE__ */ K({
|
|
28
28
|
__name: "UnitUsedBy",
|
|
29
29
|
props: {
|
|
30
30
|
unit: {}
|
|
31
31
|
},
|
|
32
32
|
setup(F) {
|
|
33
|
-
const c = F, y =
|
|
33
|
+
const c = F, y = O(), m = b(() => y.validateUnitUsage(c.unit)), a = b(() => m.value.filter((n) => n.from === "INGREDIENT")), r = b(() => m.value.filter((n) => n.from === "RECIPE")), d = b(() => m.value.filter((n) => n.from === "MENU"));
|
|
34
34
|
return (n, p) => (v(), w("div", Re, [
|
|
35
35
|
p[3] || (p[3] = s("div", { class: "fm-typo-en-body-md-400" }, "Sorry, this unit is used in the following modules:", -1)),
|
|
36
36
|
a.value.length ? (v(), w("div", Me, [
|
|
@@ -51,7 +51,7 @@ const Re = { class: "flex flex-col gap-8" }, Me = {
|
|
|
51
51
|
s("div", Te, V((t = i.bindedIngredient) != null && t.length ? "Convert binding" : "Item unit"), 1)
|
|
52
52
|
]);
|
|
53
53
|
}), 128))
|
|
54
|
-
])) :
|
|
54
|
+
])) : Z("", !0),
|
|
55
55
|
r.value.length ? (v(), w("div", Be, [
|
|
56
56
|
p[1] || (p[1] = s("div", { 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" }, [
|
|
57
57
|
s("div", { class: "flex-1 py-8 px-16" }, "Recipe"),
|
|
@@ -66,12 +66,12 @@ const Re = { class: "flex flex-col gap-8" }, Me = {
|
|
|
66
66
|
key: i.code,
|
|
67
67
|
class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
|
|
68
68
|
}, [
|
|
69
|
-
s("div",
|
|
70
|
-
s("div",
|
|
69
|
+
s("div", Le, V(i.code) + " " + V(i.name), 1),
|
|
70
|
+
s("div", Ne, V((t = i.bindedIngredient) == null ? void 0 : t.slice(0, 3).map((C) => C.code).join(", ")) + " " + V(i.bindedIngredient && ((u = i.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((g = i.bindedIngredient) == null ? void 0 : g.length) - 3} more` : ""), 1)
|
|
71
71
|
]);
|
|
72
72
|
}), 128))
|
|
73
|
-
])) :
|
|
74
|
-
d.value.length ? (v(), w("div",
|
|
73
|
+
])) : Z("", !0),
|
|
74
|
+
d.value.length ? (v(), w("div", ze, [
|
|
75
75
|
p[2] || (p[2] = s("div", { 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" }, [
|
|
76
76
|
s("div", { class: "flex-1 py-8 px-16" }, "Menu"),
|
|
77
77
|
s("div", {
|
|
@@ -89,11 +89,11 @@ const Re = { class: "flex flex-col gap-8" }, Me = {
|
|
|
89
89
|
s("div", qe, V((t = i.bindedIngredient) == null ? void 0 : t.slice(0, 3).map((C) => C.code).join(", ")) + " " + V(i.bindedIngredient && ((u = i.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((g = i.bindedIngredient) == null ? void 0 : g.length) - 3} more` : ""), 1)
|
|
90
90
|
]);
|
|
91
91
|
}), 128))
|
|
92
|
-
])) :
|
|
92
|
+
])) : Z("", !0)
|
|
93
93
|
]));
|
|
94
94
|
}
|
|
95
|
-
}), Q =
|
|
96
|
-
const c = Se(), y = ae(), m =
|
|
95
|
+
}), Q = Ee("unitForm", function() {
|
|
96
|
+
const c = Se(), y = ae(), m = O(), a = R(!1), r = R();
|
|
97
97
|
function d() {
|
|
98
98
|
const t = {
|
|
99
99
|
unit: {},
|
|
@@ -127,7 +127,7 @@ const Re = { class: "flex flex-col gap-8" }, Me = {
|
|
|
127
127
|
} catch (u) {
|
|
128
128
|
u instanceof pe && Fe(u) ? c.open({
|
|
129
129
|
title: "Cannot delete unit",
|
|
130
|
-
contentComponent:
|
|
130
|
+
contentComponent: $e,
|
|
131
131
|
contentComponentProps: {
|
|
132
132
|
subject: (t == null ? void 0 : t.name) ?? "",
|
|
133
133
|
items: u.errorResponse.message
|
|
@@ -186,15 +186,15 @@ const Re = { class: "flex flex-col gap-8" }, Me = {
|
|
|
186
186
|
unitViewLoading: a
|
|
187
187
|
};
|
|
188
188
|
});
|
|
189
|
-
function
|
|
190
|
-
const { updateUnit: F, deleteUnit: c } = Q(), { t: y } =
|
|
189
|
+
function Ke() {
|
|
190
|
+
const { updateUnit: F, deleteUnit: c } = Q(), { t: y } = Y();
|
|
191
191
|
async function m(r, d) {
|
|
192
192
|
const n = se(d);
|
|
193
|
-
if (r ===
|
|
193
|
+
if (r === z.Edit) {
|
|
194
194
|
await F(n);
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
if (r ===
|
|
197
|
+
if (r === z.Delete) {
|
|
198
198
|
await c(n);
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
@@ -217,7 +217,7 @@ function Ge() {
|
|
|
217
217
|
header: "",
|
|
218
218
|
cell(r) {
|
|
219
219
|
return ve(
|
|
220
|
-
[ne[
|
|
220
|
+
[ne[z.Edit], ne[z.Delete]],
|
|
221
221
|
(d) => {
|
|
222
222
|
m(d, r.row.original);
|
|
223
223
|
}
|
|
@@ -232,7 +232,7 @@ function Ge() {
|
|
|
232
232
|
}
|
|
233
233
|
] };
|
|
234
234
|
}
|
|
235
|
-
const
|
|
235
|
+
const Oe = { class: "flex flex-col gap-24" }, Ye = { class: "flex gap-24" }, Ge = { class: "flex-1" }, Ze = { class: "flex-1" }, Je = { class: "flex" }, Qe = { class: "flex items-center" }, We = { class: "fm-typo-en-body-lg-600 flex-grow" }, Xe = { class: "flex flex-col gap-24" }, et = { class: "flex gap-24" }, tt = { class: "flex-1" }, nt = { class: "flex-1" }, ot = /* @__PURE__ */ K({
|
|
236
236
|
__name: "UnitForm",
|
|
237
237
|
props: {
|
|
238
238
|
mode: {},
|
|
@@ -241,7 +241,7 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
241
241
|
},
|
|
242
242
|
emits: ["update:modelValue", "click:submit"],
|
|
243
243
|
setup(F, { expose: c, emit: y }) {
|
|
244
|
-
const m = F, a = y, { t: r } =
|
|
244
|
+
const m = F, a = y, { t: r } = Y();
|
|
245
245
|
function d() {
|
|
246
246
|
a("click:submit");
|
|
247
247
|
}
|
|
@@ -335,8 +335,8 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
335
335
|
(o = (e = S.value) == null ? void 0 : e.resetInputs) == null || o.call(e);
|
|
336
336
|
}
|
|
337
337
|
}), (e, o) => {
|
|
338
|
-
const x = I("FmTextField"), M = I("FmStepperField"), _ = I("FmButton"),
|
|
339
|
-
return v(), T(
|
|
338
|
+
const x = I("FmTextField"), M = I("FmStepperField"), _ = I("FmButton"), G = I("FmCard"), E = I("FmForm");
|
|
339
|
+
return v(), T(E, {
|
|
340
340
|
ref_key: "formRef",
|
|
341
341
|
ref: S,
|
|
342
342
|
class: "flex flex-col gap-40",
|
|
@@ -345,9 +345,9 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
345
345
|
default: A(() => {
|
|
346
346
|
var P;
|
|
347
347
|
return [
|
|
348
|
-
s("div",
|
|
349
|
-
s("div",
|
|
350
|
-
s("div",
|
|
348
|
+
s("div", Oe, [
|
|
349
|
+
s("div", Ye, [
|
|
350
|
+
s("div", Ge, [
|
|
351
351
|
f(x, {
|
|
352
352
|
disabled: e.disabled,
|
|
353
353
|
label: l(r)("inventory.unit.name"),
|
|
@@ -357,7 +357,7 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
357
357
|
"label-mark": "required"
|
|
358
358
|
}, null, 8, ["disabled", "label", "modelValue", "rules"])
|
|
359
359
|
]),
|
|
360
|
-
s("div",
|
|
360
|
+
s("div", Ze, [
|
|
361
361
|
f(x, {
|
|
362
362
|
disabled: e.disabled,
|
|
363
363
|
label: l(r)("inventory.unit.symbol"),
|
|
@@ -379,7 +379,7 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
379
379
|
}, null, 8, ["disabled", "label", "modelValue", "rules"])
|
|
380
380
|
])
|
|
381
381
|
]),
|
|
382
|
-
s("div",
|
|
382
|
+
s("div", Je, [
|
|
383
383
|
f(_, {
|
|
384
384
|
disabled: e.disabled,
|
|
385
385
|
type: "button",
|
|
@@ -389,22 +389,22 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
389
389
|
onClick: g
|
|
390
390
|
}, null, 8, ["disabled", "label"])
|
|
391
391
|
]),
|
|
392
|
-
(v(!0), w(q, null, H((P = e.modelValue) == null ? void 0 : P.measurements, (k, h) => (v(), T(
|
|
392
|
+
(v(!0), w(q, null, H((P = e.modelValue) == null ? void 0 : P.measurements, (k, h) => (v(), T(G, {
|
|
393
393
|
class: "flex flex-col gap-16 p-16",
|
|
394
394
|
variant: "outlined",
|
|
395
395
|
key: k.id
|
|
396
396
|
}, {
|
|
397
397
|
default: A(() => [
|
|
398
398
|
s("div", Qe, [
|
|
399
|
-
s("div",
|
|
399
|
+
s("div", We, V(l(r)("inventory.unit.measurement.measurementDefault", [h + 1])), 1),
|
|
400
400
|
f(_, {
|
|
401
401
|
disabled: e.disabled,
|
|
402
402
|
variant: "tertiary",
|
|
403
403
|
"prepend-icon": "delete",
|
|
404
|
-
onClick: (
|
|
404
|
+
onClick: ($) => C(h)
|
|
405
405
|
}, null, 8, ["disabled", "onClick"])
|
|
406
406
|
]),
|
|
407
|
-
s("div",
|
|
407
|
+
s("div", Xe, [
|
|
408
408
|
s("div", et, [
|
|
409
409
|
s("div", tt, [
|
|
410
410
|
f(x, {
|
|
@@ -412,7 +412,7 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
412
412
|
class: "col-span-2",
|
|
413
413
|
label: l(r)("inventory.unit.measurement.name"),
|
|
414
414
|
modelValue: e.modelValue.measurements[h].name,
|
|
415
|
-
"onUpdate:modelValue": (
|
|
415
|
+
"onUpdate:modelValue": ($) => e.modelValue.measurements[h].name = $,
|
|
416
416
|
rules: [l(j)()],
|
|
417
417
|
"label-mark": "required"
|
|
418
418
|
}, null, 8, ["disabled", "label", "modelValue", "onUpdate:modelValue", "rules"])
|
|
@@ -422,7 +422,7 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
422
422
|
disabled: e.disabled,
|
|
423
423
|
label: l(r)("inventory.unit.measurement.symbol"),
|
|
424
424
|
modelValue: e.modelValue.measurements[h].abbrev,
|
|
425
|
-
"onUpdate:modelValue": (
|
|
425
|
+
"onUpdate:modelValue": ($) => e.modelValue.measurements[h].abbrev = $,
|
|
426
426
|
rules: [l(j)()],
|
|
427
427
|
"label-mark": "required"
|
|
428
428
|
}, null, 8, ["disabled", "label", "modelValue", "onUpdate:modelValue", "rules"])
|
|
@@ -432,21 +432,21 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
432
432
|
disabled: e.disabled,
|
|
433
433
|
class: "col-span-3",
|
|
434
434
|
label: l(r)("inventory.unit.measurement.conversion"),
|
|
435
|
-
"model-value": +l(
|
|
436
|
-
"onUpdate:modelValue": (
|
|
435
|
+
"model-value": +l(J)(e.modelValue.measurements[h].conversion),
|
|
436
|
+
"onUpdate:modelValue": ($) => u.value = u.value.map(
|
|
437
437
|
(D, B) => B === h ? {
|
|
438
438
|
...D,
|
|
439
439
|
conversion: l(De).toPrecision(
|
|
440
|
-
l(be)(
|
|
440
|
+
l(be)($),
|
|
441
441
|
t.value
|
|
442
442
|
)
|
|
443
443
|
} : D
|
|
444
444
|
),
|
|
445
445
|
rules: [l(ge)(0)],
|
|
446
|
-
step: +l(
|
|
446
|
+
step: +l(J)({ amount: 1, precision: t.value }),
|
|
447
447
|
"helper-text": l(r)("inventory.unit.measurement.conversionHelper", {
|
|
448
448
|
measurementSymbol: e.modelValue.measurements[h].name || " measurement unit",
|
|
449
|
-
conversion: +l(
|
|
449
|
+
conversion: +l(J)(e.modelValue.measurements[h].conversion),
|
|
450
450
|
unitSymbol: i.value || "base unit"
|
|
451
451
|
})
|
|
452
452
|
}, null, 8, ["disabled", "label", "model-value", "onUpdate:modelValue", "rules", "step", "helper-text"])
|
|
@@ -460,7 +460,7 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
460
460
|
}, 512);
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
|
-
}), lt = { class: "flex gap-4" }, st = /* @__PURE__ */
|
|
463
|
+
}), lt = { class: "flex gap-4" }, st = /* @__PURE__ */ K({
|
|
464
464
|
__name: "UnitDialog",
|
|
465
465
|
props: {
|
|
466
466
|
show: { type: Boolean },
|
|
@@ -469,7 +469,7 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
469
469
|
},
|
|
470
470
|
emits: ["update:show"],
|
|
471
471
|
setup(F) {
|
|
472
|
-
const c = F, y =
|
|
472
|
+
const c = F, y = O(), m = ae(), { t: a } = Y(), r = le(c, "show"), d = le(c, "unit"), n = b(() => {
|
|
473
473
|
switch (c.mode) {
|
|
474
474
|
case U.READ:
|
|
475
475
|
return "";
|
|
@@ -582,16 +582,16 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
582
582
|
}, 8, ["model-value", "header"]);
|
|
583
583
|
};
|
|
584
584
|
}
|
|
585
|
-
}), at = { class: "flex flex-col py-8" }, rt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, it = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, bt = /* @__PURE__ */
|
|
585
|
+
}), at = { class: "flex flex-col py-8" }, rt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, it = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, bt = /* @__PURE__ */ K({
|
|
586
586
|
__name: "UnitView",
|
|
587
587
|
setup(F) {
|
|
588
|
-
const c =
|
|
588
|
+
const c = O(), y = xe(), m = _e(), a = b(() => c.units), { createUnit: r, updateUnit: d } = Q(), { unitDialogProps: n, unitViewLoading: p } = Ie(Q()), { columnDefs: i } = Ke();
|
|
589
589
|
function t(M) {
|
|
590
590
|
M === "add" && r();
|
|
591
591
|
}
|
|
592
|
-
const u = R(""), g = b(() => p.value), { breakpoints: C } = ke(), S = b(() => C.value.xs || C.value.sm), e = b(() => S.value ? 10 : 20), o = he(), { t: x } =
|
|
592
|
+
const u = R(""), g = b(() => p.value), { breakpoints: C } = ke(), S = b(() => C.value.xs || C.value.sm), e = b(() => S.value ? 10 : 20), o = he(), { t: x } = Y();
|
|
593
593
|
return (M, _) => {
|
|
594
|
-
const
|
|
594
|
+
const G = I("FmTable");
|
|
595
595
|
return v(), T(Ve, {
|
|
596
596
|
title: l(x)("inventory.unit.title"),
|
|
597
597
|
actions: l(m).isEnabled ? [] : [
|
|
@@ -617,33 +617,33 @@ const Ke = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Oe
|
|
|
617
617
|
f(Ue, {
|
|
618
618
|
searchable: "",
|
|
619
619
|
search: u.value,
|
|
620
|
-
"onUpdate:search": _[0] || (_[0] = (
|
|
620
|
+
"onUpdate:search": _[0] || (_[0] = (E) => u.value = E)
|
|
621
621
|
}, null, 8, ["search"]),
|
|
622
|
-
f(
|
|
622
|
+
f(G, {
|
|
623
623
|
style: ue(l(o).tableHeight),
|
|
624
624
|
"column-defs": l(i),
|
|
625
625
|
"row-data": a.value,
|
|
626
626
|
"search-value": u.value,
|
|
627
627
|
loading: !l(y)._currentLocation || g.value,
|
|
628
|
-
onRowClick: _[1] || (_[1] = (
|
|
628
|
+
onRowClick: _[1] || (_[1] = (E) => l(d)(E.original)),
|
|
629
629
|
"page-size": e.value
|
|
630
630
|
}, {
|
|
631
|
-
"list-row": A((
|
|
631
|
+
"list-row": A((E) => [
|
|
632
632
|
f(we, {
|
|
633
|
-
row:
|
|
633
|
+
row: E,
|
|
634
634
|
onRowClick: l(d)
|
|
635
635
|
}, {
|
|
636
636
|
default: A((P) => {
|
|
637
|
-
var k, h,
|
|
637
|
+
var k, h, $, D, B, L, W, N, X;
|
|
638
638
|
return [
|
|
639
639
|
s("div", at, [
|
|
640
640
|
s("div", rt, [
|
|
641
641
|
f(l(Ce), {
|
|
642
|
-
render: (
|
|
642
|
+
render: ($ = (h = (k = P.name) == null ? void 0 : k.column) == null ? void 0 : h.columnDef) == null ? void 0 : $.cell,
|
|
643
643
|
props: (B = (D = P.name) == null ? void 0 : D.getContext) == null ? void 0 : B.call(D)
|
|
644
644
|
}, null, 8, ["render", "props"])
|
|
645
645
|
]),
|
|
646
|
-
s("div", it, V((
|
|
646
|
+
s("div", it, V((X = (N = (W = (L = E.original.measurements) == null ? void 0 : L.map) == null ? void 0 : W.call(L, (re) => re.name)) == null ? void 0 : N.join) == null ? void 0 : X.call(N, ", ")), 1)
|
|
647
647
|
])
|
|
648
648
|
];
|
|
649
649
|
}),
|