@feedmepos/mf-report 5.21.26 → 5.21.27

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 (22) hide show
  1. package/dist/{App-DcFOVWEX.js → App-B7pZn85d.js} +3 -3
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CnCFX1Cy.js → BaseDialog.vue_vue_type_script_setup_true_lang-QzLGWBvd.js} +9303 -8936
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-Dhu7Z5sI.js → Default.vue_vue_type_script_setup_true_lang-oPfgV8Ba.js} +1 -1
  4. package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-6G7uvSDs.js → FilterSelector.vue_vue_type_script_setup_true_lang-B2jdNYHG.js} +121 -121
  5. package/dist/{InsightView-DKG7qpL7.js → InsightView-B3zeWLpB.js} +2 -2
  6. package/dist/{Integration-vxdcZOvd.js → Integration-DAfyew-m.js} +566 -563
  7. package/dist/{Layout-DswpA52f.js → Layout-BfhdHhdb.js} +1 -1
  8. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-Dqfxostu.js → MenuTab.vue_vue_type_script_setup_true_lang-CwzcLrSB.js} +3 -3
  9. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CEJrC4ag.js → NavigationTab.vue_vue_type_script_setup_true_lang-M3kgeSAQ.js} +1 -1
  10. package/dist/{OverviewView-C31PuWec.js → OverviewView-Ds4s9oxp.js} +4 -4
  11. package/dist/{Report-PWYl62Ly.js → Report-i-ZrteAi.js} +2 -2
  12. package/dist/{ReportEditor-Dl_vS7sc.js → ReportEditor-BFF57S9g.js} +3 -3
  13. package/dist/{ReportView-CwqEToix.js → ReportView-C_noR8lh.js} +5 -5
  14. package/dist/{Setting-DYqFwOt1.js → Setting-8zch0HnP.js} +2 -2
  15. package/dist/{TileEditor-pmJq3xtl.js → TileEditor-BeianCEO.js} +3 -3
  16. package/dist/{TransitionFade-DyICQJVa.js → TransitionFade-B1etHHO2.js} +2 -2
  17. package/dist/app.js +10 -10
  18. package/dist/assets/formatChartData.worker-B3aFFvRN.js +134 -0
  19. package/dist/assets/processTableData.worker-C9Y9NVCl.js +134 -0
  20. package/package.json +1 -1
  21. package/dist/assets/formatChartData.worker-BxpediKG.js +0 -134
  22. package/dist/assets/processTableData.worker-93fLL2HJ.js +0 -134
@@ -1,6 +1,6 @@
1
- import { defineComponent as J, mergeModels as Ve, useModel as te, computed as q, resolveComponent as V, createElementBlock as U, openBlock as _, createElementVNode as t, createCommentVNode as L, normalizeClass as Ie, Fragment as ke, createBlock as j, withCtx as xe, toDisplayString as C, renderList as De, createVNode as l, unref as d, h as k, normalizeStyle as tt, createTextVNode as ot, ref as z, onUnmounted as Re, watch as Ce, isRef as Te, resolveDynamicComponent as Fe, mergeProps as Qe, onMounted as Ge } from "vue";
1
+ import { defineComponent as J, mergeModels as Ae, useModel as te, computed as q, resolveComponent as A, createElementBlock as U, openBlock as _, createElementVNode as t, createCommentVNode as L, normalizeClass as Ie, Fragment as ke, createBlock as j, withCtx as xe, toDisplayString as C, renderList as De, createVNode as l, unref as d, h as k, normalizeStyle as tt, createTextVNode as ot, ref as z, onUnmounted as Re, watch as Ce, isRef as Te, resolveDynamicComponent as Fe, mergeProps as Qe, onMounted as Ge } from "vue";
2
2
  import { useRouter as be, useRoute as at } from "vue-router";
3
- import { u as oe, I as he, d as Se, z as lt, A as nt, e as Ae, f as Pe, b as we, B as ve, E as st, o as rt, y as Me, G as je, H as Ke, J as Le, K as ze, L as it, M as dt, N as mt, O as qe, c as Ze, P as pt, Q as ut, R as ct, S as ft, T as gt } from "./vue-i18n-D1iec8Wy.js";
3
+ import { u as oe, I as he, d as Se, z as lt, A as nt, e as Ve, f as Pe, b as we, B as ve, E as st, o as rt, y as Me, G as je, H as Ke, J as Le, K as ze, L as it, M as dt, N as mt, O as qe, c as Ze, P as pt, Q as ut, R as ct, S as ft, T as gt } from "./vue-i18n-D1iec8Wy.js";
4
4
  import { u as Oe } from "./message-dialog-UoMWOnil.js";
5
5
  import { useSnackbar as _e } from "@feedmepos/ui-library";
6
6
  import { storeToRefs as Ee } from "pinia";
@@ -10,7 +10,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
10
10
  class: "w-[24px] flex items-center"
11
11
  }, B = /* @__PURE__ */ J({
12
12
  __name: "MappingField",
13
- props: /* @__PURE__ */ Ve({
13
+ props: /* @__PURE__ */ Ae({
14
14
  removable: {
15
15
  type: Boolean,
16
16
  default: !1
@@ -35,7 +35,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
35
35
  modelValue: { required: !0 },
36
36
  modelModifiers: {}
37
37
  }),
38
- emits: /* @__PURE__ */ Ve(["remove"], ["update:modelValue"]),
38
+ emits: /* @__PURE__ */ Ae(["remove"], ["update:modelValue"]),
39
39
  setup(g, { emit: a }) {
40
40
  const e = te(g, "modelValue"), i = g, x = q(
41
41
  () => Object.keys(i.options).map((F) => {
@@ -54,10 +54,10 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
54
54
  [F]: b
55
55
  };
56
56
  }
57
- const D = a;
57
+ const K = a;
58
58
  return (F, y) => {
59
59
  var $;
60
- const b = V("FmTextField"), m = V("FmTooltip"), K = V("FmIcon");
60
+ const b = A("FmTextField"), p = A("FmTooltip"), V = A("FmIcon");
61
61
  return _(), U("div", vt, [
62
62
  t("div", {
63
63
  class: Ie(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-col items-start gap-[4px]`)
@@ -71,7 +71,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
71
71
  type: g.type,
72
72
  rules: g.rules,
73
73
  "onUpdate:modelValue": y[0] || (y[0] = (u) => T(x.value[0].key, u))
74
- }, null, 8, ["model-value", "placeholder", "type", "rules"])) : (_(), j(m, {
74
+ }, null, 8, ["model-value", "placeholder", "type", "rules"])) : (_(), j(p, {
75
75
  key: 1,
76
76
  content: ($ = e.value[x.value[0].key]) == null ? void 0 : $.toString(),
77
77
  class: "w-[100%]"
@@ -95,8 +95,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
95
95
  placeholder: u.placeholder,
96
96
  type: g.type,
97
97
  rules: g.rules,
98
- "onUpdate:modelValue": (p) => T(u.key, p)
99
- }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])) : (_(), j(m, {
98
+ "onUpdate:modelValue": (m) => T(u.key, m)
99
+ }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])) : (_(), j(p, {
100
100
  key: 1,
101
101
  content: (c = e.value[u.key]) == null ? void 0 : c.toString(),
102
102
  class: "w-[100%]"
@@ -127,9 +127,9 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
127
127
  placeholder: u.placeholder,
128
128
  type: g.type,
129
129
  rules: g.rules,
130
- "onUpdate:modelValue": (p) => T(u.key, p)
130
+ "onUpdate:modelValue": (m) => T(u.key, m)
131
131
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
132
- ], 2)) : (_(), j(m, {
132
+ ], 2)) : (_(), j(p, {
133
133
  key: 1,
134
134
  content: (c = e.value[u.key]) == null ? void 0 : c.toString(),
135
135
  class: "w-[50%]"
@@ -144,11 +144,11 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
144
144
  ], 2))
145
145
  ], 2),
146
146
  g.removable ? (_(), U("div", ht, [
147
- l(K, {
147
+ l(V, {
148
148
  class: "cursor-pointer text-fm-color-neutral-gray-400",
149
149
  name: "delete",
150
150
  size: "md",
151
- onClick: y[1] || (y[1] = (u) => D("remove"))
151
+ onClick: y[1] || (y[1] = (u) => K("remove"))
152
152
  })
153
153
  ])) : L("", !0)
154
154
  ]);
@@ -157,12 +157,12 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
157
157
  }), kt = { class: "flex flex-col" }, Ct = { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, $t = { class: "flex flex-row items-center" }, St = {
158
158
  key: 0,
159
159
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary min-w-[25%]"
160
- }, Vt = { key: 0 }, At = { class: "mt-6 mb-6 h-[calc(100vh-180px)] flex flex-col" }, Dt = { class: "flex-grow overflow-auto" }, Kt = { class: "flex flex-col w-[100%] justify-between" }, Tt = { class: "flex flex-row items-center w-[100%] justify-start" }, Ft = { class: "text-nowrap overflow-hidden text-ellipsis font-semibold w-[25%]" }, Nt = {
160
+ }, At = { key: 0 }, Vt = { class: "mt-6 mb-6 h-[calc(100vh-180px)] flex flex-col" }, Dt = { class: "flex-grow overflow-auto" }, Kt = { class: "flex flex-col w-[100%] justify-between" }, Tt = { class: "flex flex-row items-center w-[100%] justify-start" }, Ft = { class: "text-nowrap overflow-hidden text-ellipsis font-semibold w-[25%]" }, Nt = {
161
161
  key: 0,
162
162
  class: "flex flex-col w-[100%] justify-start"
163
163
  }, It = { class: "text-nowrap overflow-hidden text-ellipsis font-semibold" }, Ut = { class: "w-[100%]" }, Rt = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Pt = { class: "flex flex-col w-[100%] justify-between" }, Mt = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis font-semibold" }, jt = { class: "w-[100%]" }, Ue = /* @__PURE__ */ J({
164
164
  __name: "UploadSection",
165
- props: /* @__PURE__ */ Ve({
165
+ props: /* @__PURE__ */ Ae({
166
166
  label: {
167
167
  type: String,
168
168
  default: "upload"
@@ -186,16 +186,16 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
186
186
  emits: ["update:modelValue"],
187
187
  setup(g) {
188
188
  const { t: a } = oe(), e = te(g, "modelValue"), i = g, x = (b) => {
189
- const m = "font-medium px-1 py-1 rounded-md inline-block mr-2";
189
+ const p = "font-medium px-1 py-1 rounded-md inline-block mr-2 flex-none w-[80px] text-center whitespace-nowrap overflow-hidden text-ellipsis";
190
190
  switch (b) {
191
191
  case "SUCCESS":
192
- return `${m} bg-green-700 bg-opacity-10 text-green-700`;
192
+ return `${p} bg-green-700 bg-opacity-10 text-green-700`;
193
193
  case "SKIPPED":
194
- return `${m} bg-gray-400 bg-opacity-10 text-gray-700`;
194
+ return `${p} bg-gray-400 bg-opacity-10 text-gray-700`;
195
195
  case "FAILED":
196
- return `${m} bg-red-700 bg-opacity-10 text-red-700`;
196
+ return `${p} bg-red-700 bg-opacity-10 text-red-700`;
197
197
  default:
198
- return `${m} bg-blue-700 bg-opacity-10`;
198
+ return `${p} bg-blue-700 bg-opacity-10`;
199
199
  }
200
200
  }, T = q(() => {
201
201
  switch (e.value.name) {
@@ -206,7 +206,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
206
206
  default:
207
207
  return !1;
208
208
  }
209
- }), D = [
209
+ }), K = [
210
210
  {
211
211
  accessorKey: "createdAt",
212
212
  header: () => k("p", { class: "min-w-[70px] text-nowrap text-ellipsis" }, "Logged At"),
@@ -218,38 +218,38 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
218
218
  header: () => k("p", { class: "min-w-[270px] text-nowrap text-ellipsis" }, "Cron Info"),
219
219
  cell: (b) => {
220
220
  var $;
221
- const m = ($ = b.row) == null ? void 0 : $.original;
222
- console.log(m);
223
- const K = [
221
+ const p = ($ = b.row) == null ? void 0 : $.original;
222
+ console.log(p);
223
+ const V = [
224
224
  {
225
225
  label: "Last Upload",
226
- value: m != null && m.lastUploadDate ? Se(m.lastUploadDate).format("YYYY-MM-DD HH:mm:ss") : "-"
226
+ value: p != null && p.lastUploadDate ? Se(p.lastUploadDate).format("YYYY-MM-DD HH:mm:ss") : "-"
227
227
  },
228
228
  {
229
229
  label: "Heartbeat",
230
- value: m != null && m.restaurantHeartBeat ? Se(m.restaurantHeartBeat).format("YYYY-MM-DD HH:mm:ss") : "-"
230
+ value: p != null && p.restaurantHeartBeat ? Se(p.restaurantHeartBeat).format("YYYY-MM-DD HH:mm:ss") : "-"
231
231
  },
232
232
  {
233
233
  label: "Start",
234
- value: m != null && m.startDate ? Se(m.startDate).format("YYYY-MM-DD HH:mm:ss") : "-"
234
+ value: p != null && p.startDate ? Se(p.startDate).format("YYYY-MM-DD HH:mm:ss") : "-"
235
235
  },
236
236
  {
237
237
  label: "Failed At",
238
- value: m != null && m.processingDate ? Se(m.processingDate).format("YYYY-MM-DD HH:mm:ss") : "-"
238
+ value: p != null && p.processingDate ? Se(p.processingDate).format("YYYY-MM-DD HH:mm:ss") : "-"
239
239
  },
240
240
  {
241
241
  label: "Pending Days",
242
- value: typeof (m == null ? void 0 : m.pendingDays) == "number" && !Number.isNaN(m.pendingDays) ? m.pendingDays.toString() : "-"
242
+ value: typeof (p == null ? void 0 : p.pendingDays) == "number" && !Number.isNaN(p.pendingDays) ? p.pendingDays.toString() : "-"
243
243
  },
244
244
  {
245
245
  label: "Delay Days",
246
- value: typeof (m == null ? void 0 : m.delayDays) == "number" && !Number.isNaN(m.delayDays) ? m.delayDays.toString() : "-"
246
+ value: typeof (p == null ? void 0 : p.delayDays) == "number" && !Number.isNaN(p.delayDays) ? p.delayDays.toString() : "-"
247
247
  }
248
248
  ];
249
249
  return k(
250
250
  "div",
251
251
  { class: "space-y-1 pt-2 pb-2 min-w-[260px]" },
252
- K.map(
252
+ V.map(
253
253
  (u) => k("div", { class: "flex flex-row justify-between" }, [
254
254
  k("span", { class: "font-semibold mr-2" }, u.label),
255
255
  k("span", {}, u.value)
@@ -262,36 +262,39 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
262
262
  {
263
263
  accessorKey: "messages",
264
264
  header: () => k("p", { class: "min-w-[320px] text-nowrap" }, "Details"),
265
- cell: (b) => b.getValue().length > 0 ? k(
266
- "div",
267
- { class: "space-y-2 pt-2 pb-2" },
268
- b.getValue().map(
269
- (m) => k("div", { class: "min-w-[320px] whitespace-normal break-words flex items-center" }, [
270
- k("span", { class: "mr-2" }, "•"),
271
- m.status ? k(
272
- "div",
273
- { class: x(m.status) },
274
- m.status
275
- ) : null,
276
- k("span", {}, m.message.toString())
277
- ])
278
- )
279
- ) : k("p", { class: "min-w-[320px] whitespace-normal break-words" }, "No messages"),
265
+ cell: (b) => {
266
+ const p = b.getValue();
267
+ return p.length > 0 ? k(
268
+ "div",
269
+ { class: "space-y-2 pt-2 pb-2" },
270
+ [...p].reverse().map(
271
+ (V) => k("div", { class: "min-w-[320px] whitespace-normal break-words flex items-center" }, [
272
+ k("span", { class: "mr-2" }, "•"),
273
+ V.status ? k(
274
+ "div",
275
+ { class: x(V.status) },
276
+ V.status
277
+ ) : null,
278
+ k("span", {}, V.message.toString())
279
+ ])
280
+ )
281
+ ) : k("p", { class: "min-w-[320px] whitespace-normal break-words" }, "No messages");
282
+ },
280
283
  meta: {
281
284
  cellSpanClass: "w-full whitespace-normal break-words"
282
285
  },
283
286
  enableSorting: !1
284
287
  }
285
- ], F = q(() => i.errorLogs.filter((m) => !m.isRead).length > 0), y = () => {
288
+ ], F = q(() => i.errorLogs.filter((p) => !p.isRead).length > 0), y = () => {
286
289
  F.value && nt(i.integrationId).then(() => {
287
290
  i.errorLogs.forEach((b) => b.isRead = !0);
288
291
  }).catch((b) => {
289
292
  console.error("Failed to mark error logs as read:", b);
290
293
  });
291
294
  };
292
- return (b, m) => {
295
+ return (b, p) => {
293
296
  var v, h;
294
- const K = V("FmBadge"), $ = V("FmTable"), u = V("FmSideSheet"), c = V("FmSwitch"), p = V("FmTextField"), f = V("FmTimePicker");
297
+ const V = A("FmBadge"), $ = A("FmTable"), u = A("FmSideSheet"), c = A("FmSwitch"), m = A("FmTextField"), f = A("FmTimePicker");
295
298
  return _(), U(ke, null, [
296
299
  t("div", kt, [
297
300
  t("div", Ct, C(d(a)("report.integration.auto", { label: g.label })), 1),
@@ -302,11 +305,11 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
302
305
  "dismiss-away": "",
303
306
  "max-width": 980,
304
307
  "close-button": !1,
305
- "onOn:clickedAway": m[0] || (m[0] = () => y())
308
+ "onOn:clickedAway": p[0] || (p[0] = () => y())
306
309
  }, {
307
310
  "side-sheet-button": xe(() => [
308
- g.label == "upload" ? (_(), U("div", Vt, [
309
- F.value ? (_(), j(K, {
311
+ g.label == "upload" ? (_(), U("div", At, [
312
+ F.value ? (_(), j(V, {
310
313
  key: 0,
311
314
  variant: "critical"
312
315
  }, {
@@ -316,21 +319,21 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
316
319
  "ms-3 fm-typo-en-body-md-400 p-1 border-solid border-2 rounded-md cursor-pointer max-w-[360px] md:max-w-[520px] lg:max-w-[640px] !truncate",
317
320
  F.value ? "text-fm-color-primary" : "text-fm-color-typo-secondary"
318
321
  ])
319
- }, C(i.errorLogs.length > 0 ? `${i.errorLogs[0].messages[0].status} - ${i.errorLogs[0].messages[0].message}` : d(a)("No error logs")), 3)
322
+ }, C(i.errorLogs.length > 0 && i.errorLogs[0].messages && i.errorLogs[0].messages.length > 0 ? `${i.errorLogs[0].messages[i.errorLogs[0].messages.length - 1].status} - ${i.errorLogs[0].messages[i.errorLogs[0].messages.length - 1].message}` : d(a)("No error logs")), 3)
320
323
  ]),
321
324
  _: 1
322
325
  })) : (_(), U("div", {
323
326
  key: 1,
324
327
  class: Ie(["ms-3 fm-typo-en-body-md-400 p-1 border-solid border-2 rounded-md cursor-pointer max-w-[360px] md:max-w-[520px] lg:max-w-[640px] !truncate", F.value ? "text-fm-color-primary" : "text-fm-color-typo-secondary"])
325
- }, C(i.errorLogs.length > 0 ? `${i.errorLogs[0].messages[0].status} - ${i.errorLogs[0].messages[0].message}` : d(a)("No error logs")), 3))
328
+ }, C(i.errorLogs.length > 0 && i.errorLogs[0].messages && i.errorLogs[0].messages.length > 0 ? `${i.errorLogs[0].messages[i.errorLogs[0].messages.length - 1].status} - ${i.errorLogs[0].messages[i.errorLogs[0].messages.length - 1].message}` : d(a)("No error logs")), 3))
326
329
  ])) : L("", !0)
327
330
  ]),
328
331
  default: xe(() => [
329
- t("div", At, [
332
+ t("div", Vt, [
330
333
  t("div", Dt, [
331
334
  l($, {
332
335
  "row-data": i.errorLogs,
333
- "column-defs": D,
336
+ "column-defs": K,
334
337
  "hide-footer": !0
335
338
  }, null, 8, ["row-data"])
336
339
  ])
@@ -345,7 +348,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
345
348
  t("div", Ft, C(d(a)("report.common.enable")), 1),
346
349
  l(c, {
347
350
  modelValue: e.value.enable,
348
- "onUpdate:modelValue": m[1] || (m[1] = (r) => e.value.enable = r),
351
+ "onUpdate:modelValue": p[1] || (p[1] = (r) => e.value.enable = r),
349
352
  style: { gap: "0px" }
350
353
  }, null, 8, ["modelValue"])
351
354
  ])
@@ -353,10 +356,10 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
353
356
  T.value ? (_(), U("div", Nt, [
354
357
  t("div", It, C(d(a)("report.common.email")), 1),
355
358
  t("div", Ut, [
356
- l(p, {
359
+ l(m, {
357
360
  "model-value": (e.value.emails || []).join(","),
358
361
  placeholder: "Email",
359
- "onUpdate:modelValue": m[2] || (m[2] = (r) => {
362
+ "onUpdate:modelValue": p[2] || (p[2] = (r) => {
360
363
  switch (e.value.name) {
361
364
  case d(he).AutoCount:
362
365
  case d(he).SQL:
@@ -375,7 +378,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
375
378
  l(f, {
376
379
  class: "gap-[0px]",
377
380
  "model-value": d(Se)().hour(((v = e.value.triggerTime) == null ? void 0 : v.hour) ?? 0).minute(((h = e.value.triggerTime) == null ? void 0 : h.minute) ?? 0).format("HH:mm"),
378
- "onUpdate:modelValue": m[3] || (m[3] = (r) => {
381
+ "onUpdate:modelValue": p[3] || (p[3] = (r) => {
379
382
  r && (e.value.triggerTime.hour = Number(r.split(":")[0]), e.value.triggerTime.minute = Number(r.split(":")[1]));
380
383
  })
381
384
  }, null, 8, ["model-value"])
@@ -392,7 +395,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
392
395
  delayDay: { placeholder: d(a)("report.integration.delayDay"), editable: !0 }
393
396
  },
394
397
  rules: [(r) => r > 0 || "Delay days must be greater than 0"],
395
- "onUpdate:modelValue": m[4] || (m[4] = (r) => {
398
+ "onUpdate:modelValue": p[4] || (p[4] = (r) => {
396
399
  e.value.delayDay = r.delayDay;
397
400
  })
398
401
  }, null, 8, ["model-value", "options", "rules"])
@@ -405,7 +408,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
405
408
  class: "w-[24px] flex items-center"
406
409
  }, et = /* @__PURE__ */ J({
407
410
  __name: "MappingDropdown",
408
- props: /* @__PURE__ */ Ve({
411
+ props: /* @__PURE__ */ Ae({
409
412
  removable: {
410
413
  type: Boolean,
411
414
  default: !1
@@ -430,65 +433,65 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
430
433
  modelValue: { required: !0 },
431
434
  modelModifiers: {}
432
435
  }),
433
- emits: /* @__PURE__ */ Ve(["remove"], ["update:modelValue"]),
436
+ emits: /* @__PURE__ */ Ae(["remove"], ["update:modelValue"]),
434
437
  setup(g, { emit: a }) {
435
438
  const e = te(g, "modelValue"), i = g, x = q(
436
439
  () => Object.keys(i.options).map((b) => {
437
- const m = i.options[b];
440
+ const p = i.options[b];
438
441
  return {
439
- placeholder: m.placeholder,
442
+ placeholder: p.placeholder,
440
443
  key: b,
441
- editable: m.editable,
442
- dropdownOptions: m.dropdownOptions
444
+ editable: p.editable,
445
+ dropdownOptions: p.dropdownOptions
443
446
  };
444
447
  })
445
- ), T = (b, m) => {
446
- i.singleValueMode ? e.value = i.type === "number" ? Number(b) : b : m && (e.value = {
448
+ ), T = (b, p) => {
449
+ i.singleValueMode ? e.value = i.type === "number" ? Number(b) : b : p && (e.value = {
447
450
  ...e.value,
448
- [m]: i.type === "number" ? Number(b) : b
451
+ [p]: i.type === "number" ? Number(b) : b
449
452
  });
450
- }, D = (b) => {
451
- var m;
452
- return i.singleValueMode ? i.options.key.placeholder : (m = e.value[b.key]) == null ? void 0 : m.toString();
453
+ }, K = (b) => {
454
+ var p;
455
+ return i.singleValueMode ? i.options.key.placeholder : (p = e.value[b.key]) == null ? void 0 : p.toString();
453
456
  }, F = (b) => i.singleValueMode ? e.value : e.value[b.key], y = a;
454
- return (b, m) => {
455
- const K = V("FmSelect"), $ = V("FmTextField"), u = V("FmTooltip"), c = V("FmIcon");
457
+ return (b, p) => {
458
+ const V = A("FmSelect"), $ = A("FmTextField"), u = A("FmTooltip"), c = A("FmIcon");
456
459
  return _(), U("div", Lt, [
457
460
  t("div", {
458
461
  class: Ie(`${g.removable ? "w-[calc(100%-24px)] flex-row" : "w-[100%] flex-col"} flex items-center gap-[4px]`),
459
462
  style: { alignItems: "start" }
460
463
  }, [
461
- (_(!0), U(ke, null, De(x.value, (p) => (_(), U(ke, {
462
- key: p.key
464
+ (_(!0), U(ke, null, De(x.value, (m) => (_(), U(ke, {
465
+ key: m.key
463
466
  }, [
464
- p.editable ? (_(), U("div", {
467
+ m.editable ? (_(), U("div", {
465
468
  key: 0,
466
469
  class: Ie(g.removable ? "w-[50%]" : "w-[100%]")
467
470
  }, [
468
- p.dropdownOptions ? (_(), j(K, {
471
+ m.dropdownOptions ? (_(), j(V, {
469
472
  key: 0,
470
473
  searchable: "",
471
474
  "search-target": "label",
472
- "model-value": F(p),
473
- placeholder: p.placeholder,
474
- items: p.dropdownOptions,
475
+ "model-value": F(m),
476
+ placeholder: m.placeholder,
477
+ items: m.dropdownOptions,
475
478
  "shift-menu": !0,
476
- "onUpdate:modelValue": (f) => T(f, p.key)
479
+ "onUpdate:modelValue": (f) => T(f, m.key)
477
480
  }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (_(), j($, {
478
481
  key: 1,
479
- "model-value": F(p),
480
- placeholder: p.placeholder,
482
+ "model-value": F(m),
483
+ placeholder: m.placeholder,
481
484
  type: g.type,
482
485
  rules: g.rules,
483
- "onUpdate:modelValue": (f) => T(f, p.key)
486
+ "onUpdate:modelValue": (f) => T(f, m.key)
484
487
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
485
488
  ], 2)) : (_(), j(u, {
486
489
  key: 1,
487
- content: D(p),
490
+ content: K(m),
488
491
  class: "w-[50%]"
489
492
  }, {
490
493
  default: xe(() => [
491
- t("div", Ot, C(D(p)), 1)
494
+ t("div", Ot, C(K(m)), 1)
492
495
  ]),
493
496
  _: 2
494
497
  }, 1032, ["content"]))
@@ -499,7 +502,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
499
502
  class: "cursor-pointer text-fm-color-neutral-gray-400",
500
503
  name: "delete",
501
504
  size: "md",
502
- onClick: m[0] || (m[0] = (p) => y("remove"))
505
+ onClick: p[0] || (p[0] = (m) => y("remove"))
503
506
  })
504
507
  ])) : L("", !0)
505
508
  ]);
@@ -521,7 +524,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
521
524
  emits: ["remove", "update:rows"],
522
525
  setup(g, { emit: a }) {
523
526
  const e = g, i = q(() => e.rows.length > 1 ? Math.min(e.rows.length, e.columnsPerRow) : 1), x = a;
524
- return (T, D) => (_(), U("div", Bt, [
527
+ return (T, K) => (_(), U("div", Bt, [
525
528
  (_(!0), U(ke, null, De(e.rows, (F, y) => (_(), U("div", {
526
529
  key: y,
527
530
  class: "flex flex-col",
@@ -535,8 +538,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
535
538
  "flex flex-row items-center w-full font-medium text-gray-600 mb-2"
536
539
  ])
537
540
  }, [
538
- (_(!0), U(ke, null, De(e.headerItems, (b, m) => (_(), U("div", {
539
- key: `header-item-${m}`,
541
+ (_(!0), U(ke, null, De(e.headerItems, (b, p) => (_(), U("div", {
542
+ key: `header-item-${p}`,
540
543
  class: "w-[50%]"
541
544
  }, [
542
545
  y < i.value ? (_(), U(ke, { key: 0 }, [
@@ -552,8 +555,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
552
555
  "is-take-whole-row": !1,
553
556
  removable: e.removable,
554
557
  "onUpdate:modelValue": (b) => {
555
- const m = [...e.rows];
556
- m[y] = b, x("update:rows", m);
558
+ const p = [...e.rows];
559
+ p[y] = b, x("update:rows", p);
557
560
  },
558
561
  onRemove: () => x("remove", e.mappingType || "", y)
559
562
  }, null, 8, ["model-value", "options", "removable", "onUpdate:modelValue", "onRemove"])) : (_(), j(et, {
@@ -562,8 +565,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
562
565
  options: e.fieldsOptions || {},
563
566
  removable: e.removable,
564
567
  "onUpdate:modelValue": (b) => {
565
- const m = [...e.rows];
566
- m[y] = b, x("update:rows", m);
568
+ const p = [...e.rows];
569
+ p[y] = b, x("update:rows", p);
567
570
  },
568
571
  onRemove: () => x("remove", e.mappingType || "", y)
569
572
  }, null, 8, ["model-value", "options", "removable", "onUpdate:modelValue", "onRemove"]))
@@ -587,7 +590,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
587
590
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
588
591
  }, ko = /* @__PURE__ */ J({
589
592
  __name: "Setting",
590
- props: /* @__PURE__ */ Ve({
593
+ props: /* @__PURE__ */ Ae({
591
594
  tenantOptions: {
592
595
  type: Object,
593
596
  required: !0
@@ -610,9 +613,9 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
610
613
  }),
611
614
  emits: ["update:modelValue"],
612
615
  setup(g) {
613
- const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ae(), T = be(), { promptLoader: D } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = z(!1), m = q(
616
+ const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ve(), T = be(), { promptLoader: K } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = z(!1), p = q(
614
617
  () => y.map((s) => ({ label: s.name, value: s.id }))
615
- ), K = q(() => {
618
+ ), V = q(() => {
616
619
  var s, n;
617
620
  return b.value ? "Connecting" : (n = (s = e.value) == null ? void 0 : s.platform) != null && n.accessToken ? "Disconnect" : "Connect";
618
621
  }), $ = z(0);
@@ -629,13 +632,13 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
629
632
  try {
630
633
  const n = await rt(e.value._id);
631
634
  b.value = !0;
632
- const A = setInterval(async () => {
635
+ const D = setInterval(async () => {
633
636
  var N;
634
637
  $.value += 1;
635
638
  try {
636
639
  await x.getSettings();
637
640
  } finally {
638
- ($.value === 12 || (N = e.value.platform) != null && N.accessToken) && (b.value = !1, A && clearInterval(A), $.value = 0);
641
+ ($.value === 12 || (N = e.value.platform) != null && N.accessToken) && (b.value = !1, D && clearInterval(D), $.value = 0);
639
642
  }
640
643
  }, 5e3);
641
644
  window.open(n.redirect, "_blank");
@@ -649,7 +652,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
649
652
  await F({
650
653
  message: `Confirm delete ${e.value.name}?`,
651
654
  title: "Delete"
652
- }) && await D(async () => {
655
+ }) && await K(async () => {
653
656
  try {
654
657
  await Me(e.value._id), await x.getSettings(), T.back();
655
658
  } catch (n) {
@@ -657,8 +660,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
657
660
  }
658
661
  });
659
662
  }
660
- async function p() {
661
- await D(async () => {
663
+ async function m() {
664
+ await K(async () => {
662
665
  try {
663
666
  await je(e.value._id, e.value), await x.getSettings();
664
667
  } catch (s) {
@@ -667,21 +670,21 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
667
670
  });
668
671
  }
669
672
  function f(s) {
670
- const n = g.tenantOptions.data.find((A) => A.value === s);
673
+ const n = g.tenantOptions.data.find((D) => D.value === s);
671
674
  n && e.value.platform && (e.value.platform.tenant = {
672
675
  id: n.value,
673
676
  name: n.label
674
677
  });
675
678
  }
676
679
  function v(s, n) {
677
- var A, N;
678
- (N = (A = e.value.platform) == null ? void 0 : A.mappings) != null && N[s] && (e.value.platform.mappings[s] = e.value.platform.mappings[s].filter(
680
+ var D, N;
681
+ (N = (D = e.value.platform) == null ? void 0 : D.mappings) != null && N[s] && (e.value.platform.mappings[s] = e.value.platform.mappings[s].filter(
679
682
  (M, Y) => Y !== n
680
683
  ));
681
684
  }
682
685
  function h(s) {
683
- var n, A;
684
- (A = (n = e.value.platform) == null ? void 0 : n.mappings) != null && A[s] && (e.value.platform.mappings[s] = [
686
+ var n, D;
687
+ (D = (n = e.value.platform) == null ? void 0 : n.mappings) != null && D[s] && (e.value.platform.mappings[s] = [
685
688
  ...e.value.platform.mappings[s],
686
689
  s === "items" ? {
687
690
  feedmeKey: "",
@@ -694,7 +697,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
694
697
  ]);
695
698
  }
696
699
  async function r() {
697
- await D(async () => {
700
+ await K(async () => {
698
701
  try {
699
702
  await Ke(e.value._id), await x.getSettings();
700
703
  } catch (s) {
@@ -720,14 +723,14 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
720
723
  await x.getSettings();
721
724
  }), (s, n) => {
722
725
  var ae, le, ne, se, re, ie, de, me, pe, ue, ce, fe, I, R, w, P, S, Q, ye, O, H, Z, Ne, Ye, Xe, We, Je;
723
- const A = V("FmIcon"), N = V("FmButton"), M = V("FmMenuDivider"), Y = V("FmCircularProgress"), E = V("FmSelect"), G = V("FmTextField"), W = V("FmSwitch");
726
+ const D = A("FmIcon"), N = A("FmButton"), M = A("FmMenuDivider"), Y = A("FmCircularProgress"), E = A("FmSelect"), G = A("FmTextField"), W = A("FmSwitch");
724
727
  return (le = (ae = e.value) == null ? void 0 : ae.platform) != null && le.mappings ? (_(), U("div", qt, [
725
728
  t("div", Ht, [
726
729
  t("div", zt, [
727
730
  n[21] || (n[21] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
728
731
  t("div", Qt, [
729
732
  t("div", Gt, [
730
- l(A, {
733
+ l(D, {
731
734
  name: "refresh",
732
735
  class: "p-2 bg-gray-100 rounded-full",
733
736
  onClick: r
@@ -743,7 +746,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
743
746
  variant: "primary",
744
747
  label: d(a)("report.common.update"),
745
748
  "prepend-icon": "update",
746
- onClick: p
749
+ onClick: m
747
750
  }, null, 8, ["label"])
748
751
  ])
749
752
  ])
@@ -757,7 +760,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
757
760
  l(N, {
758
761
  disabled: b.value,
759
762
  variant: "primary",
760
- label: K.value,
763
+ label: V.value,
761
764
  onClick: u
762
765
  }, null, 8, ["disabled", "label"])
763
766
  ]),
@@ -791,7 +794,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
791
794
  modelValue: e.value.platform.locationIds,
792
795
  "onUpdate:modelValue": n[1] || (n[1] = (ee) => e.value.platform.locationIds = ee),
793
796
  multiselect: !0,
794
- items: m.value,
797
+ items: p.value,
795
798
  placeholder: "Select location",
796
799
  class: "flex-grow"
797
800
  }, null, 8, ["modelValue", "items"])
@@ -1019,7 +1022,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1019
1022
  }), Co = { class: "h-full flex flex-col gap-16" }, $o = { class: "flex flex-row gap-2 justify-between items-center" }, So = {
1020
1023
  key: 0,
1021
1024
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
1022
- }, Vo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ao = /* @__PURE__ */ J({
1025
+ }, Ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vo = /* @__PURE__ */ J({
1023
1026
  __name: "Preview",
1024
1027
  props: {
1025
1028
  modelValue: { required: !0 },
@@ -1028,35 +1031,35 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1028
1031
  emits: ["update:modelValue"],
1029
1032
  setup(g) {
1030
1033
  const a = z([]), { t: e } = oe(), i = q(
1031
- () => a.value.reduce((m, K) => {
1032
- const $ = m.length, { invoice: u, payments: c } = K;
1033
- m[$] = {
1034
+ () => a.value.reduce((p, V) => {
1035
+ const $ = p.length, { invoice: u, payments: c } = V;
1036
+ p[$] = {
1034
1037
  date: u.Date,
1035
1038
  contact: u.Contact.ContactID,
1036
1039
  status: u.Status,
1037
1040
  ref: u.Reference
1038
1041
  };
1039
- for (let p = 0; p < Math.max(u.LineItems.length, c.length); p++) {
1040
- const f = $ + p;
1041
- m[f] || (m[f] = {}), u.LineItems[p] && (m[f] = {
1042
- ...m[f],
1043
- itemDescription: u.LineItems[p].Description,
1044
- itemQuantity: u.LineItems[p].Quantity,
1045
- itemUnitAmount: u.LineItems[p].UnitAmount,
1042
+ for (let m = 0; m < Math.max(u.LineItems.length, c.length); m++) {
1043
+ const f = $ + m;
1044
+ p[f] || (p[f] = {}), u.LineItems[m] && (p[f] = {
1045
+ ...p[f],
1046
+ itemDescription: u.LineItems[m].Description,
1047
+ itemQuantity: u.LineItems[m].Quantity,
1048
+ itemUnitAmount: u.LineItems[m].UnitAmount,
1046
1049
  // itemCode: invoice.LineItems[i].ItemCode,
1047
- itemAccount: u.LineItems[p].AccountCode,
1048
- itemTax: u.LineItems[p].TaxAmount,
1049
- itemTaxType: u.LineItems[p].TaxType,
1050
- itemLineAmount: u.LineItems[p].LineAmount,
1051
- itemDiscount: u.LineItems[p].DiscountAmount
1052
- }), c[p] && (m[f] = {
1053
- ...m[f],
1054
- paymentAccount: c[p].Account.Code,
1055
- paymentReference: c[p].Reference,
1056
- paymentAmount: c[p].Amount
1050
+ itemAccount: u.LineItems[m].AccountCode,
1051
+ itemTax: u.LineItems[m].TaxAmount,
1052
+ itemTaxType: u.LineItems[m].TaxType,
1053
+ itemLineAmount: u.LineItems[m].LineAmount,
1054
+ itemDiscount: u.LineItems[m].DiscountAmount
1055
+ }), c[m] && (p[f] = {
1056
+ ...p[f],
1057
+ paymentAccount: c[m].Account.Code,
1058
+ paymentReference: c[m].Reference,
1059
+ paymentAmount: c[m].Amount
1057
1060
  });
1058
1061
  }
1059
- return m;
1062
+ return p;
1060
1063
  }, [])
1061
1064
  ), x = [
1062
1065
  {
@@ -1134,17 +1137,17 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1134
1137
  header: "Payment Amount",
1135
1138
  enableSorting: !1
1136
1139
  }
1137
- ], T = te(g, "modelValue"), D = z(!1), F = _e(), { dateRange: y } = Ee(we());
1140
+ ], T = te(g, "modelValue"), K = z(!1), F = _e(), { dateRange: y } = Ee(we());
1138
1141
  Ce(
1139
1142
  () => y.value,
1140
1143
  async () => {
1141
1144
  if (T.value._id)
1142
1145
  try {
1143
- D.value = !0, a.value = await Le(T.value._id);
1144
- } catch (m) {
1145
- F.open({ message: m.message, type: "error" });
1146
+ K.value = !0, a.value = await Le(T.value._id);
1147
+ } catch (p) {
1148
+ F.open({ message: p.message, type: "error" });
1146
1149
  } finally {
1147
- D.value = !1;
1150
+ K.value = !1;
1148
1151
  }
1149
1152
  },
1150
1153
  {
@@ -1153,32 +1156,32 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1153
1156
  );
1154
1157
  async function b() {
1155
1158
  try {
1156
- T.value._id ? (D.value = !0, await ze(T.value._id), F.open({ message: "Upload successful", type: "success" })) : F.open({ message: "Invalid accounting setting", type: "error" });
1157
- } catch (m) {
1158
- m.message && F.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((K) => F.open({ message: K.Message, type: "error" }));
1159
+ T.value._id ? (K.value = !0, await ze(T.value._id), F.open({ message: "Upload successful", type: "success" })) : F.open({ message: "Invalid accounting setting", type: "error" });
1160
+ } catch (p) {
1161
+ p.message && F.open({ message: p.message, type: "error" }), p.errors && p.errors.forEach((V) => F.open({ message: V.Message, type: "error" }));
1159
1162
  } finally {
1160
- D.value = !1;
1163
+ K.value = !1;
1161
1164
  }
1162
1165
  }
1163
- return (m, K) => {
1164
- const $ = V("FmButton"), u = V("FmCircularProgress"), c = V("FmTable");
1166
+ return (p, V) => {
1167
+ const $ = A("FmButton"), u = A("FmCircularProgress"), c = A("FmTable");
1165
1168
  return _(), U("div", Co, [
1166
1169
  t("div", $o, [
1167
1170
  l(Be, {
1168
1171
  "date-range": d(y),
1169
- "onUpdate:dateRange": K[0] || (K[0] = (p) => Te(y) ? y.value = p : null),
1172
+ "onUpdate:dateRange": V[0] || (V[0] = (m) => Te(y) ? y.value = m : null),
1170
1173
  compare: !1
1171
1174
  }, null, 8, ["date-range"]),
1172
1175
  l($, {
1173
- loading: D.value,
1176
+ loading: K.value,
1174
1177
  variant: "primary",
1175
1178
  label: "Upload",
1176
1179
  onClick: b
1177
1180
  }, null, 8, ["loading"])
1178
1181
  ]),
1179
- D.value ? (_(), U("div", So, [
1182
+ K.value ? (_(), U("div", So, [
1180
1183
  l(u, { size: "xl" }),
1181
- t("span", Vo, C(d(e)("report.common.isLoading")), 1)
1184
+ t("span", Ao, C(d(e)("report.common.isLoading")), 1)
1182
1185
  ])) : i.value.length > 0 ? (_(), j(c, {
1183
1186
  key: 1,
1184
1187
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
@@ -1196,7 +1199,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1196
1199
  },
1197
1200
  emits: ["update:modelValue"],
1198
1201
  setup(g) {
1199
- const { t: a } = oe(), e = te(g, "modelValue"), i = z("setting"), x = z({}), T = z({}), D = z({}), F = [
1202
+ const { t: a } = oe(), e = te(g, "modelValue"), i = z("setting"), x = z({}), T = z({}), K = z({}), F = [
1200
1203
  {
1201
1204
  label: a("report.integration.setting"),
1202
1205
  value: "setting",
@@ -1210,21 +1213,21 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1210
1213
  ], y = be(), b = q(() => {
1211
1214
  switch (i.value) {
1212
1215
  case "preview":
1213
- return { component: Ao };
1216
+ return { component: Vo };
1214
1217
  case "setting":
1215
1218
  return {
1216
1219
  component: ko,
1217
1220
  props: {
1218
1221
  tenantOptions: x.value,
1219
1222
  taxOptions: T.value,
1220
- accountCodeOptions: D.value
1223
+ accountCodeOptions: K.value
1221
1224
  }
1222
1225
  };
1223
1226
  default:
1224
1227
  return null;
1225
1228
  }
1226
1229
  });
1227
- async function m() {
1230
+ async function p() {
1228
1231
  if (e.value._id)
1229
1232
  try {
1230
1233
  const u = await it(e.value._id);
@@ -1238,7 +1241,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1238
1241
  x.value.isLoaded = !0;
1239
1242
  }
1240
1243
  }
1241
- async function K() {
1244
+ async function V() {
1242
1245
  if (e.value._id)
1243
1246
  try {
1244
1247
  const u = await dt(e.value._id);
@@ -1256,14 +1259,14 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1256
1259
  if (e.value._id)
1257
1260
  try {
1258
1261
  const u = await mt(e.value._id);
1259
- D.value.data = u.map((c) => ({
1262
+ K.value.data = u.map((c) => ({
1260
1263
  value: c.Code,
1261
1264
  label: `${c.Code} ${c.Name} - [${c.Class}_${c.Type}]`
1262
1265
  }));
1263
1266
  } catch (u) {
1264
- console.error("Failed to fetch accounts:", u), D.value.isError = !0;
1267
+ console.error("Failed to fetch accounts:", u), K.value.isError = !0;
1265
1268
  } finally {
1266
- D.value.isLoaded = !0;
1269
+ K.value.isLoaded = !0;
1267
1270
  }
1268
1271
  }
1269
1272
  return Ce(
@@ -1272,15 +1275,15 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1272
1275
  return [(u = e.value.platform) == null ? void 0 : u.accessToken, x.value.isLoaded];
1273
1276
  },
1274
1277
  (u) => {
1275
- var c, p;
1276
- u && (m(), (p = (c = e.value.platform) == null ? void 0 : c.tenant) != null && p.id && x.value.isLoaded && (K(), $()));
1278
+ var c, m;
1279
+ u && (p(), (m = (c = e.value.platform) == null ? void 0 : c.tenant) != null && m.id && x.value.isLoaded && (V(), $()));
1277
1280
  },
1278
1281
  { immediate: !0 }
1279
1282
  ), (u, c) => {
1280
1283
  var v, h, r;
1281
- const p = V("FmPageHead"), f = V("FmTabs");
1284
+ const m = A("FmPageHead"), f = A("FmTabs");
1282
1285
  return _(), U("div", Do, [
1283
- l(p, {
1286
+ l(m, {
1284
1287
  title: ((v = e.value) == null ? void 0 : v.name) || "Xero",
1285
1288
  "back-button": !0,
1286
1289
  style: { paddingLeft: "0px", paddingRight: "0px" },
@@ -1380,14 +1383,14 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1380
1383
  }
1381
1384
  ];
1382
1385
  return (x, T) => {
1383
- const D = V("FmIcon"), F = V("FmTable"), y = V("FmSideSheet");
1386
+ const K = A("FmIcon"), F = A("FmTable"), y = A("FmSideSheet");
1384
1387
  return _(), j(y, {
1385
1388
  header: d(a)("report.integration.refNumFormatInfo"),
1386
1389
  "dismiss-away": "",
1387
1390
  "max-width": 780
1388
1391
  }, {
1389
1392
  "side-sheet-button": xe(() => [
1390
- l(D, {
1393
+ l(K, {
1391
1394
  name: "info",
1392
1395
  color: "primary",
1393
1396
  class: "cursor-pointer p-2"
@@ -1418,7 +1421,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1418
1421
  class: "flex flex-col h-full"
1419
1422
  }, Uo = { class: "flex flex-col gap-16 pb-[24px]" }, Ro = { class: "flex flex-row justify-between items-center gap-2" }, Po = { class: "fm-typo-en-title-sm-800" }, Mo = { class: "flex flex-row gap-2 items-center" }, jo = { class: "relative group cursor-pointer" }, Lo = { 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" }, Oo = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Eo = { class: "w-[90%] flex flex-col gap-24" }, Bo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yo = { class: "flex flex-col justify-between" }, qo = { class: "w-[25%] font-semibold" }, Ho = { class: "flex-grow" }, zo = { class: "flex flex-col justify-between" }, Qo = { class: "w-[25%] font-semibold" }, Go = { class: "flex-grow" }, Xo = { class: "flex flex-col gap-16" }, Wo = { class: "fm-typo-en-title-sm-800" }, Jo = { class: "flex flex-col max-w-[100%]" }, Zo = { class: "w-[25%] font-semibold" }, ea = { class: "flex-grow" }, ta = { class: "flex flex-col max-w-[100%]" }, oa = { class: "w-[25%] font-semibold" }, aa = { class: "flex flex-col max-w-[100%]" }, la = { class: "w-[25%] font-semibold" }, na = { class: "flex flex-col max-w-[100%]" }, sa = { class: "flex flex-col gap-16" }, ra = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ia = { class: "flex flex-col gap-16 pt-3 pb-3" }, da = { class: "flex flex-row items-center gap-5" }, ma = { 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 justify-between gap-x-16" }, ca = { class: "fm-typo-en-title-sm-800" }, fa = { class: "flex flex-row items-center justify-between gap-x-16" }, ga = { class: "fm-typo-en-title-sm-800" }, va = { class: "flex flex-row items-center justify-between gap-x-16" }, ya = { class: "fm-typo-en-title-sm-800" }, xa = { class: "flex flex-row items-center justify-between gap-x-16" }, ba = { class: "fm-typo-en-title-sm-800" }, wa = /* @__PURE__ */ J({
1420
1423
  __name: "Setting",
1421
- props: /* @__PURE__ */ Ve({
1424
+ props: /* @__PURE__ */ Ae({
1422
1425
  errorLogs: {}
1423
1426
  }, {
1424
1427
  modelValue: { required: !0 },
@@ -1426,11 +1429,11 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1426
1429
  }),
1427
1430
  emits: ["update:modelValue"],
1428
1431
  setup(g) {
1429
- const a = te(g, "modelValue"), e = _e(), i = Ae(), x = be(), { promptLoader: T } = Pe(), { promptMessage: D } = Oe(), { restaurants: F } = we(), y = q(
1432
+ const a = te(g, "modelValue"), e = _e(), i = Ve(), x = be(), { promptLoader: T } = Pe(), { promptMessage: K } = Oe(), { restaurants: F } = we(), y = q(
1430
1433
  () => F.map((r) => ({ label: r.name, value: r.id }))
1431
1434
  ), { t: b } = oe();
1432
- async function m() {
1433
- await D({
1435
+ async function p() {
1436
+ await K({
1434
1437
  message: b("report.messages.confirmDelete", { name: a.value.name }),
1435
1438
  title: b("report.common.delete")
1436
1439
  }) && await T(async () => {
@@ -1441,7 +1444,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1441
1444
  }
1442
1445
  });
1443
1446
  }
1444
- async function K() {
1447
+ async function V() {
1445
1448
  await T(async () => {
1446
1449
  try {
1447
1450
  await je(a.value._id, a.value), await i.getSettings();
@@ -1451,8 +1454,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1451
1454
  });
1452
1455
  }
1453
1456
  function $(r, o) {
1454
- var A;
1455
- const s = (A = a.value.platform) == null ? void 0 : A.mappings;
1457
+ var D;
1458
+ const s = (D = a.value.platform) == null ? void 0 : D.mappings;
1456
1459
  if (!s) return;
1457
1460
  if (["items", "taxes", "payments", "taxRoundingAdjustments"].includes(r)) {
1458
1461
  const N = r;
@@ -1511,7 +1514,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1511
1514
  label: b("report.integration.grouping.byDaySeparatePayment"),
1512
1515
  value: ve.BY_DAY_SEPARATE_PAYMENT
1513
1516
  }
1514
- ], p = [
1517
+ ], m = [
1515
1518
  {
1516
1519
  label: "NORMAL",
1517
1520
  value: "NORMAL"
@@ -1551,7 +1554,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1551
1554
  await i.getSettings();
1552
1555
  }), (r, o) => {
1553
1556
  var Y, E, G, W, ae, le, ne, se, re, ie, de, me, pe, ue, ce, fe, I, R;
1554
- const s = V("FmIcon"), n = V("FmButton"), A = V("FmMenuDivider"), N = V("FmTextField"), M = V("FmSelect");
1557
+ const s = A("FmIcon"), n = A("FmButton"), D = A("FmMenuDivider"), N = A("FmTextField"), M = A("FmSelect");
1555
1558
  return (E = (Y = a.value) == null ? void 0 : Y.platform) != null && E.mappings ? (_(), U("div", Io, [
1556
1559
  t("div", Uo, [
1557
1560
  t("div", Ro, [
@@ -1568,18 +1571,18 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1568
1571
  l(n, {
1569
1572
  variant: "tertiary",
1570
1573
  label: d(b)("report.common.delete"),
1571
- onClick: m
1574
+ onClick: p
1572
1575
  }, null, 8, ["label"]),
1573
1576
  l(n, {
1574
1577
  variant: "primary",
1575
1578
  label: d(b)("report.common.update"),
1576
1579
  "prepend-icon": "update",
1577
- onClick: K
1580
+ onClick: V
1578
1581
  }, null, 8, ["label"])
1579
1582
  ])
1580
1583
  ])
1581
1584
  ]),
1582
- l(A, { style: { margin: 0 } }),
1585
+ l(D, { style: { margin: 0 } }),
1583
1586
  t("div", Oo, [
1584
1587
  t("div", Eo, [
1585
1588
  t("div", Bo, C(d(b)("report.integration.bukku.authentication")), 1),
@@ -1603,7 +1606,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1603
1606
  }, null, 8, ["modelValue", "placeholder"])
1604
1607
  ])
1605
1608
  ]),
1606
- l(A, { style: { margin: 0 } }),
1609
+ l(D, { style: { margin: 0 } }),
1607
1610
  t("div", Xo, [
1608
1611
  t("div", Wo, C(d(b)("report.integration.general")), 1),
1609
1612
  t("div", Jo, [
@@ -1643,7 +1646,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1643
1646
  modelValue: a.value.platform.mappings.myinvoisAction,
1644
1647
  "onUpdate:modelValue": o[5] || (o[5] = (w) => a.value.platform.mappings.myinvoisAction = w),
1645
1648
  multiselect: !1,
1646
- items: p,
1649
+ items: m,
1647
1650
  placeholder: "Select MyInvois Action",
1648
1651
  class: "flex-grow"
1649
1652
  }, null, 8, ["modelValue"])
@@ -1699,7 +1702,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1699
1702
  }, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
1700
1703
  ])
1701
1704
  ]),
1702
- l(A, { style: { margin: 0 } }),
1705
+ l(D, { style: { margin: 0 } }),
1703
1706
  t("div", ia, [
1704
1707
  t("div", da, [
1705
1708
  t("div", ma, C(d(b)("report.integration.refNumFormat")), 1),
@@ -1740,7 +1743,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1740
1743
  }, null, 8, ["model-value", "options"])
1741
1744
  ])
1742
1745
  ]),
1743
- l(A, { style: { margin: 0 } }),
1746
+ l(D, { style: { margin: 0 } }),
1744
1747
  l(Ue, {
1745
1748
  modelValue: a.value.platform,
1746
1749
  "onUpdate:modelValue": o[12] || (o[12] = (w) => a.value.platform = w),
@@ -1749,7 +1752,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1749
1752
  "error-logs": r.errorLogs,
1750
1753
  "integration-id": a.value._id
1751
1754
  }, null, 8, ["modelValue", "last-upload-date", "error-logs", "integration-id"]),
1752
- l(A, { style: { margin: 0 } }),
1755
+ l(D, { style: { margin: 0 } }),
1753
1756
  t("div", ua, [
1754
1757
  t("div", ca, C(d(b)("report.integration.items")), 1),
1755
1758
  l(n, {
@@ -1775,7 +1778,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1775
1778
  (S = (P = a.value) == null ? void 0 : P.platform) != null && S.mappings && (a.value.platform.mappings.items = w);
1776
1779
  })
1777
1780
  }, null, 8, ["rows"]),
1778
- l(A, { style: { margin: 0 } }),
1781
+ l(D, { style: { margin: 0 } }),
1779
1782
  t("div", fa, [
1780
1783
  t("div", ga, C(d(b)("report.integration.taxes")), 1),
1781
1784
  l(n, {
@@ -1801,7 +1804,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1801
1804
  (S = (P = a.value) == null ? void 0 : P.platform) != null && S.mappings && (a.value.platform.mappings.taxes = w);
1802
1805
  })
1803
1806
  }, null, 8, ["rows"]),
1804
- l(A, { style: { margin: 0 } }),
1807
+ l(D, { style: { margin: 0 } }),
1805
1808
  t("div", va, [
1806
1809
  t("div", ya, C(d(b)("report.integration.taxRoundingAdjustments")), 1),
1807
1810
  l(n, {
@@ -1827,7 +1830,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1827
1830
  (S = (P = a.value) == null ? void 0 : P.platform) != null && S.mappings && (a.value.platform.mappings.taxRoundingAdjustments = w);
1828
1831
  })
1829
1832
  }, null, 8, ["rows"]),
1830
- l(A, { style: { margin: 0 } }),
1833
+ l(D, { style: { margin: 0 } }),
1831
1834
  t("div", xa, [
1832
1835
  t("div", ba, C(d(b)("report.integration.payments")), 1),
1833
1836
  l(n, {
@@ -1871,18 +1874,18 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1871
1874
  emits: ["update:modelValue"],
1872
1875
  setup(g) {
1873
1876
  const a = z([]);
1874
- function e(K) {
1875
- const $ = K.number || "";
1877
+ function e(V) {
1878
+ const $ = V.number || "";
1876
1879
  if (!$) return $;
1877
- const u = new Date(K.date);
1880
+ const u = new Date(V.date);
1878
1881
  if (isNaN(u.getTime())) return $;
1879
- const c = String(u.getFullYear()), p = String(u.getMonth() + 1).padStart(2, "0"), f = String(u.getDate()).padStart(2, "0");
1882
+ const c = String(u.getFullYear()), m = String(u.getMonth() + 1).padStart(2, "0"), f = String(u.getDate()).padStart(2, "0");
1880
1883
  return $.replace(/\[(YYYY|MM|DD)\]/g, (v, h) => {
1881
1884
  switch (h) {
1882
1885
  case "YYYY":
1883
1886
  return c;
1884
1887
  case "MM":
1885
- return p;
1888
+ return m;
1886
1889
  case "DD":
1887
1890
  return f;
1888
1891
  default:
@@ -1891,21 +1894,21 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1891
1894
  });
1892
1895
  }
1893
1896
  const i = q(
1894
- () => a.value.reduce((K, $) => {
1895
- const u = K.length, { invoice: c, payments: p } = $;
1896
- K[u] = {
1897
+ () => a.value.reduce((V, $) => {
1898
+ const u = V.length, { invoice: c, payments: m } = $;
1899
+ V[u] = {
1897
1900
  no: e(c),
1898
1901
  date: c.date,
1899
1902
  contact: c._contact_name,
1900
1903
  status: c.status,
1901
1904
  title: c.title
1902
1905
  };
1903
- for (let f = 0; f < Math.max(c.form_items.length, p.length); f++) {
1906
+ for (let f = 0; f < Math.max(c.form_items.length, m.length); f++) {
1904
1907
  const v = u + f;
1905
- K[v] || (K[v] = {});
1908
+ V[v] || (V[v] = {});
1906
1909
  const h = c.form_items[f];
1907
- h && (K[v] = {
1908
- ...K[v],
1910
+ h && (V[v] = {
1911
+ ...V[v],
1909
1912
  itemDescription: h.description,
1910
1913
  itemQuantity: h.quantity,
1911
1914
  itemUnitPrice: h.unit_price,
@@ -1913,9 +1916,9 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1913
1916
  itemTaxCode: h._tax_code_name,
1914
1917
  itemDiscount: h.discount
1915
1918
  });
1916
- const r = p[f];
1917
- r && (K[v] = {
1918
- ...K[v],
1919
+ const r = m[f];
1920
+ r && (V[v] = {
1921
+ ...V[v],
1919
1922
  paymentNo: r.number,
1920
1923
  paymentMethod: r.deposit_items[0]._payment_method_name,
1921
1924
  paymentAccount: r.deposit_items[0]._account_name,
@@ -1923,7 +1926,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1923
1926
  paymentAmount: r.amount
1924
1927
  });
1925
1928
  }
1926
- return K;
1929
+ return V;
1927
1930
  }, [])
1928
1931
  ), { t: x } = oe(), T = [
1929
1932
  {
@@ -2010,15 +2013,15 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2010
2013
  header: "Payment Amount",
2011
2014
  enableSorting: !1
2012
2015
  }
2013
- ], D = te(g, "modelValue"), F = z(!1), y = _e(), { dateRange: b } = Ee(we());
2016
+ ], K = te(g, "modelValue"), F = z(!1), y = _e(), { dateRange: b } = Ee(we());
2014
2017
  Ce(
2015
2018
  () => b.value,
2016
2019
  async () => {
2017
- if (D.value._id)
2020
+ if (K.value._id)
2018
2021
  try {
2019
- F.value = !0, a.value = await Le(D.value._id);
2020
- } catch (K) {
2021
- y.open({ message: K.message, type: "error" });
2022
+ F.value = !0, a.value = await Le(K.value._id);
2023
+ } catch (V) {
2024
+ y.open({ message: V.message, type: "error" });
2022
2025
  } finally {
2023
2026
  F.value = !1;
2024
2027
  }
@@ -2027,17 +2030,17 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2027
2030
  immediate: !0
2028
2031
  }
2029
2032
  );
2030
- async function m() {
2033
+ async function p() {
2031
2034
  try {
2032
- D.value._id ? (F.value = !0, await ze(D.value._id), y.open({ message: x("report.integration.uploadSuccess"), type: "success" })) : y.open({ message: x("report.integration.error.invalid"), type: "error" });
2033
- } catch (K) {
2034
- y.open({ message: K.message, type: "error" });
2035
+ K.value._id ? (F.value = !0, await ze(K.value._id), y.open({ message: x("report.integration.uploadSuccess"), type: "success" })) : y.open({ message: x("report.integration.error.invalid"), type: "error" });
2036
+ } catch (V) {
2037
+ y.open({ message: V.message, type: "error" });
2035
2038
  } finally {
2036
2039
  F.value = !1;
2037
2040
  }
2038
2041
  }
2039
- return (K, $) => {
2040
- const u = V("FmButton"), c = V("FmCircularProgress"), p = V("FmTable");
2042
+ return (V, $) => {
2043
+ const u = A("FmButton"), c = A("FmCircularProgress"), m = A("FmTable");
2041
2044
  return _(), U("div", _a, [
2042
2045
  t("div", ha, [
2043
2046
  l(Be, {
@@ -2049,13 +2052,13 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2049
2052
  loading: F.value,
2050
2053
  variant: "primary",
2051
2054
  label: d(x)("report.common.upload"),
2052
- onClick: m
2055
+ onClick: p
2053
2056
  }, null, 8, ["loading", "label"])
2054
2057
  ]),
2055
2058
  F.value ? (_(), U("div", ka, [
2056
2059
  l(c, { size: "xl" }),
2057
2060
  t("span", Ca, C(d(x)("report.integration.table.loading")), 1)
2058
- ])) : i.value.length > 0 ? (_(), j(p, {
2061
+ ])) : i.value.length > 0 ? (_(), j(m, {
2059
2062
  key: 1,
2060
2063
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
2061
2064
  "row-data": i.value,
@@ -2064,7 +2067,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2064
2067
  ]);
2065
2068
  };
2066
2069
  }
2067
- }), Sa = { class: "h-full relative flex flex-col" }, Va = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Aa = /* @__PURE__ */ J({
2070
+ }), Sa = { class: "h-full relative flex flex-col" }, Aa = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Va = /* @__PURE__ */ J({
2068
2071
  __name: "Bukku",
2069
2072
  props: {
2070
2073
  modelValue: {},
@@ -2083,7 +2086,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2083
2086
  value: "preview",
2084
2087
  icon: "table"
2085
2088
  }
2086
- ], T = be(), D = q(() => {
2089
+ ], T = be(), K = q(() => {
2087
2090
  switch (i.value) {
2088
2091
  case "preview":
2089
2092
  return $a;
@@ -2094,11 +2097,11 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2094
2097
  }
2095
2098
  });
2096
2099
  return (F, y) => {
2097
- var K;
2098
- const b = V("FmPageHead"), m = V("FmTabs");
2100
+ var V;
2101
+ const b = A("FmPageHead"), p = A("FmTabs");
2099
2102
  return _(), U("div", Sa, [
2100
2103
  l(b, {
2101
- title: ((K = e.value) == null ? void 0 : K.name) || "Bukku",
2104
+ title: ((V = e.value) == null ? void 0 : V.name) || "Bukku",
2102
2105
  "back-button": !0,
2103
2106
  style: { paddingLeft: "0px", paddingRight: "0px" },
2104
2107
  "onClick:back": y[0] || (y[0] = ($) => d(T).push({ name: "integrations" }))
@@ -2108,13 +2111,13 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2108
2111
  ])),
2109
2112
  _: 1
2110
2113
  }, 8, ["title"]),
2111
- l(m, {
2114
+ l(p, {
2112
2115
  "model-value": i.value,
2113
2116
  "onUpdate:modelValue": y[1] || (y[1] = ($) => i.value = $),
2114
2117
  items: x
2115
2118
  }, null, 8, ["model-value"]),
2116
- t("div", Va, [
2117
- (_(), j(Fe(D.value), {
2119
+ t("div", Aa, [
2120
+ (_(), j(Fe(K.value), {
2118
2121
  modelValue: e.value,
2119
2122
  "onUpdate:modelValue": y[2] || (y[2] = ($) => e.value = $)
2120
2123
  }, null, 8, ["modelValue"]))
@@ -2127,7 +2130,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2127
2130
  class: "flex flex-col h-full"
2128
2131
  }, Ka = { class: "flex flex-col gap-16 pb-[24px]" }, Ta = { class: "flex flex-row justify-between items-center gap-2" }, Fa = { class: "flex flex-row gap-2 items-center" }, Na = { class: "relative group cursor-pointer" }, Ia = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Ua = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ra = { class: "w-[90%] flex flex-col gap-24" }, Pa = { class: "flex flex-col gap-16" }, Ma = { class: "fm-typo-en-title-sm-800" }, ja = { class: "flex flex-col max-w-[100%]" }, La = { class: "w-[25%] font-semibold" }, Oa = { class: "flex-grow" }, Ea = { class: "flex flex-col max-w-[100%]" }, Ba = { class: "w-[25%] font-semibold" }, Ya = { class: "flex flex-col max-w-[100%]" }, qa = { class: "w-[25%] font-semibold" }, Ha = { class: "flex flex-col gap-16" }, za = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Qa = { class: "flex flex-col gap-16 pt-3 pb-3" }, Ga = { class: "flex flex-row items-center gap-5" }, Xa = { class: "fm-typo-en-title-sm-800" }, Wa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ja = { class: "flex flex-row items-center justify-between gap-x-16" }, Za = { class: "fm-typo-en-title-sm-800" }, el = { class: "flex flex-row items-center justify-between gap-x-16" }, tl = { class: "fm-typo-en-title-sm-800" }, ol = { class: "flex flex-row items-center justify-between gap-x-16" }, al = { class: "fm-typo-en-title-sm-800" }, ll = { class: "flex flex-row items-center justify-between gap-x-16" }, nl = { class: "fm-typo-en-title-sm-800" }, sl = /* @__PURE__ */ J({
2129
2132
  __name: "Setting",
2130
- props: /* @__PURE__ */ Ve({
2133
+ props: /* @__PURE__ */ Ae({
2131
2134
  errorLogs: {}
2132
2135
  }, {
2133
2136
  modelValue: { required: !0 },
@@ -2135,14 +2138,14 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2135
2138
  }),
2136
2139
  emits: ["update:modelValue"],
2137
2140
  setup(g) {
2138
- const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ae(), T = be(), { promptLoader: D } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
2141
+ const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ve(), T = be(), { promptLoader: K } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
2139
2142
  () => y.map((h) => ({ label: h.name, value: h.id }))
2140
2143
  );
2141
- async function m() {
2144
+ async function p() {
2142
2145
  await F({
2143
2146
  message: a("report.messages.confirmDelete", { name: e.value.name }),
2144
2147
  title: a("report.common.delete")
2145
- }) && await D(async () => {
2148
+ }) && await K(async () => {
2146
2149
  try {
2147
2150
  await Me(e.value._id), await x.getSettings(), T.back();
2148
2151
  } catch (r) {
@@ -2150,8 +2153,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2150
2153
  }
2151
2154
  });
2152
2155
  }
2153
- async function K() {
2154
- await D(async () => {
2156
+ async function V() {
2157
+ await K(async () => {
2155
2158
  try {
2156
2159
  await je(e.value._id, e.value), await x.getSettings();
2157
2160
  } catch (h) {
@@ -2164,8 +2167,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2164
2167
  const o = (n = e.value.platform) == null ? void 0 : n.mappings;
2165
2168
  if (!o) return;
2166
2169
  if (["items", "taxes", "payments", "taxRoundingAdjustments"].includes(h)) {
2167
- const A = h;
2168
- o[A] && Array.isArray(o[A]) && (o[A] = o[A].filter(
2170
+ const D = h;
2171
+ o[D] && Array.isArray(o[D]) && (o[D] = o[D].filter(
2169
2172
  (N, M) => M !== r
2170
2173
  ));
2171
2174
  }
@@ -2198,7 +2201,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2198
2201
  value: ve.BY_DAY_CATEGORY
2199
2202
  }
2200
2203
  ];
2201
- function p({
2204
+ function m({
2202
2205
  key: h,
2203
2206
  value: r
2204
2207
  }) {
@@ -2212,7 +2215,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2212
2215
  };
2213
2216
  }
2214
2217
  async function v() {
2215
- await D(async () => {
2218
+ await K(async () => {
2216
2219
  try {
2217
2220
  await Ke(e.value._id), await x.getSettings();
2218
2221
  } catch (h) {
@@ -2224,7 +2227,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2224
2227
  await x.getSettings();
2225
2228
  }), (h, r) => {
2226
2229
  var M, Y, E, G, W, ae, le, ne, se, re, ie, de, me, pe, ue, ce, fe;
2227
- const o = V("FmIcon"), s = V("FmButton"), n = V("FmMenuDivider"), A = V("FmTextField"), N = V("FmSelect");
2230
+ const o = A("FmIcon"), s = A("FmButton"), n = A("FmMenuDivider"), D = A("FmTextField"), N = A("FmSelect");
2228
2231
  return (Y = (M = e.value) == null ? void 0 : M.platform) != null && Y.mappings ? (_(), U("div", Da, [
2229
2232
  t("div", Ka, [
2230
2233
  t("div", Ta, [
@@ -2241,13 +2244,13 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2241
2244
  l(s, {
2242
2245
  variant: "tertiary",
2243
2246
  label: d(a)("report.common.remove"),
2244
- onClick: m
2247
+ onClick: p
2245
2248
  }, null, 8, ["label"]),
2246
2249
  l(s, {
2247
2250
  variant: "primary",
2248
2251
  label: d(a)("report.common.update"),
2249
2252
  "prepend-icon": "update",
2250
- onClick: K
2253
+ onClick: V
2251
2254
  }, null, 8, ["label"])
2252
2255
  ])
2253
2256
  ])
@@ -2260,7 +2263,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2260
2263
  t("div", ja, [
2261
2264
  t("div", La, C(d(a)("report.common.name")), 1),
2262
2265
  t("div", Oa, [
2263
- l(A, {
2266
+ l(D, {
2264
2267
  modelValue: e.value.name,
2265
2268
  "onUpdate:modelValue": r[0] || (r[0] = (I) => e.value.name = I)
2266
2269
  }, null, 8, ["modelValue"])
@@ -2295,12 +2298,12 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2295
2298
  l(B, {
2296
2299
  "model-value": { key: "Project", account: e.value.platform.mappings.project },
2297
2300
  options: f("Project"),
2298
- "onUpdate:modelValue": r[3] || (r[3] = (I) => p({ key: "project", value: I.account }))
2301
+ "onUpdate:modelValue": r[3] || (r[3] = (I) => m({ key: "project", value: I.account }))
2299
2302
  }, null, 8, ["model-value", "options"]),
2300
2303
  l(B, {
2301
2304
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
2302
2305
  options: f("Debtor"),
2303
- "onUpdate:modelValue": r[4] || (r[4] = (I) => p({ key: "debtor", value: I.account }))
2306
+ "onUpdate:modelValue": r[4] || (r[4] = (I) => m({ key: "debtor", value: I.account }))
2304
2307
  }, null, 8, ["model-value", "options"]),
2305
2308
  l(B, {
2306
2309
  "model-value": {
@@ -2337,7 +2340,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2337
2340
  account: e.value.platform.mappings.invoiceDocNo
2338
2341
  },
2339
2342
  options: f("Invoice no"),
2340
- "onUpdate:modelValue": r[6] || (r[6] = (I) => p({ key: "invoiceDocNo", value: I.account }))
2343
+ "onUpdate:modelValue": r[6] || (r[6] = (I) => m({ key: "invoiceDocNo", value: I.account }))
2341
2344
  }, null, 8, ["model-value", "options"]),
2342
2345
  l(B, {
2343
2346
  "model-value": {
@@ -2345,7 +2348,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2345
2348
  account: e.value.platform.mappings.creditNoteDocNo
2346
2349
  },
2347
2350
  options: f("Credit note no"),
2348
- "onUpdate:modelValue": r[7] || (r[7] = (I) => p({ key: "creditNoteDocNo", value: I.account }))
2351
+ "onUpdate:modelValue": r[7] || (r[7] = (I) => m({ key: "creditNoteDocNo", value: I.account }))
2349
2352
  }, null, 8, ["model-value", "options"]),
2350
2353
  l(B, {
2351
2354
  "model-value": {
@@ -2353,7 +2356,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2353
2356
  account: e.value.platform.mappings.paymentDocNo
2354
2357
  },
2355
2358
  options: f("Payment no"),
2356
- "onUpdate:modelValue": r[8] || (r[8] = (I) => p({ key: "paymentDocNo", value: I.account }))
2359
+ "onUpdate:modelValue": r[8] || (r[8] = (I) => m({ key: "paymentDocNo", value: I.account }))
2357
2360
  }, null, 8, ["model-value", "options"]),
2358
2361
  l(B, {
2359
2362
  "model-value": {
@@ -2361,7 +2364,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2361
2364
  account: e.value.platform.mappings.refundDocNo
2362
2365
  },
2363
2366
  options: f("Refund no"),
2364
- "onUpdate:modelValue": r[9] || (r[9] = (I) => p({ key: "refundDocNo", value: I.account }))
2367
+ "onUpdate:modelValue": r[9] || (r[9] = (I) => m({ key: "refundDocNo", value: I.account }))
2365
2368
  }, null, 8, ["model-value", "options"])
2366
2369
  ])
2367
2370
  ]),
@@ -2494,33 +2497,33 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2494
2497
  emits: ["update:modelValue"],
2495
2498
  setup(g) {
2496
2499
  const { t: a } = oe(), e = z([]), i = q(
2497
- () => e.value.reduce((m, K) => {
2498
- const $ = m.length, { invoice: u, payments: c } = K;
2499
- m[$] = {
2500
+ () => e.value.reduce((p, V) => {
2501
+ const $ = p.length, { invoice: u, payments: c } = V;
2502
+ p[$] = {
2500
2503
  date: u.DocDate,
2501
2504
  docNo: u.DocNo,
2502
2505
  projNo: u.ProjNo,
2503
2506
  debtor: u.DebtorCode,
2504
2507
  description: u.Description
2505
2508
  };
2506
- for (let p = 0; p < Math.max(u._items.length, c.length); p++) {
2507
- const f = $ + p;
2508
- m[f] || (m[f] = {}), u._items[p] && (m[f] = {
2509
- ...m[f],
2510
- itemDescription: u._items[p].DetailDescription,
2511
- itemUnitPrice: u._items[p].Amount,
2512
- itemAccount: u._items[p].AccNo,
2513
- itemTaxCode: u._items[p].TaxType,
2514
- itemTax: u._items[p].Tax
2515
- }), c[p] && (m[f] = {
2516
- ...m[f],
2517
- paymentDocNo: c[p].DocNo,
2518
- paymentMethod: c[p].paymentMethod,
2519
- paymentDescription: c[p].Description,
2520
- paymentAmount: c[p].PaymentAmt
2509
+ for (let m = 0; m < Math.max(u._items.length, c.length); m++) {
2510
+ const f = $ + m;
2511
+ p[f] || (p[f] = {}), u._items[m] && (p[f] = {
2512
+ ...p[f],
2513
+ itemDescription: u._items[m].DetailDescription,
2514
+ itemUnitPrice: u._items[m].Amount,
2515
+ itemAccount: u._items[m].AccNo,
2516
+ itemTaxCode: u._items[m].TaxType,
2517
+ itemTax: u._items[m].Tax
2518
+ }), c[m] && (p[f] = {
2519
+ ...p[f],
2520
+ paymentDocNo: c[m].DocNo,
2521
+ paymentMethod: c[m].paymentMethod,
2522
+ paymentDescription: c[m].Description,
2523
+ paymentAmount: c[m].PaymentAmt
2521
2524
  });
2522
2525
  }
2523
- return m;
2526
+ return p;
2524
2527
  }, [])
2525
2528
  ), x = [
2526
2529
  {
@@ -2593,17 +2596,17 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2593
2596
  header: "Payment Amount",
2594
2597
  enableSorting: !1
2595
2598
  }
2596
- ], T = te(g, "modelValue"), D = z(!1), F = _e(), { dateRange: y } = Ee(we());
2599
+ ], T = te(g, "modelValue"), K = z(!1), F = _e(), { dateRange: y } = Ee(we());
2597
2600
  Ce(
2598
2601
  () => y.value,
2599
2602
  async () => {
2600
2603
  if (T.value._id)
2601
2604
  try {
2602
- D.value = !0, e.value = await Le(T.value._id);
2603
- } catch (m) {
2604
- F.open({ message: m.message, type: "error" });
2605
+ K.value = !0, e.value = await Le(T.value._id);
2606
+ } catch (p) {
2607
+ F.open({ message: p.message, type: "error" });
2605
2608
  } finally {
2606
- D.value = !1;
2609
+ K.value = !1;
2607
2610
  }
2608
2611
  },
2609
2612
  {
@@ -2612,30 +2615,30 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2612
2615
  );
2613
2616
  async function b() {
2614
2617
  try {
2615
- T.value._id ? (D.value = !0, await qe(T.value._id)) : F.open({ message: "Invalid accounting setting", type: "error" });
2616
- } catch (m) {
2617
- F.open({ message: m.message, type: "error" });
2618
+ T.value._id ? (K.value = !0, await qe(T.value._id)) : F.open({ message: "Invalid accounting setting", type: "error" });
2619
+ } catch (p) {
2620
+ F.open({ message: p.message, type: "error" });
2618
2621
  } finally {
2619
- D.value = !1;
2622
+ K.value = !1;
2620
2623
  }
2621
2624
  }
2622
- return (m, K) => {
2623
- const $ = V("FmButton"), u = V("FmCircularProgress"), c = V("FmTable");
2625
+ return (p, V) => {
2626
+ const $ = A("FmButton"), u = A("FmCircularProgress"), c = A("FmTable");
2624
2627
  return _(), U("div", rl, [
2625
2628
  t("div", il, [
2626
2629
  l(Be, {
2627
2630
  "date-range": d(y),
2628
- "onUpdate:dateRange": K[0] || (K[0] = (p) => Te(y) ? y.value = p : null),
2631
+ "onUpdate:dateRange": V[0] || (V[0] = (m) => Te(y) ? y.value = m : null),
2629
2632
  compare: !1
2630
2633
  }, null, 8, ["date-range"]),
2631
2634
  l($, {
2632
- loading: D.value,
2635
+ loading: K.value,
2633
2636
  variant: "primary",
2634
2637
  label: d(a)("report.common.download"),
2635
2638
  onClick: b
2636
2639
  }, null, 8, ["loading", "label"])
2637
2640
  ]),
2638
- D.value ? (_(), U("div", dl, [
2641
+ K.value ? (_(), U("div", dl, [
2639
2642
  l(u, { size: "xl" }),
2640
2643
  t("span", ml, C(d(a)("report.common.isLoading")), 1)
2641
2644
  ])) : i.value.length > 0 ? (_(), j(c, {
@@ -2666,7 +2669,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2666
2669
  value: "preview",
2667
2670
  icon: "table"
2668
2671
  }
2669
- ], T = be(), D = q(() => {
2672
+ ], T = be(), K = q(() => {
2670
2673
  switch (i.value) {
2671
2674
  case "preview":
2672
2675
  return pl;
@@ -2677,11 +2680,11 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2677
2680
  }
2678
2681
  });
2679
2682
  return (F, y) => {
2680
- var K;
2681
- const b = V("FmPageHead"), m = V("FmTabs");
2683
+ var V;
2684
+ const b = A("FmPageHead"), p = A("FmTabs");
2682
2685
  return _(), U("div", ul, [
2683
2686
  l(b, {
2684
- title: ((K = e.value) == null ? void 0 : K.name) || "AutoCount",
2687
+ title: ((V = e.value) == null ? void 0 : V.name) || "AutoCount",
2685
2688
  "back-button": !0,
2686
2689
  style: { paddingLeft: "0px", paddingRight: "0px" },
2687
2690
  "onClick:back": y[0] || (y[0] = ($) => d(T).push({ name: "integrations" }))
@@ -2691,13 +2694,13 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2691
2694
  ])),
2692
2695
  _: 1
2693
2696
  }, 8, ["title"]),
2694
- l(m, {
2697
+ l(p, {
2695
2698
  "model-value": i.value,
2696
2699
  "onUpdate:modelValue": y[1] || (y[1] = ($) => i.value = $),
2697
2700
  items: x
2698
2701
  }, null, 8, ["model-value"]),
2699
2702
  t("div", cl, [
2700
- (_(), j(Fe(D.value), {
2703
+ (_(), j(Fe(K.value), {
2701
2704
  modelValue: e.value,
2702
2705
  "onUpdate:modelValue": y[2] || (y[2] = ($) => e.value = $)
2703
2706
  }, null, 8, ["modelValue"]))
@@ -2708,7 +2711,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2708
2711
  }), gl = {
2709
2712
  key: 0,
2710
2713
  class: "flex flex-col h-full"
2711
- }, vl = { class: "flex flex-col gap-16 pb-[24px]" }, yl = { class: "flex flex-row justify-between items-center gap-2" }, xl = { class: "flex flex-row gap-2 items-center" }, bl = { class: "relative group cursor-pointer" }, wl = { 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-scroll" }, hl = { class: "w-[90%] flex flex-col gap-24" }, kl = { class: "flex flex-col gap-16" }, Cl = { class: "fm-typo-en-title-sm-800" }, $l = { class: "flex flex-col max-w-[100%]" }, Sl = { class: "w-[25%] font-semibold" }, Vl = { class: "flex-grow" }, Al = { class: "flex flex-col max-w-[100%]" }, Dl = { class: "w-[25%] font-semibold" }, Kl = { class: "flex flex-col max-w-[100%]" }, Tl = { class: "w-[25%] font-semibold" }, Fl = { class: "flex flex-col gap-16" }, Nl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Il = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ul = { class: "flex flex-col gap-16 pt-3 pb-3" }, Rl = { class: "flex flex-row items-center gap-5" }, Pl = { class: "fm-typo-en-title-sm-800" }, Ml = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, jl = { class: "flex flex-row items-center justify-between gap-x-16" }, Ll = { class: "fm-typo-en-title-sm-800" }, Ol = { class: "flex flex-row items-center justify-between gap-x-16" }, El = { class: "fm-typo-en-title-sm-800" }, Bl = { class: "flex flex-row items-center justify-between gap-x-16" }, Yl = { class: "fm-typo-en-title-sm-800" }, ql = { class: "flex flex-row items-center justify-between gap-x-16" }, Hl = { class: "fm-typo-en-title-sm-800" }, zl = { class: "flex flex-row items-center justify-between gap-x-16" }, Ql = { class: "flex flex-row items-center justify-between gap-x-16" }, Gl = /* @__PURE__ */ J({
2714
+ }, vl = { class: "flex flex-col gap-16 pb-[24px]" }, yl = { class: "flex flex-row justify-between items-center gap-2" }, xl = { class: "flex flex-row gap-2 items-center" }, bl = { class: "relative group cursor-pointer" }, wl = { 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-scroll" }, hl = { class: "w-[90%] flex flex-col gap-24" }, kl = { class: "flex flex-col gap-16" }, Cl = { class: "fm-typo-en-title-sm-800" }, $l = { class: "flex flex-col max-w-[100%]" }, Sl = { class: "w-[25%] font-semibold" }, Al = { class: "flex-grow" }, Vl = { class: "flex flex-col max-w-[100%]" }, Dl = { class: "w-[25%] font-semibold" }, Kl = { class: "flex flex-col max-w-[100%]" }, Tl = { class: "w-[25%] font-semibold" }, Fl = { class: "flex flex-col gap-16" }, Nl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Il = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ul = { class: "flex flex-col gap-16 pt-3 pb-3" }, Rl = { class: "flex flex-row items-center gap-5" }, Pl = { class: "fm-typo-en-title-sm-800" }, Ml = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, jl = { class: "flex flex-row items-center justify-between gap-x-16" }, Ll = { class: "fm-typo-en-title-sm-800" }, Ol = { class: "flex flex-row items-center justify-between gap-x-16" }, El = { class: "fm-typo-en-title-sm-800" }, Bl = { class: "flex flex-row items-center justify-between gap-x-16" }, Yl = { class: "fm-typo-en-title-sm-800" }, ql = { class: "flex flex-row items-center justify-between gap-x-16" }, Hl = { class: "fm-typo-en-title-sm-800" }, zl = { class: "flex flex-row items-center justify-between gap-x-16" }, Ql = { class: "flex flex-row items-center justify-between gap-x-16" }, Gl = /* @__PURE__ */ J({
2712
2715
  __name: "Setting",
2713
2716
  props: {
2714
2717
  modelValue: { required: !0 },
@@ -2716,14 +2719,14 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2716
2719
  },
2717
2720
  emits: ["update:modelValue"],
2718
2721
  setup(g) {
2719
- const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ae(), T = be(), { promptLoader: D } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
2722
+ const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ve(), T = be(), { promptLoader: K } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
2720
2723
  () => y.map((r) => ({ label: r.name, value: r.id }))
2721
2724
  );
2722
- async function m() {
2725
+ async function p() {
2723
2726
  await F({
2724
2727
  message: a("report.messages.confirmDelete", { name: e.value.name }),
2725
2728
  title: a("report.common.delete")
2726
- }) && await D(async () => {
2729
+ }) && await K(async () => {
2727
2730
  try {
2728
2731
  await Me(e.value._id), await x.getSettings(), T.back();
2729
2732
  } catch (o) {
@@ -2731,8 +2734,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2731
2734
  }
2732
2735
  });
2733
2736
  }
2734
- async function K() {
2735
- await D(async () => {
2737
+ async function V() {
2738
+ await K(async () => {
2736
2739
  try {
2737
2740
  await je(e.value._id, e.value), await Ke(e.value._id), await x.getSettings();
2738
2741
  } catch (r) {
@@ -2773,14 +2776,14 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2773
2776
  var s, n;
2774
2777
  (n = (s = e.value) == null ? void 0 : s.platform) != null && n.mappings && (e.value.platform.mappings[r] = o);
2775
2778
  }
2776
- function p(r) {
2779
+ function m(r) {
2777
2780
  return {
2778
2781
  key: { placeholder: r, editable: !1 },
2779
2782
  account: { placeholder: r, editable: !0 }
2780
2783
  };
2781
2784
  }
2782
2785
  async function f() {
2783
- await D(async () => {
2786
+ await K(async () => {
2784
2787
  try {
2785
2788
  await Ke(e.value._id), await x.getSettings();
2786
2789
  } catch (r) {
@@ -2817,7 +2820,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2817
2820
  await x.getSettings();
2818
2821
  }), (r, o) => {
2819
2822
  var Y, E, G, W, ae, le, ne, se, re, ie, de, me, pe, ue, ce, fe, I, R, w, P, S, Q, ye;
2820
- const s = V("FmIcon"), n = V("FmButton"), A = V("FmMenuDivider"), N = V("FmTextField"), M = V("FmSelect");
2823
+ const s = A("FmIcon"), n = A("FmButton"), D = A("FmMenuDivider"), N = A("FmTextField"), M = A("FmSelect");
2821
2824
  return (E = (Y = e.value) == null ? void 0 : Y.platform) != null && E.mappings ? (_(), U("div", gl, [
2822
2825
  t("div", vl, [
2823
2826
  t("div", yl, [
@@ -2834,32 +2837,32 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2834
2837
  l(n, {
2835
2838
  variant: "tertiary",
2836
2839
  label: d(a)("report.common.delete"),
2837
- onClick: m
2840
+ onClick: p
2838
2841
  }, null, 8, ["label"]),
2839
2842
  l(n, {
2840
2843
  variant: "primary",
2841
2844
  label: d(a)("report.common.update"),
2842
2845
  "prepend-icon": "update",
2843
- onClick: K
2846
+ onClick: V
2844
2847
  }, null, 8, ["label"])
2845
2848
  ])
2846
2849
  ])
2847
2850
  ]),
2848
- l(A, { style: { margin: 0 } }),
2851
+ l(D, { style: { margin: 0 } }),
2849
2852
  t("div", _l, [
2850
2853
  t("div", hl, [
2851
2854
  t("div", kl, [
2852
2855
  t("div", Cl, C(d(a)("report.integration.general")), 1),
2853
2856
  t("div", $l, [
2854
2857
  t("div", Sl, C(d(a)("report.common.name")), 1),
2855
- t("div", Vl, [
2858
+ t("div", Al, [
2856
2859
  l(N, {
2857
2860
  modelValue: e.value.name,
2858
2861
  "onUpdate:modelValue": o[0] || (o[0] = (O) => e.value.name = O)
2859
2862
  }, null, 8, ["modelValue"])
2860
2863
  ])
2861
2864
  ]),
2862
- t("div", Al, [
2865
+ t("div", Vl, [
2863
2866
  t("div", Dl, C(d(a)("report.integration.location")), 1),
2864
2867
  l(M, {
2865
2868
  modelValue: e.value.platform.locationIds,
@@ -2887,7 +2890,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2887
2890
  t("div", Nl, [
2888
2891
  l(B, {
2889
2892
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
2890
- options: p("Debtor"),
2893
+ options: m("Debtor"),
2891
2894
  "onUpdate:modelValue": o[3] || (o[3] = (O) => c({ key: "debtor", value: O.account }))
2892
2895
  }, null, 8, ["model-value", "options"]),
2893
2896
  l(B, {
@@ -2895,7 +2898,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2895
2898
  key: "Project header",
2896
2899
  account: e.value.platform.mappings.projectHeader
2897
2900
  },
2898
- options: p("Project header"),
2901
+ options: m("Project header"),
2899
2902
  "onUpdate:modelValue": o[4] || (o[4] = (O) => c({ key: "projectHeader", value: O.account }))
2900
2903
  }, null, 8, ["model-value", "options"]),
2901
2904
  l(B, {
@@ -2903,7 +2906,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2903
2906
  key: "Project detail",
2904
2907
  account: e.value.platform.mappings.projectDetail
2905
2908
  },
2906
- options: p("Project detail"),
2909
+ options: m("Project detail"),
2907
2910
  "onUpdate:modelValue": o[5] || (o[5] = (O) => c({ key: "projectDetail", value: O.account }))
2908
2911
  }, null, 8, ["model-value", "options"]),
2909
2912
  l(B, {
@@ -2911,7 +2914,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2911
2914
  key: "Custom attribute tag",
2912
2915
  account: e.value.platform.mappings.customAttribute
2913
2916
  },
2914
- options: p("Custom attribute tag"),
2917
+ options: m("Custom attribute tag"),
2915
2918
  "onUpdate:modelValue": o[6] || (o[6] = (O) => c({ key: "customAttribute", value: O.account }))
2916
2919
  }, null, 8, ["model-value", "options"])
2917
2920
  ]),
@@ -2944,7 +2947,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2944
2947
  }, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
2945
2948
  ])
2946
2949
  ]),
2947
- l(A, { style: { margin: 0 } }),
2950
+ l(D, { style: { margin: 0 } }),
2948
2951
  t("div", Ul, [
2949
2952
  t("div", Rl, [
2950
2953
  t("div", Pl, C(d(a)("report.integration.refNumFormat")), 1),
@@ -2956,7 +2959,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2956
2959
  key: "Invoice no",
2957
2960
  account: e.value.platform.mappings.invoiceDocNo
2958
2961
  },
2959
- options: p("Invoice no"),
2962
+ options: m("Invoice no"),
2960
2963
  "onUpdate:modelValue": o[8] || (o[8] = (O) => c({ key: "invoiceDocNo", value: O.account }))
2961
2964
  }, null, 8, ["model-value", "options"]),
2962
2965
  l(B, {
@@ -2964,7 +2967,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2964
2967
  key: "Credit note no",
2965
2968
  account: e.value.platform.mappings.creditNoteDocNo
2966
2969
  },
2967
- options: p("Credit note no"),
2970
+ options: m("Credit note no"),
2968
2971
  "onUpdate:modelValue": o[9] || (o[9] = (O) => c({ key: "creditNoteDocNo", value: O.account }))
2969
2972
  }, null, 8, ["model-value", "options"]),
2970
2973
  l(B, {
@@ -2972,7 +2975,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2972
2975
  key: "Payment no",
2973
2976
  account: e.value.platform.mappings.paymentDocNo
2974
2977
  },
2975
- options: p("Payment no"),
2978
+ options: m("Payment no"),
2976
2979
  "onUpdate:modelValue": o[10] || (o[10] = (O) => c({ key: "paymentDocNo", value: O.account }))
2977
2980
  }, null, 8, ["model-value", "options"]),
2978
2981
  l(B, {
@@ -2980,19 +2983,19 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2980
2983
  key: "Refund no",
2981
2984
  account: e.value.platform.mappings.refundDocNo
2982
2985
  },
2983
- options: p("Refund no"),
2986
+ options: m("Refund no"),
2984
2987
  "onUpdate:modelValue": o[11] || (o[11] = (O) => c({ key: "refundDocNo", value: O.account }))
2985
2988
  }, null, 8, ["model-value", "options"])
2986
2989
  ])
2987
2990
  ]),
2988
- l(A, { style: { margin: 0 } }),
2991
+ l(D, { style: { margin: 0 } }),
2989
2992
  l(Ue, {
2990
2993
  modelValue: e.value.platform,
2991
2994
  "onUpdate:modelValue": o[12] || (o[12] = (O) => e.value.platform = O),
2992
2995
  label: "email",
2993
2996
  "integration-id": e.value._id
2994
2997
  }, null, 8, ["modelValue", "integration-id"]),
2995
- l(A, { style: { margin: 0 } }),
2998
+ l(D, { style: { margin: 0 } }),
2996
2999
  t("div", jl, [
2997
3000
  t("div", Ll, C(d(a)("report.integration.items")), 1),
2998
3001
  l(n, {
@@ -3019,7 +3022,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3019
3022
  (Z = (H = e.value) == null ? void 0 : H.platform) != null && Z.mappings && (e.value.platform.mappings.items = O);
3020
3023
  })
3021
3024
  }, null, 8, ["rows"]),
3022
- l(A, { style: { margin: 0 } }),
3025
+ l(D, { style: { margin: 0 } }),
3023
3026
  t("div", Ol, [
3024
3027
  t("div", El, C(d(a)("report.integration.taxes")), 1),
3025
3028
  l(n, {
@@ -3045,7 +3048,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3045
3048
  (Z = (H = e.value) == null ? void 0 : H.platform) != null && Z.mappings && (e.value.platform.mappings.taxes = O);
3046
3049
  })
3047
3050
  }, null, 8, ["rows"]),
3048
- l(A, { style: { margin: 0 } }),
3051
+ l(D, { style: { margin: 0 } }),
3049
3052
  t("div", Bl, [
3050
3053
  t("div", Yl, C(d(a)("report.integration.taxRoundingAdjustments")), 1),
3051
3054
  l(n, {
@@ -3071,7 +3074,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3071
3074
  (Z = (H = e.value) == null ? void 0 : H.platform) != null && Z.mappings && (e.value.platform.mappings.taxRoundingAdjustments = O);
3072
3075
  })
3073
3076
  }, null, 8, ["rows"]),
3074
- l(A, { style: { margin: 0 } }),
3077
+ l(D, { style: { margin: 0 } }),
3075
3078
  t("div", ql, [
3076
3079
  t("div", Hl, C(d(a)("report.integration.payments")), 1),
3077
3080
  l(n, {
@@ -3097,7 +3100,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3097
3100
  (Z = (H = e.value) == null ? void 0 : H.platform) != null && Z.mappings && (e.value.platform.mappings.payments = O);
3098
3101
  })
3099
3102
  }, null, 8, ["rows"]),
3100
- l(A, { style: { margin: 0 } }),
3103
+ l(D, { style: { margin: 0 } }),
3101
3104
  v.value ? (_(), U(ke, { key: 0 }, [
3102
3105
  t("div", zl, [
3103
3106
  o[32] || (o[32] = t("div", { class: "fm-typo-en-title-sm-800" }, "Inventory Items", -1)),
@@ -3136,7 +3139,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3136
3139
  (Z = (H = e.value) == null ? void 0 : H.platform) != null && Z.inventoryMappings && (e.value.platform.inventoryMappings.items = O);
3137
3140
  })
3138
3141
  }, null, 8, ["rows"]),
3139
- l(A, { style: { margin: 0 } }),
3142
+ l(D, { style: { margin: 0 } }),
3140
3143
  t("div", Ql, [
3141
3144
  o[33] || (o[33] = t("div", { class: "fm-typo-en-title-sm-800" }, "Supplier", -1)),
3142
3145
  l(n, {
@@ -3189,9 +3192,9 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3189
3192
  invoices: [],
3190
3193
  deliveryOrders: []
3191
3194
  }), i = q(
3192
- () => e.value.invoices.reduce((p, f) => {
3193
- const v = p.length, { invoice: h, payments: r } = f;
3194
- p[v] = {
3195
+ () => e.value.invoices.reduce((m, f) => {
3196
+ const v = m.length, { invoice: h, payments: r } = f;
3197
+ m[v] = {
3195
3198
  date: h.DocDate,
3196
3199
  docNo: h.DocNo,
3197
3200
  debtor: h.Code,
@@ -3199,15 +3202,15 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3199
3202
  };
3200
3203
  for (let o = 0; o < Math.max(h._items.length, r.length); o++) {
3201
3204
  const s = v + o;
3202
- p[s] || (p[s] = {}), h._items[o] && (p[s] = {
3203
- ...p[s],
3205
+ m[s] || (m[s] = {}), h._items[o] && (m[s] = {
3206
+ ...m[s],
3204
3207
  itemDescription: h._items[o].Description_DTL,
3205
3208
  itemUnitPrice: h._items[o].UnitPrice,
3206
3209
  itemAccount: h._items[o].ACCOUNT,
3207
3210
  itemTaxCode: h._items[o].Tax,
3208
3211
  itemTax: h._items[o].TaxAmt
3209
- }), r[o] && (p[s] = {
3210
- ...p[s],
3212
+ }), r[o] && (m[s] = {
3213
+ ...m[s],
3211
3214
  paymentDocNo: r[o].DOCNO_Header,
3212
3215
  paymentMethod: r[o].PAYMENTMETHOD,
3213
3216
  paymentAccount: r[o].CODE,
@@ -3215,7 +3218,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3215
3218
  paymentAmount: r[o].KOAMT
3216
3219
  });
3217
3220
  }
3218
- return p;
3221
+ return m;
3219
3222
  }, [])
3220
3223
  ), x = [
3221
3224
  {
@@ -3284,9 +3287,9 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3284
3287
  enableSorting: !1
3285
3288
  }
3286
3289
  ], T = q(
3287
- () => e.value.deliveryOrders.reduce((p, f) => {
3288
- const v = p.length, { _items: h } = f;
3289
- p[v] = {
3290
+ () => e.value.deliveryOrders.reduce((m, f) => {
3291
+ const v = m.length, { _items: h } = f;
3292
+ m[v] = {
3290
3293
  date: f.DocDate,
3291
3294
  docNo: f.DocNo,
3292
3295
  supplierCode: f.Code,
@@ -3294,8 +3297,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3294
3297
  };
3295
3298
  for (let r = 0; r < h.length; r++) {
3296
3299
  const o = v + r;
3297
- p[o] || (p[o] = {}), h[r] && (p[o] = {
3298
- ...p[o],
3300
+ m[o] || (m[o] = {}), h[r] && (m[o] = {
3301
+ ...m[o],
3299
3302
  accountCode: h[r].ACCOUNT,
3300
3303
  itemCode: h[r].ItemCode,
3301
3304
  itemDescription: h[r].Description_DTL,
@@ -3307,9 +3310,9 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3307
3310
  // itemTax: _items[i].TaxAmt
3308
3311
  });
3309
3312
  }
3310
- return p;
3313
+ return m;
3311
3314
  }, [])
3312
- ), D = [
3315
+ ), K = [
3313
3316
  {
3314
3317
  accessorKey: "date",
3315
3318
  header: () => k("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -3365,15 +3368,15 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3365
3368
  header: "Item Amount",
3366
3369
  enableSorting: !1
3367
3370
  }
3368
- ], F = te(g, "modelValue"), y = z(!1), b = _e(), { dateRange: m } = Ee(we());
3371
+ ], F = te(g, "modelValue"), y = z(!1), b = _e(), { dateRange: p } = Ee(we());
3369
3372
  Ce(
3370
- () => m.value,
3373
+ () => p.value,
3371
3374
  async () => {
3372
3375
  if (F.value._id)
3373
3376
  try {
3374
3377
  y.value = !0, e.value = await Le(F.value._id);
3375
- } catch (p) {
3376
- b.open({ message: p.message, type: "error" });
3378
+ } catch (m) {
3379
+ b.open({ message: m.message, type: "error" });
3377
3380
  } finally {
3378
3381
  y.value = !1;
3379
3382
  }
@@ -3382,22 +3385,22 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3382
3385
  immediate: !0
3383
3386
  }
3384
3387
  );
3385
- async function K() {
3388
+ async function V() {
3386
3389
  try {
3387
3390
  if (!F.value._id) {
3388
3391
  b.open({ message: "Invalid accounting setting", type: "error" });
3389
3392
  return;
3390
3393
  }
3391
3394
  y.value = !0, await qe(F.value._id, [c.value]);
3392
- } catch (p) {
3393
- b.open({ message: p.message, type: "error" });
3395
+ } catch (m) {
3396
+ b.open({ message: m.message, type: "error" });
3394
3397
  } finally {
3395
3398
  y.value = !1;
3396
3399
  }
3397
3400
  }
3398
3401
  const $ = q(() => {
3399
- const { flags: p } = Ze();
3400
- return p.some(
3402
+ const { flags: m } = Ze();
3403
+ return m.some(
3401
3404
  (f) => f.key === "report_portal_integration_custom_sql" && f.value === !0
3402
3405
  );
3403
3406
  }), u = [
@@ -3414,20 +3417,20 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3414
3417
  }
3415
3418
  ] : []
3416
3419
  ], c = z(u[0].value);
3417
- return (p, f) => {
3418
- const v = V("FmButton"), h = V("FmCircularProgress"), r = V("FmTabs"), o = V("FmTable");
3420
+ return (m, f) => {
3421
+ const v = A("FmButton"), h = A("FmCircularProgress"), r = A("FmTabs"), o = A("FmTable");
3419
3422
  return _(), U("div", Xl, [
3420
3423
  t("div", Wl, [
3421
3424
  l(Be, {
3422
- "date-range": d(m),
3423
- "onUpdate:dateRange": f[0] || (f[0] = (s) => Te(m) ? m.value = s : null),
3425
+ "date-range": d(p),
3426
+ "onUpdate:dateRange": f[0] || (f[0] = (s) => Te(p) ? p.value = s : null),
3424
3427
  compare: !1
3425
3428
  }, null, 8, ["date-range"]),
3426
3429
  l(v, {
3427
3430
  loading: y.value,
3428
3431
  variant: "primary",
3429
3432
  label: d(a)("report.common.download"),
3430
- onClick: K
3433
+ onClick: V
3431
3434
  }, null, 8, ["loading", "label"])
3432
3435
  ]),
3433
3436
  y.value ? (_(), U("div", Jl, [
@@ -3449,7 +3452,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3449
3452
  key: 1,
3450
3453
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
3451
3454
  "row-data": T.value,
3452
- "column-defs": D
3455
+ "column-defs": K
3453
3456
  }, null, 8, ["row-data"])) : L("", !0)
3454
3457
  ]))
3455
3458
  ]);
@@ -3474,7 +3477,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3474
3477
  value: "preview",
3475
3478
  icon: "table"
3476
3479
  }
3477
- ], T = be(), D = q(() => {
3480
+ ], T = be(), K = q(() => {
3478
3481
  switch (i.value) {
3479
3482
  case "preview":
3480
3483
  return tn;
@@ -3485,11 +3488,11 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3485
3488
  }
3486
3489
  });
3487
3490
  return (F, y) => {
3488
- var K;
3489
- const b = V("FmPageHead"), m = V("FmTabs");
3491
+ var V;
3492
+ const b = A("FmPageHead"), p = A("FmTabs");
3490
3493
  return _(), U("div", on, [
3491
3494
  l(b, {
3492
- title: ((K = e.value) == null ? void 0 : K.name) || "SQL",
3495
+ title: ((V = e.value) == null ? void 0 : V.name) || "SQL",
3493
3496
  "back-button": !0,
3494
3497
  style: { paddingLeft: "0px", paddingRight: "0px" },
3495
3498
  "onClick:back": y[0] || (y[0] = ($) => d(T).push({ name: "integrations" }))
@@ -3499,13 +3502,13 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3499
3502
  ])),
3500
3503
  _: 1
3501
3504
  }, 8, ["title"]),
3502
- l(m, {
3505
+ l(p, {
3503
3506
  "model-value": i.value,
3504
3507
  "onUpdate:modelValue": y[1] || (y[1] = ($) => i.value = $),
3505
3508
  items: x
3506
3509
  }, null, 8, ["model-value"]),
3507
3510
  t("div", an, [
3508
- (_(), j(Fe(D.value), {
3511
+ (_(), j(Fe(K.value), {
3509
3512
  modelValue: e.value,
3510
3513
  "onUpdate:modelValue": y[2] || (y[2] = ($) => e.value = $)
3511
3514
  }, null, 8, ["modelValue"]))
@@ -3516,7 +3519,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3516
3519
  }), nn = {
3517
3520
  key: 0,
3518
3521
  class: "flex flex-col h-full"
3519
- }, sn = { class: "flex flex-col gap-16 pb-[24px]" }, rn = { class: "flex flex-row justify-between items-center gap-2" }, dn = { class: "fm-typo-en-title-sm-800" }, mn = { class: "flex flex-row gap-2 items-center" }, pn = { class: "flex flex-row gap-2 items-center" }, un = { 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" }, fn = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, gn = { class: "w-[90%] flex flex-col gap-24" }, vn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, yn = { class: "flex flex-col max-w-[100%]" }, xn = { class: "w-[25%] font-semibold" }, bn = { class: "flex-grow" }, wn = { class: "flex flex-col gap-24 pt-[24px]" }, _n = { class: "flex flex-col justify-between" }, hn = { class: "w-[25%] font-semibold" }, kn = { class: "flex-grow" }, Cn = { class: "flex flex-col justify-between" }, $n = { class: "w-[25%] font-semibold" }, Sn = { class: "flex-grow" }, Vn = { class: "flex flex-col gap-16" }, An = { class: "fm-typo-en-title-sm-800" }, Dn = { class: "flex flex-col max-w-[100%]" }, Kn = { class: "w-[25%] font-semibold" }, Tn = { class: "flex-grow" }, Fn = { class: "flex flex-col max-w-[100%]" }, Nn = { class: "w-[25%] font-semibold" }, In = { class: "flex flex-col max-w-[100%]" }, Un = { class: "w-[25%] font-semibold" }, Rn = {
3522
+ }, sn = { class: "flex flex-col gap-16 pb-[24px]" }, rn = { class: "flex flex-row justify-between items-center gap-2" }, dn = { class: "fm-typo-en-title-sm-800" }, mn = { class: "flex flex-row gap-2 items-center" }, pn = { class: "flex flex-row gap-2 items-center" }, un = { 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" }, fn = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, gn = { class: "w-[90%] flex flex-col gap-24" }, vn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, yn = { class: "flex flex-col max-w-[100%]" }, xn = { class: "w-[25%] font-semibold" }, bn = { class: "flex-grow" }, wn = { class: "flex flex-col gap-24 pt-[24px]" }, _n = { class: "flex flex-col justify-between" }, hn = { class: "w-[25%] font-semibold" }, kn = { class: "flex-grow" }, Cn = { class: "flex flex-col justify-between" }, $n = { class: "w-[25%] font-semibold" }, Sn = { class: "flex-grow" }, An = { class: "flex flex-col gap-16" }, Vn = { class: "fm-typo-en-title-sm-800" }, Dn = { class: "flex flex-col max-w-[100%]" }, Kn = { class: "w-[25%] font-semibold" }, Tn = { class: "flex-grow" }, Fn = { class: "flex flex-col max-w-[100%]" }, Nn = { class: "w-[25%] font-semibold" }, In = { class: "flex flex-col max-w-[100%]" }, Un = { class: "w-[25%] font-semibold" }, Rn = {
3520
3523
  key: 0,
3521
3524
  class: "flex flex-col max-w-[100%]"
3522
3525
  }, Pn = { class: "flex flex-col gap-16" }, Mn = { class: "xs:grid-cols-1 grid gap-16" }, jn = { key: 1 }, Ln = { class: "flex flex-col gap-16 pt-3 pb-3" }, On = { class: "flex flex-row items-center gap-5" }, En = { class: "fm-typo-en-title-sm-800" }, Bn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Yn = { class: "flex flex-row items-center justify-between gap-x-16" }, qn = { class: "fm-typo-en-title-sm-800" }, Hn = { class: "flex flex-row items-center justify-between gap-x-16" }, zn = { class: "fm-typo-en-title-sm-800" }, Qn = { class: "flex flex-row items-center justify-between gap-x-16" }, Gn = { class: "fm-typo-en-title-sm-800" }, Xn = { class: "flex flex-row items-center justify-between gap-x-16" }, Wn = { class: "fm-typo-en-title-sm-800" }, Jn = { class: "flex flex-row items-center justify-between" }, Zn = { class: "flex-grow" }, es = {
@@ -3530,7 +3533,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3530
3533
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
3531
3534
  }, as = /* @__PURE__ */ J({
3532
3535
  __name: "Setting",
3533
- props: /* @__PURE__ */ Ve({
3536
+ props: /* @__PURE__ */ Ae({
3534
3537
  retrievedMethods: {
3535
3538
  type: Object,
3536
3539
  required: !0
@@ -3549,21 +3552,21 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3549
3552
  }),
3550
3553
  emits: ["update:modelValue"],
3551
3554
  setup(g) {
3552
- const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ae(), T = be(), { promptLoader: D } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
3555
+ const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ve(), T = be(), { promptLoader: K } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
3553
3556
  () => y.map((r) => ({ label: r.name, value: r.id }))
3554
3557
  );
3555
- function m(r) {
3558
+ function p(r) {
3556
3559
  var o;
3557
3560
  !((o = g.retrievedMethods) != null && o.data) || !Array.isArray(g.retrievedMethods.data) || r.forEach((s) => {
3558
- const n = g.retrievedMethods.data.find((A) => A.value == s.id);
3561
+ const n = g.retrievedMethods.data.find((D) => D.value == s.id);
3559
3562
  n && (s.cnId = n.cnId);
3560
3563
  });
3561
3564
  }
3562
- async function K() {
3565
+ async function V() {
3563
3566
  await F({
3564
3567
  message: a("report.messages.confirmDelete", { name: e.value.name }),
3565
3568
  title: a("report.common.delete")
3566
- }) && await D(async () => {
3569
+ }) && await K(async () => {
3567
3570
  try {
3568
3571
  await Me(e.value._id), await x.getSettings(), T.back();
3569
3572
  } catch (o) {
@@ -3572,18 +3575,18 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3572
3575
  });
3573
3576
  }
3574
3577
  async function $() {
3575
- await D(async () => {
3578
+ await K(async () => {
3576
3579
  var r, o, s;
3577
3580
  try {
3578
- (s = (o = (r = e.value) == null ? void 0 : r.platform) == null ? void 0 : o.mappings) != null && s.paymentMethods && m(e.value.platform.mappings.paymentMethods), await je(e.value._id, e.value), await x.getSettings();
3581
+ (s = (o = (r = e.value) == null ? void 0 : r.platform) == null ? void 0 : o.mappings) != null && s.paymentMethods && p(e.value.platform.mappings.paymentMethods), await je(e.value._id, e.value), await x.getSettings();
3579
3582
  } catch (n) {
3580
3583
  i.open({ type: "error", message: n.message });
3581
3584
  }
3582
3585
  });
3583
3586
  }
3584
3587
  function u(r, o) {
3585
- var A;
3586
- const s = (A = e.value.platform) == null ? void 0 : A.mappings;
3588
+ var D;
3589
+ const s = (D = e.value.platform) == null ? void 0 : D.mappings;
3587
3590
  if (!s) return;
3588
3591
  if (["items", "taxes", "paymentMethods", "taxRoundingAdjustments"].includes(r)) {
3589
3592
  const N = r;
@@ -3609,7 +3612,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3609
3612
  }
3610
3613
  ]);
3611
3614
  }
3612
- const p = [
3615
+ const m = [
3613
3616
  {
3614
3617
  label: "By day",
3615
3618
  value: ve.BY_DAY
@@ -3637,22 +3640,22 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3637
3640
  r && r.forEach((o, s) => {
3638
3641
  var N;
3639
3642
  const n = o.key || "";
3640
- let A = o.account;
3641
- if (!A && n) {
3643
+ let D = o.account;
3644
+ if (!D && n) {
3642
3645
  switch (n) {
3643
3646
  case "SST_SV":
3644
- A = "SST-6";
3647
+ D = "SST-6";
3645
3648
  break;
3646
3649
  case "SST_SV8":
3647
- A = "SST-8";
3650
+ D = "SST-8";
3648
3651
  break;
3649
3652
  case "SST_EX":
3650
- A = "SST-0";
3653
+ D = "SST-0";
3651
3654
  break;
3652
3655
  }
3653
3656
  (N = e.value.platform) != null && N.mappings && (e.value.platform.mappings.taxes[s] = {
3654
3657
  ...o,
3655
- account: A
3658
+ account: D
3656
3659
  });
3657
3660
  }
3658
3661
  });
@@ -3664,8 +3667,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3664
3667
  return (s = (o = (r = e.value) == null ? void 0 : r.platform) == null ? void 0 : o.mappings) == null ? void 0 : s.version;
3665
3668
  },
3666
3669
  (r) => {
3667
- var o, s, n, A, N;
3668
- r === "v1" && !((n = (s = (o = e.value) == null ? void 0 : o.platform) == null ? void 0 : s.mappings) != null && n.payee) && (N = (A = e.value) == null ? void 0 : A.platform) != null && N.mappings && (e.value.platform.mappings.payee = {
3670
+ var o, s, n, D, N;
3671
+ r === "v1" && !((n = (s = (o = e.value) == null ? void 0 : o.platform) == null ? void 0 : s.mappings) != null && n.payee) && (N = (D = e.value) == null ? void 0 : D.platform) != null && N.mappings && (e.value.platform.mappings.payee = {
3669
3672
  id: 1,
3670
3673
  name: ""
3671
3674
  });
@@ -3673,7 +3676,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3673
3676
  { immediate: !0 }
3674
3677
  );
3675
3678
  async function h() {
3676
- await D(async () => {
3679
+ await K(async () => {
3677
3680
  try {
3678
3681
  await Ke(e.value._id), await x.getSettings();
3679
3682
  } catch (r) {
@@ -3685,7 +3688,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3685
3688
  await x.getSettings();
3686
3689
  }), (r, o) => {
3687
3690
  var E, G, W, ae, le, ne, se, re, ie, de, me, pe, ue, ce, fe, I, R;
3688
- const s = V("FmIcon"), n = V("FmButton"), A = V("FmSelect"), N = V("FmMenuDivider"), M = V("FmTextField"), Y = V("FmCircularProgress");
3691
+ const s = A("FmIcon"), n = A("FmButton"), D = A("FmSelect"), N = A("FmMenuDivider"), M = A("FmTextField"), Y = A("FmCircularProgress");
3689
3692
  return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (_(), U("div", nn, [
3690
3693
  t("div", sn, [
3691
3694
  t("div", rn, [
@@ -3703,7 +3706,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3703
3706
  l(n, {
3704
3707
  variant: "tertiary",
3705
3708
  label: d(a)("report.common.delete"),
3706
- onClick: K
3709
+ onClick: V
3707
3710
  }, null, 8, ["label"]),
3708
3711
  l(n, {
3709
3712
  variant: "primary",
@@ -3721,7 +3724,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3721
3724
  t("div", yn, [
3722
3725
  t("div", xn, " Biztory " + C(d(a)("report.integration.biztory.version")), 1),
3723
3726
  t("div", bn, [
3724
- l(A, {
3727
+ l(D, {
3725
3728
  modelValue: e.value.platform.mappings.version,
3726
3729
  "onUpdate:modelValue": o[0] || (o[0] = (w) => e.value.platform.mappings.version = w),
3727
3730
  items: [
@@ -3754,8 +3757,8 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3754
3757
  }, null, 8, ["modelValue"])
3755
3758
  ])
3756
3759
  ]),
3757
- t("div", Vn, [
3758
- t("div", An, C(d(a)("report.integration.general")), 1),
3760
+ t("div", An, [
3761
+ t("div", Vn, C(d(a)("report.integration.general")), 1),
3759
3762
  t("div", Dn, [
3760
3763
  t("div", Kn, C(d(a)("report.common.name")), 1),
3761
3764
  t("div", Tn, [
@@ -3767,7 +3770,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3767
3770
  ]),
3768
3771
  t("div", Fn, [
3769
3772
  t("div", Nn, C(d(a)("report.common.location")), 1),
3770
- l(A, {
3773
+ l(D, {
3771
3774
  modelValue: e.value.platform.locationIds,
3772
3775
  "onUpdate:modelValue": o[4] || (o[4] = (w) => e.value.platform.locationIds = w),
3773
3776
  multiselect: !0,
@@ -3778,11 +3781,11 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3778
3781
  ]),
3779
3782
  t("div", In, [
3780
3783
  t("div", Un, C(d(a)("report.integration.grouping.title")), 1),
3781
- l(A, {
3784
+ l(D, {
3782
3785
  modelValue: e.value.platform.grouping,
3783
3786
  "onUpdate:modelValue": o[5] || (o[5] = (w) => e.value.platform.grouping = w),
3784
3787
  multiselect: !1,
3785
- items: p,
3788
+ items: m,
3786
3789
  placeholder: d(a)("report.integration.grouping.title"),
3787
3790
  class: "flex-grow",
3788
3791
  disabled: ""
@@ -4018,7 +4021,7 @@ const vt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
4018
4021
  });
4019
4022
  function ls(g) {
4020
4023
  return g.reduce((a, e) => {
4021
- var T, D, F, y, b, m, K, $, u, c, p, f, v, h, r, o, s, n, A, N, M, Y;
4024
+ var T, K, F, y, b, p, V, $, u, c, m, f, v, h, r, o, s, n, D, N, M, Y;
4022
4025
  const { invoice: i } = e, x = a.length;
4023
4026
  a[x] = {
4024
4027
  invoice_date: i.invoice_date,
@@ -4028,15 +4031,15 @@ function ls(g) {
4028
4031
  // tax: invoice.tax.reduce((sum, tax) => sum + tax.tax, 0),
4029
4032
  // service_charge: invoice.service_charge.total,
4030
4033
  item_code: (T = i.items[0]) == null ? void 0 : T.code,
4031
- item_desc: (D = i.items[0]) == null ? void 0 : D.description,
4034
+ item_desc: (K = i.items[0]) == null ? void 0 : K.description,
4032
4035
  item_price: (F = i.items[0]) == null ? void 0 : F.price,
4033
4036
  item_tax: (y = i.items[0]) == null ? void 0 : y.total_tax,
4034
4037
  item_tax_label: ((b = i.items[0]) == null ? void 0 : b.tax_label) || "-",
4035
- payment_amount: ((K = (m = i.transactions) == null ? void 0 : m[0]) == null ? void 0 : K.amount) || void 0,
4038
+ payment_amount: ((V = (p = i.transactions) == null ? void 0 : p[0]) == null ? void 0 : V.amount) || void 0,
4036
4039
  payment_method: ((u = ($ = i.transactions) == null ? void 0 : $[0]) == null ? void 0 : u.payment_method) || "-",
4037
4040
  payment_term: ((c = i == null ? void 0 : i.payment_term) == null ? void 0 : c.name) || ""
4038
4041
  };
4039
- for (let E = 1; E < Math.max(((p = i.items) == null ? void 0 : p.length) || 0, ((f = i.transactions) == null ? void 0 : f.length) || 0); E++) {
4042
+ for (let E = 1; E < Math.max(((m = i.items) == null ? void 0 : m.length) || 0, ((f = i.transactions) == null ? void 0 : f.length) || 0); E++) {
4040
4043
  const G = x + E;
4041
4044
  a[G] || (a[G] = {});
4042
4045
  const W = i.items[E];
@@ -4051,7 +4054,7 @@ function ls(g) {
4051
4054
  payment_method: ((o = (r = i.transactions) == null ? void 0 : r[E]) == null ? void 0 : o.payment_method) || "-",
4052
4055
  payment_term: ((s = i == null ? void 0 : i.payment_term) == null ? void 0 : s.name) || ""
4053
4056
  } : a[G] = {
4054
- payment_amount: ((A = (n = i.transactions) == null ? void 0 : n[E]) == null ? void 0 : A.amount) || void 0,
4057
+ payment_amount: ((D = (n = i.transactions) == null ? void 0 : n[E]) == null ? void 0 : D.amount) || void 0,
4055
4058
  payment_method: ((M = (N = i.transactions) == null ? void 0 : N[E]) == null ? void 0 : M.payment_method) || "-",
4056
4059
  payment_term: ((Y = i == null ? void 0 : i.payment_term) == null ? void 0 : Y.name) || ""
4057
4060
  };
@@ -4133,7 +4136,7 @@ const ns = [
4133
4136
  ];
4134
4137
  function ss(g) {
4135
4138
  return g.reduce((a, e) => {
4136
- var F, y, b, m, K, $, u, c, p, f, v, h, r, o;
4139
+ var F, y, b, p, V, $, u, c, m, f, v, h, r, o;
4137
4140
  const { invoice: i, payments: x } = e, T = a.length;
4138
4141
  a[T] = {
4139
4142
  invoice_date: i.invoice_date,
@@ -4141,31 +4144,31 @@ function ss(g) {
4141
4144
  total: i.total,
4142
4145
  item_code: (y = i.items[0]) == null ? void 0 : y.code,
4143
4146
  item_description: (b = i.items[0]) == null ? void 0 : b.description,
4144
- item_price: (m = i.items[0]) == null ? void 0 : m.price,
4145
- item_tax_label: ((K = i.items[0]) == null ? void 0 : K.tax_label) ?? "",
4147
+ item_price: (p = i.items[0]) == null ? void 0 : p.price,
4148
+ item_tax_label: ((V = i.items[0]) == null ? void 0 : V.tax_label) ?? "",
4146
4149
  item_tax_amount: (($ = i.items[0]) == null ? void 0 : $.total_tax) ?? "",
4147
4150
  service_charge_amount: ((u = i.service_charges[0]) == null ? void 0 : u.total) ?? "",
4148
4151
  rounding: i.rounding ?? 0,
4149
4152
  payment_term_id: i.payment_term.name ?? "",
4150
- payment_term_amount: ((p = (c = x[0]) == null ? void 0 : c.ids[0]) == null ? void 0 : p.amount) ?? "",
4153
+ payment_term_amount: ((m = (c = x[0]) == null ? void 0 : c.ids[0]) == null ? void 0 : m.amount) ?? "",
4151
4154
  payment_method: ((f = x[0]) == null ? void 0 : f.payment_method_name) || ""
4152
4155
  };
4153
- const D = Math.max(
4156
+ const K = Math.max(
4154
4157
  ((v = i.items) == null ? void 0 : v.length) || 0,
4155
4158
  ((h = i.terms) == null ? void 0 : h.length) || 0,
4156
4159
  (x == null ? void 0 : x.length) || 0
4157
4160
  );
4158
- for (let s = 1; s < D; s++) {
4161
+ for (let s = 1; s < K; s++) {
4159
4162
  const n = T + s;
4160
4163
  a[n] || (a[n] = {});
4161
- const A = i.items[s], N = x[s];
4162
- A ? a[n] = {
4164
+ const D = i.items[s], N = x[s];
4165
+ D ? a[n] = {
4163
4166
  ...a[n],
4164
- item_code: A.code,
4165
- item_description: A.description,
4166
- item_price: A.total,
4167
- item_tax_label: A.tax_label == "?" ? "" : A.tax_label ?? "",
4168
- item_tax_amount: A.total_tax ?? "",
4167
+ item_code: D.code,
4168
+ item_description: D.description,
4169
+ item_price: D.total,
4170
+ item_tax_label: D.tax_label == "?" ? "" : D.tax_label ?? "",
4171
+ item_tax_amount: D.total_tax ?? "",
4169
4172
  payment_term_id: i.payment_term.name ?? "",
4170
4173
  payment_term_amount: ((r = N == null ? void 0 : N.ids[0]) == null ? void 0 : r.amount) ?? "",
4171
4174
  payment_method: (N == null ? void 0 : N.payment_method_name) || ""
@@ -4256,15 +4259,15 @@ const rs = [
4256
4259
  },
4257
4260
  emits: ["update:modelValue"],
4258
4261
  setup(g) {
4259
- const { t: a } = oe(), e = te(g, "modelValue"), i = z(!1), x = _e(), { dateRange: T } = Ee(we()), D = z([]);
4262
+ const { t: a } = oe(), e = te(g, "modelValue"), i = z(!1), x = _e(), { dateRange: T } = Ee(we()), K = z([]);
4260
4263
  Ce(
4261
4264
  () => T.value,
4262
4265
  async () => {
4263
4266
  if (e.value._id)
4264
4267
  try {
4265
- i.value = !0, D.value = await Le(e.value._id);
4266
- } catch (m) {
4267
- x.open({ message: m.message, type: "error" });
4268
+ i.value = !0, K.value = await Le(e.value._id);
4269
+ } catch (p) {
4270
+ x.open({ message: p.message, type: "error" });
4268
4271
  } finally {
4269
4272
  i.value = !1;
4270
4273
  }
@@ -4276,9 +4279,9 @@ const rs = [
4276
4279
  const F = q(() => {
4277
4280
  switch (e.value.platform.mappings.version) {
4278
4281
  case "v1":
4279
- return ls(D.value);
4282
+ return ls(K.value);
4280
4283
  case "v2":
4281
- return ss(D.value);
4284
+ return ss(K.value);
4282
4285
  }
4283
4286
  return [];
4284
4287
  }), y = q(() => {
@@ -4293,19 +4296,19 @@ const rs = [
4293
4296
  async function b() {
4294
4297
  try {
4295
4298
  e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (i.value = !0, await ze(e.value._id), x.open({ message: "Upload successful", type: "success" })) : x.open({ message: "Invalid accounting setting", type: "error" });
4296
- } catch (m) {
4297
- m.message && x.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((K) => x.open({ message: K, type: "error" }));
4299
+ } catch (p) {
4300
+ p.message && x.open({ message: p.message, type: "error" }), p.errors && p.errors.forEach((V) => x.open({ message: V, type: "error" }));
4298
4301
  } finally {
4299
4302
  i.value = !1;
4300
4303
  }
4301
4304
  }
4302
- return (m, K) => {
4303
- const $ = V("FmButton"), u = V("FmCircularProgress"), c = V("FmTable");
4305
+ return (p, V) => {
4306
+ const $ = A("FmButton"), u = A("FmCircularProgress"), c = A("FmTable");
4304
4307
  return _(), U("div", is, [
4305
4308
  t("div", ds, [
4306
4309
  l(Be, {
4307
4310
  "date-range": d(T),
4308
- "onUpdate:dateRange": K[0] || (K[0] = (p) => Te(T) ? T.value = p : null),
4311
+ "onUpdate:dateRange": V[0] || (V[0] = (m) => Te(T) ? T.value = m : null),
4309
4312
  compare: !1
4310
4313
  }, null, 8, ["date-range"]),
4311
4314
  l($, {
@@ -4329,7 +4332,7 @@ const rs = [
4329
4332
  }
4330
4333
  }), cs = { class: "h-full relative flex flex-col" }, fs = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, gs = /* @__PURE__ */ J({
4331
4334
  __name: "Biztory",
4332
- props: /* @__PURE__ */ Ve({
4335
+ props: /* @__PURE__ */ Ae({
4333
4336
  errorLogs: {}
4334
4337
  }, {
4335
4338
  modelValue: { required: !0 },
@@ -4348,7 +4351,7 @@ const rs = [
4348
4351
  value: "preview",
4349
4352
  icon: "table"
4350
4353
  }
4351
- ], D = be(), F = q(() => {
4354
+ ], K = be(), F = q(() => {
4352
4355
  switch (x.value) {
4353
4356
  case "preview":
4354
4357
  return {
@@ -4366,13 +4369,13 @@ const rs = [
4366
4369
  default:
4367
4370
  return null;
4368
4371
  }
4369
- }), y = z({}), b = z({}), m = (p, f) => p.map((v) => ({
4372
+ }), y = z({}), b = z({}), p = (m, f) => m.map((v) => ({
4370
4373
  label: f.length > 2 ? `ID:${v[f[2]]} [${v[f[0]]}] ${v[f[1]]}` : `[${v[f[0]]}] ${v[f[1]]}`,
4371
4374
  value: v.id,
4372
4375
  cnId: v.cnId ? v.cnId : null
4373
- })), K = (p) => m(p, ["wallet", "name"]), $ = (p) => m(p, ["id", "name"]), u = async (p, f, v, h) => {
4376
+ })), V = (m) => p(m, ["wallet", "name"]), $ = (m) => p(m, ["id", "name"]), u = async (m, f, v, h) => {
4374
4377
  try {
4375
- const r = await p(e.value._id);
4378
+ const r = await m(e.value._id);
4376
4379
  v.value.data = f(r);
4377
4380
  } catch (r) {
4378
4381
  console.error(h, r), v.value.isError = !0;
@@ -4380,10 +4383,10 @@ const rs = [
4380
4383
  v.value.isLoaded = !0;
4381
4384
  }
4382
4385
  }, c = async () => {
4383
- var p, f;
4384
- (p = e.value.platform.mappings) != null && p.version && await u(
4386
+ var m, f;
4387
+ (m = e.value.platform.mappings) != null && m.version && await u(
4385
4388
  pt,
4386
- K,
4389
+ V,
4387
4390
  y,
4388
4391
  "Failed to fetch payment methods:"
4389
4392
  ), ((f = e.value.platform.mappings) == null ? void 0 : f.version) == "v2" && await u(
@@ -4394,17 +4397,17 @@ const rs = [
4394
4397
  ), y.value.isLoaded = !0, b.value.isLoaded = !0;
4395
4398
  };
4396
4399
  return Ge(c), Ce(() => {
4397
- var p;
4398
- return (p = e.value.platform.mappings) == null ? void 0 : p.version;
4399
- }, c), (p, f) => {
4400
+ var m;
4401
+ return (m = e.value.platform.mappings) == null ? void 0 : m.version;
4402
+ }, c), (m, f) => {
4400
4403
  var r, o, s;
4401
- const v = V("FmPageHead"), h = V("FmTabs");
4404
+ const v = A("FmPageHead"), h = A("FmTabs");
4402
4405
  return _(), U("div", cs, [
4403
4406
  l(v, {
4404
4407
  title: ((r = e.value) == null ? void 0 : r.name) || "Biztory",
4405
4408
  "back-button": !0,
4406
4409
  style: { paddingLeft: "0px", paddingRight: "0px" },
4407
- "onClick:back": f[0] || (f[0] = (n) => d(D).push({ name: "integrations" }))
4410
+ "onClick:back": f[0] || (f[0] = (n) => d(K).push({ name: "integrations" }))
4408
4411
  }, {
4409
4412
  description: xe(() => f[3] || (f[3] = [
4410
4413
  t("div", null, null, -1)
@@ -4428,7 +4431,7 @@ const rs = [
4428
4431
  }), vs = {
4429
4432
  key: 0,
4430
4433
  class: "flex flex-col h-full"
4431
- }, ys = { class: "flex flex-col gap-16 pb-[24px]" }, xs = { class: "flex flex-row justify-between items-center gap-2" }, bs = { class: "flex flex-row gap-2 items-center" }, ws = { class: "relative group cursor-pointer" }, _s = { 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" }, hs = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ks = { class: "w-[90%] flex flex-col gap-24" }, Cs = { class: "flex flex-col gap-16" }, $s = { class: "fm-typo-en-title-sm-800" }, Ss = { class: "flex flex-row items-center max-w-[100%]" }, Vs = { class: "w-[25%]" }, As = { class: "flex-grow" }, Ds = { class: "flex flex-row items-center max-w-[100%]" }, Ks = { class: "w-[25%]" }, Ts = { class: "flex flex-row items-center justify-between gap-x-16" }, Fs = { class: "fm-typo-en-title-sm-800" }, Ns = /* @__PURE__ */ J({
4434
+ }, ys = { class: "flex flex-col gap-16 pb-[24px]" }, xs = { class: "flex flex-row justify-between items-center gap-2" }, bs = { class: "flex flex-row gap-2 items-center" }, ws = { class: "relative group cursor-pointer" }, _s = { 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" }, hs = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ks = { class: "w-[90%] flex flex-col gap-24" }, Cs = { class: "flex flex-col gap-16" }, $s = { class: "fm-typo-en-title-sm-800" }, Ss = { class: "flex flex-row items-center max-w-[100%]" }, As = { class: "w-[25%]" }, Vs = { class: "flex-grow" }, Ds = { class: "flex flex-row items-center max-w-[100%]" }, Ks = { class: "w-[25%]" }, Ts = { class: "flex flex-row items-center justify-between gap-x-16" }, Fs = { class: "fm-typo-en-title-sm-800" }, Ns = /* @__PURE__ */ J({
4432
4435
  __name: "Setting",
4433
4436
  props: {
4434
4437
  modelValue: { required: !0 },
@@ -4436,14 +4439,14 @@ const rs = [
4436
4439
  },
4437
4440
  emits: ["update:modelValue"],
4438
4441
  setup(g) {
4439
- const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ae(), T = be(), { promptLoader: D } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
4440
- () => y.map((p) => ({ label: p.name, value: p.id }))
4442
+ const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ve(), T = be(), { promptLoader: K } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
4443
+ () => y.map((m) => ({ label: m.name, value: m.id }))
4441
4444
  );
4442
- async function m() {
4445
+ async function p() {
4443
4446
  await F({
4444
4447
  message: a("report.messages.confirmDelete", { name: e.value.name }),
4445
4448
  title: a("report.common.delete")
4446
- }) && await D(async () => {
4449
+ }) && await K(async () => {
4447
4450
  try {
4448
4451
  await Me(e.value._id), await x.getSettings(), T.back();
4449
4452
  } catch (f) {
@@ -4451,25 +4454,25 @@ const rs = [
4451
4454
  }
4452
4455
  });
4453
4456
  }
4454
- async function K() {
4455
- await D(async () => {
4457
+ async function V() {
4458
+ await K(async () => {
4456
4459
  try {
4457
4460
  await je(e.value._id, e.value), await x.getSettings();
4458
- } catch (p) {
4459
- i.open({ type: "error", message: p.message });
4461
+ } catch (m) {
4462
+ i.open({ type: "error", message: m.message });
4460
4463
  }
4461
4464
  });
4462
4465
  }
4463
- function $(p, f) {
4466
+ function $(m, f) {
4464
4467
  var v, h;
4465
- (h = (v = e.value.platform) == null ? void 0 : v.mappings) != null && h[p] && (e.value.platform.mappings[p] = e.value.platform.mappings[p].filter(
4468
+ (h = (v = e.value.platform) == null ? void 0 : v.mappings) != null && h[m] && (e.value.platform.mappings[m] = e.value.platform.mappings[m].filter(
4466
4469
  (r, o) => o !== f
4467
4470
  ));
4468
4471
  }
4469
- function u(p) {
4472
+ function u(m) {
4470
4473
  var f, v;
4471
- (v = (f = e.value.platform) == null ? void 0 : f.mappings) != null && v[p] && (e.value.platform.mappings[p] = [
4472
- ...e.value.platform.mappings[p],
4474
+ (v = (f = e.value.platform) == null ? void 0 : f.mappings) != null && v[m] && (e.value.platform.mappings[m] = [
4475
+ ...e.value.platform.mappings[m],
4473
4476
  {
4474
4477
  key: "",
4475
4478
  name: "",
@@ -4479,20 +4482,20 @@ const rs = [
4479
4482
  ]);
4480
4483
  }
4481
4484
  async function c() {
4482
- await D(async () => {
4485
+ await K(async () => {
4483
4486
  try {
4484
4487
  await Ke(e.value._id), await x.getSettings();
4485
- } catch (p) {
4486
- i.open({ type: "error", message: p.message });
4488
+ } catch (m) {
4489
+ i.open({ type: "error", message: m.message });
4487
4490
  }
4488
4491
  });
4489
4492
  }
4490
4493
  return Re(async () => {
4491
4494
  await x.getSettings();
4492
- }), (p, f) => {
4493
- var n, A, N, M, Y;
4494
- const v = V("FmIcon"), h = V("FmButton"), r = V("FmMenuDivider"), o = V("FmTextField"), s = V("FmSelect");
4495
- return (A = (n = e.value) == null ? void 0 : n.platform) != null && A.mappings ? (_(), U("div", vs, [
4495
+ }), (m, f) => {
4496
+ var n, D, N, M, Y;
4497
+ const v = A("FmIcon"), h = A("FmButton"), r = A("FmMenuDivider"), o = A("FmTextField"), s = A("FmSelect");
4498
+ return (D = (n = e.value) == null ? void 0 : n.platform) != null && D.mappings ? (_(), U("div", vs, [
4496
4499
  t("div", ys, [
4497
4500
  t("div", xs, [
4498
4501
  f[6] || (f[6] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
@@ -4508,13 +4511,13 @@ const rs = [
4508
4511
  l(h, {
4509
4512
  variant: "tertiary",
4510
4513
  label: d(a)("report.common.delete"),
4511
- onClick: m
4514
+ onClick: p
4512
4515
  }, null, 8, ["label"]),
4513
4516
  l(h, {
4514
4517
  variant: "primary",
4515
4518
  label: d(a)("report.common.update"),
4516
4519
  "prepend-icon": "update",
4517
- onClick: K
4520
+ onClick: V
4518
4521
  }, null, 8, ["label"])
4519
4522
  ])
4520
4523
  ])
@@ -4525,8 +4528,8 @@ const rs = [
4525
4528
  t("div", Cs, [
4526
4529
  t("div", $s, C(d(a)("report.integration.general")), 1),
4527
4530
  t("div", Ss, [
4528
- t("div", Vs, C(d(a)("report.common.name")), 1),
4529
- t("div", As, [
4531
+ t("div", As, C(d(a)("report.common.name")), 1),
4532
+ t("div", Vs, [
4530
4533
  l(o, {
4531
4534
  modelValue: e.value.name,
4532
4535
  "onUpdate:modelValue": f[0] || (f[0] = (E) => e.value.name = E)
@@ -4620,7 +4623,7 @@ const rs = [
4620
4623
  header: () => k("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
4621
4624
  enableSorting: !1
4622
4625
  }
4623
- ], x = te(g, "modelValue"), T = z(!1), D = _e(), { dateRange: F } = Ee(we());
4626
+ ], x = te(g, "modelValue"), T = z(!1), K = _e(), { dateRange: F } = Ee(we());
4624
4627
  Ce(
4625
4628
  () => F.value,
4626
4629
  async () => {
@@ -4628,7 +4631,7 @@ const rs = [
4628
4631
  try {
4629
4632
  T.value = !0, e.value = await Le(x.value._id);
4630
4633
  } catch (b) {
4631
- D.open({ message: b.message, type: "error" });
4634
+ K.open({ message: b.message, type: "error" });
4632
4635
  } finally {
4633
4636
  T.value = !1;
4634
4637
  }
@@ -4639,23 +4642,23 @@ const rs = [
4639
4642
  );
4640
4643
  async function y() {
4641
4644
  try {
4642
- x.value._id ? (T.value = !0, await qe(x.value._id)) : D.open({ message: "Invalid setting", type: "error" });
4645
+ x.value._id ? (T.value = !0, await qe(x.value._id)) : K.open({ message: "Invalid setting", type: "error" });
4643
4646
  } catch (b) {
4644
- D.open({ message: b.message, type: "error" });
4647
+ K.open({ message: b.message, type: "error" });
4645
4648
  } finally {
4646
4649
  T.value = !1;
4647
4650
  }
4648
4651
  }
4649
- return (b, m) => {
4650
- const K = V("FmButton"), $ = V("FmCircularProgress"), u = V("FmTable");
4652
+ return (b, p) => {
4653
+ const V = A("FmButton"), $ = A("FmCircularProgress"), u = A("FmTable");
4651
4654
  return _(), U("div", Is, [
4652
4655
  t("div", Us, [
4653
4656
  l(Be, {
4654
4657
  "date-range": d(F),
4655
- "onUpdate:dateRange": m[0] || (m[0] = (c) => Te(F) ? F.value = c : null),
4658
+ "onUpdate:dateRange": p[0] || (p[0] = (c) => Te(F) ? F.value = c : null),
4656
4659
  compare: !1
4657
4660
  }, null, 8, ["date-range"]),
4658
- l(K, {
4661
+ l(V, {
4659
4662
  loading: T.value,
4660
4663
  variant: "primary",
4661
4664
  label: d(a)("report.common.download"),
@@ -4693,7 +4696,7 @@ const rs = [
4693
4696
  value: "preview",
4694
4697
  icon: "table"
4695
4698
  }
4696
- ], T = be(), D = q(() => {
4699
+ ], T = be(), K = q(() => {
4697
4700
  switch (i.value) {
4698
4701
  case "preview":
4699
4702
  return Ms;
@@ -4704,11 +4707,11 @@ const rs = [
4704
4707
  }
4705
4708
  });
4706
4709
  return (F, y) => {
4707
- var K;
4708
- const b = V("FmPageHead"), m = V("FmTabs");
4710
+ var V;
4711
+ const b = A("FmPageHead"), p = A("FmTabs");
4709
4712
  return _(), U("div", js, [
4710
4713
  l(b, {
4711
- title: ((K = e.value) == null ? void 0 : K.name) || "AutoCount",
4714
+ title: ((V = e.value) == null ? void 0 : V.name) || "AutoCount",
4712
4715
  "back-button": !0,
4713
4716
  style: { paddingLeft: "0px", paddingRight: "0px" },
4714
4717
  "onClick:back": y[0] || (y[0] = ($) => d(T).push({ name: "integrations" }))
@@ -4718,13 +4721,13 @@ const rs = [
4718
4721
  ])),
4719
4722
  _: 1
4720
4723
  }, 8, ["title"]),
4721
- l(m, {
4724
+ l(p, {
4722
4725
  "model-value": i.value,
4723
4726
  "onUpdate:modelValue": y[1] || (y[1] = ($) => i.value = $),
4724
4727
  items: x
4725
4728
  }, null, 8, ["model-value"]),
4726
4729
  t("div", Ls, [
4727
- (_(), j(Fe(D.value), {
4730
+ (_(), j(Fe(K.value), {
4728
4731
  modelValue: e.value,
4729
4732
  "onUpdate:modelValue": y[2] || (y[2] = ($) => e.value = $)
4730
4733
  }, null, 8, ["modelValue"]))
@@ -4741,15 +4744,15 @@ const rs = [
4741
4744
  }, Cr = {
4742
4745
  key: 2,
4743
4746
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
4744
- }, $r = { class: "flex flex-col max-w-[100%]" }, Sr = { class: "w-[25%] font-semibold" }, Vr = {
4747
+ }, $r = { class: "flex flex-col max-w-[100%]" }, Sr = { class: "w-[25%] font-semibold" }, Ar = {
4745
4748
  key: 1,
4746
4749
  class: "w-[100%] flex flex-col gap-2"
4747
- }, Ar = {
4750
+ }, Vr = {
4748
4751
  key: 2,
4749
4752
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
4750
4753
  }, Dr = { class: "flex flex-col gap-16" }, Kr = { class: "fm-typo-en-title-sm-800" }, Tr = { class: "flex flex-row items-center w-[100%] justify-start" }, Fr = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, Nr = { class: "flex flex-row items-center w-[100%] justify-start" }, Ir = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, Ur = { class: "flex flex-row items-center w-[100%] justify-start" }, Rr = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, Pr = { class: "flex flex-col gap-16 pt-3 pb-3" }, Mr = { class: "flex flex-row items-center gap-5" }, jr = { class: "fm-typo-en-title-sm-800" }, Lr = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Or = { class: "flex flex-row items-center justify-between gap-x-16" }, Er = { class: "fm-typo-en-title-sm-800" }, Br = { class: "flex flex-row items-center justify-between gap-x-16" }, Yr = { class: "fm-typo-en-title-sm-800" }, qr = { class: "flex flex-row items-center justify-between gap-x-16" }, Hr = { class: "fm-typo-en-title-sm-800" }, zr = { class: "flex flex-row items-center justify-between gap-x-16" }, Qr = { class: "fm-typo-en-title-sm-800" }, Gr = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Xr = /* @__PURE__ */ J({
4751
4754
  __name: "Setting",
4752
- props: /* @__PURE__ */ Ve({
4755
+ props: /* @__PURE__ */ Ae({
4753
4756
  retrievedDebtors: {
4754
4757
  type: Object,
4755
4758
  required: !0
@@ -4768,15 +4771,15 @@ const rs = [
4768
4771
  }),
4769
4772
  emits: ["update:modelValue"],
4770
4773
  setup(g) {
4771
- const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ae(), T = be(), { promptLoader: D } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
4774
+ const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ve(), T = be(), { promptLoader: K } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
4772
4775
  () => y.map((o) => ({ label: o.name, value: o.id }))
4773
4776
  );
4774
- let m = z("");
4775
- async function K() {
4777
+ let p = z("");
4778
+ async function V() {
4776
4779
  await F({
4777
4780
  message: a("report.messages.confirmDelete", { name: e.value.name }),
4778
4781
  title: a("report.common.delete")
4779
- }) && await D(async () => {
4782
+ }) && await K(async () => {
4780
4783
  try {
4781
4784
  await Me(e.value._id), await x.getSettings(), T.back();
4782
4785
  } catch (s) {
@@ -4785,7 +4788,7 @@ const rs = [
4785
4788
  });
4786
4789
  }
4787
4790
  async function $() {
4788
- await D(async () => {
4791
+ await K(async () => {
4789
4792
  try {
4790
4793
  await je(e.value._id, e.value), await x.getSettings();
4791
4794
  } catch (o) {
@@ -4820,7 +4823,7 @@ const rs = [
4820
4823
  }
4821
4824
  ]);
4822
4825
  }
4823
- const p = [
4826
+ const m = [
4824
4827
  {
4825
4828
  label: "By day",
4826
4829
  value: ve.BY_DAY
@@ -4831,7 +4834,7 @@ const rs = [
4831
4834
  }
4832
4835
  ];
4833
4836
  async function f() {
4834
- await D(async () => {
4837
+ await K(async () => {
4835
4838
  try {
4836
4839
  await Ke(e.value._id), await x.getSettings();
4837
4840
  } catch (o) {
@@ -4843,8 +4846,8 @@ const rs = [
4843
4846
  key: o,
4844
4847
  value: s
4845
4848
  }) {
4846
- var n, A;
4847
- (A = (n = e.value) == null ? void 0 : n.platform) != null && A.mappings && (e.value.platform.mappings[o] = s);
4849
+ var n, D;
4850
+ (D = (n = e.value) == null ? void 0 : n.platform) != null && D.mappings && (e.value.platform.mappings[o] = s);
4848
4851
  }
4849
4852
  function h(o) {
4850
4853
  return {
@@ -4859,7 +4862,7 @@ const rs = [
4859
4862
  const s = g.retrievedDebtors.data.find(
4860
4863
  (n) => n.valueAccNo === o || n.value === o
4861
4864
  );
4862
- s && (m.value = o, e.value.platform.mappings.debtorCode = s.valueAccNo, e.value.platform.mappings.debtorName = s.valueCompanyName);
4865
+ s && (p.value = o, e.value.platform.mappings.debtorCode = s.valueAccNo, e.value.platform.mappings.debtorName = s.valueCompanyName);
4863
4866
  }
4864
4867
  return Ce(
4865
4868
  () => g.retrievedDebtors.isLoaded,
@@ -4867,15 +4870,15 @@ const rs = [
4867
4870
  var s;
4868
4871
  if (o && ((s = g.retrievedDebtors.data) == null ? void 0 : s.length) > 0) {
4869
4872
  const n = g.retrievedDebtors.data.find(
4870
- (A) => A.valueAccNo === e.value.platform.mappings.debtorCode
4873
+ (D) => D.valueAccNo === e.value.platform.mappings.debtorCode
4871
4874
  );
4872
- n != null && (m.value = n.value);
4875
+ n != null && (p.value = n.value);
4873
4876
  }
4874
4877
  },
4875
4878
  { immediate: !0 }
4876
4879
  ), (o, s) => {
4877
4880
  var W, ae, le, ne, se, re, ie, de, me, pe, ue, ce, fe, I, R, w, P;
4878
- const n = V("FmIcon"), A = V("FmButton"), N = V("FmMenuDivider"), M = V("FmTextField"), Y = V("FmSelect"), E = V("FmSwitch"), G = V("FmCircularProgress");
4881
+ const n = A("FmIcon"), D = A("FmButton"), N = A("FmMenuDivider"), M = A("FmTextField"), Y = A("FmSelect"), E = A("FmSwitch"), G = A("FmCircularProgress");
4879
4882
  return (ae = (W = e.value) == null ? void 0 : W.platform) != null && ae.mappings ? (_(), U("div", Es, [
4880
4883
  t("div", Bs, [
4881
4884
  t("div", Ys, [
@@ -4890,12 +4893,12 @@ const rs = [
4890
4893
  }),
4891
4894
  t("span", Gs, C(d(a)("report.integration.refreshSetting")), 1)
4892
4895
  ]),
4893
- l(A, {
4896
+ l(D, {
4894
4897
  variant: "tertiary",
4895
4898
  label: d(a)("report.common.delete"),
4896
- onClick: K
4899
+ onClick: V
4897
4900
  }, null, 8, ["label"]),
4898
- l(A, {
4901
+ l(D, {
4899
4902
  variant: "primary",
4900
4903
  label: d(a)("report.common.update"),
4901
4904
  "prepend-icon": "update",
@@ -4983,7 +4986,7 @@ const rs = [
4983
4986
  modelValue: e.value.platform.grouping,
4984
4987
  "onUpdate:modelValue": s[6] || (s[6] = (S) => e.value.platform.grouping = S),
4985
4988
  multiselect: !1,
4986
- items: p,
4989
+ items: m,
4987
4990
  placeholder: d(a)("report.integration.grouping.title"),
4988
4991
  class: "flex-grow"
4989
4992
  }, null, 8, ["modelValue", "placeholder"])
@@ -4996,9 +4999,9 @@ const rs = [
4996
4999
  })),
4997
5000
  g.retrievedDebtors.isLoaded && g.retrievedDebtors.data && ((le = g.retrievedDebtors.data) == null ? void 0 : le.length) != 0 && !g.retrievedDebtors.isError ? (_(), U("div", kr, [
4998
5001
  l(Y, {
4999
- modelValue: d(m),
5002
+ modelValue: d(p),
5000
5003
  "onUpdate:modelValue": [
5001
- s[7] || (s[7] = (S) => Te(m) ? m.value = S : m = S),
5004
+ s[7] || (s[7] = (S) => Te(p) ? p.value = S : p = S),
5002
5005
  r
5003
5006
  ],
5004
5007
  items: g.retrievedDebtors.data,
@@ -5014,7 +5017,7 @@ const rs = [
5014
5017
  key: 0,
5015
5018
  size: "xl"
5016
5019
  })),
5017
- g.retrievedLocations.isLoaded && g.retrievedLocations.data && ((ne = g.retrievedLocations.data) == null ? void 0 : ne.length) != 0 && !g.retrievedLocations.isError ? (_(), U("div", Vr, [
5020
+ g.retrievedLocations.isLoaded && g.retrievedLocations.data && ((ne = g.retrievedLocations.data) == null ? void 0 : ne.length) != 0 && !g.retrievedLocations.isError ? (_(), U("div", Ar, [
5018
5021
  l(Y, {
5019
5022
  modelValue: e.value.platform.mappings.salesLocation,
5020
5023
  "onUpdate:modelValue": s[8] || (s[8] = (S) => e.value.platform.mappings.salesLocation = S),
@@ -5023,7 +5026,7 @@ const rs = [
5023
5026
  class: "flex-grow",
5024
5027
  disabled: !g.retrievedLocations.isLoaded
5025
5028
  }, null, 8, ["modelValue", "items", "placeholder", "disabled"])
5026
- ])) : g.retrievedLocations.isError ? (_(), U("div", Ar, C(d(a)("report.integration.errorFetchingLocation")), 1)) : L("", !0)
5029
+ ])) : g.retrievedLocations.isError ? (_(), U("div", Vr, C(d(a)("report.integration.errorFetchingLocation")), 1)) : L("", !0)
5027
5030
  ])
5028
5031
  ]),
5029
5032
  l(N, { style: { margin: 0 } }),
@@ -5107,7 +5110,7 @@ const rs = [
5107
5110
  l(N, { style: { margin: 0 } }),
5108
5111
  t("div", Or, [
5109
5112
  t("div", Er, C(d(a)("report.integration.biztory.items")), 1),
5110
- l(A, {
5113
+ l(D, {
5111
5114
  variant: "secondary",
5112
5115
  "prepend-icon": "add",
5113
5116
  label: "Add items",
@@ -5148,7 +5151,7 @@ const rs = [
5148
5151
  l(N, { style: { margin: 0 } }),
5149
5152
  t("div", Br, [
5150
5153
  t("div", Yr, C(d(a)("report.integration.biztory.taxes")), 1),
5151
- l(A, {
5154
+ l(D, {
5152
5155
  variant: "secondary",
5153
5156
  "prepend-icon": "add",
5154
5157
  label: "Add taxes",
@@ -5183,7 +5186,7 @@ const rs = [
5183
5186
  l(N, { style: { margin: 0 } }),
5184
5187
  t("div", qr, [
5185
5188
  t("div", Hr, C(d(a)("report.integration.taxRoundingAdjustments")), 1),
5186
- l(A, {
5189
+ l(D, {
5187
5190
  variant: "secondary",
5188
5191
  "prepend-icon": "add",
5189
5192
  label: "Add tax rounding adjustments",
@@ -5218,7 +5221,7 @@ const rs = [
5218
5221
  l(N, { style: { margin: 0 } }),
5219
5222
  t("div", zr, [
5220
5223
  t("div", Qr, C(d(a)("report.integration.biztory.payments")), 1),
5221
- l(A, {
5224
+ l(D, {
5222
5225
  variant: "secondary",
5223
5226
  "prepend-icon": "add",
5224
5227
  label: "Add payments",
@@ -5298,7 +5301,7 @@ const rs = [
5298
5301
  });
5299
5302
  function Wr(g) {
5300
5303
  return g.reduce((a, e) => {
5301
- var F, y, b, m, K, $, u, c, p, f, v, h, r, o;
5304
+ var F, y, b, p, V, $, u, c, m, f, v, h, r, o;
5302
5305
  const { invoice: i, payments: x } = e, T = a.length;
5303
5306
  a[T] = {
5304
5307
  docNo: i.master.docNo,
@@ -5307,33 +5310,33 @@ function Wr(g) {
5307
5310
  itemProductCode: (F = i.details[0]) == null ? void 0 : F.productCode,
5308
5311
  description: (y = i.details[0]) == null ? void 0 : y.description,
5309
5312
  qty: (b = i.details[0]) == null ? void 0 : b.qty,
5310
- unitPrice: (m = i.details[0]) == null ? void 0 : m.unitPrice,
5313
+ unitPrice: (p = i.details[0]) == null ? void 0 : p.unitPrice,
5311
5314
  roundAdj: i.master.roundAdj,
5312
- discount: (K = i.details[0]) == null ? void 0 : K.discount,
5315
+ discount: (V = i.details[0]) == null ? void 0 : V.discount,
5313
5316
  taxCode: ($ = i.details[0]) == null ? void 0 : $.taxCode,
5314
5317
  creditTerm: i.master.creditTerm,
5315
5318
  docType: (u = x[0]) == null ? void 0 : u.master.docType,
5316
- paymentMethod: (p = (c = x[0]) == null ? void 0 : c.paymentDetails[0]) == null ? void 0 : p.paymentMethod,
5319
+ paymentMethod: (m = (c = x[0]) == null ? void 0 : c.paymentDetails[0]) == null ? void 0 : m.paymentMethod,
5317
5320
  amount: ((f = x[0]) == null ? void 0 : f.details[0].amount) || 0,
5318
5321
  currencyCode: (v = x[0]) == null ? void 0 : v.master.currencyCode,
5319
5322
  journalType: (h = x[0]) == null ? void 0 : h.master.journalType
5320
5323
  };
5321
- const D = Math.max(i.details.length, (x == null ? void 0 : x.length) || 0);
5322
- for (let s = 1; s < D; s++) {
5324
+ const K = Math.max(i.details.length, (x == null ? void 0 : x.length) || 0);
5325
+ for (let s = 1; s < K; s++) {
5323
5326
  const n = T + s;
5324
5327
  a[n] || (a[n] = {});
5325
- const A = i.details[s], N = x[s];
5326
- A && (a[n] = {
5328
+ const D = i.details[s], N = x[s];
5329
+ D && (a[n] = {
5327
5330
  ...a[n],
5328
5331
  debtorCode: i.master.debtorCode,
5329
5332
  debtorName: i.master.debtorName,
5330
5333
  creditTerm: i.master.creditTerm,
5331
- itemProductCode: A.productCode,
5332
- description: A.description,
5333
- qty: A.qty,
5334
- unitPrice: A.unitPrice,
5335
- discount: A.discount,
5336
- taxCode: A.taxCode
5334
+ itemProductCode: D.productCode,
5335
+ description: D.description,
5336
+ qty: D.qty,
5337
+ unitPrice: D.unitPrice,
5338
+ discount: D.discount,
5339
+ taxCode: D.taxCode
5337
5340
  }), N && (a[n] = {
5338
5341
  ...a[n],
5339
5342
  debtorCode: i.master.debtorCode,
@@ -5436,7 +5439,7 @@ const Jr = [
5436
5439
  },
5437
5440
  emits: ["update:modelValue"],
5438
5441
  setup(g) {
5439
- const { t: a } = oe(), e = te(g, "modelValue"), i = z(!1), x = _e(), { dateRange: T } = Ee(we()), { options: D, isFeatureAvailable: F } = Ae(), y = z([]);
5442
+ const { t: a } = oe(), e = te(g, "modelValue"), i = z(!1), x = _e(), { dateRange: T } = Ee(we()), { options: K, isFeatureAvailable: F } = Ve(), y = z([]);
5440
5443
  Ce(
5441
5444
  () => T.value,
5442
5445
  async () => {
@@ -5453,18 +5456,18 @@ const Jr = [
5453
5456
  immediate: !0
5454
5457
  }
5455
5458
  );
5456
- const b = q(() => Wr(y.value)), m = q(() => Jr), K = q(() => {
5457
- var p;
5458
- const c = (p = D.find(
5459
+ const b = q(() => Wr(y.value)), p = q(() => Jr), V = q(() => {
5460
+ var m;
5461
+ const c = (m = K.find(
5459
5462
  (f) => f.platform === he.AutoCountCloud
5460
- )) == null ? void 0 : p.flags;
5463
+ )) == null ? void 0 : m.flags;
5461
5464
  return c ? F(c) : !1;
5462
5465
  });
5463
5466
  async function $() {
5464
5467
  try {
5465
5468
  e.value._id && e.value.platform.apiKey ? (i.value = !0, await ze(e.value._id), x.open({ message: a("report.integration.uploadSuccess"), type: "success" })) : x.open({ message: a("report.integration.invalidSetting"), type: "error" });
5466
5469
  } catch (c) {
5467
- c.message && x.open({ message: c.message, type: "error" }), c.errors && c.errors.forEach((p) => x.open({ message: p, type: "error" }));
5470
+ c.message && x.open({ message: c.message, type: "error" }), c.errors && c.errors.forEach((m) => x.open({ message: m, type: "error" }));
5468
5471
  } finally {
5469
5472
  i.value = !1;
5470
5473
  }
@@ -5478,17 +5481,17 @@ const Jr = [
5478
5481
  i.value = !1;
5479
5482
  }
5480
5483
  }
5481
- return (c, p) => {
5482
- const f = V("FmButton"), v = V("FmCircularProgress"), h = V("FmTable");
5484
+ return (c, m) => {
5485
+ const f = A("FmButton"), v = A("FmCircularProgress"), h = A("FmTable");
5483
5486
  return _(), U("div", Zr, [
5484
5487
  t("div", ei, [
5485
5488
  l(Be, {
5486
5489
  "date-range": d(T),
5487
- "onUpdate:dateRange": p[0] || (p[0] = (r) => Te(T) ? T.value = r : null),
5490
+ "onUpdate:dateRange": m[0] || (m[0] = (r) => Te(T) ? T.value = r : null),
5488
5491
  compare: !1
5489
5492
  }, null, 8, ["date-range"]),
5490
5493
  t("div", ti, [
5491
- K.value ? (_(), j(f, {
5494
+ V.value ? (_(), j(f, {
5492
5495
  key: 0,
5493
5496
  loading: i.value,
5494
5497
  variant: "primary",
@@ -5510,7 +5513,7 @@ const Jr = [
5510
5513
  key: 1,
5511
5514
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
5512
5515
  "row-data": b.value,
5513
- "column-defs": m.value
5516
+ "column-defs": p.value
5514
5517
  }, null, 8, ["row-data", "column-defs"]))
5515
5518
  ]);
5516
5519
  };
@@ -5534,7 +5537,7 @@ const Jr = [
5534
5537
  value: "preview",
5535
5538
  icon: "table"
5536
5539
  }
5537
- ], T = be(), D = q(() => {
5540
+ ], T = be(), K = q(() => {
5538
5541
  switch (i.value) {
5539
5542
  case "preview":
5540
5543
  return {
@@ -5554,27 +5557,27 @@ const Jr = [
5554
5557
  }), F = z({}), y = z({}), b = (u) => u.data.map((c) => ({
5555
5558
  label: c.location + " - " + c.description,
5556
5559
  value: c.location
5557
- })), m = (u) => u.data.map((c) => ({
5560
+ })), p = (u) => u.data.map((c) => ({
5558
5561
  label: c.AccNo + " - " + c.CompanyName,
5559
5562
  value: c.AccNo + " - " + c.CompanyName,
5560
5563
  valueAccNo: c.AccNo,
5561
5564
  valueCompanyName: c.CompanyName
5562
- })), K = async (u, c, p, f) => {
5565
+ })), V = async (u, c, m, f) => {
5563
5566
  try {
5564
5567
  const v = await u(e.value._id);
5565
- p.value.data = c(v);
5568
+ m.value.data = c(v);
5566
5569
  } catch (v) {
5567
- console.error(f, v), p.value.isError = !0;
5570
+ console.error(f, v), m.value.isError = !0;
5568
5571
  } finally {
5569
- p.value.isLoaded = !0;
5572
+ m.value.isLoaded = !0;
5570
5573
  }
5571
5574
  }, $ = async () => {
5572
- await K(
5575
+ await V(
5573
5576
  ct,
5574
- m,
5577
+ p,
5575
5578
  y,
5576
5579
  "Failed to fetch debtors:"
5577
- ), await K(
5580
+ ), await V(
5578
5581
  ft,
5579
5582
  b,
5580
5583
  F,
@@ -5585,9 +5588,9 @@ const Jr = [
5585
5588
  e.value.platform.apiKey && e.value.platform.accountBookId && e.value.platform.keyId ? $() : (F.value.isLoaded = !0, y.value.isLoaded = !0, F.value.isError = !0, y.value.isError = !0);
5586
5589
  }), (u, c) => {
5587
5590
  var v, h, r;
5588
- const p = V("FmPageHead"), f = V("FmTabs");
5591
+ const m = A("FmPageHead"), f = A("FmTabs");
5589
5592
  return _(), U("div", ni, [
5590
- l(p, {
5593
+ l(m, {
5591
5594
  title: ((v = e.value) == null ? void 0 : v.name) || "Autocount Cloud",
5592
5595
  "back-button": !0,
5593
5596
  style: { paddingLeft: "0px", paddingRight: "0px" },
@@ -5604,10 +5607,10 @@ const Jr = [
5604
5607
  items: x
5605
5608
  }, null, 8, ["model-value"]),
5606
5609
  t("div", si, [
5607
- (_(), j(Fe((h = D.value) == null ? void 0 : h.component), Qe({
5610
+ (_(), j(Fe((h = K.value) == null ? void 0 : h.component), Qe({
5608
5611
  modelValue: e.value,
5609
5612
  "onUpdate:modelValue": c[2] || (c[2] = (o) => e.value = o)
5610
- }, (r = D.value) == null ? void 0 : r.props), null, 16, ["modelValue"]))
5613
+ }, (r = K.value) == null ? void 0 : r.props), null, 16, ["modelValue"]))
5611
5614
  ])
5612
5615
  ]);
5613
5616
  };
@@ -5615,7 +5618,7 @@ const Jr = [
5615
5618
  }), ii = {
5616
5619
  key: 0,
5617
5620
  class: "flex flex-col h-full w-full"
5618
- }, di = { class: "flex flex-col gap-16 pb-[24px]" }, mi = { class: "flex flex-row justify-between items-center gap-2" }, pi = { class: "flex flex-row gap-2 items-center" }, ui = { class: "relative group cursor-pointer" }, ci = { 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" }, fi = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, gi = { class: "w-[90%] flex flex-col gap-24" }, vi = { class: "flex flex-col gap-16" }, yi = { class: "fm-typo-en-title-sm-800" }, xi = { class: "flex flex-col max-w-[100%]" }, bi = { class: "w-[25%] font-semibold" }, wi = { class: "flex-grow" }, _i = { class: "flex flex-col max-w-[100%]" }, hi = { class: "w-[25%] font-semibold" }, ki = { class: "flex flex-col max-w-[100%]" }, Ci = { class: "w-[25%] font-semibold" }, $i = { class: "flex flex-col gap-16" }, Si = { class: "grid-cols-2 grid gap-16" }, Vi = { class: "flex flex-row items-center justify-between gap-x-16" }, Ai = { class: "flex flex-row items-center justify-between gap-x-16" }, Di = { class: "fm-typo-en-title-sm-800" }, Ki = { class: "flex flex-row items-center justify-between gap-x-16" }, Ti = { class: "flex flex-row items-center justify-between gap-x-16" }, Fi = /* @__PURE__ */ J({
5621
+ }, di = { class: "flex flex-col gap-16 pb-[24px]" }, mi = { class: "flex flex-row justify-between items-center gap-2" }, pi = { class: "flex flex-row gap-2 items-center" }, ui = { class: "relative group cursor-pointer" }, ci = { 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" }, fi = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, gi = { class: "w-[90%] flex flex-col gap-24" }, vi = { class: "flex flex-col gap-16" }, yi = { class: "fm-typo-en-title-sm-800" }, xi = { class: "flex flex-col max-w-[100%]" }, bi = { class: "w-[25%] font-semibold" }, wi = { class: "flex-grow" }, _i = { class: "flex flex-col max-w-[100%]" }, hi = { class: "w-[25%] font-semibold" }, ki = { class: "flex flex-col max-w-[100%]" }, Ci = { class: "w-[25%] font-semibold" }, $i = { class: "flex flex-col gap-16" }, Si = { class: "grid-cols-2 grid gap-16" }, Ai = { class: "flex flex-row items-center justify-between gap-x-16" }, Vi = { class: "flex flex-row items-center justify-between gap-x-16" }, Di = { class: "fm-typo-en-title-sm-800" }, Ki = { class: "flex flex-row items-center justify-between gap-x-16" }, Ti = { class: "flex flex-row items-center justify-between gap-x-16" }, Fi = /* @__PURE__ */ J({
5619
5622
  __name: "Setting",
5620
5623
  props: {
5621
5624
  modelValue: { required: !0 },
@@ -5623,14 +5626,14 @@ const Jr = [
5623
5626
  },
5624
5627
  emits: ["update:modelValue"],
5625
5628
  setup(g) {
5626
- const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ae(), T = be(), { promptLoader: D } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
5629
+ const { t: a } = oe(), e = te(g, "modelValue"), i = _e(), x = Ve(), T = be(), { promptLoader: K } = Pe(), { promptMessage: F } = Oe(), { restaurants: y } = we(), b = q(
5627
5630
  () => y.map((f) => ({ label: f.name, value: f.id }))
5628
5631
  );
5629
- async function m() {
5632
+ async function p() {
5630
5633
  await F({
5631
5634
  message: a("report.messages.confirmDelete", { name: e.value.name }),
5632
5635
  title: a("report.common.delete")
5633
- }) && await D(async () => {
5636
+ }) && await K(async () => {
5634
5637
  try {
5635
5638
  await Me(e.value._id), await x.getSettings(), T.back();
5636
5639
  } catch (v) {
@@ -5638,8 +5641,8 @@ const Jr = [
5638
5641
  }
5639
5642
  });
5640
5643
  }
5641
- async function K() {
5642
- await D(async () => {
5644
+ async function V() {
5645
+ await K(async () => {
5643
5646
  try {
5644
5647
  await je(e.value._id, e.value), await x.getSettings();
5645
5648
  } catch (f) {
@@ -5652,7 +5655,7 @@ const Jr = [
5652
5655
  if (!((o = e.value.platform) != null && o.mappings)) return;
5653
5656
  h || (f === "taxes" ? h = "invoice" : f === "suppliers" ? h = "inventory" : h = "invoice");
5654
5657
  const r = (s = e.value.platform.mappings[h]) == null ? void 0 : s[f];
5655
- r && Array.isArray(r) && (e.value.platform.mappings[h][f] = r.filter((n, A) => A !== v));
5658
+ r && Array.isArray(r) && (e.value.platform.mappings[h][f] = r.filter((n, D) => D !== v));
5656
5659
  }
5657
5660
  function u(f, v) {
5658
5661
  var h;
@@ -5670,8 +5673,8 @@ const Jr = [
5670
5673
  value: ve.BY_INVOICE_ITEM
5671
5674
  }
5672
5675
  ];
5673
- async function p() {
5674
- await D(async () => {
5676
+ async function m() {
5677
+ await K(async () => {
5675
5678
  try {
5676
5679
  await Ke(e.value._id), await x.getSettings();
5677
5680
  } catch (f) {
@@ -5682,9 +5685,9 @@ const Jr = [
5682
5685
  return Re(async () => {
5683
5686
  await x.getSettings();
5684
5687
  }), (f, v) => {
5685
- var A, N, M, Y, E, G, W, ae, le, ne, se, re, ie, de, me, pe, ue, ce, fe;
5686
- const h = V("FmIcon"), r = V("FmButton"), o = V("FmMenuDivider"), s = V("FmTextField"), n = V("FmSelect");
5687
- return (N = (A = e.value) == null ? void 0 : A.platform) != null && N.mappings ? (_(), U("div", ii, [
5688
+ var D, N, M, Y, E, G, W, ae, le, ne, se, re, ie, de, me, pe, ue, ce, fe;
5689
+ const h = A("FmIcon"), r = A("FmButton"), o = A("FmMenuDivider"), s = A("FmTextField"), n = A("FmSelect");
5690
+ return (N = (D = e.value) == null ? void 0 : D.platform) != null && N.mappings ? (_(), U("div", ii, [
5688
5691
  t("div", di, [
5689
5692
  t("div", mi, [
5690
5693
  v[17] || (v[17] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
@@ -5693,20 +5696,20 @@ const Jr = [
5693
5696
  l(h, {
5694
5697
  name: "refresh",
5695
5698
  class: "p-2 bg-gray-100 rounded-full",
5696
- onClick: p
5699
+ onClick: m
5697
5700
  }),
5698
5701
  t("span", ci, C(d(a)("report.integration.refreshSetting")), 1)
5699
5702
  ]),
5700
5703
  l(r, {
5701
5704
  variant: "tertiary",
5702
5705
  label: d(a)("report.common.delete"),
5703
- onClick: m
5706
+ onClick: p
5704
5707
  }, null, 8, ["label"]),
5705
5708
  l(r, {
5706
5709
  variant: "primary",
5707
5710
  label: d(a)("report.common.update"),
5708
5711
  "prepend-icon": "update",
5709
- onClick: K
5712
+ onClick: V
5710
5713
  }, null, 8, ["label"])
5711
5714
  ])
5712
5715
  ])
@@ -5799,7 +5802,7 @@ const Jr = [
5799
5802
  ])
5800
5803
  ]),
5801
5804
  l(o, { style: { margin: 0 } }),
5802
- t("div", Vi, [
5805
+ t("div", Ai, [
5803
5806
  v[19] || (v[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Sales Invoice Items", -1)),
5804
5807
  l(r, {
5805
5808
  variant: "secondary",
@@ -5836,7 +5839,7 @@ const Jr = [
5836
5839
  })
5837
5840
  }, null, 8, ["rows"]),
5838
5841
  l(o, { style: { margin: 0 } }),
5839
- t("div", Ai, [
5842
+ t("div", Vi, [
5840
5843
  t("div", Di, C(d(a)("report.integration.taxes")), 1),
5841
5844
  l(r, {
5842
5845
  variant: "secondary",
@@ -6029,7 +6032,7 @@ const Jr = [
6029
6032
  accountCode: n.accountCode
6030
6033
  });
6031
6034
  return o;
6032
- }, [])), D = q(() => e.value.purchaseOrders.reduce((o, s) => {
6035
+ }, [])), K = q(() => e.value.purchaseOrders.reduce((o, s) => {
6033
6036
  for (const n of s._skus)
6034
6037
  o.push({
6035
6038
  _date: Se(s._date).format("D-MMM-YY"),
@@ -6177,7 +6180,7 @@ const Jr = [
6177
6180
  header: () => k("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Account Code"),
6178
6181
  enableSorting: !1
6179
6182
  }
6180
- ], m = [...b], K = [
6183
+ ], p = [...b], V = [
6181
6184
  {
6182
6185
  accessorKey: "_date",
6183
6186
  header: () => k("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
@@ -6289,7 +6292,7 @@ const Jr = [
6289
6292
  header: () => k("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Net Amt"),
6290
6293
  enableSorting: !1
6291
6294
  }
6292
- ], u = te(g, "modelValue"), c = z(!1), p = _e(), { dateRange: f } = Ee(we());
6295
+ ], u = te(g, "modelValue"), c = z(!1), m = _e(), { dateRange: f } = Ee(we());
6293
6296
  Ce(
6294
6297
  () => f.value,
6295
6298
  async () => {
@@ -6297,7 +6300,7 @@ const Jr = [
6297
6300
  try {
6298
6301
  c.value = !0, e.value = await Le(u.value._id);
6299
6302
  } catch (o) {
6300
- p.open({ message: o.message, type: "error" });
6303
+ m.open({ message: o.message, type: "error" });
6301
6304
  } finally {
6302
6305
  c.value = !1;
6303
6306
  }
@@ -6308,9 +6311,9 @@ const Jr = [
6308
6311
  );
6309
6312
  async function v() {
6310
6313
  try {
6311
- u.value._id ? (c.value = !0, await qe(u.value._id, [r.value])) : p.open({ message: "Invalid accounting setting", type: "error" });
6314
+ u.value._id ? (c.value = !0, await qe(u.value._id, [r.value])) : m.open({ message: "Invalid accounting setting", type: "error" });
6312
6315
  } catch (o) {
6313
- p.open({ message: o.message, type: "error" });
6316
+ m.open({ message: o.message, type: "error" });
6314
6317
  } finally {
6315
6318
  c.value = !1;
6316
6319
  }
@@ -6343,7 +6346,7 @@ const Jr = [
6343
6346
  }
6344
6347
  ], r = z(h[0].value);
6345
6348
  return (o, s) => {
6346
- const n = V("FmButton"), A = V("FmCircularProgress"), N = V("FmTabs"), M = V("FmTable");
6349
+ const n = A("FmButton"), D = A("FmCircularProgress"), N = A("FmTabs"), M = A("FmTable");
6347
6350
  return _(), U("div", Ni, [
6348
6351
  t("div", Ii, [
6349
6352
  l(Be, {
@@ -6359,7 +6362,7 @@ const Jr = [
6359
6362
  }, null, 8, ["loading", "label"])
6360
6363
  ]),
6361
6364
  c.value ? (_(), U("div", Ui, [
6362
- l(A, { size: "xl" }),
6365
+ l(D, { size: "xl" }),
6363
6366
  t("span", Ri, C(d(a)("report.common.isLoading")), 1)
6364
6367
  ])) : (_(), U("div", Pi, [
6365
6368
  l(N, {
@@ -6377,7 +6380,7 @@ const Jr = [
6377
6380
  key: 1,
6378
6381
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
6379
6382
  "row-data": T.value,
6380
- "column-defs": m
6383
+ "column-defs": p
6381
6384
  }, null, 8, ["row-data"])) : r.value === "DELIVERY_ORDER" ? (_(), j(M, {
6382
6385
  key: 2,
6383
6386
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
@@ -6386,8 +6389,8 @@ const Jr = [
6386
6389
  }, null, 8, ["row-data"])) : r.value === "PURCHASE_ORDER" ? (_(), j(M, {
6387
6390
  key: 3,
6388
6391
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
6389
- "row-data": D.value,
6390
- "column-defs": K
6392
+ "row-data": K.value,
6393
+ "column-defs": V
6391
6394
  }, null, 8, ["row-data"])) : L("", !0),
6392
6395
  r.value === "RAW_INVOICE" ? (_(), j(M, {
6393
6396
  key: 4,
@@ -6418,7 +6421,7 @@ const Jr = [
6418
6421
  value: "preview",
6419
6422
  icon: "table"
6420
6423
  }
6421
- ], T = be(), D = q(() => {
6424
+ ], T = be(), K = q(() => {
6422
6425
  switch (i.value) {
6423
6426
  case "preview":
6424
6427
  return Mi;
@@ -6429,11 +6432,11 @@ const Jr = [
6429
6432
  }
6430
6433
  });
6431
6434
  return (F, y) => {
6432
- var K;
6433
- const b = V("FmPageHead"), m = V("FmTabs");
6435
+ var V;
6436
+ const b = A("FmPageHead"), p = A("FmTabs");
6434
6437
  return _(), U("div", ji, [
6435
6438
  l(b, {
6436
- title: ((K = e.value) == null ? void 0 : K.name) || "Synergy",
6439
+ title: ((V = e.value) == null ? void 0 : V.name) || "Synergy",
6437
6440
  "back-button": !0,
6438
6441
  style: { paddingLeft: "0px", paddingRight: "0px" },
6439
6442
  "onClick:back": y[0] || (y[0] = ($) => d(T).push({ name: "integrations" }))
@@ -6443,13 +6446,13 @@ const Jr = [
6443
6446
  ])),
6444
6447
  _: 1
6445
6448
  }, 8, ["title"]),
6446
- l(m, {
6449
+ l(p, {
6447
6450
  "model-value": i.value,
6448
6451
  "onUpdate:modelValue": y[1] || (y[1] = ($) => i.value = $),
6449
6452
  items: x
6450
6453
  }, null, 8, ["model-value"]),
6451
6454
  t("div", Li, [
6452
- (_(), j(Fe(D.value), {
6455
+ (_(), j(Fe(K.value), {
6453
6456
  modelValue: e.value,
6454
6457
  "onUpdate:modelValue": y[2] || (y[2] = ($) => e.value = $)
6455
6458
  }, null, 8, ["modelValue"]))
@@ -6460,24 +6463,24 @@ const Jr = [
6460
6463
  }), Ei = { class: "px-24 h-full relative" }, Xi = /* @__PURE__ */ J({
6461
6464
  __name: "Integration",
6462
6465
  setup(g) {
6463
- const a = z(void 0), { params: e } = at(), i = Ae(), x = z(), T = z([]);
6466
+ const a = z(void 0), { params: e } = at(), i = Ve(), x = z(), T = z([]);
6464
6467
  Ge(async () => {
6465
6468
  i.settings.length === 0 && await i.getSettings();
6466
6469
  }), Ce(
6467
6470
  () => i.settings,
6468
6471
  async (F) => {
6469
6472
  var b;
6470
- const y = F.find((m) => m._id === e.id);
6473
+ const y = F.find((p) => p._id === e.id);
6471
6474
  y && (x.value = y, a.value = (b = x.value.platform) == null ? void 0 : b.name, x.value._id && (T.value = await gt(x.value._id)));
6472
6475
  },
6473
6476
  { immediate: !0 }
6474
6477
  );
6475
- const D = q(() => {
6478
+ const K = q(() => {
6476
6479
  switch (a.value) {
6477
6480
  case he.Xero:
6478
6481
  return To;
6479
6482
  case he.Bukku:
6480
- return Aa;
6483
+ return Va;
6481
6484
  case he.AutoCount:
6482
6485
  return fl;
6483
6486
  case he.SQL:
@@ -6495,7 +6498,7 @@ const Jr = [
6495
6498
  }
6496
6499
  });
6497
6500
  return (F, y) => (_(), U("div", Ei, [
6498
- (_(), j(Fe(D.value), {
6501
+ (_(), j(Fe(K.value), {
6499
6502
  modelValue: x.value,
6500
6503
  "onUpdate:modelValue": y[0] || (y[0] = (b) => x.value = b),
6501
6504
  "error-logs": T.value