@feedmepos/mf-report 5.5.20-beta.1 → 5.5.21

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