@feedmepos/mf-inventory-portal 1.2.22-dev.1 → 1.2.22-dev.2
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-CVo40hoN.js → App-DtwLZ9Ng.js} +1 -1
- package/dist/{ApprovalView-B99YGXOt.js → ApprovalView-DTiPzA1y.js} +9 -9
- package/dist/{BindingsDialog-DGFYmVX9.js → BindingsDialog--1wB_TX2.js} +2 -2
- package/dist/{BindingsPicker-CVWxRkDE.js → BindingsPicker-JjZfjlvz.js} +9 -9
- package/dist/{BindingsTable-Cxs_cQrM.js → BindingsTable-M2CGWdTD.js} +1 -1
- package/dist/{ClosingDraftView-gBO5Icdy.js → ClosingDraftView-B800NjEZ.js} +101 -101
- package/dist/ClosingTemplateView-B1TVIzzy.js +2001 -0
- package/dist/{DeliveryOrderPrintPreview-D-H7S-4t.js → DeliveryOrderPrintPreview-CUXfCixj.js} +8 -8
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BsPMd4IE.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bdw3Q4Dz.js} +33 -33
- package/dist/{FmMultiselectDialog-DXVvibUU.js → FmMultiselectDialog-CyYcvvyg.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Dq8lMkNV.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D-FDSjxY.js} +49 -49
- package/dist/{ImportView-DUPfQshy.js → ImportView-BR7JpsG8.js} +27 -27
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DxLVS1Ar.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bae5DUA9.js} +8 -8
- package/dist/{IngredientGroupView-CqPl6RZI.js → IngredientGroupView-c6XH5Fzg.js} +17 -17
- package/dist/{IngredientsView--7ro7P7J.js → IngredientsView-D4JiQ6Bp.js} +72 -73
- package/dist/{IntegrationView-BZnq8gYp.js → IntegrationView-BdOTe6FG.js} +3 -3
- package/dist/{InventoryBindingForm-DASUGZuO.js → InventoryBindingForm-kqrZutMr.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-l_EgNW0u.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DZ-Mr8-U.js} +12 -12
- package/dist/{InventoryBindingSummary-BoUAsK9S.js → InventoryBindingSummary-D4p9cOiy.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DimqJCjO.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bj_2aQiY.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C_wNgXUC.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CX9H2gLU.js} +7 -7
- package/dist/{PublishView-B-Zal--Y.js → PublishView-DcQQtuF8.js} +10 -10
- package/dist/{PurchaseOrderPrintPreview-CoXu4VO-.js → PurchaseOrderPrintPreview-Ueo4Yftu.js} +13 -13
- package/dist/{ReceiveRequestView-B7rprDy7.js → ReceiveRequestView-Cikz66hY.js} +115 -115
- package/dist/{RecipeView-BbMlUt0v.js → RecipeView-DL1kKy2w.js} +50 -50
- package/dist/{StockView-Bko2-Rzd.js → StockView-DzaCcxc5.js} +7 -7
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DONtcweN.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DP5AFZM2.js} +1 -1
- package/dist/{SupplierView-D4hAT4CW.js → SupplierView-CJuI_jPc.js} +93 -93
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BoZEbHkN.js +3233 -0
- package/dist/{TransferTemplateView-BLWYhdZG.js → TransferTemplateView-DiGdnr0-.js} +140 -140
- package/dist/{UnitView-Boi_sRGP.js → UnitView-CA2isH5r.js} +44 -44
- package/dist/{WarehouseView-B1aAyncU.js → WarehouseView-BMUJN1D1.js} +66 -66
- package/dist/api/adjustment-template.d.ts +1 -0
- package/dist/api/closing-template.d.ts +1 -0
- package/dist/{app-C4dN86_k.js → app-DdrL4md8.js} +8229 -7971
- package/dist/app.js +4 -4
- package/dist/{decimal-Cf4voIJl.js → decimal-DJjE7Vf3.js} +1 -1
- package/dist/{format-unit-display-CjsVuoHS.js → format-unit-display-CK-PNM0G.js} +33 -33
- package/dist/{import-export.helper-DmouV6nF.js → import-export.helper-CJeCekEB.js} +6 -6
- package/dist/{index-DK93lkR_.js → index-Crgf6sCC.js} +1 -1
- package/dist/{index-D2C87f4k.js → index-D4F6boO1.js} +1 -1
- package/dist/{purchase-order-template-CQcIyT35.js → purchase-order-template-BOLP3UzN.js} +1 -1
- package/dist/{stock-CRKwCBhd.js → stock-DqL6z9wL.js} +1 -1
- package/dist/{supplier-BGeDlnSm.js → supplier-CW3GGX9U.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Dg3hbUaX.js → use-ingredient-select-dialog-CrCo-DHA.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DRCiAYUs.js → use-inventory-binding-dialog-RdX9Q4q9.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +60 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +60 -0
- package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts +8 -4
- package/package.json +4 -4
- package/dist/ClosingTemplateView-C61_1m3k.js +0 -1970
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Cr30q-Ft.js +0 -3394
- package/dist/closing-template-CNtgIoiQ.js +0 -53
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as Te, ref as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as Te, ref as V, computed as U, onMounted as Ue, resolveComponent as P, openBlock as w, createElementBlock as L, Fragment as J, createTextVNode as Z, createBlock as Q, withCtx as O, createElementVNode as o, toDisplayString as q, unref as F, createVNode as k, createCommentVNode as ee, h as T, reactive as nt, watch as ot, isRef as Ye, normalizeClass as be, renderList as _e, normalizeStyle as Ke, Teleport as st, mergeProps as rt } from "vue";
|
|
2
|
+
import { aa as lt, u as Ie, ax as E, am as Ge, ay as We, r as ct, Z as Ee, n as N, t as it, a0 as he, W as ut, Y as dt, X as mt, az as qe, aA as Ze, ah as Je, aB as re, an as ft, ac as Me, ab as le, a6 as Le, D as Oe, j as Se, i as pt, f as vt, a as yt, $ as Fe, G as gt, I as bt, J as At, K as Dt, L as je } from "./app-DdrL4md8.js";
|
|
3
3
|
import { useCoreStore as kt, useI18n as Xe } from "@feedmepos/mf-common";
|
|
4
|
-
import { useSnackbar as
|
|
4
|
+
import { useSnackbar as He, useDialog as _t, useProxiedModel as ht, components as ge, useBreakpoints as xt } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as Qe, storeToRefs as wt } from "pinia";
|
|
6
|
-
import { a as
|
|
6
|
+
import { a as Ve, u as et } from "./stock-DqL6z9wL.js";
|
|
7
7
|
import { E as Ct } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
8
|
const Re = lt((l, s) => {
|
|
9
9
|
function e() {
|
|
@@ -39,7 +39,7 @@ const Re = lt((l, s) => {
|
|
|
39
39
|
onFinished: { type: Function }
|
|
40
40
|
},
|
|
41
41
|
setup(l) {
|
|
42
|
-
const s = l, e =
|
|
42
|
+
const s = l, e = V(), u = Re(), p = He(), _ = V(!1), m = V(null), R = V(!1), C = U(() => {
|
|
43
43
|
switch (s.action) {
|
|
44
44
|
case E.enum.approveDraft:
|
|
45
45
|
return "Approve";
|
|
@@ -49,7 +49,7 @@ const Re = lt((l, s) => {
|
|
|
49
49
|
return "Mark as Failed";
|
|
50
50
|
}
|
|
51
51
|
throw new Error(`Unknown action: ${s.action}`);
|
|
52
|
-
}), x =
|
|
52
|
+
}), x = U(() => {
|
|
53
53
|
switch (s.action) {
|
|
54
54
|
case E.enum.approveDraft:
|
|
55
55
|
return "primary";
|
|
@@ -60,7 +60,7 @@ const Re = lt((l, s) => {
|
|
|
60
60
|
}
|
|
61
61
|
throw new Error(`Unknown action: ${s.action}`);
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
Ue(() => {
|
|
64
64
|
if (s.draft.effectiveAt)
|
|
65
65
|
m.value = new Date(s.draft.effectiveAt);
|
|
66
66
|
else {
|
|
@@ -69,7 +69,7 @@ const Re = lt((l, s) => {
|
|
|
69
69
|
}
|
|
70
70
|
R.value = !0;
|
|
71
71
|
});
|
|
72
|
-
const v =
|
|
72
|
+
const v = U({
|
|
73
73
|
get() {
|
|
74
74
|
return m.value === null ? "" : Ge(m.value);
|
|
75
75
|
},
|
|
@@ -80,9 +80,9 @@ const Re = lt((l, s) => {
|
|
|
80
80
|
} else
|
|
81
81
|
m.value = null;
|
|
82
82
|
}
|
|
83
|
-
}), I =
|
|
83
|
+
}), I = U({
|
|
84
84
|
get() {
|
|
85
|
-
return m.value === null ? "" :
|
|
85
|
+
return m.value === null ? "" : We(m.value);
|
|
86
86
|
},
|
|
87
87
|
set(n) {
|
|
88
88
|
if (n) {
|
|
@@ -129,10 +129,10 @@ const Re = lt((l, s) => {
|
|
|
129
129
|
default: O(() => [
|
|
130
130
|
o("div", St, [
|
|
131
131
|
a[4] || (a[4] = Z(" You are about to ")),
|
|
132
|
-
o("span", Ft,
|
|
132
|
+
o("span", Ft, q(C.value), 1),
|
|
133
133
|
a[5] || (a[5] = Z(" this draft. Please provide a remark to justify this action. "))
|
|
134
134
|
]),
|
|
135
|
-
n.action === F(E).enum.approveDraft ? (w(),
|
|
135
|
+
n.action === F(E).enum.approveDraft ? (w(), L("div", jt, [
|
|
136
136
|
k(j, { class: "fm-typo-en-body-lg-600" }, {
|
|
137
137
|
default: O(() => a[6] || (a[6] = [
|
|
138
138
|
Z("Closing Date")
|
|
@@ -141,7 +141,7 @@ const Re = lt((l, s) => {
|
|
|
141
141
|
}),
|
|
142
142
|
k(M, {
|
|
143
143
|
modelValue: v.value,
|
|
144
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
144
|
+
"onUpdate:modelValue": a[0] || (a[0] = (H) => v.value = H)
|
|
145
145
|
}, null, 8, ["modelValue"]),
|
|
146
146
|
k(j, { class: "fm-typo-en-body-lg-600" }, {
|
|
147
147
|
default: O(() => a[7] || (a[7] = [
|
|
@@ -151,12 +151,12 @@ const Re = lt((l, s) => {
|
|
|
151
151
|
}),
|
|
152
152
|
k(f, {
|
|
153
153
|
modelValue: I.value,
|
|
154
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
154
|
+
"onUpdate:modelValue": a[1] || (a[1] = (H) => I.value = H)
|
|
155
155
|
}, null, 8, ["modelValue"])
|
|
156
156
|
])) : ee("", !0),
|
|
157
157
|
k(g, {
|
|
158
158
|
modelValue: e.value,
|
|
159
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
159
|
+
"onUpdate:modelValue": a[2] || (a[2] = (H) => e.value = H),
|
|
160
160
|
label: "Remark",
|
|
161
161
|
"label-mark": "required",
|
|
162
162
|
rules: [F(ct)()]
|
|
@@ -165,7 +165,7 @@ const Re = lt((l, s) => {
|
|
|
165
165
|
k(b, {
|
|
166
166
|
label: "Cancel",
|
|
167
167
|
variant: "tertiary",
|
|
168
|
-
onClick: a[3] || (a[3] = (
|
|
168
|
+
onClick: a[3] || (a[3] = (H) => n.onCancel())
|
|
169
169
|
}),
|
|
170
170
|
k(b, {
|
|
171
171
|
label: C.value,
|
|
@@ -176,7 +176,7 @@ const Re = lt((l, s) => {
|
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
178
|
_: 1
|
|
179
|
-
}, 8, ["disabled"])) : (w(),
|
|
179
|
+
}, 8, ["disabled"])) : (w(), L(J, { key: 0 }, [
|
|
180
180
|
Z("Loading")
|
|
181
181
|
], 64));
|
|
182
182
|
};
|
|
@@ -192,7 +192,7 @@ function tt(l) {
|
|
|
192
192
|
}
|
|
193
193
|
const Tt = he(0), It = he(100);
|
|
194
194
|
function Rt(l, s, e, u) {
|
|
195
|
-
const p = tt(l), _ = u ?? p, m =
|
|
195
|
+
const p = tt(l), _ = u ?? p, m = qe(_, s), R = s.amount === 0 ? null : Ze(m, {
|
|
196
196
|
...s,
|
|
197
197
|
amount: Math.abs(s.amount)
|
|
198
198
|
}), C = R ? Ee(R, It) : null;
|
|
@@ -232,7 +232,7 @@ function at(l) {
|
|
|
232
232
|
(s) => s.measurementsAmounts.filter((e) => !e.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((e) => e.measurement.id)
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function Lt(l) {
|
|
236
236
|
return [
|
|
237
237
|
{
|
|
238
238
|
id: "code",
|
|
@@ -278,8 +278,8 @@ function Ut(l) {
|
|
|
278
278
|
])
|
|
279
279
|
];
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
var M, f, g, b, $,
|
|
281
|
+
function Ut(l, s, e) {
|
|
282
|
+
var M, f, g, b, $, H, te;
|
|
283
283
|
const u = s.groupBy(
|
|
284
284
|
(B) => B.id,
|
|
285
285
|
(B) => B.balance
|
|
@@ -295,7 +295,7 @@ function Lt(l, s, e) {
|
|
|
295
295
|
ce,
|
|
296
296
|
(de = p.get(B.sku._id)) == null ? void 0 : de[0]
|
|
297
297
|
);
|
|
298
|
-
}), C = Mt(_), v = kt().currentBusiness.value, I =
|
|
298
|
+
}), C = Mt(_), v = kt().currentBusiness.value, I = Lt(C), Y = [
|
|
299
299
|
["Business name:", v == null ? void 0 : v.name],
|
|
300
300
|
["Business ID:", v == null ? void 0 : v._id],
|
|
301
301
|
["Menu version", v == null ? void 0 : v.menuVersion],
|
|
@@ -310,7 +310,7 @@ function Lt(l, s, e) {
|
|
|
310
310
|
],
|
|
311
311
|
[
|
|
312
312
|
"Action at",
|
|
313
|
-
l.approvedAt ? new Date(l.approvedAt) : l.rejectionHistory ? new Date((
|
|
313
|
+
l.approvedAt ? new Date(l.approvedAt) : l.rejectionHistory ? new Date((H = l.rejectionHistory[0]) == null ? void 0 : H.rejectedAt) : ""
|
|
314
314
|
],
|
|
315
315
|
[
|
|
316
316
|
"Action remark",
|
|
@@ -322,7 +322,7 @@ function Lt(l, s, e) {
|
|
|
322
322
|
], n = I.map((B) => `system:${B.id}`), a = ut(Y, n), j = `[${v == null ? void 0 : v.name}] closing draft (${dt(new Date(l.updatedAt))}).xlsx`;
|
|
323
323
|
return mt(a, j), j;
|
|
324
324
|
}
|
|
325
|
-
const Et = { class: "flex flex-col" },
|
|
325
|
+
const Et = { class: "flex flex-col" }, Ht = { class: "flex gap-12 py-8 justify-end w-full" }, Vt = /* @__PURE__ */ Te({
|
|
326
326
|
__name: "RefreshBalanceAction",
|
|
327
327
|
props: {
|
|
328
328
|
draft: {},
|
|
@@ -331,9 +331,9 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
331
331
|
},
|
|
332
332
|
setup(l) {
|
|
333
333
|
const s = l;
|
|
334
|
-
|
|
335
|
-
const e =
|
|
336
|
-
|
|
334
|
+
Ve();
|
|
335
|
+
const e = V(!1), u = V(null), p = V(!1);
|
|
336
|
+
Ue(() => {
|
|
337
337
|
if (s.draft.effectiveAt)
|
|
338
338
|
u.value = new Date(s.draft.effectiveAt);
|
|
339
339
|
else {
|
|
@@ -342,7 +342,7 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
342
342
|
}
|
|
343
343
|
p.value = !0;
|
|
344
344
|
});
|
|
345
|
-
const _ =
|
|
345
|
+
const _ = U({
|
|
346
346
|
get() {
|
|
347
347
|
return u.value === null ? "" : Ge(u.value);
|
|
348
348
|
},
|
|
@@ -353,9 +353,9 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
353
353
|
} else
|
|
354
354
|
u.value = null;
|
|
355
355
|
}
|
|
356
|
-
}), m =
|
|
356
|
+
}), m = U({
|
|
357
357
|
get() {
|
|
358
|
-
return u.value === null ? "" :
|
|
358
|
+
return u.value === null ? "" : We(u.value);
|
|
359
359
|
},
|
|
360
360
|
set(C) {
|
|
361
361
|
if (C) {
|
|
@@ -411,7 +411,7 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
411
411
|
"onUpdate:modelValue": x[1] || (x[1] = (j) => m.value = j)
|
|
412
412
|
}, null, 8, ["modelValue"])
|
|
413
413
|
]),
|
|
414
|
-
o("div",
|
|
414
|
+
o("div", Ht, [
|
|
415
415
|
k(n, {
|
|
416
416
|
label: "Cancel",
|
|
417
417
|
variant: "tertiary",
|
|
@@ -426,7 +426,7 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
426
426
|
])
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
|
-
}, 8, ["disabled"])) : (w(),
|
|
429
|
+
}, 8, ["disabled"])) : (w(), L(J, { key: 0 }, [
|
|
430
430
|
Z("Loading")
|
|
431
431
|
], 64));
|
|
432
432
|
};
|
|
@@ -434,7 +434,7 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
434
434
|
}), $e = Qe(
|
|
435
435
|
"closingDraftActions",
|
|
436
436
|
function() {
|
|
437
|
-
const s = _t(), e =
|
|
437
|
+
const s = _t(), e = He(), u = Ve(), p = Re(), _ = et(), m = V(!1), R = V();
|
|
438
438
|
function C(f) {
|
|
439
439
|
const g = {
|
|
440
440
|
draft: f
|
|
@@ -453,8 +453,8 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
453
453
|
}), console.error("Closing draft is completed but closing document cannot be found.", {
|
|
454
454
|
draftId: f._id
|
|
455
455
|
}), [];
|
|
456
|
-
const
|
|
457
|
-
return ((
|
|
456
|
+
const H = await u.readAdjustmentById($);
|
|
457
|
+
return ((H == null ? void 0 : H.skus) ?? []).map((B) => ({
|
|
458
458
|
id: B.sku._id,
|
|
459
459
|
balance: B.fromBalance,
|
|
460
460
|
costs: B.fromCostBalances
|
|
@@ -466,7 +466,7 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
466
466
|
g || (e.open({
|
|
467
467
|
title: "Exporting",
|
|
468
468
|
message: "Fetching data..."
|
|
469
|
-
}), g = await x(f)),
|
|
469
|
+
}), g = await x(f)), Ut(f, g, b ?? []);
|
|
470
470
|
}
|
|
471
471
|
function I(f, g) {
|
|
472
472
|
s.open({
|
|
@@ -530,7 +530,7 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
530
530
|
async function M(f, g, b) {
|
|
531
531
|
await s.open({
|
|
532
532
|
title: "Refresh balance",
|
|
533
|
-
contentComponent:
|
|
533
|
+
contentComponent: Vt,
|
|
534
534
|
contentComponentProps: {
|
|
535
535
|
draft: f,
|
|
536
536
|
onFinished: ($) => {
|
|
@@ -571,7 +571,7 @@ function Be(l) {
|
|
|
571
571
|
const Nt = Qe(
|
|
572
572
|
"closingDraftTable",
|
|
573
573
|
function() {
|
|
574
|
-
const { t: s } = Xe(), e = $e(), u =
|
|
574
|
+
const { t: s } = Xe(), e = $e(), u = V(new Array()), p = V(!1), _ = Ie(), m = Re();
|
|
575
575
|
async function R() {
|
|
576
576
|
if (u.value = [], !!_._currentLocation) {
|
|
577
577
|
p.value = !0;
|
|
@@ -723,7 +723,7 @@ const Nt = Qe(
|
|
|
723
723
|
{
|
|
724
724
|
class: ["fm-status-badge", Be(j)]
|
|
725
725
|
},
|
|
726
|
-
|
|
726
|
+
Le(j)
|
|
727
727
|
)
|
|
728
728
|
);
|
|
729
729
|
}
|
|
@@ -774,7 +774,7 @@ const Nt = Qe(
|
|
|
774
774
|
updateDraftRef: x
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
|
-
), zt = { class: "w-full flex flex-col gap-32" }, Ot = { class: "flex justify-between" }, Yt = { class: "flex" }, Kt = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, Gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
777
|
+
), zt = { class: "w-full flex flex-col gap-32" }, Ot = { class: "flex justify-between" }, Yt = { class: "flex" }, Kt = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, Gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wt = { class: "flex gap-1" }, qt = { class: "fm-typo-en-body-lg-600" }, Zt = { class: "flex flex-col gap-16" }, Jt = { class: "flex items-center" }, Xt = {
|
|
778
778
|
key: 0,
|
|
779
779
|
class: "flex gap-8"
|
|
780
780
|
}, Qt = {
|
|
@@ -812,26 +812,26 @@ const Nt = Qe(
|
|
|
812
812
|
},
|
|
813
813
|
emits: ["submitted", "refresh"],
|
|
814
814
|
setup(l, { emit: s }) {
|
|
815
|
-
const e = l, u = et(), p = $e(), _ = ht(e, "show"), m =
|
|
815
|
+
const e = l, u = et(), p = $e(), _ = ht(e, "show"), m = V(!1), R = V(!1), C = V(!1), x = V(new Array()), v = V(new Array()), I = Ve(), Y = Re(), n = He(), a = yt(), j = Ie(), M = nt({}), f = U(() => new Set(
|
|
816
816
|
a.skus.filter((r) => {
|
|
817
817
|
var t;
|
|
818
818
|
return M[(t = r.customAttributes) == null ? void 0 : t.tag];
|
|
819
819
|
}).map((r) => r._id)
|
|
820
|
-
)), g = s, b =
|
|
820
|
+
)), g = s, b = V({
|
|
821
821
|
templateItem: !0,
|
|
822
822
|
nonTemplateItem: !0
|
|
823
|
-
}), $ =
|
|
823
|
+
}), $ = U(() => {
|
|
824
824
|
var t, y;
|
|
825
825
|
const r = [...((t = e.draft) == null ? void 0 : t.items) ?? [], ...((y = e.draft) == null ? void 0 : y.negativeStockItems) ?? []];
|
|
826
826
|
return f.value.size ? r.filter((d) => f.value.has(d.sku._id)) : r;
|
|
827
|
-
}),
|
|
827
|
+
}), H = U(() => {
|
|
828
828
|
const r = $.value.map((t) => t.sku);
|
|
829
829
|
return r.sort((t, y) => t.code.localeCompare(y.code)), r;
|
|
830
|
-
}), te =
|
|
830
|
+
}), te = U(() => $.value.groupBy(
|
|
831
831
|
(t) => t.sku._id,
|
|
832
832
|
(t) => t.measurementsAmounts.filter((y) => !y.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((y) => y.measurement.id)
|
|
833
833
|
));
|
|
834
|
-
|
|
834
|
+
Ue(ce), ot(
|
|
835
835
|
() => e.show,
|
|
836
836
|
(r) => {
|
|
837
837
|
r && (se.value = ve[0], ce(), b.value = {
|
|
@@ -866,12 +866,12 @@ const Nt = Qe(
|
|
|
866
866
|
id: h.sku._id,
|
|
867
867
|
balance: h.fromBalance,
|
|
868
868
|
costs: h.fromCostBalances
|
|
869
|
-
},
|
|
869
|
+
}, W = {
|
|
870
870
|
id: h.sku._id,
|
|
871
871
|
balance: h.toBalance,
|
|
872
872
|
costs: h.toCostBalances
|
|
873
873
|
};
|
|
874
|
-
x.value.push(D), v.value.push(
|
|
874
|
+
x.value.push(D), v.value.push(W);
|
|
875
875
|
}
|
|
876
876
|
} else
|
|
877
877
|
x.value = ((d = e.draft) == null ? void 0 : d.stockSnapshot) ?? [];
|
|
@@ -906,7 +906,7 @@ const Nt = Qe(
|
|
|
906
906
|
try {
|
|
907
907
|
await I.recalculation.scheduleCalculateStockSnapshotAtDate(d, e.draft._id);
|
|
908
908
|
let D = null;
|
|
909
|
-
for (let
|
|
909
|
+
for (let W = 0; W < c && (D = await Y.getDraft(e.draft._id).delayed(A), D._rev === i); W++)
|
|
910
910
|
;
|
|
911
911
|
if (!D || D._rev === i) {
|
|
912
912
|
n.open({
|
|
@@ -933,12 +933,12 @@ const Nt = Qe(
|
|
|
933
933
|
}
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
|
-
const ue =
|
|
936
|
+
const ue = U(
|
|
937
937
|
() => x.value.groupBy(
|
|
938
938
|
(r) => r.id,
|
|
939
939
|
(r) => r.balance
|
|
940
940
|
)
|
|
941
|
-
), de =
|
|
941
|
+
), de = U(() => $.value.groupBy((r) => r.sku._id));
|
|
942
942
|
function oe(r) {
|
|
943
943
|
return T(
|
|
944
944
|
ge.FmTooltip,
|
|
@@ -953,8 +953,8 @@ const Nt = Qe(
|
|
|
953
953
|
}
|
|
954
954
|
);
|
|
955
955
|
}
|
|
956
|
-
const Ae =
|
|
957
|
-
const r =
|
|
956
|
+
const Ae = U(() => {
|
|
957
|
+
const r = H.value.reduce((y, d) => {
|
|
958
958
|
var i, c;
|
|
959
959
|
return Math.max(y, ((c = (i = te.value) == null ? void 0 : i.get(d._id)) == null ? void 0 : c[0].length) ?? 0);
|
|
960
960
|
}, 0);
|
|
@@ -1022,7 +1022,7 @@ const Nt = Qe(
|
|
|
1022
1022
|
var D;
|
|
1023
1023
|
const d = y.row.original, i = Fe.fromNumber(d.physicalBalance);
|
|
1024
1024
|
let c = !0, A = d.physicalBalance;
|
|
1025
|
-
const h = (D = v.value.find((
|
|
1025
|
+
const h = (D = v.value.find((W) => W.id === d.id)) == null ? void 0 : D.balance;
|
|
1026
1026
|
return h && (Fe.equals({
|
|
1027
1027
|
a: i,
|
|
1028
1028
|
b: h
|
|
@@ -1137,8 +1137,8 @@ const Nt = Qe(
|
|
|
1137
1137
|
let c = Array.from({ length: r }).map((A, h) => {
|
|
1138
1138
|
if (!d[`measurementAmount${h}`])
|
|
1139
1139
|
return null;
|
|
1140
|
-
const D = d[`measurementAmount${h}`],
|
|
1141
|
-
return i(D,
|
|
1140
|
+
const D = d[`measurementAmount${h}`], W = d[`measurementAbbrev${h}`];
|
|
1141
|
+
return i(D, W);
|
|
1142
1142
|
}).filter((A) => A);
|
|
1143
1143
|
return (d.baseUnitAmount || !c.length) && (c = [i(d.baseUnitAmount, d.baseUnit), ...c]), T(
|
|
1144
1144
|
"div",
|
|
@@ -1153,13 +1153,13 @@ const Nt = Qe(
|
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
1155
|
];
|
|
1156
|
-
}), xe =
|
|
1156
|
+
}), xe = U(() => Ae.value.map((r) => r.size ?? 0).reduce((r, t) => r + t)), fe = V(""), De = U(() => {
|
|
1157
1157
|
var y, d;
|
|
1158
1158
|
const r = ((d = (y = e.draft) == null ? void 0 : y.negativeStockItems) == null ? void 0 : d.reduce(
|
|
1159
1159
|
(i, c) => (i[c.sku._id] = c, i),
|
|
1160
1160
|
{}
|
|
1161
1161
|
)) ?? {};
|
|
1162
|
-
return
|
|
1162
|
+
return H.value.map((i) => {
|
|
1163
1163
|
var Ce, S, z, K;
|
|
1164
1164
|
const c = (Ce = de.value.get(i._id)) == null ? void 0 : Ce[0], A = ((S = ue.value.get(i._id)) == null ? void 0 : S[0]) ?? B;
|
|
1165
1165
|
if (!c)
|
|
@@ -1177,10 +1177,10 @@ const Nt = Qe(
|
|
|
1177
1177
|
};
|
|
1178
1178
|
const h = tt(c), D = (K = (z = v.value) == null ? void 0 : z.find(
|
|
1179
1179
|
(G) => G.id === i._id
|
|
1180
|
-
)) == null ? void 0 : K.balance,
|
|
1180
|
+
)) == null ? void 0 : K.balance, W = qe(
|
|
1181
1181
|
D ?? h,
|
|
1182
1182
|
A
|
|
1183
|
-
), we = A.amount === 0 ? null : Ze(
|
|
1183
|
+
), we = A.amount === 0 ? null : Ze(W, {
|
|
1184
1184
|
...A,
|
|
1185
1185
|
amount: Math.abs(A.amount)
|
|
1186
1186
|
}), ye = we ? Ee(we, X) : null;
|
|
@@ -1196,12 +1196,12 @@ const Nt = Qe(
|
|
|
1196
1196
|
}).reduce((G, ne, me) => (G[`measurementAbbrev${me}`] = `(${ne.measurement.abbrev}) × ${N(ne.measurement.conversion)}`, G[`measurementAmount${me}`] = +N(ne.amount), G), {}),
|
|
1197
1197
|
systemBalance: +N(A),
|
|
1198
1198
|
physicalBalance: +N(h),
|
|
1199
|
-
adjustedAmount: +N(
|
|
1199
|
+
adjustedAmount: +N(W),
|
|
1200
1200
|
adjustedDiffPercentage: ye ? +N(Je(ye, 2)) : null,
|
|
1201
1201
|
isTemplateItem: !r[i._id]
|
|
1202
1202
|
};
|
|
1203
1203
|
}).filter((i) => !!(i.isTemplateItem && b.value.templateItem || !i.isTemplateItem && b.value.nonTemplateItem));
|
|
1204
|
-
}), pe =
|
|
1204
|
+
}), pe = U(() => {
|
|
1205
1205
|
var t, y, d, i;
|
|
1206
1206
|
if (!e.draft) return [];
|
|
1207
1207
|
const r = e.draft.approvedAt ? {
|
|
@@ -1266,7 +1266,7 @@ const Nt = Qe(
|
|
|
1266
1266
|
label: "Action history",
|
|
1267
1267
|
value: "history"
|
|
1268
1268
|
}
|
|
1269
|
-
], se =
|
|
1269
|
+
], se = V(ve[0]), ae = U(() => {
|
|
1270
1270
|
var d, i, c;
|
|
1271
1271
|
const r = ((d = e.draft) == null ? void 0 : d.activityLogs) ?? [], t = ((i = e.draft) == null ? void 0 : i.rejectionHistory) ?? [];
|
|
1272
1272
|
for (const A of t)
|
|
@@ -1290,7 +1290,7 @@ const Nt = Qe(
|
|
|
1290
1290
|
remark: e.draft.approveRemark
|
|
1291
1291
|
})), r.sort((A, h) => new Date(h.performedAt).getTime() - new Date(A.performedAt).getTime()).map(
|
|
1292
1292
|
(A) => ({
|
|
1293
|
-
header:
|
|
1293
|
+
header: Le(A.action),
|
|
1294
1294
|
date: le(A.performedAt),
|
|
1295
1295
|
info: [
|
|
1296
1296
|
{
|
|
@@ -1304,18 +1304,18 @@ const Nt = Qe(
|
|
|
1304
1304
|
]
|
|
1305
1305
|
})
|
|
1306
1306
|
);
|
|
1307
|
-
}), ke =
|
|
1307
|
+
}), ke = U(() => {
|
|
1308
1308
|
var i, c, A, h;
|
|
1309
1309
|
if ((i = e == null ? void 0 : e.draft) != null && i.approvedAt) return "Draft is already approved.";
|
|
1310
1310
|
if (((c = e.draft) == null ? void 0 : c.status) !== re.enum.DRAFT) return "Status is not draft.";
|
|
1311
|
-
const r = De.value.some((D) => D.physicalBalance < 0), t = ((h = (A = u.stockBalance.skus) == null ? void 0 : A.filter((D) => D.balance.amount < 0)) == null ? void 0 : h.map((D) => D.id)) ?? [], y = new Set(
|
|
1311
|
+
const r = De.value.some((D) => D.physicalBalance < 0), t = ((h = (A = u.stockBalance.skus) == null ? void 0 : A.filter((D) => D.balance.amount < 0)) == null ? void 0 : h.map((D) => D.id)) ?? [], y = new Set(H.value.map((D) => D._id)), d = t.filter((D) => !y.has(D)).length;
|
|
1312
1312
|
return [
|
|
1313
1313
|
r ? "Negative total exist." : null,
|
|
1314
1314
|
d ? "Negative stock is not included in this draft. Reopen draft in POS and apply changes." : null
|
|
1315
1315
|
].filter((D) => D).join(" ");
|
|
1316
1316
|
});
|
|
1317
1317
|
return (r, t) => {
|
|
1318
|
-
const y = P("FmButtonGroup"), d = P("FmMenuDivider"), i = P("FmCard"), c = P("FmButton"), A = P("FmCircularProgress"), h = P("FmChip"), D = P("FmTextField"),
|
|
1318
|
+
const y = P("FmButtonGroup"), d = P("FmMenuDivider"), i = P("FmCard"), c = P("FmButton"), A = P("FmCircularProgress"), h = P("FmChip"), D = P("FmTextField"), W = P("FmIcon"), we = P("FmTable"), ye = P("FmSpacer"), Ne = P("FmTooltip"), Ce = P("FmSideSheet");
|
|
1319
1319
|
return w(), Q(Ce, {
|
|
1320
1320
|
"dismiss-away": "",
|
|
1321
1321
|
"max-width": 9999,
|
|
@@ -1327,13 +1327,13 @@ const Nt = Qe(
|
|
|
1327
1327
|
var S, z, K, G;
|
|
1328
1328
|
return [
|
|
1329
1329
|
o("div", ha, [
|
|
1330
|
-
((S = e.draft) == null ? void 0 : S.status) === F(re).enum.DRAFT ? (w(),
|
|
1330
|
+
((S = e.draft) == null ? void 0 : S.status) === F(re).enum.DRAFT ? (w(), L(J, { key: 0 }, [
|
|
1331
1331
|
ke.value ? (w(), Q(Ne, {
|
|
1332
1332
|
key: 0,
|
|
1333
1333
|
"z-index": 51
|
|
1334
1334
|
}, {
|
|
1335
1335
|
content: O(() => [
|
|
1336
|
-
Z(
|
|
1336
|
+
Z(q(ke.value), 1)
|
|
1337
1337
|
]),
|
|
1338
1338
|
default: O(() => [
|
|
1339
1339
|
k(c, {
|
|
@@ -1383,7 +1383,7 @@ const Nt = Qe(
|
|
|
1383
1383
|
"onUpdate:modelValue": t[0] || (t[0] = (S) => se.value = S)
|
|
1384
1384
|
}, null, 8, ["modelValue"])
|
|
1385
1385
|
]),
|
|
1386
|
-
se.value.value === "overview" ? (w(),
|
|
1386
|
+
se.value.value === "overview" ? (w(), L(J, { key: 0 }, [
|
|
1387
1387
|
k(i, {
|
|
1388
1388
|
variant: "outlined",
|
|
1389
1389
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
@@ -1396,19 +1396,19 @@ const Nt = Qe(
|
|
|
1396
1396
|
o("div", Yt, [
|
|
1397
1397
|
o("div", {
|
|
1398
1398
|
class: be(["fm-status-badge", F(Be)(((S = r.draft) == null ? void 0 : S.status) ?? "DRAFT")])
|
|
1399
|
-
},
|
|
1399
|
+
}, q(F(Le)(((z = r.draft) == null ? void 0 : z.status) ?? "")), 3)
|
|
1400
1400
|
])
|
|
1401
1401
|
]),
|
|
1402
1402
|
k(d),
|
|
1403
1403
|
o("div", Kt, [
|
|
1404
|
-
(w(!0),
|
|
1404
|
+
(w(!0), L(J, null, _e(pe.value, (K, G) => (w(), L("div", {
|
|
1405
1405
|
class: "flex flex-col gap-4",
|
|
1406
1406
|
key: G
|
|
1407
1407
|
}, [
|
|
1408
1408
|
o("div", Gt, [
|
|
1409
|
-
o("div",
|
|
1409
|
+
o("div", Wt, q(K.label), 1)
|
|
1410
1410
|
]),
|
|
1411
|
-
o("div",
|
|
1411
|
+
o("div", qt, q(K.value), 1)
|
|
1412
1412
|
]))), 128))
|
|
1413
1413
|
])
|
|
1414
1414
|
];
|
|
@@ -1418,7 +1418,7 @@ const Nt = Qe(
|
|
|
1418
1418
|
o("div", Zt, [
|
|
1419
1419
|
o("div", Jt, [
|
|
1420
1420
|
t[12] || (t[12] = o("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
|
|
1421
|
-
m.value ? ee("", !0) : (w(),
|
|
1421
|
+
m.value ? ee("", !0) : (w(), L("div", Xt, [
|
|
1422
1422
|
r.draft && r.draft.status !== F(re).enum.COMPLETED ? (w(), Q(c, {
|
|
1423
1423
|
key: 0,
|
|
1424
1424
|
label: "Refresh balance",
|
|
@@ -1445,7 +1445,7 @@ const Nt = Qe(
|
|
|
1445
1445
|
})
|
|
1446
1446
|
]))
|
|
1447
1447
|
]),
|
|
1448
|
-
m.value ? (w(),
|
|
1448
|
+
m.value ? (w(), L("div", Qt, [
|
|
1449
1449
|
t[14] || (t[14] = o("div", { class: "h-80" }, null, -1)),
|
|
1450
1450
|
o("div", ea, [
|
|
1451
1451
|
o("div", null, [
|
|
@@ -1454,7 +1454,7 @@ const Nt = Qe(
|
|
|
1454
1454
|
t[13] || (t[13] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
|
|
1455
1455
|
]),
|
|
1456
1456
|
t[15] || (t[15] = o("div", { class: "h-80" }, null, -1))
|
|
1457
|
-
])) : (w(),
|
|
1457
|
+
])) : (w(), L(J, { key: 1 }, [
|
|
1458
1458
|
o("div", ta, [
|
|
1459
1459
|
o("div", aa, [
|
|
1460
1460
|
k(h, {
|
|
@@ -1474,8 +1474,8 @@ const Nt = Qe(
|
|
|
1474
1474
|
placeholder: "Filter items"
|
|
1475
1475
|
}, null, 8, ["modelValue"])
|
|
1476
1476
|
]),
|
|
1477
|
-
F(a).skuTags.size ? (w(),
|
|
1478
|
-
(w(!0),
|
|
1477
|
+
F(a).skuTags.size ? (w(), L("div", na, [
|
|
1478
|
+
(w(!0), L(J, null, _e(F(a).skuTags.keys(), (S) => (w(), Q(h, {
|
|
1479
1479
|
key: `${S}`,
|
|
1480
1480
|
label: `${S}`,
|
|
1481
1481
|
selectable: "",
|
|
@@ -1483,7 +1483,7 @@ const Nt = Qe(
|
|
|
1483
1483
|
onClick: (z) => M[`${S}`] = !M[`${S}`]
|
|
1484
1484
|
}, {
|
|
1485
1485
|
default: O(() => [
|
|
1486
|
-
M[`${S}`] ? (w(), Q(
|
|
1486
|
+
M[`${S}`] ? (w(), Q(W, {
|
|
1487
1487
|
key: 0,
|
|
1488
1488
|
name: "check",
|
|
1489
1489
|
class: "text-white",
|
|
@@ -1497,7 +1497,7 @@ const Nt = Qe(
|
|
|
1497
1497
|
"text-fm-color-typo-primary fm-typo-en-body-md-400": !M[`${S}`]
|
|
1498
1498
|
}
|
|
1499
1499
|
])
|
|
1500
|
-
},
|
|
1500
|
+
}, q(S), 3)
|
|
1501
1501
|
]),
|
|
1502
1502
|
_: 2
|
|
1503
1503
|
}, 1032, ["label", "selected", "onClick"]))), 128))
|
|
@@ -1516,9 +1516,9 @@ const Nt = Qe(
|
|
|
1516
1516
|
], 64))
|
|
1517
1517
|
])
|
|
1518
1518
|
], 64)) : ee("", !0),
|
|
1519
|
-
se.value.value === "history" ? (w(),
|
|
1520
|
-
ae.value.length ? (w(),
|
|
1521
|
-
(w(!0),
|
|
1519
|
+
se.value.value === "history" ? (w(), L("div", sa, [
|
|
1520
|
+
ae.value.length ? (w(), L("div", ca, [
|
|
1521
|
+
(w(!0), L(J, null, _e(ae.value, (S, z) => (w(), L(J, { key: z }, [
|
|
1522
1522
|
o("div", ia, [
|
|
1523
1523
|
o("div", ua, [
|
|
1524
1524
|
o("div", da, [
|
|
@@ -1546,8 +1546,8 @@ const Nt = Qe(
|
|
|
1546
1546
|
])
|
|
1547
1547
|
]),
|
|
1548
1548
|
o("div", fa, [
|
|
1549
|
-
o("div", pa,
|
|
1550
|
-
o("div", va,
|
|
1549
|
+
o("div", pa, q(S.header), 1),
|
|
1550
|
+
o("div", va, q(S.date), 1)
|
|
1551
1551
|
])
|
|
1552
1552
|
]),
|
|
1553
1553
|
o("div", ya, [
|
|
@@ -1571,16 +1571,16 @@ const Nt = Qe(
|
|
|
1571
1571
|
}, {
|
|
1572
1572
|
default: O(() => [
|
|
1573
1573
|
o("div", Da, [
|
|
1574
|
-
(w(!0),
|
|
1574
|
+
(w(!0), L(J, null, _e(S.info, (K, G) => (w(), L("div", {
|
|
1575
1575
|
key: G,
|
|
1576
1576
|
class: "flex flex-col gap-4"
|
|
1577
1577
|
}, [
|
|
1578
|
-
o("div", ka,
|
|
1578
|
+
o("div", ka, q(K == null ? void 0 : K.label), 1),
|
|
1579
1579
|
o("div", _a, [
|
|
1580
|
-
(w(!0),
|
|
1580
|
+
(w(!0), L(J, null, _e(K == null ? void 0 : K.values, (ne, me) => (w(), L("div", {
|
|
1581
1581
|
key: me,
|
|
1582
1582
|
class: "fm-typo-en-body-lg-600"
|
|
1583
|
-
},
|
|
1583
|
+
}, q(ne), 1))), 128))
|
|
1584
1584
|
])
|
|
1585
1585
|
]))), 128))
|
|
1586
1586
|
])
|
|
@@ -1590,7 +1590,7 @@ const Nt = Qe(
|
|
|
1590
1590
|
])
|
|
1591
1591
|
])
|
|
1592
1592
|
], 64))), 128))
|
|
1593
|
-
])) : (w(),
|
|
1593
|
+
])) : (w(), L("div", ra, [
|
|
1594
1594
|
k(ye),
|
|
1595
1595
|
o("div", null, [
|
|
1596
1596
|
o("img", {
|
|
@@ -1598,8 +1598,8 @@ const Nt = Qe(
|
|
|
1598
1598
|
alt: "List is empty"
|
|
1599
1599
|
}, null, 8, la)
|
|
1600
1600
|
]),
|
|
1601
|
-
t[16] || (t[16] = o("div", { class: "fm-typo-en-body-lg-600" },
|
|
1602
|
-
t[17] || (t[17] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" },
|
|
1601
|
+
t[16] || (t[16] = o("div", { class: "fm-typo-en-body-lg-600" }, q("No records found"), -1)),
|
|
1602
|
+
t[17] || (t[17] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, q("You can track approval and rejection history here"), -1)),
|
|
1603
1603
|
k(ye),
|
|
1604
1604
|
k(ye)
|
|
1605
1605
|
]))
|
|
@@ -1610,12 +1610,12 @@ const Nt = Qe(
|
|
|
1610
1610
|
}, 8, ["model-value"]);
|
|
1611
1611
|
};
|
|
1612
1612
|
}
|
|
1613
|
-
}), wa = { class: "flex-1 flex flex-col gap-8" }, Ca = { class: "flex flex-col" }, Sa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fa = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ja = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Ba = { class: "fm-typo-en-body-lg-400 line-clamp-2" },
|
|
1613
|
+
}), wa = { class: "flex-1 flex flex-col gap-8" }, Ca = { class: "flex flex-col" }, Sa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fa = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ja = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Ba = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Ua = /* @__PURE__ */ Te({
|
|
1614
1614
|
__name: "ClosingDraftView",
|
|
1615
1615
|
setup(l) {
|
|
1616
1616
|
const { t: s } = Xe(), { viewDraft: e } = $e(), { viewClosingDraftProps: u, viewClosingDraftShow: p } = wt($e()), _ = Ie(), m = Nt(), R = gt(), { breakpoints: C } = xt();
|
|
1617
1617
|
_.watchLocation(m.fetchDrafts);
|
|
1618
|
-
const x =
|
|
1618
|
+
const x = U(() => m.loading), v = V(""), I = U(() => C.value.xs || C.value.sm), Y = U(() => I.value ? 10 : 20);
|
|
1619
1619
|
function n(M) {
|
|
1620
1620
|
switch (M) {
|
|
1621
1621
|
case "refresh":
|
|
@@ -1625,7 +1625,7 @@ const Nt = Qe(
|
|
|
1625
1625
|
function a(M) {
|
|
1626
1626
|
return M;
|
|
1627
1627
|
}
|
|
1628
|
-
const j =
|
|
1628
|
+
const j = U(() => I.value ? [
|
|
1629
1629
|
{
|
|
1630
1630
|
label: s("inventory.common.refresh"),
|
|
1631
1631
|
value: "refresh",
|
|
@@ -1640,7 +1640,7 @@ const Nt = Qe(
|
|
|
1640
1640
|
]);
|
|
1641
1641
|
return (M, f) => {
|
|
1642
1642
|
const g = P("FmTable");
|
|
1643
|
-
return w(),
|
|
1643
|
+
return w(), L(J, null, [
|
|
1644
1644
|
k(bt, {
|
|
1645
1645
|
title: F(s)("inventory.closing.draft.title"),
|
|
1646
1646
|
actions: j.value,
|
|
@@ -1677,13 +1677,13 @@ const Nt = Qe(
|
|
|
1677
1677
|
onRowClick: ($) => F(e)($)
|
|
1678
1678
|
}, {
|
|
1679
1679
|
default: O(($) => {
|
|
1680
|
-
var
|
|
1680
|
+
var H, te, B, X, ce, ie, ue, de, oe, Ae, xe, fe, De, pe, ve, se, ae, ke, r, t;
|
|
1681
1681
|
return [
|
|
1682
1682
|
o("div", wa, [
|
|
1683
1683
|
o("div", Ca, [
|
|
1684
1684
|
o("div", Sa, [
|
|
1685
1685
|
k(F(je), {
|
|
1686
|
-
render: (B = (te = (
|
|
1686
|
+
render: (B = (te = (H = $._id) == null ? void 0 : H.column) == null ? void 0 : te.columnDef) == null ? void 0 : B.cell,
|
|
1687
1687
|
props: (ce = (X = $._id) == null ? void 0 : X.getContext) == null ? void 0 : ce.call(X)
|
|
1688
1688
|
}, null, 8, ["render", "props"])
|
|
1689
1689
|
]),
|
|
@@ -1693,7 +1693,7 @@ const Nt = Qe(
|
|
|
1693
1693
|
props: (Ae = (oe = $.name) == null ? void 0 : oe.getContext) == null ? void 0 : Ae.call(oe)
|
|
1694
1694
|
}, null, 8, ["render", "props"])
|
|
1695
1695
|
]),
|
|
1696
|
-
o("div", ja,
|
|
1696
|
+
o("div", ja, q([
|
|
1697
1697
|
...b.original.items.slice(0, 3).map((y) => y.sku.name),
|
|
1698
1698
|
...b.original.items.length >= 3 ? [`and ${b.original.items.length - 3} more items`] : []
|
|
1699
1699
|
].join(", ")), 1),
|
|
@@ -1735,5 +1735,5 @@ const Nt = Qe(
|
|
|
1735
1735
|
}
|
|
1736
1736
|
});
|
|
1737
1737
|
export {
|
|
1738
|
-
|
|
1738
|
+
Ua as default
|
|
1739
1739
|
};
|