@feedmepos/mf-inventory-portal 1.2.25-dev.1 → 1.2.25-dev.3
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-svECebjK.js → App-B4obttsk.js} +1 -1
- package/dist/{ApprovalView-CMSf_J2n.js → ApprovalView-DC3UGAul.js} +2 -2
- package/dist/{BindingsDialog-DENEjolJ.js → BindingsDialog-CquzVplj.js} +2 -2
- package/dist/{BindingsPicker-BYImJRaj.js → BindingsPicker-DTuGeemT.js} +1 -1
- package/dist/{BindingsTable-BrGqgucq.js → BindingsTable-Ctgb9M_M.js} +1 -1
- package/dist/{ClosingDraftView-uGF3mkBd.js → ClosingDraftView-BxmKgtbn.js} +560 -553
- package/dist/ClosingHistoryView-s_xtCr9L.js +363 -0
- package/dist/{ClosingTemplateView-BQmC4An_.js → ClosingTemplateView-BFAk8t0U.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-CqfFyoTx.js → DeliveryOrderPrintPreview-Cxx6M-8k.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CCTMmG94.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DEl4CWhG.js} +3 -3
- package/dist/{FmMultiselectDialog-_MlkbNly.js → FmMultiselectDialog-BKe18tGi.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DmLhEVWi.js → FmUnitInput.vue_vue_type_script_setup_true_lang-B3EGJJOd.js} +1 -1
- package/dist/{ImportView-D-d9ATVE.js → ImportView-C_Wi1VKC.js} +2 -2
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CdX2Uvdb.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C10WT08O.js} +1 -1
- package/dist/{IngredientGroupView-BcaX4ZRX.js → IngredientGroupView-D_upb784.js} +2 -2
- package/dist/{IngredientsView-DxA8tI-v.js → IngredientsView-Cl34PHha.js} +7 -7
- package/dist/{IntegrationView-BtzwigHc.js → IntegrationView-DVN96hm3.js} +3 -3
- package/dist/{InventoryBindingForm-CIlQbCPQ.js → InventoryBindingForm-HrndE5uF.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BH6zgB9N.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CNTipGf7.js} +3 -3
- package/dist/{InventoryBindingSummary-DCLkDnck.js → InventoryBindingSummary-DXD2CcUd.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BdUVlwac.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-COb9i6pD.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CNn57Gsw.js → PremiumBadge.vue_vue_type_script_setup_true_lang-QLsihie5.js} +1 -1
- package/dist/{PublishView-Cg56zsdv.js → PublishView-BjggzffG.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-ab3npDLz.js → PurchaseOrderPrintPreview-CEr-__xV.js} +1 -1
- package/dist/{ReceiveRequestView-CZ9GoTB3.js → ReceiveRequestView-C5TJmTy3.js} +8 -8
- package/dist/{RecipeView-DODYvOxp.js → RecipeView-C-JSaZdS.js} +3 -3
- package/dist/{StockView-P4B0_4cp.js → StockView-DnXqehqn.js} +8 -8
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DDGU8k4Y.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B1KFnqFv.js} +1 -1
- package/dist/{SupplierView-BBFEWOUO.js → SupplierView-D-RzNxE-.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CUw4_F1q.js → TransferDetails.vue_vue_type_script_setup_true_lang-CObSzTDZ.js} +5 -5
- package/dist/{TransferTemplateView-CZapMuRF.js → TransferTemplateView-SE1sCscG.js} +7 -7
- package/dist/{UnitView-BBBwzqJ-.js → UnitView-C_JVyM2z.js} +3 -3
- package/dist/{WarehouseView-Blc2Yput.js → WarehouseView-BbzM9qBo.js} +1 -1
- package/dist/{app-_mYLQuxf.js → app-zasR2ukI.js} +20152 -19317
- package/dist/app.d.ts +9 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-Cb5DEV38.js → decimal-DWqIA11a.js} +1 -1
- package/dist/{format-unit-display-DH44zkQq.js → format-unit-display-DIwCjuP3.js} +3 -3
- package/dist/{import-export.helper-cLaJAcgW.js → import-export.helper-DwC0iQdw.js} +1 -1
- package/dist/{index-YHqLg0qR.js → index-CrjhdjiE.js} +1 -1
- package/dist/{index-CCIRnIFI.js → index-PGim0FYX.js} +1 -1
- package/dist/{purchase-order-template-Dt5KDXNO.js → purchase-order-template-Bhq1FrLB.js} +1 -1
- package/dist/{stock-CrjsQRTg.js → stock-BF1TE1sy.js} +1 -1
- package/dist/{stock-CV3z7I58.js → stock-lhgtE1at.js} +2 -2
- package/dist/{supplier-CbaxXdZ-.js → supplier-qYXdR1q-.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CaEOT5eK.js → use-ingredient-select-dialog-DUX6jbhh.js} +1 -1
- package/dist/{use-inventory-binding-dialog-C6OfhRBn.js → use-inventory-binding-dialog-Cs9yC_C8.js} +1 -1
- package/package.json +1 -1
- package/dist/ClosingHistoryView-BKgZsXZU.js +0 -355
package/dist/{use-ingredient-select-dialog-CaEOT5eK.js → use-ingredient-select-dialog-DUX6jbhh.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineStore as y } from "pinia";
|
|
2
|
-
import { a as S, x as b } from "./app-
|
|
2
|
+
import { a as S, x as b } from "./app-zasR2ukI.js";
|
|
3
3
|
import { useDialog as A } from "@feedmepos/ui-library";
|
|
4
4
|
import { useI18n as I } from "@feedmepos/mf-common";
|
|
5
5
|
const h = y(
|
package/package.json
CHANGED
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
import { defineComponent as H, ref as v, computed as h, resolveComponent as k, openBlock as d, createElementBlock as g, createVNode as f, withModifiers as te, withCtx as A, createElementVNode as s, toDisplayString as u, unref as n, Fragment as K, createTextVNode as M, createBlock as L, createCommentVNode as F, renderList as oe, normalizeClass as le, h as ae, onMounted as ne, Teleport as se } from "vue";
|
|
2
|
-
import { aD as j, ac as x, u as ie, h as ce, I as re, J as ue } from "./app-_mYLQuxf.js";
|
|
3
|
-
import { useI18n as z, useCoreStore as de } from "@feedmepos/mf-common";
|
|
4
|
-
import { useSnackbar as me } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as ve } from "./stock-CrjsQRTg.js";
|
|
6
|
-
const fe = { class: "fm-typo-en-heading-lg-600" }, ye = { class: "flex flex-col gap-16" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "flex flex-col gap-8" }, _e = { class: "fm-typo-en-body-md-600" }, be = { class: "flex flex-col gap-8" }, he = { class: "fm-typo-en-body-md-600" }, ke = { class: "flex items-center gap-8 mb-8" }, xe = {
|
|
7
|
-
key: 2,
|
|
8
|
-
class: "text-red-500 text-sm mt-2"
|
|
9
|
-
}, De = { class: "fm-typo-en-body-sm-400" }, Ve = {
|
|
10
|
-
key: 1,
|
|
11
|
-
class: "flex flex-col gap-8"
|
|
12
|
-
}, Se = { class: "fm-typo-en-body-md-600" }, we = { class: "flex flex-col gap-8 max-h-[300px] overflow-y-auto" }, Ce = { class: "flex items-center justify-between" }, Re = { class: "fm-typo-en-body-sm-600" }, Fe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ae = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Le = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "fm-typo-en-body-xs-400 text-fm-color-system-error-500"
|
|
15
|
-
}, Te = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "flex gap-8 ml-auto"
|
|
18
|
-
}, Be = {
|
|
19
|
-
key: 1,
|
|
20
|
-
class: "flex gap-8 ml-auto"
|
|
21
|
-
}, $e = /* @__PURE__ */ H({
|
|
22
|
-
__name: "RecalculationDialog",
|
|
23
|
-
emits: ["submitted"],
|
|
24
|
-
setup(J, { expose: _, emit: B }) {
|
|
25
|
-
const S = B, { t: a } = z(), D = ve(), w = j(), C = me(), y = v(!1), i = v(""), c = v(""), m = v(!1), V = v([]), t = v(!1), r = v([]), b = v(!1), R = h(() => V.value.map((e) => {
|
|
26
|
-
const o = x(e._id), p = new Date(o);
|
|
27
|
-
return {
|
|
28
|
-
label: `${p.toLocaleDateString()} ${p.toLocaleTimeString()}`,
|
|
29
|
-
value: e._id
|
|
30
|
-
};
|
|
31
|
-
})), G = h(() => i.value ? R.value.filter((e) => e.value > i.value) : []), E = h({
|
|
32
|
-
get: () => {
|
|
33
|
-
if (m.value && c.value) {
|
|
34
|
-
const e = V.value.find((o) => x(o._id) === c.value);
|
|
35
|
-
return (e == null ? void 0 : e._id) || c.value;
|
|
36
|
-
}
|
|
37
|
-
return c.value;
|
|
38
|
-
},
|
|
39
|
-
set: (e) => {
|
|
40
|
-
m.value && e ? c.value = x(e) : c.value = e;
|
|
41
|
-
}
|
|
42
|
-
}), Q = h(() => {
|
|
43
|
-
if (i.value)
|
|
44
|
-
try {
|
|
45
|
-
const e = x(i.value);
|
|
46
|
-
if (e)
|
|
47
|
-
return e;
|
|
48
|
-
} catch (e) {
|
|
49
|
-
console.error("Error parsing date from closing ID:", e);
|
|
50
|
-
}
|
|
51
|
-
}), T = h(() => {
|
|
52
|
-
if (!i.value || !c.value) return "";
|
|
53
|
-
const e = x(i.value), o = c.value;
|
|
54
|
-
if (e && o) {
|
|
55
|
-
const p = new Date(e).getTime();
|
|
56
|
-
if (new Date(o).getTime() <= p)
|
|
57
|
-
return a("inventory.stock.recalculation.error.endDateBeforeOpening");
|
|
58
|
-
}
|
|
59
|
-
return "";
|
|
60
|
-
}), N = h(() => !!i.value && !!c.value && !T.value), U = h(() => r.value.some(
|
|
61
|
-
(e) => !e.completedAt && !e.failedReason
|
|
62
|
-
));
|
|
63
|
-
async function I() {
|
|
64
|
-
y.value = !0, await Promise.all([X(), P()]), i.value = "", c.value = "", m.value = !1;
|
|
65
|
-
}
|
|
66
|
-
function W() {
|
|
67
|
-
y.value = !1;
|
|
68
|
-
}
|
|
69
|
-
_({
|
|
70
|
-
open: I,
|
|
71
|
-
close: W
|
|
72
|
-
});
|
|
73
|
-
async function X() {
|
|
74
|
-
t.value = !0;
|
|
75
|
-
try {
|
|
76
|
-
const e = await w.getLastNClosings(10);
|
|
77
|
-
V.value = e;
|
|
78
|
-
} catch (e) {
|
|
79
|
-
console.error("Error fetching recent closings:", e), C.open({
|
|
80
|
-
title: a("common.error"),
|
|
81
|
-
message: "Failed to fetch recent closings",
|
|
82
|
-
type: "error"
|
|
83
|
-
});
|
|
84
|
-
} finally {
|
|
85
|
-
t.value = !1;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
async function P() {
|
|
89
|
-
b.value = !0;
|
|
90
|
-
try {
|
|
91
|
-
const e = await D.recalculation.recalculationRequests();
|
|
92
|
-
r.value = e;
|
|
93
|
-
} catch (e) {
|
|
94
|
-
console.error("Error fetching recalculation requests:", e);
|
|
95
|
-
} finally {
|
|
96
|
-
b.value = !1;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
async function Y() {
|
|
100
|
-
if (N.value) {
|
|
101
|
-
t.value = !0;
|
|
102
|
-
try {
|
|
103
|
-
await D.recalculation.scheduleRecalculation(i.value, c.value), C.open({
|
|
104
|
-
title: a("common.success"),
|
|
105
|
-
message: "Stock recalculation has been scheduled successfully",
|
|
106
|
-
type: "success"
|
|
107
|
-
}), await P(), y.value = !1, S("submitted");
|
|
108
|
-
} catch (e) {
|
|
109
|
-
console.error("Error scheduling recalculation:", e), C.open({
|
|
110
|
-
title: a("common.error"),
|
|
111
|
-
message: "Failed to schedule stock recalculation",
|
|
112
|
-
type: "error"
|
|
113
|
-
});
|
|
114
|
-
} finally {
|
|
115
|
-
t.value = !1;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return (e, o) => {
|
|
120
|
-
const p = k("FmButton"), $ = k("FmSelect"), O = k("FmRadio"), Z = k("FmDatePicker"), q = k("FmAlert"), ee = k("FmDialog");
|
|
121
|
-
return d(), g("div", null, [
|
|
122
|
-
f(p, {
|
|
123
|
-
"prepend-icon": "info",
|
|
124
|
-
variant: "tertiary",
|
|
125
|
-
onClick: te(I, ["stop"])
|
|
126
|
-
}),
|
|
127
|
-
f(ee, {
|
|
128
|
-
modelValue: y.value,
|
|
129
|
-
"onUpdate:modelValue": o[7] || (o[7] = (l) => y.value = l),
|
|
130
|
-
"close-button": "",
|
|
131
|
-
dismissAway: "",
|
|
132
|
-
"max-width": "600px"
|
|
133
|
-
}, {
|
|
134
|
-
"dialog-header": A(() => [
|
|
135
|
-
s("div", fe, u(n(a)("inventory.stock.recalculation.title")), 1)
|
|
136
|
-
]),
|
|
137
|
-
"dialog-footer": A(() => [
|
|
138
|
-
U.value ? (d(), g("div", Be, [
|
|
139
|
-
f(p, {
|
|
140
|
-
variant: "tertiary",
|
|
141
|
-
onClick: o[6] || (o[6] = (l) => y.value = !1),
|
|
142
|
-
label: n(a)("common.close")
|
|
143
|
-
}, null, 8, ["label"])
|
|
144
|
-
])) : (d(), g("div", Te, [
|
|
145
|
-
f(p, {
|
|
146
|
-
variant: "tertiary",
|
|
147
|
-
onClick: o[5] || (o[5] = (l) => y.value = !1),
|
|
148
|
-
disabled: t.value,
|
|
149
|
-
label: n(a)("common.cancel")
|
|
150
|
-
}, null, 8, ["disabled", "label"]),
|
|
151
|
-
f(p, {
|
|
152
|
-
variant: "primary",
|
|
153
|
-
onClick: Y,
|
|
154
|
-
disabled: !N.value || t.value,
|
|
155
|
-
loading: t.value,
|
|
156
|
-
label: n(a)("inventory.stock.recalculation.schedule")
|
|
157
|
-
}, null, 8, ["disabled", "loading", "label"])
|
|
158
|
-
]))
|
|
159
|
-
]),
|
|
160
|
-
default: A(() => [
|
|
161
|
-
s("div", ye, [
|
|
162
|
-
s("div", pe, u(n(a)("inventory.stock.recalculation.description")), 1),
|
|
163
|
-
U.value ? F("", !0) : (d(), g(K, { key: 0 }, [
|
|
164
|
-
s("div", ge, [
|
|
165
|
-
s("p", _e, [
|
|
166
|
-
M(u(n(a)("inventory.stock.recalculation.openingDate")) + " ", 1),
|
|
167
|
-
o[8] || (o[8] = s("span", { class: "text-fm-color-system-error-300" }, "*", -1))
|
|
168
|
-
]),
|
|
169
|
-
f($, {
|
|
170
|
-
modelValue: i.value,
|
|
171
|
-
"onUpdate:modelValue": o[0] || (o[0] = (l) => i.value = l),
|
|
172
|
-
items: R.value,
|
|
173
|
-
placeholder: n(a)("inventory.stock.recalculation.selectOpening"),
|
|
174
|
-
loading: t.value,
|
|
175
|
-
disabled: t.value
|
|
176
|
-
}, null, 8, ["modelValue", "items", "placeholder", "loading", "disabled"])
|
|
177
|
-
]),
|
|
178
|
-
s("div", be, [
|
|
179
|
-
s("p", he, [
|
|
180
|
-
M(u(n(a)("inventory.stock.recalculation.untilDate")) + " ", 1),
|
|
181
|
-
o[9] || (o[9] = s("span", { class: "text-fm-color-system-error-300" }, "*", -1))
|
|
182
|
-
]),
|
|
183
|
-
s("div", ke, [
|
|
184
|
-
f(O, {
|
|
185
|
-
modelValue: m.value,
|
|
186
|
-
"onUpdate:modelValue": o[1] || (o[1] = (l) => m.value = l),
|
|
187
|
-
value: !1,
|
|
188
|
-
label: n(a)("inventory.stock.recalculation.selectByDate")
|
|
189
|
-
}, null, 8, ["modelValue", "label"]),
|
|
190
|
-
f(O, {
|
|
191
|
-
modelValue: m.value,
|
|
192
|
-
"onUpdate:modelValue": o[2] || (o[2] = (l) => m.value = l),
|
|
193
|
-
value: !0,
|
|
194
|
-
label: n(a)("inventory.stock.recalculation.selectByClosing")
|
|
195
|
-
}, null, 8, ["modelValue", "label"])
|
|
196
|
-
]),
|
|
197
|
-
m.value ? (d(), L($, {
|
|
198
|
-
key: 1,
|
|
199
|
-
modelValue: E.value,
|
|
200
|
-
"onUpdate:modelValue": o[4] || (o[4] = (l) => E.value = l),
|
|
201
|
-
items: G.value,
|
|
202
|
-
placeholder: n(a)("inventory.stock.recalculation.selectClosing"),
|
|
203
|
-
loading: t.value,
|
|
204
|
-
disabled: !i.value || t.value
|
|
205
|
-
}, null, 8, ["modelValue", "items", "placeholder", "loading", "disabled"])) : (d(), L(Z, {
|
|
206
|
-
key: 0,
|
|
207
|
-
modelValue: c.value,
|
|
208
|
-
"onUpdate:modelValue": o[3] || (o[3] = (l) => c.value = l),
|
|
209
|
-
placeholder: n(a)("inventory.stock.recalculation.selectDate"),
|
|
210
|
-
min: Q.value,
|
|
211
|
-
disabled: !i.value || t.value
|
|
212
|
-
}, null, 8, ["modelValue", "placeholder", "min", "disabled"])),
|
|
213
|
-
T.value ? (d(), g("div", xe, u(T.value), 1)) : F("", !0)
|
|
214
|
-
]),
|
|
215
|
-
i.value && c.value && !T.value ? (d(), L(q, {
|
|
216
|
-
key: 0,
|
|
217
|
-
type: "info"
|
|
218
|
-
}, {
|
|
219
|
-
default: A(() => [
|
|
220
|
-
s("div", De, u(n(a)("inventory.stock.recalculation.info")), 1)
|
|
221
|
-
]),
|
|
222
|
-
_: 1
|
|
223
|
-
})) : F("", !0)
|
|
224
|
-
], 64)),
|
|
225
|
-
r.value.length > 0 ? (d(), g("div", Ve, [
|
|
226
|
-
s("p", Se, u(n(a)("inventory.stock.recalculation.recentRequests")), 1),
|
|
227
|
-
s("div", we, [
|
|
228
|
-
(d(!0), g(K, null, oe(r.value, (l) => (d(), g("div", {
|
|
229
|
-
key: l._id,
|
|
230
|
-
class: "p-12 border border-fm-color-border-primary rounded-8 flex flex-col gap-4"
|
|
231
|
-
}, [
|
|
232
|
-
s("div", Ce, [
|
|
233
|
-
s("div", Re, u(new Date(l.createdAt).toLocaleString()), 1),
|
|
234
|
-
s("div", {
|
|
235
|
-
class: le(["fm-typo-en-body-xs-600 px-8 py-4 rounded-4", {
|
|
236
|
-
"bg-fm-color-system-error-100 text-fm-color-system-error-500": l.failedReason,
|
|
237
|
-
"bg-fm-color-system-success-100 text-fm-color-system-success-500": l.completedAt,
|
|
238
|
-
"bg-fm-color-system-info-100 text-fm-color-system-info-500": !l.failedReason && !l.completedAt
|
|
239
|
-
}])
|
|
240
|
-
}, u(l.failedReason ? n(a)("inventory.stock.recalculation.status.failed") : l.completedAt ? n(a)("inventory.stock.recalculation.status.completed") : n(a)("inventory.stock.recalculation.status.inProgress")), 3)
|
|
241
|
-
]),
|
|
242
|
-
s("div", Fe, u(n(a)("inventory.stock.recalculation.from")) + ": " + u(new Date(l.recalculateStartDate).toLocaleDateString()), 1),
|
|
243
|
-
s("div", Ae, u(n(a)("inventory.stock.recalculation.to")) + ": " + u(new Date(l.recalculateEndDate).toLocaleDateString()), 1),
|
|
244
|
-
l.failedReason ? (d(), g("div", Le, u(l.failedReason), 1)) : F("", !0)
|
|
245
|
-
]))), 128))
|
|
246
|
-
])
|
|
247
|
-
])) : F("", !0)
|
|
248
|
-
])
|
|
249
|
-
]),
|
|
250
|
-
_: 1
|
|
251
|
-
}, 8, ["modelValue"])
|
|
252
|
-
]);
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
}), Ee = { class: "flex flex-col gap-16 p-16" }, Ke = /* @__PURE__ */ H({
|
|
256
|
-
__name: "ClosingHistoryView",
|
|
257
|
-
setup(J) {
|
|
258
|
-
var V;
|
|
259
|
-
const { t: _ } = z(), B = j(), S = ie(), a = de(), D = v([]), w = v(!1), C = h(() => [
|
|
260
|
-
{
|
|
261
|
-
label: _("inventory.stock.recalculation.title", "Stock Recalculation"),
|
|
262
|
-
value: "recalculation",
|
|
263
|
-
prependIcon: "history",
|
|
264
|
-
isAdminOnly: !0
|
|
265
|
-
}
|
|
266
|
-
]), y = v();
|
|
267
|
-
function i(t) {
|
|
268
|
-
var r;
|
|
269
|
-
switch (t) {
|
|
270
|
-
case "recalculation":
|
|
271
|
-
return (r = y.value) == null ? void 0 : r.open();
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
const c = [
|
|
275
|
-
...(V = a.sessionUser.value) != null && V.role.isAdmin ? [
|
|
276
|
-
{
|
|
277
|
-
accessorKey: "_id",
|
|
278
|
-
header: () => ae(ce, {}, () => `${_("inventory.closing.history.closingId")}`),
|
|
279
|
-
cell: (t) => t.getValue()
|
|
280
|
-
}
|
|
281
|
-
] : [],
|
|
282
|
-
{
|
|
283
|
-
accessorKey: "_id",
|
|
284
|
-
id: "date",
|
|
285
|
-
header: () => _("inventory.closing.history.date"),
|
|
286
|
-
cell: (t) => {
|
|
287
|
-
const r = t.getValue(), b = x(r);
|
|
288
|
-
return new Date(b).toLocaleDateString();
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
accessorKey: "_id",
|
|
293
|
-
id: "time",
|
|
294
|
-
header: () => _("inventory.closing.history.time"),
|
|
295
|
-
cell: (t) => {
|
|
296
|
-
const r = t.getValue(), b = x(r);
|
|
297
|
-
return new Date(b).toLocaleTimeString();
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
accessorKey: "ref",
|
|
302
|
-
header: () => _("inventory.closing.history.createdFrom"),
|
|
303
|
-
cell: (t) => t.getValue() || "-"
|
|
304
|
-
}
|
|
305
|
-
];
|
|
306
|
-
async function m() {
|
|
307
|
-
if (S.currentLocationDBName) {
|
|
308
|
-
w.value = !0;
|
|
309
|
-
try {
|
|
310
|
-
const t = await B.getLastNClosings(10);
|
|
311
|
-
D.value = t;
|
|
312
|
-
} catch (t) {
|
|
313
|
-
console.error("Error fetching closings:", t), D.value = [];
|
|
314
|
-
} finally {
|
|
315
|
-
w.value = !1;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
return ne(async () => {
|
|
320
|
-
S.currentLocationDBName && await m();
|
|
321
|
-
}), S.watchLocation(m), (t, r) => {
|
|
322
|
-
const b = k("FmTable");
|
|
323
|
-
return d(), L(re, {
|
|
324
|
-
actions: C.value,
|
|
325
|
-
title: n(_)("inventory.closing.history.title"),
|
|
326
|
-
"onClick:action": i
|
|
327
|
-
}, {
|
|
328
|
-
default: A(() => [
|
|
329
|
-
s("div", Ee, [
|
|
330
|
-
f(ue, {
|
|
331
|
-
"change-location": "",
|
|
332
|
-
"hide-filter-options": !0
|
|
333
|
-
}),
|
|
334
|
-
f(b, {
|
|
335
|
-
loading: w.value,
|
|
336
|
-
"row-data": D.value,
|
|
337
|
-
"column-defs": c
|
|
338
|
-
}, null, 8, ["loading", "row-data"])
|
|
339
|
-
]),
|
|
340
|
-
(d(), L(se, { to: "body" }, [
|
|
341
|
-
f($e, {
|
|
342
|
-
ref_key: "recalculationDialogRef",
|
|
343
|
-
ref: y,
|
|
344
|
-
onSubmitted: r[0] || (r[0] = (R) => m())
|
|
345
|
-
}, null, 512)
|
|
346
|
-
]))
|
|
347
|
-
]),
|
|
348
|
-
_: 1
|
|
349
|
-
}, 8, ["actions", "title"]);
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
export {
|
|
354
|
-
Ke as default
|
|
355
|
-
};
|