@feedmepos/mf-inventory-portal 0.0.19-dev.15 → 0.0.19-dev.16
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/{ApprovalView-CRHU3Bv0.js → ApprovalView-CKcQLAI8.js} +5 -5
- package/dist/{BindingsDialog-ChIRg0d3.js → BindingsDialog-Cp73zLps.js} +9 -9
- package/dist/{BindingsPicker-BJAbeiDf.js → BindingsPicker-DgRYGAX9.js} +1 -1
- package/dist/{BindingsTable-5MxWD_qa.js → BindingsTable-DcAf4NjN.js} +1 -1
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0j4VOis.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-La7HFqE7.js} +2 -2
- package/dist/{IngredientsView-qXrDtzSK.js → IngredientsView-CudiU14j.js} +5 -5
- package/dist/{IntegrationView-D6yFqod1.js → IntegrationView-DAL6iV4z.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DGurlvYg.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-QzKXWhYR.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-2Ady4pB4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DjjUDrN3.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-BWwjMRqb.js → PurchaseOrderPrintPreview-Dx0kFMsh.js} +1 -1
- package/dist/{ReceiveRequestView-C94SWDaj.js → ReceiveRequestView-CJPRYtPB.js} +8 -8
- package/dist/{RecipeView-CG9H_ZOo.js → RecipeView-B_q03wl5.js} +4 -4
- package/dist/{StockView-BdXGfDNl.js → StockView-jsZK17Y2.js} +8 -8
- package/dist/{SupplierView-ClL2oc8K.js → SupplierView-tzSVBr7C.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DktBkwCx.js → TransferDetails.vue_vue_type_script_setup_true_lang-Dgn1Q71R.js} +4 -4
- package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-BE95F9r1.js → TransferDialog.vue_vue_type_script_setup_true_lang-BqxrMEtA.js} +5 -5
- package/dist/{TransferTemplateView-BXrNS8pg.js → TransferTemplateView-DTH0Vubz.js} +186 -186
- package/dist/{UnitView-Dx2vWJXi.js → UnitView-CmxzOeJT.js} +5 -5
- package/dist/{WarehouseView-UkmUZnqH.js → WarehouseView-CRQ0iaDH.js} +3 -3
- package/dist/{app-BLzTa0Ut.js → app-Bi46PfDl.js} +2822 -2822
- package/dist/app.js +1 -1
- package/dist/{array-AvWd53LI.js → array-ClJzD_Lt.js} +3 -3
- package/dist/{decimal-DLYVb_I_.js → decimal-BgCTHluk.js} +1 -1
- package/dist/{format-unit-display-D_Z4TNZd.js → format-unit-display-B7oG4kXR.js} +3 -3
- package/dist/{id-to-date-CKplrnj_.js → id-to-date-BoyYjRV6.js} +1 -1
- package/dist/{layout-B9sdKjL9.js → layout-BMITwCg7.js} +1 -1
- package/dist/{supplier-BZ6HZcYB.js → supplier-CGwlcK2h.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{xlsx-C3AV6UrJ.js → xlsx-DYXPer0D.js} +1209 -1209
- package/dist/{xlsx.util-slrhXhsk.js → xlsx.util-GCkah-Uu.js} +4 -4
- package/package.json +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as W, onMounted as Ve, computed as M, ref as U, watch as ye, inject as Ge, resolveComponent as I, openBlock as R, createElementBlock as N, createElementVNode as a, createVNode as c, withCtx as B, renderSlot as we, withDirectives as Te, normalizeClass as ce, vModelText as Fe, reactive as Ye, h as D, toDisplayString as F, unref as e, createBlock as Q, isRef as Oe, createCommentVNode as ae, Fragment as Pe, renderList as We, normalizeStyle as Ke, Teleport as Ze, mergeProps as $e, normalizeProps as Je, guardReactiveProps as Xe } from "vue";
|
|
2
|
-
import { _ as et, a as tt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as et, a as tt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-La7HFqE7.js";
|
|
3
3
|
import { useI18n as Y } from "@feedmepos/mf-common";
|
|
4
|
-
import { P, a as
|
|
4
|
+
import { P, a as st, f as ot, b as nt, c as Se, d as at } from "./format-unit-display-B7oG4kXR.js";
|
|
5
5
|
import { F as le, R as Re } from "./row-action.enum-PMKMRrZR.js";
|
|
6
|
-
import { $ as me, t as Ie, I as lt, a0 as rt, a1 as it, a as E, D as Me, R as pe, a2 as ut, a3 as dt, r as de, a4 as mt, l as De, A as fe, M as Ae, G as Be, a5 as ct, a6 as Le, b as Ue, u as pt, j as qe, y as ft, a7 as yt, a8 as vt } from "./app-
|
|
7
|
-
import { F as q, _ as Ee, u as bt } from "./layout-
|
|
6
|
+
import { $ as me, t as Ie, I as lt, a0 as rt, a1 as it, a as E, D as Me, R as pe, a2 as ut, a3 as dt, r as de, a4 as mt, l as De, A as fe, M as Ae, G as Be, a5 as ct, a6 as Le, b as Ue, u as pt, j as qe, y as ft, a7 as yt, a8 as vt } from "./app-Bi46PfDl.js";
|
|
7
|
+
import { F as q, _ as Ee, u as bt } from "./layout-BMITwCg7.js";
|
|
8
8
|
import { useBreakpoints as Ne, components as G, FmButtonVariant as _t, useDialog as xt, useSnackbar as ht, useProxiedModel as ze } from "@feedmepos/ui-library";
|
|
9
9
|
import { storeToRefs as gt } from "pinia";
|
|
10
|
-
import { d as He, c as re, u as kt, _ as Ct } from "./TransferDialog.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { _ as je } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { d as He, c as re, u as kt, _ as Ct } from "./TransferDialog.vue_vue_type_script_setup_true_lang-BqxrMEtA.js";
|
|
11
|
+
import { _ as je } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-DjjUDrN3.js";
|
|
12
12
|
import { useRouter as wt } from "vue-router";
|
|
13
|
-
import { u as Tt } from "./supplier-
|
|
13
|
+
import { u as Tt } from "./supplier-CGwlcK2h.js";
|
|
14
14
|
const Ft = { class: "flex flex-col" }, $t = { class: "flex flex-col" }, St = { class: "flex-1" }, Rt = { class: "flex items-center" }, It = { class: "flex-1" }, Mt = { class: "flex-1" }, Dt = /* @__PURE__ */ W({
|
|
15
15
|
__name: "FmMinMaxInput",
|
|
16
16
|
props: {
|
|
@@ -53,7 +53,7 @@ const Ft = { class: "flex flex-col" }, $t = { class: "flex flex-col" }, St = { c
|
|
|
53
53
|
Ve(() => {
|
|
54
54
|
const { min: n, max: t } = m ?? {};
|
|
55
55
|
if (!(!n || !t) && n.precision !== t.precision) {
|
|
56
|
-
const
|
|
56
|
+
const s = Math.max(n.precision, t.precision), r = me(n, s), h = me(t, s);
|
|
57
57
|
m.min = r, m.max = h;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -64,40 +64,40 @@ const Ft = { class: "flex flex-col" }, $t = { class: "flex flex-col" }, St = { c
|
|
|
64
64
|
...m
|
|
65
65
|
})), k = (n) => {
|
|
66
66
|
if (!n) return "";
|
|
67
|
-
const t = rt(n),
|
|
67
|
+
const t = rt(n), s = f.value, r = me(t, s);
|
|
68
68
|
return it(
|
|
69
69
|
+E(r),
|
|
70
70
|
r.precision
|
|
71
71
|
);
|
|
72
|
-
}, i = U(k(m.min)),
|
|
73
|
-
ye([i,
|
|
74
|
-
const
|
|
72
|
+
}, i = U(k(m.min)), o = U(k(m.max));
|
|
73
|
+
ye([i, o], ([n, t]) => {
|
|
74
|
+
const s = m ?? {}, r = l(n), h = l(t), y = f.value;
|
|
75
75
|
if (n !== "" && r === !0) {
|
|
76
76
|
const v = Ie(+n, y);
|
|
77
|
-
|
|
77
|
+
s.min = v;
|
|
78
78
|
} else
|
|
79
|
-
|
|
79
|
+
s.min = null;
|
|
80
80
|
if (t !== "" && h === !0) {
|
|
81
81
|
const v = Ie(+t, y);
|
|
82
|
-
|
|
82
|
+
s.max = v;
|
|
83
83
|
} else
|
|
84
|
-
|
|
85
|
-
m.min =
|
|
84
|
+
s.max = null;
|
|
85
|
+
m.min = s.min, m.max = s.max;
|
|
86
86
|
});
|
|
87
87
|
const d = Symbol.for("fm:form-state"), p = Ge(d, null), _ = M(() => b.disabled ?? (p == null ? void 0 : p.getDisabled()) ?? !1), C = U(), T = U(), w = U(!1), S = U(!1), A = M(() => w.value || S.value), L = M(() => [...[
|
|
88
88
|
function() {
|
|
89
|
-
return typeof l(i.value) == "string" || typeof l(
|
|
89
|
+
return typeof l(i.value) == "string" || typeof l(o.value) == "string" ? "Must be a number" : !0;
|
|
90
90
|
},
|
|
91
|
-
function(
|
|
92
|
-
return !
|
|
91
|
+
function(s) {
|
|
92
|
+
return !s || !s.min || !s.max ? !0 : +E(s.min) > +E(s.max) ? "Min must be less than or equal to max" : !0;
|
|
93
93
|
}
|
|
94
94
|
], ...b.rules ?? []]);
|
|
95
95
|
return (n, t) => {
|
|
96
|
-
const
|
|
96
|
+
const s = I("FmLabel"), r = I("FmField"), h = I("FmFormGroup");
|
|
97
97
|
return R(), N("div", Ft, [
|
|
98
98
|
a("div", $t, [
|
|
99
99
|
a("div", St, [
|
|
100
|
-
c(
|
|
100
|
+
c(s, {
|
|
101
101
|
label: n.label,
|
|
102
102
|
disabled: n.disabled,
|
|
103
103
|
required: n.labelMark === "required",
|
|
@@ -135,14 +135,14 @@ const Ft = { class: "flex flex-col" }, $t = { class: "flex flex-col" }, St = { c
|
|
|
135
135
|
ref: T,
|
|
136
136
|
onFocus: t[3] || (t[3] = () => S.value = !0),
|
|
137
137
|
onBlur: t[4] || (t[4] = () => S.value = !1),
|
|
138
|
-
"onUpdate:modelValue": t[5] || (t[5] = (y) =>
|
|
138
|
+
"onUpdate:modelValue": t[5] || (t[5] = (y) => o.value = y),
|
|
139
139
|
class: ce({
|
|
140
140
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
141
141
|
"text-fm-color-typo-primary": !_.value,
|
|
142
142
|
"text-fm-color-typo-disabled": _.value
|
|
143
143
|
})
|
|
144
144
|
}, null, 34), [
|
|
145
|
-
[Fe,
|
|
145
|
+
[Fe, o.value]
|
|
146
146
|
])
|
|
147
147
|
]),
|
|
148
148
|
we(n.$slots, "append")
|
|
@@ -191,10 +191,10 @@ function Pt(u) {
|
|
|
191
191
|
for (const i of u.items) {
|
|
192
192
|
if (!i.totalCost)
|
|
193
193
|
continue;
|
|
194
|
-
const
|
|
194
|
+
const o = re(i.sku, i.quantity, i.measurement, {
|
|
195
195
|
supplier: u.supplier
|
|
196
196
|
}), d = i.totalCost ?? Me.reset();
|
|
197
|
-
|
|
197
|
+
o ? m[i.sku._id] = o.amount !== d.amount || o.precision !== d.precision : m[i.sku._id] = !0;
|
|
198
198
|
}
|
|
199
199
|
});
|
|
200
200
|
function f(i) {
|
|
@@ -208,16 +208,16 @@ function Pt(u) {
|
|
|
208
208
|
accessorKey: "code",
|
|
209
209
|
size: 96,
|
|
210
210
|
cell(i) {
|
|
211
|
-
const
|
|
211
|
+
const o = i.row.original;
|
|
212
212
|
return D(G.FmTextField, {
|
|
213
|
-
modelValue:
|
|
213
|
+
modelValue: o.code,
|
|
214
214
|
"onUpdate:modelValue": (d) => {
|
|
215
215
|
u.updateItem({
|
|
216
|
-
...
|
|
216
|
+
...o,
|
|
217
217
|
code: d
|
|
218
218
|
});
|
|
219
219
|
},
|
|
220
|
-
key:
|
|
220
|
+
key: o.sku._id,
|
|
221
221
|
rules: [pe()],
|
|
222
222
|
labelMark: "required"
|
|
223
223
|
});
|
|
@@ -229,16 +229,16 @@ function Pt(u) {
|
|
|
229
229
|
header: () => b("inventory.transfer.form.items.table.Name"),
|
|
230
230
|
minSize: 300,
|
|
231
231
|
cell(i) {
|
|
232
|
-
const
|
|
232
|
+
const o = i.row.original;
|
|
233
233
|
return D(G.FmTextField, {
|
|
234
|
-
modelValue:
|
|
234
|
+
modelValue: o.name,
|
|
235
235
|
"onUpdate:modelValue": (d) => {
|
|
236
236
|
u.updateItem({
|
|
237
|
-
...
|
|
237
|
+
...o,
|
|
238
238
|
name: d
|
|
239
239
|
});
|
|
240
240
|
},
|
|
241
|
-
key:
|
|
241
|
+
key: o.sku._id,
|
|
242
242
|
rules: [pe()],
|
|
243
243
|
labelMark: "required"
|
|
244
244
|
});
|
|
@@ -250,21 +250,21 @@ function Pt(u) {
|
|
|
250
250
|
header: () => b("inventory.transfer.form.items.table.DefaultAmount2"),
|
|
251
251
|
minSize: 150,
|
|
252
252
|
cell(i) {
|
|
253
|
-
const
|
|
253
|
+
const o = i.row.original;
|
|
254
254
|
return D(ut, {
|
|
255
255
|
style: {
|
|
256
256
|
flex: "1 1 0%"
|
|
257
257
|
},
|
|
258
258
|
modelValue: {
|
|
259
|
-
amount:
|
|
260
|
-
measurement:
|
|
259
|
+
amount: o.quantity ?? { amount: 1, precision: 0 },
|
|
260
|
+
measurement: o.measurement ?? null
|
|
261
261
|
},
|
|
262
262
|
disabled: u.disabled,
|
|
263
|
-
key:
|
|
264
|
-
unit:
|
|
263
|
+
key: o.sku._id,
|
|
264
|
+
unit: o.sku.unit,
|
|
265
265
|
"onUpdate:modelValue": (d) => {
|
|
266
266
|
u.updateItem({
|
|
267
|
-
...
|
|
267
|
+
...o,
|
|
268
268
|
quantity: d.amount,
|
|
269
269
|
measurement: d.measurement
|
|
270
270
|
});
|
|
@@ -272,14 +272,14 @@ function Pt(u) {
|
|
|
272
272
|
rules: [
|
|
273
273
|
dt(
|
|
274
274
|
+E(
|
|
275
|
-
|
|
275
|
+
o.minimumQuantity ?? {
|
|
276
276
|
amount: 1,
|
|
277
|
-
precision: de(
|
|
277
|
+
precision: de(o.sku.unit, o.measurement)
|
|
278
278
|
}
|
|
279
279
|
)
|
|
280
280
|
),
|
|
281
281
|
mt(
|
|
282
|
-
|
|
282
|
+
o.maximumQuantity ? +E(o.maximumQuantity) : 1 / 0
|
|
283
283
|
)
|
|
284
284
|
],
|
|
285
285
|
applyDefaultRules: !0
|
|
@@ -293,20 +293,20 @@ function Pt(u) {
|
|
|
293
293
|
// TODO: i18n,
|
|
294
294
|
minSize: 250,
|
|
295
295
|
cell(i) {
|
|
296
|
-
const
|
|
296
|
+
const o = i.row.original;
|
|
297
297
|
return D(Dt, {
|
|
298
298
|
style: {
|
|
299
299
|
flex: "1 1 0%"
|
|
300
300
|
},
|
|
301
301
|
modelValue: {
|
|
302
|
-
min:
|
|
303
|
-
max:
|
|
302
|
+
min: o.minimumQuantity,
|
|
303
|
+
max: o.maximumQuantity
|
|
304
304
|
},
|
|
305
305
|
disabled: u.disabled,
|
|
306
|
-
key:
|
|
307
|
-
unit:
|
|
306
|
+
key: o.sku._id,
|
|
307
|
+
unit: o.sku.unit,
|
|
308
308
|
"onUpdate:modelValue": (d) => {
|
|
309
|
-
const p = { ...
|
|
309
|
+
const p = { ...o };
|
|
310
310
|
d != null && d.min && (p.minimumQuantity = d.min), d != null && d.max && (p.maximumQuantity = d.max), u.updateItem(p);
|
|
311
311
|
},
|
|
312
312
|
rules: [
|
|
@@ -314,7 +314,7 @@ function Pt(u) {
|
|
|
314
314
|
Vt(
|
|
315
315
|
+E({
|
|
316
316
|
amount: 1,
|
|
317
|
-
precision: de(
|
|
317
|
+
precision: de(o.sku.unit, o.measurement)
|
|
318
318
|
}),
|
|
319
319
|
1 / 0
|
|
320
320
|
)
|
|
@@ -329,22 +329,22 @@ function Pt(u) {
|
|
|
329
329
|
header: () => b("inventory.transfer.form.items.table.Step"),
|
|
330
330
|
minSize: 100,
|
|
331
331
|
cell(i) {
|
|
332
|
-
const
|
|
332
|
+
const o = i.row.original;
|
|
333
333
|
return D(G.FmTextField, {
|
|
334
|
-
modelValue: E(
|
|
335
|
-
key:
|
|
334
|
+
modelValue: E(o.quantityStep ?? Me.reset(), !1),
|
|
335
|
+
key: o.sku._id,
|
|
336
336
|
"onUpdate:modelValue": (d) => {
|
|
337
337
|
u.updateItem({
|
|
338
|
-
...
|
|
338
|
+
...o,
|
|
339
339
|
quantityStep: De(+d)
|
|
340
340
|
});
|
|
341
341
|
},
|
|
342
342
|
rules: [
|
|
343
343
|
fe({
|
|
344
344
|
amount: 1,
|
|
345
|
-
precision: de(
|
|
345
|
+
precision: de(o.sku.unit, o.measurement)
|
|
346
346
|
}),
|
|
347
|
-
Ae(
|
|
347
|
+
Ae(o.sku.unit, o.measurement)
|
|
348
348
|
]
|
|
349
349
|
});
|
|
350
350
|
},
|
|
@@ -355,12 +355,12 @@ function Pt(u) {
|
|
|
355
355
|
header: Ot,
|
|
356
356
|
size: 180,
|
|
357
357
|
cell(i) {
|
|
358
|
-
const
|
|
359
|
-
return !m[
|
|
358
|
+
const o = i.row.original, d = f(o.sku), p = l.value.xs || l.value.sm;
|
|
359
|
+
return !m[o.sku._id] && d ? D(
|
|
360
360
|
"div",
|
|
361
361
|
{
|
|
362
362
|
class: "flex gap-4 fm-typo-en-body-md-400 items-center",
|
|
363
|
-
key:
|
|
363
|
+
key: o.sku._id
|
|
364
364
|
},
|
|
365
365
|
[
|
|
366
366
|
D(G.FmButton, {
|
|
@@ -368,11 +368,11 @@ function Pt(u) {
|
|
|
368
368
|
variant: _t.Tertiary,
|
|
369
369
|
onClick() {
|
|
370
370
|
u.updateItem({
|
|
371
|
-
...
|
|
372
|
-
totalCost: re(
|
|
371
|
+
...o,
|
|
372
|
+
totalCost: re(o.sku, o.quantity, o.measurement, {
|
|
373
373
|
supplier: u.supplier
|
|
374
374
|
})
|
|
375
|
-
}), m[
|
|
375
|
+
}), m[o.sku._id] = !0;
|
|
376
376
|
},
|
|
377
377
|
disabled: u.disabled
|
|
378
378
|
}),
|
|
@@ -388,11 +388,11 @@ function Pt(u) {
|
|
|
388
388
|
class: [u.disabled ? "text-fm-color-typo-disabled" : ""]
|
|
389
389
|
},
|
|
390
390
|
p ? Be(
|
|
391
|
-
re(
|
|
391
|
+
re(o.sku, o.quantity, o.measurement, {
|
|
392
392
|
supplier: u.supplier
|
|
393
393
|
})
|
|
394
394
|
) : E(
|
|
395
|
-
re(
|
|
395
|
+
re(o.sku, o.quantity, o.measurement, {
|
|
396
396
|
supplier: u.supplier
|
|
397
397
|
})
|
|
398
398
|
)
|
|
@@ -413,11 +413,11 @@ function Pt(u) {
|
|
|
413
413
|
) : D(
|
|
414
414
|
G.FmTextField,
|
|
415
415
|
{
|
|
416
|
-
modelValue: E(
|
|
417
|
-
key:
|
|
416
|
+
modelValue: E(o.totalCost ?? { amount: 0, precision: 0 }),
|
|
417
|
+
key: o.sku._id,
|
|
418
418
|
"onUpdate:modelValue": (_) => {
|
|
419
419
|
u.updateItem({
|
|
420
|
-
...
|
|
420
|
+
...o,
|
|
421
421
|
totalCost: {
|
|
422
422
|
...De(+_),
|
|
423
423
|
currency: ct()
|
|
@@ -445,9 +445,9 @@ function Pt(u) {
|
|
|
445
445
|
variant: "tertiary",
|
|
446
446
|
onClick() {
|
|
447
447
|
u.updateItem({
|
|
448
|
-
...
|
|
448
|
+
...o,
|
|
449
449
|
totalCost: null
|
|
450
|
-
}), m[
|
|
450
|
+
}), m[o.sku._id] = !1;
|
|
451
451
|
},
|
|
452
452
|
disabled: u.disabled
|
|
453
453
|
}) : null;
|
|
@@ -461,17 +461,17 @@ function Pt(u) {
|
|
|
461
461
|
id: "Delete",
|
|
462
462
|
header: "",
|
|
463
463
|
cell(i) {
|
|
464
|
-
const
|
|
464
|
+
const o = i.row.original;
|
|
465
465
|
return D(G.FmButton, {
|
|
466
466
|
class: "delete-button",
|
|
467
|
-
key:
|
|
467
|
+
key: o.sku._id,
|
|
468
468
|
type: "button",
|
|
469
469
|
icon: "delete",
|
|
470
470
|
variant: "tertiary",
|
|
471
471
|
size: "md",
|
|
472
472
|
disabled: u.disabled,
|
|
473
473
|
onClick: () => {
|
|
474
|
-
u.deleteItem(
|
|
474
|
+
u.deleteItem(o);
|
|
475
475
|
}
|
|
476
476
|
});
|
|
477
477
|
},
|
|
@@ -484,7 +484,7 @@ function Pt(u) {
|
|
|
484
484
|
}
|
|
485
485
|
];
|
|
486
486
|
return {
|
|
487
|
-
columnDefs: M(() => Ue().enableTotalCost && u.transferType === P.PURCHASE ? g : g.filter((
|
|
487
|
+
columnDefs: M(() => Ue().enableTotalCost && u.transferType === P.PURCHASE ? g : g.filter((o) => o.id !== "Cost"))
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
490
|
const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-center" }, Ut = { class: "flex-1 flex gap-1 items-center" }, qt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Et = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Nt = { class: "flex gap-8 w-full" }, zt = { class: "flex-1 flex flex-col gap-4" }, Ht = { class: "flex-1 flex flex-col gap-4" }, jt = { class: "flex gap-8 w-full" }, Qt = { class: "flex-1 flex flex-col gap-4" }, Gt = { class: "flex-1 flex flex-col gap-4" }, Yt = { class: "flex gap-8 w-full" }, Wt = { class: "flex-1 flex flex-col gap-4" }, Kt = { class: "flex-1 flex flex-col gap-4" }, Zt = /* @__PURE__ */ W({
|
|
@@ -496,7 +496,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
496
496
|
setup(u) {
|
|
497
497
|
const { t: b } = Y();
|
|
498
498
|
return (m, l) => {
|
|
499
|
-
var g, k, i,
|
|
499
|
+
var g, k, i, o, d, p, _, C, T, w, S, A, L, n, t, s, r, h, y, v, V, x, O, z, K, Z, J, X, H, ee, te, se, oe, j, ne;
|
|
500
500
|
const f = I("FmLabel");
|
|
501
501
|
return R(), N("div", Bt, [
|
|
502
502
|
a("div", Lt, [
|
|
@@ -507,7 +507,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
507
507
|
a("div", null, [
|
|
508
508
|
c(e(q), {
|
|
509
509
|
render: (i = (k = (g = m.cellByColId.Delete) == null ? void 0 : g.column) == null ? void 0 : k.columnDef) == null ? void 0 : i.cell,
|
|
510
|
-
props: (d = (
|
|
510
|
+
props: (d = (o = m.cellByColId.Delete) == null ? void 0 : o.getContext) == null ? void 0 : d.call(o)
|
|
511
511
|
}, null, 8, ["render", "props"])
|
|
512
512
|
])
|
|
513
513
|
]),
|
|
@@ -539,7 +539,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
539
539
|
label: e(b)(`inventory.transfer.form.items.table.${e($).Limit}`)
|
|
540
540
|
}, null, 8, ["label"]),
|
|
541
541
|
c(e(q), {
|
|
542
|
-
render: (h = (r = (
|
|
542
|
+
render: (h = (r = (s = m.cellByColId[e($).Limit]) == null ? void 0 : s.column) == null ? void 0 : r.columnDef) == null ? void 0 : h.cell,
|
|
543
543
|
props: (v = (y = m.cellByColId[e($).Limit]) == null ? void 0 : y.getContext) == null ? void 0 : v.call(y)
|
|
544
544
|
}, null, 8, ["render", "props"]),
|
|
545
545
|
l[2] || (l[2] = a("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -576,7 +576,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
576
576
|
_: 1
|
|
577
577
|
}),
|
|
578
578
|
c(e(q), {
|
|
579
|
-
render: (
|
|
579
|
+
render: (oe = (se = (te = m.cellByColId[e($).Cost]) == null ? void 0 : te.column) == null ? void 0 : se.columnDef) == null ? void 0 : oe.cell,
|
|
580
580
|
props: (ne = (j = m.cellByColId[e($).Cost]) == null ? void 0 : j.getContext) == null ? void 0 : ne.call(j)
|
|
581
581
|
}, null, 8, ["render", "props"]),
|
|
582
582
|
l[5] || (l[5] = a("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -585,7 +585,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
585
585
|
]);
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
}), Jt = { class: "flex flex-col gap-16" }, Xt = { class: "flex flex-col gap-24" },
|
|
588
|
+
}), Jt = { class: "flex flex-col gap-16" }, Xt = { class: "flex flex-col gap-24" }, es = { class: "flex flex-col gap-16" }, ts = { class: "flex" }, ss = { class: "flex-1 gap-8 fm-typo-en-title-sm-800" }, os = /* @__PURE__ */ W({
|
|
589
589
|
__name: "TransferTemplateForm",
|
|
590
590
|
props: {
|
|
591
591
|
modelValue: {},
|
|
@@ -601,7 +601,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
601
601
|
), g.watchLocation(async () => {
|
|
602
602
|
location && (l.purchaseOrder.supplier || (l.purchaseOrder.supplier = i.suppliers.find((n) => n) ?? l.purchaseOrder.supplier));
|
|
603
603
|
});
|
|
604
|
-
const
|
|
604
|
+
const o = xt(), d = kt(
|
|
605
605
|
() => l.purchaseOrder,
|
|
606
606
|
(n) => {
|
|
607
607
|
l.purchaseOrder = {
|
|
@@ -615,8 +615,8 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
615
615
|
return typeof ((t = (n = l.purchaseOrder) == null ? void 0 : n.supplier) == null ? void 0 : t.internal) == "string" ? P.TRANSFER : P.PURCHASE;
|
|
616
616
|
},
|
|
617
617
|
set(n) {
|
|
618
|
-
var
|
|
619
|
-
const t = typeof ((r = (
|
|
618
|
+
var s, r;
|
|
619
|
+
const t = typeof ((r = (s = l.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : r.internal) == "string" ? P.TRANSFER : P.PURCHASE;
|
|
620
620
|
n !== t && (l.purchaseOrder.supplier = n === P.PURCHASE ? d.locationOptionsTypePurchase.value[0] : d.locationOptionsTypeTransfer.value[0]);
|
|
621
621
|
}
|
|
622
622
|
}), _ = M(() => d.transferLocationOptions.value), C = M({
|
|
@@ -671,15 +671,15 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
671
671
|
}
|
|
672
672
|
}), A = M(() => S.columnDefs.value);
|
|
673
673
|
function L() {
|
|
674
|
-
const n = k.skus.map((
|
|
675
|
-
label:
|
|
676
|
-
sublabel:
|
|
677
|
-
value:
|
|
678
|
-
})), t = n.filter((
|
|
674
|
+
const n = k.skus.map((s) => ({
|
|
675
|
+
label: s.name,
|
|
676
|
+
sublabel: s.code,
|
|
677
|
+
value: s
|
|
678
|
+
})), t = n.filter((s) => {
|
|
679
679
|
var r;
|
|
680
|
-
return (r = l.purchaseOrder.items) == null ? void 0 : r.find((h) => h.sku._id ===
|
|
681
|
-
}).map((
|
|
682
|
-
|
|
680
|
+
return (r = l.purchaseOrder.items) == null ? void 0 : r.find((h) => h.sku._id === s.value._id);
|
|
681
|
+
}).map((s) => s.value);
|
|
682
|
+
o.open({
|
|
683
683
|
title: f("inventory.transfer.form.items.selectItem"),
|
|
684
684
|
closeButton: !0,
|
|
685
685
|
contentComponent: ft,
|
|
@@ -696,8 +696,8 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
696
696
|
close: !0,
|
|
697
697
|
variant: "tertiary"
|
|
698
698
|
}
|
|
699
|
-
}).onPrimary((
|
|
700
|
-
const r = l.purchaseOrder.items ?? [], h =
|
|
699
|
+
}).onPrimary((s) => {
|
|
700
|
+
const r = l.purchaseOrder.items ?? [], h = s.map((y) => {
|
|
701
701
|
const v = r.find((O) => O.sku._id === y._id);
|
|
702
702
|
if (v)
|
|
703
703
|
return v;
|
|
@@ -726,7 +726,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
726
726
|
});
|
|
727
727
|
}
|
|
728
728
|
return (n, t) => {
|
|
729
|
-
const
|
|
729
|
+
const s = I("FmTextField"), r = I("FmSelect"), h = I("FmTextarea"), y = I("FmButton"), v = I("FmTable"), V = I("FmForm");
|
|
730
730
|
return R(), Q(V, {
|
|
731
731
|
ref_key: "formRef",
|
|
732
732
|
ref: w,
|
|
@@ -736,7 +736,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
736
736
|
default: B(() => [
|
|
737
737
|
a("div", Jt, [
|
|
738
738
|
a("div", Xt, [
|
|
739
|
-
c(
|
|
739
|
+
c(s, {
|
|
740
740
|
label: e(f)("inventory.transfer.form.name"),
|
|
741
741
|
"label-mark": "required",
|
|
742
742
|
modelValue: e(l).name,
|
|
@@ -773,7 +773,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
773
773
|
"onUpdate:modelValue": t[2] || (t[2] = (x) => C.value = x),
|
|
774
774
|
items: _.value
|
|
775
775
|
}, null, 8, ["label", "modelValue", "items"]),
|
|
776
|
-
c(
|
|
776
|
+
c(s, {
|
|
777
777
|
label: e(f)("inventory.transfer.form.reference"),
|
|
778
778
|
"label-mark": "optional",
|
|
779
779
|
modelValue: e(l).purchaseOrder.ref,
|
|
@@ -789,9 +789,9 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
789
789
|
}, null, 8, ["label", "modelValue", "class"])
|
|
790
790
|
])
|
|
791
791
|
]),
|
|
792
|
-
a("div",
|
|
793
|
-
a("div",
|
|
794
|
-
a("div",
|
|
792
|
+
a("div", es, [
|
|
793
|
+
a("div", ts, [
|
|
794
|
+
a("div", ss, F(e(f)("inventory.transfer.form.items.title")), 1),
|
|
795
795
|
c(y, {
|
|
796
796
|
disabled: n.disabled,
|
|
797
797
|
label: e(f)("inventory.transfer.form.items.addItem"),
|
|
@@ -830,7 +830,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
830
830
|
}, 8, ["disabled"]);
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
}),
|
|
833
|
+
}), ns = { class: "flex items-center" }, as = { class: "fm-typo-en-title-md-800" }, ls = { class: "flex gap-4" }, rs = /* @__PURE__ */ W({
|
|
834
834
|
__name: "TransferTemplateDialog",
|
|
835
835
|
props: {
|
|
836
836
|
mode: {},
|
|
@@ -840,7 +840,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
840
840
|
emits: ["update:show", "submitted"],
|
|
841
841
|
setup(u, { expose: b, emit: m }) {
|
|
842
842
|
var t;
|
|
843
|
-
const l = u, f = m, g =
|
|
843
|
+
const l = u, f = m, g = st(), k = ht(), { t: i } = Y(), o = ze(l, "show");
|
|
844
844
|
function d() {
|
|
845
845
|
return {
|
|
846
846
|
_id: "",
|
|
@@ -876,9 +876,9 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
876
876
|
const p = U(l.modelValue ?? d()), _ = U(((t = l.modelValue) == null ? void 0 : t._id) ?? `${Math.random()}`);
|
|
877
877
|
ye(
|
|
878
878
|
() => l.show,
|
|
879
|
-
(
|
|
879
|
+
(s) => {
|
|
880
880
|
var r;
|
|
881
|
-
|
|
881
|
+
s && (p.value = l.modelValue ?? d(), _.value = ((r = l.modelValue) == null ? void 0 : r._id) ?? `${Math.random()}`);
|
|
882
882
|
}
|
|
883
883
|
);
|
|
884
884
|
const C = U(!1), T = M(() => {
|
|
@@ -894,26 +894,26 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
894
894
|
}), w = U();
|
|
895
895
|
b({
|
|
896
896
|
validateInputs: () => {
|
|
897
|
-
var
|
|
898
|
-
(r = (
|
|
897
|
+
var s, r;
|
|
898
|
+
(r = (s = w.value) == null ? void 0 : s.validateInputs) == null || r.call(s);
|
|
899
899
|
},
|
|
900
900
|
resetInputsValidation: () => {
|
|
901
|
-
var
|
|
902
|
-
(r = (
|
|
901
|
+
var s, r;
|
|
902
|
+
(r = (s = w.value) == null ? void 0 : s.resetInputsValidation) == null || r.call(s);
|
|
903
903
|
},
|
|
904
904
|
resetInputs: () => {
|
|
905
|
-
var
|
|
906
|
-
(r = (
|
|
905
|
+
var s, r;
|
|
906
|
+
(r = (s = w.value) == null ? void 0 : s.resetInputs) == null || r.call(s);
|
|
907
907
|
}
|
|
908
908
|
});
|
|
909
909
|
async function S() {
|
|
910
|
-
const
|
|
911
|
-
if (
|
|
912
|
-
C.value = !0, (
|
|
910
|
+
const s = p.value;
|
|
911
|
+
if (s) {
|
|
912
|
+
C.value = !0, (s.purchaseOrder.supplier.internal === "warehouse" || s.purchaseOrder.supplier.internal === "restaurant") && (s.purchaseOrder.items = s.purchaseOrder.items.map(
|
|
913
913
|
({ totalCost: r, ...h }) => h
|
|
914
914
|
));
|
|
915
915
|
try {
|
|
916
|
-
await g.createTemplate(
|
|
916
|
+
await g.createTemplate(s), await new Promise((r) => setTimeout(r, 1e3)), k.open({
|
|
917
917
|
title: i("inventory.transfer.template.create.success"),
|
|
918
918
|
message: i("inventory.transfer.template.create.successMessage"),
|
|
919
919
|
type: "success"
|
|
@@ -930,13 +930,13 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
async function A() {
|
|
933
|
-
const
|
|
934
|
-
if (
|
|
935
|
-
C.value = !0, (
|
|
933
|
+
const s = p.value;
|
|
934
|
+
if (s) {
|
|
935
|
+
C.value = !0, (s.purchaseOrder.supplier.internal === "warehouse" || s.purchaseOrder.supplier.internal === "restaurant") && (s.purchaseOrder.items = s.purchaseOrder.items.map(
|
|
936
936
|
({ totalCost: r, ...h }) => h
|
|
937
937
|
));
|
|
938
938
|
try {
|
|
939
|
-
await g.updateTemplate(
|
|
939
|
+
await g.updateTemplate(s), await new Promise((r) => setTimeout(r, 1e3)), k.open({
|
|
940
940
|
title: i("inventory.transfer.template.update.success"),
|
|
941
941
|
message: i("inventory.transfer.template.update.successMessage"),
|
|
942
942
|
type: "success"
|
|
@@ -961,25 +961,25 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
961
961
|
}
|
|
962
962
|
}
|
|
963
963
|
function n() {
|
|
964
|
-
var
|
|
965
|
-
(r = (
|
|
964
|
+
var s, r;
|
|
965
|
+
(r = (s = w.value) == null ? void 0 : s.validateInputs) == null || r.call(s);
|
|
966
966
|
}
|
|
967
|
-
return (
|
|
967
|
+
return (s, r) => {
|
|
968
968
|
const h = I("FmButton"), y = I("FmSideSheet");
|
|
969
969
|
return R(), Q(y, {
|
|
970
|
-
modelValue: e(
|
|
971
|
-
"onUpdate:modelValue": r[2] || (r[2] = (v) => Oe(
|
|
970
|
+
modelValue: e(o),
|
|
971
|
+
"onUpdate:modelValue": r[2] || (r[2] = (v) => Oe(o) ? o.value = v : null),
|
|
972
972
|
"dismiss-away": "",
|
|
973
973
|
"close-button": "",
|
|
974
974
|
"max-width": 900
|
|
975
975
|
}, {
|
|
976
976
|
"side-sheet-header": B(() => [
|
|
977
|
-
a("div",
|
|
978
|
-
a("div",
|
|
977
|
+
a("div", ns, [
|
|
978
|
+
a("div", as, F(T.value), 1)
|
|
979
979
|
])
|
|
980
980
|
]),
|
|
981
981
|
default: B(() => [
|
|
982
|
-
(R(), Q(
|
|
982
|
+
(R(), Q(os, {
|
|
983
983
|
class: "w-full",
|
|
984
984
|
ref_key: "formRef",
|
|
985
985
|
ref: w,
|
|
@@ -991,7 +991,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
991
991
|
}, null, 8, ["model-value", "disabled"]))
|
|
992
992
|
]),
|
|
993
993
|
"side-sheet-footer": B(() => [
|
|
994
|
-
a("div",
|
|
994
|
+
a("div", ls, [
|
|
995
995
|
c(h, {
|
|
996
996
|
loading: C.value,
|
|
997
997
|
label: e(i)("common.save"),
|
|
@@ -1009,22 +1009,22 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1009
1009
|
}, 8, ["modelValue"]);
|
|
1010
1010
|
};
|
|
1011
1011
|
}
|
|
1012
|
-
}),
|
|
1012
|
+
}), is = { class: "flex flex-col gap-16 w-full h-full" }, us = { class: "flex justify-between" }, ds = { class: "fm-typo-en-body-lg-600" }, ms = { class: "flex flex-col gap-8" }, cs = { class: "flex flex-col gap-4" }, ps = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fs = { class: "flex gap-1" }, ys = { class: "fm-typo-en-body-lg-600" }, vs = {
|
|
1013
1013
|
key: 0,
|
|
1014
1014
|
class: "flex flex-col gap-4"
|
|
1015
|
-
},
|
|
1015
|
+
}, bs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _s = { class: "fm-typo-en-body-lg-600" }, xs = { class: "flex flex-col gap-4" }, hs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gs = { class: "fm-typo-en-body-lg-600" }, ks = {
|
|
1016
1016
|
key: 1,
|
|
1017
1017
|
class: "flex flex-col gap-4"
|
|
1018
|
-
},
|
|
1018
|
+
}, Cs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ws = { class: "fm-typo-en-body-lg-600" }, Ts = {
|
|
1019
1019
|
key: 2,
|
|
1020
1020
|
class: "flex flex-col gap-4"
|
|
1021
|
-
},
|
|
1021
|
+
}, Fs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $s = { class: "fm-typo-en-body-lg-600" }, Ss = {
|
|
1022
1022
|
key: 3,
|
|
1023
1023
|
class: "flex flex-col gap-4"
|
|
1024
|
-
},
|
|
1024
|
+
}, Rs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Is = { class: "fm-typo-en-body-lg-600" }, Ms = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Ds = { class: "flex flex-col gap-8" }, As = { class: "fm-typo-en-body-lg-600" }, Vs = { class: "flex w-full gap-4" }, Os = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, Ps = { class: "fm-typo-en-body-lg-600 shrink-0" }, Bs = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Ls = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Us = {
|
|
1025
1025
|
key: 0,
|
|
1026
1026
|
class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1027
|
-
},
|
|
1027
|
+
}, qs = { class: "flex gap-8 xs:flex-col" }, Es = /* @__PURE__ */ W({
|
|
1028
1028
|
__name: "TransferTemplateDetails",
|
|
1029
1029
|
props: {
|
|
1030
1030
|
template: {},
|
|
@@ -1040,7 +1040,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1040
1040
|
var p, _, C, T;
|
|
1041
1041
|
return ((_ = (p = k.value) == null ? void 0 : p.supplier) == null ? void 0 : _.internal) === "restaurant" || ((T = (C = k.value) == null ? void 0 : C.supplier) == null ? void 0 : T.internal) === "warehouse" ? P.TRANSFER : P.PURCHASE;
|
|
1042
1042
|
}
|
|
1043
|
-
),
|
|
1043
|
+
), o = U(!0), d = ze(m, "show");
|
|
1044
1044
|
return (p, _) => {
|
|
1045
1045
|
var L;
|
|
1046
1046
|
const C = I("FmChip"), T = I("FmMenuDivider"), w = I("FmCard"), S = I("FmButton"), A = I("FmSideSheet");
|
|
@@ -1048,23 +1048,23 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1048
1048
|
header: e(g)("inventory.transfer.template.details.view", { template: (L = p.template) == null ? void 0 : L.name }),
|
|
1049
1049
|
modelValue: e(d),
|
|
1050
1050
|
"onUpdate:modelValue": _[2] || (_[2] = (n) => Oe(d) ? d.value = n : null),
|
|
1051
|
-
"dismiss-away":
|
|
1051
|
+
"dismiss-away": o.value,
|
|
1052
1052
|
"close-button": "",
|
|
1053
1053
|
"max-width": 500
|
|
1054
1054
|
}, {
|
|
1055
1055
|
default: B(() => {
|
|
1056
1056
|
var n;
|
|
1057
1057
|
return [
|
|
1058
|
-
a("div",
|
|
1058
|
+
a("div", is, [
|
|
1059
1059
|
c(w, {
|
|
1060
1060
|
variant: "outlined",
|
|
1061
1061
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1062
1062
|
}, {
|
|
1063
1063
|
default: B(() => {
|
|
1064
|
-
var t,
|
|
1064
|
+
var t, s, r, h, y, v, V, x, O;
|
|
1065
1065
|
return [
|
|
1066
|
-
a("div",
|
|
1067
|
-
a("div",
|
|
1066
|
+
a("div", us, [
|
|
1067
|
+
a("div", ds, F(e(g)("inventory.transfer.template.details.templateSummary")), 1),
|
|
1068
1068
|
a("div", null, [
|
|
1069
1069
|
c(C, {
|
|
1070
1070
|
label: e(g)(
|
|
@@ -1076,55 +1076,55 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1076
1076
|
])
|
|
1077
1077
|
]),
|
|
1078
1078
|
c(T),
|
|
1079
|
-
a("div",
|
|
1080
|
-
a("div",
|
|
1081
|
-
a("div",
|
|
1082
|
-
a("div",
|
|
1079
|
+
a("div", ms, [
|
|
1080
|
+
a("div", cs, [
|
|
1081
|
+
a("div", ps, [
|
|
1082
|
+
a("div", fs, F(e(g)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1083
1083
|
]),
|
|
1084
|
-
a("div",
|
|
1084
|
+
a("div", ys, F(e(ot)(((t = p.template) == null ? void 0 : t._id) ?? "")), 1)
|
|
1085
1085
|
]),
|
|
1086
|
-
(
|
|
1087
|
-
a("div",
|
|
1088
|
-
a("div",
|
|
1086
|
+
(s = k.value) != null && s.effectiveAt ? (R(), N("div", vs, [
|
|
1087
|
+
a("div", bs, F(e(g)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
1088
|
+
a("div", _s, F(e(yt)(new Date((r = k.value) == null ? void 0 : r.effectiveAt))), 1)
|
|
1089
1089
|
])) : ae("", !0),
|
|
1090
|
-
a("div",
|
|
1091
|
-
a("div",
|
|
1092
|
-
a("div",
|
|
1090
|
+
a("div", xs, [
|
|
1091
|
+
a("div", hs, F(e(g)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
1092
|
+
a("div", gs, F(e(g)(
|
|
1093
1093
|
`inventory.transfer.receiveRequest.details.type.${i.value.toLocaleLowerCase("en-US")}`
|
|
1094
1094
|
)), 1)
|
|
1095
1095
|
]),
|
|
1096
|
-
(y = (h = k.value) == null ? void 0 : h.supplier) != null && y.name ? (R(), N("div",
|
|
1097
|
-
a("div",
|
|
1098
|
-
a("div",
|
|
1096
|
+
(y = (h = k.value) == null ? void 0 : h.supplier) != null && y.name ? (R(), N("div", ks, [
|
|
1097
|
+
a("div", Cs, F(e(g)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1098
|
+
a("div", ws, F((V = (v = k.value) == null ? void 0 : v.supplier) == null ? void 0 : V.name), 1)
|
|
1099
1099
|
])) : ae("", !0),
|
|
1100
|
-
(x = k.value) != null && x.ref ? (R(), N("div",
|
|
1101
|
-
a("div",
|
|
1102
|
-
a("div",
|
|
1100
|
+
(x = k.value) != null && x.ref ? (R(), N("div", Ts, [
|
|
1101
|
+
a("div", Fs, F(e(g)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1102
|
+
a("div", $s, F(k.value.ref), 1)
|
|
1103
1103
|
])) : ae("", !0),
|
|
1104
|
-
(O = k.value) != null && O.remark ? (R(), N("div",
|
|
1105
|
-
a("div",
|
|
1106
|
-
a("div",
|
|
1104
|
+
(O = k.value) != null && O.remark ? (R(), N("div", Ss, [
|
|
1105
|
+
a("div", Rs, F(e(g)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1106
|
+
a("div", Is, F(k.value.remark), 1)
|
|
1107
1107
|
])) : ae("", !0)
|
|
1108
1108
|
])
|
|
1109
1109
|
];
|
|
1110
1110
|
}),
|
|
1111
1111
|
_: 1
|
|
1112
1112
|
}),
|
|
1113
|
-
a("div",
|
|
1114
|
-
a("div",
|
|
1115
|
-
a("div",
|
|
1113
|
+
a("div", Ms, [
|
|
1114
|
+
a("div", Ds, [
|
|
1115
|
+
a("div", As, F(e(g)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
1116
1116
|
(R(!0), N(Pe, null, We(((n = k.value) == null ? void 0 : n.items) ?? [], (t) => (R(), N("div", {
|
|
1117
1117
|
key: t.code,
|
|
1118
1118
|
class: "flex flex-col"
|
|
1119
1119
|
}, [
|
|
1120
|
-
a("div",
|
|
1121
|
-
a("div",
|
|
1120
|
+
a("div", Vs, [
|
|
1121
|
+
a("div", Os, F(t.name), 1),
|
|
1122
1122
|
_[3] || (_[3] = a("div", { class: "flex-1 min-w-32" }, null, -1)),
|
|
1123
|
-
a("div",
|
|
1123
|
+
a("div", Ps, F(e(nt)(t.quantity, t.sku.unit, t.measurement)), 1)
|
|
1124
1124
|
]),
|
|
1125
|
-
a("div",
|
|
1126
|
-
a("div",
|
|
1127
|
-
t.totalCost && e(f).enableTotalCost ? (R(), N("div",
|
|
1125
|
+
a("div", Bs, [
|
|
1126
|
+
a("div", Ls, F(t.code), 1),
|
|
1127
|
+
t.totalCost && e(f).enableTotalCost ? (R(), N("div", Us, " (" + F(e(Be)(t.totalCost)) + ") ", 1)) : ae("", !0)
|
|
1128
1128
|
])
|
|
1129
1129
|
]))), 128))
|
|
1130
1130
|
])
|
|
@@ -1133,7 +1133,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1133
1133
|
];
|
|
1134
1134
|
}),
|
|
1135
1135
|
"side-sheet-footer": B(() => [
|
|
1136
|
-
a("div",
|
|
1136
|
+
a("div", qs, [
|
|
1137
1137
|
c(S, {
|
|
1138
1138
|
label: e(g)("inventory.transfer.template.use"),
|
|
1139
1139
|
onClick: _[0] || (_[0] = (n) => l("action:use"))
|
|
@@ -1149,12 +1149,12 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1149
1149
|
}, 8, ["header", "modelValue", "dismiss-away"]);
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
|
-
}),
|
|
1152
|
+
}), Ns = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 h-full" }, zs = { class: "flex-1 flex flex-col gap-8" }, Hs = { class: "flex flex-col" }, js = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Gs = { class: "fm-typo-en-body-lg-400" }, Ys = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, Ws = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, uo = /* @__PURE__ */ W({
|
|
1153
1153
|
__name: "TransferTemplateView",
|
|
1154
1154
|
setup(u) {
|
|
1155
1155
|
const { t: b } = Y(), { createTemplate: m, viewTemplate: l } = Se(), { templateDialogProps: f, transferFormDialogProps: g, templateDetailsProps: k } = gt(
|
|
1156
1156
|
Se()
|
|
1157
|
-
), i = at(),
|
|
1157
|
+
), i = at(), o = bt(), d = qe(), { breakpoints: p } = Ne();
|
|
1158
1158
|
d.watchLocation(i.fetchTemplates);
|
|
1159
1159
|
const _ = M(
|
|
1160
1160
|
() => i.loading.value || !d._currentLocation
|
|
@@ -1172,7 +1172,7 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1172
1172
|
function n(t) {
|
|
1173
1173
|
return t;
|
|
1174
1174
|
}
|
|
1175
|
-
return (t,
|
|
1175
|
+
return (t, s) => {
|
|
1176
1176
|
const r = I("FmTable");
|
|
1177
1177
|
return R(), N(Pe, null, [
|
|
1178
1178
|
c(et, {
|
|
@@ -1190,22 +1190,22 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1190
1190
|
default: B(() => {
|
|
1191
1191
|
var h;
|
|
1192
1192
|
return [
|
|
1193
|
-
a("div",
|
|
1193
|
+
a("div", Ns, [
|
|
1194
1194
|
c(tt, {
|
|
1195
1195
|
searchable: "",
|
|
1196
1196
|
"change-location": "",
|
|
1197
1197
|
search: T.value,
|
|
1198
|
-
"onUpdate:search":
|
|
1198
|
+
"onUpdate:search": s[0] || (s[0] = (y) => T.value = y),
|
|
1199
1199
|
actions: [{ icon: "refresh", onClick: e(i).fetchTemplates }]
|
|
1200
1200
|
}, null, 8, ["search", "actions"]),
|
|
1201
1201
|
(R(), Q(r, {
|
|
1202
|
-
style: Ke(e(
|
|
1202
|
+
style: Ke(e(o).tableHeight),
|
|
1203
1203
|
"column-defs": e(i).columnDefs,
|
|
1204
1204
|
"row-data": C.value,
|
|
1205
1205
|
"search-value": T.value,
|
|
1206
1206
|
loading: _.value,
|
|
1207
1207
|
key: (h = e(d)._currentLocation) == null ? void 0 : h.dbName,
|
|
1208
|
-
onRowClick:
|
|
1208
|
+
onRowClick: s[1] || (s[1] = (y) => e(l)(y.original)),
|
|
1209
1209
|
"page-size": w.value
|
|
1210
1210
|
}, {
|
|
1211
1211
|
"list-row": B((y) => [
|
|
@@ -1214,30 +1214,30 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1214
1214
|
onRowClick: (v) => e(l)(v)
|
|
1215
1215
|
}, {
|
|
1216
1216
|
default: B((v) => {
|
|
1217
|
-
var V, x, O, z, K, Z, J, X, H, ee, te,
|
|
1217
|
+
var V, x, O, z, K, Z, J, X, H, ee, te, se, oe, j, ne, ve, be, _e, ie, xe, he, ge, ke, ue, Ce;
|
|
1218
1218
|
return [
|
|
1219
|
-
a("div",
|
|
1220
|
-
a("div",
|
|
1221
|
-
a("div",
|
|
1219
|
+
a("div", zs, [
|
|
1220
|
+
a("div", Hs, [
|
|
1221
|
+
a("div", js, [
|
|
1222
1222
|
c(e(q), {
|
|
1223
1223
|
render: (O = (x = (V = v._id) == null ? void 0 : V.column) == null ? void 0 : x.columnDef) == null ? void 0 : O.cell,
|
|
1224
1224
|
props: (K = (z = v._id) == null ? void 0 : z.getContext) == null ? void 0 : K.call(z)
|
|
1225
1225
|
}, null, 8, ["render", "props"])
|
|
1226
1226
|
]),
|
|
1227
|
-
a("div",
|
|
1227
|
+
a("div", Qs, [
|
|
1228
1228
|
c(e(q), {
|
|
1229
1229
|
render: (X = (J = (Z = v.name) == null ? void 0 : Z.column) == null ? void 0 : J.columnDef) == null ? void 0 : X.cell,
|
|
1230
1230
|
props: (ee = (H = v.name) == null ? void 0 : H.getContext) == null ? void 0 : ee.call(H)
|
|
1231
1231
|
}, null, 8, ["render", "props"])
|
|
1232
1232
|
]),
|
|
1233
|
-
a("div",
|
|
1233
|
+
a("div", Gs, [
|
|
1234
1234
|
c(e(q), {
|
|
1235
|
-
render: (
|
|
1235
|
+
render: (oe = (se = (te = v.supplier) == null ? void 0 : te.column) == null ? void 0 : se.columnDef) == null ? void 0 : oe.cell,
|
|
1236
1236
|
props: (ne = (j = v.supplier) == null ? void 0 : j.getContext) == null ? void 0 : ne.call(j)
|
|
1237
1237
|
}, null, 8, ["render", "props"])
|
|
1238
1238
|
]),
|
|
1239
|
-
a("div",
|
|
1240
|
-
a("div",
|
|
1239
|
+
a("div", Ys, F(y.original.purchaseOrder.items.length ? y.original.purchaseOrder.items.map((Qe) => Qe.name).join(", ") : "No items"), 1),
|
|
1240
|
+
a("div", Ws, [
|
|
1241
1241
|
c(e(q), {
|
|
1242
1242
|
render: (_e = (be = (ve = v.ref) == null ? void 0 : ve.column) == null ? void 0 : be.columnDef) == null ? void 0 : _e.cell,
|
|
1243
1243
|
props: (xe = (ie = v.ref) == null ? void 0 : ie.getContext) == null ? void 0 : xe.call(ie)
|
|
@@ -1265,9 +1265,9 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1265
1265
|
}, 8, ["title", "actions"]),
|
|
1266
1266
|
(R(), Q(Ze, { to: "body" }, [
|
|
1267
1267
|
c(Ct, $e(e(g), { onSubmitted: L }), null, 16),
|
|
1268
|
-
c(
|
|
1269
|
-
c(
|
|
1270
|
-
onSubmitted:
|
|
1268
|
+
c(Es, Je(Xe(e(k))), null, 16),
|
|
1269
|
+
c(rs, $e(e(f), {
|
|
1270
|
+
onSubmitted: s[2] || (s[2] = (h) => e(i).fetchTemplates())
|
|
1271
1271
|
}), null, 16)
|
|
1272
1272
|
]))
|
|
1273
1273
|
], 64);
|
|
@@ -1275,5 +1275,5 @@ const Bt = { class: "flex flex-col gap-8 py-16" }, Lt = { class: "flex items-cen
|
|
|
1275
1275
|
}
|
|
1276
1276
|
});
|
|
1277
1277
|
export {
|
|
1278
|
-
|
|
1278
|
+
uo as default
|
|
1279
1279
|
};
|