@feedmepos/mf-report 5.4.32 → 5.4.33-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/{App-iq7F0hQ5.js → App-CRTBOuw_.js} +42 -42
  2. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CIDrrVrf.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-Xex8S8XX.js} +2 -2
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-CHKhu1vR.js → Default.vue_vue_type_script_setup_true_lang-BRp-NZ2G.js} +2 -2
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CG9FaKRJ.js → DynamicWidget.vue_vue_type_script_setup_true_lang-FIM7a1Po.js} +4 -4
  5. package/dist/{InsightView-m9gwZU5M.js → InsightView-C9mLdM_4.js} +7 -7
  6. package/dist/{Integration-B7CQ-7rL.js → Integration-tBzSH2YL.js} +1085 -1095
  7. package/dist/{Integrations-C0KEvLA9.js → Integrations-B6ACZi86.js} +3 -3
  8. package/dist/{Layout-BoGS_pUM.js → Layout-CXSFzQgD.js} +1 -1
  9. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-CGsQmh3S.js → LocationSelect.vue_vue_type_script_setup_true_lang-BRAZAoJz.js} +2 -2
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-oIsq1i1c.js → MenuTab.vue_vue_type_script_setup_true_lang-BdDMXz7S.js} +4 -4
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DUC_jUZ0.js → NavigationTab.vue_vue_type_script_setup_true_lang-BAS_eSKD.js} +4 -4
  12. package/dist/{NoData.vue_vue_type_script_setup_true_lang-O7qHGZkw.js → NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js} +1 -1
  13. package/dist/{OverviewView-uMlgqt59.js → OverviewView-DKc5ptLX.js} +5 -5
  14. package/dist/{Report-CQZWb7J5.js → Report-CfYPM3bN.js} +4 -4
  15. package/dist/{ReportEditor-Ie1AgObB.js → ReportEditor-CQw9jHcW.js} +5 -5
  16. package/dist/{ReportView-Cdc3Rqr8.js → ReportView-C925HwDY.js} +7 -7
  17. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-B5OLIl_Y.js → SelectComponent.vue_vue_type_script_setup_true_lang-BVs1C4af.js} +1 -1
  18. package/dist/{Setting-ovX22nYd.js → Setting-CuP-1Wjk.js} +4 -4
  19. package/dist/{TileEditor-BbIklNCF.js → TileEditor-DYJmSgIT.js} +8 -8
  20. package/dist/{TransitionFade-CKZbKQsR.js → TransitionFade-CpucF6O6.js} +4 -4
  21. package/dist/app.js +11 -11
  22. package/dist/{global-loader-D9UMph7l.js → global-loader-BqFQzk46.js} +912 -901
  23. package/dist/{index-CxVnRxOJ.js → index-Cmh079Bh.js} +1 -1
  24. package/dist/{report-schema-BEEUlheS.js → report-schema-OJAFh4P6.js} +1 -1
  25. package/dist/{timeFormat-BRqkZ3bP.js → timeFormat-CAyeO7-a.js} +1 -1
  26. package/dist/{v4-D67i4aLh.js → v4-BOOklPpL.js} +1 -1
  27. package/package.json +2 -2
@@ -1,17 +1,17 @@
1
- import { defineComponent as H, mergeModels as _e, useModel as Q, computed as z, resolveComponent as $, createElementBlock as F, openBlock as c, createElementVNode as t, createCommentVNode as R, normalizeClass as Ke, Fragment as L, renderList as X, createBlock as K, createVNode as i, withCtx as xe, toDisplayString as T, unref as f, ref as B, watch as ge, isRef as he, h as I, resolveDynamicComponent as be, mergeProps as Le, onMounted as Ee } from "vue";
2
- import { useRouter as pe, useRoute as ze } from "vue-router";
3
- import { u as W, I as de, d as je, e as we, f as ke, b as ue, q as Ye, m as qe, p as Ve, r as $e, s as Se, t as Ce, v as Ae, w as He, x as Xe, y as Qe, A as ve, z as Pe, B as Ge, E as Je } from "./global-loader-D9UMph7l.js";
4
- import { u as Fe } from "./message-dialog-UoMWOnil.js";
5
- import { useSnackbar as fe } from "@feedmepos/ui-library";
6
- import { s as We } from "./index-CxVnRxOJ.js";
7
- import { storeToRefs as De } from "pinia";
8
- import { _ as Ue } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-CIDrrVrf.js";
1
+ import { defineComponent as q, mergeModels as ye, useModel as X, computed as Y, resolveComponent as S, createElementBlock as C, openBlock as c, createElementVNode as t, createCommentVNode as N, normalizeClass as Ke, Fragment as L, renderList as H, createBlock as M, createVNode as i, withCtx as ge, toDisplayString as T, unref as f, 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 ke, s as Ve, 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";
5
+ import { useSnackbar as ue } from "@feedmepos/ui-library";
6
+ import { s as We } from "./index-Cmh079Bh.js";
7
+ import { storeToRefs as Ce } from "pinia";
8
+ import { _ as Fe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-Xex8S8XX.js";
9
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 = {
10
10
  key: 0,
11
11
  class: "w-[24px] flex items-center"
12
- }, A = /* @__PURE__ */ H({
12
+ }, K = /* @__PURE__ */ q({
13
13
  __name: "MappingField",
14
- props: /* @__PURE__ */ _e({
14
+ props: /* @__PURE__ */ ye({
15
15
  removable: {
16
16
  type: Boolean,
17
17
  default: !1
@@ -32,68 +32,68 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
32
32
  modelValue: { required: !0 },
33
33
  modelModifiers: {}
34
34
  }),
35
- emits: /* @__PURE__ */ _e(["remove"], ["update:modelValue"]),
35
+ emits: /* @__PURE__ */ ye(["remove"], ["update:modelValue"]),
36
36
  setup(g, { emit: o }) {
37
- const e = Q(g, "modelValue"), n = g, k = z(
38
- () => Object.keys(n.options).map((x) => {
39
- const D = n.options[x];
37
+ const e = X(g, "modelValue"), n = g, V = Y(
38
+ () => Object.keys(n.options).map((_) => {
39
+ const F = n.options[_];
40
40
  return {
41
- placeholder: D.placeholder,
42
- key: x,
43
- editable: D.editable
41
+ placeholder: F.placeholder,
42
+ key: _,
43
+ editable: F.editable
44
44
  };
45
45
  })
46
- ), b = o;
47
- return (x, D) => {
48
- const w = $("FmTextField"), m = $("FmTooltip"), d = $("FmIcon");
49
- return c(), F("div", Ze, [
46
+ ), w = o;
47
+ return (_, F) => {
48
+ const h = S("FmTextField"), m = S("FmTooltip"), d = S("FmIcon");
49
+ return c(), C("div", Ze, [
50
50
  t("div", {
51
51
  class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
52
52
  }, [
53
- (c(!0), F(L, null, X(k.value, (h) => {
54
- var _;
55
- return c(), F(L, {
56
- key: h.key
53
+ (c(!0), C(L, null, H(V.value, (k) => {
54
+ var b;
55
+ return c(), C(L, {
56
+ key: k.key
57
57
  }, [
58
- h.editable ? (c(), F("div", {
58
+ k.editable ? (c(), C("div", {
59
59
  key: 0,
60
60
  class: Ke(`${g.removable ? "w-[50%]" : "w-[100%]"}`)
61
61
  }, [
62
- i(w, {
63
- "model-value": e.value[h.key],
64
- placeholder: h.placeholder,
62
+ i(h, {
63
+ "model-value": e.value[k.key],
64
+ placeholder: k.placeholder,
65
65
  type: g.type,
66
66
  rules: g.rules,
67
67
  "onUpdate:modelValue": (u) => {
68
68
  let p = u;
69
69
  g.type === "number" && (p = Number(u)), e.value = {
70
70
  ...e.value,
71
- [h.key]: p
71
+ [k.key]: p
72
72
  };
73
73
  }
74
74
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
75
- ], 2)) : (c(), K(m, {
75
+ ], 2)) : (c(), M(m, {
76
76
  key: 1,
77
- content: (_ = e.value[h.key]) == null ? void 0 : _.toString(),
77
+ content: (b = e.value[k.key]) == null ? void 0 : b.toString(),
78
78
  class: "w-[50%]"
79
79
  }, {
80
- default: xe(() => [
81
- t("div", et, T(e.value[h.key]), 1)
80
+ default: ge(() => [
81
+ t("div", et, T(e.value[k.key]), 1)
82
82
  ]),
83
83
  _: 2
84
84
  }, 1032, ["content"]))
85
85
  ], 64);
86
86
  }), 128))
87
87
  ], 2),
88
- g.removable ? (c(), F("div", tt, [
88
+ g.removable ? (c(), C("div", tt, [
89
89
  i(d, {
90
90
  color: "system-error-300",
91
91
  class: "cursor-pointer",
92
92
  name: "close",
93
93
  size: "md",
94
- onClick: D[0] || (D[0] = (h) => b("remove"))
94
+ onClick: F[0] || (F[0] = (k) => w("remove"))
95
95
  })
96
- ])) : R("", !0)
96
+ ])) : N("", !0)
97
97
  ]);
98
98
  };
99
99
  }
@@ -103,9 +103,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
103
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 = {
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%]" }, Te = /* @__PURE__ */ H({
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({
107
107
  __name: "UploadSection",
108
- props: /* @__PURE__ */ _e({
108
+ props: /* @__PURE__ */ ye({
109
109
  label: {
110
110
  type: String,
111
111
  default: "upload"
@@ -120,64 +120,64 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
120
120
  }),
121
121
  emits: ["update:modelValue"],
122
122
  setup(g) {
123
- const { t: o } = W(), e = Q(g, "modelValue"), n = z(() => {
123
+ const { t: o } = J(), e = X(g, "modelValue"), n = Y(() => {
124
124
  switch (e.value.name) {
125
- case de.AutoCount:
126
- case de.SQL:
127
- case de.iFlexi_HRMS:
125
+ case ce.AutoCount:
126
+ case ce.SQL:
127
+ case ce.iFlexi_HRMS:
128
128
  return !0;
129
129
  default:
130
130
  return !1;
131
131
  }
132
132
  });
133
- return (k, b) => {
133
+ return (V, w) => {
134
134
  var m, d;
135
- const x = $("FmSwitch"), D = $("FmTextField"), w = $("FmTimePicker");
136
- return c(), F(L, null, [
135
+ const _ = S("FmSwitch"), F = S("FmTextField"), h = S("FmTimePicker");
136
+ return c(), C(L, null, [
137
137
  t("div", ot, [
138
138
  t("div", at, T(f(o)("report.integration.auto", { label: g.label })), 1),
139
- g.label == "upload" ? (c(), F("div", lt, T(f(o)("report.integration.lastUploadDate")) + ": " + T(g.lastUploadDate ? f(je)(g.lastUploadDate).format("MMMM D, YYYY h:mm A") : f(o)("report.integration.noData.title")), 1)) : R("", !0)
139
+ g.label == "upload" ? (c(), C("div", lt, T(f(o)("report.integration.lastUploadDate")) + ": " + T(g.lastUploadDate ? f(je)(g.lastUploadDate).format("MMMM D, YYYY h:mm A") : f(o)("report.integration.noData.title")), 1)) : N("", !0)
140
140
  ]),
141
141
  t("div", nt, [
142
142
  t("div", st, T(f(o)("report.common.enable")), 1),
143
- i(x, {
143
+ i(_, {
144
144
  modelValue: e.value.enable,
145
- "onUpdate:modelValue": b[0] || (b[0] = (h) => e.value.enable = h),
145
+ "onUpdate:modelValue": w[0] || (w[0] = (k) => e.value.enable = k),
146
146
  style: { gap: "0px" }
147
147
  }, null, 8, ["modelValue"])
148
148
  ]),
149
- n.value ? (c(), F("div", it, [
149
+ n.value ? (c(), C("div", it, [
150
150
  t("div", rt, T(f(o)("report.common.email")), 1),
151
151
  t("div", mt, [
152
- i(D, {
152
+ i(F, {
153
153
  "model-value": (e.value.emails || []).join(","),
154
154
  placeholder: "Email",
155
- "onUpdate:modelValue": b[1] || (b[1] = (h) => {
155
+ "onUpdate:modelValue": w[1] || (w[1] = (k) => {
156
156
  switch (e.value.name) {
157
- case f(de).AutoCount:
158
- case f(de).SQL:
159
- case f(de).iFlexi_HRMS:
160
- e.value.emails = h.split(",");
157
+ case f(ce).AutoCount:
158
+ case f(ce).SQL:
159
+ case f(ce).iFlexi_HRMS:
160
+ e.value.emails = k.split(",");
161
161
  break;
162
162
  }
163
163
  })
164
164
  }, null, 8, ["model-value"])
165
165
  ])
166
- ])) : R("", !0),
166
+ ])) : N("", !0),
167
167
  t("div", ct, [
168
168
  t("div", dt, [
169
169
  t("div", pt, T(f(We)(g.label)) + " time ", 1),
170
170
  t("div", ut, [
171
- i(w, {
171
+ i(h, {
172
172
  class: "gap-[0px]",
173
173
  "model-value": f(je)().hour(((m = e.value.triggerTime) == null ? void 0 : m.hour) ?? 0).minute(((d = e.value.triggerTime) == null ? void 0 : d.minute) ?? 0).format("HH:mm"),
174
- "onUpdate:modelValue": b[2] || (b[2] = (h) => {
175
- h && (e.value.triggerTime.hour = Number(h.split(":")[0]), e.value.triggerTime.minute = Number(h.split(":")[1]));
174
+ "onUpdate:modelValue": w[2] || (w[2] = (k) => {
175
+ k && (e.value.triggerTime.hour = Number(k.split(":")[0]), e.value.triggerTime.minute = Number(k.split(":")[1]));
176
176
  })
177
177
  }, null, 8, ["model-value"])
178
178
  ])
179
179
  ]),
180
- i(A, {
180
+ i(K, {
181
181
  "model-value": {
182
182
  label: f(o)("report.integration.delayDay"),
183
183
  delayDay: e.value.delayDay
@@ -187,9 +187,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
187
187
  label: { placeholder: f(o)("report.integration.delayDay"), editable: !1 },
188
188
  delayDay: { placeholder: f(o)("report.integration.delayDay"), editable: !0 }
189
189
  },
190
- rules: [(h) => h > 0 || "Delay days must be greater than 0"],
191
- "onUpdate:modelValue": b[3] || (b[3] = (h) => {
192
- e.value.delayDay = h.delayDay;
190
+ rules: [(k) => k > 0 || "Delay days must be greater than 0"],
191
+ "onUpdate:modelValue": w[3] || (w[3] = (k) => {
192
+ e.value.delayDay = k.delayDay;
193
193
  })
194
194
  }, null, 8, ["model-value", "options", "rules"])
195
195
  ])
@@ -202,9 +202,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
202
202
  }, gt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, yt = {
203
203
  key: 0,
204
204
  class: "w-[24px] flex items-center"
205
- }, Me = /* @__PURE__ */ H({
205
+ }, Me = /* @__PURE__ */ q({
206
206
  __name: "MappingDropdown",
207
- props: /* @__PURE__ */ _e({
207
+ props: /* @__PURE__ */ ye({
208
208
  removable: {
209
209
  type: Boolean,
210
210
  default: !1
@@ -229,9 +229,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
229
229
  modelValue: { required: !0 },
230
230
  modelModifiers: {}
231
231
  }),
232
- emits: /* @__PURE__ */ _e(["remove"], ["update:modelValue"]),
232
+ emits: /* @__PURE__ */ ye(["remove"], ["update:modelValue"]),
233
233
  setup(g, { emit: o }) {
234
- const e = Q(g, "modelValue"), n = g, k = z(
234
+ const e = X(g, "modelValue"), n = g, V = Y(
235
235
  () => Object.keys(n.options).map((m) => {
236
236
  const d = n.options[m];
237
237
  return {
@@ -241,61 +241,61 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
241
241
  dropdownOptions: d.dropdownOptions
242
242
  };
243
243
  })
244
- ), b = (m, d) => {
244
+ ), w = (m, d) => {
245
245
  n.singleValueMode ? e.value = n.type === "number" ? Number(m) : m : d && (e.value = {
246
246
  ...e.value,
247
247
  [d]: n.type === "number" ? Number(m) : m
248
248
  });
249
- }, x = (m) => {
249
+ }, _ = (m) => {
250
250
  var d;
251
251
  return n.singleValueMode ? n.options.key.placeholder : (d = e.value[m.key]) == null ? void 0 : d.toString();
252
- }, D = (m) => n.singleValueMode ? e.value : e.value[m.key], w = o;
252
+ }, F = (m) => n.singleValueMode ? e.value : e.value[m.key], h = o;
253
253
  return (m, d) => {
254
- const h = $("FmSelect"), _ = $("FmTextField"), u = $("FmTooltip"), p = $("FmIcon");
255
- return c(), F("div", ft, [
254
+ const k = S("FmSelect"), b = S("FmTextField"), u = S("FmTooltip"), p = S("FmIcon");
255
+ return c(), C("div", ft, [
256
256
  t("div", {
257
257
  class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
258
258
  }, [
259
- (c(!0), F(L, null, X(k.value, (r) => (c(), F(L, {
259
+ (c(!0), C(L, null, H(V.value, (r) => (c(), C(L, {
260
260
  key: r.key
261
261
  }, [
262
- r.editable ? (c(), F("div", vt, [
263
- r.dropdownOptions ? (c(), K(h, {
262
+ r.editable ? (c(), C("div", vt, [
263
+ r.dropdownOptions ? (c(), M(k, {
264
264
  key: 0,
265
- "model-value": D(r),
265
+ "model-value": F(r),
266
266
  placeholder: r.placeholder,
267
267
  items: r.dropdownOptions,
268
268
  "shift-menu": !0,
269
- "onUpdate:modelValue": (y) => b(y, r.key)
270
- }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (c(), K(_, {
269
+ "onUpdate:modelValue": (x) => w(x, r.key)
270
+ }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (c(), M(b, {
271
271
  key: 1,
272
- "model-value": D(r),
272
+ "model-value": F(r),
273
273
  placeholder: r.placeholder,
274
274
  type: g.type,
275
275
  rules: g.rules,
276
- "onUpdate:modelValue": (y) => b(y, r.key)
276
+ "onUpdate:modelValue": (x) => w(x, r.key)
277
277
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
278
- ])) : (c(), K(u, {
278
+ ])) : (c(), M(u, {
279
279
  key: 1,
280
- content: x(r),
280
+ content: _(r),
281
281
  class: "w-[50%]"
282
282
  }, {
283
- default: xe(() => [
284
- t("div", gt, T(x(r)), 1)
283
+ default: ge(() => [
284
+ t("div", gt, T(_(r)), 1)
285
285
  ]),
286
286
  _: 2
287
287
  }, 1032, ["content"]))
288
288
  ], 64))), 128))
289
289
  ], 2),
290
- g.removable ? (c(), F("div", yt, [
290
+ g.removable ? (c(), C("div", yt, [
291
291
  i(p, {
292
292
  color: "system-error-300",
293
293
  class: "cursor-pointer",
294
294
  name: "close",
295
295
  size: "md",
296
- onClick: d[0] || (d[0] = (r) => w("remove"))
296
+ onClick: d[0] || (d[0] = (r) => h("remove"))
297
297
  })
298
- ])) : R("", !0)
298
+ ])) : N("", !0)
299
299
  ]);
300
300
  };
301
301
  }
@@ -320,9 +320,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
320
320
  }, Yt = {
321
321
  key: 8,
322
322
  class: "xs:grid-cols-1 grid-cols-2 grid gap-16"
323
- }, qt = /* @__PURE__ */ H({
323
+ }, qt = /* @__PURE__ */ q({
324
324
  __name: "Setting",
325
- props: /* @__PURE__ */ _e({
325
+ props: /* @__PURE__ */ ye({
326
326
  tenantOptions: {
327
327
  type: Object,
328
328
  required: !0
@@ -341,32 +341,32 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
341
341
  }),
342
342
  emits: ["update:modelValue"],
343
343
  setup(g) {
344
- const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = B(!1), d = z(
345
- () => w.map((v) => ({ label: v.name, value: v.id }))
346
- ), h = z(() => {
344
+ const { t: o } = J(), e = X(g, "modelValue"), n = ue(), V = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = B(!1), d = Y(
345
+ () => h.map((v) => ({ label: v.name, value: v.id }))
346
+ ), k = Y(() => {
347
347
  var v, s;
348
348
  return m.value ? "Connecting" : (s = (v = e.value) == null ? void 0 : v.platform) != null && s.accessToken ? "Disconnect" : "Connect";
349
- }), _ = B(0);
349
+ }), b = B(0);
350
350
  async function u() {
351
351
  var v;
352
352
  if (m.value)
353
353
  n.open({ type: "error", message: "Connecting in progress" });
354
354
  else if ((v = e.value.platform) != null && v.accessToken)
355
- await D({
355
+ await F({
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 k.getSettings());
358
+ }) && (await Ye(e.value._id), await V.getSettings());
359
359
  else if (e.value._id)
360
360
  try {
361
361
  const s = await qe(e.value._id);
362
362
  m.value = !0;
363
- const P = setInterval(async () => {
364
- var N;
365
- _.value += 1;
363
+ const A = setInterval(async () => {
364
+ var P;
365
+ b.value += 1;
366
366
  try {
367
- await k.getSettings();
367
+ await V.getSettings();
368
368
  } finally {
369
- (_.value === 12 || (N = e.value.platform) != null && N.accessToken) && (m.value = !1, P && clearInterval(P), _.value = 0);
369
+ (b.value === 12 || (P = e.value.platform) != null && P.accessToken) && (m.value = !1, A && clearInterval(A), b.value = 0);
370
370
  }
371
371
  }, 5e3);
372
372
  window.open(s.redirect, "_blank");
@@ -377,42 +377,42 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
377
377
  n.open({ type: "error", message: `invalid accounting ${e.value._id}` });
378
378
  }
379
379
  async function p() {
380
- await D({
380
+ await F({
381
381
  message: `Confirm delete ${e.value.name}?`,
382
382
  title: "Delete"
383
- }) && await x(async () => {
383
+ }) && await _(async () => {
384
384
  try {
385
- await Ve(e.value._id), await k.getSettings(), b.back();
385
+ await he(e.value._id), await V.getSettings(), w.back();
386
386
  } catch (s) {
387
387
  n.open({ type: "error", message: s.message });
388
388
  }
389
389
  });
390
390
  }
391
391
  async function r() {
392
- await x(async () => {
392
+ await _(async () => {
393
393
  try {
394
- await $e(e.value._id, e.value), await k.getSettings();
394
+ await ke(e.value._id, e.value), await V.getSettings();
395
395
  } catch (v) {
396
396
  n.open({ type: "error", message: v.message });
397
397
  }
398
398
  });
399
399
  }
400
- function y(v) {
401
- const s = g.tenantOptions.data.find((P) => P.value === v);
400
+ function x(v) {
401
+ const s = g.tenantOptions.data.find((A) => A.value === v);
402
402
  s && e.value.platform && (e.value.platform.tenant = {
403
403
  id: s.value,
404
404
  name: s.label
405
405
  });
406
406
  }
407
- function V(v, s) {
408
- var P, N;
409
- (N = (P = e.value.platform) == null ? void 0 : P.mappings) != null && N[v] && (e.value.platform.mappings[v] = e.value.platform.mappings[v].filter(
410
- (G, Y) => Y !== s
407
+ function $(v, s) {
408
+ var A, P;
409
+ (P = (A = e.value.platform) == null ? void 0 : A.mappings) != null && P[v] && (e.value.platform.mappings[v] = e.value.platform.mappings[v].filter(
410
+ (Q, E) => E !== s
411
411
  ));
412
412
  }
413
413
  function l(v) {
414
- var s, P;
415
- (P = (s = e.value.platform) == null ? void 0 : s.mappings) != null && P[v] && (e.value.platform.mappings[v] = [
414
+ var s, A;
415
+ (A = (s = e.value.platform) == null ? void 0 : s.mappings) != null && A[v] && (e.value.platform.mappings[v] = [
416
416
  ...e.value.platform.mappings[v],
417
417
  v === "items" ? {
418
418
  feedmeKey: "",
@@ -428,36 +428,36 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
428
428
  ]);
429
429
  }
430
430
  async function a() {
431
- await x(async () => {
431
+ await _(async () => {
432
432
  try {
433
- await Se(e.value._id), await k.getSettings();
433
+ await Ve(e.value._id), await V.getSettings();
434
434
  } catch (v) {
435
435
  n.open({ type: "error", message: v.message });
436
436
  }
437
437
  });
438
438
  }
439
439
  return (v, s) => {
440
- var E, Z, ee, te, oe, ae, le, ne, se, ie, U, S, C, M, q, re, ye, Ne, Re, Oe, Be;
441
- const P = $("FmIcon"), N = $("FmButton"), G = $("FmMenuDivider"), Y = $("FmCircularProgress"), J = $("FmSelect"), O = $("FmTextField"), j = $("FmSwitch");
442
- return (Z = (E = e.value) == null ? void 0 : E.platform) != null && Z.mappings ? (c(), F("div", xt, [
440
+ var z, W, Z, ee, te, oe, ae, le, ne, se, D, y, U, O, me, Ue, Te, Ne, Re, Oe, Be;
441
+ 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(), C("div", xt, [
443
443
  t("div", _t, [
444
444
  t("div", bt, [
445
445
  s[10] || (s[10] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
446
446
  t("div", wt, [
447
447
  t("div", ht, [
448
- i(P, {
448
+ i(A, {
449
449
  name: "refresh",
450
450
  class: "p-2 bg-gray-100 rounded-full",
451
451
  onClick: a
452
452
  }),
453
453
  s[9] || (s[9] = t("span", { 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" }, " Repopulate the fields based on the dates selected in Preview. ", -1))
454
454
  ]),
455
- i(N, {
455
+ i(P, {
456
456
  variant: "tertiary",
457
457
  label: "Delete",
458
458
  onClick: p
459
459
  }),
460
- i(N, {
460
+ i(P, {
461
461
  variant: "primary",
462
462
  label: "Update",
463
463
  onClick: r
@@ -465,28 +465,28 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
465
465
  ])
466
466
  ])
467
467
  ]),
468
- i(G, { style: { margin: 0 } }),
468
+ i(Q, { style: { margin: 0 } }),
469
469
  t("div", kt, [
470
470
  s[21] || (s[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
471
  t("div", Vt, [
472
472
  t("div", $t, [
473
- i(N, {
473
+ i(P, {
474
474
  disabled: m.value,
475
475
  variant: "primary",
476
- label: h.value,
476
+ label: k.value,
477
477
  onClick: u
478
478
  }, null, 8, ["disabled", "label"])
479
479
  ]),
480
- !g.tenantOptions.isLoaded && ((ee = e.value.platform) != null && ee.accessToken) ? (c(), K(Y, {
480
+ !g.tenantOptions.isLoaded && ((Z = e.value.platform) != null && Z.accessToken) ? (c(), M(E, {
481
481
  key: 0,
482
482
  size: "xl"
483
- })) : R("", !0),
484
- i(J, {
483
+ })) : N("", !0),
484
+ i(G, {
485
485
  class: "flex-grow",
486
486
  items: g.tenantOptions.data || [],
487
- "model-value": (te = e.value.platform.tenant) == null ? void 0 : te.id,
488
- placeholder: g.tenantOptions.data ? "Select tenant " : (oe = e.value.platform.tenant) == null ? void 0 : oe.name,
489
- "onUpdate:modelValue": y
487
+ "model-value": (ee = e.value.platform.tenant) == null ? void 0 : ee.id,
488
+ placeholder: g.tenantOptions.data ? "Select tenant " : (te = e.value.platform.tenant) == null ? void 0 : te.name,
489
+ "onUpdate:modelValue": x
490
490
  }, null, 8, ["items", "model-value", "placeholder"])
491
491
  ]),
492
492
  t("div", St, [
@@ -494,17 +494,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
494
494
  t("div", Ct, [
495
495
  s[11] || (s[11] = t("div", { class: "w-[25%]" }, "Name", -1)),
496
496
  t("div", Ft, [
497
- i(O, {
497
+ i(R, {
498
498
  modelValue: e.value.name,
499
- "onUpdate:modelValue": s[0] || (s[0] = (me) => e.value.name = me)
499
+ "onUpdate:modelValue": s[0] || (s[0] = (ie) => e.value.name = ie)
500
500
  }, null, 8, ["modelValue"])
501
501
  ])
502
502
  ]),
503
503
  t("div", Dt, [
504
504
  s[12] || (s[12] = t("div", { class: "w-[25%]" }, "Location", -1)),
505
- i(J, {
505
+ i(G, {
506
506
  modelValue: e.value.platform.locationIds,
507
- "onUpdate:modelValue": s[1] || (s[1] = (me) => e.value.platform.locationIds = me),
507
+ "onUpdate:modelValue": s[1] || (s[1] = (ie) => e.value.platform.locationIds = ie),
508
508
  multiselect: !0,
509
509
  items: d.value,
510
510
  placeholder: "Select location",
@@ -512,20 +512,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
512
512
  }, null, 8, ["modelValue", "items"])
513
513
  ])
514
514
  ]),
515
- i(Te, {
515
+ i(De, {
516
516
  modelValue: e.value.platform,
517
- "onUpdate:modelValue": s[2] || (s[2] = (me) => e.value.platform = me),
517
+ "onUpdate:modelValue": s[2] || (s[2] = (ie) => e.value.platform = ie),
518
518
  label: "upload",
519
- "last-upload-date": (ae = e.value.platform) == null ? void 0 : ae.lastUploadDate
519
+ "last-upload-date": (oe = e.value.platform) == null ? void 0 : oe.lastUploadDate
520
520
  }, null, 8, ["modelValue", "last-upload-date"]),
521
521
  t("div", Ut, [
522
522
  s[20] || (s[20] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "Mapping", -1)),
523
523
  t("div", Tt, [
524
524
  s[14] || (s[14] = t("div", { class: "w-[25%]" }, "Contact", -1)),
525
525
  t("div", It, [
526
- i(O, {
526
+ i(R, {
527
527
  modelValue: e.value.platform.mappings.contact.xeroAccount,
528
- "onUpdate:modelValue": s[3] || (s[3] = (me) => e.value.platform.mappings.contact.xeroAccount = me),
528
+ "onUpdate:modelValue": s[3] || (s[3] = (ie) => e.value.platform.mappings.contact.xeroAccount = ie),
529
529
  placeholder: "Contact account number"
530
530
  }, null, 8, ["modelValue"])
531
531
  ])
@@ -536,8 +536,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
536
536
  i(j, {
537
537
  "model-value": e.value.platform.discountItem ?? !1,
538
538
  style: { gap: 0 },
539
- "onUpdate:modelValue": s[4] || (s[4] = (me) => {
540
- e.value.platform.discountItem = me;
539
+ "onUpdate:modelValue": s[4] || (s[4] = (ie) => {
540
+ e.value.platform.discountItem = ie;
541
541
  })
542
542
  }, null, 8, ["model-value"])
543
543
  ])
@@ -548,30 +548,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
548
548
  i(j, {
549
549
  "model-value": e.value.platform.mappings.isCombineRefund ?? !1,
550
550
  style: { gap: 0 },
551
- "onUpdate:modelValue": s[5] || (s[5] = (me) => {
552
- e.value.platform.mappings.isCombineRefund = me;
551
+ "onUpdate:modelValue": s[5] || (s[5] = (ie) => {
552
+ e.value.platform.mappings.isCombineRefund = ie;
553
553
  })
554
554
  }, null, 8, ["model-value"])
555
555
  ])
556
556
  ]),
557
557
  t("div", Nt, [
558
558
  s[17] || (s[17] = t("div", { class: "fm-typo-en-title-sm-800" }, "Taxes", -1)),
559
- i(N, {
559
+ i(P, {
560
560
  variant: "primary",
561
561
  icon: "add",
562
562
  onClick: s[6] || (s[6] = () => l("taxes"))
563
563
  })
564
564
  ]),
565
- g.taxOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", Rt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
566
- !g.taxOptions.isLoaded && ((le = e.value.platform) != null && le.accessToken) ? (c(), K(Y, {
565
+ g.taxOptions.isError || e.value.platform.accessToken == null ? (c(), C("div", Rt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
566
+ !g.taxOptions.isLoaded && ((ae = e.value.platform) != null && ae.accessToken) ? (c(), M(E, {
567
567
  key: 1,
568
568
  size: "xl"
569
- })) : R("", !0),
570
- ((ne = g.taxOptions.data) == null ? void 0 : ne.length) > 0 ? (c(), F("div", Ot, [
571
- (c(!0), F(L, null, X((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.taxes, (me, ce) => (c(), K(Me, {
572
- key: `tax-${ce}`,
573
- modelValue: e.value.platform.mappings.taxes[ce],
574
- "onUpdate:modelValue": (Ie) => e.value.platform.mappings.taxes[ce] = Ie,
569
+ })) : N("", !0),
570
+ ((le = g.taxOptions.data) == null ? void 0 : le.length) > 0 ? (c(), C("div", Ot, [
571
+ (c(!0), C(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
+ key: `tax-${re}`,
573
+ modelValue: e.value.platform.mappings.taxes[re],
574
+ "onUpdate:modelValue": (Ie) => e.value.platform.mappings.taxes[re] = Ie,
575
575
  options: {
576
576
  feedmeKey: { placeholder: "Feedme Key", editable: !0 },
577
577
  xeroAccount: {
@@ -581,27 +581,27 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
581
581
  }
582
582
  },
583
583
  removable: !0,
584
- onRemove: () => V("taxes", ce)
584
+ onRemove: () => $("taxes", re)
585
585
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
586
- ])) : R("", !0),
586
+ ])) : N("", !0),
587
587
  t("div", Bt, [
588
588
  s[18] || (s[18] = t("div", { class: "fm-typo-en-title-sm-800" }, "Items", -1)),
589
- i(N, {
589
+ i(P, {
590
590
  variant: "primary",
591
591
  icon: "add",
592
592
  onClick: s[7] || (s[7] = () => l("items"))
593
593
  })
594
594
  ]),
595
- g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", jt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
596
- !g.accountCodeOptions.isLoaded && ((S = e.value.platform) != null && S.accessToken) ? (c(), K(Y, {
595
+ g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), C("div", jt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
596
+ !g.accountCodeOptions.isLoaded && ((y = e.value.platform) != null && y.accessToken) ? (c(), M(E, {
597
597
  key: 4,
598
598
  size: "xl"
599
- })) : R("", !0),
600
- ((C = g.accountCodeOptions.data) == null ? void 0 : C.length) > 0 ? (c(), F("div", Lt, [
601
- (c(!0), F(L, null, X((re = (q = (M = e.value) == null ? void 0 : M.platform) == null ? void 0 : q.mappings) == null ? void 0 : re.items, (me, ce) => (c(), K(Me, {
602
- key: `item-${ce}`,
603
- modelValue: e.value.platform.mappings.items[ce],
604
- "onUpdate:modelValue": (Ie) => e.value.platform.mappings.items[ce] = Ie,
599
+ })) : N("", !0),
600
+ ((U = g.accountCodeOptions.data) == null ? void 0 : U.length) > 0 ? (c(), C("div", Lt, [
601
+ (c(!0), C(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
+ key: `item-${re}`,
603
+ modelValue: e.value.platform.mappings.items[re],
604
+ "onUpdate:modelValue": (Ie) => e.value.platform.mappings.items[re] = Ie,
605
605
  options: {
606
606
  feedmeKey: { placeholder: "Feedme Key", editable: !0 },
607
607
  xeroAccount: {
@@ -611,27 +611,27 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
611
611
  }
612
612
  },
613
613
  removable: !0,
614
- onRemove: () => V("items", ce)
614
+ onRemove: () => $("items", re)
615
615
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
616
- ])) : R("", !0),
616
+ ])) : N("", !0),
617
617
  t("div", Et, [
618
618
  s[19] || (s[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Payments", -1)),
619
- i(N, {
619
+ i(P, {
620
620
  variant: "primary",
621
621
  icon: "add",
622
622
  onClick: s[8] || (s[8] = () => l("payments"))
623
623
  })
624
624
  ]),
625
- g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", zt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
626
- !g.accountCodeOptions.isLoaded && ((ye = e.value.platform) != null && ye.accessToken) ? (c(), K(Y, {
625
+ g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), C("div", zt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
626
+ !g.accountCodeOptions.isLoaded && ((Te = e.value.platform) != null && Te.accessToken) ? (c(), M(E, {
627
627
  key: 7,
628
628
  size: "xl"
629
- })) : R("", !0),
630
- ((Ne = g.accountCodeOptions.data) == null ? void 0 : Ne.length) > 0 ? (c(), F("div", Yt, [
631
- (c(!0), F(L, null, X((Be = (Oe = (Re = e.value) == null ? void 0 : Re.platform) == null ? void 0 : Oe.mappings) == null ? void 0 : Be.payments, (me, ce) => (c(), K(Me, {
632
- key: `payment-${ce}`,
633
- modelValue: e.value.platform.mappings.payments[ce],
634
- "onUpdate:modelValue": (Ie) => e.value.platform.mappings.payments[ce] = Ie,
629
+ })) : N("", !0),
630
+ ((Ne = g.accountCodeOptions.data) == null ? void 0 : Ne.length) > 0 ? (c(), C("div", Yt, [
631
+ (c(!0), C(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
+ key: `payment-${re}`,
633
+ modelValue: e.value.platform.mappings.payments[re],
634
+ "onUpdate:modelValue": (Ie) => e.value.platform.mappings.payments[re] = Ie,
635
635
  options: {
636
636
  feedmeKey: { placeholder: "Feedme Key", editable: !0 },
637
637
  xeroAccount: {
@@ -641,18 +641,18 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
641
641
  }
642
642
  },
643
643
  removable: !0,
644
- onRemove: () => V("payments", ce)
644
+ onRemove: () => $("payments", re)
645
645
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
646
- ])) : R("", !0)
646
+ ])) : N("", !0)
647
647
  ])
648
648
  ])
649
- ])) : R("", !0);
649
+ ])) : N("", !0);
650
650
  };
651
651
  }
652
652
  }), Ht = { class: "h-full flex flex-col gap-16" }, Xt = { class: "flex flex-row gap-2 justify-between items-center" }, Qt = {
653
653
  key: 0,
654
654
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
655
- }, Gt = /* @__PURE__ */ H({
655
+ }, Gt = /* @__PURE__ */ q({
656
656
  __name: "Preview",
657
657
  props: {
658
658
  modelValue: { required: !0 },
@@ -660,28 +660,28 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
660
660
  },
661
661
  emits: ["update:modelValue"],
662
662
  setup(g) {
663
- const o = B([]), e = z(
663
+ const o = B([]), e = Y(
664
664
  () => o.value.reduce((m, d) => {
665
- const h = m.length, { invoice: _, payments: u } = d;
666
- m[h] = {
667
- date: _.Date,
668
- contact: _.Contact.ContactID,
669
- status: _.Status,
670
- ref: _.Reference
665
+ const k = m.length, { invoice: b, payments: u } = d;
666
+ m[k] = {
667
+ date: b.Date,
668
+ contact: b.Contact.ContactID,
669
+ status: b.Status,
670
+ ref: b.Reference
671
671
  };
672
- for (let p = 0; p < Math.max(_.LineItems.length, u.length); p++) {
673
- const r = h + p;
674
- m[r] || (m[r] = {}), _.LineItems[p] && (m[r] = {
672
+ for (let p = 0; p < Math.max(b.LineItems.length, u.length); p++) {
673
+ const r = k + p;
674
+ m[r] || (m[r] = {}), b.LineItems[p] && (m[r] = {
675
675
  ...m[r],
676
- itemDescription: _.LineItems[p].Description,
677
- itemQuantity: _.LineItems[p].Quantity,
678
- itemUnitAmount: _.LineItems[p].UnitAmount,
676
+ itemDescription: b.LineItems[p].Description,
677
+ itemQuantity: b.LineItems[p].Quantity,
678
+ itemUnitAmount: b.LineItems[p].UnitAmount,
679
679
  // itemCode: invoice.LineItems[i].ItemCode,
680
- itemAccount: _.LineItems[p].AccountCode,
681
- itemTax: _.LineItems[p].TaxAmount,
682
- itemTaxType: _.LineItems[p].TaxType,
683
- itemAmount: _.LineItems[p].LineAmount,
684
- itemDiscount: _.LineItems[p].DiscountAmount
680
+ itemAccount: b.LineItems[p].AccountCode,
681
+ itemTax: b.LineItems[p].TaxAmount,
682
+ itemTaxType: b.LineItems[p].TaxType,
683
+ itemAmount: b.LineItems[p].LineAmount,
684
+ itemDiscount: b.LineItems[p].DiscountAmount
685
685
  }), u[p] && (m[r] = {
686
686
  ...m[r],
687
687
  paymentAccount: u[p].Account.Code,
@@ -767,61 +767,61 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
767
767
  header: "Payment Amount",
768
768
  enableSorting: !1
769
769
  }
770
- ], k = Q(g, "modelValue"), b = B(!1), x = fe(), { dateRange: D } = De(ue());
771
- ge(
772
- () => D.value,
770
+ ], V = X(g, "modelValue"), w = B(!1), _ = ue(), { dateRange: F } = Ce(pe());
771
+ ve(
772
+ () => F.value,
773
773
  async () => {
774
- if (k.value._id)
774
+ if (V.value._id)
775
775
  try {
776
- b.value = !0, o.value = await Ce(k.value._id);
776
+ w.value = !0, o.value = await $e(V.value._id);
777
777
  } catch (m) {
778
- x.open({ message: m.message, type: "error" });
778
+ _.open({ message: m.message, type: "error" });
779
779
  } finally {
780
- b.value = !1;
780
+ w.value = !1;
781
781
  }
782
782
  },
783
783
  {
784
784
  immediate: !0
785
785
  }
786
786
  );
787
- async function w() {
787
+ async function h() {
788
788
  try {
789
- k.value._id ? (b.value = !0, await Ae(k.value._id), x.open({ message: "Upload successful", type: "success" })) : x.open({ message: "Invalid accounting setting", type: "error" });
789
+ V.value._id ? (w.value = !0, await Ae(V.value._id), _.open({ message: "Upload successful", type: "success" })) : _.open({ message: "Invalid accounting setting", type: "error" });
790
790
  } catch (m) {
791
- m.message && x.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((d) => x.open({ message: d.Message, type: "error" }));
791
+ m.message && _.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((d) => _.open({ message: d.Message, type: "error" }));
792
792
  } finally {
793
- b.value = !1;
793
+ w.value = !1;
794
794
  }
795
795
  }
796
796
  return (m, d) => {
797
- const h = $("FmButton"), _ = $("FmCircularProgress"), u = $("FmTable");
798
- return c(), F("div", Ht, [
797
+ const k = S("FmButton"), b = S("FmCircularProgress"), u = S("FmTable");
798
+ return c(), C("div", Ht, [
799
799
  t("div", Xt, [
800
- i(Ue, {
801
- "date-range": f(D),
802
- "onUpdate:dateRange": d[0] || (d[0] = (p) => he(D) ? D.value = p : null),
800
+ i(Fe, {
801
+ "date-range": f(F),
802
+ "onUpdate:dateRange": d[0] || (d[0] = (p) => be(F) ? F.value = p : null),
803
803
  compare: !1
804
804
  }, null, 8, ["date-range"]),
805
- i(h, {
806
- loading: b.value,
805
+ i(k, {
806
+ loading: w.value,
807
807
  variant: "primary",
808
808
  label: "Upload",
809
- onClick: w
809
+ onClick: h
810
810
  }, null, 8, ["loading"])
811
811
  ]),
812
- b.value ? (c(), F("div", Qt, [
813
- i(_, { size: "xl" }),
812
+ w.value ? (c(), C("div", Qt, [
813
+ i(b, { size: "xl" }),
814
814
  d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
815
- ])) : e.value.length > 0 ? (c(), K(u, {
815
+ ])) : e.value.length > 0 ? (c(), M(u, {
816
816
  key: 1,
817
817
  class: "flex overflow-scroll",
818
818
  "row-data": e.value,
819
819
  "column-defs": n
820
- }, null, 8, ["row-data"])) : R("", !0)
820
+ }, null, 8, ["row-data"])) : N("", !0)
821
821
  ]);
822
822
  };
823
823
  }
824
- }), Jt = { class: "h-full relative flex flex-col" }, Wt = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Zt = /* @__PURE__ */ H({
824
+ }), Jt = { class: "h-full relative flex flex-col" }, Wt = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Zt = /* @__PURE__ */ q({
825
825
  __name: "Xero",
826
826
  props: {
827
827
  modelValue: { required: !0 },
@@ -829,7 +829,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
829
829
  },
830
830
  emits: ["update:modelValue"],
831
831
  setup(g) {
832
- const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = B({}), b = B({}), x = B({}), D = [
832
+ const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = B({}), w = B({}), _ = B({}), F = [
833
833
  {
834
834
  label: o("report.integration.setting"),
835
835
  value: "setting",
@@ -840,7 +840,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
840
840
  value: "preview",
841
841
  icon: "table"
842
842
  }
843
- ], w = pe(), m = z(() => {
843
+ ], h = de(), m = Y(() => {
844
844
  switch (n.value) {
845
845
  case "preview":
846
846
  return { component: Gt };
@@ -848,9 +848,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
848
848
  return {
849
849
  component: qt,
850
850
  props: {
851
- tenantOptions: k.value,
852
- taxOptions: b.value,
853
- accountCodeOptions: x.value
851
+ tenantOptions: V.value,
852
+ taxOptions: w.value,
853
+ accountCodeOptions: _.value
854
854
  }
855
855
  };
856
856
  default:
@@ -861,75 +861,75 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
861
861
  if (e.value._id)
862
862
  try {
863
863
  const u = await He(e.value._id);
864
- k.value.data = u.map((p) => ({
864
+ V.value.data = u.map((p) => ({
865
865
  value: p.id,
866
866
  label: p.name
867
867
  }));
868
868
  } catch (u) {
869
- console.error("Failed to fetch tenants:", u), k.value.isError = !0;
869
+ console.error("Failed to fetch tenants:", u), V.value.isError = !0;
870
870
  } finally {
871
- k.value.isLoaded = !0;
871
+ V.value.isLoaded = !0;
872
872
  }
873
873
  }
874
- async function h() {
874
+ async function k() {
875
875
  if (e.value._id)
876
876
  try {
877
877
  const u = await Xe(e.value._id);
878
- b.value.data = u.map((p) => ({
878
+ w.value.data = u.map((p) => ({
879
879
  value: p.Name,
880
880
  label: `${p.Name} - (${p.EffectiveRate}%)`
881
881
  }));
882
882
  } catch (u) {
883
- console.error("Failed to fetch taxes:", u), b.value.isError = !0;
883
+ console.error("Failed to fetch taxes:", u), w.value.isError = !0;
884
884
  } finally {
885
- b.value.isLoaded = !0;
885
+ w.value.isLoaded = !0;
886
886
  }
887
887
  }
888
- async function _() {
888
+ async function b() {
889
889
  if (e.value._id)
890
890
  try {
891
891
  const u = await Qe(e.value._id);
892
- x.value.data = u.map((p) => ({
892
+ _.value.data = u.map((p) => ({
893
893
  value: p.Code,
894
894
  label: `${p.Code} ${p.Name} - [${p.Class}_${p.Type}]`
895
895
  }));
896
896
  } catch (u) {
897
- console.error("Failed to fetch accounts:", u), x.value.isError = !0;
897
+ console.error("Failed to fetch accounts:", u), _.value.isError = !0;
898
898
  } finally {
899
- x.value.isLoaded = !0;
899
+ _.value.isLoaded = !0;
900
900
  }
901
901
  }
902
- return ge(
902
+ return ve(
903
903
  () => {
904
904
  var u;
905
905
  return (u = e.value.platform) == null ? void 0 : u.accessToken;
906
906
  },
907
907
  (u) => {
908
- u && (d(), h(), _());
908
+ u && (d(), k(), b());
909
909
  },
910
910
  { immediate: !0 }
911
911
  ), (u, p) => {
912
- var V, l, a;
913
- const r = $("FmPageHead"), y = $("FmTabs");
914
- return c(), F("div", Jt, [
912
+ var $, l, a;
913
+ const r = S("FmPageHead"), x = S("FmTabs");
914
+ return c(), C("div", Jt, [
915
915
  i(r, {
916
- title: ((V = e.value) == null ? void 0 : V.name) || "Xero",
916
+ title: (($ = e.value) == null ? void 0 : $.name) || "Xero",
917
917
  "back-button": !0,
918
918
  style: { paddingLeft: "0px", paddingRight: "0px" },
919
- "onClick:back": f(w).back
919
+ "onClick:back": f(h).back
920
920
  }, {
921
- description: xe(() => p[2] || (p[2] = [
921
+ description: ge(() => p[2] || (p[2] = [
922
922
  t("div", null, null, -1)
923
923
  ])),
924
924
  _: 1
925
925
  }, 8, ["title", "onClick:back"]),
926
- i(y, {
926
+ i(x, {
927
927
  "model-value": n.value,
928
928
  "onUpdate:modelValue": p[0] || (p[0] = (v) => n.value = v),
929
- items: D
929
+ items: F
930
930
  }, null, 8, ["model-value"]),
931
931
  t("div", Wt, [
932
- (c(), K(be((l = m.value) == null ? void 0 : l.component), Le({
932
+ (c(), M(xe((l = m.value) == null ? void 0 : l.component), Le({
933
933
  modelValue: e.value,
934
934
  "onUpdate:modelValue": p[1] || (p[1] = (v) => e.value = v)
935
935
  }, (a = m.value) == null ? void 0 : a.props), null, 16, ["modelValue"]))
@@ -940,7 +940,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
940
940
  }), eo = {
941
941
  key: 0,
942
942
  class: "flex flex-col h-full"
943
- }, to = { class: "flex flex-col gap-16 pb-[24px]" }, oo = { class: "flex flex-row justify-between items-center gap-2" }, ao = { class: "fm-typo-en-title-sm-800" }, lo = { class: "flex flex-row gap-2 items-center" }, no = { class: "relative group cursor-pointer" }, so = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, io = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mo = { class: "flex flex-row items-center justify-between" }, co = { class: "w-[25%]" }, po = { class: "flex-grow" }, uo = { class: "flex flex-row items-center justify-between" }, fo = { class: "w-[25%]" }, vo = { class: "flex-grow" }, go = { class: "flex flex-col gap-16" }, yo = { class: "fm-typo-en-title-sm-800" }, xo = { class: "flex flex-row items-center max-w-[100%]" }, _o = { class: "w-[25%]" }, bo = { class: "flex-grow" }, wo = { class: "flex flex-row items-center max-w-[100%]" }, ho = { class: "w-[25%]" }, ko = { class: "flex flex-row items-center max-w-[100%]" }, Vo = { class: "w-[25%]" }, $o = { class: "flex flex-col gap-16" }, So = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Co = { class: "flex flex-row items-center gap-x-16" }, Fo = { class: "fm-typo-en-title-sm-800" }, Do = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Uo = { class: "flex flex-row items-center gap-x-16" }, To = { class: "fm-typo-en-title-sm-800" }, Io = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Mo = { class: "flex flex-row items-center gap-x-16" }, Ko = { class: "fm-typo-en-title-sm-800" }, Ao = { class: "flex flex-row items-center" }, Po = /* @__PURE__ */ H({
943
+ }, to = { class: "flex flex-col gap-16 pb-[24px]" }, oo = { class: "flex flex-row justify-between items-center gap-2" }, ao = { class: "fm-typo-en-title-sm-800" }, lo = { class: "flex flex-row gap-2 items-center" }, no = { class: "relative group cursor-pointer" }, so = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, io = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mo = { class: "flex flex-row items-center justify-between" }, co = { class: "w-[25%]" }, po = { class: "flex-grow" }, uo = { class: "flex flex-row items-center justify-between" }, fo = { class: "w-[25%]" }, vo = { class: "flex-grow" }, go = { class: "flex flex-col gap-16" }, yo = { class: "fm-typo-en-title-sm-800" }, xo = { class: "flex flex-row items-center max-w-[100%]" }, _o = { class: "w-[25%]" }, bo = { class: "flex-grow" }, wo = { class: "flex flex-row items-center max-w-[100%]" }, ho = { class: "w-[25%]" }, ko = { class: "flex flex-row items-center max-w-[100%]" }, Vo = { class: "w-[25%]" }, $o = { class: "flex flex-col gap-16" }, So = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Co = { class: "flex flex-row items-center gap-x-16" }, Fo = { class: "fm-typo-en-title-sm-800" }, Do = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Uo = { class: "flex flex-row items-center gap-x-16" }, To = { class: "fm-typo-en-title-sm-800" }, Io = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Mo = { class: "flex flex-row items-center gap-x-16" }, Ko = { class: "fm-typo-en-title-sm-800" }, Ao = /* @__PURE__ */ q({
944
944
  __name: "Setting",
945
945
  props: {
946
946
  modelValue: { required: !0 },
@@ -948,34 +948,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
948
948
  },
949
949
  emits: ["update:modelValue"],
950
950
  setup(g) {
951
- const o = Q(g, "modelValue"), e = fe(), n = we(), k = pe(), { promptLoader: b } = ke(), { promptMessage: x } = Fe(), { restaurants: D } = ue(), w = z(
952
- () => D.map((l) => ({ label: l.name, value: l.id }))
953
- ), { t: m } = W();
951
+ const o = X(g, "modelValue"), e = ue(), n = _e(), V = de(), { promptLoader: w } = we(), { promptMessage: _ } = Se(), { restaurants: F } = pe(), h = Y(
952
+ () => F.map((l) => ({ label: l.name, value: l.id }))
953
+ ), { t: m } = J();
954
954
  async function d() {
955
- await x({
955
+ await _({
956
956
  message: m("report.messages.confirmDelete", { name: o.value.name }),
957
957
  title: m("report.common.delete")
958
- }) && await b(async () => {
958
+ }) && await w(async () => {
959
959
  try {
960
- await Ve(o.value._id), await n.getSettings(), k.back();
960
+ await he(o.value._id), await n.getSettings(), V.back();
961
961
  } catch (a) {
962
962
  e.open({ type: "error", message: a.message });
963
963
  }
964
964
  });
965
965
  }
966
- async function h() {
967
- await b(async () => {
966
+ async function k() {
967
+ await w(async () => {
968
968
  try {
969
- await $e(o.value._id, o.value), await n.getSettings();
969
+ await ke(o.value._id, o.value), await n.getSettings();
970
970
  } catch (l) {
971
971
  e.open({ type: "error", message: l.message });
972
972
  }
973
973
  });
974
974
  }
975
- function _(l, a) {
975
+ function b(l, a) {
976
976
  var v, s;
977
977
  (s = (v = o.value.platform) == null ? void 0 : v.mappings) != null && s[l] && (o.value.platform.mappings[l] = o.value.platform.mappings[l].filter(
978
- (P, N) => N !== a
978
+ (A, P) => P !== a
979
979
  ));
980
980
  }
981
981
  function u(l) {
@@ -1014,19 +1014,19 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1014
1014
  const p = [
1015
1015
  {
1016
1016
  label: m("report.integration.setting.grouping.byDay"),
1017
- value: ve.BY_DAY
1017
+ value: fe.BY_DAY
1018
1018
  },
1019
1019
  {
1020
1020
  label: m("report.integration.setting.grouping.byDayItem"),
1021
- value: ve.BY_DAY_ITEM
1021
+ value: fe.BY_DAY_ITEM
1022
1022
  },
1023
1023
  {
1024
1024
  label: m("report.integration.setting.grouping.byInvoice"),
1025
- value: ve.BY_INVOICE
1025
+ value: fe.BY_INVOICE
1026
1026
  },
1027
1027
  {
1028
1028
  label: m("report.integration.setting.grouping.byDaySeparatePayment"),
1029
- value: ve.BY_DAY_SEPARATE_PAYMENT
1029
+ value: fe.BY_DAY_SEPARATE_PAYMENT
1030
1030
  }
1031
1031
  ];
1032
1032
  function r({
@@ -1036,25 +1036,25 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1036
1036
  var v, s;
1037
1037
  (s = (v = o.value) == null ? void 0 : v.platform) != null && s.mappings && (o.value.platform.mappings[l] = a);
1038
1038
  }
1039
- function y(l) {
1039
+ function x(l) {
1040
1040
  return {
1041
1041
  key: { placeholder: l, editable: !1 },
1042
1042
  account: { placeholder: l, editable: !0 }
1043
1043
  };
1044
1044
  }
1045
- async function V() {
1046
- await b(async () => {
1045
+ async function $() {
1046
+ await w(async () => {
1047
1047
  try {
1048
- await Se(o.value._id), await n.getSettings();
1048
+ await Ve(o.value._id), await n.getSettings();
1049
1049
  } catch (l) {
1050
1050
  e.open({ type: "error", message: l.message });
1051
1051
  }
1052
1052
  });
1053
1053
  }
1054
1054
  return (l, a) => {
1055
- var J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie, U, S;
1056
- const v = $("FmIcon"), s = $("FmButton"), P = $("FmMenuDivider"), N = $("FmTextField"), G = $("FmSelect"), Y = $("FmCheckbox");
1057
- return (O = (J = o.value) == null ? void 0 : J.platform) != null && O.mappings ? (c(), F("div", eo, [
1055
+ var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se, D;
1056
+ const v = S("FmIcon"), s = 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(), C("div", eo, [
1058
1058
  t("div", to, [
1059
1059
  t("div", oo, [
1060
1060
  t("div", ao, T(f(m)("report.integration.bukku.connect")), 1),
@@ -1063,7 +1063,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1063
1063
  i(v, {
1064
1064
  name: "refresh",
1065
1065
  class: "p-2 bg-gray-100 rounded-full",
1066
- onClick: V
1066
+ onClick: $
1067
1067
  }),
1068
1068
  t("span", so, T(f(m)("report.integration.setting.refreshTooltip")), 1)
1069
1069
  ]),
@@ -1075,20 +1075,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1075
1075
  i(s, {
1076
1076
  variant: "primary",
1077
1077
  label: f(m)("report.common.update"),
1078
- onClick: h
1078
+ onClick: k
1079
1079
  }, null, 8, ["label"])
1080
1080
  ])
1081
1081
  ])
1082
1082
  ]),
1083
- i(P, { style: { margin: 0 } }),
1083
+ i(A, { style: { margin: 0 } }),
1084
1084
  t("div", io, [
1085
1085
  t("div", ro, T(f(m)("report.integration.bukku.authentication")), 1),
1086
1086
  t("div", mo, [
1087
1087
  t("div", co, T(f(m)("report.integration.subdomain")), 1),
1088
1088
  t("div", po, [
1089
- i(N, {
1089
+ i(P, {
1090
1090
  modelValue: o.value.platform.subdomain,
1091
- "onUpdate:modelValue": a[0] || (a[0] = (C) => o.value.platform.subdomain = C),
1091
+ "onUpdate:modelValue": a[0] || (a[0] = (y) => o.value.platform.subdomain = y),
1092
1092
  placeholder: f(m)("report.integration.subdomain")
1093
1093
  }, null, 8, ["modelValue", "placeholder"])
1094
1094
  ])
@@ -1096,9 +1096,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1096
1096
  t("div", uo, [
1097
1097
  t("div", fo, T(f(m)("report.integration.token")), 1),
1098
1098
  t("div", vo, [
1099
- i(N, {
1099
+ i(P, {
1100
1100
  modelValue: o.value.platform.token,
1101
- "onUpdate:modelValue": a[1] || (a[1] = (C) => o.value.platform.token = C),
1101
+ "onUpdate:modelValue": a[1] || (a[1] = (y) => o.value.platform.token = y),
1102
1102
  placeholder: f(m)("report.integration.token")
1103
1103
  }, null, 8, ["modelValue", "placeholder"])
1104
1104
  ])
@@ -1108,28 +1108,28 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1108
1108
  t("div", xo, [
1109
1109
  t("div", _o, T(f(m)("report.common.name")), 1),
1110
1110
  t("div", bo, [
1111
- i(N, {
1111
+ i(P, {
1112
1112
  modelValue: o.value.name,
1113
- "onUpdate:modelValue": a[2] || (a[2] = (C) => o.value.name = C)
1113
+ "onUpdate:modelValue": a[2] || (a[2] = (y) => o.value.name = y)
1114
1114
  }, null, 8, ["modelValue"])
1115
1115
  ])
1116
1116
  ]),
1117
1117
  t("div", wo, [
1118
1118
  t("div", ho, T(f(m)("report.common.location")), 1),
1119
- i(G, {
1119
+ i(Q, {
1120
1120
  modelValue: o.value.platform.locationIds,
1121
- "onUpdate:modelValue": a[3] || (a[3] = (C) => o.value.platform.locationIds = C),
1121
+ "onUpdate:modelValue": a[3] || (a[3] = (y) => o.value.platform.locationIds = y),
1122
1122
  multiselect: !0,
1123
- items: w.value,
1123
+ items: h.value,
1124
1124
  placeholder: "Select location",
1125
1125
  class: "flex-grow"
1126
1126
  }, null, 8, ["modelValue", "items"])
1127
1127
  ]),
1128
1128
  t("div", ko, [
1129
1129
  t("div", Vo, T(f(m)("report.integration.bukku.grouping.title")), 1),
1130
- i(G, {
1130
+ i(Q, {
1131
1131
  modelValue: o.value.platform.grouping,
1132
- "onUpdate:modelValue": a[4] || (a[4] = (C) => o.value.platform.grouping = C),
1132
+ "onUpdate:modelValue": a[4] || (a[4] = (y) => o.value.platform.grouping = y),
1133
1133
  multiselect: !1,
1134
1134
  items: p,
1135
1135
  placeholder: "Select grouping",
@@ -1139,7 +1139,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1139
1139
  ]),
1140
1140
  t("div", $o, [
1141
1141
  t("div", So, [
1142
- i(A, {
1142
+ i(K, {
1143
1143
  "model-value": {
1144
1144
  key: "Contact",
1145
1145
  account: o.value.platform.mappings.contact.account
@@ -1154,61 +1154,61 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1154
1154
  editable: !0
1155
1155
  }
1156
1156
  },
1157
- "onUpdate:modelValue": a[5] || (a[5] = (C) => {
1158
- var M, q, re;
1159
- (re = (q = (M = o.value) == null ? void 0 : M.platform) == null ? void 0 : q.mappings) != null && re.contact && (o.value.platform.mappings.contact.account = C.account);
1157
+ "onUpdate:modelValue": a[5] || (a[5] = (y) => {
1158
+ var U, O, me;
1159
+ (me = (O = (U = o.value) == null ? void 0 : U.platform) == null ? void 0 : O.mappings) != null && me.contact && (o.value.platform.mappings.contact.account = y.account);
1160
1160
  })
1161
1161
  }, null, 8, ["model-value"]),
1162
- i(A, {
1162
+ i(K, {
1163
1163
  "model-value": {
1164
1164
  key: "Invoice no",
1165
1165
  account: o.value.platform.mappings.invoiceDocNo
1166
1166
  },
1167
- options: y("Invoice no"),
1168
- "onUpdate:modelValue": a[6] || (a[6] = (C) => r({ key: "invoiceDocNo", value: C.account }))
1167
+ options: x("Invoice no"),
1168
+ "onUpdate:modelValue": a[6] || (a[6] = (y) => r({ key: "invoiceDocNo", value: y.account }))
1169
1169
  }, null, 8, ["model-value", "options"]),
1170
- i(A, {
1170
+ i(K, {
1171
1171
  "model-value": {
1172
1172
  key: "Credit note no",
1173
1173
  account: o.value.platform.mappings.creditNoteDocNo
1174
1174
  },
1175
- options: y("Credit note no"),
1176
- "onUpdate:modelValue": a[7] || (a[7] = (C) => r({ key: "creditNoteDocNo", value: C.account }))
1175
+ options: x("Credit note no"),
1176
+ "onUpdate:modelValue": a[7] || (a[7] = (y) => r({ key: "creditNoteDocNo", value: y.account }))
1177
1177
  }, null, 8, ["model-value", "options"]),
1178
- i(A, {
1178
+ i(K, {
1179
1179
  "model-value": {
1180
1180
  key: "Payment no",
1181
1181
  account: o.value.platform.mappings.paymentDocNo
1182
1182
  },
1183
- options: y("Payment no"),
1184
- "onUpdate:modelValue": a[8] || (a[8] = (C) => r({ key: "paymentDocNo", value: C.account }))
1183
+ options: x("Payment no"),
1184
+ "onUpdate:modelValue": a[8] || (a[8] = (y) => r({ key: "paymentDocNo", value: y.account }))
1185
1185
  }, null, 8, ["model-value", "options"]),
1186
- i(A, {
1186
+ i(K, {
1187
1187
  "model-value": {
1188
1188
  key: "Refund no",
1189
1189
  account: o.value.platform.mappings.refundDocNo
1190
1190
  },
1191
- options: y("Refund no"),
1192
- "onUpdate:modelValue": a[9] || (a[9] = (C) => r({ key: "refundDocNo", value: C.account }))
1191
+ options: x("Refund no"),
1192
+ "onUpdate:modelValue": a[9] || (a[9] = (y) => r({ key: "refundDocNo", value: y.account }))
1193
1193
  }, null, 8, ["model-value", "options"]),
1194
- i(A, {
1194
+ i(K, {
1195
1195
  "model-value": {
1196
1196
  key: "Rounding",
1197
1197
  account: o.value.platform.mappings.rounding.account
1198
1198
  },
1199
- options: y("Rounding"),
1200
- "onUpdate:modelValue": a[10] || (a[10] = (C) => {
1201
- var M, q, re;
1202
- (re = (q = (M = o.value) == null ? void 0 : M.platform) == null ? void 0 : q.mappings) != null && re.rounding && (o.value.platform.mappings.rounding.account = C.account);
1199
+ options: x("Rounding"),
1200
+ "onUpdate:modelValue": a[10] || (a[10] = (y) => {
1201
+ var U, O, me;
1202
+ (me = (O = (U = o.value) == null ? void 0 : U.platform) == null ? void 0 : O.mappings) != null && me.rounding && (o.value.platform.mappings.rounding.account = y.account);
1203
1203
  })
1204
1204
  }, null, 8, ["model-value", "options"]),
1205
- (c(!0), F(L, null, X((Z = (E = (j = o.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : Z.charges, (C, M) => (c(), K(A, {
1206
- key: `charge-${M}`,
1207
- modelValue: o.value.platform.mappings.charges[M],
1208
- "onUpdate:modelValue": (q) => o.value.platform.mappings.charges[M] = q,
1205
+ (c(!0), C(L, null, H((z = (j = (R = o.value) == null ? void 0 : R.platform) == null ? void 0 : j.mappings) == null ? void 0 : z.charges, (y, U) => (c(), M(K, {
1206
+ key: `charge-${U}`,
1207
+ modelValue: o.value.platform.mappings.charges[U],
1208
+ "onUpdate:modelValue": (O) => o.value.platform.mappings.charges[U] = O,
1209
1209
  options: {
1210
1210
  key: {
1211
- placeholder: f(m)(`report.integration.bukku.mapping.charge.${C.key}`),
1211
+ placeholder: f(m)(`report.integration.bukku.mapping.charge.${y.key}`),
1212
1212
  editable: !1
1213
1213
  },
1214
1214
  account: {
@@ -1219,11 +1219,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1219
1219
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options"]))), 128))
1220
1220
  ])
1221
1221
  ]),
1222
- i(Te, {
1222
+ i(De, {
1223
1223
  modelValue: o.value.platform,
1224
- "onUpdate:modelValue": a[11] || (a[11] = (C) => o.value.platform = C),
1224
+ "onUpdate:modelValue": a[11] || (a[11] = (y) => o.value.platform = y),
1225
1225
  label: "upload",
1226
- "last-upload-date": (ee = o.value.platform) == null ? void 0 : ee.lastUploadDate
1226
+ "last-upload-date": (W = o.value.platform) == null ? void 0 : W.lastUploadDate
1227
1227
  }, null, 8, ["modelValue", "last-upload-date"]),
1228
1228
  t("div", Co, [
1229
1229
  t("div", Fo, T(f(m)("report.integration.items")), 1),
@@ -1234,16 +1234,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1234
1234
  })
1235
1235
  ]),
1236
1236
  t("div", Do, [
1237
- (c(!0), F(L, null, X((ae = (oe = (te = o.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (C, M) => (c(), K(A, {
1238
- key: `item-${M}`,
1239
- modelValue: o.value.platform.mappings.items[M],
1240
- "onUpdate:modelValue": (q) => o.value.platform.mappings.items[M] = q,
1237
+ (c(!0), C(L, null, H((te = (ee = (Z = o.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (y, U) => (c(), M(K, {
1238
+ key: `item-${U}`,
1239
+ modelValue: o.value.platform.mappings.items[U],
1240
+ "onUpdate:modelValue": (O) => o.value.platform.mappings.items[U] = O,
1241
1241
  options: {
1242
1242
  key: { placeholder: "Key", editable: !0 },
1243
1243
  account: { placeholder: "Account code", editable: !0 }
1244
1244
  },
1245
1245
  removable: !0,
1246
- onRemove: () => _("items", M)
1246
+ onRemove: () => b("items", U)
1247
1247
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1248
1248
  ]),
1249
1249
  t("div", Uo, [
@@ -1255,16 +1255,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1255
1255
  })
1256
1256
  ]),
1257
1257
  t("div", Io, [
1258
- (c(!0), F(L, null, X((se = (ne = (le = o.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (C, M) => (c(), K(A, {
1259
- key: `tax-${M}`,
1260
- modelValue: o.value.platform.mappings.taxes[M],
1261
- "onUpdate:modelValue": (q) => o.value.platform.mappings.taxes[M] = q,
1258
+ (c(!0), C(L, null, H((le = (ae = (oe = o.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (y, U) => (c(), M(K, {
1259
+ key: `tax-${U}`,
1260
+ modelValue: o.value.platform.mappings.taxes[U],
1261
+ "onUpdate:modelValue": (O) => o.value.platform.mappings.taxes[U] = O,
1262
1262
  options: {
1263
1263
  key: { placeholder: "Key", editable: !0 },
1264
1264
  account: { placeholder: "Account code", editable: !0 }
1265
1265
  },
1266
1266
  removable: !0,
1267
- onRemove: () => _("taxes", M)
1267
+ onRemove: () => b("taxes", U)
1268
1268
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1269
1269
  ]),
1270
1270
  t("div", Mo, [
@@ -1275,40 +1275,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1275
1275
  onClick: a[14] || (a[14] = () => u("payments"))
1276
1276
  })
1277
1277
  ]),
1278
- (c(!0), F(L, null, X((S = (U = (ie = o.value) == null ? void 0 : ie.platform) == null ? void 0 : U.mappings) == null ? void 0 : S.payments, (C, M) => (c(), F("div", {
1279
- key: `payment-${M}`,
1278
+ (c(!0), C(L, null, H((D = (se = (ne = o.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.payments, (y, U) => (c(), C("div", {
1279
+ key: `payment-${U}`,
1280
1280
  class: "grid-cols-1 grid gap-x-16"
1281
1281
  }, [
1282
- t("div", Ao, [
1283
- i(Y, {
1284
- "model-value": !o.value.platform.mappings.payments[M].skip,
1285
- value: "",
1286
- "onUpdate:modelValue": (q) => {
1287
- var re, ye;
1288
- (ye = (re = o.value.platform) == null ? void 0 : re.mappings) != null && ye.payments[M] && (o.value.platform.mappings.payments[M].skip = !q);
1289
- }
1290
- }, null, 8, ["model-value", "onUpdate:modelValue"]),
1291
- i(A, {
1292
- modelValue: o.value.platform.mappings.payments[M],
1293
- "onUpdate:modelValue": (q) => o.value.platform.mappings.payments[M] = q,
1294
- options: {
1295
- key: { placeholder: "Key", editable: !0 },
1296
- method: { placeholder: "Method", editable: !0 },
1297
- account: { placeholder: "Account code", editable: !0 }
1298
- },
1299
- removable: !0,
1300
- onRemove: () => _("payments", M)
1301
- }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"])
1302
- ])
1282
+ i(K, {
1283
+ modelValue: o.value.platform.mappings.payments[U],
1284
+ "onUpdate:modelValue": (O) => o.value.platform.mappings.payments[U] = O,
1285
+ options: {
1286
+ key: { placeholder: "Key", editable: !0 },
1287
+ method: { placeholder: "Method", editable: !0 },
1288
+ account: { placeholder: "Account code", editable: !0 }
1289
+ },
1290
+ removable: !0,
1291
+ onRemove: () => b("payments", U)
1292
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"])
1303
1293
  ]))), 128))
1304
1294
  ])
1305
- ])) : R("", !0);
1295
+ ])) : N("", !0);
1306
1296
  };
1307
1297
  }
1308
- }), No = { class: "h-full flex flex-col gap-16" }, Ro = { class: "flex flex-row gap-2 justify-between items-center" }, Oo = {
1298
+ }), Po = { class: "h-full flex flex-col gap-16" }, No = { class: "flex flex-row gap-2 justify-between items-center" }, Ro = {
1309
1299
  key: 0,
1310
1300
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
1311
- }, Bo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jo = /* @__PURE__ */ H({
1301
+ }, Oo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bo = /* @__PURE__ */ q({
1312
1302
  __name: "Preview",
1313
1303
  props: {
1314
1304
  modelValue: { required: !0 },
@@ -1316,10 +1306,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1316
1306
  },
1317
1307
  emits: ["update:modelValue"],
1318
1308
  setup(g) {
1319
- const o = B([]), e = z(
1320
- () => o.value.reduce((d, h) => {
1321
- const _ = d.length, { invoice: u, payments: p } = h;
1322
- d[_] = {
1309
+ const o = B([]), e = Y(
1310
+ () => o.value.reduce((d, k) => {
1311
+ const b = d.length, { invoice: u, payments: p } = k;
1312
+ d[b] = {
1323
1313
  no: u.number,
1324
1314
  date: u.date,
1325
1315
  contact: u._contact_name,
@@ -1327,21 +1317,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1327
1317
  title: u.title
1328
1318
  };
1329
1319
  for (let r = 0; r < Math.max(u.form_items.length, p.length); r++) {
1330
- const y = _ + r;
1331
- d[y] || (d[y] = {});
1332
- const V = u.form_items[r];
1333
- V && (d[y] = {
1334
- ...d[y],
1335
- itemDescription: V.description,
1336
- itemQuantity: V.quantity,
1337
- itemUnitPrice: V.unit_price,
1338
- itemAccount: V._account_name,
1339
- itemTaxCode: V._tax_code_name,
1340
- itemDiscount: V.discount
1320
+ const x = b + r;
1321
+ d[x] || (d[x] = {});
1322
+ const $ = u.form_items[r];
1323
+ $ && (d[x] = {
1324
+ ...d[x],
1325
+ itemDescription: $.description,
1326
+ itemQuantity: $.quantity,
1327
+ itemUnitPrice: $.unit_price,
1328
+ itemAccount: $._account_name,
1329
+ itemTaxCode: $._tax_code_name,
1330
+ itemDiscount: $.discount
1341
1331
  });
1342
1332
  const l = p[r];
1343
- l && (d[y] = {
1344
- ...d[y],
1333
+ l && (d[x] = {
1334
+ ...d[x],
1345
1335
  paymentNo: l.number,
1346
1336
  paymentMethod: l.deposit_items[0]._payment_method_name,
1347
1337
  paymentAccount: l.deposit_items[0]._account_name,
@@ -1352,7 +1342,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1352
1342
  }
1353
1343
  return d;
1354
1344
  }, [])
1355
- ), { t: n } = W(), k = [
1345
+ ), { t: n } = J(), V = [
1356
1346
  {
1357
1347
  accessorKey: "date",
1358
1348
  header: () => I(
@@ -1446,17 +1436,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1446
1436
  header: "Skip",
1447
1437
  enableSorting: !1
1448
1438
  }
1449
- ], b = Q(g, "modelValue"), x = B(!1), D = fe(), { dateRange: w } = De(ue());
1450
- ge(
1451
- () => w.value,
1439
+ ], w = X(g, "modelValue"), _ = B(!1), F = ue(), { dateRange: h } = Ce(pe());
1440
+ ve(
1441
+ () => h.value,
1452
1442
  async () => {
1453
- if (b.value._id)
1443
+ if (w.value._id)
1454
1444
  try {
1455
- x.value = !0, o.value = await Ce(b.value._id);
1445
+ _.value = !0, o.value = await $e(w.value._id);
1456
1446
  } catch (d) {
1457
- D.open({ message: d.message, type: "error" });
1447
+ F.open({ message: d.message, type: "error" });
1458
1448
  } finally {
1459
- x.value = !1;
1449
+ _.value = !1;
1460
1450
  }
1461
1451
  },
1462
1452
  {
@@ -1465,42 +1455,42 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1465
1455
  );
1466
1456
  async function m() {
1467
1457
  try {
1468
- b.value._id ? (x.value = !0, await Ae(b.value._id), D.open({ message: n("report.integration.preview.uploadSuccess"), type: "success" })) : D.open({ message: n("report.integration.error.invalid"), type: "error" });
1458
+ w.value._id ? (_.value = !0, await Ae(w.value._id), F.open({ message: n("report.integration.preview.uploadSuccess"), type: "success" })) : F.open({ message: n("report.integration.error.invalid"), type: "error" });
1469
1459
  } catch (d) {
1470
- D.open({ message: d.message, type: "error" });
1460
+ F.open({ message: d.message, type: "error" });
1471
1461
  } finally {
1472
- x.value = !1;
1462
+ _.value = !1;
1473
1463
  }
1474
1464
  }
1475
- return (d, h) => {
1476
- const _ = $("FmButton"), u = $("FmCircularProgress"), p = $("FmTable");
1477
- return c(), F("div", No, [
1478
- t("div", Ro, [
1479
- i(Ue, {
1480
- "date-range": f(w),
1481
- "onUpdate:dateRange": h[0] || (h[0] = (r) => he(w) ? w.value = r : null),
1465
+ return (d, k) => {
1466
+ const b = S("FmButton"), u = S("FmCircularProgress"), p = S("FmTable");
1467
+ return c(), C("div", Po, [
1468
+ t("div", No, [
1469
+ i(Fe, {
1470
+ "date-range": f(h),
1471
+ "onUpdate:dateRange": k[0] || (k[0] = (r) => be(h) ? h.value = r : null),
1482
1472
  compare: !1
1483
1473
  }, null, 8, ["date-range"]),
1484
- i(_, {
1485
- loading: x.value,
1474
+ i(b, {
1475
+ loading: _.value,
1486
1476
  variant: "primary",
1487
1477
  label: f(n)("report.common.upload"),
1488
1478
  onClick: m
1489
1479
  }, null, 8, ["loading", "label"])
1490
1480
  ]),
1491
- x.value ? (c(), F("div", Oo, [
1481
+ _.value ? (c(), C("div", Ro, [
1492
1482
  i(u, { size: "xl" }),
1493
- t("span", Bo, T(f(n)("report.integration.preview.loading")), 1)
1494
- ])) : e.value.length > 0 ? (c(), K(p, {
1483
+ t("span", Oo, T(f(n)("report.integration.preview.loading")), 1)
1484
+ ])) : e.value.length > 0 ? (c(), M(p, {
1495
1485
  key: 1,
1496
1486
  class: "flex overflow-scroll",
1497
1487
  "row-data": e.value,
1498
- "column-defs": k
1499
- }, null, 8, ["row-data"])) : R("", !0)
1488
+ "column-defs": V
1489
+ }, null, 8, ["row-data"])) : N("", !0)
1500
1490
  ]);
1501
1491
  };
1502
1492
  }
1503
- }), Lo = { class: "h-full relative flex flex-col" }, Eo = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, zo = /* @__PURE__ */ H({
1493
+ }), jo = { class: "h-full relative flex flex-col" }, Lo = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Eo = /* @__PURE__ */ q({
1504
1494
  __name: "Bukku",
1505
1495
  props: {
1506
1496
  modelValue: {},
@@ -1508,7 +1498,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1508
1498
  },
1509
1499
  emits: ["update:modelValue"],
1510
1500
  setup(g) {
1511
- const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
1501
+ const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = [
1512
1502
  {
1513
1503
  label: o("report.integration.setting"),
1514
1504
  value: "setting",
@@ -1519,49 +1509,49 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1519
1509
  value: "preview",
1520
1510
  icon: "table"
1521
1511
  }
1522
- ], b = pe(), x = z(() => {
1512
+ ], w = de(), _ = Y(() => {
1523
1513
  switch (n.value) {
1524
1514
  case "preview":
1525
- return jo;
1515
+ return Bo;
1526
1516
  case "setting":
1527
- return Po;
1517
+ return Ao;
1528
1518
  default:
1529
1519
  return null;
1530
1520
  }
1531
1521
  });
1532
- return (D, w) => {
1533
- var h;
1534
- const m = $("FmPageHead"), d = $("FmTabs");
1535
- return c(), F("div", Lo, [
1522
+ return (F, h) => {
1523
+ var k;
1524
+ const m = S("FmPageHead"), d = S("FmTabs");
1525
+ return c(), C("div", jo, [
1536
1526
  i(m, {
1537
- title: ((h = e.value) == null ? void 0 : h.name) || "Bukku",
1527
+ title: ((k = e.value) == null ? void 0 : k.name) || "Bukku",
1538
1528
  "back-button": !0,
1539
1529
  style: { paddingLeft: "0px", paddingRight: "0px" },
1540
- "onClick:back": f(b).back
1530
+ "onClick:back": f(w).back
1541
1531
  }, {
1542
- description: xe(() => w[2] || (w[2] = [
1532
+ description: ge(() => h[2] || (h[2] = [
1543
1533
  t("div", null, null, -1)
1544
1534
  ])),
1545
1535
  _: 1
1546
1536
  }, 8, ["title", "onClick:back"]),
1547
1537
  i(d, {
1548
1538
  "model-value": n.value,
1549
- "onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
1550
- items: k
1539
+ "onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
1540
+ items: V
1551
1541
  }, null, 8, ["model-value"]),
1552
- t("div", Eo, [
1553
- (c(), K(be(x.value), {
1542
+ t("div", Lo, [
1543
+ (c(), M(xe(_.value), {
1554
1544
  modelValue: e.value,
1555
- "onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
1545
+ "onUpdate:modelValue": h[1] || (h[1] = (b) => e.value = b)
1556
1546
  }, null, 8, ["modelValue"]))
1557
1547
  ])
1558
1548
  ]);
1559
1549
  };
1560
1550
  }
1561
- }), Yo = {
1551
+ }), zo = {
1562
1552
  key: 0,
1563
1553
  class: "flex flex-col h-full"
1564
- }, 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__ */ H({
1554
+ }, Yo = { class: "flex flex-col gap-16 pb-[24px]" }, qo = { class: "flex flex-row justify-between items-center gap-2" }, Ho = { class: "flex flex-row gap-2 items-center" }, Xo = { class: "relative group cursor-pointer" }, Qo = { 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" }, Go = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Jo = { class: "flex flex-col gap-16" }, Wo = { class: "fm-typo-en-title-sm-800" }, Zo = { class: "flex flex-row items-center max-w-[100%]" }, ea = { class: "w-[25%]" }, ta = { class: "flex-grow" }, oa = { class: "flex flex-row items-center max-w-[100%]" }, aa = { class: "w-[25%]" }, la = { class: "flex flex-row items-center max-w-[100%]" }, na = { class: "w-[25%]" }, sa = { class: "flex flex-col gap-16" }, ia = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ra = { class: "flex flex-row items-center gap-x-16" }, ma = { class: "fm-typo-en-title-sm-800" }, ca = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, da = { class: "flex flex-row items-center gap-x-16" }, pa = { class: "fm-typo-en-title-sm-800" }, ua = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, fa = { class: "flex flex-row items-center gap-x-16" }, va = { class: "fm-typo-en-title-sm-800" }, ga = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ya = /* @__PURE__ */ q({
1565
1555
  __name: "Setting",
1566
1556
  props: {
1567
1557
  modelValue: { required: !0 },
@@ -1569,34 +1559,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1569
1559
  },
1570
1560
  emits: ["update:modelValue"],
1571
1561
  setup(g) {
1572
- const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
1573
- () => w.map((l) => ({ label: l.name, value: l.id }))
1562
+ const { t: o } = J(), e = X(g, "modelValue"), n = ue(), V = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
1563
+ () => h.map((l) => ({ label: l.name, value: l.id }))
1574
1564
  );
1575
1565
  async function d() {
1576
- await D({
1566
+ await F({
1577
1567
  message: o("report.messages.confirmDelete", { name: e.value.name }),
1578
1568
  title: o("report.common.delete")
1579
- }) && await x(async () => {
1569
+ }) && await _(async () => {
1580
1570
  try {
1581
- await Ve(e.value._id), await k.getSettings(), b.back();
1571
+ await he(e.value._id), await V.getSettings(), w.back();
1582
1572
  } catch (a) {
1583
1573
  n.open({ type: "error", message: a.message });
1584
1574
  }
1585
1575
  });
1586
1576
  }
1587
- async function h() {
1588
- await x(async () => {
1577
+ async function k() {
1578
+ await _(async () => {
1589
1579
  try {
1590
- await $e(e.value._id, e.value), await k.getSettings();
1580
+ await ke(e.value._id, e.value), await V.getSettings();
1591
1581
  } catch (l) {
1592
1582
  n.open({ type: "error", message: l.message });
1593
1583
  }
1594
1584
  });
1595
1585
  }
1596
- function _(l, a) {
1586
+ function b(l, a) {
1597
1587
  var v, s;
1598
1588
  (s = (v = e.value.platform) == null ? void 0 : v.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
1599
- (P, N) => N !== a
1589
+ (A, P) => P !== a
1600
1590
  ));
1601
1591
  }
1602
1592
  function u(l) {
@@ -1616,15 +1606,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1616
1606
  const p = [
1617
1607
  {
1618
1608
  label: "By day",
1619
- value: ve.BY_DAY
1609
+ value: fe.BY_DAY
1620
1610
  },
1621
1611
  {
1622
1612
  label: "By invoice",
1623
- value: ve.BY_INVOICE
1613
+ value: fe.BY_INVOICE
1624
1614
  },
1625
1615
  {
1626
1616
  label: "By day and category",
1627
- value: ve.BY_DAY_CATEGORY
1617
+ value: fe.BY_DAY_CATEGORY
1628
1618
  }
1629
1619
  ];
1630
1620
  function r({
@@ -1634,36 +1624,36 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1634
1624
  var v, s;
1635
1625
  (s = (v = e.value) == null ? void 0 : v.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
1636
1626
  }
1637
- function y(l) {
1627
+ function x(l) {
1638
1628
  return {
1639
1629
  key: { placeholder: l, editable: !1 },
1640
1630
  account: { placeholder: l, editable: !0 }
1641
1631
  };
1642
1632
  }
1643
- async function V() {
1644
- await x(async () => {
1633
+ async function $() {
1634
+ await _(async () => {
1645
1635
  try {
1646
- await Se(e.value._id), await k.getSettings();
1636
+ await Ve(e.value._id), await V.getSettings();
1647
1637
  } catch (l) {
1648
1638
  n.open({ type: "error", message: l.message });
1649
1639
  }
1650
1640
  });
1651
1641
  }
1652
1642
  return (l, a) => {
1653
- var Y, J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie;
1654
- const v = $("FmIcon"), s = $("FmButton"), P = $("FmMenuDivider"), N = $("FmTextField"), G = $("FmSelect");
1655
- return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (c(), F("div", Yo, [
1656
- t("div", qo, [
1657
- t("div", Ho, [
1643
+ var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se;
1644
+ const v = S("FmIcon"), s = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
1645
+ return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), C("div", zo, [
1646
+ t("div", Yo, [
1647
+ t("div", qo, [
1658
1648
  a[14] || (a[14] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
1659
- t("div", Xo, [
1660
- t("div", Qo, [
1649
+ t("div", Ho, [
1650
+ t("div", Xo, [
1661
1651
  i(v, {
1662
1652
  name: "refresh",
1663
1653
  class: "p-2 bg-gray-100 rounded-full",
1664
- onClick: V
1654
+ onClick: $
1665
1655
  }),
1666
- t("span", Go, T(f(o)("report.integration.autoCount.repopulate")), 1)
1656
+ t("span", Qo, T(f(o)("report.integration.autoCount.repopulate")), 1)
1667
1657
  ]),
1668
1658
  i(s, {
1669
1659
  variant: "tertiary",
@@ -1673,41 +1663,41 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1673
1663
  i(s, {
1674
1664
  variant: "primary",
1675
1665
  label: f(o)("report.common.update"),
1676
- onClick: h
1666
+ onClick: k
1677
1667
  }, null, 8, ["label"])
1678
1668
  ])
1679
1669
  ])
1680
1670
  ]),
1681
- i(P, { style: { margin: 0 } }),
1682
- t("div", Jo, [
1683
- t("div", Wo, [
1684
- t("div", Zo, T(f(o)("report.integration.autocount.general")), 1),
1685
- t("div", ea, [
1686
- t("div", ta, T(f(o)("report.common.name")), 1),
1687
- t("div", oa, [
1688
- i(N, {
1671
+ i(A, { style: { margin: 0 } }),
1672
+ t("div", Go, [
1673
+ t("div", Jo, [
1674
+ t("div", Wo, T(f(o)("report.integration.autocount.general")), 1),
1675
+ t("div", Zo, [
1676
+ t("div", ea, T(f(o)("report.common.name")), 1),
1677
+ t("div", ta, [
1678
+ i(P, {
1689
1679
  modelValue: e.value.name,
1690
- "onUpdate:modelValue": a[0] || (a[0] = (U) => e.value.name = U)
1680
+ "onUpdate:modelValue": a[0] || (a[0] = (D) => e.value.name = D)
1691
1681
  }, null, 8, ["modelValue"])
1692
1682
  ])
1693
1683
  ]),
1694
- t("div", aa, [
1695
- t("div", la, T(f(o)("report.integration.location")), 1),
1696
- i(G, {
1684
+ t("div", oa, [
1685
+ t("div", aa, T(f(o)("report.integration.location")), 1),
1686
+ i(Q, {
1697
1687
  modelValue: e.value.platform.locationIds,
1698
- "onUpdate:modelValue": a[1] || (a[1] = (U) => e.value.platform.locationIds = U),
1688
+ "onUpdate:modelValue": a[1] || (a[1] = (D) => e.value.platform.locationIds = D),
1699
1689
  multiselect: !0,
1700
1690
  items: m.value,
1701
1691
  placeholder: "Select location",
1702
1692
  class: "flex-grow",
1703
- rules: [(U) => U.length !== 0 || "Please select at least 1 location"]
1693
+ rules: [(D) => D.length !== 0 || "Please select at least 1 location"]
1704
1694
  }, null, 8, ["modelValue", "items", "rules"])
1705
1695
  ]),
1706
- t("div", na, [
1707
- t("div", sa, T(f(o)("report.integration.autoCount.grouping.title")), 1),
1708
- i(G, {
1696
+ t("div", la, [
1697
+ t("div", na, T(f(o)("report.integration.autoCount.grouping.title")), 1),
1698
+ i(Q, {
1709
1699
  modelValue: e.value.platform.grouping,
1710
- "onUpdate:modelValue": a[2] || (a[2] = (U) => e.value.platform.grouping = U),
1700
+ "onUpdate:modelValue": a[2] || (a[2] = (D) => e.value.platform.grouping = D),
1711
1701
  multiselect: !1,
1712
1702
  items: p,
1713
1703
  placeholder: "Select grouping",
@@ -1715,65 +1705,65 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1715
1705
  }, null, 8, ["modelValue"])
1716
1706
  ])
1717
1707
  ]),
1718
- t("div", ia, [
1719
- t("div", ra, [
1720
- i(A, {
1708
+ t("div", sa, [
1709
+ t("div", ia, [
1710
+ i(K, {
1721
1711
  "model-value": { key: "Project", account: e.value.platform.mappings.project },
1722
- options: y("Project"),
1723
- "onUpdate:modelValue": a[3] || (a[3] = (U) => r({ key: "project", value: U.account }))
1712
+ options: x("Project"),
1713
+ "onUpdate:modelValue": a[3] || (a[3] = (D) => r({ key: "project", value: D.account }))
1724
1714
  }, null, 8, ["model-value", "options"]),
1725
- i(A, {
1715
+ i(K, {
1726
1716
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
1727
- options: y("Debtor"),
1728
- "onUpdate:modelValue": a[4] || (a[4] = (U) => r({ key: "debtor", value: U.account }))
1717
+ options: x("Debtor"),
1718
+ "onUpdate:modelValue": a[4] || (a[4] = (D) => r({ key: "debtor", value: D.account }))
1729
1719
  }, null, 8, ["model-value", "options"]),
1730
- i(A, {
1720
+ i(K, {
1731
1721
  "model-value": {
1732
1722
  key: "Invoice no",
1733
1723
  account: e.value.platform.mappings.invoiceDocNo
1734
1724
  },
1735
- options: y("Invoice no"),
1736
- "onUpdate:modelValue": a[5] || (a[5] = (U) => r({ key: "invoiceDocNo", value: U.account }))
1725
+ options: x("Invoice no"),
1726
+ "onUpdate:modelValue": a[5] || (a[5] = (D) => r({ key: "invoiceDocNo", value: D.account }))
1737
1727
  }, null, 8, ["model-value", "options"]),
1738
- i(A, {
1728
+ i(K, {
1739
1729
  "model-value": {
1740
1730
  key: "Credit note no",
1741
1731
  account: e.value.platform.mappings.creditNoteDocNo
1742
1732
  },
1743
- options: y("Credit note no"),
1744
- "onUpdate:modelValue": a[6] || (a[6] = (U) => r({ key: "creditNoteDocNo", value: U.account }))
1733
+ options: x("Credit note no"),
1734
+ "onUpdate:modelValue": a[6] || (a[6] = (D) => r({ key: "creditNoteDocNo", value: D.account }))
1745
1735
  }, null, 8, ["model-value", "options"]),
1746
- i(A, {
1736
+ i(K, {
1747
1737
  "model-value": {
1748
1738
  key: "Payment no",
1749
1739
  account: e.value.platform.mappings.paymentDocNo
1750
1740
  },
1751
- options: y("Payment no"),
1752
- "onUpdate:modelValue": a[7] || (a[7] = (U) => r({ key: "paymentDocNo", value: U.account }))
1741
+ options: x("Payment no"),
1742
+ "onUpdate:modelValue": a[7] || (a[7] = (D) => r({ key: "paymentDocNo", value: D.account }))
1753
1743
  }, null, 8, ["model-value", "options"]),
1754
- i(A, {
1744
+ i(K, {
1755
1745
  "model-value": {
1756
1746
  key: "Refund no",
1757
1747
  account: e.value.platform.mappings.refundDocNo
1758
1748
  },
1759
- options: y("Refund no"),
1760
- "onUpdate:modelValue": a[8] || (a[8] = (U) => r({ key: "refundDocNo", value: U.account }))
1749
+ options: x("Refund no"),
1750
+ "onUpdate:modelValue": a[8] || (a[8] = (D) => r({ key: "refundDocNo", value: D.account }))
1761
1751
  }, null, 8, ["model-value", "options"]),
1762
- i(A, {
1752
+ i(K, {
1763
1753
  "model-value": {
1764
1754
  key: "Rounding",
1765
1755
  account: e.value.platform.mappings.rounding.account
1766
1756
  },
1767
- options: y("Rounding"),
1768
- "onUpdate:modelValue": a[9] || (a[9] = (U) => {
1769
- var S, C, M;
1770
- (M = (C = (S = e.value) == null ? void 0 : S.platform) == null ? void 0 : C.mappings) != null && M.rounding && (e.value.platform.mappings.rounding.account = U.account);
1757
+ options: x("Rounding"),
1758
+ "onUpdate:modelValue": a[9] || (a[9] = (D) => {
1759
+ var y, U, O;
1760
+ (O = (U = (y = e.value) == null ? void 0 : y.platform) == null ? void 0 : U.mappings) != null && O.rounding && (e.value.platform.mappings.rounding.account = D.account);
1771
1761
  })
1772
1762
  }, null, 8, ["model-value", "options"]),
1773
- (c(!0), F(L, null, X((E = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : E.charges, (U, S) => (c(), K(A, {
1774
- key: `charge-${S}`,
1775
- modelValue: e.value.platform.mappings.charges[S],
1776
- "onUpdate:modelValue": (C) => e.value.platform.mappings.charges[S] = C,
1763
+ (c(!0), C(L, null, H((z = (j = (R = e.value) == null ? void 0 : R.platform) == null ? void 0 : j.mappings) == null ? void 0 : z.charges, (D, y) => (c(), M(K, {
1764
+ key: `charge-${y}`,
1765
+ modelValue: e.value.platform.mappings.charges[y],
1766
+ "onUpdate:modelValue": (U) => e.value.platform.mappings.charges[y] = U,
1777
1767
  options: {
1778
1768
  key: { placeholder: "Key", editable: !1 },
1779
1769
  account: { placeholder: "Account code", editable: !0 }
@@ -1781,82 +1771,82 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1781
1771
  }, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
1782
1772
  ])
1783
1773
  ]),
1784
- i(Te, {
1774
+ i(De, {
1785
1775
  modelValue: e.value.platform,
1786
- "onUpdate:modelValue": a[10] || (a[10] = (U) => e.value.platform = U),
1776
+ "onUpdate:modelValue": a[10] || (a[10] = (D) => e.value.platform = D),
1787
1777
  label: f(o)("report.input.email")
1788
1778
  }, null, 8, ["modelValue", "label"]),
1789
- t("div", ma, [
1790
- t("div", ca, T(f(o)("report.integration.items")), 1),
1779
+ t("div", ra, [
1780
+ t("div", ma, T(f(o)("report.integration.items")), 1),
1791
1781
  i(s, {
1792
1782
  variant: "primary",
1793
1783
  icon: "add",
1794
1784
  onClick: a[11] || (a[11] = () => u("items"))
1795
1785
  })
1796
1786
  ]),
1797
- t("div", da, [
1798
- (c(!0), F(L, null, X((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U, S) => (c(), K(A, {
1799
- key: `item-${S}`,
1800
- modelValue: e.value.platform.mappings.items[S],
1801
- "onUpdate:modelValue": (C) => e.value.platform.mappings.items[S] = C,
1787
+ t("div", ca, [
1788
+ (c(!0), C(L, null, H((ee = (Z = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : Z.mappings) == null ? void 0 : ee.items, (D, y) => (c(), M(K, {
1789
+ key: `item-${y}`,
1790
+ modelValue: e.value.platform.mappings.items[y],
1791
+ "onUpdate:modelValue": (U) => e.value.platform.mappings.items[y] = U,
1802
1792
  options: {
1803
1793
  key: { placeholder: "Key", editable: !0 },
1804
1794
  account: { placeholder: "Account code", editable: !0 }
1805
1795
  },
1806
1796
  removable: !0,
1807
- onRemove: () => _("items", S)
1797
+ onRemove: () => b("items", y)
1808
1798
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1809
1799
  ]),
1810
- t("div", pa, [
1811
- t("div", ua, T(f(o)("report.integration.taxes")), 1),
1800
+ t("div", da, [
1801
+ t("div", pa, T(f(o)("report.integration.taxes")), 1),
1812
1802
  i(s, {
1813
1803
  variant: "primary",
1814
1804
  icon: "add",
1815
1805
  onClick: a[12] || (a[12] = () => u("taxes"))
1816
1806
  })
1817
1807
  ]),
1818
- t("div", fa, [
1819
- (c(!0), F(L, null, X((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U, S) => (c(), K(A, {
1820
- key: `tax-${S}`,
1821
- modelValue: e.value.platform.mappings.taxes[S],
1822
- "onUpdate:modelValue": (C) => e.value.platform.mappings.taxes[S] = C,
1808
+ t("div", ua, [
1809
+ (c(!0), C(L, null, H((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.taxes, (D, y) => (c(), M(K, {
1810
+ key: `tax-${y}`,
1811
+ modelValue: e.value.platform.mappings.taxes[y],
1812
+ "onUpdate:modelValue": (U) => e.value.platform.mappings.taxes[y] = U,
1823
1813
  options: {
1824
1814
  key: { placeholder: "Key", editable: !0 },
1825
1815
  account: { placeholder: "Account code", editable: !0 }
1826
1816
  },
1827
1817
  removable: !0,
1828
- onRemove: () => _("taxes", S)
1818
+ onRemove: () => b("taxes", y)
1829
1819
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1830
1820
  ]),
1831
- t("div", va, [
1832
- t("div", ga, T(f(o)("report.integration.payments")), 1),
1821
+ t("div", fa, [
1822
+ t("div", va, T(f(o)("report.integration.payments")), 1),
1833
1823
  i(s, {
1834
1824
  variant: "primary",
1835
1825
  icon: "add",
1836
1826
  onClick: a[13] || (a[13] = () => u("payments"))
1837
1827
  })
1838
1828
  ]),
1839
- t("div", ya, [
1840
- (c(!0), F(L, null, X((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U, S) => (c(), K(A, {
1841
- key: `payment-${S}`,
1842
- modelValue: e.value.platform.mappings.payments[S],
1843
- "onUpdate:modelValue": (C) => e.value.platform.mappings.payments[S] = C,
1829
+ t("div", ga, [
1830
+ (c(!0), C(L, null, H((se = (ne = (le = e.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.payments, (D, y) => (c(), M(K, {
1831
+ key: `payment-${y}`,
1832
+ modelValue: e.value.platform.mappings.payments[y],
1833
+ "onUpdate:modelValue": (U) => e.value.platform.mappings.payments[y] = U,
1844
1834
  options: {
1845
1835
  key: { placeholder: "Key", editable: !0 },
1846
1836
  account: { placeholder: "Payment name", editable: !0 }
1847
1837
  },
1848
1838
  removable: !0,
1849
- onRemove: () => _("payments", S)
1839
+ onRemove: () => b("payments", y)
1850
1840
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1851
1841
  ])
1852
1842
  ])
1853
- ])) : R("", !0);
1843
+ ])) : N("", !0);
1854
1844
  };
1855
1845
  }
1856
- }), _a = { class: "h-full flex flex-col gap-16" }, ba = { class: "flex flex-row gap-2 justify-between items-center" }, wa = {
1846
+ }), xa = { class: "h-full flex flex-col gap-16" }, _a = { class: "flex flex-row gap-2 justify-between items-center" }, ba = {
1857
1847
  key: 0,
1858
1848
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
1859
- }, ha = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ka = /* @__PURE__ */ H({
1849
+ }, wa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ha = /* @__PURE__ */ q({
1860
1850
  __name: "Preview",
1861
1851
  props: {
1862
1852
  modelValue: { required: !0 },
@@ -1864,10 +1854,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1864
1854
  },
1865
1855
  emits: ["update:modelValue"],
1866
1856
  setup(g) {
1867
- const { t: o } = W(), e = B([]), n = z(
1868
- () => e.value.reduce((d, h) => {
1869
- const _ = d.length, { invoice: u, payments: p } = h;
1870
- d[_] = {
1857
+ const { t: o } = J(), e = B([]), n = Y(
1858
+ () => e.value.reduce((d, k) => {
1859
+ const b = d.length, { invoice: u, payments: p } = k;
1860
+ d[b] = {
1871
1861
  date: u.DocDate,
1872
1862
  docNo: u.DocNo,
1873
1863
  projNo: u.ProjNo,
@@ -1875,16 +1865,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1875
1865
  description: u.Description
1876
1866
  };
1877
1867
  for (let r = 0; r < Math.max(u._items.length, p.length); r++) {
1878
- const y = _ + r;
1879
- d[y] || (d[y] = {}), u._items[r] && (d[y] = {
1880
- ...d[y],
1868
+ const x = b + r;
1869
+ d[x] || (d[x] = {}), u._items[r] && (d[x] = {
1870
+ ...d[x],
1881
1871
  itemDescription: u._items[r].DetailDescription,
1882
1872
  itemUnitPrice: u._items[r].Amount,
1883
1873
  itemAccount: u._items[r].AccNo,
1884
1874
  itemTaxCode: u._items[r].TaxType,
1885
1875
  itemTax: u._items[r].Tax
1886
- }), p[r] && (d[y] = {
1887
- ...d[y],
1876
+ }), p[r] && (d[x] = {
1877
+ ...d[x],
1888
1878
  paymentDocNo: p[r].DocNo,
1889
1879
  paymentMethod: p[r].paymentMethod,
1890
1880
  paymentDescription: p[r].Description,
@@ -1893,7 +1883,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1893
1883
  }
1894
1884
  return d;
1895
1885
  }, [])
1896
- ), k = [
1886
+ ), V = [
1897
1887
  {
1898
1888
  accessorKey: "date",
1899
1889
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -1964,17 +1954,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1964
1954
  header: "Payment Amount",
1965
1955
  enableSorting: !1
1966
1956
  }
1967
- ], b = Q(g, "modelValue"), x = B(!1), D = fe(), { dateRange: w } = De(ue());
1968
- ge(
1969
- () => w.value,
1957
+ ], w = X(g, "modelValue"), _ = B(!1), F = ue(), { dateRange: h } = Ce(pe());
1958
+ ve(
1959
+ () => h.value,
1970
1960
  async () => {
1971
- if (b.value._id)
1961
+ if (w.value._id)
1972
1962
  try {
1973
- x.value = !0, e.value = await Ce(b.value._id);
1963
+ _.value = !0, e.value = await $e(w.value._id);
1974
1964
  } catch (d) {
1975
- D.open({ message: d.message, type: "error" });
1965
+ F.open({ message: d.message, type: "error" });
1976
1966
  } finally {
1977
- x.value = !1;
1967
+ _.value = !1;
1978
1968
  }
1979
1969
  },
1980
1970
  {
@@ -1983,42 +1973,42 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1983
1973
  );
1984
1974
  async function m() {
1985
1975
  try {
1986
- b.value._id ? (x.value = !0, await Pe(b.value._id)) : D.open({ message: "Invalid accounting setting", type: "error" });
1976
+ w.value._id ? (_.value = !0, await Pe(w.value._id)) : F.open({ message: "Invalid accounting setting", type: "error" });
1987
1977
  } catch (d) {
1988
- D.open({ message: d.message, type: "error" });
1978
+ F.open({ message: d.message, type: "error" });
1989
1979
  } finally {
1990
- x.value = !1;
1980
+ _.value = !1;
1991
1981
  }
1992
1982
  }
1993
- return (d, h) => {
1994
- const _ = $("FmButton"), u = $("FmCircularProgress"), p = $("FmTable");
1995
- return c(), F("div", _a, [
1996
- t("div", ba, [
1997
- i(Ue, {
1998
- "date-range": f(w),
1999
- "onUpdate:dateRange": h[0] || (h[0] = (r) => he(w) ? w.value = r : null),
1983
+ return (d, k) => {
1984
+ const b = S("FmButton"), u = S("FmCircularProgress"), p = S("FmTable");
1985
+ return c(), C("div", xa, [
1986
+ t("div", _a, [
1987
+ i(Fe, {
1988
+ "date-range": f(h),
1989
+ "onUpdate:dateRange": k[0] || (k[0] = (r) => be(h) ? h.value = r : null),
2000
1990
  compare: !1
2001
1991
  }, null, 8, ["date-range"]),
2002
- i(_, {
2003
- loading: x.value,
1992
+ i(b, {
1993
+ loading: _.value,
2004
1994
  variant: "primary",
2005
1995
  label: f(o)("report.common.download"),
2006
1996
  onClick: m
2007
1997
  }, null, 8, ["loading", "label"])
2008
1998
  ]),
2009
- x.value ? (c(), F("div", wa, [
1999
+ _.value ? (c(), C("div", ba, [
2010
2000
  i(u, { size: "xl" }),
2011
- t("span", ha, T(f(o)("report.common.isLoading")), 1)
2012
- ])) : n.value.length > 0 ? (c(), K(p, {
2001
+ t("span", wa, T(f(o)("report.common.isLoading")), 1)
2002
+ ])) : n.value.length > 0 ? (c(), M(p, {
2013
2003
  key: 1,
2014
2004
  class: "flex overflow-scroll",
2015
2005
  "row-data": n.value,
2016
- "column-defs": k
2017
- }, null, 8, ["row-data"])) : R("", !0)
2006
+ "column-defs": V
2007
+ }, null, 8, ["row-data"])) : N("", !0)
2018
2008
  ]);
2019
2009
  };
2020
2010
  }
2021
- }), Va = { class: "h-full relative flex flex-col" }, $a = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Sa = /* @__PURE__ */ H({
2011
+ }), ka = { class: "h-full relative flex flex-col" }, Va = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, $a = /* @__PURE__ */ q({
2022
2012
  __name: "AutoCount",
2023
2013
  props: {
2024
2014
  modelValue: {},
@@ -2026,7 +2016,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2026
2016
  },
2027
2017
  emits: ["update:modelValue"],
2028
2018
  setup(g) {
2029
- const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
2019
+ const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = [
2030
2020
  {
2031
2021
  label: o("report.integration.setting"),
2032
2022
  value: "setting",
@@ -2037,49 +2027,49 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2037
2027
  value: "preview",
2038
2028
  icon: "table"
2039
2029
  }
2040
- ], b = pe(), x = z(() => {
2030
+ ], w = de(), _ = Y(() => {
2041
2031
  switch (n.value) {
2042
2032
  case "preview":
2043
- return ka;
2033
+ return ha;
2044
2034
  case "setting":
2045
- return xa;
2035
+ return ya;
2046
2036
  default:
2047
2037
  return null;
2048
2038
  }
2049
2039
  });
2050
- return (D, w) => {
2051
- var h;
2052
- const m = $("FmPageHead"), d = $("FmTabs");
2053
- return c(), F("div", Va, [
2040
+ return (F, h) => {
2041
+ var k;
2042
+ const m = S("FmPageHead"), d = S("FmTabs");
2043
+ return c(), C("div", ka, [
2054
2044
  i(m, {
2055
- title: ((h = e.value) == null ? void 0 : h.name) || "AutoCount",
2045
+ title: ((k = e.value) == null ? void 0 : k.name) || "AutoCount",
2056
2046
  "back-button": !0,
2057
2047
  style: { paddingLeft: "0px", paddingRight: "0px" },
2058
- "onClick:back": f(b).back
2048
+ "onClick:back": f(w).back
2059
2049
  }, {
2060
- description: xe(() => w[2] || (w[2] = [
2050
+ description: ge(() => h[2] || (h[2] = [
2061
2051
  t("div", null, null, -1)
2062
2052
  ])),
2063
2053
  _: 1
2064
2054
  }, 8, ["title", "onClick:back"]),
2065
2055
  i(d, {
2066
2056
  "model-value": n.value,
2067
- "onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
2068
- items: k
2057
+ "onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
2058
+ items: V
2069
2059
  }, null, 8, ["model-value"]),
2070
- t("div", $a, [
2071
- (c(), K(be(x.value), {
2060
+ t("div", Va, [
2061
+ (c(), M(xe(_.value), {
2072
2062
  modelValue: e.value,
2073
- "onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
2063
+ "onUpdate:modelValue": h[1] || (h[1] = (b) => e.value = b)
2074
2064
  }, null, 8, ["modelValue"]))
2075
2065
  ])
2076
2066
  ]);
2077
2067
  };
2078
2068
  }
2079
- }), Ca = {
2069
+ }), Sa = {
2080
2070
  key: 0,
2081
2071
  class: "flex flex-col h-full"
2082
- }, 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__ */ H({
2072
+ }, Ca = { class: "flex flex-col gap-16 pb-[24px]" }, Fa = { class: "flex flex-row justify-between items-center gap-2" }, Da = { class: "flex flex-row gap-2 items-center" }, Ua = { class: "relative group cursor-pointer" }, Ta = { 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" }, Ia = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ma = { class: "flex flex-col gap-16" }, Ka = { class: "fm-typo-en-title-sm-800" }, Aa = { class: "flex flex-row items-center max-w-[100%]" }, Pa = { class: "w-[25%]" }, Na = { class: "flex-grow" }, Ra = { class: "flex flex-row items-center max-w-[100%]" }, Oa = { class: "w-[25%]" }, Ba = { class: "flex flex-row items-center max-w-[100%]" }, ja = { class: "w-[25%]" }, La = { class: "flex flex-col gap-16" }, Ea = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, za = { class: "grid-cols-1 grid gap-16" }, Ya = { class: "flex flex-row items-center gap-x-16" }, qa = { class: "fm-typo-en-title-sm-800" }, Ha = { class: "grid-cols-1 grid gap-16" }, Xa = { class: "flex flex-row items-center gap-x-16" }, Qa = { class: "fm-typo-en-title-sm-800" }, Ga = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ja = { class: "flex flex-row items-center gap-x-16" }, Wa = { class: "fm-typo-en-title-sm-800" }, Za = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, el = /* @__PURE__ */ q({
2083
2073
  __name: "Setting",
2084
2074
  props: {
2085
2075
  modelValue: { required: !0 },
@@ -2087,34 +2077,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2087
2077
  },
2088
2078
  emits: ["update:modelValue"],
2089
2079
  setup(g) {
2090
- const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
2091
- () => w.map((l) => ({ label: l.name, value: l.id }))
2080
+ const { t: o } = J(), e = X(g, "modelValue"), n = ue(), V = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
2081
+ () => h.map((l) => ({ label: l.name, value: l.id }))
2092
2082
  );
2093
2083
  async function d() {
2094
- await D({
2084
+ await F({
2095
2085
  message: o("report.messages.confirmDelete", { name: e.value.name }),
2096
2086
  title: o("report.common.delete")
2097
- }) && await x(async () => {
2087
+ }) && await _(async () => {
2098
2088
  try {
2099
- await Ve(e.value._id), await k.getSettings(), b.back();
2089
+ await he(e.value._id), await V.getSettings(), w.back();
2100
2090
  } catch (a) {
2101
2091
  n.open({ type: "error", message: a.message });
2102
2092
  }
2103
2093
  });
2104
2094
  }
2105
- async function h() {
2106
- await x(async () => {
2095
+ async function k() {
2096
+ await _(async () => {
2107
2097
  try {
2108
- await $e(e.value._id, e.value), await k.getSettings();
2098
+ await ke(e.value._id, e.value), await V.getSettings();
2109
2099
  } catch (l) {
2110
2100
  n.open({ type: "error", message: l.message });
2111
2101
  }
2112
2102
  });
2113
2103
  }
2114
- function _(l, a) {
2104
+ function b(l, a) {
2115
2105
  var v, s;
2116
2106
  (s = (v = e.value.platform) == null ? void 0 : v.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
2117
- (P, N) => N !== a
2107
+ (A, P) => P !== a
2118
2108
  ));
2119
2109
  }
2120
2110
  function u(l) {
@@ -2135,15 +2125,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2135
2125
  const p = [
2136
2126
  {
2137
2127
  label: "By day",
2138
- value: ve.BY_DAY
2128
+ value: fe.BY_DAY
2139
2129
  },
2140
2130
  {
2141
2131
  label: "By invoice",
2142
- value: ve.BY_INVOICE
2132
+ value: fe.BY_INVOICE
2143
2133
  },
2144
2134
  {
2145
2135
  label: "By day and category",
2146
- value: ve.BY_DAY_CATEGORY
2136
+ value: fe.BY_DAY_CATEGORY
2147
2137
  }
2148
2138
  ];
2149
2139
  function r({
@@ -2153,36 +2143,36 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2153
2143
  var v, s;
2154
2144
  (s = (v = e.value) == null ? void 0 : v.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
2155
2145
  }
2156
- function y(l) {
2146
+ function x(l) {
2157
2147
  return {
2158
2148
  key: { placeholder: l, editable: !1 },
2159
2149
  account: { placeholder: l, editable: !0 }
2160
2150
  };
2161
2151
  }
2162
- async function V() {
2163
- await x(async () => {
2152
+ async function $() {
2153
+ await _(async () => {
2164
2154
  try {
2165
- await Se(e.value._id), await k.getSettings();
2155
+ await Ve(e.value._id), await V.getSettings();
2166
2156
  } catch (l) {
2167
2157
  n.open({ type: "error", message: l.message });
2168
2158
  }
2169
2159
  });
2170
2160
  }
2171
2161
  return (l, a) => {
2172
- var Y, J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie;
2173
- const v = $("FmIcon"), s = $("FmButton"), P = $("FmMenuDivider"), N = $("FmTextField"), G = $("FmSelect");
2174
- return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (c(), F("div", Ca, [
2175
- t("div", Fa, [
2176
- t("div", Da, [
2162
+ var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se;
2163
+ const v = S("FmIcon"), s = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
2164
+ return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), C("div", Sa, [
2165
+ t("div", Ca, [
2166
+ t("div", Fa, [
2177
2167
  a[15] || (a[15] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
2178
- t("div", Ua, [
2179
- t("div", Ta, [
2168
+ t("div", Da, [
2169
+ t("div", Ua, [
2180
2170
  i(v, {
2181
2171
  name: "refresh",
2182
2172
  class: "p-2 bg-gray-100 rounded-full",
2183
- onClick: V
2173
+ onClick: $
2184
2174
  }),
2185
- t("span", Ia, T(f(o)("report.integration.sql.refreshTooltip")), 1)
2175
+ t("span", Ta, T(f(o)("report.integration.sql.refreshTooltip")), 1)
2186
2176
  ]),
2187
2177
  i(s, {
2188
2178
  variant: "tertiary",
@@ -2192,41 +2182,41 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2192
2182
  i(s, {
2193
2183
  variant: "primary",
2194
2184
  label: f(o)("report.common.update"),
2195
- onClick: h
2185
+ onClick: k
2196
2186
  }, null, 8, ["label"])
2197
2187
  ])
2198
2188
  ])
2199
2189
  ]),
2200
- i(P, { style: { margin: 0 } }),
2201
- t("div", Ma, [
2202
- t("div", Ka, [
2203
- t("div", Aa, T(f(o)("report.integration.sql.general")), 1),
2204
- t("div", Pa, [
2205
- t("div", Na, T(f(o)("report.common.name")), 1),
2206
- t("div", Ra, [
2207
- i(N, {
2190
+ i(A, { style: { margin: 0 } }),
2191
+ t("div", Ia, [
2192
+ t("div", Ma, [
2193
+ t("div", Ka, T(f(o)("report.integration.sql.general")), 1),
2194
+ t("div", Aa, [
2195
+ t("div", Pa, T(f(o)("report.common.name")), 1),
2196
+ t("div", Na, [
2197
+ i(P, {
2208
2198
  modelValue: e.value.name,
2209
- "onUpdate:modelValue": a[0] || (a[0] = (U) => e.value.name = U)
2199
+ "onUpdate:modelValue": a[0] || (a[0] = (D) => e.value.name = D)
2210
2200
  }, null, 8, ["modelValue"])
2211
2201
  ])
2212
2202
  ]),
2213
- t("div", Oa, [
2214
- t("div", Ba, T(f(o)("report.integration.location")), 1),
2215
- i(G, {
2203
+ t("div", Ra, [
2204
+ t("div", Oa, T(f(o)("report.integration.location")), 1),
2205
+ i(Q, {
2216
2206
  modelValue: e.value.platform.locationIds,
2217
- "onUpdate:modelValue": a[1] || (a[1] = (U) => e.value.platform.locationIds = U),
2207
+ "onUpdate:modelValue": a[1] || (a[1] = (D) => e.value.platform.locationIds = D),
2218
2208
  multiselect: !0,
2219
2209
  items: m.value,
2220
2210
  placeholder: "Select location",
2221
2211
  class: "flex-grow",
2222
- rules: [(U) => U.length !== 0 || "Please select at least 1 location"]
2212
+ rules: [(D) => D.length !== 0 || "Please select at least 1 location"]
2223
2213
  }, null, 8, ["modelValue", "items", "rules"])
2224
2214
  ]),
2225
- t("div", ja, [
2226
- t("div", La, T(f(o)("report.integration.grouping")), 1),
2227
- i(G, {
2215
+ t("div", Ba, [
2216
+ t("div", ja, T(f(o)("report.integration.grouping")), 1),
2217
+ i(Q, {
2228
2218
  modelValue: e.value.platform.grouping,
2229
- "onUpdate:modelValue": a[2] || (a[2] = (U) => e.value.platform.grouping = U),
2219
+ "onUpdate:modelValue": a[2] || (a[2] = (D) => e.value.platform.grouping = D),
2230
2220
  multiselect: !1,
2231
2221
  items: p,
2232
2222
  placeholder: "Select grouping",
@@ -2234,64 +2224,64 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2234
2224
  }, null, 8, ["modelValue"])
2235
2225
  ])
2236
2226
  ]),
2237
- t("div", Ea, [
2238
- t("div", za, [
2239
- i(A, {
2227
+ t("div", La, [
2228
+ t("div", Ea, [
2229
+ i(K, {
2240
2230
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
2241
- options: y("Debtor"),
2242
- "onUpdate:modelValue": a[3] || (a[3] = (U) => r({ key: "debtor", value: U.account }))
2231
+ options: x("Debtor"),
2232
+ "onUpdate:modelValue": a[3] || (a[3] = (D) => r({ key: "debtor", value: D.account }))
2243
2233
  }, null, 8, ["model-value", "options"]),
2244
- i(A, {
2234
+ i(K, {
2245
2235
  "model-value": {
2246
2236
  key: "Invoice no",
2247
2237
  account: e.value.platform.mappings.invoiceDocNo
2248
2238
  },
2249
- options: y("Invoice no"),
2250
- "onUpdate:modelValue": a[4] || (a[4] = (U) => r({ key: "invoiceDocNo", value: U.account }))
2239
+ options: x("Invoice no"),
2240
+ "onUpdate:modelValue": a[4] || (a[4] = (D) => r({ key: "invoiceDocNo", value: D.account }))
2251
2241
  }, null, 8, ["model-value", "options"]),
2252
- i(A, {
2242
+ i(K, {
2253
2243
  "model-value": {
2254
2244
  key: "Credit note no",
2255
2245
  account: e.value.platform.mappings.creditNoteDocNo
2256
2246
  },
2257
- options: y("Credit note no"),
2258
- "onUpdate:modelValue": a[5] || (a[5] = (U) => r({ key: "creditNoteDocNo", value: U.account }))
2247
+ options: x("Credit note no"),
2248
+ "onUpdate:modelValue": a[5] || (a[5] = (D) => r({ key: "creditNoteDocNo", value: D.account }))
2259
2249
  }, null, 8, ["model-value", "options"]),
2260
- i(A, {
2250
+ i(K, {
2261
2251
  "model-value": {
2262
2252
  key: "Payment no",
2263
2253
  account: e.value.platform.mappings.paymentDocNo
2264
2254
  },
2265
- options: y("Payment no"),
2266
- "onUpdate:modelValue": a[6] || (a[6] = (U) => r({ key: "paymentDocNo", value: U.account }))
2255
+ options: x("Payment no"),
2256
+ "onUpdate:modelValue": a[6] || (a[6] = (D) => r({ key: "paymentDocNo", value: D.account }))
2267
2257
  }, null, 8, ["model-value", "options"]),
2268
- i(A, {
2258
+ i(K, {
2269
2259
  "model-value": {
2270
2260
  key: "Refund no",
2271
2261
  account: e.value.platform.mappings.refundDocNo
2272
2262
  },
2273
- options: y("Refund no"),
2274
- "onUpdate:modelValue": a[7] || (a[7] = (U) => r({ key: "refundDocNo", value: U.account }))
2263
+ options: x("Refund no"),
2264
+ "onUpdate:modelValue": a[7] || (a[7] = (D) => r({ key: "refundDocNo", value: D.account }))
2275
2265
  }, null, 8, ["model-value", "options"]),
2276
- i(A, {
2266
+ i(K, {
2277
2267
  "model-value": {
2278
2268
  key: "Project header",
2279
2269
  account: e.value.platform.mappings.projectHeader
2280
2270
  },
2281
- options: y("Project header"),
2282
- "onUpdate:modelValue": a[8] || (a[8] = (U) => r({ key: "projectHeader", value: U.account }))
2271
+ options: x("Project header"),
2272
+ "onUpdate:modelValue": a[8] || (a[8] = (D) => r({ key: "projectHeader", value: D.account }))
2283
2273
  }, null, 8, ["model-value", "options"]),
2284
- i(A, {
2274
+ i(K, {
2285
2275
  "model-value": {
2286
2276
  key: "Project detail",
2287
2277
  account: e.value.platform.mappings.projectDetail
2288
2278
  },
2289
- options: y("Project detail"),
2290
- "onUpdate:modelValue": a[9] || (a[9] = (U) => r({ key: "projectDetail", value: U.account }))
2279
+ options: x("Project detail"),
2280
+ "onUpdate:modelValue": a[9] || (a[9] = (D) => r({ key: "projectDetail", value: D.account }))
2291
2281
  }, null, 8, ["model-value", "options"])
2292
2282
  ]),
2293
- t("div", Ya, [
2294
- i(A, {
2283
+ t("div", za, [
2284
+ i(K, {
2295
2285
  "model-value": {
2296
2286
  key: "Rounding",
2297
2287
  account: e.value.platform.mappings.rounding.account,
@@ -2302,15 +2292,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2302
2292
  account: { placeholder: "Account code", editable: !0 },
2303
2293
  code: { placeholder: "Item code", editable: !0 }
2304
2294
  },
2305
- "onUpdate:modelValue": a[10] || (a[10] = (U) => {
2306
- var S, C, M;
2307
- (M = (C = (S = e.value) == null ? void 0 : S.platform) == null ? void 0 : C.mappings) != null && M.rounding && (e.value.platform.mappings.rounding.account = U.account, e.value.platform.mappings.rounding.code = U.code);
2295
+ "onUpdate:modelValue": a[10] || (a[10] = (D) => {
2296
+ var y, U, O;
2297
+ (O = (U = (y = e.value) == null ? void 0 : y.platform) == null ? void 0 : U.mappings) != null && O.rounding && (e.value.platform.mappings.rounding.account = D.account, e.value.platform.mappings.rounding.code = D.code);
2308
2298
  })
2309
2299
  }, null, 8, ["model-value"]),
2310
- (c(!0), F(L, null, X((E = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : E.charges, (U, S) => (c(), K(A, {
2311
- key: `charge-${S}`,
2312
- modelValue: e.value.platform.mappings.charges[S],
2313
- "onUpdate:modelValue": (C) => e.value.platform.mappings.charges[S] = C,
2300
+ (c(!0), C(L, null, H((z = (j = (R = e.value) == null ? void 0 : R.platform) == null ? void 0 : j.mappings) == null ? void 0 : z.charges, (D, y) => (c(), M(K, {
2301
+ key: `charge-${y}`,
2302
+ modelValue: e.value.platform.mappings.charges[y],
2303
+ "onUpdate:modelValue": (U) => e.value.platform.mappings.charges[y] = U,
2314
2304
  options: {
2315
2305
  key: { placeholder: "Key", editable: !1 },
2316
2306
  account: { placeholder: "Account code", editable: !0 },
@@ -2319,83 +2309,83 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2319
2309
  }, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
2320
2310
  ])
2321
2311
  ]),
2322
- i(Te, {
2312
+ i(De, {
2323
2313
  modelValue: e.value.platform,
2324
- "onUpdate:modelValue": a[11] || (a[11] = (U) => e.value.platform = U),
2314
+ "onUpdate:modelValue": a[11] || (a[11] = (D) => e.value.platform = D),
2325
2315
  label: "email"
2326
2316
  }, null, 8, ["modelValue"]),
2327
- t("div", qa, [
2328
- t("div", Ha, T(f(o)("report.integration.items")), 1),
2317
+ t("div", Ya, [
2318
+ t("div", qa, T(f(o)("report.integration.items")), 1),
2329
2319
  i(s, {
2330
2320
  variant: "primary",
2331
2321
  label: f(o)("report.action.add"),
2332
2322
  onClick: a[12] || (a[12] = () => u("items"))
2333
2323
  }, null, 8, ["label"])
2334
2324
  ]),
2335
- t("div", Xa, [
2336
- (c(!0), F(L, null, X((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U, S) => (c(), K(A, {
2337
- key: `item-${S}`,
2338
- modelValue: e.value.platform.mappings.items[S],
2339
- "onUpdate:modelValue": (C) => e.value.platform.mappings.items[S] = C,
2325
+ t("div", Ha, [
2326
+ (c(!0), C(L, null, H((ee = (Z = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : Z.mappings) == null ? void 0 : ee.items, (D, y) => (c(), M(K, {
2327
+ key: `item-${y}`,
2328
+ modelValue: e.value.platform.mappings.items[y],
2329
+ "onUpdate:modelValue": (U) => e.value.platform.mappings.items[y] = U,
2340
2330
  options: {
2341
2331
  key: { placeholder: "Key", editable: !0 },
2342
2332
  account: { placeholder: "Account code", editable: !0 },
2343
2333
  code: { placeholder: "Item code", editable: !0 }
2344
2334
  },
2345
2335
  removable: !0,
2346
- onRemove: () => _("items", S)
2336
+ onRemove: () => b("items", y)
2347
2337
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2348
2338
  ]),
2349
- t("div", Qa, [
2350
- t("div", Ga, T(f(o)("report.integration.taxes")), 1),
2339
+ t("div", Xa, [
2340
+ t("div", Qa, T(f(o)("report.integration.taxes")), 1),
2351
2341
  i(s, {
2352
2342
  variant: "primary",
2353
2343
  icon: "add",
2354
2344
  onClick: a[13] || (a[13] = () => u("taxes"))
2355
2345
  })
2356
2346
  ]),
2357
- t("div", Ja, [
2358
- (c(!0), F(L, null, X((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U, S) => (c(), K(A, {
2359
- key: `tax-${S}`,
2360
- modelValue: e.value.platform.mappings.taxes[S],
2361
- "onUpdate:modelValue": (C) => e.value.platform.mappings.taxes[S] = C,
2347
+ t("div", Ga, [
2348
+ (c(!0), C(L, null, H((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.taxes, (D, y) => (c(), M(K, {
2349
+ key: `tax-${y}`,
2350
+ modelValue: e.value.platform.mappings.taxes[y],
2351
+ "onUpdate:modelValue": (U) => e.value.platform.mappings.taxes[y] = U,
2362
2352
  options: {
2363
2353
  key: { placeholder: "Key", editable: !0 },
2364
2354
  account: { placeholder: "Account code", editable: !0 }
2365
2355
  },
2366
2356
  removable: !0,
2367
- onRemove: () => _("taxes", S)
2357
+ onRemove: () => b("taxes", y)
2368
2358
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2369
2359
  ]),
2370
- t("div", Wa, [
2371
- t("div", Za, T(f(o)("report.integration.payments")), 1),
2360
+ t("div", Ja, [
2361
+ t("div", Wa, T(f(o)("report.integration.payments")), 1),
2372
2362
  i(s, {
2373
2363
  variant: "primary",
2374
2364
  icon: "add",
2375
2365
  onClick: a[14] || (a[14] = () => u("payments"))
2376
2366
  })
2377
2367
  ]),
2378
- t("div", el, [
2379
- (c(!0), F(L, null, X((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U, S) => (c(), K(A, {
2380
- key: `payment-${S}`,
2381
- modelValue: e.value.platform.mappings.payments[S],
2382
- "onUpdate:modelValue": (C) => e.value.platform.mappings.payments[S] = C,
2368
+ t("div", Za, [
2369
+ (c(!0), C(L, null, H((se = (ne = (le = e.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.payments, (D, y) => (c(), M(K, {
2370
+ key: `payment-${y}`,
2371
+ modelValue: e.value.platform.mappings.payments[y],
2372
+ "onUpdate:modelValue": (U) => e.value.platform.mappings.payments[y] = U,
2383
2373
  options: {
2384
2374
  key: { placeholder: "Key", editable: !0 },
2385
2375
  account: { placeholder: "Method", editable: !0 }
2386
2376
  },
2387
2377
  removable: !0,
2388
- onRemove: () => _("payments", S)
2378
+ onRemove: () => b("payments", y)
2389
2379
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2390
2380
  ])
2391
2381
  ])
2392
- ])) : R("", !0);
2382
+ ])) : N("", !0);
2393
2383
  };
2394
2384
  }
2395
- }), ol = { class: "h-full flex flex-col gap-16" }, al = { class: "flex flex-row gap-2 justify-between items-center" }, ll = {
2385
+ }), tl = { class: "h-full flex flex-col gap-16" }, ol = { class: "flex flex-row gap-2 justify-between items-center" }, al = {
2396
2386
  key: 0,
2397
2387
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
2398
- }, nl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, sl = /* @__PURE__ */ H({
2388
+ }, ll = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, nl = /* @__PURE__ */ q({
2399
2389
  __name: "Preview",
2400
2390
  props: {
2401
2391
  modelValue: { required: !0 },
@@ -2403,26 +2393,26 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2403
2393
  },
2404
2394
  emits: ["update:modelValue"],
2405
2395
  setup(g) {
2406
- const { t: o } = W(), e = B([]), n = z(
2407
- () => e.value.reduce((d, h) => {
2408
- const _ = d.length, { invoice: u, payments: p } = h;
2409
- d[_] = {
2396
+ const { t: o } = J(), e = B([]), n = Y(
2397
+ () => e.value.reduce((d, k) => {
2398
+ const b = d.length, { invoice: u, payments: p } = k;
2399
+ d[b] = {
2410
2400
  date: u.DocDate,
2411
2401
  docNo: u.DocNo,
2412
2402
  debtor: u.Code,
2413
2403
  description: u.Description_HDR
2414
2404
  };
2415
2405
  for (let r = 0; r < Math.max(u._items.length, p.length); r++) {
2416
- const y = _ + r;
2417
- d[y] || (d[y] = {}), u._items[r] && (d[y] = {
2418
- ...d[y],
2406
+ const x = b + r;
2407
+ d[x] || (d[x] = {}), u._items[r] && (d[x] = {
2408
+ ...d[x],
2419
2409
  itemDescription: u._items[r].Description_DTL,
2420
2410
  itemUnitPrice: u._items[r].UnitPrice,
2421
2411
  itemAccount: u._items[r].ACCOUNT,
2422
2412
  itemTaxCode: u._items[r].Tax,
2423
2413
  itemTax: u._items[r].TaxAmt
2424
- }), p[r] && (d[y] = {
2425
- ...d[y],
2414
+ }), p[r] && (d[x] = {
2415
+ ...d[x],
2426
2416
  paymentDocNo: p[r].DOCNO_Header,
2427
2417
  paymentMethod: p[r].PAYMENTMETHOD,
2428
2418
  paymentAccount: p[r].CODE,
@@ -2432,7 +2422,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2432
2422
  }
2433
2423
  return d;
2434
2424
  }, [])
2435
- ), k = [
2425
+ ), V = [
2436
2426
  {
2437
2427
  accessorKey: "date",
2438
2428
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -2498,17 +2488,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2498
2488
  header: "Payment Amount",
2499
2489
  enableSorting: !1
2500
2490
  }
2501
- ], b = Q(g, "modelValue"), x = B(!1), D = fe(), { dateRange: w } = De(ue());
2502
- ge(
2503
- () => w.value,
2491
+ ], w = X(g, "modelValue"), _ = B(!1), F = ue(), { dateRange: h } = Ce(pe());
2492
+ ve(
2493
+ () => h.value,
2504
2494
  async () => {
2505
- if (b.value._id)
2495
+ if (w.value._id)
2506
2496
  try {
2507
- x.value = !0, e.value = await Ce(b.value._id);
2497
+ _.value = !0, e.value = await $e(w.value._id);
2508
2498
  } catch (d) {
2509
- D.open({ message: d.message, type: "error" });
2499
+ F.open({ message: d.message, type: "error" });
2510
2500
  } finally {
2511
- x.value = !1;
2501
+ _.value = !1;
2512
2502
  }
2513
2503
  },
2514
2504
  {
@@ -2517,42 +2507,42 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2517
2507
  );
2518
2508
  async function m() {
2519
2509
  try {
2520
- b.value._id ? (x.value = !0, await Pe(b.value._id)) : D.open({ message: "Invalid accounting setting", type: "error" });
2510
+ w.value._id ? (_.value = !0, await Pe(w.value._id)) : F.open({ message: "Invalid accounting setting", type: "error" });
2521
2511
  } catch (d) {
2522
- D.open({ message: d.message, type: "error" });
2512
+ F.open({ message: d.message, type: "error" });
2523
2513
  } finally {
2524
- x.value = !1;
2514
+ _.value = !1;
2525
2515
  }
2526
2516
  }
2527
- return (d, h) => {
2528
- const _ = $("FmButton"), u = $("FmCircularProgress"), p = $("FmTable");
2529
- return c(), F("div", ol, [
2530
- t("div", al, [
2531
- i(Ue, {
2532
- "date-range": f(w),
2533
- "onUpdate:dateRange": h[0] || (h[0] = (r) => he(w) ? w.value = r : null),
2517
+ return (d, k) => {
2518
+ const b = S("FmButton"), u = S("FmCircularProgress"), p = S("FmTable");
2519
+ return c(), C("div", tl, [
2520
+ t("div", ol, [
2521
+ i(Fe, {
2522
+ "date-range": f(h),
2523
+ "onUpdate:dateRange": k[0] || (k[0] = (r) => be(h) ? h.value = r : null),
2534
2524
  compare: !1
2535
2525
  }, null, 8, ["date-range"]),
2536
- i(_, {
2537
- loading: x.value,
2526
+ i(b, {
2527
+ loading: _.value,
2538
2528
  variant: "primary",
2539
2529
  label: f(o)("report.common.download"),
2540
2530
  onClick: m
2541
2531
  }, null, 8, ["loading", "label"])
2542
2532
  ]),
2543
- x.value ? (c(), F("div", ll, [
2533
+ _.value ? (c(), C("div", al, [
2544
2534
  i(u, { size: "xl" }),
2545
- t("span", nl, T(f(o)("report.common.isLoading")), 1)
2546
- ])) : n.value.length > 0 ? (c(), K(p, {
2535
+ t("span", ll, T(f(o)("report.common.isLoading")), 1)
2536
+ ])) : n.value.length > 0 ? (c(), M(p, {
2547
2537
  key: 1,
2548
2538
  class: "flex overflow-scroll",
2549
2539
  "row-data": n.value,
2550
- "column-defs": k
2551
- }, null, 8, ["row-data"])) : R("", !0)
2540
+ "column-defs": V
2541
+ }, null, 8, ["row-data"])) : N("", !0)
2552
2542
  ]);
2553
2543
  };
2554
2544
  }
2555
- }), il = { class: "h-full relative flex flex-col" }, rl = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, ml = /* @__PURE__ */ H({
2545
+ }), sl = { class: "h-full relative flex flex-col" }, il = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, rl = /* @__PURE__ */ q({
2556
2546
  __name: "SQL",
2557
2547
  props: {
2558
2548
  modelValue: {},
@@ -2560,7 +2550,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2560
2550
  },
2561
2551
  emits: ["update:modelValue"],
2562
2552
  setup(g) {
2563
- const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
2553
+ const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = [
2564
2554
  {
2565
2555
  label: o("report.integration.setting"),
2566
2556
  value: "setting",
@@ -2571,66 +2561,66 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2571
2561
  value: "preview",
2572
2562
  icon: "table"
2573
2563
  }
2574
- ], b = pe(), x = z(() => {
2564
+ ], w = de(), _ = Y(() => {
2575
2565
  switch (n.value) {
2576
2566
  case "preview":
2577
- return sl;
2567
+ return nl;
2578
2568
  case "setting":
2579
- return tl;
2569
+ return el;
2580
2570
  default:
2581
2571
  return null;
2582
2572
  }
2583
2573
  });
2584
- return (D, w) => {
2585
- var h;
2586
- const m = $("FmPageHead"), d = $("FmTabs");
2587
- return c(), F("div", il, [
2574
+ return (F, h) => {
2575
+ var k;
2576
+ const m = S("FmPageHead"), d = S("FmTabs");
2577
+ return c(), C("div", sl, [
2588
2578
  i(m, {
2589
- title: ((h = e.value) == null ? void 0 : h.name) || "SQL",
2579
+ title: ((k = e.value) == null ? void 0 : k.name) || "SQL",
2590
2580
  "back-button": !0,
2591
2581
  style: { paddingLeft: "0px", paddingRight: "0px" },
2592
- "onClick:back": f(b).back
2582
+ "onClick:back": f(w).back
2593
2583
  }, {
2594
- description: xe(() => w[2] || (w[2] = [
2584
+ description: ge(() => h[2] || (h[2] = [
2595
2585
  t("div", null, null, -1)
2596
2586
  ])),
2597
2587
  _: 1
2598
2588
  }, 8, ["title", "onClick:back"]),
2599
2589
  i(d, {
2600
2590
  "model-value": n.value,
2601
- "onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
2602
- items: k
2591
+ "onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
2592
+ items: V
2603
2593
  }, null, 8, ["model-value"]),
2604
- t("div", rl, [
2605
- (c(), K(be(x.value), {
2594
+ t("div", il, [
2595
+ (c(), M(xe(_.value), {
2606
2596
  modelValue: e.value,
2607
- "onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
2597
+ "onUpdate:modelValue": h[1] || (h[1] = (b) => e.value = b)
2608
2598
  }, null, 8, ["modelValue"]))
2609
2599
  ])
2610
2600
  ]);
2611
2601
  };
2612
2602
  }
2613
- }), cl = {
2603
+ }), ml = {
2614
2604
  key: 0,
2615
2605
  class: "flex flex-col h-full"
2616
- }, 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" }, kl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Vl = { 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 = {
2606
+ }, cl = { class: "flex flex-col gap-16 pb-[24px]" }, dl = { class: "flex flex-row justify-between items-center gap-2" }, pl = { class: "fm-typo-en-title-sm-800" }, ul = { class: "flex flex-row gap-2 items-center" }, fl = { class: "flex flex-row gap-2 items-center" }, vl = { class: "relative group cursor-pointer" }, gl = { 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" }, yl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, xl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _l = { class: "flex flex-row items-center max-w-[100%]" }, bl = { class: "w-[25%]" }, wl = { class: "flex-grow" }, hl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, kl = { class: "flex flex-row items-center justify-between" }, Vl = { class: "w-[25%]" }, $l = { class: "flex-grow" }, Sl = { class: "flex flex-row items-center justify-between" }, Cl = { class: "w-[25%]" }, Fl = { class: "flex-grow" }, Dl = { class: "flex flex-col gap-16" }, Ul = { class: "fm-typo-en-title-sm-800" }, Tl = { class: "flex flex-row items-center max-w-[100%]" }, Il = { class: "w-[25%]" }, Ml = { class: "flex-grow" }, Kl = { class: "flex flex-row items-center max-w-[100%]" }, Al = { class: "w-[25%]" }, Pl = { class: "flex flex-row items-center max-w-[100%]" }, Nl = { class: "w-[25%]" }, Rl = {
2617
2607
  key: 0,
2618
2608
  class: "flex flex-row items-center max-w-[100%]"
2619
- }, 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 = {
2609
+ }, Ol = { class: "flex flex-col gap-16" }, Bl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, jl = { key: 1 }, Ll = { class: "flex flex-row items-center gap-x-16" }, El = { class: "fm-typo-en-title-sm-800" }, zl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Yl = { class: "flex flex-row items-center gap-x-16" }, ql = { class: "fm-typo-en-title-sm-800" }, Hl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Xl = { class: "flex flex-row items-center gap-x-16" }, Ql = { class: "fm-typo-en-title-sm-800" }, Gl = { class: "flex flex-row items-center justify-between" }, Jl = { class: "flex-grow" }, Wl = {
2620
2610
  key: 0,
2621
2611
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
2622
- }, en = {
2612
+ }, Zl = {
2623
2613
  key: 1,
2624
2614
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
2625
- }, tn = {
2615
+ }, en = {
2626
2616
  key: 3,
2627
2617
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
2628
- }, on = {
2618
+ }, tn = {
2629
2619
  key: 0,
2630
2620
  class: "flex flex-row items-center"
2631
- }, an = /* @__PURE__ */ H({
2621
+ }, on = /* @__PURE__ */ q({
2632
2622
  __name: "Setting",
2633
- props: /* @__PURE__ */ _e({
2623
+ props: /* @__PURE__ */ ye({
2634
2624
  retrievedMethods: {
2635
2625
  type: Object,
2636
2626
  required: !0
@@ -2645,53 +2635,53 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2645
2635
  }),
2646
2636
  emits: ["update:modelValue"],
2647
2637
  setup(g) {
2648
- const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
2649
- () => w.map((V) => ({ label: V.name, value: V.id }))
2638
+ const { t: o } = J(), e = X(g, "modelValue"), n = ue(), V = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
2639
+ () => h.map(($) => ({ label: $.name, value: $.id }))
2650
2640
  );
2651
- function d(V) {
2641
+ function d($) {
2652
2642
  var l;
2653
- !((l = g.retrievedMethods) != null && l.data) || !Array.isArray(g.retrievedMethods.data) || V.forEach((a) => {
2643
+ !((l = g.retrievedMethods) != null && l.data) || !Array.isArray(g.retrievedMethods.data) || $.forEach((a) => {
2654
2644
  const v = g.retrievedMethods.data.find((s) => s.value == a.id);
2655
2645
  v && (a.cnId = v.cnId);
2656
2646
  });
2657
2647
  }
2658
- async function h() {
2659
- await D({
2648
+ async function k() {
2649
+ await F({
2660
2650
  message: o("report.messages.confirmDelete", { name: e.value.name }),
2661
2651
  title: o("report.common.delete")
2662
- }) && await x(async () => {
2652
+ }) && await _(async () => {
2663
2653
  try {
2664
- await Ve(e.value._id), await k.getSettings(), b.back();
2654
+ await he(e.value._id), await V.getSettings(), w.back();
2665
2655
  } catch (l) {
2666
2656
  n.open({ type: "error", message: l.message });
2667
2657
  }
2668
2658
  });
2669
2659
  }
2670
- async function _() {
2671
- await x(async () => {
2672
- var V, l, a;
2660
+ async function b() {
2661
+ await _(async () => {
2662
+ var $, l, a;
2673
2663
  try {
2674
- (a = (l = (V = e.value) == null ? void 0 : V.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && d(e.value.platform.mappings.paymentMethods), await $e(e.value._id, e.value), await k.getSettings();
2664
+ (a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && d(e.value.platform.mappings.paymentMethods), await ke(e.value._id, e.value), await V.getSettings();
2675
2665
  } catch (v) {
2676
2666
  n.open({ type: "error", message: v.message });
2677
2667
  }
2678
2668
  });
2679
2669
  }
2680
- function u(V, l) {
2670
+ function u($, l) {
2681
2671
  var a, v;
2682
- (v = (a = e.value.platform) == null ? void 0 : a.mappings) != null && v[V] && (e.value.platform.mappings[V] = e.value.platform.mappings[V].filter(
2683
- (s, P) => P !== l
2672
+ (v = (a = e.value.platform) == null ? void 0 : a.mappings) != null && v[$] && (e.value.platform.mappings[$] = e.value.platform.mappings[$].filter(
2673
+ (s, A) => A !== l
2684
2674
  ));
2685
2675
  }
2686
- function p(V) {
2676
+ function p($) {
2687
2677
  var l, a;
2688
- (a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[V] && (e.value.platform.mappings[V] = [
2689
- ...e.value.platform.mappings[V],
2690
- V === "items" ? {
2678
+ (a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[$] && (e.value.platform.mappings[$] = [
2679
+ ...e.value.platform.mappings[$],
2680
+ $ === "items" ? {
2691
2681
  key: "",
2692
2682
  account: "",
2693
2683
  description: ""
2694
- } : V === "taxes" ? {
2684
+ } : $ === "taxes" ? {
2695
2685
  key: "",
2696
2686
  account: "SST-"
2697
2687
  } : {
@@ -2703,17 +2693,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2703
2693
  const r = [
2704
2694
  {
2705
2695
  label: "By day",
2706
- value: ve.BY_DAY
2696
+ value: fe.BY_DAY
2707
2697
  }
2708
2698
  ];
2709
- ge(
2699
+ ve(
2710
2700
  () => {
2711
- var V, l, a;
2712
- return (a = (l = (V = e.value) == null ? void 0 : V.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.taxes;
2701
+ var $, l, a;
2702
+ return (a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.taxes;
2713
2703
  },
2714
- (V) => {
2715
- V && V.forEach((l, a) => {
2716
- var P;
2704
+ ($) => {
2705
+ $ && $.forEach((l, a) => {
2706
+ var A;
2717
2707
  const v = l.key || "";
2718
2708
  let s = l.account;
2719
2709
  if (!s && v) {
@@ -2728,7 +2718,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2728
2718
  s = "SST-0";
2729
2719
  break;
2730
2720
  }
2731
- (P = e.value.platform) != null && P.mappings && (e.value.platform.mappings.taxes[a] = {
2721
+ (A = e.value.platform) != null && A.mappings && (e.value.platform.mappings.taxes[a] = {
2732
2722
  ...l,
2733
2723
  account: s
2734
2724
  });
@@ -2736,68 +2726,68 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2736
2726
  });
2737
2727
  },
2738
2728
  { immediate: !0, deep: !0 }
2739
- ), ge(
2729
+ ), ve(
2740
2730
  () => {
2741
- var V, l, a;
2742
- return (a = (l = (V = e.value) == null ? void 0 : V.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.version;
2731
+ var $, l, a;
2732
+ return (a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.version;
2743
2733
  },
2744
- (V) => {
2745
- var l, a, v, s, P;
2746
- V === "v1" && !((v = (a = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : a.mappings) != null && v.payee) && (P = (s = e.value) == null ? void 0 : s.platform) != null && P.mappings && (e.value.platform.mappings.payee = {
2734
+ ($) => {
2735
+ var l, a, v, s, A;
2736
+ $ === "v1" && !((v = (a = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : a.mappings) != null && v.payee) && (A = (s = e.value) == null ? void 0 : s.platform) != null && A.mappings && (e.value.platform.mappings.payee = {
2747
2737
  id: 1,
2748
2738
  name: ""
2749
2739
  });
2750
2740
  },
2751
2741
  { immediate: !0 }
2752
2742
  );
2753
- async function y() {
2754
- await x(async () => {
2743
+ async function x() {
2744
+ await _(async () => {
2755
2745
  try {
2756
- await Se(e.value._id), await k.getSettings();
2757
- } catch (V) {
2758
- n.open({ type: "error", message: V.message });
2746
+ await Ve(e.value._id), await V.getSettings();
2747
+ } catch ($) {
2748
+ n.open({ type: "error", message: $.message });
2759
2749
  }
2760
2750
  });
2761
2751
  }
2762
- return (V, l) => {
2763
- var J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie, U;
2764
- const a = $("FmIcon"), v = $("FmButton"), s = $("FmSelect"), P = $("FmMenuDivider"), N = $("FmTextField"), G = $("FmCircularProgress"), Y = $("FmCheckbox");
2765
- return (O = (J = e.value) == null ? void 0 : J.platform) != null && O.mappings ? (c(), F("div", cl, [
2766
- t("div", dl, [
2767
- t("div", pl, [
2768
- t("div", ul, T(f(o)("report.integration.connect")), 1),
2769
- t("div", fl, [
2770
- t("div", vl, [
2771
- t("div", gl, [
2752
+ return ($, l) => {
2753
+ var G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se, D;
2754
+ const a = S("FmIcon"), v = S("FmButton"), s = S("FmSelect"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmCircularProgress"), E = S("FmCheckbox");
2755
+ return (R = (G = e.value) == null ? void 0 : G.platform) != null && R.mappings ? (c(), C("div", ml, [
2756
+ t("div", cl, [
2757
+ t("div", dl, [
2758
+ t("div", pl, T(f(o)("report.integration.connect")), 1),
2759
+ t("div", ul, [
2760
+ t("div", fl, [
2761
+ t("div", vl, [
2772
2762
  i(a, {
2773
2763
  name: "refresh",
2774
2764
  class: "p-2 bg-gray-100 rounded-full",
2775
- onClick: y
2765
+ onClick: x
2776
2766
  }),
2777
- t("span", yl, T(f(o)("report.integration.biztory.refreshTooltip")), 1)
2767
+ t("span", gl, T(f(o)("report.integration.biztory.refreshTooltip")), 1)
2778
2768
  ]),
2779
2769
  i(v, {
2780
2770
  variant: "tertiary",
2781
2771
  label: f(o)("report.common.delete"),
2782
- onClick: h
2772
+ onClick: k
2783
2773
  }, null, 8, ["label"]),
2784
2774
  i(v, {
2785
2775
  variant: "primary",
2786
2776
  label: f(o)("report.common.update"),
2787
- onClick: _
2777
+ onClick: b
2788
2778
  }, null, 8, ["label"])
2789
2779
  ])
2790
2780
  ])
2791
2781
  ])
2792
2782
  ]),
2793
- t("div", xl, [
2794
- t("div", _l, T(f(o)("report.integration.biztory.authenticate")), 1),
2795
- t("div", bl, [
2796
- t("div", wl, "Biztory " + T(f(o)("report.integration.biztory.version")), 1),
2797
- t("div", hl, [
2783
+ t("div", yl, [
2784
+ t("div", xl, T(f(o)("report.integration.biztory.authenticate")), 1),
2785
+ t("div", _l, [
2786
+ t("div", bl, "Biztory " + T(f(o)("report.integration.biztory.version")), 1),
2787
+ t("div", wl, [
2798
2788
  i(s, {
2799
2789
  modelValue: e.value.platform.mappings.version,
2800
- "onUpdate:modelValue": l[0] || (l[0] = (S) => e.value.platform.mappings.version = S),
2790
+ "onUpdate:modelValue": l[0] || (l[0] = (y) => e.value.platform.mappings.version = y),
2801
2791
  items: [
2802
2792
  { label: "v1", value: "v1" },
2803
2793
  { label: "v2", value: "v2" }
@@ -2806,55 +2796,55 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2806
2796
  }, null, 8, ["modelValue"])
2807
2797
  ])
2808
2798
  ]),
2809
- i(P, { style: { margin: 0 } }),
2810
- t("div", kl, [
2811
- t("div", Vl, [
2812
- t("div", $l, T(f(o)("report.integration.biztory.subdomain")), 1),
2813
- t("div", Sl, [
2814
- i(N, {
2799
+ i(A, { style: { margin: 0 } }),
2800
+ t("div", hl, [
2801
+ t("div", kl, [
2802
+ t("div", Vl, T(f(o)("report.integration.biztory.subdomain")), 1),
2803
+ t("div", $l, [
2804
+ i(P, {
2815
2805
  modelValue: e.value.platform.subdomain,
2816
- "onUpdate:modelValue": l[1] || (l[1] = (S) => e.value.platform.subdomain = S),
2806
+ "onUpdate:modelValue": l[1] || (l[1] = (y) => e.value.platform.subdomain = y),
2817
2807
  placeholder: "Subdomain"
2818
2808
  }, null, 8, ["modelValue"])
2819
2809
  ])
2820
2810
  ]),
2821
- t("div", Cl, [
2822
- t("div", Fl, T(f(o)("report.integration.biztory.apiKey")), 1),
2823
- t("div", Dl, [
2824
- i(N, {
2811
+ t("div", Sl, [
2812
+ t("div", Cl, T(f(o)("report.integration.biztory.apiKey")), 1),
2813
+ t("div", Fl, [
2814
+ i(P, {
2825
2815
  modelValue: e.value.platform.api_key,
2826
- "onUpdate:modelValue": l[2] || (l[2] = (S) => e.value.platform.api_key = S),
2816
+ "onUpdate:modelValue": l[2] || (l[2] = (y) => e.value.platform.api_key = y),
2827
2817
  placeholder: "API Key"
2828
2818
  }, null, 8, ["modelValue"])
2829
2819
  ])
2830
2820
  ]),
2831
- t("div", Ul, [
2832
- t("div", Tl, T(f(o)("report.integration.biztory.general")), 1),
2833
- t("div", Il, [
2834
- t("div", Ml, T(f(o)("report.common.name")), 1),
2835
- t("div", Kl, [
2836
- i(N, {
2821
+ t("div", Dl, [
2822
+ t("div", Ul, T(f(o)("report.integration.biztory.general")), 1),
2823
+ t("div", Tl, [
2824
+ t("div", Il, T(f(o)("report.common.name")), 1),
2825
+ t("div", Ml, [
2826
+ i(P, {
2837
2827
  modelValue: e.value.name,
2838
- "onUpdate:modelValue": l[3] || (l[3] = (S) => e.value.name = S)
2828
+ "onUpdate:modelValue": l[3] || (l[3] = (y) => e.value.name = y)
2839
2829
  }, null, 8, ["modelValue"])
2840
2830
  ])
2841
2831
  ]),
2842
- t("div", Al, [
2843
- t("div", Pl, T(f(o)("report.common.location")), 1),
2832
+ t("div", Kl, [
2833
+ t("div", Al, T(f(o)("report.common.location")), 1),
2844
2834
  i(s, {
2845
2835
  modelValue: e.value.platform.locationIds,
2846
- "onUpdate:modelValue": l[4] || (l[4] = (S) => e.value.platform.locationIds = S),
2836
+ "onUpdate:modelValue": l[4] || (l[4] = (y) => e.value.platform.locationIds = y),
2847
2837
  multiselect: !0,
2848
2838
  items: m.value,
2849
2839
  placeholder: f(o)("report.common.location"),
2850
2840
  class: "flex-grow"
2851
2841
  }, null, 8, ["modelValue", "items", "placeholder"])
2852
2842
  ]),
2853
- t("div", Nl, [
2854
- t("div", Rl, T(f(o)("report.integration.biztory.grouping")), 1),
2843
+ t("div", Pl, [
2844
+ t("div", Nl, T(f(o)("report.integration.biztory.grouping")), 1),
2855
2845
  i(s, {
2856
2846
  modelValue: e.value.platform.grouping,
2857
- "onUpdate:modelValue": l[5] || (l[5] = (S) => e.value.platform.grouping = S),
2847
+ "onUpdate:modelValue": l[5] || (l[5] = (y) => e.value.platform.grouping = y),
2858
2848
  multiselect: !1,
2859
2849
  items: r,
2860
2850
  placeholder: f(o)("report.integration.biztory.grouping"),
@@ -2862,106 +2852,106 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2862
2852
  disabled: ""
2863
2853
  }, null, 8, ["modelValue", "placeholder"])
2864
2854
  ]),
2865
- e.value.platform.mappings.version == "v1" ? (c(), F("div", Ol, [
2855
+ e.value.platform.mappings.version == "v1" ? (c(), C("div", Rl, [
2866
2856
  l[13] || (l[13] = t("div", { class: "w-[33%]" }, "Payee ID", -1)),
2867
- e.value.platform.mappings.version == "v1" ? (c(), K(A, {
2857
+ e.value.platform.mappings.version == "v1" ? (c(), M(K, {
2868
2858
  key: 0,
2869
2859
  modelValue: e.value.platform.mappings.payee,
2870
- "onUpdate:modelValue": l[6] || (l[6] = (S) => e.value.platform.mappings.payee = S),
2860
+ "onUpdate:modelValue": l[6] || (l[6] = (y) => e.value.platform.mappings.payee = y),
2871
2861
  options: {
2872
2862
  id: { placeholder: "ID", editable: !0 }
2873
2863
  },
2874
2864
  removable: !1
2875
- }, null, 8, ["modelValue"])) : R("", !0)
2876
- ])) : R("", !0)
2865
+ }, null, 8, ["modelValue"])) : N("", !0)
2866
+ ])) : N("", !0)
2877
2867
  ]),
2878
- t("div", Bl, [
2879
- t("div", jl, [
2880
- !g.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (c(), K(G, {
2868
+ t("div", Ol, [
2869
+ t("div", Bl, [
2870
+ !g.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (c(), M(Q, {
2881
2871
  key: 0,
2882
2872
  size: "xl"
2883
- })) : R("", !0),
2884
- g.retrievedCustomers.isLoaded && g.retrievedCustomers.data && ((j = g.retrievedCustomers.data) == null ? void 0 : j.length) != 0 ? (c(), F("div", Ll, [
2885
- e.value.platform.mappings.version == "v2" ? (c(), K(Me, {
2873
+ })) : N("", !0),
2874
+ g.retrievedCustomers.isLoaded && g.retrievedCustomers.data && ((j = g.retrievedCustomers.data) == null ? void 0 : j.length) != 0 ? (c(), C("div", jl, [
2875
+ e.value.platform.mappings.version == "v2" ? (c(), M(Me, {
2886
2876
  key: 0,
2887
2877
  modelValue: e.value.platform.mappings.payeeId,
2888
- "onUpdate:modelValue": l[7] || (l[7] = (S) => e.value.platform.mappings.payeeId = S),
2878
+ "onUpdate:modelValue": l[7] || (l[7] = (y) => e.value.platform.mappings.payeeId = y),
2889
2879
  options: {
2890
2880
  key: { placeholder: "Payee", editable: !1 },
2891
2881
  customer: {
2892
2882
  placeholder: "Select payee",
2893
2883
  editable: !0,
2894
- dropdownOptions: ((E = g.retrievedCustomers) == null ? void 0 : E.data) ?? []
2884
+ dropdownOptions: ((z = g.retrievedCustomers) == null ? void 0 : z.data) ?? []
2895
2885
  }
2896
2886
  },
2897
2887
  removable: !1,
2898
2888
  "single-value-mode": ""
2899
- }, null, 8, ["modelValue", "options"])) : R("", !0)
2900
- ])) : R("", !0)
2889
+ }, null, 8, ["modelValue", "options"])) : N("", !0)
2890
+ ])) : N("", !0)
2901
2891
  ])
2902
2892
  ]),
2903
- i(Te, {
2893
+ i(De, {
2904
2894
  modelValue: e.value.platform,
2905
- "onUpdate:modelValue": l[8] || (l[8] = (S) => e.value.platform = S),
2895
+ "onUpdate:modelValue": l[8] || (l[8] = (y) => e.value.platform = y),
2906
2896
  label: "upload",
2907
- "last-upload-date": (Z = e.value.platform) == null ? void 0 : Z.lastUploadDate
2897
+ "last-upload-date": (W = e.value.platform) == null ? void 0 : W.lastUploadDate
2908
2898
  }, null, 8, ["modelValue", "last-upload-date"]),
2909
- t("div", El, [
2910
- t("div", zl, T(f(o)("report.integration.biztory.items")), 1),
2899
+ t("div", Ll, [
2900
+ t("div", El, T(f(o)("report.integration.biztory.items")), 1),
2911
2901
  i(v, {
2912
2902
  variant: "primary",
2913
2903
  icon: "add",
2914
2904
  onClick: l[9] || (l[9] = () => p("items"))
2915
2905
  })
2916
2906
  ]),
2917
- t("div", Yl, [
2918
- (c(!0), F(L, null, X((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, (S, C) => (c(), K(A, {
2919
- key: `item-${C}`,
2920
- modelValue: e.value.platform.mappings.items[C],
2921
- "onUpdate:modelValue": (M) => e.value.platform.mappings.items[C] = M,
2907
+ t("div", zl, [
2908
+ (c(!0), C(L, null, H((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (y, U) => (c(), M(K, {
2909
+ key: `item-${U}`,
2910
+ modelValue: e.value.platform.mappings.items[U],
2911
+ "onUpdate:modelValue": (O) => e.value.platform.mappings.items[U] = O,
2922
2912
  options: {
2923
2913
  key: { placeholder: "Key", editable: !0 },
2924
2914
  code: { placeholder: "Account code", editable: !0 }
2925
2915
  },
2926
2916
  removable: !0,
2927
- onRemove: () => u("items", C)
2917
+ onRemove: () => u("items", U)
2928
2918
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2929
2919
  ]),
2930
- t("div", ql, [
2931
- t("div", Hl, T(f(o)("report.integration.biztory.taxes")), 1),
2920
+ t("div", Yl, [
2921
+ t("div", ql, T(f(o)("report.integration.biztory.taxes")), 1),
2932
2922
  i(v, {
2933
2923
  variant: "primary",
2934
2924
  icon: "add",
2935
2925
  onClick: l[10] || (l[10] = () => p("taxes"))
2936
2926
  })
2937
2927
  ]),
2938
- t("div", Xl, [
2939
- (c(!0), F(L, null, X((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, (S, C) => (c(), K(A, {
2940
- key: `tax-${C}`,
2941
- modelValue: e.value.platform.mappings.taxes[C],
2942
- "onUpdate:modelValue": (M) => e.value.platform.mappings.taxes[C] = M,
2928
+ t("div", Hl, [
2929
+ (c(!0), C(L, null, H((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (y, U) => (c(), M(K, {
2930
+ key: `tax-${U}`,
2931
+ modelValue: e.value.platform.mappings.taxes[U],
2932
+ "onUpdate:modelValue": (O) => e.value.platform.mappings.taxes[U] = O,
2943
2933
  options: {
2944
2934
  key: { placeholder: "Key", editable: !0 },
2945
2935
  account: { placeholder: "Account code", editable: !0 }
2946
2936
  },
2947
2937
  removable: !0,
2948
- onRemove: () => u("taxes", C)
2938
+ onRemove: () => u("taxes", U)
2949
2939
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2950
2940
  ]),
2951
- t("div", Ql, [
2952
- t("div", Gl, T(f(o)("report.integration.biztory.payments")), 1),
2941
+ t("div", Xl, [
2942
+ t("div", Ql, T(f(o)("report.integration.biztory.payments")), 1),
2953
2943
  i(v, {
2954
2944
  variant: "primary",
2955
2945
  icon: "add",
2956
2946
  onClick: l[11] || (l[11] = () => p("paymentMethods"))
2957
2947
  })
2958
2948
  ]),
2959
- t("div", Jl, [
2949
+ t("div", Gl, [
2960
2950
  l[14] || (l[14] = t("div", { class: "w-[25%]" }, "Payment Term", -1)),
2961
- t("div", Wl, [
2962
- i(A, {
2951
+ t("div", Jl, [
2952
+ i(K, {
2963
2953
  modelValue: e.value.platform.mappings.paymentTerm,
2964
- "onUpdate:modelValue": l[12] || (l[12] = (S) => e.value.platform.mappings.paymentTerm = S),
2954
+ "onUpdate:modelValue": l[12] || (l[12] = (y) => e.value.platform.mappings.paymentTerm = y),
2965
2955
  options: {
2966
2956
  id: { placeholder: "ID", editable: !0 },
2967
2957
  name: { placeholder: "Name", editable: !0 }
@@ -2970,31 +2960,31 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2970
2960
  }, null, 8, ["modelValue"])
2971
2961
  ])
2972
2962
  ]),
2973
- g.retrievedMethods.isError ? R("", !0) : (c(), F("div", Zl, T(f(o)("report.integration.biztory.paymentTerm")), 1)),
2974
- g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length == 0 && !g.retrievedMethods.isError ? (c(), F("span", en, T(f(o)("report.integration.biztory.noPaymentMethods")), 1)) : R("", !0),
2975
- g.retrievedMethods.isLoaded ? R("", !0) : (c(), K(G, {
2963
+ g.retrievedMethods.isError ? N("", !0) : (c(), C("div", Wl, T(f(o)("report.integration.biztory.paymentTerm")), 1)),
2964
+ g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length == 0 && !g.retrievedMethods.isError ? (c(), C("span", Zl, T(f(o)("report.integration.biztory.noPaymentMethods")), 1)) : N("", !0),
2965
+ g.retrievedMethods.isLoaded ? N("", !0) : (c(), M(Q, {
2976
2966
  key: 2,
2977
2967
  size: "xl"
2978
2968
  })),
2979
- g.retrievedMethods.isError ? (c(), F("span", tn, T(f(o)("report.integration.biztory.error")), 1)) : R("", !0),
2980
- (c(!0), F(L, null, X((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.paymentMethods, (S, C) => {
2981
- var M;
2982
- return c(), F("div", {
2983
- key: `payment-${C}`,
2969
+ g.retrievedMethods.isError ? (c(), C("span", en, T(f(o)("report.integration.biztory.error")), 1)) : N("", !0),
2970
+ (c(!0), C(L, null, H((D = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.paymentMethods, (y, U) => {
2971
+ var O;
2972
+ return c(), C("div", {
2973
+ key: `payment-${U}`,
2984
2974
  class: "grid-cols-1 grid gap-x-16"
2985
2975
  }, [
2986
- g.retrievedMethods.isLoaded && g.retrievedMethods.data && ((M = g.retrievedMethods.data) == null ? void 0 : M.length) != 0 ? (c(), F("div", on, [
2987
- i(Y, {
2988
- "model-value": !e.value.platform.mappings.paymentMethods[C].skip,
2976
+ g.retrievedMethods.isLoaded && g.retrievedMethods.data && ((O = g.retrievedMethods.data) == null ? void 0 : O.length) != 0 ? (c(), C("div", tn, [
2977
+ i(E, {
2978
+ "model-value": !e.value.platform.mappings.paymentMethods[U].skip,
2989
2979
  value: "",
2990
- "onUpdate:modelValue": (q) => {
2991
- var re, ye;
2992
- (ye = (re = e.value.platform) == null ? void 0 : re.mappings) != null && ye.paymentMethods[C] && (e.value.platform.mappings.paymentMethods[C].skip = !q);
2980
+ "onUpdate:modelValue": (me) => {
2981
+ var Ue, Te;
2982
+ (Te = (Ue = e.value.platform) == null ? void 0 : Ue.mappings) != null && Te.paymentMethods[U] && (e.value.platform.mappings.paymentMethods[U].skip = !me);
2993
2983
  }
2994
2984
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2995
2985
  i(Me, {
2996
- modelValue: e.value.platform.mappings.paymentMethods[C],
2997
- "onUpdate:modelValue": (q) => e.value.platform.mappings.paymentMethods[C] = q,
2986
+ modelValue: e.value.platform.mappings.paymentMethods[U],
2987
+ "onUpdate:modelValue": (me) => e.value.platform.mappings.paymentMethods[U] = me,
2998
2988
  options: {
2999
2989
  key: {
3000
2990
  placeholder: "Enter key",
@@ -3007,61 +2997,61 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3007
2997
  }
3008
2998
  },
3009
2999
  removable: !0,
3010
- onRemove: () => u("paymentMethods", C)
3000
+ onRemove: () => u("paymentMethods", U)
3011
3001
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"])
3012
- ])) : R("", !0)
3002
+ ])) : N("", !0)
3013
3003
  ]);
3014
3004
  }), 128))
3015
3005
  ])
3016
3006
  ])
3017
- ])) : R("", !0);
3007
+ ])) : N("", !0);
3018
3008
  };
3019
3009
  }
3020
3010
  });
3021
- function ln(g) {
3011
+ function an(g) {
3022
3012
  return g.reduce((o, e) => {
3023
- var b, x, D, w, m, d, h, _, u, p, r, y, V, l, a, v, s, P, N, G, Y, J;
3024
- const { invoice: n } = e, k = o.length;
3025
- o[k] = {
3013
+ var w, _, F, h, m, d, k, b, u, p, r, x, $, l, a, v, s, A, P, Q, E, G;
3014
+ const { invoice: n } = e, V = o.length;
3015
+ o[V] = {
3026
3016
  invoice_date: n.invoice_date,
3027
3017
  ref_num: n.ref_num,
3028
3018
  grandTotal: n.grandTotal,
3029
3019
  // tax_code: invoice.tax[0].tax_code,
3030
3020
  // tax: invoice.tax.reduce((sum, tax) => sum + tax.tax, 0),
3031
3021
  // service_charge: invoice.service_charge.total,
3032
- item_code: (b = n.items[0]) == null ? void 0 : b.code,
3033
- item_desc: (x = n.items[0]) == null ? void 0 : x.description,
3034
- item_price: (D = n.items[0]) == null ? void 0 : D.price,
3035
- item_tax: (w = n.items[0]) == null ? void 0 : w.total_tax,
3022
+ item_code: (w = n.items[0]) == null ? void 0 : w.code,
3023
+ item_desc: (_ = n.items[0]) == null ? void 0 : _.description,
3024
+ item_price: (F = n.items[0]) == null ? void 0 : F.price,
3025
+ item_tax: (h = n.items[0]) == null ? void 0 : h.total_tax,
3036
3026
  item_tax_label: ((m = n.items[0]) == null ? void 0 : m.tax_label) || "-",
3037
- payment_amount: ((h = (d = n.transactions) == null ? void 0 : d[0]) == null ? void 0 : h.amount) || void 0,
3038
- payment_method: ((u = (_ = n.transactions) == null ? void 0 : _[0]) == null ? void 0 : u.payment_method) || "-",
3027
+ payment_amount: ((k = (d = n.transactions) == null ? void 0 : d[0]) == null ? void 0 : k.amount) || void 0,
3028
+ payment_method: ((u = (b = n.transactions) == null ? void 0 : b[0]) == null ? void 0 : u.payment_method) || "-",
3039
3029
  payment_term: ((p = n == null ? void 0 : n.payment_term) == null ? void 0 : p.name) || ""
3040
3030
  };
3041
- for (let O = 1; O < Math.max(((r = n.items) == null ? void 0 : r.length) || 0, ((y = n.transactions) == null ? void 0 : y.length) || 0); O++) {
3042
- const j = k + O;
3031
+ for (let R = 1; R < Math.max(((r = n.items) == null ? void 0 : r.length) || 0, ((x = n.transactions) == null ? void 0 : x.length) || 0); R++) {
3032
+ const j = V + R;
3043
3033
  o[j] || (o[j] = {});
3044
- const E = n.items[O];
3045
- E ? o[j] = {
3034
+ const z = n.items[R];
3035
+ z ? o[j] = {
3046
3036
  ...o[j],
3047
- item_code: E.code,
3048
- item_desc: E.description,
3049
- item_price: E.price,
3050
- item_tax: E.total_tax,
3051
- item_tax_label: E.tax_label || "-",
3052
- payment_amount: ((l = (V = n.transactions) == null ? void 0 : V[O]) == null ? void 0 : l.amount) || void 0,
3053
- payment_method: ((v = (a = n.transactions) == null ? void 0 : a[O]) == null ? void 0 : v.payment_method) || "-",
3037
+ item_code: z.code,
3038
+ item_desc: z.description,
3039
+ item_price: z.price,
3040
+ item_tax: z.total_tax,
3041
+ item_tax_label: z.tax_label || "-",
3042
+ payment_amount: ((l = ($ = n.transactions) == null ? void 0 : $[R]) == null ? void 0 : l.amount) || void 0,
3043
+ payment_method: ((v = (a = n.transactions) == null ? void 0 : a[R]) == null ? void 0 : v.payment_method) || "-",
3054
3044
  payment_term: ((s = n == null ? void 0 : n.payment_term) == null ? void 0 : s.name) || ""
3055
3045
  } : o[j] = {
3056
- payment_amount: ((N = (P = n.transactions) == null ? void 0 : P[O]) == null ? void 0 : N.amount) || void 0,
3057
- payment_method: ((Y = (G = n.transactions) == null ? void 0 : G[O]) == null ? void 0 : Y.payment_method) || "-",
3058
- payment_term: ((J = n == null ? void 0 : n.payment_term) == null ? void 0 : J.name) || ""
3046
+ payment_amount: ((P = (A = n.transactions) == null ? void 0 : A[R]) == null ? void 0 : P.amount) || void 0,
3047
+ payment_method: ((E = (Q = n.transactions) == null ? void 0 : Q[R]) == null ? void 0 : E.payment_method) || "-",
3048
+ payment_term: ((G = n == null ? void 0 : n.payment_term) == null ? void 0 : G.name) || ""
3059
3049
  };
3060
3050
  }
3061
3051
  return o;
3062
3052
  }, []);
3063
3053
  }
3064
- const nn = [
3054
+ const ln = [
3065
3055
  {
3066
3056
  accessorKey: "invoice_date",
3067
3057
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -3133,34 +3123,34 @@ const nn = [
3133
3123
  enableSorting: !1
3134
3124
  }
3135
3125
  ];
3136
- function sn(g) {
3126
+ function nn(g) {
3137
3127
  return g.reduce((o, e) => {
3138
- var D, w, m, d, h, _, u, p, r, y;
3139
- const { invoice: n, payments: k } = e, b = o.length;
3140
- o[b] = {
3128
+ var F, h, m, d, k, b, u, p, r, x;
3129
+ const { invoice: n, payments: V } = e, w = o.length;
3130
+ o[w] = {
3141
3131
  invoice_date: n.invoice_date,
3142
3132
  ref_num: n.ref_num,
3143
3133
  total: n.total,
3144
- item_code: (D = n.items[0]) == null ? void 0 : D.code,
3145
- item_description: (w = n.items[0]) == null ? void 0 : w.description,
3134
+ item_code: (F = n.items[0]) == null ? void 0 : F.code,
3135
+ item_description: (h = n.items[0]) == null ? void 0 : h.description,
3146
3136
  item_price: (m = n.items[0]) == null ? void 0 : m.price,
3147
3137
  item_tax_label: ((d = n.items[0]) == null ? void 0 : d.tax_label) ?? "",
3148
- item_tax_amount: ((h = n.items[0]) == null ? void 0 : h.total_tax) ?? "",
3149
- service_charge_amount: ((_ = n.service_charges[0]) == null ? void 0 : _.total) ?? "",
3138
+ item_tax_amount: ((k = n.items[0]) == null ? void 0 : k.total_tax) ?? "",
3139
+ service_charge_amount: ((b = n.service_charges[0]) == null ? void 0 : b.total) ?? "",
3150
3140
  rounding: n.rounding ?? 0,
3151
3141
  payment_term_id: n.payment_term.name ?? "",
3152
- payment_term_amount: ((u = n.terms[b]) == null ? void 0 : u.amount) ?? "",
3153
- payment_method: ((p = k[0]) == null ? void 0 : p.payment_method_name) || ""
3142
+ payment_term_amount: ((u = n.terms[w]) == null ? void 0 : u.amount) ?? "",
3143
+ payment_method: ((p = V[0]) == null ? void 0 : p.payment_method_name) || ""
3154
3144
  };
3155
- const x = Math.max(
3145
+ const _ = Math.max(
3156
3146
  ((r = n.items) == null ? void 0 : r.length) || 0,
3157
- ((y = n.terms) == null ? void 0 : y.length) || 0,
3158
- (k == null ? void 0 : k.length) || 0
3147
+ ((x = n.terms) == null ? void 0 : x.length) || 0,
3148
+ (V == null ? void 0 : V.length) || 0
3159
3149
  );
3160
- for (let V = 1; V < x; V++) {
3161
- const l = b + V;
3150
+ for (let $ = 1; $ < _; $++) {
3151
+ const l = w + $;
3162
3152
  o[l] || (o[l] = {});
3163
- const a = n.items[V], v = n.terms[V], s = k[V];
3153
+ const a = n.items[$], v = n.terms[$], s = V[$];
3164
3154
  a ? o[l] = {
3165
3155
  ...o[l],
3166
3156
  item_code: a.code,
@@ -3180,7 +3170,7 @@ function sn(g) {
3180
3170
  return o;
3181
3171
  }, []);
3182
3172
  }
3183
- const rn = [
3173
+ const sn = [
3184
3174
  {
3185
3175
  accessorKey: "invoice_date",
3186
3176
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -3246,10 +3236,10 @@ const rn = [
3246
3236
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Method (ID)"),
3247
3237
  enableSorting: !1
3248
3238
  }
3249
- ], mn = { class: "h-full flex flex-col gap-16" }, cn = { class: "flex flex-row gap-2 justify-between items-center" }, dn = {
3239
+ ], rn = { class: "h-full flex flex-col gap-16" }, mn = { class: "flex flex-row gap-2 justify-between items-center" }, cn = {
3250
3240
  key: 0,
3251
3241
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
3252
- }, pn = /* @__PURE__ */ H({
3242
+ }, dn = /* @__PURE__ */ q({
3253
3243
  __name: "Preview",
3254
3244
  props: {
3255
3245
  modelValue: { required: !0 },
@@ -3257,13 +3247,13 @@ const rn = [
3257
3247
  },
3258
3248
  emits: ["update:modelValue"],
3259
3249
  setup(g) {
3260
- const o = Q(g, "modelValue"), e = B(!1), n = fe(), { dateRange: k } = De(ue()), b = B([]);
3261
- ge(
3262
- () => k.value,
3250
+ const o = X(g, "modelValue"), e = B(!1), n = ue(), { dateRange: V } = Ce(pe()), w = B([]);
3251
+ ve(
3252
+ () => V.value,
3263
3253
  async () => {
3264
3254
  if (o.value._id)
3265
3255
  try {
3266
- e.value = !0, b.value = await Ce(o.value._id);
3256
+ e.value = !0, w.value = await $e(o.value._id);
3267
3257
  } catch (m) {
3268
3258
  n.open({ message: m.message, type: "error" });
3269
3259
  } finally {
@@ -3274,24 +3264,24 @@ const rn = [
3274
3264
  immediate: !0
3275
3265
  }
3276
3266
  );
3277
- const x = z(() => {
3267
+ const _ = Y(() => {
3278
3268
  switch (o.value.platform.mappings.version) {
3279
3269
  case "v1":
3280
- return ln(b.value);
3270
+ return an(w.value);
3281
3271
  case "v2":
3282
- return sn(b.value);
3272
+ return nn(w.value);
3283
3273
  }
3284
3274
  return [];
3285
- }), D = z(() => {
3275
+ }), F = Y(() => {
3286
3276
  switch (o.value.platform.mappings.version) {
3287
3277
  case "v1":
3288
- return nn;
3278
+ return ln;
3289
3279
  case "v2":
3290
- return rn;
3280
+ return sn;
3291
3281
  }
3292
3282
  return [];
3293
3283
  });
3294
- async function w() {
3284
+ async function h() {
3295
3285
  try {
3296
3286
  o.value._id && o.value.platform.subdomain && o.value.platform.api_key ? (e.value = !0, await Ae(o.value._id), n.open({ message: "Upload successful", type: "success" })) : n.open({ message: "Invalid accounting setting", type: "error" });
3297
3287
  } catch (m) {
@@ -3301,34 +3291,34 @@ const rn = [
3301
3291
  }
3302
3292
  }
3303
3293
  return (m, d) => {
3304
- const h = $("FmButton"), _ = $("FmCircularProgress"), u = $("FmTable");
3305
- return c(), F("div", mn, [
3306
- t("div", cn, [
3307
- i(Ue, {
3308
- "date-range": f(k),
3309
- "onUpdate:dateRange": d[0] || (d[0] = (p) => he(k) ? k.value = p : null),
3294
+ const k = S("FmButton"), b = S("FmCircularProgress"), u = S("FmTable");
3295
+ return c(), C("div", rn, [
3296
+ t("div", mn, [
3297
+ i(Fe, {
3298
+ "date-range": f(V),
3299
+ "onUpdate:dateRange": d[0] || (d[0] = (p) => be(V) ? V.value = p : null),
3310
3300
  compare: !1
3311
3301
  }, null, 8, ["date-range"]),
3312
- i(h, {
3302
+ i(k, {
3313
3303
  loading: e.value,
3314
3304
  variant: "primary",
3315
3305
  label: "Upload",
3316
- onClick: w
3306
+ onClick: h
3317
3307
  }, null, 8, ["loading"])
3318
3308
  ]),
3319
- e.value ? (c(), F("div", dn, [
3320
- i(_, { size: "xl" }),
3309
+ e.value ? (c(), C("div", cn, [
3310
+ i(b, { size: "xl" }),
3321
3311
  d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
3322
- ])) : (c(), K(u, {
3312
+ ])) : (c(), M(u, {
3323
3313
  key: 1,
3324
3314
  class: "flex overflow-scroll",
3325
- "row-data": x.value,
3326
- "column-defs": D.value
3315
+ "row-data": _.value,
3316
+ "column-defs": F.value
3327
3317
  }, null, 8, ["row-data", "column-defs"]))
3328
3318
  ]);
3329
3319
  };
3330
3320
  }
3331
- }), un = { class: "h-full relative flex flex-col" }, fn = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, vn = /* @__PURE__ */ H({
3321
+ }), pn = { class: "h-full relative flex flex-col" }, un = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, fn = /* @__PURE__ */ q({
3332
3322
  __name: "Biztory",
3333
3323
  props: {
3334
3324
  modelValue: { required: !0 },
@@ -3336,7 +3326,7 @@ const rn = [
3336
3326
  },
3337
3327
  emits: ["update:modelValue"],
3338
3328
  setup(g) {
3339
- const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
3329
+ const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = [
3340
3330
  {
3341
3331
  label: o("report.integration.setting"),
3342
3332
  value: "setting",
@@ -3347,86 +3337,86 @@ const rn = [
3347
3337
  value: "preview",
3348
3338
  icon: "table"
3349
3339
  }
3350
- ], b = pe(), x = z(() => {
3340
+ ], w = de(), _ = Y(() => {
3351
3341
  switch (n.value) {
3352
3342
  case "preview":
3353
3343
  return {
3354
- component: pn
3344
+ component: dn
3355
3345
  };
3356
3346
  case "setting":
3357
3347
  return {
3358
- component: an,
3348
+ component: on,
3359
3349
  props: {
3360
- retrievedMethods: D.value,
3361
- retrievedCustomers: w.value
3350
+ retrievedMethods: F.value,
3351
+ retrievedCustomers: h.value
3362
3352
  }
3363
3353
  };
3364
3354
  default:
3365
3355
  return null;
3366
3356
  }
3367
- }), D = B({}), w = B({}), m = (p, r) => p.map((y) => ({
3368
- label: r.length > 2 ? `ID:${y[r[2]]} [${y[r[0]]}] ${y[r[1]]}` : `[${y[r[0]]}] ${y[r[1]]}`,
3369
- value: y.id,
3370
- cnId: y.cnId ? y.cnId : null
3371
- })), d = (p) => m(p, ["wallet", "name"]), h = (p) => m(p, ["id", "name"]), _ = async (p, r, y, V) => {
3357
+ }), F = B({}), h = B({}), m = (p, r) => p.map((x) => ({
3358
+ label: r.length > 2 ? `ID:${x[r[2]]} [${x[r[0]]}] ${x[r[1]]}` : `[${x[r[0]]}] ${x[r[1]]}`,
3359
+ value: x.id,
3360
+ cnId: x.cnId ? x.cnId : null
3361
+ })), d = (p) => m(p, ["wallet", "name"]), k = (p) => m(p, ["id", "name"]), b = async (p, r, x, $) => {
3372
3362
  try {
3373
3363
  const l = await p(e.value._id);
3374
- y.value.data = r(l);
3364
+ x.value.data = r(l);
3375
3365
  } catch (l) {
3376
- console.error(V, l), y.value.isError = !0;
3366
+ console.error($, l), x.value.isError = !0;
3377
3367
  } finally {
3378
- y.value.isLoaded = !0;
3368
+ x.value.isLoaded = !0;
3379
3369
  }
3380
3370
  }, u = async () => {
3381
3371
  var p, r;
3382
- (p = e.value.platform.mappings) != null && p.version && await _(
3372
+ (p = e.value.platform.mappings) != null && p.version && await b(
3383
3373
  Ge,
3384
3374
  d,
3385
- D,
3375
+ F,
3386
3376
  "Failed to fetch payment methods:"
3387
- ), ((r = e.value.platform.mappings) == null ? void 0 : r.version) == "v2" && await _(
3377
+ ), ((r = e.value.platform.mappings) == null ? void 0 : r.version) == "v2" && await b(
3388
3378
  Je,
3379
+ k,
3389
3380
  h,
3390
- w,
3391
3381
  "Failed to fetch customers:"
3392
- ), D.value.isLoaded = !0, w.value.isLoaded = !0;
3382
+ ), F.value.isLoaded = !0, h.value.isLoaded = !0;
3393
3383
  };
3394
- return Ee(u), ge(() => {
3384
+ return Ee(u), ve(() => {
3395
3385
  var p;
3396
3386
  return (p = e.value.platform.mappings) == null ? void 0 : p.version;
3397
3387
  }, u), (p, r) => {
3398
3388
  var l, a, v;
3399
- const y = $("FmPageHead"), V = $("FmTabs");
3400
- return c(), F("div", un, [
3401
- i(y, {
3389
+ const x = S("FmPageHead"), $ = S("FmTabs");
3390
+ return c(), C("div", pn, [
3391
+ i(x, {
3402
3392
  title: ((l = e.value) == null ? void 0 : l.name) || "Biztory",
3403
3393
  "back-button": !0,
3404
3394
  style: { paddingLeft: "0px", paddingRight: "0px" },
3405
- "onClick:back": f(b).back
3395
+ "onClick:back": f(w).back
3406
3396
  }, {
3407
- description: xe(() => r[2] || (r[2] = [
3397
+ description: ge(() => r[2] || (r[2] = [
3408
3398
  t("div", null, null, -1)
3409
3399
  ])),
3410
3400
  _: 1
3411
3401
  }, 8, ["title", "onClick:back"]),
3412
- i(V, {
3402
+ i($, {
3413
3403
  "model-value": n.value,
3414
3404
  "onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
3415
- items: k
3405
+ items: V
3416
3406
  }, null, 8, ["model-value"]),
3417
- t("div", fn, [
3418
- (c(), K(be((a = x.value) == null ? void 0 : a.component), Le({
3407
+ t("div", un, [
3408
+ (c(), M(xe((a = _.value) == null ? void 0 : a.component), Le({
3419
3409
  modelValue: e.value,
3420
3410
  "onUpdate:modelValue": r[1] || (r[1] = (s) => e.value = s)
3421
- }, (v = x.value) == null ? void 0 : v.props), null, 16, ["modelValue"]))
3411
+ }, (v = _.value) == null ? void 0 : v.props), null, 16, ["modelValue"]))
3422
3412
  ])
3423
3413
  ]);
3424
3414
  };
3425
3415
  }
3426
- }), gn = {
3416
+ }), vn = {
3427
3417
  key: 0,
3428
3418
  class: "flex flex-col h-full"
3429
- }, yn = { class: "flex flex-col gap-16 pb-[24px]" }, xn = { class: "flex flex-row justify-between items-center gap-2" }, _n = { class: "flex flex-row gap-2 items-center" }, bn = { class: "relative group cursor-pointer" }, wn = { 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" }, hn = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, kn = { class: "flex flex-col gap-16" }, Vn = { class: "fm-typo-en-title-sm-800" }, $n = { class: "flex flex-row items-center max-w-[100%]" }, Sn = { class: "w-[25%]" }, Cn = { class: "flex-grow" }, Fn = { class: "flex flex-row items-center max-w-[100%]" }, Dn = { class: "w-[25%]" }, Un = { class: "flex flex-row items-center gap-x-16" }, Tn = { class: "fm-typo-en-title-sm-800" }, In = { class: "grid-cols-1 grid gap-16" }, Mn = /* @__PURE__ */ H({
3419
+ }, gn = { class: "flex flex-col gap-16 pb-[24px]" }, yn = { class: "flex flex-row justify-between items-center gap-2" }, xn = { class: "flex flex-row gap-2 items-center" }, _n = { class: "relative group cursor-pointer" }, bn = { 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" }, wn = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, hn = { class: "flex flex-col gap-16" }, kn = { class: "fm-typo-en-title-sm-800" }, Vn = { class: "flex flex-row items-center max-w-[100%]" }, $n = { class: "w-[25%]" }, Sn = { class: "flex-grow" }, Cn = { class: "flex flex-row items-center max-w-[100%]" }, Fn = { class: "w-[25%]" }, Dn = { class: "flex flex-row items-center gap-x-16" }, Un = { class: "fm-typo-en-title-sm-800" }, Tn = { class: "grid-cols-1 grid gap-16" }, In = /* @__PURE__ */ q({
3430
3420
  __name: "Setting",
3431
3421
  props: {
3432
3422
  modelValue: { required: !0 },
@@ -3434,39 +3424,39 @@ const rn = [
3434
3424
  },
3435
3425
  emits: ["update:modelValue"],
3436
3426
  setup(g) {
3437
- const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
3438
- () => w.map((r) => ({ label: r.name, value: r.id }))
3427
+ const { t: o } = J(), e = X(g, "modelValue"), n = ue(), V = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
3428
+ () => h.map((r) => ({ label: r.name, value: r.id }))
3439
3429
  );
3440
3430
  async function d() {
3441
- await D({
3431
+ await F({
3442
3432
  message: o("report.messages.confirmDelete", { name: e.value.name }),
3443
3433
  title: o("report.common.delete")
3444
- }) && await x(async () => {
3434
+ }) && await _(async () => {
3445
3435
  try {
3446
- await Ve(e.value._id), await k.getSettings(), b.back();
3447
- } catch (y) {
3448
- n.open({ type: "error", message: y.message });
3436
+ await he(e.value._id), await V.getSettings(), w.back();
3437
+ } catch (x) {
3438
+ n.open({ type: "error", message: x.message });
3449
3439
  }
3450
3440
  });
3451
3441
  }
3452
- async function h() {
3453
- await x(async () => {
3442
+ async function k() {
3443
+ await _(async () => {
3454
3444
  try {
3455
- await $e(e.value._id, e.value), await k.getSettings();
3445
+ await ke(e.value._id, e.value), await V.getSettings();
3456
3446
  } catch (r) {
3457
3447
  n.open({ type: "error", message: r.message });
3458
3448
  }
3459
3449
  });
3460
3450
  }
3461
- function _(r, y) {
3462
- var V, l;
3463
- (l = (V = e.value.platform) == null ? void 0 : V.mappings) != null && l[r] && (e.value.platform.mappings[r] = e.value.platform.mappings[r].filter(
3464
- (a, v) => v !== y
3451
+ function b(r, x) {
3452
+ var $, l;
3453
+ (l = ($ = e.value.platform) == null ? void 0 : $.mappings) != null && l[r] && (e.value.platform.mappings[r] = e.value.platform.mappings[r].filter(
3454
+ (a, v) => v !== x
3465
3455
  ));
3466
3456
  }
3467
3457
  function u(r) {
3468
- var y, V;
3469
- (V = (y = e.value.platform) == null ? void 0 : y.mappings) != null && V[r] && (e.value.platform.mappings[r] = [
3458
+ var x, $;
3459
+ ($ = (x = e.value.platform) == null ? void 0 : x.mappings) != null && $[r] && (e.value.platform.mappings[r] = [
3470
3460
  ...e.value.platform.mappings[r],
3471
3461
  {
3472
3462
  key: "",
@@ -3477,29 +3467,29 @@ const rn = [
3477
3467
  ]);
3478
3468
  }
3479
3469
  async function p() {
3480
- await x(async () => {
3470
+ await _(async () => {
3481
3471
  try {
3482
- await Se(e.value._id), await k.getSettings();
3472
+ await Ve(e.value._id), await V.getSettings();
3483
3473
  } catch (r) {
3484
3474
  n.open({ type: "error", message: r.message });
3485
3475
  }
3486
3476
  });
3487
3477
  }
3488
- return (r, y) => {
3489
- var P, N, G, Y, J;
3490
- const V = $("FmIcon"), l = $("FmButton"), a = $("FmMenuDivider"), v = $("FmTextField"), s = $("FmSelect");
3491
- return (N = (P = e.value) == null ? void 0 : P.platform) != null && N.mappings ? (c(), F("div", gn, [
3492
- t("div", yn, [
3493
- t("div", xn, [
3494
- y[4] || (y[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
3495
- t("div", _n, [
3496
- t("div", bn, [
3497
- i(V, {
3478
+ return (r, x) => {
3479
+ var A, P, Q, E, G;
3480
+ const $ = S("FmIcon"), l = S("FmButton"), a = S("FmMenuDivider"), v = S("FmTextField"), s = S("FmSelect");
3481
+ return (P = (A = e.value) == null ? void 0 : A.platform) != null && P.mappings ? (c(), C("div", vn, [
3482
+ t("div", gn, [
3483
+ t("div", yn, [
3484
+ x[4] || (x[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
3485
+ t("div", xn, [
3486
+ t("div", _n, [
3487
+ i($, {
3498
3488
  name: "refresh",
3499
3489
  class: "p-2 bg-gray-100 rounded-full",
3500
3490
  onClick: p
3501
3491
  }),
3502
- t("span", wn, T(f(o)("report.integration.iflexiHrms.refreshTooltip")), 1)
3492
+ t("span", bn, T(f(o)("report.integration.iflexiHrms.refreshTooltip")), 1)
3503
3493
  ]),
3504
3494
  i(l, {
3505
3495
  variant: "tertiary",
@@ -3509,71 +3499,71 @@ const rn = [
3509
3499
  i(l, {
3510
3500
  variant: "primary",
3511
3501
  label: f(o)("report.common.update"),
3512
- onClick: h
3502
+ onClick: k
3513
3503
  }, null, 8, ["label"])
3514
3504
  ])
3515
3505
  ])
3516
3506
  ]),
3517
3507
  i(a, { style: { margin: 0 } }),
3518
- t("div", hn, [
3519
- t("div", kn, [
3520
- t("div", Vn, T(f(o)("report.integration.iflexiHrms.general")), 1),
3521
- t("div", $n, [
3522
- t("div", Sn, T(f(o)("report.common.name")), 1),
3523
- t("div", Cn, [
3508
+ t("div", wn, [
3509
+ t("div", hn, [
3510
+ t("div", kn, T(f(o)("report.integration.iflexiHrms.general")), 1),
3511
+ t("div", Vn, [
3512
+ t("div", $n, T(f(o)("report.common.name")), 1),
3513
+ t("div", Sn, [
3524
3514
  i(v, {
3525
3515
  modelValue: e.value.name,
3526
- "onUpdate:modelValue": y[0] || (y[0] = (O) => e.value.name = O)
3516
+ "onUpdate:modelValue": x[0] || (x[0] = (R) => e.value.name = R)
3527
3517
  }, null, 8, ["modelValue"])
3528
3518
  ])
3529
3519
  ]),
3530
- t("div", Fn, [
3531
- t("div", Dn, T(f(o)("report.integration.location")), 1),
3520
+ t("div", Cn, [
3521
+ t("div", Fn, T(f(o)("report.integration.location")), 1),
3532
3522
  i(s, {
3533
3523
  "model-value": e.value.platform.locationIds[0],
3534
3524
  multiselect: !1,
3535
3525
  items: m.value,
3536
3526
  placeholder: "Select location",
3537
3527
  class: "flex-grow",
3538
- "onUpdate:modelValue": y[1] || (y[1] = (O) => e.value.platform.locationIds[0] = O)
3528
+ "onUpdate:modelValue": x[1] || (x[1] = (R) => e.value.platform.locationIds[0] = R)
3539
3529
  }, null, 8, ["model-value", "items"])
3540
3530
  ])
3541
3531
  ]),
3542
- i(Te, {
3532
+ i(De, {
3543
3533
  modelValue: e.value.platform,
3544
- "onUpdate:modelValue": y[2] || (y[2] = (O) => e.value.platform = O),
3534
+ "onUpdate:modelValue": x[2] || (x[2] = (R) => e.value.platform = R),
3545
3535
  label: f(o)("report.input.email")
3546
3536
  }, null, 8, ["modelValue", "label"]),
3547
- t("div", Un, [
3548
- t("div", Tn, T(f(o)("report.integration.iflexiHrms.employee")), 1),
3537
+ t("div", Dn, [
3538
+ t("div", Un, T(f(o)("report.integration.iflexiHrms.employee")), 1),
3549
3539
  i(l, {
3550
3540
  variant: "primary",
3551
3541
  icon: "add",
3552
- onClick: y[3] || (y[3] = () => u("employees"))
3542
+ onClick: x[3] || (x[3] = () => u("employees"))
3553
3543
  })
3554
3544
  ]),
3555
- t("div", In, [
3556
- (c(!0), F(L, null, X((J = (Y = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : Y.mappings) == null ? void 0 : J.employees, (O, j) => (c(), K(A, {
3545
+ t("div", Tn, [
3546
+ (c(!0), C(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, {
3557
3547
  key: `employee-${j}`,
3558
3548
  modelValue: e.value.platform.mappings.employees[j],
3559
- "onUpdate:modelValue": (E) => e.value.platform.mappings.employees[j] = E,
3549
+ "onUpdate:modelValue": (z) => e.value.platform.mappings.employees[j] = z,
3560
3550
  options: {
3561
3551
  key: { placeholder: "Name", editable: !0 },
3562
3552
  badgeNo: { placeholder: "Badge No", editable: !0 },
3563
3553
  employeeNo: { placeholder: "Employee No", editable: !0 }
3564
3554
  },
3565
3555
  removable: !0,
3566
- onRemove: () => _("employees", j)
3556
+ onRemove: () => b("employees", j)
3567
3557
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
3568
3558
  ])
3569
3559
  ])
3570
- ])) : R("", !0);
3560
+ ])) : N("", !0);
3571
3561
  };
3572
3562
  }
3573
- }), Kn = { class: "h-full flex flex-col gap-16" }, An = { class: "flex flex-row gap-2 justify-between items-center" }, Pn = {
3563
+ }), Mn = { class: "h-full flex flex-col gap-16" }, Kn = { class: "flex flex-row gap-2 justify-between items-center" }, An = {
3574
3564
  key: 0,
3575
3565
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
3576
- }, Nn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rn = /* @__PURE__ */ H({
3566
+ }, Pn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nn = /* @__PURE__ */ q({
3577
3567
  __name: "Preview",
3578
3568
  props: {
3579
3569
  modelValue: { required: !0 },
@@ -3581,7 +3571,7 @@ const rn = [
3581
3571
  },
3582
3572
  emits: ["update:modelValue"],
3583
3573
  setup(g) {
3584
- const { t: o } = W(), e = B([]), n = [
3574
+ const { t: o } = J(), e = B([]), n = [
3585
3575
  {
3586
3576
  accessorKey: "name",
3587
3577
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Name"),
@@ -3607,61 +3597,61 @@ const rn = [
3607
3597
  header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
3608
3598
  enableSorting: !1
3609
3599
  }
3610
- ], k = Q(g, "modelValue"), b = B(!1), x = fe(), { dateRange: D } = De(ue());
3611
- ge(
3612
- () => D.value,
3600
+ ], V = X(g, "modelValue"), w = B(!1), _ = ue(), { dateRange: F } = Ce(pe());
3601
+ ve(
3602
+ () => F.value,
3613
3603
  async () => {
3614
- if (k.value._id)
3604
+ if (V.value._id)
3615
3605
  try {
3616
- b.value = !0, e.value = await Ce(k.value._id);
3606
+ w.value = !0, e.value = await $e(V.value._id);
3617
3607
  } catch (m) {
3618
- x.open({ message: m.message, type: "error" });
3608
+ _.open({ message: m.message, type: "error" });
3619
3609
  } finally {
3620
- b.value = !1;
3610
+ w.value = !1;
3621
3611
  }
3622
3612
  },
3623
3613
  {
3624
3614
  immediate: !0
3625
3615
  }
3626
3616
  );
3627
- async function w() {
3617
+ async function h() {
3628
3618
  try {
3629
- k.value._id ? (b.value = !0, await Pe(k.value._id)) : x.open({ message: "Invalid setting", type: "error" });
3619
+ V.value._id ? (w.value = !0, await Pe(V.value._id)) : _.open({ message: "Invalid setting", type: "error" });
3630
3620
  } catch (m) {
3631
- x.open({ message: m.message, type: "error" });
3621
+ _.open({ message: m.message, type: "error" });
3632
3622
  } finally {
3633
- b.value = !1;
3623
+ w.value = !1;
3634
3624
  }
3635
3625
  }
3636
3626
  return (m, d) => {
3637
- const h = $("FmButton"), _ = $("FmCircularProgress"), u = $("FmTable");
3638
- return c(), F("div", Kn, [
3639
- t("div", An, [
3640
- i(Ue, {
3641
- "date-range": f(D),
3642
- "onUpdate:dateRange": d[0] || (d[0] = (p) => he(D) ? D.value = p : null),
3627
+ const k = S("FmButton"), b = S("FmCircularProgress"), u = S("FmTable");
3628
+ return c(), C("div", Mn, [
3629
+ t("div", Kn, [
3630
+ i(Fe, {
3631
+ "date-range": f(F),
3632
+ "onUpdate:dateRange": d[0] || (d[0] = (p) => be(F) ? F.value = p : null),
3643
3633
  compare: !1
3644
3634
  }, null, 8, ["date-range"]),
3645
- i(h, {
3646
- loading: b.value,
3635
+ i(k, {
3636
+ loading: w.value,
3647
3637
  variant: "primary",
3648
3638
  label: f(o)("report.common.download"),
3649
- onClick: w
3639
+ onClick: h
3650
3640
  }, null, 8, ["loading", "label"])
3651
3641
  ]),
3652
- b.value ? (c(), F("div", Pn, [
3653
- i(_, { size: "xl" }),
3654
- t("span", Nn, T(f(o)("report.common.isLoading")), 1)
3655
- ])) : e.value.length > 0 ? (c(), K(u, {
3642
+ w.value ? (c(), C("div", An, [
3643
+ i(b, { size: "xl" }),
3644
+ t("span", Pn, T(f(o)("report.common.isLoading")), 1)
3645
+ ])) : e.value.length > 0 ? (c(), M(u, {
3656
3646
  key: 1,
3657
3647
  class: "flex overflow-scroll",
3658
3648
  "row-data": e.value,
3659
3649
  "column-defs": n
3660
- }, null, 8, ["row-data"])) : R("", !0)
3650
+ }, null, 8, ["row-data"])) : N("", !0)
3661
3651
  ]);
3662
3652
  };
3663
3653
  }
3664
- }), On = { class: "h-full relative flex flex-col" }, Bn = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, jn = /* @__PURE__ */ H({
3654
+ }), Rn = { class: "h-full relative flex flex-col" }, On = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Bn = /* @__PURE__ */ q({
3665
3655
  __name: "IFlexiHRMS",
3666
3656
  props: {
3667
3657
  modelValue: {},
@@ -3669,7 +3659,7 @@ const rn = [
3669
3659
  },
3670
3660
  emits: ["update:modelValue"],
3671
3661
  setup(g) {
3672
- const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
3662
+ const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = [
3673
3663
  {
3674
3664
  label: o("report.integration.setting"),
3675
3665
  value: "setting",
@@ -3680,86 +3670,86 @@ const rn = [
3680
3670
  value: "preview",
3681
3671
  icon: "table"
3682
3672
  }
3683
- ], b = pe(), x = z(() => {
3673
+ ], w = de(), _ = Y(() => {
3684
3674
  switch (n.value) {
3685
3675
  case "preview":
3686
- return Rn;
3676
+ return Nn;
3687
3677
  case "setting":
3688
- return Mn;
3678
+ return In;
3689
3679
  default:
3690
3680
  return null;
3691
3681
  }
3692
3682
  });
3693
- return (D, w) => {
3694
- var h;
3695
- const m = $("FmPageHead"), d = $("FmTabs");
3696
- return c(), F("div", On, [
3683
+ return (F, h) => {
3684
+ var k;
3685
+ const m = S("FmPageHead"), d = S("FmTabs");
3686
+ return c(), C("div", Rn, [
3697
3687
  i(m, {
3698
- title: ((h = e.value) == null ? void 0 : h.name) || "AutoCount",
3688
+ title: ((k = e.value) == null ? void 0 : k.name) || "AutoCount",
3699
3689
  "back-button": !0,
3700
3690
  style: { paddingLeft: "0px", paddingRight: "0px" },
3701
- "onClick:back": f(b).back
3691
+ "onClick:back": f(w).back
3702
3692
  }, {
3703
- description: xe(() => w[2] || (w[2] = [
3693
+ description: ge(() => h[2] || (h[2] = [
3704
3694
  t("div", null, null, -1)
3705
3695
  ])),
3706
3696
  _: 1
3707
3697
  }, 8, ["title", "onClick:back"]),
3708
3698
  i(d, {
3709
3699
  "model-value": n.value,
3710
- "onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
3711
- items: k
3700
+ "onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
3701
+ items: V
3712
3702
  }, null, 8, ["model-value"]),
3713
- t("div", Bn, [
3714
- (c(), K(be(x.value), {
3703
+ t("div", On, [
3704
+ (c(), M(xe(_.value), {
3715
3705
  modelValue: e.value,
3716
- "onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
3706
+ "onUpdate:modelValue": h[1] || (h[1] = (b) => e.value = b)
3717
3707
  }, null, 8, ["modelValue"]))
3718
3708
  ])
3719
3709
  ]);
3720
3710
  };
3721
3711
  }
3722
- }), Ln = { class: "px-24 h-full relative" }, Jn = /* @__PURE__ */ H({
3712
+ }), jn = { class: "px-24 h-full relative" }, Gn = /* @__PURE__ */ q({
3723
3713
  __name: "Integration",
3724
3714
  setup(g) {
3725
- const o = B(void 0), { params: e } = ze(), n = we(), k = B();
3715
+ const o = B(void 0), { params: e } = ze(), n = _e(), V = B();
3726
3716
  Ee(async () => {
3727
3717
  n.settings.length === 0 && await n.getSettings();
3728
- }), ge(
3718
+ }), ve(
3729
3719
  () => n.settings,
3730
- (x) => {
3731
- var w;
3732
- const D = x.find((m) => m._id === e.id);
3733
- D && (k.value = D, o.value = (w = k.value.platform) == null ? void 0 : w.name);
3720
+ (_) => {
3721
+ var h;
3722
+ const F = _.find((m) => m._id === e.id);
3723
+ F && (V.value = F, o.value = (h = V.value.platform) == null ? void 0 : h.name);
3734
3724
  },
3735
3725
  { immediate: !0 }
3736
3726
  );
3737
- const b = z(() => {
3727
+ const w = Y(() => {
3738
3728
  switch (o.value) {
3739
- case de.Xero:
3729
+ case ce.Xero:
3740
3730
  return Zt;
3741
- case de.Bukku:
3742
- return zo;
3743
- case de.AutoCount:
3744
- return Sa;
3745
- case de.SQL:
3746
- return ml;
3747
- case de.iFlexi_HRMS:
3748
- return jn;
3749
- case de.Biztory:
3750
- return vn;
3731
+ case ce.Bukku:
3732
+ return Eo;
3733
+ case ce.AutoCount:
3734
+ return $a;
3735
+ case ce.SQL:
3736
+ return rl;
3737
+ case ce.iFlexi_HRMS:
3738
+ return Bn;
3739
+ case ce.Biztory:
3740
+ return fn;
3751
3741
  default:
3752
3742
  return null;
3753
3743
  }
3754
3744
  });
3755
- return (x, D) => (c(), F("div", Ln, [
3756
- (c(), K(be(b.value), {
3757
- modelValue: k.value,
3758
- "onUpdate:modelValue": D[0] || (D[0] = (w) => k.value = w)
3745
+ return (_, F) => (c(), C("div", jn, [
3746
+ (c(), M(xe(w.value), {
3747
+ modelValue: V.value,
3748
+ "onUpdate:modelValue": F[0] || (F[0] = (h) => V.value = h)
3759
3749
  }, null, 8, ["modelValue"]))
3760
3750
  ]));
3761
3751
  }
3762
3752
  });
3763
3753
  export {
3764
- Jn as default
3754
+ Gn as default
3765
3755
  };