@feedmepos/mf-report 5.4.26-beta.0 → 5.4.26-beta.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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as H, mergeModels as _e, useModel as Q, computed as z, resolveComponent as V, createElementBlock as D, openBlock as d, createElementVNode as t, createCommentVNode as R, normalizeClass as Ke, Fragment as L, renderList as X, createBlock as A, createVNode as i, withCtx as xe, toDisplayString as T, unref as f, ref as B, watch as ge, isRef as he, h as I, resolveDynamicComponent as be, mergeProps as Le, onMounted as Ee } from "vue";
1
+ import { defineComponent as H, mergeModels as _e, useModel as Q, computed as z, resolveComponent as V, createElementBlock as F, openBlock as c, createElementVNode as t, createCommentVNode as R, normalizeClass as Ke, Fragment as L, renderList as X, createBlock as A, createVNode as i, withCtx as xe, toDisplayString as T, unref as f, ref as B, watch as ge, isRef as he, h as I, resolveDynamicComponent as be, mergeProps as Le, onMounted as Ee } from "vue";
2
2
  import { useRouter as pe, useRoute as ze } from "vue-router";
3
3
  import { u as W, I as de, d as je, e as we, f as ke, b as ue, q as Ye, m as qe, p as Ve, r as $e, s as Se, t as Ce, v as Ae, w as He, x as Xe, y as Qe, A as ve, z as Pe, B as Ge, E as Je } from "./global-loader-BKQvLNRz.js";
4
4
  import { u as Fe } from "./message-dialog-UoMWOnil.js";
@@ -33,65 +33,65 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
33
33
  modelModifiers: {}
34
34
  }),
35
35
  emits: /* @__PURE__ */ _e(["remove"], ["update:modelValue"]),
36
- setup(v, { emit: o }) {
37
- const e = Q(v, "modelValue"), n = v, w = z(
38
- () => Object.keys(n.options).map((_) => {
39
- const S = n.options[_];
36
+ setup(g, { emit: o }) {
37
+ const e = Q(g, "modelValue"), n = g, k = z(
38
+ () => Object.keys(n.options).map((x) => {
39
+ const D = n.options[x];
40
40
  return {
41
- placeholder: S.placeholder,
42
- key: _,
43
- editable: S.editable
41
+ placeholder: D.placeholder,
42
+ key: x,
43
+ editable: D.editable
44
44
  };
45
45
  })
46
- ), x = o;
47
- return (_, S) => {
48
- const h = V("FmTextField"), r = V("FmTooltip"), p = V("FmIcon");
49
- return d(), D("div", Ze, [
46
+ ), b = o;
47
+ return (x, D) => {
48
+ const w = V("FmTextField"), m = V("FmTooltip"), d = V("FmIcon");
49
+ return c(), F("div", Ze, [
50
50
  t("div", {
51
- class: Ke(`${v.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
51
+ class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
52
52
  }, [
53
- (d(!0), D(L, null, X(w.value, (k) => {
54
- var g;
55
- return d(), D(L, {
56
- key: k.key
53
+ (c(!0), F(L, null, X(k.value, (h) => {
54
+ var _;
55
+ return c(), F(L, {
56
+ key: h.key
57
57
  }, [
58
- k.editable ? (d(), D("div", {
58
+ h.editable ? (c(), F("div", {
59
59
  key: 0,
60
- class: Ke(`${v.removable ? "w-[50%]" : "w-[100%]"}`)
60
+ class: Ke(`${g.removable ? "w-[50%]" : "w-[100%]"}`)
61
61
  }, [
62
- i(h, {
63
- "model-value": e.value[k.key],
64
- placeholder: k.placeholder,
65
- type: v.type,
66
- rules: v.rules,
67
- "onUpdate:modelValue": (y) => {
68
- let c = y;
69
- v.type === "number" && (c = Number(y)), e.value = {
62
+ i(w, {
63
+ "model-value": e.value[h.key],
64
+ placeholder: h.placeholder,
65
+ type: g.type,
66
+ rules: g.rules,
67
+ "onUpdate:modelValue": (u) => {
68
+ let p = u;
69
+ g.type === "number" && (p = Number(u)), e.value = {
70
70
  ...e.value,
71
- [k.key]: c
71
+ [h.key]: p
72
72
  };
73
73
  }
74
74
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
75
- ], 2)) : (d(), A(r, {
75
+ ], 2)) : (c(), A(m, {
76
76
  key: 1,
77
- content: (g = e.value[k.key]) == null ? void 0 : g.toString(),
77
+ content: (_ = e.value[h.key]) == null ? void 0 : _.toString(),
78
78
  class: "w-[50%]"
79
79
  }, {
80
80
  default: xe(() => [
81
- t("div", et, T(e.value[k.key]), 1)
81
+ t("div", et, T(e.value[h.key]), 1)
82
82
  ]),
83
83
  _: 2
84
84
  }, 1032, ["content"]))
85
85
  ], 64);
86
86
  }), 128))
87
87
  ], 2),
88
- v.removable ? (d(), D("div", tt, [
89
- i(p, {
88
+ g.removable ? (c(), F("div", tt, [
89
+ i(d, {
90
90
  color: "system-error-300",
91
91
  class: "cursor-pointer",
92
92
  name: "close",
93
93
  size: "md",
94
- onClick: S[0] || (S[0] = (k) => x("remove"))
94
+ onClick: D[0] || (D[0] = (h) => b("remove"))
95
95
  })
96
96
  ])) : R("", !0)
97
97
  ]);
@@ -119,8 +119,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
119
119
  modelModifiers: {}
120
120
  }),
121
121
  emits: ["update:modelValue"],
122
- setup(v) {
123
- const { t: o } = W(), e = Q(v, "modelValue"), n = z(() => {
122
+ setup(g) {
123
+ const { t: o } = W(), e = Q(g, "modelValue"), n = z(() => {
124
124
  switch (e.value.name) {
125
125
  case de.AutoCount:
126
126
  case de.SQL:
@@ -130,34 +130,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
130
130
  return !1;
131
131
  }
132
132
  });
133
- return (w, x) => {
134
- var r, p;
135
- const _ = V("FmSwitch"), S = V("FmTextField"), h = V("FmTimePicker");
136
- return d(), D(L, null, [
133
+ return (k, b) => {
134
+ var m, d;
135
+ const x = V("FmSwitch"), D = V("FmTextField"), w = V("FmTimePicker");
136
+ return c(), F(L, null, [
137
137
  t("div", ot, [
138
- t("div", at, T(f(o)("report.integration.auto", { label: v.label })), 1),
139
- v.label == "upload" ? (d(), D("div", lt, T(f(o)("report.integration.lastUploadDate")) + ": " + T(v.lastUploadDate ? f(je)(v.lastUploadDate).format("MMMM D, YYYY h:mm A") : f(o)("report.integration.noData.title")), 1)) : R("", !0)
138
+ t("div", at, T(f(o)("report.integration.auto", { label: g.label })), 1),
139
+ g.label == "upload" ? (c(), F("div", lt, T(f(o)("report.integration.lastUploadDate")) + ": " + T(g.lastUploadDate ? f(je)(g.lastUploadDate).format("MMMM D, YYYY h:mm A") : f(o)("report.integration.noData.title")), 1)) : R("", !0)
140
140
  ]),
141
141
  t("div", nt, [
142
142
  t("div", st, T(f(o)("report.common.enable")), 1),
143
- i(_, {
143
+ i(x, {
144
144
  modelValue: e.value.enable,
145
- "onUpdate:modelValue": x[0] || (x[0] = (k) => e.value.enable = k),
145
+ "onUpdate:modelValue": b[0] || (b[0] = (h) => e.value.enable = h),
146
146
  style: { gap: "0px" }
147
147
  }, null, 8, ["modelValue"])
148
148
  ]),
149
- n.value ? (d(), D("div", it, [
149
+ n.value ? (c(), F("div", it, [
150
150
  t("div", rt, T(f(o)("report.common.email")), 1),
151
151
  t("div", mt, [
152
- i(S, {
152
+ i(D, {
153
153
  "model-value": (e.value.emails || []).join(","),
154
154
  placeholder: "Email",
155
- "onUpdate:modelValue": x[1] || (x[1] = (k) => {
155
+ "onUpdate:modelValue": b[1] || (b[1] = (h) => {
156
156
  switch (e.value.name) {
157
157
  case f(de).AutoCount:
158
158
  case f(de).SQL:
159
159
  case f(de).iFlexi_HRMS:
160
- e.value.emails = k.split(",");
160
+ e.value.emails = h.split(",");
161
161
  break;
162
162
  }
163
163
  })
@@ -166,13 +166,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
166
166
  ])) : R("", !0),
167
167
  t("div", ct, [
168
168
  t("div", dt, [
169
- t("div", pt, T(f(We)(v.label)) + " time ", 1),
169
+ t("div", pt, T(f(We)(g.label)) + " time ", 1),
170
170
  t("div", ut, [
171
- i(h, {
171
+ i(w, {
172
172
  class: "gap-[0px]",
173
- "model-value": f(je)().hour(((r = e.value.triggerTime) == null ? void 0 : r.hour) ?? 0).minute(((p = e.value.triggerTime) == null ? void 0 : p.minute) ?? 0).format("HH:mm"),
174
- "onUpdate:modelValue": x[2] || (x[2] = (k) => {
175
- k && (e.value.triggerTime.hour = Number(k.split(":")[0]), e.value.triggerTime.minute = Number(k.split(":")[1]));
173
+ "model-value": f(je)().hour(((m = e.value.triggerTime) == null ? void 0 : m.hour) ?? 0).minute(((d = e.value.triggerTime) == null ? void 0 : d.minute) ?? 0).format("HH:mm"),
174
+ "onUpdate:modelValue": b[2] || (b[2] = (h) => {
175
+ h && (e.value.triggerTime.hour = Number(h.split(":")[0]), e.value.triggerTime.minute = Number(h.split(":")[1]));
176
176
  })
177
177
  }, null, 8, ["model-value"])
178
178
  ])
@@ -187,9 +187,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
187
187
  label: { placeholder: f(o)("report.integration.delayDay"), editable: !1 },
188
188
  delayDay: { placeholder: f(o)("report.integration.delayDay"), editable: !0 }
189
189
  },
190
- rules: [(k) => k > 0 || "Delay days must be greater than 0"],
191
- "onUpdate:modelValue": x[3] || (x[3] = (k) => {
192
- e.value.delayDay = k.delayDay;
190
+ rules: [(h) => h > 0 || "Delay days must be greater than 0"],
191
+ "onUpdate:modelValue": b[3] || (b[3] = (h) => {
192
+ e.value.delayDay = h.delayDay;
193
193
  })
194
194
  }, null, 8, ["model-value", "options", "rules"])
195
195
  ])
@@ -230,70 +230,70 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
230
230
  modelModifiers: {}
231
231
  }),
232
232
  emits: /* @__PURE__ */ _e(["remove"], ["update:modelValue"]),
233
- setup(v, { emit: o }) {
234
- const e = Q(v, "modelValue"), n = v, w = z(
235
- () => Object.keys(n.options).map((r) => {
236
- const p = n.options[r];
233
+ setup(g, { emit: o }) {
234
+ const e = Q(g, "modelValue"), n = g, k = z(
235
+ () => Object.keys(n.options).map((m) => {
236
+ const d = n.options[m];
237
237
  return {
238
- placeholder: p.placeholder,
239
- key: r,
240
- editable: p.editable,
241
- dropdownOptions: p.dropdownOptions
238
+ placeholder: d.placeholder,
239
+ key: m,
240
+ editable: d.editable,
241
+ dropdownOptions: d.dropdownOptions
242
242
  };
243
243
  })
244
- ), x = (r, p) => {
245
- n.singleValueMode ? e.value = n.type === "number" ? Number(r) : r : p && (e.value = {
244
+ ), b = (m, d) => {
245
+ n.singleValueMode ? e.value = n.type === "number" ? Number(m) : m : d && (e.value = {
246
246
  ...e.value,
247
- [p]: n.type === "number" ? Number(r) : r
247
+ [d]: n.type === "number" ? Number(m) : m
248
248
  });
249
- }, _ = (r) => {
250
- var p;
251
- return n.singleValueMode ? n.options.key.placeholder : (p = e.value[r.key]) == null ? void 0 : p.toString();
252
- }, S = (r) => n.singleValueMode ? e.value : e.value[r.key], h = o;
253
- return (r, p) => {
254
- const k = V("FmSelect"), g = V("FmTextField"), y = V("FmTooltip"), c = V("FmIcon");
255
- return d(), D("div", ft, [
249
+ }, x = (m) => {
250
+ var d;
251
+ return n.singleValueMode ? n.options.key.placeholder : (d = e.value[m.key]) == null ? void 0 : d.toString();
252
+ }, D = (m) => n.singleValueMode ? e.value : e.value[m.key], w = o;
253
+ return (m, d) => {
254
+ const h = V("FmSelect"), _ = V("FmTextField"), u = V("FmTooltip"), p = V("FmIcon");
255
+ return c(), F("div", ft, [
256
256
  t("div", {
257
- class: Ke(`${v.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
257
+ class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
258
258
  }, [
259
- (d(!0), D(L, null, X(w.value, (m) => (d(), D(L, {
260
- key: m.key
259
+ (c(!0), F(L, null, X(k.value, (r) => (c(), F(L, {
260
+ key: r.key
261
261
  }, [
262
- m.editable ? (d(), D("div", vt, [
263
- m.dropdownOptions ? (d(), A(k, {
262
+ r.editable ? (c(), F("div", vt, [
263
+ r.dropdownOptions ? (c(), A(h, {
264
264
  key: 0,
265
- "model-value": S(m),
266
- placeholder: m.placeholder,
267
- items: m.dropdownOptions,
265
+ "model-value": D(r),
266
+ placeholder: r.placeholder,
267
+ items: r.dropdownOptions,
268
268
  "shift-menu": !0,
269
- "onUpdate:modelValue": (b) => x(b, m.key)
270
- }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (d(), A(g, {
269
+ "onUpdate:modelValue": (y) => b(y, r.key)
270
+ }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (c(), A(_, {
271
271
  key: 1,
272
- "model-value": S(m),
273
- placeholder: m.placeholder,
274
- type: v.type,
275
- rules: v.rules,
276
- "onUpdate:modelValue": (b) => x(b, m.key)
272
+ "model-value": D(r),
273
+ placeholder: r.placeholder,
274
+ type: g.type,
275
+ rules: g.rules,
276
+ "onUpdate:modelValue": (y) => b(y, r.key)
277
277
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
278
- ])) : (d(), A(y, {
278
+ ])) : (c(), A(u, {
279
279
  key: 1,
280
- content: _(m),
280
+ content: x(r),
281
281
  class: "w-[50%]"
282
282
  }, {
283
283
  default: xe(() => [
284
- t("div", gt, T(_(m)), 1)
284
+ t("div", gt, T(x(r)), 1)
285
285
  ]),
286
286
  _: 2
287
287
  }, 1032, ["content"]))
288
288
  ], 64))), 128))
289
289
  ], 2),
290
- v.removable ? (d(), D("div", yt, [
291
- i(c, {
290
+ g.removable ? (c(), F("div", yt, [
291
+ i(p, {
292
292
  color: "system-error-300",
293
293
  class: "cursor-pointer",
294
294
  name: "close",
295
295
  size: "md",
296
- onClick: p[0] || (p[0] = (m) => h("remove"))
296
+ onClick: d[0] || (d[0] = (r) => w("remove"))
297
297
  })
298
298
  ])) : R("", !0)
299
299
  ]);
@@ -340,33 +340,33 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
340
340
  modelModifiers: {}
341
341
  }),
342
342
  emits: ["update:modelValue"],
343
- setup(v) {
344
- const { t: o } = W(), e = Q(v, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage: S } = Fe(), { restaurants: h } = ue(), r = B(!1), p = z(
345
- () => h.map((u) => ({ label: u.name, value: u.id }))
346
- ), k = z(() => {
347
- var u, s;
348
- return r.value ? "Connecting" : (s = (u = e.value) == null ? void 0 : u.platform) != null && s.accessToken ? "Disconnect" : "Connect";
349
- }), g = B(0);
350
- async function y() {
351
- var u;
352
- if (r.value)
343
+ setup(g) {
344
+ const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = B(!1), d = z(
345
+ () => w.map((v) => ({ label: v.name, value: v.id }))
346
+ ), h = z(() => {
347
+ var v, s;
348
+ return m.value ? "Connecting" : (s = (v = e.value) == null ? void 0 : v.platform) != null && s.accessToken ? "Disconnect" : "Connect";
349
+ }), _ = B(0);
350
+ async function u() {
351
+ var v;
352
+ if (m.value)
353
353
  n.open({ type: "error", message: "Connecting in progress" });
354
- else if ((u = e.value.platform) != null && u.accessToken)
355
- await S({
354
+ else if ((v = e.value.platform) != null && v.accessToken)
355
+ await D({
356
356
  message: o("report.integration.xero.confirmDisconnect", { name: e.value.name }),
357
357
  title: o("report.integration.xero.disconnectTitle")
358
- }) && (await Ye(e.value._id), await w.getSettings());
358
+ }) && (await Ye(e.value._id), await k.getSettings());
359
359
  else if (e.value._id)
360
360
  try {
361
361
  const s = await qe(e.value._id);
362
- r.value = !0;
362
+ m.value = !0;
363
363
  const M = setInterval(async () => {
364
364
  var N;
365
- g.value += 1;
365
+ _.value += 1;
366
366
  try {
367
- await w.getSettings();
367
+ await k.getSettings();
368
368
  } finally {
369
- (g.value === 12 || (N = e.value.platform) != null && N.accessToken) && (r.value = !1, M && clearInterval(M), g.value = 0);
369
+ (_.value === 12 || (N = e.value.platform) != null && N.accessToken) && (m.value = !1, M && clearInterval(M), _.value = 0);
370
370
  }
371
371
  }, 5e3);
372
372
  window.open(s.redirect, "_blank");
@@ -376,49 +376,49 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
376
376
  else
377
377
  n.open({ type: "error", message: `invalid accounting ${e.value._id}` });
378
378
  }
379
- async function c() {
380
- await S({
379
+ async function p() {
380
+ await D({
381
381
  message: `Confirm delete ${e.value.name}?`,
382
382
  title: "Delete"
383
- }) && await _(async () => {
383
+ }) && await x(async () => {
384
384
  try {
385
- await Ve(e.value._id), await w.getSettings(), x.back();
385
+ await Ve(e.value._id), await k.getSettings(), b.back();
386
386
  } catch (s) {
387
387
  n.open({ type: "error", message: s.message });
388
388
  }
389
389
  });
390
390
  }
391
- async function m() {
392
- await _(async () => {
391
+ async function r() {
392
+ await x(async () => {
393
393
  try {
394
- await $e(e.value._id, e.value), await w.getSettings();
395
- } catch (u) {
396
- n.open({ type: "error", message: u.message });
394
+ await $e(e.value._id, e.value), await k.getSettings();
395
+ } catch (v) {
396
+ n.open({ type: "error", message: v.message });
397
397
  }
398
398
  });
399
399
  }
400
- function b(u) {
401
- const s = v.tenantOptions.data.find((M) => M.value === u);
400
+ function y(v) {
401
+ const s = g.tenantOptions.data.find((M) => M.value === v);
402
402
  s && e.value.platform && (e.value.platform.tenant = {
403
403
  id: s.value,
404
404
  name: s.label
405
405
  });
406
406
  }
407
- function C(u, s) {
407
+ function S(v, s) {
408
408
  var M, N;
409
- (N = (M = e.value.platform) == null ? void 0 : M.mappings) != null && N[u] && (e.value.platform.mappings[u] = e.value.platform.mappings[u].filter(
409
+ (N = (M = e.value.platform) == null ? void 0 : M.mappings) != null && N[v] && (e.value.platform.mappings[v] = e.value.platform.mappings[v].filter(
410
410
  (G, Y) => Y !== s
411
411
  ));
412
412
  }
413
- function l(u) {
413
+ function l(v) {
414
414
  var s, M;
415
- (M = (s = e.value.platform) == null ? void 0 : s.mappings) != null && M[u] && (e.value.platform.mappings[u] = [
416
- ...e.value.platform.mappings[u],
417
- u === "items" ? {
415
+ (M = (s = e.value.platform) == null ? void 0 : s.mappings) != null && M[v] && (e.value.platform.mappings[v] = [
416
+ ...e.value.platform.mappings[v],
417
+ v === "items" ? {
418
418
  feedmeKey: "",
419
419
  xeroAccount: "",
420
420
  name: ""
421
- } : u === "taxes" ? {
421
+ } : v === "taxes" ? {
422
422
  feedmeKey: "",
423
423
  xeroAccount: ""
424
424
  } : {
@@ -428,18 +428,18 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
428
428
  ]);
429
429
  }
430
430
  async function a() {
431
- await _(async () => {
431
+ await x(async () => {
432
432
  try {
433
- await Se(e.value._id), await w.getSettings();
434
- } catch (u) {
435
- n.open({ type: "error", message: u.message });
433
+ await Se(e.value._id), await k.getSettings();
434
+ } catch (v) {
435
+ n.open({ type: "error", message: v.message });
436
436
  }
437
437
  });
438
438
  }
439
- return (u, s) => {
440
- var E, Z, ee, te, oe, ae, le, ne, se, ie, U, $, F, K, q, re, ye, Ne, Re, Oe, Be;
439
+ return (v, s) => {
440
+ var E, Z, ee, te, oe, ae, le, ne, se, ie, U, $, C, K, q, re, ye, Ne, Re, Oe, Be;
441
441
  const M = V("FmIcon"), N = V("FmButton"), G = V("FmMenuDivider"), Y = V("FmCircularProgress"), J = V("FmSelect"), O = V("FmTextField"), j = V("FmSwitch");
442
- return (Z = (E = e.value) == null ? void 0 : E.platform) != null && Z.mappings ? (d(), D("div", xt, [
442
+ return (Z = (E = e.value) == null ? void 0 : E.platform) != null && Z.mappings ? (c(), F("div", xt, [
443
443
  t("div", _t, [
444
444
  t("div", bt, [
445
445
  s[10] || (s[10] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
@@ -455,12 +455,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
455
455
  i(N, {
456
456
  variant: "tertiary",
457
457
  label: "Delete",
458
- onClick: c
458
+ onClick: p
459
459
  }),
460
460
  i(N, {
461
461
  variant: "primary",
462
462
  label: "Update",
463
- onClick: m
463
+ onClick: r
464
464
  })
465
465
  ])
466
466
  ])
@@ -471,22 +471,22 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
471
471
  t("div", Vt, [
472
472
  t("div", $t, [
473
473
  i(N, {
474
- disabled: r.value,
474
+ disabled: m.value,
475
475
  variant: "primary",
476
- label: k.value,
477
- onClick: y
476
+ label: h.value,
477
+ onClick: u
478
478
  }, null, 8, ["disabled", "label"])
479
479
  ]),
480
- !v.tenantOptions.isLoaded && ((ee = e.value.platform) != null && ee.accessToken) ? (d(), A(Y, {
480
+ !g.tenantOptions.isLoaded && ((ee = e.value.platform) != null && ee.accessToken) ? (c(), A(Y, {
481
481
  key: 0,
482
482
  size: "xl"
483
483
  })) : R("", !0),
484
484
  i(J, {
485
485
  class: "flex-grow",
486
- items: v.tenantOptions.data || [],
486
+ items: g.tenantOptions.data || [],
487
487
  "model-value": (te = e.value.platform.tenant) == null ? void 0 : te.id,
488
- placeholder: v.tenantOptions.data ? "Select tenant " : (oe = e.value.platform.tenant) == null ? void 0 : oe.name,
489
- "onUpdate:modelValue": b
488
+ placeholder: g.tenantOptions.data ? "Select tenant " : (oe = e.value.platform.tenant) == null ? void 0 : oe.name,
489
+ "onUpdate:modelValue": y
490
490
  }, null, 8, ["items", "model-value", "placeholder"])
491
491
  ]),
492
492
  t("div", St, [
@@ -506,7 +506,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
506
506
  modelValue: e.value.platform.locationIds,
507
507
  "onUpdate:modelValue": s[1] || (s[1] = (me) => e.value.platform.locationIds = me),
508
508
  multiselect: !0,
509
- items: p.value,
509
+ items: d.value,
510
510
  placeholder: "Select location",
511
511
  class: "flex-grow"
512
512
  }, null, 8, ["modelValue", "items"])
@@ -562,13 +562,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
562
562
  onClick: s[6] || (s[6] = () => l("taxes"))
563
563
  })
564
564
  ]),
565
- v.taxOptions.isError || e.value.platform.accessToken == null ? (d(), D("div", Rt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
566
- !v.taxOptions.isLoaded && ((le = e.value.platform) != null && le.accessToken) ? (d(), A(Y, {
565
+ g.taxOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", Rt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
566
+ !g.taxOptions.isLoaded && ((le = e.value.platform) != null && le.accessToken) ? (c(), A(Y, {
567
567
  key: 1,
568
568
  size: "xl"
569
569
  })) : R("", !0),
570
- ((ne = v.taxOptions.data) == null ? void 0 : ne.length) > 0 ? (d(), D("div", Ot, [
571
- (d(!0), D(L, null, X((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.taxes, (me, ce) => (d(), A(Me, {
570
+ ((ne = g.taxOptions.data) == null ? void 0 : ne.length) > 0 ? (c(), F("div", Ot, [
571
+ (c(!0), F(L, null, X((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.taxes, (me, ce) => (c(), A(Me, {
572
572
  key: `tax-${ce}`,
573
573
  modelValue: e.value.platform.mappings.taxes[ce],
574
574
  "onUpdate:modelValue": (Ie) => e.value.platform.mappings.taxes[ce] = Ie,
@@ -577,11 +577,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
577
577
  xeroAccount: {
578
578
  placeholder: "Select Tax",
579
579
  editable: !0,
580
- dropdownOptions: v.taxOptions.data ?? []
580
+ dropdownOptions: g.taxOptions.data ?? []
581
581
  }
582
582
  },
583
583
  removable: !0,
584
- onRemove: () => C("taxes", ce)
584
+ onRemove: () => S("taxes", ce)
585
585
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
586
586
  ])) : R("", !0),
587
587
  t("div", Bt, [
@@ -592,13 +592,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
592
592
  onClick: s[7] || (s[7] = () => l("items"))
593
593
  })
594
594
  ]),
595
- v.accountCodeOptions.isError || e.value.platform.accessToken == null ? (d(), D("div", jt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
596
- !v.accountCodeOptions.isLoaded && (($ = e.value.platform) != null && $.accessToken) ? (d(), A(Y, {
595
+ g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", jt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
596
+ !g.accountCodeOptions.isLoaded && (($ = e.value.platform) != null && $.accessToken) ? (c(), A(Y, {
597
597
  key: 4,
598
598
  size: "xl"
599
599
  })) : R("", !0),
600
- ((F = v.accountCodeOptions.data) == null ? void 0 : F.length) > 0 ? (d(), D("div", Lt, [
601
- (d(!0), D(L, null, X((re = (q = (K = e.value) == null ? void 0 : K.platform) == null ? void 0 : q.mappings) == null ? void 0 : re.items, (me, ce) => (d(), A(Me, {
600
+ ((C = g.accountCodeOptions.data) == null ? void 0 : C.length) > 0 ? (c(), F("div", Lt, [
601
+ (c(!0), F(L, null, X((re = (q = (K = e.value) == null ? void 0 : K.platform) == null ? void 0 : q.mappings) == null ? void 0 : re.items, (me, ce) => (c(), A(Me, {
602
602
  key: `item-${ce}`,
603
603
  modelValue: e.value.platform.mappings.items[ce],
604
604
  "onUpdate:modelValue": (Ie) => e.value.platform.mappings.items[ce] = Ie,
@@ -607,11 +607,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
607
607
  xeroAccount: {
608
608
  placeholder: "Select Item Code",
609
609
  editable: !0,
610
- dropdownOptions: v.accountCodeOptions.data ?? []
610
+ dropdownOptions: g.accountCodeOptions.data ?? []
611
611
  }
612
612
  },
613
613
  removable: !0,
614
- onRemove: () => C("items", ce)
614
+ onRemove: () => S("items", ce)
615
615
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
616
616
  ])) : R("", !0),
617
617
  t("div", Et, [
@@ -622,13 +622,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
622
622
  onClick: s[8] || (s[8] = () => l("payments"))
623
623
  })
624
624
  ]),
625
- v.accountCodeOptions.isError || e.value.platform.accessToken == null ? (d(), D("div", zt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
626
- !v.accountCodeOptions.isLoaded && ((ye = e.value.platform) != null && ye.accessToken) ? (d(), A(Y, {
625
+ g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", zt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
626
+ !g.accountCodeOptions.isLoaded && ((ye = e.value.platform) != null && ye.accessToken) ? (c(), A(Y, {
627
627
  key: 7,
628
628
  size: "xl"
629
629
  })) : R("", !0),
630
- ((Ne = v.accountCodeOptions.data) == null ? void 0 : Ne.length) > 0 ? (d(), D("div", Yt, [
631
- (d(!0), D(L, null, X((Be = (Oe = (Re = e.value) == null ? void 0 : Re.platform) == null ? void 0 : Oe.mappings) == null ? void 0 : Be.payments, (me, ce) => (d(), A(Me, {
630
+ ((Ne = g.accountCodeOptions.data) == null ? void 0 : Ne.length) > 0 ? (c(), F("div", Yt, [
631
+ (c(!0), F(L, null, X((Be = (Oe = (Re = e.value) == null ? void 0 : Re.platform) == null ? void 0 : Oe.mappings) == null ? void 0 : Be.payments, (me, ce) => (c(), A(Me, {
632
632
  key: `payment-${ce}`,
633
633
  modelValue: e.value.platform.mappings.payments[ce],
634
634
  "onUpdate:modelValue": (Ie) => e.value.platform.mappings.payments[ce] = Ie,
@@ -637,11 +637,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
637
637
  xeroAccount: {
638
638
  placeholder: "Select Payment Code",
639
639
  editable: !0,
640
- dropdownOptions: v.accountCodeOptions.data ?? []
640
+ dropdownOptions: g.accountCodeOptions.data ?? []
641
641
  }
642
642
  },
643
643
  removable: !0,
644
- onRemove: () => C("payments", ce)
644
+ onRemove: () => S("payments", ce)
645
645
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
646
646
  ])) : R("", !0)
647
647
  ])
@@ -659,37 +659,37 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
659
659
  modelModifiers: {}
660
660
  },
661
661
  emits: ["update:modelValue"],
662
- setup(v) {
662
+ setup(g) {
663
663
  const o = B([]), e = z(
664
- () => o.value.reduce((r, p) => {
665
- const k = r.length, { invoice: g, payments: y } = p;
666
- r[k] = {
667
- date: g.Date,
668
- contact: g.Contact.ContactID,
669
- status: g.Status,
670
- ref: g.Reference
664
+ () => o.value.reduce((m, d) => {
665
+ const h = m.length, { invoice: _, payments: u } = d;
666
+ m[h] = {
667
+ date: _.Date,
668
+ contact: _.Contact.ContactID,
669
+ status: _.Status,
670
+ ref: _.Reference
671
671
  };
672
- for (let c = 0; c < Math.max(g.LineItems.length, y.length); c++) {
673
- const m = k + c;
674
- r[m] || (r[m] = {}), g.LineItems[c] && (r[m] = {
675
- ...r[m],
676
- itemDescription: g.LineItems[c].Description,
677
- itemQuantity: g.LineItems[c].Quantity,
678
- itemUnitAmount: g.LineItems[c].UnitAmount,
672
+ for (let p = 0; p < Math.max(_.LineItems.length, u.length); p++) {
673
+ const r = h + p;
674
+ m[r] || (m[r] = {}), _.LineItems[p] && (m[r] = {
675
+ ...m[r],
676
+ itemDescription: _.LineItems[p].Description,
677
+ itemQuantity: _.LineItems[p].Quantity,
678
+ itemUnitAmount: _.LineItems[p].UnitAmount,
679
679
  // itemCode: invoice.LineItems[i].ItemCode,
680
- itemAccount: g.LineItems[c].AccountCode,
681
- itemTax: g.LineItems[c].TaxAmount,
682
- itemTaxType: g.LineItems[c].TaxType,
683
- itemAmount: g.LineItems[c].LineAmount,
684
- itemDiscount: g.LineItems[c].DiscountAmount
685
- }), y[c] && (r[m] = {
686
- ...r[m],
687
- paymentAccount: y[c].Account.Code,
688
- paymentReference: y[c].Reference,
689
- paymentAmount: y[c].Amount
680
+ itemAccount: _.LineItems[p].AccountCode,
681
+ itemTax: _.LineItems[p].TaxAmount,
682
+ itemTaxType: _.LineItems[p].TaxType,
683
+ itemAmount: _.LineItems[p].LineAmount,
684
+ itemDiscount: _.LineItems[p].DiscountAmount
685
+ }), u[p] && (m[r] = {
686
+ ...m[r],
687
+ paymentAccount: u[p].Account.Code,
688
+ paymentReference: u[p].Reference,
689
+ paymentAmount: u[p].Amount
690
690
  });
691
691
  }
692
- return r;
692
+ return m;
693
693
  }, [])
694
694
  ), n = [
695
695
  {
@@ -767,52 +767,52 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
767
767
  header: "Payment Amount",
768
768
  enableSorting: !1
769
769
  }
770
- ], w = Q(v, "modelValue"), x = B(!1), _ = fe(), { dateRange: S } = De(ue());
770
+ ], k = Q(g, "modelValue"), b = B(!1), x = fe(), { dateRange: D } = De(ue());
771
771
  ge(
772
- () => S.value,
772
+ () => D.value,
773
773
  async () => {
774
- if (w.value._id)
774
+ if (k.value._id)
775
775
  try {
776
- x.value = !0, o.value = await Ce(w.value._id);
777
- } catch (r) {
778
- _.open({ message: r.message, type: "error" });
776
+ b.value = !0, o.value = await Ce(k.value._id);
777
+ } catch (m) {
778
+ x.open({ message: m.message, type: "error" });
779
779
  } finally {
780
- x.value = !1;
780
+ b.value = !1;
781
781
  }
782
782
  },
783
783
  {
784
784
  immediate: !0
785
785
  }
786
786
  );
787
- async function h() {
787
+ async function w() {
788
788
  try {
789
- w.value._id ? (x.value = !0, await Ae(w.value._id), _.open({ message: "Upload successful", type: "success" })) : _.open({ message: "Invalid accounting setting", type: "error" });
790
- } catch (r) {
791
- r.message && _.open({ message: r.message, type: "error" }), r.errors && r.errors.forEach((p) => _.open({ message: p.Message, type: "error" }));
789
+ k.value._id ? (b.value = !0, await Ae(k.value._id), x.open({ message: "Upload successful", type: "success" })) : x.open({ message: "Invalid accounting setting", type: "error" });
790
+ } catch (m) {
791
+ m.message && x.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((d) => x.open({ message: d.Message, type: "error" }));
792
792
  } finally {
793
- x.value = !1;
793
+ b.value = !1;
794
794
  }
795
795
  }
796
- return (r, p) => {
797
- const k = V("FmButton"), g = V("FmCircularProgress"), y = V("FmTable");
798
- return d(), D("div", Ht, [
796
+ return (m, d) => {
797
+ const h = V("FmButton"), _ = V("FmCircularProgress"), u = V("FmTable");
798
+ return c(), F("div", Ht, [
799
799
  t("div", Xt, [
800
800
  i(Ue, {
801
- "date-range": f(S),
802
- "onUpdate:dateRange": p[0] || (p[0] = (c) => he(S) ? S.value = c : null),
801
+ "date-range": f(D),
802
+ "onUpdate:dateRange": d[0] || (d[0] = (p) => he(D) ? D.value = p : null),
803
803
  compare: !1
804
804
  }, null, 8, ["date-range"]),
805
- i(k, {
806
- loading: x.value,
805
+ i(h, {
806
+ loading: b.value,
807
807
  variant: "primary",
808
808
  label: "Upload",
809
- onClick: h
809
+ onClick: w
810
810
  }, null, 8, ["loading"])
811
811
  ]),
812
- x.value ? (d(), D("div", Qt, [
813
- i(g, { size: "xl" }),
814
- p[1] || (p[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
815
- ])) : e.value.length > 0 ? (d(), A(y, {
812
+ b.value ? (c(), F("div", Qt, [
813
+ i(_, { size: "xl" }),
814
+ d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
815
+ ])) : e.value.length > 0 ? (c(), A(u, {
816
816
  key: 1,
817
817
  class: "flex overflow-scroll",
818
818
  "row-data": e.value,
@@ -828,8 +828,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
828
828
  modelModifiers: {}
829
829
  },
830
830
  emits: ["update:modelValue"],
831
- setup(v) {
832
- const { t: o } = W(), e = Q(v, "modelValue"), n = B("setting"), w = B({}), x = B({}), _ = B({}), S = [
831
+ setup(g) {
832
+ const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = B({}), b = B({}), x = B({}), D = [
833
833
  {
834
834
  label: o("report.integration.setting"),
835
835
  value: "setting",
@@ -840,7 +840,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
840
840
  value: "preview",
841
841
  icon: "table"
842
842
  }
843
- ], h = pe(), r = z(() => {
843
+ ], w = pe(), m = z(() => {
844
844
  switch (n.value) {
845
845
  case "preview":
846
846
  return { component: Gt };
@@ -848,91 +848,91 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
848
848
  return {
849
849
  component: qt,
850
850
  props: {
851
- tenantOptions: w.value,
852
- taxOptions: x.value,
853
- accountCodeOptions: _.value
851
+ tenantOptions: k.value,
852
+ taxOptions: b.value,
853
+ accountCodeOptions: x.value
854
854
  }
855
855
  };
856
856
  default:
857
857
  return null;
858
858
  }
859
859
  });
860
- async function p() {
860
+ async function d() {
861
861
  if (e.value._id)
862
862
  try {
863
- const y = await He(e.value._id);
864
- w.value.data = y.map((c) => ({
865
- value: c.id,
866
- label: c.name
863
+ const u = await He(e.value._id);
864
+ k.value.data = u.map((p) => ({
865
+ value: p.id,
866
+ label: p.name
867
867
  }));
868
- } catch (y) {
869
- console.error("Failed to fetch tenants:", y), w.value.isError = !0;
868
+ } catch (u) {
869
+ console.error("Failed to fetch tenants:", u), k.value.isError = !0;
870
870
  } finally {
871
- w.value.isLoaded = !0;
871
+ k.value.isLoaded = !0;
872
872
  }
873
873
  }
874
- async function k() {
874
+ async function h() {
875
875
  if (e.value._id)
876
876
  try {
877
- const y = await Xe(e.value._id);
878
- x.value.data = y.map((c) => ({
879
- value: c.Name,
880
- label: `${c.Name} - (${c.EffectiveRate}%)`
877
+ const u = await Xe(e.value._id);
878
+ b.value.data = u.map((p) => ({
879
+ value: p.Name,
880
+ label: `${p.Name} - (${p.EffectiveRate}%)`
881
881
  }));
882
- } catch (y) {
883
- console.error("Failed to fetch taxes:", y), x.value.isError = !0;
882
+ } catch (u) {
883
+ console.error("Failed to fetch taxes:", u), b.value.isError = !0;
884
884
  } finally {
885
- x.value.isLoaded = !0;
885
+ b.value.isLoaded = !0;
886
886
  }
887
887
  }
888
- async function g() {
888
+ async function _() {
889
889
  if (e.value._id)
890
890
  try {
891
- const y = await Qe(e.value._id);
892
- _.value.data = y.map((c) => ({
893
- value: c.Code,
894
- label: `${c.Code} ${c.Name} - [${c.Class}_${c.Type}]`
891
+ const u = await Qe(e.value._id);
892
+ x.value.data = u.map((p) => ({
893
+ value: p.Code,
894
+ label: `${p.Code} ${p.Name} - [${p.Class}_${p.Type}]`
895
895
  }));
896
- } catch (y) {
897
- console.error("Failed to fetch accounts:", y), _.value.isError = !0;
896
+ } catch (u) {
897
+ console.error("Failed to fetch accounts:", u), x.value.isError = !0;
898
898
  } finally {
899
- _.value.isLoaded = !0;
899
+ x.value.isLoaded = !0;
900
900
  }
901
901
  }
902
902
  return ge(
903
903
  () => {
904
- var y;
905
- return (y = e.value.platform) == null ? void 0 : y.accessToken;
904
+ var u;
905
+ return (u = e.value.platform) == null ? void 0 : u.accessToken;
906
906
  },
907
- (y) => {
908
- y && (p(), k(), g());
907
+ (u) => {
908
+ u && (d(), h(), _());
909
909
  },
910
910
  { immediate: !0 }
911
- ), (y, c) => {
912
- var C, l, a;
913
- const m = V("FmPageHead"), b = V("FmTabs");
914
- return d(), D("div", Jt, [
915
- i(m, {
916
- title: ((C = e.value) == null ? void 0 : C.name) || "Xero",
911
+ ), (u, p) => {
912
+ var S, l, a;
913
+ const r = V("FmPageHead"), y = V("FmTabs");
914
+ return c(), F("div", Jt, [
915
+ i(r, {
916
+ title: ((S = e.value) == null ? void 0 : S.name) || "Xero",
917
917
  "back-button": !0,
918
918
  style: { paddingLeft: "0px", paddingRight: "0px" },
919
- "onClick:back": f(h).back
919
+ "onClick:back": f(w).back
920
920
  }, {
921
- description: xe(() => c[2] || (c[2] = [
921
+ description: xe(() => p[2] || (p[2] = [
922
922
  t("div", null, null, -1)
923
923
  ])),
924
924
  _: 1
925
925
  }, 8, ["title", "onClick:back"]),
926
- i(b, {
926
+ i(y, {
927
927
  "model-value": n.value,
928
- "onUpdate:modelValue": c[0] || (c[0] = (u) => n.value = u),
929
- items: S
928
+ "onUpdate:modelValue": p[0] || (p[0] = (v) => n.value = v),
929
+ items: D
930
930
  }, null, 8, ["model-value"]),
931
931
  t("div", Wt, [
932
- (d(), A(be((l = r.value) == null ? void 0 : l.component), Le({
932
+ (c(), A(be((l = m.value) == null ? void 0 : l.component), Le({
933
933
  modelValue: e.value,
934
- "onUpdate:modelValue": c[1] || (c[1] = (u) => e.value = u)
935
- }, (a = r.value) == null ? void 0 : a.props), null, 16, ["modelValue"]))
934
+ "onUpdate:modelValue": p[1] || (p[1] = (v) => e.value = v)
935
+ }, (a = m.value) == null ? void 0 : a.props), null, 16, ["modelValue"]))
936
936
  ])
937
937
  ]);
938
938
  };
@@ -947,24 +947,24 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
947
947
  modelModifiers: {}
948
948
  },
949
949
  emits: ["update:modelValue"],
950
- setup(v) {
951
- const o = Q(v, "modelValue"), e = fe(), n = we(), w = pe(), { promptLoader: x } = ke(), { promptMessage: _ } = Fe(), { restaurants: S } = ue(), h = z(
952
- () => S.map((l) => ({ label: l.name, value: l.id }))
953
- ), { t: r } = W();
954
- async function p() {
955
- await _({
956
- message: r("report.messages.confirmDelete", { name: o.value.name }),
957
- title: r("report.common.delete")
958
- }) && await x(async () => {
950
+ setup(g) {
951
+ const o = Q(g, "modelValue"), e = fe(), n = we(), k = pe(), { promptLoader: b } = ke(), { promptMessage: x } = Fe(), { restaurants: D } = ue(), w = z(
952
+ () => D.map((l) => ({ label: l.name, value: l.id }))
953
+ ), { t: m } = W();
954
+ async function d() {
955
+ await x({
956
+ message: m("report.messages.confirmDelete", { name: o.value.name }),
957
+ title: m("report.common.delete")
958
+ }) && await b(async () => {
959
959
  try {
960
- await Ve(o.value._id), await n.getSettings(), w.back();
960
+ await Ve(o.value._id), await n.getSettings(), k.back();
961
961
  } catch (a) {
962
962
  e.open({ type: "error", message: a.message });
963
963
  }
964
964
  });
965
965
  }
966
- async function k() {
967
- await x(async () => {
966
+ async function h() {
967
+ await b(async () => {
968
968
  try {
969
969
  await $e(o.value._id, o.value), await n.getSettings();
970
970
  } catch (l) {
@@ -972,15 +972,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
972
972
  }
973
973
  });
974
974
  }
975
- function g(l, a) {
976
- var u, s;
977
- (s = (u = o.value.platform) == null ? void 0 : u.mappings) != null && s[l] && (o.value.platform.mappings[l] = o.value.platform.mappings[l].filter(
975
+ function _(l, a) {
976
+ var v, s;
977
+ (s = (v = o.value.platform) == null ? void 0 : v.mappings) != null && s[l] && (o.value.platform.mappings[l] = o.value.platform.mappings[l].filter(
978
978
  (M, N) => N !== a
979
979
  ));
980
980
  }
981
- function y(l) {
982
- var a, u;
983
- if ((u = (a = o.value.platform) == null ? void 0 : a.mappings) != null && u[l]) {
981
+ function u(l) {
982
+ var a, v;
983
+ if ((v = (a = o.value.platform) == null ? void 0 : a.mappings) != null && v[l]) {
984
984
  let s;
985
985
  switch (l) {
986
986
  case "items":
@@ -1011,39 +1011,39 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1011
1011
  ];
1012
1012
  }
1013
1013
  }
1014
- const c = [
1014
+ const p = [
1015
1015
  {
1016
- label: r("report.integration.setting.grouping.byDay"),
1016
+ label: m("report.integration.setting.grouping.byDay"),
1017
1017
  value: ve.BY_DAY
1018
1018
  },
1019
1019
  {
1020
- label: r("report.integration.setting.grouping.byDayItem"),
1020
+ label: m("report.integration.setting.grouping.byDayItem"),
1021
1021
  value: ve.BY_DAY_ITEM
1022
1022
  },
1023
1023
  {
1024
- label: r("report.integration.setting.grouping.byInvoice"),
1024
+ label: m("report.integration.setting.grouping.byInvoice"),
1025
1025
  value: ve.BY_INVOICE
1026
1026
  },
1027
1027
  {
1028
- label: r("report.integration.setting.grouping.byDaySeparatePayment"),
1028
+ label: m("report.integration.setting.grouping.byDaySeparatePayment"),
1029
1029
  value: ve.BY_DAY_SEPARATE_PAYMENT
1030
1030
  }
1031
1031
  ];
1032
- function m({
1032
+ function r({
1033
1033
  key: l,
1034
1034
  value: a
1035
1035
  }) {
1036
- var u, s;
1037
- (s = (u = o.value) == null ? void 0 : u.platform) != null && s.mappings && (o.value.platform.mappings[l] = a);
1036
+ var v, s;
1037
+ (s = (v = o.value) == null ? void 0 : v.platform) != null && s.mappings && (o.value.platform.mappings[l] = a);
1038
1038
  }
1039
- function b(l) {
1039
+ function y(l) {
1040
1040
  return {
1041
1041
  key: { placeholder: l, editable: !1 },
1042
1042
  account: { placeholder: l, editable: !0 }
1043
1043
  };
1044
1044
  }
1045
- async function C() {
1046
- await x(async () => {
1045
+ async function S() {
1046
+ await b(async () => {
1047
1047
  try {
1048
1048
  await Se(o.value._id), await n.getSettings();
1049
1049
  } catch (l) {
@@ -1053,85 +1053,85 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1053
1053
  }
1054
1054
  return (l, a) => {
1055
1055
  var J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie, U, $;
1056
- const u = V("FmIcon"), s = V("FmButton"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmSelect"), Y = V("FmCheckbox");
1057
- return (O = (J = o.value) == null ? void 0 : J.platform) != null && O.mappings ? (d(), D("div", eo, [
1056
+ const v = V("FmIcon"), s = V("FmButton"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmSelect"), Y = V("FmCheckbox");
1057
+ return (O = (J = o.value) == null ? void 0 : J.platform) != null && O.mappings ? (c(), F("div", eo, [
1058
1058
  t("div", to, [
1059
1059
  t("div", oo, [
1060
- t("div", ao, T(f(r)("report.integration.bukku.connect")), 1),
1060
+ t("div", ao, T(f(m)("report.integration.bukku.connect")), 1),
1061
1061
  t("div", lo, [
1062
1062
  t("div", no, [
1063
- i(u, {
1063
+ i(v, {
1064
1064
  name: "refresh",
1065
1065
  class: "p-2 bg-gray-100 rounded-full",
1066
- onClick: C
1066
+ onClick: S
1067
1067
  }),
1068
- t("span", so, T(f(r)("report.integration.setting.refreshTooltip")), 1)
1068
+ t("span", so, T(f(m)("report.integration.setting.refreshTooltip")), 1)
1069
1069
  ]),
1070
1070
  i(s, {
1071
1071
  variant: "tertiary",
1072
- label: f(r)("report.common.delete"),
1073
- onClick: p
1072
+ label: f(m)("report.common.delete"),
1073
+ onClick: d
1074
1074
  }, null, 8, ["label"]),
1075
1075
  i(s, {
1076
1076
  variant: "primary",
1077
- label: f(r)("report.common.update"),
1078
- onClick: k
1077
+ label: f(m)("report.common.update"),
1078
+ onClick: h
1079
1079
  }, null, 8, ["label"])
1080
1080
  ])
1081
1081
  ])
1082
1082
  ]),
1083
1083
  i(M, { style: { margin: 0 } }),
1084
1084
  t("div", io, [
1085
- t("div", ro, T(f(r)("report.integration.bukku.authentication")), 1),
1085
+ t("div", ro, T(f(m)("report.integration.bukku.authentication")), 1),
1086
1086
  t("div", mo, [
1087
- t("div", co, T(f(r)("report.integration.subdomain")), 1),
1087
+ t("div", co, T(f(m)("report.integration.subdomain")), 1),
1088
1088
  t("div", po, [
1089
1089
  i(N, {
1090
1090
  modelValue: o.value.platform.subdomain,
1091
- "onUpdate:modelValue": a[0] || (a[0] = (F) => o.value.platform.subdomain = F),
1092
- placeholder: f(r)("report.integration.subdomain")
1091
+ "onUpdate:modelValue": a[0] || (a[0] = (C) => o.value.platform.subdomain = C),
1092
+ placeholder: f(m)("report.integration.subdomain")
1093
1093
  }, null, 8, ["modelValue", "placeholder"])
1094
1094
  ])
1095
1095
  ]),
1096
1096
  t("div", uo, [
1097
- t("div", fo, T(f(r)("report.integration.token")), 1),
1097
+ t("div", fo, T(f(m)("report.integration.token")), 1),
1098
1098
  t("div", vo, [
1099
1099
  i(N, {
1100
1100
  modelValue: o.value.platform.token,
1101
- "onUpdate:modelValue": a[1] || (a[1] = (F) => o.value.platform.token = F),
1102
- placeholder: f(r)("report.integration.token")
1101
+ "onUpdate:modelValue": a[1] || (a[1] = (C) => o.value.platform.token = C),
1102
+ placeholder: f(m)("report.integration.token")
1103
1103
  }, null, 8, ["modelValue", "placeholder"])
1104
1104
  ])
1105
1105
  ]),
1106
1106
  t("div", go, [
1107
- t("div", yo, T(f(r)("report.integration.bukku.general")), 1),
1107
+ t("div", yo, T(f(m)("report.integration.bukku.general")), 1),
1108
1108
  t("div", xo, [
1109
- t("div", _o, T(f(r)("report.common.name")), 1),
1109
+ t("div", _o, T(f(m)("report.common.name")), 1),
1110
1110
  t("div", bo, [
1111
1111
  i(N, {
1112
1112
  modelValue: o.value.name,
1113
- "onUpdate:modelValue": a[2] || (a[2] = (F) => o.value.name = F)
1113
+ "onUpdate:modelValue": a[2] || (a[2] = (C) => o.value.name = C)
1114
1114
  }, null, 8, ["modelValue"])
1115
1115
  ])
1116
1116
  ]),
1117
1117
  t("div", wo, [
1118
- t("div", ho, T(f(r)("report.common.location")), 1),
1118
+ t("div", ho, T(f(m)("report.common.location")), 1),
1119
1119
  i(G, {
1120
1120
  modelValue: o.value.platform.locationIds,
1121
- "onUpdate:modelValue": a[3] || (a[3] = (F) => o.value.platform.locationIds = F),
1121
+ "onUpdate:modelValue": a[3] || (a[3] = (C) => o.value.platform.locationIds = C),
1122
1122
  multiselect: !0,
1123
- items: h.value,
1123
+ items: w.value,
1124
1124
  placeholder: "Select location",
1125
1125
  class: "flex-grow"
1126
1126
  }, null, 8, ["modelValue", "items"])
1127
1127
  ]),
1128
1128
  t("div", ko, [
1129
- t("div", Vo, T(f(r)("report.integration.bukku.grouping.title")), 1),
1129
+ t("div", Vo, T(f(m)("report.integration.bukku.grouping.title")), 1),
1130
1130
  i(G, {
1131
1131
  modelValue: o.value.platform.grouping,
1132
- "onUpdate:modelValue": a[4] || (a[4] = (F) => o.value.platform.grouping = F),
1132
+ "onUpdate:modelValue": a[4] || (a[4] = (C) => o.value.platform.grouping = C),
1133
1133
  multiselect: !1,
1134
- items: c,
1134
+ items: p,
1135
1135
  placeholder: "Select grouping",
1136
1136
  class: "flex-grow"
1137
1137
  }, null, 8, ["modelValue"])
@@ -1154,9 +1154,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1154
1154
  editable: !0
1155
1155
  }
1156
1156
  },
1157
- "onUpdate:modelValue": a[5] || (a[5] = (F) => {
1157
+ "onUpdate:modelValue": a[5] || (a[5] = (C) => {
1158
1158
  var K, q, re;
1159
- (re = (q = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : q.mappings) != null && re.contact && (o.value.platform.mappings.contact.account = F.account);
1159
+ (re = (q = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : q.mappings) != null && re.contact && (o.value.platform.mappings.contact.account = C.account);
1160
1160
  })
1161
1161
  }, null, 8, ["model-value"]),
1162
1162
  i(P, {
@@ -1164,55 +1164,55 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1164
1164
  key: "Invoice no",
1165
1165
  account: o.value.platform.mappings.invoiceDocNo
1166
1166
  },
1167
- options: b("Invoice no"),
1168
- "onUpdate:modelValue": a[6] || (a[6] = (F) => m({ key: "invoiceDocNo", value: F.account }))
1167
+ options: y("Invoice no"),
1168
+ "onUpdate:modelValue": a[6] || (a[6] = (C) => r({ key: "invoiceDocNo", value: C.account }))
1169
1169
  }, null, 8, ["model-value", "options"]),
1170
1170
  i(P, {
1171
1171
  "model-value": {
1172
1172
  key: "Credit note no",
1173
1173
  account: o.value.platform.mappings.creditNoteDocNo
1174
1174
  },
1175
- options: b("Credit note no"),
1176
- "onUpdate:modelValue": a[7] || (a[7] = (F) => m({ key: "creditNoteDocNo", value: F.account }))
1175
+ options: y("Credit note no"),
1176
+ "onUpdate:modelValue": a[7] || (a[7] = (C) => r({ key: "creditNoteDocNo", value: C.account }))
1177
1177
  }, null, 8, ["model-value", "options"]),
1178
1178
  i(P, {
1179
1179
  "model-value": {
1180
1180
  key: "Payment no",
1181
1181
  account: o.value.platform.mappings.paymentDocNo
1182
1182
  },
1183
- options: b("Payment no"),
1184
- "onUpdate:modelValue": a[8] || (a[8] = (F) => m({ key: "paymentDocNo", value: F.account }))
1183
+ options: y("Payment no"),
1184
+ "onUpdate:modelValue": a[8] || (a[8] = (C) => r({ key: "paymentDocNo", value: C.account }))
1185
1185
  }, null, 8, ["model-value", "options"]),
1186
1186
  i(P, {
1187
1187
  "model-value": {
1188
1188
  key: "Refund no",
1189
1189
  account: o.value.platform.mappings.refundDocNo
1190
1190
  },
1191
- options: b("Refund no"),
1192
- "onUpdate:modelValue": a[9] || (a[9] = (F) => m({ key: "refundDocNo", value: F.account }))
1191
+ options: y("Refund no"),
1192
+ "onUpdate:modelValue": a[9] || (a[9] = (C) => r({ key: "refundDocNo", value: C.account }))
1193
1193
  }, null, 8, ["model-value", "options"]),
1194
1194
  i(P, {
1195
1195
  "model-value": {
1196
1196
  key: "Rounding",
1197
1197
  account: o.value.platform.mappings.rounding.account
1198
1198
  },
1199
- options: b("Rounding"),
1200
- "onUpdate:modelValue": a[10] || (a[10] = (F) => {
1199
+ options: y("Rounding"),
1200
+ "onUpdate:modelValue": a[10] || (a[10] = (C) => {
1201
1201
  var K, q, re;
1202
- (re = (q = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : q.mappings) != null && re.rounding && (o.value.platform.mappings.rounding.account = F.account);
1202
+ (re = (q = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : q.mappings) != null && re.rounding && (o.value.platform.mappings.rounding.account = C.account);
1203
1203
  })
1204
1204
  }, null, 8, ["model-value", "options"]),
1205
- (d(!0), D(L, null, X((Z = (E = (j = o.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : Z.charges, (F, K) => (d(), A(P, {
1205
+ (c(!0), F(L, null, X((Z = (E = (j = o.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : Z.charges, (C, K) => (c(), A(P, {
1206
1206
  key: `charge-${K}`,
1207
1207
  modelValue: o.value.platform.mappings.charges[K],
1208
1208
  "onUpdate:modelValue": (q) => o.value.platform.mappings.charges[K] = q,
1209
1209
  options: {
1210
1210
  key: {
1211
- placeholder: f(r)(`report.integration.bukku.mapping.charge.${F.key}`),
1211
+ placeholder: f(m)(`report.integration.bukku.mapping.charge.${C.key}`),
1212
1212
  editable: !1
1213
1213
  },
1214
1214
  account: {
1215
- placeholder: f(r)("report.integration.bukku.mapping.charge.account"),
1215
+ placeholder: f(m)("report.integration.bukku.mapping.charge.account"),
1216
1216
  editable: !0
1217
1217
  }
1218
1218
  }
@@ -1221,20 +1221,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1221
1221
  ]),
1222
1222
  i(Te, {
1223
1223
  modelValue: o.value.platform,
1224
- "onUpdate:modelValue": a[11] || (a[11] = (F) => o.value.platform = F),
1224
+ "onUpdate:modelValue": a[11] || (a[11] = (C) => o.value.platform = C),
1225
1225
  label: "upload",
1226
1226
  "last-upload-date": (ee = o.value.platform) == null ? void 0 : ee.lastUploadDate
1227
1227
  }, null, 8, ["modelValue", "last-upload-date"]),
1228
1228
  t("div", Co, [
1229
- t("div", Fo, T(f(r)("report.integration.items")), 1),
1229
+ t("div", Fo, T(f(m)("report.integration.items")), 1),
1230
1230
  i(s, {
1231
1231
  variant: "primary",
1232
1232
  icon: "add",
1233
- onClick: a[12] || (a[12] = () => y("items"))
1233
+ onClick: a[12] || (a[12] = () => u("items"))
1234
1234
  })
1235
1235
  ]),
1236
1236
  t("div", Do, [
1237
- (d(!0), D(L, null, X((ae = (oe = (te = o.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (F, K) => (d(), A(P, {
1237
+ (c(!0), F(L, null, X((ae = (oe = (te = o.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (C, K) => (c(), A(P, {
1238
1238
  key: `item-${K}`,
1239
1239
  modelValue: o.value.platform.mappings.items[K],
1240
1240
  "onUpdate:modelValue": (q) => o.value.platform.mappings.items[K] = q,
@@ -1243,19 +1243,19 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1243
1243
  account: { placeholder: "Account code", editable: !0 }
1244
1244
  },
1245
1245
  removable: !0,
1246
- onRemove: () => g("items", K)
1246
+ onRemove: () => _("items", K)
1247
1247
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1248
1248
  ]),
1249
1249
  t("div", Uo, [
1250
- t("div", To, T(f(r)("report.integration.taxes")), 1),
1250
+ t("div", To, T(f(m)("report.integration.taxes")), 1),
1251
1251
  i(s, {
1252
1252
  variant: "primary",
1253
1253
  icon: "add",
1254
- onClick: a[13] || (a[13] = () => y("taxes"))
1254
+ onClick: a[13] || (a[13] = () => u("taxes"))
1255
1255
  })
1256
1256
  ]),
1257
1257
  t("div", Io, [
1258
- (d(!0), D(L, null, X((se = (ne = (le = o.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (F, K) => (d(), A(P, {
1258
+ (c(!0), F(L, null, X((se = (ne = (le = o.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (C, K) => (c(), A(P, {
1259
1259
  key: `tax-${K}`,
1260
1260
  modelValue: o.value.platform.mappings.taxes[K],
1261
1261
  "onUpdate:modelValue": (q) => o.value.platform.mappings.taxes[K] = q,
@@ -1264,18 +1264,18 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1264
1264
  account: { placeholder: "Account code", editable: !0 }
1265
1265
  },
1266
1266
  removable: !0,
1267
- onRemove: () => g("taxes", K)
1267
+ onRemove: () => _("taxes", K)
1268
1268
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1269
1269
  ]),
1270
1270
  t("div", Mo, [
1271
- t("div", Ko, T(f(r)("report.integration.payments")), 1),
1271
+ t("div", Ko, T(f(m)("report.integration.payments")), 1),
1272
1272
  i(s, {
1273
1273
  variant: "primary",
1274
1274
  icon: "add",
1275
- onClick: a[14] || (a[14] = () => y("payments"))
1275
+ onClick: a[14] || (a[14] = () => u("payments"))
1276
1276
  })
1277
1277
  ]),
1278
- (d(!0), D(L, null, X(($ = (U = (ie = o.value) == null ? void 0 : ie.platform) == null ? void 0 : U.mappings) == null ? void 0 : $.payments, (F, K) => (d(), D("div", {
1278
+ (c(!0), F(L, null, X(($ = (U = (ie = o.value) == null ? void 0 : ie.platform) == null ? void 0 : U.mappings) == null ? void 0 : $.payments, (C, K) => (c(), F("div", {
1279
1279
  key: `payment-${K}`,
1280
1280
  class: "grid-cols-1 grid gap-x-16"
1281
1281
  }, [
@@ -1297,7 +1297,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1297
1297
  account: { placeholder: "Account code", editable: !0 }
1298
1298
  },
1299
1299
  removable: !0,
1300
- onRemove: () => g("payments", K)
1300
+ onRemove: () => _("payments", K)
1301
1301
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"])
1302
1302
  ])
1303
1303
  ]))), 128))
@@ -1315,33 +1315,33 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1315
1315
  modelModifiers: {}
1316
1316
  },
1317
1317
  emits: ["update:modelValue"],
1318
- setup(v) {
1318
+ setup(g) {
1319
1319
  const o = B([]), e = z(
1320
- () => o.value.reduce((p, k) => {
1321
- const g = p.length, { invoice: y, payments: c } = k;
1322
- p[g] = {
1323
- no: y.number,
1324
- date: y.date,
1325
- contact: y._contact_name,
1326
- status: y.status,
1327
- title: y.title
1320
+ () => o.value.reduce((d, h) => {
1321
+ const _ = d.length, { invoice: u, payments: p } = h;
1322
+ d[_] = {
1323
+ no: u.number,
1324
+ date: u.date,
1325
+ contact: u._contact_name,
1326
+ status: u.status,
1327
+ title: u.title
1328
1328
  };
1329
- for (let m = 0; m < Math.max(y.form_items.length, c.length); m++) {
1330
- const b = g + m;
1331
- p[b] || (p[b] = {});
1332
- const C = y.form_items[m];
1333
- C && (p[b] = {
1334
- ...p[b],
1335
- itemDescription: C.description,
1336
- itemQuantity: C.quantity,
1337
- itemUnitPrice: C.unit_price,
1338
- itemAccount: C._account_name,
1339
- itemTaxCode: C._tax_code_name,
1340
- itemDiscount: C.discount
1329
+ for (let r = 0; r < Math.max(u.form_items.length, p.length); r++) {
1330
+ const y = _ + r;
1331
+ d[y] || (d[y] = {});
1332
+ const S = u.form_items[r];
1333
+ S && (d[y] = {
1334
+ ...d[y],
1335
+ itemDescription: S.description,
1336
+ itemQuantity: S.quantity,
1337
+ itemUnitPrice: S.unit_price,
1338
+ itemAccount: S._account_name,
1339
+ itemTaxCode: S._tax_code_name,
1340
+ itemDiscount: S.discount
1341
1341
  });
1342
- const l = c[m];
1343
- l && (p[b] = {
1344
- ...p[b],
1342
+ const l = p[r];
1343
+ l && (d[y] = {
1344
+ ...d[y],
1345
1345
  paymentNo: l.number,
1346
1346
  paymentMethod: l.deposit_items[0]._payment_method_name,
1347
1347
  paymentAccount: l.deposit_items[0]._account_name,
@@ -1350,9 +1350,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1350
1350
  paymentSkip: l.skip
1351
1351
  });
1352
1352
  }
1353
- return p;
1353
+ return d;
1354
1354
  }, [])
1355
- ), { t: n } = W(), w = [
1355
+ ), { t: n } = W(), k = [
1356
1356
  {
1357
1357
  accessorKey: "date",
1358
1358
  header: () => I(
@@ -1446,56 +1446,56 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1446
1446
  header: "Skip",
1447
1447
  enableSorting: !1
1448
1448
  }
1449
- ], x = Q(v, "modelValue"), _ = B(!1), S = fe(), { dateRange: h } = De(ue());
1449
+ ], b = Q(g, "modelValue"), x = B(!1), D = fe(), { dateRange: w } = De(ue());
1450
1450
  ge(
1451
- () => h.value,
1451
+ () => w.value,
1452
1452
  async () => {
1453
- if (x.value._id)
1453
+ if (b.value._id)
1454
1454
  try {
1455
- _.value = !0, o.value = await Ce(x.value._id);
1456
- } catch (p) {
1457
- S.open({ message: p.message, type: "error" });
1455
+ x.value = !0, o.value = await Ce(b.value._id);
1456
+ } catch (d) {
1457
+ D.open({ message: d.message, type: "error" });
1458
1458
  } finally {
1459
- _.value = !1;
1459
+ x.value = !1;
1460
1460
  }
1461
1461
  },
1462
1462
  {
1463
1463
  immediate: !0
1464
1464
  }
1465
1465
  );
1466
- async function r() {
1466
+ async function m() {
1467
1467
  try {
1468
- x.value._id ? (_.value = !0, await Ae(x.value._id), S.open({ message: n("report.integration.preview.uploadSuccess"), type: "success" })) : S.open({ message: n("report.integration.error.invalid"), type: "error" });
1469
- } catch (p) {
1470
- S.open({ message: p.message, type: "error" });
1468
+ b.value._id ? (x.value = !0, await Ae(b.value._id), D.open({ message: n("report.integration.preview.uploadSuccess"), type: "success" })) : D.open({ message: n("report.integration.error.invalid"), type: "error" });
1469
+ } catch (d) {
1470
+ D.open({ message: d.message, type: "error" });
1471
1471
  } finally {
1472
- _.value = !1;
1472
+ x.value = !1;
1473
1473
  }
1474
1474
  }
1475
- return (p, k) => {
1476
- const g = V("FmButton"), y = V("FmCircularProgress"), c = V("FmTable");
1477
- return d(), D("div", No, [
1475
+ return (d, h) => {
1476
+ const _ = V("FmButton"), u = V("FmCircularProgress"), p = V("FmTable");
1477
+ return c(), F("div", No, [
1478
1478
  t("div", Ro, [
1479
1479
  i(Ue, {
1480
- "date-range": f(h),
1481
- "onUpdate:dateRange": k[0] || (k[0] = (m) => he(h) ? h.value = m : null),
1480
+ "date-range": f(w),
1481
+ "onUpdate:dateRange": h[0] || (h[0] = (r) => he(w) ? w.value = r : null),
1482
1482
  compare: !1
1483
1483
  }, null, 8, ["date-range"]),
1484
- i(g, {
1485
- loading: _.value,
1484
+ i(_, {
1485
+ loading: x.value,
1486
1486
  variant: "primary",
1487
1487
  label: f(n)("report.common.upload"),
1488
- onClick: r
1488
+ onClick: m
1489
1489
  }, null, 8, ["loading", "label"])
1490
1490
  ]),
1491
- _.value ? (d(), D("div", Oo, [
1492
- i(y, { size: "xl" }),
1491
+ x.value ? (c(), F("div", Oo, [
1492
+ i(u, { size: "xl" }),
1493
1493
  t("span", Bo, T(f(n)("report.integration.preview.loading")), 1)
1494
- ])) : e.value.length > 0 ? (d(), A(c, {
1494
+ ])) : e.value.length > 0 ? (c(), A(p, {
1495
1495
  key: 1,
1496
1496
  class: "flex overflow-scroll",
1497
1497
  "row-data": e.value,
1498
- "column-defs": w
1498
+ "column-defs": k
1499
1499
  }, null, 8, ["row-data"])) : R("", !0)
1500
1500
  ]);
1501
1501
  };
@@ -1507,8 +1507,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1507
1507
  modelModifiers: {}
1508
1508
  },
1509
1509
  emits: ["update:modelValue"],
1510
- setup(v) {
1511
- const { t: o } = W(), e = Q(v, "modelValue"), n = B("setting"), w = [
1510
+ setup(g) {
1511
+ const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
1512
1512
  {
1513
1513
  label: o("report.integration.setting"),
1514
1514
  value: "setting",
@@ -1519,7 +1519,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1519
1519
  value: "preview",
1520
1520
  icon: "table"
1521
1521
  }
1522
- ], x = pe(), _ = z(() => {
1522
+ ], b = pe(), x = z(() => {
1523
1523
  switch (n.value) {
1524
1524
  case "preview":
1525
1525
  return jo;
@@ -1529,30 +1529,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1529
1529
  return null;
1530
1530
  }
1531
1531
  });
1532
- return (S, h) => {
1533
- var k;
1534
- const r = V("FmPageHead"), p = V("FmTabs");
1535
- return d(), D("div", Lo, [
1536
- i(r, {
1537
- title: ((k = e.value) == null ? void 0 : k.name) || "Bukku",
1532
+ return (D, w) => {
1533
+ var h;
1534
+ const m = V("FmPageHead"), d = V("FmTabs");
1535
+ return c(), F("div", Lo, [
1536
+ i(m, {
1537
+ title: ((h = e.value) == null ? void 0 : h.name) || "Bukku",
1538
1538
  "back-button": !0,
1539
1539
  style: { paddingLeft: "0px", paddingRight: "0px" },
1540
- "onClick:back": f(x).back
1540
+ "onClick:back": f(b).back
1541
1541
  }, {
1542
- description: xe(() => h[2] || (h[2] = [
1542
+ description: xe(() => w[2] || (w[2] = [
1543
1543
  t("div", null, null, -1)
1544
1544
  ])),
1545
1545
  _: 1
1546
1546
  }, 8, ["title", "onClick:back"]),
1547
- i(p, {
1547
+ i(d, {
1548
1548
  "model-value": n.value,
1549
- "onUpdate:modelValue": h[0] || (h[0] = (g) => n.value = g),
1550
- items: w
1549
+ "onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
1550
+ items: k
1551
1551
  }, null, 8, ["model-value"]),
1552
1552
  t("div", Eo, [
1553
- (d(), A(be(_.value), {
1553
+ (c(), A(be(x.value), {
1554
1554
  modelValue: e.value,
1555
- "onUpdate:modelValue": h[1] || (h[1] = (g) => e.value = g)
1555
+ "onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
1556
1556
  }, null, 8, ["modelValue"]))
1557
1557
  ])
1558
1558
  ]);
@@ -1568,40 +1568,40 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1568
1568
  modelModifiers: {}
1569
1569
  },
1570
1570
  emits: ["update:modelValue"],
1571
- setup(v) {
1572
- const { t: o } = W(), e = Q(v, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage: S } = Fe(), { restaurants: h } = ue(), r = z(
1573
- () => h.map((l) => ({ label: l.name, value: l.id }))
1571
+ setup(g) {
1572
+ const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
1573
+ () => w.map((l) => ({ label: l.name, value: l.id }))
1574
1574
  );
1575
- async function p() {
1576
- await S({
1575
+ async function d() {
1576
+ await D({
1577
1577
  message: o("report.messages.confirmDelete", { name: e.value.name }),
1578
1578
  title: o("report.common.delete")
1579
- }) && await _(async () => {
1579
+ }) && await x(async () => {
1580
1580
  try {
1581
- await Ve(e.value._id), await w.getSettings(), x.back();
1581
+ await Ve(e.value._id), await k.getSettings(), b.back();
1582
1582
  } catch (a) {
1583
1583
  n.open({ type: "error", message: a.message });
1584
1584
  }
1585
1585
  });
1586
1586
  }
1587
- async function k() {
1588
- await _(async () => {
1587
+ async function h() {
1588
+ await x(async () => {
1589
1589
  try {
1590
- await $e(e.value._id, e.value), await w.getSettings();
1590
+ await $e(e.value._id, e.value), await k.getSettings();
1591
1591
  } catch (l) {
1592
1592
  n.open({ type: "error", message: l.message });
1593
1593
  }
1594
1594
  });
1595
1595
  }
1596
- function g(l, a) {
1597
- var u, s;
1598
- (s = (u = e.value.platform) == null ? void 0 : u.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
1596
+ function _(l, a) {
1597
+ var v, s;
1598
+ (s = (v = e.value.platform) == null ? void 0 : v.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
1599
1599
  (M, N) => N !== a
1600
1600
  ));
1601
1601
  }
1602
- function y(l) {
1603
- var a, u;
1604
- (u = (a = e.value.platform) == null ? void 0 : a.mappings) != null && u[l] && (e.value.platform.mappings[l] = [
1602
+ function u(l) {
1603
+ var a, v;
1604
+ (v = (a = e.value.platform) == null ? void 0 : a.mappings) != null && v[l] && (e.value.platform.mappings[l] = [
1605
1605
  ...e.value.platform.mappings[l],
1606
1606
  l === "items" ? {
1607
1607
  key: "",
@@ -1613,7 +1613,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1613
1613
  }
1614
1614
  ]);
1615
1615
  }
1616
- const c = [
1616
+ const p = [
1617
1617
  {
1618
1618
  label: "By day",
1619
1619
  value: ve.BY_DAY
@@ -1627,23 +1627,23 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1627
1627
  value: ve.BY_DAY_CATEGORY
1628
1628
  }
1629
1629
  ];
1630
- function m({
1630
+ function r({
1631
1631
  key: l,
1632
1632
  value: a
1633
1633
  }) {
1634
- var u, s;
1635
- (s = (u = e.value) == null ? void 0 : u.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
1634
+ var v, s;
1635
+ (s = (v = e.value) == null ? void 0 : v.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
1636
1636
  }
1637
- function b(l) {
1637
+ function y(l) {
1638
1638
  return {
1639
1639
  key: { placeholder: l, editable: !1 },
1640
1640
  account: { placeholder: l, editable: !0 }
1641
1641
  };
1642
1642
  }
1643
- async function C() {
1644
- await _(async () => {
1643
+ async function S() {
1644
+ await x(async () => {
1645
1645
  try {
1646
- await Se(e.value._id), await w.getSettings();
1646
+ await Se(e.value._id), await k.getSettings();
1647
1647
  } catch (l) {
1648
1648
  n.open({ type: "error", message: l.message });
1649
1649
  }
@@ -1651,29 +1651,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1651
1651
  }
1652
1652
  return (l, a) => {
1653
1653
  var Y, J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie;
1654
- const u = V("FmIcon"), s = V("FmButton"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmSelect");
1655
- return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (d(), D("div", Yo, [
1654
+ const v = V("FmIcon"), s = V("FmButton"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmSelect");
1655
+ return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (c(), F("div", Yo, [
1656
1656
  t("div", qo, [
1657
1657
  t("div", Ho, [
1658
1658
  a[14] || (a[14] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
1659
1659
  t("div", Xo, [
1660
1660
  t("div", Qo, [
1661
- i(u, {
1661
+ i(v, {
1662
1662
  name: "refresh",
1663
1663
  class: "p-2 bg-gray-100 rounded-full",
1664
- onClick: C
1664
+ onClick: S
1665
1665
  }),
1666
1666
  t("span", Go, T(f(o)("report.integration.autoCount.repopulate")), 1)
1667
1667
  ]),
1668
1668
  i(s, {
1669
1669
  variant: "tertiary",
1670
1670
  label: f(o)("report.common.remove"),
1671
- onClick: p
1671
+ onClick: d
1672
1672
  }, null, 8, ["label"]),
1673
1673
  i(s, {
1674
1674
  variant: "primary",
1675
1675
  label: f(o)("report.common.update"),
1676
- onClick: k
1676
+ onClick: h
1677
1677
  }, null, 8, ["label"])
1678
1678
  ])
1679
1679
  ])
@@ -1697,7 +1697,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1697
1697
  modelValue: e.value.platform.locationIds,
1698
1698
  "onUpdate:modelValue": a[1] || (a[1] = (U) => e.value.platform.locationIds = U),
1699
1699
  multiselect: !0,
1700
- items: r.value,
1700
+ items: m.value,
1701
1701
  placeholder: "Select location",
1702
1702
  class: "flex-grow",
1703
1703
  rules: [(U) => U.length !== 0 || "Please select at least 1 location"]
@@ -1709,7 +1709,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1709
1709
  modelValue: e.value.platform.grouping,
1710
1710
  "onUpdate:modelValue": a[2] || (a[2] = (U) => e.value.platform.grouping = U),
1711
1711
  multiselect: !1,
1712
- items: c,
1712
+ items: p,
1713
1713
  placeholder: "Select grouping",
1714
1714
  class: "flex-grow"
1715
1715
  }, null, 8, ["modelValue"])
@@ -1719,61 +1719,61 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1719
1719
  t("div", ra, [
1720
1720
  i(P, {
1721
1721
  "model-value": { key: "Project", account: e.value.platform.mappings.project },
1722
- options: b("Project"),
1723
- "onUpdate:modelValue": a[3] || (a[3] = (U) => m({ key: "project", value: U.account }))
1722
+ options: y("Project"),
1723
+ "onUpdate:modelValue": a[3] || (a[3] = (U) => r({ key: "project", value: U.account }))
1724
1724
  }, null, 8, ["model-value", "options"]),
1725
1725
  i(P, {
1726
1726
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
1727
- options: b("Debtor"),
1728
- "onUpdate:modelValue": a[4] || (a[4] = (U) => m({ key: "debtor", value: U.account }))
1727
+ options: y("Debtor"),
1728
+ "onUpdate:modelValue": a[4] || (a[4] = (U) => r({ key: "debtor", value: U.account }))
1729
1729
  }, null, 8, ["model-value", "options"]),
1730
1730
  i(P, {
1731
1731
  "model-value": {
1732
1732
  key: "Invoice no",
1733
1733
  account: e.value.platform.mappings.invoiceDocNo
1734
1734
  },
1735
- options: b("Invoice no"),
1736
- "onUpdate:modelValue": a[5] || (a[5] = (U) => m({ key: "invoiceDocNo", value: U.account }))
1735
+ options: y("Invoice no"),
1736
+ "onUpdate:modelValue": a[5] || (a[5] = (U) => r({ key: "invoiceDocNo", value: U.account }))
1737
1737
  }, null, 8, ["model-value", "options"]),
1738
1738
  i(P, {
1739
1739
  "model-value": {
1740
1740
  key: "Credit note no",
1741
1741
  account: e.value.platform.mappings.creditNoteDocNo
1742
1742
  },
1743
- options: b("Credit note no"),
1744
- "onUpdate:modelValue": a[6] || (a[6] = (U) => m({ key: "creditNoteDocNo", value: U.account }))
1743
+ options: y("Credit note no"),
1744
+ "onUpdate:modelValue": a[6] || (a[6] = (U) => r({ key: "creditNoteDocNo", value: U.account }))
1745
1745
  }, null, 8, ["model-value", "options"]),
1746
1746
  i(P, {
1747
1747
  "model-value": {
1748
1748
  key: "Payment no",
1749
1749
  account: e.value.platform.mappings.paymentDocNo
1750
1750
  },
1751
- options: b("Payment no"),
1752
- "onUpdate:modelValue": a[7] || (a[7] = (U) => m({ key: "paymentDocNo", value: U.account }))
1751
+ options: y("Payment no"),
1752
+ "onUpdate:modelValue": a[7] || (a[7] = (U) => r({ key: "paymentDocNo", value: U.account }))
1753
1753
  }, null, 8, ["model-value", "options"]),
1754
1754
  i(P, {
1755
1755
  "model-value": {
1756
1756
  key: "Refund no",
1757
1757
  account: e.value.platform.mappings.refundDocNo
1758
1758
  },
1759
- options: b("Refund no"),
1760
- "onUpdate:modelValue": a[8] || (a[8] = (U) => m({ key: "refundDocNo", value: U.account }))
1759
+ options: y("Refund no"),
1760
+ "onUpdate:modelValue": a[8] || (a[8] = (U) => r({ key: "refundDocNo", value: U.account }))
1761
1761
  }, null, 8, ["model-value", "options"]),
1762
1762
  i(P, {
1763
1763
  "model-value": {
1764
1764
  key: "Rounding",
1765
1765
  account: e.value.platform.mappings.rounding.account
1766
1766
  },
1767
- options: b("Rounding"),
1767
+ options: y("Rounding"),
1768
1768
  "onUpdate:modelValue": a[9] || (a[9] = (U) => {
1769
- var $, F, K;
1770
- (K = (F = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : F.mappings) != null && K.rounding && (e.value.platform.mappings.rounding.account = U.account);
1769
+ var $, C, K;
1770
+ (K = (C = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : C.mappings) != null && K.rounding && (e.value.platform.mappings.rounding.account = U.account);
1771
1771
  })
1772
1772
  }, null, 8, ["model-value", "options"]),
1773
- (d(!0), D(L, null, X((E = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : E.charges, (U, $) => (d(), A(P, {
1773
+ (c(!0), F(L, null, X((E = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : E.charges, (U, $) => (c(), A(P, {
1774
1774
  key: `charge-${$}`,
1775
1775
  modelValue: e.value.platform.mappings.charges[$],
1776
- "onUpdate:modelValue": (F) => e.value.platform.mappings.charges[$] = F,
1776
+ "onUpdate:modelValue": (C) => e.value.platform.mappings.charges[$] = C,
1777
1777
  options: {
1778
1778
  key: { placeholder: "Key", editable: !1 },
1779
1779
  account: { placeholder: "Account code", editable: !0 }
@@ -1791,20 +1791,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1791
1791
  i(s, {
1792
1792
  variant: "primary",
1793
1793
  icon: "add",
1794
- onClick: a[11] || (a[11] = () => y("items"))
1794
+ onClick: a[11] || (a[11] = () => u("items"))
1795
1795
  })
1796
1796
  ]),
1797
1797
  t("div", da, [
1798
- (d(!0), D(L, null, X((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U, $) => (d(), A(P, {
1798
+ (c(!0), F(L, null, X((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U, $) => (c(), A(P, {
1799
1799
  key: `item-${$}`,
1800
1800
  modelValue: e.value.platform.mappings.items[$],
1801
- "onUpdate:modelValue": (F) => e.value.platform.mappings.items[$] = F,
1801
+ "onUpdate:modelValue": (C) => e.value.platform.mappings.items[$] = C,
1802
1802
  options: {
1803
1803
  key: { placeholder: "Key", editable: !0 },
1804
1804
  account: { placeholder: "Account code", editable: !0 }
1805
1805
  },
1806
1806
  removable: !0,
1807
- onRemove: () => g("items", $)
1807
+ onRemove: () => _("items", $)
1808
1808
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1809
1809
  ]),
1810
1810
  t("div", pa, [
@@ -1812,20 +1812,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1812
1812
  i(s, {
1813
1813
  variant: "primary",
1814
1814
  icon: "add",
1815
- onClick: a[12] || (a[12] = () => y("taxes"))
1815
+ onClick: a[12] || (a[12] = () => u("taxes"))
1816
1816
  })
1817
1817
  ]),
1818
1818
  t("div", fa, [
1819
- (d(!0), D(L, null, X((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U, $) => (d(), A(P, {
1819
+ (c(!0), F(L, null, X((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U, $) => (c(), A(P, {
1820
1820
  key: `tax-${$}`,
1821
1821
  modelValue: e.value.platform.mappings.taxes[$],
1822
- "onUpdate:modelValue": (F) => e.value.platform.mappings.taxes[$] = F,
1822
+ "onUpdate:modelValue": (C) => e.value.platform.mappings.taxes[$] = C,
1823
1823
  options: {
1824
1824
  key: { placeholder: "Key", editable: !0 },
1825
1825
  account: { placeholder: "Account code", editable: !0 }
1826
1826
  },
1827
1827
  removable: !0,
1828
- onRemove: () => g("taxes", $)
1828
+ onRemove: () => _("taxes", $)
1829
1829
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1830
1830
  ]),
1831
1831
  t("div", va, [
@@ -1833,20 +1833,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1833
1833
  i(s, {
1834
1834
  variant: "primary",
1835
1835
  icon: "add",
1836
- onClick: a[13] || (a[13] = () => y("payments"))
1836
+ onClick: a[13] || (a[13] = () => u("payments"))
1837
1837
  })
1838
1838
  ]),
1839
1839
  t("div", ya, [
1840
- (d(!0), D(L, null, X((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U, $) => (d(), A(P, {
1840
+ (c(!0), F(L, null, X((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U, $) => (c(), A(P, {
1841
1841
  key: `payment-${$}`,
1842
1842
  modelValue: e.value.platform.mappings.payments[$],
1843
- "onUpdate:modelValue": (F) => e.value.platform.mappings.payments[$] = F,
1843
+ "onUpdate:modelValue": (C) => e.value.platform.mappings.payments[$] = C,
1844
1844
  options: {
1845
1845
  key: { placeholder: "Key", editable: !0 },
1846
1846
  account: { placeholder: "Payment name", editable: !0 }
1847
1847
  },
1848
1848
  removable: !0,
1849
- onRemove: () => g("payments", $)
1849
+ onRemove: () => _("payments", $)
1850
1850
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1851
1851
  ])
1852
1852
  ])
@@ -1863,37 +1863,37 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1863
1863
  modelModifiers: {}
1864
1864
  },
1865
1865
  emits: ["update:modelValue"],
1866
- setup(v) {
1867
- const o = B([]), e = z(
1868
- () => o.value.reduce((r, p) => {
1869
- const k = r.length, { invoice: g, payments: y } = p;
1870
- r[k] = {
1871
- date: g.DocDate,
1872
- docNo: g.DocNo,
1873
- projNo: g.ProjNo,
1874
- debtor: g.DebtorCode,
1875
- description: g.Description
1866
+ setup(g) {
1867
+ const { t: o } = W(), e = B([]), n = z(
1868
+ () => e.value.reduce((d, h) => {
1869
+ const _ = d.length, { invoice: u, payments: p } = h;
1870
+ d[_] = {
1871
+ date: u.DocDate,
1872
+ docNo: u.DocNo,
1873
+ projNo: u.ProjNo,
1874
+ debtor: u.DebtorCode,
1875
+ description: u.Description
1876
1876
  };
1877
- for (let c = 0; c < Math.max(g._items.length, y.length); c++) {
1878
- const m = k + c;
1879
- r[m] || (r[m] = {}), g._items[c] && (r[m] = {
1880
- ...r[m],
1881
- itemDescription: g._items[c].DetailDescription,
1882
- itemUnitPrice: g._items[c].Amount,
1883
- itemAccount: g._items[c].AccNo,
1884
- itemTaxCode: g._items[c].TaxType,
1885
- itemTax: g._items[c].Tax
1886
- }), y[c] && (r[m] = {
1887
- ...r[m],
1888
- paymentDocNo: y[c].DocNo,
1889
- paymentMethod: y[c].paymentMethod,
1890
- paymentDescription: y[c].Description,
1891
- paymentAmount: y[c].PaymentAmt
1877
+ for (let r = 0; r < Math.max(u._items.length, p.length); r++) {
1878
+ const y = _ + r;
1879
+ d[y] || (d[y] = {}), u._items[r] && (d[y] = {
1880
+ ...d[y],
1881
+ itemDescription: u._items[r].DetailDescription,
1882
+ itemUnitPrice: u._items[r].Amount,
1883
+ itemAccount: u._items[r].AccNo,
1884
+ itemTaxCode: u._items[r].TaxType,
1885
+ itemTax: u._items[r].Tax
1886
+ }), p[r] && (d[y] = {
1887
+ ...d[y],
1888
+ paymentDocNo: p[r].DocNo,
1889
+ paymentMethod: p[r].paymentMethod,
1890
+ paymentDescription: p[r].Description,
1891
+ paymentAmount: p[r].PaymentAmt
1892
1892
  });
1893
1893
  }
1894
- return r;
1894
+ return d;
1895
1895
  }, [])
1896
- ), n = [
1896
+ ), k = [
1897
1897
  {
1898
1898
  accessorKey: "date",
1899
1899
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -1964,15 +1964,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1964
1964
  header: "Payment Amount",
1965
1965
  enableSorting: !1
1966
1966
  }
1967
- ], w = Q(v, "modelValue"), x = B(!1), _ = fe(), { dateRange: S } = De(ue());
1967
+ ], b = Q(g, "modelValue"), x = B(!1), D = fe(), { dateRange: w } = De(ue());
1968
1968
  ge(
1969
- () => S.value,
1969
+ () => w.value,
1970
1970
  async () => {
1971
- if (w.value._id)
1971
+ if (b.value._id)
1972
1972
  try {
1973
- x.value = !0, o.value = await Ce(w.value._id);
1974
- } catch (r) {
1975
- _.open({ message: r.message, type: "error" });
1973
+ x.value = !0, e.value = await Ce(b.value._id);
1974
+ } catch (d) {
1975
+ D.open({ message: d.message, type: "error" });
1976
1976
  } finally {
1977
1977
  x.value = !1;
1978
1978
  }
@@ -1981,39 +1981,39 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1981
1981
  immediate: !0
1982
1982
  }
1983
1983
  );
1984
- async function h() {
1984
+ async function m() {
1985
1985
  try {
1986
- w.value._id ? (x.value = !0, await Pe(w.value._id)) : _.open({ message: "Invalid accounting setting", type: "error" });
1987
- } catch (r) {
1988
- _.open({ message: r.message, type: "error" });
1986
+ b.value._id ? (x.value = !0, await Pe(b.value._id)) : D.open({ message: "Invalid accounting setting", type: "error" });
1987
+ } catch (d) {
1988
+ D.open({ message: d.message, type: "error" });
1989
1989
  } finally {
1990
1990
  x.value = !1;
1991
1991
  }
1992
1992
  }
1993
- return (r, p) => {
1994
- const k = V("FmButton"), g = V("FmCircularProgress"), y = V("FmTable");
1995
- return d(), D("div", _a, [
1993
+ return (d, h) => {
1994
+ const _ = V("FmButton"), u = V("FmCircularProgress"), p = V("FmTable");
1995
+ return c(), F("div", _a, [
1996
1996
  t("div", ba, [
1997
1997
  i(Ue, {
1998
- "date-range": f(S),
1999
- "onUpdate:dateRange": p[0] || (p[0] = (c) => he(S) ? S.value = c : null),
1998
+ "date-range": f(w),
1999
+ "onUpdate:dateRange": h[0] || (h[0] = (r) => he(w) ? w.value = r : null),
2000
2000
  compare: !1
2001
2001
  }, null, 8, ["date-range"]),
2002
- i(k, {
2002
+ i(_, {
2003
2003
  loading: x.value,
2004
2004
  variant: "primary",
2005
- label: r.t("report.common.download"),
2006
- onClick: h
2005
+ label: f(o)("report.common.download"),
2006
+ onClick: m
2007
2007
  }, null, 8, ["loading", "label"])
2008
2008
  ]),
2009
- x.value ? (d(), D("div", wa, [
2010
- i(g, { size: "xl" }),
2011
- t("span", ha, T(r.t("report.common.loading")), 1)
2012
- ])) : e.value.length > 0 ? (d(), A(y, {
2009
+ x.value ? (c(), F("div", wa, [
2010
+ i(u, { size: "xl" }),
2011
+ t("span", ha, T(f(o)("report.common.isLoading")), 1)
2012
+ ])) : n.value.length > 0 ? (c(), A(p, {
2013
2013
  key: 1,
2014
2014
  class: "flex overflow-scroll",
2015
- "row-data": e.value,
2016
- "column-defs": n
2015
+ "row-data": n.value,
2016
+ "column-defs": k
2017
2017
  }, null, 8, ["row-data"])) : R("", !0)
2018
2018
  ]);
2019
2019
  };
@@ -2025,8 +2025,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2025
2025
  modelModifiers: {}
2026
2026
  },
2027
2027
  emits: ["update:modelValue"],
2028
- setup(v) {
2029
- const { t: o } = W(), e = Q(v, "modelValue"), n = B("setting"), w = [
2028
+ setup(g) {
2029
+ const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
2030
2030
  {
2031
2031
  label: o("report.integration.setting"),
2032
2032
  value: "setting",
@@ -2037,7 +2037,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2037
2037
  value: "preview",
2038
2038
  icon: "table"
2039
2039
  }
2040
- ], x = pe(), _ = z(() => {
2040
+ ], b = pe(), x = z(() => {
2041
2041
  switch (n.value) {
2042
2042
  case "preview":
2043
2043
  return ka;
@@ -2047,30 +2047,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2047
2047
  return null;
2048
2048
  }
2049
2049
  });
2050
- return (S, h) => {
2051
- var k;
2052
- const r = V("FmPageHead"), p = V("FmTabs");
2053
- return d(), D("div", Va, [
2054
- i(r, {
2055
- title: ((k = e.value) == null ? void 0 : k.name) || "AutoCount",
2050
+ return (D, w) => {
2051
+ var h;
2052
+ const m = V("FmPageHead"), d = V("FmTabs");
2053
+ return c(), F("div", Va, [
2054
+ i(m, {
2055
+ title: ((h = e.value) == null ? void 0 : h.name) || "AutoCount",
2056
2056
  "back-button": !0,
2057
2057
  style: { paddingLeft: "0px", paddingRight: "0px" },
2058
- "onClick:back": f(x).back
2058
+ "onClick:back": f(b).back
2059
2059
  }, {
2060
- description: xe(() => h[2] || (h[2] = [
2060
+ description: xe(() => w[2] || (w[2] = [
2061
2061
  t("div", null, null, -1)
2062
2062
  ])),
2063
2063
  _: 1
2064
2064
  }, 8, ["title", "onClick:back"]),
2065
- i(p, {
2065
+ i(d, {
2066
2066
  "model-value": n.value,
2067
- "onUpdate:modelValue": h[0] || (h[0] = (g) => n.value = g),
2068
- items: w
2067
+ "onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
2068
+ items: k
2069
2069
  }, null, 8, ["model-value"]),
2070
2070
  t("div", $a, [
2071
- (d(), A(be(_.value), {
2071
+ (c(), A(be(x.value), {
2072
2072
  modelValue: e.value,
2073
- "onUpdate:modelValue": h[1] || (h[1] = (g) => e.value = g)
2073
+ "onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
2074
2074
  }, null, 8, ["modelValue"]))
2075
2075
  ])
2076
2076
  ]);
@@ -2086,40 +2086,40 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2086
2086
  modelModifiers: {}
2087
2087
  },
2088
2088
  emits: ["update:modelValue"],
2089
- setup(v) {
2090
- const { t: o } = W(), e = Q(v, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage: S } = Fe(), { restaurants: h } = ue(), r = z(
2091
- () => h.map((l) => ({ label: l.name, value: l.id }))
2089
+ setup(g) {
2090
+ const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
2091
+ () => w.map((l) => ({ label: l.name, value: l.id }))
2092
2092
  );
2093
- async function p() {
2094
- await S({
2093
+ async function d() {
2094
+ await D({
2095
2095
  message: o("report.messages.confirmDelete", { name: e.value.name }),
2096
2096
  title: o("report.common.delete")
2097
- }) && await _(async () => {
2097
+ }) && await x(async () => {
2098
2098
  try {
2099
- await Ve(e.value._id), await w.getSettings(), x.back();
2099
+ await Ve(e.value._id), await k.getSettings(), b.back();
2100
2100
  } catch (a) {
2101
2101
  n.open({ type: "error", message: a.message });
2102
2102
  }
2103
2103
  });
2104
2104
  }
2105
- async function k() {
2106
- await _(async () => {
2105
+ async function h() {
2106
+ await x(async () => {
2107
2107
  try {
2108
- await $e(e.value._id, e.value), await w.getSettings();
2108
+ await $e(e.value._id, e.value), await k.getSettings();
2109
2109
  } catch (l) {
2110
2110
  n.open({ type: "error", message: l.message });
2111
2111
  }
2112
2112
  });
2113
2113
  }
2114
- function g(l, a) {
2115
- var u, s;
2116
- (s = (u = e.value.platform) == null ? void 0 : u.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
2114
+ function _(l, a) {
2115
+ var v, s;
2116
+ (s = (v = e.value.platform) == null ? void 0 : v.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
2117
2117
  (M, N) => N !== a
2118
2118
  ));
2119
2119
  }
2120
- function y(l) {
2121
- var a, u;
2122
- (u = (a = e.value.platform) == null ? void 0 : a.mappings) != null && u[l] && (e.value.platform.mappings[l] = [
2120
+ function u(l) {
2121
+ var a, v;
2122
+ (v = (a = e.value.platform) == null ? void 0 : a.mappings) != null && v[l] && (e.value.platform.mappings[l] = [
2123
2123
  ...e.value.platform.mappings[l],
2124
2124
  l === "items" ? {
2125
2125
  key: "",
@@ -2132,7 +2132,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2132
2132
  }
2133
2133
  ]);
2134
2134
  }
2135
- const c = [
2135
+ const p = [
2136
2136
  {
2137
2137
  label: "By day",
2138
2138
  value: ve.BY_DAY
@@ -2146,23 +2146,23 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2146
2146
  value: ve.BY_DAY_CATEGORY
2147
2147
  }
2148
2148
  ];
2149
- function m({
2149
+ function r({
2150
2150
  key: l,
2151
2151
  value: a
2152
2152
  }) {
2153
- var u, s;
2154
- (s = (u = e.value) == null ? void 0 : u.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
2153
+ var v, s;
2154
+ (s = (v = e.value) == null ? void 0 : v.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
2155
2155
  }
2156
- function b(l) {
2156
+ function y(l) {
2157
2157
  return {
2158
2158
  key: { placeholder: l, editable: !1 },
2159
2159
  account: { placeholder: l, editable: !0 }
2160
2160
  };
2161
2161
  }
2162
- async function C() {
2163
- await _(async () => {
2162
+ async function S() {
2163
+ await x(async () => {
2164
2164
  try {
2165
- await Se(e.value._id), await w.getSettings();
2165
+ await Se(e.value._id), await k.getSettings();
2166
2166
  } catch (l) {
2167
2167
  n.open({ type: "error", message: l.message });
2168
2168
  }
@@ -2170,29 +2170,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2170
2170
  }
2171
2171
  return (l, a) => {
2172
2172
  var Y, J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie;
2173
- const u = V("FmIcon"), s = V("FmButton"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmSelect");
2174
- return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (d(), D("div", Ca, [
2173
+ const v = V("FmIcon"), s = V("FmButton"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmSelect");
2174
+ return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (c(), F("div", Ca, [
2175
2175
  t("div", Fa, [
2176
2176
  t("div", Da, [
2177
2177
  a[15] || (a[15] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
2178
2178
  t("div", Ua, [
2179
2179
  t("div", Ta, [
2180
- i(u, {
2180
+ i(v, {
2181
2181
  name: "refresh",
2182
2182
  class: "p-2 bg-gray-100 rounded-full",
2183
- onClick: C
2183
+ onClick: S
2184
2184
  }),
2185
2185
  t("span", Ia, T(f(o)("report.integration.sql.refreshTooltip")), 1)
2186
2186
  ]),
2187
2187
  i(s, {
2188
2188
  variant: "tertiary",
2189
2189
  label: f(o)("report.common.delete"),
2190
- onClick: p
2190
+ onClick: d
2191
2191
  }, null, 8, ["label"]),
2192
2192
  i(s, {
2193
2193
  variant: "primary",
2194
2194
  label: f(o)("report.common.update"),
2195
- onClick: k
2195
+ onClick: h
2196
2196
  }, null, 8, ["label"])
2197
2197
  ])
2198
2198
  ])
@@ -2216,7 +2216,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2216
2216
  modelValue: e.value.platform.locationIds,
2217
2217
  "onUpdate:modelValue": a[1] || (a[1] = (U) => e.value.platform.locationIds = U),
2218
2218
  multiselect: !0,
2219
- items: r.value,
2219
+ items: m.value,
2220
2220
  placeholder: "Select location",
2221
2221
  class: "flex-grow",
2222
2222
  rules: [(U) => U.length !== 0 || "Please select at least 1 location"]
@@ -2228,7 +2228,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2228
2228
  modelValue: e.value.platform.grouping,
2229
2229
  "onUpdate:modelValue": a[2] || (a[2] = (U) => e.value.platform.grouping = U),
2230
2230
  multiselect: !1,
2231
- items: c,
2231
+ items: p,
2232
2232
  placeholder: "Select grouping",
2233
2233
  class: "flex-grow"
2234
2234
  }, null, 8, ["modelValue"])
@@ -2238,56 +2238,56 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2238
2238
  t("div", za, [
2239
2239
  i(P, {
2240
2240
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
2241
- options: b("Debtor"),
2242
- "onUpdate:modelValue": a[3] || (a[3] = (U) => m({ key: "debtor", value: U.account }))
2241
+ options: y("Debtor"),
2242
+ "onUpdate:modelValue": a[3] || (a[3] = (U) => r({ key: "debtor", value: U.account }))
2243
2243
  }, null, 8, ["model-value", "options"]),
2244
2244
  i(P, {
2245
2245
  "model-value": {
2246
2246
  key: "Invoice no",
2247
2247
  account: e.value.platform.mappings.invoiceDocNo
2248
2248
  },
2249
- options: b("Invoice no"),
2250
- "onUpdate:modelValue": a[4] || (a[4] = (U) => m({ key: "invoiceDocNo", value: U.account }))
2249
+ options: y("Invoice no"),
2250
+ "onUpdate:modelValue": a[4] || (a[4] = (U) => r({ key: "invoiceDocNo", value: U.account }))
2251
2251
  }, null, 8, ["model-value", "options"]),
2252
2252
  i(P, {
2253
2253
  "model-value": {
2254
2254
  key: "Credit note no",
2255
2255
  account: e.value.platform.mappings.creditNoteDocNo
2256
2256
  },
2257
- options: b("Credit note no"),
2258
- "onUpdate:modelValue": a[5] || (a[5] = (U) => m({ key: "creditNoteDocNo", value: U.account }))
2257
+ options: y("Credit note no"),
2258
+ "onUpdate:modelValue": a[5] || (a[5] = (U) => r({ key: "creditNoteDocNo", value: U.account }))
2259
2259
  }, null, 8, ["model-value", "options"]),
2260
2260
  i(P, {
2261
2261
  "model-value": {
2262
2262
  key: "Payment no",
2263
2263
  account: e.value.platform.mappings.paymentDocNo
2264
2264
  },
2265
- options: b("Payment no"),
2266
- "onUpdate:modelValue": a[6] || (a[6] = (U) => m({ key: "paymentDocNo", value: U.account }))
2265
+ options: y("Payment no"),
2266
+ "onUpdate:modelValue": a[6] || (a[6] = (U) => r({ key: "paymentDocNo", value: U.account }))
2267
2267
  }, null, 8, ["model-value", "options"]),
2268
2268
  i(P, {
2269
2269
  "model-value": {
2270
2270
  key: "Refund no",
2271
2271
  account: e.value.platform.mappings.refundDocNo
2272
2272
  },
2273
- options: b("Refund no"),
2274
- "onUpdate:modelValue": a[7] || (a[7] = (U) => m({ key: "refundDocNo", value: U.account }))
2273
+ options: y("Refund no"),
2274
+ "onUpdate:modelValue": a[7] || (a[7] = (U) => r({ key: "refundDocNo", value: U.account }))
2275
2275
  }, null, 8, ["model-value", "options"]),
2276
2276
  i(P, {
2277
2277
  "model-value": {
2278
2278
  key: "Project header",
2279
2279
  account: e.value.platform.mappings.projectHeader
2280
2280
  },
2281
- options: b("Project header"),
2282
- "onUpdate:modelValue": a[8] || (a[8] = (U) => m({ key: "projectHeader", value: U.account }))
2281
+ options: y("Project header"),
2282
+ "onUpdate:modelValue": a[8] || (a[8] = (U) => r({ key: "projectHeader", value: U.account }))
2283
2283
  }, null, 8, ["model-value", "options"]),
2284
2284
  i(P, {
2285
2285
  "model-value": {
2286
2286
  key: "Project detail",
2287
2287
  account: e.value.platform.mappings.projectDetail
2288
2288
  },
2289
- options: b("Project detail"),
2290
- "onUpdate:modelValue": a[9] || (a[9] = (U) => m({ key: "projectDetail", value: U.account }))
2289
+ options: y("Project detail"),
2290
+ "onUpdate:modelValue": a[9] || (a[9] = (U) => r({ key: "projectDetail", value: U.account }))
2291
2291
  }, null, 8, ["model-value", "options"])
2292
2292
  ]),
2293
2293
  t("div", Ya, [
@@ -2303,14 +2303,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2303
2303
  code: { placeholder: "Item code", editable: !0 }
2304
2304
  },
2305
2305
  "onUpdate:modelValue": a[10] || (a[10] = (U) => {
2306
- var $, F, K;
2307
- (K = (F = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : F.mappings) != null && K.rounding && (e.value.platform.mappings.rounding.account = U.account, e.value.platform.mappings.rounding.code = U.code);
2306
+ var $, C, K;
2307
+ (K = (C = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : C.mappings) != null && K.rounding && (e.value.platform.mappings.rounding.account = U.account, e.value.platform.mappings.rounding.code = U.code);
2308
2308
  })
2309
2309
  }, null, 8, ["model-value"]),
2310
- (d(!0), D(L, null, X((E = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : E.charges, (U, $) => (d(), A(P, {
2310
+ (c(!0), F(L, null, X((E = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : E.charges, (U, $) => (c(), A(P, {
2311
2311
  key: `charge-${$}`,
2312
2312
  modelValue: e.value.platform.mappings.charges[$],
2313
- "onUpdate:modelValue": (F) => e.value.platform.mappings.charges[$] = F,
2313
+ "onUpdate:modelValue": (C) => e.value.platform.mappings.charges[$] = C,
2314
2314
  options: {
2315
2315
  key: { placeholder: "Key", editable: !1 },
2316
2316
  account: { placeholder: "Account code", editable: !0 },
@@ -2329,21 +2329,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2329
2329
  i(s, {
2330
2330
  variant: "primary",
2331
2331
  label: f(o)("report.action.add"),
2332
- onClick: a[12] || (a[12] = () => y("items"))
2332
+ onClick: a[12] || (a[12] = () => u("items"))
2333
2333
  }, null, 8, ["label"])
2334
2334
  ]),
2335
2335
  t("div", Xa, [
2336
- (d(!0), D(L, null, X((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U, $) => (d(), A(P, {
2336
+ (c(!0), F(L, null, X((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U, $) => (c(), A(P, {
2337
2337
  key: `item-${$}`,
2338
2338
  modelValue: e.value.platform.mappings.items[$],
2339
- "onUpdate:modelValue": (F) => e.value.platform.mappings.items[$] = F,
2339
+ "onUpdate:modelValue": (C) => e.value.platform.mappings.items[$] = C,
2340
2340
  options: {
2341
2341
  key: { placeholder: "Key", editable: !0 },
2342
2342
  account: { placeholder: "Account code", editable: !0 },
2343
2343
  code: { placeholder: "Item code", editable: !0 }
2344
2344
  },
2345
2345
  removable: !0,
2346
- onRemove: () => g("items", $)
2346
+ onRemove: () => _("items", $)
2347
2347
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2348
2348
  ]),
2349
2349
  t("div", Qa, [
@@ -2351,20 +2351,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2351
2351
  i(s, {
2352
2352
  variant: "primary",
2353
2353
  icon: "add",
2354
- onClick: a[13] || (a[13] = () => y("taxes"))
2354
+ onClick: a[13] || (a[13] = () => u("taxes"))
2355
2355
  })
2356
2356
  ]),
2357
2357
  t("div", Ja, [
2358
- (d(!0), D(L, null, X((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U, $) => (d(), A(P, {
2358
+ (c(!0), F(L, null, X((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U, $) => (c(), A(P, {
2359
2359
  key: `tax-${$}`,
2360
2360
  modelValue: e.value.platform.mappings.taxes[$],
2361
- "onUpdate:modelValue": (F) => e.value.platform.mappings.taxes[$] = F,
2361
+ "onUpdate:modelValue": (C) => e.value.platform.mappings.taxes[$] = C,
2362
2362
  options: {
2363
2363
  key: { placeholder: "Key", editable: !0 },
2364
2364
  account: { placeholder: "Account code", editable: !0 }
2365
2365
  },
2366
2366
  removable: !0,
2367
- onRemove: () => g("taxes", $)
2367
+ onRemove: () => _("taxes", $)
2368
2368
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2369
2369
  ]),
2370
2370
  t("div", Wa, [
@@ -2372,20 +2372,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2372
2372
  i(s, {
2373
2373
  variant: "primary",
2374
2374
  icon: "add",
2375
- onClick: a[14] || (a[14] = () => y("payments"))
2375
+ onClick: a[14] || (a[14] = () => u("payments"))
2376
2376
  })
2377
2377
  ]),
2378
2378
  t("div", el, [
2379
- (d(!0), D(L, null, X((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U, $) => (d(), A(P, {
2379
+ (c(!0), F(L, null, X((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U, $) => (c(), A(P, {
2380
2380
  key: `payment-${$}`,
2381
2381
  modelValue: e.value.platform.mappings.payments[$],
2382
- "onUpdate:modelValue": (F) => e.value.platform.mappings.payments[$] = F,
2382
+ "onUpdate:modelValue": (C) => e.value.platform.mappings.payments[$] = C,
2383
2383
  options: {
2384
2384
  key: { placeholder: "Key", editable: !0 },
2385
2385
  account: { placeholder: "Method", editable: !0 }
2386
2386
  },
2387
2387
  removable: !0,
2388
- onRemove: () => g("payments", $)
2388
+ onRemove: () => _("payments", $)
2389
2389
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2390
2390
  ])
2391
2391
  ])
@@ -2402,37 +2402,37 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2402
2402
  modelModifiers: {}
2403
2403
  },
2404
2404
  emits: ["update:modelValue"],
2405
- setup(v) {
2405
+ setup(g) {
2406
2406
  const { t: o } = W(), e = B([]), n = z(
2407
- () => e.value.reduce((p, k) => {
2408
- const g = p.length, { invoice: y, payments: c } = k;
2409
- p[g] = {
2410
- date: y.DocDate,
2411
- docNo: y.DocNo,
2412
- debtor: y.Code,
2413
- description: y.Description_HDR
2407
+ () => e.value.reduce((d, h) => {
2408
+ const _ = d.length, { invoice: u, payments: p } = h;
2409
+ d[_] = {
2410
+ date: u.DocDate,
2411
+ docNo: u.DocNo,
2412
+ debtor: u.Code,
2413
+ description: u.Description_HDR
2414
2414
  };
2415
- for (let m = 0; m < Math.max(y._items.length, c.length); m++) {
2416
- const b = g + m;
2417
- p[b] || (p[b] = {}), y._items[m] && (p[b] = {
2418
- ...p[b],
2419
- itemDescription: y._items[m].Description_DTL,
2420
- itemUnitPrice: y._items[m].UnitPrice,
2421
- itemAccount: y._items[m].ACCOUNT,
2422
- itemTaxCode: y._items[m].Tax,
2423
- itemTax: y._items[m].TaxAmt
2424
- }), c[m] && (p[b] = {
2425
- ...p[b],
2426
- paymentDocNo: c[m].DOCNO_Header,
2427
- paymentMethod: c[m].PAYMENTMETHOD,
2428
- paymentAccount: c[m].CODE,
2429
- paymentDescription: c[m].DESCRIPTION,
2430
- paymentAmount: c[m].KOAMT
2415
+ for (let r = 0; r < Math.max(u._items.length, p.length); r++) {
2416
+ const y = _ + r;
2417
+ d[y] || (d[y] = {}), u._items[r] && (d[y] = {
2418
+ ...d[y],
2419
+ itemDescription: u._items[r].Description_DTL,
2420
+ itemUnitPrice: u._items[r].UnitPrice,
2421
+ itemAccount: u._items[r].ACCOUNT,
2422
+ itemTaxCode: u._items[r].Tax,
2423
+ itemTax: u._items[r].TaxAmt
2424
+ }), p[r] && (d[y] = {
2425
+ ...d[y],
2426
+ paymentDocNo: p[r].DOCNO_Header,
2427
+ paymentMethod: p[r].PAYMENTMETHOD,
2428
+ paymentAccount: p[r].CODE,
2429
+ paymentDescription: p[r].DESCRIPTION,
2430
+ paymentAmount: p[r].KOAMT
2431
2431
  });
2432
2432
  }
2433
- return p;
2433
+ return d;
2434
2434
  }, [])
2435
- ), w = [
2435
+ ), k = [
2436
2436
  {
2437
2437
  accessorKey: "date",
2438
2438
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -2498,56 +2498,56 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2498
2498
  header: "Payment Amount",
2499
2499
  enableSorting: !1
2500
2500
  }
2501
- ], x = Q(v, "modelValue"), _ = B(!1), S = fe(), { dateRange: h } = De(ue());
2501
+ ], b = Q(g, "modelValue"), x = B(!1), D = fe(), { dateRange: w } = De(ue());
2502
2502
  ge(
2503
- () => h.value,
2503
+ () => w.value,
2504
2504
  async () => {
2505
- if (x.value._id)
2505
+ if (b.value._id)
2506
2506
  try {
2507
- _.value = !0, e.value = await Ce(x.value._id);
2508
- } catch (p) {
2509
- S.open({ message: p.message, type: "error" });
2507
+ x.value = !0, e.value = await Ce(b.value._id);
2508
+ } catch (d) {
2509
+ D.open({ message: d.message, type: "error" });
2510
2510
  } finally {
2511
- _.value = !1;
2511
+ x.value = !1;
2512
2512
  }
2513
2513
  },
2514
2514
  {
2515
2515
  immediate: !0
2516
2516
  }
2517
2517
  );
2518
- async function r() {
2518
+ async function m() {
2519
2519
  try {
2520
- x.value._id ? (_.value = !0, await Pe(x.value._id)) : S.open({ message: "Invalid accounting setting", type: "error" });
2521
- } catch (p) {
2522
- S.open({ message: p.message, type: "error" });
2520
+ b.value._id ? (x.value = !0, await Pe(b.value._id)) : D.open({ message: "Invalid accounting setting", type: "error" });
2521
+ } catch (d) {
2522
+ D.open({ message: d.message, type: "error" });
2523
2523
  } finally {
2524
- _.value = !1;
2524
+ x.value = !1;
2525
2525
  }
2526
2526
  }
2527
- return (p, k) => {
2528
- const g = V("FmButton"), y = V("FmCircularProgress"), c = V("FmTable");
2529
- return d(), D("div", ol, [
2527
+ return (d, h) => {
2528
+ const _ = V("FmButton"), u = V("FmCircularProgress"), p = V("FmTable");
2529
+ return c(), F("div", ol, [
2530
2530
  t("div", al, [
2531
2531
  i(Ue, {
2532
- "date-range": f(h),
2533
- "onUpdate:dateRange": k[0] || (k[0] = (m) => he(h) ? h.value = m : null),
2532
+ "date-range": f(w),
2533
+ "onUpdate:dateRange": h[0] || (h[0] = (r) => he(w) ? w.value = r : null),
2534
2534
  compare: !1
2535
2535
  }, null, 8, ["date-range"]),
2536
- i(g, {
2537
- loading: _.value,
2536
+ i(_, {
2537
+ loading: x.value,
2538
2538
  variant: "primary",
2539
2539
  label: f(o)("report.common.download"),
2540
- onClick: r
2540
+ onClick: m
2541
2541
  }, null, 8, ["loading", "label"])
2542
2542
  ]),
2543
- _.value ? (d(), D("div", ll, [
2544
- i(y, { size: "xl" }),
2545
- t("span", nl, T(f(o)("report.common.loading")), 1)
2546
- ])) : n.value.length > 0 ? (d(), A(c, {
2543
+ x.value ? (c(), F("div", ll, [
2544
+ i(u, { size: "xl" }),
2545
+ t("span", nl, T(f(o)("report.common.isLoading")), 1)
2546
+ ])) : n.value.length > 0 ? (c(), A(p, {
2547
2547
  key: 1,
2548
2548
  class: "flex overflow-scroll",
2549
2549
  "row-data": n.value,
2550
- "column-defs": w
2550
+ "column-defs": k
2551
2551
  }, null, 8, ["row-data"])) : R("", !0)
2552
2552
  ]);
2553
2553
  };
@@ -2559,8 +2559,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2559
2559
  modelModifiers: {}
2560
2560
  },
2561
2561
  emits: ["update:modelValue"],
2562
- setup(v) {
2563
- const { t: o } = W(), e = Q(v, "modelValue"), n = B("setting"), w = [
2562
+ setup(g) {
2563
+ const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
2564
2564
  {
2565
2565
  label: o("report.integration.setting"),
2566
2566
  value: "setting",
@@ -2571,7 +2571,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2571
2571
  value: "preview",
2572
2572
  icon: "table"
2573
2573
  }
2574
- ], x = pe(), _ = z(() => {
2574
+ ], b = pe(), x = z(() => {
2575
2575
  switch (n.value) {
2576
2576
  case "preview":
2577
2577
  return sl;
@@ -2581,30 +2581,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2581
2581
  return null;
2582
2582
  }
2583
2583
  });
2584
- return (S, h) => {
2585
- var k;
2586
- const r = V("FmPageHead"), p = V("FmTabs");
2587
- return d(), D("div", il, [
2588
- i(r, {
2589
- title: ((k = e.value) == null ? void 0 : k.name) || "SQL",
2584
+ return (D, w) => {
2585
+ var h;
2586
+ const m = V("FmPageHead"), d = V("FmTabs");
2587
+ return c(), F("div", il, [
2588
+ i(m, {
2589
+ title: ((h = e.value) == null ? void 0 : h.name) || "SQL",
2590
2590
  "back-button": !0,
2591
2591
  style: { paddingLeft: "0px", paddingRight: "0px" },
2592
- "onClick:back": f(x).back
2592
+ "onClick:back": f(b).back
2593
2593
  }, {
2594
- description: xe(() => h[2] || (h[2] = [
2594
+ description: xe(() => w[2] || (w[2] = [
2595
2595
  t("div", null, null, -1)
2596
2596
  ])),
2597
2597
  _: 1
2598
2598
  }, 8, ["title", "onClick:back"]),
2599
- i(p, {
2599
+ i(d, {
2600
2600
  "model-value": n.value,
2601
- "onUpdate:modelValue": h[0] || (h[0] = (g) => n.value = g),
2602
- items: w
2601
+ "onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
2602
+ items: k
2603
2603
  }, null, 8, ["model-value"]),
2604
2604
  t("div", rl, [
2605
- (d(), A(be(_.value), {
2605
+ (c(), A(be(x.value), {
2606
2606
  modelValue: e.value,
2607
- "onUpdate:modelValue": h[1] || (h[1] = (g) => e.value = g)
2607
+ "onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
2608
2608
  }, null, 8, ["modelValue"]))
2609
2609
  ])
2610
2610
  ]);
@@ -2644,54 +2644,54 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2644
2644
  modelModifiers: {}
2645
2645
  }),
2646
2646
  emits: ["update:modelValue"],
2647
- setup(v) {
2648
- const { t: o } = W(), e = Q(v, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage: S } = Fe(), { restaurants: h } = ue(), r = z(
2649
- () => h.map((C) => ({ label: C.name, value: C.id }))
2647
+ setup(g) {
2648
+ const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
2649
+ () => w.map((S) => ({ label: S.name, value: S.id }))
2650
2650
  );
2651
- function p(C) {
2651
+ function d(S) {
2652
2652
  var l;
2653
- !((l = v.retrievedMethods) != null && l.data) || !Array.isArray(v.retrievedMethods.data) || C.forEach((a) => {
2654
- const u = v.retrievedMethods.data.find((s) => s.value == a.id);
2655
- u && (a.cnId = u.cnId);
2653
+ !((l = g.retrievedMethods) != null && l.data) || !Array.isArray(g.retrievedMethods.data) || S.forEach((a) => {
2654
+ const v = g.retrievedMethods.data.find((s) => s.value == a.id);
2655
+ v && (a.cnId = v.cnId);
2656
2656
  });
2657
2657
  }
2658
- async function k() {
2659
- await S({
2658
+ async function h() {
2659
+ await D({
2660
2660
  message: o("report.messages.confirmDelete", { name: e.value.name }),
2661
2661
  title: o("report.common.delete")
2662
- }) && await _(async () => {
2662
+ }) && await x(async () => {
2663
2663
  try {
2664
- await Ve(e.value._id), await w.getSettings(), x.back();
2664
+ await Ve(e.value._id), await k.getSettings(), b.back();
2665
2665
  } catch (l) {
2666
2666
  n.open({ type: "error", message: l.message });
2667
2667
  }
2668
2668
  });
2669
2669
  }
2670
- async function g() {
2671
- await _(async () => {
2672
- var C, l, a;
2670
+ async function _() {
2671
+ await x(async () => {
2672
+ var S, l, a;
2673
2673
  try {
2674
- (a = (l = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && p(e.value.platform.mappings.paymentMethods), await $e(e.value._id, e.value), await w.getSettings();
2675
- } catch (u) {
2676
- n.open({ type: "error", message: u.message });
2674
+ (a = (l = (S = e.value) == null ? void 0 : S.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && d(e.value.platform.mappings.paymentMethods), await $e(e.value._id, e.value), await k.getSettings();
2675
+ } catch (v) {
2676
+ n.open({ type: "error", message: v.message });
2677
2677
  }
2678
2678
  });
2679
2679
  }
2680
- function y(C, l) {
2681
- var a, u;
2682
- (u = (a = e.value.platform) == null ? void 0 : a.mappings) != null && u[C] && (e.value.platform.mappings[C] = e.value.platform.mappings[C].filter(
2680
+ function u(S, l) {
2681
+ var a, v;
2682
+ (v = (a = e.value.platform) == null ? void 0 : a.mappings) != null && v[S] && (e.value.platform.mappings[S] = e.value.platform.mappings[S].filter(
2683
2683
  (s, M) => M !== l
2684
2684
  ));
2685
2685
  }
2686
- function c(C) {
2686
+ function p(S) {
2687
2687
  var l, a;
2688
- (a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[C] && (e.value.platform.mappings[C] = [
2689
- ...e.value.platform.mappings[C],
2690
- C === "items" ? {
2688
+ (a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[S] && (e.value.platform.mappings[S] = [
2689
+ ...e.value.platform.mappings[S],
2690
+ S === "items" ? {
2691
2691
  key: "",
2692
2692
  account: "",
2693
2693
  description: ""
2694
- } : C === "taxes" ? {
2694
+ } : S === "taxes" ? {
2695
2695
  key: "",
2696
2696
  account: "SST-"
2697
2697
  } : {
@@ -2700,7 +2700,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2700
2700
  }
2701
2701
  ]);
2702
2702
  }
2703
- const m = [
2703
+ const r = [
2704
2704
  {
2705
2705
  label: "By day",
2706
2706
  value: ve.BY_DAY
@@ -2708,16 +2708,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2708
2708
  ];
2709
2709
  ge(
2710
2710
  () => {
2711
- var C, l, a;
2712
- return (a = (l = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.taxes;
2711
+ var S, l, a;
2712
+ return (a = (l = (S = e.value) == null ? void 0 : S.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.taxes;
2713
2713
  },
2714
- (C) => {
2715
- C && C.forEach((l, a) => {
2714
+ (S) => {
2715
+ S && S.forEach((l, a) => {
2716
2716
  var M;
2717
- const u = l.key || "";
2717
+ const v = l.key || "";
2718
2718
  let s = l.account;
2719
- if (!s && u) {
2720
- switch (u) {
2719
+ if (!s && v) {
2720
+ switch (v) {
2721
2721
  case "SST_SV":
2722
2722
  s = "SST-6";
2723
2723
  break;
@@ -2738,31 +2738,31 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2738
2738
  { immediate: !0, deep: !0 }
2739
2739
  ), ge(
2740
2740
  () => {
2741
- var C, l, a;
2742
- return (a = (l = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.version;
2741
+ var S, l, a;
2742
+ return (a = (l = (S = e.value) == null ? void 0 : S.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.version;
2743
2743
  },
2744
- (C) => {
2745
- var l, a, u, s, M;
2746
- C === "v1" && !((u = (a = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : a.mappings) != null && u.payee) && (M = (s = e.value) == null ? void 0 : s.platform) != null && M.mappings && (e.value.platform.mappings.payee = {
2744
+ (S) => {
2745
+ var l, a, v, s, M;
2746
+ S === "v1" && !((v = (a = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : a.mappings) != null && v.payee) && (M = (s = e.value) == null ? void 0 : s.platform) != null && M.mappings && (e.value.platform.mappings.payee = {
2747
2747
  id: 1,
2748
2748
  name: ""
2749
2749
  });
2750
2750
  },
2751
2751
  { immediate: !0 }
2752
2752
  );
2753
- async function b() {
2754
- await _(async () => {
2753
+ async function y() {
2754
+ await x(async () => {
2755
2755
  try {
2756
- await Se(e.value._id), await w.getSettings();
2757
- } catch (C) {
2758
- n.open({ type: "error", message: C.message });
2756
+ await Se(e.value._id), await k.getSettings();
2757
+ } catch (S) {
2758
+ n.open({ type: "error", message: S.message });
2759
2759
  }
2760
2760
  });
2761
2761
  }
2762
- return (C, l) => {
2762
+ return (S, l) => {
2763
2763
  var J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie, U;
2764
- const a = V("FmIcon"), u = V("FmButton"), s = V("FmSelect"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmCircularProgress"), Y = V("FmCheckbox");
2765
- return (O = (J = e.value) == null ? void 0 : J.platform) != null && O.mappings ? (d(), D("div", cl, [
2764
+ const a = V("FmIcon"), v = V("FmButton"), s = V("FmSelect"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmCircularProgress"), Y = V("FmCheckbox");
2765
+ return (O = (J = e.value) == null ? void 0 : J.platform) != null && O.mappings ? (c(), F("div", cl, [
2766
2766
  t("div", dl, [
2767
2767
  t("div", pl, [
2768
2768
  t("div", ul, T(f(o)("report.integration.connect")), 1),
@@ -2772,19 +2772,19 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2772
2772
  i(a, {
2773
2773
  name: "refresh",
2774
2774
  class: "p-2 bg-gray-100 rounded-full",
2775
- onClick: b
2775
+ onClick: y
2776
2776
  }),
2777
2777
  t("span", yl, T(f(o)("report.integration.biztory.refreshTooltip")), 1)
2778
2778
  ]),
2779
- i(u, {
2779
+ i(v, {
2780
2780
  variant: "tertiary",
2781
2781
  label: f(o)("report.common.delete"),
2782
- onClick: k
2782
+ onClick: h
2783
2783
  }, null, 8, ["label"]),
2784
- i(u, {
2784
+ i(v, {
2785
2785
  variant: "primary",
2786
2786
  label: f(o)("report.common.update"),
2787
- onClick: g
2787
+ onClick: _
2788
2788
  }, null, 8, ["label"])
2789
2789
  ])
2790
2790
  ])
@@ -2845,7 +2845,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2845
2845
  modelValue: e.value.platform.locationIds,
2846
2846
  "onUpdate:modelValue": l[4] || (l[4] = ($) => e.value.platform.locationIds = $),
2847
2847
  multiselect: !0,
2848
- items: r.value,
2848
+ items: m.value,
2849
2849
  placeholder: f(o)("report.common.location"),
2850
2850
  class: "flex-grow"
2851
2851
  }, null, 8, ["modelValue", "items", "placeholder"])
@@ -2856,15 +2856,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2856
2856
  modelValue: e.value.platform.grouping,
2857
2857
  "onUpdate:modelValue": l[5] || (l[5] = ($) => e.value.platform.grouping = $),
2858
2858
  multiselect: !1,
2859
- items: m,
2859
+ items: r,
2860
2860
  placeholder: f(o)("report.integration.biztory.grouping"),
2861
2861
  class: "flex-grow",
2862
2862
  disabled: ""
2863
2863
  }, null, 8, ["modelValue", "placeholder"])
2864
2864
  ]),
2865
- e.value.platform.mappings.version == "v1" ? (d(), D("div", Ol, [
2865
+ e.value.platform.mappings.version == "v1" ? (c(), F("div", Ol, [
2866
2866
  l[13] || (l[13] = t("div", { class: "w-[33%]" }, "Payee ID", -1)),
2867
- e.value.platform.mappings.version == "v1" ? (d(), A(P, {
2867
+ e.value.platform.mappings.version == "v1" ? (c(), A(P, {
2868
2868
  key: 0,
2869
2869
  modelValue: e.value.platform.mappings.payee,
2870
2870
  "onUpdate:modelValue": l[6] || (l[6] = ($) => e.value.platform.mappings.payee = $),
@@ -2877,12 +2877,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2877
2877
  ]),
2878
2878
  t("div", Bl, [
2879
2879
  t("div", jl, [
2880
- !v.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (d(), A(G, {
2880
+ !g.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (c(), A(G, {
2881
2881
  key: 0,
2882
2882
  size: "xl"
2883
2883
  })) : R("", !0),
2884
- v.retrievedCustomers.isLoaded && v.retrievedCustomers.data && ((j = v.retrievedCustomers.data) == null ? void 0 : j.length) != 0 ? (d(), D("div", Ll, [
2885
- e.value.platform.mappings.version == "v2" ? (d(), A(Me, {
2884
+ g.retrievedCustomers.isLoaded && g.retrievedCustomers.data && ((j = g.retrievedCustomers.data) == null ? void 0 : j.length) != 0 ? (c(), F("div", Ll, [
2885
+ e.value.platform.mappings.version == "v2" ? (c(), A(Me, {
2886
2886
  key: 0,
2887
2887
  modelValue: e.value.platform.mappings.payeeId,
2888
2888
  "onUpdate:modelValue": l[7] || (l[7] = ($) => e.value.platform.mappings.payeeId = $),
@@ -2891,7 +2891,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2891
2891
  customer: {
2892
2892
  placeholder: "Select payee",
2893
2893
  editable: !0,
2894
- dropdownOptions: ((E = v.retrievedCustomers) == null ? void 0 : E.data) ?? []
2894
+ dropdownOptions: ((E = g.retrievedCustomers) == null ? void 0 : E.data) ?? []
2895
2895
  }
2896
2896
  },
2897
2897
  removable: !1,
@@ -2908,52 +2908,52 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2908
2908
  }, null, 8, ["modelValue", "last-upload-date"]),
2909
2909
  t("div", El, [
2910
2910
  t("div", zl, T(f(o)("report.integration.biztory.items")), 1),
2911
- i(u, {
2911
+ i(v, {
2912
2912
  variant: "primary",
2913
2913
  icon: "add",
2914
- onClick: l[9] || (l[9] = () => c("items"))
2914
+ onClick: l[9] || (l[9] = () => p("items"))
2915
2915
  })
2916
2916
  ]),
2917
2917
  t("div", Yl, [
2918
- (d(!0), D(L, null, X((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, ($, F) => (d(), A(P, {
2919
- key: `item-${F}`,
2920
- modelValue: e.value.platform.mappings.items[F],
2921
- "onUpdate:modelValue": (K) => e.value.platform.mappings.items[F] = K,
2918
+ (c(!0), F(L, null, X((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, ($, C) => (c(), A(P, {
2919
+ key: `item-${C}`,
2920
+ modelValue: e.value.platform.mappings.items[C],
2921
+ "onUpdate:modelValue": (K) => e.value.platform.mappings.items[C] = K,
2922
2922
  options: {
2923
2923
  key: { placeholder: "Key", editable: !0 },
2924
2924
  code: { placeholder: "Account code", editable: !0 }
2925
2925
  },
2926
2926
  removable: !0,
2927
- onRemove: () => y("items", F)
2927
+ onRemove: () => u("items", C)
2928
2928
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2929
2929
  ]),
2930
2930
  t("div", ql, [
2931
2931
  t("div", Hl, T(f(o)("report.integration.biztory.taxes")), 1),
2932
- i(u, {
2932
+ i(v, {
2933
2933
  variant: "primary",
2934
2934
  icon: "add",
2935
- onClick: l[10] || (l[10] = () => c("taxes"))
2935
+ onClick: l[10] || (l[10] = () => p("taxes"))
2936
2936
  })
2937
2937
  ]),
2938
2938
  t("div", Xl, [
2939
- (d(!0), D(L, null, X((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, ($, F) => (d(), A(P, {
2940
- key: `tax-${F}`,
2941
- modelValue: e.value.platform.mappings.taxes[F],
2942
- "onUpdate:modelValue": (K) => e.value.platform.mappings.taxes[F] = K,
2939
+ (c(!0), F(L, null, X((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, ($, C) => (c(), A(P, {
2940
+ key: `tax-${C}`,
2941
+ modelValue: e.value.platform.mappings.taxes[C],
2942
+ "onUpdate:modelValue": (K) => e.value.platform.mappings.taxes[C] = K,
2943
2943
  options: {
2944
2944
  key: { placeholder: "Key", editable: !0 },
2945
2945
  account: { placeholder: "Account code", editable: !0 }
2946
2946
  },
2947
2947
  removable: !0,
2948
- onRemove: () => y("taxes", F)
2948
+ onRemove: () => u("taxes", C)
2949
2949
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2950
2950
  ]),
2951
2951
  t("div", Ql, [
2952
2952
  t("div", Gl, T(f(o)("report.integration.biztory.payments")), 1),
2953
- i(u, {
2953
+ i(v, {
2954
2954
  variant: "primary",
2955
2955
  icon: "add",
2956
- onClick: l[11] || (l[11] = () => c("paymentMethods"))
2956
+ onClick: l[11] || (l[11] = () => p("paymentMethods"))
2957
2957
  })
2958
2958
  ]),
2959
2959
  t("div", Jl, [
@@ -2970,31 +2970,31 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2970
2970
  }, null, 8, ["modelValue"])
2971
2971
  ])
2972
2972
  ]),
2973
- v.retrievedMethods.isError ? R("", !0) : (d(), D("div", Zl, T(f(o)("report.integration.biztory.paymentTerm")), 1)),
2974
- v.retrievedMethods.isLoaded && v.retrievedMethods.data && v.retrievedMethods.data.length == 0 && !v.retrievedMethods.isError ? (d(), D("span", en, T(f(o)("report.integration.biztory.noPaymentMethods")), 1)) : R("", !0),
2975
- v.retrievedMethods.isLoaded ? R("", !0) : (d(), A(G, {
2973
+ g.retrievedMethods.isError ? R("", !0) : (c(), F("div", Zl, T(f(o)("report.integration.biztory.paymentTerm")), 1)),
2974
+ g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length == 0 && !g.retrievedMethods.isError ? (c(), F("span", en, T(f(o)("report.integration.biztory.noPaymentMethods")), 1)) : R("", !0),
2975
+ g.retrievedMethods.isLoaded ? R("", !0) : (c(), A(G, {
2976
2976
  key: 2,
2977
2977
  size: "xl"
2978
2978
  })),
2979
- v.retrievedMethods.isError ? (d(), D("span", tn, T(f(o)("report.integration.biztory.error")), 1)) : R("", !0),
2980
- (d(!0), D(L, null, X((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.paymentMethods, ($, F) => {
2979
+ g.retrievedMethods.isError ? (c(), F("span", tn, T(f(o)("report.integration.biztory.error")), 1)) : R("", !0),
2980
+ (c(!0), F(L, null, X((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.paymentMethods, ($, C) => {
2981
2981
  var K;
2982
- return d(), D("div", {
2983
- key: `payment-${F}`,
2982
+ return c(), F("div", {
2983
+ key: `payment-${C}`,
2984
2984
  class: "grid-cols-1 grid gap-x-16"
2985
2985
  }, [
2986
- v.retrievedMethods.isLoaded && v.retrievedMethods.data && ((K = v.retrievedMethods.data) == null ? void 0 : K.length) != 0 ? (d(), D("div", on, [
2986
+ g.retrievedMethods.isLoaded && g.retrievedMethods.data && ((K = g.retrievedMethods.data) == null ? void 0 : K.length) != 0 ? (c(), F("div", on, [
2987
2987
  i(Y, {
2988
- "model-value": !e.value.platform.mappings.paymentMethods[F].skip,
2988
+ "model-value": !e.value.platform.mappings.paymentMethods[C].skip,
2989
2989
  value: "",
2990
2990
  "onUpdate:modelValue": (q) => {
2991
2991
  var re, ye;
2992
- (ye = (re = e.value.platform) == null ? void 0 : re.mappings) != null && ye.paymentMethods[F] && (e.value.platform.mappings.paymentMethods[F].skip = !q);
2992
+ (ye = (re = e.value.platform) == null ? void 0 : re.mappings) != null && ye.paymentMethods[C] && (e.value.platform.mappings.paymentMethods[C].skip = !q);
2993
2993
  }
2994
2994
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2995
2995
  i(Me, {
2996
- modelValue: e.value.platform.mappings.paymentMethods[F],
2997
- "onUpdate:modelValue": (q) => e.value.platform.mappings.paymentMethods[F] = q,
2996
+ modelValue: e.value.platform.mappings.paymentMethods[C],
2997
+ "onUpdate:modelValue": (q) => e.value.platform.mappings.paymentMethods[C] = q,
2998
2998
  options: {
2999
2999
  key: {
3000
3000
  placeholder: "Enter key",
@@ -3003,11 +3003,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3003
3003
  id: {
3004
3004
  placeholder: "Select mapping",
3005
3005
  editable: !0,
3006
- dropdownOptions: v.retrievedMethods.data
3006
+ dropdownOptions: g.retrievedMethods.data
3007
3007
  }
3008
3008
  },
3009
3009
  removable: !0,
3010
- onRemove: () => y("paymentMethods", F)
3010
+ onRemove: () => u("paymentMethods", C)
3011
3011
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"])
3012
3012
  ])) : R("", !0)
3013
3013
  ]);
@@ -3018,28 +3018,28 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3018
3018
  };
3019
3019
  }
3020
3020
  });
3021
- function ln(v) {
3022
- return v.reduce((o, e) => {
3023
- var x, _, S, h, r, p, k, g, y, c, m, b, C, l, a, u, s, M, N, G, Y, J;
3024
- const { invoice: n } = e, w = o.length;
3025
- o[w] = {
3021
+ function ln(g) {
3022
+ return g.reduce((o, e) => {
3023
+ var b, x, D, w, m, d, h, _, u, p, r, y, S, l, a, v, s, M, N, G, Y, J;
3024
+ const { invoice: n } = e, k = o.length;
3025
+ o[k] = {
3026
3026
  invoice_date: n.invoice_date,
3027
3027
  ref_num: n.ref_num,
3028
3028
  grandTotal: n.grandTotal,
3029
3029
  // tax_code: invoice.tax[0].tax_code,
3030
3030
  // tax: invoice.tax.reduce((sum, tax) => sum + tax.tax, 0),
3031
3031
  // service_charge: invoice.service_charge.total,
3032
- item_code: (x = n.items[0]) == null ? void 0 : x.code,
3033
- item_desc: (_ = n.items[0]) == null ? void 0 : _.description,
3034
- item_price: (S = n.items[0]) == null ? void 0 : S.price,
3035
- item_tax: (h = n.items[0]) == null ? void 0 : h.total_tax,
3036
- item_tax_label: ((r = n.items[0]) == null ? void 0 : r.tax_label) || "-",
3037
- payment_amount: ((k = (p = n.transactions) == null ? void 0 : p[0]) == null ? void 0 : k.amount) || void 0,
3038
- payment_method: ((y = (g = n.transactions) == null ? void 0 : g[0]) == null ? void 0 : y.payment_method) || "-",
3039
- payment_term: ((c = n == null ? void 0 : n.payment_term) == null ? void 0 : c.name) || ""
3032
+ item_code: (b = n.items[0]) == null ? void 0 : b.code,
3033
+ item_desc: (x = n.items[0]) == null ? void 0 : x.description,
3034
+ item_price: (D = n.items[0]) == null ? void 0 : D.price,
3035
+ item_tax: (w = n.items[0]) == null ? void 0 : w.total_tax,
3036
+ item_tax_label: ((m = n.items[0]) == null ? void 0 : m.tax_label) || "-",
3037
+ payment_amount: ((h = (d = n.transactions) == null ? void 0 : d[0]) == null ? void 0 : h.amount) || void 0,
3038
+ payment_method: ((u = (_ = n.transactions) == null ? void 0 : _[0]) == null ? void 0 : u.payment_method) || "-",
3039
+ payment_term: ((p = n == null ? void 0 : n.payment_term) == null ? void 0 : p.name) || ""
3040
3040
  };
3041
- for (let O = 1; O < Math.max(((m = n.items) == null ? void 0 : m.length) || 0, ((b = n.transactions) == null ? void 0 : b.length) || 0); O++) {
3042
- const j = w + O;
3041
+ for (let O = 1; O < Math.max(((r = n.items) == null ? void 0 : r.length) || 0, ((y = n.transactions) == null ? void 0 : y.length) || 0); O++) {
3042
+ const j = k + O;
3043
3043
  o[j] || (o[j] = {});
3044
3044
  const E = n.items[O];
3045
3045
  E ? o[j] = {
@@ -3049,8 +3049,8 @@ function ln(v) {
3049
3049
  item_price: E.price,
3050
3050
  item_tax: E.total_tax,
3051
3051
  item_tax_label: E.tax_label || "-",
3052
- payment_amount: ((l = (C = n.transactions) == null ? void 0 : C[O]) == null ? void 0 : l.amount) || void 0,
3053
- payment_method: ((u = (a = n.transactions) == null ? void 0 : a[O]) == null ? void 0 : u.payment_method) || "-",
3052
+ payment_amount: ((l = (S = n.transactions) == null ? void 0 : S[O]) == null ? void 0 : l.amount) || void 0,
3053
+ payment_method: ((v = (a = n.transactions) == null ? void 0 : a[O]) == null ? void 0 : v.payment_method) || "-",
3054
3054
  payment_term: ((s = n == null ? void 0 : n.payment_term) == null ? void 0 : s.name) || ""
3055
3055
  } : o[j] = {
3056
3056
  payment_amount: ((N = (M = n.transactions) == null ? void 0 : M[O]) == null ? void 0 : N.amount) || void 0,
@@ -3133,41 +3133,41 @@ const nn = [
3133
3133
  enableSorting: !1
3134
3134
  }
3135
3135
  ];
3136
- function sn(v) {
3137
- return v.reduce((o, e) => {
3138
- var S, h, r, p, k, g, y, c, m, b, C;
3139
- const { invoice: n, payments: w } = e, x = o.length;
3140
- o[x] = {
3136
+ function sn(g) {
3137
+ return g.reduce((o, e) => {
3138
+ var D, w, m, d, h, _, u, p, r, y, S;
3139
+ const { invoice: n, payments: k } = e, b = o.length;
3140
+ o[b] = {
3141
3141
  invoice_date: n.invoice_date,
3142
3142
  ref_num: n.ref_num,
3143
3143
  total: n.total,
3144
- item_code: (S = n.items[0]) == null ? void 0 : S.code,
3145
- item_description: (h = n.items[0]) == null ? void 0 : h.description,
3146
- item_price: (r = n.items[0]) == null ? void 0 : r.price,
3147
- item_tax_label: ((p = n.items[0]) == null ? void 0 : p.tax_label) == "?" ? "" : ((k = n.items[0]) == null ? void 0 : k.tax_label) ?? "",
3148
- item_tax_amount: ((g = n.items[0]) == null ? void 0 : g.total_tax) ?? "",
3149
- service_charge_amount: ((y = n.service_charges[0]) == null ? void 0 : y.total) ?? "",
3144
+ item_code: (D = n.items[0]) == null ? void 0 : D.code,
3145
+ item_description: (w = n.items[0]) == null ? void 0 : w.description,
3146
+ item_price: (m = n.items[0]) == null ? void 0 : m.price,
3147
+ item_tax_label: ((d = n.items[0]) == null ? void 0 : d.tax_label) == "?" ? "" : ((h = n.items[0]) == null ? void 0 : h.tax_label) ?? "",
3148
+ item_tax_amount: ((_ = n.items[0]) == null ? void 0 : _.total_tax) ?? "",
3149
+ service_charge_amount: ((u = n.service_charges[0]) == null ? void 0 : u.total) ?? "",
3150
3150
  rounding: n.rounding ?? 0,
3151
3151
  payment_term_id: n.payment_term.name ?? "",
3152
- payment_term_amount: ((c = n.terms[x]) == null ? void 0 : c.amount) ?? "",
3153
- payment_method: ((m = w[0]) == null ? void 0 : m.payment_method_name) || ""
3152
+ payment_term_amount: ((p = n.terms[b]) == null ? void 0 : p.amount) ?? "",
3153
+ payment_method: ((r = k[0]) == null ? void 0 : r.payment_method_name) || ""
3154
3154
  };
3155
- const _ = Math.max(
3156
- ((b = n.items) == null ? void 0 : b.length) || 0,
3157
- ((C = n.terms) == null ? void 0 : C.length) || 0,
3158
- (w == null ? void 0 : w.length) || 0
3155
+ const x = Math.max(
3156
+ ((y = n.items) == null ? void 0 : y.length) || 0,
3157
+ ((S = n.terms) == null ? void 0 : S.length) || 0,
3158
+ (k == null ? void 0 : k.length) || 0
3159
3159
  );
3160
- for (let l = 1; l < _; l++) {
3161
- const a = x + l;
3160
+ for (let l = 1; l < x; l++) {
3161
+ const a = b + l;
3162
3162
  o[a] || (o[a] = {});
3163
- const u = n.items[l], s = n.terms[l], M = w[l];
3164
- u ? o[a] = {
3163
+ const v = n.items[l], s = n.terms[l], M = k[l];
3164
+ v ? o[a] = {
3165
3165
  ...o[a],
3166
- item_code: u.code,
3167
- item_description: u.description,
3168
- item_price: u.total,
3169
- item_tax_label: u.tax_label == "?" ? "" : u.tax_label ?? "",
3170
- item_tax_amount: u.total_tax ?? "",
3166
+ item_code: v.code,
3167
+ item_description: v.description,
3168
+ item_price: v.total,
3169
+ item_tax_label: v.tax_label == "?" ? "" : v.tax_label ?? "",
3170
+ item_tax_amount: v.total_tax ?? "",
3171
3171
  payment_term_id: n.payment_term.name ?? "",
3172
3172
  payment_term_amount: (s == null ? void 0 : s.amount) ?? "",
3173
3173
  payment_method: (M == null ? void 0 : M.payment_method_name) || ""
@@ -3256,16 +3256,16 @@ const rn = [
3256
3256
  modelModifiers: {}
3257
3257
  },
3258
3258
  emits: ["update:modelValue"],
3259
- setup(v) {
3260
- const o = Q(v, "modelValue"), e = B(!1), n = fe(), { dateRange: w } = De(ue()), x = B([]);
3259
+ setup(g) {
3260
+ const o = Q(g, "modelValue"), e = B(!1), n = fe(), { dateRange: k } = De(ue()), b = B([]);
3261
3261
  ge(
3262
- () => w.value,
3262
+ () => k.value,
3263
3263
  async () => {
3264
3264
  if (o.value._id)
3265
3265
  try {
3266
- e.value = !0, x.value = await Ce(o.value._id);
3267
- } catch (r) {
3268
- n.open({ message: r.message, type: "error" });
3266
+ e.value = !0, b.value = await Ce(o.value._id);
3267
+ } catch (m) {
3268
+ n.open({ message: m.message, type: "error" });
3269
3269
  } finally {
3270
3270
  e.value = !1;
3271
3271
  }
@@ -3274,15 +3274,15 @@ const rn = [
3274
3274
  immediate: !0
3275
3275
  }
3276
3276
  );
3277
- const _ = z(() => {
3277
+ const x = z(() => {
3278
3278
  switch (o.value.platform.mappings.version) {
3279
3279
  case "v1":
3280
- return ln(x.value);
3280
+ return ln(b.value);
3281
3281
  case "v2":
3282
- return sn(x.value);
3282
+ return sn(b.value);
3283
3283
  }
3284
3284
  return [];
3285
- }), S = z(() => {
3285
+ }), D = z(() => {
3286
3286
  switch (o.value.platform.mappings.version) {
3287
3287
  case "v1":
3288
3288
  return nn;
@@ -3291,39 +3291,39 @@ const rn = [
3291
3291
  }
3292
3292
  return [];
3293
3293
  });
3294
- async function h() {
3294
+ async function w() {
3295
3295
  try {
3296
3296
  o.value._id && o.value.platform.subdomain && o.value.platform.api_key ? (e.value = !0, await Ae(o.value._id), n.open({ message: "Upload successful", type: "success" })) : n.open({ message: "Invalid accounting setting", type: "error" });
3297
- } catch (r) {
3298
- r.message && n.open({ message: r.message, type: "error" }), r.errors && r.errors.forEach((p) => n.open({ message: p, type: "error" }));
3297
+ } catch (m) {
3298
+ m.message && n.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((d) => n.open({ message: d, type: "error" }));
3299
3299
  } finally {
3300
3300
  e.value = !1;
3301
3301
  }
3302
3302
  }
3303
- return (r, p) => {
3304
- const k = V("FmButton"), g = V("FmCircularProgress"), y = V("FmTable");
3305
- return d(), D("div", mn, [
3303
+ return (m, d) => {
3304
+ const h = V("FmButton"), _ = V("FmCircularProgress"), u = V("FmTable");
3305
+ return c(), F("div", mn, [
3306
3306
  t("div", cn, [
3307
3307
  i(Ue, {
3308
- "date-range": f(w),
3309
- "onUpdate:dateRange": p[0] || (p[0] = (c) => he(w) ? w.value = c : null),
3308
+ "date-range": f(k),
3309
+ "onUpdate:dateRange": d[0] || (d[0] = (p) => he(k) ? k.value = p : null),
3310
3310
  compare: !1
3311
3311
  }, null, 8, ["date-range"]),
3312
- i(k, {
3312
+ i(h, {
3313
3313
  loading: e.value,
3314
3314
  variant: "primary",
3315
3315
  label: "Upload",
3316
- onClick: h
3316
+ onClick: w
3317
3317
  }, null, 8, ["loading"])
3318
3318
  ]),
3319
- e.value ? (d(), D("div", dn, [
3320
- i(g, { size: "xl" }),
3321
- p[1] || (p[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
3322
- ])) : (d(), A(y, {
3319
+ e.value ? (c(), F("div", dn, [
3320
+ i(_, { size: "xl" }),
3321
+ d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
3322
+ ])) : (c(), A(u, {
3323
3323
  key: 1,
3324
3324
  class: "flex overflow-scroll",
3325
- "row-data": _.value,
3326
- "column-defs": S.value
3325
+ "row-data": x.value,
3326
+ "column-defs": D.value
3327
3327
  }, null, 8, ["row-data", "column-defs"]))
3328
3328
  ]);
3329
3329
  };
@@ -3335,8 +3335,8 @@ const rn = [
3335
3335
  modelModifiers: {}
3336
3336
  },
3337
3337
  emits: ["update:modelValue"],
3338
- setup(v) {
3339
- const { t: o } = W(), e = Q(v, "modelValue"), n = B("setting"), w = [
3338
+ setup(g) {
3339
+ const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
3340
3340
  {
3341
3341
  label: o("report.integration.setting"),
3342
3342
  value: "setting",
@@ -3347,7 +3347,7 @@ const rn = [
3347
3347
  value: "preview",
3348
3348
  icon: "table"
3349
3349
  }
3350
- ], x = pe(), _ = z(() => {
3350
+ ], b = pe(), x = z(() => {
3351
3351
  switch (n.value) {
3352
3352
  case "preview":
3353
3353
  return {
@@ -3357,68 +3357,68 @@ const rn = [
3357
3357
  return {
3358
3358
  component: an,
3359
3359
  props: {
3360
- retrievedMethods: S.value,
3361
- retrievedCustomers: h.value
3360
+ retrievedMethods: D.value,
3361
+ retrievedCustomers: w.value
3362
3362
  }
3363
3363
  };
3364
3364
  default:
3365
3365
  return null;
3366
3366
  }
3367
- }), S = B({}), h = B({}), r = (c, m) => c.map((b) => ({
3368
- label: m.length > 2 ? `ID:${b[m[2]]} [${b[m[0]]}] ${b[m[1]]}` : `[${b[m[0]]}] ${b[m[1]]}`,
3369
- value: b.id,
3370
- cnId: b.cnId ? b.cnId : null
3371
- })), p = (c) => r(c, ["wallet", "name"]), k = (c) => r(c, ["id", "name"]), g = async (c, m, b, C) => {
3367
+ }), D = B({}), w = B({}), m = (p, r) => p.map((y) => ({
3368
+ label: r.length > 2 ? `ID:${y[r[2]]} [${y[r[0]]}] ${y[r[1]]}` : `[${y[r[0]]}] ${y[r[1]]}`,
3369
+ value: y.id,
3370
+ cnId: y.cnId ? y.cnId : null
3371
+ })), d = (p) => m(p, ["wallet", "name"]), h = (p) => m(p, ["id", "name"]), _ = async (p, r, y, S) => {
3372
3372
  try {
3373
- const l = await c(e.value._id);
3374
- b.value.data = m(l);
3373
+ const l = await p(e.value._id);
3374
+ y.value.data = r(l);
3375
3375
  } catch (l) {
3376
- console.error(C, l), b.value.isError = !0;
3376
+ console.error(S, l), y.value.isError = !0;
3377
3377
  } finally {
3378
- b.value.isLoaded = !0;
3378
+ y.value.isLoaded = !0;
3379
3379
  }
3380
- }, y = async () => {
3381
- var c, m;
3382
- (c = e.value.platform.mappings) != null && c.version && await g(
3380
+ }, u = async () => {
3381
+ var p, r;
3382
+ (p = e.value.platform.mappings) != null && p.version && await _(
3383
3383
  Ge,
3384
- p,
3385
- S,
3384
+ d,
3385
+ D,
3386
3386
  "Failed to fetch payment methods:"
3387
- ), ((m = e.value.platform.mappings) == null ? void 0 : m.version) == "v2" && await g(
3387
+ ), ((r = e.value.platform.mappings) == null ? void 0 : r.version) == "v2" && await _(
3388
3388
  Je,
3389
- k,
3390
3389
  h,
3390
+ w,
3391
3391
  "Failed to fetch customers:"
3392
- ), S.value.isLoaded = !0, h.value.isLoaded = !0;
3392
+ ), D.value.isLoaded = !0, w.value.isLoaded = !0;
3393
3393
  };
3394
- return Ee(y), ge(() => {
3395
- var c;
3396
- return (c = e.value.platform.mappings) == null ? void 0 : c.version;
3397
- }, y), (c, m) => {
3398
- var l, a, u;
3399
- const b = V("FmPageHead"), C = V("FmTabs");
3400
- return d(), D("div", un, [
3401
- i(b, {
3394
+ return Ee(u), ge(() => {
3395
+ var p;
3396
+ return (p = e.value.platform.mappings) == null ? void 0 : p.version;
3397
+ }, u), (p, r) => {
3398
+ var l, a, v;
3399
+ const y = V("FmPageHead"), S = V("FmTabs");
3400
+ return c(), F("div", un, [
3401
+ i(y, {
3402
3402
  title: ((l = e.value) == null ? void 0 : l.name) || "Biztory",
3403
3403
  "back-button": !0,
3404
3404
  style: { paddingLeft: "0px", paddingRight: "0px" },
3405
- "onClick:back": f(x).back
3405
+ "onClick:back": f(b).back
3406
3406
  }, {
3407
- description: xe(() => m[2] || (m[2] = [
3407
+ description: xe(() => r[2] || (r[2] = [
3408
3408
  t("div", null, null, -1)
3409
3409
  ])),
3410
3410
  _: 1
3411
3411
  }, 8, ["title", "onClick:back"]),
3412
- i(C, {
3412
+ i(S, {
3413
3413
  "model-value": n.value,
3414
- "onUpdate:modelValue": m[0] || (m[0] = (s) => n.value = s),
3415
- items: w
3414
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
3415
+ items: k
3416
3416
  }, null, 8, ["model-value"]),
3417
3417
  t("div", fn, [
3418
- (d(), A(be((a = _.value) == null ? void 0 : a.component), Le({
3418
+ (c(), A(be((a = x.value) == null ? void 0 : a.component), Le({
3419
3419
  modelValue: e.value,
3420
- "onUpdate:modelValue": m[1] || (m[1] = (s) => e.value = s)
3421
- }, (u = _.value) == null ? void 0 : u.props), null, 16, ["modelValue"]))
3420
+ "onUpdate:modelValue": r[1] || (r[1] = (s) => e.value = s)
3421
+ }, (v = x.value) == null ? void 0 : v.props), null, 16, ["modelValue"]))
3422
3422
  ])
3423
3423
  ]);
3424
3424
  };
@@ -3433,41 +3433,41 @@ const rn = [
3433
3433
  modelModifiers: {}
3434
3434
  },
3435
3435
  emits: ["update:modelValue"],
3436
- setup(v) {
3437
- const { t: o } = W(), e = Q(v, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage: S } = Fe(), { restaurants: h } = ue(), r = z(
3438
- () => h.map((m) => ({ label: m.name, value: m.id }))
3436
+ setup(g) {
3437
+ const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
3438
+ () => w.map((r) => ({ label: r.name, value: r.id }))
3439
3439
  );
3440
- async function p() {
3441
- await S({
3440
+ async function d() {
3441
+ await D({
3442
3442
  message: o("report.messages.confirmDelete", { name: e.value.name }),
3443
3443
  title: o("report.common.delete")
3444
- }) && await _(async () => {
3444
+ }) && await x(async () => {
3445
3445
  try {
3446
- await Ve(e.value._id), await w.getSettings(), x.back();
3447
- } catch (b) {
3448
- n.open({ type: "error", message: b.message });
3446
+ await Ve(e.value._id), await k.getSettings(), b.back();
3447
+ } catch (y) {
3448
+ n.open({ type: "error", message: y.message });
3449
3449
  }
3450
3450
  });
3451
3451
  }
3452
- async function k() {
3453
- await _(async () => {
3452
+ async function h() {
3453
+ await x(async () => {
3454
3454
  try {
3455
- await $e(e.value._id, e.value), await w.getSettings();
3456
- } catch (m) {
3457
- n.open({ type: "error", message: m.message });
3455
+ await $e(e.value._id, e.value), await k.getSettings();
3456
+ } catch (r) {
3457
+ n.open({ type: "error", message: r.message });
3458
3458
  }
3459
3459
  });
3460
3460
  }
3461
- function g(m, b) {
3462
- var C, l;
3463
- (l = (C = e.value.platform) == null ? void 0 : C.mappings) != null && l[m] && (e.value.platform.mappings[m] = e.value.platform.mappings[m].filter(
3464
- (a, u) => u !== b
3461
+ function _(r, y) {
3462
+ var S, l;
3463
+ (l = (S = e.value.platform) == null ? void 0 : S.mappings) != null && l[r] && (e.value.platform.mappings[r] = e.value.platform.mappings[r].filter(
3464
+ (a, v) => v !== y
3465
3465
  ));
3466
3466
  }
3467
- function y(m) {
3468
- var b, C;
3469
- (C = (b = e.value.platform) == null ? void 0 : b.mappings) != null && C[m] && (e.value.platform.mappings[m] = [
3470
- ...e.value.platform.mappings[m],
3467
+ function u(r) {
3468
+ var y, S;
3469
+ (S = (y = e.value.platform) == null ? void 0 : y.mappings) != null && S[r] && (e.value.platform.mappings[r] = [
3470
+ ...e.value.platform.mappings[r],
3471
3471
  {
3472
3472
  key: "",
3473
3473
  name: "",
@@ -3476,40 +3476,40 @@ const rn = [
3476
3476
  }
3477
3477
  ]);
3478
3478
  }
3479
- async function c() {
3480
- await _(async () => {
3479
+ async function p() {
3480
+ await x(async () => {
3481
3481
  try {
3482
- await Se(e.value._id), await w.getSettings();
3483
- } catch (m) {
3484
- n.open({ type: "error", message: m.message });
3482
+ await Se(e.value._id), await k.getSettings();
3483
+ } catch (r) {
3484
+ n.open({ type: "error", message: r.message });
3485
3485
  }
3486
3486
  });
3487
3487
  }
3488
- return (m, b) => {
3488
+ return (r, y) => {
3489
3489
  var M, N, G, Y, J;
3490
- const C = V("FmIcon"), l = V("FmButton"), a = V("FmMenuDivider"), u = V("FmTextField"), s = V("FmSelect");
3491
- return (N = (M = e.value) == null ? void 0 : M.platform) != null && N.mappings ? (d(), D("div", gn, [
3490
+ const S = V("FmIcon"), l = V("FmButton"), a = V("FmMenuDivider"), v = V("FmTextField"), s = V("FmSelect");
3491
+ return (N = (M = e.value) == null ? void 0 : M.platform) != null && N.mappings ? (c(), F("div", gn, [
3492
3492
  t("div", yn, [
3493
3493
  t("div", xn, [
3494
- b[4] || (b[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
3494
+ y[4] || (y[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
3495
3495
  t("div", _n, [
3496
3496
  t("div", bn, [
3497
- i(C, {
3497
+ i(S, {
3498
3498
  name: "refresh",
3499
3499
  class: "p-2 bg-gray-100 rounded-full",
3500
- onClick: c
3500
+ onClick: p
3501
3501
  }),
3502
3502
  t("span", wn, T(f(o)("report.integration.iflexiHrms.refreshTooltip")), 1)
3503
3503
  ]),
3504
3504
  i(l, {
3505
3505
  variant: "tertiary",
3506
3506
  label: f(o)("report.common.delete"),
3507
- onClick: p
3507
+ onClick: d
3508
3508
  }, null, 8, ["label"]),
3509
3509
  i(l, {
3510
3510
  variant: "primary",
3511
3511
  label: f(o)("report.common.update"),
3512
- onClick: k
3512
+ onClick: h
3513
3513
  }, null, 8, ["label"])
3514
3514
  ])
3515
3515
  ])
@@ -3521,9 +3521,9 @@ const rn = [
3521
3521
  t("div", $n, [
3522
3522
  t("div", Sn, T(f(o)("report.common.name")), 1),
3523
3523
  t("div", Cn, [
3524
- i(u, {
3524
+ i(v, {
3525
3525
  modelValue: e.value.name,
3526
- "onUpdate:modelValue": b[0] || (b[0] = (O) => e.value.name = O)
3526
+ "onUpdate:modelValue": y[0] || (y[0] = (O) => e.value.name = O)
3527
3527
  }, null, 8, ["modelValue"])
3528
3528
  ])
3529
3529
  ]),
@@ -3532,16 +3532,16 @@ const rn = [
3532
3532
  i(s, {
3533
3533
  "model-value": e.value.platform.locationIds[0],
3534
3534
  multiselect: !1,
3535
- items: r.value,
3535
+ items: m.value,
3536
3536
  placeholder: "Select location",
3537
3537
  class: "flex-grow",
3538
- "onUpdate:modelValue": b[1] || (b[1] = (O) => e.value.platform.locationIds[0] = O)
3538
+ "onUpdate:modelValue": y[1] || (y[1] = (O) => e.value.platform.locationIds[0] = O)
3539
3539
  }, null, 8, ["model-value", "items"])
3540
3540
  ])
3541
3541
  ]),
3542
3542
  i(Te, {
3543
3543
  modelValue: e.value.platform,
3544
- "onUpdate:modelValue": b[2] || (b[2] = (O) => e.value.platform = O),
3544
+ "onUpdate:modelValue": y[2] || (y[2] = (O) => e.value.platform = O),
3545
3545
  label: f(o)("report.input.email")
3546
3546
  }, null, 8, ["modelValue", "label"]),
3547
3547
  t("div", Un, [
@@ -3549,11 +3549,11 @@ const rn = [
3549
3549
  i(l, {
3550
3550
  variant: "primary",
3551
3551
  icon: "add",
3552
- onClick: b[3] || (b[3] = () => y("employees"))
3552
+ onClick: y[3] || (y[3] = () => u("employees"))
3553
3553
  })
3554
3554
  ]),
3555
3555
  t("div", In, [
3556
- (d(!0), D(L, null, X((J = (Y = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : Y.mappings) == null ? void 0 : J.employees, (O, j) => (d(), A(P, {
3556
+ (c(!0), F(L, null, X((J = (Y = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : Y.mappings) == null ? void 0 : J.employees, (O, j) => (c(), A(P, {
3557
3557
  key: `employee-${j}`,
3558
3558
  modelValue: e.value.platform.mappings.employees[j],
3559
3559
  "onUpdate:modelValue": (E) => e.value.platform.mappings.employees[j] = E,
@@ -3563,7 +3563,7 @@ const rn = [
3563
3563
  employeeNo: { placeholder: "Employee No", editable: !0 }
3564
3564
  },
3565
3565
  removable: !0,
3566
- onRemove: () => g("employees", j)
3566
+ onRemove: () => _("employees", j)
3567
3567
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
3568
3568
  ])
3569
3569
  ])
@@ -3580,7 +3580,7 @@ const rn = [
3580
3580
  modelModifiers: {}
3581
3581
  },
3582
3582
  emits: ["update:modelValue"],
3583
- setup(v) {
3583
+ setup(g) {
3584
3584
  const { t: o } = W(), e = B([]), n = [
3585
3585
  {
3586
3586
  accessorKey: "name",
@@ -3607,52 +3607,52 @@ const rn = [
3607
3607
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
3608
3608
  enableSorting: !1
3609
3609
  }
3610
- ], w = Q(v, "modelValue"), x = B(!1), _ = fe(), { dateRange: S } = De(ue());
3610
+ ], k = Q(g, "modelValue"), b = B(!1), x = fe(), { dateRange: D } = De(ue());
3611
3611
  ge(
3612
- () => S.value,
3612
+ () => D.value,
3613
3613
  async () => {
3614
- if (w.value._id)
3614
+ if (k.value._id)
3615
3615
  try {
3616
- x.value = !0, e.value = await Ce(w.value._id);
3617
- } catch (r) {
3618
- _.open({ message: r.message, type: "error" });
3616
+ b.value = !0, e.value = await Ce(k.value._id);
3617
+ } catch (m) {
3618
+ x.open({ message: m.message, type: "error" });
3619
3619
  } finally {
3620
- x.value = !1;
3620
+ b.value = !1;
3621
3621
  }
3622
3622
  },
3623
3623
  {
3624
3624
  immediate: !0
3625
3625
  }
3626
3626
  );
3627
- async function h() {
3627
+ async function w() {
3628
3628
  try {
3629
- w.value._id ? (x.value = !0, await Pe(w.value._id)) : _.open({ message: "Invalid setting", type: "error" });
3630
- } catch (r) {
3631
- _.open({ message: r.message, type: "error" });
3629
+ k.value._id ? (b.value = !0, await Pe(k.value._id)) : x.open({ message: "Invalid setting", type: "error" });
3630
+ } catch (m) {
3631
+ x.open({ message: m.message, type: "error" });
3632
3632
  } finally {
3633
- x.value = !1;
3633
+ b.value = !1;
3634
3634
  }
3635
3635
  }
3636
- return (r, p) => {
3637
- const k = V("FmButton"), g = V("FmCircularProgress"), y = V("FmTable");
3638
- return d(), D("div", Kn, [
3636
+ return (m, d) => {
3637
+ const h = V("FmButton"), _ = V("FmCircularProgress"), u = V("FmTable");
3638
+ return c(), F("div", Kn, [
3639
3639
  t("div", An, [
3640
3640
  i(Ue, {
3641
- "date-range": f(S),
3642
- "onUpdate:dateRange": p[0] || (p[0] = (c) => he(S) ? S.value = c : null),
3641
+ "date-range": f(D),
3642
+ "onUpdate:dateRange": d[0] || (d[0] = (p) => he(D) ? D.value = p : null),
3643
3643
  compare: !1
3644
3644
  }, null, 8, ["date-range"]),
3645
- i(k, {
3646
- loading: x.value,
3645
+ i(h, {
3646
+ loading: b.value,
3647
3647
  variant: "primary",
3648
3648
  label: f(o)("report.common.download"),
3649
- onClick: h
3649
+ onClick: w
3650
3650
  }, null, 8, ["loading", "label"])
3651
3651
  ]),
3652
- x.value ? (d(), D("div", Pn, [
3653
- i(g, { size: "xl" }),
3654
- t("span", Nn, T(f(o)("report.common.loading")), 1)
3655
- ])) : e.value.length > 0 ? (d(), A(y, {
3652
+ b.value ? (c(), F("div", Pn, [
3653
+ i(_, { size: "xl" }),
3654
+ t("span", Nn, T(f(o)("report.common.isLoading")), 1)
3655
+ ])) : e.value.length > 0 ? (c(), A(u, {
3656
3656
  key: 1,
3657
3657
  class: "flex overflow-scroll",
3658
3658
  "row-data": e.value,
@@ -3668,8 +3668,8 @@ const rn = [
3668
3668
  modelModifiers: {}
3669
3669
  },
3670
3670
  emits: ["update:modelValue"],
3671
- setup(v) {
3672
- const { t: o } = W(), e = Q(v, "modelValue"), n = B("setting"), w = [
3671
+ setup(g) {
3672
+ const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
3673
3673
  {
3674
3674
  label: o("report.integration.setting"),
3675
3675
  value: "setting",
@@ -3680,7 +3680,7 @@ const rn = [
3680
3680
  value: "preview",
3681
3681
  icon: "table"
3682
3682
  }
3683
- ], x = pe(), _ = z(() => {
3683
+ ], b = pe(), x = z(() => {
3684
3684
  switch (n.value) {
3685
3685
  case "preview":
3686
3686
  return Rn;
@@ -3690,30 +3690,30 @@ const rn = [
3690
3690
  return null;
3691
3691
  }
3692
3692
  });
3693
- return (S, h) => {
3694
- var k;
3695
- const r = V("FmPageHead"), p = V("FmTabs");
3696
- return d(), D("div", On, [
3697
- i(r, {
3698
- title: ((k = e.value) == null ? void 0 : k.name) || "AutoCount",
3693
+ return (D, w) => {
3694
+ var h;
3695
+ const m = V("FmPageHead"), d = V("FmTabs");
3696
+ return c(), F("div", On, [
3697
+ i(m, {
3698
+ title: ((h = e.value) == null ? void 0 : h.name) || "AutoCount",
3699
3699
  "back-button": !0,
3700
3700
  style: { paddingLeft: "0px", paddingRight: "0px" },
3701
- "onClick:back": f(x).back
3701
+ "onClick:back": f(b).back
3702
3702
  }, {
3703
- description: xe(() => h[2] || (h[2] = [
3703
+ description: xe(() => w[2] || (w[2] = [
3704
3704
  t("div", null, null, -1)
3705
3705
  ])),
3706
3706
  _: 1
3707
3707
  }, 8, ["title", "onClick:back"]),
3708
- i(p, {
3708
+ i(d, {
3709
3709
  "model-value": n.value,
3710
- "onUpdate:modelValue": h[0] || (h[0] = (g) => n.value = g),
3711
- items: w
3710
+ "onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
3711
+ items: k
3712
3712
  }, null, 8, ["model-value"]),
3713
3713
  t("div", Bn, [
3714
- (d(), A(be(_.value), {
3714
+ (c(), A(be(x.value), {
3715
3715
  modelValue: e.value,
3716
- "onUpdate:modelValue": h[1] || (h[1] = (g) => e.value = g)
3716
+ "onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
3717
3717
  }, null, 8, ["modelValue"]))
3718
3718
  ])
3719
3719
  ]);
@@ -3721,20 +3721,20 @@ const rn = [
3721
3721
  }
3722
3722
  }), Ln = { class: "px-24 h-full relative" }, Jn = /* @__PURE__ */ H({
3723
3723
  __name: "Integration",
3724
- setup(v) {
3725
- const o = B(void 0), { params: e } = ze(), n = we(), w = B();
3724
+ setup(g) {
3725
+ const o = B(void 0), { params: e } = ze(), n = we(), k = B();
3726
3726
  Ee(async () => {
3727
3727
  n.settings.length === 0 && await n.getSettings();
3728
3728
  }), ge(
3729
3729
  () => n.settings,
3730
- (_) => {
3731
- var h;
3732
- const S = _.find((r) => r._id === e.id);
3733
- S && (w.value = S, o.value = (h = w.value.platform) == null ? void 0 : h.name);
3730
+ (x) => {
3731
+ var w;
3732
+ const D = x.find((m) => m._id === e.id);
3733
+ D && (k.value = D, o.value = (w = k.value.platform) == null ? void 0 : w.name);
3734
3734
  },
3735
3735
  { immediate: !0 }
3736
3736
  );
3737
- const x = z(() => {
3737
+ const b = z(() => {
3738
3738
  switch (o.value) {
3739
3739
  case de.Xero:
3740
3740
  return Zt;
@@ -3752,10 +3752,10 @@ const rn = [
3752
3752
  return null;
3753
3753
  }
3754
3754
  });
3755
- return (_, S) => (d(), D("div", Ln, [
3756
- (d(), A(be(x.value), {
3757
- modelValue: w.value,
3758
- "onUpdate:modelValue": S[0] || (S[0] = (h) => w.value = h)
3755
+ return (x, D) => (c(), F("div", Ln, [
3756
+ (c(), A(be(b.value), {
3757
+ modelValue: k.value,
3758
+ "onUpdate:modelValue": D[0] || (D[0] = (w) => k.value = w)
3759
3759
  }, null, 8, ["modelValue"]))
3760
3760
  ]));
3761
3761
  }