@feedmepos/mf-inventory-portal 0.0.23-dev.23 → 0.0.23-dev.25
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-BvEB-iR6.js → App-CNgj7enS.js} +49 -45
- package/dist/{ApprovalView-BmPYoGNQ.js → ApprovalView-CaVxfwVZ.js} +15 -15
- package/dist/{BindingsDialog-BqKMRdvl.js → BindingsDialog-jRZXoJFn.js} +9 -9
- package/dist/{BindingsPicker-BaEdafvS.js → BindingsPicker-B1HSa3PR.js} +5 -5
- package/dist/{BindingsTable--d-nM2Gv.js → BindingsTable-OF56C-md.js} +8 -8
- package/dist/ClosingDraftView-B6okKype.js +1134 -0
- package/dist/{ClosingTemplateView-BdUGSMOi.js → ClosingTemplateView-iX4shLcv.js} +251 -255
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CIk6CwoD.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bj2M9OAD.js} +13 -13
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Bt1hyXul.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CnPZaNTp.js} +46 -46
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-wYnVSXtH.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CGpmbbpm.js} +7 -7
- package/dist/{IngredientGroupView-0-nzZJcl.js → IngredientGroupView-BeW-0hWb.js} +40 -40
- package/dist/{IngredientsView-ClRyZ-cb.js → IngredientsView-CuVBlnOu.js} +207 -210
- package/dist/{IntegrationView-CgmsV7oX.js → IntegrationView-lDfeScNo.js} +89 -90
- package/dist/{InventoryBindingForm-DnnGejy0.js → InventoryBindingForm-D6EuWIkE.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CapSS-KQ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CUpKKG4l.js} +27 -27
- package/dist/{InventoryBindingSummary-Dz-F2ofe.js → InventoryBindingSummary-CD60iCr_.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-glXw963h.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-7jkFhj27.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DpIyyZL-.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DDXsfGVf.js} +17 -18
- package/dist/{PurchaseOrderPrintPreview--hGI0aFU.js → PurchaseOrderPrintPreview-eJxn76Ir.js} +1 -1
- package/dist/{ReceiveRequestView-cPIOC0rj.js → ReceiveRequestView-D6Cdkd36.js} +26 -27
- package/dist/{RecipeView-BK74973y.js → RecipeView-BWy56DhW.js} +47 -48
- package/dist/{StockView-D6TYfv5x.js → StockView-BEXAvBjP.js} +7 -7
- package/dist/{SupplierView-BFwzHw7l.js → SupplierView-C4vwkzdX.js} +203 -206
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-ChwtBdsS.js → TransferDetails.vue_vue_type_script_setup_true_lang-CIcj9NWg.js} +61 -62
- package/dist/{TransferTemplateView-De5sG12Q.js → TransferTemplateView-27Ng_EgG.js} +144 -145
- package/dist/{UnitView-CQoB6Uq_.js → UnitView-CXvkO_fh.js} +3 -3
- package/dist/{WarehouseView-Di4mLjoS.js → WarehouseView-Cl6HN1EW.js} +52 -52
- package/dist/app-Dt6Yd1pM.js +84133 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-D2WMzK1d.js → decimal-D1M8NkLV.js} +1 -1
- package/dist/{feature-SYqA_m5m.js → feature-CqDcAtUy.js} +1 -1
- package/dist/{format-unit-display-D0G-LaQY.js → format-unit-display-BI9EVHb3.js} +50 -53
- package/dist/{index-Bj8PDCww.js → index-7V6E004u.js} +1 -1
- package/dist/{stock-CEexJdO3.js → stock-wjdjOqbM.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-BdB47EjI.js → supplier-D3-7dgm5.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-n3khDS2D.js → use-inventory-binding-dialog-BLHffZgi.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/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +178 -8
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1498 -478
- package/package.json +3 -3
- package/dist/ClosingDraftView-Clh7bujC.js +0 -1116
- package/dist/FmDroppableField-DHhcKcJf.js +0 -154
- package/dist/app-DpJictvi.js +0 -58871
- package/dist/netsuite-TWj-9PDj.js +0 -251
- package/dist/xlsx-Cbd5szA2.js +0 -24004
- package/dist/xlsx.util-hCH_XTAD.js +0 -78
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { defineComponent as J, onMounted as ce, computed as R, ref as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as J, onMounted as ce, computed as R, ref as E, watch as pe, inject as Ze, resolveComponent as V, openBlock as A, createElementBlock as K, createElementVNode as t, createVNode as c, withCtx as q, renderSlot as Oe, withDirectives as Ve, normalizeClass as ie, vModelText as De, reactive as Je, h as Z, toDisplayString as O, unref as e, createBlock as W, mergeProps as Ee, isRef as Ue, createCommentVNode as Y, Fragment as qe, renderList as Xe, normalizeStyle as Ye, Teleport as et, normalizeProps as tt, guardReactiveProps as ot } from "vue";
|
|
2
|
+
import { G as Ne, aB as ue, t as Ae, I as st, aC as lt, aD as nt, i as G, aE as at, b as ze, Z as Re, l as me, a as He, O as re, K as rt, A as de, M as it, E as Q, u as je, af as ut, B as Qe, H as mt, J as dt, d as ee, aF as ne, ac as ct, a0 as pt, x as ft, h as Pe, y as yt, z as vt } from "./app-Dt6Yd1pM.js";
|
|
3
3
|
import { useI18n as X } from "@feedmepos/mf-common";
|
|
4
|
-
import { P as H, a as bt, f as xt, t as _t, b as Le, u as ht } from "./format-unit-display-
|
|
5
|
-
import { components as ae, useDialog as gt, useSnackbar as Tt, useProxiedModel as
|
|
4
|
+
import { P as H, a as bt, f as xt, t as _t, b as Le, u as ht } from "./format-unit-display-BI9EVHb3.js";
|
|
5
|
+
import { components as ae, useDialog as gt, useSnackbar as Tt, useProxiedModel as Ke, useBreakpoints as Ft } from "@feedmepos/ui-library";
|
|
6
6
|
import { storeToRefs as Be } from "pinia";
|
|
7
|
-
import { _ as wt, b as kt, F as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { class: "flex-1" }, Rt = { class: "flex items-center" }, Pt = { class: "flex-1" }, Lt = { class: "flex-1" }, Bt = /* @__PURE__ */ J({
|
|
7
|
+
import { _ as wt, b as kt, F as Ct, a as St } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CnPZaNTp.js";
|
|
8
|
+
import { u as Ge } from "./feature-CqDcAtUy.js";
|
|
9
|
+
import { c as Mt, u as $t, _ as It } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bj2M9OAD.js";
|
|
10
|
+
import { u as Ot } from "./supplier-D3-7dgm5.js";
|
|
11
|
+
const Vt = { class: "flex flex-col" }, Dt = { class: "flex flex-col" }, At = { class: "flex-1" }, Rt = { class: "flex items-center" }, Pt = { class: "flex-1" }, Lt = { class: "flex-1" }, Bt = /* @__PURE__ */ J({
|
|
13
12
|
__name: "FmMinMaxInput",
|
|
14
13
|
props: {
|
|
15
14
|
rules: {},
|
|
@@ -58,29 +57,29 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { c
|
|
|
58
57
|
const m = R(() => {
|
|
59
58
|
const { min: p, max: r } = u ?? {};
|
|
60
59
|
return Math.max((p == null ? void 0 : p.precision) ?? 0, (r == null ? void 0 : r.precision) ?? 0, x.precision ?? 0);
|
|
61
|
-
}),
|
|
60
|
+
}), C = (p) => {
|
|
62
61
|
if (!p) return "";
|
|
63
62
|
const r = lt(p), b = m.value, a = ue(r, b);
|
|
64
63
|
return nt(
|
|
65
64
|
+G(a),
|
|
66
65
|
a.precision
|
|
67
66
|
);
|
|
68
|
-
}, i =
|
|
67
|
+
}, i = E(C(u.min)), l = E(C(u.max));
|
|
69
68
|
pe([i, l], ([p, r]) => {
|
|
70
69
|
const b = u ?? {}, a = o(p), f = o(r), w = m.value;
|
|
71
70
|
if (p !== "" && a === !0) {
|
|
72
|
-
const s =
|
|
71
|
+
const s = Ae(+p, w);
|
|
73
72
|
b.min = s;
|
|
74
73
|
} else
|
|
75
74
|
b.min = null;
|
|
76
75
|
if (r !== "" && f === !0) {
|
|
77
|
-
const s =
|
|
76
|
+
const s = Ae(+r, w);
|
|
78
77
|
b.max = s;
|
|
79
78
|
} else
|
|
80
79
|
b.max = null;
|
|
81
80
|
u.min = b.min, u.max = b.max;
|
|
82
81
|
});
|
|
83
|
-
const d = Symbol.for("fm:form-state"), k = Ze(d, null), h = R(() => x.disabled ?? (k == null ? void 0 : k.getDisabled()) ?? !1),
|
|
82
|
+
const d = Symbol.for("fm:form-state"), k = Ze(d, null), h = R(() => x.disabled ?? (k == null ? void 0 : k.getDisabled()) ?? !1), D = E(), F = E(), v = E(!1), g = E(!1), I = R(() => v.value || g.value), B = R(() => [...[
|
|
84
83
|
function() {
|
|
85
84
|
return typeof o(i.value) == "string" || typeof o(l.value) == "string" ? "Must be a number" : !0;
|
|
86
85
|
},
|
|
@@ -90,9 +89,9 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { c
|
|
|
90
89
|
], ...x.rules ?? []]);
|
|
91
90
|
return (p, r) => {
|
|
92
91
|
const b = V("FmLabel"), a = V("FmField"), f = V("FmFormGroup");
|
|
93
|
-
return
|
|
94
|
-
t("div",
|
|
95
|
-
t("div",
|
|
92
|
+
return A(), K("div", Vt, [
|
|
93
|
+
t("div", Dt, [
|
|
94
|
+
t("div", At, [
|
|
96
95
|
c(b, {
|
|
97
96
|
label: p.label,
|
|
98
97
|
disabled: p.disabled,
|
|
@@ -109,7 +108,7 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { c
|
|
|
109
108
|
Ve(t("input", {
|
|
110
109
|
type: "text",
|
|
111
110
|
ref_key: "minInputRef",
|
|
112
|
-
ref:
|
|
111
|
+
ref: D,
|
|
113
112
|
onFocus: r[0] || (r[0] = () => v.value = !0),
|
|
114
113
|
onBlur: r[1] || (r[1] = () => v.value = !1),
|
|
115
114
|
"onUpdate:modelValue": r[2] || (r[2] = (w) => i.value = w),
|
|
@@ -119,7 +118,7 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { c
|
|
|
119
118
|
"text-fm-color-typo-disabled": h.value
|
|
120
119
|
})
|
|
121
120
|
}, null, 34), [
|
|
122
|
-
[
|
|
121
|
+
[De, i.value]
|
|
123
122
|
])
|
|
124
123
|
]),
|
|
125
124
|
r[7] || (r[7] = t("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
@@ -138,7 +137,7 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { c
|
|
|
138
137
|
"text-fm-color-typo-disabled": h.value
|
|
139
138
|
})
|
|
140
139
|
}, null, 34), [
|
|
141
|
-
[
|
|
140
|
+
[De, l.value]
|
|
142
141
|
])
|
|
143
142
|
]),
|
|
144
143
|
Oe(p.$slots, "append")
|
|
@@ -159,12 +158,12 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { c
|
|
|
159
158
|
};
|
|
160
159
|
}
|
|
161
160
|
});
|
|
162
|
-
function
|
|
161
|
+
function Et({ min: y, max: x } = { min: !0, max: !0 }) {
|
|
163
162
|
return function(o) {
|
|
164
163
|
return !o || !o.min && y != !1 || !o.max && x != !1 ? "Required" : !0;
|
|
165
164
|
};
|
|
166
165
|
}
|
|
167
|
-
function
|
|
166
|
+
function Ut(y, x) {
|
|
168
167
|
return function(o) {
|
|
169
168
|
return !o || !o.min || !o.max ? !0 : +G(o.min) < y ? `Must be between ${y} and ${x}` : +G(o.max) > x ? `Must be between ${y} and ${x}` : !0;
|
|
170
169
|
};
|
|
@@ -172,13 +171,13 @@ function Et(y, x) {
|
|
|
172
171
|
function qt(y) {
|
|
173
172
|
const x = at(y), u = G(y);
|
|
174
173
|
return function(m) {
|
|
175
|
-
const
|
|
176
|
-
return !
|
|
174
|
+
const C = !(m != null && m.min) || x(m.min) === !0, i = !(m != null && m.max) || x(m.max) === !0;
|
|
175
|
+
return !C && !i ? `Min & max must be a multiple of ${u}` : C ? i ? !0 : `Max must be a multiple of ${u}` : `Min must be a multiple of ${u}`;
|
|
177
176
|
};
|
|
178
177
|
}
|
|
179
178
|
var L = /* @__PURE__ */ ((y) => (y.Code = "Code", y.Name = "Name", y.DefaultAmount = "DefaultAmount", y.Limit = "Limit", y.MinimumAmount = "MinimumAmount", y.Step = "Step", y.Cost = "Cost", y.Delete = "Delete", y))(L || {});
|
|
180
179
|
function Nt(y) {
|
|
181
|
-
const { t: x } = X(), u =
|
|
180
|
+
const { t: x } = X(), u = ze(), o = Je({});
|
|
182
181
|
ce(() => {
|
|
183
182
|
for (const i of y.items) {
|
|
184
183
|
if (!i.totalCost)
|
|
@@ -239,10 +238,10 @@ function Nt(y) {
|
|
|
239
238
|
minSize: 200,
|
|
240
239
|
cell(i) {
|
|
241
240
|
var v;
|
|
242
|
-
const l = i.row.original, d =
|
|
241
|
+
const l = i.row.original, d = He(), k = d.skuById[l.sku._id], h = d.unitById[(v = k.unit) == null ? void 0 : v._id], D = h.measurements.find((g) => {
|
|
243
242
|
var I;
|
|
244
243
|
return ((I = l.measurement) == null ? void 0 : I.id) === g.id;
|
|
245
|
-
}), F = l.sku.unit._id !== k.unit._id || !h || l.measurement && !
|
|
244
|
+
}), F = l.sku.unit._id !== k.unit._id || !h || l.measurement && !D;
|
|
246
245
|
return Z(wt, {
|
|
247
246
|
style: {
|
|
248
247
|
flex: "1 1 0%"
|
|
@@ -272,7 +271,7 @@ function Nt(y) {
|
|
|
272
271
|
},
|
|
273
272
|
rules: [
|
|
274
273
|
kt(l.quantityStep),
|
|
275
|
-
|
|
274
|
+
Ct(
|
|
276
275
|
+G(
|
|
277
276
|
l.minimumQuantity ?? {
|
|
278
277
|
amount: 1,
|
|
@@ -281,7 +280,7 @@ function Nt(y) {
|
|
|
281
280
|
}
|
|
282
281
|
)
|
|
283
282
|
),
|
|
284
|
-
|
|
283
|
+
St(
|
|
285
284
|
l.maximumQuantity ? +G(l.maximumQuantity) : 1 / 0
|
|
286
285
|
),
|
|
287
286
|
function(I) {
|
|
@@ -316,9 +315,9 @@ function Nt(y) {
|
|
|
316
315
|
d != null && d.min ? k.minimumQuantity = d.min : k.minimumQuantity = null, d != null && d.max ? k.maximumQuantity = d.max : k.maximumQuantity = null, y.updateItem(k);
|
|
317
316
|
},
|
|
318
317
|
rules: [
|
|
319
|
-
|
|
318
|
+
Et({ max: !1 }),
|
|
320
319
|
qt(l.quantityStep),
|
|
321
|
-
|
|
320
|
+
Ut(
|
|
322
321
|
+G({
|
|
323
322
|
amount: 1,
|
|
324
323
|
precision: re(l.sku.unit, l.measurement)
|
|
@@ -384,10 +383,10 @@ function Nt(y) {
|
|
|
384
383
|
}
|
|
385
384
|
];
|
|
386
385
|
return {
|
|
387
|
-
columnDefs: R(() =>
|
|
386
|
+
columnDefs: R(() => Ge().enableTotalCost && y.transferType === H.PURCHASE ? m : m.filter((l) => l.id !== "Cost"))
|
|
388
387
|
};
|
|
389
388
|
}
|
|
390
|
-
const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-center" },
|
|
389
|
+
const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-center" }, jt = { class: "flex-1 flex gap-1 items-center" }, Qt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Kt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Gt = { class: "flex gap-8 w-full" }, Wt = { class: "flex-1 flex flex-col gap-4" }, Zt = { class: "flex-1 flex flex-col gap-4" }, Jt = { class: "flex gap-8 w-full" }, Xt = { class: "flex-1 flex flex-col gap-4" }, Yt = { class: "flex-1 flex flex-col gap-4" }, eo = { class: "flex gap-8 w-full" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = /* @__PURE__ */ J({
|
|
391
390
|
__name: "TransferTemplateItem",
|
|
392
391
|
props: {
|
|
393
392
|
cellByColId: {},
|
|
@@ -396,17 +395,17 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
396
395
|
setup(y) {
|
|
397
396
|
const { t: x } = X();
|
|
398
397
|
return (u, o) => {
|
|
399
|
-
var
|
|
398
|
+
var C, i, l, d, k, h, D, F, v, g, I, B, p, r, b, a, f, w, s, n, S, $, M, _, P, U, N, j, T, z;
|
|
400
399
|
const m = V("FmLabel");
|
|
401
|
-
return
|
|
400
|
+
return A(), K("div", zt, [
|
|
402
401
|
t("div", Ht, [
|
|
403
|
-
t("div",
|
|
404
|
-
t("span",
|
|
402
|
+
t("div", jt, [
|
|
403
|
+
t("span", Qt, " (" + O(u.row.original.sku.code) + ") ", 1),
|
|
405
404
|
t("span", Kt, O(u.row.original.sku.name), 1)
|
|
406
405
|
]),
|
|
407
406
|
t("div", null, [
|
|
408
|
-
c(e(
|
|
409
|
-
render: (l = (i = (
|
|
407
|
+
c(e(Q), {
|
|
408
|
+
render: (l = (i = (C = u.cellByColId.Delete) == null ? void 0 : C.column) == null ? void 0 : i.columnDef) == null ? void 0 : l.cell,
|
|
410
409
|
props: (k = (d = u.cellByColId.Delete) == null ? void 0 : d.getContext) == null ? void 0 : k.call(d)
|
|
411
410
|
}, null, 8, ["render", "props"])
|
|
412
411
|
])
|
|
@@ -416,8 +415,8 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
416
415
|
c(m, {
|
|
417
416
|
label: e(x)(`inventory.transfer.form.items.table.${e(L).Code}`)
|
|
418
417
|
}, null, 8, ["label"]),
|
|
419
|
-
c(e(
|
|
420
|
-
render: (F = (
|
|
418
|
+
c(e(Q), {
|
|
419
|
+
render: (F = (D = (h = u.cellByColId[e(L).Code]) == null ? void 0 : h.column) == null ? void 0 : D.columnDef) == null ? void 0 : F.cell,
|
|
421
420
|
props: (g = (v = u.cellByColId[e(L).Code]) == null ? void 0 : v.getContext) == null ? void 0 : g.call(v)
|
|
422
421
|
}, null, 8, ["render", "props"]),
|
|
423
422
|
o[0] || (o[0] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -426,7 +425,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
426
425
|
c(m, {
|
|
427
426
|
label: e(x)(`inventory.transfer.form.items.table.${e(L).Name}`)
|
|
428
427
|
}, null, 8, ["label"]),
|
|
429
|
-
c(e(
|
|
428
|
+
c(e(Q), {
|
|
430
429
|
render: (p = (B = (I = u.cellByColId[e(L).Name]) == null ? void 0 : I.column) == null ? void 0 : B.columnDef) == null ? void 0 : p.cell,
|
|
431
430
|
props: (b = (r = u.cellByColId[e(L).Name]) == null ? void 0 : r.getContext) == null ? void 0 : b.call(r)
|
|
432
431
|
}, null, 8, ["render", "props"]),
|
|
@@ -438,7 +437,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
438
437
|
c(m, {
|
|
439
438
|
label: e(x)(`inventory.transfer.form.items.table.${e(L).DefaultAmount}`)
|
|
440
439
|
}, null, 8, ["label"]),
|
|
441
|
-
c(e(
|
|
440
|
+
c(e(Q), {
|
|
442
441
|
render: (w = (f = (a = u.cellByColId[e(L).DefaultAmount]) == null ? void 0 : a.column) == null ? void 0 : f.columnDef) == null ? void 0 : w.cell,
|
|
443
442
|
props: (n = (s = u.cellByColId[e(L).DefaultAmount]) == null ? void 0 : s.getContext) == null ? void 0 : n.call(s)
|
|
444
443
|
}, null, 8, ["render", "props"]),
|
|
@@ -448,8 +447,8 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
448
447
|
c(m, {
|
|
449
448
|
label: e(x)(`inventory.transfer.form.items.table.${e(L).Step}`)
|
|
450
449
|
}, null, 8, ["label"]),
|
|
451
|
-
c(e(
|
|
452
|
-
render: (M = ($ = (
|
|
450
|
+
c(e(Q), {
|
|
451
|
+
render: (M = ($ = (S = u.cellByColId[e(L).Step]) == null ? void 0 : S.column) == null ? void 0 : $.columnDef) == null ? void 0 : M.cell,
|
|
453
452
|
props: (P = (_ = u.cellByColId[e(L).Step]) == null ? void 0 : _.getContext) == null ? void 0 : P.call(_)
|
|
454
453
|
}, null, 8, ["render", "props"]),
|
|
455
454
|
o[3] || (o[3] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -460,8 +459,8 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
460
459
|
c(m, {
|
|
461
460
|
label: e(x)(`inventory.transfer.form.items.table.${e(L).Limit}`)
|
|
462
461
|
}, null, 8, ["label"]),
|
|
463
|
-
c(e(
|
|
464
|
-
render: (
|
|
462
|
+
c(e(Q), {
|
|
463
|
+
render: (j = (N = (U = u.cellByColId[e(L).Limit]) == null ? void 0 : U.column) == null ? void 0 : N.columnDef) == null ? void 0 : j.cell,
|
|
465
464
|
props: (z = (T = u.cellByColId[e(L).Limit]) == null ? void 0 : T.getContext) == null ? void 0 : z.call(T)
|
|
466
465
|
}, null, 8, ["render", "props"]),
|
|
467
466
|
o[4] || (o[4] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -477,13 +476,13 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
477
476
|
disabled: { type: Boolean }
|
|
478
477
|
},
|
|
479
478
|
setup(y, { expose: x }) {
|
|
480
|
-
const u = y, o = Ne(), { t: m } = X(),
|
|
479
|
+
const u = y, o = Ne(), { t: m } = X(), C = je(), i = He(), l = Ot(), d = ze();
|
|
481
480
|
pe(
|
|
482
481
|
() => u.modelValue,
|
|
483
482
|
(s) => {
|
|
484
483
|
console.log("TransferTemplateForm.model", s);
|
|
485
484
|
}
|
|
486
|
-
),
|
|
485
|
+
), C.watchLocation(async () => {
|
|
487
486
|
location && (o.purchaseOrder.supplier || (o.purchaseOrder.supplier = l.suppliers.find((s) => s) ?? o.purchaseOrder.supplier));
|
|
488
487
|
});
|
|
489
488
|
const k = gt(), h = $t(
|
|
@@ -494,14 +493,14 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
494
493
|
supplier: s.supplier ?? (o == null ? void 0 : o.purchaseOrder.supplier)
|
|
495
494
|
};
|
|
496
495
|
}
|
|
497
|
-
),
|
|
496
|
+
), D = R({
|
|
498
497
|
get() {
|
|
499
498
|
var s, n;
|
|
500
499
|
return typeof ((n = (s = o.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : n.internal) == "string" ? H.TRANSFER : H.PURCHASE;
|
|
501
500
|
},
|
|
502
501
|
set(s) {
|
|
503
|
-
var
|
|
504
|
-
const n = typeof (($ = (
|
|
502
|
+
var S, $;
|
|
503
|
+
const n = typeof (($ = (S = o.purchaseOrder) == null ? void 0 : S.supplier) == null ? void 0 : $.internal) == "string" ? H.TRANSFER : H.PURCHASE;
|
|
505
504
|
s !== n && (o.purchaseOrder.supplier = s === H.PURCHASE ? h.locationOptionsTypePurchase.value[0] : h.locationOptionsTypeTransfer.value[0]);
|
|
506
505
|
}
|
|
507
506
|
}), F = R(() => h.transferLocationOptions.value), v = R({
|
|
@@ -526,9 +525,9 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
526
525
|
});
|
|
527
526
|
function p() {
|
|
528
527
|
var s, n;
|
|
529
|
-
return (s = o.locations) != null && s.find((
|
|
528
|
+
return (s = o.locations) != null && s.find((S) => {
|
|
530
529
|
var $, M;
|
|
531
|
-
return (($ =
|
|
530
|
+
return (($ = S.doc) == null ? void 0 : $._id) === ((M = o.purchaseOrder.supplier) == null ? void 0 : M._id);
|
|
532
531
|
}) ? `Location ${(n = o.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
533
532
|
}
|
|
534
533
|
const r = R({
|
|
@@ -538,7 +537,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
538
537
|
set(s) {
|
|
539
538
|
o.purchaseOrder.remark = s;
|
|
540
539
|
}
|
|
541
|
-
}), b =
|
|
540
|
+
}), b = E();
|
|
542
541
|
x({
|
|
543
542
|
validateInputs: () => {
|
|
544
543
|
var s, n;
|
|
@@ -576,14 +575,14 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
576
575
|
}
|
|
577
576
|
}), f = R(() => a.columnDefs.value);
|
|
578
577
|
function w() {
|
|
579
|
-
const s = i.skus.map((
|
|
580
|
-
label:
|
|
581
|
-
sublabel:
|
|
582
|
-
value:
|
|
583
|
-
})), n = s.filter((
|
|
578
|
+
const s = i.skus.map((S) => ({
|
|
579
|
+
label: S.name,
|
|
580
|
+
sublabel: S.code,
|
|
581
|
+
value: S
|
|
582
|
+
})), n = s.filter((S) => {
|
|
584
583
|
var $;
|
|
585
|
-
return ($ = o.purchaseOrder.items) == null ? void 0 : $.find((M) => M.sku._id ===
|
|
586
|
-
}).map((
|
|
584
|
+
return ($ = o.purchaseOrder.items) == null ? void 0 : $.find((M) => M.sku._id === S.value._id);
|
|
585
|
+
}).map((S) => S.value);
|
|
587
586
|
k.open({
|
|
588
587
|
title: m("inventory.transfer.form.items.selectItem"),
|
|
589
588
|
closeButton: !0,
|
|
@@ -602,20 +601,20 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
602
601
|
close: !0,
|
|
603
602
|
variant: "tertiary"
|
|
604
603
|
}
|
|
605
|
-
}).onPrimary((
|
|
606
|
-
const $ = o.purchaseOrder.items ?? [], M =
|
|
604
|
+
}).onPrimary((S) => {
|
|
605
|
+
const $ = o.purchaseOrder.items ?? [], M = S.map((_) => {
|
|
607
606
|
const P = $.find((T) => T.sku._id === _._id);
|
|
608
607
|
if (P)
|
|
609
608
|
return P;
|
|
610
|
-
let
|
|
609
|
+
let U = _.code;
|
|
611
610
|
if (d.isEnabled) {
|
|
612
611
|
const T = d.getItemPKTCode(_);
|
|
613
|
-
T && (
|
|
612
|
+
T && (U = T);
|
|
614
613
|
}
|
|
615
614
|
const N = { amount: 1, precision: re(_.unit) };
|
|
616
615
|
return {
|
|
617
616
|
sku: _,
|
|
618
|
-
code:
|
|
617
|
+
code: U,
|
|
619
618
|
name: _.name,
|
|
620
619
|
quantity: N,
|
|
621
620
|
minimumQuantity: N,
|
|
@@ -630,19 +629,19 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
630
629
|
});
|
|
631
630
|
}
|
|
632
631
|
return (s, n) => {
|
|
633
|
-
const
|
|
634
|
-
return
|
|
632
|
+
const S = V("FmTextField"), $ = V("FmSelect"), M = V("FmTextarea"), _ = V("FmButton"), P = V("FmTable"), U = V("FmFormGroup"), N = V("FmForm");
|
|
633
|
+
return A(), W(N, {
|
|
635
634
|
ref_key: "formRef",
|
|
636
635
|
ref: b,
|
|
637
636
|
class: "flex flex-col gap-32",
|
|
638
637
|
disabled: s.disabled
|
|
639
638
|
}, {
|
|
640
639
|
default: q(() => {
|
|
641
|
-
var
|
|
640
|
+
var j;
|
|
642
641
|
return [
|
|
643
642
|
t("div", so, [
|
|
644
643
|
t("div", lo, [
|
|
645
|
-
c(
|
|
644
|
+
c(S, {
|
|
646
645
|
label: e(m)("inventory.transfer.form.name"),
|
|
647
646
|
"label-mark": "required",
|
|
648
647
|
modelValue: e(o).name,
|
|
@@ -651,8 +650,8 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
651
650
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
652
651
|
c($, {
|
|
653
652
|
label: e(m)("inventory.transfer.form.type.title"),
|
|
654
|
-
"model-value":
|
|
655
|
-
"onUpdate:modelValue": n[1] || (n[1] = (T) =>
|
|
653
|
+
"model-value": D.value,
|
|
654
|
+
"onUpdate:modelValue": n[1] || (n[1] = (T) => D.value = T),
|
|
656
655
|
items: [
|
|
657
656
|
{
|
|
658
657
|
label: e(m)("inventory.transfer.form.type.purchase"),
|
|
@@ -670,7 +669,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
670
669
|
rules: [e(de)(1)(F.value)]
|
|
671
670
|
}, null, 8, ["label", "model-value", "items", "rules"]),
|
|
672
671
|
c($, {
|
|
673
|
-
label:
|
|
672
|
+
label: D.value === e(H).PURCHASE ? e(m)("inventory.transfer.form.purchaseFrom") : e(m)("inventory.transfer.form.transferFrom"),
|
|
674
673
|
modelValue: v.value,
|
|
675
674
|
"onUpdate:modelValue": n[2] || (n[2] = (T) => v.value = T),
|
|
676
675
|
items: F.value
|
|
@@ -678,7 +677,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
678
677
|
"menu-wrapper": q((T) => {
|
|
679
678
|
var z;
|
|
680
679
|
return [
|
|
681
|
-
c(It,
|
|
680
|
+
c(It, Ee(T, {
|
|
682
681
|
items: F.value,
|
|
683
682
|
"model-value": (z = s.modelValue.purchaseOrder.supplier) == null ? void 0 : z._id
|
|
684
683
|
}), null, 16, ["items", "model-value"])
|
|
@@ -686,7 +685,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
686
685
|
}),
|
|
687
686
|
_: 1
|
|
688
687
|
}, 8, ["label", "modelValue", "items"]),
|
|
689
|
-
c(
|
|
688
|
+
c(S, {
|
|
690
689
|
label: e(m)("inventory.transfer.form.reference"),
|
|
691
690
|
"label-mark": "optional",
|
|
692
691
|
modelValue: e(o).purchaseOrder.ref,
|
|
@@ -722,9 +721,9 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
722
721
|
"hide-footer": ""
|
|
723
722
|
}, null, 8, ["column-defs", "row-data", "onRowClick"]),
|
|
724
723
|
t("div", ro, [
|
|
725
|
-
c(
|
|
724
|
+
c(U, {
|
|
726
725
|
"model-value": [
|
|
727
|
-
(
|
|
726
|
+
(j = u.modelValue.purchaseOrder.supplier) == null ? void 0 : j._id,
|
|
728
727
|
...u.modelValue.locations ?? []
|
|
729
728
|
].join(","),
|
|
730
729
|
rules: [p]
|
|
@@ -744,7 +743,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
744
743
|
size: "md"
|
|
745
744
|
}, null, 8, ["disabled", "label"])
|
|
746
745
|
]),
|
|
747
|
-
(
|
|
746
|
+
(A(), W(P, {
|
|
748
747
|
"column-defs": f.value,
|
|
749
748
|
"row-data": e(o).purchaseOrder.items,
|
|
750
749
|
key: e(o).purchaseOrder.items.map((T) => T.sku._id).join("."),
|
|
@@ -752,7 +751,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
752
751
|
"page-size": e(o).purchaseOrder.items.length
|
|
753
752
|
}, {
|
|
754
753
|
"list-row": q((T) => [
|
|
755
|
-
(
|
|
754
|
+
(A(), W(Qe, {
|
|
756
755
|
row: T,
|
|
757
756
|
key: e(o).purchaseOrder.items.map((z) => z.sku._id).join(".")
|
|
758
757
|
}, {
|
|
@@ -767,7 +766,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
767
766
|
]),
|
|
768
767
|
_: 1
|
|
769
768
|
}, 8, ["column-defs", "row-data", "page-size"])),
|
|
770
|
-
c(
|
|
769
|
+
c(U, {
|
|
771
770
|
"model-value": e(o).purchaseOrder.items.length,
|
|
772
771
|
rules: [e(de)(1)]
|
|
773
772
|
}, null, 8, ["model-value", "rules"])
|
|
@@ -788,7 +787,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
788
787
|
emits: ["update:show", "submitted"],
|
|
789
788
|
setup(y, { expose: x, emit: u }) {
|
|
790
789
|
var b;
|
|
791
|
-
const o = y, m = u,
|
|
790
|
+
const o = y, m = u, C = bt(), i = Tt(), { t: l } = X(), d = Ke(o, "show");
|
|
792
791
|
function k() {
|
|
793
792
|
return {
|
|
794
793
|
_id: "",
|
|
@@ -819,15 +818,15 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
819
818
|
}
|
|
820
819
|
};
|
|
821
820
|
}
|
|
822
|
-
const h =
|
|
821
|
+
const h = E(o.modelValue ?? k()), D = E(((b = o.modelValue) == null ? void 0 : b._id) ?? `${Math.random()}`);
|
|
823
822
|
pe(
|
|
824
823
|
() => o.show,
|
|
825
824
|
(a) => {
|
|
826
825
|
var f;
|
|
827
|
-
a && (h.value = o.modelValue ?? k(),
|
|
826
|
+
a && (h.value = o.modelValue ?? k(), D.value = ((f = o.modelValue) == null ? void 0 : f._id) ?? `${Math.random()}`);
|
|
828
827
|
}
|
|
829
828
|
);
|
|
830
|
-
const F =
|
|
829
|
+
const F = E(!1), v = R(() => {
|
|
831
830
|
switch (o.mode) {
|
|
832
831
|
case ee.READ:
|
|
833
832
|
return "";
|
|
@@ -837,7 +836,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
837
836
|
return l("inventory.transfer.template.update.title");
|
|
838
837
|
}
|
|
839
838
|
return "";
|
|
840
|
-
}), g =
|
|
839
|
+
}), g = E();
|
|
841
840
|
x({
|
|
842
841
|
validateInputs: () => {
|
|
843
842
|
var a, f;
|
|
@@ -860,7 +859,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
860
859
|
({ totalCost: s, ...n }) => n
|
|
861
860
|
));
|
|
862
861
|
try {
|
|
863
|
-
await
|
|
862
|
+
await C.createTemplate(a), await new Promise((s) => setTimeout(s, 1e3)), i.open({
|
|
864
863
|
title: l("inventory.transfer.template.create.success"),
|
|
865
864
|
message: l("inventory.transfer.template.create.successMessage"),
|
|
866
865
|
type: "success"
|
|
@@ -884,7 +883,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
884
883
|
({ totalCost: s, ...n }) => n
|
|
885
884
|
));
|
|
886
885
|
try {
|
|
887
|
-
await
|
|
886
|
+
await C.updateTemplate(a), await new Promise((s) => setTimeout(s, 1e3)), i.open({
|
|
888
887
|
title: l("inventory.transfer.template.update.success"),
|
|
889
888
|
message: l("inventory.transfer.template.update.successMessage"),
|
|
890
889
|
type: "success"
|
|
@@ -914,9 +913,9 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
914
913
|
}
|
|
915
914
|
return (a, f) => {
|
|
916
915
|
const w = V("FmButton"), s = V("FmSideSheet");
|
|
917
|
-
return
|
|
916
|
+
return A(), W(s, {
|
|
918
917
|
modelValue: e(d),
|
|
919
|
-
"onUpdate:modelValue": f[2] || (f[2] = (n) =>
|
|
918
|
+
"onUpdate:modelValue": f[2] || (f[2] = (n) => Ue(d) ? d.value = n : null),
|
|
920
919
|
"dismiss-away": "",
|
|
921
920
|
"close-button": "",
|
|
922
921
|
"max-width": 1200
|
|
@@ -927,7 +926,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
927
926
|
])
|
|
928
927
|
]),
|
|
929
928
|
default: q(() => [
|
|
930
|
-
(
|
|
929
|
+
(A(), W(co, {
|
|
931
930
|
class: "w-full",
|
|
932
931
|
ref_key: "formRef",
|
|
933
932
|
ref: g,
|
|
@@ -935,7 +934,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
935
934
|
"model-value": h.value,
|
|
936
935
|
"onUpdate:modelValue": f[0] || (f[0] = (n) => h.value = n),
|
|
937
936
|
disabled: F.value,
|
|
938
|
-
key:
|
|
937
|
+
key: D.value
|
|
939
938
|
}, null, 8, ["model-value", "disabled"]))
|
|
940
939
|
]),
|
|
941
940
|
"side-sheet-footer": q(() => [
|
|
@@ -957,22 +956,22 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
957
956
|
}, 8, ["modelValue"]);
|
|
958
957
|
};
|
|
959
958
|
}
|
|
960
|
-
}), bo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, xo = { class: "flex justify-between" }, _o = { class: "fm-typo-en-body-lg-600" }, ho = { class: "fm-status-badge fm-status-badge-info-secondary" }, go = { class: "flex flex-col gap-8" }, To = { class: "flex flex-col gap-4" }, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wo = { class: "flex gap-1" }, ko = { class: "fm-typo-en-body-lg-600" },
|
|
959
|
+
}), bo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, xo = { class: "flex justify-between" }, _o = { class: "fm-typo-en-body-lg-600" }, ho = { class: "fm-status-badge fm-status-badge-info-secondary" }, go = { class: "flex flex-col gap-8" }, To = { class: "flex flex-col gap-4" }, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wo = { class: "flex gap-1" }, ko = { class: "fm-typo-en-body-lg-600" }, Co = {
|
|
961
960
|
key: 0,
|
|
962
961
|
class: "flex flex-col gap-4"
|
|
963
|
-
},
|
|
962
|
+
}, So = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mo = { class: "fm-typo-en-body-lg-600" }, $o = {
|
|
964
963
|
key: 1,
|
|
965
964
|
class: "flex flex-col gap-4"
|
|
966
965
|
}, Io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oo = { class: "fm-typo-en-body-lg-600" }, Vo = {
|
|
967
966
|
key: 2,
|
|
968
967
|
class: "flex flex-col gap-4"
|
|
969
|
-
},
|
|
968
|
+
}, Do = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ao = { class: "fm-typo-en-body-lg-600" }, Ro = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Po = { class: "flex flex-col gap-8" }, Lo = { class: "fm-typo-en-body-lg-600" }, Bo = { class: "flex w-full gap-4" }, Eo = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, Uo = { class: "fm-typo-en-body-lg-600 shrink-0" }, qo = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, No = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, zo = {
|
|
970
969
|
key: 0,
|
|
971
970
|
class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
972
971
|
}, Ho = {
|
|
973
972
|
key: 0,
|
|
974
973
|
class: "flex gap-4 items-center"
|
|
975
|
-
},
|
|
974
|
+
}, jo = { class: "flex flex-col gap-12" }, Qo = { class: "flex flex-col gap-8" }, Ko = { class: "flex gap-8 xs:flex-col" }, Go = /* @__PURE__ */ J({
|
|
976
975
|
__name: "TransferTemplateDetails",
|
|
977
976
|
props: {
|
|
978
977
|
template: {},
|
|
@@ -980,25 +979,25 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
980
979
|
},
|
|
981
980
|
emits: ["update:show", "action:edit"],
|
|
982
981
|
setup(y, { emit: x }) {
|
|
983
|
-
const u = y, o = x, m =
|
|
982
|
+
const u = y, o = x, m = Ge(), { t: C } = X(), i = R(() => {
|
|
984
983
|
var F;
|
|
985
984
|
return (F = u.template) == null ? void 0 : F.purchaseOrder;
|
|
986
985
|
}), l = [
|
|
987
986
|
{ accessorKey: "name", header: () => "Name" },
|
|
988
987
|
{ accessorKey: "type", header: () => "Type" }
|
|
989
|
-
], d =
|
|
988
|
+
], d = E(""), k = R(
|
|
990
989
|
() => {
|
|
991
990
|
var F, v, g, I;
|
|
992
991
|
return ((v = (F = i.value) == null ? void 0 : F.supplier) == null ? void 0 : v.internal) === "restaurant" || ((I = (g = i.value) == null ? void 0 : g.supplier) == null ? void 0 : I.internal) === "warehouse" ? H.TRANSFER : H.PURCHASE;
|
|
993
992
|
}
|
|
994
|
-
), h =
|
|
993
|
+
), h = E(!0), D = Ke(u, "show");
|
|
995
994
|
return (F, v) => {
|
|
996
995
|
var f;
|
|
997
996
|
const g = V("FmMenuDivider"), I = V("FmCard"), B = V("FmIcon"), p = V("FmTextField"), r = V("FmTable"), b = V("FmButton"), a = V("FmSideSheet");
|
|
998
|
-
return
|
|
999
|
-
header: e(
|
|
1000
|
-
modelValue: e(
|
|
1001
|
-
"onUpdate:modelValue": v[2] || (v[2] = (w) =>
|
|
997
|
+
return A(), W(a, {
|
|
998
|
+
header: e(C)("inventory.transfer.template.details.view", { template: (f = F.template) == null ? void 0 : f.name }),
|
|
999
|
+
modelValue: e(D),
|
|
1000
|
+
"onUpdate:modelValue": v[2] || (v[2] = (w) => Ue(D) ? D.value = w : null),
|
|
1002
1001
|
"dismiss-away": h.value,
|
|
1003
1002
|
"close-button": "",
|
|
1004
1003
|
"max-width": 500
|
|
@@ -1013,11 +1012,11 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1013
1012
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1014
1013
|
}, {
|
|
1015
1014
|
default: q(() => {
|
|
1016
|
-
var n,
|
|
1015
|
+
var n, S, $, M, _, P, U;
|
|
1017
1016
|
return [
|
|
1018
1017
|
t("div", xo, [
|
|
1019
|
-
t("div", _o, O(e(
|
|
1020
|
-
t("div", ho, O(e(
|
|
1018
|
+
t("div", _o, O(e(C)("inventory.transfer.template.details.templateSummary")), 1),
|
|
1019
|
+
t("div", ho, O(e(C)(
|
|
1021
1020
|
`inventory.transfer.receiveRequest.details.type.${k.value.toLocaleLowerCase("en-US")}`
|
|
1022
1021
|
)), 1)
|
|
1023
1022
|
]),
|
|
@@ -1025,21 +1024,21 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1025
1024
|
t("div", go, [
|
|
1026
1025
|
t("div", To, [
|
|
1027
1026
|
t("div", Fo, [
|
|
1028
|
-
t("div", wo, O(e(
|
|
1027
|
+
t("div", wo, O(e(C)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1029
1028
|
]),
|
|
1030
1029
|
t("div", ko, O(e(ct)(((n = F.template) == null ? void 0 : n._id) ?? "")), 1)
|
|
1031
1030
|
]),
|
|
1032
|
-
($ = (
|
|
1033
|
-
t("div",
|
|
1031
|
+
($ = (S = i.value) == null ? void 0 : S.supplier) != null && $.name ? (A(), K("div", Co, [
|
|
1032
|
+
t("div", So, O(e(C)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1034
1033
|
t("div", Mo, O((_ = (M = i.value) == null ? void 0 : M.supplier) == null ? void 0 : _.name), 1)
|
|
1035
1034
|
])) : Y("", !0),
|
|
1036
|
-
(P = i.value) != null && P.ref ? (
|
|
1037
|
-
t("div", Io, O(e(
|
|
1035
|
+
(P = i.value) != null && P.ref ? (A(), K("div", $o, [
|
|
1036
|
+
t("div", Io, O(e(C)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1038
1037
|
t("div", Oo, O(i.value.ref), 1)
|
|
1039
1038
|
])) : Y("", !0),
|
|
1040
|
-
(
|
|
1041
|
-
t("div",
|
|
1042
|
-
t("div",
|
|
1039
|
+
(U = i.value) != null && U.remark ? (A(), K("div", Vo, [
|
|
1040
|
+
t("div", Do, O(e(C)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1041
|
+
t("div", Ao, O(i.value.remark), 1)
|
|
1043
1042
|
])) : Y("", !0)
|
|
1044
1043
|
])
|
|
1045
1044
|
];
|
|
@@ -1049,21 +1048,21 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1049
1048
|
]),
|
|
1050
1049
|
t("div", Ro, [
|
|
1051
1050
|
t("div", Po, [
|
|
1052
|
-
t("div", Lo, O(e(
|
|
1053
|
-
(
|
|
1051
|
+
t("div", Lo, O(e(C)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
1052
|
+
(A(!0), K(qe, null, Xe(((w = i.value) == null ? void 0 : w.items) ?? [], (n) => (A(), K("div", {
|
|
1054
1053
|
key: n.code,
|
|
1055
1054
|
class: "flex flex-col"
|
|
1056
1055
|
}, [
|
|
1057
1056
|
t("div", Bo, [
|
|
1058
|
-
t("div",
|
|
1057
|
+
t("div", Eo, O(n.name), 1),
|
|
1059
1058
|
v[3] || (v[3] = t("div", { class: "flex-1 min-w-32" }, null, -1)),
|
|
1060
|
-
t("div",
|
|
1059
|
+
t("div", Uo, O(e(xt)(n.quantity, n.sku.unit, n.measurement)), 1)
|
|
1061
1060
|
]),
|
|
1062
1061
|
t("div", qo, [
|
|
1063
1062
|
t("div", No, O(n.code), 1),
|
|
1064
|
-
n.totalCost && e(m).enableTotalCost ? (
|
|
1063
|
+
n.totalCost && e(m).enableTotalCost ? (A(), K("div", zo, " (" + O(e(pt)(n.totalCost)) + ") ", 1)) : Y("", !0)
|
|
1065
1064
|
]),
|
|
1066
|
-
e(_t)(n) ? (
|
|
1065
|
+
e(_t)(n) ? (A(), K("div", Ho, [
|
|
1067
1066
|
c(B, {
|
|
1068
1067
|
name: "error",
|
|
1069
1068
|
color: "system-error-300",
|
|
@@ -1076,12 +1075,12 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1076
1075
|
]),
|
|
1077
1076
|
v[6] || (v[6] = t("div", null, null, -1)),
|
|
1078
1077
|
v[7] || (v[7] = t("div", null, null, -1)),
|
|
1079
|
-
t("div",
|
|
1078
|
+
t("div", jo, [
|
|
1080
1079
|
v[5] || (v[5] = t("div", { class: "flex flex-col" }, [
|
|
1081
1080
|
t("div", { class: "fm-typo-en-body-lg-600" }, "Enabled locations"),
|
|
1082
1081
|
t("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is only usable for the following locations. ")
|
|
1083
1082
|
], -1)),
|
|
1084
|
-
t("div",
|
|
1083
|
+
t("div", Qo, [
|
|
1085
1084
|
c(p, {
|
|
1086
1085
|
modelValue: d.value,
|
|
1087
1086
|
"onUpdate:modelValue": v[0] || (v[0] = (n) => d.value = n),
|
|
@@ -1103,7 +1102,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1103
1102
|
"side-sheet-footer": q(() => [
|
|
1104
1103
|
t("div", Ko, [
|
|
1105
1104
|
c(b, {
|
|
1106
|
-
label: e(
|
|
1105
|
+
label: e(C)("common.edit"),
|
|
1107
1106
|
onClick: v[1] || (v[1] = (w) => o("action:edit")),
|
|
1108
1107
|
variant: "tertiary"
|
|
1109
1108
|
}, null, 8, ["label"])
|
|
@@ -1113,14 +1112,14 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1113
1112
|
}, 8, ["header", "modelValue", "dismiss-away"]);
|
|
1114
1113
|
};
|
|
1115
1114
|
}
|
|
1116
|
-
}), Wo = { class: "flex-1 flex flex-col gap-8" }, Zo = { class: "flex flex-col" }, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Yo = { class: "fm-typo-en-body-lg-400" }, es = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, ts = { class: "fm-typo-en-body-lg-400 line-clamp-2" },
|
|
1115
|
+
}), Wo = { class: "flex-1 flex flex-col gap-8" }, Zo = { class: "flex flex-col" }, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Yo = { class: "fm-typo-en-body-lg-400" }, es = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, ts = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, cs = /* @__PURE__ */ J({
|
|
1117
1116
|
__name: "TransferTemplateView",
|
|
1118
1117
|
setup(y) {
|
|
1119
|
-
const { t: x } = X(), { createTemplate: u, viewTemplate: o, importTemplates: m, exportTemplates:
|
|
1118
|
+
const { t: x } = X(), { createTemplate: u, viewTemplate: o, importTemplates: m, exportTemplates: C } = Le(), { templateDialogProps: i, templateDetailsProps: l } = Be(Le()), d = ht(), { loading: k, templates: h } = Be(d), D = E(!1), F = ft(), v = je(), { breakpoints: g } = Ft();
|
|
1120
1119
|
ce(d.fetchTemplates);
|
|
1121
1120
|
const I = R(
|
|
1122
|
-
() =>
|
|
1123
|
-
), B = R(() => h.value), p =
|
|
1121
|
+
() => D.value || k.value || !v._currentLocation
|
|
1122
|
+
), B = R(() => h.value), p = E(""), r = R(() => g.value.xs || g.value.sm), b = R(() => r.value ? 10 : 20);
|
|
1124
1123
|
function a(s) {
|
|
1125
1124
|
switch (s) {
|
|
1126
1125
|
case Pe.Add:
|
|
@@ -1130,7 +1129,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1130
1129
|
case "import":
|
|
1131
1130
|
return m();
|
|
1132
1131
|
case "export":
|
|
1133
|
-
return
|
|
1132
|
+
return C();
|
|
1134
1133
|
}
|
|
1135
1134
|
}
|
|
1136
1135
|
function f(s) {
|
|
@@ -1160,8 +1159,8 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1160
1159
|
}
|
|
1161
1160
|
]);
|
|
1162
1161
|
return (s, n) => {
|
|
1163
|
-
const
|
|
1164
|
-
return
|
|
1162
|
+
const S = V("FmTable");
|
|
1163
|
+
return A(), K(qe, null, [
|
|
1165
1164
|
c(yt, {
|
|
1166
1165
|
title: e(x)("inventory.transfer.template.title2"),
|
|
1167
1166
|
actions: w.value,
|
|
@@ -1184,7 +1183,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1184
1183
|
search: p.value,
|
|
1185
1184
|
"onUpdate:search": n[0] || (n[0] = (M) => p.value = M)
|
|
1186
1185
|
}, null, 8, ["search"]),
|
|
1187
|
-
(
|
|
1186
|
+
(A(), W(S, {
|
|
1188
1187
|
style: Ye(e(F).tableHeight),
|
|
1189
1188
|
"column-defs": e(d).columnDefs,
|
|
1190
1189
|
"row-data": B.value,
|
|
@@ -1200,24 +1199,24 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1200
1199
|
onRowClick: (_) => e(o)(_)
|
|
1201
1200
|
}, {
|
|
1202
1201
|
default: q((_) => {
|
|
1203
|
-
var P,
|
|
1202
|
+
var P, U, N, j, T, z, fe, ye, te, ve, be, xe, _e, oe, he, ge, Te, Fe, we, ke, se, Ce, Se, Me, $e, le, Ie;
|
|
1204
1203
|
return [
|
|
1205
1204
|
t("div", Wo, [
|
|
1206
1205
|
t("div", Zo, [
|
|
1207
1206
|
t("div", Jo, [
|
|
1208
|
-
c(e(
|
|
1209
|
-
render: (N = (
|
|
1210
|
-
props: (T = (
|
|
1207
|
+
c(e(Q), {
|
|
1208
|
+
render: (N = (U = (P = _._id) == null ? void 0 : P.column) == null ? void 0 : U.columnDef) == null ? void 0 : N.cell,
|
|
1209
|
+
props: (T = (j = _._id) == null ? void 0 : j.getContext) == null ? void 0 : T.call(j)
|
|
1211
1210
|
}, null, 8, ["render", "props"])
|
|
1212
1211
|
]),
|
|
1213
1212
|
t("div", Xo, [
|
|
1214
|
-
c(e(
|
|
1213
|
+
c(e(Q), {
|
|
1215
1214
|
render: (ye = (fe = (z = _.name) == null ? void 0 : z.column) == null ? void 0 : fe.columnDef) == null ? void 0 : ye.cell,
|
|
1216
1215
|
props: (ve = (te = _.name) == null ? void 0 : te.getContext) == null ? void 0 : ve.call(te)
|
|
1217
1216
|
}, null, 8, ["render", "props"])
|
|
1218
1217
|
]),
|
|
1219
1218
|
t("div", Yo, [
|
|
1220
|
-
c(e(
|
|
1219
|
+
c(e(Q), {
|
|
1221
1220
|
render: (_e = (xe = (be = _.supplier) == null ? void 0 : be.column) == null ? void 0 : xe.columnDef) == null ? void 0 : _e.cell,
|
|
1222
1221
|
props: (he = (oe = _.supplier) == null ? void 0 : oe.getContext) == null ? void 0 : he.call(oe)
|
|
1223
1222
|
}, null, 8, ["render", "props"])
|
|
@@ -1225,15 +1224,15 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1225
1224
|
t("div", null, O((ge = M.original.locations) != null && ge.length ? `Enabled for ${(Te = M.original.locations) == null ? void 0 : Te.length} outlets` : "Enabled for all outlets"), 1),
|
|
1226
1225
|
t("div", es, O(M.original.purchaseOrder.items.length ? M.original.purchaseOrder.items.map((We) => We.name).join(", ") : "No items"), 1),
|
|
1227
1226
|
t("div", ts, [
|
|
1228
|
-
c(e(
|
|
1227
|
+
c(e(Q), {
|
|
1229
1228
|
render: (ke = (we = (Fe = _.ref) == null ? void 0 : Fe.column) == null ? void 0 : we.columnDef) == null ? void 0 : ke.cell,
|
|
1230
|
-
props: (
|
|
1229
|
+
props: (Ce = (se = _.ref) == null ? void 0 : se.getContext) == null ? void 0 : Ce.call(se)
|
|
1231
1230
|
}, null, 8, ["render", "props"])
|
|
1232
1231
|
])
|
|
1233
1232
|
]),
|
|
1234
1233
|
t("div", null, [
|
|
1235
|
-
c(e(
|
|
1236
|
-
render: ($e = (Me = (
|
|
1234
|
+
c(e(Q), {
|
|
1235
|
+
render: ($e = (Me = (Se = _.type) == null ? void 0 : Se.column) == null ? void 0 : Me.columnDef) == null ? void 0 : $e.cell,
|
|
1237
1236
|
props: (Ie = (le = _.type) == null ? void 0 : le.getContext) == null ? void 0 : Ie.call(le)
|
|
1238
1237
|
}, null, 8, ["render", "props"])
|
|
1239
1238
|
])
|
|
@@ -1250,9 +1249,9 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1250
1249
|
}),
|
|
1251
1250
|
_: 1
|
|
1252
1251
|
}, 8, ["title", "actions"]),
|
|
1253
|
-
(
|
|
1252
|
+
(A(), W(et, { to: "body" }, [
|
|
1254
1253
|
c(Go, tt(ot(e(l))), null, 16),
|
|
1255
|
-
c(vo,
|
|
1254
|
+
c(vo, Ee(e(i), {
|
|
1256
1255
|
onSubmitted: n[2] || (n[2] = ($) => e(d).fetchTemplates())
|
|
1257
1256
|
}), null, 16)
|
|
1258
1257
|
]))
|
|
@@ -1261,5 +1260,5 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
|
|
|
1261
1260
|
}
|
|
1262
1261
|
});
|
|
1263
1262
|
export {
|
|
1264
|
-
|
|
1263
|
+
cs as default
|
|
1265
1264
|
};
|