@feedmepos/mf-report 5.11.0 → 5.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- import { defineComponent as Z, mergeModels as Me, useModel as ae, computed as z, resolveComponent as U, createElementBlock as _, openBlock as s, createElementVNode as t, createCommentVNode as O, normalizeClass as Se, Fragment as B, renderList as Y, createBlock as N, createVNode as a, withCtx as W, toDisplayString as S, unref as d, renderSlot as st, ref as X, onUnmounted as je, watch as De, isRef as Ke, h as F, resolveDynamicComponent as Ie, mergeProps as ot, onMounted as at } from "vue";
1
+ import { defineComponent as J, mergeModels as Me, useModel as oe, computed as Y, resolveComponent as U, createElementBlock as _, openBlock as i, createElementVNode as t, createCommentVNode as O, normalizeClass as Se, Fragment as B, renderList as z, createBlock as R, createVNode as a, withCtx as G, toDisplayString as S, unref as d, renderSlot as st, ref as H, onUnmounted as je, watch as De, isRef as Ke, h as F, resolveDynamicComponent as Ie, mergeProps as at, onMounted as lt } from "vue";
2
2
  import { useRouter as Ve, useRoute as it } from "vue-router";
3
- import { u as ne, I as Ae, d as lt, s as rt, e as Ne, f as Le, b as $e, v as dt, o as ct, t as Oe, w as Be, x as Ee, y as qe, z as et, A as mt, B as ut, E as pt, G as Fe, H as We, J as ft, K as vt, L as gt, M as yt } from "./vue-i18n-B1WI_h8l.js";
4
- import { u as ze } from "./message-dialog-UoMWOnil.js";
3
+ import { u as le, I as Ae, d as et, s as rt, e as Ne, f as Le, b as $e, v as dt, o as ct, t as Oe, w as Be, x as Ee, y as qe, z as tt, A as mt, B as ut, E as pt, G as Fe, H as We, J as ft, K as vt, L as gt, M as yt } from "./vue-i18n-B1WI_h8l.js";
4
+ import { u as Ye } from "./message-dialog-UoMWOnil.js";
5
5
  import { useSnackbar as Ce } from "@feedmepos/ui-library";
6
- import { storeToRefs as Ye } from "pinia";
6
+ import { storeToRefs as ze } from "pinia";
7
7
  import { _ as He } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-CgLjbbN6.js";
8
8
  const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, bt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, _t = {
9
9
  key: 0,
10
10
  class: "w-[24px] flex items-center"
11
- }, M = /* @__PURE__ */ Z({
11
+ }, j = /* @__PURE__ */ J({
12
12
  __name: "MappingField",
13
13
  props: /* @__PURE__ */ Me({
14
14
  removable: {
@@ -37,9 +37,9 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
37
37
  }),
38
38
  emits: /* @__PURE__ */ Me(["remove"], ["update:modelValue"]),
39
39
  setup(f, { emit: o }) {
40
- const e = ae(f, "modelValue"), i = f, x = z(
41
- () => Object.keys(i.options).map((h) => {
42
- const T = i.options[h];
40
+ const e = oe(f, "modelValue"), s = f, x = Y(
41
+ () => Object.keys(s.options).map((h) => {
42
+ const T = s.options[h];
43
43
  return {
44
44
  placeholder: T.placeholder,
45
45
  key: h,
@@ -49,16 +49,16 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
49
49
  ), A = o;
50
50
  return (h, T) => {
51
51
  const w = U("FmTextField"), k = U("FmTooltip"), m = U("FmIcon");
52
- return s(), _("div", xt, [
52
+ return i(), _("div", xt, [
53
53
  t("div", {
54
54
  class: Se(`${f.removable || !f.isTakeWholeRow ? "w-[calc(100%-24px)] flex-row" : "w-[100%] flex-col"} flex items-start gap-[4px]`)
55
55
  }, [
56
- (s(!0), _(B, null, Y(x.value, (V) => {
56
+ (i(!0), _(B, null, z(x.value, (V) => {
57
57
  var $;
58
- return s(), _(B, {
58
+ return i(), _(B, {
59
59
  key: V.key
60
60
  }, [
61
- V.editable ? (s(), _("div", {
61
+ V.editable ? (i(), _("div", {
62
62
  key: 0,
63
63
  class: Se(`${f.removable || !f.isTakeWholeRow ? "w-[50%]" : "w-[100%]"}`)
64
64
  }, [
@@ -75,12 +75,12 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
75
75
  };
76
76
  }
77
77
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
78
- ], 2)) : (s(), N(k, {
78
+ ], 2)) : (i(), R(k, {
79
79
  key: 1,
80
80
  content: ($ = e.value[V.key]) == null ? void 0 : $.toString(),
81
81
  class: "w-[50%]"
82
82
  }, {
83
- default: W(() => [
83
+ default: G(() => [
84
84
  t("div", bt, S(e.value[V.key]), 1)
85
85
  ]),
86
86
  _: 2
@@ -88,7 +88,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
88
88
  ], 64);
89
89
  }), 128))
90
90
  ], 2),
91
- f.removable ? (s(), _("div", _t, [
91
+ f.removable ? (i(), _("div", _t, [
92
92
  a(m, {
93
93
  class: "cursor-pointer text-fm-color-neutral-gray-400",
94
94
  name: "delete",
@@ -105,7 +105,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
105
105
  }, Vt = { class: "flex flex-col w-[100%] justify-between" }, $t = { class: "flex flex-row items-center w-[100%] justify-start" }, Ct = { class: "text-nowrap overflow-hidden text-ellipsis font-semibold w-[25%]" }, St = {
106
106
  key: 0,
107
107
  class: "flex flex-col w-[100%] justify-start"
108
- }, At = { class: "text-nowrap overflow-hidden text-ellipsis font-semibold" }, Dt = { class: "w-[100%]" }, Ft = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ut = { class: "flex flex-col w-[100%] justify-between" }, Tt = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis font-semibold" }, Kt = { class: "w-[100%]" }, Xe = /* @__PURE__ */ Z({
108
+ }, At = { class: "text-nowrap overflow-hidden text-ellipsis font-semibold" }, Dt = { class: "w-[100%]" }, Ft = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ut = { class: "flex flex-col w-[100%] justify-between" }, Tt = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis font-semibold" }, Kt = { class: "w-[100%]" }, Xe = /* @__PURE__ */ J({
109
109
  __name: "UploadSection",
110
110
  props: /* @__PURE__ */ Me({
111
111
  label: {
@@ -122,7 +122,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
122
122
  }),
123
123
  emits: ["update:modelValue"],
124
124
  setup(f) {
125
- const { t: o } = ne(), e = ae(f, "modelValue"), i = z(() => {
125
+ const { t: o } = le(), e = oe(f, "modelValue"), s = Y(() => {
126
126
  switch (e.value.name) {
127
127
  case Ae.AutoCount:
128
128
  case Ae.SQL:
@@ -135,10 +135,10 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
135
135
  return (x, A) => {
136
136
  var k, m;
137
137
  const h = U("FmSwitch"), T = U("FmTextField"), w = U("FmTimePicker");
138
- return s(), _(B, null, [
138
+ return i(), _(B, null, [
139
139
  t("div", ht, [
140
140
  t("div", wt, S(d(o)("report.integration.auto", { label: f.label })), 1),
141
- f.label == "upload" ? (s(), _("div", kt, S(d(o)("report.integration.lastUploadDate")) + ": " + S(f.lastUploadDate ? d(lt)(f.lastUploadDate).format("MMMM D, YYYY h:mm A") : d(o)("report.integration.noData.title")), 1)) : O("", !0)
141
+ f.label == "upload" ? (i(), _("div", kt, S(d(o)("report.integration.lastUploadDate")) + ": " + S(f.lastUploadDate ? d(et)(f.lastUploadDate).format("MMMM D, YYYY h:mm A") : d(o)("report.integration.noData.title")), 1)) : O("", !0)
142
142
  ]),
143
143
  t("div", Vt, [
144
144
  t("div", $t, [
@@ -150,7 +150,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
150
150
  }, null, 8, ["modelValue"])
151
151
  ])
152
152
  ]),
153
- i.value ? (s(), _("div", St, [
153
+ s.value ? (i(), _("div", St, [
154
154
  t("div", At, S(d(o)("report.common.email")), 1),
155
155
  t("div", Dt, [
156
156
  a(T, {
@@ -174,14 +174,14 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
174
174
  t("div", Kt, [
175
175
  a(w, {
176
176
  class: "gap-[0px]",
177
- "model-value": d(lt)().hour(((k = e.value.triggerTime) == null ? void 0 : k.hour) ?? 0).minute(((m = e.value.triggerTime) == null ? void 0 : m.minute) ?? 0).format("HH:mm"),
177
+ "model-value": d(et)().hour(((k = e.value.triggerTime) == null ? void 0 : k.hour) ?? 0).minute(((m = e.value.triggerTime) == null ? void 0 : m.minute) ?? 0).format("HH:mm"),
178
178
  "onUpdate:modelValue": A[2] || (A[2] = (V) => {
179
179
  V && (e.value.triggerTime.hour = Number(V.split(":")[0]), e.value.triggerTime.minute = Number(V.split(":")[1]));
180
180
  })
181
181
  }, null, 8, ["model-value"])
182
182
  ])
183
183
  ]),
184
- a(M, {
184
+ a(j, {
185
185
  "model-value": {
186
186
  label: d(o)("report.integration.delayDay"),
187
187
  delayDay: e.value.delayDay
@@ -203,7 +203,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
203
203
  }), It = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, Nt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, Rt = {
204
204
  key: 0,
205
205
  class: "w-[24px] flex items-center"
206
- }, Ge = /* @__PURE__ */ Z({
206
+ }, Ge = /* @__PURE__ */ J({
207
207
  __name: "MappingDropdown",
208
208
  props: /* @__PURE__ */ Me({
209
209
  removable: {
@@ -232,9 +232,9 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
232
232
  }),
233
233
  emits: /* @__PURE__ */ Me(["remove"], ["update:modelValue"]),
234
234
  setup(f, { emit: o }) {
235
- const e = ae(f, "modelValue"), i = f, x = z(
236
- () => Object.keys(i.options).map((k) => {
237
- const m = i.options[k];
235
+ const e = oe(f, "modelValue"), s = f, x = Y(
236
+ () => Object.keys(s.options).map((k) => {
237
+ const m = s.options[k];
238
238
  return {
239
239
  placeholder: m.placeholder,
240
240
  key: k,
@@ -243,36 +243,36 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
243
243
  };
244
244
  })
245
245
  ), A = (k, m) => {
246
- i.singleValueMode ? e.value = i.type === "number" ? Number(k) : k : m && (e.value = {
246
+ s.singleValueMode ? e.value = s.type === "number" ? Number(k) : k : m && (e.value = {
247
247
  ...e.value,
248
- [m]: i.type === "number" ? Number(k) : k
248
+ [m]: s.type === "number" ? Number(k) : k
249
249
  });
250
250
  }, h = (k) => {
251
251
  var m;
252
- return i.singleValueMode ? i.options.key.placeholder : (m = e.value[k.key]) == null ? void 0 : m.toString();
253
- }, T = (k) => i.singleValueMode ? e.value : e.value[k.key], w = o;
252
+ return s.singleValueMode ? s.options.key.placeholder : (m = e.value[k.key]) == null ? void 0 : m.toString();
253
+ }, T = (k) => s.singleValueMode ? e.value : e.value[k.key], w = o;
254
254
  return (k, m) => {
255
255
  const V = U("FmSelect"), $ = U("FmTextField"), p = U("FmTooltip"), y = U("FmIcon");
256
- return s(), _("div", It, [
256
+ return i(), _("div", It, [
257
257
  t("div", {
258
258
  class: Se(`${f.removable ? "w-[calc(100%-24px)] flex-row" : "w-[100%] flex-col"} flex items-center gap-[4px]`),
259
259
  style: { alignItems: "start" }
260
260
  }, [
261
- (s(!0), _(B, null, Y(x.value, (c) => (s(), _(B, {
261
+ (i(!0), _(B, null, z(x.value, (c) => (i(), _(B, {
262
262
  key: c.key
263
263
  }, [
264
- c.editable ? (s(), _("div", {
264
+ c.editable ? (i(), _("div", {
265
265
  key: 0,
266
266
  class: Se(f.removable ? "w-[50%]" : "w-[100%]")
267
267
  }, [
268
- c.dropdownOptions ? (s(), N(V, {
268
+ c.dropdownOptions ? (i(), R(V, {
269
269
  key: 0,
270
270
  "model-value": T(c),
271
271
  placeholder: c.placeholder,
272
272
  items: c.dropdownOptions,
273
273
  "shift-menu": !0,
274
274
  "onUpdate:modelValue": (v) => A(v, c.key)
275
- }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (s(), N($, {
275
+ }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (i(), R($, {
276
276
  key: 1,
277
277
  "model-value": T(c),
278
278
  placeholder: c.placeholder,
@@ -280,19 +280,19 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
280
280
  rules: f.rules,
281
281
  "onUpdate:modelValue": (v) => A(v, c.key)
282
282
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
283
- ], 2)) : (s(), N(p, {
283
+ ], 2)) : (i(), R(p, {
284
284
  key: 1,
285
285
  content: h(c),
286
286
  class: "w-[50%]"
287
287
  }, {
288
- default: W(() => [
288
+ default: G(() => [
289
289
  t("div", Nt, S(h(c)), 1)
290
290
  ]),
291
291
  _: 2
292
292
  }, 1032, ["content"]))
293
293
  ], 64))), 128))
294
294
  ], 2),
295
- f.removable ? (s(), _("div", Rt, [
295
+ f.removable ? (i(), _("div", Rt, [
296
296
  a(y, {
297
297
  class: "cursor-pointer text-fm-color-neutral-gray-400",
298
298
  name: "delete",
@@ -324,13 +324,13 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
324
324
  }, qt = {
325
325
  key: 1,
326
326
  class: "w-[24px] flex-shrink-0"
327
- }, zt = {
327
+ }, Yt = {
328
328
  key: 0,
329
329
  class: "w-[28px] mr-2"
330
- }, Yt = {
330
+ }, zt = {
331
331
  key: 1,
332
332
  class: "w-[24px]"
333
- }, Ht = "font-medium text-gray-600 bg-gray-100 p-3 border-b-4", Xt = /* @__PURE__ */ Z({
333
+ }, Ht = "font-medium text-gray-600 bg-gray-100 p-3 border-b-4", Xt = /* @__PURE__ */ J({
334
334
  __name: "MappingHeader",
335
335
  props: {
336
336
  headerItems: {},
@@ -341,89 +341,89 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
341
341
  isTakeWholeRow: { type: Boolean }
342
342
  },
343
343
  setup(f) {
344
- const o = f, e = z(
344
+ const o = f, e = Y(
345
345
  () => o.headerItems.length === 3 && (o.columnsPerRow === 1 || o.columnsPerRow === void 0)
346
- ), i = z(() => {
346
+ ), s = Y(() => {
347
347
  const m = o.columnsPerRow || 2;
348
348
  return o.totalItemsCount > 1 ? Math.min(o.totalItemsCount, m) : 1;
349
- }), x = z(() => e.value || o.isTakeWholeRow), A = z(
349
+ }), x = Y(() => e.value || o.isTakeWholeRow), A = Y(
350
350
  () => x.value ? "grid-cols-1 grid gap-x-16 mb-2" : "xs:grid-cols-1 grid-cols-2 grid gap-16 mb-2"
351
- ), h = z(() => [
351
+ ), h = Y(() => [
352
352
  Ht,
353
353
  x.value ? "grid grid-cols-1" : "flex flex-row w-full gap-[4px] justify-between"
354
- ]), T = z(() => o.isIncludePreAction && o.isIncludePostAction ? "w-[calc(100%-48px)]" : o.isIncludePreAction || o.isIncludePostAction ? "w-[calc(100%-24px)]" : "w-full"), w = z(
354
+ ]), T = Y(() => o.isIncludePreAction && o.isIncludePostAction ? "w-[calc(100%-48px)]" : o.isIncludePreAction || o.isIncludePostAction ? "w-[calc(100%-24px)]" : "w-full"), w = Y(
355
355
  () => e.value ? "grid grid-cols-3" : "flex flex-row"
356
- ), k = z(
356
+ ), k = Y(
357
357
  () => !e.value && o.isTakeWholeRow ? "w-[50%]" : e.value ? "" : "w-[50%]"
358
358
  // Default width for 2-column items
359
359
  );
360
- return (m, V) => m.totalItemsCount > 0 ? (s(), _("div", {
360
+ return (m, V) => m.totalItemsCount > 0 ? (i(), _("div", {
361
361
  key: 0,
362
362
  class: Se(A.value)
363
363
  }, [
364
- i.value === 1 ? (s(), _("div", {
364
+ s.value === 1 ? (i(), _("div", {
365
365
  key: 0,
366
366
  class: Se(h.value)
367
367
  }, [
368
- x.value ? (s(), _("div", Pt, [
369
- m.isIncludePreAction ? (s(), _("div", Mt)) : O("", !0),
368
+ x.value ? (i(), _("div", Pt, [
369
+ m.isIncludePreAction ? (i(), _("div", Mt)) : O("", !0),
370
370
  t("div", {
371
371
  class: Se(["flex-grow", w.value])
372
372
  }, [
373
- (s(!0), _(B, null, Y(m.headerItems, ($, p) => (s(), _("div", {
373
+ (i(!0), _(B, null, z(m.headerItems, ($, p) => (i(), _("div", {
374
374
  key: `header-item-${p}`,
375
375
  class: Se(k.value)
376
376
  }, S($), 3))), 128))
377
377
  ], 2),
378
- m.isIncludePostAction ? (s(), _("div", jt)) : O("", !0)
379
- ])) : (s(), _(B, { key: 1 }, [
380
- m.isIncludePreAction ? (s(), _("div", Lt)) : O("", !0),
378
+ m.isIncludePostAction ? (i(), _("div", jt)) : O("", !0)
379
+ ])) : (i(), _(B, { key: 1 }, [
380
+ m.isIncludePreAction ? (i(), _("div", Lt)) : O("", !0),
381
381
  t("div", {
382
382
  class: Se([T.value, "flex flex-row"])
383
383
  }, [
384
- (s(!0), _(B, null, Y(m.headerItems, ($, p) => (s(), _("div", {
384
+ (i(!0), _(B, null, z(m.headerItems, ($, p) => (i(), _("div", {
385
385
  key: `header-item-${p}`,
386
386
  class: "w-[50%]"
387
387
  }, S($), 1))), 128))
388
388
  ], 2),
389
- m.isIncludePostAction ? (s(), _("div", Ot)) : O("", !0)
389
+ m.isIncludePostAction ? (i(), _("div", Ot)) : O("", !0)
390
390
  ], 64))
391
- ], 2)) : (s(), _(B, { key: 1 }, [
392
- x.value ? (s(), _("div", {
391
+ ], 2)) : (i(), _(B, { key: 1 }, [
392
+ x.value ? (i(), _("div", {
393
393
  key: 0,
394
394
  class: Se(h.value)
395
395
  }, [
396
396
  t("div", Bt, [
397
- m.isIncludePreAction ? (s(), _("div", Et)) : O("", !0),
397
+ m.isIncludePreAction ? (i(), _("div", Et)) : O("", !0),
398
398
  t("div", {
399
399
  class: Se(["flex-grow", w.value])
400
400
  }, [
401
- (s(!0), _(B, null, Y(m.headerItems, ($, p) => (s(), _("div", {
401
+ (i(!0), _(B, null, z(m.headerItems, ($, p) => (i(), _("div", {
402
402
  key: `header-item-${p}`,
403
403
  class: Se(k.value)
404
404
  }, S($), 3))), 128))
405
405
  ], 2),
406
- m.isIncludePostAction ? (s(), _("div", qt)) : O("", !0)
406
+ m.isIncludePostAction ? (i(), _("div", qt)) : O("", !0)
407
407
  ])
408
- ], 2)) : (s(!0), _(B, { key: 1 }, Y(i.value, ($) => (s(), _("div", {
408
+ ], 2)) : (i(!0), _(B, { key: 1 }, z(s.value, ($) => (i(), _("div", {
409
409
  key: `header-column-${$}`,
410
410
  class: Se(h.value)
411
411
  }, [
412
- m.isIncludePreAction ? (s(), _("div", zt)) : O("", !0),
412
+ m.isIncludePreAction ? (i(), _("div", Yt)) : O("", !0),
413
413
  t("div", {
414
414
  class: Se([T.value, "flex flex-row"])
415
415
  }, [
416
- (s(!0), _(B, null, Y(m.headerItems, (p, y) => (s(), _("div", {
416
+ (i(!0), _(B, null, z(m.headerItems, (p, y) => (i(), _("div", {
417
417
  key: `header-item-${y}`,
418
418
  class: "w-[50%]"
419
419
  }, S(p), 1))), 128))
420
420
  ], 2),
421
- m.isIncludePostAction ? (s(), _("div", Yt)) : O("", !0)
421
+ m.isIncludePostAction ? (i(), _("div", zt)) : O("", !0)
422
422
  ], 2))), 128))
423
423
  ], 64))
424
424
  ], 2)) : O("", !0);
425
425
  }
426
- }), de = /* @__PURE__ */ Z({
426
+ }), re = /* @__PURE__ */ J({
427
427
  __name: "MappingSection",
428
428
  props: {
429
429
  headerItems: {},
@@ -434,7 +434,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
434
434
  isTakeWholeRow: { type: Boolean }
435
435
  },
436
436
  setup(f) {
437
- return (o, e) => (s(), _("div", null, [
437
+ return (o, e) => (i(), _("div", null, [
438
438
  a(Xt, {
439
439
  "header-items": o.headerItems,
440
440
  "total-items-count": o.totalItemsCount,
@@ -458,7 +458,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
458
458
  }, ho = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, wo = { class: "flex flex-row items-center justify-between gap-x-16" }, ko = {
459
459
  key: 6,
460
460
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
461
- }, Vo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, $o = /* @__PURE__ */ Z({
461
+ }, Vo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, $o = /* @__PURE__ */ J({
462
462
  __name: "Setting",
463
463
  props: /* @__PURE__ */ Me({
464
464
  tenantOptions: {
@@ -479,16 +479,16 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
479
479
  }),
480
480
  emits: ["update:modelValue"],
481
481
  setup(f) {
482
- const { t: o } = ne(), e = ae(f, "modelValue"), i = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = ze(), { restaurants: w } = $e(), k = X(!1), m = z(
482
+ const { t: o } = le(), e = oe(f, "modelValue"), s = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = Ye(), { restaurants: w } = $e(), k = H(!1), m = Y(
483
483
  () => w.map((l) => ({ label: l.name, value: l.id }))
484
- ), V = z(() => {
484
+ ), V = Y(() => {
485
485
  var l, n;
486
486
  return k.value ? "Connecting" : (n = (l = e.value) == null ? void 0 : l.platform) != null && n.accessToken ? "Disconnect" : "Connect";
487
- }), $ = X(0);
487
+ }), $ = H(0);
488
488
  async function p() {
489
489
  var l;
490
490
  if (k.value)
491
- i.open({ type: "error", message: "Connecting in progress" });
491
+ s.open({ type: "error", message: "Connecting in progress" });
492
492
  else if ((l = e.value.platform) != null && l.accessToken)
493
493
  await T({
494
494
  message: o("report.integration.xero.confirmDisconnect", { name: e.value.name }),
@@ -509,10 +509,10 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
509
509
  }, 5e3);
510
510
  window.open(n.redirect, "_blank");
511
511
  } catch (n) {
512
- i.open({ type: "error", message: n.message });
512
+ s.open({ type: "error", message: n.message });
513
513
  }
514
514
  else
515
- i.open({ type: "error", message: `invalid accounting ${e.value._id}` });
515
+ s.open({ type: "error", message: `invalid accounting ${e.value._id}` });
516
516
  }
517
517
  async function y() {
518
518
  await T({
@@ -522,7 +522,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
522
522
  try {
523
523
  await Oe(e.value._id), await x.getSettings(), A.back();
524
524
  } catch (n) {
525
- i.open({ type: "error", message: n.message });
525
+ s.open({ type: "error", message: n.message });
526
526
  }
527
527
  });
528
528
  }
@@ -531,7 +531,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
531
531
  try {
532
532
  await Be(e.value._id, e.value), await x.getSettings();
533
533
  } catch (l) {
534
- i.open({ type: "error", message: l.message });
534
+ s.open({ type: "error", message: l.message });
535
535
  }
536
536
  });
537
537
  }
@@ -545,7 +545,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
545
545
  function b(l, n) {
546
546
  var C, I;
547
547
  (I = (C = e.value.platform) == null ? void 0 : C.mappings) != null && I[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
548
- (R, Q) => Q !== n
548
+ (M, X) => X !== n
549
549
  ));
550
550
  }
551
551
  function g(l) {
@@ -570,16 +570,16 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
570
570
  try {
571
571
  await Ee(e.value._id), await x.getSettings();
572
572
  } catch (l) {
573
- i.open({ type: "error", message: l.message });
573
+ s.open({ type: "error", message: l.message });
574
574
  }
575
575
  });
576
576
  }
577
577
  return je(async () => {
578
578
  await x.getSettings();
579
579
  }), (l, n) => {
580
- var ee, re, me, se, ce, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E, H, u, j, D, K, P, q, le, L, ie, ke, we;
581
- const C = U("FmIcon"), I = U("FmButton"), R = U("FmMenuDivider"), Q = U("FmCircularProgress"), te = U("FmSelect"), J = U("FmTextField"), G = U("FmSwitch");
582
- return (re = (ee = e.value) == null ? void 0 : ee.platform) != null && re.mappings ? (s(), _("div", Qt, [
580
+ var Z, ie, ce, ne, de, me, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E, u, P, K, D, N, q, ae, L, se, ke, we;
581
+ const C = U("FmIcon"), I = U("FmButton"), M = U("FmMenuDivider"), X = U("FmCircularProgress"), ee = U("FmSelect"), W = U("FmTextField"), Q = U("FmSwitch");
582
+ return (ie = (Z = e.value) == null ? void 0 : Z.platform) != null && ie.mappings ? (i(), _("div", Qt, [
583
583
  t("div", Gt, [
584
584
  t("div", Wt, [
585
585
  n[10] || (n[10] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
@@ -606,7 +606,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
606
606
  ])
607
607
  ])
608
608
  ]),
609
- a(R, { style: { margin: 0 } }),
609
+ a(M, { style: { margin: 0 } }),
610
610
  t("div", eo, [
611
611
  t("div", to, [
612
612
  n[21] || (n[21] = t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Authenticate with your official Xero account to enable FeedMe to securely upload data to Xero. ", -1)),
@@ -619,35 +619,35 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
619
619
  onClick: p
620
620
  }, null, 8, ["disabled", "label"])
621
621
  ]),
622
- !f.tenantOptions.isLoaded && ((me = e.value.platform) != null && me.accessToken) ? (s(), N(Q, {
622
+ !f.tenantOptions.isLoaded && ((ce = e.value.platform) != null && ce.accessToken) ? (i(), R(X, {
623
623
  key: 0,
624
624
  size: "xl"
625
625
  })) : O("", !0),
626
- a(te, {
626
+ a(ee, {
627
627
  class: "flex-grow",
628
628
  items: f.tenantOptions.data || [],
629
- "model-value": (se = e.value.platform.tenant) == null ? void 0 : se.id,
630
- placeholder: f.tenantOptions.data ? (ce = e.value.platform.tenant) == null ? void 0 : ce.name : "Select tenant ",
629
+ "model-value": (ne = e.value.platform.tenant) == null ? void 0 : ne.id,
630
+ placeholder: f.tenantOptions.data ? (de = e.value.platform.tenant) == null ? void 0 : de.name : "Select tenant ",
631
631
  "onUpdate:modelValue": v
632
632
  }, null, 8, ["items", "model-value", "placeholder"])
633
633
  ]),
634
- a(R, { style: { margin: 0 } }),
634
+ a(M, { style: { margin: 0 } }),
635
635
  t("div", lo, [
636
636
  n[13] || (n[13] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "General", -1)),
637
637
  t("div", no, [
638
638
  n[11] || (n[11] = t("div", { class: "w-[25%] font-semibold" }, "Name", -1)),
639
639
  t("div", so, [
640
- a(J, {
640
+ a(W, {
641
641
  modelValue: e.value.name,
642
- "onUpdate:modelValue": n[0] || (n[0] = (oe) => e.value.name = oe)
642
+ "onUpdate:modelValue": n[0] || (n[0] = (te) => e.value.name = te)
643
643
  }, null, 8, ["modelValue"])
644
644
  ])
645
645
  ]),
646
646
  t("div", io, [
647
647
  n[12] || (n[12] = t("div", { class: "w-[25%] font-semibold" }, "Location", -1)),
648
- a(te, {
648
+ a(ee, {
649
649
  modelValue: e.value.platform.locationIds,
650
- "onUpdate:modelValue": n[1] || (n[1] = (oe) => e.value.platform.locationIds = oe),
650
+ "onUpdate:modelValue": n[1] || (n[1] = (te) => e.value.platform.locationIds = te),
651
651
  multiselect: !0,
652
652
  items: m.value,
653
653
  placeholder: "Select location",
@@ -655,22 +655,22 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
655
655
  }, null, 8, ["modelValue", "items"])
656
656
  ])
657
657
  ]),
658
- a(R, { style: { margin: 0 } }),
658
+ a(M, { style: { margin: 0 } }),
659
659
  a(Xe, {
660
660
  modelValue: e.value.platform,
661
- "onUpdate:modelValue": n[2] || (n[2] = (oe) => e.value.platform = oe),
661
+ "onUpdate:modelValue": n[2] || (n[2] = (te) => e.value.platform = te),
662
662
  label: "upload",
663
- "last-upload-date": (ue = e.value.platform) == null ? void 0 : ue.lastUploadDate
663
+ "last-upload-date": (me = e.value.platform) == null ? void 0 : me.lastUploadDate
664
664
  }, null, 8, ["modelValue", "last-upload-date"]),
665
- a(R, { style: { margin: 0 } }),
665
+ a(M, { style: { margin: 0 } }),
666
666
  t("div", ro, [
667
667
  n[20] || (n[20] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "Mapping", -1)),
668
668
  t("div", co, [
669
669
  n[14] || (n[14] = t("div", { class: "w-[25%] font-semibold" }, "Contact", -1)),
670
670
  t("div", mo, [
671
- a(J, {
671
+ a(W, {
672
672
  modelValue: e.value.platform.mappings.contact.xeroAccount,
673
- "onUpdate:modelValue": n[3] || (n[3] = (oe) => e.value.platform.mappings.contact.xeroAccount = oe),
673
+ "onUpdate:modelValue": n[3] || (n[3] = (te) => e.value.platform.mappings.contact.xeroAccount = te),
674
674
  placeholder: "Contact account number"
675
675
  }, null, 8, ["modelValue"])
676
676
  ])
@@ -678,11 +678,11 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
678
678
  t("div", uo, [
679
679
  n[15] || (n[15] = t("div", { class: "w-[25%] font-semibold" }, "Discount as Item", -1)),
680
680
  t("div", po, [
681
- a(G, {
681
+ a(Q, {
682
682
  "model-value": e.value.platform.discountItem ?? !1,
683
683
  style: { gap: 0 },
684
- "onUpdate:modelValue": n[4] || (n[4] = (oe) => {
685
- e.value.platform.discountItem = oe;
684
+ "onUpdate:modelValue": n[4] || (n[4] = (te) => {
685
+ e.value.platform.discountItem = te;
686
686
  })
687
687
  }, null, 8, ["model-value"])
688
688
  ])
@@ -690,16 +690,16 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
690
690
  t("div", fo, [
691
691
  n[16] || (n[16] = t("div", { class: "w-[25%] font-semibold" }, "Combine Refund", -1)),
692
692
  t("div", vo, [
693
- a(G, {
693
+ a(Q, {
694
694
  "model-value": e.value.platform.mappings.isCombineRefund ?? !1,
695
695
  style: { gap: 0 },
696
- "onUpdate:modelValue": n[5] || (n[5] = (oe) => {
697
- e.value.platform.mappings.isCombineRefund = oe;
696
+ "onUpdate:modelValue": n[5] || (n[5] = (te) => {
697
+ e.value.platform.mappings.isCombineRefund = te;
698
698
  })
699
699
  }, null, 8, ["model-value"])
700
700
  ])
701
701
  ]),
702
- a(R, { style: { margin: 0 } }),
702
+ a(M, { style: { margin: 0 } }),
703
703
  t("div", go, [
704
704
  n[17] || (n[17] = t("div", { class: "fm-typo-en-title-sm-800" }, "Taxes", -1)),
705
705
  a(I, {
@@ -709,25 +709,25 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
709
709
  onClick: n[6] || (n[6] = () => g("taxes"))
710
710
  })
711
711
  ]),
712
- f.taxOptions.isError || e.value.platform.accessToken == null ? (s(), _("div", yo, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : O("", !0),
713
- !f.taxOptions.isLoaded && ((pe = e.value.platform) != null && pe.accessToken) ? (s(), N(Q, {
712
+ f.taxOptions.isError || e.value.platform.accessToken == null ? (i(), _("div", yo, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : O("", !0),
713
+ !f.taxOptions.isLoaded && ((ue = e.value.platform) != null && ue.accessToken) ? (i(), R(X, {
714
714
  key: 1,
715
715
  size: "xl"
716
716
  })) : O("", !0),
717
- ((fe = f.taxOptions.data) == null ? void 0 : fe.length) > 0 ? (s(), N(de, {
717
+ ((pe = f.taxOptions.data) == null ? void 0 : pe.length) > 0 ? (i(), R(re, {
718
718
  key: 2,
719
719
  "header-items": ["Feedme Key", "Tax"],
720
- "total-items-count": (((xe = (ye = (ge = (ve = e.value) == null ? void 0 : ve.platform) == null ? void 0 : ge.mappings) == null ? void 0 : ye.taxes) == null ? void 0 : xe.length) || 0) + (((E = (he = (_e = (be = e.value) == null ? void 0 : be.platform) == null ? void 0 : _e.mappings) == null ? void 0 : he.taxRoundingAdjustments) == null ? void 0 : E.length) || 0),
720
+ "total-items-count": (((ye = (ge = (ve = (fe = e.value) == null ? void 0 : fe.platform) == null ? void 0 : ve.mappings) == null ? void 0 : ge.taxes) == null ? void 0 : ye.length) || 0) + (((he = (_e = (be = (xe = e.value) == null ? void 0 : xe.platform) == null ? void 0 : be.mappings) == null ? void 0 : _e.taxRoundingAdjustments) == null ? void 0 : he.length) || 0),
721
721
  "is-include-post-action": !0
722
722
  }, {
723
- default: W(() => {
724
- var oe, Re, Pe, Ze, Ue, Qe;
723
+ default: G(() => {
724
+ var te, Re, Pe, Ze, Ue, Qe;
725
725
  return [
726
726
  t("div", xo, [
727
- (s(!0), _(B, null, Y((Pe = (Re = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : Re.mappings) == null ? void 0 : Pe.taxes, (nt, Te) => (s(), N(Ge, {
727
+ (i(!0), _(B, null, z((Pe = (Re = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : Re.mappings) == null ? void 0 : Pe.taxes, (nt, Te) => (i(), R(Ge, {
728
728
  key: `tax-${Te}`,
729
729
  modelValue: e.value.platform.mappings.taxes[Te],
730
- "onUpdate:modelValue": (tt) => e.value.platform.mappings.taxes[Te] = tt,
730
+ "onUpdate:modelValue": (ot) => e.value.platform.mappings.taxes[Te] = ot,
731
731
  options: {
732
732
  feedmeKey: { placeholder: "Feedme Key", editable: !0 },
733
733
  xeroAccount: {
@@ -739,10 +739,10 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
739
739
  removable: !0,
740
740
  onRemove: () => b("taxes", Te)
741
741
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128)),
742
- (s(!0), _(B, null, Y((Qe = (Ue = (Ze = e.value) == null ? void 0 : Ze.platform) == null ? void 0 : Ue.mappings) == null ? void 0 : Qe.taxRoundingAdjustments, (nt, Te) => (s(), N(Ge, {
742
+ (i(!0), _(B, null, z((Qe = (Ue = (Ze = e.value) == null ? void 0 : Ze.platform) == null ? void 0 : Ue.mappings) == null ? void 0 : Qe.taxRoundingAdjustments, (nt, Te) => (i(), R(Ge, {
743
743
  key: `tax-rounding-adjustment-${Te}`,
744
744
  modelValue: e.value.platform.mappings.taxRoundingAdjustments[Te],
745
- "onUpdate:modelValue": (tt) => e.value.platform.mappings.taxRoundingAdjustments[Te] = tt,
745
+ "onUpdate:modelValue": (ot) => e.value.platform.mappings.taxRoundingAdjustments[Te] = ot,
746
746
  options: {
747
747
  feedmeKey: { placeholder: "Feedme Key", editable: !0 },
748
748
  xeroAccount: {
@@ -759,7 +759,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
759
759
  }),
760
760
  _: 1
761
761
  }, 8, ["total-items-count"])) : O("", !0),
762
- a(R, { style: { margin: 0 } }),
762
+ a(M, { style: { margin: 0 } }),
763
763
  t("div", bo, [
764
764
  n[18] || (n[18] = t("div", { class: "fm-typo-en-title-sm-800" }, "Items", -1)),
765
765
  a(I, {
@@ -769,22 +769,22 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
769
769
  onClick: n[7] || (n[7] = () => g("items"))
770
770
  })
771
771
  ]),
772
- f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (s(), _("div", _o, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : O("", !0),
773
- !f.accountCodeOptions.isLoaded && ((H = e.value.platform) != null && H.accessToken) ? (s(), N(Q, {
772
+ f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (i(), _("div", _o, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : O("", !0),
773
+ !f.accountCodeOptions.isLoaded && ((E = e.value.platform) != null && E.accessToken) ? (i(), R(X, {
774
774
  key: 4,
775
775
  size: "xl"
776
776
  })) : O("", !0),
777
- ((u = f.accountCodeOptions.data) == null ? void 0 : u.length) > 0 ? (s(), N(de, {
777
+ ((u = f.accountCodeOptions.data) == null ? void 0 : u.length) > 0 ? (i(), R(re, {
778
778
  key: 5,
779
779
  "header-items": ["Feedme Key", "Item Code"],
780
- "total-items-count": ((P = (K = (D = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : D.mappings) == null ? void 0 : K.items) == null ? void 0 : P.length) || 0,
780
+ "total-items-count": ((N = (D = (K = (P = e.value) == null ? void 0 : P.platform) == null ? void 0 : K.mappings) == null ? void 0 : D.items) == null ? void 0 : N.length) || 0,
781
781
  "is-include-post-action": !0
782
782
  }, {
783
- default: W(() => {
784
- var oe, Re, Pe;
783
+ default: G(() => {
784
+ var te, Re, Pe;
785
785
  return [
786
786
  t("div", ho, [
787
- (s(!0), _(B, null, Y((Pe = (Re = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : Re.mappings) == null ? void 0 : Pe.items, (Ze, Ue) => (s(), N(Ge, {
787
+ (i(!0), _(B, null, z((Pe = (Re = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : Re.mappings) == null ? void 0 : Pe.items, (Ze, Ue) => (i(), R(Ge, {
788
788
  key: `item-${Ue}`,
789
789
  modelValue: e.value.platform.mappings.items[Ue],
790
790
  "onUpdate:modelValue": (Qe) => e.value.platform.mappings.items[Ue] = Qe,
@@ -804,7 +804,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
804
804
  }),
805
805
  _: 1
806
806
  }, 8, ["total-items-count"])) : O("", !0),
807
- a(R, { style: { margin: 0 } }),
807
+ a(M, { style: { margin: 0 } }),
808
808
  t("div", wo, [
809
809
  n[19] || (n[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Payments", -1)),
810
810
  a(I, {
@@ -814,22 +814,22 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
814
814
  onClick: n[8] || (n[8] = () => g("payments"))
815
815
  })
816
816
  ]),
817
- f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (s(), _("div", ko, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : O("", !0),
818
- !f.accountCodeOptions.isLoaded && ((q = e.value.platform) != null && q.accessToken) ? (s(), N(Q, {
817
+ f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (i(), _("div", ko, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : O("", !0),
818
+ !f.accountCodeOptions.isLoaded && ((q = e.value.platform) != null && q.accessToken) ? (i(), R(X, {
819
819
  key: 7,
820
820
  size: "xl"
821
821
  })) : O("", !0),
822
- ((le = f.accountCodeOptions.data) == null ? void 0 : le.length) > 0 ? (s(), N(de, {
822
+ ((ae = f.accountCodeOptions.data) == null ? void 0 : ae.length) > 0 ? (i(), R(re, {
823
823
  key: 8,
824
824
  "header-items": ["Feedme Key", "Payment Code"],
825
- "total-items-count": ((we = (ke = (ie = (L = e.value) == null ? void 0 : L.platform) == null ? void 0 : ie.mappings) == null ? void 0 : ke.payments) == null ? void 0 : we.length) || 0,
825
+ "total-items-count": ((we = (ke = (se = (L = e.value) == null ? void 0 : L.platform) == null ? void 0 : se.mappings) == null ? void 0 : ke.payments) == null ? void 0 : we.length) || 0,
826
826
  "is-include-post-action": !0
827
827
  }, {
828
- default: W(() => {
829
- var oe, Re, Pe;
828
+ default: G(() => {
829
+ var te, Re, Pe;
830
830
  return [
831
831
  t("div", Vo, [
832
- (s(!0), _(B, null, Y((Pe = (Re = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : Re.mappings) == null ? void 0 : Pe.payments, (Ze, Ue) => (s(), N(Ge, {
832
+ (i(!0), _(B, null, z((Pe = (Re = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : Re.mappings) == null ? void 0 : Pe.payments, (Ze, Ue) => (i(), R(Ge, {
833
833
  key: `payment-${Ue}`,
834
834
  modelValue: e.value.platform.mappings.payments[Ue],
835
835
  "onUpdate:modelValue": (Qe) => e.value.platform.mappings.payments[Ue] = Qe,
@@ -858,7 +858,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
858
858
  }), Co = { class: "h-full flex flex-col gap-16" }, So = { class: "flex flex-row gap-2 justify-between items-center" }, Ao = {
859
859
  key: 0,
860
860
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
861
- }, Do = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fo = /* @__PURE__ */ Z({
861
+ }, Do = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fo = /* @__PURE__ */ J({
862
862
  __name: "Preview",
863
863
  props: {
864
864
  modelValue: { required: !0 },
@@ -866,7 +866,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
866
866
  },
867
867
  emits: ["update:modelValue"],
868
868
  setup(f) {
869
- const o = X([]), { t: e } = ne(), i = z(
869
+ const o = H([]), { t: e } = le(), s = Y(
870
870
  () => o.value.reduce((m, V) => {
871
871
  const $ = m.length, { invoice: p, payments: y } = V;
872
872
  m[$] = {
@@ -973,7 +973,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
973
973
  header: "Payment Amount",
974
974
  enableSorting: !1
975
975
  }
976
- ], A = ae(f, "modelValue"), h = X(!1), T = Ce(), { dateRange: w } = Ye($e());
976
+ ], A = oe(f, "modelValue"), h = H(!1), T = Ce(), { dateRange: w } = ze($e());
977
977
  De(
978
978
  () => w.value,
979
979
  async () => {
@@ -992,7 +992,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
992
992
  );
993
993
  async function k() {
994
994
  try {
995
- A.value._id ? (h.value = !0, await et(A.value._id), T.open({ message: "Upload successful", type: "success" })) : T.open({ message: "Invalid accounting setting", type: "error" });
995
+ A.value._id ? (h.value = !0, await tt(A.value._id), T.open({ message: "Upload successful", type: "success" })) : T.open({ message: "Invalid accounting setting", type: "error" });
996
996
  } catch (m) {
997
997
  m.message && T.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((V) => T.open({ message: V.Message, type: "error" }));
998
998
  } finally {
@@ -1001,7 +1001,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1001
1001
  }
1002
1002
  return (m, V) => {
1003
1003
  const $ = U("FmButton"), p = U("FmCircularProgress"), y = U("FmTable");
1004
- return s(), _("div", Co, [
1004
+ return i(), _("div", Co, [
1005
1005
  t("div", So, [
1006
1006
  a(He, {
1007
1007
  "date-range": d(w),
@@ -1015,19 +1015,19 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1015
1015
  onClick: k
1016
1016
  }, null, 8, ["loading"])
1017
1017
  ]),
1018
- h.value ? (s(), _("div", Ao, [
1018
+ h.value ? (i(), _("div", Ao, [
1019
1019
  a(p, { size: "xl" }),
1020
1020
  t("span", Do, S(d(e)("report.common.isLoading")), 1)
1021
- ])) : i.value.length > 0 ? (s(), N(y, {
1021
+ ])) : s.value.length > 0 ? (i(), R(y, {
1022
1022
  key: 1,
1023
1023
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
1024
- "row-data": i.value,
1024
+ "row-data": s.value,
1025
1025
  "column-defs": x
1026
1026
  }, null, 8, ["row-data"])) : O("", !0)
1027
1027
  ]);
1028
1028
  };
1029
1029
  }
1030
- }), Uo = { class: "h-full relative flex flex-col" }, To = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Ko = /* @__PURE__ */ Z({
1030
+ }), Uo = { class: "h-full relative flex flex-col" }, To = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Ko = /* @__PURE__ */ J({
1031
1031
  __name: "Xero",
1032
1032
  props: {
1033
1033
  modelValue: { required: !0 },
@@ -1035,7 +1035,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1035
1035
  },
1036
1036
  emits: ["update:modelValue"],
1037
1037
  setup(f) {
1038
- const { t: o } = ne(), e = ae(f, "modelValue"), i = X("setting"), x = X({}), A = X({}), h = X({}), T = [
1038
+ const { t: o } = le(), e = oe(f, "modelValue"), s = H("setting"), x = H({}), A = H({}), h = H({}), T = [
1039
1039
  {
1040
1040
  label: o("report.integration.setting"),
1041
1041
  value: "setting",
@@ -1046,8 +1046,8 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1046
1046
  value: "preview",
1047
1047
  icon: "table"
1048
1048
  }
1049
- ], w = Ve(), k = z(() => {
1050
- switch (i.value) {
1049
+ ], w = Ve(), k = Y(() => {
1050
+ switch (s.value) {
1051
1051
  case "preview":
1052
1052
  return { component: Fo };
1053
1053
  case "setting":
@@ -1117,25 +1117,25 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1117
1117
  ), (p, y) => {
1118
1118
  var b, g, r;
1119
1119
  const c = U("FmPageHead"), v = U("FmTabs");
1120
- return s(), _("div", Uo, [
1120
+ return i(), _("div", Uo, [
1121
1121
  a(c, {
1122
1122
  title: ((b = e.value) == null ? void 0 : b.name) || "Xero",
1123
1123
  "back-button": !0,
1124
1124
  style: { paddingLeft: "0px", paddingRight: "0px" },
1125
1125
  "onClick:back": d(w).back
1126
1126
  }, {
1127
- description: W(() => y[2] || (y[2] = [
1127
+ description: G(() => y[2] || (y[2] = [
1128
1128
  t("div", null, null, -1)
1129
1129
  ])),
1130
1130
  _: 1
1131
1131
  }, 8, ["title", "onClick:back"]),
1132
1132
  a(v, {
1133
- "model-value": i.value,
1134
- "onUpdate:modelValue": y[0] || (y[0] = (l) => i.value = l),
1133
+ "model-value": s.value,
1134
+ "onUpdate:modelValue": y[0] || (y[0] = (l) => s.value = l),
1135
1135
  items: T
1136
1136
  }, null, 8, ["model-value"]),
1137
1137
  t("div", To, [
1138
- (s(), N(Ie((g = k.value) == null ? void 0 : g.component), ot({
1138
+ (i(), R(Ie((g = k.value) == null ? void 0 : g.component), at({
1139
1139
  modelValue: e.value,
1140
1140
  "onUpdate:modelValue": y[1] || (y[1] = (l) => e.value = l)
1141
1141
  }, (r = k.value) == null ? void 0 : r.props), null, 16, ["modelValue"]))
@@ -1143,10 +1143,10 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1143
1143
  ]);
1144
1144
  };
1145
1145
  }
1146
- }), Io = { class: "mt-6 mb-6" }, No = { class: "list-disc pl-6 space-y-1" }, Je = /* @__PURE__ */ Z({
1146
+ }), Io = { class: "mt-6 mb-6" }, No = { class: "list-disc pl-6 space-y-1" }, Je = /* @__PURE__ */ J({
1147
1147
  __name: "ReferenceNumberGuideButton",
1148
1148
  setup(f) {
1149
- const { t: o } = ne(), e = [
1149
+ const { t: o } = le(), e = [
1150
1150
  {
1151
1151
  placeholder: "[NO]",
1152
1152
  category: o("report.integration.refNumExplain.no.category"),
@@ -1189,7 +1189,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1189
1189
  meaning: o("report.integration.refNumExplain.5digit.meaning"),
1190
1190
  output: "[5DIGIT]"
1191
1191
  }
1192
- ], i = [
1192
+ ], s = [
1193
1193
  {
1194
1194
  accessorKey: "placeholder",
1195
1195
  header: o("report.integration.placeholder")
@@ -1219,19 +1219,19 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1219
1219
  ];
1220
1220
  return (x, A) => {
1221
1221
  const h = U("FmIcon"), T = U("FmTable"), w = U("FmSideSheet");
1222
- return s(), N(w, {
1222
+ return i(), R(w, {
1223
1223
  header: d(o)("report.integration.refNumFormatInfo"),
1224
1224
  "dismiss-away": "",
1225
1225
  "max-width": 780
1226
1226
  }, {
1227
- "side-sheet-button": W(() => [
1227
+ "side-sheet-button": G(() => [
1228
1228
  a(h, {
1229
1229
  name: "info",
1230
1230
  color: "primary",
1231
1231
  class: "cursor-pointer p-2"
1232
1232
  })
1233
1233
  ]),
1234
- default: W(() => [
1234
+ default: G(() => [
1235
1235
  t("div", Io, [
1236
1236
  t("ul", No, [
1237
1237
  t("li", null, S(d(o)("report.integration.refNumGuide.1stPoint")), 1),
@@ -1242,7 +1242,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1242
1242
  ]),
1243
1243
  a(T, {
1244
1244
  "row-data": e,
1245
- "column-defs": i,
1245
+ "column-defs": s,
1246
1246
  "shrink-at": !1,
1247
1247
  "hide-footer": !0
1248
1248
  })
@@ -1254,7 +1254,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1254
1254
  }), Ro = {
1255
1255
  key: 0,
1256
1256
  class: "flex flex-col h-full"
1257
- }, Po = { class: "flex flex-col gap-16 pb-[24px]" }, Mo = { class: "flex flex-row justify-between items-center gap-2" }, jo = { class: "fm-typo-en-title-sm-800" }, Lo = { class: "flex flex-row gap-2 items-center" }, Oo = { class: "relative group cursor-pointer" }, Bo = { 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" }, Eo = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, qo = { class: "w-[90%] flex flex-col gap-24" }, zo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yo = { class: "flex flex-col justify-between" }, Ho = { class: "w-[25%] font-semibold" }, Xo = { class: "flex-grow" }, Qo = { class: "flex flex-col justify-between" }, Go = { class: "w-[25%] font-semibold" }, Wo = { class: "flex-grow" }, Jo = { class: "flex flex-col gap-16" }, Zo = { class: "fm-typo-en-title-sm-800" }, ea = { class: "flex flex-col max-w-[100%]" }, ta = { class: "w-[25%] font-semibold" }, oa = { class: "flex-grow" }, aa = { class: "flex flex-col max-w-[100%]" }, la = { class: "w-[25%] font-semibold" }, na = { class: "flex flex-col max-w-[100%]" }, sa = { class: "w-[25%] font-semibold" }, ia = { class: "flex flex-col max-w-[100%]" }, ra = { class: "flex flex-col gap-16" }, da = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ca = { class: "flex flex-col gap-16 pt-3 pb-3" }, ma = { class: "flex flex-row items-center gap-5" }, ua = { class: "fm-typo-en-title-sm-800" }, pa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, fa = { class: "flex flex-row items-center justify-between gap-x-16" }, va = { class: "fm-typo-en-title-sm-800" }, ga = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, ya = { class: "flex flex-row items-center justify-between gap-x-16" }, xa = { class: "fm-typo-en-title-sm-800" }, ba = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, _a = { class: "flex flex-row items-center justify-between gap-x-16" }, ha = { class: "fm-typo-en-title-sm-800" }, wa = { class: "grid-cols-1 grid gap-16 p-2" }, ka = /* @__PURE__ */ Z({
1257
+ }, Po = { class: "flex flex-col gap-16 pb-[24px]" }, Mo = { class: "flex flex-row justify-between items-center gap-2" }, jo = { class: "fm-typo-en-title-sm-800" }, Lo = { class: "flex flex-row gap-2 items-center" }, Oo = { class: "relative group cursor-pointer" }, Bo = { 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" }, Eo = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, qo = { class: "w-[90%] flex flex-col gap-24" }, Yo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zo = { class: "flex flex-col justify-between" }, Ho = { class: "w-[25%] font-semibold" }, Xo = { class: "flex-grow" }, Qo = { class: "flex flex-col justify-between" }, Go = { class: "w-[25%] font-semibold" }, Wo = { class: "flex-grow" }, Jo = { class: "flex flex-col gap-16" }, Zo = { class: "fm-typo-en-title-sm-800" }, ea = { class: "flex flex-col max-w-[100%]" }, ta = { class: "w-[25%] font-semibold" }, oa = { class: "flex-grow" }, aa = { class: "flex flex-col max-w-[100%]" }, la = { class: "w-[25%] font-semibold" }, na = { class: "flex flex-col max-w-[100%]" }, sa = { class: "w-[25%] font-semibold" }, ia = { class: "flex flex-col max-w-[100%]" }, ra = { class: "flex flex-col gap-16" }, da = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ca = { class: "flex flex-col gap-16 pt-3 pb-3" }, ma = { class: "flex flex-row items-center gap-5" }, ua = { class: "fm-typo-en-title-sm-800" }, pa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, fa = { class: "flex flex-row items-center justify-between gap-x-16" }, va = { class: "fm-typo-en-title-sm-800" }, ga = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, ya = { class: "flex flex-row items-center justify-between gap-x-16" }, xa = { class: "fm-typo-en-title-sm-800" }, ba = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, _a = { class: "flex flex-row items-center justify-between gap-x-16" }, ha = { class: "fm-typo-en-title-sm-800" }, wa = { class: "grid-cols-1 grid gap-16 p-2" }, ka = /* @__PURE__ */ J({
1258
1258
  __name: "Setting",
1259
1259
  props: {
1260
1260
  modelValue: { required: !0 },
@@ -1262,16 +1262,16 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1262
1262
  },
1263
1263
  emits: ["update:modelValue"],
1264
1264
  setup(f) {
1265
- const o = ae(f, "modelValue"), e = Ce(), i = Ne(), x = Ve(), { promptLoader: A } = Le(), { promptMessage: h } = ze(), { restaurants: T } = $e(), w = z(
1265
+ const o = oe(f, "modelValue"), e = Ce(), s = Ne(), x = Ve(), { promptLoader: A } = Le(), { promptMessage: h } = Ye(), { restaurants: T } = $e(), w = Y(
1266
1266
  () => T.map((r) => ({ label: r.name, value: r.id }))
1267
- ), { t: k } = ne();
1267
+ ), { t: k } = le();
1268
1268
  async function m() {
1269
1269
  await h({
1270
1270
  message: k("report.messages.confirmDelete", { name: o.value.name }),
1271
1271
  title: k("report.common.delete")
1272
1272
  }) && await A(async () => {
1273
1273
  try {
1274
- await Oe(o.value._id), await i.getSettings(), x.back();
1274
+ await Oe(o.value._id), await s.getSettings(), x.back();
1275
1275
  } catch (l) {
1276
1276
  e.open({ type: "error", message: l.message });
1277
1277
  }
@@ -1280,7 +1280,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1280
1280
  async function V() {
1281
1281
  await A(async () => {
1282
1282
  try {
1283
- await Be(o.value._id, o.value), await i.getSettings();
1283
+ await Be(o.value._id, o.value), await s.getSettings();
1284
1284
  } catch (r) {
1285
1285
  e.open({ type: "error", message: r.message });
1286
1286
  }
@@ -1289,7 +1289,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1289
1289
  function $(r, l) {
1290
1290
  var n, C;
1291
1291
  (C = (n = o.value.platform) == null ? void 0 : n.mappings) != null && C[r] && (o.value.platform.mappings[r] = o.value.platform.mappings[r].filter(
1292
- (I, R) => R !== l
1292
+ (I, M) => M !== l
1293
1293
  ));
1294
1294
  }
1295
1295
  function p(r) {
@@ -1372,18 +1372,18 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1372
1372
  async function g() {
1373
1373
  await A(async () => {
1374
1374
  try {
1375
- await Ee(o.value._id), await i.getSettings();
1375
+ await Ee(o.value._id), await s.getSettings();
1376
1376
  } catch (r) {
1377
1377
  e.open({ type: "error", message: r.message });
1378
1378
  }
1379
1379
  });
1380
1380
  }
1381
1381
  return je(async () => {
1382
- await i.getSettings();
1382
+ await s.getSettings();
1383
1383
  }), (r, l) => {
1384
- var te, J, G, ee, re, me, se, ce, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E, H, u, j;
1385
- const n = U("FmIcon"), C = U("FmButton"), I = U("FmMenuDivider"), R = U("FmTextField"), Q = U("FmSelect");
1386
- return (J = (te = o.value) == null ? void 0 : te.platform) != null && J.mappings ? (s(), _("div", Ro, [
1384
+ var ee, W, Q, Z, ie, ce, ne, de, me, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E, u, P;
1385
+ const n = U("FmIcon"), C = U("FmButton"), I = U("FmMenuDivider"), M = U("FmTextField"), X = U("FmSelect");
1386
+ return (W = (ee = o.value) == null ? void 0 : ee.platform) != null && W.mappings ? (i(), _("div", Ro, [
1387
1387
  t("div", Po, [
1388
1388
  t("div", Mo, [
1389
1389
  t("div", jo, S(d(k)("report.integration.bukku.connect")), 1),
@@ -1413,13 +1413,13 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1413
1413
  a(I, { style: { margin: 0 } }),
1414
1414
  t("div", Eo, [
1415
1415
  t("div", qo, [
1416
- t("div", zo, S(d(k)("report.integration.bukku.authentication")), 1),
1417
- t("div", Yo, [
1416
+ t("div", Yo, S(d(k)("report.integration.bukku.authentication")), 1),
1417
+ t("div", zo, [
1418
1418
  t("div", Ho, S(d(k)("report.integration.subdomain")), 1),
1419
1419
  t("div", Xo, [
1420
- a(R, {
1420
+ a(M, {
1421
1421
  modelValue: o.value.platform.subdomain,
1422
- "onUpdate:modelValue": l[0] || (l[0] = (D) => o.value.platform.subdomain = D),
1422
+ "onUpdate:modelValue": l[0] || (l[0] = (K) => o.value.platform.subdomain = K),
1423
1423
  placeholder: d(k)("report.integration.subdomain")
1424
1424
  }, null, 8, ["modelValue", "placeholder"])
1425
1425
  ])
@@ -1427,9 +1427,9 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1427
1427
  t("div", Qo, [
1428
1428
  t("div", Go, S(d(k)("report.integration.token")), 1),
1429
1429
  t("div", Wo, [
1430
- a(R, {
1430
+ a(M, {
1431
1431
  modelValue: o.value.platform.token,
1432
- "onUpdate:modelValue": l[1] || (l[1] = (D) => o.value.platform.token = D),
1432
+ "onUpdate:modelValue": l[1] || (l[1] = (K) => o.value.platform.token = K),
1433
1433
  placeholder: d(k)("report.integration.token")
1434
1434
  }, null, 8, ["modelValue", "placeholder"])
1435
1435
  ])
@@ -1440,17 +1440,17 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1440
1440
  t("div", ea, [
1441
1441
  t("div", ta, S(d(k)("report.common.name")), 1),
1442
1442
  t("div", oa, [
1443
- a(R, {
1443
+ a(M, {
1444
1444
  modelValue: o.value.name,
1445
- "onUpdate:modelValue": l[2] || (l[2] = (D) => o.value.name = D)
1445
+ "onUpdate:modelValue": l[2] || (l[2] = (K) => o.value.name = K)
1446
1446
  }, null, 8, ["modelValue"])
1447
1447
  ])
1448
1448
  ]),
1449
1449
  t("div", aa, [
1450
1450
  t("div", la, S(d(k)("report.common.location")), 1),
1451
- a(Q, {
1451
+ a(X, {
1452
1452
  modelValue: o.value.platform.locationIds,
1453
- "onUpdate:modelValue": l[3] || (l[3] = (D) => o.value.platform.locationIds = D),
1453
+ "onUpdate:modelValue": l[3] || (l[3] = (K) => o.value.platform.locationIds = K),
1454
1454
  multiselect: !0,
1455
1455
  items: w.value,
1456
1456
  placeholder: "Select location",
@@ -1459,9 +1459,9 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1459
1459
  ]),
1460
1460
  t("div", na, [
1461
1461
  t("div", sa, S(d(k)("report.integration.grouping.title")), 1),
1462
- a(Q, {
1462
+ a(X, {
1463
1463
  modelValue: o.value.platform.grouping,
1464
- "onUpdate:modelValue": l[4] || (l[4] = (D) => o.value.platform.grouping = D),
1464
+ "onUpdate:modelValue": l[4] || (l[4] = (K) => o.value.platform.grouping = K),
1465
1465
  multiselect: !1,
1466
1466
  items: y,
1467
1467
  placeholder: "Select grouping",
@@ -1470,9 +1470,9 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1470
1470
  ]),
1471
1471
  t("div", ia, [
1472
1472
  l[16] || (l[16] = t("div", { class: "w-[25%] font-semibold" }, S("My Invoice Action"), -1)),
1473
- a(Q, {
1473
+ a(X, {
1474
1474
  modelValue: o.value.platform.mappings.myinvoisAction,
1475
- "onUpdate:modelValue": l[5] || (l[5] = (D) => o.value.platform.mappings.myinvoisAction = D),
1475
+ "onUpdate:modelValue": l[5] || (l[5] = (K) => o.value.platform.mappings.myinvoisAction = K),
1476
1476
  multiselect: !1,
1477
1477
  items: c,
1478
1478
  placeholder: "Select My Invoice Action",
@@ -1482,7 +1482,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1482
1482
  ]),
1483
1483
  t("div", ra, [
1484
1484
  t("div", da, [
1485
- a(M, {
1485
+ a(j, {
1486
1486
  "model-value": {
1487
1487
  key: "Contact",
1488
1488
  account: o.value.platform.mappings.contact.account
@@ -1497,26 +1497,26 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1497
1497
  editable: !0
1498
1498
  }
1499
1499
  },
1500
- "onUpdate:modelValue": l[6] || (l[6] = (D) => {
1501
- var K, P, q;
1502
- (q = (P = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : P.mappings) != null && q.contact && (o.value.platform.mappings.contact.account = D.account);
1500
+ "onUpdate:modelValue": l[6] || (l[6] = (K) => {
1501
+ var D, N, q;
1502
+ (q = (N = (D = o.value) == null ? void 0 : D.platform) == null ? void 0 : N.mappings) != null && q.contact && (o.value.platform.mappings.contact.account = K.account);
1503
1503
  })
1504
1504
  }, null, 8, ["model-value"]),
1505
- a(M, {
1505
+ a(j, {
1506
1506
  "model-value": {
1507
1507
  key: "Rounding",
1508
1508
  account: o.value.platform.mappings.rounding.account
1509
1509
  },
1510
1510
  options: b("Rounding"),
1511
- "onUpdate:modelValue": l[7] || (l[7] = (D) => {
1512
- var K, P, q;
1513
- (q = (P = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : P.mappings) != null && q.rounding && (o.value.platform.mappings.rounding.account = D.account);
1511
+ "onUpdate:modelValue": l[7] || (l[7] = (K) => {
1512
+ var D, N, q;
1513
+ (q = (N = (D = o.value) == null ? void 0 : D.platform) == null ? void 0 : N.mappings) != null && q.rounding && (o.value.platform.mappings.rounding.account = K.account);
1514
1514
  })
1515
1515
  }, null, 8, ["model-value", "options"]),
1516
- (s(!0), _(B, null, Y((re = (ee = (G = o.value) == null ? void 0 : G.platform) == null ? void 0 : ee.mappings) == null ? void 0 : re.charges, (D, K) => (s(), N(M, {
1517
- key: `charge-${K}`,
1518
- modelValue: o.value.platform.mappings.charges[K],
1519
- "onUpdate:modelValue": (P) => o.value.platform.mappings.charges[K] = P,
1516
+ (i(!0), _(B, null, z((ie = (Z = (Q = o.value) == null ? void 0 : Q.platform) == null ? void 0 : Z.mappings) == null ? void 0 : ie.charges, (K, D) => (i(), R(j, {
1517
+ key: `charge-${D}`,
1518
+ modelValue: o.value.platform.mappings.charges[D],
1519
+ "onUpdate:modelValue": (N) => o.value.platform.mappings.charges[D] = N,
1520
1520
  options: {
1521
1521
  key: {
1522
1522
  placeholder: "Key",
@@ -1537,46 +1537,46 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1537
1537
  a(Je)
1538
1538
  ]),
1539
1539
  t("div", pa, [
1540
- a(M, {
1540
+ a(j, {
1541
1541
  "model-value": {
1542
1542
  key: "Invoice no",
1543
1543
  account: o.value.platform.mappings.invoiceDocNo
1544
1544
  },
1545
1545
  options: b("Invoice no"),
1546
- "onUpdate:modelValue": l[8] || (l[8] = (D) => v({ key: "invoiceDocNo", value: D.account }))
1546
+ "onUpdate:modelValue": l[8] || (l[8] = (K) => v({ key: "invoiceDocNo", value: K.account }))
1547
1547
  }, null, 8, ["model-value", "options"]),
1548
- a(M, {
1548
+ a(j, {
1549
1549
  "model-value": {
1550
1550
  key: "Credit note no",
1551
1551
  account: o.value.platform.mappings.creditNoteDocNo
1552
1552
  },
1553
1553
  options: b("Credit note no"),
1554
- "onUpdate:modelValue": l[9] || (l[9] = (D) => v({ key: "creditNoteDocNo", value: D.account }))
1554
+ "onUpdate:modelValue": l[9] || (l[9] = (K) => v({ key: "creditNoteDocNo", value: K.account }))
1555
1555
  }, null, 8, ["model-value", "options"]),
1556
- a(M, {
1556
+ a(j, {
1557
1557
  "model-value": {
1558
1558
  key: "Payment no",
1559
1559
  account: o.value.platform.mappings.paymentDocNo
1560
1560
  },
1561
1561
  options: b("Payment no"),
1562
- "onUpdate:modelValue": l[10] || (l[10] = (D) => v({ key: "paymentDocNo", value: D.account }))
1562
+ "onUpdate:modelValue": l[10] || (l[10] = (K) => v({ key: "paymentDocNo", value: K.account }))
1563
1563
  }, null, 8, ["model-value", "options"]),
1564
- a(M, {
1564
+ a(j, {
1565
1565
  "model-value": {
1566
1566
  key: "Refund no",
1567
1567
  account: o.value.platform.mappings.refundDocNo
1568
1568
  },
1569
1569
  options: b("Refund no"),
1570
- "onUpdate:modelValue": l[11] || (l[11] = (D) => v({ key: "refundDocNo", value: D.account }))
1570
+ "onUpdate:modelValue": l[11] || (l[11] = (K) => v({ key: "refundDocNo", value: K.account }))
1571
1571
  }, null, 8, ["model-value", "options"])
1572
1572
  ])
1573
1573
  ]),
1574
1574
  a(I, { style: { margin: 0 } }),
1575
1575
  a(Xe, {
1576
1576
  modelValue: o.value.platform,
1577
- "onUpdate:modelValue": l[12] || (l[12] = (D) => o.value.platform = D),
1577
+ "onUpdate:modelValue": l[12] || (l[12] = (K) => o.value.platform = K),
1578
1578
  label: "upload",
1579
- "last-upload-date": (me = o.value.platform) == null ? void 0 : me.lastUploadDate
1579
+ "last-upload-date": (ce = o.value.platform) == null ? void 0 : ce.lastUploadDate
1580
1580
  }, null, 8, ["modelValue", "last-upload-date"]),
1581
1581
  a(I, { style: { margin: 0 } }),
1582
1582
  t("div", fa, [
@@ -1588,25 +1588,25 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1588
1588
  onClick: l[13] || (l[13] = () => p("items"))
1589
1589
  })
1590
1590
  ]),
1591
- a(de, {
1591
+ a(re, {
1592
1592
  "header-items": ["Key", "Account Code"],
1593
- "total-items-count": ((pe = (ue = (ce = (se = o.value) == null ? void 0 : se.platform) == null ? void 0 : ce.mappings) == null ? void 0 : ue.items) == null ? void 0 : pe.length) || 0,
1593
+ "total-items-count": ((ue = (me = (de = (ne = o.value) == null ? void 0 : ne.platform) == null ? void 0 : de.mappings) == null ? void 0 : me.items) == null ? void 0 : ue.length) || 0,
1594
1594
  "is-include-post-action": !0
1595
1595
  }, {
1596
- default: W(() => {
1597
- var D, K, P;
1596
+ default: G(() => {
1597
+ var K, D, N;
1598
1598
  return [
1599
1599
  t("div", ga, [
1600
- (s(!0), _(B, null, Y((P = (K = (D = o.value) == null ? void 0 : D.platform) == null ? void 0 : K.mappings) == null ? void 0 : P.items, (q, le) => (s(), N(M, {
1601
- key: `item-${le}`,
1602
- modelValue: o.value.platform.mappings.items[le],
1603
- "onUpdate:modelValue": (L) => o.value.platform.mappings.items[le] = L,
1600
+ (i(!0), _(B, null, z((N = (D = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : D.mappings) == null ? void 0 : N.items, (q, ae) => (i(), R(j, {
1601
+ key: `item-${ae}`,
1602
+ modelValue: o.value.platform.mappings.items[ae],
1603
+ "onUpdate:modelValue": (L) => o.value.platform.mappings.items[ae] = L,
1604
1604
  options: {
1605
1605
  key: { placeholder: "Key", editable: !0 },
1606
1606
  account: { placeholder: "Account code", editable: !0 }
1607
1607
  },
1608
1608
  removable: !0,
1609
- onRemove: () => $("items", le)
1609
+ onRemove: () => $("items", ae)
1610
1610
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1611
1611
  ])
1612
1612
  ];
@@ -1623,16 +1623,16 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1623
1623
  onClick: l[14] || (l[14] = () => p("taxes"))
1624
1624
  })
1625
1625
  ]),
1626
- a(de, {
1626
+ a(re, {
1627
1627
  "header-items": ["Key", "Account Code"],
1628
- "total-items-count": (((ye = (ge = (ve = (fe = o.value) == null ? void 0 : fe.platform) == null ? void 0 : ve.mappings) == null ? void 0 : ge.taxes) == null ? void 0 : ye.length) || 0) + (((he = (_e = (be = (xe = o.value) == null ? void 0 : xe.platform) == null ? void 0 : be.mappings) == null ? void 0 : _e.taxRoundingAdjustments) == null ? void 0 : he.length) || 0),
1628
+ "total-items-count": (((ge = (ve = (fe = (pe = o.value) == null ? void 0 : pe.platform) == null ? void 0 : fe.mappings) == null ? void 0 : ve.taxes) == null ? void 0 : ge.length) || 0) + (((_e = (be = (xe = (ye = o.value) == null ? void 0 : ye.platform) == null ? void 0 : xe.mappings) == null ? void 0 : be.taxRoundingAdjustments) == null ? void 0 : _e.length) || 0),
1629
1629
  "is-include-post-action": !0
1630
1630
  }, {
1631
- default: W(() => {
1632
- var D, K, P, q, le, L;
1631
+ default: G(() => {
1632
+ var K, D, N, q, ae, L;
1633
1633
  return [
1634
1634
  t("div", ba, [
1635
- (s(!0), _(B, null, Y((P = (K = (D = o.value) == null ? void 0 : D.platform) == null ? void 0 : K.mappings) == null ? void 0 : P.taxes, (ie, ke) => (s(), N(M, {
1635
+ (i(!0), _(B, null, z((N = (D = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : D.mappings) == null ? void 0 : N.taxes, (se, ke) => (i(), R(j, {
1636
1636
  key: `tax-${ke}`,
1637
1637
  modelValue: o.value.platform.mappings.taxes[ke],
1638
1638
  "onUpdate:modelValue": (we) => o.value.platform.mappings.taxes[ke] = we,
@@ -1643,7 +1643,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1643
1643
  removable: !0,
1644
1644
  onRemove: () => $("taxes", ke)
1645
1645
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
1646
- (s(!0), _(B, null, Y((L = (le = (q = o.value) == null ? void 0 : q.platform) == null ? void 0 : le.mappings) == null ? void 0 : L.taxRoundingAdjustments, (ie, ke) => (s(), N(M, {
1646
+ (i(!0), _(B, null, z((L = (ae = (q = o.value) == null ? void 0 : q.platform) == null ? void 0 : ae.mappings) == null ? void 0 : L.taxRoundingAdjustments, (se, ke) => (i(), R(j, {
1647
1647
  key: `tax-rounding-adjustment-${ke}`,
1648
1648
  modelValue: o.value.platform.mappings.taxRoundingAdjustments[ke],
1649
1649
  "onUpdate:modelValue": (we) => o.value.platform.mappings.taxRoundingAdjustments[ke] = we,
@@ -1669,27 +1669,27 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1669
1669
  onClick: l[15] || (l[15] = () => p("payments"))
1670
1670
  })
1671
1671
  ]),
1672
- a(de, {
1672
+ a(re, {
1673
1673
  "header-items": ["Key", "Method", "Account Code"],
1674
- "total-items-count": ((j = (u = (H = (E = o.value) == null ? void 0 : E.platform) == null ? void 0 : H.mappings) == null ? void 0 : u.payments) == null ? void 0 : j.length) || 0,
1674
+ "total-items-count": ((P = (u = (E = (he = o.value) == null ? void 0 : he.platform) == null ? void 0 : E.mappings) == null ? void 0 : u.payments) == null ? void 0 : P.length) || 0,
1675
1675
  "columns-per-row": 1,
1676
1676
  "is-include-post-action": !0
1677
1677
  }, {
1678
- default: W(() => {
1679
- var D, K, P;
1678
+ default: G(() => {
1679
+ var K, D, N;
1680
1680
  return [
1681
1681
  t("div", wa, [
1682
- (s(!0), _(B, null, Y((P = (K = (D = o.value) == null ? void 0 : D.platform) == null ? void 0 : K.mappings) == null ? void 0 : P.payments, (q, le) => (s(), N(M, {
1683
- key: `payment-${le}`,
1684
- modelValue: o.value.platform.mappings.payments[le],
1685
- "onUpdate:modelValue": (L) => o.value.platform.mappings.payments[le] = L,
1682
+ (i(!0), _(B, null, z((N = (D = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : D.mappings) == null ? void 0 : N.payments, (q, ae) => (i(), R(j, {
1683
+ key: `payment-${ae}`,
1684
+ modelValue: o.value.platform.mappings.payments[ae],
1685
+ "onUpdate:modelValue": (L) => o.value.platform.mappings.payments[ae] = L,
1686
1686
  options: {
1687
1687
  key: { placeholder: "Key", editable: !0 },
1688
1688
  method: { placeholder: "Method", editable: !0 },
1689
1689
  account: { placeholder: "Account code", editable: !0 }
1690
1690
  },
1691
1691
  removable: !0,
1692
- onRemove: () => $("payments", le)
1692
+ onRemove: () => $("payments", ae)
1693
1693
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1694
1694
  ])
1695
1695
  ];
@@ -1704,7 +1704,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1704
1704
  }), Va = { class: "h-full flex flex-col gap-16" }, $a = { class: "flex flex-row gap-2 justify-between items-center" }, Ca = {
1705
1705
  key: 0,
1706
1706
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
1707
- }, Sa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Aa = /* @__PURE__ */ Z({
1707
+ }, Sa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Aa = /* @__PURE__ */ J({
1708
1708
  __name: "Preview",
1709
1709
  props: {
1710
1710
  modelValue: { required: !0 },
@@ -1712,7 +1712,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1712
1712
  },
1713
1713
  emits: ["update:modelValue"],
1714
1714
  setup(f) {
1715
- const o = X([]), e = z(
1715
+ const o = H([]), e = Y(
1716
1716
  () => o.value.reduce((m, V) => {
1717
1717
  const $ = m.length, { invoice: p, payments: y } = V;
1718
1718
  m[$] = {
@@ -1747,19 +1747,19 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1747
1747
  }
1748
1748
  return m;
1749
1749
  }, [])
1750
- ), { t: i } = ne(), x = [
1750
+ ), { t: s } = le(), x = [
1751
1751
  {
1752
1752
  accessorKey: "date",
1753
1753
  header: () => F(
1754
1754
  "p",
1755
1755
  { class: "min-w-[90px] text-nowrap text-ellipsis" },
1756
- i("report.integration.table.date")
1756
+ s("report.integration.table.date")
1757
1757
  ),
1758
1758
  enableSorting: !1
1759
1759
  },
1760
1760
  {
1761
1761
  accessorKey: "no",
1762
- header: () => F("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, i("report.integration.table.no")),
1762
+ header: () => F("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, s("report.integration.table.no")),
1763
1763
  enableSorting: !1
1764
1764
  },
1765
1765
  {
@@ -1832,7 +1832,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1832
1832
  header: "Payment Amount",
1833
1833
  enableSorting: !1
1834
1834
  }
1835
- ], A = ae(f, "modelValue"), h = X(!1), T = Ce(), { dateRange: w } = Ye($e());
1835
+ ], A = oe(f, "modelValue"), h = H(!1), T = Ce(), { dateRange: w } = ze($e());
1836
1836
  De(
1837
1837
  () => w.value,
1838
1838
  async () => {
@@ -1851,7 +1851,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1851
1851
  );
1852
1852
  async function k() {
1853
1853
  try {
1854
- A.value._id ? (h.value = !0, await et(A.value._id), T.open({ message: i("report.integration.uploadSuccess"), type: "success" })) : T.open({ message: i("report.integration.error.invalid"), type: "error" });
1854
+ A.value._id ? (h.value = !0, await tt(A.value._id), T.open({ message: s("report.integration.uploadSuccess"), type: "success" })) : T.open({ message: s("report.integration.error.invalid"), type: "error" });
1855
1855
  } catch (m) {
1856
1856
  T.open({ message: m.message, type: "error" });
1857
1857
  } finally {
@@ -1860,7 +1860,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1860
1860
  }
1861
1861
  return (m, V) => {
1862
1862
  const $ = U("FmButton"), p = U("FmCircularProgress"), y = U("FmTable");
1863
- return s(), _("div", Va, [
1863
+ return i(), _("div", Va, [
1864
1864
  t("div", $a, [
1865
1865
  a(He, {
1866
1866
  "date-range": d(w),
@@ -1870,14 +1870,14 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1870
1870
  a($, {
1871
1871
  loading: h.value,
1872
1872
  variant: "primary",
1873
- label: d(i)("report.common.upload"),
1873
+ label: d(s)("report.common.upload"),
1874
1874
  onClick: k
1875
1875
  }, null, 8, ["loading", "label"])
1876
1876
  ]),
1877
- h.value ? (s(), _("div", Ca, [
1877
+ h.value ? (i(), _("div", Ca, [
1878
1878
  a(p, { size: "xl" }),
1879
- t("span", Sa, S(d(i)("report.integration.table.loading")), 1)
1880
- ])) : e.value.length > 0 ? (s(), N(y, {
1879
+ t("span", Sa, S(d(s)("report.integration.table.loading")), 1)
1880
+ ])) : e.value.length > 0 ? (i(), R(y, {
1881
1881
  key: 1,
1882
1882
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
1883
1883
  "row-data": e.value,
@@ -1886,7 +1886,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1886
1886
  ]);
1887
1887
  };
1888
1888
  }
1889
- }), Da = { class: "h-full relative flex flex-col" }, Fa = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Ua = /* @__PURE__ */ Z({
1889
+ }), Da = { class: "h-full relative flex flex-col" }, Fa = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Ua = /* @__PURE__ */ J({
1890
1890
  __name: "Bukku",
1891
1891
  props: {
1892
1892
  modelValue: {},
@@ -1894,7 +1894,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1894
1894
  },
1895
1895
  emits: ["update:modelValue"],
1896
1896
  setup(f) {
1897
- const { t: o } = ne(), e = ae(f, "modelValue"), i = X("setting"), x = [
1897
+ const { t: o } = le(), e = oe(f, "modelValue"), s = H("setting"), x = [
1898
1898
  {
1899
1899
  label: o("report.integration.setting"),
1900
1900
  value: "setting",
@@ -1905,8 +1905,8 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1905
1905
  value: "preview",
1906
1906
  icon: "table"
1907
1907
  }
1908
- ], A = Ve(), h = z(() => {
1909
- switch (i.value) {
1908
+ ], A = Ve(), h = Y(() => {
1909
+ switch (s.value) {
1910
1910
  case "preview":
1911
1911
  return Aa;
1912
1912
  case "setting":
@@ -1918,25 +1918,25 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1918
1918
  return (T, w) => {
1919
1919
  var V;
1920
1920
  const k = U("FmPageHead"), m = U("FmTabs");
1921
- return s(), _("div", Da, [
1921
+ return i(), _("div", Da, [
1922
1922
  a(k, {
1923
1923
  title: ((V = e.value) == null ? void 0 : V.name) || "Bukku",
1924
1924
  "back-button": !0,
1925
1925
  style: { paddingLeft: "0px", paddingRight: "0px" },
1926
1926
  "onClick:back": d(A).back
1927
1927
  }, {
1928
- description: W(() => w[2] || (w[2] = [
1928
+ description: G(() => w[2] || (w[2] = [
1929
1929
  t("div", null, null, -1)
1930
1930
  ])),
1931
1931
  _: 1
1932
1932
  }, 8, ["title", "onClick:back"]),
1933
1933
  a(m, {
1934
- "model-value": i.value,
1935
- "onUpdate:modelValue": w[0] || (w[0] = ($) => i.value = $),
1934
+ "model-value": s.value,
1935
+ "onUpdate:modelValue": w[0] || (w[0] = ($) => s.value = $),
1936
1936
  items: x
1937
1937
  }, null, 8, ["model-value"]),
1938
1938
  t("div", Fa, [
1939
- (s(), N(Ie(h.value), {
1939
+ (i(), R(Ie(h.value), {
1940
1940
  modelValue: e.value,
1941
1941
  "onUpdate:modelValue": w[1] || (w[1] = ($) => e.value = $)
1942
1942
  }, null, 8, ["modelValue"]))
@@ -1947,7 +1947,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1947
1947
  }), Ta = {
1948
1948
  key: 0,
1949
1949
  class: "flex flex-col h-full"
1950
- }, Ka = { class: "flex flex-col gap-16 pb-[24px]" }, Ia = { class: "flex flex-row justify-between items-center gap-2" }, Na = { class: "flex flex-row gap-2 items-center" }, Ra = { class: "relative group cursor-pointer" }, Pa = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Ma = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ja = { class: "w-[90%] flex flex-col gap-24" }, La = { class: "flex flex-col gap-16" }, Oa = { class: "fm-typo-en-title-sm-800" }, Ba = { class: "flex flex-col max-w-[100%]" }, Ea = { class: "w-[25%] font-semibold" }, qa = { class: "flex-grow" }, za = { class: "flex flex-col max-w-[100%]" }, Ya = { class: "w-[25%] font-semibold" }, Ha = { class: "flex flex-col max-w-[100%]" }, Xa = { class: "w-[25%] font-semibold" }, Qa = { class: "flex flex-col gap-16" }, Ga = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Wa = { class: "flex flex-col gap-16 pt-3 pb-3" }, Ja = { class: "flex flex-row items-center gap-5" }, Za = { class: "fm-typo-en-title-sm-800" }, el = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, tl = { class: "flex flex-row items-center justify-between gap-x-16" }, ol = { class: "fm-typo-en-title-sm-800" }, al = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, ll = { class: "flex flex-row items-center justify-between gap-x-16" }, nl = { class: "fm-typo-en-title-sm-800" }, sl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, il = { class: "flex flex-row items-center justify-between gap-x-16" }, rl = { class: "fm-typo-en-title-sm-800" }, dl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, cl = /* @__PURE__ */ Z({
1950
+ }, Ka = { class: "flex flex-col gap-16 pb-[24px]" }, Ia = { class: "flex flex-row justify-between items-center gap-2" }, Na = { class: "flex flex-row gap-2 items-center" }, Ra = { class: "relative group cursor-pointer" }, Pa = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Ma = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ja = { class: "w-[90%] flex flex-col gap-24" }, La = { class: "flex flex-col gap-16" }, Oa = { class: "fm-typo-en-title-sm-800" }, Ba = { class: "flex flex-col max-w-[100%]" }, Ea = { class: "w-[25%] font-semibold" }, qa = { class: "flex-grow" }, Ya = { class: "flex flex-col max-w-[100%]" }, za = { class: "w-[25%] font-semibold" }, Ha = { class: "flex flex-col max-w-[100%]" }, Xa = { class: "w-[25%] font-semibold" }, Qa = { class: "flex flex-col gap-16" }, Ga = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Wa = { class: "flex flex-col gap-16 pt-3 pb-3" }, Ja = { class: "flex flex-row items-center gap-5" }, Za = { class: "fm-typo-en-title-sm-800" }, el = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, tl = { class: "flex flex-row items-center justify-between gap-x-16" }, ol = { class: "fm-typo-en-title-sm-800" }, al = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, ll = { class: "flex flex-row items-center justify-between gap-x-16" }, nl = { class: "fm-typo-en-title-sm-800" }, sl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, il = { class: "flex flex-row items-center justify-between gap-x-16" }, rl = { class: "fm-typo-en-title-sm-800" }, dl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, cl = /* @__PURE__ */ J({
1951
1951
  __name: "Setting",
1952
1952
  props: {
1953
1953
  modelValue: { required: !0 },
@@ -1955,7 +1955,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1955
1955
  },
1956
1956
  emits: ["update:modelValue"],
1957
1957
  setup(f) {
1958
- const { t: o } = ne(), e = ae(f, "modelValue"), i = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = ze(), { restaurants: w } = $e(), k = z(
1958
+ const { t: o } = le(), e = oe(f, "modelValue"), s = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = Ye(), { restaurants: w } = $e(), k = Y(
1959
1959
  () => w.map((g) => ({ label: g.name, value: g.id }))
1960
1960
  );
1961
1961
  async function m() {
@@ -1966,7 +1966,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1966
1966
  try {
1967
1967
  await Oe(e.value._id), await x.getSettings(), A.back();
1968
1968
  } catch (r) {
1969
- i.open({ type: "error", message: r.message });
1969
+ s.open({ type: "error", message: r.message });
1970
1970
  }
1971
1971
  });
1972
1972
  }
@@ -1975,7 +1975,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1975
1975
  try {
1976
1976
  await Be(e.value._id, e.value), await x.getSettings();
1977
1977
  } catch (g) {
1978
- i.open({ type: "error", message: g.message });
1978
+ s.open({ type: "error", message: g.message });
1979
1979
  }
1980
1980
  });
1981
1981
  }
@@ -2031,16 +2031,16 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2031
2031
  try {
2032
2032
  await Ee(e.value._id), await x.getSettings();
2033
2033
  } catch (g) {
2034
- i.open({ type: "error", message: g.message });
2034
+ s.open({ type: "error", message: g.message });
2035
2035
  }
2036
2036
  });
2037
2037
  }
2038
2038
  return je(async () => {
2039
2039
  await x.getSettings();
2040
2040
  }), (g, r) => {
2041
- var Q, te, J, G, ee, re, me, se, ce, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E, H;
2042
- const l = U("FmIcon"), n = U("FmButton"), C = U("FmMenuDivider"), I = U("FmTextField"), R = U("FmSelect");
2043
- return (te = (Q = e.value) == null ? void 0 : Q.platform) != null && te.mappings ? (s(), _("div", Ta, [
2041
+ var X, ee, W, Q, Z, ie, ce, ne, de, me, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E;
2042
+ const l = U("FmIcon"), n = U("FmButton"), C = U("FmMenuDivider"), I = U("FmTextField"), M = U("FmSelect");
2043
+ return (ee = (X = e.value) == null ? void 0 : X.platform) != null && ee.mappings ? (i(), _("div", Ta, [
2044
2044
  t("div", Ka, [
2045
2045
  t("div", Ia, [
2046
2046
  r[14] || (r[14] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
@@ -2081,9 +2081,9 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2081
2081
  }, null, 8, ["modelValue"])
2082
2082
  ])
2083
2083
  ]),
2084
- t("div", za, [
2085
- t("div", Ya, S(d(o)("report.integration.location")), 1),
2086
- a(R, {
2084
+ t("div", Ya, [
2085
+ t("div", za, S(d(o)("report.integration.location")), 1),
2086
+ a(M, {
2087
2087
  modelValue: e.value.platform.locationIds,
2088
2088
  "onUpdate:modelValue": r[1] || (r[1] = (u) => e.value.platform.locationIds = u),
2089
2089
  multiselect: !0,
@@ -2095,7 +2095,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2095
2095
  ]),
2096
2096
  t("div", Ha, [
2097
2097
  t("div", Xa, S(d(o)("report.integration.grouping.title")), 1),
2098
- a(R, {
2098
+ a(M, {
2099
2099
  modelValue: e.value.platform.grouping,
2100
2100
  "onUpdate:modelValue": r[2] || (r[2] = (u) => e.value.platform.grouping = u),
2101
2101
  multiselect: !1,
@@ -2107,31 +2107,31 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2107
2107
  ]),
2108
2108
  t("div", Qa, [
2109
2109
  t("div", Ga, [
2110
- a(M, {
2110
+ a(j, {
2111
2111
  "model-value": { key: "Project", account: e.value.platform.mappings.project },
2112
2112
  options: v("Project"),
2113
2113
  "onUpdate:modelValue": r[3] || (r[3] = (u) => c({ key: "project", value: u.account }))
2114
2114
  }, null, 8, ["model-value", "options"]),
2115
- a(M, {
2115
+ a(j, {
2116
2116
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
2117
2117
  options: v("Debtor"),
2118
2118
  "onUpdate:modelValue": r[4] || (r[4] = (u) => c({ key: "debtor", value: u.account }))
2119
2119
  }, null, 8, ["model-value", "options"]),
2120
- a(M, {
2120
+ a(j, {
2121
2121
  "model-value": {
2122
2122
  key: "Rounding",
2123
2123
  account: e.value.platform.mappings.rounding.account
2124
2124
  },
2125
2125
  options: v("Rounding"),
2126
2126
  "onUpdate:modelValue": r[5] || (r[5] = (u) => {
2127
- var j, D, K;
2128
- (K = (D = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : D.mappings) != null && K.rounding && (e.value.platform.mappings.rounding.account = u.account);
2127
+ var P, K, D;
2128
+ (D = (K = (P = e.value) == null ? void 0 : P.platform) == null ? void 0 : K.mappings) != null && D.rounding && (e.value.platform.mappings.rounding.account = u.account);
2129
2129
  })
2130
2130
  }, null, 8, ["model-value", "options"]),
2131
- (s(!0), _(B, null, Y((ee = (G = (J = e.value) == null ? void 0 : J.platform) == null ? void 0 : G.mappings) == null ? void 0 : ee.charges, (u, j) => (s(), N(M, {
2132
- key: `charge-${j}`,
2133
- modelValue: e.value.platform.mappings.charges[j],
2134
- "onUpdate:modelValue": (D) => e.value.platform.mappings.charges[j] = D,
2131
+ (i(!0), _(B, null, z((Z = (Q = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : Q.mappings) == null ? void 0 : Z.charges, (u, P) => (i(), R(j, {
2132
+ key: `charge-${P}`,
2133
+ modelValue: e.value.platform.mappings.charges[P],
2134
+ "onUpdate:modelValue": (K) => e.value.platform.mappings.charges[P] = K,
2135
2135
  options: {
2136
2136
  key: { placeholder: "Key", editable: !1 },
2137
2137
  account: { placeholder: "Account code", editable: !0 }
@@ -2146,7 +2146,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2146
2146
  a(Je)
2147
2147
  ]),
2148
2148
  t("div", el, [
2149
- a(M, {
2149
+ a(j, {
2150
2150
  "model-value": {
2151
2151
  key: "Invoice no",
2152
2152
  account: e.value.platform.mappings.invoiceDocNo
@@ -2154,7 +2154,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2154
2154
  options: v("Invoice no"),
2155
2155
  "onUpdate:modelValue": r[6] || (r[6] = (u) => c({ key: "invoiceDocNo", value: u.account }))
2156
2156
  }, null, 8, ["model-value", "options"]),
2157
- a(M, {
2157
+ a(j, {
2158
2158
  "model-value": {
2159
2159
  key: "Credit note no",
2160
2160
  account: e.value.platform.mappings.creditNoteDocNo
@@ -2162,7 +2162,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2162
2162
  options: v("Credit note no"),
2163
2163
  "onUpdate:modelValue": r[7] || (r[7] = (u) => c({ key: "creditNoteDocNo", value: u.account }))
2164
2164
  }, null, 8, ["model-value", "options"]),
2165
- a(M, {
2165
+ a(j, {
2166
2166
  "model-value": {
2167
2167
  key: "Payment no",
2168
2168
  account: e.value.platform.mappings.paymentDocNo
@@ -2170,7 +2170,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2170
2170
  options: v("Payment no"),
2171
2171
  "onUpdate:modelValue": r[8] || (r[8] = (u) => c({ key: "paymentDocNo", value: u.account }))
2172
2172
  }, null, 8, ["model-value", "options"]),
2173
- a(M, {
2173
+ a(j, {
2174
2174
  "model-value": {
2175
2175
  key: "Refund no",
2176
2176
  account: e.value.platform.mappings.refundDocNo
@@ -2196,25 +2196,25 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2196
2196
  onClick: r[11] || (r[11] = () => p("items"))
2197
2197
  })
2198
2198
  ]),
2199
- a(de, {
2199
+ a(re, {
2200
2200
  "header-items": ["Key", "Account Code"],
2201
- "total-items-count": ((ce = (se = (me = (re = e.value) == null ? void 0 : re.platform) == null ? void 0 : me.mappings) == null ? void 0 : se.items) == null ? void 0 : ce.length) || 0,
2201
+ "total-items-count": ((de = (ne = (ce = (ie = e.value) == null ? void 0 : ie.platform) == null ? void 0 : ce.mappings) == null ? void 0 : ne.items) == null ? void 0 : de.length) || 0,
2202
2202
  "is-include-post-action": !0
2203
2203
  }, {
2204
- default: W(() => {
2205
- var u, j, D;
2204
+ default: G(() => {
2205
+ var u, P, K;
2206
2206
  return [
2207
2207
  t("div", al, [
2208
- (s(!0), _(B, null, Y((D = (j = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : j.mappings) == null ? void 0 : D.items, (K, P) => (s(), N(M, {
2209
- key: `item-${P}`,
2210
- modelValue: e.value.platform.mappings.items[P],
2211
- "onUpdate:modelValue": (q) => e.value.platform.mappings.items[P] = q,
2208
+ (i(!0), _(B, null, z((K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.items, (D, N) => (i(), R(j, {
2209
+ key: `item-${N}`,
2210
+ modelValue: e.value.platform.mappings.items[N],
2211
+ "onUpdate:modelValue": (q) => e.value.platform.mappings.items[N] = q,
2212
2212
  options: {
2213
2213
  key: { placeholder: "Key", editable: !0 },
2214
2214
  account: { placeholder: "Account code", editable: !0 }
2215
2215
  },
2216
2216
  removable: !0,
2217
- onRemove: () => $("items", P)
2217
+ onRemove: () => $("items", N)
2218
2218
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2219
2219
  ])
2220
2220
  ];
@@ -2231,19 +2231,19 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2231
2231
  onClick: r[12] || (r[12] = () => p("taxes"))
2232
2232
  })
2233
2233
  ]),
2234
- a(de, {
2234
+ a(re, {
2235
2235
  "header-items": ["Key", "Account Code"],
2236
- "total-items-count": (((ve = (fe = (pe = (ue = e.value) == null ? void 0 : ue.platform) == null ? void 0 : pe.mappings) == null ? void 0 : fe.taxes) == null ? void 0 : ve.length) || 0) + (((be = (xe = (ye = (ge = e.value) == null ? void 0 : ge.platform) == null ? void 0 : ye.mappings) == null ? void 0 : xe.taxRoundingAdjustments) == null ? void 0 : be.length) || 0),
2236
+ "total-items-count": (((fe = (pe = (ue = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ue.mappings) == null ? void 0 : pe.taxes) == null ? void 0 : fe.length) || 0) + (((xe = (ye = (ge = (ve = e.value) == null ? void 0 : ve.platform) == null ? void 0 : ge.mappings) == null ? void 0 : ye.taxRoundingAdjustments) == null ? void 0 : xe.length) || 0),
2237
2237
  "is-include-post-action": !0
2238
2238
  }, {
2239
- default: W(() => {
2240
- var u, j, D, K, P, q;
2239
+ default: G(() => {
2240
+ var u, P, K, D, N, q;
2241
2241
  return [
2242
2242
  t("div", sl, [
2243
- (s(!0), _(B, null, Y((D = (j = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : j.mappings) == null ? void 0 : D.taxes, (le, L) => (s(), N(M, {
2243
+ (i(!0), _(B, null, z((K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.taxes, (ae, L) => (i(), R(j, {
2244
2244
  key: `tax-${L}`,
2245
2245
  modelValue: e.value.platform.mappings.taxes[L],
2246
- "onUpdate:modelValue": (ie) => e.value.platform.mappings.taxes[L] = ie,
2246
+ "onUpdate:modelValue": (se) => e.value.platform.mappings.taxes[L] = se,
2247
2247
  options: {
2248
2248
  key: { placeholder: "Key", editable: !0 },
2249
2249
  account: { placeholder: "Account code", editable: !0 }
@@ -2251,10 +2251,10 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2251
2251
  removable: !0,
2252
2252
  onRemove: () => $("taxes", L)
2253
2253
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
2254
- (s(!0), _(B, null, Y((q = (P = (K = e.value) == null ? void 0 : K.platform) == null ? void 0 : P.mappings) == null ? void 0 : q.taxRoundingAdjustments, (le, L) => (s(), N(M, {
2254
+ (i(!0), _(B, null, z((q = (N = (D = e.value) == null ? void 0 : D.platform) == null ? void 0 : N.mappings) == null ? void 0 : q.taxRoundingAdjustments, (ae, L) => (i(), R(j, {
2255
2255
  key: `tax-rounding-adjustment-${L}`,
2256
2256
  modelValue: e.value.platform.mappings.taxRoundingAdjustments[L],
2257
- "onUpdate:modelValue": (ie) => e.value.platform.mappings.taxRoundingAdjustments[L] = ie,
2257
+ "onUpdate:modelValue": (se) => e.value.platform.mappings.taxRoundingAdjustments[L] = se,
2258
2258
  options: {
2259
2259
  key: { placeholder: "Key", editable: !0 },
2260
2260
  account: { placeholder: "Account code", editable: !0 }
@@ -2277,25 +2277,25 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2277
2277
  onClick: r[13] || (r[13] = () => p("payments"))
2278
2278
  })
2279
2279
  ]),
2280
- a(de, {
2280
+ a(re, {
2281
2281
  "header-items": ["Key", "Payment Name"],
2282
- "total-items-count": ((H = (E = (he = (_e = e.value) == null ? void 0 : _e.platform) == null ? void 0 : he.mappings) == null ? void 0 : E.payments) == null ? void 0 : H.length) || 0,
2282
+ "total-items-count": ((E = (he = (_e = (be = e.value) == null ? void 0 : be.platform) == null ? void 0 : _e.mappings) == null ? void 0 : he.payments) == null ? void 0 : E.length) || 0,
2283
2283
  "is-include-post-action": !0
2284
2284
  }, {
2285
- default: W(() => {
2286
- var u, j, D;
2285
+ default: G(() => {
2286
+ var u, P, K;
2287
2287
  return [
2288
2288
  t("div", dl, [
2289
- (s(!0), _(B, null, Y((D = (j = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : j.mappings) == null ? void 0 : D.payments, (K, P) => (s(), N(M, {
2290
- key: `payment-${P}`,
2291
- modelValue: e.value.platform.mappings.payments[P],
2292
- "onUpdate:modelValue": (q) => e.value.platform.mappings.payments[P] = q,
2289
+ (i(!0), _(B, null, z((K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.payments, (D, N) => (i(), R(j, {
2290
+ key: `payment-${N}`,
2291
+ modelValue: e.value.platform.mappings.payments[N],
2292
+ "onUpdate:modelValue": (q) => e.value.platform.mappings.payments[N] = q,
2293
2293
  options: {
2294
2294
  key: { placeholder: "Key", editable: !0 },
2295
2295
  account: { placeholder: "Payment name", editable: !0 }
2296
2296
  },
2297
2297
  removable: !0,
2298
- onRemove: () => $("payments", P)
2298
+ onRemove: () => $("payments", N)
2299
2299
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2300
2300
  ])
2301
2301
  ];
@@ -2310,7 +2310,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2310
2310
  }), ml = { class: "h-full flex flex-col gap-16" }, ul = { class: "flex flex-row gap-2 justify-between items-center" }, pl = {
2311
2311
  key: 0,
2312
2312
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
2313
- }, fl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vl = /* @__PURE__ */ Z({
2313
+ }, fl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vl = /* @__PURE__ */ J({
2314
2314
  __name: "Preview",
2315
2315
  props: {
2316
2316
  modelValue: { required: !0 },
@@ -2318,7 +2318,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2318
2318
  },
2319
2319
  emits: ["update:modelValue"],
2320
2320
  setup(f) {
2321
- const { t: o } = ne(), e = X([]), i = z(
2321
+ const { t: o } = le(), e = H([]), s = Y(
2322
2322
  () => e.value.reduce((m, V) => {
2323
2323
  const $ = m.length, { invoice: p, payments: y } = V;
2324
2324
  m[$] = {
@@ -2418,7 +2418,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2418
2418
  header: "Payment Amount",
2419
2419
  enableSorting: !1
2420
2420
  }
2421
- ], A = ae(f, "modelValue"), h = X(!1), T = Ce(), { dateRange: w } = Ye($e());
2421
+ ], A = oe(f, "modelValue"), h = H(!1), T = Ce(), { dateRange: w } = ze($e());
2422
2422
  De(
2423
2423
  () => w.value,
2424
2424
  async () => {
@@ -2446,7 +2446,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2446
2446
  }
2447
2447
  return (m, V) => {
2448
2448
  const $ = U("FmButton"), p = U("FmCircularProgress"), y = U("FmTable");
2449
- return s(), _("div", ml, [
2449
+ return i(), _("div", ml, [
2450
2450
  t("div", ul, [
2451
2451
  a(He, {
2452
2452
  "date-range": d(w),
@@ -2460,19 +2460,19 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2460
2460
  onClick: k
2461
2461
  }, null, 8, ["loading", "label"])
2462
2462
  ]),
2463
- h.value ? (s(), _("div", pl, [
2463
+ h.value ? (i(), _("div", pl, [
2464
2464
  a(p, { size: "xl" }),
2465
2465
  t("span", fl, S(d(o)("report.common.isLoading")), 1)
2466
- ])) : i.value.length > 0 ? (s(), N(y, {
2466
+ ])) : s.value.length > 0 ? (i(), R(y, {
2467
2467
  key: 1,
2468
2468
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
2469
- "row-data": i.value,
2469
+ "row-data": s.value,
2470
2470
  "column-defs": x
2471
2471
  }, null, 8, ["row-data"])) : O("", !0)
2472
2472
  ]);
2473
2473
  };
2474
2474
  }
2475
- }), gl = { class: "h-full relative flex flex-col" }, yl = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, xl = /* @__PURE__ */ Z({
2475
+ }), gl = { class: "h-full relative flex flex-col" }, yl = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, xl = /* @__PURE__ */ J({
2476
2476
  __name: "AutoCount",
2477
2477
  props: {
2478
2478
  modelValue: {},
@@ -2480,7 +2480,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2480
2480
  },
2481
2481
  emits: ["update:modelValue"],
2482
2482
  setup(f) {
2483
- const { t: o } = ne(), e = ae(f, "modelValue"), i = X("setting"), x = [
2483
+ const { t: o } = le(), e = oe(f, "modelValue"), s = H("setting"), x = [
2484
2484
  {
2485
2485
  label: o("report.integration.setting"),
2486
2486
  value: "setting",
@@ -2491,8 +2491,8 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2491
2491
  value: "preview",
2492
2492
  icon: "table"
2493
2493
  }
2494
- ], A = Ve(), h = z(() => {
2495
- switch (i.value) {
2494
+ ], A = Ve(), h = Y(() => {
2495
+ switch (s.value) {
2496
2496
  case "preview":
2497
2497
  return vl;
2498
2498
  case "setting":
@@ -2504,25 +2504,25 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2504
2504
  return (T, w) => {
2505
2505
  var V;
2506
2506
  const k = U("FmPageHead"), m = U("FmTabs");
2507
- return s(), _("div", gl, [
2507
+ return i(), _("div", gl, [
2508
2508
  a(k, {
2509
2509
  title: ((V = e.value) == null ? void 0 : V.name) || "AutoCount",
2510
2510
  "back-button": !0,
2511
2511
  style: { paddingLeft: "0px", paddingRight: "0px" },
2512
2512
  "onClick:back": d(A).back
2513
2513
  }, {
2514
- description: W(() => w[2] || (w[2] = [
2514
+ description: G(() => w[2] || (w[2] = [
2515
2515
  t("div", null, null, -1)
2516
2516
  ])),
2517
2517
  _: 1
2518
2518
  }, 8, ["title", "onClick:back"]),
2519
2519
  a(m, {
2520
- "model-value": i.value,
2521
- "onUpdate:modelValue": w[0] || (w[0] = ($) => i.value = $),
2520
+ "model-value": s.value,
2521
+ "onUpdate:modelValue": w[0] || (w[0] = ($) => s.value = $),
2522
2522
  items: x
2523
2523
  }, null, 8, ["model-value"]),
2524
2524
  t("div", yl, [
2525
- (s(), N(Ie(h.value), {
2525
+ (i(), R(Ie(h.value), {
2526
2526
  modelValue: e.value,
2527
2527
  "onUpdate:modelValue": w[1] || (w[1] = ($) => e.value = $)
2528
2528
  }, null, 8, ["modelValue"]))
@@ -2533,7 +2533,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2533
2533
  }), bl = {
2534
2534
  key: 0,
2535
2535
  class: "flex flex-col h-full"
2536
- }, _l = { class: "flex flex-col gap-16 pb-[24px]" }, hl = { class: "flex flex-row justify-between items-center gap-2" }, wl = { class: "flex flex-row gap-2 items-center" }, kl = { class: "relative group cursor-pointer" }, Vl = { 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" }, Cl = { class: "w-[90%] flex flex-col gap-24" }, Sl = { class: "flex flex-col gap-16" }, Al = { class: "fm-typo-en-title-sm-800" }, Dl = { class: "flex flex-col max-w-[100%]" }, Fl = { class: "w-[25%] font-semibold" }, Ul = { class: "flex-grow" }, Tl = { class: "flex flex-col max-w-[100%]" }, Kl = { class: "w-[25%] font-semibold" }, Il = { class: "flex flex-col max-w-[100%]" }, Nl = { class: "w-[25%] font-semibold" }, Rl = { class: "flex flex-col gap-16" }, Pl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ml = { class: "grid-cols-1 grid gap-16" }, jl = { class: "flex flex-col gap-16 pt-3 pb-3" }, Ll = { class: "flex flex-row items-center gap-5" }, Ol = { class: "fm-typo-en-title-sm-800" }, Bl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, El = { class: "flex flex-row items-center justify-between gap-x-16" }, ql = { class: "fm-typo-en-title-sm-800" }, zl = { class: "grid-cols-1 grid gap-16 p-2" }, Yl = { class: "flex flex-row items-center justify-between gap-x-16" }, Hl = { class: "fm-typo-en-title-sm-800" }, Xl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, Ql = { class: "flex flex-row items-center justify-between gap-x-16" }, Gl = { class: "fm-typo-en-title-sm-800" }, Wl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, Jl = /* @__PURE__ */ Z({
2536
+ }, _l = { class: "flex flex-col gap-16 pb-[24px]" }, hl = { class: "flex flex-row justify-between items-center gap-2" }, wl = { class: "flex flex-row gap-2 items-center" }, kl = { class: "relative group cursor-pointer" }, Vl = { 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" }, Cl = { class: "w-[90%] flex flex-col gap-24" }, Sl = { class: "flex flex-col gap-16" }, Al = { class: "fm-typo-en-title-sm-800" }, Dl = { class: "flex flex-col max-w-[100%]" }, Fl = { class: "w-[25%] font-semibold" }, Ul = { class: "flex-grow" }, Tl = { class: "flex flex-col max-w-[100%]" }, Kl = { class: "w-[25%] font-semibold" }, Il = { class: "flex flex-col max-w-[100%]" }, Nl = { class: "w-[25%] font-semibold" }, Rl = { class: "flex flex-col gap-16" }, Pl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ml = { class: "grid-cols-1 grid gap-16" }, jl = { class: "flex flex-col gap-16 pt-3 pb-3" }, Ll = { class: "flex flex-row items-center gap-5" }, Ol = { class: "fm-typo-en-title-sm-800" }, Bl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, El = { class: "flex flex-row items-center justify-between gap-x-16" }, ql = { class: "fm-typo-en-title-sm-800" }, Yl = { class: "grid-cols-1 grid gap-16 p-2" }, zl = { class: "flex flex-row items-center justify-between gap-x-16" }, Hl = { class: "fm-typo-en-title-sm-800" }, Xl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, Ql = { class: "flex flex-row items-center justify-between gap-x-16" }, Gl = { class: "fm-typo-en-title-sm-800" }, Wl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, Jl = /* @__PURE__ */ J({
2537
2537
  __name: "Setting",
2538
2538
  props: {
2539
2539
  modelValue: { required: !0 },
@@ -2541,7 +2541,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2541
2541
  },
2542
2542
  emits: ["update:modelValue"],
2543
2543
  setup(f) {
2544
- const { t: o } = ne(), e = ae(f, "modelValue"), i = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = ze(), { restaurants: w } = $e(), k = z(
2544
+ const { t: o } = le(), e = oe(f, "modelValue"), s = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = Ye(), { restaurants: w } = $e(), k = Y(
2545
2545
  () => w.map((g) => ({ label: g.name, value: g.id }))
2546
2546
  );
2547
2547
  async function m() {
@@ -2552,7 +2552,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2552
2552
  try {
2553
2553
  await Oe(e.value._id), await x.getSettings(), A.back();
2554
2554
  } catch (r) {
2555
- i.open({ type: "error", message: r.message });
2555
+ s.open({ type: "error", message: r.message });
2556
2556
  }
2557
2557
  });
2558
2558
  }
@@ -2561,7 +2561,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2561
2561
  try {
2562
2562
  await Be(e.value._id, e.value), await x.getSettings();
2563
2563
  } catch (g) {
2564
- i.open({ type: "error", message: g.message });
2564
+ s.open({ type: "error", message: g.message });
2565
2565
  }
2566
2566
  });
2567
2567
  }
@@ -2618,16 +2618,16 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2618
2618
  try {
2619
2619
  await Ee(e.value._id), await x.getSettings();
2620
2620
  } catch (g) {
2621
- i.open({ type: "error", message: g.message });
2621
+ s.open({ type: "error", message: g.message });
2622
2622
  }
2623
2623
  });
2624
2624
  }
2625
2625
  return je(async () => {
2626
2626
  await x.getSettings();
2627
2627
  }), (g, r) => {
2628
- var Q, te, J, G, ee, re, me, se, ce, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E, H;
2629
- const l = U("FmIcon"), n = U("FmButton"), C = U("FmMenuDivider"), I = U("FmTextField"), R = U("FmSelect");
2630
- return (te = (Q = e.value) == null ? void 0 : Q.platform) != null && te.mappings ? (s(), _("div", bl, [
2628
+ var X, ee, W, Q, Z, ie, ce, ne, de, me, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E;
2629
+ const l = U("FmIcon"), n = U("FmButton"), C = U("FmMenuDivider"), I = U("FmTextField"), M = U("FmSelect");
2630
+ return (ee = (X = e.value) == null ? void 0 : X.platform) != null && ee.mappings ? (i(), _("div", bl, [
2631
2631
  t("div", _l, [
2632
2632
  t("div", hl, [
2633
2633
  r[15] || (r[15] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
@@ -2670,7 +2670,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2670
2670
  ]),
2671
2671
  t("div", Tl, [
2672
2672
  t("div", Kl, S(d(o)("report.integration.location")), 1),
2673
- a(R, {
2673
+ a(M, {
2674
2674
  modelValue: e.value.platform.locationIds,
2675
2675
  "onUpdate:modelValue": r[1] || (r[1] = (u) => e.value.platform.locationIds = u),
2676
2676
  multiselect: !0,
@@ -2682,7 +2682,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2682
2682
  ]),
2683
2683
  t("div", Il, [
2684
2684
  t("div", Nl, S(d(o)("report.integration.grouping.title")), 1),
2685
- a(R, {
2685
+ a(M, {
2686
2686
  modelValue: e.value.platform.grouping,
2687
2687
  "onUpdate:modelValue": r[2] || (r[2] = (u) => e.value.platform.grouping = u),
2688
2688
  multiselect: !1,
@@ -2694,12 +2694,12 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2694
2694
  ]),
2695
2695
  t("div", Rl, [
2696
2696
  t("div", Pl, [
2697
- a(M, {
2697
+ a(j, {
2698
2698
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
2699
2699
  options: v("Debtor"),
2700
2700
  "onUpdate:modelValue": r[3] || (r[3] = (u) => c({ key: "debtor", value: u.account }))
2701
2701
  }, null, 8, ["model-value", "options"]),
2702
- a(M, {
2702
+ a(j, {
2703
2703
  "model-value": {
2704
2704
  key: "Project header",
2705
2705
  account: e.value.platform.mappings.projectHeader
@@ -2707,7 +2707,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2707
2707
  options: v("Project header"),
2708
2708
  "onUpdate:modelValue": r[4] || (r[4] = (u) => c({ key: "projectHeader", value: u.account }))
2709
2709
  }, null, 8, ["model-value", "options"]),
2710
- a(M, {
2710
+ a(j, {
2711
2711
  "model-value": {
2712
2712
  key: "Project detail",
2713
2713
  account: e.value.platform.mappings.projectDetail
@@ -2717,7 +2717,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2717
2717
  }, null, 8, ["model-value", "options"])
2718
2718
  ]),
2719
2719
  t("div", Ml, [
2720
- a(M, {
2720
+ a(j, {
2721
2721
  "model-value": {
2722
2722
  key: "Rounding",
2723
2723
  account: e.value.platform.mappings.rounding.account,
@@ -2729,14 +2729,14 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2729
2729
  code: { placeholder: "Item code", editable: !0 }
2730
2730
  },
2731
2731
  "onUpdate:modelValue": r[6] || (r[6] = (u) => {
2732
- var j, D, K;
2733
- (K = (D = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : D.mappings) != null && K.rounding && (e.value.platform.mappings.rounding.account = u.account, e.value.platform.mappings.rounding.code = u.code);
2732
+ var P, K, D;
2733
+ (D = (K = (P = e.value) == null ? void 0 : P.platform) == null ? void 0 : K.mappings) != null && D.rounding && (e.value.platform.mappings.rounding.account = u.account, e.value.platform.mappings.rounding.code = u.code);
2734
2734
  })
2735
2735
  }, null, 8, ["model-value"]),
2736
- (s(!0), _(B, null, Y((ee = (G = (J = e.value) == null ? void 0 : J.platform) == null ? void 0 : G.mappings) == null ? void 0 : ee.charges, (u, j) => (s(), N(M, {
2737
- key: `charge-${j}`,
2738
- modelValue: e.value.platform.mappings.charges[j],
2739
- "onUpdate:modelValue": (D) => e.value.platform.mappings.charges[j] = D,
2736
+ (i(!0), _(B, null, z((Z = (Q = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : Q.mappings) == null ? void 0 : Z.charges, (u, P) => (i(), R(j, {
2737
+ key: `charge-${P}`,
2738
+ modelValue: e.value.platform.mappings.charges[P],
2739
+ "onUpdate:modelValue": (K) => e.value.platform.mappings.charges[P] = K,
2740
2740
  options: {
2741
2741
  key: { placeholder: "Key", editable: !1 },
2742
2742
  account: { placeholder: "Account code", editable: !0 },
@@ -2752,7 +2752,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2752
2752
  a(Je)
2753
2753
  ]),
2754
2754
  t("div", Bl, [
2755
- a(M, {
2755
+ a(j, {
2756
2756
  "model-value": {
2757
2757
  key: "Invoice no",
2758
2758
  account: e.value.platform.mappings.invoiceDocNo
@@ -2760,7 +2760,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2760
2760
  options: v("Invoice no"),
2761
2761
  "onUpdate:modelValue": r[7] || (r[7] = (u) => c({ key: "invoiceDocNo", value: u.account }))
2762
2762
  }, null, 8, ["model-value", "options"]),
2763
- a(M, {
2763
+ a(j, {
2764
2764
  "model-value": {
2765
2765
  key: "Credit note no",
2766
2766
  account: e.value.platform.mappings.creditNoteDocNo
@@ -2768,7 +2768,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2768
2768
  options: v("Credit note no"),
2769
2769
  "onUpdate:modelValue": r[8] || (r[8] = (u) => c({ key: "creditNoteDocNo", value: u.account }))
2770
2770
  }, null, 8, ["model-value", "options"]),
2771
- a(M, {
2771
+ a(j, {
2772
2772
  "model-value": {
2773
2773
  key: "Payment no",
2774
2774
  account: e.value.platform.mappings.paymentDocNo
@@ -2776,7 +2776,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2776
2776
  options: v("Payment no"),
2777
2777
  "onUpdate:modelValue": r[9] || (r[9] = (u) => c({ key: "paymentDocNo", value: u.account }))
2778
2778
  }, null, 8, ["model-value", "options"]),
2779
- a(M, {
2779
+ a(j, {
2780
2780
  "model-value": {
2781
2781
  key: "Refund no",
2782
2782
  account: e.value.platform.mappings.refundDocNo
@@ -2802,26 +2802,26 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2802
2802
  onClick: r[12] || (r[12] = () => p("items"))
2803
2803
  })
2804
2804
  ]),
2805
- a(de, {
2805
+ a(re, {
2806
2806
  "header-items": ["Key", "Account Code", "Item Code"],
2807
- "total-items-count": ((ce = (se = (me = (re = e.value) == null ? void 0 : re.platform) == null ? void 0 : me.mappings) == null ? void 0 : se.items) == null ? void 0 : ce.length) || 0,
2807
+ "total-items-count": ((de = (ne = (ce = (ie = e.value) == null ? void 0 : ie.platform) == null ? void 0 : ce.mappings) == null ? void 0 : ne.items) == null ? void 0 : de.length) || 0,
2808
2808
  "is-include-post-action": !0
2809
2809
  }, {
2810
- default: W(() => {
2811
- var u, j, D;
2810
+ default: G(() => {
2811
+ var u, P, K;
2812
2812
  return [
2813
- t("div", zl, [
2814
- (s(!0), _(B, null, Y((D = (j = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : j.mappings) == null ? void 0 : D.items, (K, P) => (s(), N(M, {
2815
- key: `item-${P}`,
2816
- modelValue: e.value.platform.mappings.items[P],
2817
- "onUpdate:modelValue": (q) => e.value.platform.mappings.items[P] = q,
2813
+ t("div", Yl, [
2814
+ (i(!0), _(B, null, z((K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.items, (D, N) => (i(), R(j, {
2815
+ key: `item-${N}`,
2816
+ modelValue: e.value.platform.mappings.items[N],
2817
+ "onUpdate:modelValue": (q) => e.value.platform.mappings.items[N] = q,
2818
2818
  options: {
2819
2819
  key: { placeholder: "Key", editable: !0 },
2820
2820
  account: { placeholder: "Account code", editable: !0 },
2821
2821
  code: { placeholder: "Item code", editable: !0 }
2822
2822
  },
2823
2823
  removable: !0,
2824
- onRemove: () => $("items", P)
2824
+ onRemove: () => $("items", N)
2825
2825
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2826
2826
  ])
2827
2827
  ];
@@ -2829,7 +2829,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2829
2829
  _: 1
2830
2830
  }, 8, ["total-items-count"]),
2831
2831
  a(C, { style: { margin: 0 } }),
2832
- t("div", Yl, [
2832
+ t("div", zl, [
2833
2833
  t("div", Hl, S(d(o)("report.integration.taxes")), 1),
2834
2834
  a(n, {
2835
2835
  variant: "secondary",
@@ -2838,19 +2838,19 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2838
2838
  onClick: r[13] || (r[13] = () => p("taxes"))
2839
2839
  })
2840
2840
  ]),
2841
- a(de, {
2841
+ a(re, {
2842
2842
  "header-items": ["Key", "Account Code"],
2843
- "total-items-count": (((ve = (fe = (pe = (ue = e.value) == null ? void 0 : ue.platform) == null ? void 0 : pe.mappings) == null ? void 0 : fe.taxes) == null ? void 0 : ve.length) || 0) + (((be = (xe = (ye = (ge = e.value) == null ? void 0 : ge.platform) == null ? void 0 : ye.mappings) == null ? void 0 : xe.taxRoundingAdjustments) == null ? void 0 : be.length) || 0),
2843
+ "total-items-count": (((fe = (pe = (ue = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ue.mappings) == null ? void 0 : pe.taxes) == null ? void 0 : fe.length) || 0) + (((xe = (ye = (ge = (ve = e.value) == null ? void 0 : ve.platform) == null ? void 0 : ge.mappings) == null ? void 0 : ye.taxRoundingAdjustments) == null ? void 0 : xe.length) || 0),
2844
2844
  "is-include-post-action": !0
2845
2845
  }, {
2846
- default: W(() => {
2847
- var u, j, D, K, P, q;
2846
+ default: G(() => {
2847
+ var u, P, K, D, N, q;
2848
2848
  return [
2849
2849
  t("div", Xl, [
2850
- (s(!0), _(B, null, Y((D = (j = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : j.mappings) == null ? void 0 : D.taxes, (le, L) => (s(), N(M, {
2850
+ (i(!0), _(B, null, z((K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.taxes, (ae, L) => (i(), R(j, {
2851
2851
  key: `tax-${L}`,
2852
2852
  modelValue: e.value.platform.mappings.taxes[L],
2853
- "onUpdate:modelValue": (ie) => e.value.platform.mappings.taxes[L] = ie,
2853
+ "onUpdate:modelValue": (se) => e.value.platform.mappings.taxes[L] = se,
2854
2854
  options: {
2855
2855
  key: { placeholder: "Key", editable: !0 },
2856
2856
  account: { placeholder: "Account code", editable: !0 }
@@ -2858,10 +2858,10 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2858
2858
  removable: !0,
2859
2859
  onRemove: () => $("taxes", L)
2860
2860
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
2861
- (s(!0), _(B, null, Y((q = (P = (K = e.value) == null ? void 0 : K.platform) == null ? void 0 : P.mappings) == null ? void 0 : q.taxRoundingAdjustments, (le, L) => (s(), N(M, {
2861
+ (i(!0), _(B, null, z((q = (N = (D = e.value) == null ? void 0 : D.platform) == null ? void 0 : N.mappings) == null ? void 0 : q.taxRoundingAdjustments, (ae, L) => (i(), R(j, {
2862
2862
  key: `tax-rounding-adjustment-${L}`,
2863
2863
  modelValue: e.value.platform.mappings.taxRoundingAdjustments[L],
2864
- "onUpdate:modelValue": (ie) => e.value.platform.mappings.taxRoundingAdjustments[L] = ie,
2864
+ "onUpdate:modelValue": (se) => e.value.platform.mappings.taxRoundingAdjustments[L] = se,
2865
2865
  options: {
2866
2866
  key: { placeholder: "Key", editable: !0 },
2867
2867
  account: { placeholder: "Account code", editable: !0 }
@@ -2884,25 +2884,25 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2884
2884
  onClick: r[14] || (r[14] = () => p("payments"))
2885
2885
  })
2886
2886
  ]),
2887
- a(de, {
2887
+ a(re, {
2888
2888
  "header-items": ["Key", "Method"],
2889
- "total-items-count": ((H = (E = (he = (_e = e.value) == null ? void 0 : _e.platform) == null ? void 0 : he.mappings) == null ? void 0 : E.payments) == null ? void 0 : H.length) || 0,
2889
+ "total-items-count": ((E = (he = (_e = (be = e.value) == null ? void 0 : be.platform) == null ? void 0 : _e.mappings) == null ? void 0 : he.payments) == null ? void 0 : E.length) || 0,
2890
2890
  "is-include-post-action": !0
2891
2891
  }, {
2892
- default: W(() => {
2893
- var u, j, D;
2892
+ default: G(() => {
2893
+ var u, P, K;
2894
2894
  return [
2895
2895
  t("div", Wl, [
2896
- (s(!0), _(B, null, Y((D = (j = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : j.mappings) == null ? void 0 : D.payments, (K, P) => (s(), N(M, {
2897
- key: `payment-${P}`,
2898
- modelValue: e.value.platform.mappings.payments[P],
2899
- "onUpdate:modelValue": (q) => e.value.platform.mappings.payments[P] = q,
2896
+ (i(!0), _(B, null, z((K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.payments, (D, N) => (i(), R(j, {
2897
+ key: `payment-${N}`,
2898
+ modelValue: e.value.platform.mappings.payments[N],
2899
+ "onUpdate:modelValue": (q) => e.value.platform.mappings.payments[N] = q,
2900
2900
  options: {
2901
2901
  key: { placeholder: "Key", editable: !0 },
2902
2902
  account: { placeholder: "Method", editable: !0 }
2903
2903
  },
2904
2904
  removable: !0,
2905
- onRemove: () => $("payments", P)
2905
+ onRemove: () => $("payments", N)
2906
2906
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2907
2907
  ])
2908
2908
  ];
@@ -2917,7 +2917,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2917
2917
  }), Zl = { class: "h-full flex flex-col gap-16" }, en = { class: "flex flex-row gap-2 justify-between items-center" }, tn = {
2918
2918
  key: 0,
2919
2919
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
2920
- }, on = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, an = /* @__PURE__ */ Z({
2920
+ }, on = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, an = /* @__PURE__ */ J({
2921
2921
  __name: "Preview",
2922
2922
  props: {
2923
2923
  modelValue: { required: !0 },
@@ -2925,7 +2925,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2925
2925
  },
2926
2926
  emits: ["update:modelValue"],
2927
2927
  setup(f) {
2928
- const { t: o } = ne(), e = X([]), i = z(
2928
+ const { t: o } = le(), e = H([]), s = Y(
2929
2929
  () => e.value.reduce((m, V) => {
2930
2930
  const $ = m.length, { invoice: p, payments: y } = V;
2931
2931
  m[$] = {
@@ -3020,7 +3020,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3020
3020
  header: "Payment Amount",
3021
3021
  enableSorting: !1
3022
3022
  }
3023
- ], A = ae(f, "modelValue"), h = X(!1), T = Ce(), { dateRange: w } = Ye($e());
3023
+ ], A = oe(f, "modelValue"), h = H(!1), T = Ce(), { dateRange: w } = ze($e());
3024
3024
  De(
3025
3025
  () => w.value,
3026
3026
  async () => {
@@ -3048,7 +3048,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3048
3048
  }
3049
3049
  return (m, V) => {
3050
3050
  const $ = U("FmButton"), p = U("FmCircularProgress"), y = U("FmTable");
3051
- return s(), _("div", Zl, [
3051
+ return i(), _("div", Zl, [
3052
3052
  t("div", en, [
3053
3053
  a(He, {
3054
3054
  "date-range": d(w),
@@ -3062,19 +3062,19 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3062
3062
  onClick: k
3063
3063
  }, null, 8, ["loading", "label"])
3064
3064
  ]),
3065
- h.value ? (s(), _("div", tn, [
3065
+ h.value ? (i(), _("div", tn, [
3066
3066
  a(p, { size: "xl" }),
3067
3067
  t("span", on, S(d(o)("report.common.isLoading")), 1)
3068
- ])) : i.value.length > 0 ? (s(), N(y, {
3068
+ ])) : s.value.length > 0 ? (i(), R(y, {
3069
3069
  key: 1,
3070
3070
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
3071
- "row-data": i.value,
3071
+ "row-data": s.value,
3072
3072
  "column-defs": x
3073
3073
  }, null, 8, ["row-data"])) : O("", !0)
3074
3074
  ]);
3075
3075
  };
3076
3076
  }
3077
- }), ln = { class: "h-full relative flex flex-col" }, nn = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, sn = /* @__PURE__ */ Z({
3077
+ }), ln = { class: "h-full relative flex flex-col" }, nn = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, sn = /* @__PURE__ */ J({
3078
3078
  __name: "SQL",
3079
3079
  props: {
3080
3080
  modelValue: {},
@@ -3082,7 +3082,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3082
3082
  },
3083
3083
  emits: ["update:modelValue"],
3084
3084
  setup(f) {
3085
- const { t: o } = ne(), e = ae(f, "modelValue"), i = X("setting"), x = [
3085
+ const { t: o } = le(), e = oe(f, "modelValue"), s = H("setting"), x = [
3086
3086
  {
3087
3087
  label: o("report.integration.setting"),
3088
3088
  value: "setting",
@@ -3093,8 +3093,8 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3093
3093
  value: "preview",
3094
3094
  icon: "table"
3095
3095
  }
3096
- ], A = Ve(), h = z(() => {
3097
- switch (i.value) {
3096
+ ], A = Ve(), h = Y(() => {
3097
+ switch (s.value) {
3098
3098
  case "preview":
3099
3099
  return an;
3100
3100
  case "setting":
@@ -3106,25 +3106,25 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3106
3106
  return (T, w) => {
3107
3107
  var V;
3108
3108
  const k = U("FmPageHead"), m = U("FmTabs");
3109
- return s(), _("div", ln, [
3109
+ return i(), _("div", ln, [
3110
3110
  a(k, {
3111
3111
  title: ((V = e.value) == null ? void 0 : V.name) || "SQL",
3112
3112
  "back-button": !0,
3113
3113
  style: { paddingLeft: "0px", paddingRight: "0px" },
3114
3114
  "onClick:back": d(A).back
3115
3115
  }, {
3116
- description: W(() => w[2] || (w[2] = [
3116
+ description: G(() => w[2] || (w[2] = [
3117
3117
  t("div", null, null, -1)
3118
3118
  ])),
3119
3119
  _: 1
3120
3120
  }, 8, ["title", "onClick:back"]),
3121
3121
  a(m, {
3122
- "model-value": i.value,
3123
- "onUpdate:modelValue": w[0] || (w[0] = ($) => i.value = $),
3122
+ "model-value": s.value,
3123
+ "onUpdate:modelValue": w[0] || (w[0] = ($) => s.value = $),
3124
3124
  items: x
3125
3125
  }, null, 8, ["model-value"]),
3126
3126
  t("div", nn, [
3127
- (s(), N(Ie(h.value), {
3127
+ (i(), R(Ie(h.value), {
3128
3128
  modelValue: e.value,
3129
3129
  "onUpdate:modelValue": w[1] || (w[1] = ($) => e.value = $)
3130
3130
  }, null, 8, ["modelValue"]))
@@ -3138,7 +3138,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3138
3138
  }, dn = { class: "flex flex-col gap-16 pb-[24px]" }, cn = { class: "flex flex-row justify-between items-center gap-2" }, mn = { class: "fm-typo-en-title-sm-800" }, un = { class: "flex flex-row gap-2 items-center" }, pn = { class: "flex flex-row gap-2 items-center" }, fn = { class: "relative group cursor-pointer" }, vn = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, gn = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, yn = { class: "w-[90%] flex flex-col gap-24" }, xn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, bn = { class: "flex flex-col max-w-[100%]" }, _n = { class: "w-[25%] font-semibold" }, hn = { class: "flex-grow" }, wn = { class: "flex flex-col gap-24 pt-[24px]" }, kn = { class: "flex flex-col justify-between" }, Vn = { class: "w-[25%] font-semibold" }, $n = { class: "flex-grow" }, Cn = { class: "flex flex-col justify-between" }, Sn = { class: "w-[25%] font-semibold" }, An = { class: "flex-grow" }, Dn = { class: "flex flex-col gap-16" }, Fn = { class: "fm-typo-en-title-sm-800" }, Un = { class: "flex flex-col max-w-[100%]" }, Tn = { class: "w-[25%] font-semibold" }, Kn = { class: "flex-grow" }, In = { class: "flex flex-col max-w-[100%]" }, Nn = { class: "w-[25%] font-semibold" }, Rn = { class: "flex flex-col max-w-[100%]" }, Pn = { class: "w-[25%] font-semibold" }, Mn = {
3139
3139
  key: 0,
3140
3140
  class: "flex flex-col max-w-[100%]"
3141
- }, jn = { class: "flex flex-col gap-16" }, Ln = { class: "xs:grid-cols-1 grid gap-16" }, On = { key: 1 }, Bn = { class: "flex flex-col gap-16 pt-3 pb-3" }, En = { class: "flex flex-row items-center gap-5" }, qn = { class: "fm-typo-en-title-sm-800" }, zn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Yn = { class: "flex flex-row items-center justify-between gap-x-16" }, Hn = { class: "fm-typo-en-title-sm-800" }, Xn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, Qn = { class: "flex flex-row items-center justify-between gap-x-16" }, Gn = { class: "fm-typo-en-title-sm-800" }, Wn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, Jn = { class: "flex flex-row items-center justify-between gap-x-16" }, Zn = { class: "fm-typo-en-title-sm-800" }, es = { class: "flex flex-row items-center justify-between" }, ts = { class: "flex-grow" }, os = {
3141
+ }, jn = { class: "flex flex-col gap-16" }, Ln = { class: "xs:grid-cols-1 grid gap-16" }, On = { key: 1 }, Bn = { class: "flex flex-col gap-16 pt-3 pb-3" }, En = { class: "flex flex-row items-center gap-5" }, qn = { class: "fm-typo-en-title-sm-800" }, Yn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, zn = { class: "flex flex-row items-center justify-between gap-x-16" }, Hn = { class: "fm-typo-en-title-sm-800" }, Xn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, Qn = { class: "flex flex-row items-center justify-between gap-x-16" }, Gn = { class: "fm-typo-en-title-sm-800" }, Wn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, Jn = { class: "flex flex-row items-center justify-between gap-x-16" }, Zn = { class: "fm-typo-en-title-sm-800" }, es = { class: "flex flex-row items-center justify-between" }, ts = { class: "flex-grow" }, os = {
3142
3142
  key: 0,
3143
3143
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
3144
3144
  }, as = {
@@ -3150,7 +3150,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3150
3150
  }, ns = { class: "xs:grid-cols-1 grid gap-16 p-2" }, ss = {
3151
3151
  key: 0,
3152
3152
  class: "flex flex-row items-center gap-16"
3153
- }, is = /* @__PURE__ */ Z({
3153
+ }, is = /* @__PURE__ */ J({
3154
3154
  __name: "Setting",
3155
3155
  props: /* @__PURE__ */ Me({
3156
3156
  retrievedMethods: {
@@ -3167,7 +3167,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3167
3167
  }),
3168
3168
  emits: ["update:modelValue"],
3169
3169
  setup(f) {
3170
- const { t: o } = ne(), e = ae(f, "modelValue"), i = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = ze(), { restaurants: w } = $e(), k = z(
3170
+ const { t: o } = le(), e = oe(f, "modelValue"), s = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = Ye(), { restaurants: w } = $e(), k = Y(
3171
3171
  () => w.map((r) => ({ label: r.name, value: r.id }))
3172
3172
  );
3173
3173
  function m(r) {
@@ -3185,7 +3185,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3185
3185
  try {
3186
3186
  await Oe(e.value._id), await x.getSettings(), A.back();
3187
3187
  } catch (l) {
3188
- i.open({ type: "error", message: l.message });
3188
+ s.open({ type: "error", message: l.message });
3189
3189
  }
3190
3190
  });
3191
3191
  }
@@ -3195,14 +3195,14 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3195
3195
  try {
3196
3196
  (n = (l = (r = e.value) == null ? void 0 : r.platform) == null ? void 0 : l.mappings) != null && n.paymentMethods && m(e.value.platform.mappings.paymentMethods), await Be(e.value._id, e.value), await x.getSettings();
3197
3197
  } catch (C) {
3198
- i.open({ type: "error", message: C.message });
3198
+ s.open({ type: "error", message: C.message });
3199
3199
  }
3200
3200
  });
3201
3201
  }
3202
3202
  function p(r, l) {
3203
3203
  var n, C;
3204
3204
  (C = (n = e.value.platform) == null ? void 0 : n.mappings) != null && C[r] && (e.value.platform.mappings[r] = e.value.platform.mappings[r].filter(
3205
- (I, R) => R !== l
3205
+ (I, M) => M !== l
3206
3206
  ));
3207
3207
  }
3208
3208
  function y(r) {
@@ -3248,7 +3248,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3248
3248
  },
3249
3249
  (r) => {
3250
3250
  r && r.forEach((l, n) => {
3251
- var R;
3251
+ var M;
3252
3252
  const C = l.key || "";
3253
3253
  let I = l.account;
3254
3254
  if (!I && C) {
@@ -3263,7 +3263,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3263
3263
  I = "SST-0";
3264
3264
  break;
3265
3265
  }
3266
- (R = e.value.platform) != null && R.mappings && (e.value.platform.mappings.taxes[n] = {
3266
+ (M = e.value.platform) != null && M.mappings && (e.value.platform.mappings.taxes[n] = {
3267
3267
  ...l,
3268
3268
  account: I
3269
3269
  });
@@ -3277,8 +3277,8 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3277
3277
  return (n = (l = (r = e.value) == null ? void 0 : r.platform) == null ? void 0 : l.mappings) == null ? void 0 : n.version;
3278
3278
  },
3279
3279
  (r) => {
3280
- var l, n, C, I, R;
3281
- r === "v1" && !((C = (n = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : n.mappings) != null && C.payee) && (R = (I = e.value) == null ? void 0 : I.platform) != null && R.mappings && (e.value.platform.mappings.payee = {
3280
+ var l, n, C, I, M;
3281
+ r === "v1" && !((C = (n = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : n.mappings) != null && C.payee) && (M = (I = e.value) == null ? void 0 : I.platform) != null && M.mappings && (e.value.platform.mappings.payee = {
3282
3282
  id: 1,
3283
3283
  name: ""
3284
3284
  });
@@ -3290,16 +3290,16 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3290
3290
  try {
3291
3291
  await Ee(e.value._id), await x.getSettings();
3292
3292
  } catch (r) {
3293
- i.open({ type: "error", message: r.message });
3293
+ s.open({ type: "error", message: r.message });
3294
3294
  }
3295
3295
  });
3296
3296
  }
3297
3297
  return je(async () => {
3298
3298
  await x.getSettings();
3299
3299
  }), (r, l) => {
3300
- var G, ee, re, me, se, ce, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E, H, u, j, D;
3301
- const n = U("FmIcon"), C = U("FmButton"), I = U("FmSelect"), R = U("FmMenuDivider"), Q = U("FmTextField"), te = U("FmCircularProgress"), J = U("FmCheckbox");
3302
- return (ee = (G = e.value) == null ? void 0 : G.platform) != null && ee.mappings ? (s(), _("div", rn, [
3300
+ var Q, Z, ie, ce, ne, de, me, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E, u, P, K;
3301
+ const n = U("FmIcon"), C = U("FmButton"), I = U("FmSelect"), M = U("FmMenuDivider"), X = U("FmTextField"), ee = U("FmCircularProgress"), W = U("FmCheckbox");
3302
+ return (Z = (Q = e.value) == null ? void 0 : Q.platform) != null && Z.mappings ? (i(), _("div", rn, [
3303
3303
  t("div", dn, [
3304
3304
  t("div", cn, [
3305
3305
  t("div", mn, S(d(o)("report.integration.connect")), 1),
@@ -3336,7 +3336,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3336
3336
  t("div", hn, [
3337
3337
  a(I, {
3338
3338
  modelValue: e.value.platform.mappings.version,
3339
- "onUpdate:modelValue": l[0] || (l[0] = (K) => e.value.platform.mappings.version = K),
3339
+ "onUpdate:modelValue": l[0] || (l[0] = (D) => e.value.platform.mappings.version = D),
3340
3340
  items: [
3341
3341
  { label: "v1", value: "v1" },
3342
3342
  { label: "v2", value: "v2" }
@@ -3345,14 +3345,14 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3345
3345
  }, null, 8, ["modelValue"])
3346
3346
  ])
3347
3347
  ]),
3348
- a(R, { style: { margin: 0 } }),
3348
+ a(M, { style: { margin: 0 } }),
3349
3349
  t("div", wn, [
3350
3350
  t("div", kn, [
3351
3351
  t("div", Vn, S(d(o)("report.integration.biztory.subdomain")), 1),
3352
3352
  t("div", $n, [
3353
- a(Q, {
3353
+ a(X, {
3354
3354
  modelValue: e.value.platform.subdomain,
3355
- "onUpdate:modelValue": l[1] || (l[1] = (K) => e.value.platform.subdomain = K),
3355
+ "onUpdate:modelValue": l[1] || (l[1] = (D) => e.value.platform.subdomain = D),
3356
3356
  placeholder: "Subdomain"
3357
3357
  }, null, 8, ["modelValue"])
3358
3358
  ])
@@ -3360,9 +3360,9 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3360
3360
  t("div", Cn, [
3361
3361
  t("div", Sn, S(d(o)("report.integration.biztory.apiKey")), 1),
3362
3362
  t("div", An, [
3363
- a(Q, {
3363
+ a(X, {
3364
3364
  modelValue: e.value.platform.api_key,
3365
- "onUpdate:modelValue": l[2] || (l[2] = (K) => e.value.platform.api_key = K),
3365
+ "onUpdate:modelValue": l[2] || (l[2] = (D) => e.value.platform.api_key = D),
3366
3366
  placeholder: "API Key"
3367
3367
  }, null, 8, ["modelValue"])
3368
3368
  ])
@@ -3372,9 +3372,9 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3372
3372
  t("div", Un, [
3373
3373
  t("div", Tn, S(d(o)("report.common.name")), 1),
3374
3374
  t("div", Kn, [
3375
- a(Q, {
3375
+ a(X, {
3376
3376
  modelValue: e.value.name,
3377
- "onUpdate:modelValue": l[3] || (l[3] = (K) => e.value.name = K)
3377
+ "onUpdate:modelValue": l[3] || (l[3] = (D) => e.value.name = D)
3378
3378
  }, null, 8, ["modelValue"])
3379
3379
  ])
3380
3380
  ]),
@@ -3382,7 +3382,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3382
3382
  t("div", Nn, S(d(o)("report.common.location")), 1),
3383
3383
  a(I, {
3384
3384
  modelValue: e.value.platform.locationIds,
3385
- "onUpdate:modelValue": l[4] || (l[4] = (K) => e.value.platform.locationIds = K),
3385
+ "onUpdate:modelValue": l[4] || (l[4] = (D) => e.value.platform.locationIds = D),
3386
3386
  multiselect: !0,
3387
3387
  items: k.value,
3388
3388
  placeholder: d(o)("report.common.location"),
@@ -3393,7 +3393,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3393
3393
  t("div", Pn, S(d(o)("report.integration.grouping.title")), 1),
3394
3394
  a(I, {
3395
3395
  modelValue: e.value.platform.grouping,
3396
- "onUpdate:modelValue": l[5] || (l[5] = (K) => e.value.platform.grouping = K),
3396
+ "onUpdate:modelValue": l[5] || (l[5] = (D) => e.value.platform.grouping = D),
3397
3397
  multiselect: !1,
3398
3398
  items: c,
3399
3399
  placeholder: d(o)("report.integration.grouping.title"),
@@ -3401,12 +3401,12 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3401
3401
  disabled: ""
3402
3402
  }, null, 8, ["modelValue", "placeholder"])
3403
3403
  ]),
3404
- e.value.platform.mappings.version == "v1" ? (s(), _("div", Mn, [
3404
+ e.value.platform.mappings.version == "v1" ? (i(), _("div", Mn, [
3405
3405
  l[17] || (l[17] = t("div", { class: "w-[33%] font-semibold" }, "Payee ID", -1)),
3406
- e.value.platform.mappings.version == "v1" ? (s(), N(M, {
3406
+ e.value.platform.mappings.version == "v1" ? (i(), R(j, {
3407
3407
  key: 0,
3408
3408
  modelValue: e.value.platform.mappings.payee,
3409
- "onUpdate:modelValue": l[6] || (l[6] = (K) => e.value.platform.mappings.payee = K),
3409
+ "onUpdate:modelValue": l[6] || (l[6] = (D) => e.value.platform.mappings.payee = D),
3410
3410
  options: {
3411
3411
  id: { placeholder: "ID", editable: !0 }
3412
3412
  },
@@ -3415,21 +3415,21 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3415
3415
  ])) : O("", !0),
3416
3416
  t("div", jn, [
3417
3417
  t("div", Ln, [
3418
- !f.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (s(), N(te, {
3418
+ !f.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (i(), R(ee, {
3419
3419
  key: 0,
3420
3420
  size: "xl"
3421
3421
  })) : O("", !0),
3422
- f.retrievedCustomers.isLoaded && f.retrievedCustomers.data && ((re = f.retrievedCustomers.data) == null ? void 0 : re.length) != 0 ? (s(), _("div", On, [
3423
- e.value.platform.mappings.version == "v2" ? (s(), N(Ge, {
3422
+ f.retrievedCustomers.isLoaded && f.retrievedCustomers.data && ((ie = f.retrievedCustomers.data) == null ? void 0 : ie.length) != 0 ? (i(), _("div", On, [
3423
+ e.value.platform.mappings.version == "v2" ? (i(), R(Ge, {
3424
3424
  key: 0,
3425
3425
  modelValue: e.value.platform.mappings.payeeId,
3426
- "onUpdate:modelValue": l[7] || (l[7] = (K) => e.value.platform.mappings.payeeId = K),
3426
+ "onUpdate:modelValue": l[7] || (l[7] = (D) => e.value.platform.mappings.payeeId = D),
3427
3427
  options: {
3428
3428
  key: { placeholder: "Payee", editable: !1 },
3429
3429
  customer: {
3430
3430
  placeholder: "Select payee",
3431
3431
  editable: !0,
3432
- dropdownOptions: ((me = f.retrievedCustomers) == null ? void 0 : me.data) ?? []
3432
+ dropdownOptions: ((ce = f.retrievedCustomers) == null ? void 0 : ce.data) ?? []
3433
3433
  }
3434
3434
  },
3435
3435
  removable: !1,
@@ -3439,58 +3439,58 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3439
3439
  ])
3440
3440
  ])
3441
3441
  ]),
3442
- a(R, { style: { margin: 0 } }),
3442
+ a(M, { style: { margin: 0 } }),
3443
3443
  t("div", Bn, [
3444
3444
  t("div", En, [
3445
3445
  t("div", qn, S(d(o)("report.integration.refNumFormat")), 1),
3446
3446
  a(Je)
3447
3447
  ]),
3448
- t("div", zn, [
3449
- a(M, {
3448
+ t("div", Yn, [
3449
+ a(j, {
3450
3450
  "model-value": {
3451
3451
  key: "Invoice no",
3452
3452
  account: e.value.platform.mappings.invoiceDocNo
3453
3453
  },
3454
3454
  options: b("Invoice no"),
3455
- "onUpdate:modelValue": l[8] || (l[8] = (K) => v({ key: "invoiceDocNo", value: K.account }))
3455
+ "onUpdate:modelValue": l[8] || (l[8] = (D) => v({ key: "invoiceDocNo", value: D.account }))
3456
3456
  }, null, 8, ["model-value", "options"]),
3457
- a(M, {
3457
+ a(j, {
3458
3458
  "model-value": {
3459
3459
  key: "Credit note no",
3460
3460
  account: e.value.platform.mappings.creditNoteDocNo
3461
3461
  },
3462
3462
  options: b("Credit note no"),
3463
- "onUpdate:modelValue": l[9] || (l[9] = (K) => v({ key: "creditNoteDocNo", value: K.account }))
3463
+ "onUpdate:modelValue": l[9] || (l[9] = (D) => v({ key: "creditNoteDocNo", value: D.account }))
3464
3464
  }, null, 8, ["model-value", "options"]),
3465
- e.value.platform.mappings.version == "v2" ? (s(), N(M, {
3465
+ e.value.platform.mappings.version == "v2" ? (i(), R(j, {
3466
3466
  key: 0,
3467
3467
  "model-value": {
3468
3468
  key: "Payment no",
3469
3469
  account: e.value.platform.mappings.paymentDocNo
3470
3470
  },
3471
3471
  options: b("Payment no"),
3472
- "onUpdate:modelValue": l[10] || (l[10] = (K) => v({ key: "paymentDocNo", value: K.account }))
3472
+ "onUpdate:modelValue": l[10] || (l[10] = (D) => v({ key: "paymentDocNo", value: D.account }))
3473
3473
  }, null, 8, ["model-value", "options"])) : O("", !0),
3474
- e.value.platform.mappings.version == "v2" ? (s(), N(M, {
3474
+ e.value.platform.mappings.version == "v2" ? (i(), R(j, {
3475
3475
  key: 1,
3476
3476
  "model-value": {
3477
3477
  key: "Refund no",
3478
3478
  account: e.value.platform.mappings.refundDocNo
3479
3479
  },
3480
3480
  options: b("Refund no"),
3481
- "onUpdate:modelValue": l[11] || (l[11] = (K) => v({ key: "refundDocNo", value: K.account }))
3481
+ "onUpdate:modelValue": l[11] || (l[11] = (D) => v({ key: "refundDocNo", value: D.account }))
3482
3482
  }, null, 8, ["model-value", "options"])) : O("", !0)
3483
3483
  ])
3484
3484
  ]),
3485
- a(R, { style: { margin: 0 } }),
3485
+ a(M, { style: { margin: 0 } }),
3486
3486
  a(Xe, {
3487
3487
  modelValue: e.value.platform,
3488
- "onUpdate:modelValue": l[12] || (l[12] = (K) => e.value.platform = K),
3488
+ "onUpdate:modelValue": l[12] || (l[12] = (D) => e.value.platform = D),
3489
3489
  label: "upload",
3490
- "last-upload-date": (se = e.value.platform) == null ? void 0 : se.lastUploadDate
3490
+ "last-upload-date": (ne = e.value.platform) == null ? void 0 : ne.lastUploadDate
3491
3491
  }, null, 8, ["modelValue", "last-upload-date"]),
3492
- a(R, { style: { margin: 0 } }),
3493
- t("div", Yn, [
3492
+ a(M, { style: { margin: 0 } }),
3493
+ t("div", zn, [
3494
3494
  t("div", Hn, S(d(o)("report.integration.biztory.items")), 1),
3495
3495
  a(C, {
3496
3496
  variant: "secondary",
@@ -3499,19 +3499,19 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3499
3499
  onClick: l[13] || (l[13] = () => y("items"))
3500
3500
  })
3501
3501
  ]),
3502
- a(de, {
3502
+ a(re, {
3503
3503
  "header-items": ["Key", "Account Code"],
3504
- "total-items-count": ((fe = (pe = (ue = (ce = e.value) == null ? void 0 : ce.platform) == null ? void 0 : ue.mappings) == null ? void 0 : pe.items) == null ? void 0 : fe.length) || 0,
3504
+ "total-items-count": ((pe = (ue = (me = (de = e.value) == null ? void 0 : de.platform) == null ? void 0 : me.mappings) == null ? void 0 : ue.items) == null ? void 0 : pe.length) || 0,
3505
3505
  "is-include-post-action": !0
3506
3506
  }, {
3507
- default: W(() => {
3508
- var K, P, q;
3507
+ default: G(() => {
3508
+ var D, N, q;
3509
3509
  return [
3510
3510
  t("div", Xn, [
3511
- (s(!0), _(B, null, Y((q = (P = (K = e.value) == null ? void 0 : K.platform) == null ? void 0 : P.mappings) == null ? void 0 : q.items, (le, L) => (s(), N(M, {
3511
+ (i(!0), _(B, null, z((q = (N = (D = e.value) == null ? void 0 : D.platform) == null ? void 0 : N.mappings) == null ? void 0 : q.items, (ae, L) => (i(), R(j, {
3512
3512
  key: `item-${L}`,
3513
3513
  modelValue: e.value.platform.mappings.items[L],
3514
- "onUpdate:modelValue": (ie) => e.value.platform.mappings.items[L] = ie,
3514
+ "onUpdate:modelValue": (se) => e.value.platform.mappings.items[L] = se,
3515
3515
  options: {
3516
3516
  key: { placeholder: "Key", editable: !0 },
3517
3517
  code: { placeholder: "Account code", editable: !0 }
@@ -3524,7 +3524,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3524
3524
  }),
3525
3525
  _: 1
3526
3526
  }, 8, ["total-items-count"]),
3527
- a(R, { style: { margin: 0 } }),
3527
+ a(M, { style: { margin: 0 } }),
3528
3528
  t("div", Qn, [
3529
3529
  t("div", Gn, S(d(o)("report.integration.biztory.taxes")), 1),
3530
3530
  a(C, {
@@ -3534,19 +3534,19 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3534
3534
  onClick: l[14] || (l[14] = () => y("taxes"))
3535
3535
  })
3536
3536
  ]),
3537
- a(de, {
3537
+ a(re, {
3538
3538
  "header-items": ["Key", "Account Code"],
3539
- "total-items-count": (((xe = (ye = (ge = (ve = e.value) == null ? void 0 : ve.platform) == null ? void 0 : ge.mappings) == null ? void 0 : ye.taxes) == null ? void 0 : xe.length) || 0) + (((E = (he = (_e = (be = e.value) == null ? void 0 : be.platform) == null ? void 0 : _e.mappings) == null ? void 0 : he.taxRoundingAdjustments) == null ? void 0 : E.length) || 0),
3539
+ "total-items-count": (((ye = (ge = (ve = (fe = e.value) == null ? void 0 : fe.platform) == null ? void 0 : ve.mappings) == null ? void 0 : ge.taxes) == null ? void 0 : ye.length) || 0) + (((he = (_e = (be = (xe = e.value) == null ? void 0 : xe.platform) == null ? void 0 : be.mappings) == null ? void 0 : _e.taxRoundingAdjustments) == null ? void 0 : he.length) || 0),
3540
3540
  "is-include-post-action": !0
3541
3541
  }, {
3542
- default: W(() => {
3543
- var K, P, q, le, L, ie;
3542
+ default: G(() => {
3543
+ var D, N, q, ae, L, se;
3544
3544
  return [
3545
3545
  t("div", Wn, [
3546
- (s(!0), _(B, null, Y((q = (P = (K = e.value) == null ? void 0 : K.platform) == null ? void 0 : P.mappings) == null ? void 0 : q.taxes, (ke, we) => (s(), N(M, {
3546
+ (i(!0), _(B, null, z((q = (N = (D = e.value) == null ? void 0 : D.platform) == null ? void 0 : N.mappings) == null ? void 0 : q.taxes, (ke, we) => (i(), R(j, {
3547
3547
  key: `tax-${we}`,
3548
3548
  modelValue: e.value.platform.mappings.taxes[we],
3549
- "onUpdate:modelValue": (oe) => e.value.platform.mappings.taxes[we] = oe,
3549
+ "onUpdate:modelValue": (te) => e.value.platform.mappings.taxes[we] = te,
3550
3550
  options: {
3551
3551
  key: { placeholder: "Key", editable: !0 },
3552
3552
  account: { placeholder: "Account code", editable: !0 }
@@ -3554,10 +3554,10 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3554
3554
  removable: !0,
3555
3555
  onRemove: () => p("taxes", we)
3556
3556
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
3557
- (s(!0), _(B, null, Y((ie = (L = (le = e.value) == null ? void 0 : le.platform) == null ? void 0 : L.mappings) == null ? void 0 : ie.taxRoundingAdjustments, (ke, we) => (s(), N(M, {
3557
+ (i(!0), _(B, null, z((se = (L = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : L.mappings) == null ? void 0 : se.taxRoundingAdjustments, (ke, we) => (i(), R(j, {
3558
3558
  key: `tax-rounding-adjustment-${we}`,
3559
3559
  modelValue: e.value.platform.mappings.taxRoundingAdjustments[we],
3560
- "onUpdate:modelValue": (oe) => e.value.platform.mappings.taxRoundingAdjustments[we] = oe,
3560
+ "onUpdate:modelValue": (te) => e.value.platform.mappings.taxRoundingAdjustments[we] = te,
3561
3561
  options: {
3562
3562
  key: { placeholder: "Key", editable: !0 },
3563
3563
  account: { placeholder: "Account code", editable: !0 }
@@ -3570,7 +3570,7 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3570
3570
  }),
3571
3571
  _: 1
3572
3572
  }, 8, ["total-items-count"]),
3573
- a(R, { style: { margin: 0 } }),
3573
+ a(M, { style: { margin: 0 } }),
3574
3574
  t("div", Jn, [
3575
3575
  t("div", Zn, S(d(o)("report.integration.biztory.payments")), 1),
3576
3576
  a(C, {
@@ -3583,9 +3583,9 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3583
3583
  t("div", es, [
3584
3584
  l[18] || (l[18] = t("div", { class: "w-[25%]" }, "Payment Term", -1)),
3585
3585
  t("div", ts, [
3586
- a(M, {
3586
+ a(j, {
3587
3587
  modelValue: e.value.platform.mappings.paymentTerm,
3588
- "onUpdate:modelValue": l[16] || (l[16] = (K) => e.value.platform.mappings.paymentTerm = K),
3588
+ "onUpdate:modelValue": l[16] || (l[16] = (D) => e.value.platform.mappings.paymentTerm = D),
3589
3589
  options: {
3590
3590
  id: { placeholder: "ID", editable: !0 },
3591
3591
  name: { placeholder: "Name", editable: !0 }
@@ -3595,38 +3595,38 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3595
3595
  }, null, 8, ["modelValue"])
3596
3596
  ])
3597
3597
  ]),
3598
- f.retrievedMethods.isError ? O("", !0) : (s(), _("div", os, S(d(o)("report.integration.biztory.paymentTerm")), 1)),
3599
- f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length == 0 && !f.retrievedMethods.isError ? (s(), _("span", as, S(d(o)("report.integration.biztory.noPaymentMethods")), 1)) : O("", !0),
3600
- f.retrievedMethods.isLoaded ? O("", !0) : (s(), N(te, {
3598
+ f.retrievedMethods.isError ? O("", !0) : (i(), _("div", os, S(d(o)("report.integration.biztory.paymentTerm")), 1)),
3599
+ f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length == 0 && !f.retrievedMethods.isError ? (i(), _("span", as, S(d(o)("report.integration.biztory.noPaymentMethods")), 1)) : O("", !0),
3600
+ f.retrievedMethods.isLoaded ? O("", !0) : (i(), R(ee, {
3601
3601
  key: 2,
3602
3602
  size: "xl"
3603
3603
  })),
3604
- f.retrievedMethods.isError ? (s(), _("span", ls, S(d(o)("report.integration.biztory.error")), 1)) : O("", !0),
3605
- f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length != 0 ? (s(), N(de, {
3604
+ f.retrievedMethods.isError ? (i(), _("span", ls, S(d(o)("report.integration.biztory.error")), 1)) : O("", !0),
3605
+ f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length != 0 ? (i(), R(re, {
3606
3606
  key: 4,
3607
3607
  "header-items": ["Key", "Payment Method"],
3608
- "total-items-count": ((D = (j = (u = (H = e.value) == null ? void 0 : H.platform) == null ? void 0 : u.mappings) == null ? void 0 : j.paymentMethods) == null ? void 0 : D.length) || 0,
3608
+ "total-items-count": ((K = (P = (u = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : u.mappings) == null ? void 0 : P.paymentMethods) == null ? void 0 : K.length) || 0,
3609
3609
  "is-include-pre-action": !0,
3610
3610
  "is-include-post-action": !0,
3611
3611
  "is-take-whole-row": !0
3612
3612
  }, {
3613
- default: W(() => {
3614
- var K, P, q;
3613
+ default: G(() => {
3614
+ var D, N, q;
3615
3615
  return [
3616
3616
  t("div", ns, [
3617
- (s(!0), _(B, null, Y((q = (P = (K = e.value) == null ? void 0 : K.platform) == null ? void 0 : P.mappings) == null ? void 0 : q.paymentMethods, (le, L) => {
3618
- var ie;
3619
- return s(), _("div", {
3617
+ (i(!0), _(B, null, z((q = (N = (D = e.value) == null ? void 0 : D.platform) == null ? void 0 : N.mappings) == null ? void 0 : q.paymentMethods, (ae, L) => {
3618
+ var se;
3619
+ return i(), _("div", {
3620
3620
  key: `payment-${L}`,
3621
3621
  class: "grid-cols-1 grid gap-x-16"
3622
3622
  }, [
3623
- f.retrievedMethods.isLoaded && f.retrievedMethods.data && ((ie = f.retrievedMethods.data) == null ? void 0 : ie.length) != 0 ? (s(), _("div", ss, [
3624
- a(J, {
3623
+ f.retrievedMethods.isLoaded && f.retrievedMethods.data && ((se = f.retrievedMethods.data) == null ? void 0 : se.length) != 0 ? (i(), _("div", ss, [
3624
+ a(W, {
3625
3625
  "model-value": !e.value.platform.mappings.paymentMethods[L].skip,
3626
3626
  value: "",
3627
3627
  "onUpdate:modelValue": (ke) => {
3628
- var we, oe;
3629
- (oe = (we = e.value.platform) == null ? void 0 : we.mappings) != null && oe.paymentMethods[L] && (e.value.platform.mappings.paymentMethods[L].skip = !ke);
3628
+ var we, te;
3629
+ (te = (we = e.value.platform) == null ? void 0 : we.mappings) != null && te.paymentMethods[L] && (e.value.platform.mappings.paymentMethods[L].skip = !ke);
3630
3630
  }
3631
3631
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
3632
3632
  a(Ge, {
@@ -3663,42 +3663,42 @@ const xt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3663
3663
  });
3664
3664
  function rs(f) {
3665
3665
  return f.reduce((o, e) => {
3666
- var A, h, T, w, k, m, V, $, p, y, c, v, b, g, r, l, n, C, I, R, Q, te;
3667
- const { invoice: i } = e, x = o.length;
3666
+ var A, h, T, w, k, m, V, $, p, y, c, v, b, g, r, l, n, C, I, M, X, ee;
3667
+ const { invoice: s } = e, x = o.length;
3668
3668
  o[x] = {
3669
- invoice_date: i.invoice_date,
3670
- ref_num: i.ref_num,
3671
- grandTotal: i.grandTotal,
3669
+ invoice_date: s.invoice_date,
3670
+ ref_num: s.ref_num,
3671
+ grandTotal: s.grandTotal,
3672
3672
  // tax_code: invoice.tax[0].tax_code,
3673
3673
  // tax: invoice.tax.reduce((sum, tax) => sum + tax.tax, 0),
3674
3674
  // service_charge: invoice.service_charge.total,
3675
- item_code: (A = i.items[0]) == null ? void 0 : A.code,
3676
- item_desc: (h = i.items[0]) == null ? void 0 : h.description,
3677
- item_price: (T = i.items[0]) == null ? void 0 : T.price,
3678
- item_tax: (w = i.items[0]) == null ? void 0 : w.total_tax,
3679
- item_tax_label: ((k = i.items[0]) == null ? void 0 : k.tax_label) || "-",
3680
- payment_amount: ((V = (m = i.transactions) == null ? void 0 : m[0]) == null ? void 0 : V.amount) || void 0,
3681
- payment_method: ((p = ($ = i.transactions) == null ? void 0 : $[0]) == null ? void 0 : p.payment_method) || "-",
3682
- payment_term: ((y = i == null ? void 0 : i.payment_term) == null ? void 0 : y.name) || ""
3675
+ item_code: (A = s.items[0]) == null ? void 0 : A.code,
3676
+ item_desc: (h = s.items[0]) == null ? void 0 : h.description,
3677
+ item_price: (T = s.items[0]) == null ? void 0 : T.price,
3678
+ item_tax: (w = s.items[0]) == null ? void 0 : w.total_tax,
3679
+ item_tax_label: ((k = s.items[0]) == null ? void 0 : k.tax_label) || "-",
3680
+ payment_amount: ((V = (m = s.transactions) == null ? void 0 : m[0]) == null ? void 0 : V.amount) || void 0,
3681
+ payment_method: ((p = ($ = s.transactions) == null ? void 0 : $[0]) == null ? void 0 : p.payment_method) || "-",
3682
+ payment_term: ((y = s == null ? void 0 : s.payment_term) == null ? void 0 : y.name) || ""
3683
3683
  };
3684
- for (let J = 1; J < Math.max(((c = i.items) == null ? void 0 : c.length) || 0, ((v = i.transactions) == null ? void 0 : v.length) || 0); J++) {
3685
- const G = x + J;
3686
- o[G] || (o[G] = {});
3687
- const ee = i.items[J];
3688
- ee ? o[G] = {
3689
- ...o[G],
3690
- item_code: ee.code,
3691
- item_desc: ee.description,
3692
- item_price: ee.price,
3693
- item_tax: ee.total_tax,
3694
- item_tax_label: ee.tax_label || "-",
3695
- payment_amount: ((g = (b = i.transactions) == null ? void 0 : b[J]) == null ? void 0 : g.amount) || void 0,
3696
- payment_method: ((l = (r = i.transactions) == null ? void 0 : r[J]) == null ? void 0 : l.payment_method) || "-",
3697
- payment_term: ((n = i == null ? void 0 : i.payment_term) == null ? void 0 : n.name) || ""
3698
- } : o[G] = {
3699
- payment_amount: ((I = (C = i.transactions) == null ? void 0 : C[J]) == null ? void 0 : I.amount) || void 0,
3700
- payment_method: ((Q = (R = i.transactions) == null ? void 0 : R[J]) == null ? void 0 : Q.payment_method) || "-",
3701
- payment_term: ((te = i == null ? void 0 : i.payment_term) == null ? void 0 : te.name) || ""
3684
+ for (let W = 1; W < Math.max(((c = s.items) == null ? void 0 : c.length) || 0, ((v = s.transactions) == null ? void 0 : v.length) || 0); W++) {
3685
+ const Q = x + W;
3686
+ o[Q] || (o[Q] = {});
3687
+ const Z = s.items[W];
3688
+ Z ? o[Q] = {
3689
+ ...o[Q],
3690
+ item_code: Z.code,
3691
+ item_desc: Z.description,
3692
+ item_price: Z.price,
3693
+ item_tax: Z.total_tax,
3694
+ item_tax_label: Z.tax_label || "-",
3695
+ payment_amount: ((g = (b = s.transactions) == null ? void 0 : b[W]) == null ? void 0 : g.amount) || void 0,
3696
+ payment_method: ((l = (r = s.transactions) == null ? void 0 : r[W]) == null ? void 0 : l.payment_method) || "-",
3697
+ payment_term: ((n = s == null ? void 0 : s.payment_term) == null ? void 0 : n.name) || ""
3698
+ } : o[Q] = {
3699
+ payment_amount: ((I = (C = s.transactions) == null ? void 0 : C[W]) == null ? void 0 : I.amount) || void 0,
3700
+ payment_method: ((X = (M = s.transactions) == null ? void 0 : M[W]) == null ? void 0 : X.payment_method) || "-",
3701
+ payment_term: ((ee = s == null ? void 0 : s.payment_term) == null ? void 0 : ee.name) || ""
3702
3702
  };
3703
3703
  }
3704
3704
  return o;
@@ -3779,31 +3779,31 @@ const ds = [
3779
3779
  function cs(f) {
3780
3780
  return f.reduce((o, e) => {
3781
3781
  var T, w, k, m, V, $, p, y, c, v, b, g, r, l;
3782
- const { invoice: i, payments: x } = e, A = o.length;
3782
+ const { invoice: s, payments: x } = e, A = o.length;
3783
3783
  o[A] = {
3784
- invoice_date: i.invoice_date,
3785
- ref_num: e.isRefund && e.credit_notes && e.credit_notes.length > 0 ? ((T = e.credit_notes[0]) == null ? void 0 : T.ref_num) ?? i.ref_num : i.ref_num,
3786
- total: i.total,
3787
- item_code: (w = i.items[0]) == null ? void 0 : w.code,
3788
- item_description: (k = i.items[0]) == null ? void 0 : k.description,
3789
- item_price: (m = i.items[0]) == null ? void 0 : m.price,
3790
- item_tax_label: ((V = i.items[0]) == null ? void 0 : V.tax_label) ?? "",
3791
- item_tax_amount: (($ = i.items[0]) == null ? void 0 : $.total_tax) ?? "",
3792
- service_charge_amount: ((p = i.service_charges[0]) == null ? void 0 : p.total) ?? "",
3793
- rounding: i.rounding ?? 0,
3794
- payment_term_id: i.payment_term.name ?? "",
3784
+ invoice_date: s.invoice_date,
3785
+ ref_num: e.isRefund && e.credit_notes && e.credit_notes.length > 0 ? ((T = e.credit_notes[0]) == null ? void 0 : T.ref_num) ?? s.ref_num : s.ref_num,
3786
+ total: s.total,
3787
+ item_code: (w = s.items[0]) == null ? void 0 : w.code,
3788
+ item_description: (k = s.items[0]) == null ? void 0 : k.description,
3789
+ item_price: (m = s.items[0]) == null ? void 0 : m.price,
3790
+ item_tax_label: ((V = s.items[0]) == null ? void 0 : V.tax_label) ?? "",
3791
+ item_tax_amount: (($ = s.items[0]) == null ? void 0 : $.total_tax) ?? "",
3792
+ service_charge_amount: ((p = s.service_charges[0]) == null ? void 0 : p.total) ?? "",
3793
+ rounding: s.rounding ?? 0,
3794
+ payment_term_id: s.payment_term.name ?? "",
3795
3795
  payment_term_amount: ((c = (y = x[0]) == null ? void 0 : y.ids[0]) == null ? void 0 : c.amount) ?? "",
3796
3796
  payment_method: ((v = x[0]) == null ? void 0 : v.payment_method_name) || ""
3797
3797
  };
3798
3798
  const h = Math.max(
3799
- ((b = i.items) == null ? void 0 : b.length) || 0,
3800
- ((g = i.terms) == null ? void 0 : g.length) || 0,
3799
+ ((b = s.items) == null ? void 0 : b.length) || 0,
3800
+ ((g = s.terms) == null ? void 0 : g.length) || 0,
3801
3801
  (x == null ? void 0 : x.length) || 0
3802
3802
  );
3803
3803
  for (let n = 1; n < h; n++) {
3804
3804
  const C = A + n;
3805
3805
  o[C] || (o[C] = {});
3806
- const I = i.items[n], R = x[n];
3806
+ const I = s.items[n], M = x[n];
3807
3807
  I ? o[C] = {
3808
3808
  ...o[C],
3809
3809
  item_code: I.code,
@@ -3811,14 +3811,14 @@ function cs(f) {
3811
3811
  item_price: I.total,
3812
3812
  item_tax_label: I.tax_label == "?" ? "" : I.tax_label ?? "",
3813
3813
  item_tax_amount: I.total_tax ?? "",
3814
- payment_term_id: i.payment_term.name ?? "",
3815
- payment_term_amount: ((r = R == null ? void 0 : R.ids[0]) == null ? void 0 : r.amount) ?? "",
3816
- payment_method: (R == null ? void 0 : R.payment_method_name) || ""
3814
+ payment_term_id: s.payment_term.name ?? "",
3815
+ payment_term_amount: ((r = M == null ? void 0 : M.ids[0]) == null ? void 0 : r.amount) ?? "",
3816
+ payment_method: (M == null ? void 0 : M.payment_method_name) || ""
3817
3817
  } : o[C] = {
3818
3818
  ...o[C],
3819
- payment_term_id: i.payment_term.name ?? "",
3820
- payment_term_amount: ((l = R == null ? void 0 : R.ids[0]) == null ? void 0 : l.amount) ?? "",
3821
- payment_method: (R == null ? void 0 : R.payment_method_name) || ""
3819
+ payment_term_id: s.payment_term.name ?? "",
3820
+ payment_term_amount: ((l = M == null ? void 0 : M.ids[0]) == null ? void 0 : l.amount) ?? "",
3821
+ payment_method: (M == null ? void 0 : M.payment_method_name) || ""
3822
3822
  };
3823
3823
  }
3824
3824
  return o;
@@ -3893,7 +3893,7 @@ const ms = [
3893
3893
  ], us = { class: "h-full flex flex-col gap-16" }, ps = { class: "flex flex-row gap-2 justify-between items-center" }, fs = {
3894
3894
  key: 0,
3895
3895
  class: "flex gap-24 w-full h-full justify-center items-center overflow-y-auto"
3896
- }, vs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gs = /* @__PURE__ */ Z({
3896
+ }, vs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gs = /* @__PURE__ */ J({
3897
3897
  __name: "Preview",
3898
3898
  props: {
3899
3899
  modelValue: { required: !0 },
@@ -3901,24 +3901,24 @@ const ms = [
3901
3901
  },
3902
3902
  emits: ["update:modelValue"],
3903
3903
  setup(f) {
3904
- const { t: o } = ne(), e = ae(f, "modelValue"), i = X(!1), x = Ce(), { dateRange: A } = Ye($e()), h = X([]);
3904
+ const { t: o } = le(), e = oe(f, "modelValue"), s = H(!1), x = Ce(), { dateRange: A } = ze($e()), h = H([]);
3905
3905
  De(
3906
3906
  () => A.value,
3907
3907
  async () => {
3908
3908
  if (e.value._id)
3909
3909
  try {
3910
- i.value = !0, h.value = await qe(e.value._id);
3910
+ s.value = !0, h.value = await qe(e.value._id);
3911
3911
  } catch (m) {
3912
3912
  x.open({ message: m.message, type: "error" });
3913
3913
  } finally {
3914
- i.value = !1;
3914
+ s.value = !1;
3915
3915
  }
3916
3916
  },
3917
3917
  {
3918
3918
  immediate: !0
3919
3919
  }
3920
3920
  );
3921
- const T = z(() => {
3921
+ const T = Y(() => {
3922
3922
  switch (e.value.platform.mappings.version) {
3923
3923
  case "v1":
3924
3924
  return rs(h.value);
@@ -3926,7 +3926,7 @@ const ms = [
3926
3926
  return cs(h.value);
3927
3927
  }
3928
3928
  return [];
3929
- }), w = z(() => {
3929
+ }), w = Y(() => {
3930
3930
  switch (e.value.platform.mappings.version) {
3931
3931
  case "v1":
3932
3932
  return ds;
@@ -3937,16 +3937,16 @@ const ms = [
3937
3937
  });
3938
3938
  async function k() {
3939
3939
  try {
3940
- e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (i.value = !0, await et(e.value._id), x.open({ message: "Upload successful", type: "success" })) : x.open({ message: "Invalid accounting setting", type: "error" });
3940
+ e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (s.value = !0, await tt(e.value._id), x.open({ message: "Upload successful", type: "success" })) : x.open({ message: "Invalid accounting setting", type: "error" });
3941
3941
  } catch (m) {
3942
3942
  m.message && x.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((V) => x.open({ message: V, type: "error" }));
3943
3943
  } finally {
3944
- i.value = !1;
3944
+ s.value = !1;
3945
3945
  }
3946
3946
  }
3947
3947
  return (m, V) => {
3948
3948
  const $ = U("FmButton"), p = U("FmCircularProgress"), y = U("FmTable");
3949
- return s(), _("div", us, [
3949
+ return i(), _("div", us, [
3950
3950
  t("div", ps, [
3951
3951
  a(He, {
3952
3952
  "date-range": d(A),
@@ -3954,16 +3954,16 @@ const ms = [
3954
3954
  compare: !1
3955
3955
  }, null, 8, ["date-range"]),
3956
3956
  a($, {
3957
- loading: i.value,
3957
+ loading: s.value,
3958
3958
  variant: "primary",
3959
3959
  label: "Upload",
3960
3960
  onClick: k
3961
3961
  }, null, 8, ["loading"])
3962
3962
  ]),
3963
- i.value ? (s(), _("div", fs, [
3963
+ s.value ? (i(), _("div", fs, [
3964
3964
  a(p, { size: "xl" }),
3965
3965
  t("span", vs, S(d(o)("report.common.isLoading")), 1)
3966
- ])) : (s(), N(y, {
3966
+ ])) : (i(), R(y, {
3967
3967
  key: 1,
3968
3968
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
3969
3969
  "row-data": T.value,
@@ -3972,7 +3972,7 @@ const ms = [
3972
3972
  ]);
3973
3973
  };
3974
3974
  }
3975
- }), ys = { class: "h-full relative flex flex-col" }, xs = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, bs = /* @__PURE__ */ Z({
3975
+ }), ys = { class: "h-full relative flex flex-col" }, xs = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, bs = /* @__PURE__ */ J({
3976
3976
  __name: "Biztory",
3977
3977
  props: {
3978
3978
  modelValue: { required: !0 },
@@ -3980,7 +3980,7 @@ const ms = [
3980
3980
  },
3981
3981
  emits: ["update:modelValue"],
3982
3982
  setup(f) {
3983
- const { t: o } = ne(), e = ae(f, "modelValue"), i = X("setting"), x = [
3983
+ const { t: o } = le(), e = oe(f, "modelValue"), s = H("setting"), x = [
3984
3984
  {
3985
3985
  label: o("report.integration.setting"),
3986
3986
  value: "setting",
@@ -3991,8 +3991,8 @@ const ms = [
3991
3991
  value: "preview",
3992
3992
  icon: "table"
3993
3993
  }
3994
- ], A = Ve(), h = z(() => {
3995
- switch (i.value) {
3994
+ ], A = Ve(), h = Y(() => {
3995
+ switch (s.value) {
3996
3996
  case "preview":
3997
3997
  return {
3998
3998
  component: gs
@@ -4008,7 +4008,7 @@ const ms = [
4008
4008
  default:
4009
4009
  return null;
4010
4010
  }
4011
- }), T = X({}), w = X({}), k = (y, c) => y.map((v) => ({
4011
+ }), T = H({}), w = H({}), k = (y, c) => y.map((v) => ({
4012
4012
  label: c.length > 2 ? `ID:${v[c[2]]} [${v[c[0]]}] ${v[c[1]]}` : `[${v[c[0]]}] ${v[c[1]]}`,
4013
4013
  value: v.id,
4014
4014
  cnId: v.cnId ? v.cnId : null
@@ -4035,31 +4035,31 @@ const ms = [
4035
4035
  "Failed to fetch customers:"
4036
4036
  ), T.value.isLoaded = !0, w.value.isLoaded = !0;
4037
4037
  };
4038
- return at(p), De(() => {
4038
+ return lt(p), De(() => {
4039
4039
  var y;
4040
4040
  return (y = e.value.platform.mappings) == null ? void 0 : y.version;
4041
4041
  }, p), (y, c) => {
4042
4042
  var g, r, l;
4043
4043
  const v = U("FmPageHead"), b = U("FmTabs");
4044
- return s(), _("div", ys, [
4044
+ return i(), _("div", ys, [
4045
4045
  a(v, {
4046
4046
  title: ((g = e.value) == null ? void 0 : g.name) || "Biztory",
4047
4047
  "back-button": !0,
4048
4048
  style: { paddingLeft: "0px", paddingRight: "0px" },
4049
4049
  "onClick:back": d(A).back
4050
4050
  }, {
4051
- description: W(() => c[2] || (c[2] = [
4051
+ description: G(() => c[2] || (c[2] = [
4052
4052
  t("div", null, null, -1)
4053
4053
  ])),
4054
4054
  _: 1
4055
4055
  }, 8, ["title", "onClick:back"]),
4056
4056
  a(b, {
4057
- "model-value": i.value,
4058
- "onUpdate:modelValue": c[0] || (c[0] = (n) => i.value = n),
4057
+ "model-value": s.value,
4058
+ "onUpdate:modelValue": c[0] || (c[0] = (n) => s.value = n),
4059
4059
  items: x
4060
4060
  }, null, 8, ["model-value"]),
4061
4061
  t("div", xs, [
4062
- (s(), N(Ie((r = h.value) == null ? void 0 : r.component), ot({
4062
+ (i(), R(Ie((r = h.value) == null ? void 0 : r.component), at({
4063
4063
  modelValue: e.value,
4064
4064
  "onUpdate:modelValue": c[1] || (c[1] = (n) => e.value = n)
4065
4065
  }, (l = h.value) == null ? void 0 : l.props), null, 16, ["modelValue"]))
@@ -4070,7 +4070,7 @@ const ms = [
4070
4070
  }), _s = {
4071
4071
  key: 0,
4072
4072
  class: "flex flex-col h-full"
4073
- }, hs = { class: "flex flex-col gap-16 pb-[24px]" }, ws = { class: "flex flex-row justify-between items-center gap-2" }, ks = { class: "flex flex-row gap-2 items-center" }, Vs = { 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" }, Cs = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ss = { class: "w-[90%] flex flex-col gap-24" }, As = { class: "flex flex-col gap-16" }, Ds = { class: "fm-typo-en-title-sm-800" }, Fs = { class: "flex flex-row items-center max-w-[100%]" }, Us = { class: "w-[25%]" }, Ts = { class: "flex-grow" }, Ks = { class: "flex flex-row items-center max-w-[100%]" }, Is = { class: "w-[25%]" }, Ns = { class: "flex flex-row items-center justify-between gap-x-16" }, Rs = { class: "fm-typo-en-title-sm-800" }, Ps = { class: "grid-cols-1 grid gap-16 p-2" }, Ms = /* @__PURE__ */ Z({
4073
+ }, hs = { class: "flex flex-col gap-16 pb-[24px]" }, ws = { class: "flex flex-row justify-between items-center gap-2" }, ks = { class: "flex flex-row gap-2 items-center" }, Vs = { 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" }, Cs = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ss = { class: "w-[90%] flex flex-col gap-24" }, As = { class: "flex flex-col gap-16" }, Ds = { class: "fm-typo-en-title-sm-800" }, Fs = { class: "flex flex-row items-center max-w-[100%]" }, Us = { class: "w-[25%]" }, Ts = { class: "flex-grow" }, Ks = { class: "flex flex-row items-center max-w-[100%]" }, Is = { class: "w-[25%]" }, Ns = { class: "flex flex-row items-center justify-between gap-x-16" }, Rs = { class: "fm-typo-en-title-sm-800" }, Ps = { class: "grid-cols-1 grid gap-16 p-2" }, Ms = /* @__PURE__ */ J({
4074
4074
  __name: "Setting",
4075
4075
  props: {
4076
4076
  modelValue: { required: !0 },
@@ -4078,7 +4078,7 @@ const ms = [
4078
4078
  },
4079
4079
  emits: ["update:modelValue"],
4080
4080
  setup(f) {
4081
- const { t: o } = ne(), e = ae(f, "modelValue"), i = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = ze(), { restaurants: w } = $e(), k = z(
4081
+ const { t: o } = le(), e = oe(f, "modelValue"), s = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = Ye(), { restaurants: w } = $e(), k = Y(
4082
4082
  () => w.map((c) => ({ label: c.name, value: c.id }))
4083
4083
  );
4084
4084
  async function m() {
@@ -4089,7 +4089,7 @@ const ms = [
4089
4089
  try {
4090
4090
  await Oe(e.value._id), await x.getSettings(), A.back();
4091
4091
  } catch (v) {
4092
- i.open({ type: "error", message: v.message });
4092
+ s.open({ type: "error", message: v.message });
4093
4093
  }
4094
4094
  });
4095
4095
  }
@@ -4098,7 +4098,7 @@ const ms = [
4098
4098
  try {
4099
4099
  await Be(e.value._id, e.value), await x.getSettings();
4100
4100
  } catch (c) {
4101
- i.open({ type: "error", message: c.message });
4101
+ s.open({ type: "error", message: c.message });
4102
4102
  }
4103
4103
  });
4104
4104
  }
@@ -4125,16 +4125,16 @@ const ms = [
4125
4125
  try {
4126
4126
  await Ee(e.value._id), await x.getSettings();
4127
4127
  } catch (c) {
4128
- i.open({ type: "error", message: c.message });
4128
+ s.open({ type: "error", message: c.message });
4129
4129
  }
4130
4130
  });
4131
4131
  }
4132
4132
  return je(async () => {
4133
4133
  await x.getSettings();
4134
4134
  }), (c, v) => {
4135
- var C, I, R, Q, te, J;
4135
+ var C, I, M, X, ee, W;
4136
4136
  const b = U("FmIcon"), g = U("FmButton"), r = U("FmMenuDivider"), l = U("FmTextField"), n = U("FmSelect");
4137
- return (I = (C = e.value) == null ? void 0 : C.platform) != null && I.mappings ? (s(), _("div", _s, [
4137
+ return (I = (C = e.value) == null ? void 0 : C.platform) != null && I.mappings ? (i(), _("div", _s, [
4138
4138
  t("div", hs, [
4139
4139
  t("div", ws, [
4140
4140
  v[4] || (v[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
@@ -4171,7 +4171,7 @@ const ms = [
4171
4171
  t("div", Ts, [
4172
4172
  a(l, {
4173
4173
  modelValue: e.value.name,
4174
- "onUpdate:modelValue": v[0] || (v[0] = (G) => e.value.name = G)
4174
+ "onUpdate:modelValue": v[0] || (v[0] = (Q) => e.value.name = Q)
4175
4175
  }, null, 8, ["modelValue"])
4176
4176
  ])
4177
4177
  ]),
@@ -4183,14 +4183,14 @@ const ms = [
4183
4183
  items: k.value,
4184
4184
  placeholder: "Select location",
4185
4185
  class: "flex-grow",
4186
- "onUpdate:modelValue": v[1] || (v[1] = (G) => e.value.platform.locationIds[0] = G)
4186
+ "onUpdate:modelValue": v[1] || (v[1] = (Q) => e.value.platform.locationIds[0] = Q)
4187
4187
  }, null, 8, ["model-value", "items"])
4188
4188
  ])
4189
4189
  ]),
4190
4190
  a(r, { style: { margin: 0 } }),
4191
4191
  a(Xe, {
4192
4192
  modelValue: e.value.platform,
4193
- "onUpdate:modelValue": v[2] || (v[2] = (G) => e.value.platform = G),
4193
+ "onUpdate:modelValue": v[2] || (v[2] = (Q) => e.value.platform = Q),
4194
4194
  label: d(o)("report.input.email")
4195
4195
  }, null, 8, ["modelValue", "label"]),
4196
4196
  a(r, { style: { margin: 0 } }),
@@ -4203,26 +4203,26 @@ const ms = [
4203
4203
  onClick: v[3] || (v[3] = () => p("employees"))
4204
4204
  })
4205
4205
  ]),
4206
- a(de, {
4206
+ a(re, {
4207
4207
  "header-items": ["Name", "Badge No", "Employee No"],
4208
- "total-items-count": ((J = (te = (Q = (R = e.value) == null ? void 0 : R.platform) == null ? void 0 : Q.mappings) == null ? void 0 : te.employees) == null ? void 0 : J.length) || 0,
4208
+ "total-items-count": ((W = (ee = (X = (M = e.value) == null ? void 0 : M.platform) == null ? void 0 : X.mappings) == null ? void 0 : ee.employees) == null ? void 0 : W.length) || 0,
4209
4209
  "is-include-post-action": !0
4210
4210
  }, {
4211
- default: W(() => {
4212
- var G, ee, re;
4211
+ default: G(() => {
4212
+ var Q, Z, ie;
4213
4213
  return [
4214
4214
  t("div", Ps, [
4215
- (s(!0), _(B, null, Y((re = (ee = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : ee.mappings) == null ? void 0 : re.employees, (me, se) => (s(), N(M, {
4216
- key: `employee-${se}`,
4217
- modelValue: e.value.platform.mappings.employees[se],
4218
- "onUpdate:modelValue": (ce) => e.value.platform.mappings.employees[se] = ce,
4215
+ (i(!0), _(B, null, z((ie = (Z = (Q = e.value) == null ? void 0 : Q.platform) == null ? void 0 : Z.mappings) == null ? void 0 : ie.employees, (ce, ne) => (i(), R(j, {
4216
+ key: `employee-${ne}`,
4217
+ modelValue: e.value.platform.mappings.employees[ne],
4218
+ "onUpdate:modelValue": (de) => e.value.platform.mappings.employees[ne] = de,
4219
4219
  options: {
4220
4220
  key: { placeholder: "Name", editable: !0 },
4221
4221
  badgeNo: { placeholder: "Badge No", editable: !0 },
4222
4222
  employeeNo: { placeholder: "Employee No", editable: !0 }
4223
4223
  },
4224
4224
  removable: !0,
4225
- onRemove: () => $("employees", se)
4225
+ onRemove: () => $("employees", ne)
4226
4226
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
4227
4227
  ])
4228
4228
  ];
@@ -4237,7 +4237,7 @@ const ms = [
4237
4237
  }), js = { class: "h-full flex flex-col gap-16" }, Ls = { class: "flex flex-row gap-2 justify-between items-center" }, Os = {
4238
4238
  key: 0,
4239
4239
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
4240
- }, Bs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Es = /* @__PURE__ */ Z({
4240
+ }, Bs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Es = /* @__PURE__ */ J({
4241
4241
  __name: "Preview",
4242
4242
  props: {
4243
4243
  modelValue: { required: !0 },
@@ -4245,7 +4245,7 @@ const ms = [
4245
4245
  },
4246
4246
  emits: ["update:modelValue"],
4247
4247
  setup(f) {
4248
- const { t: o } = ne(), e = X([]), i = [
4248
+ const { t: o } = le(), e = H([]), s = [
4249
4249
  {
4250
4250
  accessorKey: "name",
4251
4251
  header: () => F("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Name"),
@@ -4271,7 +4271,7 @@ const ms = [
4271
4271
  header: () => F("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
4272
4272
  enableSorting: !1
4273
4273
  }
4274
- ], x = ae(f, "modelValue"), A = X(!1), h = Ce(), { dateRange: T } = Ye($e());
4274
+ ], x = oe(f, "modelValue"), A = H(!1), h = Ce(), { dateRange: T } = ze($e());
4275
4275
  De(
4276
4276
  () => T.value,
4277
4277
  async () => {
@@ -4299,7 +4299,7 @@ const ms = [
4299
4299
  }
4300
4300
  return (k, m) => {
4301
4301
  const V = U("FmButton"), $ = U("FmCircularProgress"), p = U("FmTable");
4302
- return s(), _("div", js, [
4302
+ return i(), _("div", js, [
4303
4303
  t("div", Ls, [
4304
4304
  a(He, {
4305
4305
  "date-range": d(T),
@@ -4313,19 +4313,19 @@ const ms = [
4313
4313
  onClick: w
4314
4314
  }, null, 8, ["loading", "label"])
4315
4315
  ]),
4316
- A.value ? (s(), _("div", Os, [
4316
+ A.value ? (i(), _("div", Os, [
4317
4317
  a($, { size: "xl" }),
4318
4318
  t("span", Bs, S(d(o)("report.common.isLoading")), 1)
4319
- ])) : e.value.length > 0 ? (s(), N(p, {
4319
+ ])) : e.value.length > 0 ? (i(), R(p, {
4320
4320
  key: 1,
4321
4321
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
4322
4322
  "row-data": e.value,
4323
- "column-defs": i
4323
+ "column-defs": s
4324
4324
  }, null, 8, ["row-data"])) : O("", !0)
4325
4325
  ]);
4326
4326
  };
4327
4327
  }
4328
- }), qs = { class: "h-full relative flex flex-col" }, zs = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Ys = /* @__PURE__ */ Z({
4328
+ }), qs = { class: "h-full relative flex flex-col" }, Ys = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, zs = /* @__PURE__ */ J({
4329
4329
  __name: "IFlexiHRMS",
4330
4330
  props: {
4331
4331
  modelValue: {},
@@ -4333,7 +4333,7 @@ const ms = [
4333
4333
  },
4334
4334
  emits: ["update:modelValue"],
4335
4335
  setup(f) {
4336
- const { t: o } = ne(), e = ae(f, "modelValue"), i = X("setting"), x = [
4336
+ const { t: o } = le(), e = oe(f, "modelValue"), s = H("setting"), x = [
4337
4337
  {
4338
4338
  label: o("report.integration.setting"),
4339
4339
  value: "setting",
@@ -4344,8 +4344,8 @@ const ms = [
4344
4344
  value: "preview",
4345
4345
  icon: "table"
4346
4346
  }
4347
- ], A = Ve(), h = z(() => {
4348
- switch (i.value) {
4347
+ ], A = Ve(), h = Y(() => {
4348
+ switch (s.value) {
4349
4349
  case "preview":
4350
4350
  return Es;
4351
4351
  case "setting":
@@ -4357,25 +4357,25 @@ const ms = [
4357
4357
  return (T, w) => {
4358
4358
  var V;
4359
4359
  const k = U("FmPageHead"), m = U("FmTabs");
4360
- return s(), _("div", qs, [
4360
+ return i(), _("div", qs, [
4361
4361
  a(k, {
4362
4362
  title: ((V = e.value) == null ? void 0 : V.name) || "AutoCount",
4363
4363
  "back-button": !0,
4364
4364
  style: { paddingLeft: "0px", paddingRight: "0px" },
4365
4365
  "onClick:back": d(A).back
4366
4366
  }, {
4367
- description: W(() => w[2] || (w[2] = [
4367
+ description: G(() => w[2] || (w[2] = [
4368
4368
  t("div", null, null, -1)
4369
4369
  ])),
4370
4370
  _: 1
4371
4371
  }, 8, ["title", "onClick:back"]),
4372
4372
  a(m, {
4373
- "model-value": i.value,
4374
- "onUpdate:modelValue": w[0] || (w[0] = ($) => i.value = $),
4373
+ "model-value": s.value,
4374
+ "onUpdate:modelValue": w[0] || (w[0] = ($) => s.value = $),
4375
4375
  items: x
4376
4376
  }, null, 8, ["model-value"]),
4377
- t("div", zs, [
4378
- (s(), N(Ie(h.value), {
4377
+ t("div", Ys, [
4378
+ (i(), R(Ie(h.value), {
4379
4379
  modelValue: e.value,
4380
4380
  "onUpdate:modelValue": w[1] || (w[1] = ($) => e.value = $)
4381
4381
  }, null, 8, ["modelValue"]))
@@ -4398,7 +4398,7 @@ const ms = [
4398
4398
  }, Fi = {
4399
4399
  key: 2,
4400
4400
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
4401
- }, Ui = { class: "flex flex-col gap-16" }, Ti = { class: "fm-typo-en-title-sm-800" }, Ki = { class: "flex flex-row items-center w-[100%] justify-start" }, Ii = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, Ni = { class: "flex flex-row items-center w-[100%] justify-start" }, Ri = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, Pi = { class: "flex flex-row items-center w-[100%] justify-start" }, Mi = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ji = { class: "flex flex-col gap-16 pt-3 pb-3" }, Li = { class: "flex flex-row items-center gap-5" }, Oi = { class: "fm-typo-en-title-sm-800" }, Bi = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ei = { class: "flex flex-row items-center justify-between gap-x-16" }, qi = { class: "fm-typo-en-title-sm-800" }, zi = { class: "flex flex-row items-center justify-between gap-x-16" }, Yi = { class: "fm-typo-en-title-sm-800" }, Hi = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, Xi = { class: "flex flex-row items-center justify-between gap-x-16" }, Qi = { class: "fm-typo-en-title-sm-800" }, Gi = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Wi = /* @__PURE__ */ Z({
4401
+ }, Ui = { class: "flex flex-col gap-16" }, Ti = { class: "fm-typo-en-title-sm-800" }, Ki = { class: "flex flex-row items-center w-[100%] justify-start" }, Ii = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, Ni = { class: "flex flex-row items-center w-[100%] justify-start" }, Ri = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, Pi = { class: "flex flex-row items-center w-[100%] justify-start" }, Mi = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ji = { class: "flex flex-col gap-16 pt-3 pb-3" }, Li = { class: "flex flex-row items-center gap-5" }, Oi = { class: "fm-typo-en-title-sm-800" }, Bi = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ei = { class: "flex flex-row items-center justify-between gap-x-16" }, qi = { class: "fm-typo-en-title-sm-800" }, Yi = { class: "flex flex-row items-center justify-between gap-x-16" }, zi = { class: "fm-typo-en-title-sm-800" }, Hi = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16 p-2" }, Xi = { class: "flex flex-row items-center justify-between gap-x-16" }, Qi = { class: "fm-typo-en-title-sm-800" }, Gi = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Wi = /* @__PURE__ */ J({
4402
4402
  __name: "Setting",
4403
4403
  props: /* @__PURE__ */ Me({
4404
4404
  retrievedDebtors: {
@@ -4415,10 +4415,10 @@ const ms = [
4415
4415
  }),
4416
4416
  emits: ["update:modelValue"],
4417
4417
  setup(f) {
4418
- const { t: o } = ne(), e = ae(f, "modelValue"), i = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = ze(), { restaurants: w } = $e(), k = z(
4418
+ const { t: o } = le(), e = oe(f, "modelValue"), s = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = Ye(), { restaurants: w } = $e(), k = Y(
4419
4419
  () => w.map((l) => ({ label: l.name, value: l.id }))
4420
4420
  );
4421
- let m = X("");
4421
+ let m = H("");
4422
4422
  async function V() {
4423
4423
  await T({
4424
4424
  message: o("report.messages.confirmDelete", { name: e.value.name }),
@@ -4427,7 +4427,7 @@ const ms = [
4427
4427
  try {
4428
4428
  await Oe(e.value._id), await x.getSettings(), A.back();
4429
4429
  } catch (n) {
4430
- i.open({ type: "error", message: n.message });
4430
+ s.open({ type: "error", message: n.message });
4431
4431
  }
4432
4432
  });
4433
4433
  }
@@ -4436,14 +4436,14 @@ const ms = [
4436
4436
  try {
4437
4437
  await Be(e.value._id, e.value), await x.getSettings();
4438
4438
  } catch (l) {
4439
- i.open({ type: "error", message: l.message });
4439
+ s.open({ type: "error", message: l.message });
4440
4440
  }
4441
4441
  });
4442
4442
  }
4443
4443
  function p(l, n) {
4444
4444
  var C, I;
4445
4445
  (I = (C = e.value.platform) == null ? void 0 : C.mappings) != null && I[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
4446
- (R, Q) => Q !== n
4446
+ (M, X) => X !== n
4447
4447
  ));
4448
4448
  }
4449
4449
  function y(l) {
@@ -4473,7 +4473,7 @@ const ms = [
4473
4473
  try {
4474
4474
  await Ee(e.value._id), await x.getSettings();
4475
4475
  } catch (l) {
4476
- i.open({ type: "error", message: l.message });
4476
+ s.open({ type: "error", message: l.message });
4477
4477
  }
4478
4478
  });
4479
4479
  }
@@ -4512,9 +4512,9 @@ const ms = [
4512
4512
  },
4513
4513
  { immediate: !0 }
4514
4514
  ), (l, n) => {
4515
- var ee, re, me, se, ce, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E, H;
4516
- const C = U("FmIcon"), I = U("FmButton"), R = U("FmMenuDivider"), Q = U("FmTextField"), te = U("FmSelect"), J = U("FmCircularProgress"), G = U("FmSwitch");
4517
- return (re = (ee = e.value) == null ? void 0 : ee.platform) != null && re.mappings ? (s(), _("div", Hs, [
4515
+ var Z, ie, ce, ne, de, me, ue, pe, fe, ve, ge, ye, xe, be, _e, he, E;
4516
+ const C = U("FmIcon"), I = U("FmButton"), M = U("FmMenuDivider"), X = U("FmTextField"), ee = U("FmSelect"), W = U("FmCircularProgress"), Q = U("FmSwitch");
4517
+ return (ie = (Z = e.value) == null ? void 0 : Z.platform) != null && ie.mappings ? (i(), _("div", Hs, [
4518
4518
  t("div", Xs, [
4519
4519
  t("div", Qs, [
4520
4520
  t("div", Gs, S(d(o)("report.integration.connect")), 1),
@@ -4546,12 +4546,12 @@ const ms = [
4546
4546
  t("div", ti, [
4547
4547
  t("div", oi, [
4548
4548
  t("div", ai, S(d(o)("report.integration.authDescription")), 1),
4549
- a(R, { style: { margin: 0 } }),
4549
+ a(M, { style: { margin: 0 } }),
4550
4550
  t("div", li, [
4551
4551
  t("div", ni, [
4552
4552
  t("div", si, S(d(o)("report.integration.autocount.keyId")), 1),
4553
4553
  t("div", ii, [
4554
- a(Q, {
4554
+ a(X, {
4555
4555
  modelValue: e.value.platform.keyId,
4556
4556
  "onUpdate:modelValue": n[0] || (n[0] = (u) => e.value.platform.keyId = u),
4557
4557
  placeholder: d(o)("report.integration.autocount.keyId")
@@ -4561,7 +4561,7 @@ const ms = [
4561
4561
  t("div", ri, [
4562
4562
  t("div", di, S(d(o)("report.integration.apiKey")), 1),
4563
4563
  t("div", ci, [
4564
- a(Q, {
4564
+ a(X, {
4565
4565
  modelValue: e.value.platform.apiKey,
4566
4566
  "onUpdate:modelValue": n[1] || (n[1] = (u) => e.value.platform.apiKey = u),
4567
4567
  placeholder: d(o)("report.integration.apiKey")
@@ -4571,20 +4571,20 @@ const ms = [
4571
4571
  t("div", mi, [
4572
4572
  t("div", ui, S(d(o)("report.integration.autocount.accountBookId")), 1),
4573
4573
  t("div", pi, [
4574
- a(Q, {
4574
+ a(X, {
4575
4575
  modelValue: e.value.platform.accountBookId,
4576
4576
  "onUpdate:modelValue": n[2] || (n[2] = (u) => e.value.platform.accountBookId = u),
4577
4577
  placeholder: d(o)("report.integration.autocount.accountBookId")
4578
4578
  }, null, 8, ["modelValue", "placeholder"])
4579
4579
  ])
4580
4580
  ]),
4581
- a(R, { style: { margin: 0 } }),
4581
+ a(M, { style: { margin: 0 } }),
4582
4582
  t("div", fi, [
4583
4583
  t("div", vi, S(d(o)("report.common.general")), 1),
4584
4584
  t("div", gi, [
4585
4585
  t("div", yi, S(d(o)("report.common.name")), 1),
4586
4586
  t("div", xi, [
4587
- a(Q, {
4587
+ a(X, {
4588
4588
  modelValue: e.value.name,
4589
4589
  "onUpdate:modelValue": n[3] || (n[3] = (u) => e.value.name = u)
4590
4590
  }, null, 8, ["modelValue"])
@@ -4592,7 +4592,7 @@ const ms = [
4592
4592
  ]),
4593
4593
  t("div", bi, [
4594
4594
  t("div", _i, S(d(o)("report.common.location")), 1),
4595
- a(te, {
4595
+ a(ee, {
4596
4596
  modelValue: e.value.platform.locationIds,
4597
4597
  "onUpdate:modelValue": n[4] || (n[4] = (u) => e.value.platform.locationIds = u),
4598
4598
  multiselect: !0,
@@ -4603,7 +4603,7 @@ const ms = [
4603
4603
  ]),
4604
4604
  t("div", hi, [
4605
4605
  t("div", wi, S(d(o)("report.integration.grouping.title")), 1),
4606
- a(te, {
4606
+ a(ee, {
4607
4607
  modelValue: e.value.platform.grouping,
4608
4608
  "onUpdate:modelValue": n[5] || (n[5] = (u) => e.value.platform.grouping = u),
4609
4609
  multiselect: !1,
@@ -4615,12 +4615,12 @@ const ms = [
4615
4615
  ]),
4616
4616
  t("div", ki, [
4617
4617
  t("div", Vi, S(d(o)("report.integration.autocount.debtor")), 1),
4618
- f.retrievedDebtors.isLoaded ? O("", !0) : (s(), N(J, {
4618
+ f.retrievedDebtors.isLoaded ? O("", !0) : (i(), R(W, {
4619
4619
  key: 0,
4620
4620
  size: "xl"
4621
4621
  })),
4622
- f.retrievedDebtors.isLoaded && f.retrievedDebtors.data && ((me = f.retrievedDebtors.data) == null ? void 0 : me.length) != 0 && !f.retrievedDebtors.isError ? (s(), _("div", $i, [
4623
- a(te, {
4622
+ f.retrievedDebtors.isLoaded && f.retrievedDebtors.data && ((ce = f.retrievedDebtors.data) == null ? void 0 : ce.length) != 0 && !f.retrievedDebtors.isError ? (i(), _("div", $i, [
4623
+ a(ee, {
4624
4624
  modelValue: d(m),
4625
4625
  "onUpdate:modelValue": [
4626
4626
  n[6] || (n[6] = (u) => Ke(m) ? m.value = u : m = u),
@@ -4631,16 +4631,16 @@ const ms = [
4631
4631
  class: "flex-grow",
4632
4632
  disabled: !f.retrievedDebtors.isLoaded
4633
4633
  }, null, 8, ["modelValue", "items", "placeholder", "disabled"])
4634
- ])) : f.retrievedDebtors.isError ? (s(), _("div", Ci, S(d(o)("report.integration.errorFetchingDebtor")), 1)) : O("", !0)
4634
+ ])) : f.retrievedDebtors.isError ? (i(), _("div", Ci, S(d(o)("report.integration.errorFetchingDebtor")), 1)) : O("", !0)
4635
4635
  ]),
4636
4636
  t("div", Si, [
4637
4637
  t("div", Ai, S(d(o)("report.integration.autocount.location")), 1),
4638
- f.retrievedLocations.isLoaded ? O("", !0) : (s(), N(J, {
4638
+ f.retrievedLocations.isLoaded ? O("", !0) : (i(), R(W, {
4639
4639
  key: 0,
4640
4640
  size: "xl"
4641
4641
  })),
4642
- f.retrievedLocations.isLoaded && f.retrievedLocations.data && ((se = f.retrievedLocations.data) == null ? void 0 : se.length) != 0 && !f.retrievedLocations.isError ? (s(), _("div", Di, [
4643
- a(te, {
4642
+ f.retrievedLocations.isLoaded && f.retrievedLocations.data && ((ne = f.retrievedLocations.data) == null ? void 0 : ne.length) != 0 && !f.retrievedLocations.isError ? (i(), _("div", Di, [
4643
+ a(ee, {
4644
4644
  modelValue: e.value.platform.mappings.salesLocation,
4645
4645
  "onUpdate:modelValue": n[7] || (n[7] = (u) => e.value.platform.mappings.salesLocation = u),
4646
4646
  items: f.retrievedLocations.data,
@@ -4648,15 +4648,15 @@ const ms = [
4648
4648
  class: "flex-grow",
4649
4649
  disabled: !f.retrievedLocations.isLoaded
4650
4650
  }, null, 8, ["modelValue", "items", "placeholder", "disabled"])
4651
- ])) : f.retrievedLocations.isError ? (s(), _("div", Fi, S(d(o)("report.integration.errorFetchingLocation")), 1)) : O("", !0)
4651
+ ])) : f.retrievedLocations.isError ? (i(), _("div", Fi, S(d(o)("report.integration.errorFetchingLocation")), 1)) : O("", !0)
4652
4652
  ])
4653
4653
  ]),
4654
- a(R, { style: { margin: 0 } }),
4654
+ a(M, { style: { margin: 0 } }),
4655
4655
  t("div", Ui, [
4656
4656
  t("div", Ti, S(d(o)("report.integration.autocount.saveAndApprove")), 1),
4657
4657
  t("div", Ki, [
4658
4658
  t("div", Ii, S(d(o)("report.integration.autocount.invoice")), 1),
4659
- a(G, {
4659
+ a(Q, {
4660
4660
  modelValue: e.value.platform.mappings.saveApproveInvoice,
4661
4661
  "onUpdate:modelValue": n[8] || (n[8] = (u) => e.value.platform.mappings.saveApproveInvoice = u),
4662
4662
  style: { gap: "0px" }
@@ -4664,7 +4664,7 @@ const ms = [
4664
4664
  ]),
4665
4665
  t("div", Ni, [
4666
4666
  t("div", Ri, S(d(o)("report.integration.autocount.creditNote")), 1),
4667
- a(G, {
4667
+ a(Q, {
4668
4668
  modelValue: e.value.platform.mappings.saveApproveCreditNote,
4669
4669
  "onUpdate:modelValue": n[9] || (n[9] = (u) => e.value.platform.mappings.saveApproveCreditNote = u),
4670
4670
  style: { gap: "0px" }
@@ -4672,21 +4672,21 @@ const ms = [
4672
4672
  ]),
4673
4673
  t("div", Pi, [
4674
4674
  t("div", Mi, S(d(o)("report.integration.autocount.payment")), 1),
4675
- a(G, {
4675
+ a(Q, {
4676
4676
  modelValue: e.value.platform.mappings.saveApprovePayment,
4677
4677
  "onUpdate:modelValue": n[10] || (n[10] = (u) => e.value.platform.mappings.saveApprovePayment = u),
4678
4678
  style: { gap: "0px" }
4679
4679
  }, null, 8, ["modelValue"])
4680
4680
  ])
4681
4681
  ]),
4682
- a(R, { style: { margin: 0 } }),
4682
+ a(M, { style: { margin: 0 } }),
4683
4683
  t("div", ji, [
4684
4684
  t("div", Li, [
4685
4685
  t("div", Oi, S(d(o)("report.integration.refNumFormat")), 1),
4686
4686
  a(Je)
4687
4687
  ]),
4688
4688
  t("div", Bi, [
4689
- a(M, {
4689
+ a(j, {
4690
4690
  "model-value": {
4691
4691
  key: "Invoice no",
4692
4692
  account: e.value.platform.mappings.invoiceDocNo
@@ -4694,7 +4694,7 @@ const ms = [
4694
4694
  options: g("Invoice no"),
4695
4695
  "onUpdate:modelValue": n[11] || (n[11] = (u) => b({ key: "invoiceDocNo", value: u.account }))
4696
4696
  }, null, 8, ["model-value", "options"]),
4697
- a(M, {
4697
+ a(j, {
4698
4698
  "model-value": {
4699
4699
  key: "Credit note no",
4700
4700
  account: e.value.platform.mappings.creditNoteDocNo
@@ -4702,7 +4702,7 @@ const ms = [
4702
4702
  options: g("Credit note no"),
4703
4703
  "onUpdate:modelValue": n[12] || (n[12] = (u) => b({ key: "creditNoteDocNo", value: u.account }))
4704
4704
  }, null, 8, ["model-value", "options"]),
4705
- a(M, {
4705
+ a(j, {
4706
4706
  "model-value": {
4707
4707
  key: "Payment no",
4708
4708
  account: e.value.platform.mappings.paymentDocNo
@@ -4710,7 +4710,7 @@ const ms = [
4710
4710
  options: g("Payment no"),
4711
4711
  "onUpdate:modelValue": n[13] || (n[13] = (u) => b({ key: "paymentDocNo", value: u.account }))
4712
4712
  }, null, 8, ["model-value", "options"]),
4713
- a(M, {
4713
+ a(j, {
4714
4714
  "model-value": {
4715
4715
  key: "Refund no",
4716
4716
  account: e.value.platform.mappings.refundDocNo
@@ -4720,14 +4720,14 @@ const ms = [
4720
4720
  }, null, 8, ["model-value", "options"])
4721
4721
  ])
4722
4722
  ]),
4723
- a(R, { style: { margin: 0 } }),
4723
+ a(M, { style: { margin: 0 } }),
4724
4724
  a(Xe, {
4725
4725
  modelValue: e.value.platform,
4726
4726
  "onUpdate:modelValue": n[15] || (n[15] = (u) => e.value.platform = u),
4727
4727
  label: "upload",
4728
- "last-upload-date": (ce = e.value.platform) == null ? void 0 : ce.lastUploadDate
4728
+ "last-upload-date": (de = e.value.platform) == null ? void 0 : de.lastUploadDate
4729
4729
  }, null, 8, ["modelValue", "last-upload-date"]),
4730
- a(R, { style: { margin: 0 } }),
4730
+ a(M, { style: { margin: 0 } }),
4731
4731
  t("div", Ei, [
4732
4732
  t("div", qi, S(d(o)("report.integration.biztory.items")), 1),
4733
4733
  a(I, {
@@ -4737,25 +4737,25 @@ const ms = [
4737
4737
  onClick: n[16] || (n[16] = () => y("items"))
4738
4738
  })
4739
4739
  ]),
4740
- a(de, {
4740
+ a(re, {
4741
4741
  "header-items": [
4742
4742
  d(o)("report.integration.autocount.feedmeKey"),
4743
4743
  d(o)("report.integration.autocount.productCode"),
4744
4744
  d(o)("report.integration.autocount.accountCode")
4745
4745
  ],
4746
- "total-items-count": ((ve = (fe = (pe = (ue = e.value) == null ? void 0 : ue.platform) == null ? void 0 : pe.mappings) == null ? void 0 : fe.items) == null ? void 0 : ve.length) || 0,
4746
+ "total-items-count": ((fe = (pe = (ue = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ue.mappings) == null ? void 0 : pe.items) == null ? void 0 : fe.length) || 0,
4747
4747
  "is-include-post-action": !0
4748
4748
  }, {
4749
- default: W(() => {
4750
- var u, j, D;
4749
+ default: G(() => {
4750
+ var u, P, K;
4751
4751
  return [
4752
- (s(!0), _(B, null, Y((D = (j = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : j.mappings) == null ? void 0 : D.items, (K, P) => (s(), _("div", {
4753
- key: `items-${P}`,
4752
+ (i(!0), _(B, null, z((K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.items, (D, N) => (i(), _("div", {
4753
+ key: `items-${N}`,
4754
4754
  class: "grid-cols-1 grid gap-x-16 gap-16 p-2"
4755
4755
  }, [
4756
- a(M, {
4757
- modelValue: e.value.platform.mappings.items[P],
4758
- "onUpdate:modelValue": (q) => e.value.platform.mappings.items[P] = q,
4756
+ a(j, {
4757
+ modelValue: e.value.platform.mappings.items[N],
4758
+ "onUpdate:modelValue": (q) => e.value.platform.mappings.items[N] = q,
4759
4759
  options: {
4760
4760
  feedmeKey: {
4761
4761
  placeholder: d(o)("report.integration.autocount.feedmeKey"),
@@ -4771,16 +4771,16 @@ const ms = [
4771
4771
  }
4772
4772
  },
4773
4773
  removable: !0,
4774
- onRemove: () => p("items", P)
4774
+ onRemove: () => p("items", N)
4775
4775
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"])
4776
4776
  ]))), 128))
4777
4777
  ];
4778
4778
  }),
4779
4779
  _: 1
4780
4780
  }, 8, ["header-items", "total-items-count"]),
4781
- a(R, { style: { margin: 0 } }),
4782
- t("div", zi, [
4783
- t("div", Yi, S(d(o)("report.integration.biztory.taxes")), 1),
4781
+ a(M, { style: { margin: 0 } }),
4782
+ t("div", Yi, [
4783
+ t("div", zi, S(d(o)("report.integration.biztory.taxes")), 1),
4784
4784
  a(I, {
4785
4785
  variant: "secondary",
4786
4786
  "prepend-icon": "add",
@@ -4788,22 +4788,22 @@ const ms = [
4788
4788
  onClick: n[17] || (n[17] = () => y("taxes"))
4789
4789
  })
4790
4790
  ]),
4791
- a(de, {
4791
+ a(re, {
4792
4792
  "header-items": [
4793
4793
  d(o)("report.integration.autocount.feedmeKey"),
4794
4794
  d(o)("report.integration.autocount.accountCode")
4795
4795
  ],
4796
- "total-items-count": ((be = (xe = (ye = (ge = e.value) == null ? void 0 : ge.platform) == null ? void 0 : ye.mappings) == null ? void 0 : xe.taxes) == null ? void 0 : be.length) || 0,
4796
+ "total-items-count": ((xe = (ye = (ge = (ve = e.value) == null ? void 0 : ve.platform) == null ? void 0 : ge.mappings) == null ? void 0 : ye.taxes) == null ? void 0 : xe.length) || 0,
4797
4797
  "is-include-post-action": !0
4798
4798
  }, {
4799
- default: W(() => {
4800
- var u, j, D, K, P, q;
4799
+ default: G(() => {
4800
+ var u, P, K, D, N, q;
4801
4801
  return [
4802
4802
  t("div", Hi, [
4803
- (s(!0), _(B, null, Y((D = (j = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : j.mappings) == null ? void 0 : D.taxes, (le, L) => (s(), N(M, {
4803
+ (i(!0), _(B, null, z((K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.taxes, (ae, L) => (i(), R(j, {
4804
4804
  key: `tax-${L}`,
4805
4805
  modelValue: e.value.platform.mappings.taxes[L],
4806
- "onUpdate:modelValue": (ie) => e.value.platform.mappings.taxes[L] = ie,
4806
+ "onUpdate:modelValue": (se) => e.value.platform.mappings.taxes[L] = se,
4807
4807
  options: {
4808
4808
  feedmeKey: { placeholder: d(o)("report.integration.autocount.key"), editable: !0 },
4809
4809
  accountCode: {
@@ -4814,10 +4814,10 @@ const ms = [
4814
4814
  removable: !0,
4815
4815
  onRemove: () => p("taxes", L)
4816
4816
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128)),
4817
- (s(!0), _(B, null, Y((q = (P = (K = e.value) == null ? void 0 : K.platform) == null ? void 0 : P.mappings) == null ? void 0 : q.taxRoundingAdjustments, (le, L) => (s(), N(M, {
4817
+ (i(!0), _(B, null, z((q = (N = (D = e.value) == null ? void 0 : D.platform) == null ? void 0 : N.mappings) == null ? void 0 : q.taxRoundingAdjustments, (ae, L) => (i(), R(j, {
4818
4818
  key: `tax-rounding-adjustment-${L}`,
4819
4819
  modelValue: e.value.platform.mappings.taxRoundingAdjustments[L],
4820
- "onUpdate:modelValue": (ie) => e.value.platform.mappings.taxRoundingAdjustments[L] = ie,
4820
+ "onUpdate:modelValue": (se) => e.value.platform.mappings.taxRoundingAdjustments[L] = se,
4821
4821
  options: {
4822
4822
  feedmeKey: {
4823
4823
  placeholder: d(o)("report.integration.autocount.key"),
@@ -4836,7 +4836,7 @@ const ms = [
4836
4836
  }),
4837
4837
  _: 1
4838
4838
  }, 8, ["header-items", "total-items-count"]),
4839
- a(R, { style: { margin: 0 } }),
4839
+ a(M, { style: { margin: 0 } }),
4840
4840
  t("div", Xi, [
4841
4841
  t("div", Qi, S(d(o)("report.integration.biztory.payments")), 1),
4842
4842
  a(I, {
@@ -4847,7 +4847,7 @@ const ms = [
4847
4847
  })
4848
4848
  ]),
4849
4849
  t("div", Gi, [
4850
- a(M, {
4850
+ a(j, {
4851
4851
  "model-value": {
4852
4852
  key: "Credit Term",
4853
4853
  account: e.value.platform.mappings.creditTerm
@@ -4855,7 +4855,7 @@ const ms = [
4855
4855
  options: g("creditTerm"),
4856
4856
  "onUpdate:modelValue": n[19] || (n[19] = (u) => b({ key: "creditTerm", value: u.account }))
4857
4857
  }, null, 8, ["model-value", "options"]),
4858
- a(M, {
4858
+ a(j, {
4859
4859
  "model-value": {
4860
4860
  key: "Currency Code",
4861
4861
  account: e.value.platform.mappings.currencyCode
@@ -4863,7 +4863,7 @@ const ms = [
4863
4863
  options: g("currencyCode"),
4864
4864
  "onUpdate:modelValue": n[20] || (n[20] = (u) => b({ key: "currencyCode", value: u.account }))
4865
4865
  }, null, 8, ["model-value", "options"]),
4866
- a(M, {
4866
+ a(j, {
4867
4867
  "model-value": {
4868
4868
  key: "Journal Type",
4869
4869
  account: e.value.platform.mappings.journalType
@@ -4871,7 +4871,7 @@ const ms = [
4871
4871
  options: g("journalType"),
4872
4872
  "onUpdate:modelValue": n[21] || (n[21] = (u) => b({ key: "journalType", value: u.account }))
4873
4873
  }, null, 8, ["model-value", "options"]),
4874
- a(M, {
4874
+ a(j, {
4875
4875
  "model-value": {
4876
4876
  key: "Currency Rate",
4877
4877
  account: e.value.platform.mappings.currencyRate
@@ -4880,25 +4880,25 @@ const ms = [
4880
4880
  "onUpdate:modelValue": n[22] || (n[22] = (u) => b({ key: "currencyRate", value: u.account }))
4881
4881
  }, null, 8, ["model-value", "options"])
4882
4882
  ]),
4883
- a(de, {
4883
+ a(re, {
4884
4884
  "header-items": [
4885
4885
  d(o)("report.integration.autocount.feedmeKey"),
4886
4886
  d(o)("report.integration.autocount.accountCode"),
4887
4887
  d(o)("report.integration.autocount.paymentMethod")
4888
4888
  ],
4889
- "total-items-count": ((H = (E = (he = (_e = e.value) == null ? void 0 : _e.platform) == null ? void 0 : he.mappings) == null ? void 0 : E.payments) == null ? void 0 : H.length) || 0,
4889
+ "total-items-count": ((E = (he = (_e = (be = e.value) == null ? void 0 : be.platform) == null ? void 0 : _e.mappings) == null ? void 0 : he.payments) == null ? void 0 : E.length) || 0,
4890
4890
  "is-include-post-action": !0
4891
4891
  }, {
4892
- default: W(() => {
4893
- var u, j, D;
4892
+ default: G(() => {
4893
+ var u, P, K;
4894
4894
  return [
4895
- (s(!0), _(B, null, Y((D = (j = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : j.mappings) == null ? void 0 : D.payments, (K, P) => (s(), _("div", {
4896
- key: `payment-${P}`,
4895
+ (i(!0), _(B, null, z((K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.payments, (D, N) => (i(), _("div", {
4896
+ key: `payment-${N}`,
4897
4897
  class: "grid-cols-1 grid gap-x-16 gap-16 p-2"
4898
4898
  }, [
4899
- a(M, {
4900
- modelValue: e.value.platform.mappings.payments[P],
4901
- "onUpdate:modelValue": (q) => e.value.platform.mappings.payments[P] = q,
4899
+ a(j, {
4900
+ modelValue: e.value.platform.mappings.payments[N],
4901
+ "onUpdate:modelValue": (q) => e.value.platform.mappings.payments[N] = q,
4902
4902
  options: {
4903
4903
  feedmeKey: {
4904
4904
  placeholder: d(o)("report.integration.autocount.feedmeKey"),
@@ -4914,7 +4914,7 @@ const ms = [
4914
4914
  }
4915
4915
  },
4916
4916
  removable: !0,
4917
- onRemove: () => p("payments", P)
4917
+ onRemove: () => p("payments", N)
4918
4918
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"])
4919
4919
  ]))), 128))
4920
4920
  ];
@@ -4931,33 +4931,33 @@ const ms = [
4931
4931
  function Ji(f) {
4932
4932
  return f.reduce((o, e) => {
4933
4933
  var T, w, k, m, V, $, p, y, c, v, b, g, r;
4934
- const { invoice: i, payments: x } = e, A = o.length;
4934
+ const { invoice: s, payments: x } = e, A = o.length;
4935
4935
  o[A] = {
4936
- docNo: i.master.docNo,
4937
- debtorCode: i.master.debtorCode,
4938
- debtorName: i.master.debtorName,
4939
- itemProductCode: (T = i.details[0]) == null ? void 0 : T.productCode,
4940
- description: (w = i.details[0]) == null ? void 0 : w.description,
4941
- unitPrice: (k = i.details[0]) == null ? void 0 : k.unitPrice,
4942
- discount: (m = i.details[0]) == null ? void 0 : m.discount,
4943
- taxCode: (V = i.details[0]) == null ? void 0 : V.taxCode,
4944
- creditTerm: i.master.creditTerm,
4936
+ docNo: s.master.docNo,
4937
+ debtorCode: s.master.debtorCode,
4938
+ debtorName: s.master.debtorName,
4939
+ itemProductCode: (T = s.details[0]) == null ? void 0 : T.productCode,
4940
+ description: (w = s.details[0]) == null ? void 0 : w.description,
4941
+ unitPrice: (k = s.details[0]) == null ? void 0 : k.unitPrice,
4942
+ discount: (m = s.details[0]) == null ? void 0 : m.discount,
4943
+ taxCode: (V = s.details[0]) == null ? void 0 : V.taxCode,
4944
+ creditTerm: s.master.creditTerm,
4945
4945
  docType: ($ = x[0]) == null ? void 0 : $.master.docType,
4946
4946
  paymentMethod: (y = (p = x[0]) == null ? void 0 : p.paymentDetails[0]) == null ? void 0 : y.paymentMethod,
4947
4947
  amount: ((c = x[0]) == null ? void 0 : c.details[0].amount) || 0,
4948
4948
  currencyCode: (v = x[0]) == null ? void 0 : v.master.currencyCode,
4949
4949
  journalType: (b = x[0]) == null ? void 0 : b.master.journalType
4950
4950
  };
4951
- const h = Math.max(i.details.length, (x == null ? void 0 : x.length) || 0);
4951
+ const h = Math.max(s.details.length, (x == null ? void 0 : x.length) || 0);
4952
4952
  for (let l = 1; l < h; l++) {
4953
4953
  const n = A + l;
4954
4954
  o[n] || (o[n] = {});
4955
- const C = i.details[l], I = x[l];
4955
+ const C = s.details[l], I = x[l];
4956
4956
  C && (o[n] = {
4957
4957
  ...o[n],
4958
- debtorCode: i.master.debtorCode,
4959
- debtorName: i.master.debtorName,
4960
- creditTerm: i.master.creditTerm,
4958
+ debtorCode: s.master.debtorCode,
4959
+ debtorName: s.master.debtorName,
4960
+ creditTerm: s.master.creditTerm,
4961
4961
  itemProductCode: C.productCode,
4962
4962
  description: C.description,
4963
4963
  unitPrice: C.unitPrice,
@@ -4965,9 +4965,9 @@ function Ji(f) {
4965
4965
  taxCode: C.taxCode
4966
4966
  }), I && (o[n] = {
4967
4967
  ...o[n],
4968
- debtorCode: i.master.debtorCode,
4969
- debtorName: i.master.debtorName,
4970
- creditTerm: i.master.creditTerm,
4968
+ debtorCode: s.master.debtorCode,
4969
+ debtorName: s.master.debtorName,
4970
+ creditTerm: s.master.creditTerm,
4971
4971
  docType: I.master.docType,
4972
4972
  paymentMethod: (g = I.paymentDetails[0]) == null ? void 0 : g.paymentMethod,
4973
4973
  amount: ((r = I.details[0]) == null ? void 0 : r.amount) || 0,
@@ -5052,7 +5052,7 @@ const Zi = [
5052
5052
  ], er = { class: "h-full flex flex-col gap-16" }, tr = { class: "flex flex-row gap-2 justify-between items-center" }, or = { class: "flex flex-row gap-5" }, ar = {
5053
5053
  key: 0,
5054
5054
  class: "flex gap-24 w-full h-full justify-center items-center overflow-y-auto"
5055
- }, lr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, nr = /* @__PURE__ */ Z({
5055
+ }, lr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, nr = /* @__PURE__ */ J({
5056
5056
  __name: "Preview",
5057
5057
  props: {
5058
5058
  modelValue: { required: !0 },
@@ -5060,45 +5060,45 @@ const Zi = [
5060
5060
  },
5061
5061
  emits: ["update:modelValue"],
5062
5062
  setup(f) {
5063
- const { t: o } = ne(), e = ae(f, "modelValue"), i = X(!1), x = Ce(), { dateRange: A } = Ye($e()), h = X([]);
5063
+ const { t: o } = le(), e = oe(f, "modelValue"), s = H(!1), x = Ce(), { dateRange: A } = ze($e()), h = H([]);
5064
5064
  De(
5065
5065
  () => A.value,
5066
5066
  async () => {
5067
5067
  if (e.value._id)
5068
5068
  try {
5069
- i.value = !0, h.value = await qe(e.value._id);
5069
+ s.value = !0, h.value = await qe(e.value._id);
5070
5070
  } catch (V) {
5071
5071
  x.open({ message: V.message, type: "error" });
5072
5072
  } finally {
5073
- i.value = !1;
5073
+ s.value = !1;
5074
5074
  }
5075
5075
  },
5076
5076
  {
5077
5077
  immediate: !0
5078
5078
  }
5079
5079
  );
5080
- const T = z(() => Ji(h.value)), w = z(() => Zi);
5080
+ const T = Y(() => Ji(h.value)), w = Y(() => Zi);
5081
5081
  async function k() {
5082
5082
  try {
5083
- e.value._id && e.value.platform.apiKey ? (i.value = !0, await et(e.value._id), x.open({ message: o("report.integration.uploadSuccess"), type: "success" })) : x.open({ message: o("report.integration.invalidSetting"), type: "error" });
5083
+ e.value._id && e.value.platform.apiKey ? (s.value = !0, await tt(e.value._id), x.open({ message: o("report.integration.uploadSuccess"), type: "success" })) : x.open({ message: o("report.integration.invalidSetting"), type: "error" });
5084
5084
  } catch (V) {
5085
5085
  V.message && x.open({ message: V.message, type: "error" }), V.errors && V.errors.forEach(($) => x.open({ message: $, type: "error" }));
5086
5086
  } finally {
5087
- i.value = !1;
5087
+ s.value = !1;
5088
5088
  }
5089
5089
  }
5090
5090
  async function m() {
5091
5091
  try {
5092
- e.value._id ? (i.value = !0, await We(e.value._id)) : x.open({ message: o("report.integration.invalidSetting"), type: "error" });
5092
+ e.value._id ? (s.value = !0, await We(e.value._id)) : x.open({ message: o("report.integration.invalidSetting"), type: "error" });
5093
5093
  } catch (V) {
5094
5094
  x.open({ message: V.message, type: "error" });
5095
5095
  } finally {
5096
- i.value = !1;
5096
+ s.value = !1;
5097
5097
  }
5098
5098
  }
5099
5099
  return (V, $) => {
5100
5100
  const p = U("FmButton"), y = U("FmCircularProgress"), c = U("FmTable");
5101
- return s(), _("div", er, [
5101
+ return i(), _("div", er, [
5102
5102
  t("div", tr, [
5103
5103
  a(He, {
5104
5104
  "date-range": d(A),
@@ -5107,23 +5107,23 @@ const Zi = [
5107
5107
  }, null, 8, ["date-range"]),
5108
5108
  t("div", or, [
5109
5109
  a(p, {
5110
- loading: i.value,
5110
+ loading: s.value,
5111
5111
  variant: "primary",
5112
5112
  label: d(o)("report.common.upload"),
5113
5113
  onClick: k
5114
5114
  }, null, 8, ["loading", "label"]),
5115
5115
  a(p, {
5116
- loading: i.value,
5116
+ loading: s.value,
5117
5117
  variant: "primary",
5118
5118
  label: d(o)("report.common.download"),
5119
5119
  onClick: m
5120
5120
  }, null, 8, ["loading", "label"])
5121
5121
  ])
5122
5122
  ]),
5123
- i.value ? (s(), _("div", ar, [
5123
+ s.value ? (i(), _("div", ar, [
5124
5124
  a(y, { size: "xl" }),
5125
5125
  t("span", lr, S(d(o)("report.common.isLoading")), 1)
5126
- ])) : (s(), N(c, {
5126
+ ])) : (i(), R(c, {
5127
5127
  key: 1,
5128
5128
  class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
5129
5129
  "row-data": T.value,
@@ -5132,7 +5132,7 @@ const Zi = [
5132
5132
  ]);
5133
5133
  };
5134
5134
  }
5135
- }), sr = { class: "h-full relative flex flex-col" }, ir = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, rr = /* @__PURE__ */ Z({
5135
+ }), sr = { class: "h-full relative flex flex-col" }, ir = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, rr = /* @__PURE__ */ J({
5136
5136
  __name: "AutocountCloud",
5137
5137
  props: {
5138
5138
  modelValue: { required: !0 },
@@ -5140,7 +5140,7 @@ const Zi = [
5140
5140
  },
5141
5141
  emits: ["update:modelValue"],
5142
5142
  setup(f) {
5143
- const { t: o } = ne(), e = ae(f, "modelValue"), i = X("setting"), x = [
5143
+ const { t: o } = le(), e = oe(f, "modelValue"), s = H("setting"), x = [
5144
5144
  {
5145
5145
  label: o("report.integration.setting"),
5146
5146
  value: "setting",
@@ -5151,8 +5151,8 @@ const Zi = [
5151
5151
  value: "preview",
5152
5152
  icon: "table"
5153
5153
  }
5154
- ], A = Ve(), h = z(() => {
5155
- switch (i.value) {
5154
+ ], A = Ve(), h = Y(() => {
5155
+ switch (s.value) {
5156
5156
  case "preview":
5157
5157
  return {
5158
5158
  component: nr
@@ -5168,7 +5168,7 @@ const Zi = [
5168
5168
  default:
5169
5169
  return null;
5170
5170
  }
5171
- }), T = X({}), w = X({}), k = (p) => p.data.map((y) => ({
5171
+ }), T = H({}), w = H({}), k = (p) => p.data.map((y) => ({
5172
5172
  label: y.location + " - " + y.description,
5173
5173
  value: y.location
5174
5174
  })), m = (p) => p.data.map((y) => ({
@@ -5198,30 +5198,30 @@ const Zi = [
5198
5198
  "Failed to fetch locations:"
5199
5199
  ), T.value.isLoaded = !0, w.value.isLoaded = !0;
5200
5200
  };
5201
- return at(() => {
5201
+ return lt(() => {
5202
5202
  e.value.platform.apiKey && e.value.platform.accountBookId && e.value.platform.keyId ? $() : (T.value.isLoaded = !0, w.value.isLoaded = !0, T.value.isError = !0, w.value.isError = !0);
5203
5203
  }), (p, y) => {
5204
5204
  var b, g, r;
5205
5205
  const c = U("FmPageHead"), v = U("FmTabs");
5206
- return s(), _("div", sr, [
5206
+ return i(), _("div", sr, [
5207
5207
  a(c, {
5208
5208
  title: ((b = e.value) == null ? void 0 : b.name) || "Autocount Cloud",
5209
5209
  "back-button": !0,
5210
5210
  style: { paddingLeft: "0px", paddingRight: "0px" },
5211
5211
  "onClick:back": d(A).back
5212
5212
  }, {
5213
- description: W(() => y[2] || (y[2] = [
5213
+ description: G(() => y[2] || (y[2] = [
5214
5214
  t("div", null, null, -1)
5215
5215
  ])),
5216
5216
  _: 1
5217
5217
  }, 8, ["title", "onClick:back"]),
5218
5218
  a(v, {
5219
- "model-value": i.value,
5220
- "onUpdate:modelValue": y[0] || (y[0] = (l) => i.value = l),
5219
+ "model-value": s.value,
5220
+ "onUpdate:modelValue": y[0] || (y[0] = (l) => s.value = l),
5221
5221
  items: x
5222
5222
  }, null, 8, ["model-value"]),
5223
5223
  t("div", ir, [
5224
- (s(), N(Ie((g = h.value) == null ? void 0 : g.component), ot({
5224
+ (i(), R(Ie((g = h.value) == null ? void 0 : g.component), at({
5225
5225
  modelValue: e.value,
5226
5226
  "onUpdate:modelValue": y[1] || (y[1] = (l) => e.value = l)
5227
5227
  }, (r = h.value) == null ? void 0 : r.props), null, 16, ["modelValue"]))
@@ -5231,8 +5231,8 @@ const Zi = [
5231
5231
  }
5232
5232
  }), dr = {
5233
5233
  key: 0,
5234
- class: "flex flex-col h-full"
5235
- }, cr = { class: "flex flex-col gap-16 pb-[24px]" }, mr = { class: "flex flex-row justify-between items-center gap-2" }, ur = { class: "flex flex-row gap-2 items-center" }, pr = { class: "relative group cursor-pointer" }, fr = { 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" }, vr = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, gr = { class: "w-[90%] flex flex-col gap-24" }, yr = { class: "flex flex-col gap-16" }, xr = { class: "fm-typo-en-title-sm-800" }, br = { class: "flex flex-col max-w-[100%]" }, _r = { class: "w-[25%] font-semibold" }, hr = { class: "flex-grow" }, wr = { class: "flex flex-col max-w-[100%]" }, kr = { class: "w-[25%] font-semibold" }, Vr = { class: "flex flex-col max-w-[100%]" }, $r = { class: "w-[25%] font-semibold" }, Cr = { class: "flex flex-col gap-16" }, Sr = { class: "grid-cols-2 grid gap-16" }, Ar = { class: "flex flex-row items-center justify-between gap-x-16" }, Dr = { class: "grid-cols-1 grid gap-16 p-2" }, Fr = { class: "flex flex-row items-center justify-between gap-x-16" }, Ur = { class: "fm-typo-en-title-sm-800" }, Tr = { class: "grid-cols-1 grid gap-16 p-2" }, Kr = { class: "flex flex-row items-center justify-between gap-x-16" }, Ir = { class: "grid-cols-1 grid gap-16 p-2" }, Nr = { class: "flex flex-row items-center justify-between gap-x-16" }, Rr = { class: "grid-cols-1 grid gap-16 p-2" }, Pr = /* @__PURE__ */ Z({
5234
+ class: "flex flex-col h-full w-full"
5235
+ }, cr = { class: "flex flex-col gap-16 pb-[24px]" }, mr = { class: "flex flex-row justify-between items-center gap-2" }, ur = { class: "flex flex-row gap-2 items-center" }, pr = { class: "relative group cursor-pointer" }, fr = { 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" }, vr = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, gr = { class: "w-[90%] flex flex-col gap-24" }, yr = { class: "flex flex-col gap-16" }, xr = { class: "fm-typo-en-title-sm-800" }, br = { class: "flex flex-col max-w-[100%]" }, _r = { class: "w-[25%] font-semibold" }, hr = { class: "flex-grow" }, wr = { class: "flex flex-col max-w-[100%]" }, kr = { class: "w-[25%] font-semibold" }, Vr = { class: "flex flex-col max-w-[100%]" }, $r = { class: "w-[25%] font-semibold" }, Cr = { class: "flex flex-col gap-16" }, Sr = { class: "grid-cols-2 grid gap-16" }, Ar = { class: "flex flex-row items-center justify-between gap-x-16" }, Dr = { class: "grid-cols-1 grid gap-16 p-2" }, Fr = { class: "flex flex-row items-center justify-between gap-x-16" }, Ur = { class: "fm-typo-en-title-sm-800" }, Tr = { class: "grid-cols-1 grid gap-16 p-2" }, Kr = { class: "flex flex-row items-center justify-between gap-x-16" }, Ir = { class: "grid-cols-1 grid gap-16 p-2" }, Nr = { class: "flex flex-row items-center justify-between gap-x-16" }, Rr = { class: "grid-cols-1 grid gap-16 p-2" }, Pr = /* @__PURE__ */ J({
5236
5236
  __name: "Setting",
5237
5237
  props: {
5238
5238
  modelValue: { required: !0 },
@@ -5240,7 +5240,7 @@ const Zi = [
5240
5240
  },
5241
5241
  emits: ["update:modelValue"],
5242
5242
  setup(f) {
5243
- const { t: o } = ne(), e = ae(f, "modelValue"), i = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = ze(), { restaurants: w } = $e(), k = z(
5243
+ const { t: o } = le(), e = oe(f, "modelValue"), s = Ce(), x = Ne(), A = Ve(), { promptLoader: h } = Le(), { promptMessage: T } = Ye(), { restaurants: w } = $e(), k = Y(
5244
5244
  () => w.map((v) => ({ label: v.name, value: v.id }))
5245
5245
  );
5246
5246
  async function m() {
@@ -5251,7 +5251,7 @@ const Zi = [
5251
5251
  try {
5252
5252
  await Oe(e.value._id), await x.getSettings(), A.back();
5253
5253
  } catch (b) {
5254
- i.open({ type: "error", message: b.message });
5254
+ s.open({ type: "error", message: b.message });
5255
5255
  }
5256
5256
  });
5257
5257
  }
@@ -5260,7 +5260,7 @@ const Zi = [
5260
5260
  try {
5261
5261
  await Be(e.value._id, e.value), await x.getSettings();
5262
5262
  } catch (v) {
5263
- i.open({ type: "error", message: v.message });
5263
+ s.open({ type: "error", message: v.message });
5264
5264
  }
5265
5265
  });
5266
5266
  }
@@ -5291,16 +5291,16 @@ const Zi = [
5291
5291
  try {
5292
5292
  await Ee(e.value._id), await x.getSettings();
5293
5293
  } catch (v) {
5294
- i.open({ type: "error", message: v.message });
5294
+ s.open({ type: "error", message: v.message });
5295
5295
  }
5296
5296
  });
5297
5297
  }
5298
5298
  return je(async () => {
5299
5299
  await x.getSettings();
5300
5300
  }), (v, b) => {
5301
- var I, R, Q, te, J, G, ee, re, me, se, ce, ue, pe, fe, ve, ge, ye, xe, be, _e, he;
5301
+ var I, M, X, ee, W, Q, Z, ie, ce, ne, de, me, ue, pe, fe, ve, ge, ye, xe, be, _e, he;
5302
5302
  const g = U("FmIcon"), r = U("FmButton"), l = U("FmMenuDivider"), n = U("FmTextField"), C = U("FmSelect");
5303
- return (R = (I = e.value) == null ? void 0 : I.platform) != null && R.mappings ? (s(), _("div", dr, [
5303
+ return (M = (I = e.value) == null ? void 0 : I.platform) != null && M.mappings ? (i(), _("div", dr, [
5304
5304
  t("div", cr, [
5305
5305
  t("div", mr, [
5306
5306
  b[9] || (b[9] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
@@ -5368,7 +5368,7 @@ const Zi = [
5368
5368
  ])
5369
5369
  ]),
5370
5370
  t("div", Cr, [
5371
- a(M, {
5371
+ a(j, {
5372
5372
  "is-take-whole-row": !0,
5373
5373
  "model-value": {
5374
5374
  key: "Debtor",
@@ -5381,32 +5381,35 @@ const Zi = [
5381
5381
  name: { placeholder: "Name", editable: !0 }
5382
5382
  },
5383
5383
  "onUpdate:modelValue": b[3] || (b[3] = (E) => {
5384
- var H, u, j, D;
5385
- (D = (j = (u = (H = e.value) == null ? void 0 : H.platform) == null ? void 0 : u.mappings) == null ? void 0 : j.invoice) != null && D.debtor && (e.value.platform.mappings.invoice.debtor.name = E.name, e.value.platform.mappings.invoice.debtor.code = E.code);
5384
+ var u, P, K, D;
5385
+ (D = (K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.invoice) != null && D.debtor && (e.value.platform.mappings.invoice.debtor.name = E.name, e.value.platform.mappings.invoice.debtor.code = E.code);
5386
5386
  })
5387
5387
  }, null, 8, ["model-value"]),
5388
5388
  t("div", Sr, [
5389
- a(M, {
5389
+ a(j, {
5390
5390
  "model-value": {
5391
5391
  key: "Rounding",
5392
- account: (Q = e.value.platform.mappings) == null ? void 0 : Q.invoice.rounding.account
5392
+ account: (X = e.value.platform.mappings) == null ? void 0 : X.invoice.rounding.account,
5393
+ code: (ee = e.value.platform.mappings) == null ? void 0 : ee.invoice.rounding.code
5393
5394
  },
5394
5395
  options: {
5395
5396
  key: { placeholder: "Rounding", editable: !1 },
5396
- account: { placeholder: "Account code", editable: !0 }
5397
+ account: { placeholder: "Account code", editable: !0 },
5398
+ code: { placeholder: "Item code", editable: !0 }
5397
5399
  },
5398
5400
  "onUpdate:modelValue": b[4] || (b[4] = (E) => {
5399
- var H, u, j, D;
5400
- (D = (j = (u = (H = e.value) == null ? void 0 : H.platform) == null ? void 0 : u.mappings) == null ? void 0 : j.invoice) != null && D.rounding && (e.value.platform.mappings.invoice.rounding.account = E.account);
5401
+ var u, P, K, D;
5402
+ (D = (K = (P = (u = e.value) == null ? void 0 : u.platform) == null ? void 0 : P.mappings) == null ? void 0 : K.invoice) != null && D.rounding && (e.value.platform.mappings.invoice.rounding.account = E.account, e.value.platform.mappings.invoice.rounding.code = E.code);
5401
5403
  })
5402
5404
  }, null, 8, ["model-value"]),
5403
- (s(!0), _(B, null, Y((G = (J = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : J.mappings) == null ? void 0 : G.invoice.charges, (E, H) => (s(), N(M, {
5404
- key: `charge-${H}`,
5405
- modelValue: e.value.platform.mappings.invoice.charges[H],
5406
- "onUpdate:modelValue": (u) => e.value.platform.mappings.invoice.charges[H] = u,
5405
+ (i(!0), _(B, null, z((Z = (Q = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : Q.mappings) == null ? void 0 : Z.invoice.charges, (E, u) => (i(), R(j, {
5406
+ key: `charge-${u}`,
5407
+ modelValue: e.value.platform.mappings.invoice.charges[u],
5408
+ "onUpdate:modelValue": (P) => e.value.platform.mappings.invoice.charges[u] = P,
5407
5409
  options: {
5408
5410
  key: { placeholder: "Key", editable: !1 },
5409
- account: { placeholder: "Account code", editable: !0 }
5411
+ account: { placeholder: "Account code", editable: !0 },
5412
+ code: { placeholder: "Item code", editable: !0 }
5410
5413
  }
5411
5414
  }, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
5412
5415
  ])
@@ -5421,26 +5424,36 @@ const Zi = [
5421
5424
  onClick: b[5] || (b[5] = () => p("invoice", "items"))
5422
5425
  })
5423
5426
  ]),
5424
- a(de, {
5425
- "header-items": ["Key", "Account Code"],
5426
- "total-items-count": ((se = (me = (re = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : re.mappings) == null ? void 0 : me.invoice.items) == null ? void 0 : se.length) || 0,
5427
+ a(re, {
5428
+ "header-items": ["Key", "Account Code", "UOM"],
5429
+ "total-items-count": ((de = (ne = (ce = (ie = e.value) == null ? void 0 : ie.platform) == null ? void 0 : ce.mappings) == null ? void 0 : ne.invoice.items) == null ? void 0 : de.length) || 0,
5427
5430
  "is-include-post-action": !0,
5428
5431
  "is-take-whole-row": !0
5429
5432
  }, {
5430
- default: W(() => {
5431
- var E, H, u;
5433
+ default: G(() => {
5434
+ var E, u, P;
5432
5435
  return [
5433
5436
  t("div", Dr, [
5434
- (s(!0), _(B, null, Y((u = (H = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : H.mappings) == null ? void 0 : u.invoice.items, (j, D) => (s(), N(M, {
5437
+ (i(!0), _(B, null, z((P = (u = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : u.mappings) == null ? void 0 : P.invoice.items, (K, D) => (i(), R(j, {
5435
5438
  key: `item-${D}`,
5436
5439
  modelValue: e.value.platform.mappings.invoice.items[D],
5437
- "onUpdate:modelValue": (K) => e.value.platform.mappings.invoice.items[D] = K,
5440
+ "onUpdate:modelValue": (N) => e.value.platform.mappings.invoice.items[D] = N,
5438
5441
  options: {
5439
5442
  key: { placeholder: "Key", editable: !0 },
5440
- account: { placeholder: "Account code", editable: !0 }
5443
+ account: { placeholder: "Account code", editable: !0 },
5444
+ uom: { placeholder: "UOM", editable: !0 }
5441
5445
  },
5442
5446
  removable: !0,
5443
- onRemove: () => $("items", D)
5447
+ onRemove: () => {
5448
+ if (K.key === "DEFAULT") {
5449
+ d(s).open({
5450
+ type: "error",
5451
+ message: "DEFAULT item cannot be removed."
5452
+ });
5453
+ return;
5454
+ }
5455
+ return $("items", D);
5456
+ }
5444
5457
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
5445
5458
  ])
5446
5459
  ];
@@ -5457,23 +5470,23 @@ const Zi = [
5457
5470
  onClick: b[6] || (b[6] = () => p("invoice", "taxes"))
5458
5471
  })
5459
5472
  ]),
5460
- a(de, {
5473
+ a(re, {
5461
5474
  "header-items": ["Key", "Account Code"],
5462
- "total-items-count": ((fe = (pe = (ue = (ce = e.value) == null ? void 0 : ce.platform) == null ? void 0 : ue.mappings) == null ? void 0 : pe.invoice.taxes) == null ? void 0 : fe.length) || 0,
5475
+ "total-items-count": ((fe = (pe = (ue = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ue.mappings) == null ? void 0 : pe.invoice.taxes) == null ? void 0 : fe.length) || 0,
5463
5476
  "is-include-post-action": !0,
5464
5477
  "is-take-whole-row": !0
5465
5478
  }, {
5466
- default: W(() => {
5467
- var E, H, u;
5479
+ default: G(() => {
5480
+ var E, u, P;
5468
5481
  return [
5469
5482
  t("div", Tr, [
5470
- (s(!0), _(B, null, Y((u = (H = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : H.mappings) == null ? void 0 : u.invoice.taxes, (j, D) => (s(), N(M, {
5483
+ (i(!0), _(B, null, z((P = (u = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : u.mappings) == null ? void 0 : P.invoice.taxes, (K, D) => (i(), R(j, {
5471
5484
  key: `tax-${D}`,
5472
5485
  modelValue: e.value.platform.mappings.invoice.taxes[D],
5473
- "onUpdate:modelValue": (K) => e.value.platform.mappings.invoice.taxes[D] = K,
5486
+ "onUpdate:modelValue": (N) => e.value.platform.mappings.invoice.taxes[D] = N,
5474
5487
  options: {
5475
5488
  key: { placeholder: "Key", editable: !0 },
5476
- account: { placeholder: "Account code", editable: !0 }
5489
+ code: { placeholder: "Code", editable: !0 }
5477
5490
  },
5478
5491
  removable: !0,
5479
5492
  onRemove: () => $("taxes", D)
@@ -5493,26 +5506,36 @@ const Zi = [
5493
5506
  onClick: b[7] || (b[7] = () => p("inventory", "items"))
5494
5507
  })
5495
5508
  ]),
5496
- a(de, {
5497
- "header-items": ["Key", "Account Code"],
5509
+ a(re, {
5510
+ "header-items": ["Key", "Account Code", "UOM"],
5498
5511
  "total-items-count": ((xe = (ye = (ge = (ve = e.value) == null ? void 0 : ve.platform) == null ? void 0 : ge.mappings) == null ? void 0 : ye.inventory.items) == null ? void 0 : xe.length) || 0,
5499
5512
  "is-include-post-action": !0,
5500
5513
  "is-take-whole-row": !0
5501
5514
  }, {
5502
- default: W(() => {
5503
- var E, H, u;
5515
+ default: G(() => {
5516
+ var E, u, P;
5504
5517
  return [
5505
5518
  t("div", Ir, [
5506
- (s(!0), _(B, null, Y((u = (H = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : H.mappings) == null ? void 0 : u.inventory.items, (j, D) => (s(), N(M, {
5519
+ (i(!0), _(B, null, z((P = (u = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : u.mappings) == null ? void 0 : P.inventory.items, (K, D) => (i(), R(j, {
5507
5520
  key: `item-${D}`,
5508
5521
  modelValue: e.value.platform.mappings.inventory.items[D],
5509
- "onUpdate:modelValue": (K) => e.value.platform.mappings.inventory.items[D] = K,
5522
+ "onUpdate:modelValue": (N) => e.value.platform.mappings.inventory.items[D] = N,
5510
5523
  options: {
5511
5524
  key: { placeholder: "Key", editable: !0 },
5512
- account: { placeholder: "Account code", editable: !0 }
5525
+ account: { placeholder: "Account code", editable: !0 },
5526
+ uom: { placeholder: "UOM", editable: !0 }
5513
5527
  },
5514
5528
  removable: !0,
5515
- onRemove: () => $("items", D)
5529
+ onRemove: () => {
5530
+ if (K.key === "DEFAULT") {
5531
+ d(s).open({
5532
+ type: "error",
5533
+ message: "DEFAULT item cannot be removed."
5534
+ });
5535
+ return;
5536
+ }
5537
+ $("items", D);
5538
+ }
5516
5539
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
5517
5540
  ])
5518
5541
  ];
@@ -5529,20 +5552,20 @@ const Zi = [
5529
5552
  onClick: b[8] || (b[8] = () => p("inventory", "suppliers"))
5530
5553
  })
5531
5554
  ]),
5532
- a(de, {
5555
+ a(re, {
5533
5556
  "header-items": ["Key", "Code", "Name"],
5534
5557
  "total-items-count": ((he = (_e = (be = e.value) == null ? void 0 : be.platform) == null ? void 0 : _e.mappings) == null ? void 0 : he.inventory.suppliers.length) || 0,
5535
5558
  "is-include-post-action": !0,
5536
5559
  "is-take-whole-row": !0
5537
5560
  }, {
5538
- default: W(() => {
5539
- var E, H, u;
5561
+ default: G(() => {
5562
+ var E, u, P;
5540
5563
  return [
5541
5564
  t("div", Rr, [
5542
- (s(!0), _(B, null, Y((u = (H = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : H.mappings) == null ? void 0 : u.inventory.suppliers, (j, D) => (s(), N(M, {
5565
+ (i(!0), _(B, null, z((P = (u = (E = e.value) == null ? void 0 : E.platform) == null ? void 0 : u.mappings) == null ? void 0 : P.inventory.suppliers, (K, D) => (i(), R(j, {
5543
5566
  key: `supplier-${D}`,
5544
5567
  modelValue: e.value.platform.mappings.inventory.suppliers[D],
5545
- "onUpdate:modelValue": (K) => e.value.platform.mappings.inventory.suppliers[D] = K,
5568
+ "onUpdate:modelValue": (N) => e.value.platform.mappings.inventory.suppliers[D] = N,
5546
5569
  options: {
5547
5570
  key: { placeholder: "Key", editable: !0 },
5548
5571
  code: { placeholder: "Code", editable: !0 },
@@ -5561,13 +5584,13 @@ const Zi = [
5561
5584
  ])) : O("", !0);
5562
5585
  };
5563
5586
  }
5564
- }), Mr = { class: "h-full flex flex-col" }, jr = { class: "flex flex-row gap-2 justify-between items-center" }, Lr = {
5587
+ }), Mr = { class: "h-full w-full flex flex-col" }, jr = { class: "flex flex-row gap-2 justify-between items-center" }, Lr = {
5565
5588
  key: 0,
5566
5589
  class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
5567
5590
  }, Or = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Br = {
5568
5591
  key: 1,
5569
- class: "w-full h-full flex flex-col"
5570
- }, Er = { class: "flex w-full h-full" }, qr = /* @__PURE__ */ Z({
5592
+ class: "w-full h-full flex flex-col flex-grow"
5593
+ }, Er = /* @__PURE__ */ J({
5571
5594
  __name: "Preview",
5572
5595
  props: {
5573
5596
  modelValue: { required: !0 },
@@ -5575,10 +5598,10 @@ const Zi = [
5575
5598
  },
5576
5599
  emits: ["update:modelValue"],
5577
5600
  setup(f) {
5578
- const { t: o } = ne(), e = X({ invoices: [], deliveryOrders: [], purchaseOrders: [] }), i = z(() => e.value.invoices.reduce((v, b) => {
5601
+ const { t: o } = le(), e = H({ invoices: [], deliveryOrders: [], purchaseOrders: [] }), s = Y(() => e.value.invoices.reduce((v, b) => {
5579
5602
  for (const g of b._items)
5580
5603
  v.push({
5581
- rDate: b.rDate,
5604
+ rDate: et(b.rDate).format("D-MMM-YY"),
5582
5605
  rNo: b.rNo,
5583
5606
  debtorCode: b.debtorCode,
5584
5607
  debtorName: b.debtorName,
@@ -5599,7 +5622,7 @@ const Zi = [
5599
5622
  accountCode: g.accountCode
5600
5623
  });
5601
5624
  return v;
5602
- }, [])), x = z(() => e.value.purchaseOrders.reduce((v, b) => {
5625
+ }, [])), x = Y(() => e.value.purchaseOrders.reduce((v, b) => {
5603
5626
  for (const g of b._skus)
5604
5627
  v.push({
5605
5628
  code: g.code,
@@ -5608,11 +5631,11 @@ const Zi = [
5608
5631
  unitPrice: g.unitPrice
5609
5632
  });
5610
5633
  return v;
5611
- }, [])), A = z(() => e.value.deliveryOrders.reduce((v, b) => {
5634
+ }, [])), A = Y(() => e.value.deliveryOrders.reduce((v, b) => {
5612
5635
  for (const g of b._skus)
5613
5636
  v.push({
5614
5637
  rNo: b.rNo,
5615
- rDate: b.rDate,
5638
+ rDate: et(b.rDate).format("D-MMM-YY"),
5616
5639
  debtorCode: b.debtorCode,
5617
5640
  debtorName: b.debtorName,
5618
5641
  salesType: b.salesType,
@@ -5829,7 +5852,7 @@ const Zi = [
5829
5852
  header: () => F("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Account Code"),
5830
5853
  enableSorting: !1
5831
5854
  }
5832
- ], k = ae(f, "modelValue"), m = X(!1), V = Ce(), { dateRange: $ } = Ye($e());
5855
+ ], k = oe(f, "modelValue"), m = H(!1), V = Ce(), { dateRange: $ } = ze($e());
5833
5856
  De(
5834
5857
  () => $.value,
5835
5858
  async () => {
@@ -5868,10 +5891,10 @@ const Zi = [
5868
5891
  label: "Purchase Orders",
5869
5892
  value: "purchaseOrders"
5870
5893
  }
5871
- ], c = X(y[0].value);
5894
+ ], c = H(y[0].value);
5872
5895
  return (v, b) => {
5873
5896
  const g = U("FmButton"), r = U("FmCircularProgress"), l = U("FmTabs"), n = U("FmTable");
5874
- return s(), _("div", Mr, [
5897
+ return i(), _("div", Mr, [
5875
5898
  t("div", jr, [
5876
5899
  a(He, {
5877
5900
  "date-range": d($),
@@ -5885,38 +5908,36 @@ const Zi = [
5885
5908
  onClick: p
5886
5909
  }, null, 8, ["loading", "label"])
5887
5910
  ]),
5888
- m.value ? (s(), _("div", Lr, [
5911
+ m.value ? (i(), _("div", Lr, [
5889
5912
  a(r, { size: "xl" }),
5890
5913
  t("span", Or, S(d(o)("report.common.isLoading")), 1)
5891
- ])) : (s(), _("div", Br, [
5914
+ ])) : (i(), _("div", Br, [
5892
5915
  a(l, {
5893
5916
  "model-value": c.value,
5894
5917
  "onUpdate:modelValue": b[1] || (b[1] = (C) => c.value = C),
5895
5918
  items: y
5896
5919
  }, null, 8, ["model-value"]),
5897
- t("div", Er, [
5898
- c.value === "invoices" ? (s(), N(n, {
5899
- key: 0,
5900
- class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
5901
- "row-data": i.value,
5902
- "column-defs": h
5903
- }, null, 8, ["row-data"])) : c.value === "deliveryOrders" ? (s(), N(n, {
5904
- key: 1,
5905
- class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
5906
- "row-data": A.value,
5907
- "column-defs": w
5908
- }, null, 8, ["row-data"])) : c.value === "purchaseOrders" ? (s(), N(n, {
5909
- key: 2,
5910
- class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
5911
- "row-data": x.value,
5912
- "column-defs": T
5913
- }, null, 8, ["row-data"])) : O("", !0)
5914
- ])
5920
+ c.value === "invoices" ? (i(), R(n, {
5921
+ key: 0,
5922
+ class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
5923
+ "row-data": s.value,
5924
+ "column-defs": h
5925
+ }, null, 8, ["row-data"])) : c.value === "deliveryOrders" ? (i(), R(n, {
5926
+ key: 1,
5927
+ class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
5928
+ "row-data": A.value,
5929
+ "column-defs": w
5930
+ }, null, 8, ["row-data"])) : c.value === "purchaseOrders" ? (i(), R(n, {
5931
+ key: 2,
5932
+ class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
5933
+ "row-data": x.value,
5934
+ "column-defs": T
5935
+ }, null, 8, ["row-data"])) : O("", !0)
5915
5936
  ]))
5916
5937
  ]);
5917
5938
  };
5918
5939
  }
5919
- }), zr = { class: "h-full relative flex flex-col" }, Yr = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Hr = /* @__PURE__ */ Z({
5940
+ }), qr = { class: "h-full w-full flex flex-col" }, Yr = { class: "py-16 px-16 flex h-full w-full overflow-hidden" }, zr = /* @__PURE__ */ J({
5920
5941
  __name: "SynergyExport",
5921
5942
  props: {
5922
5943
  modelValue: {},
@@ -5924,7 +5945,7 @@ const Zi = [
5924
5945
  },
5925
5946
  emits: ["update:modelValue"],
5926
5947
  setup(f) {
5927
- const { t: o } = ne(), e = ae(f, "modelValue"), i = X("setting"), x = [
5948
+ const { t: o } = le(), e = oe(f, "modelValue"), s = H("setting"), x = [
5928
5949
  {
5929
5950
  label: o("report.integration.setting"),
5930
5951
  value: "setting",
@@ -5935,10 +5956,10 @@ const Zi = [
5935
5956
  value: "preview",
5936
5957
  icon: "table"
5937
5958
  }
5938
- ], A = Ve(), h = z(() => {
5939
- switch (i.value) {
5959
+ ], A = Ve(), h = Y(() => {
5960
+ switch (s.value) {
5940
5961
  case "preview":
5941
- return qr;
5962
+ return Er;
5942
5963
  case "setting":
5943
5964
  return Pr;
5944
5965
  default:
@@ -5948,25 +5969,25 @@ const Zi = [
5948
5969
  return (T, w) => {
5949
5970
  var V;
5950
5971
  const k = U("FmPageHead"), m = U("FmTabs");
5951
- return s(), _("div", zr, [
5972
+ return i(), _("div", qr, [
5952
5973
  a(k, {
5953
5974
  title: ((V = e.value) == null ? void 0 : V.name) || "Synergy",
5954
5975
  "back-button": !0,
5955
5976
  style: { paddingLeft: "0px", paddingRight: "0px" },
5956
5977
  "onClick:back": d(A).back
5957
5978
  }, {
5958
- description: W(() => w[2] || (w[2] = [
5979
+ description: G(() => w[2] || (w[2] = [
5959
5980
  t("div", null, null, -1)
5960
5981
  ])),
5961
5982
  _: 1
5962
5983
  }, 8, ["title", "onClick:back"]),
5963
5984
  a(m, {
5964
- "model-value": i.value,
5965
- "onUpdate:modelValue": w[0] || (w[0] = ($) => i.value = $),
5985
+ "model-value": s.value,
5986
+ "onUpdate:modelValue": w[0] || (w[0] = ($) => s.value = $),
5966
5987
  items: x
5967
5988
  }, null, 8, ["model-value"]),
5968
5989
  t("div", Yr, [
5969
- (s(), N(Ie(h.value), {
5990
+ (i(), R(Ie(h.value), {
5970
5991
  modelValue: e.value,
5971
5992
  "onUpdate:modelValue": w[1] || (w[1] = ($) => e.value = $)
5972
5993
  }, null, 8, ["modelValue"]))
@@ -5974,14 +5995,14 @@ const Zi = [
5974
5995
  ]);
5975
5996
  };
5976
5997
  }
5977
- }), Xr = { class: "px-24 h-full relative" }, od = /* @__PURE__ */ Z({
5998
+ }), Hr = { class: "px-24 h-full relative" }, td = /* @__PURE__ */ J({
5978
5999
  __name: "Integration",
5979
6000
  setup(f) {
5980
- const o = X(void 0), { params: e } = it(), i = Ne(), x = X();
5981
- at(async () => {
5982
- i.settings.length === 0 && await i.getSettings();
6001
+ const o = H(void 0), { params: e } = it(), s = Ne(), x = H();
6002
+ lt(async () => {
6003
+ s.settings.length === 0 && await s.getSettings();
5983
6004
  }), De(
5984
- () => i.settings,
6005
+ () => s.settings,
5985
6006
  (h) => {
5986
6007
  var w;
5987
6008
  const T = h.find((k) => k._id === e.id);
@@ -5989,7 +6010,7 @@ const Zi = [
5989
6010
  },
5990
6011
  { immediate: !0 }
5991
6012
  );
5992
- const A = z(() => {
6013
+ const A = Y(() => {
5993
6014
  switch (o.value) {
5994
6015
  case Ae.Xero:
5995
6016
  return Ko;
@@ -6000,19 +6021,19 @@ const Zi = [
6000
6021
  case Ae.SQL:
6001
6022
  return sn;
6002
6023
  case Ae.iFlexi_HRMS:
6003
- return Ys;
6024
+ return zs;
6004
6025
  case Ae.Biztory:
6005
6026
  return bs;
6006
6027
  case Ae.AutoCountCloud:
6007
6028
  return rr;
6008
6029
  case Ae.SynergyExport:
6009
- return Hr;
6030
+ return zr;
6010
6031
  default:
6011
6032
  return null;
6012
6033
  }
6013
6034
  });
6014
- return (h, T) => (s(), _("div", Xr, [
6015
- (s(), N(Ie(A.value), {
6035
+ return (h, T) => (i(), _("div", Hr, [
6036
+ (i(), R(Ie(A.value), {
6016
6037
  modelValue: x.value,
6017
6038
  "onUpdate:modelValue": T[0] || (T[0] = (w) => x.value = w)
6018
6039
  }, null, 8, ["modelValue"]))
@@ -6020,5 +6041,5 @@ const Zi = [
6020
6041
  }
6021
6042
  });
6022
6043
  export {
6023
- od as default
6044
+ td as default
6024
6045
  };