@feedmepos/mf-inventory-portal 0.0.25-dev.51 → 0.0.25-dev.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-Bf7Ef5j4.js → App-CjqJghCI.js} +34 -34
- package/dist/{ApprovalView-CTKJY1vM.js → ApprovalView-C42xNBr9.js} +13 -13
- package/dist/{BindingsDialog-Cb7aRRNk.js → BindingsDialog-DfShaOTO.js} +2 -2
- package/dist/{BindingsPicker-DOI78hCt.js → BindingsPicker-BZmmKaqZ.js} +1 -1
- package/dist/{BindingsTable-CZE4g-lw.js → BindingsTable-Dzk1x-qi.js} +1 -1
- package/dist/{ClosingDraftView-ChjnuJSG.js → ClosingDraftView-DpP-cqpM.js} +153 -153
- package/dist/{ClosingTemplateView-gSQqeQ_q.js → ClosingTemplateView-DSo8B_Cq.js} +242 -242
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BMFxe5xn.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-JsmwiIQG.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-PmKyuRhO.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DhicQW8Q.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CnRG4x74.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-feCBwmiz.js} +1 -1
- package/dist/{IngredientGroupView-CaF4rmHy.js → IngredientGroupView-p1jRflBc.js} +1 -1
- package/dist/{IngredientsView-CX_MSjT3.js → IngredientsView-KrhaER9Y.js} +4 -4
- package/dist/{IntegrationView-BRkcILmI.js → IntegrationView-CFXpiR1g.js} +2 -2
- package/dist/{InventoryBindingForm-BK7OBXJt.js → InventoryBindingForm-CaeO-fpj.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D81eO5Mu.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CPgkL2CW.js} +3 -3
- package/dist/{InventoryBindingSummary-B3m-PoE-.js → InventoryBindingSummary-NLY5i6ql.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DsTKgxFv.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BTJ4Omyi.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-8Sa_WUWa.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CEroADf4.js} +1 -1
- package/dist/{PublishView-DZR7-XFd.js → PublishView-DFTo5S0F.js} +54 -54
- package/dist/{PurchaseOrderPrintPreview-BT5Khjs6.js → PurchaseOrderPrintPreview-7YBYHbP6.js} +1 -1
- package/dist/{ReceiveRequestView-3nhyFqXE.js → ReceiveRequestView-BG5s-oS9.js} +11 -11
- package/dist/{RecipeView-R-lqVFmh.js → RecipeView-kc50YRZk.js} +3 -3
- package/dist/{StockView-Did7vk97.js → StockView-XymZfzq8.js} +9 -9
- package/dist/{SupplierView-BGHR6LD2.js → SupplierView-B2vB9f9I.js} +7 -7
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-vjDgXu5D.js → TransferDetails.vue_vue_type_script_setup_true_lang-CsQoRock.js} +5 -5
- package/dist/{TransferTemplateView-Dh1iZbPZ.js → TransferTemplateView-OD4SE6qf.js} +159 -159
- package/dist/{UnitView-DE9WIvA-.js → UnitView-Bb8gEtVh.js} +3 -3
- package/dist/{WarehouseView-CgurMkHh.js → WarehouseView-BeGII5M9.js} +1 -1
- package/dist/{app-BoT0hU4y.js → app-CvTTGb1Y.js} +11624 -10851
- package/dist/app.d.ts +845 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-CpTYRDjJ.js → decimal-XcUTkVCR.js} +1 -1
- package/dist/{feature-CW1D96VL.js → feature-Bv1NYHN4.js} +415 -421
- package/dist/{format-unit-display-D6lsq-iX.js → format-unit-display-BsM7BR8x.js} +2 -2
- package/dist/{index-tTGOQaym.js → index-j3NNoa4K.js} +1 -1
- package/dist/{index-TqOHI1Dk.js → index-xfhlIOM0.js} +1 -1
- package/dist/{stock-Cnh2comB.js → stock-DgLOMQ1X.js} +1 -1
- package/dist/{supplier-BY8xacQQ.js → supplier-B0HyUoxP.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BwbzsMlI.js → use-ingredient-select-dialog-D9arr1HY.js} +1 -1
- package/dist/{use-inventory-binding-dialog-3srettA-.js → use-inventory-binding-dialog-DGnSxKpE.js} +1 -1
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +88 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +528 -0
- package/dist/{vue-i18n-C9tRTjjd.js → vue-i18n-BFNEEDAX.js} +397 -397
- package/package.json +2 -2
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { defineComponent as ke, ref as V, resolveComponent as E, openBlock as x, createBlock as X, withCtx as Y, createElementVNode as o, createTextVNode as De, toDisplayString as z, unref as y, createVNode as _, h as k, reactive as Ye, computed as H, onMounted as Ke, watch as Ge, isRef as Te, createElementBlock as T, Fragment as q, createCommentVNode as ne, normalizeClass as me, renderList as ve, normalizeStyle as Re, Teleport as qe, mergeProps as We } from "vue";
|
|
2
|
-
import { X as Ze, u as we, ak as W, l as Je, J as je, i as P, t as Xe, K as ye, q as Qe, r as et, s as tt, al as Me, am as Pe, a7 as Ie, an as le, ad as at, aj as oe, V as Ue, D as Fe, h as xe, f as nt, e as ot, a as st, z as rt, _ as lt, B as ct, C as it, E as he } from "./app-
|
|
2
|
+
import { X as Ze, u as we, ak as W, l as Je, J as je, i as P, t as Xe, K as ye, q as Qe, r as et, s as tt, al as Me, am as Pe, a7 as Ie, an as le, ad as at, aj as oe, V as Ue, D as Fe, h as xe, f as nt, e as ot, a as st, z as rt, _ as lt, B as ct, C as it, E as he } from "./app-CvTTGb1Y.js";
|
|
3
3
|
import { useCoreStore as ut, useI18n as Ee } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as Ce, useDialog as dt, useProxiedModel as mt, components as de, useBreakpoints as ft } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as He, storeToRefs as pt } from "pinia";
|
|
6
|
-
import { a as Le, u as ze } from "./stock-
|
|
6
|
+
import { a as Le, u as ze } from "./stock-DgLOMQ1X.js";
|
|
7
7
|
import { E as vt } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
|
-
const Se = Ze((n,
|
|
8
|
+
const Se = Ze((n, s) => {
|
|
9
9
|
function e() {
|
|
10
10
|
return we().currentLocation.dbName;
|
|
11
11
|
}
|
|
12
12
|
return {
|
|
13
|
-
async getDraft(
|
|
14
|
-
const
|
|
15
|
-
return
|
|
13
|
+
async getDraft(d) {
|
|
14
|
+
const i = e(), g = `${n.inventoryBackendUrl}/${i}/closing-draft/${d}`;
|
|
15
|
+
return s.get(g);
|
|
16
16
|
},
|
|
17
17
|
async readDrafts() {
|
|
18
|
-
const
|
|
19
|
-
return
|
|
18
|
+
const d = e(), i = `${n.inventoryBackendUrl}/${d}/closing-draft`;
|
|
19
|
+
return s.get(i);
|
|
20
20
|
},
|
|
21
|
-
async runOperation(
|
|
22
|
-
const
|
|
23
|
-
return
|
|
21
|
+
async runOperation(d) {
|
|
22
|
+
const i = e(), g = `${n.inventoryBackendUrl}/${i}/closing-draft/run-operation`;
|
|
23
|
+
return s.post(g, d);
|
|
24
24
|
},
|
|
25
|
-
async sync(
|
|
26
|
-
const
|
|
27
|
-
return
|
|
25
|
+
async sync(d) {
|
|
26
|
+
const i = e(), g = `${n.inventoryBackendUrl}/${i}/closing-draft/sync`;
|
|
27
|
+
return s.post(g, d);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
}), yt = { class: "fm-typo-en-body-lg-400" }, gt = { class: "fm-typo-en-body-lg-600" }, bt = { class: "flex gap-12 py-8 justify-end w-full" }, $e = /* @__PURE__ */ ke({
|
|
@@ -36,24 +36,24 @@ const Se = Ze((n, r) => {
|
|
|
36
36
|
onFinished: { type: Function }
|
|
37
37
|
},
|
|
38
38
|
setup(n) {
|
|
39
|
-
const
|
|
39
|
+
const s = n, e = V(), d = Se(), i = Ce(), g = V(!1);
|
|
40
40
|
async function h() {
|
|
41
41
|
g.value = !0;
|
|
42
42
|
try {
|
|
43
|
-
await
|
|
44
|
-
_id:
|
|
45
|
-
_rev:
|
|
46
|
-
action:
|
|
43
|
+
await d.runOperation({
|
|
44
|
+
_id: s.draft._id,
|
|
45
|
+
_rev: s.draft._rev ?? "",
|
|
46
|
+
action: s.action,
|
|
47
47
|
data: {
|
|
48
48
|
remark: e.value
|
|
49
49
|
}
|
|
50
|
-
}).delayed(500),
|
|
50
|
+
}).delayed(500), i.open({
|
|
51
51
|
title: "Success",
|
|
52
52
|
message: "Action submitted",
|
|
53
53
|
type: "success"
|
|
54
|
-
}),
|
|
54
|
+
}), s.onFinished();
|
|
55
55
|
} catch (D) {
|
|
56
|
-
|
|
56
|
+
i.open({
|
|
57
57
|
title: "Something went wrong",
|
|
58
58
|
message: "Unable to submit actino. Please try again",
|
|
59
59
|
type: "error"
|
|
@@ -77,7 +77,7 @@ const Se = Ze((n, r) => {
|
|
|
77
77
|
]),
|
|
78
78
|
_(R, {
|
|
79
79
|
modelValue: e.value,
|
|
80
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
80
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => e.value = r),
|
|
81
81
|
label: "Remark",
|
|
82
82
|
"label-mark": "required",
|
|
83
83
|
rules: [y(Je)()]
|
|
@@ -86,7 +86,7 @@ const Se = Ze((n, r) => {
|
|
|
86
86
|
_(M, {
|
|
87
87
|
label: "Cancel",
|
|
88
88
|
variant: "tertiary",
|
|
89
|
-
onClick: l[1] || (l[1] = (
|
|
89
|
+
onClick: l[1] || (l[1] = (r) => D.onCancel())
|
|
90
90
|
}),
|
|
91
91
|
_(M, {
|
|
92
92
|
label: D.action == y(W).enum.approveDraft ? "Approve" : "Reject",
|
|
@@ -102,18 +102,18 @@ const Se = Ze((n, r) => {
|
|
|
102
102
|
}
|
|
103
103
|
}), xt = ye(0);
|
|
104
104
|
function Ne(n) {
|
|
105
|
-
const
|
|
105
|
+
const s = n.measurementsAmounts.groupBy((d) => d.measurement.id), e = n.sku.unit.measurements.reduce((d, i) => {
|
|
106
106
|
var D, l;
|
|
107
|
-
const g = ((l = (D =
|
|
108
|
-
return
|
|
107
|
+
const g = ((l = (D = s.get(i.id)) == null ? void 0 : D[0]) == null ? void 0 : l.amount) ?? xt, h = je(i.conversion, g);
|
|
108
|
+
return d + +P(h);
|
|
109
109
|
}, +P(n.baseAmount));
|
|
110
110
|
return Xe(e, n.baseAmount.precision);
|
|
111
111
|
}
|
|
112
112
|
const ht = ye(0), At = ye(100);
|
|
113
|
-
function _t(n,
|
|
114
|
-
const
|
|
115
|
-
...
|
|
116
|
-
amount: Math.abs(
|
|
113
|
+
function _t(n, s, e) {
|
|
114
|
+
const d = Ne(n), i = Me(d, s), g = s.amount === 0 ? null : Pe(i, {
|
|
115
|
+
...s,
|
|
116
|
+
amount: Math.abs(s.amount)
|
|
117
117
|
}), h = g ? je(g, At) : null;
|
|
118
118
|
return {
|
|
119
119
|
code: n.sku.code,
|
|
@@ -126,9 +126,9 @@ function _t(n, r, e) {
|
|
|
126
126
|
(l, R, M) => (l[`measurementAbbrev${M}`] = `(${R.measurement.abbrev}) × ${P(R.measurement.conversion)}`, l[`measurementAmount${M}`] = +P(R.amount), l),
|
|
127
127
|
{}
|
|
128
128
|
),
|
|
129
|
-
systemBalance: +P(
|
|
130
|
-
physicalBalance: +P(
|
|
131
|
-
adjustedAmount: +P(
|
|
129
|
+
systemBalance: +P(s),
|
|
130
|
+
physicalBalance: +P(d),
|
|
131
|
+
adjustedAmount: +P(i),
|
|
132
132
|
adjustedDiffPercentage: h ? +P(Ie(h, 2)) : null
|
|
133
133
|
};
|
|
134
134
|
}
|
|
@@ -136,19 +136,19 @@ function Dt(n) {
|
|
|
136
136
|
return !n.abbrev.toLocaleLowerCase().includes("inactive");
|
|
137
137
|
}
|
|
138
138
|
function kt(n) {
|
|
139
|
-
const
|
|
139
|
+
const s = Oe(n);
|
|
140
140
|
return n.reduce(
|
|
141
|
-
(e,
|
|
142
|
-
var
|
|
143
|
-
return Math.max(e, ((
|
|
141
|
+
(e, d) => {
|
|
142
|
+
var i;
|
|
143
|
+
return Math.max(e, ((i = s == null ? void 0 : s.get(d.sku._id)) == null ? void 0 : i[0].length) ?? 0);
|
|
144
144
|
},
|
|
145
145
|
0
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
function Oe(n) {
|
|
149
149
|
return n.groupBy(
|
|
150
|
-
(
|
|
151
|
-
(
|
|
150
|
+
(s) => s.sku._id,
|
|
151
|
+
(s) => s.measurementsAmounts.filter((e) => !e.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((e) => e.measurement.id)
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
154
|
function wt(n) {
|
|
@@ -185,28 +185,28 @@ function wt(n) {
|
|
|
185
185
|
id: "baseUnit",
|
|
186
186
|
name: "Base unit"
|
|
187
187
|
},
|
|
188
|
-
...Array.from({ length: n }).flatMap((e,
|
|
188
|
+
...Array.from({ length: n }).flatMap((e, d) => [
|
|
189
189
|
{
|
|
190
|
-
id: `measurementAmount${
|
|
191
|
-
name: `UOM amount ${
|
|
190
|
+
id: `measurementAmount${d}`,
|
|
191
|
+
name: `UOM amount ${d + 1}`
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
|
-
id: `measurementAbbrev${
|
|
195
|
-
name: `UOM ${
|
|
194
|
+
id: `measurementAbbrev${d}`,
|
|
195
|
+
name: `UOM ${d + 1}`
|
|
196
196
|
}
|
|
197
197
|
])
|
|
198
198
|
];
|
|
199
199
|
}
|
|
200
|
-
function jt(n,
|
|
200
|
+
function jt(n, s) {
|
|
201
201
|
var B, b, v, F, N, C, I;
|
|
202
|
-
const e =
|
|
202
|
+
const e = s.groupBy(
|
|
203
203
|
(w) => w.id,
|
|
204
204
|
(w) => w.balance
|
|
205
|
-
),
|
|
205
|
+
), d = [...n.items, ...n.negativeStockItems ?? []], i = Oe(d), g = d.map((w) => {
|
|
206
206
|
var K, se;
|
|
207
|
-
const Z = ((K = e.get(w.sku._id)) == null ? void 0 : K[0]) ?? ht, Q = ((se =
|
|
207
|
+
const Z = ((K = e.get(w.sku._id)) == null ? void 0 : K[0]) ?? ht, Q = ((se = i == null ? void 0 : i.get(w.sku._id)) == null ? void 0 : se[0]) ?? [];
|
|
208
208
|
return _t(w, Z, Q);
|
|
209
|
-
}), h = kt(
|
|
209
|
+
}), h = kt(d), l = ut().currentBusiness.value, R = wt(h), M = [
|
|
210
210
|
["Business name:", l == null ? void 0 : l.name],
|
|
211
211
|
["Business ID:", l == null ? void 0 : l._id],
|
|
212
212
|
["Menu version", l == null ? void 0 : l.menuVersion],
|
|
@@ -230,13 +230,13 @@ function jt(n, r) {
|
|
|
230
230
|
[],
|
|
231
231
|
R.map((w) => w.name),
|
|
232
232
|
...g.map((w) => R.map((Z) => w[Z.id]))
|
|
233
|
-
], U = R.map((w) => `system:${w.id}`),
|
|
234
|
-
return tt(
|
|
233
|
+
], U = R.map((w) => `system:${w.id}`), r = Qe(M, U), p = `[${l == null ? void 0 : l.name}] closing draft (${et(new Date(n.updatedAt))}).xlsx`;
|
|
234
|
+
return tt(r, p), p;
|
|
235
235
|
}
|
|
236
236
|
const _e = He(
|
|
237
237
|
"closingDraftActions",
|
|
238
238
|
function() {
|
|
239
|
-
const
|
|
239
|
+
const s = dt(), e = Ce(), d = Le(), i = Se(), g = ze(), h = V(!1), D = V();
|
|
240
240
|
function l(b) {
|
|
241
241
|
const v = {
|
|
242
242
|
draft: b
|
|
@@ -255,7 +255,7 @@ const _e = He(
|
|
|
255
255
|
}), console.error("Closing draft is completed but closing document cannot be found.", {
|
|
256
256
|
draftId: b._id
|
|
257
257
|
}), [];
|
|
258
|
-
const C = await
|
|
258
|
+
const C = await d.readAdjustmentById(N);
|
|
259
259
|
return ((C == null ? void 0 : C.skus) ?? []).map((w) => ({
|
|
260
260
|
id: w.sku._id,
|
|
261
261
|
balance: w.fromBalance,
|
|
@@ -271,35 +271,35 @@ const _e = He(
|
|
|
271
271
|
}), v = await R(b)), jt(b, v);
|
|
272
272
|
}
|
|
273
273
|
function U(b, v) {
|
|
274
|
-
|
|
274
|
+
s.open({
|
|
275
275
|
title: "Approve draft",
|
|
276
276
|
contentComponent: $e,
|
|
277
277
|
contentComponentProps: {
|
|
278
278
|
draft: b,
|
|
279
279
|
action: W.enum.approveDraft,
|
|
280
280
|
onFinished: () => {
|
|
281
|
-
|
|
281
|
+
s.close(), v == null || v();
|
|
282
282
|
},
|
|
283
|
-
onCancel: () =>
|
|
283
|
+
onCancel: () => s.close()
|
|
284
284
|
}
|
|
285
285
|
});
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
|
|
287
|
+
function r(b, v) {
|
|
288
|
+
s.open({
|
|
289
289
|
title: "Reject draft",
|
|
290
290
|
contentComponent: $e,
|
|
291
291
|
contentComponentProps: {
|
|
292
292
|
draft: b,
|
|
293
293
|
action: W.enum.rejectDraft,
|
|
294
294
|
onFinished: () => {
|
|
295
|
-
|
|
295
|
+
s.close(), v == null || v();
|
|
296
296
|
},
|
|
297
|
-
onCancel: () =>
|
|
297
|
+
onCancel: () => s.close()
|
|
298
298
|
}
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
301
|
async function p(b, v) {
|
|
302
|
-
await
|
|
302
|
+
await i.sync({
|
|
303
303
|
_id: b._id,
|
|
304
304
|
_rev: b._rev ?? "",
|
|
305
305
|
action: W.enum.approveDraft,
|
|
@@ -319,7 +319,7 @@ const _e = He(
|
|
|
319
319
|
viewDraft: l,
|
|
320
320
|
closeDraftDialog: B,
|
|
321
321
|
approveDraft: U,
|
|
322
|
-
rejectDraft:
|
|
322
|
+
rejectDraft: r,
|
|
323
323
|
syncDraft: p,
|
|
324
324
|
exportDraft: M,
|
|
325
325
|
viewClosingDraftShow: h,
|
|
@@ -342,41 +342,41 @@ function Ae(n) {
|
|
|
342
342
|
const Ct = He(
|
|
343
343
|
"closingDraftTable",
|
|
344
344
|
function() {
|
|
345
|
-
const { t:
|
|
345
|
+
const { t: s } = Ee(), e = _e(), d = V(new Array()), i = V(!1), g = we(), h = Se();
|
|
346
346
|
async function D() {
|
|
347
|
-
if (
|
|
348
|
-
|
|
347
|
+
if (d.value = [], !!g._currentLocation) {
|
|
348
|
+
i.value = !0;
|
|
349
349
|
try {
|
|
350
|
-
const [
|
|
351
|
-
|
|
352
|
-
} catch (
|
|
353
|
-
console.log("Something went wrong when fetching drafts:",
|
|
350
|
+
const [r] = await Promise.all([h.readDrafts()]).delayed(1e3);
|
|
351
|
+
d.value = r.reverse();
|
|
352
|
+
} catch (r) {
|
|
353
|
+
console.log("Something went wrong when fetching drafts:", r);
|
|
354
354
|
} finally {
|
|
355
|
-
|
|
355
|
+
i.value = !1;
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
async function l(
|
|
360
|
-
if (!
|
|
361
|
-
|
|
359
|
+
async function l(r) {
|
|
360
|
+
if (!d.value.find((p) => p._id) && g._currentLocation) {
|
|
361
|
+
i.value = !0;
|
|
362
362
|
try {
|
|
363
363
|
const [p] = await Promise.all([
|
|
364
|
-
h.getDraft(
|
|
364
|
+
h.getDraft(r),
|
|
365
365
|
new Promise((B) => setTimeout(B, 1e3))
|
|
366
366
|
]);
|
|
367
|
-
|
|
367
|
+
d.value = [p];
|
|
368
368
|
} catch (p) {
|
|
369
369
|
console.log("Something went wrong when fetching drafts:", p);
|
|
370
370
|
} finally {
|
|
371
|
-
|
|
371
|
+
i.value = !1;
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
function R() {
|
|
376
376
|
e.closeDraftDialog(), D();
|
|
377
377
|
}
|
|
378
|
-
function M(
|
|
379
|
-
switch (p = ot(p),
|
|
378
|
+
function M(r, p) {
|
|
379
|
+
switch (p = ot(p), r) {
|
|
380
380
|
case xe.Details:
|
|
381
381
|
return e.viewDraft(p);
|
|
382
382
|
case xe.Export:
|
|
@@ -392,15 +392,15 @@ const Ct = He(
|
|
|
392
392
|
{
|
|
393
393
|
id: "_id",
|
|
394
394
|
accessorKey: "_id",
|
|
395
|
-
header: () =>
|
|
396
|
-
cell(
|
|
397
|
-
return at(`${
|
|
395
|
+
header: () => s("inventory.closing.table.createdAt"),
|
|
396
|
+
cell(r) {
|
|
397
|
+
return at(`${r.getValue()}`);
|
|
398
398
|
},
|
|
399
399
|
enableSorting: !0
|
|
400
400
|
},
|
|
401
401
|
{
|
|
402
402
|
id: "updatedAt",
|
|
403
|
-
accessorFn: (
|
|
403
|
+
accessorFn: (r) => oe(r.updatedAt),
|
|
404
404
|
header: () => "Updated at",
|
|
405
405
|
enableSorting: !0,
|
|
406
406
|
size: 200
|
|
@@ -414,11 +414,11 @@ const Ct = He(
|
|
|
414
414
|
},
|
|
415
415
|
{
|
|
416
416
|
id: "noOfItems",
|
|
417
|
-
accessorFn: (
|
|
417
|
+
accessorFn: (r) => {
|
|
418
418
|
var p;
|
|
419
|
-
return
|
|
419
|
+
return r.items.length + (((p = r.negativeStockItems) == null ? void 0 : p.length) ?? 0);
|
|
420
420
|
},
|
|
421
|
-
header: () =>
|
|
421
|
+
header: () => s("inventory.closing.table.noOfItems"),
|
|
422
422
|
enableSorting: !1,
|
|
423
423
|
meta: {
|
|
424
424
|
width: "10rem",
|
|
@@ -427,20 +427,20 @@ const Ct = He(
|
|
|
427
427
|
},
|
|
428
428
|
{
|
|
429
429
|
id: "recentRemark",
|
|
430
|
-
accessorFn: (
|
|
430
|
+
accessorFn: (r) => {
|
|
431
431
|
var p;
|
|
432
|
-
return (
|
|
432
|
+
return (r == null ? void 0 : r.approveRemark) ?? ((p = r == null ? void 0 : r.rejectionHistory) == null ? void 0 : p.computeFirst((B) => B.rejectRemark)) ?? r.remark;
|
|
433
433
|
},
|
|
434
434
|
header: () => "Recent remark"
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
437
|
id: "status",
|
|
438
|
-
accessorFn: (
|
|
439
|
-
header: () =>
|
|
438
|
+
accessorFn: (r) => r.status,
|
|
439
|
+
header: () => s("inventory.closing.table.status"),
|
|
440
440
|
enableSorting: !1,
|
|
441
|
-
cell(
|
|
441
|
+
cell(r) {
|
|
442
442
|
var N;
|
|
443
|
-
const p =
|
|
443
|
+
const p = r.row.original, B = p.status, b = new Date(p.updatedAt), v = (N = p == null ? void 0 : p.rejectionHistory) == null ? void 0 : N.computeFirst((C) => C.rejectedAt), F = v ? new Date(v) : null;
|
|
444
444
|
return B === "DRAFT" && F ? F.getTime() > b.getTime() ? k(
|
|
445
445
|
"div",
|
|
446
446
|
{
|
|
@@ -482,8 +482,8 @@ const Ct = He(
|
|
|
482
482
|
},
|
|
483
483
|
{
|
|
484
484
|
id: "action",
|
|
485
|
-
cell(
|
|
486
|
-
const p =
|
|
485
|
+
cell(r) {
|
|
486
|
+
const p = r.row.original, B = [
|
|
487
487
|
Fe[xe.Details],
|
|
488
488
|
Fe[xe.Export]
|
|
489
489
|
], b = [
|
|
@@ -514,8 +514,8 @@ const Ct = He(
|
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
],
|
|
517
|
-
drafts:
|
|
518
|
-
loading:
|
|
517
|
+
drafts: d,
|
|
518
|
+
loading: i,
|
|
519
519
|
fetchDrafts: D,
|
|
520
520
|
loadDraft: l
|
|
521
521
|
};
|
|
@@ -554,13 +554,13 @@ const Ct = He(
|
|
|
554
554
|
draft: {}
|
|
555
555
|
},
|
|
556
556
|
emits: ["submitted"],
|
|
557
|
-
setup(n, { emit:
|
|
558
|
-
const e = n,
|
|
557
|
+
setup(n, { emit: s }) {
|
|
558
|
+
const e = n, d = ze(), i = _e(), g = mt(e, "show"), h = V(!1), D = V(!1), l = V(new Array()), R = Le(), M = Ce(), U = st(), r = Ye({}), p = H(() => new Set(
|
|
559
559
|
U.skus.filter((a) => {
|
|
560
560
|
var t;
|
|
561
|
-
return
|
|
561
|
+
return r[(t = a.customAttributes) == null ? void 0 : t.tag];
|
|
562
562
|
}).map((a) => a._id)
|
|
563
|
-
)), B =
|
|
563
|
+
)), B = s, b = H(() => {
|
|
564
564
|
var t, c;
|
|
565
565
|
const a = [...((t = e.draft) == null ? void 0 : t.items) ?? [], ...((c = e.draft) == null ? void 0 : c.negativeStockItems) ?? []];
|
|
566
566
|
return p.value.size ? a.filter((m) => p.value.has(m.sku._id)) : a;
|
|
@@ -584,8 +584,8 @@ const Ct = He(
|
|
|
584
584
|
const a = ((t = e.draft) == null ? void 0 : t.status) === le.enum.COMPLETED;
|
|
585
585
|
try {
|
|
586
586
|
if (await U.init(), a) {
|
|
587
|
-
const
|
|
588
|
-
if (!
|
|
587
|
+
const u = e.draft.closingAdjustmentId;
|
|
588
|
+
if (!u) {
|
|
589
589
|
M.open({
|
|
590
590
|
title: "Something went wrong",
|
|
591
591
|
message: "Closing draft is completed but closing document cannot be found.",
|
|
@@ -595,20 +595,20 @@ const Ct = He(
|
|
|
595
595
|
});
|
|
596
596
|
return;
|
|
597
597
|
}
|
|
598
|
-
const f = await R.readAdjustmentById(
|
|
598
|
+
const f = await R.readAdjustmentById(u), j = (f == null ? void 0 : f.skus) ?? [];
|
|
599
599
|
l.value = j.map(($) => ({
|
|
600
600
|
id: $.sku._id,
|
|
601
601
|
balance: $.fromBalance,
|
|
602
602
|
costs: $.fromCostBalances
|
|
603
603
|
}));
|
|
604
604
|
} else
|
|
605
|
-
|
|
606
|
-
} catch (
|
|
605
|
+
l.value = ((m = e.draft) == null ? void 0 : m.stockSnapshot) ?? [];
|
|
606
|
+
} catch (u) {
|
|
607
607
|
M.open({
|
|
608
608
|
title: "Something went wrong",
|
|
609
609
|
message: "Something went wrong when fetching info. Please try again.",
|
|
610
610
|
type: "error"
|
|
611
|
-
}), console.error("error on fetch stock balances",
|
|
611
|
+
}), console.error("error on fetch stock balances", u);
|
|
612
612
|
} finally {
|
|
613
613
|
h.value = !1;
|
|
614
614
|
}
|
|
@@ -635,8 +635,8 @@ const Ct = He(
|
|
|
635
635
|
}
|
|
636
636
|
const K = H(() => {
|
|
637
637
|
const a = v.value.reduce((c, m) => {
|
|
638
|
-
var
|
|
639
|
-
return Math.max(c, ((f = (
|
|
638
|
+
var u, f;
|
|
639
|
+
return Math.max(c, ((f = (u = F.value) == null ? void 0 : u.get(m._id)) == null ? void 0 : f[0].length) ?? 0);
|
|
640
640
|
}, 0);
|
|
641
641
|
return [
|
|
642
642
|
{
|
|
@@ -645,7 +645,7 @@ const Ct = He(
|
|
|
645
645
|
header: () => "Name",
|
|
646
646
|
size: 350,
|
|
647
647
|
cell(c) {
|
|
648
|
-
const m = c.row.original,
|
|
648
|
+
const m = c.row.original, u = m.adjustedDiffPercentage, f = typeof u == "number" && Math.abs(u) > 10, j = k("div", { class: "flex flex-col gap-4" }, [
|
|
649
649
|
k(
|
|
650
650
|
"div",
|
|
651
651
|
{
|
|
@@ -739,8 +739,8 @@ const Ct = He(
|
|
|
739
739
|
cell(c) {
|
|
740
740
|
const m = c.row.original.adjustedDiffPercentage;
|
|
741
741
|
if (!m) return "N/A";
|
|
742
|
-
const
|
|
743
|
-
if (
|
|
742
|
+
const u = m.toFixed(2);
|
|
743
|
+
if (u === "0.00")
|
|
744
744
|
return k("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
|
|
745
745
|
const f = m > 0;
|
|
746
746
|
return k("div", { class: "flex items-center gap-4 justify-end" }, [
|
|
@@ -749,7 +749,7 @@ const Ct = He(
|
|
|
749
749
|
color: f ? "system-success-300" : "system-error-300",
|
|
750
750
|
size: "md"
|
|
751
751
|
}),
|
|
752
|
-
|
|
752
|
+
u
|
|
753
753
|
]);
|
|
754
754
|
},
|
|
755
755
|
meta: {
|
|
@@ -761,7 +761,7 @@ const Ct = He(
|
|
|
761
761
|
header: () => "Amounts",
|
|
762
762
|
enableSorting: !1,
|
|
763
763
|
cell(c) {
|
|
764
|
-
const m = c.row.original,
|
|
764
|
+
const m = c.row.original, u = (j, $) => k(
|
|
765
765
|
de.FmTooltip,
|
|
766
766
|
{ zIndex: 50 },
|
|
767
767
|
{
|
|
@@ -793,9 +793,9 @@ const Ct = He(
|
|
|
793
793
|
if (!m[`measurementAmount${$}`])
|
|
794
794
|
return null;
|
|
795
795
|
const S = m[`measurementAmount${$}`], ie = m[`measurementAbbrev${$}`];
|
|
796
|
-
return
|
|
796
|
+
return u(S, ie);
|
|
797
797
|
}).filter((j) => j);
|
|
798
|
-
return (m.baseUnitAmount || !f.length) && (f = [
|
|
798
|
+
return (m.baseUnitAmount || !f.length) && (f = [u(m.baseUnitAmount, m.baseUnit), ...f]), k(
|
|
799
799
|
"div",
|
|
800
800
|
{
|
|
801
801
|
class: "flex gap-8 flex-nowrap",
|
|
@@ -822,7 +822,7 @@ const Ct = He(
|
|
|
822
822
|
adjustedAmount: -+P(c),
|
|
823
823
|
adjustedDiffPercentage: -100
|
|
824
824
|
};
|
|
825
|
-
const m = Ne(t),
|
|
825
|
+
const m = Ne(t), u = Me(m, c), f = c.amount === 0 ? null : Pe(u, {
|
|
826
826
|
...c,
|
|
827
827
|
amount: Math.abs(c.amount)
|
|
828
828
|
}), j = f ? je(f, C) : null;
|
|
@@ -837,7 +837,7 @@ const Ct = He(
|
|
|
837
837
|
}).reduce((ae, G, re) => (ae[`measurementAbbrev${re}`] = `(${G.measurement.abbrev}) × ${P(G.measurement.conversion)}`, ae[`measurementAmount${re}`] = +P(G.amount), ae), {}),
|
|
838
838
|
systemBalance: +P(c),
|
|
839
839
|
physicalBalance: +P(m),
|
|
840
|
-
adjustedAmount: +P(
|
|
840
|
+
adjustedAmount: +P(u),
|
|
841
841
|
adjustedDiffPercentage: j ? +P(Ie(j, 2)) : null
|
|
842
842
|
};
|
|
843
843
|
})), ge = H(() => {
|
|
@@ -848,11 +848,11 @@ const Ct = He(
|
|
|
848
848
|
// actionAt: props.draft.approvedAt,
|
|
849
849
|
actionBy: e.draft.approvedBy,
|
|
850
850
|
remark: e.draft.approveRemark
|
|
851
|
-
} : (t = e.draft.rejectionHistory) == null ? void 0 : t.computeFirst((
|
|
852
|
-
action: `Reject at ${oe(
|
|
851
|
+
} : (t = e.draft.rejectionHistory) == null ? void 0 : t.computeFirst((u) => ({
|
|
852
|
+
action: `Reject at ${oe(u.rejectedAt)}`,
|
|
853
853
|
// actionAt: e.rejectedAt,
|
|
854
|
-
actionBy:
|
|
855
|
-
remark:
|
|
854
|
+
actionBy: u.rejectedBy,
|
|
855
|
+
remark: u.rejectRemark
|
|
856
856
|
}));
|
|
857
857
|
return [
|
|
858
858
|
{
|
|
@@ -877,7 +877,7 @@ const Ct = He(
|
|
|
877
877
|
},
|
|
878
878
|
{
|
|
879
879
|
label: "Using template",
|
|
880
|
-
value: ((c = e.draft.usingTemplates.find((
|
|
880
|
+
value: ((c = e.draft.usingTemplates.find((u) => u)) == null ? void 0 : c.name) ?? "None"
|
|
881
881
|
},
|
|
882
882
|
e.draft.remark ? {
|
|
883
883
|
label: "Remark",
|
|
@@ -895,7 +895,7 @@ const Ct = He(
|
|
|
895
895
|
label: "Action remark",
|
|
896
896
|
value: a.remark
|
|
897
897
|
} : null
|
|
898
|
-
].filter((
|
|
898
|
+
].filter((u) => u).map((u) => u);
|
|
899
899
|
}), ee = [
|
|
900
900
|
{
|
|
901
901
|
label: "Overview",
|
|
@@ -906,7 +906,7 @@ const Ct = He(
|
|
|
906
906
|
value: "history"
|
|
907
907
|
}
|
|
908
908
|
], te = V(ee[0]), J = H(() => {
|
|
909
|
-
var t, c, m,
|
|
909
|
+
var t, c, m, u;
|
|
910
910
|
return [
|
|
911
911
|
...(((t = e.draft) == null ? void 0 : t.rejectionHistory) ?? []).map(
|
|
912
912
|
(f) => ({
|
|
@@ -935,24 +935,24 @@ const Ct = He(
|
|
|
935
935
|
},
|
|
936
936
|
{
|
|
937
937
|
label: "Approval remark",
|
|
938
|
-
values: [((
|
|
938
|
+
values: [((u = e.draft) == null ? void 0 : u.approveRemark) ?? ""]
|
|
939
939
|
}
|
|
940
940
|
]
|
|
941
941
|
}
|
|
942
942
|
] : []
|
|
943
943
|
];
|
|
944
944
|
}), pe = H(() => {
|
|
945
|
-
var
|
|
946
|
-
if ((
|
|
945
|
+
var u, f, j, $;
|
|
946
|
+
if ((u = e == null ? void 0 : e.draft) != null && u.approvedAt) return "Draft is already approved.";
|
|
947
947
|
if (((f = e.draft) == null ? void 0 : f.status) !== le.enum.DRAFT) return "Status is not draft.";
|
|
948
|
-
const a = fe.value.some((S) => S.physicalBalance < 0), t = (($ = (j =
|
|
948
|
+
const a = fe.value.some((S) => S.physicalBalance < 0), t = (($ = (j = d.stockBalance.skus) == null ? void 0 : j.filter((S) => S.balance.amount < 0)) == null ? void 0 : $.map((S) => S.id)) ?? [], c = new Set(v.value.map((S) => S._id)), m = t.filter((S) => !c.has(S)).length;
|
|
949
949
|
return [
|
|
950
950
|
a ? "Negative total exist." : null,
|
|
951
951
|
m ? "Negative stock is not included in this draft. Reopen draft in POS and apply changes." : null
|
|
952
952
|
].filter((S) => S).join(" ");
|
|
953
953
|
});
|
|
954
954
|
return (a, t) => {
|
|
955
|
-
const c = E("FmButtonGroup"), m = E("FmMenuDivider"),
|
|
955
|
+
const c = E("FmButtonGroup"), m = E("FmMenuDivider"), u = E("FmCard"), f = E("FmButton"), j = E("FmCircularProgress"), $ = E("FmTextField"), S = E("FmIcon"), ie = E("FmChip"), ae = E("FmTable"), G = E("FmSpacer"), re = E("FmTooltip"), be = E("FmSideSheet");
|
|
956
956
|
return x(), X(be, {
|
|
957
957
|
"dismiss-away": "",
|
|
958
958
|
"max-width": 9999,
|
|
@@ -977,28 +977,28 @@ const Ct = He(
|
|
|
977
977
|
disabled: "",
|
|
978
978
|
key: "approve key",
|
|
979
979
|
label: "Approve",
|
|
980
|
-
onClick: t[3] || (t[3] = () => e.draft && y(
|
|
980
|
+
onClick: t[3] || (t[3] = () => e.draft && y(i).approveDraft(e.draft, () => B("submitted")))
|
|
981
981
|
})
|
|
982
982
|
]),
|
|
983
983
|
_: 1
|
|
984
984
|
})) : (x(), X(f, {
|
|
985
985
|
key: "approve key",
|
|
986
986
|
label: "Approve",
|
|
987
|
-
onClick: t[4] || (t[4] = () => e.draft && y(
|
|
987
|
+
onClick: t[4] || (t[4] = () => e.draft && y(i).approveDraft(e.draft, () => B("submitted")))
|
|
988
988
|
}))
|
|
989
989
|
], 64)) : ne("", !0),
|
|
990
990
|
((L = e.draft) == null ? void 0 : L.status) === y(le).enum.DRAFT ? (x(), X(f, {
|
|
991
991
|
key: 1,
|
|
992
992
|
label: "Reject",
|
|
993
993
|
variant: "destructive",
|
|
994
|
-
onClick: t[5] || (t[5] = () => e.draft && y(
|
|
994
|
+
onClick: t[5] || (t[5] = () => e.draft && y(i).rejectDraft(e.draft, () => B("submitted")))
|
|
995
995
|
})) : ne("", !0),
|
|
996
996
|
(O = e.draft) != null && O.approvedAt && ((ue = e.draft) == null ? void 0 : ue.status) !== y(le).enum.COMPLETED ? (x(), X(f, {
|
|
997
997
|
key: 2,
|
|
998
998
|
label: "Sync",
|
|
999
999
|
loading: D.value,
|
|
1000
1000
|
onClick: t[6] || (t[6] = () => {
|
|
1001
|
-
e.draft && (D.value = !0, y(
|
|
1001
|
+
e.draft && (D.value = !0, y(i).syncDraft(e.draft, () => {
|
|
1002
1002
|
D.value = !1, B("submitted");
|
|
1003
1003
|
}));
|
|
1004
1004
|
})
|
|
@@ -1021,7 +1021,7 @@ const Ct = He(
|
|
|
1021
1021
|
}, null, 8, ["modelValue"])
|
|
1022
1022
|
]),
|
|
1023
1023
|
te.value.value === "overview" ? (x(), T(q, { key: 0 }, [
|
|
1024
|
-
_(
|
|
1024
|
+
_(u, {
|
|
1025
1025
|
variant: "outlined",
|
|
1026
1026
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1027
1027
|
}, {
|
|
@@ -1063,7 +1063,7 @@ const Ct = He(
|
|
|
1063
1063
|
"text-color": "primary",
|
|
1064
1064
|
"bg-color": "transparent",
|
|
1065
1065
|
"border-color": "primary",
|
|
1066
|
-
onClick: t[1] || (t[1] = (A) => a.draft ? y(
|
|
1066
|
+
onClick: t[1] || (t[1] = (A) => a.draft ? y(i).exportDraft(a.draft, l.value) : null)
|
|
1067
1067
|
})
|
|
1068
1068
|
]))
|
|
1069
1069
|
]),
|
|
@@ -1089,11 +1089,11 @@ const Ct = He(
|
|
|
1089
1089
|
key: `${A}`,
|
|
1090
1090
|
label: `${A}`,
|
|
1091
1091
|
selectable: "",
|
|
1092
|
-
selected:
|
|
1093
|
-
onClick: (L) =>
|
|
1092
|
+
selected: r[`${A}`],
|
|
1093
|
+
onClick: (L) => r[`${A}`] = !r[`${A}`]
|
|
1094
1094
|
}, {
|
|
1095
1095
|
default: Y(() => [
|
|
1096
|
-
|
|
1096
|
+
r[`${A}`] ? (x(), X(S, {
|
|
1097
1097
|
key: 0,
|
|
1098
1098
|
name: "check",
|
|
1099
1099
|
class: "text-white",
|
|
@@ -1103,8 +1103,8 @@ const Ct = He(
|
|
|
1103
1103
|
class: me([
|
|
1104
1104
|
"",
|
|
1105
1105
|
{
|
|
1106
|
-
"text-white fm-typo-en-body-md-600":
|
|
1107
|
-
"text-fm-color-typo-primary fm-typo-en-body-md-400": !
|
|
1106
|
+
"text-white fm-typo-en-body-md-600": r[`${A}`],
|
|
1107
|
+
"text-fm-color-typo-primary fm-typo-en-body-md-400": !r[`${A}`]
|
|
1108
1108
|
}
|
|
1109
1109
|
])
|
|
1110
1110
|
}, z(A), 3)
|
|
@@ -1175,7 +1175,7 @@ const Ct = He(
|
|
|
1175
1175
|
])
|
|
1176
1176
|
]),
|
|
1177
1177
|
o("div", aa, [
|
|
1178
|
-
_(
|
|
1178
|
+
_(u, {
|
|
1179
1179
|
variant: "outlined",
|
|
1180
1180
|
class: "py-12 px-16"
|
|
1181
1181
|
}, {
|
|
@@ -1223,9 +1223,9 @@ const Ct = He(
|
|
|
1223
1223
|
}), ca = { class: "flex-1 flex flex-col gap-8" }, ia = { class: "flex flex-col" }, ua = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, da = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ma = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, fa = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Aa = /* @__PURE__ */ ke({
|
|
1224
1224
|
__name: "ClosingDraftView",
|
|
1225
1225
|
setup(n) {
|
|
1226
|
-
const { t:
|
|
1226
|
+
const { t: s } = Ee(), { viewDraft: e } = _e(), { viewClosingDraftProps: d, viewClosingDraftShow: i } = pt(_e()), g = we(), h = Ct(), D = rt(), { breakpoints: l } = ft();
|
|
1227
1227
|
g.watchLocation(h.fetchDrafts);
|
|
1228
|
-
const R = H(() => h.loading), M = V(""), U = H(() => l.value.xs || l.value.sm),
|
|
1228
|
+
const R = H(() => h.loading), M = V(""), U = H(() => l.value.xs || l.value.sm), r = H(() => U.value ? 10 : 20);
|
|
1229
1229
|
function p(v) {
|
|
1230
1230
|
switch (v) {
|
|
1231
1231
|
case "refresh":
|
|
@@ -1237,13 +1237,13 @@ const Ct = He(
|
|
|
1237
1237
|
}
|
|
1238
1238
|
const b = H(() => U.value ? [
|
|
1239
1239
|
{
|
|
1240
|
-
label: "
|
|
1240
|
+
label: s("inventory.common.refresh"),
|
|
1241
1241
|
value: "refresh",
|
|
1242
1242
|
isPrimary: !1
|
|
1243
1243
|
}
|
|
1244
1244
|
] : [
|
|
1245
1245
|
{
|
|
1246
|
-
label: "
|
|
1246
|
+
label: s("inventory.common.refresh"),
|
|
1247
1247
|
value: "refresh",
|
|
1248
1248
|
isPrimary: !1
|
|
1249
1249
|
}
|
|
@@ -1252,7 +1252,7 @@ const Ct = He(
|
|
|
1252
1252
|
const N = E("FmTable");
|
|
1253
1253
|
return x(), T(q, null, [
|
|
1254
1254
|
_(lt, {
|
|
1255
|
-
title: y(
|
|
1255
|
+
title: y(s)("inventory.closing.draft.title"),
|
|
1256
1256
|
actions: b.value,
|
|
1257
1257
|
"onClick:action": p
|
|
1258
1258
|
}, {
|
|
@@ -1279,7 +1279,7 @@ const Ct = He(
|
|
|
1279
1279
|
"search-value": M.value,
|
|
1280
1280
|
loading: R.value,
|
|
1281
1281
|
onRowClick: F[1] || (F[1] = (C) => y(e)(C.original)),
|
|
1282
|
-
"page-size":
|
|
1282
|
+
"page-size": r.value
|
|
1283
1283
|
}, {
|
|
1284
1284
|
"list-row": Y((C) => [
|
|
1285
1285
|
_(it, {
|
|
@@ -1287,7 +1287,7 @@ const Ct = He(
|
|
|
1287
1287
|
onRowClick: (I) => y(e)(I)
|
|
1288
1288
|
}, {
|
|
1289
1289
|
default: Y((I) => {
|
|
1290
|
-
var w, Z, Q, K, se, ce, fe, ge, ee, te, J, pe, a, t, c, m,
|
|
1290
|
+
var w, Z, Q, K, se, ce, fe, ge, ee, te, J, pe, a, t, c, m, u, f, j, $;
|
|
1291
1291
|
return [
|
|
1292
1292
|
o("div", ca, [
|
|
1293
1293
|
o("div", ia, [
|
|
@@ -1316,7 +1316,7 @@ const Ct = He(
|
|
|
1316
1316
|
]),
|
|
1317
1317
|
o("div", null, [
|
|
1318
1318
|
_(y(he), {
|
|
1319
|
-
render: (f = (
|
|
1319
|
+
render: (f = (u = (m = I.status) == null ? void 0 : m.column) == null ? void 0 : u.columnDef) == null ? void 0 : f.cell,
|
|
1320
1320
|
props: ($ = (j = I.status) == null ? void 0 : j.getContext) == null ? void 0 : $.call(j)
|
|
1321
1321
|
}, null, 8, ["render", "props"])
|
|
1322
1322
|
])
|
|
@@ -1333,10 +1333,10 @@ const Ct = He(
|
|
|
1333
1333
|
_: 1
|
|
1334
1334
|
}, 8, ["title", "actions"]),
|
|
1335
1335
|
(x(), X(qe, { to: "body" }, [
|
|
1336
|
-
_(la, We(y(
|
|
1337
|
-
show: y(
|
|
1338
|
-
"onUpdate:show": F[2] || (F[2] = (C) => Te(
|
|
1339
|
-
onSubmitted: F[3] || (F[3] = () => (
|
|
1336
|
+
_(la, We(y(d), {
|
|
1337
|
+
show: y(i),
|
|
1338
|
+
"onUpdate:show": F[2] || (F[2] = (C) => Te(i) ? i.value = C : null),
|
|
1339
|
+
onSubmitted: F[3] || (F[3] = () => (i.value = !1, y(h).fetchDrafts()))
|
|
1340
1340
|
}), null, 16, ["show"])
|
|
1341
1341
|
]))
|
|
1342
1342
|
], 64);
|