@feedmepos/mf-inventory-portal 1.2.5 → 1.2.7-dev.1
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-BkpSG-20.js → App-Dg4euzi-.js} +1 -1
- package/dist/{ApprovalView-B7GuyNL8.js → ApprovalView-CPEajz8D.js} +50 -49
- package/dist/{BindingsDialog-DU7WwMQQ.js → BindingsDialog-D69Lz-W9.js} +2 -2
- package/dist/{BindingsPicker-DoikTRt9.js → BindingsPicker-CvM0o8k2.js} +1 -1
- package/dist/{BindingsTable-CR_HLrBt.js → BindingsTable-DX9KrKZx.js} +1 -1
- package/dist/{ClosingDraftView-B-zuhr0m.js → ClosingDraftView-zo2KEPba.js} +213 -213
- package/dist/{ClosingTemplateView-BXnzvooK.js → ClosingTemplateView-DfkfCFdy.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-BGii4E5k.js → DeliveryOrderPrintPreview-Cl_G1v2L.js} +8 -8
- package/dist/{FmAdminBadge-C7SFFAsw.js → FmAdminBadge--YYdqDeq.js} +1 -1
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BnxjX2Nv.js +230 -0
- package/dist/{FmMultiselectDialog-DxrZDApl.js → FmMultiselectDialog-CENHExht.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CG8hJ9BY.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DTfMfCVb.js} +15 -15
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CaW3WMvN.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-D65OfkW-.js} +1 -1
- package/dist/{IngredientGroupView-CZXIEHF9.js → IngredientGroupView-BBw9UqRf.js} +2 -2
- package/dist/{IngredientsView-BsD9bz4s.js → IngredientsView-WtOZ9Ara.js} +71 -61
- package/dist/{IntegrationView-BwZLCHKQ.js → IntegrationView-YFafrCnU.js} +84 -84
- package/dist/{InventoryBindingForm-D1DjZ8GU.js → InventoryBindingForm-DNljyNN-.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-977ZTGqB.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-C2dTKKAj.js} +3 -3
- package/dist/{InventoryBindingSummary-DzTHC4EA.js → InventoryBindingSummary-DOONgjR-.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CVjIweiD.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D3Elw6_K.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BOynbtg3.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CYiwHmvH.js} +7 -7
- package/dist/{PublishView-Qpnsfl9u.js → PublishView-CL5U8cyq.js} +7 -7
- package/dist/{PurchaseOrderPrintPreview-Cu0Huq0q.js → PurchaseOrderPrintPreview-PfG5JjNN.js} +8 -8
- package/dist/{ReceiveRequestView-4-0jJ5tI.js → ReceiveRequestView-DB-Df7af.js} +82 -79
- package/dist/{RecipeView-CkzCMbst.js → RecipeView-DYYehKGI.js} +3 -3
- package/dist/{StockView-C2GZw_2q.js → StockView-lbA_CgVg.js} +7 -7
- package/dist/{SupplierView-BMBCSjIF.js → SupplierView-DKq68lkF.js} +862 -831
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DKR568Dl.js +2578 -0
- package/dist/{TransferTemplateView-BpGi9pYo.js → TransferTemplateView-CYdVExkv.js} +57 -57
- package/dist/{UnitView-CyelRDgW.js → UnitView-BLDTNtXw.js} +3 -3
- package/dist/WarehouseView-ByfTvgQq.js +1066 -0
- package/dist/api/inventory.d.ts +8 -0
- package/dist/api/shipment.d.ts +11 -0
- package/dist/api/warehouse.d.ts +3 -1
- package/dist/{app-DLJ3tarV.js → app-DEpHnIaM.js} +13795 -13214
- package/dist/app.d.ts +24 -9
- package/dist/app.js +1 -1
- package/dist/{decimal-Y-vsqUV6.js → decimal-BdGG2NHb.js} +1 -1
- package/dist/{format-unit-display-52tZYV50.js → format-unit-display-DoCxmNPB.js} +21 -21
- package/dist/{index-PtOchBO2.js → index-BI2zM3ru.js} +1 -1
- package/dist/{index-Z9YSq95U.js → index-CCmaDOGB.js} +1 -1
- package/dist/{stock-CN530yZJ.js → stock-CtzGgdTO.js} +1 -1
- package/dist/stores/feature.d.ts +2 -0
- package/dist/stores/inventory.d.ts +1 -0
- package/dist/stores/location.d.ts +57 -1
- package/dist/stores/supplier.d.ts +96 -0
- package/dist/stores/warehouse.d.ts +4 -0
- package/dist/{supplier-B5VFlEyS.js → supplier-hiLnFx22.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CrLCvhtp.js → use-ingredient-select-dialog-BWBy-LTC.js} +1 -1
- package/dist/{use-inventory-binding-dialog-zoNELf20.js → use-inventory-binding-dialog-6H3lD9xF.js} +1 -1
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +60 -0
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +10 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +94 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +72 -1
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +8 -0
- package/dist/views/supplier/composables/use-supplier-table.d.ts +4 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +16 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -0
- package/package.json +2 -2
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CLSMS6lS.js +0 -227
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CNfrMUvj.js +0 -2494
- package/dist/WarehouseView-CB1LmtPm.js +0 -1034
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as Te, ref as H, computed as L, onMounted as Le, resolveComponent as P, openBlock as
|
|
2
|
-
import { a4 as lt, u as Ie, aq as E, ai as Ge, ar as qe, n as ct, Q as Ee, j as N, t as it, V as
|
|
3
|
-
import { useCoreStore as
|
|
4
|
-
import { useSnackbar as Ve, useDialog as _t, useProxiedModel as ht, components as
|
|
1
|
+
import { defineComponent as Te, ref as H, computed as L, onMounted as Le, resolveComponent as P, openBlock as w, createElementBlock as U, Fragment as J, createTextVNode as Z, createBlock as X, withCtx as O, createElementVNode as o, toDisplayString as W, unref as F, createVNode as k, createCommentVNode as ee, h as T, reactive as nt, watch as ot, isRef as Ye, normalizeClass as be, renderList as _e, normalizeStyle as Ke, Teleport as st, mergeProps as rt } from "vue";
|
|
2
|
+
import { a4 as lt, u as Ie, aq as E, ai as Ge, ar as qe, n as ct, Q as Ee, j as N, t as it, V as he, s as ut, v as dt, w as mt, as as We, at as Ze, ad as Je, au as re, aj as ft, a6 as Me, a5 as le, a1 as Ue, D as Oe, i as Se, h as pt, f as vt, a as yt, T as Fe, C as gt, _ as bt, E as At, G as Dt, J as je } from "./app-DEpHnIaM.js";
|
|
3
|
+
import { useCoreStore as kt, useI18n as Qe } from "@feedmepos/mf-common";
|
|
4
|
+
import { useSnackbar as Ve, useDialog as _t, useProxiedModel as ht, components as ge, useBreakpoints as xt } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as Xe, storeToRefs as wt } from "pinia";
|
|
6
|
-
import { a as He, u as et } from "./stock-
|
|
6
|
+
import { a as He, u as et } from "./stock-CtzGgdTO.js";
|
|
7
7
|
import { E as Ct } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
8
|
const Re = lt((l, s) => {
|
|
9
9
|
function e() {
|
|
@@ -39,7 +39,7 @@ const Re = lt((l, s) => {
|
|
|
39
39
|
onFinished: { type: Function }
|
|
40
40
|
},
|
|
41
41
|
setup(l) {
|
|
42
|
-
const s = l, e = H(), u = Re(), p = Ve(), _ = H(!1), m = H(null), R = H(!1),
|
|
42
|
+
const s = l, e = H(), u = Re(), p = Ve(), _ = H(!1), m = H(null), R = H(!1), C = L(() => {
|
|
43
43
|
switch (s.action) {
|
|
44
44
|
case E.enum.approveDraft:
|
|
45
45
|
return "Approve";
|
|
@@ -49,7 +49,7 @@ const Re = lt((l, s) => {
|
|
|
49
49
|
return "Mark as Failed";
|
|
50
50
|
}
|
|
51
51
|
throw new Error(`Unknown action: ${s.action}`);
|
|
52
|
-
}),
|
|
52
|
+
}), x = L(() => {
|
|
53
53
|
switch (s.action) {
|
|
54
54
|
case E.enum.approveDraft:
|
|
55
55
|
return "primary";
|
|
@@ -119,8 +119,8 @@ const Re = lt((l, s) => {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
return (n, a) => {
|
|
122
|
-
const j = P("FmLabel"), M = P("FmDatePicker"), f = P("FmTimePicker"), g = P("FmTextField"),
|
|
123
|
-
return R.value ? (
|
|
122
|
+
const j = P("FmLabel"), M = P("FmDatePicker"), f = P("FmTimePicker"), g = P("FmTextField"), b = P("FmButton"), $ = P("FmForm");
|
|
123
|
+
return R.value ? (w(), X($, {
|
|
124
124
|
key: 1,
|
|
125
125
|
onValidationSuccess: Y,
|
|
126
126
|
class: "flex flex-col gap-32",
|
|
@@ -129,32 +129,32 @@ const Re = lt((l, s) => {
|
|
|
129
129
|
default: O(() => [
|
|
130
130
|
o("div", St, [
|
|
131
131
|
a[4] || (a[4] = Z(" You are about to ")),
|
|
132
|
-
o("span", Ft, W(
|
|
132
|
+
o("span", Ft, W(C.value), 1),
|
|
133
133
|
a[5] || (a[5] = Z(" this draft. Please provide a remark to justify this action. "))
|
|
134
134
|
]),
|
|
135
|
-
n.action === F(E).enum.approveDraft ? (
|
|
136
|
-
|
|
135
|
+
n.action === F(E).enum.approveDraft ? (w(), U("div", jt, [
|
|
136
|
+
k(j, { class: "fm-typo-en-body-lg-600" }, {
|
|
137
137
|
default: O(() => a[6] || (a[6] = [
|
|
138
138
|
Z("Closing Date")
|
|
139
139
|
])),
|
|
140
140
|
_: 1
|
|
141
141
|
}),
|
|
142
|
-
|
|
142
|
+
k(M, {
|
|
143
143
|
modelValue: v.value,
|
|
144
144
|
"onUpdate:modelValue": a[0] || (a[0] = (V) => v.value = V)
|
|
145
145
|
}, null, 8, ["modelValue"]),
|
|
146
|
-
|
|
146
|
+
k(j, { class: "fm-typo-en-body-lg-600" }, {
|
|
147
147
|
default: O(() => a[7] || (a[7] = [
|
|
148
148
|
Z("Closing Time")
|
|
149
149
|
])),
|
|
150
150
|
_: 1
|
|
151
151
|
}),
|
|
152
|
-
|
|
152
|
+
k(f, {
|
|
153
153
|
modelValue: I.value,
|
|
154
154
|
"onUpdate:modelValue": a[1] || (a[1] = (V) => I.value = V)
|
|
155
155
|
}, null, 8, ["modelValue"])
|
|
156
156
|
])) : ee("", !0),
|
|
157
|
-
|
|
157
|
+
k(g, {
|
|
158
158
|
modelValue: e.value,
|
|
159
159
|
"onUpdate:modelValue": a[2] || (a[2] = (V) => e.value = V),
|
|
160
160
|
label: "Remark",
|
|
@@ -162,40 +162,40 @@ const Re = lt((l, s) => {
|
|
|
162
162
|
rules: [F(ct)()]
|
|
163
163
|
}, null, 8, ["modelValue", "rules"]),
|
|
164
164
|
o("div", Bt, [
|
|
165
|
-
|
|
165
|
+
k(b, {
|
|
166
166
|
label: "Cancel",
|
|
167
167
|
variant: "tertiary",
|
|
168
168
|
onClick: a[3] || (a[3] = (V) => n.onCancel())
|
|
169
169
|
}),
|
|
170
|
-
|
|
171
|
-
label:
|
|
170
|
+
k(b, {
|
|
171
|
+
label: C.value,
|
|
172
172
|
type: "submit",
|
|
173
|
-
variant:
|
|
173
|
+
variant: x.value,
|
|
174
174
|
loading: _.value
|
|
175
175
|
}, null, 8, ["label", "variant", "loading"])
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
178
|
_: 1
|
|
179
|
-
}, 8, ["disabled"])) : (
|
|
179
|
+
}, 8, ["disabled"])) : (w(), U(J, { key: 0 }, [
|
|
180
180
|
Z("Loading")
|
|
181
181
|
], 64));
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
}), $t =
|
|
184
|
+
}), $t = he(0);
|
|
185
185
|
function tt(l) {
|
|
186
186
|
const s = l.measurementsAmounts.groupBy((u) => u.measurement.id), e = l.sku.unit.measurements.reduce((u, p) => {
|
|
187
|
-
var R,
|
|
188
|
-
const _ = ((
|
|
187
|
+
var R, C;
|
|
188
|
+
const _ = ((C = (R = s.get(p.id)) == null ? void 0 : R[0]) == null ? void 0 : C.amount) ?? $t, m = Ee(p.conversion, _);
|
|
189
189
|
return u + +N(m);
|
|
190
190
|
}, +N(l.baseAmount));
|
|
191
191
|
return it(e, l.baseAmount.precision);
|
|
192
192
|
}
|
|
193
|
-
const Tt =
|
|
193
|
+
const Tt = he(0), It = he(100);
|
|
194
194
|
function Rt(l, s, e, u) {
|
|
195
195
|
const p = tt(l), _ = u ?? p, m = We(_, s), R = s.amount === 0 ? null : Ze(m, {
|
|
196
196
|
...s,
|
|
197
197
|
amount: Math.abs(s.amount)
|
|
198
|
-
}),
|
|
198
|
+
}), C = R ? Ee(R, It) : null;
|
|
199
199
|
return {
|
|
200
200
|
code: l.sku.code,
|
|
201
201
|
name: l.sku.name,
|
|
@@ -210,7 +210,7 @@ function Rt(l, s, e, u) {
|
|
|
210
210
|
systemBalance: +N(s),
|
|
211
211
|
physicalBalance: +N(_),
|
|
212
212
|
adjustedAmount: +N(m),
|
|
213
|
-
adjustedDiffPercentage:
|
|
213
|
+
adjustedDiffPercentage: C ? +N(Je(C, 2)) : null
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
function Pt(l) {
|
|
@@ -279,7 +279,7 @@ function Ut(l) {
|
|
|
279
279
|
];
|
|
280
280
|
}
|
|
281
281
|
function Lt(l, s, e) {
|
|
282
|
-
var M, f, g,
|
|
282
|
+
var M, f, g, b, $, V, te;
|
|
283
283
|
const u = s.groupBy(
|
|
284
284
|
(B) => B.id,
|
|
285
285
|
(B) => B.balance
|
|
@@ -295,7 +295,7 @@ function Lt(l, s, e) {
|
|
|
295
295
|
ce,
|
|
296
296
|
(de = p.get(B.sku._id)) == null ? void 0 : de[0]
|
|
297
297
|
);
|
|
298
|
-
}),
|
|
298
|
+
}), C = Mt(_), v = kt().currentBusiness.value, I = Ut(C), Y = [
|
|
299
299
|
["Business name:", v == null ? void 0 : v.name],
|
|
300
300
|
["Business ID:", v == null ? void 0 : v._id],
|
|
301
301
|
["Menu version", v == null ? void 0 : v.menuVersion],
|
|
@@ -306,7 +306,7 @@ function Lt(l, s, e) {
|
|
|
306
306
|
["Recent action", l.approvedAt ? "Approve" : l.rejectionHistory ? "Reject" : ""],
|
|
307
307
|
[
|
|
308
308
|
"Action by",
|
|
309
|
-
l.approvedAt ? (g = l.approvedBy) == null ? void 0 : g.name : l.rejectionHistory ? ($ = (
|
|
309
|
+
l.approvedAt ? (g = l.approvedBy) == null ? void 0 : g.name : l.rejectionHistory ? ($ = (b = l.rejectionHistory[0]) == null ? void 0 : b.rejectedBy) == null ? void 0 : $.name : ""
|
|
310
310
|
],
|
|
311
311
|
[
|
|
312
312
|
"Action at",
|
|
@@ -337,8 +337,8 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
337
337
|
if (s.draft.effectiveAt)
|
|
338
338
|
u.value = new Date(s.draft.effectiveAt);
|
|
339
339
|
else {
|
|
340
|
-
const
|
|
341
|
-
|
|
340
|
+
const C = new Date(s.draft.createdAt);
|
|
341
|
+
C.setHours(23, 59, 59, 999), u.value = C;
|
|
342
342
|
}
|
|
343
343
|
p.value = !0;
|
|
344
344
|
});
|
|
@@ -346,10 +346,10 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
346
346
|
get() {
|
|
347
347
|
return u.value === null ? "" : Ge(u.value);
|
|
348
348
|
},
|
|
349
|
-
set(
|
|
350
|
-
if (
|
|
351
|
-
const
|
|
352
|
-
|
|
349
|
+
set(C) {
|
|
350
|
+
if (C) {
|
|
351
|
+
const x = /* @__PURE__ */ new Date(`${C} ${m.value}`);
|
|
352
|
+
x.setSeconds(59, 999), u.value = x;
|
|
353
353
|
} else
|
|
354
354
|
u.value = null;
|
|
355
355
|
}
|
|
@@ -357,10 +357,10 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
357
357
|
get() {
|
|
358
358
|
return u.value === null ? "" : qe(u.value);
|
|
359
359
|
},
|
|
360
|
-
set(
|
|
361
|
-
if (
|
|
362
|
-
const
|
|
363
|
-
|
|
360
|
+
set(C) {
|
|
361
|
+
if (C) {
|
|
362
|
+
const x = /* @__PURE__ */ new Date(`${_.value} ${C}`);
|
|
363
|
+
x.setSeconds(59, 999), u.value = x;
|
|
364
364
|
} else
|
|
365
365
|
u.value = null;
|
|
366
366
|
}
|
|
@@ -368,16 +368,16 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
368
368
|
async function R() {
|
|
369
369
|
e.value = !0, s.onFinished(u.value.toISOString());
|
|
370
370
|
}
|
|
371
|
-
return (
|
|
371
|
+
return (C, x) => {
|
|
372
372
|
const v = P("FmLabel"), I = P("FmDatePicker"), Y = P("FmTimePicker"), n = P("FmButton"), a = P("FmForm");
|
|
373
|
-
return p.value ? (
|
|
373
|
+
return p.value ? (w(), X(a, {
|
|
374
374
|
key: 1,
|
|
375
375
|
onValidationSuccess: R,
|
|
376
376
|
class: "flex flex-col gap-32",
|
|
377
377
|
disabled: e.value
|
|
378
378
|
}, {
|
|
379
379
|
default: O(() => [
|
|
380
|
-
|
|
380
|
+
x[5] || (x[5] = o("div", { class: "fm-typo-en-body-lg-400" }, [
|
|
381
381
|
o("p", null, [
|
|
382
382
|
Z(" Performing "),
|
|
383
383
|
o("span", { class: "fm-typo-en-body-lg-600" }, '"Refresh Balance"'),
|
|
@@ -390,34 +390,34 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
390
390
|
])
|
|
391
391
|
], -1)),
|
|
392
392
|
o("div", Et, [
|
|
393
|
-
|
|
394
|
-
default: O(() =>
|
|
393
|
+
k(v, { class: "fm-typo-en-body-lg-600" }, {
|
|
394
|
+
default: O(() => x[3] || (x[3] = [
|
|
395
395
|
Z("Closing Date")
|
|
396
396
|
])),
|
|
397
397
|
_: 1
|
|
398
398
|
}),
|
|
399
|
-
|
|
399
|
+
k(I, {
|
|
400
400
|
modelValue: _.value,
|
|
401
|
-
"onUpdate:modelValue":
|
|
401
|
+
"onUpdate:modelValue": x[0] || (x[0] = (j) => _.value = j)
|
|
402
402
|
}, null, 8, ["modelValue"]),
|
|
403
|
-
|
|
404
|
-
default: O(() =>
|
|
403
|
+
k(v, { class: "fm-typo-en-body-lg-600" }, {
|
|
404
|
+
default: O(() => x[4] || (x[4] = [
|
|
405
405
|
Z("Closing Time")
|
|
406
406
|
])),
|
|
407
407
|
_: 1
|
|
408
408
|
}),
|
|
409
|
-
|
|
409
|
+
k(Y, {
|
|
410
410
|
modelValue: m.value,
|
|
411
|
-
"onUpdate:modelValue":
|
|
411
|
+
"onUpdate:modelValue": x[1] || (x[1] = (j) => m.value = j)
|
|
412
412
|
}, null, 8, ["modelValue"])
|
|
413
413
|
]),
|
|
414
414
|
o("div", Vt, [
|
|
415
|
-
|
|
415
|
+
k(n, {
|
|
416
416
|
label: "Cancel",
|
|
417
417
|
variant: "tertiary",
|
|
418
|
-
onClick:
|
|
418
|
+
onClick: x[2] || (x[2] = (j) => C.onCancel())
|
|
419
419
|
}),
|
|
420
|
-
|
|
420
|
+
k(n, {
|
|
421
421
|
label: "Refresh balance",
|
|
422
422
|
type: "submit",
|
|
423
423
|
variant: "primary",
|
|
@@ -426,7 +426,7 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
426
426
|
])
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
|
-
}, 8, ["disabled"])) : (
|
|
429
|
+
}, 8, ["disabled"])) : (w(), U(J, { key: 0 }, [
|
|
430
430
|
Z("Loading")
|
|
431
431
|
], 64));
|
|
432
432
|
};
|
|
@@ -435,14 +435,14 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
435
435
|
"closingDraftActions",
|
|
436
436
|
function() {
|
|
437
437
|
const s = _t(), e = Ve(), u = He(), p = Re(), _ = et(), m = H(!1), R = H();
|
|
438
|
-
function
|
|
438
|
+
function C(f) {
|
|
439
439
|
const g = {
|
|
440
440
|
draft: f
|
|
441
441
|
};
|
|
442
442
|
R.value = g, m.value = !0;
|
|
443
443
|
}
|
|
444
|
-
async function
|
|
445
|
-
var
|
|
444
|
+
async function x(f) {
|
|
445
|
+
var b;
|
|
446
446
|
if (f.status === re.enum.COMPLETED) {
|
|
447
447
|
const $ = f.closingAdjustmentId;
|
|
448
448
|
if (!$)
|
|
@@ -460,13 +460,13 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
460
460
|
costs: B.fromCostBalances
|
|
461
461
|
}));
|
|
462
462
|
} else
|
|
463
|
-
return await _.readStockBalance(), ((
|
|
463
|
+
return await _.readStockBalance(), ((b = _.stockBalance) == null ? void 0 : b.skus) ?? [];
|
|
464
464
|
}
|
|
465
|
-
async function v(f, g,
|
|
465
|
+
async function v(f, g, b) {
|
|
466
466
|
g || (e.open({
|
|
467
467
|
title: "Exporting",
|
|
468
468
|
message: "Fetching data..."
|
|
469
|
-
}), g = await
|
|
469
|
+
}), g = await x(f)), Lt(f, g, b ?? []);
|
|
470
470
|
}
|
|
471
471
|
function I(f, g) {
|
|
472
472
|
s.open({
|
|
@@ -527,14 +527,14 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
527
527
|
function j() {
|
|
528
528
|
m.value = !1;
|
|
529
529
|
}
|
|
530
|
-
async function M(f, g,
|
|
530
|
+
async function M(f, g, b) {
|
|
531
531
|
await s.open({
|
|
532
532
|
title: "Refresh balance",
|
|
533
533
|
contentComponent: Ht,
|
|
534
534
|
contentComponentProps: {
|
|
535
535
|
draft: f,
|
|
536
536
|
onFinished: ($) => {
|
|
537
|
-
s.close(),
|
|
537
|
+
s.close(), b == null || b($);
|
|
538
538
|
},
|
|
539
539
|
onCancel: async () => {
|
|
540
540
|
s.close(), g == null || g();
|
|
@@ -543,7 +543,7 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
545
|
return {
|
|
546
|
-
viewDraft:
|
|
546
|
+
viewDraft: C,
|
|
547
547
|
closeDraftDialog: j,
|
|
548
548
|
approveDraft: I,
|
|
549
549
|
rejectDraft: Y,
|
|
@@ -585,7 +585,7 @@ const Nt = Xe(
|
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
async function
|
|
588
|
+
async function C(n) {
|
|
589
589
|
if (!u.value.find((a) => a._id) && _._currentLocation) {
|
|
590
590
|
p.value = !0;
|
|
591
591
|
try {
|
|
@@ -601,7 +601,7 @@ const Nt = Xe(
|
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function x(n) {
|
|
605
605
|
u.value = u.value.map((a) => a._id === n._id ? {
|
|
606
606
|
...n,
|
|
607
607
|
_rev: a._rev
|
|
@@ -687,8 +687,8 @@ const Nt = Xe(
|
|
|
687
687
|
header: () => s("inventory.closing.table.status"),
|
|
688
688
|
enableSorting: !1,
|
|
689
689
|
cell(n) {
|
|
690
|
-
var
|
|
691
|
-
const a = n.row.original, j = a.status, M = new Date(a.updatedAt), f = (
|
|
690
|
+
var b;
|
|
691
|
+
const a = n.row.original, j = a.status, M = new Date(a.updatedAt), f = (b = a == null ? void 0 : a.rejectionHistory) == null ? void 0 : b.computeFirst(($) => $.rejectedAt), g = f ? new Date(f) : null;
|
|
692
692
|
return j === "DRAFT" && g ? g.getTime() > M.getTime() ? T(
|
|
693
693
|
"div",
|
|
694
694
|
{
|
|
@@ -770,8 +770,8 @@ const Nt = Xe(
|
|
|
770
770
|
drafts: u,
|
|
771
771
|
loading: p,
|
|
772
772
|
fetchDrafts: R,
|
|
773
|
-
loadDraft:
|
|
774
|
-
updateDraftRef:
|
|
773
|
+
loadDraft: C,
|
|
774
|
+
updateDraftRef: x
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
777
|
), zt = { class: "w-full flex flex-col gap-32" }, Ot = { class: "flex justify-between" }, Yt = { class: "flex" }, Kt = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, Gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qt = { class: "flex gap-1" }, Wt = { class: "fm-typo-en-body-lg-600" }, Zt = { class: "flex flex-col gap-16" }, Jt = { class: "flex items-center" }, Qt = {
|
|
@@ -804,7 +804,7 @@ const Nt = Xe(
|
|
|
804
804
|
}, ba = { class: "flex-1 flex flex-col items-center" }, Aa = {
|
|
805
805
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
806
806
|
name: "delivery details"
|
|
807
|
-
},
|
|
807
|
+
}, Da = { class: "flex flex-col gap-8" }, ka = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _a = { class: "flex flex-col gap-4" }, ha = { class: "flex gap-8" }, xa = /* @__PURE__ */ Te({
|
|
808
808
|
__name: "ClosingDraftDialog",
|
|
809
809
|
props: {
|
|
810
810
|
show: { type: Boolean },
|
|
@@ -812,12 +812,12 @@ const Nt = Xe(
|
|
|
812
812
|
},
|
|
813
813
|
emits: ["submitted", "refresh"],
|
|
814
814
|
setup(l, { emit: s }) {
|
|
815
|
-
const e = l, u = et(), p = $e(), _ = ht(e, "show"), m = H(!1), R = H(!1),
|
|
815
|
+
const e = l, u = et(), p = $e(), _ = ht(e, "show"), m = H(!1), R = H(!1), C = H(!1), x = H(new Array()), v = H(new Array()), I = He(), Y = Re(), n = Ve(), a = yt(), j = Ie(), M = nt({}), f = L(() => new Set(
|
|
816
816
|
a.skus.filter((r) => {
|
|
817
817
|
var t;
|
|
818
818
|
return M[(t = r.customAttributes) == null ? void 0 : t.tag];
|
|
819
819
|
}).map((r) => r._id)
|
|
820
|
-
)), g = s,
|
|
820
|
+
)), g = s, b = H({
|
|
821
821
|
templateItem: !0,
|
|
822
822
|
nonTemplateItem: !0
|
|
823
823
|
}), $ = L(() => {
|
|
@@ -834,13 +834,13 @@ const Nt = Xe(
|
|
|
834
834
|
Le(ce), ot(
|
|
835
835
|
() => e.show,
|
|
836
836
|
(r) => {
|
|
837
|
-
r && (se.value = ve[0], ce(),
|
|
837
|
+
r && (se.value = ve[0], ce(), b.value = {
|
|
838
838
|
templateItem: !0,
|
|
839
839
|
nonTemplateItem: !0
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
842
|
);
|
|
843
|
-
const B =
|
|
843
|
+
const B = he(0), Q = he(100);
|
|
844
844
|
async function ce() {
|
|
845
845
|
var t, y, d;
|
|
846
846
|
if (!j._currentLocation) return;
|
|
@@ -861,20 +861,20 @@ const Nt = Xe(
|
|
|
861
861
|
return;
|
|
862
862
|
}
|
|
863
863
|
const c = await I.readAdjustmentById(i), A = (c == null ? void 0 : c.skus) ?? [];
|
|
864
|
-
for (const
|
|
865
|
-
const
|
|
866
|
-
id:
|
|
867
|
-
balance:
|
|
868
|
-
costs:
|
|
869
|
-
},
|
|
870
|
-
id:
|
|
871
|
-
balance:
|
|
872
|
-
costs:
|
|
864
|
+
for (const h of A) {
|
|
865
|
+
const D = {
|
|
866
|
+
id: h.sku._id,
|
|
867
|
+
balance: h.fromBalance,
|
|
868
|
+
costs: h.fromCostBalances
|
|
869
|
+
}, q = {
|
|
870
|
+
id: h.sku._id,
|
|
871
|
+
balance: h.toBalance,
|
|
872
|
+
costs: h.toCostBalances
|
|
873
873
|
};
|
|
874
|
-
|
|
874
|
+
x.value.push(D), v.value.push(q);
|
|
875
875
|
}
|
|
876
876
|
} else
|
|
877
|
-
|
|
877
|
+
x.value = ((d = e.draft) == null ? void 0 : d.stockSnapshot) ?? [];
|
|
878
878
|
} catch (i) {
|
|
879
879
|
n.open({
|
|
880
880
|
title: "Something went wrong",
|
|
@@ -900,15 +900,15 @@ const Nt = Xe(
|
|
|
900
900
|
() => {
|
|
901
901
|
},
|
|
902
902
|
async (d) => {
|
|
903
|
-
var
|
|
903
|
+
var h;
|
|
904
904
|
R.value = !0;
|
|
905
|
-
const i = (
|
|
905
|
+
const i = (h = e.draft) == null ? void 0 : h._rev, c = 30, A = 2e3;
|
|
906
906
|
try {
|
|
907
907
|
await I.recalculation.scheduleCalculateStockSnapshotAtDate(d, e.draft._id);
|
|
908
|
-
let
|
|
909
|
-
for (let q = 0; q < c && (
|
|
908
|
+
let D = null;
|
|
909
|
+
for (let q = 0; q < c && (D = await Y.getDraft(e.draft._id).delayed(A), D._rev === i); q++)
|
|
910
910
|
;
|
|
911
|
-
if (!
|
|
911
|
+
if (!D || D._rev === i) {
|
|
912
912
|
n.open({
|
|
913
913
|
title: "Refresh failed",
|
|
914
914
|
message: "Failed to refresh stock balance. Please try again.",
|
|
@@ -916,17 +916,17 @@ const Nt = Xe(
|
|
|
916
916
|
}), console.error("error refreshing stock balances: there is no change in _rev");
|
|
917
917
|
return;
|
|
918
918
|
}
|
|
919
|
-
g("refresh",
|
|
919
|
+
g("refresh", D), x.value = D.stockSnapshot ?? [], n.open({
|
|
920
920
|
title: "Balance refreshed",
|
|
921
921
|
message: "Stock balance has been recalculated.",
|
|
922
922
|
type: "success"
|
|
923
923
|
});
|
|
924
|
-
} catch (
|
|
924
|
+
} catch (D) {
|
|
925
925
|
n.open({
|
|
926
926
|
title: "Refresh failed",
|
|
927
927
|
message: "Failed to refresh stock balance. Please try again.",
|
|
928
928
|
type: "error"
|
|
929
|
-
}), console.error("error refreshing stock balances",
|
|
929
|
+
}), console.error("error refreshing stock balances", D);
|
|
930
930
|
} finally {
|
|
931
931
|
R.value = !1;
|
|
932
932
|
}
|
|
@@ -934,14 +934,14 @@ const Nt = Xe(
|
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
936
|
const ue = L(
|
|
937
|
-
() =>
|
|
937
|
+
() => x.value.groupBy(
|
|
938
938
|
(r) => r.id,
|
|
939
939
|
(r) => r.balance
|
|
940
940
|
)
|
|
941
941
|
), de = L(() => $.value.groupBy((r) => r.sku._id));
|
|
942
942
|
function oe(r) {
|
|
943
943
|
return T(
|
|
944
|
-
|
|
944
|
+
ge.FmTooltip,
|
|
945
945
|
{ zIndex: 51, placement: "left", class: "w-full flex justify-end" },
|
|
946
946
|
{
|
|
947
947
|
default() {
|
|
@@ -953,7 +953,7 @@ const Nt = Xe(
|
|
|
953
953
|
}
|
|
954
954
|
);
|
|
955
955
|
}
|
|
956
|
-
const
|
|
956
|
+
const Ae = L(() => {
|
|
957
957
|
const r = V.value.reduce((y, d) => {
|
|
958
958
|
var i, c;
|
|
959
959
|
return Math.max(y, ((c = (i = te.value) == null ? void 0 : i.get(d._id)) == null ? void 0 : c[0].length) ?? 0);
|
|
@@ -988,7 +988,7 @@ const Nt = Xe(
|
|
|
988
988
|
)
|
|
989
989
|
]);
|
|
990
990
|
return T(
|
|
991
|
-
|
|
991
|
+
ge.FmTooltip,
|
|
992
992
|
{
|
|
993
993
|
zIndex: 51
|
|
994
994
|
},
|
|
@@ -1019,14 +1019,14 @@ const Nt = Xe(
|
|
|
1019
1019
|
},
|
|
1020
1020
|
header: () => oe("Actual balance"),
|
|
1021
1021
|
cell(y) {
|
|
1022
|
-
var
|
|
1022
|
+
var D;
|
|
1023
1023
|
const d = y.row.original, i = Fe.fromNumber(d.physicalBalance);
|
|
1024
1024
|
let c = !0, A = d.physicalBalance;
|
|
1025
|
-
const
|
|
1026
|
-
return
|
|
1025
|
+
const h = (D = v.value.find((q) => q.id === d.id)) == null ? void 0 : D.balance;
|
|
1026
|
+
return h && (Fe.equals({
|
|
1027
1027
|
a: i,
|
|
1028
|
-
b:
|
|
1029
|
-
}) || (c = !1, A = Number(Fe.toFormatString({ value:
|
|
1028
|
+
b: h
|
|
1029
|
+
}) || (c = !1, A = Number(Fe.toFormatString({ value: h })))), T("div", { class: "flex flex-col" }, [
|
|
1030
1030
|
T(
|
|
1031
1031
|
"span",
|
|
1032
1032
|
{ class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-primary" },
|
|
@@ -1066,13 +1066,13 @@ const Nt = Xe(
|
|
|
1066
1066
|
id: "adjustedDiffPercentage",
|
|
1067
1067
|
accessorKey: "adjustedDiffPercentage",
|
|
1068
1068
|
header: () => T(
|
|
1069
|
-
|
|
1069
|
+
ge.FmTooltip,
|
|
1070
1070
|
{ zIndex: 51, placement: "left", class: "w-full flex justify-end" },
|
|
1071
1071
|
{
|
|
1072
1072
|
default() {
|
|
1073
1073
|
return T("div", { class: "flex items-center gap-4" }, [
|
|
1074
1074
|
"Diff (%)",
|
|
1075
|
-
T(
|
|
1075
|
+
T(ge.FmIcon, { name: "info", color: "neutral-gray-400", size: "sm" })
|
|
1076
1076
|
]);
|
|
1077
1077
|
},
|
|
1078
1078
|
content() {
|
|
@@ -1089,7 +1089,7 @@ const Nt = Xe(
|
|
|
1089
1089
|
return T("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
|
|
1090
1090
|
const c = d > 0;
|
|
1091
1091
|
return T("div", { class: "flex items-center gap-4 justify-end" }, [
|
|
1092
|
-
T(
|
|
1092
|
+
T(ge.FmIcon, {
|
|
1093
1093
|
name: c ? "arrow_drop_up" : "arrow_drop_down",
|
|
1094
1094
|
color: c ? "system-success-300" : "system-error-300",
|
|
1095
1095
|
size: "md"
|
|
@@ -1106,8 +1106,8 @@ const Nt = Xe(
|
|
|
1106
1106
|
header: () => "Amounts",
|
|
1107
1107
|
enableSorting: !1,
|
|
1108
1108
|
cell(y) {
|
|
1109
|
-
const d = y.row.original, i = (A,
|
|
1110
|
-
|
|
1109
|
+
const d = y.row.original, i = (A, h) => T(
|
|
1110
|
+
ge.FmTooltip,
|
|
1111
1111
|
{ zIndex: 50 },
|
|
1112
1112
|
{
|
|
1113
1113
|
default() {
|
|
@@ -1124,21 +1124,21 @@ const Nt = Xe(
|
|
|
1124
1124
|
class: "text-fm-color-typo-secondary",
|
|
1125
1125
|
style: { maxWidth: "80px" }
|
|
1126
1126
|
},
|
|
1127
|
-
|
|
1127
|
+
h
|
|
1128
1128
|
)
|
|
1129
1129
|
]
|
|
1130
1130
|
);
|
|
1131
1131
|
},
|
|
1132
1132
|
content() {
|
|
1133
|
-
return `${A} ${
|
|
1133
|
+
return `${A} ${h}`;
|
|
1134
1134
|
}
|
|
1135
1135
|
}
|
|
1136
1136
|
);
|
|
1137
|
-
let c = Array.from({ length: r }).map((A,
|
|
1138
|
-
if (!d[`measurementAmount${
|
|
1137
|
+
let c = Array.from({ length: r }).map((A, h) => {
|
|
1138
|
+
if (!d[`measurementAmount${h}`])
|
|
1139
1139
|
return null;
|
|
1140
|
-
const
|
|
1141
|
-
return i(
|
|
1140
|
+
const D = d[`measurementAmount${h}`], q = d[`measurementAbbrev${h}`];
|
|
1141
|
+
return i(D, q);
|
|
1142
1142
|
}).filter((A) => A);
|
|
1143
1143
|
return (d.baseUnitAmount || !c.length) && (c = [i(d.baseUnitAmount, d.baseUnit), ...c]), T(
|
|
1144
1144
|
"div",
|
|
@@ -1153,7 +1153,7 @@ const Nt = Xe(
|
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
1155
|
];
|
|
1156
|
-
}),
|
|
1156
|
+
}), xe = L(() => Ae.value.map((r) => r.size ?? 0).reduce((r, t) => r + t)), fe = H(""), De = L(() => {
|
|
1157
1157
|
var y, d;
|
|
1158
1158
|
const r = ((d = (y = e.draft) == null ? void 0 : y.negativeStockItems) == null ? void 0 : d.reduce(
|
|
1159
1159
|
(i, c) => (i[c.sku._id] = c, i),
|
|
@@ -1175,15 +1175,15 @@ const Nt = Xe(
|
|
|
1175
1175
|
adjustedDiffPercentage: -100,
|
|
1176
1176
|
isTemplateItem: !r[i._id]
|
|
1177
1177
|
};
|
|
1178
|
-
const
|
|
1178
|
+
const h = tt(c), D = (K = (z = v.value) == null ? void 0 : z.find(
|
|
1179
1179
|
(G) => G.id === i._id
|
|
1180
1180
|
)) == null ? void 0 : K.balance, q = We(
|
|
1181
|
-
|
|
1181
|
+
D ?? h,
|
|
1182
1182
|
A
|
|
1183
|
-
),
|
|
1183
|
+
), we = A.amount === 0 ? null : Ze(q, {
|
|
1184
1184
|
...A,
|
|
1185
1185
|
amount: Math.abs(A.amount)
|
|
1186
|
-
}),
|
|
1186
|
+
}), ye = we ? Ee(we, Q) : null;
|
|
1187
1187
|
return {
|
|
1188
1188
|
id: i._id,
|
|
1189
1189
|
code: i.code,
|
|
@@ -1195,12 +1195,12 @@ const Nt = Xe(
|
|
|
1195
1195
|
return (ze = (me = (ne = te.value) == null ? void 0 : ne.get(i._id)) == null ? void 0 : me[0]) == null ? void 0 : ze.includes(G.measurement.id);
|
|
1196
1196
|
}).reduce((G, ne, me) => (G[`measurementAbbrev${me}`] = `(${ne.measurement.abbrev}) × ${N(ne.measurement.conversion)}`, G[`measurementAmount${me}`] = +N(ne.amount), G), {}),
|
|
1197
1197
|
systemBalance: +N(A),
|
|
1198
|
-
physicalBalance: +N(
|
|
1198
|
+
physicalBalance: +N(h),
|
|
1199
1199
|
adjustedAmount: +N(q),
|
|
1200
|
-
adjustedDiffPercentage:
|
|
1200
|
+
adjustedDiffPercentage: ye ? +N(Je(ye, 2)) : null,
|
|
1201
1201
|
isTemplateItem: !r[i._id]
|
|
1202
1202
|
};
|
|
1203
|
-
}).filter((i) => !!(i.isTemplateItem &&
|
|
1203
|
+
}).filter((i) => !!(i.isTemplateItem && b.value.templateItem || !i.isTemplateItem && b.value.nonTemplateItem));
|
|
1204
1204
|
}), pe = L(() => {
|
|
1205
1205
|
var t, y, d, i;
|
|
1206
1206
|
if (!e.draft) return [];
|
|
@@ -1271,7 +1271,7 @@ const Nt = Xe(
|
|
|
1271
1271
|
const r = ((d = e.draft) == null ? void 0 : d.activityLogs) ?? [], t = ((i = e.draft) == null ? void 0 : i.rejectionHistory) ?? [];
|
|
1272
1272
|
for (const A of t)
|
|
1273
1273
|
r.find(
|
|
1274
|
-
(
|
|
1274
|
+
(D) => `${D.action}_${D.performedAt}` == `${E.enum.rejectDraft}_${A.rejectedAt}`
|
|
1275
1275
|
) || r.push({
|
|
1276
1276
|
action: E.enum.rejectDraft,
|
|
1277
1277
|
performedAt: A.rejectedAt,
|
|
@@ -1279,16 +1279,16 @@ const Nt = Xe(
|
|
|
1279
1279
|
remark: A.rejectRemark
|
|
1280
1280
|
});
|
|
1281
1281
|
return (c = e.draft) != null && c.approvedAt && (r.find(
|
|
1282
|
-
(
|
|
1283
|
-
var
|
|
1284
|
-
return `${
|
|
1282
|
+
(h) => {
|
|
1283
|
+
var D;
|
|
1284
|
+
return `${h.action}_${h.performedAt}` == `${E.enum.approveDraft}_${(D = e.draft) == null ? void 0 : D.approvedAt}`;
|
|
1285
1285
|
}
|
|
1286
1286
|
) || r.push({
|
|
1287
1287
|
action: E.enum.approveDraft,
|
|
1288
1288
|
performedAt: e.draft.approvedAt,
|
|
1289
1289
|
performedBy: e.draft.approvedBy ?? { name: "Unknown", id: "unknown" },
|
|
1290
1290
|
remark: e.draft.approveRemark
|
|
1291
|
-
})), r.sort((A,
|
|
1291
|
+
})), r.sort((A, h) => new Date(h.performedAt).getTime() - new Date(A.performedAt).getTime()).map(
|
|
1292
1292
|
(A) => ({
|
|
1293
1293
|
header: Ue(A.action),
|
|
1294
1294
|
date: le(A.performedAt),
|
|
@@ -1304,19 +1304,19 @@ const Nt = Xe(
|
|
|
1304
1304
|
]
|
|
1305
1305
|
})
|
|
1306
1306
|
);
|
|
1307
|
-
}),
|
|
1308
|
-
var i, c, A,
|
|
1307
|
+
}), ke = L(() => {
|
|
1308
|
+
var i, c, A, h;
|
|
1309
1309
|
if ((i = e == null ? void 0 : e.draft) != null && i.approvedAt) return "Draft is already approved.";
|
|
1310
1310
|
if (((c = e.draft) == null ? void 0 : c.status) !== re.enum.DRAFT) return "Status is not draft.";
|
|
1311
|
-
const r = De.value.some((
|
|
1311
|
+
const r = De.value.some((D) => D.physicalBalance < 0), t = ((h = (A = u.stockBalance.skus) == null ? void 0 : A.filter((D) => D.balance.amount < 0)) == null ? void 0 : h.map((D) => D.id)) ?? [], y = new Set(V.value.map((D) => D._id)), d = t.filter((D) => !y.has(D)).length;
|
|
1312
1312
|
return [
|
|
1313
1313
|
r ? "Negative total exist." : null,
|
|
1314
1314
|
d ? "Negative stock is not included in this draft. Reopen draft in POS and apply changes." : null
|
|
1315
|
-
].filter((
|
|
1315
|
+
].filter((D) => D).join(" ");
|
|
1316
1316
|
});
|
|
1317
1317
|
return (r, t) => {
|
|
1318
|
-
const y = P("FmButtonGroup"), d = P("FmMenuDivider"), i = P("FmCard"), c = P("FmButton"), A = P("FmCircularProgress"),
|
|
1319
|
-
return
|
|
1318
|
+
const y = P("FmButtonGroup"), d = P("FmMenuDivider"), i = P("FmCard"), c = P("FmButton"), A = P("FmCircularProgress"), h = P("FmChip"), D = P("FmTextField"), q = P("FmIcon"), we = P("FmTable"), ye = P("FmSpacer"), Ne = P("FmTooltip"), Ce = P("FmSideSheet");
|
|
1319
|
+
return w(), X(Ce, {
|
|
1320
1320
|
"dismiss-away": "",
|
|
1321
1321
|
"max-width": 9999,
|
|
1322
1322
|
"model-value": F(_),
|
|
@@ -1327,16 +1327,16 @@ const Nt = Xe(
|
|
|
1327
1327
|
var S, z, K, G;
|
|
1328
1328
|
return [
|
|
1329
1329
|
o("div", ha, [
|
|
1330
|
-
((S = e.draft) == null ? void 0 : S.status) === F(re).enum.DRAFT ? (
|
|
1331
|
-
|
|
1330
|
+
((S = e.draft) == null ? void 0 : S.status) === F(re).enum.DRAFT ? (w(), U(J, { key: 0 }, [
|
|
1331
|
+
ke.value ? (w(), X(Ne, {
|
|
1332
1332
|
key: 0,
|
|
1333
1333
|
"z-index": 51
|
|
1334
1334
|
}, {
|
|
1335
1335
|
content: O(() => [
|
|
1336
|
-
Z(W(
|
|
1336
|
+
Z(W(ke.value), 1)
|
|
1337
1337
|
]),
|
|
1338
1338
|
default: O(() => [
|
|
1339
|
-
|
|
1339
|
+
k(c, {
|
|
1340
1340
|
disabled: "",
|
|
1341
1341
|
key: "approve key",
|
|
1342
1342
|
label: "Approve",
|
|
@@ -1344,29 +1344,29 @@ const Nt = Xe(
|
|
|
1344
1344
|
})
|
|
1345
1345
|
]),
|
|
1346
1346
|
_: 1
|
|
1347
|
-
})) : (
|
|
1347
|
+
})) : (w(), X(c, {
|
|
1348
1348
|
key: "approve key",
|
|
1349
1349
|
label: "Approve",
|
|
1350
1350
|
onClick: t[6] || (t[6] = () => e.draft && F(p).approveDraft(e.draft, () => g("submitted")))
|
|
1351
1351
|
}))
|
|
1352
1352
|
], 64)) : ee("", !0),
|
|
1353
|
-
((z = e.draft) == null ? void 0 : z.status) === F(re).enum.DRAFT ? (
|
|
1353
|
+
((z = e.draft) == null ? void 0 : z.status) === F(re).enum.DRAFT ? (w(), X(c, {
|
|
1354
1354
|
key: 1,
|
|
1355
1355
|
label: "Reject",
|
|
1356
1356
|
variant: "destructive",
|
|
1357
1357
|
onClick: t[7] || (t[7] = () => e.draft && F(p).rejectDraft(e.draft, () => g("submitted")))
|
|
1358
1358
|
})) : ee("", !0),
|
|
1359
|
-
(K = e.draft) != null && K.approvedAt && ((G = e.draft) == null ? void 0 : G.status) !== F(re).enum.COMPLETED ? (
|
|
1359
|
+
(K = e.draft) != null && K.approvedAt && ((G = e.draft) == null ? void 0 : G.status) !== F(re).enum.COMPLETED ? (w(), X(c, {
|
|
1360
1360
|
key: 2,
|
|
1361
1361
|
label: "Sync",
|
|
1362
|
-
loading:
|
|
1362
|
+
loading: C.value,
|
|
1363
1363
|
onClick: t[8] || (t[8] = () => {
|
|
1364
|
-
e.draft && (
|
|
1365
|
-
|
|
1364
|
+
e.draft && (C.value = !0, F(p).syncDraft(e.draft, () => {
|
|
1365
|
+
C.value = !1, g("submitted");
|
|
1366
1366
|
}));
|
|
1367
1367
|
})
|
|
1368
1368
|
}, null, 8, ["loading"])) : ee("", !0),
|
|
1369
|
-
|
|
1369
|
+
k(c, {
|
|
1370
1370
|
label: "Close",
|
|
1371
1371
|
variant: "tertiary",
|
|
1372
1372
|
onClick: t[9] || (t[9] = (ne) => _.value = !1)
|
|
@@ -1377,14 +1377,14 @@ const Nt = Xe(
|
|
|
1377
1377
|
default: O(() => [
|
|
1378
1378
|
o("div", zt, [
|
|
1379
1379
|
o("div", null, [
|
|
1380
|
-
|
|
1380
|
+
k(y, {
|
|
1381
1381
|
items: ve,
|
|
1382
1382
|
modelValue: se.value,
|
|
1383
1383
|
"onUpdate:modelValue": t[0] || (t[0] = (S) => se.value = S)
|
|
1384
1384
|
}, null, 8, ["modelValue"])
|
|
1385
1385
|
]),
|
|
1386
|
-
se.value.value === "overview" ? (
|
|
1387
|
-
|
|
1386
|
+
se.value.value === "overview" ? (w(), U(J, { key: 0 }, [
|
|
1387
|
+
k(i, {
|
|
1388
1388
|
variant: "outlined",
|
|
1389
1389
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1390
1390
|
}, {
|
|
@@ -1395,13 +1395,13 @@ const Nt = Xe(
|
|
|
1395
1395
|
t[11] || (t[11] = o("div", { class: "fm-typo-en-body-lg-600" }, "Closing summary", -1)),
|
|
1396
1396
|
o("div", Yt, [
|
|
1397
1397
|
o("div", {
|
|
1398
|
-
class:
|
|
1398
|
+
class: be(["fm-status-badge", F(Be)(((S = r.draft) == null ? void 0 : S.status) ?? "DRAFT")])
|
|
1399
1399
|
}, W(F(Ue)(((z = r.draft) == null ? void 0 : z.status) ?? "")), 3)
|
|
1400
1400
|
])
|
|
1401
1401
|
]),
|
|
1402
|
-
|
|
1402
|
+
k(d),
|
|
1403
1403
|
o("div", Kt, [
|
|
1404
|
-
(
|
|
1404
|
+
(w(!0), U(J, null, _e(pe.value, (K, G) => (w(), U("div", {
|
|
1405
1405
|
class: "flex flex-col gap-4",
|
|
1406
1406
|
key: G
|
|
1407
1407
|
}, [
|
|
@@ -1418,8 +1418,8 @@ const Nt = Xe(
|
|
|
1418
1418
|
o("div", Zt, [
|
|
1419
1419
|
o("div", Jt, [
|
|
1420
1420
|
t[12] || (t[12] = o("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
|
|
1421
|
-
m.value ? ee("", !0) : (
|
|
1422
|
-
r.draft && r.draft.status !== F(re).enum.COMPLETED ? (
|
|
1421
|
+
m.value ? ee("", !0) : (w(), U("div", Qt, [
|
|
1422
|
+
r.draft && r.draft.status !== F(re).enum.COMPLETED ? (w(), X(c, {
|
|
1423
1423
|
key: 0,
|
|
1424
1424
|
label: "Refresh balance",
|
|
1425
1425
|
"prepend-icon": "refresh",
|
|
@@ -1430,7 +1430,7 @@ const Nt = Xe(
|
|
|
1430
1430
|
loading: R.value,
|
|
1431
1431
|
onClick: ie
|
|
1432
1432
|
}, null, 8, ["loading"])) : ee("", !0),
|
|
1433
|
-
|
|
1433
|
+
k(c, {
|
|
1434
1434
|
label: "Export data",
|
|
1435
1435
|
"prepend-icon": "download",
|
|
1436
1436
|
variant: "secondary",
|
|
@@ -1439,43 +1439,43 @@ const Nt = Xe(
|
|
|
1439
1439
|
"border-color": "primary",
|
|
1440
1440
|
onClick: t[1] || (t[1] = (S) => r.draft ? F(p).exportDraft(
|
|
1441
1441
|
r.draft,
|
|
1442
|
-
|
|
1442
|
+
x.value,
|
|
1443
1443
|
v.value
|
|
1444
1444
|
) : null)
|
|
1445
1445
|
})
|
|
1446
1446
|
]))
|
|
1447
1447
|
]),
|
|
1448
|
-
m.value ? (
|
|
1448
|
+
m.value ? (w(), U("div", Xt, [
|
|
1449
1449
|
t[14] || (t[14] = o("div", { class: "h-80" }, null, -1)),
|
|
1450
1450
|
o("div", ea, [
|
|
1451
1451
|
o("div", null, [
|
|
1452
|
-
|
|
1452
|
+
k(A, { size: "md" })
|
|
1453
1453
|
]),
|
|
1454
1454
|
t[13] || (t[13] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
|
|
1455
1455
|
]),
|
|
1456
1456
|
t[15] || (t[15] = o("div", { class: "h-80" }, null, -1))
|
|
1457
|
-
])) : (
|
|
1457
|
+
])) : (w(), U(J, { key: 1 }, [
|
|
1458
1458
|
o("div", ta, [
|
|
1459
1459
|
o("div", aa, [
|
|
1460
|
-
|
|
1460
|
+
k(h, {
|
|
1461
1461
|
label: "Template Item(s)",
|
|
1462
|
-
selected:
|
|
1463
|
-
onClick: t[2] || (t[2] = (S) =>
|
|
1462
|
+
selected: b.value.templateItem,
|
|
1463
|
+
onClick: t[2] || (t[2] = (S) => b.value.templateItem = !b.value.templateItem)
|
|
1464
1464
|
}, null, 8, ["selected"]),
|
|
1465
|
-
|
|
1465
|
+
k(h, {
|
|
1466
1466
|
label: "Non-template Item(s)",
|
|
1467
|
-
selected:
|
|
1468
|
-
onClick: t[3] || (t[3] = (S) =>
|
|
1467
|
+
selected: b.value.nonTemplateItem,
|
|
1468
|
+
onClick: t[3] || (t[3] = (S) => b.value.nonTemplateItem = !b.value.nonTemplateItem)
|
|
1469
1469
|
}, null, 8, ["selected"])
|
|
1470
1470
|
]),
|
|
1471
|
-
D
|
|
1471
|
+
k(D, {
|
|
1472
1472
|
modelValue: fe.value,
|
|
1473
1473
|
"onUpdate:modelValue": t[4] || (t[4] = (S) => fe.value = S),
|
|
1474
1474
|
placeholder: "Filter items"
|
|
1475
1475
|
}, null, 8, ["modelValue"])
|
|
1476
1476
|
]),
|
|
1477
|
-
F(a).skuTags.size ? (
|
|
1478
|
-
(
|
|
1477
|
+
F(a).skuTags.size ? (w(), U("div", na, [
|
|
1478
|
+
(w(!0), U(J, null, _e(F(a).skuTags.keys(), (S) => (w(), X(h, {
|
|
1479
1479
|
key: `${S}`,
|
|
1480
1480
|
label: `${S}`,
|
|
1481
1481
|
selectable: "",
|
|
@@ -1483,14 +1483,14 @@ const Nt = Xe(
|
|
|
1483
1483
|
onClick: (z) => M[`${S}`] = !M[`${S}`]
|
|
1484
1484
|
}, {
|
|
1485
1485
|
default: O(() => [
|
|
1486
|
-
M[`${S}`] ? (
|
|
1486
|
+
M[`${S}`] ? (w(), X(q, {
|
|
1487
1487
|
key: 0,
|
|
1488
1488
|
name: "check",
|
|
1489
1489
|
class: "text-white",
|
|
1490
1490
|
size: "sm"
|
|
1491
1491
|
})) : ee("", !0),
|
|
1492
1492
|
o("span", {
|
|
1493
|
-
class:
|
|
1493
|
+
class: be([
|
|
1494
1494
|
"",
|
|
1495
1495
|
{
|
|
1496
1496
|
"text-white fm-typo-en-body-md-600": M[`${S}`],
|
|
@@ -1504,10 +1504,10 @@ const Nt = Xe(
|
|
|
1504
1504
|
])) : ee("", !0),
|
|
1505
1505
|
o("div", oa, [
|
|
1506
1506
|
o("div", {
|
|
1507
|
-
style: Ke({ minWidth: `${
|
|
1507
|
+
style: Ke({ minWidth: `${xe.value}px` })
|
|
1508
1508
|
}, [
|
|
1509
|
-
|
|
1510
|
-
"column-defs":
|
|
1509
|
+
k(we, {
|
|
1510
|
+
"column-defs": Ae.value,
|
|
1511
1511
|
"row-data": De.value,
|
|
1512
1512
|
"search-value": fe.value
|
|
1513
1513
|
}, null, 8, ["column-defs", "row-data", "search-value"])
|
|
@@ -1516,14 +1516,14 @@ const Nt = Xe(
|
|
|
1516
1516
|
], 64))
|
|
1517
1517
|
])
|
|
1518
1518
|
], 64)) : ee("", !0),
|
|
1519
|
-
se.value.value === "history" ? (
|
|
1520
|
-
ae.value.length ? (
|
|
1521
|
-
(
|
|
1519
|
+
se.value.value === "history" ? (w(), U("div", sa, [
|
|
1520
|
+
ae.value.length ? (w(), U("div", ca, [
|
|
1521
|
+
(w(!0), U(J, null, _e(ae.value, (S, z) => (w(), U(J, { key: z }, [
|
|
1522
1522
|
o("div", ia, [
|
|
1523
1523
|
o("div", ua, [
|
|
1524
1524
|
o("div", da, [
|
|
1525
1525
|
o("div", {
|
|
1526
|
-
class:
|
|
1526
|
+
class: be([
|
|
1527
1527
|
{
|
|
1528
1528
|
"bg-fm-color-primary": z !== 0,
|
|
1529
1529
|
"bg-white": z === 0
|
|
@@ -1535,7 +1535,7 @@ const Nt = Xe(
|
|
|
1535
1535
|
t[18] || (t[18] = o("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
1536
1536
|
o("div", ma, [
|
|
1537
1537
|
o("div", {
|
|
1538
|
-
class:
|
|
1538
|
+
class: be([
|
|
1539
1539
|
{
|
|
1540
1540
|
"bg-fm-color-primary": z < ae.value.length - 1,
|
|
1541
1541
|
"bg-white": z >= ae.value.length - 1
|
|
@@ -1554,7 +1554,7 @@ const Nt = Xe(
|
|
|
1554
1554
|
o("div", ga, [
|
|
1555
1555
|
o("div", ba, [
|
|
1556
1556
|
o("div", {
|
|
1557
|
-
class:
|
|
1557
|
+
class: be([
|
|
1558
1558
|
{
|
|
1559
1559
|
"bg-fm-color-primary": z < ae.value.length - 1,
|
|
1560
1560
|
"bg-white": z >= ae.value.length - 1
|
|
@@ -1565,19 +1565,19 @@ const Nt = Xe(
|
|
|
1565
1565
|
])
|
|
1566
1566
|
]),
|
|
1567
1567
|
o("div", Aa, [
|
|
1568
|
-
|
|
1568
|
+
k(i, {
|
|
1569
1569
|
variant: "outlined",
|
|
1570
1570
|
class: "py-12 px-16"
|
|
1571
1571
|
}, {
|
|
1572
1572
|
default: O(() => [
|
|
1573
|
-
o("div",
|
|
1574
|
-
(
|
|
1573
|
+
o("div", Da, [
|
|
1574
|
+
(w(!0), U(J, null, _e(S.info, (K, G) => (w(), U("div", {
|
|
1575
1575
|
key: G,
|
|
1576
1576
|
class: "flex flex-col gap-4"
|
|
1577
1577
|
}, [
|
|
1578
|
-
o("div",
|
|
1578
|
+
o("div", ka, W(K == null ? void 0 : K.label), 1),
|
|
1579
1579
|
o("div", _a, [
|
|
1580
|
-
(
|
|
1580
|
+
(w(!0), U(J, null, _e(K == null ? void 0 : K.values, (ne, me) => (w(), U("div", {
|
|
1581
1581
|
key: me,
|
|
1582
1582
|
class: "fm-typo-en-body-lg-600"
|
|
1583
1583
|
}, W(ne), 1))), 128))
|
|
@@ -1590,8 +1590,8 @@ const Nt = Xe(
|
|
|
1590
1590
|
])
|
|
1591
1591
|
])
|
|
1592
1592
|
], 64))), 128))
|
|
1593
|
-
])) : (
|
|
1594
|
-
|
|
1593
|
+
])) : (w(), U("div", ra, [
|
|
1594
|
+
k(ye),
|
|
1595
1595
|
o("div", null, [
|
|
1596
1596
|
o("img", {
|
|
1597
1597
|
src: F(Ct),
|
|
@@ -1600,8 +1600,8 @@ const Nt = Xe(
|
|
|
1600
1600
|
]),
|
|
1601
1601
|
t[16] || (t[16] = o("div", { class: "fm-typo-en-body-lg-600" }, W("No records found"), -1)),
|
|
1602
1602
|
t[17] || (t[17] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, W("You can track approval and rejection history here"), -1)),
|
|
1603
|
-
|
|
1604
|
-
|
|
1603
|
+
k(ye),
|
|
1604
|
+
k(ye)
|
|
1605
1605
|
]))
|
|
1606
1606
|
])) : ee("", !0)
|
|
1607
1607
|
])
|
|
@@ -1613,9 +1613,9 @@ const Nt = Xe(
|
|
|
1613
1613
|
}), wa = { class: "flex-1 flex flex-col gap-8" }, Ca = { class: "flex flex-col" }, Sa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fa = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ja = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Ba = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, La = /* @__PURE__ */ Te({
|
|
1614
1614
|
__name: "ClosingDraftView",
|
|
1615
1615
|
setup(l) {
|
|
1616
|
-
const { t: s } = Qe(), { viewDraft: e } = $e(), { viewClosingDraftProps: u, viewClosingDraftShow: p } = wt($e()), _ = Ie(), m = Nt(), R = gt(), { breakpoints:
|
|
1616
|
+
const { t: s } = Qe(), { viewDraft: e } = $e(), { viewClosingDraftProps: u, viewClosingDraftShow: p } = wt($e()), _ = Ie(), m = Nt(), R = gt(), { breakpoints: C } = xt();
|
|
1617
1617
|
_.watchLocation(m.fetchDrafts);
|
|
1618
|
-
const
|
|
1618
|
+
const x = L(() => m.loading), v = H(""), I = L(() => C.value.xs || C.value.sm), Y = L(() => I.value ? 10 : 20);
|
|
1619
1619
|
function n(M) {
|
|
1620
1620
|
switch (M) {
|
|
1621
1621
|
case "refresh":
|
|
@@ -1640,15 +1640,15 @@ const Nt = Xe(
|
|
|
1640
1640
|
]);
|
|
1641
1641
|
return (M, f) => {
|
|
1642
1642
|
const g = P("FmTable");
|
|
1643
|
-
return
|
|
1644
|
-
|
|
1643
|
+
return w(), U(J, null, [
|
|
1644
|
+
k(bt, {
|
|
1645
1645
|
title: F(s)("inventory.closing.draft.title"),
|
|
1646
1646
|
actions: j.value,
|
|
1647
1647
|
"onClick:action": n
|
|
1648
1648
|
}, {
|
|
1649
1649
|
default: O(() => [
|
|
1650
1650
|
o("div", {
|
|
1651
|
-
class:
|
|
1651
|
+
class: be([
|
|
1652
1652
|
"flex flex-col gap-8 max-h-full",
|
|
1653
1653
|
{
|
|
1654
1654
|
"p-0": I.value,
|
|
@@ -1656,57 +1656,57 @@ const Nt = Xe(
|
|
|
1656
1656
|
}
|
|
1657
1657
|
])
|
|
1658
1658
|
}, [
|
|
1659
|
-
|
|
1659
|
+
k(At, {
|
|
1660
1660
|
"change-location": "",
|
|
1661
1661
|
searchable: "",
|
|
1662
1662
|
search: v.value,
|
|
1663
|
-
"onUpdate:search": f[0] || (f[0] = (
|
|
1663
|
+
"onUpdate:search": f[0] || (f[0] = (b) => v.value = b)
|
|
1664
1664
|
}, null, 8, ["search"]),
|
|
1665
|
-
|
|
1665
|
+
k(g, {
|
|
1666
1666
|
style: Ke(F(R).tableHeight),
|
|
1667
1667
|
"column-defs": F(m).columnDefs,
|
|
1668
1668
|
"row-data": F(m).drafts,
|
|
1669
1669
|
"search-value": v.value,
|
|
1670
|
-
loading:
|
|
1671
|
-
onRowClick: f[1] || (f[1] = (
|
|
1670
|
+
loading: x.value,
|
|
1671
|
+
onRowClick: f[1] || (f[1] = (b) => F(e)(b.original)),
|
|
1672
1672
|
"page-size": Y.value
|
|
1673
1673
|
}, {
|
|
1674
|
-
"list-row": O((
|
|
1675
|
-
|
|
1676
|
-
row:
|
|
1674
|
+
"list-row": O((b) => [
|
|
1675
|
+
k(Dt, {
|
|
1676
|
+
row: b,
|
|
1677
1677
|
onRowClick: ($) => F(e)($)
|
|
1678
1678
|
}, {
|
|
1679
1679
|
default: O(($) => {
|
|
1680
|
-
var V, te, B, Q, ce, ie, ue, de, oe,
|
|
1680
|
+
var V, te, B, Q, ce, ie, ue, de, oe, Ae, xe, fe, De, pe, ve, se, ae, ke, r, t;
|
|
1681
1681
|
return [
|
|
1682
1682
|
o("div", wa, [
|
|
1683
1683
|
o("div", Ca, [
|
|
1684
1684
|
o("div", Sa, [
|
|
1685
|
-
|
|
1685
|
+
k(F(je), {
|
|
1686
1686
|
render: (B = (te = (V = $._id) == null ? void 0 : V.column) == null ? void 0 : te.columnDef) == null ? void 0 : B.cell,
|
|
1687
1687
|
props: (ce = (Q = $._id) == null ? void 0 : Q.getContext) == null ? void 0 : ce.call(Q)
|
|
1688
1688
|
}, null, 8, ["render", "props"])
|
|
1689
1689
|
]),
|
|
1690
1690
|
o("div", Fa, [
|
|
1691
|
-
|
|
1691
|
+
k(F(je), {
|
|
1692
1692
|
render: (de = (ue = (ie = $.name) == null ? void 0 : ie.column) == null ? void 0 : ue.columnDef) == null ? void 0 : de.cell,
|
|
1693
|
-
props: (
|
|
1693
|
+
props: (Ae = (oe = $.name) == null ? void 0 : oe.getContext) == null ? void 0 : Ae.call(oe)
|
|
1694
1694
|
}, null, 8, ["render", "props"])
|
|
1695
1695
|
]),
|
|
1696
1696
|
o("div", ja, W([
|
|
1697
|
-
...
|
|
1698
|
-
...
|
|
1697
|
+
...b.original.items.slice(0, 3).map((y) => y.sku.name),
|
|
1698
|
+
...b.original.items.length >= 3 ? [`and ${b.original.items.length - 3} more items`] : []
|
|
1699
1699
|
].join(", ")), 1),
|
|
1700
1700
|
o("div", Ba, [
|
|
1701
|
-
|
|
1702
|
-
render: (De = (fe = (
|
|
1701
|
+
k(F(je), {
|
|
1702
|
+
render: (De = (fe = (xe = $.ref) == null ? void 0 : xe.column) == null ? void 0 : fe.columnDef) == null ? void 0 : De.cell,
|
|
1703
1703
|
props: (ve = (pe = $.ref) == null ? void 0 : pe.getContext) == null ? void 0 : ve.call(pe)
|
|
1704
1704
|
}, null, 8, ["render", "props"])
|
|
1705
1705
|
])
|
|
1706
1706
|
]),
|
|
1707
1707
|
o("div", null, [
|
|
1708
|
-
|
|
1709
|
-
render: (
|
|
1708
|
+
k(F(je), {
|
|
1709
|
+
render: (ke = (ae = (se = $.status) == null ? void 0 : se.column) == null ? void 0 : ae.columnDef) == null ? void 0 : ke.cell,
|
|
1710
1710
|
props: (t = (r = $.status) == null ? void 0 : r.getContext) == null ? void 0 : t.call(r)
|
|
1711
1711
|
}, null, 8, ["render", "props"])
|
|
1712
1712
|
])
|
|
@@ -1722,12 +1722,12 @@ const Nt = Xe(
|
|
|
1722
1722
|
]),
|
|
1723
1723
|
_: 1
|
|
1724
1724
|
}, 8, ["title", "actions"]),
|
|
1725
|
-
(
|
|
1726
|
-
|
|
1725
|
+
(w(), X(st, { to: "body" }, [
|
|
1726
|
+
k(xa, rt(F(u), {
|
|
1727
1727
|
show: F(p),
|
|
1728
|
-
"onUpdate:show": f[2] || (f[2] = (
|
|
1728
|
+
"onUpdate:show": f[2] || (f[2] = (b) => Ye(p) ? p.value = b : null),
|
|
1729
1729
|
onSubmitted: f[3] || (f[3] = () => (p.value = !1, F(m).fetchDrafts())),
|
|
1730
|
-
onRefresh: f[4] || (f[4] = (
|
|
1730
|
+
onRefresh: f[4] || (f[4] = (b) => F(m).updateDraftRef(b))
|
|
1731
1731
|
}), null, 16, ["show"])
|
|
1732
1732
|
]))
|
|
1733
1733
|
], 64);
|