@feedmepos/mf-report 5.14.1 → 5.14.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/{App-BSFklEEa.js → App-y_r1I8Kx.js} +33 -33
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-aFYkpOlH.js → BaseDialog.vue_vue_type_script_setup_true_lang-BfqoIHbA.js} +2 -2
  3. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-DPMsvMfX.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-D_vOomEW.js} +2 -2
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-C1E7IoIA.js → Default.vue_vue_type_script_setup_true_lang-SKf2r2G8.js} +2 -2
  5. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-AUYQMBzZ.js → DynamicWidget.vue_vue_type_script_setup_true_lang-BMVhDJ_I.js} +618 -592
  6. package/dist/{InsightView-CMmAT2rl.js → InsightView-BFki5EUd.js} +5 -5
  7. package/dist/{Integration-DrGnZU7Q.js → Integration-C1vkCqlT.js} +447 -438
  8. package/dist/{Integrations-BcKluNPe.js → Integrations-BTB-ZK56.js} +3 -3
  9. package/dist/{Layout-mIWpWnCL.js → Layout-V_HNhnDl.js} +1 -1
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-dzy_j_cA.js → MenuTab.vue_vue_type_script_setup_true_lang-CTyHtBSW.js} +6 -6
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-euNq77f5.js → NavigationTab.vue_vue_type_script_setup_true_lang-CCX9gZ52.js} +5 -5
  12. package/dist/{NoData.vue_vue_type_script_setup_true_lang-j8BlZPPp.js → NoData.vue_vue_type_script_setup_true_lang-DT2L1CAc.js} +1 -1
  13. package/dist/{OverviewView-DDXR_j2B.js → OverviewView-B8azM0WK.js} +5 -5
  14. package/dist/{Report-BBtxkvJ6.js → Report-CNKUdP4L.js} +4 -4
  15. package/dist/{ReportEditor-fhkMIuBz.js → ReportEditor-BLwUfj38.js} +6 -6
  16. package/dist/{ReportView-DeKcGdcr.js → ReportView-CNwMhmvY.js} +7 -7
  17. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-kzXPr73e.js → SelectComponent.vue_vue_type_script_setup_true_lang-CJaP9yq9.js} +1 -1
  18. package/dist/{Setting-BbkhsS8O.js → Setting-glu98b3A.js} +4 -4
  19. package/dist/{TileEditor-Bm2N-CGt.js → TileEditor-BmlqAFyc.js} +7 -7
  20. package/dist/{TransitionFade-SBrSUfhd.js → TransitionFade-DKCPXh2R.js} +5 -5
  21. package/dist/app.js +11 -11
  22. package/dist/assets/{formatChartData.worker-CzUhzs-5.js → formatChartData.worker-CtQY7gMJ.js} +2 -2
  23. package/dist/{helper-C0VLdBRU.js → helper-CZss0RvH.js} +1 -1
  24. package/dist/{vue-i18n-DG0DIzwC.js → vue-i18n-CLA-22OG.js} +14 -14
  25. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
- import { defineComponent as Q, mergeModels as Ae, useModel as J, computed as q, resolveComponent as K, createElementBlock as P, openBlock as x, createElementVNode as t, createCommentVNode as j, normalizeClass as je, Fragment as xe, createBlock as M, withCtx as be, toDisplayString as C, renderList as Ce, createVNode as l, unref as r, normalizeStyle as We, createTextVNode as Ze, ref as E, onUnmounted as Se, watch as we, isRef as $e, h as F, resolveDynamicComponent as Ve, mergeProps as Ee, onMounted as qe } from "vue";
1
+ import { defineComponent as Q, mergeModels as Ae, useModel as J, computed as Y, resolveComponent as K, createElementBlock as R, openBlock as b, createElementVNode as t, createCommentVNode as j, normalizeClass as je, Fragment as xe, createBlock as M, withCtx as be, toDisplayString as C, renderList as Ce, createVNode as l, unref as r, normalizeStyle as We, createTextVNode as Ze, ref as B, onUnmounted as Se, watch as we, isRef as $e, h as F, resolveDynamicComponent as Ve, mergeProps as Be, onMounted as Ye } from "vue";
2
2
  import { useRouter as ue, useRoute as et } from "vue-router";
3
- import { u as W, I as ge, d as Me, s as tt, e as ke, f as De, b as fe, v as ot, o as at, t as Fe, w as Ke, x as Te, y as Ne, z as Be, A as lt, B as nt, E as st, G as _e, H as Oe, J as it, K as rt, L as dt, M as mt } from "./vue-i18n-DG0DIzwC.js";
3
+ import { u as W, I as ge, d as Me, s as tt, e as ke, f as De, b as fe, v as ot, o as at, t as Fe, w as Ke, x as Te, y as Ne, z as Ee, A as lt, B as nt, E as st, G as _e, H as Oe, J as it, K as rt, L as dt, M as mt } from "./vue-i18n-CLA-22OG.js";
4
4
  import { u as Ue } from "./message-dialog-UoMWOnil.js";
5
5
  import { useSnackbar as ve } from "@feedmepos/ui-library";
6
6
  import { storeToRefs as Ie } from "pinia";
7
- import { _ as Pe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DPMsvMfX.js";
7
+ import { _ as Re } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-D_vOomEW.js";
8
8
  const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, ct = { class: "w-[100%]" }, ut = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, ft = { class: "w-[100%] flex flex-row gap-[4px]" }, vt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, gt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, yt = {
9
9
  key: 0,
10
10
  class: "w-[24px] flex items-center"
@@ -37,7 +37,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
37
37
  }),
38
38
  emits: /* @__PURE__ */ Ae(["remove"], ["update:modelValue"]),
39
39
  setup(f, { emit: a }) {
40
- const e = J(f, "modelValue"), i = f, g = q(
40
+ const e = J(f, "modelValue"), i = f, g = Y(
41
41
  () => Object.keys(i.options).map((U) => {
42
42
  const y = i.options[U];
43
43
  return {
@@ -58,20 +58,20 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
58
58
  return (U, y) => {
59
59
  var A;
60
60
  const h = K("FmTextField"), c = K("FmTooltip"), T = K("FmIcon");
61
- return x(), P("div", pt, [
61
+ return b(), R("div", pt, [
62
62
  t("div", {
63
63
  class: je(`${f.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-col items-start gap-[4px]`)
64
64
  }, [
65
- g.value.length === 3 && !g.value.every((m) => m.editable) ? (x(), P(xe, { key: 0 }, [
65
+ g.value.length === 3 && !g.value.every((m) => m.editable) ? (b(), R(xe, { key: 0 }, [
66
66
  t("div", ct, [
67
- g.value[0].editable ? (x(), M(h, {
67
+ g.value[0].editable ? (b(), M(h, {
68
68
  key: 0,
69
69
  "model-value": e.value[g.value[0].key],
70
70
  placeholder: g.value[0].placeholder,
71
71
  type: f.type,
72
72
  rules: f.rules,
73
73
  "onUpdate:modelValue": y[0] || (y[0] = (m) => V(g.value[0].key, m))
74
- }, null, 8, ["model-value", "placeholder", "type", "rules"])) : (x(), M(c, {
74
+ }, null, 8, ["model-value", "placeholder", "type", "rules"])) : (b(), M(c, {
75
75
  key: 1,
76
76
  content: (A = e.value[g.value[0].key]) == null ? void 0 : A.toString(),
77
77
  class: "w-[100%]"
@@ -83,20 +83,20 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
83
83
  }, 8, ["content"]))
84
84
  ]),
85
85
  t("div", ft, [
86
- (x(!0), P(xe, null, Ce(g.value.slice(1), (m) => {
86
+ (b(!0), R(xe, null, Ce(g.value.slice(1), (m) => {
87
87
  var u;
88
- return x(), P("div", {
88
+ return b(), R("div", {
89
89
  key: m.key,
90
90
  class: "w-[50%]"
91
91
  }, [
92
- m.editable ? (x(), M(h, {
92
+ m.editable ? (b(), M(h, {
93
93
  key: 0,
94
94
  "model-value": e.value[m.key],
95
95
  placeholder: m.placeholder,
96
96
  type: f.type,
97
97
  rules: f.rules,
98
98
  "onUpdate:modelValue": (d) => V(m.key, d)
99
- }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])) : (x(), M(c, {
99
+ }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])) : (b(), M(c, {
100
100
  key: 1,
101
101
  content: (u = e.value[m.key]) == null ? void 0 : u.toString(),
102
102
  class: "w-[100%]"
@@ -109,16 +109,16 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
109
109
  ]);
110
110
  }), 128))
111
111
  ])
112
- ], 64)) : (x(), P("div", {
112
+ ], 64)) : (b(), R("div", {
113
113
  key: 1,
114
114
  class: je(`${f.removable || !f.isTakeWholeRow ? "flex-row" : "flex-col"} flex items-start gap-[4px] w-[100%]`)
115
115
  }, [
116
- (x(!0), P(xe, null, Ce(g.value, (m) => {
116
+ (b(!0), R(xe, null, Ce(g.value, (m) => {
117
117
  var u;
118
- return x(), P(xe, {
118
+ return b(), R(xe, {
119
119
  key: m.key
120
120
  }, [
121
- m.editable ? (x(), P("div", {
121
+ m.editable ? (b(), R("div", {
122
122
  key: 0,
123
123
  class: je(`${f.removable || !f.isTakeWholeRow ? "w-[50%]" : "w-[100%]"}`)
124
124
  }, [
@@ -129,7 +129,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
129
129
  rules: f.rules,
130
130
  "onUpdate:modelValue": (d) => V(m.key, d)
131
131
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
132
- ], 2)) : (x(), M(c, {
132
+ ], 2)) : (b(), M(c, {
133
133
  key: 1,
134
134
  content: (u = e.value[m.key]) == null ? void 0 : u.toString(),
135
135
  class: "w-[50%]"
@@ -143,7 +143,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
143
143
  }), 128))
144
144
  ], 2))
145
145
  ], 2),
146
- f.removable ? (x(), P("div", yt, [
146
+ f.removable ? (b(), R("div", yt, [
147
147
  l(T, {
148
148
  class: "cursor-pointer text-fm-color-neutral-gray-400",
149
149
  name: "delete",
@@ -160,7 +160,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
160
160
  }, _t = { class: "flex flex-col w-[100%] justify-between" }, ht = { class: "flex flex-row items-center w-[100%] justify-start" }, kt = { class: "text-nowrap overflow-hidden text-ellipsis font-semibold w-[25%]" }, Ct = {
161
161
  key: 0,
162
162
  class: "flex flex-col w-[100%] justify-start"
163
- }, $t = { class: "text-nowrap overflow-hidden text-ellipsis font-semibold" }, Vt = { class: "w-[100%]" }, At = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, St = { class: "flex flex-col w-[100%] justify-between" }, Dt = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis font-semibold" }, Ft = { class: "w-[100%]" }, Re = /* @__PURE__ */ Q({
163
+ }, $t = { class: "text-nowrap overflow-hidden text-ellipsis font-semibold" }, Vt = { class: "w-[100%]" }, At = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, St = { class: "flex flex-col w-[100%] justify-between" }, Dt = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis font-semibold" }, Ft = { class: "w-[100%]" }, Pe = /* @__PURE__ */ Q({
164
164
  __name: "UploadSection",
165
165
  props: /* @__PURE__ */ Ae({
166
166
  label: {
@@ -177,7 +177,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
177
177
  }),
178
178
  emits: ["update:modelValue"],
179
179
  setup(f) {
180
- const { t: a } = W(), e = J(f, "modelValue"), i = q(() => {
180
+ const { t: a } = W(), e = J(f, "modelValue"), i = Y(() => {
181
181
  switch (e.value.name) {
182
182
  case ge.AutoCount:
183
183
  case ge.SQL:
@@ -190,10 +190,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
190
190
  return (g, V) => {
191
191
  var h, c;
192
192
  const $ = K("FmSwitch"), U = K("FmTextField"), y = K("FmTimePicker");
193
- return x(), P(xe, null, [
193
+ return b(), R(xe, null, [
194
194
  t("div", xt, [
195
195
  t("div", bt, C(r(a)("report.integration.auto", { label: f.label })), 1),
196
- f.label == "upload" ? (x(), P("div", wt, C(r(a)("report.integration.lastUploadDate")) + ": " + C(f.lastUploadDate ? r(Me)(f.lastUploadDate).format("MMMM D, YYYY h:mm A") : r(a)("report.integration.noData.title")), 1)) : j("", !0)
196
+ f.label == "upload" ? (b(), R("div", wt, C(r(a)("report.integration.lastUploadDate")) + ": " + C(f.lastUploadDate ? r(Me)(f.lastUploadDate).format("MMMM D, YYYY h:mm A") : r(a)("report.integration.noData.title")), 1)) : j("", !0)
197
197
  ]),
198
198
  t("div", _t, [
199
199
  t("div", ht, [
@@ -205,7 +205,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
205
205
  }, null, 8, ["modelValue"])
206
206
  ])
207
207
  ]),
208
- i.value ? (x(), P("div", Ct, [
208
+ i.value ? (b(), R("div", Ct, [
209
209
  t("div", $t, C(r(a)("report.common.email")), 1),
210
210
  t("div", Vt, [
211
211
  l(U, {
@@ -287,7 +287,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
287
287
  }),
288
288
  emits: /* @__PURE__ */ Ae(["remove"], ["update:modelValue"]),
289
289
  setup(f, { emit: a }) {
290
- const e = J(f, "modelValue"), i = f, g = q(
290
+ const e = J(f, "modelValue"), i = f, g = Y(
291
291
  () => Object.keys(i.options).map((h) => {
292
292
  const c = i.options[h];
293
293
  return {
@@ -308,26 +308,26 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
308
308
  }, U = (h) => i.singleValueMode ? e.value : e.value[h.key], y = a;
309
309
  return (h, c) => {
310
310
  const T = K("FmSelect"), A = K("FmTextField"), m = K("FmTooltip"), u = K("FmIcon");
311
- return x(), P("div", Kt, [
311
+ return b(), R("div", Kt, [
312
312
  t("div", {
313
313
  class: je(`${f.removable ? "w-[calc(100%-24px)] flex-row" : "w-[100%] flex-col"} flex items-center gap-[4px]`),
314
314
  style: { alignItems: "start" }
315
315
  }, [
316
- (x(!0), P(xe, null, Ce(g.value, (d) => (x(), P(xe, {
316
+ (b(!0), R(xe, null, Ce(g.value, (d) => (b(), R(xe, {
317
317
  key: d.key
318
318
  }, [
319
- d.editable ? (x(), P("div", {
319
+ d.editable ? (b(), R("div", {
320
320
  key: 0,
321
321
  class: je(f.removable ? "w-[50%]" : "w-[100%]")
322
322
  }, [
323
- d.dropdownOptions ? (x(), M(T, {
323
+ d.dropdownOptions ? (b(), M(T, {
324
324
  key: 0,
325
325
  "model-value": U(d),
326
326
  placeholder: d.placeholder,
327
327
  items: d.dropdownOptions,
328
328
  "shift-menu": !0,
329
329
  "onUpdate:modelValue": (v) => V(v, d.key)
330
- }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (x(), M(A, {
330
+ }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (b(), M(A, {
331
331
  key: 1,
332
332
  "model-value": U(d),
333
333
  placeholder: d.placeholder,
@@ -335,7 +335,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
335
335
  rules: f.rules,
336
336
  "onUpdate:modelValue": (v) => V(v, d.key)
337
337
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
338
- ], 2)) : (x(), M(m, {
338
+ ], 2)) : (b(), M(m, {
339
339
  key: 1,
340
340
  content: $(d),
341
341
  class: "w-[50%]"
@@ -347,7 +347,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
347
347
  }, 1032, ["content"]))
348
348
  ], 64))), 128))
349
349
  ], 2),
350
- f.removable ? (x(), P("div", Nt, [
350
+ f.removable ? (b(), R("div", Nt, [
351
351
  l(u, {
352
352
  class: "cursor-pointer text-fm-color-neutral-gray-400",
353
353
  name: "delete",
@@ -373,9 +373,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
373
373
  },
374
374
  emits: ["remove", "update:rows"],
375
375
  setup(f, { emit: a }) {
376
- const e = f, i = q(() => e.rows.length > 1 ? Math.min(e.rows.length, e.columnsPerRow) : 1), g = a;
377
- return (V, $) => (x(), P("div", Ut, [
378
- (x(!0), P(xe, null, Ce(e.rows, (U, y) => (x(), P("div", {
376
+ const e = f, i = Y(() => e.rows.length > 1 ? Math.min(e.rows.length, e.columnsPerRow) : 1), g = a;
377
+ return (V, $) => (b(), R("div", Ut, [
378
+ (b(!0), R(xe, null, Ce(e.rows, (U, y) => (b(), R("div", {
379
379
  key: y,
380
380
  class: "flex flex-col",
381
381
  style: We(
@@ -388,17 +388,17 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
388
388
  "flex flex-row items-center w-full font-medium text-gray-600 mb-2"
389
389
  ])
390
390
  }, [
391
- (x(!0), P(xe, null, Ce(e.headerItems, (h, c) => (x(), P("div", {
391
+ (b(!0), R(xe, null, Ce(e.headerItems, (h, c) => (b(), R("div", {
392
392
  key: `header-item-${c}`,
393
393
  class: "w-[50%]"
394
394
  }, [
395
- y < i.value ? (x(), P(xe, { key: 0 }, [
395
+ y < i.value ? (b(), R(xe, { key: 0 }, [
396
396
  Ze(C(h), 1)
397
397
  ], 64)) : j("", !0)
398
398
  ]))), 128)),
399
- V.removable ? (x(), P("div", It)) : j("", !0)
399
+ V.removable ? (b(), R("div", It)) : j("", !0)
400
400
  ], 2),
401
- !e.fieldsOptions || !Object.values(e.fieldsOptions).some((h) => h.dropdownOptions) ? (x(), M(L, {
401
+ !e.fieldsOptions || !Object.values(e.fieldsOptions).some((h) => h.dropdownOptions) ? (b(), M(L, {
402
402
  key: `item-${y}`,
403
403
  "model-value": e.rows[y],
404
404
  options: e.fieldsOptions || {},
@@ -409,7 +409,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
409
409
  c[y] = h, g("update:rows", c);
410
410
  },
411
411
  onRemove: () => g("remove", e.mappingType || "", y)
412
- }, null, 8, ["model-value", "options", "removable", "onUpdate:modelValue", "onRemove"])) : (x(), M(Je, {
412
+ }, null, 8, ["model-value", "options", "removable", "onUpdate:modelValue", "onRemove"])) : (b(), M(Je, {
413
413
  key: 1,
414
414
  "model-value": e.rows[y],
415
415
  options: e.fieldsOptions || {},
@@ -423,10 +423,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
423
423
  ], 4))), 128))
424
424
  ]));
425
425
  }
426
- }), Pt = {
426
+ }), Rt = {
427
427
  key: 0,
428
428
  class: "flex flex-col h-full"
429
- }, Rt = { class: "flex flex-col gap-[16px] pb-[24px]" }, Mt = { class: "flex flex-row justify-between items-center gap-2" }, jt = { class: "flex flex-row gap-2 items-center" }, Ot = { class: "relative group cursor-pointer" }, Lt = { class: "flex flex-col gap-16 pt-[24px] overflow-scroll" }, Bt = { class: "w-[90%] flex flex-col gap-24" }, Et = { class: "flex flex-row items-center justify-between gap-2" }, qt = { class: "w-[25%]" }, Yt = { class: "flex flex-col gap-[16px]" }, zt = { class: "flex flex-col max-w-[100%] justify-between" }, Ht = { class: "flex-grow" }, Xt = { class: "flex flex-col max-w-[100%] justify-between" }, Qt = { class: "flex flex-col gap-[16px]" }, Gt = { class: "flex flex-col max-w-[100%] justify-between" }, Jt = { class: "flex-grow" }, Wt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Zt = { class: "flex-grow" }, eo = { class: "flex flex-row items-center max-w-[100%] justify-between" }, to = { class: "flex-grow" }, oo = { class: "flex flex-row items-center justify-between gap-x-16" }, ao = {
429
+ }, Pt = { class: "flex flex-col gap-[16px] pb-[24px]" }, Mt = { class: "flex flex-row justify-between items-center gap-2" }, jt = { class: "flex flex-row gap-2 items-center" }, Ot = { class: "relative group cursor-pointer" }, Lt = { class: "flex flex-col gap-16 pt-[24px] overflow-scroll" }, Et = { class: "w-[90%] flex flex-col gap-24" }, Bt = { class: "flex flex-row items-center justify-between gap-2" }, Yt = { class: "w-[25%]" }, qt = { class: "flex flex-col gap-[16px]" }, zt = { class: "flex flex-col max-w-[100%] justify-between" }, Ht = { class: "flex-grow" }, Xt = { class: "flex flex-col max-w-[100%] justify-between" }, Qt = { class: "flex flex-col gap-[16px]" }, Gt = { class: "flex flex-col max-w-[100%] justify-between" }, Jt = { class: "flex-grow" }, Wt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Zt = { class: "flex-grow" }, eo = { class: "flex flex-row items-center max-w-[100%] justify-between" }, to = { class: "flex-grow" }, oo = { class: "flex flex-row items-center justify-between gap-x-16" }, ao = {
430
430
  key: 0,
431
431
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
432
432
  }, lo = { class: "flex flex-row items-center justify-between gap-x-16" }, no = {
@@ -459,12 +459,12 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
459
459
  }),
460
460
  emits: ["update:modelValue"],
461
461
  setup(f) {
462
- const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = E(!1), c = q(
462
+ const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = B(!1), c = Y(
463
463
  () => y.map((o) => ({ label: o.name, value: o.id }))
464
- ), T = q(() => {
464
+ ), T = Y(() => {
465
465
  var o, n;
466
466
  return h.value ? "Connecting" : (n = (o = e.value) == null ? void 0 : o.platform) != null && n.accessToken ? "Disconnect" : "Connect";
467
- }), A = E(0);
467
+ }), A = B(0);
468
468
  async function m() {
469
469
  var o;
470
470
  if (h.value)
@@ -522,7 +522,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
522
522
  name: n.label
523
523
  });
524
524
  }
525
- function b(o, n) {
525
+ function x(o, n) {
526
526
  var k, D;
527
527
  (D = (k = e.value.platform) == null ? void 0 : k.mappings) != null && D[o] && (e.value.platform.mappings[o] = e.value.platform.mappings[o].filter(
528
528
  (I, O) => O !== n
@@ -557,10 +557,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
557
557
  return Se(async () => {
558
558
  await g.getSettings();
559
559
  }), (o, n) => {
560
- var X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, _, N, p, R, S, Y, ye, Ye, ze, He, Xe, Qe, Ge;
561
- const k = K("FmIcon"), D = K("FmButton"), I = K("FmMenuDivider"), O = K("FmCircularProgress"), z = K("FmSelect"), B = K("FmTextField"), H = K("FmSwitch");
562
- return (ee = (X = e.value) == null ? void 0 : X.platform) != null && ee.mappings ? (x(), P("div", Pt, [
563
- t("div", Rt, [
560
+ var X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, _, N, p, P, S, q, ye, qe, ze, He, Xe, Qe, Ge;
561
+ const k = K("FmIcon"), D = K("FmButton"), I = K("FmMenuDivider"), O = K("FmCircularProgress"), z = K("FmSelect"), E = K("FmTextField"), H = K("FmSwitch");
562
+ return (ee = (X = e.value) == null ? void 0 : X.platform) != null && ee.mappings ? (b(), R("div", Rt, [
563
+ t("div", Pt, [
564
564
  t("div", Mt, [
565
565
  n[19] || (n[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
566
566
  t("div", jt, [
@@ -588,10 +588,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
588
588
  ]),
589
589
  l(I, { style: { margin: 0 } }),
590
590
  t("div", Lt, [
591
- t("div", Bt, [
591
+ t("div", Et, [
592
592
  n[31] || (n[31] = t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Authenticate with your official Xero account to enable FeedMe to securely upload data to Xero. ", -1)),
593
- t("div", Et, [
594
- t("div", qt, [
593
+ t("div", Bt, [
594
+ t("div", Yt, [
595
595
  l(D, {
596
596
  disabled: h.value,
597
597
  variant: "primary",
@@ -599,7 +599,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
599
599
  onClick: m
600
600
  }, null, 8, ["disabled", "label"])
601
601
  ]),
602
- !f.tenantOptions.isLoaded && ((te = e.value.platform) != null && te.accessToken) ? (x(), M(O, {
602
+ !f.tenantOptions.isLoaded && ((te = e.value.platform) != null && te.accessToken) ? (b(), M(O, {
603
603
  key: 0,
604
604
  size: "xl"
605
605
  })) : j("", !0),
@@ -612,12 +612,12 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
612
612
  }, null, 8, ["items", "model-value", "placeholder"])
613
613
  ]),
614
614
  l(I, { style: { margin: 0 } }),
615
- t("div", Yt, [
615
+ t("div", qt, [
616
616
  n[22] || (n[22] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "General", -1)),
617
617
  t("div", zt, [
618
618
  n[20] || (n[20] = t("div", { class: "w-[25%] font-semibold" }, "Name", -1)),
619
619
  t("div", Ht, [
620
- l(B, {
620
+ l(E, {
621
621
  modelValue: e.value.name,
622
622
  "onUpdate:modelValue": n[0] || (n[0] = (Z) => e.value.name = Z)
623
623
  }, null, 8, ["modelValue"])
@@ -636,7 +636,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
636
636
  ])
637
637
  ]),
638
638
  l(I, { style: { margin: 0 } }),
639
- l(Re, {
639
+ l(Pe, {
640
640
  modelValue: e.value.platform,
641
641
  "onUpdate:modelValue": n[2] || (n[2] = (Z) => e.value.platform = Z),
642
642
  label: "upload",
@@ -648,7 +648,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
648
648
  t("div", Gt, [
649
649
  n[23] || (n[23] = t("div", { class: "w-[25%] font-semibold" }, "Contact", -1)),
650
650
  t("div", Jt, [
651
- l(B, {
651
+ l(E, {
652
652
  modelValue: e.value.platform.mappings.contact.xeroAccount,
653
653
  "onUpdate:modelValue": n[3] || (n[3] = (Z) => e.value.platform.mappings.contact.xeroAccount = Z),
654
654
  placeholder: "Contact account number"
@@ -689,12 +689,12 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
689
689
  onClick: n[6] || (n[6] = () => w("taxes"))
690
690
  })
691
691
  ]),
692
- f.taxOptions.isError || e.value.platform.accessToken == null ? (x(), P("div", ao, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : j("", !0),
693
- !f.taxOptions.isLoaded && ((ne = e.value.platform) != null && ne.accessToken) ? (x(), M(O, {
692
+ f.taxOptions.isError || e.value.platform.accessToken == null ? (b(), R("div", ao, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : j("", !0),
693
+ !f.taxOptions.isLoaded && ((ne = e.value.platform) != null && ne.accessToken) ? (b(), M(O, {
694
694
  key: 1,
695
695
  size: "xl"
696
696
  })) : j("", !0),
697
- ((se = f.taxOptions.data) == null ? void 0 : se.length) > 0 ? (x(), M(G, {
697
+ ((se = f.taxOptions.data) == null ? void 0 : se.length) > 0 ? (b(), M(G, {
698
698
  key: 2,
699
699
  "header-items": ["Feedme Key", "Tax"],
700
700
  rows: ((de = (re = (ie = e.value) == null ? void 0 : ie.platform) == null ? void 0 : re.mappings) == null ? void 0 : de.taxes) || [],
@@ -709,7 +709,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
709
709
  dropdownOptions: f.taxOptions.data ?? []
710
710
  }
711
711
  },
712
- onRemove: n[7] || (n[7] = (Z, ce) => b("taxes", ce)),
712
+ onRemove: n[7] || (n[7] = (Z, ce) => x("taxes", ce)),
713
713
  "onUpdate:rows": n[8] || (n[8] = (Z) => {
714
714
  var ce, he;
715
715
  (he = (ce = e.value) == null ? void 0 : ce.platform) != null && he.mappings && (e.value.platform.mappings.taxes = Z);
@@ -725,12 +725,12 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
725
725
  onClick: n[9] || (n[9] = () => w("taxRoundingAdjustments"))
726
726
  })
727
727
  ]),
728
- f.taxOptions.isError || e.value.platform.accessToken == null ? (x(), P("div", no, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : j("", !0),
729
- !f.taxOptions.isLoaded && ((me = e.value.platform) != null && me.accessToken) ? (x(), M(O, {
728
+ f.taxOptions.isError || e.value.platform.accessToken == null ? (b(), R("div", no, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : j("", !0),
729
+ !f.taxOptions.isLoaded && ((me = e.value.platform) != null && me.accessToken) ? (b(), M(O, {
730
730
  key: 4,
731
731
  size: "xl"
732
732
  })) : j("", !0),
733
- ((pe = f.taxOptions.data) == null ? void 0 : pe.length) > 0 ? (x(), M(G, {
733
+ ((pe = f.taxOptions.data) == null ? void 0 : pe.length) > 0 ? (b(), M(G, {
734
734
  key: 5,
735
735
  "header-items": ["Feedme Key", "Tax"],
736
736
  rows: ((p = (N = (_ = e.value) == null ? void 0 : _.platform) == null ? void 0 : N.mappings) == null ? void 0 : p.taxRoundingAdjustments) || [],
@@ -745,7 +745,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
745
745
  dropdownOptions: f.accountCodeOptions.data ?? []
746
746
  }
747
747
  },
748
- onRemove: n[10] || (n[10] = (Z, ce) => b("taxRoundingAdjustments", ce)),
748
+ onRemove: n[10] || (n[10] = (Z, ce) => x("taxRoundingAdjustments", ce)),
749
749
  "onUpdate:rows": n[11] || (n[11] = (Z) => {
750
750
  var ce, he;
751
751
  (he = (ce = e.value) == null ? void 0 : ce.platform) != null && he.mappings && (e.value.platform.mappings.taxRoundingAdjustments = Z);
@@ -761,15 +761,15 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
761
761
  onClick: n[12] || (n[12] = () => w("items"))
762
762
  })
763
763
  ]),
764
- f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (x(), P("div", io, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : j("", !0),
765
- !f.accountCodeOptions.isLoaded && ((R = e.value.platform) != null && R.accessToken) ? (x(), M(O, {
764
+ f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (b(), R("div", io, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : j("", !0),
765
+ !f.accountCodeOptions.isLoaded && ((P = e.value.platform) != null && P.accessToken) ? (b(), M(O, {
766
766
  key: 7,
767
767
  size: "xl"
768
768
  })) : j("", !0),
769
- ((S = f.accountCodeOptions.data) == null ? void 0 : S.length) > 0 ? (x(), M(G, {
769
+ ((S = f.accountCodeOptions.data) == null ? void 0 : S.length) > 0 ? (b(), M(G, {
770
770
  key: 8,
771
771
  "header-items": ["Feedme Key", "Item Code"],
772
- rows: ((Ye = (ye = (Y = e.value) == null ? void 0 : Y.platform) == null ? void 0 : ye.mappings) == null ? void 0 : Ye.items) || [],
772
+ rows: ((qe = (ye = (q = e.value) == null ? void 0 : q.platform) == null ? void 0 : ye.mappings) == null ? void 0 : qe.items) || [],
773
773
  "columns-per-row": 2,
774
774
  removable: !0,
775
775
  "mapping-type": "items",
@@ -781,7 +781,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
781
781
  dropdownOptions: f.accountCodeOptions.data ?? []
782
782
  }
783
783
  },
784
- onRemove: n[13] || (n[13] = (Z, ce) => b("items", ce)),
784
+ onRemove: n[13] || (n[13] = (Z, ce) => x("items", ce)),
785
785
  "onUpdate:rows": n[14] || (n[14] = (Z) => {
786
786
  var ce, he;
787
787
  (he = (ce = e.value) == null ? void 0 : ce.platform) != null && he.mappings && (e.value.platform.mappings.items = Z);
@@ -797,12 +797,12 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
797
797
  onClick: n[15] || (n[15] = () => w("payments"))
798
798
  })
799
799
  ]),
800
- f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (x(), P("div", mo, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : j("", !0),
801
- !f.accountCodeOptions.isLoaded && ((ze = e.value.platform) != null && ze.accessToken) ? (x(), M(O, {
800
+ f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (b(), R("div", mo, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : j("", !0),
801
+ !f.accountCodeOptions.isLoaded && ((ze = e.value.platform) != null && ze.accessToken) ? (b(), M(O, {
802
802
  key: 10,
803
803
  size: "xl"
804
804
  })) : j("", !0),
805
- ((He = f.accountCodeOptions.data) == null ? void 0 : He.length) > 0 ? (x(), M(G, {
805
+ ((He = f.accountCodeOptions.data) == null ? void 0 : He.length) > 0 ? (b(), M(G, {
806
806
  key: 11,
807
807
  "header-items": ["Feedme Key", "Payment Code"],
808
808
  rows: ((Ge = (Qe = (Xe = e.value) == null ? void 0 : Xe.platform) == null ? void 0 : Qe.mappings) == null ? void 0 : Ge.payments) || [],
@@ -817,7 +817,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
817
817
  dropdownOptions: f.accountCodeOptions.data ?? []
818
818
  }
819
819
  },
820
- onRemove: n[16] || (n[16] = (Z, ce) => b("payments", ce)),
820
+ onRemove: n[16] || (n[16] = (Z, ce) => x("payments", ce)),
821
821
  "onUpdate:rows": n[17] || (n[17] = (Z) => {
822
822
  var ce, he;
823
823
  (he = (ce = e.value) == null ? void 0 : ce.platform) != null && he.mappings && (e.value.platform.mappings.payments = Z);
@@ -840,7 +840,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
840
840
  },
841
841
  emits: ["update:modelValue"],
842
842
  setup(f) {
843
- const a = E([]), { t: e } = W(), i = q(
843
+ const a = B([]), { t: e } = W(), i = Y(
844
844
  () => a.value.reduce((c, T) => {
845
845
  const A = c.length, { invoice: m, payments: u } = T;
846
846
  c[A] = {
@@ -947,7 +947,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
947
947
  header: "Payment Amount",
948
948
  enableSorting: !1
949
949
  }
950
- ], V = J(f, "modelValue"), $ = E(!1), U = ve(), { dateRange: y } = Ie(fe());
950
+ ], V = J(f, "modelValue"), $ = B(!1), U = ve(), { dateRange: y } = Ie(fe());
951
951
  we(
952
952
  () => y.value,
953
953
  async () => {
@@ -966,7 +966,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
966
966
  );
967
967
  async function h() {
968
968
  try {
969
- V.value._id ? ($.value = !0, await Be(V.value._id), U.open({ message: "Upload successful", type: "success" })) : U.open({ message: "Invalid accounting setting", type: "error" });
969
+ V.value._id ? ($.value = !0, await Ee(V.value._id), U.open({ message: "Upload successful", type: "success" })) : U.open({ message: "Invalid accounting setting", type: "error" });
970
970
  } catch (c) {
971
971
  c.message && U.open({ message: c.message, type: "error" }), c.errors && c.errors.forEach((T) => U.open({ message: T.Message, type: "error" }));
972
972
  } finally {
@@ -975,9 +975,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
975
975
  }
976
976
  return (c, T) => {
977
977
  const A = K("FmButton"), m = K("FmCircularProgress"), u = K("FmTable");
978
- return x(), P("div", co, [
978
+ return b(), R("div", co, [
979
979
  t("div", uo, [
980
- l(Pe, {
980
+ l(Re, {
981
981
  "date-range": r(y),
982
982
  "onUpdate:dateRange": T[0] || (T[0] = (d) => $e(y) ? y.value = d : null),
983
983
  compare: !1
@@ -989,10 +989,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
989
989
  onClick: h
990
990
  }, null, 8, ["loading"])
991
991
  ]),
992
- $.value ? (x(), P("div", fo, [
992
+ $.value ? (b(), R("div", fo, [
993
993
  l(m, { size: "xl" }),
994
994
  t("span", vo, C(r(e)("report.common.isLoading")), 1)
995
- ])) : i.value.length > 0 ? (x(), M(u, {
995
+ ])) : i.value.length > 0 ? (b(), M(u, {
996
996
  key: 1,
997
997
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
998
998
  "row-data": i.value,
@@ -1009,7 +1009,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1009
1009
  },
1010
1010
  emits: ["update:modelValue"],
1011
1011
  setup(f) {
1012
- const { t: a } = W(), e = J(f, "modelValue"), i = E("setting"), g = E({}), V = E({}), $ = E({}), U = [
1012
+ const { t: a } = W(), e = J(f, "modelValue"), i = B("setting"), g = B({}), V = B({}), $ = B({}), U = [
1013
1013
  {
1014
1014
  label: a("report.integration.setting"),
1015
1015
  value: "setting",
@@ -1020,7 +1020,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1020
1020
  value: "preview",
1021
1021
  icon: "table"
1022
1022
  }
1023
- ], y = ue(), h = q(() => {
1023
+ ], y = ue(), h = Y(() => {
1024
1024
  switch (i.value) {
1025
1025
  case "preview":
1026
1026
  return { component: go };
@@ -1089,11 +1089,11 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1089
1089
  },
1090
1090
  { immediate: !0 }
1091
1091
  ), (m, u) => {
1092
- var b, w, s;
1092
+ var x, w, s;
1093
1093
  const d = K("FmPageHead"), v = K("FmTabs");
1094
- return x(), P("div", yo, [
1094
+ return b(), R("div", yo, [
1095
1095
  l(d, {
1096
- title: ((b = e.value) == null ? void 0 : b.name) || "Xero",
1096
+ title: ((x = e.value) == null ? void 0 : x.name) || "Xero",
1097
1097
  "back-button": !0,
1098
1098
  style: { paddingLeft: "0px", paddingRight: "0px" },
1099
1099
  "onClick:back": r(y).back
@@ -1109,7 +1109,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1109
1109
  items: U
1110
1110
  }, null, 8, ["model-value"]),
1111
1111
  t("div", xo, [
1112
- (x(), M(Ve((w = h.value) == null ? void 0 : w.component), Ee({
1112
+ (b(), M(Ve((w = h.value) == null ? void 0 : w.component), Be({
1113
1113
  modelValue: e.value,
1114
1114
  "onUpdate:modelValue": u[1] || (u[1] = (o) => e.value = o)
1115
1115
  }, (s = h.value) == null ? void 0 : s.props), null, 16, ["modelValue"]))
@@ -1193,7 +1193,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1193
1193
  ];
1194
1194
  return (g, V) => {
1195
1195
  const $ = K("FmIcon"), U = K("FmTable"), y = K("FmSideSheet");
1196
- return x(), M(y, {
1196
+ return b(), M(y, {
1197
1197
  header: r(a)("report.integration.refNumFormatInfo"),
1198
1198
  "dismiss-away": "",
1199
1199
  "max-width": 780
@@ -1228,7 +1228,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1228
1228
  }), ho = {
1229
1229
  key: 0,
1230
1230
  class: "flex flex-col h-full"
1231
- }, ko = { class: "flex flex-col gap-16 pb-[24px]" }, Co = { class: "flex flex-row justify-between items-center gap-2" }, $o = { class: "fm-typo-en-title-sm-800" }, Vo = { class: "flex flex-row gap-2 items-center" }, Ao = { class: "relative group cursor-pointer" }, So = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Do = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Fo = { class: "w-[90%] flex flex-col gap-24" }, Ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, To = { class: "flex flex-col justify-between" }, No = { class: "w-[25%] font-semibold" }, Uo = { class: "flex-grow" }, Io = { class: "flex flex-col justify-between" }, Po = { class: "w-[25%] font-semibold" }, Ro = { class: "flex-grow" }, Mo = { class: "flex flex-col gap-16" }, jo = { class: "fm-typo-en-title-sm-800" }, Oo = { class: "flex flex-col max-w-[100%]" }, Lo = { class: "w-[25%] font-semibold" }, Bo = { class: "flex-grow" }, Eo = { class: "flex flex-col max-w-[100%]" }, qo = { class: "w-[25%] font-semibold" }, Yo = { class: "flex flex-col max-w-[100%]" }, zo = { class: "w-[25%] font-semibold" }, Ho = { class: "flex flex-col max-w-[100%]" }, Xo = { class: "flex flex-col gap-16" }, Qo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Go = { class: "flex flex-col gap-16 pt-3 pb-3" }, Jo = { class: "flex flex-row items-center gap-5" }, Wo = { class: "fm-typo-en-title-sm-800" }, Zo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ea = { class: "flex flex-row items-center justify-between gap-x-16" }, ta = { class: "fm-typo-en-title-sm-800" }, oa = { class: "flex flex-row items-center justify-between gap-x-16" }, aa = { class: "fm-typo-en-title-sm-800" }, la = { class: "flex flex-row items-center justify-between gap-x-16" }, na = { class: "fm-typo-en-title-sm-800" }, sa = { class: "flex flex-row items-center justify-between gap-x-16" }, ia = { class: "fm-typo-en-title-sm-800" }, ra = /* @__PURE__ */ Q({
1231
+ }, ko = { class: "flex flex-col gap-16 pb-[24px]" }, Co = { class: "flex flex-row justify-between items-center gap-2" }, $o = { class: "fm-typo-en-title-sm-800" }, Vo = { class: "flex flex-row gap-2 items-center" }, Ao = { class: "relative group cursor-pointer" }, So = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Do = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Fo = { class: "w-[90%] flex flex-col gap-24" }, Ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, To = { class: "flex flex-col justify-between" }, No = { class: "w-[25%] font-semibold" }, Uo = { class: "flex-grow" }, Io = { class: "flex flex-col justify-between" }, Ro = { class: "w-[25%] font-semibold" }, Po = { class: "flex-grow" }, Mo = { class: "flex flex-col gap-16" }, jo = { class: "fm-typo-en-title-sm-800" }, Oo = { class: "flex flex-col max-w-[100%]" }, Lo = { class: "w-[25%] font-semibold" }, Eo = { class: "flex-grow" }, Bo = { class: "flex flex-col max-w-[100%]" }, Yo = { class: "w-[25%] font-semibold" }, qo = { class: "flex flex-col max-w-[100%]" }, zo = { class: "w-[25%] font-semibold" }, Ho = { class: "flex flex-col max-w-[100%]" }, Xo = { class: "flex flex-col gap-16" }, Qo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Go = { class: "flex flex-col gap-16 pt-3 pb-3" }, Jo = { class: "flex flex-row items-center gap-5" }, Wo = { class: "fm-typo-en-title-sm-800" }, Zo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ea = { class: "flex flex-row items-center justify-between gap-x-16" }, ta = { class: "fm-typo-en-title-sm-800" }, oa = { class: "flex flex-row items-center justify-between gap-x-16" }, aa = { class: "fm-typo-en-title-sm-800" }, la = { class: "flex flex-row items-center justify-between gap-x-16" }, na = { class: "fm-typo-en-title-sm-800" }, sa = { class: "flex flex-row items-center justify-between gap-x-16" }, ia = { class: "fm-typo-en-title-sm-800" }, ra = /* @__PURE__ */ Q({
1232
1232
  __name: "Setting",
1233
1233
  props: {
1234
1234
  modelValue: { required: !0 },
@@ -1236,7 +1236,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1236
1236
  },
1237
1237
  emits: ["update:modelValue"],
1238
1238
  setup(f) {
1239
- const a = J(f, "modelValue"), e = ve(), i = ke(), g = ue(), { promptLoader: V } = De(), { promptMessage: $ } = Ue(), { restaurants: U } = fe(), y = q(
1239
+ const a = J(f, "modelValue"), e = ve(), i = ke(), g = ue(), { promptLoader: V } = De(), { promptMessage: $ } = Ue(), { restaurants: U } = fe(), y = Y(
1240
1240
  () => U.map((s) => ({ label: s.name, value: s.id }))
1241
1241
  ), { t: h } = W();
1242
1242
  async function c() {
@@ -1342,7 +1342,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1342
1342
  var n, k;
1343
1343
  (k = (n = a.value) == null ? void 0 : n.platform) != null && k.mappings && (a.value.platform.mappings[s] = o);
1344
1344
  }
1345
- function b(s) {
1345
+ function x(s) {
1346
1346
  return {
1347
1347
  key: { placeholder: s, editable: !1 },
1348
1348
  account: { placeholder: s, editable: !0 }
@@ -1360,9 +1360,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1360
1360
  return Se(async () => {
1361
1361
  await i.getSettings();
1362
1362
  }), (s, o) => {
1363
- var z, B, H, X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, _, N;
1363
+ var z, E, H, X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, _, N;
1364
1364
  const n = K("FmIcon"), k = K("FmButton"), D = K("FmMenuDivider"), I = K("FmTextField"), O = K("FmSelect");
1365
- return (B = (z = a.value) == null ? void 0 : z.platform) != null && B.mappings ? (x(), P("div", ho, [
1365
+ return (E = (z = a.value) == null ? void 0 : z.platform) != null && E.mappings ? (b(), R("div", ho, [
1366
1366
  t("div", ko, [
1367
1367
  t("div", Co, [
1368
1368
  t("div", $o, C(r(h)("report.integration.bukku.connect")), 1),
@@ -1404,8 +1404,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1404
1404
  ])
1405
1405
  ]),
1406
1406
  t("div", Io, [
1407
- t("div", Po, C(r(h)("report.integration.token")), 1),
1408
- t("div", Ro, [
1407
+ t("div", Ro, C(r(h)("report.integration.token")), 1),
1408
+ t("div", Po, [
1409
1409
  l(I, {
1410
1410
  modelValue: a.value.platform.token,
1411
1411
  "onUpdate:modelValue": o[1] || (o[1] = (p) => a.value.platform.token = p),
@@ -1418,15 +1418,15 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1418
1418
  t("div", jo, C(r(h)("report.integration.general")), 1),
1419
1419
  t("div", Oo, [
1420
1420
  t("div", Lo, C(r(h)("report.common.name")), 1),
1421
- t("div", Bo, [
1421
+ t("div", Eo, [
1422
1422
  l(I, {
1423
1423
  modelValue: a.value.name,
1424
1424
  "onUpdate:modelValue": o[2] || (o[2] = (p) => a.value.name = p)
1425
1425
  }, null, 8, ["modelValue"])
1426
1426
  ])
1427
1427
  ]),
1428
- t("div", Eo, [
1429
- t("div", qo, C(r(h)("report.common.location")), 1),
1428
+ t("div", Bo, [
1429
+ t("div", Yo, C(r(h)("report.common.location")), 1),
1430
1430
  l(O, {
1431
1431
  modelValue: a.value.platform.locationIds,
1432
1432
  "onUpdate:modelValue": o[3] || (o[3] = (p) => a.value.platform.locationIds = p),
@@ -1436,7 +1436,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1436
1436
  class: "flex-grow"
1437
1437
  }, null, 8, ["modelValue", "items"])
1438
1438
  ]),
1439
- t("div", Yo, [
1439
+ t("div", qo, [
1440
1440
  t("div", zo, C(r(h)("report.integration.grouping.title")), 1),
1441
1441
  l(O, {
1442
1442
  modelValue: a.value.platform.grouping,
@@ -1477,8 +1477,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1477
1477
  }
1478
1478
  },
1479
1479
  "onUpdate:modelValue": o[6] || (o[6] = (p) => {
1480
- var R, S, Y;
1481
- (Y = (S = (R = a.value) == null ? void 0 : R.platform) == null ? void 0 : S.mappings) != null && Y.contact && (a.value.platform.mappings.contact.account = p.account);
1480
+ var P, S, q;
1481
+ (q = (S = (P = a.value) == null ? void 0 : P.platform) == null ? void 0 : S.mappings) != null && q.contact && (a.value.platform.mappings.contact.account = p.account);
1482
1482
  })
1483
1483
  }, null, 8, ["model-value"]),
1484
1484
  l(L, {
@@ -1486,16 +1486,16 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1486
1486
  key: "Rounding",
1487
1487
  account: a.value.platform.mappings.rounding.account
1488
1488
  },
1489
- options: b("Rounding"),
1489
+ options: x("Rounding"),
1490
1490
  "onUpdate:modelValue": o[7] || (o[7] = (p) => {
1491
- var R, S, Y;
1492
- (Y = (S = (R = a.value) == null ? void 0 : R.platform) == null ? void 0 : S.mappings) != null && Y.rounding && (a.value.platform.mappings.rounding.account = p.account);
1491
+ var P, S, q;
1492
+ (q = (S = (P = a.value) == null ? void 0 : P.platform) == null ? void 0 : S.mappings) != null && q.rounding && (a.value.platform.mappings.rounding.account = p.account);
1493
1493
  })
1494
1494
  }, null, 8, ["model-value", "options"]),
1495
- (x(!0), P(xe, null, Ce((ee = (X = (H = a.value) == null ? void 0 : H.platform) == null ? void 0 : X.mappings) == null ? void 0 : ee.charges, (p, R) => (x(), M(L, {
1496
- key: `charge-${R}`,
1497
- modelValue: a.value.platform.mappings.charges[R],
1498
- "onUpdate:modelValue": (S) => a.value.platform.mappings.charges[R] = S,
1495
+ (b(!0), R(xe, null, Ce((ee = (X = (H = a.value) == null ? void 0 : H.platform) == null ? void 0 : X.mappings) == null ? void 0 : ee.charges, (p, P) => (b(), M(L, {
1496
+ key: `charge-${P}`,
1497
+ modelValue: a.value.platform.mappings.charges[P],
1498
+ "onUpdate:modelValue": (S) => a.value.platform.mappings.charges[P] = S,
1499
1499
  options: {
1500
1500
  key: {
1501
1501
  placeholder: "Key",
@@ -1521,7 +1521,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1521
1521
  key: "Invoice no",
1522
1522
  account: a.value.platform.mappings.invoiceDocNo
1523
1523
  },
1524
- options: b("Invoice no"),
1524
+ options: x("Invoice no"),
1525
1525
  "onUpdate:modelValue": o[8] || (o[8] = (p) => v({ key: "invoiceDocNo", value: p.account }))
1526
1526
  }, null, 8, ["model-value", "options"]),
1527
1527
  l(L, {
@@ -1529,7 +1529,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1529
1529
  key: "Credit note no",
1530
1530
  account: a.value.platform.mappings.creditNoteDocNo
1531
1531
  },
1532
- options: b("Credit note no"),
1532
+ options: x("Credit note no"),
1533
1533
  "onUpdate:modelValue": o[9] || (o[9] = (p) => v({ key: "creditNoteDocNo", value: p.account }))
1534
1534
  }, null, 8, ["model-value", "options"]),
1535
1535
  l(L, {
@@ -1537,7 +1537,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1537
1537
  key: "Payment no",
1538
1538
  account: a.value.platform.mappings.paymentDocNo
1539
1539
  },
1540
- options: b("Payment no"),
1540
+ options: x("Payment no"),
1541
1541
  "onUpdate:modelValue": o[10] || (o[10] = (p) => v({ key: "paymentDocNo", value: p.account }))
1542
1542
  }, null, 8, ["model-value", "options"]),
1543
1543
  l(L, {
@@ -1545,13 +1545,13 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1545
1545
  key: "Refund no",
1546
1546
  account: a.value.platform.mappings.refundDocNo
1547
1547
  },
1548
- options: b("Refund no"),
1548
+ options: x("Refund no"),
1549
1549
  "onUpdate:modelValue": o[11] || (o[11] = (p) => v({ key: "refundDocNo", value: p.account }))
1550
1550
  }, null, 8, ["model-value", "options"])
1551
1551
  ])
1552
1552
  ]),
1553
1553
  l(D, { style: { margin: 0 } }),
1554
- l(Re, {
1554
+ l(Pe, {
1555
1555
  modelValue: a.value.platform,
1556
1556
  "onUpdate:modelValue": o[12] || (o[12] = (p) => a.value.platform = p),
1557
1557
  label: "upload",
@@ -1577,10 +1577,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1577
1577
  key: { placeholder: "Key", editable: !0 },
1578
1578
  account: { placeholder: "Account code", editable: !0 }
1579
1579
  },
1580
- onRemove: o[14] || (o[14] = (p, R) => A(p, R)),
1580
+ onRemove: o[14] || (o[14] = (p, P) => A(p, P)),
1581
1581
  "onUpdate:rows": o[15] || (o[15] = (p) => {
1582
- var R, S;
1583
- (S = (R = a.value) == null ? void 0 : R.platform) != null && S.mappings && (a.value.platform.mappings.items = p);
1582
+ var P, S;
1583
+ (S = (P = a.value) == null ? void 0 : P.platform) != null && S.mappings && (a.value.platform.mappings.items = p);
1584
1584
  })
1585
1585
  }, null, 8, ["rows"]),
1586
1586
  l(D, { style: { margin: 0 } }),
@@ -1603,10 +1603,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1603
1603
  key: { placeholder: "Key", editable: !0 },
1604
1604
  account: { placeholder: "Account code", editable: !0 }
1605
1605
  },
1606
- onRemove: o[17] || (o[17] = (p, R) => A(p, R)),
1606
+ onRemove: o[17] || (o[17] = (p, P) => A(p, P)),
1607
1607
  "onUpdate:rows": o[18] || (o[18] = (p) => {
1608
- var R, S;
1609
- (S = (R = a.value) == null ? void 0 : R.platform) != null && S.mappings && (a.value.platform.mappings.taxes = p);
1608
+ var P, S;
1609
+ (S = (P = a.value) == null ? void 0 : P.platform) != null && S.mappings && (a.value.platform.mappings.taxes = p);
1610
1610
  })
1611
1611
  }, null, 8, ["rows"]),
1612
1612
  l(D, { style: { margin: 0 } }),
@@ -1629,10 +1629,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1629
1629
  key: { placeholder: "Key", editable: !0 },
1630
1630
  account: { placeholder: "Account code", editable: !0 }
1631
1631
  },
1632
- onRemove: o[20] || (o[20] = (p, R) => A(p, R)),
1632
+ onRemove: o[20] || (o[20] = (p, P) => A(p, P)),
1633
1633
  "onUpdate:rows": o[21] || (o[21] = (p) => {
1634
- var R, S;
1635
- (S = (R = a.value) == null ? void 0 : R.platform) != null && S.mappings && (a.value.platform.mappings.taxRoundingAdjustments = p);
1634
+ var P, S;
1635
+ (S = (P = a.value) == null ? void 0 : P.platform) != null && S.mappings && (a.value.platform.mappings.taxRoundingAdjustments = p);
1636
1636
  })
1637
1637
  }, null, 8, ["rows"]),
1638
1638
  l(D, { style: { margin: 0 } }),
@@ -1656,10 +1656,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1656
1656
  method: { placeholder: "Method", editable: !0 },
1657
1657
  account: { placeholder: "Account code", editable: !0 }
1658
1658
  },
1659
- onRemove: o[23] || (o[23] = (p, R) => A(p, R)),
1659
+ onRemove: o[23] || (o[23] = (p, P) => A(p, P)),
1660
1660
  "onUpdate:rows": o[24] || (o[24] = (p) => {
1661
- var R, S;
1662
- (S = (R = a.value) == null ? void 0 : R.platform) != null && S.mappings && (a.value.platform.mappings.payments = p);
1661
+ var P, S;
1662
+ (S = (P = a.value) == null ? void 0 : P.platform) != null && S.mappings && (a.value.platform.mappings.payments = p);
1663
1663
  })
1664
1664
  }, null, 8, ["rows"])
1665
1665
  ])
@@ -1678,7 +1678,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1678
1678
  },
1679
1679
  emits: ["update:modelValue"],
1680
1680
  setup(f) {
1681
- const a = E([]), e = q(
1681
+ const a = B([]), e = Y(
1682
1682
  () => a.value.reduce((c, T) => {
1683
1683
  const A = c.length, { invoice: m, payments: u } = T;
1684
1684
  c[A] = {
@@ -1691,15 +1691,15 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1691
1691
  for (let d = 0; d < Math.max(m.form_items.length, u.length); d++) {
1692
1692
  const v = A + d;
1693
1693
  c[v] || (c[v] = {});
1694
- const b = m.form_items[d];
1695
- b && (c[v] = {
1694
+ const x = m.form_items[d];
1695
+ x && (c[v] = {
1696
1696
  ...c[v],
1697
- itemDescription: b.description,
1698
- itemQuantity: b.quantity,
1699
- itemUnitPrice: b.unit_price,
1700
- itemAccount: b._account_name,
1701
- itemTaxCode: b._tax_code_name,
1702
- itemDiscount: b.discount
1697
+ itemDescription: x.description,
1698
+ itemQuantity: x.quantity,
1699
+ itemUnitPrice: x.unit_price,
1700
+ itemAccount: x._account_name,
1701
+ itemTaxCode: x._tax_code_name,
1702
+ itemDiscount: x.discount
1703
1703
  });
1704
1704
  const w = u[d];
1705
1705
  w && (c[v] = {
@@ -1798,7 +1798,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1798
1798
  header: "Payment Amount",
1799
1799
  enableSorting: !1
1800
1800
  }
1801
- ], V = J(f, "modelValue"), $ = E(!1), U = ve(), { dateRange: y } = Ie(fe());
1801
+ ], V = J(f, "modelValue"), $ = B(!1), U = ve(), { dateRange: y } = Ie(fe());
1802
1802
  we(
1803
1803
  () => y.value,
1804
1804
  async () => {
@@ -1817,7 +1817,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1817
1817
  );
1818
1818
  async function h() {
1819
1819
  try {
1820
- V.value._id ? ($.value = !0, await Be(V.value._id), U.open({ message: i("report.integration.uploadSuccess"), type: "success" })) : U.open({ message: i("report.integration.error.invalid"), type: "error" });
1820
+ V.value._id ? ($.value = !0, await Ee(V.value._id), U.open({ message: i("report.integration.uploadSuccess"), type: "success" })) : U.open({ message: i("report.integration.error.invalid"), type: "error" });
1821
1821
  } catch (c) {
1822
1822
  U.open({ message: c.message, type: "error" });
1823
1823
  } finally {
@@ -1826,9 +1826,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1826
1826
  }
1827
1827
  return (c, T) => {
1828
1828
  const A = K("FmButton"), m = K("FmCircularProgress"), u = K("FmTable");
1829
- return x(), P("div", da, [
1829
+ return b(), R("div", da, [
1830
1830
  t("div", ma, [
1831
- l(Pe, {
1831
+ l(Re, {
1832
1832
  "date-range": r(y),
1833
1833
  "onUpdate:dateRange": T[0] || (T[0] = (d) => $e(y) ? y.value = d : null),
1834
1834
  compare: !1
@@ -1840,10 +1840,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1840
1840
  onClick: h
1841
1841
  }, null, 8, ["loading", "label"])
1842
1842
  ]),
1843
- $.value ? (x(), P("div", pa, [
1843
+ $.value ? (b(), R("div", pa, [
1844
1844
  l(m, { size: "xl" }),
1845
1845
  t("span", ca, C(r(i)("report.integration.table.loading")), 1)
1846
- ])) : e.value.length > 0 ? (x(), M(u, {
1846
+ ])) : e.value.length > 0 ? (b(), M(u, {
1847
1847
  key: 1,
1848
1848
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
1849
1849
  "row-data": e.value,
@@ -1860,7 +1860,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1860
1860
  },
1861
1861
  emits: ["update:modelValue"],
1862
1862
  setup(f) {
1863
- const { t: a } = W(), e = J(f, "modelValue"), i = E("setting"), g = [
1863
+ const { t: a } = W(), e = J(f, "modelValue"), i = B("setting"), g = [
1864
1864
  {
1865
1865
  label: a("report.integration.setting"),
1866
1866
  value: "setting",
@@ -1871,7 +1871,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1871
1871
  value: "preview",
1872
1872
  icon: "table"
1873
1873
  }
1874
- ], V = ue(), $ = q(() => {
1874
+ ], V = ue(), $ = Y(() => {
1875
1875
  switch (i.value) {
1876
1876
  case "preview":
1877
1877
  return ua;
@@ -1884,7 +1884,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1884
1884
  return (U, y) => {
1885
1885
  var T;
1886
1886
  const h = K("FmPageHead"), c = K("FmTabs");
1887
- return x(), P("div", fa, [
1887
+ return b(), R("div", fa, [
1888
1888
  l(h, {
1889
1889
  title: ((T = e.value) == null ? void 0 : T.name) || "Bukku",
1890
1890
  "back-button": !0,
@@ -1902,7 +1902,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1902
1902
  items: g
1903
1903
  }, null, 8, ["model-value"]),
1904
1904
  t("div", va, [
1905
- (x(), M(Ve($.value), {
1905
+ (b(), M(Ve($.value), {
1906
1906
  modelValue: e.value,
1907
1907
  "onUpdate:modelValue": y[1] || (y[1] = (A) => e.value = A)
1908
1908
  }, null, 8, ["modelValue"]))
@@ -1913,7 +1913,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1913
1913
  }), ya = {
1914
1914
  key: 0,
1915
1915
  class: "flex flex-col h-full"
1916
- }, xa = { class: "flex flex-col gap-16 pb-[24px]" }, ba = { class: "flex flex-row justify-between items-center gap-2" }, wa = { class: "flex flex-row gap-2 items-center" }, _a = { class: "relative group cursor-pointer" }, ha = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, ka = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ca = { class: "w-[90%] flex flex-col gap-24" }, $a = { class: "flex flex-col gap-16" }, Va = { class: "fm-typo-en-title-sm-800" }, Aa = { class: "flex flex-col max-w-[100%]" }, Sa = { class: "w-[25%] font-semibold" }, Da = { class: "flex-grow" }, Fa = { class: "flex flex-col max-w-[100%]" }, Ka = { class: "w-[25%] font-semibold" }, Ta = { class: "flex flex-col max-w-[100%]" }, Na = { class: "w-[25%] font-semibold" }, Ua = { class: "flex flex-col gap-16" }, Ia = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Pa = { class: "flex flex-col gap-16 pt-3 pb-3" }, Ra = { class: "flex flex-row items-center gap-5" }, Ma = { class: "fm-typo-en-title-sm-800" }, ja = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Oa = { class: "flex flex-row items-center justify-between gap-x-16" }, La = { class: "fm-typo-en-title-sm-800" }, Ba = { class: "flex flex-row items-center justify-between gap-x-16" }, Ea = { class: "fm-typo-en-title-sm-800" }, qa = { class: "flex flex-row items-center justify-between gap-x-16" }, Ya = { class: "fm-typo-en-title-sm-800" }, za = { class: "flex flex-row items-center justify-between gap-x-16" }, Ha = { class: "fm-typo-en-title-sm-800" }, Xa = /* @__PURE__ */ Q({
1916
+ }, xa = { class: "flex flex-col gap-16 pb-[24px]" }, ba = { class: "flex flex-row justify-between items-center gap-2" }, wa = { class: "flex flex-row gap-2 items-center" }, _a = { class: "relative group cursor-pointer" }, ha = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, ka = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ca = { class: "w-[90%] flex flex-col gap-24" }, $a = { class: "flex flex-col gap-16" }, Va = { class: "fm-typo-en-title-sm-800" }, Aa = { class: "flex flex-col max-w-[100%]" }, Sa = { class: "w-[25%] font-semibold" }, Da = { class: "flex-grow" }, Fa = { class: "flex flex-col max-w-[100%]" }, Ka = { class: "w-[25%] font-semibold" }, Ta = { class: "flex flex-col max-w-[100%]" }, Na = { class: "w-[25%] font-semibold" }, Ua = { class: "flex flex-col gap-16" }, Ia = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ra = { class: "flex flex-col gap-16 pt-3 pb-3" }, Pa = { class: "flex flex-row items-center gap-5" }, Ma = { class: "fm-typo-en-title-sm-800" }, ja = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Oa = { class: "flex flex-row items-center justify-between gap-x-16" }, La = { class: "fm-typo-en-title-sm-800" }, Ea = { class: "flex flex-row items-center justify-between gap-x-16" }, Ba = { class: "fm-typo-en-title-sm-800" }, Ya = { class: "flex flex-row items-center justify-between gap-x-16" }, qa = { class: "fm-typo-en-title-sm-800" }, za = { class: "flex flex-row items-center justify-between gap-x-16" }, Ha = { class: "fm-typo-en-title-sm-800" }, Xa = /* @__PURE__ */ Q({
1917
1917
  __name: "Setting",
1918
1918
  props: {
1919
1919
  modelValue: { required: !0 },
@@ -1921,7 +1921,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1921
1921
  },
1922
1922
  emits: ["update:modelValue"],
1923
1923
  setup(f) {
1924
- const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = q(
1924
+ const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = Y(
1925
1925
  () => y.map((w) => ({ label: w.name, value: w.id }))
1926
1926
  );
1927
1927
  async function c() {
@@ -1997,7 +1997,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1997
1997
  account: { placeholder: w, editable: !0 }
1998
1998
  };
1999
1999
  }
2000
- async function b() {
2000
+ async function x() {
2001
2001
  await $(async () => {
2002
2002
  try {
2003
2003
  await Te(e.value._id), await g.getSettings();
@@ -2009,9 +2009,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2009
2009
  return Se(async () => {
2010
2010
  await g.getSettings();
2011
2011
  }), (w, s) => {
2012
- var O, z, B, H, X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe;
2012
+ var O, z, E, H, X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe;
2013
2013
  const o = K("FmIcon"), n = K("FmButton"), k = K("FmMenuDivider"), D = K("FmTextField"), I = K("FmSelect");
2014
- return (z = (O = e.value) == null ? void 0 : O.platform) != null && z.mappings ? (x(), P("div", ya, [
2014
+ return (z = (O = e.value) == null ? void 0 : O.platform) != null && z.mappings ? (b(), R("div", ya, [
2015
2015
  t("div", xa, [
2016
2016
  t("div", ba, [
2017
2017
  s[23] || (s[23] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
@@ -2020,7 +2020,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2020
2020
  l(o, {
2021
2021
  name: "refresh",
2022
2022
  class: "p-2 bg-gray-100 rounded-full",
2023
- onClick: b
2023
+ onClick: x
2024
2024
  }),
2025
2025
  t("span", ha, C(r(a)("report.integration.refreshSetting")), 1)
2026
2026
  ]),
@@ -2095,11 +2095,11 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2095
2095
  },
2096
2096
  options: v("Rounding"),
2097
2097
  "onUpdate:modelValue": s[5] || (s[5] = (_) => {
2098
- var N, p, R;
2099
- (R = (p = (N = e.value) == null ? void 0 : N.platform) == null ? void 0 : p.mappings) != null && R.rounding && (e.value.platform.mappings.rounding.account = _.account);
2098
+ var N, p, P;
2099
+ (P = (p = (N = e.value) == null ? void 0 : N.platform) == null ? void 0 : p.mappings) != null && P.rounding && (e.value.platform.mappings.rounding.account = _.account);
2100
2100
  })
2101
2101
  }, null, 8, ["model-value", "options"]),
2102
- (x(!0), P(xe, null, Ce((X = (H = (B = e.value) == null ? void 0 : B.platform) == null ? void 0 : H.mappings) == null ? void 0 : X.charges, (_, N) => (x(), M(L, {
2102
+ (b(!0), R(xe, null, Ce((X = (H = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : H.mappings) == null ? void 0 : X.charges, (_, N) => (b(), M(L, {
2103
2103
  key: `charge-${N}`,
2104
2104
  modelValue: e.value.platform.mappings.charges[N],
2105
2105
  "onUpdate:modelValue": (p) => e.value.platform.mappings.charges[N] = p,
@@ -2111,8 +2111,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2111
2111
  ])
2112
2112
  ]),
2113
2113
  l(k, { style: { margin: 0 } }),
2114
- t("div", Pa, [
2115
- t("div", Ra, [
2114
+ t("div", Ra, [
2115
+ t("div", Pa, [
2116
2116
  t("div", Ma, C(r(a)("report.integration.refNumFormat")), 1),
2117
2117
  l(Le)
2118
2118
  ]),
@@ -2152,7 +2152,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2152
2152
  ])
2153
2153
  ]),
2154
2154
  l(k, { style: { margin: 0 } }),
2155
- l(Re, {
2155
+ l(Pe, {
2156
2156
  modelValue: e.value.platform,
2157
2157
  "onUpdate:modelValue": s[10] || (s[10] = (_) => e.value.platform = _),
2158
2158
  label: r(a)("report.input.email")
@@ -2184,8 +2184,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2184
2184
  })
2185
2185
  }, null, 8, ["rows"]),
2186
2186
  l(k, { style: { margin: 0 } }),
2187
- t("div", Ba, [
2188
- t("div", Ea, C(r(a)("report.integration.taxes")), 1),
2187
+ t("div", Ea, [
2188
+ t("div", Ba, C(r(a)("report.integration.taxes")), 1),
2189
2189
  l(n, {
2190
2190
  variant: "secondary",
2191
2191
  "prepend-icon": "add",
@@ -2210,8 +2210,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2210
2210
  })
2211
2211
  }, null, 8, ["rows"]),
2212
2212
  l(k, { style: { margin: 0 } }),
2213
- t("div", qa, [
2214
- t("div", Ya, C(r(a)("report.integration.taxRoundingAdjustments")), 1),
2213
+ t("div", Ya, [
2214
+ t("div", qa, C(r(a)("report.integration.taxRoundingAdjustments")), 1),
2215
2215
  l(n, {
2216
2216
  variant: "secondary",
2217
2217
  "prepend-icon": "add",
@@ -2277,7 +2277,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2277
2277
  },
2278
2278
  emits: ["update:modelValue"],
2279
2279
  setup(f) {
2280
- const { t: a } = W(), e = E([]), i = q(
2280
+ const { t: a } = W(), e = B([]), i = Y(
2281
2281
  () => e.value.reduce((c, T) => {
2282
2282
  const A = c.length, { invoice: m, payments: u } = T;
2283
2283
  c[A] = {
@@ -2377,7 +2377,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2377
2377
  header: "Payment Amount",
2378
2378
  enableSorting: !1
2379
2379
  }
2380
- ], V = J(f, "modelValue"), $ = E(!1), U = ve(), { dateRange: y } = Ie(fe());
2380
+ ], V = J(f, "modelValue"), $ = B(!1), U = ve(), { dateRange: y } = Ie(fe());
2381
2381
  we(
2382
2382
  () => y.value,
2383
2383
  async () => {
@@ -2405,9 +2405,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2405
2405
  }
2406
2406
  return (c, T) => {
2407
2407
  const A = K("FmButton"), m = K("FmCircularProgress"), u = K("FmTable");
2408
- return x(), P("div", Qa, [
2408
+ return b(), R("div", Qa, [
2409
2409
  t("div", Ga, [
2410
- l(Pe, {
2410
+ l(Re, {
2411
2411
  "date-range": r(y),
2412
2412
  "onUpdate:dateRange": T[0] || (T[0] = (d) => $e(y) ? y.value = d : null),
2413
2413
  compare: !1
@@ -2419,10 +2419,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2419
2419
  onClick: h
2420
2420
  }, null, 8, ["loading", "label"])
2421
2421
  ]),
2422
- $.value ? (x(), P("div", Ja, [
2422
+ $.value ? (b(), R("div", Ja, [
2423
2423
  l(m, { size: "xl" }),
2424
2424
  t("span", Wa, C(r(a)("report.common.isLoading")), 1)
2425
- ])) : i.value.length > 0 ? (x(), M(u, {
2425
+ ])) : i.value.length > 0 ? (b(), M(u, {
2426
2426
  key: 1,
2427
2427
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
2428
2428
  "row-data": i.value,
@@ -2439,7 +2439,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2439
2439
  },
2440
2440
  emits: ["update:modelValue"],
2441
2441
  setup(f) {
2442
- const { t: a } = W(), e = J(f, "modelValue"), i = E("setting"), g = [
2442
+ const { t: a } = W(), e = J(f, "modelValue"), i = B("setting"), g = [
2443
2443
  {
2444
2444
  label: a("report.integration.setting"),
2445
2445
  value: "setting",
@@ -2450,7 +2450,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2450
2450
  value: "preview",
2451
2451
  icon: "table"
2452
2452
  }
2453
- ], V = ue(), $ = q(() => {
2453
+ ], V = ue(), $ = Y(() => {
2454
2454
  switch (i.value) {
2455
2455
  case "preview":
2456
2456
  return Za;
@@ -2463,7 +2463,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2463
2463
  return (U, y) => {
2464
2464
  var T;
2465
2465
  const h = K("FmPageHead"), c = K("FmTabs");
2466
- return x(), P("div", el, [
2466
+ return b(), R("div", el, [
2467
2467
  l(h, {
2468
2468
  title: ((T = e.value) == null ? void 0 : T.name) || "AutoCount",
2469
2469
  "back-button": !0,
@@ -2481,7 +2481,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2481
2481
  items: g
2482
2482
  }, null, 8, ["model-value"]),
2483
2483
  t("div", tl, [
2484
- (x(), M(Ve($.value), {
2484
+ (b(), M(Ve($.value), {
2485
2485
  modelValue: e.value,
2486
2486
  "onUpdate:modelValue": y[1] || (y[1] = (A) => e.value = A)
2487
2487
  }, null, 8, ["modelValue"]))
@@ -2500,7 +2500,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2500
2500
  },
2501
2501
  emits: ["update:modelValue"],
2502
2502
  setup(f) {
2503
- const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = q(
2503
+ const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = Y(
2504
2504
  () => y.map((w) => ({ label: w.name, value: w.id }))
2505
2505
  );
2506
2506
  async function c() {
@@ -2577,7 +2577,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2577
2577
  account: { placeholder: w, editable: !0 }
2578
2578
  };
2579
2579
  }
2580
- async function b() {
2580
+ async function x() {
2581
2581
  await $(async () => {
2582
2582
  try {
2583
2583
  await Te(e.value._id), await g.getSettings();
@@ -2589,9 +2589,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2589
2589
  return Se(async () => {
2590
2590
  await g.getSettings();
2591
2591
  }), (w, s) => {
2592
- var O, z, B, H, X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe;
2592
+ var O, z, E, H, X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe;
2593
2593
  const o = K("FmIcon"), n = K("FmButton"), k = K("FmMenuDivider"), D = K("FmTextField"), I = K("FmSelect");
2594
- return (z = (O = e.value) == null ? void 0 : O.platform) != null && z.mappings ? (x(), P("div", al, [
2594
+ return (z = (O = e.value) == null ? void 0 : O.platform) != null && z.mappings ? (b(), R("div", al, [
2595
2595
  t("div", ll, [
2596
2596
  t("div", nl, [
2597
2597
  s[24] || (s[24] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
@@ -2600,7 +2600,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2600
2600
  l(o, {
2601
2601
  name: "refresh",
2602
2602
  class: "p-2 bg-gray-100 rounded-full",
2603
- onClick: b
2603
+ onClick: x
2604
2604
  }),
2605
2605
  t("span", rl, C(r(a)("report.integration.refreshSetting")), 1)
2606
2606
  ]),
@@ -2693,11 +2693,11 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2693
2693
  code: { placeholder: "Item code", editable: !0 }
2694
2694
  },
2695
2695
  "onUpdate:modelValue": s[6] || (s[6] = (_) => {
2696
- var N, p, R;
2697
- (R = (p = (N = e.value) == null ? void 0 : N.platform) == null ? void 0 : p.mappings) != null && R.rounding && (e.value.platform.mappings.rounding.account = _.account, e.value.platform.mappings.rounding.code = _.code);
2696
+ var N, p, P;
2697
+ (P = (p = (N = e.value) == null ? void 0 : N.platform) == null ? void 0 : p.mappings) != null && P.rounding && (e.value.platform.mappings.rounding.account = _.account, e.value.platform.mappings.rounding.code = _.code);
2698
2698
  })
2699
2699
  }, null, 8, ["model-value"]),
2700
- (x(!0), P(xe, null, Ce((X = (H = (B = e.value) == null ? void 0 : B.platform) == null ? void 0 : H.mappings) == null ? void 0 : X.charges, (_, N) => (x(), M(L, {
2700
+ (b(!0), R(xe, null, Ce((X = (H = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : H.mappings) == null ? void 0 : X.charges, (_, N) => (b(), M(L, {
2701
2701
  key: `charge-${N}`,
2702
2702
  modelValue: e.value.platform.mappings.charges[N],
2703
2703
  "onUpdate:modelValue": (p) => e.value.platform.mappings.charges[N] = p,
@@ -2751,7 +2751,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2751
2751
  ])
2752
2752
  ]),
2753
2753
  l(k, { style: { margin: 0 } }),
2754
- l(Re, {
2754
+ l(Pe, {
2755
2755
  modelValue: e.value.platform,
2756
2756
  "onUpdate:modelValue": s[11] || (s[11] = (_) => e.value.platform = _),
2757
2757
  label: "email"
@@ -2866,7 +2866,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2866
2866
  ])) : j("", !0);
2867
2867
  };
2868
2868
  }
2869
- }), Pl = { class: "h-full flex flex-col gap-16" }, Rl = { class: "flex flex-row gap-2 justify-between items-center" }, Ml = {
2869
+ }), Rl = { class: "h-full flex flex-col gap-16" }, Pl = { class: "flex flex-row gap-2 justify-between items-center" }, Ml = {
2870
2870
  key: 0,
2871
2871
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
2872
2872
  }, jl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ol = /* @__PURE__ */ Q({
@@ -2877,7 +2877,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2877
2877
  },
2878
2878
  emits: ["update:modelValue"],
2879
2879
  setup(f) {
2880
- const { t: a } = W(), e = E([]), i = q(
2880
+ const { t: a } = W(), e = B([]), i = Y(
2881
2881
  () => e.value.reduce((c, T) => {
2882
2882
  const A = c.length, { invoice: m, payments: u } = T;
2883
2883
  c[A] = {
@@ -2972,7 +2972,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2972
2972
  header: "Payment Amount",
2973
2973
  enableSorting: !1
2974
2974
  }
2975
- ], V = J(f, "modelValue"), $ = E(!1), U = ve(), { dateRange: y } = Ie(fe());
2975
+ ], V = J(f, "modelValue"), $ = B(!1), U = ve(), { dateRange: y } = Ie(fe());
2976
2976
  we(
2977
2977
  () => y.value,
2978
2978
  async () => {
@@ -3000,9 +3000,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3000
3000
  }
3001
3001
  return (c, T) => {
3002
3002
  const A = K("FmButton"), m = K("FmCircularProgress"), u = K("FmTable");
3003
- return x(), P("div", Pl, [
3004
- t("div", Rl, [
3005
- l(Pe, {
3003
+ return b(), R("div", Rl, [
3004
+ t("div", Pl, [
3005
+ l(Re, {
3006
3006
  "date-range": r(y),
3007
3007
  "onUpdate:dateRange": T[0] || (T[0] = (d) => $e(y) ? y.value = d : null),
3008
3008
  compare: !1
@@ -3014,10 +3014,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3014
3014
  onClick: h
3015
3015
  }, null, 8, ["loading", "label"])
3016
3016
  ]),
3017
- $.value ? (x(), P("div", Ml, [
3017
+ $.value ? (b(), R("div", Ml, [
3018
3018
  l(m, { size: "xl" }),
3019
3019
  t("span", jl, C(r(a)("report.common.isLoading")), 1)
3020
- ])) : i.value.length > 0 ? (x(), M(u, {
3020
+ ])) : i.value.length > 0 ? (b(), M(u, {
3021
3021
  key: 1,
3022
3022
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
3023
3023
  "row-data": i.value,
@@ -3026,7 +3026,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3026
3026
  ]);
3027
3027
  };
3028
3028
  }
3029
- }), Ll = { class: "h-full relative flex flex-col" }, Bl = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, El = /* @__PURE__ */ Q({
3029
+ }), Ll = { class: "h-full relative flex flex-col" }, El = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Bl = /* @__PURE__ */ Q({
3030
3030
  __name: "SQL",
3031
3031
  props: {
3032
3032
  modelValue: {},
@@ -3034,7 +3034,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3034
3034
  },
3035
3035
  emits: ["update:modelValue"],
3036
3036
  setup(f) {
3037
- const { t: a } = W(), e = J(f, "modelValue"), i = E("setting"), g = [
3037
+ const { t: a } = W(), e = J(f, "modelValue"), i = B("setting"), g = [
3038
3038
  {
3039
3039
  label: a("report.integration.setting"),
3040
3040
  value: "setting",
@@ -3045,7 +3045,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3045
3045
  value: "preview",
3046
3046
  icon: "table"
3047
3047
  }
3048
- ], V = ue(), $ = q(() => {
3048
+ ], V = ue(), $ = Y(() => {
3049
3049
  switch (i.value) {
3050
3050
  case "preview":
3051
3051
  return Ol;
@@ -3058,7 +3058,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3058
3058
  return (U, y) => {
3059
3059
  var T;
3060
3060
  const h = K("FmPageHead"), c = K("FmTabs");
3061
- return x(), P("div", Ll, [
3061
+ return b(), R("div", Ll, [
3062
3062
  l(h, {
3063
3063
  title: ((T = e.value) == null ? void 0 : T.name) || "SQL",
3064
3064
  "back-button": !0,
@@ -3075,8 +3075,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3075
3075
  "onUpdate:modelValue": y[0] || (y[0] = (A) => i.value = A),
3076
3076
  items: g
3077
3077
  }, null, 8, ["model-value"]),
3078
- t("div", Bl, [
3079
- (x(), M(Ve($.value), {
3078
+ t("div", El, [
3079
+ (b(), M(Ve($.value), {
3080
3080
  modelValue: e.value,
3081
3081
  "onUpdate:modelValue": y[1] || (y[1] = (A) => e.value = A)
3082
3082
  }, null, 8, ["modelValue"]))
@@ -3084,13 +3084,13 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3084
3084
  ]);
3085
3085
  };
3086
3086
  }
3087
- }), ql = {
3087
+ }), Yl = {
3088
3088
  key: 0,
3089
3089
  class: "flex flex-col h-full"
3090
- }, Yl = { class: "flex flex-col gap-16 pb-[24px]" }, zl = { class: "flex flex-row justify-between items-center gap-2" }, Hl = { class: "fm-typo-en-title-sm-800" }, Xl = { class: "flex flex-row gap-2 items-center" }, Ql = { class: "flex flex-row gap-2 items-center" }, Gl = { class: "relative group cursor-pointer" }, Jl = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Wl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Zl = { class: "w-[90%] flex flex-col gap-24" }, en = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, tn = { class: "flex flex-col max-w-[100%]" }, on = { class: "w-[25%] font-semibold" }, an = { class: "flex-grow" }, ln = { class: "flex flex-col gap-24 pt-[24px]" }, nn = { class: "flex flex-col justify-between" }, sn = { class: "w-[25%] font-semibold" }, rn = { class: "flex-grow" }, dn = { class: "flex flex-col justify-between" }, mn = { class: "w-[25%] font-semibold" }, pn = { class: "flex-grow" }, cn = { class: "flex flex-col gap-16" }, un = { class: "fm-typo-en-title-sm-800" }, fn = { class: "flex flex-col max-w-[100%]" }, vn = { class: "w-[25%] font-semibold" }, gn = { class: "flex-grow" }, yn = { class: "flex flex-col max-w-[100%]" }, xn = { class: "w-[25%] font-semibold" }, bn = { class: "flex flex-col max-w-[100%]" }, wn = { class: "w-[25%] font-semibold" }, _n = {
3090
+ }, ql = { class: "flex flex-col gap-16 pb-[24px]" }, zl = { class: "flex flex-row justify-between items-center gap-2" }, Hl = { class: "fm-typo-en-title-sm-800" }, Xl = { class: "flex flex-row gap-2 items-center" }, Ql = { class: "flex flex-row gap-2 items-center" }, Gl = { class: "relative group cursor-pointer" }, Jl = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Wl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Zl = { class: "w-[90%] flex flex-col gap-24" }, en = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, tn = { class: "flex flex-col max-w-[100%]" }, on = { class: "w-[25%] font-semibold" }, an = { class: "flex-grow" }, ln = { class: "flex flex-col gap-24 pt-[24px]" }, nn = { class: "flex flex-col justify-between" }, sn = { class: "w-[25%] font-semibold" }, rn = { class: "flex-grow" }, dn = { class: "flex flex-col justify-between" }, mn = { class: "w-[25%] font-semibold" }, pn = { class: "flex-grow" }, cn = { class: "flex flex-col gap-16" }, un = { class: "fm-typo-en-title-sm-800" }, fn = { class: "flex flex-col max-w-[100%]" }, vn = { class: "w-[25%] font-semibold" }, gn = { class: "flex-grow" }, yn = { class: "flex flex-col max-w-[100%]" }, xn = { class: "w-[25%] font-semibold" }, bn = { class: "flex flex-col max-w-[100%]" }, wn = { class: "w-[25%] font-semibold" }, _n = {
3091
3091
  key: 0,
3092
3092
  class: "flex flex-col max-w-[100%]"
3093
- }, hn = { class: "flex flex-col gap-16" }, kn = { class: "xs:grid-cols-1 grid gap-16" }, Cn = { key: 1 }, $n = { class: "flex flex-col gap-16 pt-3 pb-3" }, Vn = { class: "flex flex-row items-center gap-5" }, An = { class: "fm-typo-en-title-sm-800" }, Sn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Dn = { class: "flex flex-row items-center justify-between gap-x-16" }, Fn = { class: "fm-typo-en-title-sm-800" }, Kn = { class: "flex flex-row items-center justify-between gap-x-16" }, Tn = { class: "fm-typo-en-title-sm-800" }, Nn = { class: "flex flex-row items-center justify-between gap-x-16" }, Un = { class: "fm-typo-en-title-sm-800" }, In = { class: "flex flex-row items-center justify-between gap-x-16" }, Pn = { class: "fm-typo-en-title-sm-800" }, Rn = { class: "flex flex-row items-center justify-between" }, Mn = { class: "flex-grow" }, jn = {
3093
+ }, hn = { class: "flex flex-col gap-16" }, kn = { class: "xs:grid-cols-1 grid gap-16" }, Cn = { key: 1 }, $n = { class: "flex flex-col gap-16 pt-3 pb-3" }, Vn = { class: "flex flex-row items-center gap-5" }, An = { class: "fm-typo-en-title-sm-800" }, Sn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Dn = { class: "flex flex-row items-center justify-between gap-x-16" }, Fn = { class: "fm-typo-en-title-sm-800" }, Kn = { class: "flex flex-row items-center justify-between gap-x-16" }, Tn = { class: "fm-typo-en-title-sm-800" }, Nn = { class: "flex flex-row items-center justify-between gap-x-16" }, Un = { class: "fm-typo-en-title-sm-800" }, In = { class: "flex flex-row items-center justify-between gap-x-16" }, Rn = { class: "fm-typo-en-title-sm-800" }, Pn = { class: "flex flex-row items-center justify-between" }, Mn = { class: "flex-grow" }, jn = {
3094
3094
  key: 0,
3095
3095
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
3096
3096
  }, On = {
@@ -3099,7 +3099,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3099
3099
  }, Ln = {
3100
3100
  key: 3,
3101
3101
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
3102
- }, Bn = /* @__PURE__ */ Q({
3102
+ }, En = /* @__PURE__ */ Q({
3103
3103
  __name: "Setting",
3104
3104
  props: /* @__PURE__ */ Ae({
3105
3105
  retrievedMethods: {
@@ -3116,7 +3116,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3116
3116
  }),
3117
3117
  emits: ["update:modelValue"],
3118
3118
  setup(f) {
3119
- const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = q(
3119
+ const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = Y(
3120
3120
  () => y.map((s) => ({ label: s.name, value: s.id }))
3121
3121
  );
3122
3122
  function c(s) {
@@ -3189,7 +3189,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3189
3189
  var n, k;
3190
3190
  (k = (n = e.value) == null ? void 0 : n.platform) != null && k.mappings && (e.value.platform.mappings[s] = o);
3191
3191
  }
3192
- function b(s) {
3192
+ function x(s) {
3193
3193
  return {
3194
3194
  key: { placeholder: s, editable: !1 },
3195
3195
  account: { placeholder: s, editable: !0 }
@@ -3251,10 +3251,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3251
3251
  return Se(async () => {
3252
3252
  await g.getSettings();
3253
3253
  }), (s, o) => {
3254
- var B, H, X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, _, N;
3254
+ var E, H, X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, _, N;
3255
3255
  const n = K("FmIcon"), k = K("FmButton"), D = K("FmSelect"), I = K("FmMenuDivider"), O = K("FmTextField"), z = K("FmCircularProgress");
3256
- return (H = (B = e.value) == null ? void 0 : B.platform) != null && H.mappings ? (x(), P("div", ql, [
3257
- t("div", Yl, [
3256
+ return (H = (E = e.value) == null ? void 0 : E.platform) != null && H.mappings ? (b(), R("div", Yl, [
3257
+ t("div", ql, [
3258
3258
  t("div", zl, [
3259
3259
  t("div", Hl, C(r(a)("report.integration.connect")), 1),
3260
3260
  t("div", Xl, [
@@ -3355,9 +3355,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3355
3355
  disabled: ""
3356
3356
  }, null, 8, ["modelValue", "placeholder"])
3357
3357
  ]),
3358
- e.value.platform.mappings.version == "v1" ? (x(), P("div", _n, [
3358
+ e.value.platform.mappings.version == "v1" ? (b(), R("div", _n, [
3359
3359
  o[26] || (o[26] = t("div", { class: "w-[33%] font-semibold" }, "Payee ID", -1)),
3360
- e.value.platform.mappings.version == "v1" ? (x(), M(L, {
3360
+ e.value.platform.mappings.version == "v1" ? (b(), M(L, {
3361
3361
  key: 0,
3362
3362
  modelValue: e.value.platform.mappings.payee,
3363
3363
  "onUpdate:modelValue": o[6] || (o[6] = (p) => e.value.platform.mappings.payee = p),
@@ -3369,12 +3369,12 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3369
3369
  ])) : j("", !0),
3370
3370
  t("div", hn, [
3371
3371
  t("div", kn, [
3372
- !f.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (x(), M(z, {
3372
+ !f.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (b(), M(z, {
3373
3373
  key: 0,
3374
3374
  size: "xl"
3375
3375
  })) : j("", !0),
3376
- f.retrievedCustomers.isLoaded && f.retrievedCustomers.data && ((X = f.retrievedCustomers.data) == null ? void 0 : X.length) != 0 ? (x(), P("div", Cn, [
3377
- e.value.platform.mappings.version == "v2" ? (x(), M(Je, {
3376
+ f.retrievedCustomers.isLoaded && f.retrievedCustomers.data && ((X = f.retrievedCustomers.data) == null ? void 0 : X.length) != 0 ? (b(), R("div", Cn, [
3377
+ e.value.platform.mappings.version == "v2" ? (b(), M(Je, {
3378
3378
  key: 0,
3379
3379
  modelValue: e.value.platform.mappings.payeeId,
3380
3380
  "onUpdate:modelValue": o[7] || (o[7] = (p) => e.value.platform.mappings.payeeId = p),
@@ -3405,7 +3405,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3405
3405
  key: "Invoice no",
3406
3406
  account: e.value.platform.mappings.invoiceDocNo
3407
3407
  },
3408
- options: b("Invoice no"),
3408
+ options: x("Invoice no"),
3409
3409
  "onUpdate:modelValue": o[8] || (o[8] = (p) => v({ key: "invoiceDocNo", value: p.account }))
3410
3410
  }, null, 8, ["model-value", "options"]),
3411
3411
  l(L, {
@@ -3413,31 +3413,31 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3413
3413
  key: "Credit note no",
3414
3414
  account: e.value.platform.mappings.creditNoteDocNo
3415
3415
  },
3416
- options: b("Credit note no"),
3416
+ options: x("Credit note no"),
3417
3417
  "onUpdate:modelValue": o[9] || (o[9] = (p) => v({ key: "creditNoteDocNo", value: p.account }))
3418
3418
  }, null, 8, ["model-value", "options"]),
3419
- e.value.platform.mappings.version == "v2" ? (x(), M(L, {
3419
+ e.value.platform.mappings.version == "v2" ? (b(), M(L, {
3420
3420
  key: 0,
3421
3421
  "model-value": {
3422
3422
  key: "Payment no",
3423
3423
  account: e.value.platform.mappings.paymentDocNo
3424
3424
  },
3425
- options: b("Payment no"),
3425
+ options: x("Payment no"),
3426
3426
  "onUpdate:modelValue": o[10] || (o[10] = (p) => v({ key: "paymentDocNo", value: p.account }))
3427
3427
  }, null, 8, ["model-value", "options"])) : j("", !0),
3428
- e.value.platform.mappings.version == "v2" ? (x(), M(L, {
3428
+ e.value.platform.mappings.version == "v2" ? (b(), M(L, {
3429
3429
  key: 1,
3430
3430
  "model-value": {
3431
3431
  key: "Refund no",
3432
3432
  account: e.value.platform.mappings.refundDocNo
3433
3433
  },
3434
- options: b("Refund no"),
3434
+ options: x("Refund no"),
3435
3435
  "onUpdate:modelValue": o[11] || (o[11] = (p) => v({ key: "refundDocNo", value: p.account }))
3436
3436
  }, null, 8, ["model-value", "options"])) : j("", !0)
3437
3437
  ])
3438
3438
  ]),
3439
3439
  l(I, { style: { margin: 0 } }),
3440
- l(Re, {
3440
+ l(Pe, {
3441
3441
  modelValue: e.value.platform,
3442
3442
  "onUpdate:modelValue": o[12] || (o[12] = (p) => e.value.platform = p),
3443
3443
  label: "upload",
@@ -3463,10 +3463,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3463
3463
  key: { placeholder: "Key", editable: !0 },
3464
3464
  code: { placeholder: "Account code", editable: !0 }
3465
3465
  },
3466
- onRemove: o[14] || (o[14] = (p, R) => m(p, R)),
3466
+ onRemove: o[14] || (o[14] = (p, P) => m(p, P)),
3467
3467
  "onUpdate:rows": o[15] || (o[15] = (p) => {
3468
- var R, S;
3469
- (S = (R = e.value) == null ? void 0 : R.platform) != null && S.mappings && (e.value.platform.mappings.items = p);
3468
+ var P, S;
3469
+ (S = (P = e.value) == null ? void 0 : P.platform) != null && S.mappings && (e.value.platform.mappings.items = p);
3470
3470
  })
3471
3471
  }, null, 8, ["rows"]),
3472
3472
  l(I, { style: { margin: 0 } }),
@@ -3489,10 +3489,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3489
3489
  key: { placeholder: "Key", editable: !0 },
3490
3490
  account: { placeholder: "Account code", editable: !0 }
3491
3491
  },
3492
- onRemove: o[17] || (o[17] = (p, R) => m(p, R)),
3492
+ onRemove: o[17] || (o[17] = (p, P) => m(p, P)),
3493
3493
  "onUpdate:rows": o[18] || (o[18] = (p) => {
3494
- var R, S;
3495
- (S = (R = e.value) == null ? void 0 : R.platform) != null && S.mappings && (e.value.platform.mappings.taxes = p);
3494
+ var P, S;
3495
+ (S = (P = e.value) == null ? void 0 : P.platform) != null && S.mappings && (e.value.platform.mappings.taxes = p);
3496
3496
  })
3497
3497
  }, null, 8, ["rows"]),
3498
3498
  l(I, { style: { margin: 0 } }),
@@ -3515,15 +3515,15 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3515
3515
  key: { placeholder: "Key", editable: !0 },
3516
3516
  account: { placeholder: "Account code", editable: !0 }
3517
3517
  },
3518
- onRemove: o[20] || (o[20] = (p, R) => m(p, R)),
3518
+ onRemove: o[20] || (o[20] = (p, P) => m(p, P)),
3519
3519
  "onUpdate:rows": o[21] || (o[21] = (p) => {
3520
- var R, S;
3521
- (S = (R = e.value) == null ? void 0 : R.platform) != null && S.mappings && (e.value.platform.mappings.taxRoundingAdjustments = p);
3520
+ var P, S;
3521
+ (S = (P = e.value) == null ? void 0 : P.platform) != null && S.mappings && (e.value.platform.mappings.taxRoundingAdjustments = p);
3522
3522
  })
3523
3523
  }, null, 8, ["rows"]),
3524
3524
  l(I, { style: { margin: 0 } }),
3525
3525
  t("div", In, [
3526
- t("div", Pn, C(r(a)("report.integration.biztory.payments")), 1),
3526
+ t("div", Rn, C(r(a)("report.integration.biztory.payments")), 1),
3527
3527
  l(k, {
3528
3528
  variant: "secondary",
3529
3529
  "prepend-icon": "add",
@@ -3531,7 +3531,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3531
3531
  onClick: o[22] || (o[22] = () => u("paymentMethods"))
3532
3532
  })
3533
3533
  ]),
3534
- t("div", Rn, [
3534
+ t("div", Pn, [
3535
3535
  o[27] || (o[27] = t("div", { class: "w-[25%]" }, "Payment Term", -1)),
3536
3536
  t("div", Mn, [
3537
3537
  l(L, {
@@ -3546,14 +3546,14 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3546
3546
  }, null, 8, ["modelValue"])
3547
3547
  ])
3548
3548
  ]),
3549
- f.retrievedMethods.isError ? j("", !0) : (x(), P("div", jn, C(r(a)("report.integration.biztory.paymentTerm")), 1)),
3550
- f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length == 0 && !f.retrievedMethods.isError ? (x(), P("span", On, C(r(a)("report.integration.biztory.noPaymentMethods")), 1)) : j("", !0),
3551
- f.retrievedMethods.isLoaded ? j("", !0) : (x(), M(z, {
3549
+ f.retrievedMethods.isError ? j("", !0) : (b(), R("div", jn, C(r(a)("report.integration.biztory.paymentTerm")), 1)),
3550
+ f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length == 0 && !f.retrievedMethods.isError ? (b(), R("span", On, C(r(a)("report.integration.biztory.noPaymentMethods")), 1)) : j("", !0),
3551
+ f.retrievedMethods.isLoaded ? j("", !0) : (b(), M(z, {
3552
3552
  key: 2,
3553
3553
  size: "xl"
3554
3554
  })),
3555
- f.retrievedMethods.isError ? (x(), P("span", Ln, C(r(a)("report.integration.biztory.error")), 1)) : j("", !0),
3556
- f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length != 0 ? (x(), M(G, {
3555
+ f.retrievedMethods.isError ? (b(), R("span", Ln, C(r(a)("report.integration.biztory.error")), 1)) : j("", !0),
3556
+ f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length != 0 ? (b(), M(G, {
3557
3557
  key: 4,
3558
3558
  "header-items": ["Key", "Payment Method"],
3559
3559
  rows: ((N = (_ = (pe = e.value) == null ? void 0 : pe.platform) == null ? void 0 : _.mappings) == null ? void 0 : N.paymentMethods) || [],
@@ -3568,10 +3568,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3568
3568
  },
3569
3569
  removable: !0,
3570
3570
  "mapping-type": s.paymentMethods,
3571
- onRemove: o[24] || (o[24] = (p, R) => m(p, R)),
3571
+ onRemove: o[24] || (o[24] = (p, P) => m(p, P)),
3572
3572
  "onUpdate:rows": o[25] || (o[25] = (p) => {
3573
- var R, S;
3574
- (S = (R = e.value) == null ? void 0 : R.platform) != null && S.mappings && (e.value.platform.mappings.paymentMethods = p);
3573
+ var P, S;
3574
+ (S = (P = e.value) == null ? void 0 : P.platform) != null && S.mappings && (e.value.platform.mappings.paymentMethods = p);
3575
3575
  })
3576
3576
  }, null, 8, ["rows", "fields-options", "mapping-type"])) : j("", !0)
3577
3577
  ])
@@ -3581,9 +3581,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3581
3581
  };
3582
3582
  }
3583
3583
  });
3584
- function En(f) {
3584
+ function Bn(f) {
3585
3585
  return f.reduce((a, e) => {
3586
- var V, $, U, y, h, c, T, A, m, u, d, v, b, w, s, o, n, k, D, I, O, z;
3586
+ var V, $, U, y, h, c, T, A, m, u, d, v, x, w, s, o, n, k, D, I, O, z;
3587
3587
  const { invoice: i } = e, g = a.length;
3588
3588
  a[g] = {
3589
3589
  invoice_date: i.invoice_date,
@@ -3601,10 +3601,10 @@ function En(f) {
3601
3601
  payment_method: ((m = (A = i.transactions) == null ? void 0 : A[0]) == null ? void 0 : m.payment_method) || "-",
3602
3602
  payment_term: ((u = i == null ? void 0 : i.payment_term) == null ? void 0 : u.name) || ""
3603
3603
  };
3604
- for (let B = 1; B < Math.max(((d = i.items) == null ? void 0 : d.length) || 0, ((v = i.transactions) == null ? void 0 : v.length) || 0); B++) {
3605
- const H = g + B;
3604
+ for (let E = 1; E < Math.max(((d = i.items) == null ? void 0 : d.length) || 0, ((v = i.transactions) == null ? void 0 : v.length) || 0); E++) {
3605
+ const H = g + E;
3606
3606
  a[H] || (a[H] = {});
3607
- const X = i.items[B];
3607
+ const X = i.items[E];
3608
3608
  X ? a[H] = {
3609
3609
  ...a[H],
3610
3610
  item_code: X.code,
@@ -3612,19 +3612,19 @@ function En(f) {
3612
3612
  item_price: X.price,
3613
3613
  item_tax: X.total_tax,
3614
3614
  item_tax_label: X.tax_label || "-",
3615
- payment_amount: ((w = (b = i.transactions) == null ? void 0 : b[B]) == null ? void 0 : w.amount) || void 0,
3616
- payment_method: ((o = (s = i.transactions) == null ? void 0 : s[B]) == null ? void 0 : o.payment_method) || "-",
3615
+ payment_amount: ((w = (x = i.transactions) == null ? void 0 : x[E]) == null ? void 0 : w.amount) || void 0,
3616
+ payment_method: ((o = (s = i.transactions) == null ? void 0 : s[E]) == null ? void 0 : o.payment_method) || "-",
3617
3617
  payment_term: ((n = i == null ? void 0 : i.payment_term) == null ? void 0 : n.name) || ""
3618
3618
  } : a[H] = {
3619
- payment_amount: ((D = (k = i.transactions) == null ? void 0 : k[B]) == null ? void 0 : D.amount) || void 0,
3620
- payment_method: ((O = (I = i.transactions) == null ? void 0 : I[B]) == null ? void 0 : O.payment_method) || "-",
3619
+ payment_amount: ((D = (k = i.transactions) == null ? void 0 : k[E]) == null ? void 0 : D.amount) || void 0,
3620
+ payment_method: ((O = (I = i.transactions) == null ? void 0 : I[E]) == null ? void 0 : O.payment_method) || "-",
3621
3621
  payment_term: ((z = i == null ? void 0 : i.payment_term) == null ? void 0 : z.name) || ""
3622
3622
  };
3623
3623
  }
3624
3624
  return a;
3625
3625
  }, []);
3626
3626
  }
3627
- const qn = [
3627
+ const Yn = [
3628
3628
  {
3629
3629
  accessorKey: "invoice_date",
3630
3630
  header: () => F("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -3696,9 +3696,9 @@ const qn = [
3696
3696
  enableSorting: !1
3697
3697
  }
3698
3698
  ];
3699
- function Yn(f) {
3699
+ function qn(f) {
3700
3700
  return f.reduce((a, e) => {
3701
- var U, y, h, c, T, A, m, u, d, v, b, w, s, o;
3701
+ var U, y, h, c, T, A, m, u, d, v, x, w, s, o;
3702
3702
  const { invoice: i, payments: g } = e, V = a.length;
3703
3703
  a[V] = {
3704
3704
  invoice_date: i.invoice_date,
@@ -3716,7 +3716,7 @@ function Yn(f) {
3716
3716
  payment_method: ((v = g[0]) == null ? void 0 : v.payment_method_name) || ""
3717
3717
  };
3718
3718
  const $ = Math.max(
3719
- ((b = i.items) == null ? void 0 : b.length) || 0,
3719
+ ((x = i.items) == null ? void 0 : x.length) || 0,
3720
3720
  ((w = i.terms) == null ? void 0 : w.length) || 0,
3721
3721
  (g == null ? void 0 : g.length) || 0
3722
3722
  );
@@ -3821,7 +3821,7 @@ const zn = [
3821
3821
  },
3822
3822
  emits: ["update:modelValue"],
3823
3823
  setup(f) {
3824
- const { t: a } = W(), e = J(f, "modelValue"), i = E(!1), g = ve(), { dateRange: V } = Ie(fe()), $ = E([]);
3824
+ const { t: a } = W(), e = J(f, "modelValue"), i = B(!1), g = ve(), { dateRange: V } = Ie(fe()), $ = B([]);
3825
3825
  we(
3826
3826
  () => V.value,
3827
3827
  async () => {
@@ -3838,18 +3838,18 @@ const zn = [
3838
3838
  immediate: !0
3839
3839
  }
3840
3840
  );
3841
- const U = q(() => {
3841
+ const U = Y(() => {
3842
3842
  switch (e.value.platform.mappings.version) {
3843
3843
  case "v1":
3844
- return En($.value);
3844
+ return Bn($.value);
3845
3845
  case "v2":
3846
- return Yn($.value);
3846
+ return qn($.value);
3847
3847
  }
3848
3848
  return [];
3849
- }), y = q(() => {
3849
+ }), y = Y(() => {
3850
3850
  switch (e.value.platform.mappings.version) {
3851
3851
  case "v1":
3852
- return qn;
3852
+ return Yn;
3853
3853
  case "v2":
3854
3854
  return zn;
3855
3855
  }
@@ -3857,7 +3857,7 @@ const zn = [
3857
3857
  });
3858
3858
  async function h() {
3859
3859
  try {
3860
- e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (i.value = !0, await Be(e.value._id), g.open({ message: "Upload successful", type: "success" })) : g.open({ message: "Invalid accounting setting", type: "error" });
3860
+ e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (i.value = !0, await Ee(e.value._id), g.open({ message: "Upload successful", type: "success" })) : g.open({ message: "Invalid accounting setting", type: "error" });
3861
3861
  } catch (c) {
3862
3862
  c.message && g.open({ message: c.message, type: "error" }), c.errors && c.errors.forEach((T) => g.open({ message: T, type: "error" }));
3863
3863
  } finally {
@@ -3866,9 +3866,9 @@ const zn = [
3866
3866
  }
3867
3867
  return (c, T) => {
3868
3868
  const A = K("FmButton"), m = K("FmCircularProgress"), u = K("FmTable");
3869
- return x(), P("div", Hn, [
3869
+ return b(), R("div", Hn, [
3870
3870
  t("div", Xn, [
3871
- l(Pe, {
3871
+ l(Re, {
3872
3872
  "date-range": r(V),
3873
3873
  "onUpdate:dateRange": T[0] || (T[0] = (d) => $e(V) ? V.value = d : null),
3874
3874
  compare: !1
@@ -3880,10 +3880,10 @@ const zn = [
3880
3880
  onClick: h
3881
3881
  }, null, 8, ["loading"])
3882
3882
  ]),
3883
- i.value ? (x(), P("div", Qn, [
3883
+ i.value ? (b(), R("div", Qn, [
3884
3884
  l(m, { size: "xl" }),
3885
3885
  t("span", Gn, C(r(a)("report.common.isLoading")), 1)
3886
- ])) : (x(), M(u, {
3886
+ ])) : (b(), M(u, {
3887
3887
  key: 1,
3888
3888
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
3889
3889
  "row-data": U.value,
@@ -3900,7 +3900,7 @@ const zn = [
3900
3900
  },
3901
3901
  emits: ["update:modelValue"],
3902
3902
  setup(f) {
3903
- const { t: a } = W(), e = J(f, "modelValue"), i = E("setting"), g = [
3903
+ const { t: a } = W(), e = J(f, "modelValue"), i = B("setting"), g = [
3904
3904
  {
3905
3905
  label: a("report.integration.setting"),
3906
3906
  value: "setting",
@@ -3911,7 +3911,7 @@ const zn = [
3911
3911
  value: "preview",
3912
3912
  icon: "table"
3913
3913
  }
3914
- ], V = ue(), $ = q(() => {
3914
+ ], V = ue(), $ = Y(() => {
3915
3915
  switch (i.value) {
3916
3916
  case "preview":
3917
3917
  return {
@@ -3919,7 +3919,7 @@ const zn = [
3919
3919
  };
3920
3920
  case "setting":
3921
3921
  return {
3922
- component: Bn,
3922
+ component: En,
3923
3923
  props: {
3924
3924
  retrievedMethods: U.value,
3925
3925
  retrievedCustomers: y.value
@@ -3928,16 +3928,16 @@ const zn = [
3928
3928
  default:
3929
3929
  return null;
3930
3930
  }
3931
- }), U = E({}), y = E({}), h = (u, d) => u.map((v) => ({
3931
+ }), U = B({}), y = B({}), h = (u, d) => u.map((v) => ({
3932
3932
  label: d.length > 2 ? `ID:${v[d[2]]} [${v[d[0]]}] ${v[d[1]]}` : `[${v[d[0]]}] ${v[d[1]]}`,
3933
3933
  value: v.id,
3934
3934
  cnId: v.cnId ? v.cnId : null
3935
- })), c = (u) => h(u, ["wallet", "name"]), T = (u) => h(u, ["id", "name"]), A = async (u, d, v, b) => {
3935
+ })), c = (u) => h(u, ["wallet", "name"]), T = (u) => h(u, ["id", "name"]), A = async (u, d, v, x) => {
3936
3936
  try {
3937
3937
  const w = await u(e.value._id);
3938
3938
  v.value.data = d(w);
3939
3939
  } catch (w) {
3940
- console.error(b, w), v.value.isError = !0;
3940
+ console.error(x, w), v.value.isError = !0;
3941
3941
  } finally {
3942
3942
  v.value.isLoaded = !0;
3943
3943
  }
@@ -3955,13 +3955,13 @@ const zn = [
3955
3955
  "Failed to fetch customers:"
3956
3956
  ), U.value.isLoaded = !0, y.value.isLoaded = !0;
3957
3957
  };
3958
- return qe(m), we(() => {
3958
+ return Ye(m), we(() => {
3959
3959
  var u;
3960
3960
  return (u = e.value.platform.mappings) == null ? void 0 : u.version;
3961
3961
  }, m), (u, d) => {
3962
3962
  var w, s, o;
3963
- const v = K("FmPageHead"), b = K("FmTabs");
3964
- return x(), P("div", Wn, [
3963
+ const v = K("FmPageHead"), x = K("FmTabs");
3964
+ return b(), R("div", Wn, [
3965
3965
  l(v, {
3966
3966
  title: ((w = e.value) == null ? void 0 : w.name) || "Biztory",
3967
3967
  "back-button": !0,
@@ -3973,13 +3973,13 @@ const zn = [
3973
3973
  ])),
3974
3974
  _: 1
3975
3975
  }, 8, ["title", "onClick:back"]),
3976
- l(b, {
3976
+ l(x, {
3977
3977
  "model-value": i.value,
3978
3978
  "onUpdate:modelValue": d[0] || (d[0] = (n) => i.value = n),
3979
3979
  items: g
3980
3980
  }, null, 8, ["model-value"]),
3981
3981
  t("div", Zn, [
3982
- (x(), M(Ve((s = $.value) == null ? void 0 : s.component), Ee({
3982
+ (b(), M(Ve((s = $.value) == null ? void 0 : s.component), Be({
3983
3983
  modelValue: e.value,
3984
3984
  "onUpdate:modelValue": d[1] || (d[1] = (n) => e.value = n)
3985
3985
  }, (o = $.value) == null ? void 0 : o.props), null, 16, ["modelValue"]))
@@ -3998,7 +3998,7 @@ const zn = [
3998
3998
  },
3999
3999
  emits: ["update:modelValue"],
4000
4000
  setup(f) {
4001
- const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = q(
4001
+ const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = Y(
4002
4002
  () => y.map((d) => ({ label: d.name, value: d.id }))
4003
4003
  );
4004
4004
  async function c() {
@@ -4023,14 +4023,14 @@ const zn = [
4023
4023
  });
4024
4024
  }
4025
4025
  function A(d, v) {
4026
- var b, w;
4027
- (w = (b = e.value.platform) == null ? void 0 : b.mappings) != null && w[d] && (e.value.platform.mappings[d] = e.value.platform.mappings[d].filter(
4026
+ var x, w;
4027
+ (w = (x = e.value.platform) == null ? void 0 : x.mappings) != null && w[d] && (e.value.platform.mappings[d] = e.value.platform.mappings[d].filter(
4028
4028
  (s, o) => o !== v
4029
4029
  ));
4030
4030
  }
4031
4031
  function m(d) {
4032
- var v, b;
4033
- (b = (v = e.value.platform) == null ? void 0 : v.mappings) != null && b[d] && (e.value.platform.mappings[d] = [
4032
+ var v, x;
4033
+ (x = (v = e.value.platform) == null ? void 0 : v.mappings) != null && x[d] && (e.value.platform.mappings[d] = [
4034
4034
  ...e.value.platform.mappings[d],
4035
4035
  {
4036
4036
  key: "",
@@ -4053,14 +4053,14 @@ const zn = [
4053
4053
  await g.getSettings();
4054
4054
  }), (d, v) => {
4055
4055
  var k, D, I, O, z;
4056
- const b = K("FmIcon"), w = K("FmButton"), s = K("FmMenuDivider"), o = K("FmTextField"), n = K("FmSelect");
4057
- return (D = (k = e.value) == null ? void 0 : k.platform) != null && D.mappings ? (x(), P("div", ts, [
4056
+ const x = K("FmIcon"), w = K("FmButton"), s = K("FmMenuDivider"), o = K("FmTextField"), n = K("FmSelect");
4057
+ return (D = (k = e.value) == null ? void 0 : k.platform) != null && D.mappings ? (b(), R("div", ts, [
4058
4058
  t("div", os, [
4059
4059
  t("div", as, [
4060
4060
  v[6] || (v[6] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
4061
4061
  t("div", ls, [
4062
4062
  t("div", ns, [
4063
- l(b, {
4063
+ l(x, {
4064
4064
  name: "refresh",
4065
4065
  class: "p-2 bg-gray-100 rounded-full",
4066
4066
  onClick: u
@@ -4091,7 +4091,7 @@ const zn = [
4091
4091
  t("div", us, [
4092
4092
  l(o, {
4093
4093
  modelValue: e.value.name,
4094
- "onUpdate:modelValue": v[0] || (v[0] = (B) => e.value.name = B)
4094
+ "onUpdate:modelValue": v[0] || (v[0] = (E) => e.value.name = E)
4095
4095
  }, null, 8, ["modelValue"])
4096
4096
  ])
4097
4097
  ]),
@@ -4103,14 +4103,14 @@ const zn = [
4103
4103
  items: h.value,
4104
4104
  placeholder: "Select location",
4105
4105
  class: "flex-grow",
4106
- "onUpdate:modelValue": v[1] || (v[1] = (B) => e.value.platform.locationIds[0] = B)
4106
+ "onUpdate:modelValue": v[1] || (v[1] = (E) => e.value.platform.locationIds[0] = E)
4107
4107
  }, null, 8, ["model-value", "items"])
4108
4108
  ])
4109
4109
  ]),
4110
4110
  l(s, { style: { margin: 0 } }),
4111
- l(Re, {
4111
+ l(Pe, {
4112
4112
  modelValue: e.value.platform,
4113
- "onUpdate:modelValue": v[2] || (v[2] = (B) => e.value.platform = B),
4113
+ "onUpdate:modelValue": v[2] || (v[2] = (E) => e.value.platform = E),
4114
4114
  label: r(a)("report.input.email")
4115
4115
  }, null, 8, ["modelValue", "label"]),
4116
4116
  l(s, { style: { margin: 0 } }),
@@ -4134,10 +4134,10 @@ const zn = [
4134
4134
  badgeNo: { placeholder: "Badge No", editable: !0 },
4135
4135
  employeeNo: { placeholder: "Employee No", editable: !0 }
4136
4136
  },
4137
- onRemove: v[4] || (v[4] = (B, H) => A("employees", H)),
4138
- "onUpdate:rows": v[5] || (v[5] = (B) => {
4137
+ onRemove: v[4] || (v[4] = (E, H) => A("employees", H)),
4138
+ "onUpdate:rows": v[5] || (v[5] = (E) => {
4139
4139
  var H, X;
4140
- (X = (H = e.value) == null ? void 0 : H.platform) != null && X.mappings && (e.value.platform.mappings.employees = B);
4140
+ (X = (H = e.value) == null ? void 0 : H.platform) != null && X.mappings && (e.value.platform.mappings.employees = E);
4141
4141
  })
4142
4142
  }, null, 8, ["rows"])
4143
4143
  ])
@@ -4156,7 +4156,7 @@ const zn = [
4156
4156
  },
4157
4157
  emits: ["update:modelValue"],
4158
4158
  setup(f) {
4159
- const { t: a } = W(), e = E([]), i = [
4159
+ const { t: a } = W(), e = B([]), i = [
4160
4160
  {
4161
4161
  accessorKey: "name",
4162
4162
  header: () => F("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Name"),
@@ -4182,7 +4182,7 @@ const zn = [
4182
4182
  header: () => F("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
4183
4183
  enableSorting: !1
4184
4184
  }
4185
- ], g = J(f, "modelValue"), V = E(!1), $ = ve(), { dateRange: U } = Ie(fe());
4185
+ ], g = J(f, "modelValue"), V = B(!1), $ = ve(), { dateRange: U } = Ie(fe());
4186
4186
  we(
4187
4187
  () => U.value,
4188
4188
  async () => {
@@ -4210,9 +4210,9 @@ const zn = [
4210
4210
  }
4211
4211
  return (h, c) => {
4212
4212
  const T = K("FmButton"), A = K("FmCircularProgress"), m = K("FmTable");
4213
- return x(), P("div", bs, [
4213
+ return b(), R("div", bs, [
4214
4214
  t("div", ws, [
4215
- l(Pe, {
4215
+ l(Re, {
4216
4216
  "date-range": r(U),
4217
4217
  "onUpdate:dateRange": c[0] || (c[0] = (u) => $e(U) ? U.value = u : null),
4218
4218
  compare: !1
@@ -4224,10 +4224,10 @@ const zn = [
4224
4224
  onClick: y
4225
4225
  }, null, 8, ["loading", "label"])
4226
4226
  ]),
4227
- V.value ? (x(), P("div", _s, [
4227
+ V.value ? (b(), R("div", _s, [
4228
4228
  l(A, { size: "xl" }),
4229
4229
  t("span", hs, C(r(a)("report.common.isLoading")), 1)
4230
- ])) : e.value.length > 0 ? (x(), M(m, {
4230
+ ])) : e.value.length > 0 ? (b(), M(m, {
4231
4231
  key: 1,
4232
4232
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
4233
4233
  "row-data": e.value,
@@ -4244,7 +4244,7 @@ const zn = [
4244
4244
  },
4245
4245
  emits: ["update:modelValue"],
4246
4246
  setup(f) {
4247
- const { t: a } = W(), e = J(f, "modelValue"), i = E("setting"), g = [
4247
+ const { t: a } = W(), e = J(f, "modelValue"), i = B("setting"), g = [
4248
4248
  {
4249
4249
  label: a("report.integration.setting"),
4250
4250
  value: "setting",
@@ -4255,7 +4255,7 @@ const zn = [
4255
4255
  value: "preview",
4256
4256
  icon: "table"
4257
4257
  }
4258
- ], V = ue(), $ = q(() => {
4258
+ ], V = ue(), $ = Y(() => {
4259
4259
  switch (i.value) {
4260
4260
  case "preview":
4261
4261
  return ks;
@@ -4268,7 +4268,7 @@ const zn = [
4268
4268
  return (U, y) => {
4269
4269
  var T;
4270
4270
  const h = K("FmPageHead"), c = K("FmTabs");
4271
- return x(), P("div", Cs, [
4271
+ return b(), R("div", Cs, [
4272
4272
  l(h, {
4273
4273
  title: ((T = e.value) == null ? void 0 : T.name) || "AutoCount",
4274
4274
  "back-button": !0,
@@ -4286,7 +4286,7 @@ const zn = [
4286
4286
  items: g
4287
4287
  }, null, 8, ["model-value"]),
4288
4288
  t("div", $s, [
4289
- (x(), M(Ve($.value), {
4289
+ (b(), M(Ve($.value), {
4290
4290
  modelValue: e.value,
4291
4291
  "onUpdate:modelValue": y[1] || (y[1] = (A) => e.value = A)
4292
4292
  }, null, 8, ["modelValue"]))
@@ -4297,7 +4297,7 @@ const zn = [
4297
4297
  }), As = {
4298
4298
  key: 0,
4299
4299
  class: "flex flex-col h-full"
4300
- }, Ss = { class: "flex flex-col gap-16 pb-[24px]" }, Ds = { class: "flex flex-row justify-between items-center gap-2" }, Fs = { class: "fm-typo-en-title-sm-800" }, Ks = { class: "flex flex-row gap-2 items-center" }, Ts = { class: "flex flex-row gap-2 items-center" }, Ns = { class: "relative group cursor-pointer" }, Us = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Is = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Ps = { class: "flex flex-col gap-24 w-[90%]" }, Rs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ms = { class: "flex flex-col gap-24 overflow-y-auto overflow-x-hidden" }, js = { class: "flex flex-col justify-between" }, Os = { class: "w-[25%] font-semibold" }, Ls = { class: "flex-grow" }, Bs = { class: "flex flex-col justify-between" }, Es = { class: "w-[25%] font-semibold" }, qs = { class: "flex-grow" }, Ys = { class: "flex flex-col justify-between" }, zs = { class: "w-[25%] font-semibold" }, Hs = { class: "flex-grow" }, Xs = { class: "flex flex-col gap-16" }, Qs = { class: "flex flex-row items-center gap-5" }, Gs = { class: "fm-typo-en-title-sm-800" }, Js = { class: "flex flex-col max-w-[100%]" }, Ws = { class: "w-[25%] font-semibold" }, Zs = { class: "flex-grow" }, ei = { class: "flex flex-col max-w-[100%]" }, ti = { class: "w-[25%] font-semibold" }, oi = { class: "flex flex-col max-w-[100%]" }, ai = { class: "w-[25%] font-semibold" }, li = { class: "flex flex-col max-w-[100%]" }, ni = { class: "w-[25%] font-semibold" }, si = {
4300
+ }, Ss = { class: "flex flex-col gap-16 pb-[24px]" }, Ds = { class: "flex flex-row justify-between items-center gap-2" }, Fs = { class: "fm-typo-en-title-sm-800" }, Ks = { class: "flex flex-row gap-2 items-center" }, Ts = { class: "flex flex-row gap-2 items-center" }, Ns = { class: "relative group cursor-pointer" }, Us = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Is = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Rs = { class: "flex flex-col gap-24 w-[90%]" }, Ps = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ms = { class: "flex flex-col gap-24 overflow-y-auto overflow-x-hidden" }, js = { class: "flex flex-col justify-between" }, Os = { class: "w-[25%] font-semibold" }, Ls = { class: "flex-grow" }, Es = { class: "flex flex-col justify-between" }, Bs = { class: "w-[25%] font-semibold" }, Ys = { class: "flex-grow" }, qs = { class: "flex flex-col justify-between" }, zs = { class: "w-[25%] font-semibold" }, Hs = { class: "flex-grow" }, Xs = { class: "flex flex-col gap-16" }, Qs = { class: "flex flex-row items-center gap-5" }, Gs = { class: "fm-typo-en-title-sm-800" }, Js = { class: "flex flex-col max-w-[100%]" }, Ws = { class: "w-[25%] font-semibold" }, Zs = { class: "flex-grow" }, ei = { class: "flex flex-col max-w-[100%]" }, ti = { class: "w-[25%] font-semibold" }, oi = { class: "flex flex-col max-w-[100%]" }, ai = { class: "w-[25%] font-semibold" }, li = { class: "flex flex-col max-w-[100%]" }, ni = { class: "w-[25%] font-semibold" }, si = {
4301
4301
  key: 1,
4302
4302
  class: "w-[100%] flex flex-col gap-2"
4303
4303
  }, ii = {
@@ -4326,10 +4326,10 @@ const zn = [
4326
4326
  }),
4327
4327
  emits: ["update:modelValue"],
4328
4328
  setup(f) {
4329
- const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = q(
4329
+ const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = Y(
4330
4330
  () => y.map((o) => ({ label: o.name, value: o.id }))
4331
4331
  );
4332
- let c = E("");
4332
+ let c = B("");
4333
4333
  async function T() {
4334
4334
  await U({
4335
4335
  message: a("report.messages.confirmDelete", { name: e.value.name }),
@@ -4358,7 +4358,7 @@ const zn = [
4358
4358
  if (["items", "taxes", "payments", "taxRoundingAdjustments"].includes(o)) {
4359
4359
  const O = o;
4360
4360
  k[O] && Array.isArray(k[O]) && (k[O] = k[O].filter(
4361
- (z, B) => B !== n
4361
+ (z, E) => E !== n
4362
4362
  ));
4363
4363
  }
4364
4364
  }
@@ -4393,7 +4393,7 @@ const zn = [
4393
4393
  }
4394
4394
  });
4395
4395
  }
4396
- function b({
4396
+ function x({
4397
4397
  key: o,
4398
4398
  value: n
4399
4399
  }) {
@@ -4428,9 +4428,9 @@ const zn = [
4428
4428
  },
4429
4429
  { immediate: !0 }
4430
4430
  ), (o, n) => {
4431
- var X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, _, N, p, R;
4432
- const k = K("FmIcon"), D = K("FmButton"), I = K("FmMenuDivider"), O = K("FmTextField"), z = K("FmSelect"), B = K("FmCircularProgress"), H = K("FmSwitch");
4433
- return (ee = (X = e.value) == null ? void 0 : X.platform) != null && ee.mappings ? (x(), P("div", As, [
4431
+ var X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, _, N, p, P;
4432
+ const k = K("FmIcon"), D = K("FmButton"), I = K("FmMenuDivider"), O = K("FmTextField"), z = K("FmSelect"), E = K("FmCircularProgress"), H = K("FmSwitch");
4433
+ return (ee = (X = e.value) == null ? void 0 : X.platform) != null && ee.mappings ? (b(), R("div", As, [
4434
4434
  t("div", Ss, [
4435
4435
  t("div", Ds, [
4436
4436
  t("div", Fs, C(r(a)("report.integration.connect")), 1),
@@ -4460,8 +4460,8 @@ const zn = [
4460
4460
  ])
4461
4461
  ]),
4462
4462
  t("div", Is, [
4463
- t("div", Ps, [
4464
- t("div", Rs, C(r(a)("report.integration.authDescription")), 1),
4463
+ t("div", Rs, [
4464
+ t("div", Ps, C(r(a)("report.integration.authDescription")), 1),
4465
4465
  l(I, { style: { margin: 0 } }),
4466
4466
  t("div", Ms, [
4467
4467
  t("div", js, [
@@ -4474,9 +4474,9 @@ const zn = [
4474
4474
  }, null, 8, ["modelValue", "placeholder"])
4475
4475
  ])
4476
4476
  ]),
4477
- t("div", Bs, [
4478
- t("div", Es, C(r(a)("report.integration.apiKey")), 1),
4479
- t("div", qs, [
4477
+ t("div", Es, [
4478
+ t("div", Bs, C(r(a)("report.integration.apiKey")), 1),
4479
+ t("div", Ys, [
4480
4480
  l(O, {
4481
4481
  modelValue: e.value.platform.apiKey,
4482
4482
  "onUpdate:modelValue": n[1] || (n[1] = (S) => e.value.platform.apiKey = S),
@@ -4484,7 +4484,7 @@ const zn = [
4484
4484
  }, null, 8, ["modelValue", "placeholder"])
4485
4485
  ])
4486
4486
  ]),
4487
- t("div", Ys, [
4487
+ t("div", qs, [
4488
4488
  t("div", zs, C(r(a)("report.integration.autocount.accountBookId")), 1),
4489
4489
  t("div", Hs, [
4490
4490
  l(O, {
@@ -4533,11 +4533,11 @@ const zn = [
4533
4533
  ]),
4534
4534
  t("div", li, [
4535
4535
  t("div", ni, C(r(a)("report.integration.autocount.debtor")), 1),
4536
- f.retrievedDebtors.isLoaded ? j("", !0) : (x(), M(B, {
4536
+ f.retrievedDebtors.isLoaded ? j("", !0) : (b(), M(E, {
4537
4537
  key: 0,
4538
4538
  size: "xl"
4539
4539
  })),
4540
- f.retrievedDebtors.isLoaded && f.retrievedDebtors.data && ((te = f.retrievedDebtors.data) == null ? void 0 : te.length) != 0 && !f.retrievedDebtors.isError ? (x(), P("div", si, [
4540
+ f.retrievedDebtors.isLoaded && f.retrievedDebtors.data && ((te = f.retrievedDebtors.data) == null ? void 0 : te.length) != 0 && !f.retrievedDebtors.isError ? (b(), R("div", si, [
4541
4541
  l(z, {
4542
4542
  modelValue: r(c),
4543
4543
  "onUpdate:modelValue": [
@@ -4549,15 +4549,15 @@ const zn = [
4549
4549
  class: "flex-grow",
4550
4550
  disabled: !f.retrievedDebtors.isLoaded
4551
4551
  }, null, 8, ["modelValue", "items", "placeholder", "disabled"])
4552
- ])) : f.retrievedDebtors.isError ? (x(), P("div", ii, C(r(a)("report.integration.errorFetchingDebtor")), 1)) : j("", !0)
4552
+ ])) : f.retrievedDebtors.isError ? (b(), R("div", ii, C(r(a)("report.integration.errorFetchingDebtor")), 1)) : j("", !0)
4553
4553
  ]),
4554
4554
  t("div", ri, [
4555
4555
  t("div", di, C(r(a)("report.integration.autocount.location")), 1),
4556
- f.retrievedLocations.isLoaded ? j("", !0) : (x(), M(B, {
4556
+ f.retrievedLocations.isLoaded ? j("", !0) : (b(), M(E, {
4557
4557
  key: 0,
4558
4558
  size: "xl"
4559
4559
  })),
4560
- f.retrievedLocations.isLoaded && f.retrievedLocations.data && ((oe = f.retrievedLocations.data) == null ? void 0 : oe.length) != 0 && !f.retrievedLocations.isError ? (x(), P("div", mi, [
4560
+ f.retrievedLocations.isLoaded && f.retrievedLocations.data && ((oe = f.retrievedLocations.data) == null ? void 0 : oe.length) != 0 && !f.retrievedLocations.isError ? (b(), R("div", mi, [
4561
4561
  l(z, {
4562
4562
  modelValue: e.value.platform.mappings.salesLocation,
4563
4563
  "onUpdate:modelValue": n[7] || (n[7] = (S) => e.value.platform.mappings.salesLocation = S),
@@ -4566,7 +4566,7 @@ const zn = [
4566
4566
  class: "flex-grow",
4567
4567
  disabled: !f.retrievedLocations.isLoaded
4568
4568
  }, null, 8, ["modelValue", "items", "placeholder", "disabled"])
4569
- ])) : f.retrievedLocations.isError ? (x(), P("div", pi, C(r(a)("report.integration.errorFetchingLocation")), 1)) : j("", !0)
4569
+ ])) : f.retrievedLocations.isError ? (b(), R("div", pi, C(r(a)("report.integration.errorFetchingLocation")), 1)) : j("", !0)
4570
4570
  ])
4571
4571
  ]),
4572
4572
  l(I, { style: { margin: 0 } }),
@@ -4610,7 +4610,7 @@ const zn = [
4610
4610
  account: e.value.platform.mappings.invoiceDocNo
4611
4611
  },
4612
4612
  options: w("Invoice no"),
4613
- "onUpdate:modelValue": n[11] || (n[11] = (S) => b({ key: "invoiceDocNo", value: S.account }))
4613
+ "onUpdate:modelValue": n[11] || (n[11] = (S) => x({ key: "invoiceDocNo", value: S.account }))
4614
4614
  }, null, 8, ["model-value", "options"]),
4615
4615
  l(L, {
4616
4616
  "model-value": {
@@ -4618,7 +4618,7 @@ const zn = [
4618
4618
  account: e.value.platform.mappings.creditNoteDocNo
4619
4619
  },
4620
4620
  options: w("Credit note no"),
4621
- "onUpdate:modelValue": n[12] || (n[12] = (S) => b({ key: "creditNoteDocNo", value: S.account }))
4621
+ "onUpdate:modelValue": n[12] || (n[12] = (S) => x({ key: "creditNoteDocNo", value: S.account }))
4622
4622
  }, null, 8, ["model-value", "options"]),
4623
4623
  l(L, {
4624
4624
  "model-value": {
@@ -4626,7 +4626,7 @@ const zn = [
4626
4626
  account: e.value.platform.mappings.paymentDocNo
4627
4627
  },
4628
4628
  options: w("Payment no"),
4629
- "onUpdate:modelValue": n[13] || (n[13] = (S) => b({ key: "paymentDocNo", value: S.account }))
4629
+ "onUpdate:modelValue": n[13] || (n[13] = (S) => x({ key: "paymentDocNo", value: S.account }))
4630
4630
  }, null, 8, ["model-value", "options"]),
4631
4631
  l(L, {
4632
4632
  "model-value": {
@@ -4634,12 +4634,12 @@ const zn = [
4634
4634
  account: e.value.platform.mappings.refundDocNo
4635
4635
  },
4636
4636
  options: w("Refund no"),
4637
- "onUpdate:modelValue": n[14] || (n[14] = (S) => b({ key: "refundDocNo", value: S.account }))
4637
+ "onUpdate:modelValue": n[14] || (n[14] = (S) => x({ key: "refundDocNo", value: S.account }))
4638
4638
  }, null, 8, ["model-value", "options"])
4639
4639
  ])
4640
4640
  ]),
4641
4641
  l(I, { style: { margin: 0 } }),
4642
- l(Re, {
4642
+ l(Pe, {
4643
4643
  modelValue: e.value.platform,
4644
4644
  "onUpdate:modelValue": n[15] || (n[15] = (S) => e.value.platform = S),
4645
4645
  label: "upload",
@@ -4680,10 +4680,10 @@ const zn = [
4680
4680
  editable: !0
4681
4681
  }
4682
4682
  },
4683
- onRemove: n[17] || (n[17] = (S, Y) => m(S, Y)),
4683
+ onRemove: n[17] || (n[17] = (S, q) => m(S, q)),
4684
4684
  "onUpdate:rows": n[18] || (n[18] = (S) => {
4685
- var Y, ye;
4686
- (ye = (Y = e.value) == null ? void 0 : Y.platform) != null && ye.mappings && (e.value.platform.mappings.items = S);
4685
+ var q, ye;
4686
+ (ye = (q = e.value) == null ? void 0 : q.platform) != null && ye.mappings && (e.value.platform.mappings.items = S);
4687
4687
  })
4688
4688
  }, null, 8, ["header-items", "rows", "fields-options"]),
4689
4689
  l(I, { style: { margin: 0 } }),
@@ -4715,10 +4715,10 @@ const zn = [
4715
4715
  editable: !0
4716
4716
  }
4717
4717
  },
4718
- onRemove: n[20] || (n[20] = (S, Y) => m(S, Y)),
4718
+ onRemove: n[20] || (n[20] = (S, q) => m(S, q)),
4719
4719
  "onUpdate:rows": n[21] || (n[21] = (S) => {
4720
- var Y, ye;
4721
- (ye = (Y = e.value) == null ? void 0 : Y.platform) != null && ye.mappings && (e.value.platform.mappings.taxes = S);
4720
+ var q, ye;
4721
+ (ye = (q = e.value) == null ? void 0 : q.platform) != null && ye.mappings && (e.value.platform.mappings.taxes = S);
4722
4722
  })
4723
4723
  }, null, 8, ["header-items", "rows", "fields-options"]),
4724
4724
  l(I, { style: { margin: 0 } }),
@@ -4750,10 +4750,10 @@ const zn = [
4750
4750
  editable: !0
4751
4751
  }
4752
4752
  },
4753
- onRemove: n[23] || (n[23] = (S, Y) => m(S, Y)),
4753
+ onRemove: n[23] || (n[23] = (S, q) => m(S, q)),
4754
4754
  "onUpdate:rows": n[24] || (n[24] = (S) => {
4755
- var Y, ye;
4756
- (ye = (Y = e.value) == null ? void 0 : Y.platform) != null && ye.mappings && (e.value.platform.mappings.taxRoundingAdjustments = S);
4755
+ var q, ye;
4756
+ (ye = (q = e.value) == null ? void 0 : q.platform) != null && ye.mappings && (e.value.platform.mappings.taxRoundingAdjustments = S);
4757
4757
  })
4758
4758
  }, null, 8, ["header-items", "rows", "fields-options"]),
4759
4759
  l(I, { style: { margin: 0 } }),
@@ -4773,7 +4773,7 @@ const zn = [
4773
4773
  account: e.value.platform.mappings.creditTerm
4774
4774
  },
4775
4775
  options: w("creditTerm"),
4776
- "onUpdate:modelValue": n[26] || (n[26] = (S) => b({ key: "creditTerm", value: S.account }))
4776
+ "onUpdate:modelValue": n[26] || (n[26] = (S) => x({ key: "creditTerm", value: S.account }))
4777
4777
  }, null, 8, ["model-value", "options"]),
4778
4778
  l(L, {
4779
4779
  "model-value": {
@@ -4781,7 +4781,7 @@ const zn = [
4781
4781
  account: e.value.platform.mappings.currencyCode
4782
4782
  },
4783
4783
  options: w("currencyCode"),
4784
- "onUpdate:modelValue": n[27] || (n[27] = (S) => b({ key: "currencyCode", value: S.account }))
4784
+ "onUpdate:modelValue": n[27] || (n[27] = (S) => x({ key: "currencyCode", value: S.account }))
4785
4785
  }, null, 8, ["model-value", "options"]),
4786
4786
  l(L, {
4787
4787
  "model-value": {
@@ -4789,7 +4789,7 @@ const zn = [
4789
4789
  account: e.value.platform.mappings.journalType
4790
4790
  },
4791
4791
  options: w("journalType"),
4792
- "onUpdate:modelValue": n[28] || (n[28] = (S) => b({ key: "journalType", value: S.account }))
4792
+ "onUpdate:modelValue": n[28] || (n[28] = (S) => x({ key: "journalType", value: S.account }))
4793
4793
  }, null, 8, ["model-value", "options"]),
4794
4794
  l(L, {
4795
4795
  "model-value": {
@@ -4797,7 +4797,7 @@ const zn = [
4797
4797
  account: e.value.platform.mappings.currencyRate
4798
4798
  },
4799
4799
  options: w("currencyRate"),
4800
- "onUpdate:modelValue": n[29] || (n[29] = (S) => b({ key: "currencyRate", value: S.account }))
4800
+ "onUpdate:modelValue": n[29] || (n[29] = (S) => x({ key: "currencyRate", value: S.account }))
4801
4801
  }, null, 8, ["model-value", "options"])
4802
4802
  ]),
4803
4803
  l(G, {
@@ -4806,7 +4806,7 @@ const zn = [
4806
4806
  r(a)("report.integration.autocount.accountCode"),
4807
4807
  r(a)("report.integration.autocount.paymentMethod")
4808
4808
  ],
4809
- rows: ((R = (p = (N = e.value) == null ? void 0 : N.platform) == null ? void 0 : p.mappings) == null ? void 0 : R.payments) || [],
4809
+ rows: ((P = (p = (N = e.value) == null ? void 0 : N.platform) == null ? void 0 : p.mappings) == null ? void 0 : P.payments) || [],
4810
4810
  "columns-per-row": 1,
4811
4811
  removable: !0,
4812
4812
  "mapping-type": "payments",
@@ -4824,10 +4824,10 @@ const zn = [
4824
4824
  editable: !0
4825
4825
  }
4826
4826
  },
4827
- onRemove: n[30] || (n[30] = (S, Y) => m(S, Y)),
4827
+ onRemove: n[30] || (n[30] = (S, q) => m(S, q)),
4828
4828
  "onUpdate:rows": n[31] || (n[31] = (S) => {
4829
- var Y, ye;
4830
- (ye = (Y = e.value) == null ? void 0 : Y.platform) != null && ye.mappings && (e.value.platform.mappings.payments = S);
4829
+ var q, ye;
4830
+ (ye = (q = e.value) == null ? void 0 : q.platform) != null && ye.mappings && (e.value.platform.mappings.payments = S);
4831
4831
  })
4832
4832
  }, null, 8, ["header-items", "rows", "fields-options"])
4833
4833
  ])
@@ -4839,7 +4839,7 @@ const zn = [
4839
4839
  });
4840
4840
  function Ui(f) {
4841
4841
  return f.reduce((a, e) => {
4842
- var U, y, h, c, T, A, m, u, d, v, b, w, s;
4842
+ var U, y, h, c, T, A, m, u, d, v, x, w, s;
4843
4843
  const { invoice: i, payments: g } = e, V = a.length;
4844
4844
  a[V] = {
4845
4845
  docNo: i.master.docNo,
@@ -4856,7 +4856,7 @@ function Ui(f) {
4856
4856
  paymentMethod: (u = (m = g[0]) == null ? void 0 : m.paymentDetails[0]) == null ? void 0 : u.paymentMethod,
4857
4857
  amount: ((d = g[0]) == null ? void 0 : d.details[0].amount) || 0,
4858
4858
  currencyCode: (v = g[0]) == null ? void 0 : v.master.currencyCode,
4859
- journalType: (b = g[0]) == null ? void 0 : b.master.journalType
4859
+ journalType: (x = g[0]) == null ? void 0 : x.master.journalType
4860
4860
  };
4861
4861
  const $ = Math.max(i.details.length, (g == null ? void 0 : g.length) || 0);
4862
4862
  for (let o = 1; o < $; o++) {
@@ -4959,7 +4959,7 @@ const Ii = [
4959
4959
  header: () => F("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Journal Type"),
4960
4960
  enableSorting: !1
4961
4961
  }
4962
- ], Pi = { class: "h-full flex flex-col gap-16" }, Ri = { class: "flex flex-row gap-2 justify-between items-center" }, Mi = { class: "flex flex-row gap-5" }, ji = {
4962
+ ], Ri = { class: "h-full flex flex-col gap-16" }, Pi = { class: "flex flex-row gap-2 justify-between items-center" }, Mi = { class: "flex flex-row gap-5" }, ji = {
4963
4963
  key: 0,
4964
4964
  class: "flex gap-24 w-full h-full justify-center items-center overflow-y-auto"
4965
4965
  }, Oi = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Li = /* @__PURE__ */ Q({
@@ -4970,7 +4970,7 @@ const Ii = [
4970
4970
  },
4971
4971
  emits: ["update:modelValue"],
4972
4972
  setup(f) {
4973
- const { t: a } = W(), e = J(f, "modelValue"), i = E(!1), g = ve(), { dateRange: V } = Ie(fe()), { options: $, isFeatureAvailable: U } = ke(), y = E([]);
4973
+ const { t: a } = W(), e = J(f, "modelValue"), i = B(!1), g = ve(), { dateRange: V } = Ie(fe()), { options: $, isFeatureAvailable: U } = ke(), y = B([]);
4974
4974
  we(
4975
4975
  () => V.value,
4976
4976
  async () => {
@@ -4987,7 +4987,7 @@ const Ii = [
4987
4987
  immediate: !0
4988
4988
  }
4989
4989
  );
4990
- const h = q(() => Ui(y.value)), c = q(() => Ii), T = q(() => {
4990
+ const h = Y(() => Ui(y.value)), c = Y(() => Ii), T = Y(() => {
4991
4991
  var d;
4992
4992
  const u = (d = $.find(
4993
4993
  (v) => v.platform === ge.AutoCountCloud
@@ -4996,7 +4996,7 @@ const Ii = [
4996
4996
  });
4997
4997
  async function A() {
4998
4998
  try {
4999
- e.value._id && e.value.platform.apiKey ? (i.value = !0, await Be(e.value._id), g.open({ message: a("report.integration.uploadSuccess"), type: "success" })) : g.open({ message: a("report.integration.invalidSetting"), type: "error" });
4999
+ e.value._id && e.value.platform.apiKey ? (i.value = !0, await Ee(e.value._id), g.open({ message: a("report.integration.uploadSuccess"), type: "success" })) : g.open({ message: a("report.integration.invalidSetting"), type: "error" });
5000
5000
  } catch (u) {
5001
5001
  u.message && g.open({ message: u.message, type: "error" }), u.errors && u.errors.forEach((d) => g.open({ message: d, type: "error" }));
5002
5002
  } finally {
@@ -5013,16 +5013,16 @@ const Ii = [
5013
5013
  }
5014
5014
  }
5015
5015
  return (u, d) => {
5016
- const v = K("FmButton"), b = K("FmCircularProgress"), w = K("FmTable");
5017
- return x(), P("div", Pi, [
5018
- t("div", Ri, [
5019
- l(Pe, {
5016
+ const v = K("FmButton"), x = K("FmCircularProgress"), w = K("FmTable");
5017
+ return b(), R("div", Ri, [
5018
+ t("div", Pi, [
5019
+ l(Re, {
5020
5020
  "date-range": r(V),
5021
5021
  "onUpdate:dateRange": d[0] || (d[0] = (s) => $e(V) ? V.value = s : null),
5022
5022
  compare: !1
5023
5023
  }, null, 8, ["date-range"]),
5024
5024
  t("div", Mi, [
5025
- T.value ? (x(), M(v, {
5025
+ T.value ? (b(), M(v, {
5026
5026
  key: 0,
5027
5027
  loading: i.value,
5028
5028
  variant: "primary",
@@ -5037,10 +5037,10 @@ const Ii = [
5037
5037
  }, null, 8, ["loading", "label"])
5038
5038
  ])
5039
5039
  ]),
5040
- i.value ? (x(), P("div", ji, [
5041
- l(b, { size: "xl" }),
5040
+ i.value ? (b(), R("div", ji, [
5041
+ l(x, { size: "xl" }),
5042
5042
  t("span", Oi, C(r(a)("report.common.isLoading")), 1)
5043
- ])) : (x(), M(w, {
5043
+ ])) : (b(), M(w, {
5044
5044
  key: 1,
5045
5045
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
5046
5046
  "row-data": h.value,
@@ -5049,7 +5049,7 @@ const Ii = [
5049
5049
  ]);
5050
5050
  };
5051
5051
  }
5052
- }), Bi = { class: "h-full relative flex flex-col" }, Ei = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, qi = /* @__PURE__ */ Q({
5052
+ }), Ei = { class: "h-full relative flex flex-col" }, Bi = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Yi = /* @__PURE__ */ Q({
5053
5053
  __name: "AutocountCloud",
5054
5054
  props: {
5055
5055
  modelValue: { required: !0 },
@@ -5057,7 +5057,7 @@ const Ii = [
5057
5057
  },
5058
5058
  emits: ["update:modelValue"],
5059
5059
  setup(f) {
5060
- const { t: a } = W(), e = J(f, "modelValue"), i = E("setting"), g = [
5060
+ const { t: a } = W(), e = J(f, "modelValue"), i = B("setting"), g = [
5061
5061
  {
5062
5062
  label: a("report.integration.setting"),
5063
5063
  value: "setting",
@@ -5068,7 +5068,7 @@ const Ii = [
5068
5068
  value: "preview",
5069
5069
  icon: "table"
5070
5070
  }
5071
- ], V = ue(), $ = q(() => {
5071
+ ], V = ue(), $ = Y(() => {
5072
5072
  switch (i.value) {
5073
5073
  case "preview":
5074
5074
  return {
@@ -5085,7 +5085,7 @@ const Ii = [
5085
5085
  default:
5086
5086
  return null;
5087
5087
  }
5088
- }), U = E({}), y = E({}), h = (m) => m.data.map((u) => ({
5088
+ }), U = B({}), y = B({}), h = (m) => m.data.map((u) => ({
5089
5089
  label: u.location + " - " + u.description,
5090
5090
  value: u.location
5091
5091
  })), c = (m) => m.data.map((u) => ({
@@ -5095,10 +5095,10 @@ const Ii = [
5095
5095
  valueCompanyName: u.CompanyName
5096
5096
  })), T = async (m, u, d, v) => {
5097
5097
  try {
5098
- const b = await m(e.value._id);
5099
- d.value.data = u(b);
5100
- } catch (b) {
5101
- console.error(v, b), d.value.isError = !0;
5098
+ const x = await m(e.value._id);
5099
+ d.value.data = u(x);
5100
+ } catch (x) {
5101
+ console.error(v, x), d.value.isError = !0;
5102
5102
  } finally {
5103
5103
  d.value.isLoaded = !0;
5104
5104
  }
@@ -5115,14 +5115,14 @@ const Ii = [
5115
5115
  "Failed to fetch locations:"
5116
5116
  ), U.value.isLoaded = !0, y.value.isLoaded = !0;
5117
5117
  };
5118
- return qe(() => {
5118
+ return Ye(() => {
5119
5119
  e.value.platform.apiKey && e.value.platform.accountBookId && e.value.platform.keyId ? A() : (U.value.isLoaded = !0, y.value.isLoaded = !0, U.value.isError = !0, y.value.isError = !0);
5120
5120
  }), (m, u) => {
5121
- var b, w, s;
5121
+ var x, w, s;
5122
5122
  const d = K("FmPageHead"), v = K("FmTabs");
5123
- return x(), P("div", Bi, [
5123
+ return b(), R("div", Ei, [
5124
5124
  l(d, {
5125
- title: ((b = e.value) == null ? void 0 : b.name) || "Autocount Cloud",
5125
+ title: ((x = e.value) == null ? void 0 : x.name) || "Autocount Cloud",
5126
5126
  "back-button": !0,
5127
5127
  style: { paddingLeft: "0px", paddingRight: "0px" },
5128
5128
  "onClick:back": r(V).back
@@ -5137,8 +5137,8 @@ const Ii = [
5137
5137
  "onUpdate:modelValue": u[0] || (u[0] = (o) => i.value = o),
5138
5138
  items: g
5139
5139
  }, null, 8, ["model-value"]),
5140
- t("div", Ei, [
5141
- (x(), M(Ve((w = $.value) == null ? void 0 : w.component), Ee({
5140
+ t("div", Bi, [
5141
+ (b(), M(Ve((w = $.value) == null ? void 0 : w.component), Be({
5142
5142
  modelValue: e.value,
5143
5143
  "onUpdate:modelValue": u[1] || (u[1] = (o) => e.value = o)
5144
5144
  }, (s = $.value) == null ? void 0 : s.props), null, 16, ["modelValue"]))
@@ -5146,7 +5146,7 @@ const Ii = [
5146
5146
  ]);
5147
5147
  };
5148
5148
  }
5149
- }), Yi = {
5149
+ }), qi = {
5150
5150
  key: 0,
5151
5151
  class: "flex flex-col h-full w-full"
5152
5152
  }, zi = { class: "flex flex-col gap-16 pb-[24px]" }, Hi = { class: "flex flex-row justify-between items-center gap-2" }, Xi = { class: "flex flex-row gap-2 items-center" }, Qi = { class: "relative group cursor-pointer" }, Gi = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Ji = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Wi = { class: "w-[90%] flex flex-col gap-24" }, Zi = { class: "flex flex-col gap-16" }, er = { class: "fm-typo-en-title-sm-800" }, tr = { class: "flex flex-col max-w-[100%]" }, or = { class: "w-[25%] font-semibold" }, ar = { class: "flex-grow" }, lr = { class: "flex flex-col max-w-[100%]" }, nr = { class: "w-[25%] font-semibold" }, sr = { class: "flex flex-col max-w-[100%]" }, ir = { class: "w-[25%] font-semibold" }, rr = { class: "flex flex-col gap-16" }, dr = { class: "grid-cols-2 grid gap-16" }, mr = { class: "flex flex-row items-center justify-between gap-x-16" }, pr = { class: "flex flex-row items-center justify-between gap-x-16" }, cr = { class: "fm-typo-en-title-sm-800" }, ur = { class: "flex flex-row items-center justify-between gap-x-16" }, fr = { class: "flex flex-row items-center justify-between gap-x-16" }, vr = /* @__PURE__ */ Q({
@@ -5157,7 +5157,7 @@ const Ii = [
5157
5157
  },
5158
5158
  emits: ["update:modelValue"],
5159
5159
  setup(f) {
5160
- const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = q(
5160
+ const { t: a } = W(), e = J(f, "modelValue"), i = ve(), g = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: y } = fe(), h = Y(
5161
5161
  () => y.map((v) => ({ label: v.name, value: v.id }))
5162
5162
  );
5163
5163
  async function c() {
@@ -5167,8 +5167,8 @@ const Ii = [
5167
5167
  }) && await $(async () => {
5168
5168
  try {
5169
5169
  await Fe(e.value._id), await g.getSettings(), V.back();
5170
- } catch (b) {
5171
- i.open({ type: "error", message: b.message });
5170
+ } catch (x) {
5171
+ i.open({ type: "error", message: x.message });
5172
5172
  }
5173
5173
  });
5174
5174
  }
@@ -5181,17 +5181,17 @@ const Ii = [
5181
5181
  }
5182
5182
  });
5183
5183
  }
5184
- function A(v, b, w) {
5184
+ function A(v, x, w) {
5185
5185
  var o, n;
5186
5186
  if (!((o = e.value.platform) != null && o.mappings)) return;
5187
5187
  w || (v === "taxes" ? w = "invoice" : v === "suppliers" ? w = "inventory" : w = "invoice");
5188
5188
  const s = (n = e.value.platform.mappings[w]) == null ? void 0 : n[v];
5189
- s && Array.isArray(s) && (e.value.platform.mappings[w][v] = s.filter((k, D) => D !== b));
5189
+ s && Array.isArray(s) && (e.value.platform.mappings[w][v] = s.filter((k, D) => D !== x));
5190
5190
  }
5191
- function m(v, b) {
5191
+ function m(v, x) {
5192
5192
  var w;
5193
- (w = e.value.platform.mappings) != null && w[v] && (e.value.platform.mappings[v][b] = [
5194
- ...e.value.platform.mappings[v][b],
5193
+ (w = e.value.platform.mappings) != null && w[v] && (e.value.platform.mappings[v][x] = [
5194
+ ...e.value.platform.mappings[v][x],
5195
5195
  {
5196
5196
  key: "",
5197
5197
  account: ""
@@ -5215,13 +5215,13 @@ const Ii = [
5215
5215
  }
5216
5216
  return Se(async () => {
5217
5217
  await g.getSettings();
5218
- }), (v, b) => {
5219
- var D, I, O, z, B, H, X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe;
5218
+ }), (v, x) => {
5219
+ var D, I, O, z, E, H, X, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe;
5220
5220
  const w = K("FmIcon"), s = K("FmButton"), o = K("FmMenuDivider"), n = K("FmTextField"), k = K("FmSelect");
5221
- return (I = (D = e.value) == null ? void 0 : D.platform) != null && I.mappings ? (x(), P("div", Yi, [
5221
+ return (I = (D = e.value) == null ? void 0 : D.platform) != null && I.mappings ? (b(), R("div", qi, [
5222
5222
  t("div", zi, [
5223
5223
  t("div", Hi, [
5224
- b[17] || (b[17] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
5224
+ x[17] || (x[17] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
5225
5225
  t("div", Xi, [
5226
5226
  t("div", Qi, [
5227
5227
  l(w, {
@@ -5255,7 +5255,7 @@ const Ii = [
5255
5255
  t("div", ar, [
5256
5256
  l(n, {
5257
5257
  modelValue: e.value.name,
5258
- "onUpdate:modelValue": b[0] || (b[0] = (_) => e.value.name = _)
5258
+ "onUpdate:modelValue": x[0] || (x[0] = (_) => e.value.name = _)
5259
5259
  }, null, 8, ["modelValue"])
5260
5260
  ])
5261
5261
  ]),
@@ -5263,7 +5263,7 @@ const Ii = [
5263
5263
  t("div", nr, C(r(a)("report.integration.location")), 1),
5264
5264
  l(k, {
5265
5265
  modelValue: e.value.platform.locationIds,
5266
- "onUpdate:modelValue": b[1] || (b[1] = (_) => e.value.platform.locationIds = _),
5266
+ "onUpdate:modelValue": x[1] || (x[1] = (_) => e.value.platform.locationIds = _),
5267
5267
  multiselect: !0,
5268
5268
  items: h.value,
5269
5269
  placeholder: "Select location",
@@ -5272,12 +5272,12 @@ const Ii = [
5272
5272
  }, null, 8, ["modelValue", "items", "rules"])
5273
5273
  ]),
5274
5274
  l(o, { style: { margin: 0 } }),
5275
- b[18] || (b[18] = t("div", { class: "fm-typo-en-title-sm-800" }, "Sales Invoice", -1)),
5275
+ x[18] || (x[18] = t("div", { class: "fm-typo-en-title-sm-800" }, "Sales Invoice", -1)),
5276
5276
  t("div", sr, [
5277
5277
  t("div", ir, C(r(a)("report.integration.grouping.title")), 1),
5278
5278
  l(k, {
5279
5279
  modelValue: e.value.platform.grouping,
5280
- "onUpdate:modelValue": b[2] || (b[2] = (_) => e.value.platform.grouping = _),
5280
+ "onUpdate:modelValue": x[2] || (x[2] = (_) => e.value.platform.grouping = _),
5281
5281
  multiselect: !1,
5282
5282
  items: u,
5283
5283
  placeholder: "Select grouping",
@@ -5298,9 +5298,9 @@ const Ii = [
5298
5298
  code: { placeholder: "Code", editable: !0 },
5299
5299
  name: { placeholder: "Name", editable: !0 }
5300
5300
  },
5301
- "onUpdate:modelValue": b[3] || (b[3] = (_) => {
5302
- var N, p, R, S;
5303
- (S = (R = (p = (N = e.value) == null ? void 0 : N.platform) == null ? void 0 : p.mappings) == null ? void 0 : R.invoice) != null && S.debtor && (e.value.platform.mappings.invoice.debtor.name = _.name, e.value.platform.mappings.invoice.debtor.code = _.code);
5301
+ "onUpdate:modelValue": x[3] || (x[3] = (_) => {
5302
+ var N, p, P, S;
5303
+ (S = (P = (p = (N = e.value) == null ? void 0 : N.platform) == null ? void 0 : p.mappings) == null ? void 0 : P.invoice) != null && S.debtor && (e.value.platform.mappings.invoice.debtor.name = _.name, e.value.platform.mappings.invoice.debtor.code = _.code);
5304
5304
  })
5305
5305
  }, null, 8, ["model-value"]),
5306
5306
  t("div", dr, [
@@ -5315,12 +5315,12 @@ const Ii = [
5315
5315
  account: { placeholder: "Account code", editable: !0 },
5316
5316
  code: { placeholder: "Item code", editable: !0 }
5317
5317
  },
5318
- "onUpdate:modelValue": b[4] || (b[4] = (_) => {
5319
- var N, p, R, S;
5320
- (S = (R = (p = (N = e.value) == null ? void 0 : N.platform) == null ? void 0 : p.mappings) == null ? void 0 : R.invoice) != null && S.rounding && (e.value.platform.mappings.invoice.rounding.account = _.account, e.value.platform.mappings.invoice.rounding.code = _.code);
5318
+ "onUpdate:modelValue": x[4] || (x[4] = (_) => {
5319
+ var N, p, P, S;
5320
+ (S = (P = (p = (N = e.value) == null ? void 0 : N.platform) == null ? void 0 : p.mappings) == null ? void 0 : P.invoice) != null && S.rounding && (e.value.platform.mappings.invoice.rounding.account = _.account, e.value.platform.mappings.invoice.rounding.code = _.code);
5321
5321
  })
5322
5322
  }, null, 8, ["model-value"]),
5323
- (x(!0), P(xe, null, Ce((X = (H = (B = e.value) == null ? void 0 : B.platform) == null ? void 0 : H.mappings) == null ? void 0 : X.invoice.charges, (_, N) => (x(), M(L, {
5323
+ (b(!0), R(xe, null, Ce((X = (H = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : H.mappings) == null ? void 0 : X.invoice.charges, (_, N) => (b(), M(L, {
5324
5324
  key: `charge-${N}`,
5325
5325
  modelValue: e.value.platform.mappings.invoice.charges[N],
5326
5326
  "onUpdate:modelValue": (p) => e.value.platform.mappings.invoice.charges[N] = p,
@@ -5334,12 +5334,12 @@ const Ii = [
5334
5334
  ]),
5335
5335
  l(o, { style: { margin: 0 } }),
5336
5336
  t("div", mr, [
5337
- b[19] || (b[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Sales Invoice Items", -1)),
5337
+ x[19] || (x[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Sales Invoice Items", -1)),
5338
5338
  l(s, {
5339
5339
  variant: "secondary",
5340
5340
  "prepend-icon": "add",
5341
5341
  label: "Add items",
5342
- onClick: b[5] || (b[5] = () => m("invoice", "items"))
5342
+ onClick: x[5] || (x[5] = () => m("invoice", "items"))
5343
5343
  })
5344
5344
  ]),
5345
5345
  l(G, {
@@ -5353,9 +5353,9 @@ const Ii = [
5353
5353
  account: { placeholder: "Account code", editable: !0 },
5354
5354
  uom: { placeholder: "UOM", editable: !0 }
5355
5355
  },
5356
- onRemove: b[6] || (b[6] = (_, N) => {
5357
- var p, R, S, Y;
5358
- if (((Y = (S = (R = (p = e.value) == null ? void 0 : p.platform) == null ? void 0 : R.mappings) == null ? void 0 : S.invoice) == null ? void 0 : Y.items[N].key) === "DEFAULT") {
5356
+ onRemove: x[6] || (x[6] = (_, N) => {
5357
+ var p, P, S, q;
5358
+ if (((q = (S = (P = (p = e.value) == null ? void 0 : p.platform) == null ? void 0 : P.mappings) == null ? void 0 : S.invoice) == null ? void 0 : q.items[N].key) === "DEFAULT") {
5359
5359
  r(i).open({
5360
5360
  type: "error",
5361
5361
  message: "DEFAULT item cannot be removed."
@@ -5364,7 +5364,7 @@ const Ii = [
5364
5364
  }
5365
5365
  A("items", N);
5366
5366
  }),
5367
- "onUpdate:rows": b[7] || (b[7] = (_) => {
5367
+ "onUpdate:rows": x[7] || (x[7] = (_) => {
5368
5368
  var N, p;
5369
5369
  (p = (N = e.value) == null ? void 0 : N.platform) != null && p.mappings && (e.value.platform.mappings.invoice.items = _);
5370
5370
  })
@@ -5376,7 +5376,7 @@ const Ii = [
5376
5376
  variant: "secondary",
5377
5377
  "prepend-icon": "add",
5378
5378
  label: "Add taxes",
5379
- onClick: b[8] || (b[8] = () => m("invoice", "taxes"))
5379
+ onClick: x[8] || (x[8] = () => m("invoice", "taxes"))
5380
5380
  })
5381
5381
  ]),
5382
5382
  l(G, {
@@ -5389,22 +5389,22 @@ const Ii = [
5389
5389
  key: { placeholder: "Key", editable: !0 },
5390
5390
  code: { placeholder: "Account code", editable: !0 }
5391
5391
  },
5392
- onRemove: b[9] || (b[9] = (_, N) => {
5392
+ onRemove: x[9] || (x[9] = (_, N) => {
5393
5393
  A("taxes", N, "invoice");
5394
5394
  }),
5395
- "onUpdate:rows": b[10] || (b[10] = (_) => {
5395
+ "onUpdate:rows": x[10] || (x[10] = (_) => {
5396
5396
  var N, p;
5397
5397
  (p = (N = e.value) == null ? void 0 : N.platform) != null && p.mappings && (e.value.platform.mappings.invoice.taxes = _);
5398
5398
  })
5399
5399
  }, null, 8, ["rows"]),
5400
5400
  l(o, { style: { margin: 0 } }),
5401
5401
  t("div", ur, [
5402
- b[20] || (b[20] = t("div", { class: "fm-typo-en-title-sm-800" }, "Inventory Items", -1)),
5402
+ x[20] || (x[20] = t("div", { class: "fm-typo-en-title-sm-800" }, "Inventory Items", -1)),
5403
5403
  l(s, {
5404
5404
  variant: "secondary",
5405
5405
  "prepend-icon": "add",
5406
5406
  label: "Add items",
5407
- onClick: b[11] || (b[11] = () => m("inventory", "items"))
5407
+ onClick: x[11] || (x[11] = () => m("inventory", "items"))
5408
5408
  })
5409
5409
  ]),
5410
5410
  l(G, {
@@ -5418,9 +5418,9 @@ const Ii = [
5418
5418
  account: { placeholder: "Account code", editable: !0 },
5419
5419
  uom: { placeholder: "UOM", editable: !0 }
5420
5420
  },
5421
- onRemove: b[12] || (b[12] = (_, N) => {
5422
- var p, R, S, Y;
5423
- if (((Y = (S = (R = (p = e.value) == null ? void 0 : p.platform) == null ? void 0 : R.mappings) == null ? void 0 : S.inventory) == null ? void 0 : Y.items[N].key) === "DEFAULT") {
5421
+ onRemove: x[12] || (x[12] = (_, N) => {
5422
+ var p, P, S, q;
5423
+ if (((q = (S = (P = (p = e.value) == null ? void 0 : p.platform) == null ? void 0 : P.mappings) == null ? void 0 : S.inventory) == null ? void 0 : q.items[N].key) === "DEFAULT") {
5424
5424
  r(i).open({
5425
5425
  type: "error",
5426
5426
  message: "DEFAULT item cannot be removed."
@@ -5429,19 +5429,19 @@ const Ii = [
5429
5429
  }
5430
5430
  A("items", N, "inventory");
5431
5431
  }),
5432
- "onUpdate:rows": b[13] || (b[13] = (_) => {
5432
+ "onUpdate:rows": x[13] || (x[13] = (_) => {
5433
5433
  var N, p;
5434
5434
  (p = (N = e.value) == null ? void 0 : N.platform) != null && p.mappings && (e.value.platform.mappings.inventory.items = _);
5435
5435
  })
5436
5436
  }, null, 8, ["rows"]),
5437
5437
  l(o, { style: { margin: 0 } }),
5438
5438
  t("div", fr, [
5439
- b[21] || (b[21] = t("div", { class: "fm-typo-en-title-sm-800" }, "Supplier", -1)),
5439
+ x[21] || (x[21] = t("div", { class: "fm-typo-en-title-sm-800" }, "Supplier", -1)),
5440
5440
  l(s, {
5441
5441
  variant: "secondary",
5442
5442
  "prepend-icon": "add",
5443
5443
  label: "Add suppliers",
5444
- onClick: b[14] || (b[14] = () => m("inventory", "suppliers"))
5444
+ onClick: x[14] || (x[14] = () => m("inventory", "suppliers"))
5445
5445
  })
5446
5446
  ]),
5447
5447
  l(G, {
@@ -5455,10 +5455,10 @@ const Ii = [
5455
5455
  code: { placeholder: "Code", editable: !0 },
5456
5456
  name: { placeholder: "Name", editable: !0 }
5457
5457
  },
5458
- onRemove: b[15] || (b[15] = (_, N) => {
5458
+ onRemove: x[15] || (x[15] = (_, N) => {
5459
5459
  A("suppliers", N, "inventory");
5460
5460
  }),
5461
- "onUpdate:rows": b[16] || (b[16] = (_) => {
5461
+ "onUpdate:rows": x[16] || (x[16] = (_) => {
5462
5462
  var N, p;
5463
5463
  (p = (N = e.value) == null ? void 0 : N.platform) != null && p.mappings && (e.value.platform.mappings.inventory.suppliers = _);
5464
5464
  })
@@ -5482,7 +5482,12 @@ const Ii = [
5482
5482
  },
5483
5483
  emits: ["update:modelValue"],
5484
5484
  setup(f) {
5485
- const { t: a } = W(), e = E({ invoices: [], deliveryOrders: [], purchaseOrders: [] }), i = q(() => e.value.invoices.reduce((w, s) => {
5485
+ const { t: a } = W(), e = B({
5486
+ invoices: [],
5487
+ creditNotes: [],
5488
+ deliveryOrders: [],
5489
+ purchaseOrders: []
5490
+ }), i = Y(() => e.value.invoices.reduce((w, s) => {
5486
5491
  for (const o of s._items)
5487
5492
  w.push({
5488
5493
  rDate: Me(s.rDate).format("D-MMM-YY"),
@@ -5506,7 +5511,7 @@ const Ii = [
5506
5511
  accountCode: o.accountCode
5507
5512
  });
5508
5513
  return w;
5509
- }, [])), g = q(() => e.value.creditNotes.reduce((w, s) => {
5514
+ }, [])), g = Y(() => e.value.creditNotes.reduce((w, s) => {
5510
5515
  for (const o of s._items)
5511
5516
  w.push({
5512
5517
  rDate: Me(s.rDate).format("D-MMM-YY"),
@@ -5530,7 +5535,7 @@ const Ii = [
5530
5535
  accountCode: o.accountCode
5531
5536
  });
5532
5537
  return w;
5533
- }, [])), V = q(() => e.value.purchaseOrders.reduce((w, s) => {
5538
+ }, [])), V = Y(() => e.value.purchaseOrders.reduce((w, s) => {
5534
5539
  for (const o of s._skus)
5535
5540
  w.push({
5536
5541
  _date: Me(s._date).format("D-MMM-YY"),
@@ -5541,7 +5546,7 @@ const Ii = [
5541
5546
  unitPrice: o.unitPrice
5542
5547
  });
5543
5548
  return w;
5544
- }, [])), $ = q(() => e.value.deliveryOrders.reduce((w, s) => {
5549
+ }, [])), $ = Y(() => e.value.deliveryOrders.reduce((w, s) => {
5545
5550
  for (const o of s._skus)
5546
5551
  w.push({
5547
5552
  rNo: s.rNo,
@@ -5767,7 +5772,7 @@ const Ii = [
5767
5772
  header: () => F("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Account Code"),
5768
5773
  enableSorting: !1
5769
5774
  }
5770
- ], T = J(f, "modelValue"), A = E(!1), m = ve(), { dateRange: u } = Ie(fe());
5775
+ ], T = J(f, "modelValue"), A = B(!1), m = ve(), { dateRange: u } = Ie(fe());
5771
5776
  we(
5772
5777
  () => u.value,
5773
5778
  async () => {
@@ -5786,7 +5791,7 @@ const Ii = [
5786
5791
  );
5787
5792
  async function d() {
5788
5793
  try {
5789
- T.value._id ? (A.value = !0, await Oe(T.value._id)) : m.open({ message: "Invalid accounting setting", type: "error" });
5794
+ T.value._id ? (A.value = !0, await Oe(T.value._id, [x.value])) : m.open({ message: "Invalid accounting setting", type: "error" });
5790
5795
  } catch (w) {
5791
5796
  m.open({ message: w.message, type: "error" });
5792
5797
  } finally {
@@ -5796,26 +5801,30 @@ const Ii = [
5796
5801
  const v = [
5797
5802
  {
5798
5803
  label: "Sales Invoices",
5799
- value: "invoices"
5804
+ value: "INVOICE"
5805
+ /* INVOICE */
5800
5806
  },
5801
5807
  {
5802
5808
  label: "Credit Notes",
5803
- value: "creditNotes"
5809
+ value: "CREDIT_NOTE"
5810
+ /* CREDIT_NOTE */
5804
5811
  },
5805
5812
  {
5806
5813
  label: "Delivery Orders",
5807
- value: "deliveryOrders"
5814
+ value: "DELIVERY_ORDER"
5815
+ /* DELIVERY_ORDER */
5808
5816
  },
5809
5817
  {
5810
5818
  label: "Purchase Orders",
5811
- value: "purchaseOrders"
5819
+ value: "PURCHASE_ORDER"
5820
+ /* PURCHASE_ORDER */
5812
5821
  }
5813
- ], b = E(v[0].value);
5822
+ ], x = B(v[0].value);
5814
5823
  return (w, s) => {
5815
5824
  const o = K("FmButton"), n = K("FmCircularProgress"), k = K("FmTabs"), D = K("FmTable");
5816
- return x(), P("div", gr, [
5825
+ return b(), R("div", gr, [
5817
5826
  t("div", yr, [
5818
- l(Pe, {
5827
+ l(Re, {
5819
5828
  "date-range": r(u),
5820
5829
  "onUpdate:dateRange": s[0] || (s[0] = (I) => $e(u) ? u.value = I : null),
5821
5830
  compare: !1
@@ -5827,32 +5836,32 @@ const Ii = [
5827
5836
  onClick: d
5828
5837
  }, null, 8, ["loading", "label"])
5829
5838
  ]),
5830
- A.value ? (x(), P("div", xr, [
5839
+ A.value ? (b(), R("div", xr, [
5831
5840
  l(n, { size: "xl" }),
5832
5841
  t("span", br, C(r(a)("report.common.isLoading")), 1)
5833
- ])) : (x(), P("div", wr, [
5842
+ ])) : (b(), R("div", wr, [
5834
5843
  l(k, {
5835
- "model-value": b.value,
5836
- "onUpdate:modelValue": s[1] || (s[1] = (I) => b.value = I),
5844
+ "model-value": x.value,
5845
+ "onUpdate:modelValue": s[1] || (s[1] = (I) => x.value = I),
5837
5846
  items: v
5838
5847
  }, null, 8, ["model-value"]),
5839
- b.value === "invoices" ? (x(), M(D, {
5848
+ x.value === "INVOICE" ? (b(), M(D, {
5840
5849
  key: 0,
5841
5850
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
5842
5851
  "row-data": i.value,
5843
5852
  "column-defs": U
5844
5853
  }, null, 8, ["row-data"])) : j("", !0),
5845
- b.value === "creditNotes" ? (x(), M(D, {
5854
+ x.value === "CREDIT_NOTE" ? (b(), M(D, {
5846
5855
  key: 1,
5847
5856
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
5848
5857
  "row-data": g.value,
5849
5858
  "column-defs": y
5850
- }, null, 8, ["row-data"])) : b.value === "deliveryOrders" ? (x(), M(D, {
5859
+ }, null, 8, ["row-data"])) : x.value === "DELIVERY_ORDER" ? (b(), M(D, {
5851
5860
  key: 2,
5852
5861
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
5853
5862
  "row-data": $.value,
5854
5863
  "column-defs": c
5855
- }, null, 8, ["row-data"])) : b.value === "purchaseOrders" ? (x(), M(D, {
5864
+ }, null, 8, ["row-data"])) : x.value === "PURCHASE_ORDER" ? (b(), M(D, {
5856
5865
  key: 3,
5857
5866
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
5858
5867
  "row-data": V.value,
@@ -5870,7 +5879,7 @@ const Ii = [
5870
5879
  },
5871
5880
  emits: ["update:modelValue"],
5872
5881
  setup(f) {
5873
- const { t: a } = W(), e = J(f, "modelValue"), i = E("setting"), g = [
5882
+ const { t: a } = W(), e = J(f, "modelValue"), i = B("setting"), g = [
5874
5883
  {
5875
5884
  label: a("report.integration.setting"),
5876
5885
  value: "setting",
@@ -5881,7 +5890,7 @@ const Ii = [
5881
5890
  value: "preview",
5882
5891
  icon: "table"
5883
5892
  }
5884
- ], V = ue(), $ = q(() => {
5893
+ ], V = ue(), $ = Y(() => {
5885
5894
  switch (i.value) {
5886
5895
  case "preview":
5887
5896
  return _r;
@@ -5894,7 +5903,7 @@ const Ii = [
5894
5903
  return (U, y) => {
5895
5904
  var T;
5896
5905
  const h = K("FmPageHead"), c = K("FmTabs");
5897
- return x(), P("div", hr, [
5906
+ return b(), R("div", hr, [
5898
5907
  l(h, {
5899
5908
  title: ((T = e.value) == null ? void 0 : T.name) || "Synergy",
5900
5909
  "back-button": !0,
@@ -5912,7 +5921,7 @@ const Ii = [
5912
5921
  items: g
5913
5922
  }, null, 8, ["model-value"]),
5914
5923
  t("div", kr, [
5915
- (x(), M(Ve($.value), {
5924
+ (b(), M(Ve($.value), {
5916
5925
  modelValue: e.value,
5917
5926
  "onUpdate:modelValue": y[1] || (y[1] = (A) => e.value = A)
5918
5927
  }, null, 8, ["modelValue"]))
@@ -5923,8 +5932,8 @@ const Ii = [
5923
5932
  }), $r = { class: "px-24 h-full relative" }, Nr = /* @__PURE__ */ Q({
5924
5933
  __name: "Integration",
5925
5934
  setup(f) {
5926
- const a = E(void 0), { params: e } = et(), i = ke(), g = E();
5927
- qe(async () => {
5935
+ const a = B(void 0), { params: e } = et(), i = ke(), g = B();
5936
+ Ye(async () => {
5928
5937
  i.settings.length === 0 && await i.getSettings();
5929
5938
  }), we(
5930
5939
  () => i.settings,
@@ -5935,7 +5944,7 @@ const Ii = [
5935
5944
  },
5936
5945
  { immediate: !0 }
5937
5946
  );
5938
- const V = q(() => {
5947
+ const V = Y(() => {
5939
5948
  switch (a.value) {
5940
5949
  case ge.Xero:
5941
5950
  return bo;
@@ -5944,21 +5953,21 @@ const Ii = [
5944
5953
  case ge.AutoCount:
5945
5954
  return ol;
5946
5955
  case ge.SQL:
5947
- return El;
5956
+ return Bl;
5948
5957
  case ge.iFlexi_HRMS:
5949
5958
  return Vs;
5950
5959
  case ge.Biztory:
5951
5960
  return es;
5952
5961
  case ge.AutoCountCloud:
5953
- return qi;
5962
+ return Yi;
5954
5963
  case ge.SynergyExport:
5955
5964
  return Cr;
5956
5965
  default:
5957
5966
  return null;
5958
5967
  }
5959
5968
  });
5960
- return ($, U) => (x(), P("div", $r, [
5961
- (x(), M(Ve(V.value), {
5969
+ return ($, U) => (b(), R("div", $r, [
5970
+ (b(), M(Ve(V.value), {
5962
5971
  modelValue: g.value,
5963
5972
  "onUpdate:modelValue": U[0] || (U[0] = (y) => g.value = y)
5964
5973
  }, null, 8, ["modelValue"]))