@feedmepos/mf-inventory-portal 0.0.23-dev.26 → 0.0.23-dev.27
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-C0hXAs5E.js → App-B2-rB0yC.js} +2 -2
- package/dist/{ApprovalView-Db5Aq3gK.js → ApprovalView-DrL44_4i.js} +2 -2
- package/dist/{BindingsDialog-dKNKrWKv.js → BindingsDialog-G_9Qdbjt.js} +2 -2
- package/dist/{BindingsPicker-dN1bNnc0.js → BindingsPicker-D6Dbm59Q.js} +1 -1
- package/dist/{BindingsTable-BA461fcU.js → BindingsTable-rpkfHFu6.js} +1 -1
- package/dist/{ClosingDraftView-aRHVKTA6.js → ClosingDraftView-CbIQxG9i.js} +337 -327
- package/dist/{ClosingTemplateView-BYnC4Whw.js → ClosingTemplateView-Cbq14r2J.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BdjeCWX1.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CiK3jJzv.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CP2euPwM.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BCnEgLFo.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-C4aYGbW2.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-6e20tPAa.js} +1 -1
- package/dist/{IngredientGroupView-vdG6npct.js → IngredientGroupView-DXvlg9T2.js} +1 -1
- package/dist/{IngredientsView-DWRAoLHx.js → IngredientsView-Oasfl3n4.js} +4 -4
- package/dist/{IntegrationView-Dp_A-Swf.js → IntegrationView-Ba2eeCeF.js} +1 -1
- package/dist/{InventoryBindingForm-D_wSUUKv.js → InventoryBindingForm-B4v03AdY.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-2Mnqz6HN.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DmkxsM2R.js} +3 -3
- package/dist/{InventoryBindingSummary-oyRdM7Pd.js → InventoryBindingSummary-B74nSYWo.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CSabNdfV.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BIcIrcdw.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-tu1Al7wM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CSVYXLNb.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-B4m8t90I.js → PurchaseOrderPrintPreview-DjMM9eMI.js} +1 -1
- package/dist/{ReceiveRequestView-DIJb_dU2.js → ReceiveRequestView-C-8s7_EU.js} +10 -10
- package/dist/{RecipeView-Ch5KMGLJ.js → RecipeView-Dj_0TDsF.js} +3 -3
- package/dist/{StockView-BVuzsMG7.js → StockView-stjLfg3f.js} +7 -7
- package/dist/{SupplierView-DEC2LmtN.js → SupplierView-DeglTp5H.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-9UZWws3P.js → TransferDetails.vue_vue_type_script_setup_true_lang-CmQCMEiN.js} +4 -4
- package/dist/{TransferTemplateView-DAMQ_Whn.js → TransferTemplateView-BPP181lL.js} +6 -6
- package/dist/{UnitView-CFwHRgQ-.js → UnitView-DY0X-xIJ.js} +3 -3
- package/dist/{WarehouseView-HE71bVOX.js → WarehouseView-D1rxo-vc.js} +1 -1
- package/dist/{app-CRSuR04o.js → app-CCSWGqGQ.js} +194 -194
- package/dist/app.js +1 -1
- package/dist/{decimal-B5DqWjel.js → decimal-GRRZU5-3.js} +1 -1
- package/dist/{feature-DxNphYNO.js → feature-3Nr7NqEl.js} +1 -1
- package/dist/{format-unit-display-D40MKAIU.js → format-unit-display-BA-KI-a-.js} +2 -2
- package/dist/{index-BWDsx2Ik.js → index-i0DM_jxR.js} +1 -1
- package/dist/{stock-BAPZYfON.js → stock-ntKQ4Rgr.js} +1 -1
- package/dist/{supplier-Bp7xaTFX.js → supplier-BmEIB4Jq.js} +1 -1
- package/dist/{use-inventory-binding-dialog-cxY29PPx.js → use-inventory-binding-dialog-DKJCAeBg.js} +1 -1
- package/package.json +2 -2
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as fe, ref as z, resolveComponent as U, openBlock as w, createBlock as
|
|
2
|
-
import { W as Ee, u as pe, ah as
|
|
1
|
+
import { defineComponent as fe, ref as z, resolveComponent as U, openBlock as w, createBlock as oe, withCtx as W, createElementVNode as o, createTextVNode as ye, toDisplayString as I, unref as b, createVNode as _, h as O, computed as T, onMounted as Ue, watch as He, isRef as xe, createCommentVNode as ae, createElementBlock as B, Fragment as Q, normalizeClass as ne, renderList as ce, normalizeStyle as De, Teleport as Ie, mergeProps as ze } from "vue";
|
|
2
|
+
import { W as Ee, u as pe, ah as K, l as Le, J as ve, i as j, t as Ne, K as re, o as Oe, p as Ke, q as Ve, ai as Ae, aj as _e, a6 as we, ak as ke, al as se, ac as Ye, ag as q, T as Ce, D as be, h as ie, f as Ge, e as qe, a as We, x as Ze, y as Je, z as Qe, B as Xe, E as ue } from "./app-CCSWGqGQ.js";
|
|
3
3
|
import { useCoreStore as et, useI18n as je } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as ge, useDialog as tt, useProxiedModel as at, components as de, useBreakpoints as nt } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as Se, storeToRefs as ot } from "pinia";
|
|
6
|
-
import { u as Be } from "./stock-
|
|
6
|
+
import { u as Be } from "./stock-ntKQ4Rgr.js";
|
|
7
7
|
import { E as st } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
|
-
const Fe = Ee((a,
|
|
8
|
+
const Fe = Ee((a, c) => {
|
|
9
9
|
function e() {
|
|
10
10
|
return pe().currentLocation.dbName;
|
|
11
11
|
}
|
|
12
12
|
return {
|
|
13
|
-
async getDraft(
|
|
14
|
-
const d = e(),
|
|
15
|
-
return
|
|
13
|
+
async getDraft(i) {
|
|
14
|
+
const d = e(), p = `${a.inventoryBackendUrl}/${d}/closing-draft/${i}`;
|
|
15
|
+
return c.get(p);
|
|
16
16
|
},
|
|
17
17
|
async readDrafts() {
|
|
18
|
-
const
|
|
19
|
-
return
|
|
18
|
+
const i = e(), d = `${a.inventoryBackendUrl}/${i}/closing-draft`;
|
|
19
|
+
return c.get(d);
|
|
20
20
|
},
|
|
21
|
-
async runOperation(
|
|
22
|
-
const d = e(),
|
|
23
|
-
return
|
|
21
|
+
async runOperation(i) {
|
|
22
|
+
const d = e(), p = `${a.inventoryBackendUrl}/${d}/closing-draft/run-operation`;
|
|
23
|
+
return c.post(p, i);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
}), rt = { class: "fm-typo-en-body-lg-400" }, lt = { class: "fm-typo-en-body-lg-600" }, ct = { class: "flex gap-12 py-8 justify-end w-full" }, he = /* @__PURE__ */ fe({
|
|
@@ -32,14 +32,14 @@ const Fe = Ee((a, l) => {
|
|
|
32
32
|
onFinished: { type: Function }
|
|
33
33
|
},
|
|
34
34
|
setup(a) {
|
|
35
|
-
const
|
|
36
|
-
async function
|
|
37
|
-
|
|
35
|
+
const c = a, e = z(), i = Fe(), d = ge(), p = z(!1);
|
|
36
|
+
async function A() {
|
|
37
|
+
p.value = !0;
|
|
38
38
|
try {
|
|
39
|
-
await
|
|
40
|
-
_id:
|
|
41
|
-
_rev:
|
|
42
|
-
action:
|
|
39
|
+
await i.runOperation({
|
|
40
|
+
_id: c.draft._id,
|
|
41
|
+
_rev: c.draft._rev ?? "",
|
|
42
|
+
action: c.action,
|
|
43
43
|
data: {
|
|
44
44
|
remark: e.value
|
|
45
45
|
}
|
|
@@ -47,48 +47,48 @@ const Fe = Ee((a, l) => {
|
|
|
47
47
|
title: "Success",
|
|
48
48
|
message: "Action submitted",
|
|
49
49
|
type: "success"
|
|
50
|
-
}),
|
|
51
|
-
} catch (
|
|
50
|
+
}), c.onFinished();
|
|
51
|
+
} catch (l) {
|
|
52
52
|
d.open({
|
|
53
53
|
title: "Something went wrong",
|
|
54
54
|
message: "Unable to submit actino. Please try again",
|
|
55
55
|
type: "error"
|
|
56
|
-
}), console.error("error on submit closing draft aciont",
|
|
56
|
+
}), console.error("error on submit closing draft aciont", l);
|
|
57
57
|
} finally {
|
|
58
|
-
|
|
58
|
+
p.value = !1;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
return (
|
|
62
|
-
const
|
|
63
|
-
return w(),
|
|
64
|
-
onValidationSuccess:
|
|
61
|
+
return (l, g) => {
|
|
62
|
+
const S = U("FmTextField"), $ = U("FmButton"), R = U("FmForm");
|
|
63
|
+
return w(), oe(R, {
|
|
64
|
+
onValidationSuccess: A,
|
|
65
65
|
class: "flex flex-col gap-32",
|
|
66
|
-
disabled:
|
|
66
|
+
disabled: p.value
|
|
67
67
|
}, {
|
|
68
68
|
default: W(() => [
|
|
69
69
|
o("div", rt, [
|
|
70
|
-
|
|
71
|
-
o("span", lt, I(
|
|
72
|
-
|
|
70
|
+
g[2] || (g[2] = ye(" You are about to ")),
|
|
71
|
+
o("span", lt, I(l.action == b(K).enum.approveDraft ? "approve" : "reject"), 1),
|
|
72
|
+
g[3] || (g[3] = ye(" this draft. Please provider a remark to justify this action. "))
|
|
73
73
|
]),
|
|
74
|
-
_(
|
|
74
|
+
_(S, {
|
|
75
75
|
modelValue: e.value,
|
|
76
|
-
"onUpdate:modelValue":
|
|
76
|
+
"onUpdate:modelValue": g[0] || (g[0] = (r) => e.value = r),
|
|
77
77
|
label: "Remark",
|
|
78
78
|
"label-mark": "required",
|
|
79
79
|
rules: [b(Le)()]
|
|
80
80
|
}, null, 8, ["modelValue", "rules"]),
|
|
81
81
|
o("div", ct, [
|
|
82
|
-
_(
|
|
82
|
+
_($, {
|
|
83
83
|
label: "Cancel",
|
|
84
84
|
variant: "tertiary",
|
|
85
|
-
onClick:
|
|
85
|
+
onClick: g[1] || (g[1] = (r) => l.onCancel())
|
|
86
86
|
}),
|
|
87
|
-
_(
|
|
88
|
-
label:
|
|
87
|
+
_($, {
|
|
88
|
+
label: l.action == b(K).enum.approveDraft ? "Approve" : "Reject",
|
|
89
89
|
type: "submit",
|
|
90
|
-
variant:
|
|
91
|
-
loading:
|
|
90
|
+
variant: l.action == b(K).enum.approveDraft ? "primary" : "destructive",
|
|
91
|
+
loading: p.value
|
|
92
92
|
}, null, 8, ["label", "variant", "loading"])
|
|
93
93
|
])
|
|
94
94
|
]),
|
|
@@ -96,38 +96,44 @@ const Fe = Ee((a, l) => {
|
|
|
96
96
|
}, 8, ["disabled"]);
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
}), it =
|
|
99
|
+
}), it = re(0);
|
|
100
100
|
function $e(a) {
|
|
101
|
-
const
|
|
102
|
-
var
|
|
103
|
-
const
|
|
104
|
-
return
|
|
105
|
-
}, +
|
|
101
|
+
const c = a.measurementsAmounts.groupBy((i) => i.measurement.id), e = a.sku.unit.measurements.reduce((i, d) => {
|
|
102
|
+
var l, g;
|
|
103
|
+
const p = ((g = (l = c.get(d.id)) == null ? void 0 : l[0]) == null ? void 0 : g.amount) ?? it, A = ve(d.conversion, p);
|
|
104
|
+
return i + +j(A);
|
|
105
|
+
}, +j(a.baseAmount));
|
|
106
106
|
return Ne(e, a.baseAmount.precision);
|
|
107
107
|
}
|
|
108
|
-
const ut =
|
|
109
|
-
function mt(a,
|
|
110
|
-
const e = $e(a),
|
|
108
|
+
const ut = re(0), dt = re(100);
|
|
109
|
+
function mt(a, c) {
|
|
110
|
+
const e = $e(a), i = Ae(e, c), d = c.amount === 0 ? null : _e(i, {
|
|
111
|
+
...c,
|
|
112
|
+
amount: Math.abs(c.amount)
|
|
113
|
+
}), p = d ? ve(d, dt) : null;
|
|
111
114
|
return {
|
|
112
115
|
code: a.sku.code,
|
|
113
116
|
name: a.sku.name,
|
|
114
117
|
baseUnit: a.sku.unit.abbrev,
|
|
115
|
-
baseUnitAmount: +
|
|
116
|
-
...a.measurementsAmounts.filter((
|
|
117
|
-
(
|
|
118
|
+
baseUnitAmount: +j(a.baseAmount),
|
|
119
|
+
...a.measurementsAmounts.filter((l) => Re(l.measurement)).reduce(
|
|
120
|
+
(l, g, S) => (l[`measurementAbbrev${S}`] = `(${g.measurement.abbrev}) × ${j(g.measurement.conversion)}`, l[`measurementAmount${S}`] = +j(g.amount), l),
|
|
118
121
|
{}
|
|
119
122
|
),
|
|
120
|
-
systemBalance: +
|
|
121
|
-
physicalBalance: +
|
|
122
|
-
adjustedAmount: +
|
|
123
|
-
adjustedDiffPercentage:
|
|
123
|
+
systemBalance: +j(c),
|
|
124
|
+
physicalBalance: +j(e),
|
|
125
|
+
adjustedAmount: +j(i),
|
|
126
|
+
adjustedDiffPercentage: p ? +j(we(p, 2)) : null
|
|
124
127
|
};
|
|
125
128
|
}
|
|
126
129
|
function Re(a) {
|
|
127
130
|
return !a.abbrev.toLocaleLowerCase().includes("inactive");
|
|
128
131
|
}
|
|
129
132
|
function ft(a) {
|
|
130
|
-
return a.reduce(
|
|
133
|
+
return a.reduce(
|
|
134
|
+
(c, e) => Math.max(c, e.sku.unit.measurements.filter(Re).length),
|
|
135
|
+
0
|
|
136
|
+
);
|
|
131
137
|
}
|
|
132
138
|
function pt(a) {
|
|
133
139
|
return [
|
|
@@ -147,14 +153,14 @@ function pt(a) {
|
|
|
147
153
|
id: "baseUnit",
|
|
148
154
|
name: "Base unit"
|
|
149
155
|
},
|
|
150
|
-
...Array.from({ length: a }).flatMap((e,
|
|
156
|
+
...Array.from({ length: a }).flatMap((e, i) => [
|
|
151
157
|
{
|
|
152
|
-
id: `measurementAmount${
|
|
153
|
-
name: `UOM amount ${
|
|
158
|
+
id: `measurementAmount${i}`,
|
|
159
|
+
name: `UOM amount ${i + 1}`
|
|
154
160
|
},
|
|
155
161
|
{
|
|
156
|
-
id: `measurementAbbrev${
|
|
157
|
-
name: `UOM ${
|
|
162
|
+
id: `measurementAbbrev${i}`,
|
|
163
|
+
name: `UOM ${i + 1}`
|
|
158
164
|
}
|
|
159
165
|
]),
|
|
160
166
|
{
|
|
@@ -175,57 +181,57 @@ function pt(a) {
|
|
|
175
181
|
}
|
|
176
182
|
];
|
|
177
183
|
}
|
|
178
|
-
function vt(a,
|
|
179
|
-
var
|
|
180
|
-
const e =
|
|
181
|
-
(
|
|
182
|
-
(
|
|
183
|
-
),
|
|
184
|
-
var
|
|
185
|
-
const
|
|
186
|
-
return mt(
|
|
187
|
-
}),
|
|
188
|
-
["Business name:",
|
|
189
|
-
["Business ID:",
|
|
190
|
-
["Menu version",
|
|
184
|
+
function vt(a, c) {
|
|
185
|
+
var s, f, H, M, C, X, F;
|
|
186
|
+
const e = c.groupBy(
|
|
187
|
+
(v) => v.id,
|
|
188
|
+
(v) => v.balance
|
|
189
|
+
), i = [...a.items, ...a.negativeStockItems ?? []], d = i.map((v) => {
|
|
190
|
+
var Z;
|
|
191
|
+
const E = ((Z = e.get(v.sku._id)) == null ? void 0 : Z[0]) ?? ut;
|
|
192
|
+
return mt(v, E);
|
|
193
|
+
}), p = ft(i), l = et().currentBusiness.value, g = pt(p), S = [
|
|
194
|
+
["Business name:", l == null ? void 0 : l.name],
|
|
195
|
+
["Business ID:", l == null ? void 0 : l._id],
|
|
196
|
+
["Menu version", l == null ? void 0 : l.menuVersion],
|
|
191
197
|
["Created at", new Date(a.createdAt)],
|
|
192
|
-
["Created by", (
|
|
198
|
+
["Created by", (s = a.createdBy) == null ? void 0 : s.name],
|
|
193
199
|
["Updated at", new Date(a.updatedAt)],
|
|
194
|
-
["Updated by", (
|
|
200
|
+
["Updated by", (f = a.updatedBy) == null ? void 0 : f.name],
|
|
195
201
|
["Recent action", a.approvedAt ? "Approve" : a.rejectionHistory ? "Reject" : ""],
|
|
196
202
|
[
|
|
197
203
|
"Action by",
|
|
198
|
-
a.approvedAt ? (
|
|
204
|
+
a.approvedAt ? (H = a.approvedBy) == null ? void 0 : H.name : a.rejectionHistory ? (C = (M = a.rejectionHistory[0]) == null ? void 0 : M.rejectedBy) == null ? void 0 : C.name : ""
|
|
199
205
|
],
|
|
200
206
|
[
|
|
201
207
|
"Action at",
|
|
202
|
-
a.approvedAt ? new Date(a.approvedAt) : a.rejectionHistory ? new Date((
|
|
208
|
+
a.approvedAt ? new Date(a.approvedAt) : a.rejectionHistory ? new Date((X = a.rejectionHistory[0]) == null ? void 0 : X.rejectedAt) : ""
|
|
203
209
|
],
|
|
204
210
|
[
|
|
205
211
|
"Action remark",
|
|
206
|
-
a.approvedAt ? a.approveRemark : a.rejectionHistory ? new Date((
|
|
212
|
+
a.approvedAt ? a.approveRemark : a.rejectionHistory ? new Date((F = a.rejectionHistory[0]) == null ? void 0 : F.rejectRemark) : ""
|
|
207
213
|
],
|
|
208
214
|
[],
|
|
209
|
-
|
|
210
|
-
...
|
|
211
|
-
],
|
|
212
|
-
return Ve(R,
|
|
215
|
+
g.map((v) => v.name),
|
|
216
|
+
...d.map((v) => g.map((E) => v[E.id]))
|
|
217
|
+
], $ = g.map((v) => `system:${v.id}`), R = Oe(S, $), r = `[${l == null ? void 0 : l.name}] closing draft (${Ke(new Date(a.updatedAt))}).xlsx`;
|
|
218
|
+
return Ve(R, r), r;
|
|
213
219
|
}
|
|
214
220
|
const me = Se(
|
|
215
221
|
"closingDraftActions",
|
|
216
222
|
function() {
|
|
217
|
-
const
|
|
218
|
-
function
|
|
219
|
-
const
|
|
223
|
+
const c = tt(), e = ge(), i = ke(), d = Be(), p = z(!1), A = z();
|
|
224
|
+
function l(s) {
|
|
225
|
+
const f = {
|
|
220
226
|
draft: s
|
|
221
227
|
};
|
|
222
|
-
|
|
228
|
+
A.value = f, p.value = !0;
|
|
223
229
|
}
|
|
224
|
-
async function
|
|
230
|
+
async function g(s) {
|
|
225
231
|
var H;
|
|
226
|
-
if (s.status ===
|
|
227
|
-
const
|
|
228
|
-
if (!
|
|
232
|
+
if (s.status === se.enum.COMPLETED) {
|
|
233
|
+
const M = s.closingId;
|
|
234
|
+
if (!M)
|
|
229
235
|
return e.open({
|
|
230
236
|
title: "Something went wrong",
|
|
231
237
|
message: "Closing draft is completed but closing document cannot be found.",
|
|
@@ -233,60 +239,60 @@ const me = Se(
|
|
|
233
239
|
}), console.error("Closing draft is completed but closing document cannot be found.", {
|
|
234
240
|
draftId: s == null ? void 0 : s._id
|
|
235
241
|
}), [];
|
|
236
|
-
const
|
|
237
|
-
return (
|
|
242
|
+
const C = await i.getClosingById(M);
|
|
243
|
+
return (C == null ? void 0 : C.skus) ?? [];
|
|
238
244
|
} else
|
|
239
245
|
return await d.readStockBalance(), ((H = d.stockBalance) == null ? void 0 : H.skus) ?? [];
|
|
240
246
|
}
|
|
241
|
-
async function
|
|
242
|
-
|
|
247
|
+
async function S(s, f) {
|
|
248
|
+
f || (e.open({
|
|
243
249
|
title: "Exporting",
|
|
244
250
|
message: "Fetching data..."
|
|
245
|
-
}),
|
|
251
|
+
}), f = await g(s)), vt(s, f);
|
|
246
252
|
}
|
|
247
|
-
function
|
|
248
|
-
|
|
253
|
+
function $(s, f) {
|
|
254
|
+
c.open({
|
|
249
255
|
title: "Approve draft",
|
|
250
256
|
contentComponent: he,
|
|
251
257
|
contentComponentProps: {
|
|
252
258
|
draft: s,
|
|
253
|
-
action:
|
|
259
|
+
action: K.enum.approveDraft,
|
|
254
260
|
onFinished: () => {
|
|
255
|
-
|
|
261
|
+
c.close(), f == null || f();
|
|
256
262
|
},
|
|
257
|
-
onCancel: () =>
|
|
263
|
+
onCancel: () => c.close()
|
|
258
264
|
}
|
|
259
265
|
});
|
|
260
266
|
}
|
|
261
|
-
function
|
|
262
|
-
|
|
267
|
+
function R(s, f) {
|
|
268
|
+
c.open({
|
|
263
269
|
title: "Reject draft",
|
|
264
270
|
contentComponent: he,
|
|
265
271
|
contentComponentProps: {
|
|
266
272
|
draft: s,
|
|
267
|
-
action:
|
|
273
|
+
action: K.enum.rejectDraft,
|
|
268
274
|
onFinished: () => {
|
|
269
|
-
|
|
275
|
+
c.close(), f == null || f();
|
|
270
276
|
},
|
|
271
|
-
onCancel: () =>
|
|
277
|
+
onCancel: () => c.close()
|
|
272
278
|
}
|
|
273
279
|
});
|
|
274
280
|
}
|
|
275
281
|
function r() {
|
|
276
|
-
|
|
282
|
+
p.value = !1;
|
|
277
283
|
}
|
|
278
284
|
return {
|
|
279
|
-
viewDraft:
|
|
285
|
+
viewDraft: l,
|
|
280
286
|
closeDraftDialog: r,
|
|
281
|
-
approveDraft:
|
|
282
|
-
rejectDraft:
|
|
283
|
-
exportDraft:
|
|
284
|
-
viewClosingDraftShow:
|
|
285
|
-
viewClosingDraftProps:
|
|
287
|
+
approveDraft: $,
|
|
288
|
+
rejectDraft: R,
|
|
289
|
+
exportDraft: S,
|
|
290
|
+
viewClosingDraftShow: p,
|
|
291
|
+
viewClosingDraftProps: A
|
|
286
292
|
};
|
|
287
293
|
}
|
|
288
294
|
);
|
|
289
|
-
function
|
|
295
|
+
function Me(a) {
|
|
290
296
|
switch (a) {
|
|
291
297
|
case "DRAFT":
|
|
292
298
|
return "fm-status-badge-draft";
|
|
@@ -299,13 +305,13 @@ function Te(a) {
|
|
|
299
305
|
}
|
|
300
306
|
}
|
|
301
307
|
const gt = Se("closingDraftTable", function() {
|
|
302
|
-
const { t:
|
|
303
|
-
async function
|
|
304
|
-
if (
|
|
308
|
+
const { t: c } = je(), e = me(), i = z(new Array()), d = z(!1), p = pe(), A = Fe();
|
|
309
|
+
async function l() {
|
|
310
|
+
if (i.value = [], !!p._currentLocation) {
|
|
305
311
|
d.value = !0;
|
|
306
312
|
try {
|
|
307
|
-
const [r] = await Promise.all([
|
|
308
|
-
|
|
313
|
+
const [r] = await Promise.all([A.readDrafts()]).delayed(1e3);
|
|
314
|
+
i.value = r.reverse();
|
|
309
315
|
} catch (r) {
|
|
310
316
|
console.log("Something went wrong when fetching drafts:", r);
|
|
311
317
|
} finally {
|
|
@@ -313,15 +319,15 @@ const gt = Se("closingDraftTable", function() {
|
|
|
313
319
|
}
|
|
314
320
|
}
|
|
315
321
|
}
|
|
316
|
-
async function
|
|
317
|
-
if (!
|
|
322
|
+
async function g(r) {
|
|
323
|
+
if (!i.value.find((s) => s._id) && p._currentLocation) {
|
|
318
324
|
d.value = !0;
|
|
319
325
|
try {
|
|
320
326
|
const [s] = await Promise.all([
|
|
321
|
-
|
|
322
|
-
new Promise((
|
|
327
|
+
A.getDraft(r),
|
|
328
|
+
new Promise((f) => setTimeout(f, 1e3))
|
|
323
329
|
]);
|
|
324
|
-
|
|
330
|
+
i.value = [s];
|
|
325
331
|
} catch (s) {
|
|
326
332
|
console.log("Something went wrong when fetching drafts:", s);
|
|
327
333
|
} finally {
|
|
@@ -329,19 +335,19 @@ const gt = Se("closingDraftTable", function() {
|
|
|
329
335
|
}
|
|
330
336
|
}
|
|
331
337
|
}
|
|
332
|
-
function
|
|
333
|
-
e.closeDraftDialog(),
|
|
338
|
+
function S() {
|
|
339
|
+
e.closeDraftDialog(), l();
|
|
334
340
|
}
|
|
335
|
-
function
|
|
341
|
+
function $(r, s) {
|
|
336
342
|
switch (s = qe(s), r) {
|
|
337
343
|
case ie.Details:
|
|
338
344
|
return e.viewDraft(s);
|
|
339
345
|
case ie.Export:
|
|
340
346
|
return e.exportDraft(s);
|
|
341
|
-
case
|
|
342
|
-
return e.approveDraft(s,
|
|
343
|
-
case
|
|
344
|
-
return e.rejectDraft(s,
|
|
347
|
+
case K.enum.approveDraft:
|
|
348
|
+
return e.approveDraft(s, S);
|
|
349
|
+
case K.enum.rejectDraft:
|
|
350
|
+
return e.rejectDraft(s, S);
|
|
345
351
|
}
|
|
346
352
|
}
|
|
347
353
|
return {
|
|
@@ -349,7 +355,7 @@ const gt = Se("closingDraftTable", function() {
|
|
|
349
355
|
{
|
|
350
356
|
id: "_id",
|
|
351
357
|
accessorKey: "_id",
|
|
352
|
-
header: () =>
|
|
358
|
+
header: () => c("inventory.closing.table.createdAt"),
|
|
353
359
|
cell(r) {
|
|
354
360
|
return Ye(`${r.getValue()}`);
|
|
355
361
|
},
|
|
@@ -375,7 +381,7 @@ const gt = Se("closingDraftTable", function() {
|
|
|
375
381
|
var s;
|
|
376
382
|
return r.items.length + (((s = r.negativeStockItems) == null ? void 0 : s.length) ?? 0);
|
|
377
383
|
},
|
|
378
|
-
header: () =>
|
|
384
|
+
header: () => c("inventory.closing.table.noOfItems"),
|
|
379
385
|
enableSorting: !1,
|
|
380
386
|
meta: {
|
|
381
387
|
width: "10rem",
|
|
@@ -386,28 +392,28 @@ const gt = Se("closingDraftTable", function() {
|
|
|
386
392
|
id: "recentRemark",
|
|
387
393
|
accessorFn: (r) => {
|
|
388
394
|
var s;
|
|
389
|
-
return (r == null ? void 0 : r.approveRemark) ?? ((s = r == null ? void 0 : r.rejectionHistory) == null ? void 0 : s.computeFirst((
|
|
395
|
+
return (r == null ? void 0 : r.approveRemark) ?? ((s = r == null ? void 0 : r.rejectionHistory) == null ? void 0 : s.computeFirst((f) => f.rejectRemark));
|
|
390
396
|
},
|
|
391
397
|
header: () => "Recent remark"
|
|
392
398
|
},
|
|
393
399
|
{
|
|
394
400
|
id: "status",
|
|
395
401
|
accessorFn: (r) => r.status,
|
|
396
|
-
header: () =>
|
|
402
|
+
header: () => c("inventory.closing.table.status"),
|
|
397
403
|
enableSorting: !1,
|
|
398
404
|
cell(r) {
|
|
399
|
-
const
|
|
400
|
-
return
|
|
405
|
+
const f = r.row.original.status;
|
|
406
|
+
return O(
|
|
401
407
|
"div",
|
|
402
408
|
{
|
|
403
409
|
class: "flex"
|
|
404
410
|
},
|
|
405
|
-
|
|
411
|
+
O(
|
|
406
412
|
"div",
|
|
407
413
|
{
|
|
408
|
-
class: ["fm-status-badge",
|
|
414
|
+
class: ["fm-status-badge", Me(f)]
|
|
409
415
|
},
|
|
410
|
-
Ce(
|
|
416
|
+
Ce(f)
|
|
411
417
|
)
|
|
412
418
|
);
|
|
413
419
|
}
|
|
@@ -415,24 +421,24 @@ const gt = Se("closingDraftTable", function() {
|
|
|
415
421
|
{
|
|
416
422
|
id: "action",
|
|
417
423
|
cell(r) {
|
|
418
|
-
const s = r.row.original,
|
|
424
|
+
const s = r.row.original, f = [
|
|
419
425
|
be[ie.Details],
|
|
420
426
|
be[ie.Export]
|
|
421
427
|
], H = [
|
|
422
428
|
{
|
|
423
429
|
translationKey: "inventory.closing.draft.approveDraft",
|
|
424
430
|
color: "text-fm-color-typo-primary",
|
|
425
|
-
value:
|
|
431
|
+
value: K.enum.approveDraft
|
|
426
432
|
},
|
|
427
433
|
{
|
|
428
434
|
translationKey: "inventory.closing.draft.rejectDraft",
|
|
429
435
|
color: "text-fm-color-typo-error",
|
|
430
|
-
value:
|
|
436
|
+
value: K.enum.rejectDraft
|
|
431
437
|
}
|
|
432
438
|
];
|
|
433
439
|
return Ge(
|
|
434
|
-
[...
|
|
435
|
-
(
|
|
440
|
+
[...f, ...s.status === se.enum.DRAFT ? H : []],
|
|
441
|
+
(M) => $(M, s)
|
|
436
442
|
);
|
|
437
443
|
},
|
|
438
444
|
enableSorting: !1,
|
|
@@ -443,10 +449,10 @@ const gt = Se("closingDraftTable", function() {
|
|
|
443
449
|
}
|
|
444
450
|
}
|
|
445
451
|
],
|
|
446
|
-
drafts:
|
|
452
|
+
drafts: i,
|
|
447
453
|
loading: d,
|
|
448
|
-
fetchDrafts:
|
|
449
|
-
loadDraft:
|
|
454
|
+
fetchDrafts: l,
|
|
455
|
+
loadDraft: g
|
|
450
456
|
};
|
|
451
457
|
}), yt = { class: "w-full flex flex-col gap-32" }, bt = { class: "flex justify-between" }, ht = { class: "flex" }, xt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dt = { class: "flex gap-1" }, At = { class: "fm-typo-en-body-lg-600" }, _t = { class: "flex flex-col gap-16" }, wt = { class: "flex" }, kt = { key: 0 }, Ct = {
|
|
452
458
|
key: 0,
|
|
@@ -463,7 +469,7 @@ const gt = Se("closingDraftTable", function() {
|
|
|
463
469
|
}, $t = ["src"], Rt = {
|
|
464
470
|
key: 1,
|
|
465
471
|
class: "px-4 flex flex-col"
|
|
466
|
-
},
|
|
472
|
+
}, Mt = { class: "flex gap-12 content-stretch" }, Tt = {
|
|
467
473
|
class: "flex flex-col w-24",
|
|
468
474
|
name: "circles"
|
|
469
475
|
}, Pt = { class: "flex-1 flex flex-col items-center" }, Ut = { class: "flex-1 flex flex-col items-center" }, Ht = {
|
|
@@ -482,36 +488,36 @@ const gt = Se("closingDraftTable", function() {
|
|
|
482
488
|
draft: {}
|
|
483
489
|
},
|
|
484
490
|
emits: ["submitted"],
|
|
485
|
-
setup(a, { emit:
|
|
486
|
-
const e = a,
|
|
491
|
+
setup(a, { emit: c }) {
|
|
492
|
+
const e = a, i = Be(), d = me(), p = at(e, "show"), A = z(!1), l = z(new Array()), g = ke(), S = ge(), $ = We(), R = c, r = T(() => {
|
|
487
493
|
var n, t;
|
|
488
494
|
return [
|
|
489
495
|
...((n = e.draft) == null ? void 0 : n.items) ?? [],
|
|
490
496
|
...((t = e.draft) == null ? void 0 : t.negativeStockItems) ?? []
|
|
491
497
|
];
|
|
492
|
-
}), s =
|
|
498
|
+
}), s = T(() => {
|
|
493
499
|
const n = r.value.map((t) => t.sku);
|
|
494
500
|
return n.sort((t, m) => t.code.localeCompare(m.code)), n;
|
|
495
|
-
}),
|
|
501
|
+
}), f = T(() => r.value.groupBy(
|
|
496
502
|
(t) => t.sku._id,
|
|
497
503
|
(t) => t.measurementsAmounts.filter((m) => !m.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((m) => m.measurement.id)
|
|
498
504
|
));
|
|
499
|
-
Ue(
|
|
505
|
+
Ue(C), He(
|
|
500
506
|
() => e.show,
|
|
501
507
|
(n) => {
|
|
502
|
-
n && (V.value =
|
|
508
|
+
n && (V.value = te[0], C());
|
|
503
509
|
}
|
|
504
510
|
);
|
|
505
|
-
const H =
|
|
506
|
-
async function
|
|
511
|
+
const H = re(0), M = re(100);
|
|
512
|
+
async function C() {
|
|
507
513
|
var t, m, u;
|
|
508
|
-
|
|
509
|
-
const n = ((t = e.draft) == null ? void 0 : t.status) ===
|
|
514
|
+
A.value = !0;
|
|
515
|
+
const n = ((t = e.draft) == null ? void 0 : t.status) === se.enum.COMPLETED;
|
|
510
516
|
try {
|
|
511
|
-
if (await
|
|
512
|
-
const
|
|
513
|
-
if (!
|
|
514
|
-
|
|
517
|
+
if (await $.init(), n) {
|
|
518
|
+
const h = e.draft.closingId;
|
|
519
|
+
if (!h) {
|
|
520
|
+
S.open({
|
|
515
521
|
title: "Something went wrong",
|
|
516
522
|
message: "Closing draft is completed but closing document cannot be found.",
|
|
517
523
|
type: "error"
|
|
@@ -520,28 +526,28 @@ const gt = Se("closingDraftTable", function() {
|
|
|
520
526
|
});
|
|
521
527
|
return;
|
|
522
528
|
}
|
|
523
|
-
const
|
|
524
|
-
|
|
529
|
+
const y = await g.getClosingById(h);
|
|
530
|
+
l.value = (y == null ? void 0 : y.skus) ?? [];
|
|
525
531
|
} else
|
|
526
|
-
await
|
|
527
|
-
} catch (
|
|
528
|
-
|
|
532
|
+
await i.readStockBalance(), l.value = ((u = i.stockBalance) == null ? void 0 : u.skus) ?? [];
|
|
533
|
+
} catch (h) {
|
|
534
|
+
S.open({
|
|
529
535
|
title: "Something went wrong",
|
|
530
536
|
message: "Something went wrong when fetching info. Please try again.",
|
|
531
537
|
type: "error"
|
|
532
|
-
}), console.error("error on fetch stock balances",
|
|
538
|
+
}), console.error("error on fetch stock balances", h);
|
|
533
539
|
} finally {
|
|
534
|
-
|
|
540
|
+
A.value = !1;
|
|
535
541
|
}
|
|
536
542
|
}
|
|
537
|
-
const
|
|
538
|
-
() =>
|
|
543
|
+
const X = T(
|
|
544
|
+
() => l.value.groupBy(
|
|
539
545
|
(n) => n.id,
|
|
540
546
|
(n) => n.balance
|
|
541
547
|
)
|
|
542
|
-
),
|
|
543
|
-
function
|
|
544
|
-
return
|
|
548
|
+
), F = T(() => r.value.groupBy((n) => n.sku._id));
|
|
549
|
+
function v(n) {
|
|
550
|
+
return O(
|
|
545
551
|
de.FmTooltip,
|
|
546
552
|
{ zIndex: 51, placement: "left", class: "w-full flex justify-end" },
|
|
547
553
|
{
|
|
@@ -554,15 +560,15 @@ const gt = Se("closingDraftTable", function() {
|
|
|
554
560
|
}
|
|
555
561
|
);
|
|
556
562
|
}
|
|
557
|
-
const
|
|
563
|
+
const E = T(() => {
|
|
558
564
|
const n = s.value.reduce((m, u) => {
|
|
559
|
-
var
|
|
565
|
+
var h, y, P, Y;
|
|
560
566
|
return console.log(
|
|
561
567
|
"Measurement counts",
|
|
562
568
|
u.unit.name,
|
|
563
569
|
u.unit.abbrev,
|
|
564
|
-
(
|
|
565
|
-
), Math.max(m, ((Y = (P =
|
|
570
|
+
(y = (h = f.value) == null ? void 0 : h.get(u._id)) == null ? void 0 : y[0].length
|
|
571
|
+
), Math.max(m, ((Y = (P = f.value) == null ? void 0 : P.get(u._id)) == null ? void 0 : Y[0].length) ?? 0);
|
|
566
572
|
}, 0);
|
|
567
573
|
return [
|
|
568
574
|
{
|
|
@@ -580,7 +586,7 @@ const gt = Se("closingDraftTable", function() {
|
|
|
580
586
|
{
|
|
581
587
|
id: "baseUnitAmount",
|
|
582
588
|
accessorKey: "baseUnitAmount",
|
|
583
|
-
header: () =>
|
|
589
|
+
header: () => v("Base unit amount"),
|
|
584
590
|
size: 200,
|
|
585
591
|
meta: {
|
|
586
592
|
textAlign: "right"
|
|
@@ -593,20 +599,20 @@ const gt = Se("closingDraftTable", function() {
|
|
|
593
599
|
size: 200
|
|
594
600
|
},
|
|
595
601
|
...Array.from({ length: n }).flatMap((m, u) => {
|
|
596
|
-
const
|
|
602
|
+
const h = `measurementAbbrev${u}`, y = `measurementAmount${u}`;
|
|
597
603
|
return [
|
|
598
604
|
{
|
|
599
|
-
id:
|
|
600
|
-
accessorKey:
|
|
601
|
-
header: () =>
|
|
605
|
+
id: y,
|
|
606
|
+
accessorKey: y,
|
|
607
|
+
header: () => v(`UOM amount ${u + 1}`),
|
|
602
608
|
size: 200,
|
|
603
609
|
meta: {
|
|
604
610
|
textAlign: "right"
|
|
605
611
|
}
|
|
606
612
|
},
|
|
607
613
|
{
|
|
608
|
-
id:
|
|
609
|
-
accessorKey:
|
|
614
|
+
id: h,
|
|
615
|
+
accessorKey: h,
|
|
610
616
|
header: () => `UOM ${u + 1}`,
|
|
611
617
|
size: 200
|
|
612
618
|
}
|
|
@@ -615,7 +621,7 @@ const gt = Se("closingDraftTable", function() {
|
|
|
615
621
|
{
|
|
616
622
|
id: "physicalBalance",
|
|
617
623
|
accessorKey: "physicalBalance",
|
|
618
|
-
header: () =>
|
|
624
|
+
header: () => v("Total balance"),
|
|
619
625
|
size: 200,
|
|
620
626
|
meta: {
|
|
621
627
|
textAlign: "right"
|
|
@@ -624,7 +630,7 @@ const gt = Se("closingDraftTable", function() {
|
|
|
624
630
|
{
|
|
625
631
|
id: "systemBalance",
|
|
626
632
|
accessorKey: "systemBalance",
|
|
627
|
-
header: () =>
|
|
633
|
+
header: () => v("System balance"),
|
|
628
634
|
size: 200,
|
|
629
635
|
meta: {
|
|
630
636
|
textAlign: "right"
|
|
@@ -633,7 +639,7 @@ const gt = Se("closingDraftTable", function() {
|
|
|
633
639
|
{
|
|
634
640
|
id: "adjustedAmount",
|
|
635
641
|
accessorKey: "adjustedAmount",
|
|
636
|
-
header: () =>
|
|
642
|
+
header: () => v("Adjusted amount"),
|
|
637
643
|
size: 200,
|
|
638
644
|
meta: {
|
|
639
645
|
textAlign: "right"
|
|
@@ -642,14 +648,14 @@ const gt = Se("closingDraftTable", function() {
|
|
|
642
648
|
{
|
|
643
649
|
id: "adjustedDiffPercentage",
|
|
644
650
|
accessorKey: "adjustedDiffPercentage",
|
|
645
|
-
header: () =>
|
|
651
|
+
header: () => O(
|
|
646
652
|
de.FmTooltip,
|
|
647
653
|
{ zIndex: 51, placement: "left", class: "w-full flex justify-end" },
|
|
648
654
|
{
|
|
649
655
|
default() {
|
|
650
|
-
return
|
|
656
|
+
return O("div", { class: "flex items-center gap-4" }, [
|
|
651
657
|
"Diff (%)",
|
|
652
|
-
|
|
658
|
+
O(de.FmIcon, { name: "info", color: "neutral-gray-400", size: "sm" })
|
|
653
659
|
]);
|
|
654
660
|
},
|
|
655
661
|
content() {
|
|
@@ -661,17 +667,17 @@ const gt = Se("closingDraftTable", function() {
|
|
|
661
667
|
cell(m) {
|
|
662
668
|
const u = m.row.original.adjustedDiffPercentage;
|
|
663
669
|
if (!u) return "N/A";
|
|
664
|
-
const
|
|
665
|
-
if (
|
|
666
|
-
return
|
|
667
|
-
const
|
|
668
|
-
return
|
|
669
|
-
|
|
670
|
-
name:
|
|
671
|
-
color:
|
|
670
|
+
const h = u.toFixed(2);
|
|
671
|
+
if (h === "0.00")
|
|
672
|
+
return O("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
|
|
673
|
+
const y = u > 0;
|
|
674
|
+
return O("div", { class: "flex items-center gap-4 justify-end" }, [
|
|
675
|
+
O(de.FmIcon, {
|
|
676
|
+
name: y ? "arrow_drop_up" : "arrow_drop_down",
|
|
677
|
+
color: y ? "system-success-300" : "system-error-300",
|
|
672
678
|
size: "md"
|
|
673
679
|
}),
|
|
674
|
-
|
|
680
|
+
h
|
|
675
681
|
]);
|
|
676
682
|
},
|
|
677
683
|
meta: {
|
|
@@ -679,39 +685,39 @@ const gt = Se("closingDraftTable", function() {
|
|
|
679
685
|
}
|
|
680
686
|
}
|
|
681
687
|
];
|
|
682
|
-
}),
|
|
683
|
-
var
|
|
684
|
-
const t = (
|
|
688
|
+
}), Z = T(() => E.value.map((n) => n.size ?? 0).reduce((n, t) => n + t)), le = T(() => s.value.map((n) => {
|
|
689
|
+
var N, J;
|
|
690
|
+
const t = (N = F.value.get(n._id)) == null ? void 0 : N[0], m = ((J = X.value.get(n._id)) == null ? void 0 : J[0]) ?? H;
|
|
685
691
|
if (!t)
|
|
686
692
|
return {
|
|
687
693
|
code: n.code,
|
|
688
694
|
name: n.name,
|
|
689
695
|
baseUnit: n.unit.abbrev,
|
|
690
696
|
baseUnitAmount: 0,
|
|
691
|
-
systemBalance: +
|
|
697
|
+
systemBalance: +j(m),
|
|
692
698
|
physicalBalance: 0,
|
|
693
|
-
adjustedAmount: -+
|
|
699
|
+
adjustedAmount: -+j(m),
|
|
694
700
|
adjustedDiffPercentage: -100
|
|
695
701
|
};
|
|
696
|
-
const u = $e(t),
|
|
702
|
+
const u = $e(t), h = Ae(u, m), y = m.amount === 0 ? null : _e(h, {
|
|
697
703
|
...m,
|
|
698
704
|
amount: Math.abs(m.amount)
|
|
699
|
-
}), P =
|
|
705
|
+
}), P = y ? ve(y, M) : null;
|
|
700
706
|
return {
|
|
701
707
|
code: n.code,
|
|
702
708
|
name: n.name,
|
|
703
709
|
baseUnit: n.unit.abbrev,
|
|
704
|
-
baseUnitAmount: +
|
|
705
|
-
...t.measurementsAmounts.filter((
|
|
706
|
-
var
|
|
707
|
-
return (G = (
|
|
708
|
-
}).reduce((
|
|
709
|
-
systemBalance: +
|
|
710
|
-
physicalBalance: +
|
|
711
|
-
adjustedAmount: +
|
|
712
|
-
adjustedDiffPercentage: P ? +
|
|
710
|
+
baseUnitAmount: +j(t.baseAmount),
|
|
711
|
+
...t.measurementsAmounts.filter((D) => {
|
|
712
|
+
var x, k, G;
|
|
713
|
+
return (G = (k = (x = f.value) == null ? void 0 : x.get(n._id)) == null ? void 0 : k[0]) == null ? void 0 : G.includes(D.measurement.id);
|
|
714
|
+
}).reduce((D, x, k) => (D[`measurementAbbrev${k}`] = `(${x.measurement.abbrev}) × ${j(x.measurement.conversion)}`, D[`measurementAmount${k}`] = +j(x.amount), D), {}),
|
|
715
|
+
systemBalance: +j(m),
|
|
716
|
+
physicalBalance: +j(u),
|
|
717
|
+
adjustedAmount: +j(h),
|
|
718
|
+
adjustedDiffPercentage: P ? +j(we(P, 2)) : null
|
|
713
719
|
};
|
|
714
|
-
})),
|
|
720
|
+
})), ee = T(() => {
|
|
715
721
|
var t, m;
|
|
716
722
|
if (!e.draft) return [];
|
|
717
723
|
const n = e.draft.approvedAt ? {
|
|
@@ -746,6 +752,10 @@ const gt = Se("closingDraftTable", function() {
|
|
|
746
752
|
label: "Effective at",
|
|
747
753
|
value: q(e.draft.effectiveAt ?? e.draft.updatedAt)
|
|
748
754
|
},
|
|
755
|
+
e.draft.remark ? {
|
|
756
|
+
label: "Remark",
|
|
757
|
+
value: e.draft.remark
|
|
758
|
+
} : null,
|
|
749
759
|
n ? {
|
|
750
760
|
label: "Last action",
|
|
751
761
|
value: n.action
|
|
@@ -759,7 +769,7 @@ const gt = Se("closingDraftTable", function() {
|
|
|
759
769
|
value: n.remark
|
|
760
770
|
} : null
|
|
761
771
|
].filter((u) => u).map((u) => u);
|
|
762
|
-
}),
|
|
772
|
+
}), te = [
|
|
763
773
|
{
|
|
764
774
|
label: "Overview",
|
|
765
775
|
value: "overview"
|
|
@@ -768,21 +778,21 @@ const gt = Se("closingDraftTable", function() {
|
|
|
768
778
|
label: "Action history",
|
|
769
779
|
value: "history"
|
|
770
780
|
}
|
|
771
|
-
], V = z(
|
|
772
|
-
var t, m, u,
|
|
781
|
+
], V = z(te[0]), L = T(() => {
|
|
782
|
+
var t, m, u, h;
|
|
773
783
|
return [
|
|
774
784
|
...(((t = e.draft) == null ? void 0 : t.rejectionHistory) ?? []).map(
|
|
775
|
-
(
|
|
785
|
+
(y) => ({
|
|
776
786
|
header: "Reject",
|
|
777
|
-
date: q(
|
|
787
|
+
date: q(y.rejectedAt),
|
|
778
788
|
info: [
|
|
779
789
|
{
|
|
780
790
|
label: "Rejected by",
|
|
781
|
-
values: [
|
|
791
|
+
values: [y.rejectedBy.name]
|
|
782
792
|
},
|
|
783
793
|
{
|
|
784
794
|
label: "Rejection remark",
|
|
785
|
-
values: [
|
|
795
|
+
values: [y.rejectRemark]
|
|
786
796
|
}
|
|
787
797
|
]
|
|
788
798
|
})
|
|
@@ -798,7 +808,7 @@ const gt = Se("closingDraftTable", function() {
|
|
|
798
808
|
},
|
|
799
809
|
{
|
|
800
810
|
label: "Approval remark",
|
|
801
|
-
values: [((
|
|
811
|
+
values: [((h = e.draft) == null ? void 0 : h.approveRemark) ?? ""]
|
|
802
812
|
}
|
|
803
813
|
]
|
|
804
814
|
}
|
|
@@ -806,33 +816,33 @@ const gt = Se("closingDraftTable", function() {
|
|
|
806
816
|
];
|
|
807
817
|
});
|
|
808
818
|
return (n, t) => {
|
|
809
|
-
const m = U("FmButtonGroup"), u = U("FmMenuDivider"),
|
|
810
|
-
return w(),
|
|
819
|
+
const m = U("FmButtonGroup"), u = U("FmMenuDivider"), h = U("FmCard"), y = U("FmButton"), P = U("FmCircularProgress"), Y = U("FmTable"), N = U("FmSpacer"), J = U("FmSideSheet");
|
|
820
|
+
return w(), oe(J, {
|
|
811
821
|
"dismiss-away": "",
|
|
812
822
|
"max-width": 900,
|
|
813
|
-
"model-value": b(
|
|
814
|
-
"onUpdate:modelValue": t[5] || (t[5] = (
|
|
823
|
+
"model-value": b(p),
|
|
824
|
+
"onUpdate:modelValue": t[5] || (t[5] = (D) => xe(p) ? p.value = D : null),
|
|
815
825
|
header: "Closing details"
|
|
816
826
|
}, {
|
|
817
827
|
"side-sheet-footer": W(() => {
|
|
818
|
-
var
|
|
828
|
+
var D, x;
|
|
819
829
|
return [
|
|
820
830
|
o("div", Gt, [
|
|
821
|
-
((
|
|
831
|
+
((D = e.draft) == null ? void 0 : D.status) === b(se).enum.DRAFT ? (w(), oe(y, {
|
|
822
832
|
key: 0,
|
|
823
833
|
label: "Approve",
|
|
824
|
-
onClick: t[2] || (t[2] = () => e.draft && b(d).approveDraft(e.draft, () =>
|
|
825
|
-
})) :
|
|
826
|
-
((
|
|
834
|
+
onClick: t[2] || (t[2] = () => e.draft && b(d).approveDraft(e.draft, () => R("submitted")))
|
|
835
|
+
})) : ae("", !0),
|
|
836
|
+
((x = e.draft) == null ? void 0 : x.status) === b(se).enum.DRAFT ? (w(), oe(y, {
|
|
827
837
|
key: 1,
|
|
828
838
|
label: "Reject",
|
|
829
839
|
variant: "destructive",
|
|
830
|
-
onClick: t[3] || (t[3] = () => e.draft && b(d).rejectDraft(e.draft, () =>
|
|
831
|
-
})) :
|
|
832
|
-
_(
|
|
840
|
+
onClick: t[3] || (t[3] = () => e.draft && b(d).rejectDraft(e.draft, () => R("submitted")))
|
|
841
|
+
})) : ae("", !0),
|
|
842
|
+
_(y, {
|
|
833
843
|
label: "Close",
|
|
834
844
|
variant: "tertiary",
|
|
835
|
-
onClick: t[4] || (t[4] = (
|
|
845
|
+
onClick: t[4] || (t[4] = (k) => p.value = !1)
|
|
836
846
|
})
|
|
837
847
|
])
|
|
838
848
|
];
|
|
@@ -841,36 +851,36 @@ const gt = Se("closingDraftTable", function() {
|
|
|
841
851
|
o("div", yt, [
|
|
842
852
|
o("div", null, [
|
|
843
853
|
_(m, {
|
|
844
|
-
items:
|
|
854
|
+
items: te,
|
|
845
855
|
modelValue: V.value,
|
|
846
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
856
|
+
"onUpdate:modelValue": t[0] || (t[0] = (D) => V.value = D)
|
|
847
857
|
}, null, 8, ["modelValue"])
|
|
848
858
|
]),
|
|
849
|
-
V.value.value === "overview" ? (w(),
|
|
850
|
-
_(
|
|
859
|
+
V.value.value === "overview" ? (w(), B(Q, { key: 0 }, [
|
|
860
|
+
_(h, {
|
|
851
861
|
variant: "outlined",
|
|
852
862
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
853
863
|
}, {
|
|
854
864
|
default: W(() => {
|
|
855
|
-
var
|
|
865
|
+
var D, x;
|
|
856
866
|
return [
|
|
857
867
|
o("div", bt, [
|
|
858
868
|
t[6] || (t[6] = o("div", { class: "fm-typo-en-body-lg-600" }, "Closing summary", -1)),
|
|
859
869
|
o("div", ht, [
|
|
860
870
|
o("div", {
|
|
861
|
-
class:
|
|
862
|
-
}, I(b(Ce)(((
|
|
871
|
+
class: ne(["fm-status-badge", b(Me)(((D = n.draft) == null ? void 0 : D.status) ?? "DRAFT")])
|
|
872
|
+
}, I(b(Ce)(((x = n.draft) == null ? void 0 : x.status) ?? "")), 3)
|
|
863
873
|
])
|
|
864
874
|
]),
|
|
865
875
|
_(u),
|
|
866
|
-
(w(!0),
|
|
876
|
+
(w(!0), B(Q, null, ce(ee.value, (k, G) => (w(), B("div", {
|
|
867
877
|
class: "flex flex-col gap-4",
|
|
868
878
|
key: G
|
|
869
879
|
}, [
|
|
870
880
|
o("div", xt, [
|
|
871
|
-
o("div", Dt, I(
|
|
881
|
+
o("div", Dt, I(k.label), 1)
|
|
872
882
|
]),
|
|
873
|
-
o("div", At, I(
|
|
883
|
+
o("div", At, I(k.value), 1)
|
|
874
884
|
]))), 128))
|
|
875
885
|
];
|
|
876
886
|
}),
|
|
@@ -879,19 +889,19 @@ const gt = Se("closingDraftTable", function() {
|
|
|
879
889
|
o("div", _t, [
|
|
880
890
|
o("div", wt, [
|
|
881
891
|
t[7] || (t[7] = o("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
|
|
882
|
-
|
|
883
|
-
_(
|
|
892
|
+
A.value ? ae("", !0) : (w(), B("div", kt, [
|
|
893
|
+
_(y, {
|
|
884
894
|
label: "Export data",
|
|
885
895
|
"prepend-icon": "download",
|
|
886
896
|
variant: "secondary",
|
|
887
897
|
"text-color": "primary",
|
|
888
898
|
"bg-color": "transparent",
|
|
889
899
|
"border-color": "primary",
|
|
890
|
-
onClick: t[1] || (t[1] = (
|
|
900
|
+
onClick: t[1] || (t[1] = (D) => n.draft ? b(d).exportDraft(n.draft, l.value) : null)
|
|
891
901
|
})
|
|
892
902
|
]))
|
|
893
903
|
]),
|
|
894
|
-
|
|
904
|
+
A.value ? (w(), B("div", Ct, [
|
|
895
905
|
t[9] || (t[9] = o("div", { class: "h-80" }, null, -1)),
|
|
896
906
|
o("div", jt, [
|
|
897
907
|
o("div", null, [
|
|
@@ -900,29 +910,29 @@ const gt = Se("closingDraftTable", function() {
|
|
|
900
910
|
t[8] || (t[8] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
|
|
901
911
|
]),
|
|
902
912
|
t[10] || (t[10] = o("div", { class: "h-80" }, null, -1))
|
|
903
|
-
])) : (w(),
|
|
913
|
+
])) : (w(), B("div", St, [
|
|
904
914
|
o("div", {
|
|
905
|
-
style: De({ width: `${
|
|
915
|
+
style: De({ width: `${Z.value}px` })
|
|
906
916
|
}, [
|
|
907
917
|
_(Y, {
|
|
908
|
-
"column-defs":
|
|
918
|
+
"column-defs": E.value,
|
|
909
919
|
"row-data": le.value
|
|
910
920
|
}, null, 8, ["column-defs", "row-data"])
|
|
911
921
|
], 4)
|
|
912
922
|
]))
|
|
913
923
|
])
|
|
914
|
-
], 64)) :
|
|
915
|
-
V.value.value === "history" ? (w(),
|
|
916
|
-
|
|
917
|
-
(w(!0),
|
|
918
|
-
o("div",
|
|
919
|
-
o("div",
|
|
924
|
+
], 64)) : ae("", !0),
|
|
925
|
+
V.value.value === "history" ? (w(), B("div", Bt, [
|
|
926
|
+
L.value.length ? (w(), B("div", Rt, [
|
|
927
|
+
(w(!0), B(Q, null, ce(L.value, (D, x) => (w(), B(Q, { key: x }, [
|
|
928
|
+
o("div", Mt, [
|
|
929
|
+
o("div", Tt, [
|
|
920
930
|
o("div", Pt, [
|
|
921
931
|
o("div", {
|
|
922
|
-
class:
|
|
932
|
+
class: ne([
|
|
923
933
|
{
|
|
924
|
-
"bg-fm-color-primary":
|
|
925
|
-
"bg-white":
|
|
934
|
+
"bg-fm-color-primary": x !== 0,
|
|
935
|
+
"bg-white": x === 0
|
|
926
936
|
},
|
|
927
937
|
"w-[2px] h-full"
|
|
928
938
|
])
|
|
@@ -931,10 +941,10 @@ const gt = Se("closingDraftTable", function() {
|
|
|
931
941
|
t[13] || (t[13] = o("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
932
942
|
o("div", Ut, [
|
|
933
943
|
o("div", {
|
|
934
|
-
class:
|
|
944
|
+
class: ne([
|
|
935
945
|
{
|
|
936
|
-
"bg-fm-color-primary":
|
|
937
|
-
"bg-white":
|
|
946
|
+
"bg-fm-color-primary": x < L.value.length - 1,
|
|
947
|
+
"bg-white": x >= L.value.length - 1
|
|
938
948
|
},
|
|
939
949
|
"w-[2px] h-full"
|
|
940
950
|
])
|
|
@@ -942,18 +952,18 @@ const gt = Se("closingDraftTable", function() {
|
|
|
942
952
|
])
|
|
943
953
|
]),
|
|
944
954
|
o("div", Ht, [
|
|
945
|
-
o("div", It, I(
|
|
946
|
-
o("div", zt, I(
|
|
955
|
+
o("div", It, I(D.header), 1),
|
|
956
|
+
o("div", zt, I(D.date), 1)
|
|
947
957
|
])
|
|
948
958
|
]),
|
|
949
959
|
o("div", Et, [
|
|
950
960
|
o("div", Lt, [
|
|
951
961
|
o("div", Nt, [
|
|
952
962
|
o("div", {
|
|
953
|
-
class:
|
|
963
|
+
class: ne([
|
|
954
964
|
{
|
|
955
|
-
"bg-fm-color-primary":
|
|
956
|
-
"bg-white":
|
|
965
|
+
"bg-fm-color-primary": x < L.value.length - 1,
|
|
966
|
+
"bg-white": x >= L.value.length - 1
|
|
957
967
|
},
|
|
958
968
|
"w-[2px] h-full"
|
|
959
969
|
])
|
|
@@ -961,22 +971,22 @@ const gt = Se("closingDraftTable", function() {
|
|
|
961
971
|
])
|
|
962
972
|
]),
|
|
963
973
|
o("div", Ot, [
|
|
964
|
-
_(
|
|
974
|
+
_(h, {
|
|
965
975
|
variant: "outlined",
|
|
966
976
|
class: "py-12 px-16"
|
|
967
977
|
}, {
|
|
968
978
|
default: W(() => [
|
|
969
979
|
o("div", Kt, [
|
|
970
|
-
(w(!0),
|
|
980
|
+
(w(!0), B(Q, null, ce(D.info, (k, G) => (w(), B("div", {
|
|
971
981
|
key: G,
|
|
972
982
|
class: "flex flex-col gap-4"
|
|
973
983
|
}, [
|
|
974
|
-
o("div", Vt, I(
|
|
984
|
+
o("div", Vt, I(k == null ? void 0 : k.label), 1),
|
|
975
985
|
o("div", Yt, [
|
|
976
|
-
(w(!0),
|
|
986
|
+
(w(!0), B(Q, null, ce(k == null ? void 0 : k.values, (Te, Pe) => (w(), B("div", {
|
|
977
987
|
key: Pe,
|
|
978
988
|
class: "fm-typo-en-body-lg-600"
|
|
979
|
-
}, I(
|
|
989
|
+
}, I(Te), 1))), 128))
|
|
980
990
|
])
|
|
981
991
|
]))), 128))
|
|
982
992
|
])
|
|
@@ -986,8 +996,8 @@ const gt = Se("closingDraftTable", function() {
|
|
|
986
996
|
])
|
|
987
997
|
])
|
|
988
998
|
], 64))), 128))
|
|
989
|
-
])) : (w(),
|
|
990
|
-
_(
|
|
999
|
+
])) : (w(), B("div", Ft, [
|
|
1000
|
+
_(N),
|
|
991
1001
|
o("div", null, [
|
|
992
1002
|
o("img", {
|
|
993
1003
|
src: b(st),
|
|
@@ -996,10 +1006,10 @@ const gt = Se("closingDraftTable", function() {
|
|
|
996
1006
|
]),
|
|
997
1007
|
t[11] || (t[11] = o("div", { class: "fm-typo-en-body-lg-600" }, I("No records found"), -1)),
|
|
998
1008
|
t[12] || (t[12] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, I("You can track approval and rejection history here"), -1)),
|
|
999
|
-
_(
|
|
1000
|
-
_(
|
|
1009
|
+
_(N),
|
|
1010
|
+
_(N)
|
|
1001
1011
|
]))
|
|
1002
|
-
])) :
|
|
1012
|
+
])) : ae("", !0)
|
|
1003
1013
|
])
|
|
1004
1014
|
]),
|
|
1005
1015
|
_: 1
|
|
@@ -1009,19 +1019,19 @@ const gt = Se("closingDraftTable", function() {
|
|
|
1009
1019
|
}), Wt = { class: "flex-1 flex flex-col gap-8" }, Zt = { class: "flex flex-col" }, Jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Xt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, ea = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, ca = /* @__PURE__ */ fe({
|
|
1010
1020
|
__name: "ClosingDraftView",
|
|
1011
1021
|
setup(a) {
|
|
1012
|
-
const { t:
|
|
1013
|
-
|
|
1014
|
-
const
|
|
1015
|
-
function s(
|
|
1016
|
-
switch (
|
|
1022
|
+
const { t: c } = je(), { viewDraft: e } = me(), { viewClosingDraftProps: i, viewClosingDraftShow: d } = ot(me()), p = pe(), A = gt(), l = Ze(), { breakpoints: g } = nt();
|
|
1023
|
+
p.watchLocation(A.fetchDrafts);
|
|
1024
|
+
const S = T(() => A.loading), $ = z(""), R = T(() => g.value.xs || g.value.sm), r = T(() => R.value ? 10 : 20);
|
|
1025
|
+
function s(M) {
|
|
1026
|
+
switch (M) {
|
|
1017
1027
|
case "refresh":
|
|
1018
|
-
return
|
|
1028
|
+
return A.fetchDrafts();
|
|
1019
1029
|
}
|
|
1020
1030
|
}
|
|
1021
|
-
function
|
|
1022
|
-
return
|
|
1031
|
+
function f(M) {
|
|
1032
|
+
return M;
|
|
1023
1033
|
}
|
|
1024
|
-
const H =
|
|
1034
|
+
const H = T(() => R.value ? [
|
|
1025
1035
|
{
|
|
1026
1036
|
label: "Refresh",
|
|
1027
1037
|
value: "refresh",
|
|
@@ -1034,76 +1044,76 @@ const gt = Se("closingDraftTable", function() {
|
|
|
1034
1044
|
isPrimary: !1
|
|
1035
1045
|
}
|
|
1036
1046
|
]);
|
|
1037
|
-
return (
|
|
1038
|
-
const
|
|
1039
|
-
return w(),
|
|
1047
|
+
return (M, C) => {
|
|
1048
|
+
const X = U("FmTable");
|
|
1049
|
+
return w(), B(Q, null, [
|
|
1040
1050
|
_(Je, {
|
|
1041
|
-
title: b(
|
|
1051
|
+
title: b(c)("inventory.closing.draft.title"),
|
|
1042
1052
|
actions: H.value,
|
|
1043
1053
|
"onClick:action": s
|
|
1044
1054
|
}, {
|
|
1045
1055
|
default: W(() => [
|
|
1046
1056
|
o("div", {
|
|
1047
|
-
class:
|
|
1057
|
+
class: ne([
|
|
1048
1058
|
"flex flex-col gap-8 max-h-full",
|
|
1049
1059
|
{
|
|
1050
|
-
"p-0":
|
|
1051
|
-
"px-24 ":
|
|
1060
|
+
"p-0": R.value,
|
|
1061
|
+
"px-24 ": !R.value
|
|
1052
1062
|
}
|
|
1053
1063
|
])
|
|
1054
1064
|
}, [
|
|
1055
1065
|
_(Qe, {
|
|
1056
1066
|
"change-location": "",
|
|
1057
1067
|
searchable: "",
|
|
1058
|
-
search:
|
|
1059
|
-
"onUpdate:search":
|
|
1068
|
+
search: $.value,
|
|
1069
|
+
"onUpdate:search": C[0] || (C[0] = (F) => $.value = F)
|
|
1060
1070
|
}, null, 8, ["search"]),
|
|
1061
|
-
_(
|
|
1062
|
-
style: De(b(
|
|
1063
|
-
"column-defs": b(
|
|
1064
|
-
"row-data": b(
|
|
1065
|
-
"search-value":
|
|
1066
|
-
loading:
|
|
1067
|
-
onRowClick:
|
|
1071
|
+
_(X, {
|
|
1072
|
+
style: De(b(l).tableHeight),
|
|
1073
|
+
"column-defs": b(A).columnDefs,
|
|
1074
|
+
"row-data": b(A).drafts,
|
|
1075
|
+
"search-value": $.value,
|
|
1076
|
+
loading: S.value,
|
|
1077
|
+
onRowClick: C[1] || (C[1] = (F) => b(e)(F.original)),
|
|
1068
1078
|
"page-size": r.value
|
|
1069
1079
|
}, {
|
|
1070
|
-
"list-row": W((
|
|
1080
|
+
"list-row": W((F) => [
|
|
1071
1081
|
_(Xe, {
|
|
1072
|
-
row:
|
|
1073
|
-
onRowClick: (
|
|
1082
|
+
row: F,
|
|
1083
|
+
onRowClick: (v) => b(e)(v)
|
|
1074
1084
|
}, {
|
|
1075
|
-
default: W((
|
|
1076
|
-
var
|
|
1085
|
+
default: W((v) => {
|
|
1086
|
+
var E, Z, le, ee, te, V, L, n, t, m, u, h, y, P, Y, N, J, D, x, k;
|
|
1077
1087
|
return [
|
|
1078
1088
|
o("div", Wt, [
|
|
1079
1089
|
o("div", Zt, [
|
|
1080
1090
|
o("div", Jt, [
|
|
1081
1091
|
_(b(ue), {
|
|
1082
|
-
render: (le = (
|
|
1083
|
-
props: (
|
|
1092
|
+
render: (le = (Z = (E = v._id) == null ? void 0 : E.column) == null ? void 0 : Z.columnDef) == null ? void 0 : le.cell,
|
|
1093
|
+
props: (te = (ee = v._id) == null ? void 0 : ee.getContext) == null ? void 0 : te.call(ee)
|
|
1084
1094
|
}, null, 8, ["render", "props"])
|
|
1085
1095
|
]),
|
|
1086
1096
|
o("div", Qt, [
|
|
1087
1097
|
_(b(ue), {
|
|
1088
|
-
render: (n = (
|
|
1089
|
-
props: (m = (t =
|
|
1098
|
+
render: (n = (L = (V = v.name) == null ? void 0 : V.column) == null ? void 0 : L.columnDef) == null ? void 0 : n.cell,
|
|
1099
|
+
props: (m = (t = v.name) == null ? void 0 : t.getContext) == null ? void 0 : m.call(t)
|
|
1090
1100
|
}, null, 8, ["render", "props"])
|
|
1091
1101
|
]),
|
|
1092
1102
|
o("div", Xt, I([
|
|
1093
|
-
...
|
|
1094
|
-
...
|
|
1103
|
+
...F.original.items.slice(0, 3).map((G) => G.sku.name),
|
|
1104
|
+
...F.original.items.length >= 3 ? [`and ${F.original.items.length - 3} more items`] : []
|
|
1095
1105
|
].join(", ")), 1),
|
|
1096
1106
|
o("div", ea, [
|
|
1097
1107
|
_(b(ue), {
|
|
1098
|
-
render: (
|
|
1099
|
-
props: (Y = (P =
|
|
1108
|
+
render: (y = (h = (u = v.ref) == null ? void 0 : u.column) == null ? void 0 : h.columnDef) == null ? void 0 : y.cell,
|
|
1109
|
+
props: (Y = (P = v.ref) == null ? void 0 : P.getContext) == null ? void 0 : Y.call(P)
|
|
1100
1110
|
}, null, 8, ["render", "props"])
|
|
1101
1111
|
])
|
|
1102
1112
|
]),
|
|
1103
1113
|
o("div", null, [
|
|
1104
1114
|
_(b(ue), {
|
|
1105
|
-
render: (
|
|
1106
|
-
props: (
|
|
1115
|
+
render: (D = (J = (N = v.status) == null ? void 0 : N.column) == null ? void 0 : J.columnDef) == null ? void 0 : D.cell,
|
|
1116
|
+
props: (k = (x = v.status) == null ? void 0 : x.getContext) == null ? void 0 : k.call(x)
|
|
1107
1117
|
}, null, 8, ["render", "props"])
|
|
1108
1118
|
])
|
|
1109
1119
|
])
|
|
@@ -1118,11 +1128,11 @@ const gt = Se("closingDraftTable", function() {
|
|
|
1118
1128
|
]),
|
|
1119
1129
|
_: 1
|
|
1120
1130
|
}, 8, ["title", "actions"]),
|
|
1121
|
-
(w(),
|
|
1122
|
-
_(qt, ze(b(
|
|
1131
|
+
(w(), oe(Ie, { to: "body" }, [
|
|
1132
|
+
_(qt, ze(b(i), {
|
|
1123
1133
|
show: b(d),
|
|
1124
|
-
"onUpdate:show":
|
|
1125
|
-
onSubmitted:
|
|
1134
|
+
"onUpdate:show": C[2] || (C[2] = (F) => xe(d) ? d.value = F : null),
|
|
1135
|
+
onSubmitted: C[3] || (C[3] = () => (d.value = !1, b(A).fetchDrafts()))
|
|
1126
1136
|
}), null, 16, ["show"])
|
|
1127
1137
|
]))
|
|
1128
1138
|
], 64);
|