@feedmepos/mf-inventory-portal 0.0.9-dev.6 → 0.0.10-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.
Files changed (37) hide show
  1. package/dist/{ApprovalView-Cy6o4vgq.js → ApprovalView-UiCYsZh5.js} +6 -6
  2. package/dist/{BindingsDialog-Da4mKx5M.js → BindingsDialog-BqkgSWUu.js} +2 -2
  3. package/dist/{BindingsPicker-9l3ylHk3.js → BindingsPicker-B2w5CjN5.js} +2 -2
  4. package/dist/{BindingsTable-BBd97tsS.js → BindingsTable-bpbYdB6x.js} +3 -3
  5. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BBqgA2aN.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-B4kMt-9T.js} +1 -1
  6. package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-D9kKpClR.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-4jjXxYHH.js} +2 -2
  7. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-21-IoTzr.js → FmUnitInput.vue_vue_type_script_setup_true_lang-B8WuQhJy.js} +3 -3
  8. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DdRnS0yE.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BuIOzyqc.js} +1 -1
  9. package/dist/{IngredientsView-CtAESxcL.js → IngredientsView-DJeW6p1G.js} +6 -6
  10. package/dist/{IntegrationView-CzO3PutO.js → IntegrationView-ByDdZjwA.js} +3 -3
  11. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-eJrgpgsK.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BOz-26Or.js} +6 -6
  12. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BaPCT7m6.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D2faCpMC.js} +1 -1
  13. package/dist/{PurchaseOrderPrintPreview-S5uXyleV.js → PurchaseOrderPrintPreview-37xMlFS4.js} +1 -1
  14. package/dist/ReceiveRequestView-C2vVbJ1n.js +1410 -0
  15. package/dist/{RecipeView-CTC9v2hH.js → RecipeView-DdDn0GKA.js} +7 -7
  16. package/dist/{StockView-DbukZ1Pu.js → StockView-BzvT_9ou.js} +12 -12
  17. package/dist/{SupplierView-C98G3f39.js → SupplierView-_FSHKdx7.js} +7 -7
  18. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DN2t2tQn.js → TransferDetails.vue_vue_type_script_setup_true_lang-BbeV99M9.js} +5 -5
  19. package/dist/{UnitView-DVl7voaF.js → UnitView-BGqb3t2V.js} +6 -6
  20. package/dist/{WarehouseView-DPe_npYA.js → WarehouseView-BQF8BLlD.js} +3 -3
  21. package/dist/{app-BrtBi6V8.js → app-phw_lAxT.js} +3 -3
  22. package/dist/app.js +1 -1
  23. package/dist/{date2-BvGKe7pe.js → date2-nlsc80O_.js} +47 -66
  24. package/dist/{dayjs.min-DM-sejr0.js → dayjs.min-Ci9BUYzl.js} +7 -6
  25. package/dist/{decimal-Cbm8313c.js → decimal-BXXUI8Hi.js} +1 -1
  26. package/dist/{fuzzy-BG3pP_WO.js → fuzzy-CPJgbueG.js} +1 -1
  27. package/dist/{init-date-range-d84mdcG8.js → init-date-range-QmPP7G1s.js} +1 -1
  28. package/dist/{layout-TawyfRi7.js → layout-hce3J3my.js} +1 -1
  29. package/dist/{rules-D-Bw7E0k.js → rules-DAD3LWR_.js} +1 -1
  30. package/dist/{stock-estimate-rFOPsZNO.js → stock-estimate-DKa4QpoK.js} +2 -2
  31. package/dist/{supplier-BXkTD6wl.js → supplier-BwvYqR6r.js} +1 -1
  32. package/dist/tsconfig.app.tsbuildinfo +1 -1
  33. package/dist/{use-inventory-binding-dialog-DuVk-QOK.js → use-inventory-binding-dialog-C8TgyUMv.js} +2 -2
  34. package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistoryProps.d.ts +7 -5
  35. package/dist/{xlsx-D150Vh83.js → xlsx-ZwRP4Csk.js} +1 -1
  36. package/package.json +2 -2
  37. package/dist/ReceiveRequestView-B_iVgs0l.js +0 -1510
@@ -1,1510 +0,0 @@
1
- import { defineComponent as ke, ref as j, watch as ue, computed as $, resolveComponent as S, openBlock as _, createBlock as W, withCtx as T, createElementVNode as a, createVNode as u, toDisplayString as Z, createElementBlock as F, Fragment as $e, renderList as ot, unref as d, createTextVNode as co, mergeModels as Kt, reactive as mo, useModel as po, onMounted as fo, createCommentVNode as B, normalizeClass as Je, normalizeStyle as lo, resolveDynamicComponent as vo, h as Y, isRef as _o, Teleport as go, mergeProps as Bt } from "vue";
2
- import { I as ut, d as xe, m as Ce, n as yo, e as ft, a as ho, C as ct, u as bo, o as Xe, p as xo } from "./app-BrtBi6V8.js";
3
- import { i as st } from "./init-date-range-d84mdcG8.js";
4
- import { u as no, p as Gt, P as A, a as Co, b as ko, _ as wo, g as So } from "./TransferDetails.vue_vue_type_script_setup_true_lang-DN2t2tQn.js";
5
- import { a as G, k as Wt, b as tt, s as pt, t as Do, u as Fo, v as Zt, w as Vo, i as Jt, x as Po, q as dt, y as To, j as Xt, c as eo } from "./date2-BvGKe7pe.js";
6
- import { _ as Uo, u as Ro, i as Ao, e as $o } from "./stock-estimate-rFOPsZNO.js";
7
- import { d as mt } from "./dayjs.min-DM-sejr0.js";
8
- import { _ as Mo } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js";
9
- import { _ as Eo } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BBqgA2aN.js";
10
- import { useDialog as Oo, useSnackbar as vt, components as le, useProxiedModel as No, useBreakpoints as Ho } from "@feedmepos/ui-library";
11
- import { R as to, F as Ae } from "./row-action.enum-BwQbURNh.js";
12
- import { useCoreStore as Io } from "@feedmepos/mf-common";
13
- import { _ as Yo } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-D9kKpClR.js";
14
- import { F as ee, _ as ro, u as qo } from "./layout-TawyfRi7.js";
15
- import { R as et, B as zo, A as Lo, M as oo, a as jo } from "./rules-D-Bw7E0k.js";
16
- import { u as io } from "./supplier-BXkTD6wl.js";
17
- import { _ as Qo } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js";
18
- const Ko = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, Bo = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, Go = /* @__PURE__ */ ke({
19
- __name: "FmDateRangePickerChip",
20
- props: {
21
- modelValue: { default: (q) => q.modelValue ?? st() }
22
- },
23
- emits: ["update:modelValue"],
24
- setup(q, { emit: te }) {
25
- const J = te, k = j(st());
26
- ue(k, (C) => {
27
- J("update:modelValue", C);
28
- });
29
- const M = $(() => {
30
- const { startDate: C, endDate: y } = k.value;
31
- return !C && !y ? "" : `${C} - ${y}`;
32
- });
33
- return (C, y) => {
34
- const U = S("FmIcon"), z = S("FmDateRangePicker");
35
- return _(), W(z, {
36
- "show-predefined-range": "",
37
- modelValue: k.value,
38
- "onUpdate:modelValue": y[0] || (y[0] = (g) => k.value = g),
39
- "start-label": "",
40
- "end-label": ""
41
- }, {
42
- "trigger-button": T(() => [
43
- a("div", Ko, [
44
- u(U, {
45
- name: "calendar_month",
46
- size: "sm"
47
- }),
48
- a("div", Bo, Z(M.value), 1)
49
- ])
50
- ]),
51
- _: 1
52
- }, 8, ["modelValue"]);
53
- };
54
- }
55
- }), Wo = {
56
- width: "24",
57
- height: "24",
58
- viewBox: "0 0 24 24",
59
- fill: "none",
60
- xmlns: "http://www.w3.org/2000/svg"
61
- }, Zo = ["fill"], Jo = ["fill"], Xo = ["stroke"], es = ["stroke"], ts = /* @__PURE__ */ ke({
62
- __name: "SparkIcon",
63
- props: {
64
- size: {
65
- type: Number,
66
- default: 24
67
- },
68
- color: {
69
- type: String,
70
- default: "#c7c7cc"
71
- }
72
- },
73
- setup(q) {
74
- return (te, J) => (_(), F("svg", Wo, [
75
- a("path", {
76
- d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
77
- fill: q.color
78
- }, null, 8, Zo),
79
- a("path", {
80
- d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
81
- fill: q.color
82
- }, null, 8, Jo),
83
- a("path", {
84
- d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
85
- stroke: q.color,
86
- "stroke-width": "1.5",
87
- "stroke-linecap": "round",
88
- "stroke-linejoin": "round"
89
- }, null, 8, Xo),
90
- a("path", {
91
- d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
92
- stroke: q.color,
93
- "stroke-width": "1.5",
94
- "stroke-linecap": "round",
95
- "stroke-linejoin": "round"
96
- }, null, 8, es)
97
- ]));
98
- }
99
- }), os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, ss = { class: "fm-typo-body-md-400 mr-auto xs:w-full" }, as = { class: "hidden xs:inline" }, ls = {
100
- key: 0,
101
- class: "fm-typo-body-sm-700"
102
- }, ns = { class: "xs:hidden" }, rs = {
103
- key: 1,
104
- class: "fm-typo-body-sm-700 text-fm-color-typo-disabled"
105
- }, is = { class: "fm-typo-body-sm-400 text-fm-color-typo-secondary" }, us = {
106
- key: 0,
107
- class: "flex flex-col"
108
- }, cs = { key: 1 }, so = /* @__PURE__ */ ke({
109
- __name: "SupplierPriceHistory",
110
- props: {
111
- prices: {}
112
- },
113
- setup(q) {
114
- const te = io();
115
- function J(k) {
116
- return te.suppliers.find((M) => M._id === k);
117
- }
118
- return (k, M) => {
119
- const C = S("FmTooltip");
120
- return _(), F("div", os, [
121
- (_(!0), F($e, null, ot(Object.keys(k.prices), (y) => {
122
- var U, z, g;
123
- return _(), F("div", {
124
- key: y,
125
- class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
126
- }, [
127
- a("div", ss, [
128
- a("span", null, Z((U = J(y)) == null ? void 0 : U.name), 1),
129
- a("span", as, " (per " + Z((g = (z = k.prices[y].find((f) => f.unit)) == null ? void 0 : z.unit) == null ? void 0 : g.abbrev) + ") ", 1)
130
- ]),
131
- (_(!0), F($e, null, ot(k.prices[y], (f) => (_(), F("div", {
132
- key: f.date,
133
- class: "flex flex-col w-120 xs:w-72 xs:flex-1 text-ellipsis cursor-pointer"
134
- }, [
135
- u(C, { "z-index": 50 }, {
136
- content: T(() => [
137
- f.totalUnits && f.unit && f.pricePerUnit ? (_(), F("div", us, [
138
- a("div", null, " Total units: " + Z(d(G)(f.totalUnits)) + " " + Z(f.unit.abbrev), 1),
139
- a("div", null, " Total bought: " + Z(d(Wt)({
140
- ...d(tt)(f.pricePerUnit, f.totalUnits),
141
- currency: f.pricePerUnit.currency
142
- })), 1)
143
- ])) : (_(), F("div", cs, "No data"))
144
- ]),
145
- default: T(() => [
146
- a("div", null, [
147
- f.pricePerUnit && f.unit ? (_(), F("div", ls, [
148
- co(Z(d(Wt)(f.pricePerUnit)) + " ", 1),
149
- a("span", ns, "/ " + Z(f.unit.abbrev), 1)
150
- ])) : (_(), F("div", rs, "No data")),
151
- a("div", is, Z(d(pt)(new Date(f.date))), 1)
152
- ])
153
- ]),
154
- _: 2
155
- }, 1024)
156
- ]))), 128))
157
- ]);
158
- }), 128))
159
- ]);
160
- };
161
- }
162
- }), ds = { class: "flex flex-col w-full gap-40" }, ms = { class: "flex flex-col gap-8" }, ps = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Transfer details", -1), fs = { class: "flex items-center gap-8" }, vs = /* @__PURE__ */ a("div", null, null, -1), _s = { class: "flex flex-col gap-4" }, gs = {
163
- key: 0,
164
- class: "p-16 border border-fm-color-neutral-gray-300 fm-corner-radius-md flex flex-col"
165
- }, ys = { class: "flex xs:flex-col sm:flex-col" }, hs = /* @__PURE__ */ a("div", { class: "xs:hidden sm:hidden h-48 lg:w-16 md:w-16" }, null, -1), bs = {
166
- key: 0,
167
- class: "flex-1 flex gap-8 h-48 xs:flex-col xs:pt-16 sm:flex-col sm:pt-16"
168
- }, xs = { class: "flex-1" }, Cs = { class: "flex-1" }, ks = {
169
- key: 1,
170
- class: "flex items-center gap-4"
171
- }, ws = /* @__PURE__ */ a("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, " Cannot backdate without an initial closing made to the system. ", -1), Ss = { class: "flex flex-col gap-8" }, Ds = { class: "flex items-center xs:flex-col xs:gap-4" }, Fs = /* @__PURE__ */ a("div", { class: "xs:w-full flex-1 fm-typo-en-title-sm-800" }, "Transfer items", -1), Vs = {
172
- key: 0,
173
- class: "xs:w-full"
174
- }, Ps = { class: "flex gap-2" }, Ts = ["disabled"], Us = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, Rs = { class: "flex items-center" }, As = /* @__PURE__ */ a("p", { class: "flex-1 fm-typo-en-title-sm-800" }, "Forecast stock", -1), $s = { class: "flex items-start gap-8" }, Ms = /* @__PURE__ */ a("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Selecting forecast stock will replace your current item selection. ", -1), Es = { class: "flex gap-1" }, Os = /* @__PURE__ */ a("div", { class: "grow" }, null, -1), Ns = { key: 0 }, Hs = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }, Ys = ["colspan"], qs = { class: "flex flex-col gap-4" }, zs = { class: "flex items-center" }, Ls = { class: "flex-1" }, js = { class: "grid grid-cols-2 gap-4" }, Qs = { class: "flex flex-col" }, Ks = { class: "flex flex-col" }, Bs = { class: "flex flex-col" }, Gs = { class: "flex flex-col" }, Ws = {
175
- key: 0,
176
- class: "flex flex-col col-span-2",
177
- "data-cy": "fm-table-list-view-cost-label"
178
- }, Zs = {
179
- key: 0,
180
- class: "flex gap-4 text-fm-color-typo-primary fm-typo-en-body-lg-600"
181
- }, Js = /* @__PURE__ */ ke({
182
- __name: "TransferForm",
183
- props: /* @__PURE__ */ Kt({
184
- modelValue: {},
185
- disabled: { type: Boolean },
186
- suppliers: { default: () => [] },
187
- skus: { default: () => [] },
188
- lastClosingDate: {}
189
- }, {
190
- modelValue: {
191
- default: {
192
- ref: "",
193
- supplier: null
194
- }
195
- },
196
- modelModifiers: {}
197
- }),
198
- emits: /* @__PURE__ */ Kt(["validation-success"], ["update:modelValue"]),
199
- setup(q, { expose: te, emit: J }) {
200
- const k = ft(), M = Ro(), C = Io(), y = no(), U = ho(), z = mo({}), g = q, f = $(() => {
201
- function e(o) {
202
- return Object.prototype.hasOwnProperty.call(o, "_rev") && Object.prototype.hasOwnProperty.call(o, "status");
203
- }
204
- const t = g.modelValue;
205
- return !e(t) || t.status === "DRAFT";
206
- }), oe = $(() => {
207
- var o;
208
- if (f.value)
209
- return !0;
210
- const e = g.lastClosingDate, t = (o = g.modelValue) != null && o._id ? Gt(g.modelValue._id) : null;
211
- return !e || !t ? !1 : t.getTime() > e.getTime();
212
- }), se = J, i = po(q, "modelValue"), ve = $({
213
- get() {
214
- var e;
215
- return ((e = i.value) == null ? void 0 : e.remark) ?? "";
216
- },
217
- set(e) {
218
- i.value.remark = e;
219
- }
220
- });
221
- ue([() => g.suppliers], () => {
222
- if (b.value === A.PURCHASE) {
223
- i.value.supplier = g.suppliers[0];
224
- return;
225
- }
226
- });
227
- const V = $(() => g.disabled), R = $(() => i.value.items ?? []), E = (e) => {
228
- const { name: t, address: o, regNo: l, phoneNo: s } = e.doc.profile;
229
- return {
230
- _id: e.doc._id,
231
- internal: e.type === ut.restaurant ? Ce.enum.restaurant : Ce.enum.warehouse,
232
- name: t,
233
- registrationNumber: l,
234
- address: o,
235
- contactName: t,
236
- phoneNumber: s,
237
- disabled: !e.acceptRequest || e.dbName === k.currentLocation.dbName
238
- };
239
- }, Q = [
240
- {
241
- label: "Purchase",
242
- value: A.PURCHASE
243
- },
244
- {
245
- label: "Transfer",
246
- value: A.TRANSFER
247
- }
248
- ], b = j(A.PURCHASE), m = $(() => {
249
- var t;
250
- const e = ((t = k._currentLocation) == null ? void 0 : t.type) === ut.warehouse;
251
- return k.locations.filter((o) => {
252
- var s;
253
- return !(o.dbName === ((s = k._currentLocation) == null ? void 0 : s.dbName)) && (!e || o.type === ut.warehouse) && o.acceptRequest;
254
- });
255
- }), c = $(() => b.value === A.PURCHASE ? g.suppliers.map((e) => ({
256
- label: e.name,
257
- value: e._id,
258
- disabled: !1
259
- })) : m.value.map(E).map((e) => ({
260
- label: e.disabled ? `${e.name} (Upgrade POS)` : e.name,
261
- value: e._id,
262
- disabled: e.disabled
263
- }))), D = $({
264
- get() {
265
- var e;
266
- return ((e = i.value.supplier) == null ? void 0 : e._id) ?? null;
267
- },
268
- set(e) {
269
- if (b.value === A.PURCHASE) {
270
- i.value.supplier = g.suppliers.find((o) => o._id === e) ?? null, i.value.items && (i.value.items = i.value.items.map((o) => ({
271
- ...o,
272
- totalCost: H(o)
273
- })));
274
- return;
275
- }
276
- const t = k.locations.find((o) => o.doc._id === e);
277
- t ? i.value.supplier = E(t) : i.value.supplier = null;
278
- }
279
- });
280
- function X(e) {
281
- switch (e) {
282
- case ct.MY:
283
- return "MYR";
284
- case ct.SG:
285
- return "SGD";
286
- case ct.ID:
287
- return "IDR";
288
- default:
289
- return "MYR";
290
- }
291
- }
292
- function H(e) {
293
- var x, I, re, P, K, w, O, de, N, be;
294
- if (z[e.sku._id])
295
- return e.totalCost;
296
- const t = e.measurement, l = ((K = (P = (re = (I = (x = g.modelValue) == null ? void 0 : x.supplier) == null ? void 0 : I.supplyItems) == null ? void 0 : re.find(
297
- (Pe) => Pe.skuId === e.sku._id
298
- )) == null ? void 0 : P.defaultCost) == null ? void 0 : K.costPerUnit) ?? ((w = e.sku.defaultCost) == null ? void 0 : w.costPerUnit), s = l ? (O = e.sku.defaultCost) != null && O.measurement ? +G(l) / +G((de = e.sku.defaultCost) == null ? void 0 : de.measurement.conversion) : +G(l) : void 0, r = s ? t ? s * +G(t.conversion) : s : void 0, n = r ? +G(e.quantity) * r : void 0;
299
- return e.totalCost ?? n ? {
300
- ...Do(n ?? 0, 2),
301
- currency: X(((N = C.currentCountry) == null ? void 0 : N.value) ?? xe)
302
- } : {
303
- amount: 1,
304
- precision: 0,
305
- currency: X(((be = C.currentCountry) == null ? void 0 : be.value) ?? xe)
306
- };
307
- }
308
- ue([() => b.value], ([e]) => {
309
- var t;
310
- D.value = ((t = c.value.find((o) => !o.disabled)) == null ? void 0 : t.value) ?? null, e === A.PURCHASE && U.enableTotalCost && (i.value.items = i.value.items.map((o) => {
311
- const l = H(o);
312
- return {
313
- ...o,
314
- totalCost: l
315
- };
316
- }));
317
- }), ue([() => g.modelValue], ([e]) => {
318
- var t, o, l;
319
- ((t = e == null ? void 0 : e.supplier) == null ? void 0 : t.internal) === Ce.enum.restaurant || ((o = e == null ? void 0 : e.supplier) == null ? void 0 : o.internal) === Ce.enum.warehouse ? b.value = A.TRANSFER : b.value = A.PURCHASE, D.value = ((l = c.value.find((s) => {
320
- var r, n;
321
- return s.value === ((n = (r = g.modelValue) == null ? void 0 : r.supplier) == null ? void 0 : n._id);
322
- })) == null ? void 0 : l.value) ?? null;
323
- }), fo(() => {
324
- var e, t, o, l, s, r, n;
325
- ((t = (e = g.modelValue) == null ? void 0 : e.supplier) == null ? void 0 : t.internal) === Ce.enum.restaurant || ((l = (o = g.modelValue) == null ? void 0 : o.supplier) == null ? void 0 : l.internal) === Ce.enum.warehouse ? b.value = A.TRANSFER : b.value = A.PURCHASE, D.value = (s = g.modelValue) != null && s.supplier ? ((r = c.value.find((p) => {
326
- var x, I;
327
- return p.value === ((I = (x = g.modelValue) == null ? void 0 : x.supplier) == null ? void 0 : I._id);
328
- })) == null ? void 0 : r.value) ?? null : ((n = c.value.find((p) => !p.disabled)) == null ? void 0 : n.value) ?? null;
329
- });
330
- const Me = Oo(), ne = j(7), ie = j(!1), we = vt();
331
- async function Ee() {
332
- if (ne.value < 1)
333
- return;
334
- ie.value = !1, await M.readPurchaseOrder(ne.value);
335
- const e = {
336
- ...i.value
337
- }, t = [];
338
- if (M.purchaseOrderForecast.skus.length <= 0) {
339
- we.open({ message: "There is no forecast at the moment.", type: "info" });
340
- return;
341
- }
342
- e.items = M.purchaseOrderForecast.skus.reduce((o, l) => {
343
- const s = g.skus.find((p) => p._id === l.id);
344
- if (o.find((p) => p.sku._id === l.id) || !s)
345
- return o;
346
- const n = {
347
- sku: s,
348
- code: s.code,
349
- name: s.name,
350
- quantity: {
351
- amount: l.amount,
352
- precision: 0
353
- }
354
- };
355
- return o.push(n), o;
356
- }, t), i.value = e;
357
- }
358
- function Oe() {
359
- const e = g.skus.map((o) => ({
360
- label: o.name,
361
- sublabel: o.code,
362
- value: o
363
- })), t = e.filter((o) => {
364
- var l;
365
- return (l = i.value.items) == null ? void 0 : l.find((s) => s.sku._id === o.value._id);
366
- }).map((o) => o.value);
367
- Me.open({
368
- title: "Select item",
369
- closeButton: !0,
370
- contentComponent: Yo,
371
- contentComponentProps: {
372
- modelValue: t,
373
- items: e
374
- },
375
- primaryActions: {
376
- text: "Confirm",
377
- close: !0
378
- },
379
- secondaryActions: {
380
- text: "Close",
381
- close: !0,
382
- variant: "tertiary"
383
- }
384
- }).onPrimary((o) => {
385
- const l = {
386
- ...i.value
387
- }, s = l.items ?? [], r = o.map((n) => {
388
- const p = s.find((I) => I.sku._id === n._id);
389
- if (p)
390
- return p;
391
- const x = {
392
- sku: n,
393
- code: n.code,
394
- name: n.name,
395
- quantity: {
396
- amount: 1,
397
- precision: 0
398
- }
399
- };
400
- return b.value === A.PURCHASE && U.enableTotalCost && (x.totalCost = H(x)), x;
401
- });
402
- r.sort((n, p) => n.sku.code.localeCompare(p.sku.code)), l.items = r, i.value = l;
403
- });
404
- }
405
- function _e(e, t) {
406
- var o;
407
- if (e === to.Delete) {
408
- const l = ((o = i.value) == null ? void 0 : o.items) ?? [];
409
- i.value.items = l.filter((s) => s.sku._id !== t);
410
- return;
411
- }
412
- }
413
- function Se(e) {
414
- var r, n;
415
- const t = ((r = i.value) == null ? void 0 : r.items) ?? [], o = (n = t == null ? void 0 : t.find((p) => p.sku._id === e)) == null ? void 0 : n.sku;
416
- if (!o)
417
- return [];
418
- const l = o.unit.measurements ?? [];
419
- return [
420
- {
421
- label: o.unit.abbrev,
422
- value: null
423
- },
424
- ...l.map((p) => ({
425
- label: p.abbrev,
426
- value: p
427
- }))
428
- ];
429
- }
430
- function De(e) {
431
- var r;
432
- const o = (((r = i.value) == null ? void 0 : r.items) ?? []).find((n) => n.sku._id === e), l = o == null ? void 0 : o.sku;
433
- if (!o || !l) return null;
434
- const s = Se(e);
435
- return o.measurement ? s.find((n) => {
436
- var p, x;
437
- return ((p = n.value) == null ? void 0 : p.id) === ((x = o.measurement) == null ? void 0 : x.id);
438
- }) : s.find((n) => n.value === null);
439
- }
440
- function Ne(e, t) {
441
- var l;
442
- const o = ((l = i.value) == null ? void 0 : l.items) ?? [];
443
- i.value.items = o.map((s) => s.sku._id !== e ? s : t ? (s.measurement = t, U.enableTotalCost && (s.totalCost = H(s)), s) : (delete s.measurement, s));
444
- }
445
- function He(e, t) {
446
- const o = i.value, l = o.items ?? [];
447
- o.items = l.map((s) => (s.sku._id !== e || (s.code = t), s));
448
- }
449
- function ge(e, t) {
450
- const o = i.value, l = o.items ?? [];
451
- o.items = l.map((s) => (s.sku._id !== e || (s.name = t), s));
452
- }
453
- function Ie(e, t) {
454
- const o = +t, l = i.value, s = l.items ?? [];
455
- t.length > 0 && isFinite(o) ? l.items = s.map((r) => (r.sku._id !== e || (r.quantity = eo(o), U.enableTotalCost && (r.totalCost = H(r))), r)) : l.items = s.map((r) => (r.sku._id !== e || (r.quantity = { amount: 0, precision: 0 }, U.enableTotalCost && (r.totalCost = H(r))), r));
456
- }
457
- function Ye(e, t) {
458
- const o = +t, l = i.value, s = l.items ?? [];
459
- t.length > 0 && isFinite(o) ? l.items = s.map((r) => {
460
- var n;
461
- return r.sku._id !== e || (r.totalCost = {
462
- ...eo(o),
463
- currency: X(((n = C.currentCountry) == null ? void 0 : n.value) ?? xe)
464
- }), r;
465
- }) : l.items = s.map((r) => {
466
- var n;
467
- return r.sku._id !== e || (r.totalCost = {
468
- amount: 0,
469
- precision: 0,
470
- currency: X(((n = C.currentCountry) == null ? void 0 : n.value) ?? xe)
471
- }), r;
472
- });
473
- }
474
- const Fe = [
475
- {
476
- header: "Code",
477
- accessorKey: "code",
478
- size: 96,
479
- cell(e) {
480
- const t = e.row.original;
481
- return f.value ? Y(le.FmTextField, {
482
- modelValue: t.code,
483
- "onUpdate:modelValue": (o) => {
484
- He(t.sku._id, o);
485
- },
486
- rules: [et()],
487
- labelMark: "required"
488
- }) : t.code;
489
- },
490
- enableSorting: !1
491
- },
492
- {
493
- id: "Name",
494
- header: "Name",
495
- size: "auto",
496
- cell(e) {
497
- const t = e.row.original;
498
- return f.value ? Y(le.FmTextField, {
499
- modelValue: t.name,
500
- "onUpdate:modelValue": (o) => {
501
- ge(t.sku._id, o);
502
- },
503
- rules: [et()],
504
- labelMark: "required"
505
- }) : t.name;
506
- },
507
- enableSorting: !1
508
- },
509
- {
510
- id: "Amount",
511
- header: "Amount",
512
- size: 120,
513
- cell(e) {
514
- var l, s, r;
515
- const t = e.row.original, o = (r = (s = (l = i.value) == null ? void 0 : l.items) == null ? void 0 : s.find) == null ? void 0 : r.call(s, (n) => n.sku._id === t.sku._id);
516
- return f.value ? Y(le.FmTextField, {
517
- style: {
518
- flex: "1 1 0%"
519
- },
520
- modelValue: +G((o == null ? void 0 : o.quantity) ?? { amount: 1, precision: 0 }),
521
- "onUpdate:modelValue": (n) => {
522
- Ie(t.sku._id, n);
523
- },
524
- rules: [oo(o.sku.unit, o.measurement)]
525
- }) : G((o == null ? void 0 : o.quantity) ?? { amount: 1, precision: 0 });
526
- },
527
- enableSorting: !1
528
- },
529
- {
530
- id: "Unit",
531
- header: "Unit",
532
- size: 120,
533
- cell(e) {
534
- var o, l;
535
- const t = e.row.original;
536
- return f.value ? Y(le.FmSelect, {
537
- style: {
538
- flex: "1 1 0%"
539
- },
540
- items: Se(t.sku._id),
541
- modelValue: (o = De(t.sku._id)) == null ? void 0 : o.value,
542
- "onUpdate:modelValue": (s) => Ne(t.sku._id, s)
543
- }) : (l = De(t.sku._id)) == null ? void 0 : l.label;
544
- },
545
- enableSorting: !1
546
- },
547
- {
548
- id: "Cost",
549
- header: () => {
550
- var e, t;
551
- return Y(
552
- Qo,
553
- {
554
- zIndex: 50
555
- },
556
- [
557
- `Total cost (${X(((e = C.currentCountry) == null ? void 0 : e.value) ?? xe) === "MYR" ? "RM" : X(((t = C.currentCountry) == null ? void 0 : t.value) ?? xe)})`
558
- ]
559
- );
560
- },
561
- size: 180,
562
- cell(e) {
563
- var l, s, r;
564
- const t = e.row.original, o = (r = (s = (l = i.value) == null ? void 0 : l.items) == null ? void 0 : s.find) == null ? void 0 : r.call(s, (n) => n.sku._id === t.sku._id);
565
- return oe.value ? z[(o == null ? void 0 : o.sku._id) ?? ""] ? Y(
566
- le.FmTextField,
567
- {
568
- style: {
569
- flex: "1 1 0%"
570
- },
571
- modelValue: +G((o == null ? void 0 : o.totalCost) ?? { amount: 1, precision: 0 }),
572
- "onUpdate:modelValue": (n) => {
573
- Ye(t.sku._id, n);
574
- },
575
- rules: [jo(0), oo(2)]
576
- },
577
- {
578
- append: Y(le.FmButton, {
579
- prependIcon: "close",
580
- variant: "tertiary",
581
- onClick: () => {
582
- var p;
583
- z[(o == null ? void 0 : o.sku._id) ?? ""] = !1;
584
- const n = ((p = i.value) == null ? void 0 : p.items) ?? [];
585
- i.value.items = n.map((x) => (U.enableTotalCost && (x.totalCost = H(x)), x));
586
- }
587
- })
588
- }
589
- ) : Y(
590
- "div",
591
- {
592
- class: "flex items-center gap-4"
593
- },
594
- [
595
- Y(le.FmButton, {
596
- prependIcon: "edit",
597
- variant: "tertiary",
598
- onClick: () => {
599
- z[(o == null ? void 0 : o.sku._id) ?? ""] = !0;
600
- }
601
- }),
602
- Y(
603
- "div",
604
- {
605
- class: "text-fm-color-typo-primary fm-typo-en-body-lg-400"
606
- },
607
- G((o == null ? void 0 : o.totalCost) ?? { amount: 1, precision: 0 })
608
- )
609
- ]
610
- ) : Y(
611
- "div",
612
- {
613
- style: {
614
- display: "flex",
615
- alignItems: "center",
616
- gap: "4px"
617
- }
618
- },
619
- [
620
- Y(
621
- "div",
622
- o != null && o.totalCost ? +G((o == null ? void 0 : o.totalCost) ?? { amount: 1, precision: 0 }) : "0.00"
623
- ),
624
- Y(
625
- le.FmTooltip,
626
- {
627
- content: g.lastClosingDate ? `Last closing was already done at ${dt(g.lastClosingDate)} ${Xt(g.lastClosingDate)}. You may no longer change total cost of this purchase order.` : "You may only change the total cost if you have done a closing with recent costing feature.",
628
- placement: "left",
629
- zIndex: 50
630
- },
631
- [
632
- Y(le.FmIcon, {
633
- name: "info",
634
- size: "sm",
635
- color: "typo-secondary"
636
- })
637
- ]
638
- )
639
- ]
640
- );
641
- },
642
- enableSorting: !1
643
- },
644
- {
645
- id: "Delete",
646
- header: "",
647
- cell(e) {
648
- return Y(le.FmButton, {
649
- class: "delete-button",
650
- type: "button",
651
- icon: "delete",
652
- variant: "tertiary",
653
- size: "md",
654
- onClick: () => {
655
- _e(to.Delete, e.row.original.sku._id);
656
- }
657
- });
658
- },
659
- enableSorting: !1,
660
- size: 40,
661
- meta: {
662
- cellClass: "",
663
- headerClass: ""
664
- }
665
- }
666
- ], ce = $(
667
- () => f.value ? Fe : Fe.filter((e) => e.id !== "Delete")
668
- ), qe = $(() => b.value === A.PURCHASE && U.enableTotalCost ? ce.value : ce.value.filter((e) => e.id !== "Cost")), ye = j();
669
- te({
670
- validateInputs: () => {
671
- var e, t;
672
- (t = (e = ye.value) == null ? void 0 : e.validateInputs) == null || t.call(e);
673
- },
674
- resetInputsValidation: () => {
675
- var e, t;
676
- (t = (e = ye.value) == null ? void 0 : e.resetInputsValidation) == null || t.call(e);
677
- },
678
- resetInputs: () => {
679
- var e, t;
680
- (t = (e = ye.value) == null ? void 0 : e.resetInputs) == null || t.call(e);
681
- }
682
- });
683
- const he = j(!1);
684
- ue(he, (e) => {
685
- e && (ze.value = !0, uo().finally(() => {
686
- ze.value = !1;
687
- }));
688
- });
689
- async function uo() {
690
- try {
691
- const { startDate: e, endDate: t } = Fo(3), s = (await y.getPurchaseOrders({ start: e, end: t })).filter(
692
- (n) => {
693
- var p, x;
694
- return n.status === yo.enum.COMPLETE && ((p = n.supplier) == null ? void 0 : p.internal) !== "warehouse" && ((x = n.supplier) == null ? void 0 : x.internal) !== "restaurant";
695
- }
696
- ).reduce((n, p) => {
697
- var re;
698
- const x = Gt(p._id), I = p.supplier._id;
699
- for (const P of p.items) {
700
- if (!P.totalCost) continue;
701
- const K = n[P.sku._id] ?? {}, w = K[I] ?? [], O = P.measurement ? tt(P.quantity, P.measurement.conversion) : P.quantity;
702
- w.push({
703
- date: ((re = x == null ? void 0 : x.toISOString) == null ? void 0 : re.call(x)) ?? "",
704
- pricePerUnit: {
705
- ...Zt(P.totalCost, O),
706
- currency: P.totalCost.currency
707
- },
708
- totalUnits: O,
709
- unit: P.sku.unit
710
- }), K[I] = w, n[P.sku._id] = K;
711
- }
712
- return n;
713
- }, {}), r = Object.keys(s).reduce((n, p) => {
714
- const x = Object.keys(s[p]);
715
- for (const I of x) {
716
- const P = s[p][I].reduce(
717
- (w, O) => {
718
- const de = Vo(new Date(O.date)), N = pt(de);
719
- if (w[N]) {
720
- const be = tt(
721
- w[N].pricePerUnit,
722
- w[N].totalUnits
723
- ), Pe = tt(
724
- O.pricePerUnit,
725
- O.totalUnits
726
- ), it = Jt(
727
- be,
728
- Pe
729
- ), me = Jt(w[N].totalUnits, O.totalUnits), je = {
730
- ...Zt(it, me),
731
- currency: O.pricePerUnit.currency
732
- };
733
- w[N].totalUnits = me, w[N].pricePerUnit = je;
734
- } else
735
- w[N] = O;
736
- return w[N].date = de.toISOString(), w;
737
- },
738
- {}
739
- );
740
- n[p] ?? (n[p] = {});
741
- const K = Po(3).map((w) => pt(w));
742
- n[p][I] = K.map((w) => P[w] ? P[w] : {
743
- date: w
744
- }), Object.values(P).sort((w, O) => O.date.localeCompare(w.date)).slice(0, 3).reverse();
745
- }
746
- return n;
747
- }, {});
748
- Ve.value = r;
749
- } catch {
750
- we.open({
751
- title: "Something went wrong",
752
- message: "Cannot retrieve supplier purchase history. Please try again."
753
- }), he.value = !1;
754
- }
755
- }
756
- const ze = j(!1), Ve = j({});
757
- function Le(e) {
758
- return e.column.columnDef.meta;
759
- }
760
- const L = $({
761
- get() {
762
- var e, t;
763
- return (e = g.modelValue) != null && e.effectiveAt ? new Date((t = g.modelValue) == null ? void 0 : t.effectiveAt) : null;
764
- },
765
- set(e) {
766
- i.value.effectiveAt = (e == null ? void 0 : e.toISOString()) ?? null;
767
- }
768
- }), lt = $({
769
- get() {
770
- return !!L.value;
771
- },
772
- set(e) {
773
- e ? L.value = /* @__PURE__ */ new Date() : L.value = null;
774
- }
775
- }), nt = $({
776
- get() {
777
- return L.value === null ? "" : dt(L.value);
778
- },
779
- set(e) {
780
- e ? L.value = /* @__PURE__ */ new Date(`${e} ${rt.value}`) : L.value = null;
781
- }
782
- }), rt = $({
783
- get() {
784
- return L.value === null ? "" : To(L.value);
785
- },
786
- set(e) {
787
- e ? L.value = /* @__PURE__ */ new Date(`${nt.value} ${e}`) : L.value = null;
788
- }
789
- }), _t = $(() => {
790
- var e;
791
- return (e = k._currentLocation) == null ? void 0 : e.dbName.startsWith("restaurant");
792
- });
793
- return (e, t) => {
794
- const o = S("FmChip"), l = S("FmSelect"), s = S("FmMenuItem"), r = S("FmTextField"), n = S("FmTextarea"), p = S("FmSwitch"), x = S("FmDatePicker"), I = S("FmTimePicker"), re = S("FmFormGroup"), P = S("FmIcon"), K = S("FmButton"), w = S("FmCard"), O = S("FmStepperField"), de = S("FmPopover"), N = S("FmLabel"), be = S("FmSpacer"), Pe = S("FmTable"), it = S("FmForm");
795
- return _(), W(it, {
796
- ref_key: "formRef",
797
- ref: ye,
798
- onReset: t[14] || (t[14] = (me) => b.value = d(A).PURCHASE),
799
- onValidationSuccess: t[15] || (t[15] = (me) => se("validation-success")),
800
- disabled: V.value
801
- }, {
802
- default: T(() => {
803
- var me, je, gt, yt;
804
- return [
805
- a("div", ds, [
806
- a("div", ms, [
807
- ps,
808
- a("div", fs, [
809
- u(o, {
810
- label: d(k).currentLocation.name,
811
- icon: "storefront",
812
- compact: ""
813
- }, null, 8, ["label"]),
814
- (je = (me = d(C).currentRestaurant) == null ? void 0 : me.value) != null && je.posVersion ? (_(), W(o, {
815
- key: 0,
816
- label: `POS v${(yt = (gt = d(C).currentRestaurant) == null ? void 0 : gt.value) == null ? void 0 : yt.posVersion}`,
817
- icon: "point_of_sale",
818
- compact: ""
819
- }, null, 8, ["label"])) : B("", !0),
820
- e.lastClosingDate ? (_(), W(o, {
821
- key: 1,
822
- label: `Last closing: ${d(dt)(e.lastClosingDate)} ${d(Xt)(e.lastClosingDate)}`,
823
- icon: "calendar_month",
824
- compact: ""
825
- }, null, 8, ["label"])) : B("", !0)
826
- ]),
827
- vs,
828
- a("div", _s, [
829
- u(l, {
830
- items: Q,
831
- rules: [d(et)()],
832
- "label-mark": "required",
833
- label: "Transfer type",
834
- modelValue: b.value,
835
- "onUpdate:modelValue": t[0] || (t[0] = (v) => b.value = v),
836
- disabled: V.value || !f.value,
837
- "data-cy": "fm-select-transaction-type"
838
- }, null, 8, ["rules", "modelValue", "disabled"]),
839
- u(l, {
840
- label: b.value === d(A).PURCHASE ? "Supplier" : "Transfer From",
841
- items: c.value,
842
- modelValue: D.value,
843
- "onUpdate:modelValue": t[1] || (t[1] = (v) => D.value = v),
844
- disabled: V.value || !f.value,
845
- rules: [d(et)()],
846
- "label-mark": "required"
847
- }, {
848
- "menu-wrapper": T(({ handleItemChange: v }) => [
849
- (_(!0), F($e, null, ot(c.value, (h) => (_(), W(s, {
850
- key: h.value,
851
- "model-value": h.value === D.value,
852
- disabled: h.disabled,
853
- label: h.label,
854
- "onUpdate:modelValue": (pe) => v(pe, h)
855
- }, null, 8, ["model-value", "disabled", "label", "onUpdate:modelValue"]))), 128))
856
- ]),
857
- _: 1
858
- }, 8, ["label", "items", "modelValue", "disabled", "rules"]),
859
- u(r, {
860
- label: "Reference",
861
- modelValue: i.value.ref,
862
- "onUpdate:modelValue": t[2] || (t[2] = (v) => i.value.ref = v),
863
- "label-mark": "optional",
864
- disabled: V.value || !f.value
865
- }, null, 8, ["modelValue", "disabled"]),
866
- u(n, {
867
- label: "Remark",
868
- modelValue: ve.value,
869
- "onUpdate:modelValue": t[3] || (t[3] = (v) => ve.value = v),
870
- "label-mark": "optional",
871
- "max-length": 240,
872
- disabled: V.value || !f.value,
873
- "show-word-count": ""
874
- }, null, 8, ["modelValue", "disabled"]),
875
- d(U).enableBackdatePo ? (_(), F("div", gs, [
876
- a("div", ys, [
877
- u(p, {
878
- modelValue: lt.value,
879
- "onUpdate:modelValue": t[4] || (t[4] = (v) => lt.value = v),
880
- label: "Backdate transfer",
881
- sublabel: "Apply transfer to older date",
882
- "label-placement": "right",
883
- disabled: V.value || !f.value || _t.value && !e.lastClosingDate
884
- }, null, 8, ["modelValue", "disabled"]),
885
- hs,
886
- lt.value ? (_(), F("div", bs, [
887
- a("div", xs, [
888
- u(x, {
889
- modelValue: nt.value,
890
- "onUpdate:modelValue": t[5] || (t[5] = (v) => nt.value = v)
891
- }, null, 8, ["modelValue"])
892
- ]),
893
- a("div", Cs, [
894
- u(I, {
895
- modelValue: rt.value,
896
- "onUpdate:modelValue": t[6] || (t[6] = (v) => rt.value = v)
897
- }, null, 8, ["modelValue"])
898
- ])
899
- ])) : B("", !0)
900
- ]),
901
- L.value ? (_(), W(re, {
902
- key: 0,
903
- modelValue: L.value,
904
- "onUpdate:modelValue": t[7] || (t[7] = (v) => L.value = v),
905
- rules: [d(zo)(new Date(e.lastClosingDate), /* @__PURE__ */ new Date())]
906
- }, null, 8, ["modelValue", "rules"])) : B("", !0),
907
- _t.value && !e.lastClosingDate ? (_(), F("div", ks, [
908
- u(P, {
909
- name: "error",
910
- size: "sm",
911
- class: "text-fm-color-typo-warning"
912
- }),
913
- ws
914
- ])) : B("", !0)
915
- ])) : B("", !0)
916
- ])
917
- ]),
918
- a("div", Ss, [
919
- u(re, {
920
- "model-value": i.value.items,
921
- rules: [
922
- function(h) {
923
- return h && h.length > 0 || "Must have at least one item!";
924
- }
925
- ]
926
- }, {
927
- default: T(() => {
928
- var v;
929
- return [
930
- a("div", Ds, [
931
- Fs,
932
- b.value === d(A).PURCHASE && f.value && d(U).enableTotalCost ? (_(), F("div", Vs, [
933
- u(p, {
934
- label: ze.value ? "Fetching data..." : "Compare price history",
935
- "prepend-icon": "compare_arrows",
936
- "label-placement": "right",
937
- "model-value": he.value,
938
- "onUpdate:modelValue": t[8] || (t[8] = (h) => he.value = h),
939
- disabled: ze.value || !((v = i.value) != null && v.items) || i.value.items.length === 0
940
- }, null, 8, ["label", "model-value", "disabled"])
941
- ])) : B("", !0)
942
- ])
943
- ];
944
- }),
945
- _: 1
946
- }, 8, ["model-value", "rules"]),
947
- a("div", Ps, [
948
- u(K, {
949
- disabled: V.value || !f.value,
950
- label: "Add Item",
951
- "prepend-icon": "add",
952
- variant: "plain",
953
- class: "border-2 rounded-lg border-fm-color-primary",
954
- onClick: t[9] || (t[9] = (v) => Oe()),
955
- size: "md"
956
- }, null, 8, ["disabled"]),
957
- u(de, {
958
- disabled: V.value || !f.value,
959
- class: "flex",
960
- "show-popover": ie.value,
961
- onPopoverChanged: t[13] || (t[13] = (v) => ie.value = v)
962
- }, {
963
- "popover-button": T(() => [
964
- u(w, {
965
- class: Je([
966
- "flex justify-center items-center gap-[8px] border-2 py-1 px-12 rounded-lg cursor-not-allowed",
967
- V.value || !f.value ? " border-fm-color-neutral-gray-200" : "border-fm-color-primary"
968
- ]),
969
- variant: "flat"
970
- }, {
971
- default: T(() => [
972
- u(ts, {
973
- size: 24,
974
- color: V.value || !f.value ? "#c7c7cc" : "#ff7823"
975
- }, null, 8, ["color"]),
976
- a("button", {
977
- type: "button",
978
- disabled: V.value,
979
- class: Je([
980
- "fm-typo-cn-body-lg-600",
981
- V.value || !f.value ? " text-fm-color-neutral-gray-200 cursor-not-allowed" : "text-fm-color-primary"
982
- ])
983
- }, " Forecast stock ", 10, Ts)
984
- ]),
985
- _: 1
986
- }, 8, ["class"])
987
- ]),
988
- default: T(() => [
989
- a("div", Us, [
990
- a("div", Rs, [
991
- u(Uo, { "z-index": 99 }, {
992
- default: T(() => [
993
- As
994
- ]),
995
- _: 1
996
- }),
997
- u(K, {
998
- icon: "close",
999
- size: "md",
1000
- variant: "tertiary",
1001
- onClick: t[10] || (t[10] = (v) => ie.value = !1)
1002
- })
1003
- ]),
1004
- u(O, {
1005
- modelValue: ne.value,
1006
- "onUpdate:modelValue": t[11] || (t[11] = (v) => ne.value = v),
1007
- label: "Enter day to forecast stock",
1008
- rules: [d(Lo)(1)]
1009
- }, {
1010
- "helper-text": T(() => [
1011
- a("div", $s, [
1012
- u(P, {
1013
- name: "warning",
1014
- size: "sm",
1015
- class: "text-fm-color-system-warning-300"
1016
- }),
1017
- Ms
1018
- ])
1019
- ]),
1020
- _: 1
1021
- }, 8, ["modelValue", "rules"]),
1022
- a("div", Es, [
1023
- Os,
1024
- u(K, {
1025
- label: "Cancel",
1026
- variant: "tertiary",
1027
- onClick: t[12] || (t[12] = (v) => ie.value = !1)
1028
- }),
1029
- u(K, {
1030
- label: "Generate",
1031
- onClick: Ee
1032
- })
1033
- ])
1034
- ])
1035
- ]),
1036
- _: 1
1037
- }, 8, ["disabled", "show-popover"])
1038
- ]),
1039
- R.value.length ? (_(), F("div", Ns, [
1040
- (_(), W(Pe, {
1041
- "row-data": R.value,
1042
- "column-defs": qe.value,
1043
- key: b.value,
1044
- "data-cy": "fm-table-transfer-items",
1045
- "hide-footer": "",
1046
- "page-size": R.value.length
1047
- }, {
1048
- "table-row": T((v) => {
1049
- var h, pe;
1050
- return [
1051
- a("tr", {
1052
- class: Je(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm", {
1053
- "bg-fm-color-neutral-gray-100": v.getIsSelected()
1054
- }])
1055
- }, [
1056
- (_(!0), F($e, null, ot(v.getVisibleCells(), (ae) => {
1057
- var Te, fe, Ue, Re;
1058
- return _(), F("td", {
1059
- key: ae.id,
1060
- class: Je([
1061
- "h-[52px] px-16 text-fm-color-typo-primary",
1062
- ((Te = Le(ae)) == null ? void 0 : Te.cellClass) ?? "px-16"
1063
- ]),
1064
- style: lo({
1065
- width: (fe = Le(ae)) == null ? void 0 : fe.width,
1066
- maxWidth: (Ue = Le(ae)) == null ? void 0 : Ue.maxWidth,
1067
- textAlign: ((Re = Le(ae)) == null ? void 0 : Re.textAlign) ?? "left"
1068
- })
1069
- }, [
1070
- a("span", Hs, [
1071
- u(d(ee), {
1072
- render: ae.column.columnDef.cell,
1073
- props: ae.getContext()
1074
- }, null, 8, ["render", "props"])
1075
- ])
1076
- ], 6);
1077
- }), 128))
1078
- ], 2),
1079
- b.value === d(A).PURCHASE && he.value && Object.keys(Ve.value[(h = v.original.sku) == null ? void 0 : h._id] ?? {}).length > 0 ? (_(), F("tr", Is, [
1080
- a("td", {
1081
- colspan: v.getVisibleCells().length
1082
- }, [
1083
- u(so, {
1084
- prices: Ve.value[(pe = v.original.sku) == null ? void 0 : pe._id]
1085
- }, null, 8, ["prices"])
1086
- ], 8, Ys)
1087
- ])) : B("", !0)
1088
- ];
1089
- }),
1090
- "list-row": T((v) => [
1091
- u(ro, { row: v }, {
1092
- default: T((h) => {
1093
- var pe, ae, Te, fe, Ue, Re, ht, bt, Qe, xt, Ct, kt, wt, Ke, St, Dt, Ft, Vt, Be, Pt, Tt, Ut, Rt, Ge, At, $t, Mt, Et, Ot, Nt, We, Ht, It, Yt, qt, zt, Ze, Lt, jt, Qt;
1094
- return [
1095
- a("div", qs, [
1096
- a("div", zs, [
1097
- a("div", Ls, Z(v.original.sku.name), 1),
1098
- a("div", null, [
1099
- u(d(ee), {
1100
- render: (Te = (ae = (pe = h.Delete) == null ? void 0 : pe.column) == null ? void 0 : ae.columnDef) == null ? void 0 : Te.cell,
1101
- props: (Ue = (fe = h.Delete) == null ? void 0 : fe.getContext) == null ? void 0 : Ue.call(fe)
1102
- }, null, 8, ["render", "props"])
1103
- ])
1104
- ]),
1105
- a("div", js, [
1106
- a("div", Qs, [
1107
- u(N, { label: "Code" }),
1108
- u(d(ee), {
1109
- render: (bt = (ht = (Re = h.code) == null ? void 0 : Re.column) == null ? void 0 : ht.columnDef) == null ? void 0 : bt.cell,
1110
- props: (xt = (Qe = h.code) == null ? void 0 : Qe.getContext) == null ? void 0 : xt.call(Qe)
1111
- }, null, 8, ["render", "props"])
1112
- ]),
1113
- a("div", Ks, [
1114
- u(N, { label: "Name" }),
1115
- u(d(ee), {
1116
- render: (wt = (kt = (Ct = h.Name) == null ? void 0 : Ct.column) == null ? void 0 : kt.columnDef) == null ? void 0 : wt.cell,
1117
- props: (St = (Ke = h.Name) == null ? void 0 : Ke.getContext) == null ? void 0 : St.call(Ke)
1118
- }, null, 8, ["render", "props"])
1119
- ]),
1120
- a("div", Bs, [
1121
- u(N, { label: "Amount" }),
1122
- u(d(ee), {
1123
- render: (Vt = (Ft = (Dt = h.Amount) == null ? void 0 : Dt.column) == null ? void 0 : Ft.columnDef) == null ? void 0 : Vt.cell,
1124
- props: (Pt = (Be = h.Amount) == null ? void 0 : Be.getContext) == null ? void 0 : Pt.call(Be)
1125
- }, null, 8, ["render", "props"])
1126
- ]),
1127
- a("div", Gs, [
1128
- u(N, { label: "Unit" }),
1129
- u(d(ee), {
1130
- render: (Rt = (Ut = (Tt = h.Unit) == null ? void 0 : Tt.column) == null ? void 0 : Ut.columnDef) == null ? void 0 : Rt.cell,
1131
- props: (At = (Ge = h.Unit) == null ? void 0 : Ge.getContext) == null ? void 0 : At.call(Ge)
1132
- }, null, 8, ["render", "props"])
1133
- ]),
1134
- b.value === d(A).PURCHASE && h.Cost ? (_(), F("div", Ws, [
1135
- typeof ((Et = (Mt = ($t = h.Cost) == null ? void 0 : $t.column) == null ? void 0 : Mt.columnDef) == null ? void 0 : Et.header) == "function" ? (_(), F("div", Zs, [
1136
- (_(), W(vo(
1137
- (It = (Nt = (Ot = h.Cost) == null ? void 0 : Ot.column) == null ? void 0 : Nt.columnDef) == null ? void 0 : It.header(
1138
- (Ht = (We = h.Cost) == null ? void 0 : We.getContext) == null ? void 0 : Ht.call(We)
1139
- )
1140
- )))
1141
- ])) : B("", !0),
1142
- u(d(ee), {
1143
- render: (zt = (qt = (Yt = h.Cost) == null ? void 0 : Yt.column) == null ? void 0 : qt.columnDef) == null ? void 0 : zt.cell,
1144
- props: (Lt = (Ze = h.Cost) == null ? void 0 : Ze.getContext) == null ? void 0 : Lt.call(Ze)
1145
- }, null, 8, ["render", "props"])
1146
- ])) : B("", !0)
1147
- ]),
1148
- b.value === d(A).PURCHASE && he.value && Object.keys(Ve.value[(jt = v.original.sku) == null ? void 0 : jt._id] ?? {}).length > 0 ? (_(), F($e, { key: 0 }, [
1149
- u(be, { class: "h-8" }),
1150
- u(so, {
1151
- prices: Ve.value[(Qt = v.original.sku) == null ? void 0 : Qt._id]
1152
- }, null, 8, ["prices"])
1153
- ], 64)) : B("", !0)
1154
- ])
1155
- ];
1156
- }),
1157
- _: 2
1158
- }, 1032, ["row"])
1159
- ]),
1160
- _: 1
1161
- }, 8, ["row-data", "column-defs", "page-size"]))
1162
- ])) : B("", !0)
1163
- ])
1164
- ])
1165
- ];
1166
- }),
1167
- _: 1
1168
- }, 8, ["disabled"]);
1169
- };
1170
- }
1171
- }), Xs = { class: "flex items-center" }, ea = { class: "fm-typo-en-title-md-800" }, ta = { class: "flex gap-4" }, oa = /* @__PURE__ */ ke({
1172
- __name: "TransferDialog",
1173
- props: {
1174
- mode: {},
1175
- modelValue: {},
1176
- show: { type: Boolean },
1177
- lastClosingDate: {}
1178
- },
1179
- emits: ["update:show", "submitted"],
1180
- setup(q, { expose: te, emit: J }) {
1181
- const k = q, M = J, C = no(), y = vt(), U = io(), z = bo(), g = ft();
1182
- async function f(m) {
1183
- if (m) {
1184
- i.value = !0;
1185
- try {
1186
- await U.readSuppliers(), i.value = !1;
1187
- } catch {
1188
- y.open({
1189
- title: "Unable to fetch list of suppliers",
1190
- message: "Try to refresh page to retry operation",
1191
- type: "error"
1192
- });
1193
- }
1194
- }
1195
- }
1196
- g.watchLocation(f);
1197
- const oe = No(k, "show"), se = j(k.modelValue ?? {});
1198
- ue([() => k.modelValue], () => {
1199
- se.value = k.modelValue ?? {};
1200
- });
1201
- const i = j(!1), ve = $(() => {
1202
- switch (k.mode) {
1203
- case Ae.CREATE:
1204
- return "Add transfer";
1205
- case Ae.READ:
1206
- return "View transfer";
1207
- case Ae.UPDATE:
1208
- return "Edit transfer";
1209
- }
1210
- return "";
1211
- }), V = j();
1212
- te({
1213
- validateInputs: () => {
1214
- var m, c;
1215
- (c = (m = V.value) == null ? void 0 : m.validateInputs) == null || c.call(m);
1216
- },
1217
- resetInputsValidation: () => {
1218
- var m, c;
1219
- (c = (m = V.value) == null ? void 0 : m.resetInputsValidation) == null || c.call(m);
1220
- },
1221
- resetInputs: () => {
1222
- var m, c;
1223
- (c = (m = V.value) == null ? void 0 : m.resetInputs) == null || c.call(m);
1224
- }
1225
- });
1226
- async function R() {
1227
- const m = se.value;
1228
- i.value = !0, (m.supplier.internal === "warehouse" || m.supplier.internal === "restaurant") && (m.items = m.items.map(({ totalCost: c, ...D }) => D));
1229
- try {
1230
- await C.createPurchaseOrder(m), await new Promise((c) => setTimeout(c, 1e3)), y.open({
1231
- title: "Created",
1232
- message: "Your transfer draft has been created!",
1233
- type: "success"
1234
- }), M("update:show", !1), M("submitted");
1235
- } catch (c) {
1236
- y.open({
1237
- title: "Cannot create purchase order",
1238
- message: "Report to system administrator for troubleshooting.",
1239
- type: "error"
1240
- }), console.error("Error in creating purchase order", c);
1241
- } finally {
1242
- i.value = !1;
1243
- }
1244
- }
1245
- async function E() {
1246
- const m = se.value;
1247
- i.value = !0, (m.supplier.internal === "warehouse" || m.supplier.internal === "restaurant") && (m.items = m.items.map(({ totalCost: c, ...D }) => D));
1248
- try {
1249
- await C.updatePurchaseOrder(m), await new Promise((c) => setTimeout(c, 1e3)), y.open({
1250
- title: "Updated",
1251
- message: "Your transfer draft has been updated!",
1252
- type: "success"
1253
- }), M("update:show", !1), M("submitted");
1254
- } catch (c) {
1255
- y.open({
1256
- title: "Cannot update purchase order",
1257
- message: "Report to system administrator for troubleshooting.",
1258
- type: "error"
1259
- }), console.error("Error in updating purchase order", c);
1260
- } finally {
1261
- i.value = !1;
1262
- }
1263
- }
1264
- function Q() {
1265
- switch (k.mode) {
1266
- case Ae.CREATE:
1267
- return R();
1268
- case Ae.UPDATE:
1269
- return E();
1270
- }
1271
- }
1272
- function b() {
1273
- var m, c;
1274
- (c = (m = V.value) == null ? void 0 : m.validateInputs) == null || c.call(m);
1275
- }
1276
- return (m, c) => {
1277
- const D = S("FmButton"), X = S("FmSideSheet");
1278
- return _(), W(X, {
1279
- modelValue: d(oe),
1280
- "onUpdate:modelValue": c[2] || (c[2] = (H) => _o(oe) ? oe.value = H : null),
1281
- "dismiss-away": "",
1282
- "close-button": "",
1283
- "max-width": 900
1284
- }, {
1285
- "side-sheet-header": T(() => [
1286
- a("div", Xs, [
1287
- a("div", ea, Z(ve.value), 1)
1288
- ])
1289
- ]),
1290
- default: T(() => [
1291
- (_(), W(Js, {
1292
- class: "w-full",
1293
- ref_key: "formRef",
1294
- ref: V,
1295
- onValidationSuccess: Q,
1296
- modelValue: se.value,
1297
- "onUpdate:modelValue": c[0] || (c[0] = (H) => se.value = H),
1298
- disabled: i.value,
1299
- suppliers: d(U).suppliers,
1300
- skus: d(z).skus,
1301
- key: se.value._id ?? "",
1302
- "last-closing-date": m.lastClosingDate
1303
- }, null, 8, ["modelValue", "disabled", "suppliers", "skus", "last-closing-date"]))
1304
- ]),
1305
- "side-sheet-footer": T(() => [
1306
- a("div", ta, [
1307
- u(D, {
1308
- loading: i.value,
1309
- label: "Save",
1310
- onClick: b
1311
- }, null, 8, ["loading"]),
1312
- u(D, {
1313
- disabled: i.value,
1314
- variant: "tertiary",
1315
- label: "Close",
1316
- onClick: c[1] || (c[1] = (H) => M("update:show", !1))
1317
- }, null, 8, ["disabled"])
1318
- ])
1319
- ]),
1320
- _: 1
1321
- }, 8, ["modelValue"]);
1322
- };
1323
- }
1324
- }), sa = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, aa = { class: "px-8 flex gap-8 items-center xs:gap-0 xs:flex-col-reverse sm:gap-0 sm:flex-col-reverse" }, la = { class: "xs:w-full sm:w-full flex gap-8 items-center overflow-x-auto no-scrollbar py-8" }, na = { class: "flex-1 w-full" }, ra = { class: "flex flex-col py-8" }, ia = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ua = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, ca = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, da = {
1325
- key: 0,
1326
- class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
1327
- }, ma = { class: "pt-8" }, ao = "ReceiveRequestViewSearchCriteria", Ta = /* @__PURE__ */ ke({
1328
- __name: "ReceiveRequestView",
1329
- setup(q) {
1330
- const te = vt();
1331
- Xe.object({
1332
- name: Xe.string().optional().nullable(),
1333
- startDate: Xe.string().optional().nullable(),
1334
- endDate: Xe.string().optional().nullable()
1335
- });
1336
- const J = xo();
1337
- function k() {
1338
- const R = {
1339
- name: "",
1340
- ...st()
1341
- }, E = J.getItem(ao);
1342
- if (!E)
1343
- return R;
1344
- try {
1345
- return JSON.parse(E);
1346
- } catch {
1347
- return R;
1348
- }
1349
- }
1350
- function M() {
1351
- J.setItem(ao, JSON.stringify(C.value));
1352
- }
1353
- const C = j(k()), y = Co("receive/request", C.value), { columnDefs: U } = ko("receive/request", y), z = ft();
1354
- async function g() {
1355
- const R = `inventory-record_${mt(C.value.startDate).format("DD-MM-YYYY_HH-mm")}-${mt(C.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, E = y.purchaseOrders.value.flatMap(
1356
- (Q) => Q.items.map((b) => {
1357
- const m = mt(Ao(Q._id)).format("DD MMM YYYY"), c = G(
1358
- So(b.sku, Q.deliveryOrder || [])
1359
- ), D = G(b.quantity);
1360
- return {
1361
- "SKU Code": b.code,
1362
- "SKU Name": b.name,
1363
- "PO #": Q.seqNumber,
1364
- Date: m,
1365
- Status: Q.status,
1366
- Reference: Q.ref,
1367
- "Received Quantity": c,
1368
- "Ordered Quantity": D,
1369
- Unit: b.sku.unit.abbrev
1370
- };
1371
- })
1372
- );
1373
- await $o(
1374
- [
1375
- {
1376
- name: "purchases",
1377
- data: E,
1378
- columns: [
1379
- "SKU Code",
1380
- "SKU Name",
1381
- "PO #",
1382
- "Date",
1383
- "Status",
1384
- "Reference",
1385
- "Received Quantity",
1386
- "Ordered Quantity",
1387
- "Unit"
1388
- ]
1389
- }
1390
- ],
1391
- R
1392
- ), te.open({
1393
- title: "Success",
1394
- message: `Exported ${R}`,
1395
- type: "success"
1396
- });
1397
- }
1398
- const f = j(st()), oe = j("");
1399
- ue([() => f.value], ([R]) => {
1400
- !R.startDate || !R.endDate || (C.value.startDate = R.startDate, C.value.endDate = R.endDate, y.updateDateRange(
1401
- C.value.startDate,
1402
- C.value.endDate
1403
- ), M());
1404
- }), ue([() => oe.value], () => {
1405
- M();
1406
- });
1407
- function se(R) {
1408
- R === "create" && y.promptCreateTransferDialog();
1409
- }
1410
- const { breakpoints: i } = Ho(), ve = $(() => i.value.xs || i.value.sm ? 10 : 20), V = qo();
1411
- return (R, E) => {
1412
- const Q = S("FmTableToolbar"), b = S("FmTable");
1413
- return _(), W(Mo, {
1414
- title: "Receive and Request",
1415
- actions: [{ label: "Create transfer", value: "create", isPrimary: !0, prependIcon: "add" }],
1416
- "onClick:action": se
1417
- }, {
1418
- default: T(() => {
1419
- var m;
1420
- return [
1421
- a("div", sa, [
1422
- a("div", aa, [
1423
- a("div", la, [
1424
- u(Eo),
1425
- u(Go, {
1426
- "model-value": f.value,
1427
- "onUpdate:modelValue": E[0] || (E[0] = (c) => f.value = c)
1428
- }, null, 8, ["model-value"])
1429
- ]),
1430
- a("div", na, [
1431
- u(Q, {
1432
- searchable: "",
1433
- "search-model": oe.value,
1434
- "onUpdate:searchModel": E[1] || (E[1] = (c) => oe.value = c),
1435
- actions: [{ label: "Export", icon: "ios_share", key: "export" }],
1436
- "onClick:actionExport": g
1437
- }, null, 8, ["search-model"])
1438
- ])
1439
- ]),
1440
- (_(), W(b, {
1441
- style: lo(d(V).tableHeight),
1442
- "column-defs": d(U),
1443
- "row-data": d(y).purchaseOrders.value,
1444
- "search-value": oe.value,
1445
- loading: !d(z)._currentLocation || d(y).loading.value,
1446
- onRowClick: E[2] || (E[2] = (c) => d(y).promptShowTransferDetails(c.original)),
1447
- key: (m = d(z)._currentLocation) == null ? void 0 : m.dbName,
1448
- "page-size": ve.value
1449
- }, {
1450
- "list-row": T((c) => [
1451
- u(ro, {
1452
- row: c,
1453
- onRowClick: d(y).promptShowTransferDetails
1454
- }, {
1455
- default: T((D) => {
1456
- var X, H, Me, ne, ie, we, Ee, Oe, _e, Se, De, Ne, He, ge, Ie, Ye, at, Fe, ce, qe;
1457
- return [
1458
- a("div", ra, [
1459
- a("div", ia, [
1460
- u(d(ee), {
1461
- render: (Me = (H = (X = D._id) == null ? void 0 : X.column) == null ? void 0 : H.columnDef) == null ? void 0 : Me.cell,
1462
- props: (ie = (ne = D._id) == null ? void 0 : ne.getContext) == null ? void 0 : ie.call(ne)
1463
- }, null, 8, ["render", "props"])
1464
- ]),
1465
- a("div", ua, [
1466
- u(d(ee), {
1467
- render: (Oe = (Ee = (we = D.supplier_name) == null ? void 0 : we.column) == null ? void 0 : Ee.columnDef) == null ? void 0 : Oe.cell,
1468
- props: (Se = (_e = D.supplier_name) == null ? void 0 : _e.getContext) == null ? void 0 : Se.call(_e)
1469
- }, null, 8, ["render", "props"])
1470
- ]),
1471
- a("div", ca, Z(c.original.items.map((ye) => `${ye.name}`).join(", ")), 1),
1472
- c.original.ref ? (_(), F("div", da, [
1473
- u(d(ee), {
1474
- render: (He = (Ne = (De = D.ref) == null ? void 0 : De.column) == null ? void 0 : Ne.columnDef) == null ? void 0 : He.cell,
1475
- props: (Ie = (ge = D.ref) == null ? void 0 : ge.getContext) == null ? void 0 : Ie.call(ge)
1476
- }, null, 8, ["render", "props"])
1477
- ])) : B("", !0),
1478
- a("div", ma, [
1479
- u(d(ee), {
1480
- render: (Fe = (at = (Ye = D.status) == null ? void 0 : Ye.column) == null ? void 0 : at.columnDef) == null ? void 0 : Fe.cell,
1481
- props: (qe = (ce = D.status) == null ? void 0 : ce.getContext) == null ? void 0 : qe.call(ce)
1482
- }, null, 8, ["render", "props"])
1483
- ])
1484
- ])
1485
- ];
1486
- }),
1487
- _: 2
1488
- }, 1032, ["row", "onRowClick"])
1489
- ]),
1490
- _: 1
1491
- }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
1492
- ]),
1493
- (_(), W(go, { to: "body" }, [
1494
- u(oa, Bt(d(y).transferDialogProps.value, {
1495
- onSubmitted: d(y).fetchData
1496
- }), null, 16, ["onSubmitted"]),
1497
- u(wo, Bt(d(y).transferDetailsProps.value, {
1498
- onSubmitted: d(y).fetchData
1499
- }), null, 16, ["onSubmitted"])
1500
- ]))
1501
- ];
1502
- }),
1503
- _: 1
1504
- });
1505
- };
1506
- }
1507
- });
1508
- export {
1509
- Ta as default
1510
- };