@feedmepos/mf-inventory-portal 1.0.9-dev.2 → 1.0.9-dev.4
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-DfxhucPn.js → App-BOKGVcoO.js} +2 -2
- package/dist/{ApprovalView-BUYgTb8S.js → ApprovalView-Bo-4fnEU.js} +2 -2
- package/dist/{BindingsDialog-Cbs9aVch.js → BindingsDialog-DM2b4GN4.js} +2 -2
- package/dist/{BindingsPicker-BH9bil6g.js → BindingsPicker-CJKBXA0c.js} +3 -3
- package/dist/{BindingsTable-DBsS_9yb.js → BindingsTable-BxCEEJfb.js} +1 -1
- package/dist/{ClosingDraftView-CcQssDLY.js → ClosingDraftView-bQxPF18V.js} +2 -2
- package/dist/{ClosingTemplateView-BHPqi-bL.js → ClosingTemplateView-DLkp9Qt8.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-DlTLtZ1f.js → DeliveryOrderPrintPreview-CK3HdYVb.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CtJSPDCo.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DvCBsPdI.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-B-erI7fq.js → FmUnitInput.vue_vue_type_script_setup_true_lang-R8f-Q9Nk.js} +20 -20
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DT4nyE8i.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BOyqgaik.js} +1 -1
- package/dist/{IngredientsView-BCEznLxB.js → IngredientsView-DmKCy_JQ.js} +4 -4
- package/dist/{IntegrationView-COSJuqnB.js → IntegrationView-B1dzt8WK.js} +4 -4
- package/dist/{InventoryBindingForm-B3C8gktf.js → InventoryBindingForm-CeTlH0U1.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bn2X1jxB.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DsM2bCNe.js} +92 -87
- package/dist/{InventoryBindingSummary-BF1OtGum.js → InventoryBindingSummary-QVSD87YL.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BMTXHa4I.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C-lgLo2e.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CZR7wF6-.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CEMRfo1C.js} +1 -1
- package/dist/{PublishView-Cp5tpVb0.js → PublishView-BYGKLC9D.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-DWOcxCH8.js → PurchaseOrderPrintPreview-CEVjGeom.js} +1 -1
- package/dist/{ReceiveRequestView-CRuhm8r1.js → ReceiveRequestView-D5PcGCLv.js} +42 -42
- package/dist/RecipeView-DmTDCsvk.js +8493 -0
- package/dist/{StockView-CuK8s5rt.js → StockView-EmTqUcP1.js} +7 -7
- package/dist/{SupplierView-Bwpe9RoM.js → SupplierView-BaLnW761.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DDAZMTzq.js → TransferDetails.vue_vue_type_script_setup_true_lang-B3ew6mc5.js} +36 -36
- package/dist/{TransferTemplateView-BlluEiV-.js → TransferTemplateView-DoeLAFmJ.js} +114 -114
- package/dist/{UnitView-BWGQHOWP.js → UnitView-6Kobe5di.js} +18 -18
- package/dist/{WarehouseView-dOCu22dg.js → WarehouseView-BBMS14jU.js} +1 -1
- package/dist/api/inventory.d.ts +66 -207
- package/dist/{app-BkIAyhP-.js → app-CUTIQqG_.js} +7318 -7360
- package/dist/app.js +1 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +22 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +22 -0
- package/dist/{decimal-BiC7uGww.js → decimal-Bb7Chjpr.js} +1 -1
- package/dist/{feature-CCDDWpq8.js → feature-D5GLIW5h.js} +84 -89
- package/dist/{format-unit-display-CLa0op_h.js → format-unit-display-CqqBiewI.js} +29 -29
- package/dist/{index-UgbyiGok.js → index-B7QMXzGe.js} +2739 -2823
- package/dist/{index-BbFvsU1Z.js → index-DiEdX1Bs.js} +2 -2
- package/dist/main.d.ts +1 -0
- package/dist/{stock-SxO4bxTm.js → stock-CO0XWh8j.js} +1 -1
- package/dist/stores/feature.d.ts +0 -2
- package/dist/stores/inventory.d.ts +89 -211
- package/dist/{supplier-BVdCk7nI.js → supplier-C877x7mU.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CDeGXhur.js → use-ingredient-select-dialog-ClufUFeU.js} +1 -1
- package/dist/{use-inventory-binding-dialog-CeRKqMy7.js → use-inventory-binding-dialog-BuRe6QNp.js} +1 -1
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +44 -0
- package/dist/views/recipe/components/recipe-override-form-field/RecipeOverrideFormField.vue.d.ts +61 -0
- package/dist/views/recipe/composables/use-recipe-overrides-form-field.d.ts +10 -0
- package/dist/{vue-i18n-3Mh8tKq8.js → vue-i18n-CxuQa0ds.js} +337 -337
- package/package.json +4 -3
- package/dist/IngredientGroupView-DE15kdqH.js +0 -604
- package/dist/RecipeView-BTS1LBKZ.js +0 -616
- package/dist/views/ingredient-group/IngredientGroupView.vue.d.ts +0 -3
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -12
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -20
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
- package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -218
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as ee, onMounted as ve, computed as U, ref as Q, watch as be, inject as et, resolveComponent as A, openBlock as R, createElementBlock as j, createElementVNode as s, createVNode as p, withCtx as N, renderSlot as Re, withDirectives as Ae, normalizeClass as X, vModelText as Pe, reactive as tt, h as
|
|
2
|
-
import { G as
|
|
1
|
+
import { defineComponent as ee, onMounted as ve, computed as U, ref as Q, watch as be, inject as et, resolveComponent as A, openBlock as R, createElementBlock as j, createElementVNode as s, createVNode as p, withCtx as N, renderSlot as Re, withDirectives as Ae, normalizeClass as X, vModelText as Pe, reactive as tt, h as J, toDisplayString as D, unref as t, createCommentVNode as oe, Fragment as _e, renderList as ze, normalizeStyle as He, createBlock as Z, mergeProps as Qe, isRef as je, Teleport as st, normalizeProps as ot, guardReactiveProps as lt } from "vue";
|
|
2
|
+
import { G as Ge, ay as ce, t as Ue, I as nt, az as at, aA as rt, i as Y, aB as it, b as ut, a as Ke, $ as Be, l as fe, O as me, J as ue, A as ye, M as dt, E as W, u as We, ac as mt, T as pt, C as Ye, d as ne, aC as de, a9 as ct, a1 as ft, z as yt, h as Le, _ as vt, B as bt } from "./app-CUTIQqG_.js";
|
|
3
3
|
import { useI18n as le } from "@feedmepos/mf-common";
|
|
4
|
-
import { P as
|
|
5
|
-
import { components as se, useDialog as
|
|
4
|
+
import { P as K, a as _t, f as ht, t as xt, b as qe, u as gt } from "./format-unit-display-CqqBiewI.js";
|
|
5
|
+
import { components as se, useDialog as Tt, useSnackbar as kt, useProxiedModel as Je, useBreakpoints as wt } from "@feedmepos/ui-library";
|
|
6
6
|
import { defineStore as Ft, storeToRefs as Ee } from "pinia";
|
|
7
|
-
import { _ as It, b as St, F as Ct, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as pe } from "./feature-
|
|
9
|
-
import { c as Ot, u as Mt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as Dt } from "./supplier-
|
|
11
|
-
import { u as Rt } from "./use-ingredient-select-dialog-
|
|
7
|
+
import { _ as It, b as St, F as Ct, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-R8f-Q9Nk.js";
|
|
8
|
+
import { u as pe } from "./feature-D5GLIW5h.js";
|
|
9
|
+
import { c as Ot, u as Mt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DvCBsPdI.js";
|
|
10
|
+
import { u as Dt } from "./supplier-C877x7mU.js";
|
|
11
|
+
import { u as Rt } from "./use-ingredient-select-dialog-ClufUFeU.js";
|
|
12
12
|
const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { class: "flex-1" }, Bt = { class: "flex items-center" }, Lt = { class: "flex-1" }, qt = { class: "flex-1" }, Et = /* @__PURE__ */ ee({
|
|
13
13
|
__name: "FmMinMaxInput",
|
|
14
14
|
props: {
|
|
@@ -47,11 +47,11 @@ const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { c
|
|
|
47
47
|
helperState: {}
|
|
48
48
|
},
|
|
49
49
|
setup(m) {
|
|
50
|
-
const c = m, v =
|
|
50
|
+
const c = m, v = Ge("modelValue"), e = nt();
|
|
51
51
|
ve(() => {
|
|
52
52
|
const { min: y, max: d } = v ?? {};
|
|
53
53
|
if (!(!y || !d) && y.precision !== d.precision) {
|
|
54
|
-
const
|
|
54
|
+
const T = Math.max(y.precision, d.precision), a = ce(y, T), f = ce(d, T);
|
|
55
55
|
v.min = a, v.max = f;
|
|
56
56
|
}
|
|
57
57
|
});
|
|
@@ -60,40 +60,40 @@ const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { c
|
|
|
60
60
|
return Math.max((y == null ? void 0 : y.precision) ?? 0, (d == null ? void 0 : d.precision) ?? 0, c.precision ?? 0);
|
|
61
61
|
}), g = (y) => {
|
|
62
62
|
if (!y) return "";
|
|
63
|
-
const d = at(y),
|
|
63
|
+
const d = at(y), T = n.value, a = ce(d, T);
|
|
64
64
|
return rt(
|
|
65
65
|
+Y(a),
|
|
66
66
|
a.precision
|
|
67
67
|
);
|
|
68
68
|
}, b = Q(g(v.min)), i = Q(g(v.max));
|
|
69
69
|
be([b, i], ([y, d]) => {
|
|
70
|
-
const
|
|
70
|
+
const T = v ?? {}, a = e(y), f = e(d), C = n.value;
|
|
71
71
|
if (y !== "" && a === !0) {
|
|
72
72
|
const $ = Ue(+y, C);
|
|
73
|
-
|
|
73
|
+
T.min = $;
|
|
74
74
|
} else
|
|
75
|
-
|
|
75
|
+
T.min = null;
|
|
76
76
|
if (d !== "" && f === !0) {
|
|
77
77
|
const $ = Ue(+d, C);
|
|
78
|
-
|
|
78
|
+
T.max = $;
|
|
79
79
|
} else
|
|
80
|
-
|
|
81
|
-
v.min =
|
|
80
|
+
T.max = null;
|
|
81
|
+
v.min = T.min, v.max = T.max;
|
|
82
82
|
});
|
|
83
|
-
const o = Symbol.for("fm:form-state"), u = et(o, null), _ = U(() => c.disabled ?? (u == null ? void 0 : u.getDisabled()) ?? !1), P = Q(), I = Q(), h = Q(!1), S = Q(!1), V = U(() => h.value || S.value),
|
|
83
|
+
const o = Symbol.for("fm:form-state"), u = et(o, null), _ = U(() => c.disabled ?? (u == null ? void 0 : u.getDisabled()) ?? !1), P = Q(), I = Q(), h = Q(!1), S = Q(!1), V = U(() => h.value || S.value), G = U(() => [...[
|
|
84
84
|
function() {
|
|
85
85
|
return typeof e(b.value) == "string" || typeof e(i.value) == "string" ? "Must be a number" : !0;
|
|
86
86
|
},
|
|
87
|
-
function(
|
|
88
|
-
return !
|
|
87
|
+
function(T) {
|
|
88
|
+
return !T || !T.min || !T.max ? !0 : +Y(T.min) > +Y(T.max) ? "Min must be less than or equal to max" : !0;
|
|
89
89
|
}
|
|
90
90
|
], ...c.rules ?? []]);
|
|
91
91
|
return (y, d) => {
|
|
92
|
-
const
|
|
92
|
+
const T = A("FmLabel"), a = A("FmField"), f = A("FmFormGroup");
|
|
93
93
|
return R(), j("div", At, [
|
|
94
94
|
s("div", Pt, [
|
|
95
95
|
s("div", Ut, [
|
|
96
|
-
p(
|
|
96
|
+
p(T, {
|
|
97
97
|
label: y.label,
|
|
98
98
|
disabled: y.disabled,
|
|
99
99
|
required: y.labelMark === "required",
|
|
@@ -151,7 +151,7 @@ const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { c
|
|
|
151
151
|
class: "flex-1",
|
|
152
152
|
"model-value": y.modelValue,
|
|
153
153
|
info: y.labelInfo,
|
|
154
|
-
rules:
|
|
154
|
+
rules: G.value,
|
|
155
155
|
"helper-text": y.helperText,
|
|
156
156
|
"helper-state": y.helperState
|
|
157
157
|
}, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
|
|
@@ -176,7 +176,7 @@ function Ht(m) {
|
|
|
176
176
|
return !g && !b ? `Min & max must be a multiple of ${v}` : g ? b ? !0 : `Max must be a multiple of ${v}` : `Min must be a multiple of ${v}`;
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
const
|
|
179
|
+
const Ze = Ft("transfer-template-helper", () => {
|
|
180
180
|
const m = ut();
|
|
181
181
|
function c(v, e, n, g, b) {
|
|
182
182
|
var o;
|
|
@@ -201,9 +201,9 @@ const Je = Ft("transfer-template-helper", () => {
|
|
|
201
201
|
};
|
|
202
202
|
});
|
|
203
203
|
var H = /* @__PURE__ */ ((m) => (m.Code = "Code", m.Name = "Name", m.DefaultAmount = "DefaultAmount", m.Limit = "Limit", m.Step = "Step", m.Cost = "Cost", m.Delete = "Delete", m))(H || {});
|
|
204
|
-
const Ne =
|
|
204
|
+
const Ne = Ze();
|
|
205
205
|
function Qt(m) {
|
|
206
|
-
const { t: c } = le(), v =
|
|
206
|
+
const { t: c } = le(), v = Ke(), e = pe(), n = tt({});
|
|
207
207
|
ve(() => {
|
|
208
208
|
for (const i of m.items) {
|
|
209
209
|
if (!i.totalCost)
|
|
@@ -222,7 +222,7 @@ function Qt(m) {
|
|
|
222
222
|
size: 180,
|
|
223
223
|
cell(i) {
|
|
224
224
|
const o = i.row.original;
|
|
225
|
-
return
|
|
225
|
+
return J(se.FmTextField, {
|
|
226
226
|
modelValue: o.code,
|
|
227
227
|
"onUpdate:modelValue": (u) => {
|
|
228
228
|
m.updateItem({
|
|
@@ -243,7 +243,7 @@ function Qt(m) {
|
|
|
243
243
|
minSize: 300,
|
|
244
244
|
cell(i) {
|
|
245
245
|
const o = i.row.original;
|
|
246
|
-
return
|
|
246
|
+
return J(se.FmTextField, {
|
|
247
247
|
modelValue: o.name,
|
|
248
248
|
"onUpdate:modelValue": (u) => {
|
|
249
249
|
m.updateItem({
|
|
@@ -268,7 +268,7 @@ function Qt(m) {
|
|
|
268
268
|
var V;
|
|
269
269
|
return ((V = o.measurement) == null ? void 0 : V.id) === S.id;
|
|
270
270
|
}), I = o.sku.unit._id !== u.unit._id || !_ || o.measurement && !P;
|
|
271
|
-
return
|
|
271
|
+
return J(It, {
|
|
272
272
|
style: {
|
|
273
273
|
flex: "1 1 0%"
|
|
274
274
|
},
|
|
@@ -328,7 +328,7 @@ function Qt(m) {
|
|
|
328
328
|
minSize: 280,
|
|
329
329
|
cell(i) {
|
|
330
330
|
const o = i.row.original;
|
|
331
|
-
return
|
|
331
|
+
return J(Et, {
|
|
332
332
|
style: {
|
|
333
333
|
flex: "1 1 0%"
|
|
334
334
|
},
|
|
@@ -365,7 +365,7 @@ function Qt(m) {
|
|
|
365
365
|
minSize: 100,
|
|
366
366
|
cell(i) {
|
|
367
367
|
const o = i.row.original;
|
|
368
|
-
return
|
|
368
|
+
return J(se.FmTextField, {
|
|
369
369
|
modelValue: Y(o.quantityStep ?? Be.reset(), !1),
|
|
370
370
|
key: o.sku._id,
|
|
371
371
|
"onUpdate:modelValue": (u) => {
|
|
@@ -390,8 +390,8 @@ function Qt(m) {
|
|
|
390
390
|
header: "",
|
|
391
391
|
cell(i) {
|
|
392
392
|
const o = i.row.original;
|
|
393
|
-
return
|
|
394
|
-
e.usePurchaseOrderV2 ?
|
|
393
|
+
return J("div", { class: "flex items-center" }, [
|
|
394
|
+
e.usePurchaseOrderV2 ? J(
|
|
395
395
|
se.FmTooltip,
|
|
396
396
|
{
|
|
397
397
|
zIndex: 50,
|
|
@@ -399,7 +399,7 @@ function Qt(m) {
|
|
|
399
399
|
},
|
|
400
400
|
{
|
|
401
401
|
default() {
|
|
402
|
-
return
|
|
402
|
+
return J(se.FmButton, {
|
|
403
403
|
key: o.sku._id,
|
|
404
404
|
type: "button",
|
|
405
405
|
icon: "add_circle",
|
|
@@ -435,7 +435,7 @@ function Qt(m) {
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
) : null,
|
|
438
|
-
|
|
438
|
+
J(se.FmButton, {
|
|
439
439
|
class: "delete-button",
|
|
440
440
|
key: o.sku._id,
|
|
441
441
|
type: "button",
|
|
@@ -458,10 +458,10 @@ function Qt(m) {
|
|
|
458
458
|
}
|
|
459
459
|
];
|
|
460
460
|
return {
|
|
461
|
-
columnDefs: U(() => pe().enableTotalCost && m.transferType ===
|
|
461
|
+
columnDefs: U(() => pe().enableTotalCost && m.transferType === K.PURCHASE ? g : g.filter((o) => o.id !== "Cost"))
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
|
-
const jt = { class: "flex flex-col gap-8 py-16" },
|
|
464
|
+
const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-center" }, Kt = { class: "flex-1 flex gap-1 items-center" }, Wt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Yt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Jt = { class: "flex gap-8 w-full" }, Zt = { class: "flex-1 flex flex-col gap-4" }, Xt = { class: "flex-1 flex flex-col gap-4" }, es = {
|
|
465
465
|
key: 0,
|
|
466
466
|
class: "flex gap-8 w-full"
|
|
467
467
|
}, ts = { class: "flex-1 flex flex-col gap-4" }, ss = { class: "flex-1 flex flex-col gap-4" }, os = { class: "flex gap-8 w-full" }, ls = { class: "flex-1 flex flex-col gap-4" }, ns = /* @__PURE__ */ ee({
|
|
@@ -476,11 +476,11 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
476
476
|
return e;
|
|
477
477
|
}
|
|
478
478
|
return (e, n) => {
|
|
479
|
-
var b, i, o, u, _, P, I, h, S, V,
|
|
479
|
+
var b, i, o, u, _, P, I, h, S, V, G, y, d, T, a, f, C, $, x, l, r, k, F, B, z, O, M, L, q, w;
|
|
480
480
|
const g = A("FmLabel");
|
|
481
481
|
return R(), j("div", jt, [
|
|
482
|
-
s("div",
|
|
483
|
-
s("div",
|
|
482
|
+
s("div", Gt, [
|
|
483
|
+
s("div", Kt, [
|
|
484
484
|
s("span", Wt, " (" + D(e.row.original.sku.code) + ") ", 1),
|
|
485
485
|
s("span", Yt, D(e.row.original.sku.name), 1)
|
|
486
486
|
]),
|
|
@@ -491,8 +491,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
491
491
|
}, null, 8, ["render", "props"])
|
|
492
492
|
])
|
|
493
493
|
]),
|
|
494
|
-
s("div",
|
|
495
|
-
s("div",
|
|
494
|
+
s("div", Jt, [
|
|
495
|
+
s("div", Zt, [
|
|
496
496
|
p(g, {
|
|
497
497
|
label: t(c)(`inventory.transfer.form.items.table.${t(H).Code}`)
|
|
498
498
|
}, null, 8, ["label"]),
|
|
@@ -507,8 +507,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
507
507
|
label: t(c)(`inventory.transfer.form.items.table.${t(H).Name}`)
|
|
508
508
|
}, null, 8, ["label"]),
|
|
509
509
|
p(t(W), {
|
|
510
|
-
render: (d = (y = (
|
|
511
|
-
props: (a = (
|
|
510
|
+
render: (d = (y = (G = e.cellByColId[t(H).Name]) == null ? void 0 : G.column) == null ? void 0 : y.columnDef) == null ? void 0 : d.cell,
|
|
511
|
+
props: (a = (T = e.cellByColId[t(H).Name]) == null ? void 0 : T.getContext) == null ? void 0 : a.call(T)
|
|
512
512
|
}, null, 8, ["render", "props"]),
|
|
513
513
|
n[1] || (n[1] = s("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
514
514
|
])
|
|
@@ -529,7 +529,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
529
529
|
label: t(c)(`inventory.transfer.form.items.table.${t(H).Step}`)
|
|
530
530
|
}, null, 8, ["label"]),
|
|
531
531
|
p(t(W), {
|
|
532
|
-
render: (F = (
|
|
532
|
+
render: (F = (k = (r = e.cellByColId[t(H).Step]) == null ? void 0 : r.column) == null ? void 0 : k.columnDef) == null ? void 0 : F.cell,
|
|
533
533
|
props: (z = (B = e.cellByColId[t(H).Step]) == null ? void 0 : B.getContext) == null ? void 0 : z.call(B)
|
|
534
534
|
}, null, 8, ["render", "props"]),
|
|
535
535
|
n[3] || (n[3] = s("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -590,7 +590,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
590
590
|
disabled: { type: Boolean }
|
|
591
591
|
},
|
|
592
592
|
setup(m, { expose: c }) {
|
|
593
|
-
const v = m, e =
|
|
593
|
+
const v = m, e = Ge(), { t: n } = le(), g = We(), b = Ke(), i = Dt(), o = pe(), u = Ze();
|
|
594
594
|
be(
|
|
595
595
|
() => v.modelValue,
|
|
596
596
|
(l) => {
|
|
@@ -598,7 +598,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
598
598
|
}
|
|
599
599
|
), g.watchLocation(async () => {
|
|
600
600
|
location && (e.purchaseOrder.supplier || (e.purchaseOrder.supplier = i.suppliers.find((l) => l) ?? e.purchaseOrder.supplier));
|
|
601
|
-
}),
|
|
601
|
+
}), Tt();
|
|
602
602
|
const _ = Mt(
|
|
603
603
|
() => e.purchaseOrder,
|
|
604
604
|
(l) => {
|
|
@@ -610,12 +610,12 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
610
610
|
), P = U({
|
|
611
611
|
get() {
|
|
612
612
|
var l, r;
|
|
613
|
-
return typeof ((r = (l = e.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : r.internal) == "string" ?
|
|
613
|
+
return typeof ((r = (l = e.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : r.internal) == "string" ? K.TRANSFER : K.PURCHASE;
|
|
614
614
|
},
|
|
615
615
|
set(l) {
|
|
616
|
-
var
|
|
617
|
-
const r = typeof ((F = (
|
|
618
|
-
l !== r && (e.purchaseOrder.supplier = l ===
|
|
616
|
+
var k, F;
|
|
617
|
+
const r = typeof ((F = (k = e.purchaseOrder) == null ? void 0 : k.supplier) == null ? void 0 : F.internal) == "string" ? K.TRANSFER : K.PURCHASE;
|
|
618
|
+
l !== r && (e.purchaseOrder.supplier = l === K.PURCHASE ? _.locationOptionsTypePurchase.value[0] : _.locationOptionsTypeTransfer.value[0]);
|
|
619
619
|
}
|
|
620
620
|
}), I = U(() => _.transferLocationOptions.value), h = U({
|
|
621
621
|
get() {
|
|
@@ -628,7 +628,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
628
628
|
}), {
|
|
629
629
|
promptSelectLocations: S,
|
|
630
630
|
columnDefs: V,
|
|
631
|
-
rowData:
|
|
631
|
+
rowData: G
|
|
632
632
|
} = mt({
|
|
633
633
|
getLocations() {
|
|
634
634
|
return e.locations;
|
|
@@ -639,9 +639,9 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
639
639
|
});
|
|
640
640
|
function y() {
|
|
641
641
|
var l, r;
|
|
642
|
-
return (l = e.locations) != null && l.find((
|
|
642
|
+
return (l = e.locations) != null && l.find((k) => {
|
|
643
643
|
var F, B;
|
|
644
|
-
return ((F =
|
|
644
|
+
return ((F = k.doc) == null ? void 0 : F._id) === ((B = e.purchaseOrder.supplier) == null ? void 0 : B._id);
|
|
645
645
|
}) ? `Location ${(r = e.purchaseOrder.supplier) == null ? void 0 : r.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
646
646
|
}
|
|
647
647
|
const d = U({
|
|
@@ -651,19 +651,19 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
651
651
|
set(l) {
|
|
652
652
|
e.purchaseOrder.remark = l;
|
|
653
653
|
}
|
|
654
|
-
}),
|
|
654
|
+
}), T = Q();
|
|
655
655
|
c({
|
|
656
656
|
validateInputs: () => {
|
|
657
657
|
var l, r;
|
|
658
|
-
(r = (l =
|
|
658
|
+
(r = (l = T.value) == null ? void 0 : l.validateInputs) == null || r.call(l);
|
|
659
659
|
},
|
|
660
660
|
resetInputsValidation: () => {
|
|
661
661
|
var l, r;
|
|
662
|
-
(r = (l =
|
|
662
|
+
(r = (l = T.value) == null ? void 0 : l.resetInputsValidation) == null || r.call(l);
|
|
663
663
|
},
|
|
664
664
|
resetInputs: () => {
|
|
665
665
|
var l, r;
|
|
666
|
-
(r = (l =
|
|
666
|
+
(r = (l = T.value) == null ? void 0 : l.resetInputs) == null || r.call(l);
|
|
667
667
|
}
|
|
668
668
|
});
|
|
669
669
|
const a = U(() => ({
|
|
@@ -677,12 +677,12 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
677
677
|
},
|
|
678
678
|
updateItem: (l) => {
|
|
679
679
|
let r = [];
|
|
680
|
-
l.id ? r = e.purchaseOrder.items.map((
|
|
680
|
+
l.id ? r = e.purchaseOrder.items.map((k) => k.id !== l.id ? k : l) : r = e.purchaseOrder.items.map((k) => k.sku._id !== l.sku._id ? k : l), e.purchaseOrder.items = r;
|
|
681
681
|
},
|
|
682
682
|
deleteItem: (l) => {
|
|
683
683
|
console.log(l.id);
|
|
684
684
|
let r = [];
|
|
685
|
-
l.id ? r = e.purchaseOrder.items.filter((
|
|
685
|
+
l.id ? r = e.purchaseOrder.items.filter((k) => k.id !== l.id) : r = e.purchaseOrder.items.filter((k) => k.sku._id !== l.sku._id), e.purchaseOrder.items = r;
|
|
686
686
|
}
|
|
687
687
|
})), f = Qt({
|
|
688
688
|
duplicateItem: a.value.duplicateItem,
|
|
@@ -695,7 +695,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
695
695
|
return e.purchaseOrder.items;
|
|
696
696
|
},
|
|
697
697
|
get transferType() {
|
|
698
|
-
return
|
|
698
|
+
return K.PURCHASE;
|
|
699
699
|
},
|
|
700
700
|
get disabled() {
|
|
701
701
|
return v.disabled;
|
|
@@ -709,10 +709,10 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
709
709
|
})).filter((O) => {
|
|
710
710
|
var M;
|
|
711
711
|
return (M = e.purchaseOrder.items) == null ? void 0 : M.find((L) => L.sku._id === O.value._id);
|
|
712
|
-
}).map((O) => O.value),
|
|
712
|
+
}).map((O) => O.value), k = e.purchaseOrder.items ?? [], F = await $(
|
|
713
713
|
r.map((O) => O._id),
|
|
714
714
|
(O) => {
|
|
715
|
-
const M = b.skuById[O], L =
|
|
715
|
+
const M = b.skuById[O], L = k.find((E) => E.sku._id === M._id);
|
|
716
716
|
if (L)
|
|
717
717
|
return L;
|
|
718
718
|
const q = { amount: 1, precision: me(M.unit) };
|
|
@@ -745,7 +745,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
745
745
|
if (!F) return;
|
|
746
746
|
const B = F.map((O) => O.sku._id), z = [];
|
|
747
747
|
for (const O of B) {
|
|
748
|
-
const M =
|
|
748
|
+
const M = k.filter((L) => L.sku._id === O);
|
|
749
749
|
if (M.length > 0)
|
|
750
750
|
z.push(...M);
|
|
751
751
|
else {
|
|
@@ -756,10 +756,10 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
756
756
|
z.sort((O, M) => O.sku.code.localeCompare(M.sku.code)), e.purchaseOrder.items = z;
|
|
757
757
|
}
|
|
758
758
|
return (l, r) => {
|
|
759
|
-
const
|
|
760
|
-
return R(),
|
|
759
|
+
const k = A("FmTextField"), F = A("FmSelect"), B = A("FmTextarea"), z = A("FmButton"), O = A("FmTable"), M = A("FmFormGroup"), L = A("FmForm");
|
|
760
|
+
return R(), Z(L, {
|
|
761
761
|
ref_key: "formRef",
|
|
762
|
-
ref:
|
|
762
|
+
ref: T,
|
|
763
763
|
class: "flex flex-col gap-32",
|
|
764
764
|
disabled: l.disabled
|
|
765
765
|
}, {
|
|
@@ -768,7 +768,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
768
768
|
return [
|
|
769
769
|
s("div", us, [
|
|
770
770
|
s("div", ds, [
|
|
771
|
-
p(
|
|
771
|
+
p(k, {
|
|
772
772
|
label: t(n)("inventory.transfer.form.name"),
|
|
773
773
|
"label-mark": "required",
|
|
774
774
|
modelValue: t(e).name,
|
|
@@ -782,13 +782,13 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
782
782
|
items: [
|
|
783
783
|
{
|
|
784
784
|
label: t(n)("inventory.transfer.form.type.purchase"),
|
|
785
|
-
value: t(
|
|
785
|
+
value: t(K).PURCHASE,
|
|
786
786
|
disabled: !t(_).locationOptionsTypePurchase.value.length,
|
|
787
787
|
sublabel: t(_).locationOptionsTypePurchase.value.length ? void 0 : t(n)("inventory.transfer.form.noSupplierAvailable")
|
|
788
788
|
},
|
|
789
789
|
{
|
|
790
790
|
label: t(n)("inventory.transfer.form.type.transfer"),
|
|
791
|
-
value: t(
|
|
791
|
+
value: t(K).TRANSFER,
|
|
792
792
|
disabled: !t(_).locationOptionsTypeTransfer.value.length,
|
|
793
793
|
sublabel: t(_).locationOptionsTypeTransfer.value.length ? void 0 : t(n)("inventory.transfer.form.noLocationAvailable")
|
|
794
794
|
}
|
|
@@ -806,7 +806,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
806
806
|
_: 1
|
|
807
807
|
}, 8, ["label", "model-value", "items", "rules"]),
|
|
808
808
|
p(F, {
|
|
809
|
-
label: P.value === t(
|
|
809
|
+
label: P.value === t(K).PURCHASE ? t(n)("inventory.transfer.form.purchaseFrom") : t(n)("inventory.transfer.form.transferFrom"),
|
|
810
810
|
modelValue: h.value,
|
|
811
811
|
"onUpdate:modelValue": r[2] || (r[2] = (w) => h.value = w),
|
|
812
812
|
items: I.value
|
|
@@ -833,7 +833,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
833
833
|
}),
|
|
834
834
|
_: 1
|
|
835
835
|
}, 8, ["label", "modelValue", "items"]),
|
|
836
|
-
p(
|
|
836
|
+
p(k, {
|
|
837
837
|
label: t(n)("inventory.transfer.form.reference"),
|
|
838
838
|
"label-mark": "optional",
|
|
839
839
|
modelValue: t(e).purchaseOrder.ref,
|
|
@@ -863,7 +863,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
863
863
|
]),
|
|
864
864
|
p(O, {
|
|
865
865
|
"column-defs": t(V),
|
|
866
|
-
"row-data": t(
|
|
866
|
+
"row-data": t(G),
|
|
867
867
|
"shrink-at": 9999,
|
|
868
868
|
onRowClick: t(S),
|
|
869
869
|
"hide-footer": ""
|
|
@@ -891,7 +891,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
891
891
|
size: "md"
|
|
892
892
|
}, null, 8, ["disabled", "label"])
|
|
893
893
|
]),
|
|
894
|
-
(R(),
|
|
894
|
+
(R(), Z(O, {
|
|
895
895
|
"column-defs": C.value,
|
|
896
896
|
"row-data": t(e).purchaseOrder.items,
|
|
897
897
|
key: t(e).purchaseOrder.items.map((w) => w.sku._id).join("."),
|
|
@@ -906,7 +906,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
906
906
|
}, null, 8, ["row", "disabled"])
|
|
907
907
|
]),
|
|
908
908
|
"list-row": N((w) => [
|
|
909
|
-
(R(),
|
|
909
|
+
(R(), Z(Ye, {
|
|
910
910
|
row: w,
|
|
911
911
|
key: t(e).purchaseOrder.items.map((E) => E.sku._id).join(".")
|
|
912
912
|
}, {
|
|
@@ -943,8 +943,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
943
943
|
},
|
|
944
944
|
emits: ["update:show", "submitted"],
|
|
945
945
|
setup(m, { expose: c, emit: v }) {
|
|
946
|
-
var
|
|
947
|
-
const e = m, n = v, g = _t(), b =
|
|
946
|
+
var T;
|
|
947
|
+
const e = m, n = v, g = _t(), b = kt(), { t: i } = le(), o = Je(e, "show");
|
|
948
948
|
function u() {
|
|
949
949
|
return {
|
|
950
950
|
_id: "",
|
|
@@ -975,7 +975,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
975
975
|
}
|
|
976
976
|
};
|
|
977
977
|
}
|
|
978
|
-
const _ = Q(e.modelValue ?? u()), P = Q(((
|
|
978
|
+
const _ = Q(e.modelValue ?? u()), P = Q(((T = e.modelValue) == null ? void 0 : T._id) ?? `${Math.random()}`);
|
|
979
979
|
be(
|
|
980
980
|
() => e.show,
|
|
981
981
|
(a) => {
|
|
@@ -1032,7 +1032,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
|
-
async function
|
|
1035
|
+
async function G() {
|
|
1036
1036
|
var f, C;
|
|
1037
1037
|
const a = _.value;
|
|
1038
1038
|
if (a) {
|
|
@@ -1061,7 +1061,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1061
1061
|
case ne.CREATE:
|
|
1062
1062
|
return V();
|
|
1063
1063
|
case ne.UPDATE:
|
|
1064
|
-
return
|
|
1064
|
+
return G();
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
function d() {
|
|
@@ -1070,7 +1070,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1070
1070
|
}
|
|
1071
1071
|
return (a, f) => {
|
|
1072
1072
|
const C = A("FmButton"), $ = A("FmSideSheet");
|
|
1073
|
-
return R(),
|
|
1073
|
+
return R(), Z($, {
|
|
1074
1074
|
modelValue: t(o),
|
|
1075
1075
|
"onUpdate:modelValue": f[2] || (f[2] = (x) => je(o) ? o.value = x : null),
|
|
1076
1076
|
"dismiss-away": "",
|
|
@@ -1083,7 +1083,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1083
1083
|
])
|
|
1084
1084
|
]),
|
|
1085
1085
|
default: N(() => [
|
|
1086
|
-
(R(),
|
|
1086
|
+
(R(), Z(bs, {
|
|
1087
1087
|
class: "w-full",
|
|
1088
1088
|
ref_key: "formRef",
|
|
1089
1089
|
ref: S,
|
|
@@ -1113,7 +1113,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1113
1113
|
}, 8, ["modelValue"]);
|
|
1114
1114
|
};
|
|
1115
1115
|
}
|
|
1116
|
-
}),
|
|
1116
|
+
}), Ts = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, ks = { class: "flex justify-between" }, ws = { class: "fm-typo-en-body-lg-600" }, Fs = { class: "fm-status-badge fm-status-badge-info-secondary" }, Is = { class: "flex flex-col gap-8" }, Ss = { class: "flex flex-col gap-4" }, Cs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $s = { class: "flex gap-1" }, Os = { class: "fm-typo-en-body-lg-600" }, Ms = {
|
|
1117
1117
|
key: 0,
|
|
1118
1118
|
class: "flex flex-col gap-4"
|
|
1119
1119
|
}, Vs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ds = { class: "fm-typo-en-body-lg-600" }, Rs = {
|
|
@@ -1122,13 +1122,13 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1122
1122
|
}, As = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ps = { class: "fm-typo-en-body-lg-600" }, Us = {
|
|
1123
1123
|
key: 2,
|
|
1124
1124
|
class: "flex flex-col gap-4"
|
|
1125
|
-
}, Bs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ls = { class: "fm-typo-en-body-lg-600" }, qs = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Es = { class: "flex flex-col gap-8" }, Ns = { class: "fm-typo-en-body-lg-600" }, zs = { class: "flex w-full gap-4" }, Hs = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, Qs = { class: "fm-typo-en-body-lg-600 shrink-0" }, js = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" },
|
|
1125
|
+
}, Bs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ls = { class: "fm-typo-en-body-lg-600" }, qs = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Es = { class: "flex flex-col gap-8" }, Ns = { class: "fm-typo-en-body-lg-600" }, zs = { class: "flex w-full gap-4" }, Hs = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, Qs = { class: "fm-typo-en-body-lg-600 shrink-0" }, js = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Gs = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Ks = {
|
|
1126
1126
|
key: 0,
|
|
1127
1127
|
class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1128
1128
|
}, Ws = {
|
|
1129
1129
|
key: 0,
|
|
1130
1130
|
class: "flex gap-4 items-center"
|
|
1131
|
-
}, Ys = { class: "flex flex-col gap-12" },
|
|
1131
|
+
}, Ys = { class: "flex flex-col gap-12" }, Js = { class: "flex flex-col gap-8" }, Zs = { class: "flex gap-8 xs:flex-col" }, Xs = /* @__PURE__ */ ee({
|
|
1132
1132
|
__name: "TransferTemplateDetails",
|
|
1133
1133
|
props: {
|
|
1134
1134
|
template: {},
|
|
@@ -1145,13 +1145,13 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1145
1145
|
], o = Q(""), u = U(
|
|
1146
1146
|
() => {
|
|
1147
1147
|
var I, h, S, V;
|
|
1148
|
-
return ((h = (I = b.value) == null ? void 0 : I.supplier) == null ? void 0 : h.internal) === "restaurant" || ((V = (S = b.value) == null ? void 0 : S.supplier) == null ? void 0 : V.internal) === "warehouse" ?
|
|
1148
|
+
return ((h = (I = b.value) == null ? void 0 : I.supplier) == null ? void 0 : h.internal) === "restaurant" || ((V = (S = b.value) == null ? void 0 : S.supplier) == null ? void 0 : V.internal) === "warehouse" ? K.TRANSFER : K.PURCHASE;
|
|
1149
1149
|
}
|
|
1150
|
-
), _ = Q(!0), P =
|
|
1150
|
+
), _ = Q(!0), P = Je(v, "show");
|
|
1151
1151
|
return (I, h) => {
|
|
1152
1152
|
var f;
|
|
1153
|
-
const S = A("FmMenuDivider"), V = A("FmCard"),
|
|
1154
|
-
return R(),
|
|
1153
|
+
const S = A("FmMenuDivider"), V = A("FmCard"), G = A("FmIcon"), y = A("FmTextField"), d = A("FmTable"), T = A("FmButton"), a = A("FmSideSheet");
|
|
1154
|
+
return R(), Z(a, {
|
|
1155
1155
|
header: t(g)("inventory.transfer.template.details.view", { template: (f = I.template) == null ? void 0 : f.name }),
|
|
1156
1156
|
modelValue: t(P),
|
|
1157
1157
|
"onUpdate:modelValue": h[2] || (h[2] = (C) => je(P) ? P.value = C : null),
|
|
@@ -1162,16 +1162,16 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1162
1162
|
default: N(() => {
|
|
1163
1163
|
var C, $;
|
|
1164
1164
|
return [
|
|
1165
|
-
s("div",
|
|
1165
|
+
s("div", Ts, [
|
|
1166
1166
|
s("div", null, [
|
|
1167
1167
|
p(V, {
|
|
1168
1168
|
variant: "outlined",
|
|
1169
1169
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1170
1170
|
}, {
|
|
1171
1171
|
default: N(() => {
|
|
1172
|
-
var x, l, r,
|
|
1172
|
+
var x, l, r, k, F, B, z;
|
|
1173
1173
|
return [
|
|
1174
|
-
s("div",
|
|
1174
|
+
s("div", ks, [
|
|
1175
1175
|
s("div", ws, D(t(g)("inventory.transfer.template.details.templateSummary")), 1),
|
|
1176
1176
|
s("div", Fs, D(t(g)(
|
|
1177
1177
|
`inventory.transfer.receiveRequest.details.type.${u.value.toLocaleLowerCase("en-US")}`
|
|
@@ -1187,7 +1187,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1187
1187
|
]),
|
|
1188
1188
|
(r = (l = b.value) == null ? void 0 : l.supplier) != null && r.name ? (R(), j("div", Ms, [
|
|
1189
1189
|
s("div", Vs, D(t(g)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1190
|
-
s("div", Ds, D((F = (
|
|
1190
|
+
s("div", Ds, D((F = (k = b.value) == null ? void 0 : k.supplier) == null ? void 0 : F.name), 1)
|
|
1191
1191
|
])) : oe("", !0),
|
|
1192
1192
|
(B = b.value) != null && B.ref ? (R(), j("div", Rs, [
|
|
1193
1193
|
s("div", As, D(t(g)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
@@ -1216,11 +1216,11 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1216
1216
|
s("div", Qs, D(t(ht)(x.quantity, x.sku.unit, x.measurement)), 1)
|
|
1217
1217
|
]),
|
|
1218
1218
|
s("div", js, [
|
|
1219
|
-
s("div",
|
|
1220
|
-
x.totalCost && t(n).enableTotalCost ? (R(), j("div",
|
|
1219
|
+
s("div", Gs, D(x.code), 1),
|
|
1220
|
+
x.totalCost && t(n).enableTotalCost ? (R(), j("div", Ks, " (" + D(t(ft)(x.totalCost)) + ") ", 1)) : oe("", !0)
|
|
1221
1221
|
]),
|
|
1222
1222
|
t(xt)(x) ? (R(), j("div", Ws, [
|
|
1223
|
-
p(
|
|
1223
|
+
p(G, {
|
|
1224
1224
|
name: "error",
|
|
1225
1225
|
color: "system-error-300",
|
|
1226
1226
|
size: "sm"
|
|
@@ -1237,7 +1237,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1237
1237
|
s("div", { class: "fm-typo-en-body-lg-600" }, "Enabled locations"),
|
|
1238
1238
|
s("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is only usable for the following locations. ")
|
|
1239
1239
|
], -1)),
|
|
1240
|
-
s("div",
|
|
1240
|
+
s("div", Js, [
|
|
1241
1241
|
p(y, {
|
|
1242
1242
|
modelValue: o.value,
|
|
1243
1243
|
"onUpdate:modelValue": h[0] || (h[0] = (x) => o.value = x),
|
|
@@ -1257,8 +1257,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1257
1257
|
];
|
|
1258
1258
|
}),
|
|
1259
1259
|
"side-sheet-footer": N(() => [
|
|
1260
|
-
s("div",
|
|
1261
|
-
p(
|
|
1260
|
+
s("div", Zs, [
|
|
1261
|
+
p(T, {
|
|
1262
1262
|
label: t(g)("common.edit"),
|
|
1263
1263
|
onClick: h[1] || (h[1] = (C) => e("action:edit")),
|
|
1264
1264
|
variant: "tertiary"
|
|
@@ -1276,7 +1276,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1276
1276
|
ve(o.fetchTemplates);
|
|
1277
1277
|
const V = U(
|
|
1278
1278
|
() => P.value || u.value || !h._currentLocation
|
|
1279
|
-
),
|
|
1279
|
+
), G = U(() => _.value), y = Q(""), d = U(() => S.value.xs || S.value.sm), T = U(() => d.value ? 10 : 20);
|
|
1280
1280
|
function a($) {
|
|
1281
1281
|
switch ($) {
|
|
1282
1282
|
case Le.Add:
|
|
@@ -1338,25 +1338,25 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1338
1338
|
p(bt, {
|
|
1339
1339
|
searchable: "",
|
|
1340
1340
|
search: y.value,
|
|
1341
|
-
"onUpdate:search": x[0] || (x[0] = (
|
|
1341
|
+
"onUpdate:search": x[0] || (x[0] = (k) => y.value = k)
|
|
1342
1342
|
}, null, 8, ["search"]),
|
|
1343
|
-
(R(),
|
|
1343
|
+
(R(), Z(l, {
|
|
1344
1344
|
style: He(t(I).tableHeight),
|
|
1345
1345
|
"column-defs": t(o).columnDefs,
|
|
1346
|
-
"row-data":
|
|
1346
|
+
"row-data": G.value,
|
|
1347
1347
|
"search-value": y.value,
|
|
1348
1348
|
loading: V.value,
|
|
1349
1349
|
key: (r = t(h)._currentLocation) == null ? void 0 : r.dbName,
|
|
1350
|
-
onRowClick: x[1] || (x[1] = (
|
|
1351
|
-
"page-size":
|
|
1350
|
+
onRowClick: x[1] || (x[1] = (k) => t(e)(k.original)),
|
|
1351
|
+
"page-size": T.value
|
|
1352
1352
|
}, {
|
|
1353
|
-
"list-row": N((
|
|
1353
|
+
"list-row": N((k) => [
|
|
1354
1354
|
p(Ye, {
|
|
1355
|
-
row:
|
|
1355
|
+
row: k,
|
|
1356
1356
|
onRowClick: (F) => t(e)(F)
|
|
1357
1357
|
}, {
|
|
1358
1358
|
default: N((F) => {
|
|
1359
|
-
var B, z, O, M, L, q, w, E, te, he, xe, ge,
|
|
1359
|
+
var B, z, O, M, L, q, w, E, te, he, xe, ge, Te, ae, ke, we, Fe, Ie, Se, Ce, re, $e, Oe, Me, Ve, ie, De;
|
|
1360
1360
|
return [
|
|
1361
1361
|
s("div", eo, [
|
|
1362
1362
|
s("div", to, [
|
|
@@ -1374,12 +1374,12 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1374
1374
|
]),
|
|
1375
1375
|
s("div", lo, [
|
|
1376
1376
|
p(t(W), {
|
|
1377
|
-
render: (
|
|
1378
|
-
props: (
|
|
1377
|
+
render: (Te = (ge = (xe = F.supplier) == null ? void 0 : xe.column) == null ? void 0 : ge.columnDef) == null ? void 0 : Te.cell,
|
|
1378
|
+
props: (ke = (ae = F.supplier) == null ? void 0 : ae.getContext) == null ? void 0 : ke.call(ae)
|
|
1379
1379
|
}, null, 8, ["render", "props"])
|
|
1380
1380
|
]),
|
|
1381
|
-
s("div", null, D((we =
|
|
1382
|
-
s("div", no, D(
|
|
1381
|
+
s("div", null, D((we = k.original.locations) != null && we.length ? `Enabled for ${(Fe = k.original.locations) == null ? void 0 : Fe.length} outlets` : "Enabled for all outlets"), 1),
|
|
1382
|
+
s("div", no, D(k.original.purchaseOrder.items.length ? k.original.purchaseOrder.items.map((Xe) => Xe.name).join(", ") : "No items"), 1),
|
|
1383
1383
|
s("div", ao, [
|
|
1384
1384
|
p(t(W), {
|
|
1385
1385
|
render: (Ce = (Se = (Ie = F.ref) == null ? void 0 : Ie.column) == null ? void 0 : Se.columnDef) == null ? void 0 : Ce.cell,
|
|
@@ -1406,7 +1406,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1406
1406
|
}),
|
|
1407
1407
|
_: 1
|
|
1408
1408
|
}, 8, ["title", "actions"]),
|
|
1409
|
-
(R(),
|
|
1409
|
+
(R(), Z(st, { to: "body" }, [
|
|
1410
1410
|
p(Xs, ot(lt(t(i))), null, 16),
|
|
1411
1411
|
p(gs, Qe(t(b), {
|
|
1412
1412
|
onSubmitted: x[2] || (x[2] = (r) => t(o).fetchTemplates())
|