@feedmepos/mf-inventory-portal 0.0.23-dev.10 → 0.0.23-dev.11
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-DDxwfi6I.js → App-CnnjA4H4.js} +3 -3
- package/dist/{ApprovalView-7rpIigm0.js → ApprovalView-Clai9UES.js} +4 -4
- package/dist/{BindingsDialog-DbyzX6mw.js → BindingsDialog-ECRq-a_Q.js} +2 -2
- package/dist/{BindingsPicker-FZfhZr5O.js → BindingsPicker-gJDidADv.js} +2 -2
- package/dist/{BindingsTable-Bk2770OV.js → BindingsTable-D6ioxeXz.js} +4 -4
- package/dist/{ClosingDraftView-D9CnCwak.js → ClosingDraftView-B8N64LZI.js} +221 -226
- package/dist/{ClosingTemplateView-DkpHmTtx.js → ClosingTemplateView-CaUeooGj.js} +10 -10
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DjBiov5r.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-uft3uG9u.js} +4 -4
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CBC214tP.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-rGlc83Tl.js} +2 -2
- package/dist/{FmMultiselectDialog-CK6xwOeG.js → FmMultiselectDialog-D2VZq_SC.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-IFTMUhET.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BkSsILaj.js} +2 -2
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D0otwOX8.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DmCx7l0A.js} +1 -1
- package/dist/{IngredientGroupView-D5XtVfIQ.js → IngredientGroupView-DDcfDKEL.js} +5 -5
- package/dist/{IngredientsView-c7WnQiTv.js → IngredientsView-BJ0QLPGa.js} +9 -9
- package/dist/{IntegrationView-CHkhMxVM.js → IntegrationView-Db4c193L.js} +4 -4
- package/dist/{InventoryBindingForm-BUZ9MS5V.js → InventoryBindingForm-Ck6G43tJ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-YIRre_Km.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BICjEfVj.js} +5 -5
- package/dist/{InventoryBindingSummary-BUi0mjeC.js → InventoryBindingSummary-C70T-6vl.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CpYtHPFH.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ySrpI9SA.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D8IH1X1o.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BJrDVd2w.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-BLuoVz5N.js → PurchaseOrderPrintPreview-AXrBcV0Q.js} +1 -1
- package/dist/{ReceiveRequestView-BNM5JdQO.js → ReceiveRequestView-DlDk6Gc6.js} +18 -18
- package/dist/{RecipeView-DxRumcLY.js → RecipeView-Bf1OwZbb.js} +7 -7
- package/dist/{StockView-CZyeg3sX.js → StockView-TLS7B8wJ.js} +13 -13
- package/dist/{SupplierView-C2XLbf27.js → SupplierView-CNE6MdFy.js} +10 -10
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BQG6UzUU.js → TransferDetails.vue_vue_type_script_setup_true_lang-B6QAj_vv.js} +9 -9
- package/dist/{TransferTemplateView-BCxZCU0i.js → TransferTemplateView-Bo1y3pa5.js} +13 -13
- package/dist/{UnitView-uGpE4txg.js → UnitView-DlIzZxZ5.js} +5 -5
- package/dist/{WarehouseView-DvQVmixr.js → WarehouseView-B99Jg6ew.js} +4 -4
- package/dist/{app-BaOENyRY.js → app-CwNOTQ4A.js} +11 -9
- package/dist/app.d.ts +2 -0
- package/dist/app.js +1 -1
- package/dist/{date2-CfGU3sHq.js → date2-Db1Subbn.js} +1 -1
- package/dist/{dayjs.min-BMk-E1IO.js → dayjs.min-D2ZVdp6D.js} +1 -1
- package/dist/{decimal-BkLhxOFS.js → decimal-8uiyGVkt.js} +1 -1
- package/dist/{defineDeepModel-Cy-_HBnw.js → defineDeepModel-CD4-KtSv.js} +1 -1
- package/dist/{feature-GoxrdjJJ.js → feature-DeKonYra.js} +1 -1
- package/dist/{format-time-from-id-96hwVl9P.js → format-time-from-id-CwBTG5Th.js} +1 -1
- package/dist/{format-unit-display-Cp0DBbM8.js → format-unit-display-CDvyarbC.js} +8 -8
- package/dist/{fuzzy-CBGiL1wK.js → fuzzy-BPC5Od1q.js} +1 -1
- package/dist/{index-CoL8wxbn.js → index-6eGmxJ_I.js} +1 -1
- package/dist/{index-S7yfliEo.js → index-COz_RG7T.js} +1 -1
- package/dist/{index-0HEhOwKT.js → index-DbWbhlG2.js} +1 -1
- package/dist/{netsuite-D3VPLW8O.js → netsuite-CdG4gf6-.js} +1 -1
- package/dist/{rules-DxLLla7a.js → rules-BnT0wI2r.js} +2 -2
- package/dist/{stock-BbFKtx1y.js → stock-1LWJVxgR.js} +2 -2
- package/dist/{supplier-gGovyyjr.js → supplier-BhENB1Iz.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DIBMf_9-.js → use-inventory-binding-dialog-D3d0npyv.js} +2 -2
- package/dist/{use-template-enabled-locations-2-Bof9JMYI.js → use-template-enabled-locations-2-Cfm1wj38.js} +2 -2
- package/dist/{xlsx-DOnDmayp.js → xlsx-BaQ41UOe.js} +1 -1
- package/dist/{xlsx.util-BqsQd9YP.js → xlsx.util-DddmoQM4.js} +1 -1
- package/package.json +3 -3
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as je, _ as $e, a as Re } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { defineComponent as ee, ref as z, resolveComponent as P, openBlock as R, createBlock as O, withCtx as K, createElementVNode as r, createTextVNode as le, toDisplayString as H, unref as c, createVNode as b, h as ie, computed as F, onMounted as xe, watch as ke, isRef as pe, createCommentVNode as ce, normalizeClass as ge, createElementBlock as V, Fragment as ve, renderList as Se, normalizeStyle as ye, Teleport as Be, mergeProps as Fe } from "vue";
|
|
2
|
+
import { u as je, _ as $e, a as Re } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-rGlc83Tl.js";
|
|
3
3
|
import { useI18n as be } from "@feedmepos/mf-common";
|
|
4
|
-
import { useSnackbar as De, useDialog as
|
|
5
|
-
import { k as ze, u as
|
|
4
|
+
import { useSnackbar as De, useDialog as Pe, useProxiedModel as Te, useBreakpoints as Me } from "@feedmepos/ui-library";
|
|
5
|
+
import { k as ze, u as te, p as M, s as he, q as J, c as Ue, r as Le, a as Ke } from "./app-CwNOTQ4A.js";
|
|
6
6
|
import { defineStore as _e, storeToRefs as Ne } from "pinia";
|
|
7
|
-
import { R as Ee, a as B, l as Ie, m as Ve, b as
|
|
8
|
-
import { D as
|
|
7
|
+
import { R as Ee, a as B, l as Ie, m as Ve, b as ue, k as Oe, c as de, t as He } from "./rules-BnT0wI2r.js";
|
|
8
|
+
import { D as me, R as W } from "./row-action.enum-7rGLGZ5v.js";
|
|
9
9
|
import { c as Ye, _ as qe, F as Z } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
10
|
-
import { f as Ge } from "./format-time-from-id-
|
|
11
|
-
import { d as N } from "./date2-
|
|
12
|
-
import { u as We } from "./stock-
|
|
10
|
+
import { f as Ge } from "./format-time-from-id-CwBTG5Th.js";
|
|
11
|
+
import { d as N } from "./date2-Db1Subbn.js";
|
|
12
|
+
import { u as We } from "./stock-1LWJVxgR.js";
|
|
13
13
|
const Ae = ze((C, e) => {
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function m() {
|
|
15
|
+
return te().currentLocation.dbName;
|
|
16
16
|
}
|
|
17
17
|
return {
|
|
18
18
|
async getDraft(d) {
|
|
19
|
-
const i =
|
|
20
|
-
return e.get(
|
|
19
|
+
const i = m(), p = `${C.inventoryBackendUrl}/${i}/closing-draft/${d}`;
|
|
20
|
+
return e.get(p);
|
|
21
21
|
},
|
|
22
22
|
async readDrafts() {
|
|
23
|
-
const d =
|
|
23
|
+
const d = m(), i = `${C.inventoryBackendUrl}/${d}/closing-draft`;
|
|
24
24
|
return e.get(i);
|
|
25
25
|
},
|
|
26
26
|
async runOperation(d) {
|
|
27
|
-
const i =
|
|
28
|
-
return e.post(
|
|
27
|
+
const i = m(), p = `${C.inventoryBackendUrl}/${i}/closing-draft/run-operation`;
|
|
28
|
+
return e.post(p, d);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
}), Ze = { class: "fm-typo-en-body-lg-400" }, Je = { class: "fm-typo-en-body-lg-600" }, Qe = { class: "flex gap-12 py-8 justify-end w-full" }, fe = /* @__PURE__ */
|
|
31
|
+
}), Ze = { class: "fm-typo-en-body-lg-400" }, Je = { class: "fm-typo-en-body-lg-600" }, Qe = { class: "flex gap-12 py-8 justify-end w-full" }, fe = /* @__PURE__ */ ee({
|
|
32
32
|
__name: "ClosingDraftAction",
|
|
33
33
|
props: {
|
|
34
34
|
draft: {},
|
|
@@ -37,16 +37,16 @@ const Ae = ze((C, e) => {
|
|
|
37
37
|
onFinished: { type: Function }
|
|
38
38
|
},
|
|
39
39
|
setup(C) {
|
|
40
|
-
const e = C,
|
|
41
|
-
async function
|
|
42
|
-
|
|
40
|
+
const e = C, m = z(), d = Ae(), i = De(), p = z(!1);
|
|
41
|
+
async function v() {
|
|
42
|
+
p.value = !0;
|
|
43
43
|
try {
|
|
44
44
|
await d.runOperation({
|
|
45
45
|
_id: e.draft._id,
|
|
46
46
|
_rev: e.draft._rev ?? "",
|
|
47
47
|
action: e.action,
|
|
48
48
|
data: {
|
|
49
|
-
remark:
|
|
49
|
+
remark: m.value
|
|
50
50
|
}
|
|
51
51
|
}).delayed(500), i.open({
|
|
52
52
|
title: "Success",
|
|
@@ -60,40 +60,40 @@ const Ae = ze((C, e) => {
|
|
|
60
60
|
type: "error"
|
|
61
61
|
}), console.error("error on submit closing draft aciont", h);
|
|
62
62
|
} finally {
|
|
63
|
-
|
|
63
|
+
p.value = !1;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
return (h, u) => {
|
|
67
|
-
const
|
|
68
|
-
return R(),
|
|
69
|
-
onValidationSuccess:
|
|
67
|
+
const y = P("FmTextField"), j = P("FmButton"), o = P("FmForm");
|
|
68
|
+
return R(), O(o, {
|
|
69
|
+
onValidationSuccess: v,
|
|
70
70
|
class: "flex flex-col gap-32",
|
|
71
|
-
disabled:
|
|
71
|
+
disabled: p.value
|
|
72
72
|
}, {
|
|
73
73
|
default: K(() => [
|
|
74
|
-
|
|
75
|
-
u[2] || (u[2] =
|
|
76
|
-
|
|
77
|
-
u[3] || (u[3] =
|
|
74
|
+
r("div", Ze, [
|
|
75
|
+
u[2] || (u[2] = le(" You are about to ")),
|
|
76
|
+
r("span", Je, H(h.action == c(M).enum.approveDraft ? "approve" : "reject"), 1),
|
|
77
|
+
u[3] || (u[3] = le(" this draft. Please provider a remark to justify this action. "))
|
|
78
78
|
]),
|
|
79
|
-
|
|
80
|
-
modelValue:
|
|
81
|
-
"onUpdate:modelValue": u[0] || (u[0] = (l) =>
|
|
79
|
+
b(y, {
|
|
80
|
+
modelValue: m.value,
|
|
81
|
+
"onUpdate:modelValue": u[0] || (u[0] = (l) => m.value = l),
|
|
82
82
|
label: "Remark",
|
|
83
83
|
"label-mark": "required",
|
|
84
84
|
rules: [c(Ee)()]
|
|
85
85
|
}, null, 8, ["modelValue", "rules"]),
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
r("div", Qe, [
|
|
87
|
+
b(j, {
|
|
88
88
|
label: "Cancel",
|
|
89
89
|
variant: "tertiary",
|
|
90
90
|
onClick: u[1] || (u[1] = (l) => h.onCancel())
|
|
91
91
|
}),
|
|
92
|
-
|
|
92
|
+
b(j, {
|
|
93
93
|
label: h.action == c(M).enum.approveDraft ? "Approve" : "Reject",
|
|
94
94
|
type: "submit",
|
|
95
95
|
variant: h.action == c(M).enum.approveDraft ? "primary" : "destructive",
|
|
96
|
-
loading:
|
|
96
|
+
loading: p.value
|
|
97
97
|
}, null, 8, ["label", "variant", "loading"])
|
|
98
98
|
])
|
|
99
99
|
]),
|
|
@@ -104,16 +104,16 @@ const Ae = ze((C, e) => {
|
|
|
104
104
|
}), Q = _e(
|
|
105
105
|
"closingDraftActions",
|
|
106
106
|
function() {
|
|
107
|
-
const e =
|
|
107
|
+
const e = Pe(), m = z(!1), d = z();
|
|
108
108
|
function i(u) {
|
|
109
|
-
const
|
|
109
|
+
const y = {
|
|
110
110
|
draft: u
|
|
111
111
|
};
|
|
112
|
-
d.value =
|
|
112
|
+
d.value = y, m.value = !0;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function p(u) {
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function v(u, y) {
|
|
117
117
|
e.open({
|
|
118
118
|
title: "Approve draft",
|
|
119
119
|
contentComponent: fe,
|
|
@@ -121,13 +121,13 @@ const Ae = ze((C, e) => {
|
|
|
121
121
|
draft: u,
|
|
122
122
|
action: M.enum.approveDraft,
|
|
123
123
|
onFinished: () => {
|
|
124
|
-
e.close(),
|
|
124
|
+
e.close(), y == null || y();
|
|
125
125
|
},
|
|
126
126
|
onCancel: () => e.close()
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
function h(u,
|
|
130
|
+
function h(u, y) {
|
|
131
131
|
e.open({
|
|
132
132
|
title: "Reject draft",
|
|
133
133
|
contentComponent: fe,
|
|
@@ -135,7 +135,7 @@ const Ae = ze((C, e) => {
|
|
|
135
135
|
draft: u,
|
|
136
136
|
action: M.enum.rejectDraft,
|
|
137
137
|
onFinished: () => {
|
|
138
|
-
e.close(),
|
|
138
|
+
e.close(), y == null || y();
|
|
139
139
|
},
|
|
140
140
|
onCancel: () => e.close()
|
|
141
141
|
}
|
|
@@ -143,10 +143,10 @@ const Ae = ze((C, e) => {
|
|
|
143
143
|
}
|
|
144
144
|
return {
|
|
145
145
|
viewDraft: i,
|
|
146
|
-
approveDraft:
|
|
146
|
+
approveDraft: v,
|
|
147
147
|
rejectDraft: h,
|
|
148
|
-
exportDraft:
|
|
149
|
-
viewClosingDraftShow:
|
|
148
|
+
exportDraft: p,
|
|
149
|
+
viewClosingDraftShow: m,
|
|
150
150
|
viewClosingDraftProps: d
|
|
151
151
|
};
|
|
152
152
|
}
|
|
@@ -164,26 +164,26 @@ function Ce(C) {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
const Xe = _e("closingTable", function() {
|
|
167
|
-
const { t: e } = be(),
|
|
167
|
+
const { t: e } = be(), m = Q(), d = z(new Array()), i = z(!1), p = te(), v = Ae();
|
|
168
168
|
async function h() {
|
|
169
|
-
if (d.value = [], !!
|
|
169
|
+
if (d.value = [], !!p._currentLocation) {
|
|
170
170
|
i.value = !0;
|
|
171
171
|
try {
|
|
172
|
-
const [
|
|
173
|
-
d.value =
|
|
174
|
-
} catch (
|
|
175
|
-
console.log("Something went wrong when fetching drafts:",
|
|
172
|
+
const [o] = await Promise.all([v.readDrafts()]).delayed(1e3);
|
|
173
|
+
d.value = o.reverse();
|
|
174
|
+
} catch (o) {
|
|
175
|
+
console.log("Something went wrong when fetching drafts:", o);
|
|
176
176
|
} finally {
|
|
177
177
|
i.value = !1;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
async function u(
|
|
182
|
-
if (!d.value.find((l) => l._id) &&
|
|
181
|
+
async function u(o) {
|
|
182
|
+
if (!d.value.find((l) => l._id) && p._currentLocation) {
|
|
183
183
|
i.value = !0;
|
|
184
184
|
try {
|
|
185
185
|
const [l] = await Promise.all([
|
|
186
|
-
|
|
186
|
+
v.getDraft(o),
|
|
187
187
|
new Promise((_) => setTimeout(_, 1e3))
|
|
188
188
|
]);
|
|
189
189
|
d.value = [l];
|
|
@@ -194,16 +194,16 @@ const Xe = _e("closingTable", function() {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
switch (l = Ue(l),
|
|
199
|
-
case
|
|
200
|
-
return
|
|
201
|
-
case
|
|
202
|
-
return
|
|
197
|
+
function y(o, l) {
|
|
198
|
+
switch (l = Ue(l), o) {
|
|
199
|
+
case W.Details:
|
|
200
|
+
return m.viewDraft(l);
|
|
201
|
+
case W.Export:
|
|
202
|
+
return m.exportDraft(l);
|
|
203
203
|
case M.enum.approveDraft:
|
|
204
|
-
return
|
|
204
|
+
return m.approveDraft(l);
|
|
205
205
|
case M.enum.rejectDraft:
|
|
206
|
-
return
|
|
206
|
+
return m.rejectDraft(l);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
return {
|
|
@@ -212,14 +212,14 @@ const Xe = _e("closingTable", function() {
|
|
|
212
212
|
id: "_id",
|
|
213
213
|
accessorKey: "_id",
|
|
214
214
|
header: () => e("inventory.closing.table.createdAt"),
|
|
215
|
-
cell(
|
|
216
|
-
return Ge(`${
|
|
215
|
+
cell(o) {
|
|
216
|
+
return Ge(`${o.getValue()}`);
|
|
217
217
|
},
|
|
218
218
|
enableSorting: !0
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
221
|
id: "updatedAt",
|
|
222
|
-
accessorFn: (
|
|
222
|
+
accessorFn: (o) => N(o.updatedAt),
|
|
223
223
|
header: () => "Updated at",
|
|
224
224
|
enableSorting: !0,
|
|
225
225
|
size: 200
|
|
@@ -243,25 +243,25 @@ const Xe = _e("closingTable", function() {
|
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
id: "recentRemark",
|
|
246
|
-
accessorFn: (
|
|
246
|
+
accessorFn: (o) => {
|
|
247
247
|
var l;
|
|
248
|
-
return (
|
|
248
|
+
return (o == null ? void 0 : o.approveRemark) ?? ((l = o == null ? void 0 : o.rejectionHistory) == null ? void 0 : l.computeFirst((_) => _.rejectRemark));
|
|
249
249
|
},
|
|
250
250
|
header: () => "Recent remark"
|
|
251
251
|
},
|
|
252
252
|
{
|
|
253
253
|
id: "status",
|
|
254
|
-
accessorFn: (
|
|
254
|
+
accessorFn: (o) => o.status,
|
|
255
255
|
header: () => e("inventory.closing.table.status"),
|
|
256
256
|
enableSorting: !1,
|
|
257
|
-
cell(
|
|
258
|
-
const _ =
|
|
259
|
-
return
|
|
257
|
+
cell(o) {
|
|
258
|
+
const _ = o.row.original.status;
|
|
259
|
+
return ie(
|
|
260
260
|
"div",
|
|
261
261
|
{
|
|
262
262
|
class: "flex"
|
|
263
263
|
},
|
|
264
|
-
|
|
264
|
+
ie(
|
|
265
265
|
"div",
|
|
266
266
|
{
|
|
267
267
|
class: ["fm-status-badge", Ce(_)]
|
|
@@ -273,12 +273,11 @@ const Xe = _e("closingTable", function() {
|
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
275
|
id: "action",
|
|
276
|
-
cell(
|
|
277
|
-
const l =
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
], q = [
|
|
276
|
+
cell(o) {
|
|
277
|
+
const l = o.row.original, _ = [
|
|
278
|
+
me[W.Details],
|
|
279
|
+
me[W.Export]
|
|
280
|
+
], Y = [
|
|
282
281
|
{
|
|
283
282
|
translationKey: "inventory.closing.draft.approveDraft",
|
|
284
283
|
color: "text-fm-color-typo-primary",
|
|
@@ -291,8 +290,8 @@ const Xe = _e("closingTable", function() {
|
|
|
291
290
|
}
|
|
292
291
|
];
|
|
293
292
|
return Ye(
|
|
294
|
-
[..._, ...l.status === J.enum.DRAFT ?
|
|
295
|
-
(E) =>
|
|
293
|
+
[..._, ...l.status === J.enum.DRAFT ? Y : []],
|
|
294
|
+
(E) => y(E, l)
|
|
296
295
|
);
|
|
297
296
|
},
|
|
298
297
|
enableSorting: !1,
|
|
@@ -314,17 +313,17 @@ const Xe = _e("closingTable", function() {
|
|
|
314
313
|
}, it = { class: "flex items-center gap-8" }, ct = {
|
|
315
314
|
key: 1,
|
|
316
315
|
class: "overflow-x-auto"
|
|
317
|
-
}, ut = { class: "flex gap-8" }, dt = /* @__PURE__ */
|
|
316
|
+
}, ut = { class: "flex gap-8" }, dt = /* @__PURE__ */ ee({
|
|
318
317
|
__name: "ClosingDraftDialog",
|
|
319
318
|
props: {
|
|
320
319
|
show: { type: Boolean },
|
|
321
320
|
draft: {}
|
|
322
321
|
},
|
|
323
322
|
setup(C) {
|
|
324
|
-
const e = C,
|
|
323
|
+
const e = C, m = We(), d = Q(), i = Te(e, "show"), p = z(!1), v = z(new Array()), h = Le(), u = De(), y = Ke(), j = F(() => {
|
|
325
324
|
var a;
|
|
326
|
-
const t = ((a = e.draft) == null ? void 0 : a.items.map((
|
|
327
|
-
return t.sort((
|
|
325
|
+
const t = ((a = e.draft) == null ? void 0 : a.items.map((s) => s.sku)) ?? [];
|
|
326
|
+
return t.sort((s, n) => s.code.localeCompare(n.code)), t;
|
|
328
327
|
});
|
|
329
328
|
xe(_), ke(
|
|
330
329
|
() => e.show,
|
|
@@ -332,58 +331,50 @@ const Xe = _e("closingTable", function() {
|
|
|
332
331
|
t && _();
|
|
333
332
|
}
|
|
334
333
|
);
|
|
335
|
-
const
|
|
334
|
+
const o = de(0), l = de(100);
|
|
336
335
|
async function _() {
|
|
337
|
-
var a,
|
|
338
|
-
|
|
336
|
+
var a, s, n;
|
|
337
|
+
p.value = !0;
|
|
339
338
|
const t = ((a = e.draft) == null ? void 0 : a.status) === J.enum.COMPLETED;
|
|
340
339
|
try {
|
|
341
|
-
if (await
|
|
342
|
-
const
|
|
343
|
-
if (!
|
|
340
|
+
if (await y.init(), t) {
|
|
341
|
+
const f = e.draft.closingId;
|
|
342
|
+
if (!f) {
|
|
344
343
|
u.open({
|
|
345
344
|
title: "Something went wrong",
|
|
346
345
|
message: "Closing draft is completed but closing document cannot be found.",
|
|
347
346
|
type: "error"
|
|
348
347
|
}), console.error("Closing draft is completed but closing document cannot be found.", {
|
|
349
|
-
draftId: (
|
|
348
|
+
draftId: (s = e.draft) == null ? void 0 : s._id
|
|
350
349
|
});
|
|
351
350
|
return;
|
|
352
351
|
}
|
|
353
|
-
const
|
|
354
|
-
|
|
355
|
-
} else
|
|
356
|
-
await
|
|
357
|
-
|
|
358
|
-
(f) => f.id,
|
|
359
|
-
(f) => f.balance
|
|
360
|
-
);
|
|
361
|
-
b.value = v.skus.map(
|
|
362
|
-
(f) => m[f._id] ?? n
|
|
363
|
-
);
|
|
364
|
-
}
|
|
365
|
-
} catch (m) {
|
|
352
|
+
const D = await h.getClosingById(f);
|
|
353
|
+
v.value = (D == null ? void 0 : D.skus) ?? [];
|
|
354
|
+
} else
|
|
355
|
+
await m.readStockBalance(), v.value = ((n = m.stockBalance) == null ? void 0 : n.skus) ?? [];
|
|
356
|
+
} catch (f) {
|
|
366
357
|
u.open({
|
|
367
358
|
title: "Something went wrong",
|
|
368
359
|
message: "Something went wrong when fetching info. Please try again.",
|
|
369
360
|
type: "error"
|
|
370
|
-
}), console.error("error on fetch stock balances",
|
|
361
|
+
}), console.error("error on fetch stock balances", f);
|
|
371
362
|
} finally {
|
|
372
|
-
|
|
363
|
+
p.value = !1;
|
|
373
364
|
}
|
|
374
365
|
}
|
|
375
|
-
const
|
|
376
|
-
() =>
|
|
366
|
+
const Y = F(
|
|
367
|
+
() => v.value.groupBy(
|
|
377
368
|
(t) => t.id,
|
|
378
369
|
(t) => t.balance
|
|
379
370
|
)
|
|
380
371
|
), E = F(() => {
|
|
381
372
|
var a;
|
|
382
|
-
return (((a = e.draft) == null ? void 0 : a.items) ?? []).groupBy((
|
|
373
|
+
return (((a = e.draft) == null ? void 0 : a.items) ?? []).groupBy((s) => s.sku._id);
|
|
383
374
|
}), L = F(() => {
|
|
384
|
-
const t = j.value.reduce((
|
|
385
|
-
|
|
386
|
-
|
|
375
|
+
const t = j.value.reduce((s, n) => Math.max(
|
|
376
|
+
s,
|
|
377
|
+
n.unit.measurements.filter((f) => !f.name.toLocaleLowerCase().includes("inactive")).length
|
|
387
378
|
), 0);
|
|
388
379
|
return [
|
|
389
380
|
{
|
|
@@ -410,22 +401,22 @@ const Xe = _e("closingTable", function() {
|
|
|
410
401
|
header: () => "Base unit amount",
|
|
411
402
|
size: 200
|
|
412
403
|
},
|
|
413
|
-
...Array.from({ length: t }).flatMap((
|
|
414
|
-
const
|
|
404
|
+
...Array.from({ length: t }).flatMap((s, n) => {
|
|
405
|
+
const f = `measurementAbbrev${n}`, D = `measurementAmount${n}`;
|
|
415
406
|
return [
|
|
416
407
|
{
|
|
417
|
-
id:
|
|
418
|
-
accessorKey:
|
|
419
|
-
header: () => `Sub unit amount ${
|
|
408
|
+
id: D,
|
|
409
|
+
accessorKey: D,
|
|
410
|
+
header: () => `Sub unit amount ${n + 1}`,
|
|
420
411
|
size: 200,
|
|
421
412
|
meta: {
|
|
422
413
|
textAlign: "right"
|
|
423
414
|
}
|
|
424
415
|
},
|
|
425
416
|
{
|
|
426
|
-
id:
|
|
427
|
-
accessorKey:
|
|
428
|
-
header: () => `Sub unit ${
|
|
417
|
+
id: f,
|
|
418
|
+
accessorKey: f,
|
|
419
|
+
header: () => `Sub unit ${n + 1}`,
|
|
429
420
|
size: 200
|
|
430
421
|
}
|
|
431
422
|
];
|
|
@@ -462,6 +453,10 @@ const Xe = _e("closingTable", function() {
|
|
|
462
453
|
accessorKey: "adjustedDiffPercentage",
|
|
463
454
|
header: () => "Diff (%)",
|
|
464
455
|
size: 200,
|
|
456
|
+
cell(s) {
|
|
457
|
+
var n;
|
|
458
|
+
return (n = s.row.original.adjustedDiffPercentage) == null ? void 0 : n.toFixed(2);
|
|
459
|
+
},
|
|
465
460
|
meta: {
|
|
466
461
|
textAlign: "right"
|
|
467
462
|
}
|
|
@@ -469,52 +464,52 @@ const Xe = _e("closingTable", function() {
|
|
|
469
464
|
];
|
|
470
465
|
}), $ = F(() => L.value.map((t) => t.size ?? 0).reduce((t, a) => t + a));
|
|
471
466
|
function X(t) {
|
|
472
|
-
const a = t.measurementsAmounts.groupBy((
|
|
473
|
-
var U,
|
|
474
|
-
const
|
|
475
|
-
return
|
|
467
|
+
const a = t.measurementsAmounts.groupBy((n) => n.measurement.id), s = t.sku.unit.measurements.reduce((n, f) => {
|
|
468
|
+
var U, g;
|
|
469
|
+
const D = ((g = (U = a.get(f.id)) == null ? void 0 : U[0]) == null ? void 0 : g.amount) ?? o, x = ue(f.conversion, D);
|
|
470
|
+
return n + +B(x);
|
|
476
471
|
}, +B(t.baseAmount));
|
|
477
|
-
return He(
|
|
472
|
+
return He(s, t.baseAmount.precision);
|
|
478
473
|
}
|
|
479
474
|
const A = F(() => j.value.map((t) => {
|
|
480
|
-
var
|
|
481
|
-
const a = (
|
|
475
|
+
var g, S;
|
|
476
|
+
const a = (g = E.value.get(t._id)) == null ? void 0 : g[0], s = ((S = Y.value.get(t._id)) == null ? void 0 : S[0]) ?? o;
|
|
482
477
|
if (!a)
|
|
483
478
|
return {
|
|
484
479
|
code: t.code,
|
|
485
480
|
name: t.name,
|
|
486
481
|
baseUnit: t.unit.abbrev,
|
|
487
482
|
baseUnitAmount: 0,
|
|
488
|
-
systemBalance: +B(
|
|
483
|
+
systemBalance: +B(s),
|
|
489
484
|
physicalBalance: 0,
|
|
490
|
-
adjustedBalance: -+B(
|
|
485
|
+
adjustedBalance: -+B(s),
|
|
491
486
|
adjustedDiffPercentage: -100
|
|
492
487
|
};
|
|
493
|
-
const
|
|
488
|
+
const n = X(a), f = Ie(n, s), D = s.amount === 0 ? null : Ve(f, s), x = D ? ue(D, l) : null;
|
|
494
489
|
return {
|
|
495
490
|
code: t.code,
|
|
496
491
|
name: t.name,
|
|
497
492
|
baseUnit: t.unit.abbrev,
|
|
498
493
|
baseUnitAmount: +B(a.baseAmount),
|
|
499
|
-
...a.measurementsAmounts.reduce((k,
|
|
500
|
-
systemBalance: +B(
|
|
501
|
-
physicalBalance: +B(
|
|
502
|
-
adjustedBalance: +B(
|
|
494
|
+
...a.measurementsAmounts.reduce((k, T, I) => (T.measurement.name.toLocaleLowerCase().includes("inactive") || (k[`measurementAbbrev${I}`] = `(${T.measurement.abbrev}) × ${B(T.measurement.conversion)}`, k[`measurementAmount${I}`] = +B(T.amount)), k), {}),
|
|
495
|
+
systemBalance: +B(s),
|
|
496
|
+
physicalBalance: +B(n),
|
|
497
|
+
adjustedBalance: +B(f),
|
|
503
498
|
adjustedDiffPercentage: x ? +B(Oe(x, 2)) : null
|
|
504
499
|
};
|
|
505
500
|
})), w = F(() => {
|
|
506
|
-
var a,
|
|
501
|
+
var a, s;
|
|
507
502
|
if (!e.draft) return [];
|
|
508
503
|
const t = e.draft.approvedAt ? {
|
|
509
504
|
action: `Approve at ${N(e.draft.approvedAt)}`,
|
|
510
505
|
// actionAt: props.draft.approvedAt,
|
|
511
506
|
actionBy: e.draft.approvedBy,
|
|
512
507
|
remark: e.draft.approveRemark
|
|
513
|
-
} : (a = e.draft.rejectionHistory) == null ? void 0 : a.computeFirst((
|
|
514
|
-
action: `Reject at ${N(
|
|
508
|
+
} : (a = e.draft.rejectionHistory) == null ? void 0 : a.computeFirst((n) => ({
|
|
509
|
+
action: `Reject at ${N(n.rejectedAt)}`,
|
|
515
510
|
// actionAt: e.rejectedAt,
|
|
516
|
-
actionBy:
|
|
517
|
-
remark:
|
|
511
|
+
actionBy: n.rejectedBy,
|
|
512
|
+
remark: n.rejectRemark
|
|
518
513
|
}));
|
|
519
514
|
return [
|
|
520
515
|
{
|
|
@@ -543,39 +538,39 @@ const Xe = _e("closingTable", function() {
|
|
|
543
538
|
} : null,
|
|
544
539
|
t && t.actionBy ? {
|
|
545
540
|
label: "Last action by",
|
|
546
|
-
value: (
|
|
541
|
+
value: (s = t.actionBy) == null ? void 0 : s.name
|
|
547
542
|
} : null,
|
|
548
543
|
t && t.remark ? {
|
|
549
544
|
label: "Action remark",
|
|
550
545
|
value: t.remark
|
|
551
546
|
} : null
|
|
552
|
-
].filter((
|
|
547
|
+
].filter((n) => n).map((n) => n);
|
|
553
548
|
});
|
|
554
549
|
return (t, a) => {
|
|
555
|
-
const
|
|
556
|
-
return R(),
|
|
550
|
+
const s = P("FmMenuDivider"), n = P("FmCard"), f = P("FmCircularProgress"), D = P("FmTable"), x = P("FmButton"), U = P("FmSideSheet");
|
|
551
|
+
return R(), O(U, {
|
|
557
552
|
"dismiss-away": "",
|
|
558
553
|
"max-width": 900,
|
|
559
554
|
"model-value": c(i),
|
|
560
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
555
|
+
"onUpdate:modelValue": a[3] || (a[3] = (g) => pe(i) ? i.value = g : null),
|
|
561
556
|
header: "Closing details"
|
|
562
557
|
}, {
|
|
563
558
|
"side-sheet-footer": K(() => {
|
|
564
|
-
var
|
|
559
|
+
var g, S;
|
|
565
560
|
return [
|
|
566
|
-
|
|
567
|
-
((
|
|
561
|
+
r("div", ut, [
|
|
562
|
+
((g = e.draft) == null ? void 0 : g.status) === c(J).enum.DRAFT ? (R(), O(x, {
|
|
568
563
|
key: 0,
|
|
569
564
|
label: "Approve",
|
|
570
565
|
onClick: a[0] || (a[0] = () => e.draft && c(d).approveDraft(e.draft))
|
|
571
|
-
})) :
|
|
572
|
-
((S = e.draft) == null ? void 0 : S.status) === c(J).enum.DRAFT ? (R(),
|
|
566
|
+
})) : ce("", !0),
|
|
567
|
+
((S = e.draft) == null ? void 0 : S.status) === c(J).enum.DRAFT ? (R(), O(x, {
|
|
573
568
|
key: 1,
|
|
574
569
|
label: "Reject",
|
|
575
570
|
variant: "destructive",
|
|
576
571
|
onClick: a[1] || (a[1] = () => e.draft && c(d).rejectDraft(e.draft))
|
|
577
|
-
})) :
|
|
578
|
-
|
|
572
|
+
})) : ce("", !0),
|
|
573
|
+
b(x, {
|
|
579
574
|
label: "Close",
|
|
580
575
|
variant: "tertiary",
|
|
581
576
|
onClick: a[2] || (a[2] = (k) => i.value = !1)
|
|
@@ -584,54 +579,54 @@ const Xe = _e("closingTable", function() {
|
|
|
584
579
|
];
|
|
585
580
|
}),
|
|
586
581
|
default: K(() => [
|
|
587
|
-
|
|
588
|
-
|
|
582
|
+
r("div", et, [
|
|
583
|
+
b(n, {
|
|
589
584
|
variant: "outlined",
|
|
590
585
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
591
586
|
}, {
|
|
592
587
|
default: K(() => {
|
|
593
|
-
var
|
|
588
|
+
var g, S;
|
|
594
589
|
return [
|
|
595
|
-
|
|
596
|
-
a[4] || (a[4] =
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
class: ge(c(Ce)(((
|
|
601
|
-
},
|
|
590
|
+
r("div", tt, [
|
|
591
|
+
a[4] || (a[4] = r("div", { class: "fm-typo-en-body-lg-600" }, "Closing summary", -1)),
|
|
592
|
+
r("div", null, [
|
|
593
|
+
r("div", at, [
|
|
594
|
+
r("div", {
|
|
595
|
+
class: ge(c(Ce)(((g = t.draft) == null ? void 0 : g.status) ?? "DRAFT"))
|
|
596
|
+
}, H(c(he)(((S = t.draft) == null ? void 0 : S.status) ?? "")), 3)
|
|
602
597
|
])
|
|
603
598
|
])
|
|
604
599
|
]),
|
|
605
|
-
|
|
606
|
-
(R(!0),
|
|
600
|
+
b(s),
|
|
601
|
+
(R(!0), V(ve, null, Se(w.value, (k, T) => (R(), V("div", {
|
|
607
602
|
class: "flex flex-col gap-4",
|
|
608
|
-
key:
|
|
603
|
+
key: T
|
|
609
604
|
}, [
|
|
610
|
-
|
|
611
|
-
|
|
605
|
+
r("div", nt, [
|
|
606
|
+
r("div", ot, H(k.label), 1)
|
|
612
607
|
]),
|
|
613
|
-
|
|
608
|
+
r("div", st, H(k.value), 1)
|
|
614
609
|
]))), 128))
|
|
615
610
|
];
|
|
616
611
|
}),
|
|
617
612
|
_: 1
|
|
618
613
|
}),
|
|
619
|
-
|
|
620
|
-
a[8] || (a[8] =
|
|
621
|
-
|
|
622
|
-
a[6] || (a[6] =
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
614
|
+
r("div", rt, [
|
|
615
|
+
a[8] || (a[8] = r("div", { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, "Closing items", -1)),
|
|
616
|
+
p.value ? (R(), V("div", lt, [
|
|
617
|
+
a[6] || (a[6] = r("div", { class: "h-80" }, null, -1)),
|
|
618
|
+
r("div", it, [
|
|
619
|
+
r("div", null, [
|
|
620
|
+
b(f, { size: "md" })
|
|
626
621
|
]),
|
|
627
|
-
a[5] || (a[5] =
|
|
622
|
+
a[5] || (a[5] = r("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
|
|
628
623
|
]),
|
|
629
|
-
a[7] || (a[7] =
|
|
630
|
-
])) : (R(),
|
|
631
|
-
|
|
624
|
+
a[7] || (a[7] = r("div", { class: "h-80" }, null, -1))
|
|
625
|
+
])) : (R(), V("div", ct, [
|
|
626
|
+
r("div", {
|
|
632
627
|
style: ye({ width: `${$.value}px` })
|
|
633
628
|
}, [
|
|
634
|
-
D
|
|
629
|
+
b(D, {
|
|
635
630
|
"column-defs": L.value,
|
|
636
631
|
"row-data": A.value
|
|
637
632
|
}, null, 8, ["column-defs", "row-data"])
|
|
@@ -644,22 +639,22 @@ const Xe = _e("closingTable", function() {
|
|
|
644
639
|
}, 8, ["model-value"]);
|
|
645
640
|
};
|
|
646
641
|
}
|
|
647
|
-
}), mt = { class: "flex-1 flex flex-col gap-8" }, ft = { class: "flex flex-col" }, pt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, vt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, yt = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, jt = /* @__PURE__ */
|
|
642
|
+
}), mt = { class: "flex-1 flex flex-col gap-8" }, ft = { class: "flex flex-col" }, pt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, vt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, yt = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, jt = /* @__PURE__ */ ee({
|
|
648
643
|
__name: "ClosingDraftView",
|
|
649
644
|
setup(C) {
|
|
650
|
-
const { t: e } = be(), { viewDraft:
|
|
651
|
-
|
|
652
|
-
const
|
|
645
|
+
const { t: e } = be(), { viewDraft: m } = Q(), { viewClosingDraftProps: d, viewClosingDraftShow: i } = Ne(Q()), p = te(), v = Xe(), h = je(), { breakpoints: u } = Me();
|
|
646
|
+
p.watchLocation(v.fetchDrafts);
|
|
647
|
+
const y = F(() => v.loading), j = z(""), o = F(() => u.value.xs || u.value.sm), l = F(() => o.value ? 10 : 20);
|
|
653
648
|
function _(L) {
|
|
654
649
|
switch (L) {
|
|
655
650
|
case "refresh":
|
|
656
|
-
return
|
|
651
|
+
return v.fetchDrafts();
|
|
657
652
|
}
|
|
658
653
|
}
|
|
659
|
-
function
|
|
654
|
+
function Y(L) {
|
|
660
655
|
return L;
|
|
661
656
|
}
|
|
662
|
-
const E = F(() =>
|
|
657
|
+
const E = F(() => o.value ? [
|
|
663
658
|
{
|
|
664
659
|
label: "Refresh",
|
|
665
660
|
value: "refresh",
|
|
@@ -673,75 +668,75 @@ const Xe = _e("closingTable", function() {
|
|
|
673
668
|
}
|
|
674
669
|
]);
|
|
675
670
|
return (L, $) => {
|
|
676
|
-
const X =
|
|
677
|
-
return R(),
|
|
678
|
-
|
|
671
|
+
const X = P("FmTable");
|
|
672
|
+
return R(), V(ve, null, [
|
|
673
|
+
b($e, {
|
|
679
674
|
title: c(e)("inventory.closing.draft.title"),
|
|
680
675
|
actions: E.value,
|
|
681
676
|
"onClick:action": _
|
|
682
677
|
}, {
|
|
683
678
|
default: K(() => [
|
|
684
|
-
|
|
679
|
+
r("div", {
|
|
685
680
|
class: ge([
|
|
686
681
|
"flex flex-col gap-8 max-h-full",
|
|
687
682
|
{
|
|
688
|
-
"p-0":
|
|
689
|
-
"px-24 ": !
|
|
683
|
+
"p-0": o.value,
|
|
684
|
+
"px-24 ": !o.value
|
|
690
685
|
}
|
|
691
686
|
])
|
|
692
687
|
}, [
|
|
693
|
-
|
|
688
|
+
b(Re, {
|
|
694
689
|
"change-location": "",
|
|
695
690
|
searchable: "",
|
|
696
691
|
search: j.value,
|
|
697
692
|
"onUpdate:search": $[0] || ($[0] = (A) => j.value = A)
|
|
698
693
|
}, null, 8, ["search"]),
|
|
699
|
-
|
|
694
|
+
b(X, {
|
|
700
695
|
style: ye(c(h).tableHeight),
|
|
701
|
-
"column-defs": c(
|
|
702
|
-
"row-data": c(
|
|
696
|
+
"column-defs": c(v).columnDefs,
|
|
697
|
+
"row-data": c(v).drafts,
|
|
703
698
|
"search-value": j.value,
|
|
704
|
-
loading:
|
|
705
|
-
onRowClick: $[1] || ($[1] = (A) => c(
|
|
699
|
+
loading: y.value,
|
|
700
|
+
onRowClick: $[1] || ($[1] = (A) => c(m)(A.original)),
|
|
706
701
|
"page-size": l.value
|
|
707
702
|
}, {
|
|
708
703
|
"list-row": K((A) => [
|
|
709
|
-
|
|
704
|
+
b(qe, {
|
|
710
705
|
row: A,
|
|
711
|
-
onRowClick: (w) => c(
|
|
706
|
+
onRowClick: (w) => c(m)(w)
|
|
712
707
|
}, {
|
|
713
708
|
default: K((w) => {
|
|
714
|
-
var t, a,
|
|
709
|
+
var t, a, s, n, f, D, x, U, g, S, k, T, I, q, ae, ne, oe, se, G, re;
|
|
715
710
|
return [
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
render: (
|
|
721
|
-
props: (
|
|
711
|
+
r("div", mt, [
|
|
712
|
+
r("div", ft, [
|
|
713
|
+
r("div", pt, [
|
|
714
|
+
b(c(Z), {
|
|
715
|
+
render: (s = (a = (t = w._id) == null ? void 0 : t.column) == null ? void 0 : a.columnDef) == null ? void 0 : s.cell,
|
|
716
|
+
props: (f = (n = w._id) == null ? void 0 : n.getContext) == null ? void 0 : f.call(n)
|
|
722
717
|
}, null, 8, ["render", "props"])
|
|
723
718
|
]),
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
render: (U = (x = (
|
|
727
|
-
props: (S = (
|
|
719
|
+
r("div", gt, [
|
|
720
|
+
b(c(Z), {
|
|
721
|
+
render: (U = (x = (D = w.name) == null ? void 0 : D.column) == null ? void 0 : x.columnDef) == null ? void 0 : U.cell,
|
|
722
|
+
props: (S = (g = w.name) == null ? void 0 : g.getContext) == null ? void 0 : S.call(g)
|
|
728
723
|
}, null, 8, ["render", "props"])
|
|
729
724
|
]),
|
|
730
|
-
|
|
725
|
+
r("div", vt, H([
|
|
731
726
|
...A.original.items.slice(0, 3).map((we) => we.sku.name),
|
|
732
727
|
...A.original.items.length >= 3 ? [`and ${A.original.items.length - 3} more items`] : []
|
|
733
728
|
].join(", ")), 1),
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
render: (I = (
|
|
737
|
-
props: (
|
|
729
|
+
r("div", yt, [
|
|
730
|
+
b(c(Z), {
|
|
731
|
+
render: (I = (T = (k = w.ref) == null ? void 0 : k.column) == null ? void 0 : T.columnDef) == null ? void 0 : I.cell,
|
|
732
|
+
props: (ae = (q = w.ref) == null ? void 0 : q.getContext) == null ? void 0 : ae.call(q)
|
|
738
733
|
}, null, 8, ["render", "props"])
|
|
739
734
|
])
|
|
740
735
|
]),
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
render: (
|
|
744
|
-
props: (
|
|
736
|
+
r("div", null, [
|
|
737
|
+
b(c(Z), {
|
|
738
|
+
render: (se = (oe = (ne = w.status) == null ? void 0 : ne.column) == null ? void 0 : oe.columnDef) == null ? void 0 : se.cell,
|
|
739
|
+
props: (re = (G = w.status) == null ? void 0 : G.getContext) == null ? void 0 : re.call(G)
|
|
745
740
|
}, null, 8, ["render", "props"])
|
|
746
741
|
])
|
|
747
742
|
])
|
|
@@ -756,11 +751,11 @@ const Xe = _e("closingTable", function() {
|
|
|
756
751
|
]),
|
|
757
752
|
_: 1
|
|
758
753
|
}, 8, ["title", "actions"]),
|
|
759
|
-
(R(),
|
|
760
|
-
|
|
754
|
+
(R(), O(Be, { to: "body" }, [
|
|
755
|
+
b(dt, Fe(c(d), {
|
|
761
756
|
show: c(i),
|
|
762
757
|
"onUpdate:show": $[2] || ($[2] = (A) => pe(i) ? i.value = A : null),
|
|
763
|
-
onSubmitted: $[3] || ($[3] = (A) => c(
|
|
758
|
+
onSubmitted: $[3] || ($[3] = (A) => c(v).fetchDrafts())
|
|
764
759
|
}), null, 16, ["show"])
|
|
765
760
|
]))
|
|
766
761
|
], 64);
|