@feedmepos/mf-report 5.5.7-beta.0 → 5.5.8-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.
@@ -1,12 +1,12 @@
1
- import { defineComponent as q, mergeModels as ye, useModel as X, computed as Y, resolveComponent as S, createElementBlock as F, openBlock as c, createElementVNode as t, createCommentVNode as N, normalizeClass as Ke, Fragment as L, renderList as H, createBlock as M, createVNode as r, withCtx as ge, toDisplayString as T, unref as p, ref as B, watch as ve, isRef as be, h as I, resolveDynamicComponent as xe, mergeProps as Le, onMounted as Ee } from "vue";
2
- import { useRouter as de, useRoute as ze } from "vue-router";
3
- import { u as J, I as ce, d as je, e as _e, f as we, b as pe, q as Ye, m as qe, p as he, r as Ve, s as ke, t as $e, v as Ae, w as He, x as Xe, y as Qe, A as fe, z as Pe, B as Ge, E as Je } from "./global-loader-BqFQzk46.js";
4
- import { u as Se } from "./message-dialog-UoMWOnil.js";
1
+ import { defineComponent as q, mergeModels as ye, useModel as X, computed as Y, resolveComponent as S, createElementBlock as F, openBlock as c, createElementVNode as t, createCommentVNode as N, normalizeClass as Ae, Fragment as L, renderList as H, createBlock as M, createVNode as r, withCtx as ge, toDisplayString as T, unref as p, ref as B, onUnmounted as be, watch as ve, isRef as we, h as I, resolveDynamicComponent as xe, mergeProps as Ee, onMounted as ze } from "vue";
2
+ import { useRouter as de, useRoute as Ye } from "vue-router";
3
+ import { u as J, I as ce, d as Le, e as _e, f as he, b as pe, q as qe, m as He, p as Ve, r as ke, s as $e, t as Se, v as Pe, w as Xe, x as Qe, y as Ge, A as fe, z as Ne, B as Je, E as We } from "./global-loader-BqFQzk46.js";
4
+ import { u as Ce } from "./message-dialog-UoMWOnil.js";
5
5
  import { useSnackbar as ue } from "@feedmepos/ui-library";
6
- import { s as We } from "./index-DqqTHE7n.js";
7
- import { storeToRefs as Ce } from "pinia";
8
- import { _ as Fe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-CN3UKRaQ.js";
9
- const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, et = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, tt = {
6
+ import { s as Ze } from "./index-DqqTHE7n.js";
7
+ import { storeToRefs as Fe } from "pinia";
8
+ import { _ as De } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-CN3UKRaQ.js";
9
+ const et = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, tt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, ot = {
10
10
  key: 0,
11
11
  class: "w-[24px] flex items-center"
12
12
  }, K = /* @__PURE__ */ q({
@@ -46,9 +46,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
46
46
  ), h = o;
47
47
  return (_, C) => {
48
48
  const b = S("FmTextField"), x = S("FmTooltip"), m = S("FmIcon");
49
- return c(), F("div", Ze, [
49
+ return c(), F("div", et, [
50
50
  t("div", {
51
- class: Ke(`${f.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
51
+ class: Ae(`${f.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
52
52
  }, [
53
53
  (c(!0), F(L, null, H(V.value, (w) => {
54
54
  var k;
@@ -57,7 +57,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
57
57
  }, [
58
58
  w.editable ? (c(), F("div", {
59
59
  key: 0,
60
- class: Ke(`${f.removable ? "w-[50%]" : "w-[100%]"}`)
60
+ class: Ae(`${f.removable ? "w-[50%]" : "w-[100%]"}`)
61
61
  }, [
62
62
  r(b, {
63
63
  "model-value": e.value[w.key],
@@ -78,14 +78,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
78
78
  class: "w-[50%]"
79
79
  }, {
80
80
  default: ge(() => [
81
- t("div", et, T(e.value[w.key]), 1)
81
+ t("div", tt, T(e.value[w.key]), 1)
82
82
  ]),
83
83
  _: 2
84
84
  }, 1032, ["content"]))
85
85
  ], 64);
86
86
  }), 128))
87
87
  ], 2),
88
- f.removable ? (c(), F("div", tt, [
88
+ f.removable ? (c(), F("div", ot, [
89
89
  r(m, {
90
90
  color: "system-error-300",
91
91
  class: "cursor-pointer",
@@ -97,13 +97,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
97
97
  ]);
98
98
  };
99
99
  }
100
- }), ot = { class: "flex flex-col" }, at = { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, lt = {
100
+ }), at = { class: "flex flex-col" }, lt = { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, nt = {
101
101
  key: 0,
102
102
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
103
- }, nt = { class: "flex flex-row items-center w-[100%] justify-start" }, st = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, it = {
103
+ }, st = { class: "flex flex-row items-center w-[100%] justify-start" }, it = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, rt = {
104
104
  key: 0,
105
105
  class: "flex flex-row items-center w-[100%] justify-start"
106
- }, rt = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, mt = { class: "w-[calc(75%+4px)]" }, ct = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, dt = { class: "flex flex-row items-center w-[100%] justify-between" }, pt = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis" }, ut = { class: "w-[50%]" }, De = /* @__PURE__ */ q({
106
+ }, mt = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ct = { class: "w-[calc(75%+4px)]" }, dt = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, pt = { class: "flex flex-row items-center w-[100%] justify-between" }, ut = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis" }, ft = { class: "w-[50%]" }, Ue = /* @__PURE__ */ q({
107
107
  __name: "UploadSection",
108
108
  props: /* @__PURE__ */ ye({
109
109
  label: {
@@ -134,21 +134,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
134
134
  var x, m;
135
135
  const _ = S("FmSwitch"), C = S("FmTextField"), b = S("FmTimePicker");
136
136
  return c(), F(L, null, [
137
- t("div", ot, [
138
- t("div", at, T(p(o)("report.integration.auto", { label: f.label })), 1),
139
- f.label == "upload" ? (c(), F("div", lt, T(p(o)("report.integration.lastUploadDate")) + ": " + T(f.lastUploadDate ? p(je)(f.lastUploadDate).format("MMMM D, YYYY h:mm A") : p(o)("report.integration.noData.title")), 1)) : N("", !0)
137
+ t("div", at, [
138
+ t("div", lt, T(p(o)("report.integration.auto", { label: f.label })), 1),
139
+ f.label == "upload" ? (c(), F("div", nt, T(p(o)("report.integration.lastUploadDate")) + ": " + T(f.lastUploadDate ? p(Le)(f.lastUploadDate).format("MMMM D, YYYY h:mm A") : p(o)("report.integration.noData.title")), 1)) : N("", !0)
140
140
  ]),
141
- t("div", nt, [
142
- t("div", st, T(p(o)("report.common.enable")), 1),
141
+ t("div", st, [
142
+ t("div", it, T(p(o)("report.common.enable")), 1),
143
143
  r(_, {
144
144
  modelValue: e.value.enable,
145
145
  "onUpdate:modelValue": h[0] || (h[0] = (w) => e.value.enable = w),
146
146
  style: { gap: "0px" }
147
147
  }, null, 8, ["modelValue"])
148
148
  ]),
149
- s.value ? (c(), F("div", it, [
150
- t("div", rt, T(p(o)("report.common.email")), 1),
151
- t("div", mt, [
149
+ s.value ? (c(), F("div", rt, [
150
+ t("div", mt, T(p(o)("report.common.email")), 1),
151
+ t("div", ct, [
152
152
  r(C, {
153
153
  "model-value": (e.value.emails || []).join(","),
154
154
  placeholder: "Email",
@@ -164,13 +164,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
164
164
  }, null, 8, ["model-value"])
165
165
  ])
166
166
  ])) : N("", !0),
167
- t("div", ct, [
168
- t("div", dt, [
169
- t("div", pt, T(p(We)(f.label)) + " time ", 1),
170
- t("div", ut, [
167
+ t("div", dt, [
168
+ t("div", pt, [
169
+ t("div", ut, T(p(Ze)(f.label)) + " time ", 1),
170
+ t("div", ft, [
171
171
  r(b, {
172
172
  class: "gap-[0px]",
173
- "model-value": p(je)().hour(((x = e.value.triggerTime) == null ? void 0 : x.hour) ?? 0).minute(((m = e.value.triggerTime) == null ? void 0 : m.minute) ?? 0).format("HH:mm"),
173
+ "model-value": p(Le)().hour(((x = e.value.triggerTime) == null ? void 0 : x.hour) ?? 0).minute(((m = e.value.triggerTime) == null ? void 0 : m.minute) ?? 0).format("HH:mm"),
174
174
  "onUpdate:modelValue": h[2] || (h[2] = (w) => {
175
175
  w && (e.value.triggerTime.hour = Number(w.split(":")[0]), e.value.triggerTime.minute = Number(w.split(":")[1]));
176
176
  })
@@ -196,13 +196,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
196
196
  ], 64);
197
197
  };
198
198
  }
199
- }), ft = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, vt = {
199
+ }), vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, gt = {
200
200
  key: 0,
201
201
  class: "w-[50%]"
202
- }, gt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, yt = {
202
+ }, yt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, xt = {
203
203
  key: 0,
204
204
  class: "w-[24px] flex items-center"
205
- }, Me = /* @__PURE__ */ q({
205
+ }, Ke = /* @__PURE__ */ q({
206
206
  __name: "MappingDropdown",
207
207
  props: /* @__PURE__ */ ye({
208
208
  removable: {
@@ -252,14 +252,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
252
252
  }, C = (x) => s.singleValueMode ? e.value : e.value[x.key], b = o;
253
253
  return (x, m) => {
254
254
  const w = S("FmSelect"), k = S("FmTextField"), d = S("FmTooltip"), y = S("FmIcon");
255
- return c(), F("div", ft, [
255
+ return c(), F("div", vt, [
256
256
  t("div", {
257
- class: Ke(`${f.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
257
+ class: Ae(`${f.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
258
258
  }, [
259
259
  (c(!0), F(L, null, H(V.value, (n) => (c(), F(L, {
260
260
  key: n.key
261
261
  }, [
262
- n.editable ? (c(), F("div", vt, [
262
+ n.editable ? (c(), F("div", gt, [
263
263
  n.dropdownOptions ? (c(), M(w, {
264
264
  key: 0,
265
265
  "model-value": C(n),
@@ -281,13 +281,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
281
281
  class: "w-[50%]"
282
282
  }, {
283
283
  default: ge(() => [
284
- t("div", gt, T(_(n)), 1)
284
+ t("div", yt, T(_(n)), 1)
285
285
  ]),
286
286
  _: 2
287
287
  }, 1032, ["content"]))
288
288
  ], 64))), 128))
289
289
  ], 2),
290
- f.removable ? (c(), F("div", yt, [
290
+ f.removable ? (c(), F("div", xt, [
291
291
  r(y, {
292
292
  color: "system-error-300",
293
293
  class: "cursor-pointer",
@@ -299,28 +299,28 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
299
299
  ]);
300
300
  };
301
301
  }
302
- }), xt = {
302
+ }), _t = {
303
303
  key: 0,
304
304
  class: "flex flex-col h-full"
305
- }, _t = { class: "flex flex-col gap-[16px] pb-[24px]" }, bt = { class: "flex flex-row justify-between items-center gap-2" }, wt = { class: "flex flex-row gap-2 items-center" }, ht = { class: "relative group cursor-pointer" }, Vt = { class: "flex flex-col gap-16 pt-[24px] overflow-scroll" }, kt = { class: "flex flex-row items-center justify-between gap-2" }, $t = { class: "w-[25%]" }, St = { class: "flex flex-col gap-[16px]" }, Ct = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Ft = { class: "flex-grow" }, Dt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Ut = { class: "flex flex-col gap-[16px]" }, Tt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, It = { class: "flex-grow" }, Mt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Kt = { class: "flex-grow" }, At = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Pt = { class: "flex-grow" }, Nt = { class: "flex flex-row items-center gap-x-16" }, Rt = {
305
+ }, bt = { class: "flex flex-col gap-[16px] pb-[24px]" }, wt = { class: "flex flex-row justify-between items-center gap-2" }, ht = { class: "flex flex-row gap-2 items-center" }, Vt = { class: "relative group cursor-pointer" }, kt = { class: "flex flex-col gap-16 pt-[24px] overflow-scroll" }, $t = { class: "flex flex-row items-center justify-between gap-2" }, St = { class: "w-[25%]" }, Ct = { class: "flex flex-col gap-[16px]" }, Ft = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Dt = { class: "flex-grow" }, Ut = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Tt = { class: "flex flex-col gap-[16px]" }, It = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Mt = { class: "flex-grow" }, Kt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, At = { class: "flex-grow" }, Pt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Nt = { class: "flex-grow" }, Rt = { class: "flex flex-row items-center gap-x-16" }, Ot = {
306
306
  key: 0,
307
307
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
308
- }, Ot = {
308
+ }, Bt = {
309
309
  key: 2,
310
310
  class: "xs:grid-cols-1 grid-cols-2 grid gap-16"
311
- }, Bt = { class: "flex flex-row items-center gap-x-16" }, jt = {
311
+ }, jt = { class: "flex flex-row items-center gap-x-16" }, Lt = {
312
312
  key: 3,
313
313
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
314
- }, Lt = {
314
+ }, Et = {
315
315
  key: 5,
316
316
  class: "xs:grid-cols-1 grid-cols-2 grid gap-16"
317
- }, Et = { class: "flex flex-row items-center gap-x-16" }, zt = {
317
+ }, zt = { class: "flex flex-row items-center gap-x-16" }, Yt = {
318
318
  key: 6,
319
319
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
320
- }, Yt = {
320
+ }, qt = {
321
321
  key: 8,
322
322
  class: "xs:grid-cols-1 grid-cols-2 grid gap-16"
323
- }, qt = /* @__PURE__ */ q({
323
+ }, Ht = /* @__PURE__ */ q({
324
324
  __name: "Setting",
325
325
  props: /* @__PURE__ */ ye({
326
326
  tenantOptions: {
@@ -341,7 +341,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
341
341
  }),
342
342
  emits: ["update:modelValue"],
343
343
  setup(f) {
344
- const { t: o } = J(), e = X(f, "modelValue"), s = ue(), V = _e(), h = de(), { promptLoader: _ } = we(), { promptMessage: C } = Se(), { restaurants: b } = pe(), x = B(!1), m = Y(
344
+ const { t: o } = J(), e = X(f, "modelValue"), s = ue(), V = _e(), h = de(), { promptLoader: _ } = he(), { promptMessage: C } = Ce(), { restaurants: b } = pe(), x = B(!1), m = Y(
345
345
  () => b.map((u) => ({ label: u.name, value: u.id }))
346
346
  ), w = Y(() => {
347
347
  var u, i;
@@ -355,10 +355,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
355
355
  await C({
356
356
  message: o("report.integration.xero.confirmDisconnect", { name: e.value.name }),
357
357
  title: o("report.integration.xero.disconnectTitle")
358
- }) && (await Ye(e.value._id), await V.getSettings());
358
+ }) && (await qe(e.value._id), await V.getSettings());
359
359
  else if (e.value._id)
360
360
  try {
361
- const i = await qe(e.value._id);
361
+ const i = await He(e.value._id);
362
362
  x.value = !0;
363
363
  const A = setInterval(async () => {
364
364
  var P;
@@ -382,7 +382,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
382
382
  title: "Delete"
383
383
  }) && await _(async () => {
384
384
  try {
385
- await he(e.value._id), await V.getSettings(), h.back();
385
+ await Ve(e.value._id), await V.getSettings(), h.back();
386
386
  } catch (i) {
387
387
  s.open({ type: "error", message: i.message });
388
388
  }
@@ -391,7 +391,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
391
391
  async function n() {
392
392
  await _(async () => {
393
393
  try {
394
- await Ve(e.value._id, e.value), await V.getSettings();
394
+ await ke(e.value._id, e.value), await V.getSettings();
395
395
  } catch (u) {
396
396
  s.open({ type: "error", message: u.message });
397
397
  }
@@ -430,21 +430,23 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
430
430
  async function a() {
431
431
  await _(async () => {
432
432
  try {
433
- await ke(e.value._id), await V.getSettings();
433
+ await $e(e.value._id), await V.getSettings();
434
434
  } catch (u) {
435
435
  s.open({ type: "error", message: u.message });
436
436
  }
437
437
  });
438
438
  }
439
- return (u, i) => {
440
- var z, W, Z, ee, te, oe, ae, le, ne, se, D, g, U, O, me, Ue, Te, Ne, Re, Oe, Be;
439
+ return be(async () => {
440
+ await V.getSettings();
441
+ }), (u, i) => {
442
+ var z, W, Z, ee, te, oe, ae, le, ne, se, D, g, U, O, me, Te, Ie, Re, Oe, Be, je;
441
443
  const A = S("FmIcon"), P = S("FmButton"), Q = S("FmMenuDivider"), E = S("FmCircularProgress"), G = S("FmSelect"), R = S("FmTextField"), j = S("FmSwitch");
442
- return (W = (z = e.value) == null ? void 0 : z.platform) != null && W.mappings ? (c(), F("div", xt, [
443
- t("div", _t, [
444
- t("div", bt, [
444
+ return (W = (z = e.value) == null ? void 0 : z.platform) != null && W.mappings ? (c(), F("div", _t, [
445
+ t("div", bt, [
446
+ t("div", wt, [
445
447
  i[10] || (i[10] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
446
- t("div", wt, [
447
- t("div", ht, [
448
+ t("div", ht, [
449
+ t("div", Vt, [
448
450
  r(A, {
449
451
  name: "refresh",
450
452
  class: "p-2 bg-gray-100 rounded-full",
@@ -466,10 +468,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
466
468
  ])
467
469
  ]),
468
470
  r(Q, { style: { margin: 0 } }),
469
- t("div", Vt, [
471
+ t("div", kt, [
470
472
  i[21] || (i[21] = 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)),
471
- t("div", kt, [
472
- t("div", $t, [
473
+ t("div", $t, [
474
+ t("div", St, [
473
475
  r(P, {
474
476
  disabled: x.value,
475
477
  variant: "primary",
@@ -489,18 +491,18 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
489
491
  "onUpdate:modelValue": v
490
492
  }, null, 8, ["items", "model-value", "placeholder"])
491
493
  ]),
492
- t("div", St, [
494
+ t("div", Ct, [
493
495
  i[13] || (i[13] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "General", -1)),
494
- t("div", Ct, [
496
+ t("div", Ft, [
495
497
  i[11] || (i[11] = t("div", { class: "w-[25%]" }, "Name", -1)),
496
- t("div", Ft, [
498
+ t("div", Dt, [
497
499
  r(R, {
498
500
  modelValue: e.value.name,
499
501
  "onUpdate:modelValue": i[0] || (i[0] = (ie) => e.value.name = ie)
500
502
  }, null, 8, ["modelValue"])
501
503
  ])
502
504
  ]),
503
- t("div", Dt, [
505
+ t("div", Ut, [
504
506
  i[12] || (i[12] = t("div", { class: "w-[25%]" }, "Location", -1)),
505
507
  r(G, {
506
508
  modelValue: e.value.platform.locationIds,
@@ -512,17 +514,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
512
514
  }, null, 8, ["modelValue", "items"])
513
515
  ])
514
516
  ]),
515
- r(De, {
517
+ r(Ue, {
516
518
  modelValue: e.value.platform,
517
519
  "onUpdate:modelValue": i[2] || (i[2] = (ie) => e.value.platform = ie),
518
520
  label: "upload",
519
521
  "last-upload-date": (oe = e.value.platform) == null ? void 0 : oe.lastUploadDate
520
522
  }, null, 8, ["modelValue", "last-upload-date"]),
521
- t("div", Ut, [
523
+ t("div", Tt, [
522
524
  i[20] || (i[20] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "Mapping", -1)),
523
- t("div", Tt, [
525
+ t("div", It, [
524
526
  i[14] || (i[14] = t("div", { class: "w-[25%]" }, "Contact", -1)),
525
- t("div", It, [
527
+ t("div", Mt, [
526
528
  r(R, {
527
529
  modelValue: e.value.platform.mappings.contact.xeroAccount,
528
530
  "onUpdate:modelValue": i[3] || (i[3] = (ie) => e.value.platform.mappings.contact.xeroAccount = ie),
@@ -530,9 +532,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
530
532
  }, null, 8, ["modelValue"])
531
533
  ])
532
534
  ]),
533
- t("div", Mt, [
535
+ t("div", Kt, [
534
536
  i[15] || (i[15] = t("div", { class: "w-[25%]" }, "Discount as Item", -1)),
535
- t("div", Kt, [
537
+ t("div", At, [
536
538
  r(j, {
537
539
  "model-value": e.value.platform.discountItem ?? !1,
538
540
  style: { gap: 0 },
@@ -542,9 +544,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
542
544
  }, null, 8, ["model-value"])
543
545
  ])
544
546
  ]),
545
- t("div", At, [
547
+ t("div", Pt, [
546
548
  i[16] || (i[16] = t("div", { class: "w-[25%]" }, "Combine Refund", -1)),
547
- t("div", Pt, [
549
+ t("div", Nt, [
548
550
  r(j, {
549
551
  "model-value": e.value.platform.mappings.isCombineRefund ?? !1,
550
552
  style: { gap: 0 },
@@ -554,7 +556,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
554
556
  }, null, 8, ["model-value"])
555
557
  ])
556
558
  ]),
557
- t("div", Nt, [
559
+ t("div", Rt, [
558
560
  i[17] || (i[17] = t("div", { class: "fm-typo-en-title-sm-800" }, "Taxes", -1)),
559
561
  r(P, {
560
562
  variant: "primary",
@@ -562,16 +564,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
562
564
  onClick: i[6] || (i[6] = () => l("taxes"))
563
565
  })
564
566
  ]),
565
- f.taxOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", Rt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
567
+ f.taxOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", Ot, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
566
568
  !f.taxOptions.isLoaded && ((ae = e.value.platform) != null && ae.accessToken) ? (c(), M(E, {
567
569
  key: 1,
568
570
  size: "xl"
569
571
  })) : N("", !0),
570
- ((le = f.taxOptions.data) == null ? void 0 : le.length) > 0 ? (c(), F("div", Ot, [
571
- (c(!0), F(L, null, H((D = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.taxes, (ie, re) => (c(), M(Me, {
572
+ ((le = f.taxOptions.data) == null ? void 0 : le.length) > 0 ? (c(), F("div", Bt, [
573
+ (c(!0), F(L, null, H((D = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.taxes, (ie, re) => (c(), M(Ke, {
572
574
  key: `tax-${re}`,
573
575
  modelValue: e.value.platform.mappings.taxes[re],
574
- "onUpdate:modelValue": (Ie) => e.value.platform.mappings.taxes[re] = Ie,
576
+ "onUpdate:modelValue": (Me) => e.value.platform.mappings.taxes[re] = Me,
575
577
  options: {
576
578
  feedmeKey: { placeholder: "Feedme Key", editable: !0 },
577
579
  xeroAccount: {
@@ -584,7 +586,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
584
586
  onRemove: () => $("taxes", re)
585
587
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
586
588
  ])) : N("", !0),
587
- t("div", Bt, [
589
+ t("div", jt, [
588
590
  i[18] || (i[18] = t("div", { class: "fm-typo-en-title-sm-800" }, "Items", -1)),
589
591
  r(P, {
590
592
  variant: "primary",
@@ -592,16 +594,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
592
594
  onClick: i[7] || (i[7] = () => l("items"))
593
595
  })
594
596
  ]),
595
- f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", jt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
597
+ f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", Lt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
596
598
  !f.accountCodeOptions.isLoaded && ((g = e.value.platform) != null && g.accessToken) ? (c(), M(E, {
597
599
  key: 4,
598
600
  size: "xl"
599
601
  })) : N("", !0),
600
- ((U = f.accountCodeOptions.data) == null ? void 0 : U.length) > 0 ? (c(), F("div", Lt, [
601
- (c(!0), F(L, null, H((Ue = (me = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : me.mappings) == null ? void 0 : Ue.items, (ie, re) => (c(), M(Me, {
602
+ ((U = f.accountCodeOptions.data) == null ? void 0 : U.length) > 0 ? (c(), F("div", Et, [
603
+ (c(!0), F(L, null, H((Te = (me = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : me.mappings) == null ? void 0 : Te.items, (ie, re) => (c(), M(Ke, {
602
604
  key: `item-${re}`,
603
605
  modelValue: e.value.platform.mappings.items[re],
604
- "onUpdate:modelValue": (Ie) => e.value.platform.mappings.items[re] = Ie,
606
+ "onUpdate:modelValue": (Me) => e.value.platform.mappings.items[re] = Me,
605
607
  options: {
606
608
  feedmeKey: { placeholder: "Feedme Key", editable: !0 },
607
609
  xeroAccount: {
@@ -614,7 +616,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
614
616
  onRemove: () => $("items", re)
615
617
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
616
618
  ])) : N("", !0),
617
- t("div", Et, [
619
+ t("div", zt, [
618
620
  i[19] || (i[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Payments", -1)),
619
621
  r(P, {
620
622
  variant: "primary",
@@ -622,16 +624,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
622
624
  onClick: i[8] || (i[8] = () => l("payments"))
623
625
  })
624
626
  ]),
625
- f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", zt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
626
- !f.accountCodeOptions.isLoaded && ((Te = e.value.platform) != null && Te.accessToken) ? (c(), M(E, {
627
+ f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", Yt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
628
+ !f.accountCodeOptions.isLoaded && ((Ie = e.value.platform) != null && Ie.accessToken) ? (c(), M(E, {
627
629
  key: 7,
628
630
  size: "xl"
629
631
  })) : N("", !0),
630
- ((Ne = f.accountCodeOptions.data) == null ? void 0 : Ne.length) > 0 ? (c(), F("div", Yt, [
631
- (c(!0), F(L, null, H((Be = (Oe = (Re = e.value) == null ? void 0 : Re.platform) == null ? void 0 : Oe.mappings) == null ? void 0 : Be.payments, (ie, re) => (c(), M(Me, {
632
+ ((Re = f.accountCodeOptions.data) == null ? void 0 : Re.length) > 0 ? (c(), F("div", qt, [
633
+ (c(!0), F(L, null, H((je = (Be = (Oe = e.value) == null ? void 0 : Oe.platform) == null ? void 0 : Be.mappings) == null ? void 0 : je.payments, (ie, re) => (c(), M(Ke, {
632
634
  key: `payment-${re}`,
633
635
  modelValue: e.value.platform.mappings.payments[re],
634
- "onUpdate:modelValue": (Ie) => e.value.platform.mappings.payments[re] = Ie,
636
+ "onUpdate:modelValue": (Me) => e.value.platform.mappings.payments[re] = Me,
635
637
  options: {
636
638
  feedmeKey: { placeholder: "Feedme Key", editable: !0 },
637
639
  xeroAccount: {
@@ -649,10 +651,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
649
651
  ])) : N("", !0);
650
652
  };
651
653
  }
652
- }), Ht = { class: "h-full flex flex-col gap-16" }, Xt = { class: "flex flex-row gap-2 justify-between items-center" }, Qt = {
654
+ }), Xt = { class: "h-full flex flex-col gap-16" }, Qt = { class: "flex flex-row gap-2 justify-between items-center" }, Gt = {
653
655
  key: 0,
654
656
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
655
- }, Gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jt = /* @__PURE__ */ q({
657
+ }, Jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wt = /* @__PURE__ */ q({
656
658
  __name: "Preview",
657
659
  props: {
658
660
  modelValue: { required: !0 },
@@ -767,13 +769,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
767
769
  header: "Payment Amount",
768
770
  enableSorting: !1
769
771
  }
770
- ], h = X(f, "modelValue"), _ = B(!1), C = ue(), { dateRange: b } = Ce(pe());
772
+ ], h = X(f, "modelValue"), _ = B(!1), C = ue(), { dateRange: b } = Fe(pe());
771
773
  ve(
772
774
  () => b.value,
773
775
  async () => {
774
776
  if (h.value._id)
775
777
  try {
776
- _.value = !0, o.value = await $e(h.value._id);
778
+ _.value = !0, o.value = await Se(h.value._id);
777
779
  } catch (m) {
778
780
  C.open({ message: m.message, type: "error" });
779
781
  } finally {
@@ -786,7 +788,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
786
788
  );
787
789
  async function x() {
788
790
  try {
789
- h.value._id ? (_.value = !0, await Ae(h.value._id), C.open({ message: "Upload successful", type: "success" })) : C.open({ message: "Invalid accounting setting", type: "error" });
791
+ h.value._id ? (_.value = !0, await Pe(h.value._id), C.open({ message: "Upload successful", type: "success" })) : C.open({ message: "Invalid accounting setting", type: "error" });
790
792
  } catch (m) {
791
793
  m.message && C.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((w) => C.open({ message: w.Message, type: "error" }));
792
794
  } finally {
@@ -795,11 +797,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
795
797
  }
796
798
  return (m, w) => {
797
799
  const k = S("FmButton"), d = S("FmCircularProgress"), y = S("FmTable");
798
- return c(), F("div", Ht, [
799
- t("div", Xt, [
800
- r(Fe, {
800
+ return c(), F("div", Xt, [
801
+ t("div", Qt, [
802
+ r(De, {
801
803
  "date-range": p(b),
802
- "onUpdate:dateRange": w[0] || (w[0] = (n) => be(b) ? b.value = n : null),
804
+ "onUpdate:dateRange": w[0] || (w[0] = (n) => we(b) ? b.value = n : null),
803
805
  compare: !1
804
806
  }, null, 8, ["date-range"]),
805
807
  r(k, {
@@ -809,9 +811,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
809
811
  onClick: x
810
812
  }, null, 8, ["loading"])
811
813
  ]),
812
- _.value ? (c(), F("div", Qt, [
814
+ _.value ? (c(), F("div", Gt, [
813
815
  r(d, { size: "xl" }),
814
- t("span", Gt, T(p(e)("report.common.isLoading")), 1)
816
+ t("span", Jt, T(p(e)("report.common.isLoading")), 1)
815
817
  ])) : s.value.length > 0 ? (c(), M(y, {
816
818
  key: 1,
817
819
  class: "flex overflow-scroll",
@@ -821,7 +823,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
821
823
  ]);
822
824
  };
823
825
  }
824
- }), Wt = { class: "h-full relative flex flex-col" }, Zt = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, eo = /* @__PURE__ */ q({
826
+ }), Zt = { class: "h-full relative flex flex-col" }, eo = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, to = /* @__PURE__ */ q({
825
827
  __name: "Xero",
826
828
  props: {
827
829
  modelValue: { required: !0 },
@@ -843,10 +845,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
843
845
  ], b = de(), x = Y(() => {
844
846
  switch (s.value) {
845
847
  case "preview":
846
- return { component: Jt };
848
+ return { component: Wt };
847
849
  case "setting":
848
850
  return {
849
- component: qt,
851
+ component: Ht,
850
852
  props: {
851
853
  tenantOptions: V.value,
852
854
  taxOptions: h.value,
@@ -860,7 +862,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
860
862
  async function m() {
861
863
  if (e.value._id)
862
864
  try {
863
- const d = await He(e.value._id);
865
+ const d = await Xe(e.value._id);
864
866
  V.value.data = d.map((y) => ({
865
867
  value: y.id,
866
868
  label: y.name
@@ -874,7 +876,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
874
876
  async function w() {
875
877
  if (e.value._id)
876
878
  try {
877
- const d = await Xe(e.value._id);
879
+ const d = await Qe(e.value._id);
878
880
  h.value.data = d.map((y) => ({
879
881
  value: y.Name,
880
882
  label: `${y.Name} - (${y.EffectiveRate}%)`
@@ -888,7 +890,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
888
890
  async function k() {
889
891
  if (e.value._id)
890
892
  try {
891
- const d = await Qe(e.value._id);
893
+ const d = await Ge(e.value._id);
892
894
  _.value.data = d.map((y) => ({
893
895
  value: y.Code,
894
896
  label: `${y.Code} ${y.Name} - [${y.Class}_${y.Type}]`
@@ -911,7 +913,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
911
913
  ), (d, y) => {
912
914
  var $, l, a;
913
915
  const n = S("FmPageHead"), v = S("FmTabs");
914
- return c(), F("div", Wt, [
916
+ return c(), F("div", Zt, [
915
917
  r(n, {
916
918
  title: (($ = e.value) == null ? void 0 : $.name) || "Xero",
917
919
  "back-button": !0,
@@ -928,8 +930,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
928
930
  "onUpdate:modelValue": y[0] || (y[0] = (u) => s.value = u),
929
931
  items: C
930
932
  }, null, 8, ["model-value"]),
931
- t("div", Zt, [
932
- (c(), M(xe((l = x.value) == null ? void 0 : l.component), Le({
933
+ t("div", eo, [
934
+ (c(), M(xe((l = x.value) == null ? void 0 : l.component), Ee({
933
935
  modelValue: e.value,
934
936
  "onUpdate:modelValue": y[1] || (y[1] = (u) => e.value = u)
935
937
  }, (a = x.value) == null ? void 0 : a.props), null, 16, ["modelValue"]))
@@ -937,10 +939,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
937
939
  ]);
938
940
  };
939
941
  }
940
- }), to = {
942
+ }), oo = {
941
943
  key: 0,
942
944
  class: "flex flex-col h-full"
943
- }, oo = { class: "flex flex-col gap-16 pb-[24px]" }, ao = { class: "flex flex-row justify-between items-center gap-2" }, lo = { class: "fm-typo-en-title-sm-800" }, no = { class: "flex flex-row gap-2 items-center" }, so = { class: "relative group cursor-pointer" }, io = { 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" }, ro = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, mo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, co = { class: "flex flex-row items-center justify-between" }, po = { class: "w-[25%]" }, uo = { class: "flex-grow" }, fo = { class: "flex flex-row items-center justify-between" }, vo = { class: "w-[25%]" }, go = { class: "flex-grow" }, yo = { class: "flex flex-col gap-16" }, xo = { class: "fm-typo-en-title-sm-800" }, _o = { class: "flex flex-row items-center max-w-[100%]" }, bo = { class: "w-[25%]" }, wo = { class: "flex-grow" }, ho = { class: "flex flex-row items-center max-w-[100%]" }, Vo = { class: "w-[25%]" }, ko = { class: "flex flex-row items-center max-w-[100%]" }, $o = { class: "w-[25%]" }, So = { class: "flex flex-col gap-16" }, Co = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Fo = { class: "flex flex-row items-center gap-x-16" }, Do = { class: "fm-typo-en-title-sm-800" }, Uo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, To = { class: "flex flex-row items-center gap-x-16" }, Io = { class: "fm-typo-en-title-sm-800" }, Mo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ko = { class: "flex flex-row items-center gap-x-16" }, Ao = { class: "fm-typo-en-title-sm-800" }, Po = /* @__PURE__ */ q({
945
+ }, ao = { class: "flex flex-col gap-16 pb-[24px]" }, lo = { class: "flex flex-row justify-between items-center gap-2" }, no = { class: "fm-typo-en-title-sm-800" }, so = { class: "flex flex-row gap-2 items-center" }, io = { class: "relative group cursor-pointer" }, ro = { 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" }, mo = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, po = { class: "flex flex-row items-center justify-between" }, uo = { class: "w-[25%]" }, fo = { class: "flex-grow" }, vo = { class: "flex flex-row items-center justify-between" }, go = { class: "w-[25%]" }, yo = { class: "flex-grow" }, xo = { class: "flex flex-col gap-16" }, _o = { class: "fm-typo-en-title-sm-800" }, bo = { class: "flex flex-row items-center max-w-[100%]" }, wo = { class: "w-[25%]" }, ho = { class: "flex-grow" }, Vo = { class: "flex flex-row items-center max-w-[100%]" }, ko = { class: "w-[25%]" }, $o = { class: "flex flex-row items-center max-w-[100%]" }, So = { class: "w-[25%]" }, Co = { class: "flex flex-col gap-16" }, Fo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Do = { class: "flex flex-row items-center gap-x-16" }, Uo = { class: "fm-typo-en-title-sm-800" }, To = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Io = { class: "flex flex-row items-center gap-x-16" }, Mo = { class: "fm-typo-en-title-sm-800" }, Ko = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ao = { class: "flex flex-row items-center gap-x-16" }, Po = { class: "fm-typo-en-title-sm-800" }, No = /* @__PURE__ */ q({
944
946
  __name: "Setting",
945
947
  props: {
946
948
  modelValue: { required: !0 },
@@ -948,7 +950,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
948
950
  },
949
951
  emits: ["update:modelValue"],
950
952
  setup(f) {
951
- const o = X(f, "modelValue"), e = ue(), s = _e(), V = de(), { promptLoader: h } = we(), { promptMessage: _ } = Se(), { restaurants: C } = pe(), b = Y(
953
+ const o = X(f, "modelValue"), e = ue(), s = _e(), V = de(), { promptLoader: h } = he(), { promptMessage: _ } = Ce(), { restaurants: C } = pe(), b = Y(
952
954
  () => C.map((l) => ({ label: l.name, value: l.id }))
953
955
  ), { t: x } = J();
954
956
  async function m() {
@@ -957,7 +959,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
957
959
  title: x("report.common.delete")
958
960
  }) && await h(async () => {
959
961
  try {
960
- await he(o.value._id), await s.getSettings(), V.back();
962
+ await Ve(o.value._id), await s.getSettings(), V.back();
961
963
  } catch (a) {
962
964
  e.open({ type: "error", message: a.message });
963
965
  }
@@ -966,7 +968,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
966
968
  async function w() {
967
969
  await h(async () => {
968
970
  try {
969
- await Ve(o.value._id, o.value), await s.getSettings();
971
+ await ke(o.value._id, o.value), await s.getSettings();
970
972
  } catch (l) {
971
973
  e.open({ type: "error", message: l.message });
972
974
  }
@@ -1045,27 +1047,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1045
1047
  async function $() {
1046
1048
  await h(async () => {
1047
1049
  try {
1048
- await ke(o.value._id), await s.getSettings();
1050
+ await $e(o.value._id), await s.getSettings();
1049
1051
  } catch (l) {
1050
1052
  e.open({ type: "error", message: l.message });
1051
1053
  }
1052
1054
  });
1053
1055
  }
1054
- return (l, a) => {
1056
+ return be(async () => {
1057
+ await s.getSettings();
1058
+ }), (l, a) => {
1055
1059
  var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se, D;
1056
1060
  const u = S("FmIcon"), i = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
1057
- return (G = (E = o.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), F("div", to, [
1058
- t("div", oo, [
1059
- t("div", ao, [
1060
- t("div", lo, T(p(x)("report.integration.bukku.connect")), 1),
1061
- t("div", no, [
1062
- t("div", so, [
1061
+ return (G = (E = o.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), F("div", oo, [
1062
+ t("div", ao, [
1063
+ t("div", lo, [
1064
+ t("div", no, T(p(x)("report.integration.bukku.connect")), 1),
1065
+ t("div", so, [
1066
+ t("div", io, [
1063
1067
  r(u, {
1064
1068
  name: "refresh",
1065
1069
  class: "p-2 bg-gray-100 rounded-full",
1066
1070
  onClick: $
1067
1071
  }),
1068
- t("span", io, T(p(x)("report.integration.refreshSetting")), 1)
1072
+ t("span", ro, T(p(x)("report.integration.refreshSetting")), 1)
1069
1073
  ]),
1070
1074
  r(i, {
1071
1075
  variant: "tertiary",
@@ -1081,11 +1085,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1081
1085
  ])
1082
1086
  ]),
1083
1087
  r(A, { style: { margin: 0 } }),
1084
- t("div", ro, [
1085
- t("div", mo, T(p(x)("report.integration.bukku.authentication")), 1),
1086
- t("div", co, [
1087
- t("div", po, T(p(x)("report.integration.subdomain")), 1),
1088
- t("div", uo, [
1088
+ t("div", mo, [
1089
+ t("div", co, T(p(x)("report.integration.bukku.authentication")), 1),
1090
+ t("div", po, [
1091
+ t("div", uo, T(p(x)("report.integration.subdomain")), 1),
1092
+ t("div", fo, [
1089
1093
  r(P, {
1090
1094
  modelValue: o.value.platform.subdomain,
1091
1095
  "onUpdate:modelValue": a[0] || (a[0] = (g) => o.value.platform.subdomain = g),
@@ -1093,9 +1097,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1093
1097
  }, null, 8, ["modelValue", "placeholder"])
1094
1098
  ])
1095
1099
  ]),
1096
- t("div", fo, [
1097
- t("div", vo, T(p(x)("report.integration.token")), 1),
1098
- t("div", go, [
1100
+ t("div", vo, [
1101
+ t("div", go, T(p(x)("report.integration.token")), 1),
1102
+ t("div", yo, [
1099
1103
  r(P, {
1100
1104
  modelValue: o.value.platform.token,
1101
1105
  "onUpdate:modelValue": a[1] || (a[1] = (g) => o.value.platform.token = g),
@@ -1103,19 +1107,19 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1103
1107
  }, null, 8, ["modelValue", "placeholder"])
1104
1108
  ])
1105
1109
  ]),
1106
- t("div", yo, [
1107
- t("div", xo, T(p(x)("report.integration.general")), 1),
1108
- t("div", _o, [
1109
- t("div", bo, T(p(x)("report.common.name")), 1),
1110
- t("div", wo, [
1110
+ t("div", xo, [
1111
+ t("div", _o, T(p(x)("report.integration.general")), 1),
1112
+ t("div", bo, [
1113
+ t("div", wo, T(p(x)("report.common.name")), 1),
1114
+ t("div", ho, [
1111
1115
  r(P, {
1112
1116
  modelValue: o.value.name,
1113
1117
  "onUpdate:modelValue": a[2] || (a[2] = (g) => o.value.name = g)
1114
1118
  }, null, 8, ["modelValue"])
1115
1119
  ])
1116
1120
  ]),
1117
- t("div", ho, [
1118
- t("div", Vo, T(p(x)("report.common.location")), 1),
1121
+ t("div", Vo, [
1122
+ t("div", ko, T(p(x)("report.common.location")), 1),
1119
1123
  r(Q, {
1120
1124
  modelValue: o.value.platform.locationIds,
1121
1125
  "onUpdate:modelValue": a[3] || (a[3] = (g) => o.value.platform.locationIds = g),
@@ -1125,8 +1129,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1125
1129
  class: "flex-grow"
1126
1130
  }, null, 8, ["modelValue", "items"])
1127
1131
  ]),
1128
- t("div", ko, [
1129
- t("div", $o, T(p(x)("report.integration.grouping.title")), 1),
1132
+ t("div", $o, [
1133
+ t("div", So, T(p(x)("report.integration.grouping.title")), 1),
1130
1134
  r(Q, {
1131
1135
  modelValue: o.value.platform.grouping,
1132
1136
  "onUpdate:modelValue": a[4] || (a[4] = (g) => o.value.platform.grouping = g),
@@ -1137,8 +1141,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1137
1141
  }, null, 8, ["modelValue"])
1138
1142
  ])
1139
1143
  ]),
1140
- t("div", So, [
1141
- t("div", Co, [
1144
+ t("div", Co, [
1145
+ t("div", Fo, [
1142
1146
  r(K, {
1143
1147
  "model-value": {
1144
1148
  key: "Contact",
@@ -1219,21 +1223,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1219
1223
  }, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
1220
1224
  ])
1221
1225
  ]),
1222
- r(De, {
1226
+ r(Ue, {
1223
1227
  modelValue: o.value.platform,
1224
1228
  "onUpdate:modelValue": a[11] || (a[11] = (g) => o.value.platform = g),
1225
1229
  label: "upload",
1226
1230
  "last-upload-date": (W = o.value.platform) == null ? void 0 : W.lastUploadDate
1227
1231
  }, null, 8, ["modelValue", "last-upload-date"]),
1228
- t("div", Fo, [
1229
- t("div", Do, T(p(x)("report.integration.items")), 1),
1232
+ t("div", Do, [
1233
+ t("div", Uo, T(p(x)("report.integration.items")), 1),
1230
1234
  r(i, {
1231
1235
  variant: "primary",
1232
1236
  icon: "add",
1233
1237
  onClick: a[12] || (a[12] = () => d("items"))
1234
1238
  })
1235
1239
  ]),
1236
- t("div", Uo, [
1240
+ t("div", To, [
1237
1241
  (c(!0), F(L, null, H((te = (ee = (Z = o.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (g, U) => (c(), M(K, {
1238
1242
  key: `item-${U}`,
1239
1243
  modelValue: o.value.platform.mappings.items[U],
@@ -1246,15 +1250,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1246
1250
  onRemove: () => k("items", U)
1247
1251
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1248
1252
  ]),
1249
- t("div", To, [
1250
- t("div", Io, T(p(x)("report.integration.taxes")), 1),
1253
+ t("div", Io, [
1254
+ t("div", Mo, T(p(x)("report.integration.taxes")), 1),
1251
1255
  r(i, {
1252
1256
  variant: "primary",
1253
1257
  icon: "add",
1254
1258
  onClick: a[13] || (a[13] = () => d("taxes"))
1255
1259
  })
1256
1260
  ]),
1257
- t("div", Mo, [
1261
+ t("div", Ko, [
1258
1262
  (c(!0), F(L, null, H((le = (ae = (oe = o.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (g, U) => (c(), M(K, {
1259
1263
  key: `tax-${U}`,
1260
1264
  modelValue: o.value.platform.mappings.taxes[U],
@@ -1267,8 +1271,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1267
1271
  onRemove: () => k("taxes", U)
1268
1272
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1269
1273
  ]),
1270
- t("div", Ko, [
1271
- t("div", Ao, T(p(x)("report.integration.payments")), 1),
1274
+ t("div", Ao, [
1275
+ t("div", Po, T(p(x)("report.integration.payments")), 1),
1272
1276
  r(i, {
1273
1277
  variant: "primary",
1274
1278
  icon: "add",
@@ -1295,10 +1299,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1295
1299
  ])) : N("", !0);
1296
1300
  };
1297
1301
  }
1298
- }), No = { class: "h-full flex flex-col gap-16" }, Ro = { class: "flex flex-row gap-2 justify-between items-center" }, Oo = {
1302
+ }), Ro = { class: "h-full flex flex-col gap-16" }, Oo = { class: "flex flex-row gap-2 justify-between items-center" }, Bo = {
1299
1303
  key: 0,
1300
1304
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
1301
- }, Bo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jo = /* @__PURE__ */ q({
1305
+ }, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Lo = /* @__PURE__ */ q({
1302
1306
  __name: "Preview",
1303
1307
  props: {
1304
1308
  modelValue: { required: !0 },
@@ -1432,13 +1436,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1432
1436
  header: "Skip",
1433
1437
  enableSorting: !1
1434
1438
  }
1435
- ], h = X(f, "modelValue"), _ = B(!1), C = ue(), { dateRange: b } = Ce(pe());
1439
+ ], h = X(f, "modelValue"), _ = B(!1), C = ue(), { dateRange: b } = Fe(pe());
1436
1440
  ve(
1437
1441
  () => b.value,
1438
1442
  async () => {
1439
1443
  if (h.value._id)
1440
1444
  try {
1441
- _.value = !0, o.value = await $e(h.value._id);
1445
+ _.value = !0, o.value = await Se(h.value._id);
1442
1446
  } catch (m) {
1443
1447
  C.open({ message: m.message, type: "error" });
1444
1448
  } finally {
@@ -1451,7 +1455,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1451
1455
  );
1452
1456
  async function x() {
1453
1457
  try {
1454
- h.value._id ? (_.value = !0, await Ae(h.value._id), C.open({ message: s("report.integration.uploadSuccess"), type: "success" })) : C.open({ message: s("report.integration.error.invalid"), type: "error" });
1458
+ h.value._id ? (_.value = !0, await Pe(h.value._id), C.open({ message: s("report.integration.uploadSuccess"), type: "success" })) : C.open({ message: s("report.integration.error.invalid"), type: "error" });
1455
1459
  } catch (m) {
1456
1460
  C.open({ message: m.message, type: "error" });
1457
1461
  } finally {
@@ -1460,11 +1464,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1460
1464
  }
1461
1465
  return (m, w) => {
1462
1466
  const k = S("FmButton"), d = S("FmCircularProgress"), y = S("FmTable");
1463
- return c(), F("div", No, [
1464
- t("div", Ro, [
1465
- r(Fe, {
1467
+ return c(), F("div", Ro, [
1468
+ t("div", Oo, [
1469
+ r(De, {
1466
1470
  "date-range": p(b),
1467
- "onUpdate:dateRange": w[0] || (w[0] = (n) => be(b) ? b.value = n : null),
1471
+ "onUpdate:dateRange": w[0] || (w[0] = (n) => we(b) ? b.value = n : null),
1468
1472
  compare: !1
1469
1473
  }, null, 8, ["date-range"]),
1470
1474
  r(k, {
@@ -1474,9 +1478,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1474
1478
  onClick: x
1475
1479
  }, null, 8, ["loading", "label"])
1476
1480
  ]),
1477
- _.value ? (c(), F("div", Oo, [
1481
+ _.value ? (c(), F("div", Bo, [
1478
1482
  r(d, { size: "xl" }),
1479
- t("span", Bo, T(p(s)("report.integration.table.loading")), 1)
1483
+ t("span", jo, T(p(s)("report.integration.table.loading")), 1)
1480
1484
  ])) : e.value.length > 0 ? (c(), M(y, {
1481
1485
  key: 1,
1482
1486
  class: "flex overflow-scroll",
@@ -1486,7 +1490,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1486
1490
  ]);
1487
1491
  };
1488
1492
  }
1489
- }), Lo = { class: "h-full relative flex flex-col" }, Eo = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, zo = /* @__PURE__ */ q({
1493
+ }), Eo = { class: "h-full relative flex flex-col" }, zo = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Yo = /* @__PURE__ */ q({
1490
1494
  __name: "Bukku",
1491
1495
  props: {
1492
1496
  modelValue: {},
@@ -1508,9 +1512,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1508
1512
  ], h = de(), _ = Y(() => {
1509
1513
  switch (s.value) {
1510
1514
  case "preview":
1511
- return jo;
1515
+ return Lo;
1512
1516
  case "setting":
1513
- return Po;
1517
+ return No;
1514
1518
  default:
1515
1519
  return null;
1516
1520
  }
@@ -1518,7 +1522,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1518
1522
  return (C, b) => {
1519
1523
  var w;
1520
1524
  const x = S("FmPageHead"), m = S("FmTabs");
1521
- return c(), F("div", Lo, [
1525
+ return c(), F("div", Eo, [
1522
1526
  r(x, {
1523
1527
  title: ((w = e.value) == null ? void 0 : w.name) || "Bukku",
1524
1528
  "back-button": !0,
@@ -1535,7 +1539,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1535
1539
  "onUpdate:modelValue": b[0] || (b[0] = (k) => s.value = k),
1536
1540
  items: V
1537
1541
  }, null, 8, ["model-value"]),
1538
- t("div", Eo, [
1542
+ t("div", zo, [
1539
1543
  (c(), M(xe(_.value), {
1540
1544
  modelValue: e.value,
1541
1545
  "onUpdate:modelValue": b[1] || (b[1] = (k) => e.value = k)
@@ -1544,10 +1548,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1544
1548
  ]);
1545
1549
  };
1546
1550
  }
1547
- }), Yo = {
1551
+ }), qo = {
1548
1552
  key: 0,
1549
1553
  class: "flex flex-col h-full"
1550
- }, qo = { class: "flex flex-col gap-16 pb-[24px]" }, Ho = { class: "flex flex-row justify-between items-center gap-2" }, Xo = { class: "flex flex-row gap-2 items-center" }, Qo = { class: "relative group cursor-pointer" }, Go = { 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" }, Jo = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Wo = { class: "flex flex-col gap-16" }, Zo = { class: "fm-typo-en-title-sm-800" }, ea = { class: "flex flex-row items-center max-w-[100%]" }, ta = { class: "w-[25%]" }, oa = { class: "flex-grow" }, aa = { class: "flex flex-row items-center max-w-[100%]" }, la = { class: "w-[25%]" }, na = { class: "flex flex-row items-center max-w-[100%]" }, sa = { class: "w-[25%]" }, ia = { class: "flex flex-col gap-16" }, ra = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ma = { class: "flex flex-row items-center gap-x-16" }, ca = { class: "fm-typo-en-title-sm-800" }, da = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, pa = { class: "flex flex-row items-center gap-x-16" }, ua = { class: "fm-typo-en-title-sm-800" }, fa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, va = { class: "flex flex-row items-center gap-x-16" }, ga = { class: "fm-typo-en-title-sm-800" }, ya = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, xa = /* @__PURE__ */ q({
1554
+ }, Ho = { class: "flex flex-col gap-16 pb-[24px]" }, Xo = { class: "flex flex-row justify-between items-center gap-2" }, Qo = { class: "flex flex-row gap-2 items-center" }, Go = { class: "relative group cursor-pointer" }, Jo = { 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" }, Wo = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Zo = { class: "flex flex-col gap-16" }, ea = { class: "fm-typo-en-title-sm-800" }, ta = { class: "flex flex-row items-center max-w-[100%]" }, oa = { class: "w-[25%]" }, aa = { class: "flex-grow" }, la = { class: "flex flex-row items-center max-w-[100%]" }, na = { class: "w-[25%]" }, sa = { class: "flex flex-row items-center max-w-[100%]" }, ia = { class: "w-[25%]" }, ra = { class: "flex flex-col gap-16" }, ma = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ca = { class: "flex flex-row items-center gap-x-16" }, da = { class: "fm-typo-en-title-sm-800" }, pa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ua = { class: "flex flex-row items-center gap-x-16" }, fa = { class: "fm-typo-en-title-sm-800" }, va = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ga = { class: "flex flex-row items-center gap-x-16" }, ya = { class: "fm-typo-en-title-sm-800" }, xa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, _a = /* @__PURE__ */ q({
1551
1555
  __name: "Setting",
1552
1556
  props: {
1553
1557
  modelValue: { required: !0 },
@@ -1555,7 +1559,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1555
1559
  },
1556
1560
  emits: ["update:modelValue"],
1557
1561
  setup(f) {
1558
- const { t: o } = J(), e = X(f, "modelValue"), s = ue(), V = _e(), h = de(), { promptLoader: _ } = we(), { promptMessage: C } = Se(), { restaurants: b } = pe(), x = Y(
1562
+ const { t: o } = J(), e = X(f, "modelValue"), s = ue(), V = _e(), h = de(), { promptLoader: _ } = he(), { promptMessage: C } = Ce(), { restaurants: b } = pe(), x = Y(
1559
1563
  () => b.map((l) => ({ label: l.name, value: l.id }))
1560
1564
  );
1561
1565
  async function m() {
@@ -1564,7 +1568,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1564
1568
  title: o("report.common.delete")
1565
1569
  }) && await _(async () => {
1566
1570
  try {
1567
- await he(e.value._id), await V.getSettings(), h.back();
1571
+ await Ve(e.value._id), await V.getSettings(), h.back();
1568
1572
  } catch (a) {
1569
1573
  s.open({ type: "error", message: a.message });
1570
1574
  }
@@ -1573,7 +1577,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1573
1577
  async function w() {
1574
1578
  await _(async () => {
1575
1579
  try {
1576
- await Ve(e.value._id, e.value), await V.getSettings();
1580
+ await ke(e.value._id, e.value), await V.getSettings();
1577
1581
  } catch (l) {
1578
1582
  s.open({ type: "error", message: l.message });
1579
1583
  }
@@ -1629,27 +1633,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1629
1633
  async function $() {
1630
1634
  await _(async () => {
1631
1635
  try {
1632
- await ke(e.value._id), await V.getSettings();
1636
+ await $e(e.value._id), await V.getSettings();
1633
1637
  } catch (l) {
1634
1638
  s.open({ type: "error", message: l.message });
1635
1639
  }
1636
1640
  });
1637
1641
  }
1638
- return (l, a) => {
1642
+ return be(async () => {
1643
+ await V.getSettings();
1644
+ }), (l, a) => {
1639
1645
  var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se;
1640
1646
  const u = S("FmIcon"), i = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
1641
- return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), F("div", Yo, [
1642
- t("div", qo, [
1643
- t("div", Ho, [
1647
+ return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), F("div", qo, [
1648
+ t("div", Ho, [
1649
+ t("div", Xo, [
1644
1650
  a[14] || (a[14] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
1645
- t("div", Xo, [
1646
- t("div", Qo, [
1651
+ t("div", Qo, [
1652
+ t("div", Go, [
1647
1653
  r(u, {
1648
1654
  name: "refresh",
1649
1655
  class: "p-2 bg-gray-100 rounded-full",
1650
1656
  onClick: $
1651
1657
  }),
1652
- t("span", Go, T(p(o)("report.integration.refreshSetting")), 1)
1658
+ t("span", Jo, T(p(o)("report.integration.refreshSetting")), 1)
1653
1659
  ]),
1654
1660
  r(i, {
1655
1661
  variant: "tertiary",
@@ -1665,20 +1671,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1665
1671
  ])
1666
1672
  ]),
1667
1673
  r(A, { style: { margin: 0 } }),
1668
- t("div", Jo, [
1669
- t("div", Wo, [
1670
- t("div", Zo, T(p(o)("report.integration.general")), 1),
1671
- t("div", ea, [
1672
- t("div", ta, T(p(o)("report.common.name")), 1),
1673
- t("div", oa, [
1674
+ t("div", Wo, [
1675
+ t("div", Zo, [
1676
+ t("div", ea, T(p(o)("report.integration.general")), 1),
1677
+ t("div", ta, [
1678
+ t("div", oa, T(p(o)("report.common.name")), 1),
1679
+ t("div", aa, [
1674
1680
  r(P, {
1675
1681
  modelValue: e.value.name,
1676
1682
  "onUpdate:modelValue": a[0] || (a[0] = (D) => e.value.name = D)
1677
1683
  }, null, 8, ["modelValue"])
1678
1684
  ])
1679
1685
  ]),
1680
- t("div", aa, [
1681
- t("div", la, T(p(o)("report.integration.location")), 1),
1686
+ t("div", la, [
1687
+ t("div", na, T(p(o)("report.integration.location")), 1),
1682
1688
  r(Q, {
1683
1689
  modelValue: e.value.platform.locationIds,
1684
1690
  "onUpdate:modelValue": a[1] || (a[1] = (D) => e.value.platform.locationIds = D),
@@ -1689,8 +1695,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1689
1695
  rules: [(D) => D.length !== 0 || "Please select at least 1 location"]
1690
1696
  }, null, 8, ["modelValue", "items", "rules"])
1691
1697
  ]),
1692
- t("div", na, [
1693
- t("div", sa, T(p(o)("report.integration.grouping.title")), 1),
1698
+ t("div", sa, [
1699
+ t("div", ia, T(p(o)("report.integration.grouping.title")), 1),
1694
1700
  r(Q, {
1695
1701
  modelValue: e.value.platform.grouping,
1696
1702
  "onUpdate:modelValue": a[2] || (a[2] = (D) => e.value.platform.grouping = D),
@@ -1701,8 +1707,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1701
1707
  }, null, 8, ["modelValue"])
1702
1708
  ])
1703
1709
  ]),
1704
- t("div", ia, [
1705
- t("div", ra, [
1710
+ t("div", ra, [
1711
+ t("div", ma, [
1706
1712
  r(K, {
1707
1713
  "model-value": { key: "Project", account: e.value.platform.mappings.project },
1708
1714
  options: v("Project"),
@@ -1767,20 +1773,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1767
1773
  }, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
1768
1774
  ])
1769
1775
  ]),
1770
- r(De, {
1776
+ r(Ue, {
1771
1777
  modelValue: e.value.platform,
1772
1778
  "onUpdate:modelValue": a[10] || (a[10] = (D) => e.value.platform = D),
1773
1779
  label: p(o)("report.input.email")
1774
1780
  }, null, 8, ["modelValue", "label"]),
1775
- t("div", ma, [
1776
- t("div", ca, T(p(o)("report.integration.items")), 1),
1781
+ t("div", ca, [
1782
+ t("div", da, T(p(o)("report.integration.items")), 1),
1777
1783
  r(i, {
1778
1784
  variant: "primary",
1779
1785
  icon: "add",
1780
1786
  onClick: a[11] || (a[11] = () => d("items"))
1781
1787
  })
1782
1788
  ]),
1783
- t("div", da, [
1789
+ t("div", pa, [
1784
1790
  (c(!0), F(L, null, H((ee = (Z = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : Z.mappings) == null ? void 0 : ee.items, (D, g) => (c(), M(K, {
1785
1791
  key: `item-${g}`,
1786
1792
  modelValue: e.value.platform.mappings.items[g],
@@ -1793,15 +1799,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1793
1799
  onRemove: () => k("items", g)
1794
1800
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1795
1801
  ]),
1796
- t("div", pa, [
1797
- t("div", ua, T(p(o)("report.integration.taxes")), 1),
1802
+ t("div", ua, [
1803
+ t("div", fa, T(p(o)("report.integration.taxes")), 1),
1798
1804
  r(i, {
1799
1805
  variant: "primary",
1800
1806
  icon: "add",
1801
1807
  onClick: a[12] || (a[12] = () => d("taxes"))
1802
1808
  })
1803
1809
  ]),
1804
- t("div", fa, [
1810
+ t("div", va, [
1805
1811
  (c(!0), F(L, null, H((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.taxes, (D, g) => (c(), M(K, {
1806
1812
  key: `tax-${g}`,
1807
1813
  modelValue: e.value.platform.mappings.taxes[g],
@@ -1814,15 +1820,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1814
1820
  onRemove: () => k("taxes", g)
1815
1821
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1816
1822
  ]),
1817
- t("div", va, [
1818
- t("div", ga, T(p(o)("report.integration.payments")), 1),
1823
+ t("div", ga, [
1824
+ t("div", ya, T(p(o)("report.integration.payments")), 1),
1819
1825
  r(i, {
1820
1826
  variant: "primary",
1821
1827
  icon: "add",
1822
1828
  onClick: a[13] || (a[13] = () => d("payments"))
1823
1829
  })
1824
1830
  ]),
1825
- t("div", ya, [
1831
+ t("div", xa, [
1826
1832
  (c(!0), F(L, null, H((se = (ne = (le = e.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.payments, (D, g) => (c(), M(K, {
1827
1833
  key: `payment-${g}`,
1828
1834
  modelValue: e.value.platform.mappings.payments[g],
@@ -1839,10 +1845,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1839
1845
  ])) : N("", !0);
1840
1846
  };
1841
1847
  }
1842
- }), _a = { class: "h-full flex flex-col gap-16" }, ba = { class: "flex flex-row gap-2 justify-between items-center" }, wa = {
1848
+ }), ba = { class: "h-full flex flex-col gap-16" }, wa = { class: "flex flex-row gap-2 justify-between items-center" }, ha = {
1843
1849
  key: 0,
1844
1850
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
1845
- }, ha = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Va = /* @__PURE__ */ q({
1851
+ }, Va = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ka = /* @__PURE__ */ q({
1846
1852
  __name: "Preview",
1847
1853
  props: {
1848
1854
  modelValue: { required: !0 },
@@ -1950,13 +1956,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1950
1956
  header: "Payment Amount",
1951
1957
  enableSorting: !1
1952
1958
  }
1953
- ], h = X(f, "modelValue"), _ = B(!1), C = ue(), { dateRange: b } = Ce(pe());
1959
+ ], h = X(f, "modelValue"), _ = B(!1), C = ue(), { dateRange: b } = Fe(pe());
1954
1960
  ve(
1955
1961
  () => b.value,
1956
1962
  async () => {
1957
1963
  if (h.value._id)
1958
1964
  try {
1959
- _.value = !0, e.value = await $e(h.value._id);
1965
+ _.value = !0, e.value = await Se(h.value._id);
1960
1966
  } catch (m) {
1961
1967
  C.open({ message: m.message, type: "error" });
1962
1968
  } finally {
@@ -1969,7 +1975,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1969
1975
  );
1970
1976
  async function x() {
1971
1977
  try {
1972
- h.value._id ? (_.value = !0, await Pe(h.value._id)) : C.open({ message: "Invalid accounting setting", type: "error" });
1978
+ h.value._id ? (_.value = !0, await Ne(h.value._id)) : C.open({ message: "Invalid accounting setting", type: "error" });
1973
1979
  } catch (m) {
1974
1980
  C.open({ message: m.message, type: "error" });
1975
1981
  } finally {
@@ -1978,11 +1984,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1978
1984
  }
1979
1985
  return (m, w) => {
1980
1986
  const k = S("FmButton"), d = S("FmCircularProgress"), y = S("FmTable");
1981
- return c(), F("div", _a, [
1982
- t("div", ba, [
1983
- r(Fe, {
1987
+ return c(), F("div", ba, [
1988
+ t("div", wa, [
1989
+ r(De, {
1984
1990
  "date-range": p(b),
1985
- "onUpdate:dateRange": w[0] || (w[0] = (n) => be(b) ? b.value = n : null),
1991
+ "onUpdate:dateRange": w[0] || (w[0] = (n) => we(b) ? b.value = n : null),
1986
1992
  compare: !1
1987
1993
  }, null, 8, ["date-range"]),
1988
1994
  r(k, {
@@ -1992,9 +1998,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1992
1998
  onClick: x
1993
1999
  }, null, 8, ["loading", "label"])
1994
2000
  ]),
1995
- _.value ? (c(), F("div", wa, [
2001
+ _.value ? (c(), F("div", ha, [
1996
2002
  r(d, { size: "xl" }),
1997
- t("span", ha, T(p(o)("report.common.isLoading")), 1)
2003
+ t("span", Va, T(p(o)("report.common.isLoading")), 1)
1998
2004
  ])) : s.value.length > 0 ? (c(), M(y, {
1999
2005
  key: 1,
2000
2006
  class: "flex overflow-scroll",
@@ -2004,7 +2010,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2004
2010
  ]);
2005
2011
  };
2006
2012
  }
2007
- }), ka = { class: "h-full relative flex flex-col" }, $a = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Sa = /* @__PURE__ */ q({
2013
+ }), $a = { class: "h-full relative flex flex-col" }, Sa = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Ca = /* @__PURE__ */ q({
2008
2014
  __name: "AutoCount",
2009
2015
  props: {
2010
2016
  modelValue: {},
@@ -2026,9 +2032,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2026
2032
  ], h = de(), _ = Y(() => {
2027
2033
  switch (s.value) {
2028
2034
  case "preview":
2029
- return Va;
2035
+ return ka;
2030
2036
  case "setting":
2031
- return xa;
2037
+ return _a;
2032
2038
  default:
2033
2039
  return null;
2034
2040
  }
@@ -2036,7 +2042,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2036
2042
  return (C, b) => {
2037
2043
  var w;
2038
2044
  const x = S("FmPageHead"), m = S("FmTabs");
2039
- return c(), F("div", ka, [
2045
+ return c(), F("div", $a, [
2040
2046
  r(x, {
2041
2047
  title: ((w = e.value) == null ? void 0 : w.name) || "AutoCount",
2042
2048
  "back-button": !0,
@@ -2053,7 +2059,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2053
2059
  "onUpdate:modelValue": b[0] || (b[0] = (k) => s.value = k),
2054
2060
  items: V
2055
2061
  }, null, 8, ["model-value"]),
2056
- t("div", $a, [
2062
+ t("div", Sa, [
2057
2063
  (c(), M(xe(_.value), {
2058
2064
  modelValue: e.value,
2059
2065
  "onUpdate:modelValue": b[1] || (b[1] = (k) => e.value = k)
@@ -2062,10 +2068,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2062
2068
  ]);
2063
2069
  };
2064
2070
  }
2065
- }), Ca = {
2071
+ }), Fa = {
2066
2072
  key: 0,
2067
2073
  class: "flex flex-col h-full"
2068
- }, Fa = { class: "flex flex-col gap-16 pb-[24px]" }, Da = { class: "flex flex-row justify-between items-center gap-2" }, Ua = { class: "flex flex-row gap-2 items-center" }, Ta = { class: "relative group cursor-pointer" }, Ia = { 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" }, Ma = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ka = { class: "flex flex-col gap-16" }, Aa = { class: "fm-typo-en-title-sm-800" }, Pa = { class: "flex flex-row items-center max-w-[100%]" }, Na = { class: "w-[25%]" }, Ra = { class: "flex-grow" }, Oa = { class: "flex flex-row items-center max-w-[100%]" }, Ba = { class: "w-[25%]" }, ja = { class: "flex flex-row items-center max-w-[100%]" }, La = { class: "w-[25%]" }, Ea = { class: "flex flex-col gap-16" }, za = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ya = { class: "grid-cols-1 grid gap-16" }, qa = { class: "flex flex-row items-center gap-x-16" }, Ha = { class: "fm-typo-en-title-sm-800" }, Xa = { class: "grid-cols-1 grid gap-16" }, Qa = { class: "flex flex-row items-center gap-x-16" }, Ga = { class: "fm-typo-en-title-sm-800" }, Ja = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Wa = { class: "flex flex-row items-center gap-x-16" }, Za = { class: "fm-typo-en-title-sm-800" }, el = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, tl = /* @__PURE__ */ q({
2074
+ }, Da = { class: "flex flex-col gap-16 pb-[24px]" }, Ua = { class: "flex flex-row justify-between items-center gap-2" }, Ta = { class: "flex flex-row gap-2 items-center" }, Ia = { class: "relative group cursor-pointer" }, Ma = { 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" }, Aa = { class: "flex flex-col gap-16" }, Pa = { class: "fm-typo-en-title-sm-800" }, Na = { class: "flex flex-row items-center max-w-[100%]" }, Ra = { class: "w-[25%]" }, Oa = { class: "flex-grow" }, Ba = { class: "flex flex-row items-center max-w-[100%]" }, ja = { class: "w-[25%]" }, La = { class: "flex flex-row items-center max-w-[100%]" }, Ea = { class: "w-[25%]" }, za = { class: "flex flex-col gap-16" }, Ya = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, qa = { class: "grid-cols-1 grid gap-16" }, Ha = { class: "flex flex-row items-center gap-x-16" }, Xa = { class: "fm-typo-en-title-sm-800" }, Qa = { class: "grid-cols-1 grid gap-16" }, Ga = { class: "flex flex-row items-center gap-x-16" }, Ja = { class: "fm-typo-en-title-sm-800" }, Wa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Za = { class: "flex flex-row items-center gap-x-16" }, el = { class: "fm-typo-en-title-sm-800" }, tl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ol = /* @__PURE__ */ q({
2069
2075
  __name: "Setting",
2070
2076
  props: {
2071
2077
  modelValue: { required: !0 },
@@ -2073,7 +2079,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2073
2079
  },
2074
2080
  emits: ["update:modelValue"],
2075
2081
  setup(f) {
2076
- const { t: o } = J(), e = X(f, "modelValue"), s = ue(), V = _e(), h = de(), { promptLoader: _ } = we(), { promptMessage: C } = Se(), { restaurants: b } = pe(), x = Y(
2082
+ const { t: o } = J(), e = X(f, "modelValue"), s = ue(), V = _e(), h = de(), { promptLoader: _ } = he(), { promptMessage: C } = Ce(), { restaurants: b } = pe(), x = Y(
2077
2083
  () => b.map((l) => ({ label: l.name, value: l.id }))
2078
2084
  );
2079
2085
  async function m() {
@@ -2082,7 +2088,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2082
2088
  title: o("report.common.delete")
2083
2089
  }) && await _(async () => {
2084
2090
  try {
2085
- await he(e.value._id), await V.getSettings(), h.back();
2091
+ await Ve(e.value._id), await V.getSettings(), h.back();
2086
2092
  } catch (a) {
2087
2093
  s.open({ type: "error", message: a.message });
2088
2094
  }
@@ -2091,7 +2097,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2091
2097
  async function w() {
2092
2098
  await _(async () => {
2093
2099
  try {
2094
- await Ve(e.value._id, e.value), await V.getSettings();
2100
+ await ke(e.value._id, e.value), await V.getSettings();
2095
2101
  } catch (l) {
2096
2102
  s.open({ type: "error", message: l.message });
2097
2103
  }
@@ -2148,27 +2154,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2148
2154
  async function $() {
2149
2155
  await _(async () => {
2150
2156
  try {
2151
- await ke(e.value._id), await V.getSettings();
2157
+ await $e(e.value._id), await V.getSettings();
2152
2158
  } catch (l) {
2153
2159
  s.open({ type: "error", message: l.message });
2154
2160
  }
2155
2161
  });
2156
2162
  }
2157
- return (l, a) => {
2163
+ return be(async () => {
2164
+ await V.getSettings();
2165
+ }), (l, a) => {
2158
2166
  var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se;
2159
2167
  const u = S("FmIcon"), i = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
2160
- return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), F("div", Ca, [
2161
- t("div", Fa, [
2162
- t("div", Da, [
2168
+ return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), F("div", Fa, [
2169
+ t("div", Da, [
2170
+ t("div", Ua, [
2163
2171
  a[15] || (a[15] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
2164
- t("div", Ua, [
2165
- t("div", Ta, [
2172
+ t("div", Ta, [
2173
+ t("div", Ia, [
2166
2174
  r(u, {
2167
2175
  name: "refresh",
2168
2176
  class: "p-2 bg-gray-100 rounded-full",
2169
2177
  onClick: $
2170
2178
  }),
2171
- t("span", Ia, T(p(o)("report.integration.refreshSetting")), 1)
2179
+ t("span", Ma, T(p(o)("report.integration.refreshSetting")), 1)
2172
2180
  ]),
2173
2181
  r(i, {
2174
2182
  variant: "tertiary",
@@ -2184,20 +2192,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2184
2192
  ])
2185
2193
  ]),
2186
2194
  r(A, { style: { margin: 0 } }),
2187
- t("div", Ma, [
2188
- t("div", Ka, [
2189
- t("div", Aa, T(p(o)("report.integration.general")), 1),
2190
- t("div", Pa, [
2191
- t("div", Na, T(p(o)("report.common.name")), 1),
2192
- t("div", Ra, [
2195
+ t("div", Ka, [
2196
+ t("div", Aa, [
2197
+ t("div", Pa, T(p(o)("report.integration.general")), 1),
2198
+ t("div", Na, [
2199
+ t("div", Ra, T(p(o)("report.common.name")), 1),
2200
+ t("div", Oa, [
2193
2201
  r(P, {
2194
2202
  modelValue: e.value.name,
2195
2203
  "onUpdate:modelValue": a[0] || (a[0] = (D) => e.value.name = D)
2196
2204
  }, null, 8, ["modelValue"])
2197
2205
  ])
2198
2206
  ]),
2199
- t("div", Oa, [
2200
- t("div", Ba, T(p(o)("report.integration.location")), 1),
2207
+ t("div", Ba, [
2208
+ t("div", ja, T(p(o)("report.integration.location")), 1),
2201
2209
  r(Q, {
2202
2210
  modelValue: e.value.platform.locationIds,
2203
2211
  "onUpdate:modelValue": a[1] || (a[1] = (D) => e.value.platform.locationIds = D),
@@ -2208,8 +2216,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2208
2216
  rules: [(D) => D.length !== 0 || "Please select at least 1 location"]
2209
2217
  }, null, 8, ["modelValue", "items", "rules"])
2210
2218
  ]),
2211
- t("div", ja, [
2212
- t("div", La, T(p(o)("report.integration.grouping.title")), 1),
2219
+ t("div", La, [
2220
+ t("div", Ea, T(p(o)("report.integration.grouping.title")), 1),
2213
2221
  r(Q, {
2214
2222
  modelValue: e.value.platform.grouping,
2215
2223
  "onUpdate:modelValue": a[2] || (a[2] = (D) => e.value.platform.grouping = D),
@@ -2220,8 +2228,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2220
2228
  }, null, 8, ["modelValue"])
2221
2229
  ])
2222
2230
  ]),
2223
- t("div", Ea, [
2224
- t("div", za, [
2231
+ t("div", za, [
2232
+ t("div", Ya, [
2225
2233
  r(K, {
2226
2234
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
2227
2235
  options: v("Debtor"),
@@ -2276,7 +2284,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2276
2284
  "onUpdate:modelValue": a[9] || (a[9] = (D) => n({ key: "projectDetail", value: D.account }))
2277
2285
  }, null, 8, ["model-value", "options"])
2278
2286
  ]),
2279
- t("div", Ya, [
2287
+ t("div", qa, [
2280
2288
  r(K, {
2281
2289
  "model-value": {
2282
2290
  key: "Rounding",
@@ -2305,20 +2313,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2305
2313
  }, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
2306
2314
  ])
2307
2315
  ]),
2308
- r(De, {
2316
+ r(Ue, {
2309
2317
  modelValue: e.value.platform,
2310
2318
  "onUpdate:modelValue": a[11] || (a[11] = (D) => e.value.platform = D),
2311
2319
  label: "email"
2312
2320
  }, null, 8, ["modelValue"]),
2313
- t("div", qa, [
2314
- t("div", Ha, T(p(o)("report.integration.items")), 1),
2321
+ t("div", Ha, [
2322
+ t("div", Xa, T(p(o)("report.integration.items")), 1),
2315
2323
  r(i, {
2316
2324
  variant: "primary",
2317
2325
  icon: "add",
2318
2326
  onClick: a[12] || (a[12] = () => d("items"))
2319
2327
  })
2320
2328
  ]),
2321
- t("div", Xa, [
2329
+ t("div", Qa, [
2322
2330
  (c(!0), F(L, null, H((ee = (Z = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : Z.mappings) == null ? void 0 : ee.items, (D, g) => (c(), M(K, {
2323
2331
  key: `item-${g}`,
2324
2332
  modelValue: e.value.platform.mappings.items[g],
@@ -2332,15 +2340,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2332
2340
  onRemove: () => k("items", g)
2333
2341
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2334
2342
  ]),
2335
- t("div", Qa, [
2336
- t("div", Ga, T(p(o)("report.integration.taxes")), 1),
2343
+ t("div", Ga, [
2344
+ t("div", Ja, T(p(o)("report.integration.taxes")), 1),
2337
2345
  r(i, {
2338
2346
  variant: "primary",
2339
2347
  icon: "add",
2340
2348
  onClick: a[13] || (a[13] = () => d("taxes"))
2341
2349
  })
2342
2350
  ]),
2343
- t("div", Ja, [
2351
+ t("div", Wa, [
2344
2352
  (c(!0), F(L, null, H((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.taxes, (D, g) => (c(), M(K, {
2345
2353
  key: `tax-${g}`,
2346
2354
  modelValue: e.value.platform.mappings.taxes[g],
@@ -2353,15 +2361,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2353
2361
  onRemove: () => k("taxes", g)
2354
2362
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2355
2363
  ]),
2356
- t("div", Wa, [
2357
- t("div", Za, T(p(o)("report.integration.payments")), 1),
2364
+ t("div", Za, [
2365
+ t("div", el, T(p(o)("report.integration.payments")), 1),
2358
2366
  r(i, {
2359
2367
  variant: "primary",
2360
2368
  icon: "add",
2361
2369
  onClick: a[14] || (a[14] = () => d("payments"))
2362
2370
  })
2363
2371
  ]),
2364
- t("div", el, [
2372
+ t("div", tl, [
2365
2373
  (c(!0), F(L, null, H((se = (ne = (le = e.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.payments, (D, g) => (c(), M(K, {
2366
2374
  key: `payment-${g}`,
2367
2375
  modelValue: e.value.platform.mappings.payments[g],
@@ -2378,10 +2386,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2378
2386
  ])) : N("", !0);
2379
2387
  };
2380
2388
  }
2381
- }), ol = { class: "h-full flex flex-col gap-16" }, al = { class: "flex flex-row gap-2 justify-between items-center" }, ll = {
2389
+ }), al = { class: "h-full flex flex-col gap-16" }, ll = { class: "flex flex-row gap-2 justify-between items-center" }, nl = {
2382
2390
  key: 0,
2383
2391
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
2384
- }, nl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, sl = /* @__PURE__ */ q({
2392
+ }, sl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, il = /* @__PURE__ */ q({
2385
2393
  __name: "Preview",
2386
2394
  props: {
2387
2395
  modelValue: { required: !0 },
@@ -2484,13 +2492,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2484
2492
  header: "Payment Amount",
2485
2493
  enableSorting: !1
2486
2494
  }
2487
- ], h = X(f, "modelValue"), _ = B(!1), C = ue(), { dateRange: b } = Ce(pe());
2495
+ ], h = X(f, "modelValue"), _ = B(!1), C = ue(), { dateRange: b } = Fe(pe());
2488
2496
  ve(
2489
2497
  () => b.value,
2490
2498
  async () => {
2491
2499
  if (h.value._id)
2492
2500
  try {
2493
- _.value = !0, e.value = await $e(h.value._id);
2501
+ _.value = !0, e.value = await Se(h.value._id);
2494
2502
  } catch (m) {
2495
2503
  C.open({ message: m.message, type: "error" });
2496
2504
  } finally {
@@ -2503,7 +2511,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2503
2511
  );
2504
2512
  async function x() {
2505
2513
  try {
2506
- h.value._id ? (_.value = !0, await Pe(h.value._id)) : C.open({ message: "Invalid accounting setting", type: "error" });
2514
+ h.value._id ? (_.value = !0, await Ne(h.value._id)) : C.open({ message: "Invalid accounting setting", type: "error" });
2507
2515
  } catch (m) {
2508
2516
  C.open({ message: m.message, type: "error" });
2509
2517
  } finally {
@@ -2512,11 +2520,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2512
2520
  }
2513
2521
  return (m, w) => {
2514
2522
  const k = S("FmButton"), d = S("FmCircularProgress"), y = S("FmTable");
2515
- return c(), F("div", ol, [
2516
- t("div", al, [
2517
- r(Fe, {
2523
+ return c(), F("div", al, [
2524
+ t("div", ll, [
2525
+ r(De, {
2518
2526
  "date-range": p(b),
2519
- "onUpdate:dateRange": w[0] || (w[0] = (n) => be(b) ? b.value = n : null),
2527
+ "onUpdate:dateRange": w[0] || (w[0] = (n) => we(b) ? b.value = n : null),
2520
2528
  compare: !1
2521
2529
  }, null, 8, ["date-range"]),
2522
2530
  r(k, {
@@ -2526,9 +2534,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2526
2534
  onClick: x
2527
2535
  }, null, 8, ["loading", "label"])
2528
2536
  ]),
2529
- _.value ? (c(), F("div", ll, [
2537
+ _.value ? (c(), F("div", nl, [
2530
2538
  r(d, { size: "xl" }),
2531
- t("span", nl, T(p(o)("report.common.isLoading")), 1)
2539
+ t("span", sl, T(p(o)("report.common.isLoading")), 1)
2532
2540
  ])) : s.value.length > 0 ? (c(), M(y, {
2533
2541
  key: 1,
2534
2542
  class: "flex overflow-scroll",
@@ -2538,7 +2546,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2538
2546
  ]);
2539
2547
  };
2540
2548
  }
2541
- }), il = { class: "h-full relative flex flex-col" }, rl = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, ml = /* @__PURE__ */ q({
2549
+ }), rl = { class: "h-full relative flex flex-col" }, ml = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, cl = /* @__PURE__ */ q({
2542
2550
  __name: "SQL",
2543
2551
  props: {
2544
2552
  modelValue: {},
@@ -2560,9 +2568,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2560
2568
  ], h = de(), _ = Y(() => {
2561
2569
  switch (s.value) {
2562
2570
  case "preview":
2563
- return sl;
2571
+ return il;
2564
2572
  case "setting":
2565
- return tl;
2573
+ return ol;
2566
2574
  default:
2567
2575
  return null;
2568
2576
  }
@@ -2570,7 +2578,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2570
2578
  return (C, b) => {
2571
2579
  var w;
2572
2580
  const x = S("FmPageHead"), m = S("FmTabs");
2573
- return c(), F("div", il, [
2581
+ return c(), F("div", rl, [
2574
2582
  r(x, {
2575
2583
  title: ((w = e.value) == null ? void 0 : w.name) || "SQL",
2576
2584
  "back-button": !0,
@@ -2587,7 +2595,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2587
2595
  "onUpdate:modelValue": b[0] || (b[0] = (k) => s.value = k),
2588
2596
  items: V
2589
2597
  }, null, 8, ["model-value"]),
2590
- t("div", rl, [
2598
+ t("div", ml, [
2591
2599
  (c(), M(xe(_.value), {
2592
2600
  modelValue: e.value,
2593
2601
  "onUpdate:modelValue": b[1] || (b[1] = (k) => e.value = k)
@@ -2596,25 +2604,25 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2596
2604
  ]);
2597
2605
  };
2598
2606
  }
2599
- }), cl = {
2607
+ }), dl = {
2600
2608
  key: 0,
2601
2609
  class: "flex flex-col h-full"
2602
- }, dl = { class: "flex flex-col gap-16 pb-[24px]" }, pl = { class: "flex flex-row justify-between items-center gap-2" }, ul = { class: "fm-typo-en-title-sm-800" }, fl = { class: "flex flex-row gap-2 items-center" }, vl = { class: "flex flex-row gap-2 items-center" }, gl = { class: "relative group cursor-pointer" }, yl = { 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" }, xl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, _l = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, bl = { class: "flex flex-row items-center max-w-[100%]" }, wl = { class: "w-[25%]" }, hl = { class: "flex-grow" }, Vl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, kl = { class: "flex flex-row items-center justify-between" }, $l = { class: "w-[25%]" }, Sl = { class: "flex-grow" }, Cl = { class: "flex flex-row items-center justify-between" }, Fl = { class: "w-[25%]" }, Dl = { class: "flex-grow" }, Ul = { class: "flex flex-col gap-16" }, Tl = { class: "fm-typo-en-title-sm-800" }, Il = { class: "flex flex-row items-center max-w-[100%]" }, Ml = { class: "w-[25%]" }, Kl = { class: "flex-grow" }, Al = { class: "flex flex-row items-center max-w-[100%]" }, Pl = { class: "w-[25%]" }, Nl = { class: "flex flex-row items-center max-w-[100%]" }, Rl = { class: "w-[25%]" }, Ol = {
2610
+ }, pl = { class: "flex flex-col gap-16 pb-[24px]" }, ul = { class: "flex flex-row justify-between items-center gap-2" }, fl = { class: "fm-typo-en-title-sm-800" }, vl = { class: "flex flex-row gap-2 items-center" }, gl = { class: "flex flex-row gap-2 items-center" }, yl = { class: "relative group cursor-pointer" }, xl = { 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" }, _l = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, bl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wl = { class: "flex flex-row items-center max-w-[100%]" }, hl = { class: "w-[25%]" }, Vl = { class: "flex-grow" }, kl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, $l = { class: "flex flex-row items-center justify-between" }, Sl = { class: "w-[25%]" }, Cl = { class: "flex-grow" }, Fl = { class: "flex flex-row items-center justify-between" }, Dl = { class: "w-[25%]" }, Ul = { class: "flex-grow" }, Tl = { class: "flex flex-col gap-16" }, Il = { class: "fm-typo-en-title-sm-800" }, Ml = { class: "flex flex-row items-center max-w-[100%]" }, Kl = { class: "w-[25%]" }, Al = { class: "flex-grow" }, Pl = { class: "flex flex-row items-center max-w-[100%]" }, Nl = { class: "w-[25%]" }, Rl = { class: "flex flex-row items-center max-w-[100%]" }, Ol = { class: "w-[25%]" }, Bl = {
2603
2611
  key: 0,
2604
2612
  class: "flex flex-row items-center max-w-[100%]"
2605
- }, Bl = { class: "flex flex-col gap-16" }, jl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ll = { key: 1 }, El = { class: "flex flex-row items-center gap-x-16" }, zl = { class: "fm-typo-en-title-sm-800" }, Yl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ql = { class: "flex flex-row items-center gap-x-16" }, Hl = { class: "fm-typo-en-title-sm-800" }, Xl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ql = { class: "flex flex-row items-center gap-x-16" }, Gl = { class: "fm-typo-en-title-sm-800" }, Jl = { class: "flex flex-row items-center justify-between" }, Wl = { class: "flex-grow" }, Zl = {
2613
+ }, jl = { class: "flex flex-col gap-16" }, Ll = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, El = { key: 1 }, zl = { class: "flex flex-row items-center gap-x-16" }, Yl = { class: "fm-typo-en-title-sm-800" }, ql = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Hl = { class: "flex flex-row items-center gap-x-16" }, Xl = { class: "fm-typo-en-title-sm-800" }, Ql = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Gl = { class: "flex flex-row items-center gap-x-16" }, Jl = { class: "fm-typo-en-title-sm-800" }, Wl = { class: "flex flex-row items-center justify-between" }, Zl = { class: "flex-grow" }, en = {
2606
2614
  key: 0,
2607
2615
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
2608
- }, en = {
2616
+ }, tn = {
2609
2617
  key: 1,
2610
2618
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
2611
- }, tn = {
2619
+ }, on = {
2612
2620
  key: 3,
2613
2621
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
2614
- }, on = {
2622
+ }, an = {
2615
2623
  key: 0,
2616
2624
  class: "flex flex-row items-center"
2617
- }, an = /* @__PURE__ */ q({
2625
+ }, ln = /* @__PURE__ */ q({
2618
2626
  __name: "Setting",
2619
2627
  props: /* @__PURE__ */ ye({
2620
2628
  retrievedMethods: {
@@ -2631,7 +2639,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2631
2639
  }),
2632
2640
  emits: ["update:modelValue"],
2633
2641
  setup(f) {
2634
- const { t: o } = J(), e = X(f, "modelValue"), s = ue(), V = _e(), h = de(), { promptLoader: _ } = we(), { promptMessage: C } = Se(), { restaurants: b } = pe(), x = Y(
2642
+ const { t: o } = J(), e = X(f, "modelValue"), s = ue(), V = _e(), h = de(), { promptLoader: _ } = he(), { promptMessage: C } = Ce(), { restaurants: b } = pe(), x = Y(
2635
2643
  () => b.map(($) => ({ label: $.name, value: $.id }))
2636
2644
  );
2637
2645
  function m($) {
@@ -2647,7 +2655,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2647
2655
  title: o("report.common.delete")
2648
2656
  }) && await _(async () => {
2649
2657
  try {
2650
- await he(e.value._id), await V.getSettings(), h.back();
2658
+ await Ve(e.value._id), await V.getSettings(), h.back();
2651
2659
  } catch (l) {
2652
2660
  s.open({ type: "error", message: l.message });
2653
2661
  }
@@ -2657,7 +2665,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2657
2665
  await _(async () => {
2658
2666
  var $, l, a;
2659
2667
  try {
2660
- (a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && m(e.value.platform.mappings.paymentMethods), await Ve(e.value._id, e.value), await V.getSettings();
2668
+ (a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && m(e.value.platform.mappings.paymentMethods), await ke(e.value._id, e.value), await V.getSettings();
2661
2669
  } catch (u) {
2662
2670
  s.open({ type: "error", message: u.message });
2663
2671
  }
@@ -2739,28 +2747,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2739
2747
  async function v() {
2740
2748
  await _(async () => {
2741
2749
  try {
2742
- await ke(e.value._id), await V.getSettings();
2750
+ await $e(e.value._id), await V.getSettings();
2743
2751
  } catch ($) {
2744
2752
  s.open({ type: "error", message: $.message });
2745
2753
  }
2746
2754
  });
2747
2755
  }
2748
- return ($, l) => {
2756
+ return be(async () => {
2757
+ await V.getSettings();
2758
+ }), ($, l) => {
2749
2759
  var G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se, D;
2750
2760
  const a = S("FmIcon"), u = S("FmButton"), i = S("FmSelect"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmCircularProgress"), E = S("FmCheckbox");
2751
- return (R = (G = e.value) == null ? void 0 : G.platform) != null && R.mappings ? (c(), F("div", cl, [
2752
- t("div", dl, [
2753
- t("div", pl, [
2754
- t("div", ul, T(p(o)("report.integration.connect")), 1),
2755
- t("div", fl, [
2756
- t("div", vl, [
2757
- t("div", gl, [
2761
+ return (R = (G = e.value) == null ? void 0 : G.platform) != null && R.mappings ? (c(), F("div", dl, [
2762
+ t("div", pl, [
2763
+ t("div", ul, [
2764
+ t("div", fl, T(p(o)("report.integration.connect")), 1),
2765
+ t("div", vl, [
2766
+ t("div", gl, [
2767
+ t("div", yl, [
2758
2768
  r(a, {
2759
2769
  name: "refresh",
2760
2770
  class: "p-2 bg-gray-100 rounded-full",
2761
2771
  onClick: v
2762
2772
  }),
2763
- t("span", yl, T(p(o)("report.integration.refreshSetting")), 1)
2773
+ t("span", xl, T(p(o)("report.integration.refreshSetting")), 1)
2764
2774
  ]),
2765
2775
  r(u, {
2766
2776
  variant: "tertiary",
@@ -2776,11 +2786,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2776
2786
  ])
2777
2787
  ])
2778
2788
  ]),
2779
- t("div", xl, [
2780
- t("div", _l, T(p(o)("report.integration.biztory.authenticate")), 1),
2781
- t("div", bl, [
2782
- t("div", wl, "Biztory " + T(p(o)("report.integration.biztory.version")), 1),
2783
- t("div", hl, [
2789
+ t("div", _l, [
2790
+ t("div", bl, T(p(o)("report.integration.biztory.authenticate")), 1),
2791
+ t("div", wl, [
2792
+ t("div", hl, "Biztory " + T(p(o)("report.integration.biztory.version")), 1),
2793
+ t("div", Vl, [
2784
2794
  r(i, {
2785
2795
  modelValue: e.value.platform.mappings.version,
2786
2796
  "onUpdate:modelValue": l[0] || (l[0] = (g) => e.value.platform.mappings.version = g),
@@ -2793,10 +2803,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2793
2803
  ])
2794
2804
  ]),
2795
2805
  r(A, { style: { margin: 0 } }),
2796
- t("div", Vl, [
2797
- t("div", kl, [
2798
- t("div", $l, T(p(o)("report.integration.biztory.subdomain")), 1),
2799
- t("div", Sl, [
2806
+ t("div", kl, [
2807
+ t("div", $l, [
2808
+ t("div", Sl, T(p(o)("report.integration.biztory.subdomain")), 1),
2809
+ t("div", Cl, [
2800
2810
  r(P, {
2801
2811
  modelValue: e.value.platform.subdomain,
2802
2812
  "onUpdate:modelValue": l[1] || (l[1] = (g) => e.value.platform.subdomain = g),
@@ -2804,9 +2814,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2804
2814
  }, null, 8, ["modelValue"])
2805
2815
  ])
2806
2816
  ]),
2807
- t("div", Cl, [
2808
- t("div", Fl, T(p(o)("report.integration.biztory.apiKey")), 1),
2809
- t("div", Dl, [
2817
+ t("div", Fl, [
2818
+ t("div", Dl, T(p(o)("report.integration.biztory.apiKey")), 1),
2819
+ t("div", Ul, [
2810
2820
  r(P, {
2811
2821
  modelValue: e.value.platform.api_key,
2812
2822
  "onUpdate:modelValue": l[2] || (l[2] = (g) => e.value.platform.api_key = g),
@@ -2814,19 +2824,19 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2814
2824
  }, null, 8, ["modelValue"])
2815
2825
  ])
2816
2826
  ]),
2817
- t("div", Ul, [
2818
- t("div", Tl, T(p(o)("report.integration.general")), 1),
2819
- t("div", Il, [
2820
- t("div", Ml, T(p(o)("report.common.name")), 1),
2821
- t("div", Kl, [
2827
+ t("div", Tl, [
2828
+ t("div", Il, T(p(o)("report.integration.general")), 1),
2829
+ t("div", Ml, [
2830
+ t("div", Kl, T(p(o)("report.common.name")), 1),
2831
+ t("div", Al, [
2822
2832
  r(P, {
2823
2833
  modelValue: e.value.name,
2824
2834
  "onUpdate:modelValue": l[3] || (l[3] = (g) => e.value.name = g)
2825
2835
  }, null, 8, ["modelValue"])
2826
2836
  ])
2827
2837
  ]),
2828
- t("div", Al, [
2829
- t("div", Pl, T(p(o)("report.common.location")), 1),
2838
+ t("div", Pl, [
2839
+ t("div", Nl, T(p(o)("report.common.location")), 1),
2830
2840
  r(i, {
2831
2841
  modelValue: e.value.platform.locationIds,
2832
2842
  "onUpdate:modelValue": l[4] || (l[4] = (g) => e.value.platform.locationIds = g),
@@ -2836,8 +2846,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2836
2846
  class: "flex-grow"
2837
2847
  }, null, 8, ["modelValue", "items", "placeholder"])
2838
2848
  ]),
2839
- t("div", Nl, [
2840
- t("div", Rl, T(p(o)("report.integration.grouping.title")), 1),
2849
+ t("div", Rl, [
2850
+ t("div", Ol, T(p(o)("report.integration.grouping.title")), 1),
2841
2851
  r(i, {
2842
2852
  modelValue: e.value.platform.grouping,
2843
2853
  "onUpdate:modelValue": l[5] || (l[5] = (g) => e.value.platform.grouping = g),
@@ -2848,7 +2858,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2848
2858
  disabled: ""
2849
2859
  }, null, 8, ["modelValue", "placeholder"])
2850
2860
  ]),
2851
- e.value.platform.mappings.version == "v1" ? (c(), F("div", Ol, [
2861
+ e.value.platform.mappings.version == "v1" ? (c(), F("div", Bl, [
2852
2862
  l[13] || (l[13] = t("div", { class: "w-[33%]" }, "Payee ID", -1)),
2853
2863
  e.value.platform.mappings.version == "v1" ? (c(), M(K, {
2854
2864
  key: 0,
@@ -2861,14 +2871,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2861
2871
  }, null, 8, ["modelValue"])) : N("", !0)
2862
2872
  ])) : N("", !0)
2863
2873
  ]),
2864
- t("div", Bl, [
2865
- t("div", jl, [
2874
+ t("div", jl, [
2875
+ t("div", Ll, [
2866
2876
  !f.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (c(), M(Q, {
2867
2877
  key: 0,
2868
2878
  size: "xl"
2869
2879
  })) : N("", !0),
2870
- f.retrievedCustomers.isLoaded && f.retrievedCustomers.data && ((j = f.retrievedCustomers.data) == null ? void 0 : j.length) != 0 ? (c(), F("div", Ll, [
2871
- e.value.platform.mappings.version == "v2" ? (c(), M(Me, {
2880
+ f.retrievedCustomers.isLoaded && f.retrievedCustomers.data && ((j = f.retrievedCustomers.data) == null ? void 0 : j.length) != 0 ? (c(), F("div", El, [
2881
+ e.value.platform.mappings.version == "v2" ? (c(), M(Ke, {
2872
2882
  key: 0,
2873
2883
  modelValue: e.value.platform.mappings.payeeId,
2874
2884
  "onUpdate:modelValue": l[7] || (l[7] = (g) => e.value.platform.mappings.payeeId = g),
@@ -2886,21 +2896,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2886
2896
  ])) : N("", !0)
2887
2897
  ])
2888
2898
  ]),
2889
- r(De, {
2899
+ r(Ue, {
2890
2900
  modelValue: e.value.platform,
2891
2901
  "onUpdate:modelValue": l[8] || (l[8] = (g) => e.value.platform = g),
2892
2902
  label: "upload",
2893
2903
  "last-upload-date": (W = e.value.platform) == null ? void 0 : W.lastUploadDate
2894
2904
  }, null, 8, ["modelValue", "last-upload-date"]),
2895
- t("div", El, [
2896
- t("div", zl, T(p(o)("report.integration.biztory.items")), 1),
2905
+ t("div", zl, [
2906
+ t("div", Yl, T(p(o)("report.integration.biztory.items")), 1),
2897
2907
  r(u, {
2898
2908
  variant: "primary",
2899
2909
  icon: "add",
2900
2910
  onClick: l[9] || (l[9] = () => y("items"))
2901
2911
  })
2902
2912
  ]),
2903
- t("div", Yl, [
2913
+ t("div", ql, [
2904
2914
  (c(!0), F(L, null, H((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (g, U) => (c(), M(K, {
2905
2915
  key: `item-${U}`,
2906
2916
  modelValue: e.value.platform.mappings.items[U],
@@ -2913,15 +2923,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2913
2923
  onRemove: () => d("items", U)
2914
2924
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2915
2925
  ]),
2916
- t("div", ql, [
2917
- t("div", Hl, T(p(o)("report.integration.biztory.taxes")), 1),
2926
+ t("div", Hl, [
2927
+ t("div", Xl, T(p(o)("report.integration.biztory.taxes")), 1),
2918
2928
  r(u, {
2919
2929
  variant: "primary",
2920
2930
  icon: "add",
2921
2931
  onClick: l[10] || (l[10] = () => y("taxes"))
2922
2932
  })
2923
2933
  ]),
2924
- t("div", Xl, [
2934
+ t("div", Ql, [
2925
2935
  (c(!0), F(L, null, H((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (g, U) => (c(), M(K, {
2926
2936
  key: `tax-${U}`,
2927
2937
  modelValue: e.value.platform.mappings.taxes[U],
@@ -2934,17 +2944,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2934
2944
  onRemove: () => d("taxes", U)
2935
2945
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2936
2946
  ]),
2937
- t("div", Ql, [
2938
- t("div", Gl, T(p(o)("report.integration.biztory.payments")), 1),
2947
+ t("div", Gl, [
2948
+ t("div", Jl, T(p(o)("report.integration.biztory.payments")), 1),
2939
2949
  r(u, {
2940
2950
  variant: "primary",
2941
2951
  icon: "add",
2942
2952
  onClick: l[11] || (l[11] = () => y("paymentMethods"))
2943
2953
  })
2944
2954
  ]),
2945
- t("div", Jl, [
2955
+ t("div", Wl, [
2946
2956
  l[14] || (l[14] = t("div", { class: "w-[25%]" }, "Payment Term", -1)),
2947
- t("div", Wl, [
2957
+ t("div", Zl, [
2948
2958
  r(K, {
2949
2959
  modelValue: e.value.platform.mappings.paymentTerm,
2950
2960
  "onUpdate:modelValue": l[12] || (l[12] = (g) => e.value.platform.mappings.paymentTerm = g),
@@ -2956,29 +2966,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2956
2966
  }, null, 8, ["modelValue"])
2957
2967
  ])
2958
2968
  ]),
2959
- f.retrievedMethods.isError ? N("", !0) : (c(), F("div", Zl, T(p(o)("report.integration.biztory.paymentTerm")), 1)),
2960
- f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length == 0 && !f.retrievedMethods.isError ? (c(), F("span", en, T(p(o)("report.integration.biztory.noPaymentMethods")), 1)) : N("", !0),
2969
+ f.retrievedMethods.isError ? N("", !0) : (c(), F("div", en, T(p(o)("report.integration.biztory.paymentTerm")), 1)),
2970
+ f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length == 0 && !f.retrievedMethods.isError ? (c(), F("span", tn, T(p(o)("report.integration.biztory.noPaymentMethods")), 1)) : N("", !0),
2961
2971
  f.retrievedMethods.isLoaded ? N("", !0) : (c(), M(Q, {
2962
2972
  key: 2,
2963
2973
  size: "xl"
2964
2974
  })),
2965
- f.retrievedMethods.isError ? (c(), F("span", tn, T(p(o)("report.integration.biztory.error")), 1)) : N("", !0),
2975
+ f.retrievedMethods.isError ? (c(), F("span", on, T(p(o)("report.integration.biztory.error")), 1)) : N("", !0),
2966
2976
  (c(!0), F(L, null, H((D = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.paymentMethods, (g, U) => {
2967
2977
  var O;
2968
2978
  return c(), F("div", {
2969
2979
  key: `payment-${U}`,
2970
2980
  class: "grid-cols-1 grid gap-x-16"
2971
2981
  }, [
2972
- f.retrievedMethods.isLoaded && f.retrievedMethods.data && ((O = f.retrievedMethods.data) == null ? void 0 : O.length) != 0 ? (c(), F("div", on, [
2982
+ f.retrievedMethods.isLoaded && f.retrievedMethods.data && ((O = f.retrievedMethods.data) == null ? void 0 : O.length) != 0 ? (c(), F("div", an, [
2973
2983
  r(E, {
2974
2984
  "model-value": !e.value.platform.mappings.paymentMethods[U].skip,
2975
2985
  value: "",
2976
2986
  "onUpdate:modelValue": (me) => {
2977
- var Ue, Te;
2978
- (Te = (Ue = e.value.platform) == null ? void 0 : Ue.mappings) != null && Te.paymentMethods[U] && (e.value.platform.mappings.paymentMethods[U].skip = !me);
2987
+ var Te, Ie;
2988
+ (Ie = (Te = e.value.platform) == null ? void 0 : Te.mappings) != null && Ie.paymentMethods[U] && (e.value.platform.mappings.paymentMethods[U].skip = !me);
2979
2989
  }
2980
2990
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2981
- r(Me, {
2991
+ r(Ke, {
2982
2992
  modelValue: e.value.platform.mappings.paymentMethods[U],
2983
2993
  "onUpdate:modelValue": (me) => e.value.platform.mappings.paymentMethods[U] = me,
2984
2994
  options: {
@@ -3004,7 +3014,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3004
3014
  };
3005
3015
  }
3006
3016
  });
3007
- function ln(f) {
3017
+ function nn(f) {
3008
3018
  return f.reduce((o, e) => {
3009
3019
  var h, _, C, b, x, m, w, k, d, y, n, v, $, l, a, u, i, A, P, Q, E, G;
3010
3020
  const { invoice: s } = e, V = o.length;
@@ -3047,7 +3057,7 @@ function ln(f) {
3047
3057
  return o;
3048
3058
  }, []);
3049
3059
  }
3050
- const nn = [
3060
+ const sn = [
3051
3061
  {
3052
3062
  accessorKey: "invoice_date",
3053
3063
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -3119,7 +3129,7 @@ const nn = [
3119
3129
  enableSorting: !1
3120
3130
  }
3121
3131
  ];
3122
- function sn(f) {
3132
+ function rn(f) {
3123
3133
  return f.reduce((o, e) => {
3124
3134
  var C, b, x, m, w, k, d, y, n, v;
3125
3135
  const { invoice: s, payments: V } = e, h = o.length;
@@ -3166,7 +3176,7 @@ function sn(f) {
3166
3176
  return o;
3167
3177
  }, []);
3168
3178
  }
3169
- const rn = [
3179
+ const mn = [
3170
3180
  {
3171
3181
  accessorKey: "invoice_date",
3172
3182
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -3232,10 +3242,10 @@ const rn = [
3232
3242
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Method (ID)"),
3233
3243
  enableSorting: !1
3234
3244
  }
3235
- ], mn = { class: "h-full flex flex-col gap-16" }, cn = { class: "flex flex-row gap-2 justify-between items-center" }, dn = {
3245
+ ], cn = { class: "h-full flex flex-col gap-16" }, dn = { class: "flex flex-row gap-2 justify-between items-center" }, pn = {
3236
3246
  key: 0,
3237
3247
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
3238
- }, pn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, un = /* @__PURE__ */ q({
3248
+ }, un = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fn = /* @__PURE__ */ q({
3239
3249
  __name: "Preview",
3240
3250
  props: {
3241
3251
  modelValue: { required: !0 },
@@ -3243,13 +3253,13 @@ const rn = [
3243
3253
  },
3244
3254
  emits: ["update:modelValue"],
3245
3255
  setup(f) {
3246
- const { t: o } = J(), e = X(f, "modelValue"), s = B(!1), V = ue(), { dateRange: h } = Ce(pe()), _ = B([]);
3256
+ const { t: o } = J(), e = X(f, "modelValue"), s = B(!1), V = ue(), { dateRange: h } = Fe(pe()), _ = B([]);
3247
3257
  ve(
3248
3258
  () => h.value,
3249
3259
  async () => {
3250
3260
  if (e.value._id)
3251
3261
  try {
3252
- s.value = !0, _.value = await $e(e.value._id);
3262
+ s.value = !0, _.value = await Se(e.value._id);
3253
3263
  } catch (m) {
3254
3264
  V.open({ message: m.message, type: "error" });
3255
3265
  } finally {
@@ -3263,23 +3273,23 @@ const rn = [
3263
3273
  const C = Y(() => {
3264
3274
  switch (e.value.platform.mappings.version) {
3265
3275
  case "v1":
3266
- return ln(_.value);
3276
+ return nn(_.value);
3267
3277
  case "v2":
3268
- return sn(_.value);
3278
+ return rn(_.value);
3269
3279
  }
3270
3280
  return [];
3271
3281
  }), b = Y(() => {
3272
3282
  switch (e.value.platform.mappings.version) {
3273
3283
  case "v1":
3274
- return nn;
3284
+ return sn;
3275
3285
  case "v2":
3276
- return rn;
3286
+ return mn;
3277
3287
  }
3278
3288
  return [];
3279
3289
  });
3280
3290
  async function x() {
3281
3291
  try {
3282
- e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (s.value = !0, await Ae(e.value._id), V.open({ message: "Upload successful", type: "success" })) : V.open({ message: "Invalid accounting setting", type: "error" });
3292
+ e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (s.value = !0, await Pe(e.value._id), V.open({ message: "Upload successful", type: "success" })) : V.open({ message: "Invalid accounting setting", type: "error" });
3283
3293
  } catch (m) {
3284
3294
  m.message && V.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((w) => V.open({ message: w, type: "error" }));
3285
3295
  } finally {
@@ -3288,11 +3298,11 @@ const rn = [
3288
3298
  }
3289
3299
  return (m, w) => {
3290
3300
  const k = S("FmButton"), d = S("FmCircularProgress"), y = S("FmTable");
3291
- return c(), F("div", mn, [
3292
- t("div", cn, [
3293
- r(Fe, {
3301
+ return c(), F("div", cn, [
3302
+ t("div", dn, [
3303
+ r(De, {
3294
3304
  "date-range": p(h),
3295
- "onUpdate:dateRange": w[0] || (w[0] = (n) => be(h) ? h.value = n : null),
3305
+ "onUpdate:dateRange": w[0] || (w[0] = (n) => we(h) ? h.value = n : null),
3296
3306
  compare: !1
3297
3307
  }, null, 8, ["date-range"]),
3298
3308
  r(k, {
@@ -3302,9 +3312,9 @@ const rn = [
3302
3312
  onClick: x
3303
3313
  }, null, 8, ["loading"])
3304
3314
  ]),
3305
- s.value ? (c(), F("div", dn, [
3315
+ s.value ? (c(), F("div", pn, [
3306
3316
  r(d, { size: "xl" }),
3307
- t("span", pn, T(p(o)("report.common.isLoading")), 1)
3317
+ t("span", un, T(p(o)("report.common.isLoading")), 1)
3308
3318
  ])) : (c(), M(y, {
3309
3319
  key: 1,
3310
3320
  class: "flex overflow-scroll",
@@ -3314,7 +3324,7 @@ const rn = [
3314
3324
  ]);
3315
3325
  };
3316
3326
  }
3317
- }), fn = { class: "h-full relative flex flex-col" }, vn = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, gn = /* @__PURE__ */ q({
3327
+ }), vn = { class: "h-full relative flex flex-col" }, gn = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, yn = /* @__PURE__ */ q({
3318
3328
  __name: "Biztory",
3319
3329
  props: {
3320
3330
  modelValue: { required: !0 },
@@ -3337,11 +3347,11 @@ const rn = [
3337
3347
  switch (s.value) {
3338
3348
  case "preview":
3339
3349
  return {
3340
- component: un
3350
+ component: fn
3341
3351
  };
3342
3352
  case "setting":
3343
3353
  return {
3344
- component: an,
3354
+ component: ln,
3345
3355
  props: {
3346
3356
  retrievedMethods: C.value,
3347
3357
  retrievedCustomers: b.value
@@ -3366,24 +3376,24 @@ const rn = [
3366
3376
  }, d = async () => {
3367
3377
  var y, n;
3368
3378
  (y = e.value.platform.mappings) != null && y.version && await k(
3369
- Ge,
3379
+ Je,
3370
3380
  m,
3371
3381
  C,
3372
3382
  "Failed to fetch payment methods:"
3373
3383
  ), ((n = e.value.platform.mappings) == null ? void 0 : n.version) == "v2" && await k(
3374
- Je,
3384
+ We,
3375
3385
  w,
3376
3386
  b,
3377
3387
  "Failed to fetch customers:"
3378
3388
  ), C.value.isLoaded = !0, b.value.isLoaded = !0;
3379
3389
  };
3380
- return Ee(d), ve(() => {
3390
+ return ze(d), ve(() => {
3381
3391
  var y;
3382
3392
  return (y = e.value.platform.mappings) == null ? void 0 : y.version;
3383
3393
  }, d), (y, n) => {
3384
3394
  var l, a, u;
3385
3395
  const v = S("FmPageHead"), $ = S("FmTabs");
3386
- return c(), F("div", fn, [
3396
+ return c(), F("div", vn, [
3387
3397
  r(v, {
3388
3398
  title: ((l = e.value) == null ? void 0 : l.name) || "Biztory",
3389
3399
  "back-button": !0,
@@ -3400,8 +3410,8 @@ const rn = [
3400
3410
  "onUpdate:modelValue": n[0] || (n[0] = (i) => s.value = i),
3401
3411
  items: V
3402
3412
  }, null, 8, ["model-value"]),
3403
- t("div", vn, [
3404
- (c(), M(xe((a = _.value) == null ? void 0 : a.component), Le({
3413
+ t("div", gn, [
3414
+ (c(), M(xe((a = _.value) == null ? void 0 : a.component), Ee({
3405
3415
  modelValue: e.value,
3406
3416
  "onUpdate:modelValue": n[1] || (n[1] = (i) => e.value = i)
3407
3417
  }, (u = _.value) == null ? void 0 : u.props), null, 16, ["modelValue"]))
@@ -3409,10 +3419,10 @@ const rn = [
3409
3419
  ]);
3410
3420
  };
3411
3421
  }
3412
- }), yn = {
3422
+ }), xn = {
3413
3423
  key: 0,
3414
3424
  class: "flex flex-col h-full"
3415
- }, xn = { class: "flex flex-col gap-16 pb-[24px]" }, _n = { class: "flex flex-row justify-between items-center gap-2" }, bn = { class: "flex flex-row gap-2 items-center" }, wn = { class: "relative group cursor-pointer" }, hn = { 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" }, Vn = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, kn = { class: "flex flex-col gap-16" }, $n = { class: "fm-typo-en-title-sm-800" }, Sn = { class: "flex flex-row items-center max-w-[100%]" }, Cn = { class: "w-[25%]" }, Fn = { class: "flex-grow" }, Dn = { class: "flex flex-row items-center max-w-[100%]" }, Un = { class: "w-[25%]" }, Tn = { class: "flex flex-row items-center gap-x-16" }, In = { class: "fm-typo-en-title-sm-800" }, Mn = { class: "grid-cols-1 grid gap-16" }, Kn = /* @__PURE__ */ q({
3425
+ }, _n = { class: "flex flex-col gap-16 pb-[24px]" }, bn = { class: "flex flex-row justify-between items-center gap-2" }, wn = { class: "flex flex-row gap-2 items-center" }, hn = { class: "relative group cursor-pointer" }, Vn = { 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" }, kn = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, $n = { class: "flex flex-col gap-16" }, Sn = { class: "fm-typo-en-title-sm-800" }, Cn = { class: "flex flex-row items-center max-w-[100%]" }, Fn = { class: "w-[25%]" }, Dn = { class: "flex-grow" }, Un = { class: "flex flex-row items-center max-w-[100%]" }, Tn = { class: "w-[25%]" }, In = { class: "flex flex-row items-center gap-x-16" }, Mn = { class: "fm-typo-en-title-sm-800" }, Kn = { class: "grid-cols-1 grid gap-16" }, An = /* @__PURE__ */ q({
3416
3426
  __name: "Setting",
3417
3427
  props: {
3418
3428
  modelValue: { required: !0 },
@@ -3420,7 +3430,7 @@ const rn = [
3420
3430
  },
3421
3431
  emits: ["update:modelValue"],
3422
3432
  setup(f) {
3423
- const { t: o } = J(), e = X(f, "modelValue"), s = ue(), V = _e(), h = de(), { promptLoader: _ } = we(), { promptMessage: C } = Se(), { restaurants: b } = pe(), x = Y(
3433
+ const { t: o } = J(), e = X(f, "modelValue"), s = ue(), V = _e(), h = de(), { promptLoader: _ } = he(), { promptMessage: C } = Ce(), { restaurants: b } = pe(), x = Y(
3424
3434
  () => b.map((n) => ({ label: n.name, value: n.id }))
3425
3435
  );
3426
3436
  async function m() {
@@ -3429,7 +3439,7 @@ const rn = [
3429
3439
  title: o("report.common.delete")
3430
3440
  }) && await _(async () => {
3431
3441
  try {
3432
- await he(e.value._id), await V.getSettings(), h.back();
3442
+ await Ve(e.value._id), await V.getSettings(), h.back();
3433
3443
  } catch (v) {
3434
3444
  s.open({ type: "error", message: v.message });
3435
3445
  }
@@ -3438,7 +3448,7 @@ const rn = [
3438
3448
  async function w() {
3439
3449
  await _(async () => {
3440
3450
  try {
3441
- await Ve(e.value._id, e.value), await V.getSettings();
3451
+ await ke(e.value._id, e.value), await V.getSettings();
3442
3452
  } catch (n) {
3443
3453
  s.open({ type: "error", message: n.message });
3444
3454
  }
@@ -3465,27 +3475,29 @@ const rn = [
3465
3475
  async function y() {
3466
3476
  await _(async () => {
3467
3477
  try {
3468
- await ke(e.value._id), await V.getSettings();
3478
+ await $e(e.value._id), await V.getSettings();
3469
3479
  } catch (n) {
3470
3480
  s.open({ type: "error", message: n.message });
3471
3481
  }
3472
3482
  });
3473
3483
  }
3474
- return (n, v) => {
3484
+ return be(async () => {
3485
+ await V.getSettings();
3486
+ }), (n, v) => {
3475
3487
  var A, P, Q, E, G;
3476
3488
  const $ = S("FmIcon"), l = S("FmButton"), a = S("FmMenuDivider"), u = S("FmTextField"), i = S("FmSelect");
3477
- return (P = (A = e.value) == null ? void 0 : A.platform) != null && P.mappings ? (c(), F("div", yn, [
3478
- t("div", xn, [
3479
- t("div", _n, [
3489
+ return (P = (A = e.value) == null ? void 0 : A.platform) != null && P.mappings ? (c(), F("div", xn, [
3490
+ t("div", _n, [
3491
+ t("div", bn, [
3480
3492
  v[4] || (v[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
3481
- t("div", bn, [
3482
- t("div", wn, [
3493
+ t("div", wn, [
3494
+ t("div", hn, [
3483
3495
  r($, {
3484
3496
  name: "refresh",
3485
3497
  class: "p-2 bg-gray-100 rounded-full",
3486
3498
  onClick: y
3487
3499
  }),
3488
- t("span", hn, T(p(o)("report.integration.refreshSetting")), 1)
3500
+ t("span", Vn, T(p(o)("report.integration.refreshSetting")), 1)
3489
3501
  ]),
3490
3502
  r(l, {
3491
3503
  variant: "tertiary",
@@ -3501,20 +3513,20 @@ const rn = [
3501
3513
  ])
3502
3514
  ]),
3503
3515
  r(a, { style: { margin: 0 } }),
3504
- t("div", Vn, [
3505
- t("div", kn, [
3506
- t("div", $n, T(p(o)("report.integration.general")), 1),
3507
- t("div", Sn, [
3508
- t("div", Cn, T(p(o)("report.common.name")), 1),
3509
- t("div", Fn, [
3516
+ t("div", kn, [
3517
+ t("div", $n, [
3518
+ t("div", Sn, T(p(o)("report.integration.general")), 1),
3519
+ t("div", Cn, [
3520
+ t("div", Fn, T(p(o)("report.common.name")), 1),
3521
+ t("div", Dn, [
3510
3522
  r(u, {
3511
3523
  modelValue: e.value.name,
3512
3524
  "onUpdate:modelValue": v[0] || (v[0] = (R) => e.value.name = R)
3513
3525
  }, null, 8, ["modelValue"])
3514
3526
  ])
3515
3527
  ]),
3516
- t("div", Dn, [
3517
- t("div", Un, T(p(o)("report.integration.location")), 1),
3528
+ t("div", Un, [
3529
+ t("div", Tn, T(p(o)("report.integration.location")), 1),
3518
3530
  r(i, {
3519
3531
  "model-value": e.value.platform.locationIds[0],
3520
3532
  multiselect: !1,
@@ -3525,20 +3537,20 @@ const rn = [
3525
3537
  }, null, 8, ["model-value", "items"])
3526
3538
  ])
3527
3539
  ]),
3528
- r(De, {
3540
+ r(Ue, {
3529
3541
  modelValue: e.value.platform,
3530
3542
  "onUpdate:modelValue": v[2] || (v[2] = (R) => e.value.platform = R),
3531
3543
  label: p(o)("report.input.email")
3532
3544
  }, null, 8, ["modelValue", "label"]),
3533
- t("div", Tn, [
3534
- t("div", In, T(p(o)("report.integration.iflexiHrms.employee")), 1),
3545
+ t("div", In, [
3546
+ t("div", Mn, T(p(o)("report.integration.iflexiHrms.employee")), 1),
3535
3547
  r(l, {
3536
3548
  variant: "primary",
3537
3549
  icon: "add",
3538
3550
  onClick: v[3] || (v[3] = () => d("employees"))
3539
3551
  })
3540
3552
  ]),
3541
- t("div", Mn, [
3553
+ t("div", Kn, [
3542
3554
  (c(!0), F(L, null, H((G = (E = (Q = e.value) == null ? void 0 : Q.platform) == null ? void 0 : E.mappings) == null ? void 0 : G.employees, (R, j) => (c(), M(K, {
3543
3555
  key: `employee-${j}`,
3544
3556
  modelValue: e.value.platform.mappings.employees[j],
@@ -3556,10 +3568,10 @@ const rn = [
3556
3568
  ])) : N("", !0);
3557
3569
  };
3558
3570
  }
3559
- }), An = { class: "h-full flex flex-col gap-16" }, Pn = { class: "flex flex-row gap-2 justify-between items-center" }, Nn = {
3571
+ }), Pn = { class: "h-full flex flex-col gap-16" }, Nn = { class: "flex flex-row gap-2 justify-between items-center" }, Rn = {
3560
3572
  key: 0,
3561
3573
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
3562
- }, Rn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, On = /* @__PURE__ */ q({
3574
+ }, On = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bn = /* @__PURE__ */ q({
3563
3575
  __name: "Preview",
3564
3576
  props: {
3565
3577
  modelValue: { required: !0 },
@@ -3593,13 +3605,13 @@ const rn = [
3593
3605
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
3594
3606
  enableSorting: !1
3595
3607
  }
3596
- ], V = X(f, "modelValue"), h = B(!1), _ = ue(), { dateRange: C } = Ce(pe());
3608
+ ], V = X(f, "modelValue"), h = B(!1), _ = ue(), { dateRange: C } = Fe(pe());
3597
3609
  ve(
3598
3610
  () => C.value,
3599
3611
  async () => {
3600
3612
  if (V.value._id)
3601
3613
  try {
3602
- h.value = !0, e.value = await $e(V.value._id);
3614
+ h.value = !0, e.value = await Se(V.value._id);
3603
3615
  } catch (x) {
3604
3616
  _.open({ message: x.message, type: "error" });
3605
3617
  } finally {
@@ -3612,7 +3624,7 @@ const rn = [
3612
3624
  );
3613
3625
  async function b() {
3614
3626
  try {
3615
- V.value._id ? (h.value = !0, await Pe(V.value._id)) : _.open({ message: "Invalid setting", type: "error" });
3627
+ V.value._id ? (h.value = !0, await Ne(V.value._id)) : _.open({ message: "Invalid setting", type: "error" });
3616
3628
  } catch (x) {
3617
3629
  _.open({ message: x.message, type: "error" });
3618
3630
  } finally {
@@ -3621,11 +3633,11 @@ const rn = [
3621
3633
  }
3622
3634
  return (x, m) => {
3623
3635
  const w = S("FmButton"), k = S("FmCircularProgress"), d = S("FmTable");
3624
- return c(), F("div", An, [
3625
- t("div", Pn, [
3626
- r(Fe, {
3636
+ return c(), F("div", Pn, [
3637
+ t("div", Nn, [
3638
+ r(De, {
3627
3639
  "date-range": p(C),
3628
- "onUpdate:dateRange": m[0] || (m[0] = (y) => be(C) ? C.value = y : null),
3640
+ "onUpdate:dateRange": m[0] || (m[0] = (y) => we(C) ? C.value = y : null),
3629
3641
  compare: !1
3630
3642
  }, null, 8, ["date-range"]),
3631
3643
  r(w, {
@@ -3635,9 +3647,9 @@ const rn = [
3635
3647
  onClick: b
3636
3648
  }, null, 8, ["loading", "label"])
3637
3649
  ]),
3638
- h.value ? (c(), F("div", Nn, [
3650
+ h.value ? (c(), F("div", Rn, [
3639
3651
  r(k, { size: "xl" }),
3640
- t("span", Rn, T(p(o)("report.common.isLoading")), 1)
3652
+ t("span", On, T(p(o)("report.common.isLoading")), 1)
3641
3653
  ])) : e.value.length > 0 ? (c(), M(d, {
3642
3654
  key: 1,
3643
3655
  class: "flex overflow-scroll",
@@ -3647,7 +3659,7 @@ const rn = [
3647
3659
  ]);
3648
3660
  };
3649
3661
  }
3650
- }), Bn = { class: "h-full relative flex flex-col" }, jn = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Ln = /* @__PURE__ */ q({
3662
+ }), jn = { class: "h-full relative flex flex-col" }, Ln = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, En = /* @__PURE__ */ q({
3651
3663
  __name: "IFlexiHRMS",
3652
3664
  props: {
3653
3665
  modelValue: {},
@@ -3669,9 +3681,9 @@ const rn = [
3669
3681
  ], h = de(), _ = Y(() => {
3670
3682
  switch (s.value) {
3671
3683
  case "preview":
3672
- return On;
3684
+ return Bn;
3673
3685
  case "setting":
3674
- return Kn;
3686
+ return An;
3675
3687
  default:
3676
3688
  return null;
3677
3689
  }
@@ -3679,7 +3691,7 @@ const rn = [
3679
3691
  return (C, b) => {
3680
3692
  var w;
3681
3693
  const x = S("FmPageHead"), m = S("FmTabs");
3682
- return c(), F("div", Bn, [
3694
+ return c(), F("div", jn, [
3683
3695
  r(x, {
3684
3696
  title: ((w = e.value) == null ? void 0 : w.name) || "AutoCount",
3685
3697
  "back-button": !0,
@@ -3696,7 +3708,7 @@ const rn = [
3696
3708
  "onUpdate:modelValue": b[0] || (b[0] = (k) => s.value = k),
3697
3709
  items: V
3698
3710
  }, null, 8, ["model-value"]),
3699
- t("div", jn, [
3711
+ t("div", Ln, [
3700
3712
  (c(), M(xe(_.value), {
3701
3713
  modelValue: e.value,
3702
3714
  "onUpdate:modelValue": b[1] || (b[1] = (k) => e.value = k)
@@ -3705,11 +3717,11 @@ const rn = [
3705
3717
  ]);
3706
3718
  };
3707
3719
  }
3708
- }), En = { class: "px-24 h-full relative" }, Wn = /* @__PURE__ */ q({
3720
+ }), zn = { class: "px-24 h-full relative" }, Zn = /* @__PURE__ */ q({
3709
3721
  __name: "Integration",
3710
3722
  setup(f) {
3711
- const o = B(void 0), { params: e } = ze(), s = _e(), V = B();
3712
- Ee(async () => {
3723
+ const o = B(void 0), { params: e } = Ye(), s = _e(), V = B();
3724
+ ze(async () => {
3713
3725
  s.settings.length === 0 && await s.getSettings();
3714
3726
  }), ve(
3715
3727
  () => s.settings,
@@ -3723,22 +3735,22 @@ const rn = [
3723
3735
  const h = Y(() => {
3724
3736
  switch (o.value) {
3725
3737
  case ce.Xero:
3726
- return eo;
3738
+ return to;
3727
3739
  case ce.Bukku:
3728
- return zo;
3740
+ return Yo;
3729
3741
  case ce.AutoCount:
3730
- return Sa;
3742
+ return Ca;
3731
3743
  case ce.SQL:
3732
- return ml;
3744
+ return cl;
3733
3745
  case ce.iFlexi_HRMS:
3734
- return Ln;
3746
+ return En;
3735
3747
  case ce.Biztory:
3736
- return gn;
3748
+ return yn;
3737
3749
  default:
3738
3750
  return null;
3739
3751
  }
3740
3752
  });
3741
- return (_, C) => (c(), F("div", En, [
3753
+ return (_, C) => (c(), F("div", zn, [
3742
3754
  (c(), M(xe(h.value), {
3743
3755
  modelValue: V.value,
3744
3756
  "onUpdate:modelValue": C[0] || (C[0] = (b) => V.value = b)
@@ -3747,5 +3759,5 @@ const rn = [
3747
3759
  }
3748
3760
  });
3749
3761
  export {
3750
- Wn as default
3762
+ Zn as default
3751
3763
  };