@feedmepos/mf-inventory-portal 0.0.25-dev.51 → 0.0.25-dev.52
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-Bf7Ef5j4.js → App-DkPiRPu7.js} +34 -34
- package/dist/{ApprovalView-CTKJY1vM.js → ApprovalView-BEF-qPdZ.js} +13 -13
- package/dist/{BindingsDialog-Cb7aRRNk.js → BindingsDialog-B6vjaPiA.js} +2 -2
- package/dist/{BindingsPicker-DOI78hCt.js → BindingsPicker-BmWf3j6H.js} +1 -1
- package/dist/{BindingsTable-CZE4g-lw.js → BindingsTable-VVNmzkzf.js} +1 -1
- package/dist/{ClosingDraftView-ChjnuJSG.js → ClosingDraftView-C6sNEHK5.js} +77 -77
- package/dist/{ClosingTemplateView-gSQqeQ_q.js → ClosingTemplateView-5k8R-fMI.js} +241 -241
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BMFxe5xn.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DclFOxv5.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-PmKyuRhO.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BFqAE1ZI.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CnRG4x74.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DwAyTAFy.js} +1 -1
- package/dist/{IngredientGroupView-CaF4rmHy.js → IngredientGroupView-DAeurvqt.js} +1 -1
- package/dist/{IngredientsView-CX_MSjT3.js → IngredientsView-Ca8fShPE.js} +4 -4
- package/dist/{IntegrationView-BRkcILmI.js → IntegrationView-Db4XlQvK.js} +2 -2
- package/dist/{InventoryBindingForm-BK7OBXJt.js → InventoryBindingForm-BTtpF1P5.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D81eO5Mu.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-ByJPHKqO.js} +3 -3
- package/dist/{InventoryBindingSummary-B3m-PoE-.js → InventoryBindingSummary-Bb5gN9Bu.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DsTKgxFv.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D4vUOy_R.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-8Sa_WUWa.js → PremiumBadge.vue_vue_type_script_setup_true_lang-fFfOjNOU.js} +1 -1
- package/dist/{PublishView-DZR7-XFd.js → PublishView-BqE9qfwb.js} +19 -19
- package/dist/{PurchaseOrderPrintPreview-BT5Khjs6.js → PurchaseOrderPrintPreview-Cp6a-P8I.js} +1 -1
- package/dist/{ReceiveRequestView-3nhyFqXE.js → ReceiveRequestView-DKPPCyAU.js} +11 -11
- package/dist/{RecipeView-R-lqVFmh.js → RecipeView-BEsrqzuU.js} +3 -3
- package/dist/{StockView-Did7vk97.js → StockView-DplJi2OM.js} +9 -9
- package/dist/{SupplierView-BGHR6LD2.js → SupplierView-DL3D84U2.js} +7 -7
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-vjDgXu5D.js → TransferDetails.vue_vue_type_script_setup_true_lang-BzFkrRui.js} +5 -5
- package/dist/{TransferTemplateView-Dh1iZbPZ.js → TransferTemplateView-DakAYozL.js} +159 -159
- package/dist/{UnitView-DE9WIvA-.js → UnitView-C_Wqv69Z.js} +3 -3
- package/dist/{WarehouseView-CgurMkHh.js → WarehouseView-CeoVZ9cs.js} +1 -1
- package/dist/{app-BoT0hU4y.js → app-CulzKCFs.js} +4768 -3926
- package/dist/app.d.ts +842 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-CpTYRDjJ.js → decimal-DdjfkmJS.js} +1 -1
- package/dist/{feature-CW1D96VL.js → feature-jwErVPVw.js} +1 -1
- package/dist/{format-unit-display-D6lsq-iX.js → format-unit-display-BMC3HZ0N.js} +2 -2
- package/dist/{index-tTGOQaym.js → index-BDCZItPF.js} +1 -1
- package/dist/{index-TqOHI1Dk.js → index-C7-QVxlo.js} +1 -1
- package/dist/{stock-Cnh2comB.js → stock-Czw9__W8.js} +1 -1
- package/dist/{supplier-BY8xacQQ.js → supplier-f0XPCLm-.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BwbzsMlI.js → use-ingredient-select-dialog-DDeNnPW0.js} +1 -1
- package/dist/{use-inventory-binding-dialog-3srettA-.js → use-inventory-binding-dialog-BTE0Ceov.js} +1 -1
- package/dist/{vue-i18n-C9tRTjjd.js → vue-i18n-B0gOxrrS.js} +120 -120
- package/package.json +3 -3
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { defineComponent as ke, ref as V, resolveComponent as E, openBlock as x, createBlock as X, withCtx as Y, createElementVNode as o, createTextVNode as De, toDisplayString as z, unref as y, createVNode as _, h as k, reactive as Ye, computed as H, onMounted as Ke, watch as Ge, isRef as Te, createElementBlock as T, Fragment as q, createCommentVNode as ne, normalizeClass as me, renderList as ve, normalizeStyle as Re, Teleport as qe, mergeProps as We } from "vue";
|
|
2
|
-
import { X as Ze, u as we, ak as W, l as Je, J as je, i as P, t as Xe, K as ye, q as Qe, r as et, s as tt, al as Me, am as Pe, a7 as Ie, an as le, ad as at, aj as oe, V as Ue, D as Fe, h as xe, f as nt, e as ot, a as st, z as rt, _ as lt, B as ct, C as it, E as he } from "./app-
|
|
2
|
+
import { X as Ze, u as we, ak as W, l as Je, J as je, i as P, t as Xe, K as ye, q as Qe, r as et, s as tt, al as Me, am as Pe, a7 as Ie, an as le, ad as at, aj as oe, V as Ue, D as Fe, h as xe, f as nt, e as ot, a as st, z as rt, _ as lt, B as ct, C as it, E as he } from "./app-CulzKCFs.js";
|
|
3
3
|
import { useCoreStore as ut, useI18n as Ee } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as Ce, useDialog as dt, useProxiedModel as mt, components as de, useBreakpoints as ft } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as He, storeToRefs as pt } from "pinia";
|
|
6
|
-
import { a as Le, u as ze } from "./stock-
|
|
6
|
+
import { a as Le, u as ze } from "./stock-Czw9__W8.js";
|
|
7
7
|
import { E as vt } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
|
-
const Se = Ze((n,
|
|
8
|
+
const Se = Ze((n, s) => {
|
|
9
9
|
function e() {
|
|
10
10
|
return we().currentLocation.dbName;
|
|
11
11
|
}
|
|
12
12
|
return {
|
|
13
13
|
async getDraft(i) {
|
|
14
14
|
const u = e(), g = `${n.inventoryBackendUrl}/${u}/closing-draft/${i}`;
|
|
15
|
-
return
|
|
15
|
+
return s.get(g);
|
|
16
16
|
},
|
|
17
17
|
async readDrafts() {
|
|
18
18
|
const i = e(), u = `${n.inventoryBackendUrl}/${i}/closing-draft`;
|
|
19
|
-
return
|
|
19
|
+
return s.get(u);
|
|
20
20
|
},
|
|
21
21
|
async runOperation(i) {
|
|
22
22
|
const u = e(), g = `${n.inventoryBackendUrl}/${u}/closing-draft/run-operation`;
|
|
23
|
-
return
|
|
23
|
+
return s.post(g, i);
|
|
24
24
|
},
|
|
25
25
|
async sync(i) {
|
|
26
26
|
const u = e(), g = `${n.inventoryBackendUrl}/${u}/closing-draft/sync`;
|
|
27
|
-
return
|
|
27
|
+
return s.post(g, i);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
}), yt = { class: "fm-typo-en-body-lg-400" }, gt = { class: "fm-typo-en-body-lg-600" }, bt = { class: "flex gap-12 py-8 justify-end w-full" }, $e = /* @__PURE__ */ ke({
|
|
@@ -36,14 +36,14 @@ const Se = Ze((n, r) => {
|
|
|
36
36
|
onFinished: { type: Function }
|
|
37
37
|
},
|
|
38
38
|
setup(n) {
|
|
39
|
-
const
|
|
39
|
+
const s = n, e = V(), i = Se(), u = Ce(), g = V(!1);
|
|
40
40
|
async function h() {
|
|
41
41
|
g.value = !0;
|
|
42
42
|
try {
|
|
43
43
|
await i.runOperation({
|
|
44
|
-
_id:
|
|
45
|
-
_rev:
|
|
46
|
-
action:
|
|
44
|
+
_id: s.draft._id,
|
|
45
|
+
_rev: s.draft._rev ?? "",
|
|
46
|
+
action: s.action,
|
|
47
47
|
data: {
|
|
48
48
|
remark: e.value
|
|
49
49
|
}
|
|
@@ -51,7 +51,7 @@ const Se = Ze((n, r) => {
|
|
|
51
51
|
title: "Success",
|
|
52
52
|
message: "Action submitted",
|
|
53
53
|
type: "success"
|
|
54
|
-
}),
|
|
54
|
+
}), s.onFinished();
|
|
55
55
|
} catch (D) {
|
|
56
56
|
u.open({
|
|
57
57
|
title: "Something went wrong",
|
|
@@ -77,7 +77,7 @@ const Se = Ze((n, r) => {
|
|
|
77
77
|
]),
|
|
78
78
|
_(R, {
|
|
79
79
|
modelValue: e.value,
|
|
80
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
80
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => e.value = r),
|
|
81
81
|
label: "Remark",
|
|
82
82
|
"label-mark": "required",
|
|
83
83
|
rules: [y(Je)()]
|
|
@@ -86,7 +86,7 @@ const Se = Ze((n, r) => {
|
|
|
86
86
|
_(M, {
|
|
87
87
|
label: "Cancel",
|
|
88
88
|
variant: "tertiary",
|
|
89
|
-
onClick: l[1] || (l[1] = (
|
|
89
|
+
onClick: l[1] || (l[1] = (r) => D.onCancel())
|
|
90
90
|
}),
|
|
91
91
|
_(M, {
|
|
92
92
|
label: D.action == y(W).enum.approveDraft ? "Approve" : "Reject",
|
|
@@ -102,18 +102,18 @@ const Se = Ze((n, r) => {
|
|
|
102
102
|
}
|
|
103
103
|
}), xt = ye(0);
|
|
104
104
|
function Ne(n) {
|
|
105
|
-
const
|
|
105
|
+
const s = n.measurementsAmounts.groupBy((i) => i.measurement.id), e = n.sku.unit.measurements.reduce((i, u) => {
|
|
106
106
|
var D, l;
|
|
107
|
-
const g = ((l = (D =
|
|
107
|
+
const g = ((l = (D = s.get(u.id)) == null ? void 0 : D[0]) == null ? void 0 : l.amount) ?? xt, h = je(u.conversion, g);
|
|
108
108
|
return i + +P(h);
|
|
109
109
|
}, +P(n.baseAmount));
|
|
110
110
|
return Xe(e, n.baseAmount.precision);
|
|
111
111
|
}
|
|
112
112
|
const ht = ye(0), At = ye(100);
|
|
113
|
-
function _t(n,
|
|
114
|
-
const i = Ne(n), u = Me(i,
|
|
115
|
-
...
|
|
116
|
-
amount: Math.abs(
|
|
113
|
+
function _t(n, s, e) {
|
|
114
|
+
const i = Ne(n), u = Me(i, s), g = s.amount === 0 ? null : Pe(u, {
|
|
115
|
+
...s,
|
|
116
|
+
amount: Math.abs(s.amount)
|
|
117
117
|
}), h = g ? je(g, At) : null;
|
|
118
118
|
return {
|
|
119
119
|
code: n.sku.code,
|
|
@@ -126,7 +126,7 @@ function _t(n, r, e) {
|
|
|
126
126
|
(l, R, M) => (l[`measurementAbbrev${M}`] = `(${R.measurement.abbrev}) × ${P(R.measurement.conversion)}`, l[`measurementAmount${M}`] = +P(R.amount), l),
|
|
127
127
|
{}
|
|
128
128
|
),
|
|
129
|
-
systemBalance: +P(
|
|
129
|
+
systemBalance: +P(s),
|
|
130
130
|
physicalBalance: +P(i),
|
|
131
131
|
adjustedAmount: +P(u),
|
|
132
132
|
adjustedDiffPercentage: h ? +P(Ie(h, 2)) : null
|
|
@@ -136,19 +136,19 @@ function Dt(n) {
|
|
|
136
136
|
return !n.abbrev.toLocaleLowerCase().includes("inactive");
|
|
137
137
|
}
|
|
138
138
|
function kt(n) {
|
|
139
|
-
const
|
|
139
|
+
const s = Oe(n);
|
|
140
140
|
return n.reduce(
|
|
141
141
|
(e, i) => {
|
|
142
142
|
var u;
|
|
143
|
-
return Math.max(e, ((u =
|
|
143
|
+
return Math.max(e, ((u = s == null ? void 0 : s.get(i.sku._id)) == null ? void 0 : u[0].length) ?? 0);
|
|
144
144
|
},
|
|
145
145
|
0
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
function Oe(n) {
|
|
149
149
|
return n.groupBy(
|
|
150
|
-
(
|
|
151
|
-
(
|
|
150
|
+
(s) => s.sku._id,
|
|
151
|
+
(s) => s.measurementsAmounts.filter((e) => !e.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((e) => e.measurement.id)
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
154
|
function wt(n) {
|
|
@@ -197,9 +197,9 @@ function wt(n) {
|
|
|
197
197
|
])
|
|
198
198
|
];
|
|
199
199
|
}
|
|
200
|
-
function jt(n,
|
|
200
|
+
function jt(n, s) {
|
|
201
201
|
var B, b, v, F, N, C, I;
|
|
202
|
-
const e =
|
|
202
|
+
const e = s.groupBy(
|
|
203
203
|
(w) => w.id,
|
|
204
204
|
(w) => w.balance
|
|
205
205
|
), i = [...n.items, ...n.negativeStockItems ?? []], u = Oe(i), g = i.map((w) => {
|
|
@@ -230,13 +230,13 @@ function jt(n, r) {
|
|
|
230
230
|
[],
|
|
231
231
|
R.map((w) => w.name),
|
|
232
232
|
...g.map((w) => R.map((Z) => w[Z.id]))
|
|
233
|
-
], U = R.map((w) => `system:${w.id}`),
|
|
234
|
-
return tt(
|
|
233
|
+
], U = R.map((w) => `system:${w.id}`), r = Qe(M, U), p = `[${l == null ? void 0 : l.name}] closing draft (${et(new Date(n.updatedAt))}).xlsx`;
|
|
234
|
+
return tt(r, p), p;
|
|
235
235
|
}
|
|
236
236
|
const _e = He(
|
|
237
237
|
"closingDraftActions",
|
|
238
238
|
function() {
|
|
239
|
-
const
|
|
239
|
+
const s = dt(), e = Ce(), i = Le(), u = Se(), g = ze(), h = V(!1), D = V();
|
|
240
240
|
function l(b) {
|
|
241
241
|
const v = {
|
|
242
242
|
draft: b
|
|
@@ -271,30 +271,30 @@ const _e = He(
|
|
|
271
271
|
}), v = await R(b)), jt(b, v);
|
|
272
272
|
}
|
|
273
273
|
function U(b, v) {
|
|
274
|
-
|
|
274
|
+
s.open({
|
|
275
275
|
title: "Approve draft",
|
|
276
276
|
contentComponent: $e,
|
|
277
277
|
contentComponentProps: {
|
|
278
278
|
draft: b,
|
|
279
279
|
action: W.enum.approveDraft,
|
|
280
280
|
onFinished: () => {
|
|
281
|
-
|
|
281
|
+
s.close(), v == null || v();
|
|
282
282
|
},
|
|
283
|
-
onCancel: () =>
|
|
283
|
+
onCancel: () => s.close()
|
|
284
284
|
}
|
|
285
285
|
});
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
|
|
287
|
+
function r(b, v) {
|
|
288
|
+
s.open({
|
|
289
289
|
title: "Reject draft",
|
|
290
290
|
contentComponent: $e,
|
|
291
291
|
contentComponentProps: {
|
|
292
292
|
draft: b,
|
|
293
293
|
action: W.enum.rejectDraft,
|
|
294
294
|
onFinished: () => {
|
|
295
|
-
|
|
295
|
+
s.close(), v == null || v();
|
|
296
296
|
},
|
|
297
|
-
onCancel: () =>
|
|
297
|
+
onCancel: () => s.close()
|
|
298
298
|
}
|
|
299
299
|
});
|
|
300
300
|
}
|
|
@@ -319,7 +319,7 @@ const _e = He(
|
|
|
319
319
|
viewDraft: l,
|
|
320
320
|
closeDraftDialog: B,
|
|
321
321
|
approveDraft: U,
|
|
322
|
-
rejectDraft:
|
|
322
|
+
rejectDraft: r,
|
|
323
323
|
syncDraft: p,
|
|
324
324
|
exportDraft: M,
|
|
325
325
|
viewClosingDraftShow: h,
|
|
@@ -342,26 +342,26 @@ function Ae(n) {
|
|
|
342
342
|
const Ct = He(
|
|
343
343
|
"closingDraftTable",
|
|
344
344
|
function() {
|
|
345
|
-
const { t:
|
|
345
|
+
const { t: s } = Ee(), e = _e(), i = V(new Array()), u = V(!1), g = we(), h = Se();
|
|
346
346
|
async function D() {
|
|
347
347
|
if (i.value = [], !!g._currentLocation) {
|
|
348
348
|
u.value = !0;
|
|
349
349
|
try {
|
|
350
|
-
const [
|
|
351
|
-
i.value =
|
|
352
|
-
} catch (
|
|
353
|
-
console.log("Something went wrong when fetching drafts:",
|
|
350
|
+
const [r] = await Promise.all([h.readDrafts()]).delayed(1e3);
|
|
351
|
+
i.value = r.reverse();
|
|
352
|
+
} catch (r) {
|
|
353
|
+
console.log("Something went wrong when fetching drafts:", r);
|
|
354
354
|
} finally {
|
|
355
355
|
u.value = !1;
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
async function l(
|
|
359
|
+
async function l(r) {
|
|
360
360
|
if (!i.value.find((p) => p._id) && g._currentLocation) {
|
|
361
361
|
u.value = !0;
|
|
362
362
|
try {
|
|
363
363
|
const [p] = await Promise.all([
|
|
364
|
-
h.getDraft(
|
|
364
|
+
h.getDraft(r),
|
|
365
365
|
new Promise((B) => setTimeout(B, 1e3))
|
|
366
366
|
]);
|
|
367
367
|
i.value = [p];
|
|
@@ -375,8 +375,8 @@ const Ct = He(
|
|
|
375
375
|
function R() {
|
|
376
376
|
e.closeDraftDialog(), D();
|
|
377
377
|
}
|
|
378
|
-
function M(
|
|
379
|
-
switch (p = ot(p),
|
|
378
|
+
function M(r, p) {
|
|
379
|
+
switch (p = ot(p), r) {
|
|
380
380
|
case xe.Details:
|
|
381
381
|
return e.viewDraft(p);
|
|
382
382
|
case xe.Export:
|
|
@@ -392,15 +392,15 @@ const Ct = He(
|
|
|
392
392
|
{
|
|
393
393
|
id: "_id",
|
|
394
394
|
accessorKey: "_id",
|
|
395
|
-
header: () =>
|
|
396
|
-
cell(
|
|
397
|
-
return at(`${
|
|
395
|
+
header: () => s("inventory.closing.table.createdAt"),
|
|
396
|
+
cell(r) {
|
|
397
|
+
return at(`${r.getValue()}`);
|
|
398
398
|
},
|
|
399
399
|
enableSorting: !0
|
|
400
400
|
},
|
|
401
401
|
{
|
|
402
402
|
id: "updatedAt",
|
|
403
|
-
accessorFn: (
|
|
403
|
+
accessorFn: (r) => oe(r.updatedAt),
|
|
404
404
|
header: () => "Updated at",
|
|
405
405
|
enableSorting: !0,
|
|
406
406
|
size: 200
|
|
@@ -414,11 +414,11 @@ const Ct = He(
|
|
|
414
414
|
},
|
|
415
415
|
{
|
|
416
416
|
id: "noOfItems",
|
|
417
|
-
accessorFn: (
|
|
417
|
+
accessorFn: (r) => {
|
|
418
418
|
var p;
|
|
419
|
-
return
|
|
419
|
+
return r.items.length + (((p = r.negativeStockItems) == null ? void 0 : p.length) ?? 0);
|
|
420
420
|
},
|
|
421
|
-
header: () =>
|
|
421
|
+
header: () => s("inventory.closing.table.noOfItems"),
|
|
422
422
|
enableSorting: !1,
|
|
423
423
|
meta: {
|
|
424
424
|
width: "10rem",
|
|
@@ -427,20 +427,20 @@ const Ct = He(
|
|
|
427
427
|
},
|
|
428
428
|
{
|
|
429
429
|
id: "recentRemark",
|
|
430
|
-
accessorFn: (
|
|
430
|
+
accessorFn: (r) => {
|
|
431
431
|
var p;
|
|
432
|
-
return (
|
|
432
|
+
return (r == null ? void 0 : r.approveRemark) ?? ((p = r == null ? void 0 : r.rejectionHistory) == null ? void 0 : p.computeFirst((B) => B.rejectRemark)) ?? r.remark;
|
|
433
433
|
},
|
|
434
434
|
header: () => "Recent remark"
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
437
|
id: "status",
|
|
438
|
-
accessorFn: (
|
|
439
|
-
header: () =>
|
|
438
|
+
accessorFn: (r) => r.status,
|
|
439
|
+
header: () => s("inventory.closing.table.status"),
|
|
440
440
|
enableSorting: !1,
|
|
441
|
-
cell(
|
|
441
|
+
cell(r) {
|
|
442
442
|
var N;
|
|
443
|
-
const p =
|
|
443
|
+
const p = r.row.original, B = p.status, b = new Date(p.updatedAt), v = (N = p == null ? void 0 : p.rejectionHistory) == null ? void 0 : N.computeFirst((C) => C.rejectedAt), F = v ? new Date(v) : null;
|
|
444
444
|
return B === "DRAFT" && F ? F.getTime() > b.getTime() ? k(
|
|
445
445
|
"div",
|
|
446
446
|
{
|
|
@@ -482,8 +482,8 @@ const Ct = He(
|
|
|
482
482
|
},
|
|
483
483
|
{
|
|
484
484
|
id: "action",
|
|
485
|
-
cell(
|
|
486
|
-
const p =
|
|
485
|
+
cell(r) {
|
|
486
|
+
const p = r.row.original, B = [
|
|
487
487
|
Fe[xe.Details],
|
|
488
488
|
Fe[xe.Export]
|
|
489
489
|
], b = [
|
|
@@ -554,13 +554,13 @@ const Ct = He(
|
|
|
554
554
|
draft: {}
|
|
555
555
|
},
|
|
556
556
|
emits: ["submitted"],
|
|
557
|
-
setup(n, { emit:
|
|
558
|
-
const e = n, i = ze(), u = _e(), g = mt(e, "show"), h = V(!1), D = V(!1), l = V(new Array()), R = Le(), M = Ce(), U = st(),
|
|
557
|
+
setup(n, { emit: s }) {
|
|
558
|
+
const e = n, i = ze(), u = _e(), g = mt(e, "show"), h = V(!1), D = V(!1), l = V(new Array()), R = Le(), M = Ce(), U = st(), r = Ye({}), p = H(() => new Set(
|
|
559
559
|
U.skus.filter((a) => {
|
|
560
560
|
var t;
|
|
561
|
-
return
|
|
561
|
+
return r[(t = a.customAttributes) == null ? void 0 : t.tag];
|
|
562
562
|
}).map((a) => a._id)
|
|
563
|
-
)), B =
|
|
563
|
+
)), B = s, b = H(() => {
|
|
564
564
|
var t, c;
|
|
565
565
|
const a = [...((t = e.draft) == null ? void 0 : t.items) ?? [], ...((c = e.draft) == null ? void 0 : c.negativeStockItems) ?? []];
|
|
566
566
|
return p.value.size ? a.filter((m) => p.value.has(m.sku._id)) : a;
|
|
@@ -1089,11 +1089,11 @@ const Ct = He(
|
|
|
1089
1089
|
key: `${A}`,
|
|
1090
1090
|
label: `${A}`,
|
|
1091
1091
|
selectable: "",
|
|
1092
|
-
selected:
|
|
1093
|
-
onClick: (L) =>
|
|
1092
|
+
selected: r[`${A}`],
|
|
1093
|
+
onClick: (L) => r[`${A}`] = !r[`${A}`]
|
|
1094
1094
|
}, {
|
|
1095
1095
|
default: Y(() => [
|
|
1096
|
-
|
|
1096
|
+
r[`${A}`] ? (x(), X(S, {
|
|
1097
1097
|
key: 0,
|
|
1098
1098
|
name: "check",
|
|
1099
1099
|
class: "text-white",
|
|
@@ -1103,8 +1103,8 @@ const Ct = He(
|
|
|
1103
1103
|
class: me([
|
|
1104
1104
|
"",
|
|
1105
1105
|
{
|
|
1106
|
-
"text-white fm-typo-en-body-md-600":
|
|
1107
|
-
"text-fm-color-typo-primary fm-typo-en-body-md-400": !
|
|
1106
|
+
"text-white fm-typo-en-body-md-600": r[`${A}`],
|
|
1107
|
+
"text-fm-color-typo-primary fm-typo-en-body-md-400": !r[`${A}`]
|
|
1108
1108
|
}
|
|
1109
1109
|
])
|
|
1110
1110
|
}, z(A), 3)
|
|
@@ -1223,9 +1223,9 @@ const Ct = He(
|
|
|
1223
1223
|
}), ca = { class: "flex-1 flex flex-col gap-8" }, ia = { class: "flex flex-col" }, ua = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, da = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ma = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, fa = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Aa = /* @__PURE__ */ ke({
|
|
1224
1224
|
__name: "ClosingDraftView",
|
|
1225
1225
|
setup(n) {
|
|
1226
|
-
const { t:
|
|
1226
|
+
const { t: s } = Ee(), { viewDraft: e } = _e(), { viewClosingDraftProps: i, viewClosingDraftShow: u } = pt(_e()), g = we(), h = Ct(), D = rt(), { breakpoints: l } = ft();
|
|
1227
1227
|
g.watchLocation(h.fetchDrafts);
|
|
1228
|
-
const R = H(() => h.loading), M = V(""), U = H(() => l.value.xs || l.value.sm),
|
|
1228
|
+
const R = H(() => h.loading), M = V(""), U = H(() => l.value.xs || l.value.sm), r = H(() => U.value ? 10 : 20);
|
|
1229
1229
|
function p(v) {
|
|
1230
1230
|
switch (v) {
|
|
1231
1231
|
case "refresh":
|
|
@@ -1237,13 +1237,13 @@ const Ct = He(
|
|
|
1237
1237
|
}
|
|
1238
1238
|
const b = H(() => U.value ? [
|
|
1239
1239
|
{
|
|
1240
|
-
label: "
|
|
1240
|
+
label: s("inventory.common.refresh"),
|
|
1241
1241
|
value: "refresh",
|
|
1242
1242
|
isPrimary: !1
|
|
1243
1243
|
}
|
|
1244
1244
|
] : [
|
|
1245
1245
|
{
|
|
1246
|
-
label: "
|
|
1246
|
+
label: s("inventory.common.refresh"),
|
|
1247
1247
|
value: "refresh",
|
|
1248
1248
|
isPrimary: !1
|
|
1249
1249
|
}
|
|
@@ -1252,7 +1252,7 @@ const Ct = He(
|
|
|
1252
1252
|
const N = E("FmTable");
|
|
1253
1253
|
return x(), T(q, null, [
|
|
1254
1254
|
_(lt, {
|
|
1255
|
-
title: y(
|
|
1255
|
+
title: y(s)("inventory.closing.draft.title"),
|
|
1256
1256
|
actions: b.value,
|
|
1257
1257
|
"onClick:action": p
|
|
1258
1258
|
}, {
|
|
@@ -1279,7 +1279,7 @@ const Ct = He(
|
|
|
1279
1279
|
"search-value": M.value,
|
|
1280
1280
|
loading: R.value,
|
|
1281
1281
|
onRowClick: F[1] || (F[1] = (C) => y(e)(C.original)),
|
|
1282
|
-
"page-size":
|
|
1282
|
+
"page-size": r.value
|
|
1283
1283
|
}, {
|
|
1284
1284
|
"list-row": Y((C) => [
|
|
1285
1285
|
_(it, {
|