@feedmepos/mf-report 5.7.2 → 5.7.3

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,4 +1,4 @@
1
- import { defineComponent as H, mergeModels as he, useModel as X, computed as q, resolveComponent as S, createElementBlock as F, openBlock as m, createElementVNode as t, createCommentVNode as M, normalizeClass as je, Fragment as O, renderList as L, createBlock as I, createVNode as i, withCtx as _e, toDisplayString as U, unref as p, ref as B, onUnmounted as $e, watch as xe, isRef as Se, h as A, resolveDynamicComponent as we, mergeProps as He, onMounted as Xe } from "vue";
1
+ import { defineComponent as H, mergeModels as he, useModel as X, computed as q, resolveComponent as S, createElementBlock as C, openBlock as m, createElementVNode as t, createCommentVNode as M, normalizeClass as je, Fragment as O, renderList as L, createBlock as R, createVNode as s, withCtx as _e, toDisplayString as D, unref as p, ref as B, onUnmounted as $e, watch as xe, isRef as Se, h as I, resolveDynamicComponent as we, mergeProps as He, onMounted as Xe } from "vue";
2
2
  import { useRouter as fe, useRoute as Ge } from "vue-router";
3
3
  import { u as J, I as pe, d as qe, e as Ve, f as Ce, b as ve, q as Qe, m as Je, p as Fe, r as De, s as Ue, t as Te, v as Oe, w as We, x as Ze, y as et, A as ye, z as Be, B as tt, E as ot } from "./global-loader-CbmVhJAK.js";
4
4
  import { u as Ae } from "./message-dialog-UoMWOnil.js";
@@ -9,7 +9,7 @@ import { _ as Re } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-B
9
9
  const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, nt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, st = {
10
10
  key: 0,
11
11
  class: "w-[24px] flex items-center"
12
- }, R = /* @__PURE__ */ H({
12
+ }, K = /* @__PURE__ */ H({
13
13
  __name: "MappingField",
14
14
  props: /* @__PURE__ */ he({
15
15
  removable: {
@@ -34,32 +34,32 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
34
34
  }),
35
35
  emits: /* @__PURE__ */ he(["remove"], ["update:modelValue"]),
36
36
  setup(f, { emit: o }) {
37
- const e = X(f, "modelValue"), s = f, V = q(
38
- () => Object.keys(s.options).map((x) => {
39
- const D = s.options[x];
37
+ const e = X(f, "modelValue"), i = f, w = q(
38
+ () => Object.keys(i.options).map((x) => {
39
+ const F = i.options[x];
40
40
  return {
41
- placeholder: D.placeholder,
41
+ placeholder: F.placeholder,
42
42
  key: x,
43
- editable: D.editable
43
+ editable: F.editable
44
44
  };
45
45
  })
46
- ), w = o;
47
- return (x, D) => {
46
+ ), V = o;
47
+ return (x, F) => {
48
48
  const b = S("FmTextField"), _ = S("FmTooltip"), c = S("FmIcon");
49
- return m(), F("div", lt, [
49
+ return m(), C("div", lt, [
50
50
  t("div", {
51
51
  class: je(`${f.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
52
52
  }, [
53
- (m(!0), F(O, null, L(V.value, (h) => {
53
+ (m(!0), C(O, null, L(w.value, (h) => {
54
54
  var $;
55
- return m(), F(O, {
55
+ return m(), C(O, {
56
56
  key: h.key
57
57
  }, [
58
- h.editable ? (m(), F("div", {
58
+ h.editable ? (m(), C("div", {
59
59
  key: 0,
60
60
  class: je(`${f.removable ? "w-[50%]" : "w-[100%]"}`)
61
61
  }, [
62
- i(b, {
62
+ s(b, {
63
63
  "model-value": e.value[h.key],
64
64
  placeholder: h.placeholder,
65
65
  type: f.type,
@@ -72,26 +72,26 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
72
72
  };
73
73
  }
74
74
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
75
- ], 2)) : (m(), I(_, {
75
+ ], 2)) : (m(), R(_, {
76
76
  key: 1,
77
77
  content: ($ = e.value[h.key]) == null ? void 0 : $.toString(),
78
78
  class: "w-[50%]"
79
79
  }, {
80
80
  default: _e(() => [
81
- t("div", nt, U(e.value[h.key]), 1)
81
+ t("div", nt, D(e.value[h.key]), 1)
82
82
  ]),
83
83
  _: 2
84
84
  }, 1032, ["content"]))
85
85
  ], 64);
86
86
  }), 128))
87
87
  ], 2),
88
- f.removable ? (m(), F("div", st, [
89
- i(c, {
88
+ f.removable ? (m(), C("div", st, [
89
+ s(c, {
90
90
  color: "system-error-300",
91
91
  class: "cursor-pointer",
92
92
  name: "close",
93
93
  size: "md",
94
- onClick: D[0] || (D[0] = (h) => w("remove"))
94
+ onClick: F[0] || (F[0] = (h) => V("remove"))
95
95
  })
96
96
  ])) : M("", !0)
97
97
  ]);
@@ -120,7 +120,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
120
120
  }),
121
121
  emits: ["update:modelValue"],
122
122
  setup(f) {
123
- const { t: o } = J(), e = X(f, "modelValue"), s = q(() => {
123
+ const { t: o } = J(), e = X(f, "modelValue"), i = q(() => {
124
124
  switch (e.value.name) {
125
125
  case pe.AutoCount:
126
126
  case pe.SQL:
@@ -130,29 +130,29 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
130
130
  return !1;
131
131
  }
132
132
  });
133
- return (V, w) => {
133
+ return (w, V) => {
134
134
  var _, c;
135
- const x = S("FmSwitch"), D = S("FmTextField"), b = S("FmTimePicker");
136
- return m(), F(O, null, [
135
+ const x = S("FmSwitch"), F = S("FmTextField"), b = S("FmTimePicker");
136
+ return m(), C(O, null, [
137
137
  t("div", it, [
138
- t("div", rt, U(p(o)("report.integration.auto", { label: f.label })), 1),
139
- f.label == "upload" ? (m(), F("div", mt, U(p(o)("report.integration.lastUploadDate")) + ": " + U(f.lastUploadDate ? p(qe)(f.lastUploadDate).format("MMMM D, YYYY h:mm A") : p(o)("report.integration.noData.title")), 1)) : M("", !0)
138
+ t("div", rt, D(p(o)("report.integration.auto", { label: f.label })), 1),
139
+ f.label == "upload" ? (m(), C("div", mt, D(p(o)("report.integration.lastUploadDate")) + ": " + D(f.lastUploadDate ? p(qe)(f.lastUploadDate).format("MMMM D, YYYY h:mm A") : p(o)("report.integration.noData.title")), 1)) : M("", !0)
140
140
  ]),
141
141
  t("div", ct, [
142
- t("div", dt, U(p(o)("report.common.enable")), 1),
143
- i(x, {
142
+ t("div", dt, D(p(o)("report.common.enable")), 1),
143
+ s(x, {
144
144
  modelValue: e.value.enable,
145
- "onUpdate:modelValue": w[0] || (w[0] = (h) => e.value.enable = h),
145
+ "onUpdate:modelValue": V[0] || (V[0] = (h) => e.value.enable = h),
146
146
  style: { gap: "0px" }
147
147
  }, null, 8, ["modelValue"])
148
148
  ]),
149
- s.value ? (m(), F("div", ut, [
150
- t("div", pt, U(p(o)("report.common.email")), 1),
149
+ i.value ? (m(), C("div", ut, [
150
+ t("div", pt, D(p(o)("report.common.email")), 1),
151
151
  t("div", ft, [
152
- i(D, {
152
+ s(F, {
153
153
  "model-value": (e.value.emails || []).join(","),
154
154
  placeholder: "Email",
155
- "onUpdate:modelValue": w[1] || (w[1] = (h) => {
155
+ "onUpdate:modelValue": V[1] || (V[1] = (h) => {
156
156
  switch (e.value.name) {
157
157
  case p(pe).AutoCount:
158
158
  case p(pe).SQL:
@@ -166,18 +166,18 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
166
166
  ])) : M("", !0),
167
167
  t("div", vt, [
168
168
  t("div", gt, [
169
- t("div", yt, U(p(at)(f.label)) + " time ", 1),
169
+ t("div", yt, D(p(at)(f.label)) + " time ", 1),
170
170
  t("div", xt, [
171
- i(b, {
171
+ s(b, {
172
172
  class: "gap-[0px]",
173
173
  "model-value": p(qe)().hour(((_ = e.value.triggerTime) == null ? void 0 : _.hour) ?? 0).minute(((c = e.value.triggerTime) == null ? void 0 : c.minute) ?? 0).format("HH:mm"),
174
- "onUpdate:modelValue": w[2] || (w[2] = (h) => {
174
+ "onUpdate:modelValue": V[2] || (V[2] = (h) => {
175
175
  h && (e.value.triggerTime.hour = Number(h.split(":")[0]), e.value.triggerTime.minute = Number(h.split(":")[1]));
176
176
  })
177
177
  }, null, 8, ["model-value"])
178
178
  ])
179
179
  ]),
180
- i(R, {
180
+ s(K, {
181
181
  "model-value": {
182
182
  label: p(o)("report.integration.delayDay"),
183
183
  delayDay: e.value.delayDay
@@ -188,7 +188,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
188
188
  delayDay: { placeholder: p(o)("report.integration.delayDay"), editable: !0 }
189
189
  },
190
190
  rules: [(h) => h > 0 || "Delay days must be greater than 0"],
191
- "onUpdate:modelValue": w[3] || (w[3] = (h) => {
191
+ "onUpdate:modelValue": V[3] || (V[3] = (h) => {
192
192
  e.value.delayDay = h.delayDay;
193
193
  })
194
194
  }, null, 8, ["model-value", "options", "rules"])
@@ -231,9 +231,9 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
231
231
  }),
232
232
  emits: /* @__PURE__ */ he(["remove"], ["update:modelValue"]),
233
233
  setup(f, { emit: o }) {
234
- const e = X(f, "modelValue"), s = f, V = q(
235
- () => Object.keys(s.options).map((_) => {
236
- const c = s.options[_];
234
+ const e = X(f, "modelValue"), i = f, w = q(
235
+ () => Object.keys(i.options).map((_) => {
236
+ const c = i.options[_];
237
237
  return {
238
238
  placeholder: c.placeholder,
239
239
  key: _,
@@ -241,54 +241,54 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
241
241
  dropdownOptions: c.dropdownOptions
242
242
  };
243
243
  })
244
- ), w = (_, c) => {
245
- s.singleValueMode ? e.value = s.type === "number" ? Number(_) : _ : c && (e.value = {
244
+ ), V = (_, c) => {
245
+ i.singleValueMode ? e.value = i.type === "number" ? Number(_) : _ : c && (e.value = {
246
246
  ...e.value,
247
- [c]: s.type === "number" ? Number(_) : _
247
+ [c]: i.type === "number" ? Number(_) : _
248
248
  });
249
249
  }, x = (_) => {
250
250
  var c;
251
- return s.singleValueMode ? s.options.key.placeholder : (c = e.value[_.key]) == null ? void 0 : c.toString();
252
- }, D = (_) => s.singleValueMode ? e.value : e.value[_.key], b = o;
251
+ return i.singleValueMode ? i.options.key.placeholder : (c = e.value[_.key]) == null ? void 0 : c.toString();
252
+ }, F = (_) => i.singleValueMode ? e.value : e.value[_.key], b = o;
253
253
  return (_, c) => {
254
254
  const h = S("FmSelect"), $ = S("FmTextField"), u = S("FmTooltip"), y = S("FmIcon");
255
- return m(), F("div", _t, [
255
+ return m(), C("div", _t, [
256
256
  t("div", {
257
257
  class: je(`${f.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
258
258
  }, [
259
- (m(!0), F(O, null, L(V.value, (n) => (m(), F(O, {
259
+ (m(!0), C(O, null, L(w.value, (n) => (m(), C(O, {
260
260
  key: n.key
261
261
  }, [
262
- n.editable ? (m(), F("div", bt, [
263
- n.dropdownOptions ? (m(), I(h, {
262
+ n.editable ? (m(), C("div", bt, [
263
+ n.dropdownOptions ? (m(), R(h, {
264
264
  key: 0,
265
- "model-value": D(n),
265
+ "model-value": F(n),
266
266
  placeholder: n.placeholder,
267
267
  items: n.dropdownOptions,
268
268
  "shift-menu": !0,
269
- "onUpdate:modelValue": (g) => w(g, n.key)
270
- }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (m(), I($, {
269
+ "onUpdate:modelValue": (g) => V(g, n.key)
270
+ }, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (m(), R($, {
271
271
  key: 1,
272
- "model-value": D(n),
272
+ "model-value": F(n),
273
273
  placeholder: n.placeholder,
274
274
  type: f.type,
275
275
  rules: f.rules,
276
- "onUpdate:modelValue": (g) => w(g, n.key)
276
+ "onUpdate:modelValue": (g) => V(g, n.key)
277
277
  }, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
278
- ])) : (m(), I(u, {
278
+ ])) : (m(), R(u, {
279
279
  key: 1,
280
280
  content: x(n),
281
281
  class: "w-[50%]"
282
282
  }, {
283
283
  default: _e(() => [
284
- t("div", ht, U(x(n)), 1)
284
+ t("div", ht, D(x(n)), 1)
285
285
  ]),
286
286
  _: 2
287
287
  }, 1032, ["content"]))
288
288
  ], 64))), 128))
289
289
  ], 2),
290
- f.removable ? (m(), F("div", wt, [
291
- i(y, {
290
+ f.removable ? (m(), C("div", wt, [
291
+ s(y, {
292
292
  color: "system-error-300",
293
293
  class: "cursor-pointer",
294
294
  name: "close",
@@ -341,7 +341,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
341
341
  }),
342
342
  emits: ["update:modelValue"],
343
343
  setup(f) {
344
- const { t: o } = J(), e = X(f, "modelValue"), s = ge(), V = Ve(), w = fe(), { promptLoader: x } = Ce(), { promptMessage: D } = Ae(), { restaurants: b } = ve(), _ = B(!1), c = q(
344
+ const { t: o } = J(), e = X(f, "modelValue"), i = ge(), w = Ve(), V = fe(), { promptLoader: x } = Ce(), { promptMessage: F } = Ae(), { restaurants: b } = ve(), _ = B(!1), c = q(
345
345
  () => b.map((v) => ({ label: v.name, value: v.id }))
346
346
  ), h = q(() => {
347
347
  var v, r;
@@ -350,69 +350,69 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
350
350
  async function u() {
351
351
  var v;
352
352
  if (_.value)
353
- s.open({ type: "error", message: "Connecting in progress" });
353
+ i.open({ type: "error", message: "Connecting in progress" });
354
354
  else if ((v = e.value.platform) != null && v.accessToken)
355
- await D({
355
+ await F({
356
356
  message: o("report.integration.xero.confirmDisconnect", { name: e.value.name }),
357
357
  title: o("report.integration.xero.disconnectTitle")
358
- }) && (await Qe(e.value._id), await V.getSettings());
358
+ }) && (await Qe(e.value._id), await w.getSettings());
359
359
  else if (e.value._id)
360
360
  try {
361
361
  const r = await Je(e.value._id);
362
362
  _.value = !0;
363
- const K = setInterval(async () => {
364
- var N;
363
+ const N = setInterval(async () => {
364
+ var A;
365
365
  $.value += 1;
366
366
  try {
367
- await V.getSettings();
367
+ await w.getSettings();
368
368
  } finally {
369
- ($.value === 12 || (N = e.value.platform) != null && N.accessToken) && (_.value = !1, K && clearInterval(K), $.value = 0);
369
+ ($.value === 12 || (A = e.value.platform) != null && A.accessToken) && (_.value = !1, N && clearInterval(N), $.value = 0);
370
370
  }
371
371
  }, 5e3);
372
372
  window.open(r.redirect, "_blank");
373
373
  } catch (r) {
374
- s.open({ type: "error", message: r.message });
374
+ i.open({ type: "error", message: r.message });
375
375
  }
376
376
  else
377
- s.open({ type: "error", message: `invalid accounting ${e.value._id}` });
377
+ i.open({ type: "error", message: `invalid accounting ${e.value._id}` });
378
378
  }
379
379
  async function y() {
380
- await D({
380
+ await F({
381
381
  message: `Confirm delete ${e.value.name}?`,
382
382
  title: "Delete"
383
383
  }) && await x(async () => {
384
384
  try {
385
- await Fe(e.value._id), await V.getSettings(), w.back();
385
+ await Fe(e.value._id), await w.getSettings(), V.back();
386
386
  } catch (r) {
387
- s.open({ type: "error", message: r.message });
387
+ i.open({ type: "error", message: r.message });
388
388
  }
389
389
  });
390
390
  }
391
391
  async function n() {
392
392
  await x(async () => {
393
393
  try {
394
- await De(e.value._id, e.value), await V.getSettings();
394
+ await De(e.value._id, e.value), await w.getSettings();
395
395
  } catch (v) {
396
- s.open({ type: "error", message: v.message });
396
+ i.open({ type: "error", message: v.message });
397
397
  }
398
398
  });
399
399
  }
400
400
  function g(v) {
401
- const r = f.tenantOptions.data.find((K) => K.value === v);
401
+ const r = f.tenantOptions.data.find((N) => N.value === v);
402
402
  r && e.value.platform && (e.value.platform.tenant = {
403
403
  id: r.value,
404
404
  name: r.label
405
405
  });
406
406
  }
407
- function C(v, r) {
408
- var K, N;
409
- (N = (K = e.value.platform) == null ? void 0 : K.mappings) != null && N[v] && (e.value.platform.mappings[v] = e.value.platform.mappings[v].filter(
407
+ function U(v, r) {
408
+ var N, A;
409
+ (A = (N = e.value.platform) == null ? void 0 : N.mappings) != null && A[v] && (e.value.platform.mappings[v] = e.value.platform.mappings[v].filter(
410
410
  (G, Y) => Y !== r
411
411
  ));
412
412
  }
413
413
  function a(v) {
414
- var r, K;
415
- (K = (r = e.value.platform) == null ? void 0 : r.mappings) != null && K[v] && (e.value.platform.mappings[v] = [
414
+ var r, N;
415
+ (N = (r = e.value.platform) == null ? void 0 : r.mappings) != null && N[v] && (e.value.platform.mappings[v] = [
416
416
  ...e.value.platform.mappings[v],
417
417
  v === "items" ? {
418
418
  feedmeKey: "",
@@ -430,36 +430,36 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
430
430
  async function l() {
431
431
  await x(async () => {
432
432
  try {
433
- await Ue(e.value._id), await V.getSettings();
433
+ await Ue(e.value._id), await w.getSettings();
434
434
  } catch (v) {
435
- s.open({ type: "error", message: v.message });
435
+ i.open({ type: "error", message: v.message });
436
436
  }
437
437
  });
438
438
  }
439
439
  return $e(async () => {
440
- await V.getSettings();
440
+ await w.getSettings();
441
441
  }), (v, r) => {
442
442
  var z, ee, te, oe, ae, le, ne, se, ie, re, me, ce, de, T, d, k, P, ue, Ke, Me, Le, Ee, Ye, ze;
443
- const K = S("FmIcon"), N = S("FmButton"), G = S("FmMenuDivider"), Y = S("FmCircularProgress"), Q = S("FmSelect"), j = S("FmTextField"), E = S("FmSwitch");
444
- return (ee = (z = e.value) == null ? void 0 : z.platform) != null && ee.mappings ? (m(), F("div", Vt, [
443
+ const N = S("FmIcon"), A = S("FmButton"), G = S("FmMenuDivider"), Y = S("FmCircularProgress"), Q = S("FmSelect"), j = S("FmTextField"), E = S("FmSwitch");
444
+ return (ee = (z = e.value) == null ? void 0 : z.platform) != null && ee.mappings ? (m(), C("div", Vt, [
445
445
  t("div", kt, [
446
446
  t("div", $t, [
447
447
  r[10] || (r[10] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
448
448
  t("div", St, [
449
449
  t("div", Ct, [
450
- i(K, {
450
+ s(N, {
451
451
  name: "refresh",
452
452
  class: "p-2 bg-gray-100 rounded-full",
453
453
  onClick: l
454
454
  }),
455
455
  r[9] || (r[9] = t("span", { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, " Repopulate the fields based on the dates selected in Preview. ", -1))
456
456
  ]),
457
- i(N, {
457
+ s(A, {
458
458
  variant: "tertiary",
459
459
  label: "Delete",
460
460
  onClick: y
461
461
  }),
462
- i(N, {
462
+ s(A, {
463
463
  variant: "primary",
464
464
  label: "Update",
465
465
  onClick: n
@@ -467,23 +467,23 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
467
467
  ])
468
468
  ])
469
469
  ]),
470
- i(G, { style: { margin: 0 } }),
470
+ s(G, { style: { margin: 0 } }),
471
471
  t("div", Ft, [
472
472
  r[21] || (r[21] = t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Authenticate with your official Xero account to enable FeedMe to securely upload data to Xero. ", -1)),
473
473
  t("div", Dt, [
474
474
  t("div", Ut, [
475
- i(N, {
475
+ s(A, {
476
476
  disabled: _.value,
477
477
  variant: "primary",
478
478
  label: h.value,
479
479
  onClick: u
480
480
  }, null, 8, ["disabled", "label"])
481
481
  ]),
482
- !f.tenantOptions.isLoaded && ((te = e.value.platform) != null && te.accessToken) ? (m(), I(Y, {
482
+ !f.tenantOptions.isLoaded && ((te = e.value.platform) != null && te.accessToken) ? (m(), R(Y, {
483
483
  key: 0,
484
484
  size: "xl"
485
485
  })) : M("", !0),
486
- i(Q, {
486
+ s(Q, {
487
487
  class: "flex-grow",
488
488
  items: f.tenantOptions.data || [],
489
489
  "model-value": (oe = e.value.platform.tenant) == null ? void 0 : oe.id,
@@ -496,7 +496,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
496
496
  t("div", At, [
497
497
  r[11] || (r[11] = t("div", { class: "w-[25%]" }, "Name", -1)),
498
498
  t("div", It, [
499
- i(j, {
499
+ s(j, {
500
500
  modelValue: e.value.name,
501
501
  "onUpdate:modelValue": r[0] || (r[0] = (Z) => e.value.name = Z)
502
502
  }, null, 8, ["modelValue"])
@@ -504,7 +504,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
504
504
  ]),
505
505
  t("div", Rt, [
506
506
  r[12] || (r[12] = t("div", { class: "w-[25%]" }, "Location", -1)),
507
- i(Q, {
507
+ s(Q, {
508
508
  modelValue: e.value.platform.locationIds,
509
509
  "onUpdate:modelValue": r[1] || (r[1] = (Z) => e.value.platform.locationIds = Z),
510
510
  multiselect: !0,
@@ -514,7 +514,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
514
514
  }, null, 8, ["modelValue", "items"])
515
515
  ])
516
516
  ]),
517
- i(Ne, {
517
+ s(Ne, {
518
518
  modelValue: e.value.platform,
519
519
  "onUpdate:modelValue": r[2] || (r[2] = (Z) => e.value.platform = Z),
520
520
  label: "upload",
@@ -525,7 +525,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
525
525
  t("div", Kt, [
526
526
  r[14] || (r[14] = t("div", { class: "w-[25%]" }, "Contact", -1)),
527
527
  t("div", Mt, [
528
- i(j, {
528
+ s(j, {
529
529
  modelValue: e.value.platform.mappings.contact.xeroAccount,
530
530
  "onUpdate:modelValue": r[3] || (r[3] = (Z) => e.value.platform.mappings.contact.xeroAccount = Z),
531
531
  placeholder: "Contact account number"
@@ -535,7 +535,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
535
535
  t("div", Pt, [
536
536
  r[15] || (r[15] = t("div", { class: "w-[25%]" }, "Discount as Item", -1)),
537
537
  t("div", jt, [
538
- i(E, {
538
+ s(E, {
539
539
  "model-value": e.value.platform.discountItem ?? !1,
540
540
  style: { gap: 0 },
541
541
  "onUpdate:modelValue": r[4] || (r[4] = (Z) => {
@@ -547,7 +547,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
547
547
  t("div", Ot, [
548
548
  r[16] || (r[16] = t("div", { class: "w-[25%]" }, "Combine Refund", -1)),
549
549
  t("div", Bt, [
550
- i(E, {
550
+ s(E, {
551
551
  "model-value": e.value.platform.mappings.isCombineRefund ?? !1,
552
552
  style: { gap: 0 },
553
553
  "onUpdate:modelValue": r[5] || (r[5] = (Z) => {
@@ -558,19 +558,19 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
558
558
  ]),
559
559
  t("div", Lt, [
560
560
  r[17] || (r[17] = t("div", { class: "fm-typo-en-title-sm-800" }, "Taxes", -1)),
561
- i(N, {
561
+ s(A, {
562
562
  variant: "primary",
563
563
  icon: "add",
564
564
  onClick: r[6] || (r[6] = () => a("taxes"))
565
565
  })
566
566
  ]),
567
- f.taxOptions.isError || e.value.platform.accessToken == null ? (m(), F("div", Et, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : M("", !0),
568
- !f.taxOptions.isLoaded && ((ne = e.value.platform) != null && ne.accessToken) ? (m(), I(Y, {
567
+ f.taxOptions.isError || e.value.platform.accessToken == null ? (m(), C("div", Et, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : M("", !0),
568
+ !f.taxOptions.isLoaded && ((ne = e.value.platform) != null && ne.accessToken) ? (m(), R(Y, {
569
569
  key: 1,
570
570
  size: "xl"
571
571
  })) : M("", !0),
572
- ((se = f.taxOptions.data) == null ? void 0 : se.length) > 0 ? (m(), F("div", Yt, [
573
- (m(!0), F(O, null, L((me = (re = (ie = e.value) == null ? void 0 : ie.platform) == null ? void 0 : re.mappings) == null ? void 0 : me.taxes, (Z, W) => (m(), I(ke, {
572
+ ((se = f.taxOptions.data) == null ? void 0 : se.length) > 0 ? (m(), C("div", Yt, [
573
+ (m(!0), C(O, null, L((me = (re = (ie = e.value) == null ? void 0 : ie.platform) == null ? void 0 : re.mappings) == null ? void 0 : me.taxes, (Z, W) => (m(), R(ke, {
574
574
  key: `tax-${W}`,
575
575
  modelValue: e.value.platform.mappings.taxes[W],
576
576
  "onUpdate:modelValue": (be) => e.value.platform.mappings.taxes[W] = be,
@@ -583,9 +583,9 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
583
583
  }
584
584
  },
585
585
  removable: !0,
586
- onRemove: () => C("taxes", W)
586
+ onRemove: () => U("taxes", W)
587
587
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128)),
588
- (m(!0), F(O, null, L((T = (de = (ce = e.value) == null ? void 0 : ce.platform) == null ? void 0 : de.mappings) == null ? void 0 : T.taxRoundingAdjustments, (Z, W) => (m(), I(ke, {
588
+ (m(!0), C(O, null, L((T = (de = (ce = e.value) == null ? void 0 : ce.platform) == null ? void 0 : de.mappings) == null ? void 0 : T.taxRoundingAdjustments, (Z, W) => (m(), R(ke, {
589
589
  key: `tax-rounding-adjustment-${W}`,
590
590
  modelValue: e.value.platform.mappings.taxRoundingAdjustments[W],
591
591
  "onUpdate:modelValue": (be) => e.value.platform.mappings.taxRoundingAdjustments[W] = be,
@@ -598,24 +598,24 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
598
598
  }
599
599
  },
600
600
  removable: !0,
601
- onRemove: () => C("taxRoundingAdjustments", W)
601
+ onRemove: () => U("taxRoundingAdjustments", W)
602
602
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
603
603
  ])) : M("", !0),
604
604
  t("div", zt, [
605
605
  r[18] || (r[18] = t("div", { class: "fm-typo-en-title-sm-800" }, "Items", -1)),
606
- i(N, {
606
+ s(A, {
607
607
  variant: "primary",
608
608
  icon: "add",
609
609
  onClick: r[7] || (r[7] = () => a("items"))
610
610
  })
611
611
  ]),
612
- f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (m(), F("div", qt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : M("", !0),
613
- !f.accountCodeOptions.isLoaded && ((d = e.value.platform) != null && d.accessToken) ? (m(), I(Y, {
612
+ f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (m(), C("div", qt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : M("", !0),
613
+ !f.accountCodeOptions.isLoaded && ((d = e.value.platform) != null && d.accessToken) ? (m(), R(Y, {
614
614
  key: 4,
615
615
  size: "xl"
616
616
  })) : M("", !0),
617
- ((k = f.accountCodeOptions.data) == null ? void 0 : k.length) > 0 ? (m(), F("div", Ht, [
618
- (m(!0), F(O, null, L((Ke = (ue = (P = e.value) == null ? void 0 : P.platform) == null ? void 0 : ue.mappings) == null ? void 0 : Ke.items, (Z, W) => (m(), I(ke, {
617
+ ((k = f.accountCodeOptions.data) == null ? void 0 : k.length) > 0 ? (m(), C("div", Ht, [
618
+ (m(!0), C(O, null, L((Ke = (ue = (P = e.value) == null ? void 0 : P.platform) == null ? void 0 : ue.mappings) == null ? void 0 : Ke.items, (Z, W) => (m(), R(ke, {
619
619
  key: `item-${W}`,
620
620
  modelValue: e.value.platform.mappings.items[W],
621
621
  "onUpdate:modelValue": (be) => e.value.platform.mappings.items[W] = be,
@@ -628,24 +628,24 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
628
628
  }
629
629
  },
630
630
  removable: !0,
631
- onRemove: () => C("items", W)
631
+ onRemove: () => U("items", W)
632
632
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
633
633
  ])) : M("", !0),
634
634
  t("div", Xt, [
635
635
  r[19] || (r[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Payments", -1)),
636
- i(N, {
636
+ s(A, {
637
637
  variant: "primary",
638
638
  icon: "add",
639
639
  onClick: r[8] || (r[8] = () => a("payments"))
640
640
  })
641
641
  ]),
642
- f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (m(), F("div", Gt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : M("", !0),
643
- !f.accountCodeOptions.isLoaded && ((Me = e.value.platform) != null && Me.accessToken) ? (m(), I(Y, {
642
+ f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (m(), C("div", Gt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : M("", !0),
643
+ !f.accountCodeOptions.isLoaded && ((Me = e.value.platform) != null && Me.accessToken) ? (m(), R(Y, {
644
644
  key: 7,
645
645
  size: "xl"
646
646
  })) : M("", !0),
647
- ((Le = f.accountCodeOptions.data) == null ? void 0 : Le.length) > 0 ? (m(), F("div", Qt, [
648
- (m(!0), F(O, null, L((ze = (Ye = (Ee = e.value) == null ? void 0 : Ee.platform) == null ? void 0 : Ye.mappings) == null ? void 0 : ze.payments, (Z, W) => (m(), I(ke, {
647
+ ((Le = f.accountCodeOptions.data) == null ? void 0 : Le.length) > 0 ? (m(), C("div", Qt, [
648
+ (m(!0), C(O, null, L((ze = (Ye = (Ee = e.value) == null ? void 0 : Ee.platform) == null ? void 0 : Ye.mappings) == null ? void 0 : ze.payments, (Z, W) => (m(), R(ke, {
649
649
  key: `payment-${W}`,
650
650
  modelValue: e.value.platform.mappings.payments[W],
651
651
  "onUpdate:modelValue": (be) => e.value.platform.mappings.payments[W] = be,
@@ -658,7 +658,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
658
658
  }
659
659
  },
660
660
  removable: !0,
661
- onRemove: () => C("payments", W)
661
+ onRemove: () => U("payments", W)
662
662
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
663
663
  ])) : M("", !0)
664
664
  ])
@@ -677,7 +677,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
677
677
  },
678
678
  emits: ["update:modelValue"],
679
679
  setup(f) {
680
- const o = B([]), { t: e } = J(), s = q(
680
+ const o = B([]), { t: e } = J(), i = q(
681
681
  () => o.value.reduce((c, h) => {
682
682
  const $ = c.length, { invoice: u, payments: y } = h;
683
683
  c[$] = {
@@ -708,15 +708,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
708
708
  }
709
709
  return c;
710
710
  }, [])
711
- ), V = [
711
+ ), w = [
712
712
  {
713
713
  accessorKey: "date",
714
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
714
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
715
715
  enableSorting: !1
716
716
  },
717
717
  {
718
718
  accessorKey: "status",
719
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Status"),
719
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Status"),
720
720
  enableSorting: !1
721
721
  },
722
722
  {
@@ -726,7 +726,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
726
726
  },
727
727
  {
728
728
  accessorKey: "itemDescription",
729
- header: () => A("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
729
+ header: () => I("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
730
730
  enableSorting: !1
731
731
  },
732
732
  {
@@ -746,7 +746,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
746
746
  // },
747
747
  {
748
748
  accessorKey: "itemAccount",
749
- header: () => A("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
749
+ header: () => I("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
750
750
  enableSorting: !1
751
751
  },
752
752
  {
@@ -784,15 +784,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
784
784
  header: "Payment Amount",
785
785
  enableSorting: !1
786
786
  }
787
- ], w = X(f, "modelValue"), x = B(!1), D = ge(), { dateRange: b } = Ie(ve());
787
+ ], V = X(f, "modelValue"), x = B(!1), F = ge(), { dateRange: b } = Ie(ve());
788
788
  xe(
789
789
  () => b.value,
790
790
  async () => {
791
- if (w.value._id)
791
+ if (V.value._id)
792
792
  try {
793
- x.value = !0, o.value = await Te(w.value._id);
793
+ x.value = !0, o.value = await Te(V.value._id);
794
794
  } catch (c) {
795
- D.open({ message: c.message, type: "error" });
795
+ F.open({ message: c.message, type: "error" });
796
796
  } finally {
797
797
  x.value = !1;
798
798
  }
@@ -803,37 +803,37 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
803
803
  );
804
804
  async function _() {
805
805
  try {
806
- w.value._id ? (x.value = !0, await Oe(w.value._id), D.open({ message: "Upload successful", type: "success" })) : D.open({ message: "Invalid accounting setting", type: "error" });
806
+ V.value._id ? (x.value = !0, await Oe(V.value._id), F.open({ message: "Upload successful", type: "success" })) : F.open({ message: "Invalid accounting setting", type: "error" });
807
807
  } catch (c) {
808
- c.message && D.open({ message: c.message, type: "error" }), c.errors && c.errors.forEach((h) => D.open({ message: h.Message, type: "error" }));
808
+ c.message && F.open({ message: c.message, type: "error" }), c.errors && c.errors.forEach((h) => F.open({ message: h.Message, type: "error" }));
809
809
  } finally {
810
810
  x.value = !1;
811
811
  }
812
812
  }
813
813
  return (c, h) => {
814
814
  const $ = S("FmButton"), u = S("FmCircularProgress"), y = S("FmTable");
815
- return m(), F("div", Wt, [
815
+ return m(), C("div", Wt, [
816
816
  t("div", Zt, [
817
- i(Re, {
817
+ s(Re, {
818
818
  "date-range": p(b),
819
819
  "onUpdate:dateRange": h[0] || (h[0] = (n) => Se(b) ? b.value = n : null),
820
820
  compare: !1
821
821
  }, null, 8, ["date-range"]),
822
- i($, {
822
+ s($, {
823
823
  loading: x.value,
824
824
  variant: "primary",
825
825
  label: "Upload",
826
826
  onClick: _
827
827
  }, null, 8, ["loading"])
828
828
  ]),
829
- x.value ? (m(), F("div", eo, [
830
- i(u, { size: "xl" }),
831
- t("span", to, U(p(e)("report.common.isLoading")), 1)
832
- ])) : s.value.length > 0 ? (m(), I(y, {
829
+ x.value ? (m(), C("div", eo, [
830
+ s(u, { size: "xl" }),
831
+ t("span", to, D(p(e)("report.common.isLoading")), 1)
832
+ ])) : i.value.length > 0 ? (m(), R(y, {
833
833
  key: 1,
834
834
  class: "flex overflow-y-auto",
835
- "row-data": s.value,
836
- "column-defs": V
835
+ "row-data": i.value,
836
+ "column-defs": w
837
837
  }, null, 8, ["row-data"])) : M("", !0)
838
838
  ]);
839
839
  };
@@ -846,7 +846,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
846
846
  },
847
847
  emits: ["update:modelValue"],
848
848
  setup(f) {
849
- const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = B({}), w = B({}), x = B({}), D = [
849
+ const { t: o } = J(), e = X(f, "modelValue"), i = B("setting"), w = B({}), V = B({}), x = B({}), F = [
850
850
  {
851
851
  label: o("report.integration.setting"),
852
852
  value: "setting",
@@ -858,15 +858,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
858
858
  icon: "table"
859
859
  }
860
860
  ], b = fe(), _ = q(() => {
861
- switch (s.value) {
861
+ switch (i.value) {
862
862
  case "preview":
863
863
  return { component: oo };
864
864
  case "setting":
865
865
  return {
866
866
  component: Jt,
867
867
  props: {
868
- tenantOptions: V.value,
869
- taxOptions: w.value,
868
+ tenantOptions: w.value,
869
+ taxOptions: V.value,
870
870
  accountCodeOptions: x.value
871
871
  }
872
872
  };
@@ -878,28 +878,28 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
878
878
  if (e.value._id)
879
879
  try {
880
880
  const u = await We(e.value._id);
881
- V.value.data = u.map((y) => ({
881
+ w.value.data = u.map((y) => ({
882
882
  value: y.id,
883
883
  label: y.name
884
884
  }));
885
885
  } catch (u) {
886
- console.error("Failed to fetch tenants:", u), V.value.isError = !0;
886
+ console.error("Failed to fetch tenants:", u), w.value.isError = !0;
887
887
  } finally {
888
- V.value.isLoaded = !0;
888
+ w.value.isLoaded = !0;
889
889
  }
890
890
  }
891
891
  async function h() {
892
892
  if (e.value._id)
893
893
  try {
894
894
  const u = await Ze(e.value._id);
895
- w.value.data = u.map((y) => ({
895
+ V.value.data = u.map((y) => ({
896
896
  value: y.Name,
897
897
  label: `${y.Name} - (${y.EffectiveRate}%)`
898
898
  }));
899
899
  } catch (u) {
900
- console.error("Failed to fetch taxes:", u), w.value.isError = !0;
900
+ console.error("Failed to fetch taxes:", u), V.value.isError = !0;
901
901
  } finally {
902
- w.value.isLoaded = !0;
902
+ V.value.isLoaded = !0;
903
903
  }
904
904
  }
905
905
  async function $() {
@@ -926,11 +926,11 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
926
926
  },
927
927
  { immediate: !0 }
928
928
  ), (u, y) => {
929
- var C, a, l;
929
+ var U, a, l;
930
930
  const n = S("FmPageHead"), g = S("FmTabs");
931
- return m(), F("div", ao, [
932
- i(n, {
933
- title: ((C = e.value) == null ? void 0 : C.name) || "Xero",
931
+ return m(), C("div", ao, [
932
+ s(n, {
933
+ title: ((U = e.value) == null ? void 0 : U.name) || "Xero",
934
934
  "back-button": !0,
935
935
  style: { paddingLeft: "0px", paddingRight: "0px" },
936
936
  "onClick:back": p(b).back
@@ -940,13 +940,13 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
940
940
  ])),
941
941
  _: 1
942
942
  }, 8, ["title", "onClick:back"]),
943
- i(g, {
944
- "model-value": s.value,
945
- "onUpdate:modelValue": y[0] || (y[0] = (v) => s.value = v),
946
- items: D
943
+ s(g, {
944
+ "model-value": i.value,
945
+ "onUpdate:modelValue": y[0] || (y[0] = (v) => i.value = v),
946
+ items: F
947
947
  }, null, 8, ["model-value"]),
948
948
  t("div", lo, [
949
- (m(), I(we((a = _.value) == null ? void 0 : a.component), He({
949
+ (m(), R(we((a = _.value) == null ? void 0 : a.component), He({
950
950
  modelValue: e.value,
951
951
  "onUpdate:modelValue": y[1] || (y[1] = (v) => e.value = v)
952
952
  }, (l = _.value) == null ? void 0 : l.props), null, 16, ["modelValue"]))
@@ -1000,7 +1000,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1000
1000
  meaning: o("report.integration.refNumExplain.5digit.meaning"),
1001
1001
  output: "[5DIGIT]"
1002
1002
  }
1003
- ], s = [
1003
+ ], i = [
1004
1004
  {
1005
1005
  accessorKey: "placeholder",
1006
1006
  header: o("report.integration.placeholder")
@@ -1018,15 +1018,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1018
1018
  header: o("report.integration.output")
1019
1019
  }
1020
1020
  ];
1021
- return (V, w) => {
1022
- const x = S("FmIcon"), D = S("FmTable"), b = S("FmSideSheet");
1023
- return m(), I(b, {
1021
+ return (w, V) => {
1022
+ const x = S("FmIcon"), F = S("FmTable"), b = S("FmSideSheet");
1023
+ return m(), R(b, {
1024
1024
  header: p(o)("report.integration.refNumFormatInfo"),
1025
1025
  "dismiss-away": "",
1026
1026
  "max-width": 780
1027
1027
  }, {
1028
1028
  "side-sheet-button": _e(() => [
1029
- i(x, {
1029
+ s(x, {
1030
1030
  name: "info",
1031
1031
  color: "primary",
1032
1032
  class: "cursor-pointer p-2"
@@ -1035,15 +1035,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1035
1035
  default: _e(() => [
1036
1036
  t("div", so, [
1037
1037
  t("ul", io, [
1038
- t("li", null, U(p(o)("report.integration.refNumGuide.1stPoint")), 1),
1039
- t("li", null, U(p(o)("report.integration.refNumGuide.2ndPoint")), 1),
1040
- t("li", null, U(p(o)("report.integration.refNumGuide.3ndPoint")), 1),
1041
- t("li", null, U(p(o)("report.integration.refNumGuide.4thPoint")), 1)
1038
+ t("li", null, D(p(o)("report.integration.refNumGuide.1stPoint")), 1),
1039
+ t("li", null, D(p(o)("report.integration.refNumGuide.2ndPoint")), 1),
1040
+ t("li", null, D(p(o)("report.integration.refNumGuide.3ndPoint")), 1),
1041
+ t("li", null, D(p(o)("report.integration.refNumGuide.4thPoint")), 1)
1042
1042
  ])
1043
1043
  ]),
1044
- i(D, {
1044
+ s(F, {
1045
1045
  "row-data": e,
1046
- "column-defs": s,
1046
+ "column-defs": i,
1047
1047
  "shrink-at": !1,
1048
1048
  "hide-footer": !0
1049
1049
  })
@@ -1063,25 +1063,25 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1063
1063
  },
1064
1064
  emits: ["update:modelValue"],
1065
1065
  setup(f) {
1066
- const o = X(f, "modelValue"), e = ge(), s = Ve(), V = fe(), { promptLoader: w } = Ce(), { promptMessage: x } = Ae(), { restaurants: D } = ve(), b = q(
1067
- () => D.map((a) => ({ label: a.name, value: a.id }))
1066
+ const o = X(f, "modelValue"), e = ge(), i = Ve(), w = fe(), { promptLoader: V } = Ce(), { promptMessage: x } = Ae(), { restaurants: F } = ve(), b = q(
1067
+ () => F.map((a) => ({ label: a.name, value: a.id }))
1068
1068
  ), { t: _ } = J();
1069
1069
  async function c() {
1070
1070
  await x({
1071
1071
  message: _("report.messages.confirmDelete", { name: o.value.name }),
1072
1072
  title: _("report.common.delete")
1073
- }) && await w(async () => {
1073
+ }) && await V(async () => {
1074
1074
  try {
1075
- await Fe(o.value._id), await s.getSettings(), V.back();
1075
+ await Fe(o.value._id), await i.getSettings(), w.back();
1076
1076
  } catch (l) {
1077
1077
  e.open({ type: "error", message: l.message });
1078
1078
  }
1079
1079
  });
1080
1080
  }
1081
1081
  async function h() {
1082
- await w(async () => {
1082
+ await V(async () => {
1083
1083
  try {
1084
- await De(o.value._id, o.value), await s.getSettings();
1084
+ await De(o.value._id, o.value), await i.getSettings();
1085
1085
  } catch (a) {
1086
1086
  e.open({ type: "error", message: a.message });
1087
1087
  }
@@ -1090,7 +1090,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1090
1090
  function $(a, l) {
1091
1091
  var v, r;
1092
1092
  (r = (v = o.value.platform) == null ? void 0 : v.mappings) != null && r[a] && (o.value.platform.mappings[a] = o.value.platform.mappings[a].filter(
1093
- (K, N) => N !== l
1093
+ (N, A) => A !== l
1094
1094
  ));
1095
1095
  }
1096
1096
  function u(a) {
@@ -1157,39 +1157,39 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1157
1157
  account: { placeholder: a, editable: !0 }
1158
1158
  };
1159
1159
  }
1160
- async function C() {
1161
- await w(async () => {
1160
+ async function U() {
1161
+ await V(async () => {
1162
1162
  try {
1163
- await Ue(o.value._id), await s.getSettings();
1163
+ await Ue(o.value._id), await i.getSettings();
1164
1164
  } catch (a) {
1165
1165
  e.open({ type: "error", message: a.message });
1166
1166
  }
1167
1167
  });
1168
1168
  }
1169
1169
  return $e(async () => {
1170
- await s.getSettings();
1170
+ await i.getSettings();
1171
1171
  }), (a, l) => {
1172
1172
  var Y, Q, j, E, z, ee, te, oe, ae, le, ne, se, ie, re, me, ce, de, T;
1173
- const v = S("FmIcon"), r = S("FmButton"), K = S("FmMenuDivider"), N = S("FmTextField"), G = S("FmSelect");
1174
- return (Q = (Y = o.value) == null ? void 0 : Y.platform) != null && Q.mappings ? (m(), F("div", ro, [
1173
+ const v = S("FmIcon"), r = S("FmButton"), N = S("FmMenuDivider"), A = S("FmTextField"), G = S("FmSelect");
1174
+ return (Q = (Y = o.value) == null ? void 0 : Y.platform) != null && Q.mappings ? (m(), C("div", ro, [
1175
1175
  t("div", mo, [
1176
1176
  t("div", co, [
1177
- t("div", uo, U(p(_)("report.integration.bukku.connect")), 1),
1177
+ t("div", uo, D(p(_)("report.integration.bukku.connect")), 1),
1178
1178
  t("div", po, [
1179
1179
  t("div", fo, [
1180
- i(v, {
1180
+ s(v, {
1181
1181
  name: "refresh",
1182
1182
  class: "p-2 bg-gray-100 rounded-full",
1183
- onClick: C
1183
+ onClick: U
1184
1184
  }),
1185
- t("span", vo, U(p(_)("report.integration.refreshSetting")), 1)
1185
+ t("span", vo, D(p(_)("report.integration.refreshSetting")), 1)
1186
1186
  ]),
1187
- i(r, {
1187
+ s(r, {
1188
1188
  variant: "tertiary",
1189
1189
  label: p(_)("report.common.delete"),
1190
1190
  onClick: c
1191
1191
  }, null, 8, ["label"]),
1192
- i(r, {
1192
+ s(r, {
1193
1193
  variant: "primary",
1194
1194
  label: p(_)("report.common.update"),
1195
1195
  onClick: h
@@ -1197,13 +1197,13 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1197
1197
  ])
1198
1198
  ])
1199
1199
  ]),
1200
- i(K, { style: { margin: 0 } }),
1200
+ s(N, { style: { margin: 0 } }),
1201
1201
  t("div", go, [
1202
- t("div", yo, U(p(_)("report.integration.bukku.authentication")), 1),
1202
+ t("div", yo, D(p(_)("report.integration.bukku.authentication")), 1),
1203
1203
  t("div", xo, [
1204
- t("div", _o, U(p(_)("report.integration.subdomain")), 1),
1204
+ t("div", _o, D(p(_)("report.integration.subdomain")), 1),
1205
1205
  t("div", bo, [
1206
- i(N, {
1206
+ s(A, {
1207
1207
  modelValue: o.value.platform.subdomain,
1208
1208
  "onUpdate:modelValue": l[0] || (l[0] = (d) => o.value.platform.subdomain = d),
1209
1209
  placeholder: p(_)("report.integration.subdomain")
@@ -1211,9 +1211,9 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1211
1211
  ])
1212
1212
  ]),
1213
1213
  t("div", ho, [
1214
- t("div", wo, U(p(_)("report.integration.token")), 1),
1214
+ t("div", wo, D(p(_)("report.integration.token")), 1),
1215
1215
  t("div", Vo, [
1216
- i(N, {
1216
+ s(A, {
1217
1217
  modelValue: o.value.platform.token,
1218
1218
  "onUpdate:modelValue": l[1] || (l[1] = (d) => o.value.platform.token = d),
1219
1219
  placeholder: p(_)("report.integration.token")
@@ -1221,19 +1221,19 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1221
1221
  ])
1222
1222
  ]),
1223
1223
  t("div", ko, [
1224
- t("div", $o, U(p(_)("report.integration.general")), 1),
1224
+ t("div", $o, D(p(_)("report.integration.general")), 1),
1225
1225
  t("div", So, [
1226
- t("div", Co, U(p(_)("report.common.name")), 1),
1226
+ t("div", Co, D(p(_)("report.common.name")), 1),
1227
1227
  t("div", Fo, [
1228
- i(N, {
1228
+ s(A, {
1229
1229
  modelValue: o.value.name,
1230
1230
  "onUpdate:modelValue": l[2] || (l[2] = (d) => o.value.name = d)
1231
1231
  }, null, 8, ["modelValue"])
1232
1232
  ])
1233
1233
  ]),
1234
1234
  t("div", Do, [
1235
- t("div", Uo, U(p(_)("report.common.location")), 1),
1236
- i(G, {
1235
+ t("div", Uo, D(p(_)("report.common.location")), 1),
1236
+ s(G, {
1237
1237
  modelValue: o.value.platform.locationIds,
1238
1238
  "onUpdate:modelValue": l[3] || (l[3] = (d) => o.value.platform.locationIds = d),
1239
1239
  multiselect: !0,
@@ -1243,8 +1243,8 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1243
1243
  }, null, 8, ["modelValue", "items"])
1244
1244
  ]),
1245
1245
  t("div", To, [
1246
- t("div", Ao, U(p(_)("report.integration.grouping.title")), 1),
1247
- i(G, {
1246
+ t("div", Ao, D(p(_)("report.integration.grouping.title")), 1),
1247
+ s(G, {
1248
1248
  modelValue: o.value.platform.grouping,
1249
1249
  "onUpdate:modelValue": l[4] || (l[4] = (d) => o.value.platform.grouping = d),
1250
1250
  multiselect: !1,
@@ -1256,7 +1256,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1256
1256
  ]),
1257
1257
  t("div", Io, [
1258
1258
  t("div", Ro, [
1259
- i(R, {
1259
+ s(K, {
1260
1260
  "model-value": {
1261
1261
  key: "Contact",
1262
1262
  account: o.value.platform.mappings.contact.account
@@ -1276,7 +1276,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1276
1276
  (ue = (P = (k = o.value) == null ? void 0 : k.platform) == null ? void 0 : P.mappings) != null && ue.contact && (o.value.platform.mappings.contact.account = d.account);
1277
1277
  })
1278
1278
  }, null, 8, ["model-value"]),
1279
- i(R, {
1279
+ s(K, {
1280
1280
  "model-value": {
1281
1281
  key: "Rounding",
1282
1282
  account: o.value.platform.mappings.rounding.account
@@ -1287,7 +1287,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1287
1287
  (ue = (P = (k = o.value) == null ? void 0 : k.platform) == null ? void 0 : P.mappings) != null && ue.rounding && (o.value.platform.mappings.rounding.account = d.account);
1288
1288
  })
1289
1289
  }, null, 8, ["model-value", "options"]),
1290
- (m(!0), F(O, null, L((z = (E = (j = o.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : z.charges, (d, k) => (m(), I(R, {
1290
+ (m(!0), C(O, null, L((z = (E = (j = o.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : z.charges, (d, k) => (m(), R(K, {
1291
1291
  key: `charge-${k}`,
1292
1292
  modelValue: o.value.platform.mappings.charges[k],
1293
1293
  "onUpdate:modelValue": (P) => o.value.platform.mappings.charges[k] = P,
@@ -1306,11 +1306,11 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1306
1306
  ]),
1307
1307
  t("div", No, [
1308
1308
  t("div", Ko, [
1309
- t("div", Mo, U(p(_)("report.integration.refNumFormat")), 1),
1310
- i(Pe)
1309
+ t("div", Mo, D(p(_)("report.integration.refNumFormat")), 1),
1310
+ s(Pe)
1311
1311
  ]),
1312
1312
  t("div", Po, [
1313
- i(R, {
1313
+ s(K, {
1314
1314
  "model-value": {
1315
1315
  key: "Invoice no",
1316
1316
  account: o.value.platform.mappings.invoiceDocNo
@@ -1318,7 +1318,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1318
1318
  options: g("Invoice no"),
1319
1319
  "onUpdate:modelValue": l[7] || (l[7] = (d) => n({ key: "invoiceDocNo", value: d.account }))
1320
1320
  }, null, 8, ["model-value", "options"]),
1321
- i(R, {
1321
+ s(K, {
1322
1322
  "model-value": {
1323
1323
  key: "Credit note no",
1324
1324
  account: o.value.platform.mappings.creditNoteDocNo
@@ -1326,7 +1326,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1326
1326
  options: g("Credit note no"),
1327
1327
  "onUpdate:modelValue": l[8] || (l[8] = (d) => n({ key: "creditNoteDocNo", value: d.account }))
1328
1328
  }, null, 8, ["model-value", "options"]),
1329
- i(R, {
1329
+ s(K, {
1330
1330
  "model-value": {
1331
1331
  key: "Payment no",
1332
1332
  account: o.value.platform.mappings.paymentDocNo
@@ -1334,7 +1334,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1334
1334
  options: g("Payment no"),
1335
1335
  "onUpdate:modelValue": l[9] || (l[9] = (d) => n({ key: "paymentDocNo", value: d.account }))
1336
1336
  }, null, 8, ["model-value", "options"]),
1337
- i(R, {
1337
+ s(K, {
1338
1338
  "model-value": {
1339
1339
  key: "Refund no",
1340
1340
  account: o.value.platform.mappings.refundDocNo
@@ -1344,22 +1344,22 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1344
1344
  }, null, 8, ["model-value", "options"])
1345
1345
  ])
1346
1346
  ]),
1347
- i(Ne, {
1347
+ s(Ne, {
1348
1348
  modelValue: o.value.platform,
1349
1349
  "onUpdate:modelValue": l[11] || (l[11] = (d) => o.value.platform = d),
1350
1350
  label: "upload",
1351
1351
  "last-upload-date": (ee = o.value.platform) == null ? void 0 : ee.lastUploadDate
1352
1352
  }, null, 8, ["modelValue", "last-upload-date"]),
1353
1353
  t("div", jo, [
1354
- t("div", Oo, U(p(_)("report.integration.items")), 1),
1355
- i(r, {
1354
+ t("div", Oo, D(p(_)("report.integration.items")), 1),
1355
+ s(r, {
1356
1356
  variant: "primary",
1357
1357
  icon: "add",
1358
1358
  onClick: l[12] || (l[12] = () => u("items"))
1359
1359
  })
1360
1360
  ]),
1361
1361
  t("div", Bo, [
1362
- (m(!0), F(O, null, L((ae = (oe = (te = o.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (d, k) => (m(), I(R, {
1362
+ (m(!0), C(O, null, L((ae = (oe = (te = o.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (d, k) => (m(), R(K, {
1363
1363
  key: `item-${k}`,
1364
1364
  modelValue: o.value.platform.mappings.items[k],
1365
1365
  "onUpdate:modelValue": (P) => o.value.platform.mappings.items[k] = P,
@@ -1372,15 +1372,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1372
1372
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1373
1373
  ]),
1374
1374
  t("div", Lo, [
1375
- t("div", Eo, U(p(_)("report.integration.taxes")), 1),
1376
- i(r, {
1375
+ t("div", Eo, D(p(_)("report.integration.taxes")), 1),
1376
+ s(r, {
1377
1377
  variant: "primary",
1378
1378
  icon: "add",
1379
1379
  onClick: l[13] || (l[13] = () => u("taxes"))
1380
1380
  })
1381
1381
  ]),
1382
1382
  t("div", Yo, [
1383
- (m(!0), F(O, null, L((se = (ne = (le = o.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (d, k) => (m(), I(R, {
1383
+ (m(!0), C(O, null, L((se = (ne = (le = o.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (d, k) => (m(), R(K, {
1384
1384
  key: `tax-${k}`,
1385
1385
  modelValue: o.value.platform.mappings.taxes[k],
1386
1386
  "onUpdate:modelValue": (P) => o.value.platform.mappings.taxes[k] = P,
@@ -1391,7 +1391,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1391
1391
  removable: !0,
1392
1392
  onRemove: () => $("taxes", k)
1393
1393
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
1394
- (m(!0), F(O, null, L((me = (re = (ie = o.value) == null ? void 0 : ie.platform) == null ? void 0 : re.mappings) == null ? void 0 : me.taxRoundingAdjustments, (d, k) => (m(), I(R, {
1394
+ (m(!0), C(O, null, L((me = (re = (ie = o.value) == null ? void 0 : ie.platform) == null ? void 0 : re.mappings) == null ? void 0 : me.taxRoundingAdjustments, (d, k) => (m(), R(K, {
1395
1395
  key: `tax-rounding-adjustment-${k}`,
1396
1396
  modelValue: o.value.platform.mappings.taxRoundingAdjustments[k],
1397
1397
  "onUpdate:modelValue": (P) => o.value.platform.mappings.taxRoundingAdjustments[k] = P,
@@ -1404,18 +1404,18 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1404
1404
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1405
1405
  ]),
1406
1406
  t("div", zo, [
1407
- t("div", qo, U(p(_)("report.integration.payments")), 1),
1408
- i(r, {
1407
+ t("div", qo, D(p(_)("report.integration.payments")), 1),
1408
+ s(r, {
1409
1409
  variant: "primary",
1410
1410
  icon: "add",
1411
1411
  onClick: l[14] || (l[14] = () => u("payments"))
1412
1412
  })
1413
1413
  ]),
1414
- (m(!0), F(O, null, L((T = (de = (ce = o.value) == null ? void 0 : ce.platform) == null ? void 0 : de.mappings) == null ? void 0 : T.payments, (d, k) => (m(), F("div", {
1414
+ (m(!0), C(O, null, L((T = (de = (ce = o.value) == null ? void 0 : ce.platform) == null ? void 0 : de.mappings) == null ? void 0 : T.payments, (d, k) => (m(), C("div", {
1415
1415
  key: `payment-${k}`,
1416
1416
  class: "grid-cols-1 grid gap-x-16"
1417
1417
  }, [
1418
- i(R, {
1418
+ s(K, {
1419
1419
  modelValue: o.value.platform.mappings.payments[k],
1420
1420
  "onUpdate:modelValue": (P) => o.value.platform.mappings.payments[k] = P,
1421
1421
  options: {
@@ -1455,15 +1455,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1455
1455
  for (let n = 0; n < Math.max(u.form_items.length, y.length); n++) {
1456
1456
  const g = $ + n;
1457
1457
  c[g] || (c[g] = {});
1458
- const C = u.form_items[n];
1459
- C && (c[g] = {
1458
+ const U = u.form_items[n];
1459
+ U && (c[g] = {
1460
1460
  ...c[g],
1461
- itemDescription: C.description,
1462
- itemQuantity: C.quantity,
1463
- itemUnitPrice: C.unit_price,
1464
- itemAccount: C._account_name,
1465
- itemTaxCode: C._tax_code_name,
1466
- itemDiscount: C.discount
1461
+ itemDescription: U.description,
1462
+ itemQuantity: U.quantity,
1463
+ itemUnitPrice: U.unit_price,
1464
+ itemAccount: U._account_name,
1465
+ itemTaxCode: U._tax_code_name,
1466
+ itemDiscount: U.discount
1467
1467
  });
1468
1468
  const a = y[n];
1469
1469
  a && (c[g] = {
@@ -1477,29 +1477,29 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1477
1477
  }
1478
1478
  return c;
1479
1479
  }, [])
1480
- ), { t: s } = J(), V = [
1480
+ ), { t: i } = J(), w = [
1481
1481
  {
1482
1482
  accessorKey: "date",
1483
- header: () => A(
1483
+ header: () => I(
1484
1484
  "p",
1485
1485
  { class: "min-w-[90px] text-nowrap text-ellipsis" },
1486
- s("report.integration.table.date")
1486
+ i("report.integration.table.date")
1487
1487
  ),
1488
1488
  enableSorting: !1
1489
1489
  },
1490
1490
  {
1491
1491
  accessorKey: "no",
1492
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, s("report.integration.table.no")),
1492
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, i("report.integration.table.no")),
1493
1493
  enableSorting: !1
1494
1494
  },
1495
1495
  {
1496
1496
  accessorKey: "contact",
1497
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Contact"),
1497
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Contact"),
1498
1498
  enableSorting: !1
1499
1499
  },
1500
1500
  {
1501
1501
  accessorKey: "status",
1502
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Status"),
1502
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Status"),
1503
1503
  enableSorting: !1
1504
1504
  },
1505
1505
  {
@@ -1509,7 +1509,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1509
1509
  },
1510
1510
  {
1511
1511
  accessorKey: "itemDescription",
1512
- header: () => A("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
1512
+ header: () => I("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
1513
1513
  enableSorting: !1
1514
1514
  },
1515
1515
  {
@@ -1524,7 +1524,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1524
1524
  },
1525
1525
  {
1526
1526
  accessorKey: "itemAccount",
1527
- header: () => A("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
1527
+ header: () => I("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
1528
1528
  enableSorting: !1
1529
1529
  },
1530
1530
  {
@@ -1539,7 +1539,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1539
1539
  },
1540
1540
  {
1541
1541
  accessorKey: "paymentNo",
1542
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment No"),
1542
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment No"),
1543
1543
  enableSorting: !1
1544
1544
  },
1545
1545
  {
@@ -1562,15 +1562,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1562
1562
  header: "Payment Amount",
1563
1563
  enableSorting: !1
1564
1564
  }
1565
- ], w = X(f, "modelValue"), x = B(!1), D = ge(), { dateRange: b } = Ie(ve());
1565
+ ], V = X(f, "modelValue"), x = B(!1), F = ge(), { dateRange: b } = Ie(ve());
1566
1566
  xe(
1567
1567
  () => b.value,
1568
1568
  async () => {
1569
- if (w.value._id)
1569
+ if (V.value._id)
1570
1570
  try {
1571
- x.value = !0, o.value = await Te(w.value._id);
1571
+ x.value = !0, o.value = await Te(V.value._id);
1572
1572
  } catch (c) {
1573
- D.open({ message: c.message, type: "error" });
1573
+ F.open({ message: c.message, type: "error" });
1574
1574
  } finally {
1575
1575
  x.value = !1;
1576
1576
  }
@@ -1581,37 +1581,37 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1581
1581
  );
1582
1582
  async function _() {
1583
1583
  try {
1584
- w.value._id ? (x.value = !0, await Oe(w.value._id), D.open({ message: s("report.integration.uploadSuccess"), type: "success" })) : D.open({ message: s("report.integration.error.invalid"), type: "error" });
1584
+ V.value._id ? (x.value = !0, await Oe(V.value._id), F.open({ message: i("report.integration.uploadSuccess"), type: "success" })) : F.open({ message: i("report.integration.error.invalid"), type: "error" });
1585
1585
  } catch (c) {
1586
- D.open({ message: c.message, type: "error" });
1586
+ F.open({ message: c.message, type: "error" });
1587
1587
  } finally {
1588
1588
  x.value = !1;
1589
1589
  }
1590
1590
  }
1591
1591
  return (c, h) => {
1592
1592
  const $ = S("FmButton"), u = S("FmCircularProgress"), y = S("FmTable");
1593
- return m(), F("div", Xo, [
1593
+ return m(), C("div", Xo, [
1594
1594
  t("div", Go, [
1595
- i(Re, {
1595
+ s(Re, {
1596
1596
  "date-range": p(b),
1597
1597
  "onUpdate:dateRange": h[0] || (h[0] = (n) => Se(b) ? b.value = n : null),
1598
1598
  compare: !1
1599
1599
  }, null, 8, ["date-range"]),
1600
- i($, {
1600
+ s($, {
1601
1601
  loading: x.value,
1602
1602
  variant: "primary",
1603
- label: p(s)("report.common.upload"),
1603
+ label: p(i)("report.common.upload"),
1604
1604
  onClick: _
1605
1605
  }, null, 8, ["loading", "label"])
1606
1606
  ]),
1607
- x.value ? (m(), F("div", Qo, [
1608
- i(u, { size: "xl" }),
1609
- t("span", Jo, U(p(s)("report.integration.table.loading")), 1)
1610
- ])) : e.value.length > 0 ? (m(), I(y, {
1607
+ x.value ? (m(), C("div", Qo, [
1608
+ s(u, { size: "xl" }),
1609
+ t("span", Jo, D(p(i)("report.integration.table.loading")), 1)
1610
+ ])) : e.value.length > 0 ? (m(), R(y, {
1611
1611
  key: 1,
1612
1612
  class: "flex overflow-y-auto",
1613
1613
  "row-data": e.value,
1614
- "column-defs": V
1614
+ "column-defs": w
1615
1615
  }, null, 8, ["row-data"])) : M("", !0)
1616
1616
  ]);
1617
1617
  };
@@ -1624,7 +1624,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1624
1624
  },
1625
1625
  emits: ["update:modelValue"],
1626
1626
  setup(f) {
1627
- const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = [
1627
+ const { t: o } = J(), e = X(f, "modelValue"), i = B("setting"), w = [
1628
1628
  {
1629
1629
  label: o("report.integration.setting"),
1630
1630
  value: "setting",
@@ -1635,8 +1635,8 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1635
1635
  value: "preview",
1636
1636
  icon: "table"
1637
1637
  }
1638
- ], w = fe(), x = q(() => {
1639
- switch (s.value) {
1638
+ ], V = fe(), x = q(() => {
1639
+ switch (i.value) {
1640
1640
  case "preview":
1641
1641
  return Wo;
1642
1642
  case "setting":
@@ -1645,28 +1645,28 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1645
1645
  return null;
1646
1646
  }
1647
1647
  });
1648
- return (D, b) => {
1648
+ return (F, b) => {
1649
1649
  var h;
1650
1650
  const _ = S("FmPageHead"), c = S("FmTabs");
1651
- return m(), F("div", Zo, [
1652
- i(_, {
1651
+ return m(), C("div", Zo, [
1652
+ s(_, {
1653
1653
  title: ((h = e.value) == null ? void 0 : h.name) || "Bukku",
1654
1654
  "back-button": !0,
1655
1655
  style: { paddingLeft: "0px", paddingRight: "0px" },
1656
- "onClick:back": p(w).back
1656
+ "onClick:back": p(V).back
1657
1657
  }, {
1658
1658
  description: _e(() => b[2] || (b[2] = [
1659
1659
  t("div", null, null, -1)
1660
1660
  ])),
1661
1661
  _: 1
1662
1662
  }, 8, ["title", "onClick:back"]),
1663
- i(c, {
1664
- "model-value": s.value,
1665
- "onUpdate:modelValue": b[0] || (b[0] = ($) => s.value = $),
1666
- items: V
1663
+ s(c, {
1664
+ "model-value": i.value,
1665
+ "onUpdate:modelValue": b[0] || (b[0] = ($) => i.value = $),
1666
+ items: w
1667
1667
  }, null, 8, ["model-value"]),
1668
1668
  t("div", ea, [
1669
- (m(), I(we(x.value), {
1669
+ (m(), R(we(x.value), {
1670
1670
  modelValue: e.value,
1671
1671
  "onUpdate:modelValue": b[1] || (b[1] = ($) => e.value = $)
1672
1672
  }, null, 8, ["modelValue"]))
@@ -1685,34 +1685,34 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1685
1685
  },
1686
1686
  emits: ["update:modelValue"],
1687
1687
  setup(f) {
1688
- const { t: o } = J(), e = X(f, "modelValue"), s = ge(), V = Ve(), w = fe(), { promptLoader: x } = Ce(), { promptMessage: D } = Ae(), { restaurants: b } = ve(), _ = q(
1688
+ const { t: o } = J(), e = X(f, "modelValue"), i = ge(), w = Ve(), V = fe(), { promptLoader: x } = Ce(), { promptMessage: F } = Ae(), { restaurants: b } = ve(), _ = q(
1689
1689
  () => b.map((a) => ({ label: a.name, value: a.id }))
1690
1690
  );
1691
1691
  async function c() {
1692
- await D({
1692
+ await F({
1693
1693
  message: o("report.messages.confirmDelete", { name: e.value.name }),
1694
1694
  title: o("report.common.delete")
1695
1695
  }) && await x(async () => {
1696
1696
  try {
1697
- await Fe(e.value._id), await V.getSettings(), w.back();
1697
+ await Fe(e.value._id), await w.getSettings(), V.back();
1698
1698
  } catch (l) {
1699
- s.open({ type: "error", message: l.message });
1699
+ i.open({ type: "error", message: l.message });
1700
1700
  }
1701
1701
  });
1702
1702
  }
1703
1703
  async function h() {
1704
1704
  await x(async () => {
1705
1705
  try {
1706
- await De(e.value._id, e.value), await V.getSettings();
1706
+ await De(e.value._id, e.value), await w.getSettings();
1707
1707
  } catch (a) {
1708
- s.open({ type: "error", message: a.message });
1708
+ i.open({ type: "error", message: a.message });
1709
1709
  }
1710
1710
  });
1711
1711
  }
1712
1712
  function $(a, l) {
1713
1713
  var v, r;
1714
1714
  (r = (v = e.value.platform) == null ? void 0 : v.mappings) != null && r[a] && (e.value.platform.mappings[a] = e.value.platform.mappings[a].filter(
1715
- (K, N) => N !== l
1715
+ (N, A) => A !== l
1716
1716
  ));
1717
1717
  }
1718
1718
  function u(a) {
@@ -1756,39 +1756,39 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1756
1756
  account: { placeholder: a, editable: !0 }
1757
1757
  };
1758
1758
  }
1759
- async function C() {
1759
+ async function U() {
1760
1760
  await x(async () => {
1761
1761
  try {
1762
- await Ue(e.value._id), await V.getSettings();
1762
+ await Ue(e.value._id), await w.getSettings();
1763
1763
  } catch (a) {
1764
- s.open({ type: "error", message: a.message });
1764
+ i.open({ type: "error", message: a.message });
1765
1765
  }
1766
1766
  });
1767
1767
  }
1768
1768
  return $e(async () => {
1769
- await V.getSettings();
1769
+ await w.getSettings();
1770
1770
  }), (a, l) => {
1771
1771
  var Y, Q, j, E, z, ee, te, oe, ae, le, ne, se, ie, re, me, ce, de;
1772
- const v = S("FmIcon"), r = S("FmButton"), K = S("FmMenuDivider"), N = S("FmTextField"), G = S("FmSelect");
1773
- return (Q = (Y = e.value) == null ? void 0 : Y.platform) != null && Q.mappings ? (m(), F("div", oa, [
1772
+ const v = S("FmIcon"), r = S("FmButton"), N = S("FmMenuDivider"), A = S("FmTextField"), G = S("FmSelect");
1773
+ return (Q = (Y = e.value) == null ? void 0 : Y.platform) != null && Q.mappings ? (m(), C("div", oa, [
1774
1774
  t("div", aa, [
1775
1775
  t("div", la, [
1776
1776
  l[14] || (l[14] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
1777
1777
  t("div", na, [
1778
1778
  t("div", sa, [
1779
- i(v, {
1779
+ s(v, {
1780
1780
  name: "refresh",
1781
1781
  class: "p-2 bg-gray-100 rounded-full",
1782
- onClick: C
1782
+ onClick: U
1783
1783
  }),
1784
- t("span", ia, U(p(o)("report.integration.refreshSetting")), 1)
1784
+ t("span", ia, D(p(o)("report.integration.refreshSetting")), 1)
1785
1785
  ]),
1786
- i(r, {
1786
+ s(r, {
1787
1787
  variant: "tertiary",
1788
1788
  label: p(o)("report.common.remove"),
1789
1789
  onClick: c
1790
1790
  }, null, 8, ["label"]),
1791
- i(r, {
1791
+ s(r, {
1792
1792
  variant: "primary",
1793
1793
  label: p(o)("report.common.update"),
1794
1794
  onClick: h
@@ -1796,22 +1796,22 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1796
1796
  ])
1797
1797
  ])
1798
1798
  ]),
1799
- i(K, { style: { margin: 0 } }),
1799
+ s(N, { style: { margin: 0 } }),
1800
1800
  t("div", ra, [
1801
1801
  t("div", ma, [
1802
- t("div", ca, U(p(o)("report.integration.general")), 1),
1802
+ t("div", ca, D(p(o)("report.integration.general")), 1),
1803
1803
  t("div", da, [
1804
- t("div", ua, U(p(o)("report.common.name")), 1),
1804
+ t("div", ua, D(p(o)("report.common.name")), 1),
1805
1805
  t("div", pa, [
1806
- i(N, {
1806
+ s(A, {
1807
1807
  modelValue: e.value.name,
1808
1808
  "onUpdate:modelValue": l[0] || (l[0] = (T) => e.value.name = T)
1809
1809
  }, null, 8, ["modelValue"])
1810
1810
  ])
1811
1811
  ]),
1812
1812
  t("div", fa, [
1813
- t("div", va, U(p(o)("report.integration.location")), 1),
1814
- i(G, {
1813
+ t("div", va, D(p(o)("report.integration.location")), 1),
1814
+ s(G, {
1815
1815
  modelValue: e.value.platform.locationIds,
1816
1816
  "onUpdate:modelValue": l[1] || (l[1] = (T) => e.value.platform.locationIds = T),
1817
1817
  multiselect: !0,
@@ -1822,8 +1822,8 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1822
1822
  }, null, 8, ["modelValue", "items", "rules"])
1823
1823
  ]),
1824
1824
  t("div", ga, [
1825
- t("div", ya, U(p(o)("report.integration.grouping.title")), 1),
1826
- i(G, {
1825
+ t("div", ya, D(p(o)("report.integration.grouping.title")), 1),
1826
+ s(G, {
1827
1827
  modelValue: e.value.platform.grouping,
1828
1828
  "onUpdate:modelValue": l[2] || (l[2] = (T) => e.value.platform.grouping = T),
1829
1829
  multiselect: !1,
@@ -1835,17 +1835,17 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1835
1835
  ]),
1836
1836
  t("div", xa, [
1837
1837
  t("div", _a, [
1838
- i(R, {
1838
+ s(K, {
1839
1839
  "model-value": { key: "Project", account: e.value.platform.mappings.project },
1840
1840
  options: g("Project"),
1841
1841
  "onUpdate:modelValue": l[3] || (l[3] = (T) => n({ key: "project", value: T.account }))
1842
1842
  }, null, 8, ["model-value", "options"]),
1843
- i(R, {
1843
+ s(K, {
1844
1844
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
1845
1845
  options: g("Debtor"),
1846
1846
  "onUpdate:modelValue": l[4] || (l[4] = (T) => n({ key: "debtor", value: T.account }))
1847
1847
  }, null, 8, ["model-value", "options"]),
1848
- i(R, {
1848
+ s(K, {
1849
1849
  "model-value": {
1850
1850
  key: "Rounding",
1851
1851
  account: e.value.platform.mappings.rounding.account
@@ -1856,7 +1856,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1856
1856
  (P = (k = (d = e.value) == null ? void 0 : d.platform) == null ? void 0 : k.mappings) != null && P.rounding && (e.value.platform.mappings.rounding.account = T.account);
1857
1857
  })
1858
1858
  }, null, 8, ["model-value", "options"]),
1859
- (m(!0), F(O, null, L((z = (E = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : z.charges, (T, d) => (m(), I(R, {
1859
+ (m(!0), C(O, null, L((z = (E = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : z.charges, (T, d) => (m(), R(K, {
1860
1860
  key: `charge-${d}`,
1861
1861
  modelValue: e.value.platform.mappings.charges[d],
1862
1862
  "onUpdate:modelValue": (k) => e.value.platform.mappings.charges[d] = k,
@@ -1869,11 +1869,11 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1869
1869
  ]),
1870
1870
  t("div", ba, [
1871
1871
  t("div", ha, [
1872
- t("div", wa, U(p(o)("report.integration.refNumFormat")), 1),
1873
- i(Pe)
1872
+ t("div", wa, D(p(o)("report.integration.refNumFormat")), 1),
1873
+ s(Pe)
1874
1874
  ]),
1875
1875
  t("div", Va, [
1876
- i(R, {
1876
+ s(K, {
1877
1877
  "model-value": {
1878
1878
  key: "Invoice no",
1879
1879
  account: e.value.platform.mappings.invoiceDocNo
@@ -1881,7 +1881,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1881
1881
  options: g("Invoice no"),
1882
1882
  "onUpdate:modelValue": l[6] || (l[6] = (T) => n({ key: "invoiceDocNo", value: T.account }))
1883
1883
  }, null, 8, ["model-value", "options"]),
1884
- i(R, {
1884
+ s(K, {
1885
1885
  "model-value": {
1886
1886
  key: "Credit note no",
1887
1887
  account: e.value.platform.mappings.creditNoteDocNo
@@ -1889,7 +1889,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1889
1889
  options: g("Credit note no"),
1890
1890
  "onUpdate:modelValue": l[7] || (l[7] = (T) => n({ key: "creditNoteDocNo", value: T.account }))
1891
1891
  }, null, 8, ["model-value", "options"]),
1892
- i(R, {
1892
+ s(K, {
1893
1893
  "model-value": {
1894
1894
  key: "Payment no",
1895
1895
  account: e.value.platform.mappings.paymentDocNo
@@ -1897,7 +1897,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1897
1897
  options: g("Payment no"),
1898
1898
  "onUpdate:modelValue": l[8] || (l[8] = (T) => n({ key: "paymentDocNo", value: T.account }))
1899
1899
  }, null, 8, ["model-value", "options"]),
1900
- i(R, {
1900
+ s(K, {
1901
1901
  "model-value": {
1902
1902
  key: "Refund no",
1903
1903
  account: e.value.platform.mappings.refundDocNo
@@ -1907,21 +1907,21 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1907
1907
  }, null, 8, ["model-value", "options"])
1908
1908
  ])
1909
1909
  ]),
1910
- i(Ne, {
1910
+ s(Ne, {
1911
1911
  modelValue: e.value.platform,
1912
1912
  "onUpdate:modelValue": l[10] || (l[10] = (T) => e.value.platform = T),
1913
1913
  label: p(o)("report.input.email")
1914
1914
  }, null, 8, ["modelValue", "label"]),
1915
1915
  t("div", ka, [
1916
- t("div", $a, U(p(o)("report.integration.items")), 1),
1917
- i(r, {
1916
+ t("div", $a, D(p(o)("report.integration.items")), 1),
1917
+ s(r, {
1918
1918
  variant: "primary",
1919
1919
  icon: "add",
1920
1920
  onClick: l[11] || (l[11] = () => u("items"))
1921
1921
  })
1922
1922
  ]),
1923
1923
  t("div", Sa, [
1924
- (m(!0), F(O, null, L((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, (T, d) => (m(), I(R, {
1924
+ (m(!0), C(O, null, L((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, (T, d) => (m(), R(K, {
1925
1925
  key: `item-${d}`,
1926
1926
  modelValue: e.value.platform.mappings.items[d],
1927
1927
  "onUpdate:modelValue": (k) => e.value.platform.mappings.items[d] = k,
@@ -1934,15 +1934,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1934
1934
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1935
1935
  ]),
1936
1936
  t("div", Ca, [
1937
- t("div", Fa, U(p(o)("report.integration.taxes")), 1),
1938
- i(r, {
1937
+ t("div", Fa, D(p(o)("report.integration.taxes")), 1),
1938
+ s(r, {
1939
1939
  variant: "primary",
1940
1940
  icon: "add",
1941
1941
  onClick: l[12] || (l[12] = () => u("taxes"))
1942
1942
  })
1943
1943
  ]),
1944
1944
  t("div", Da, [
1945
- (m(!0), F(O, null, L((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, (T, d) => (m(), I(R, {
1945
+ (m(!0), C(O, null, L((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, (T, d) => (m(), R(K, {
1946
1946
  key: `tax-${d}`,
1947
1947
  modelValue: e.value.platform.mappings.taxes[d],
1948
1948
  "onUpdate:modelValue": (k) => e.value.platform.mappings.taxes[d] = k,
@@ -1953,7 +1953,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1953
1953
  removable: !0,
1954
1954
  onRemove: () => $("taxes", d)
1955
1955
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
1956
- (m(!0), F(O, null, L((re = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : re.taxRoundingAdjustments, (T, d) => (m(), I(R, {
1956
+ (m(!0), C(O, null, L((re = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : re.taxRoundingAdjustments, (T, d) => (m(), R(K, {
1957
1957
  key: `tax-rounding-adjustment-${d}`,
1958
1958
  modelValue: e.value.platform.mappings.taxRoundingAdjustments[d],
1959
1959
  "onUpdate:modelValue": (k) => e.value.platform.mappings.taxRoundingAdjustments[d] = k,
@@ -1966,15 +1966,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
1966
1966
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
1967
1967
  ]),
1968
1968
  t("div", Ua, [
1969
- t("div", Ta, U(p(o)("report.integration.payments")), 1),
1970
- i(r, {
1969
+ t("div", Ta, D(p(o)("report.integration.payments")), 1),
1970
+ s(r, {
1971
1971
  variant: "primary",
1972
1972
  icon: "add",
1973
1973
  onClick: l[13] || (l[13] = () => u("payments"))
1974
1974
  })
1975
1975
  ]),
1976
1976
  t("div", Aa, [
1977
- (m(!0), F(O, null, L((de = (ce = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ce.mappings) == null ? void 0 : de.payments, (T, d) => (m(), I(R, {
1977
+ (m(!0), C(O, null, L((de = (ce = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ce.mappings) == null ? void 0 : de.payments, (T, d) => (m(), R(K, {
1978
1978
  key: `payment-${d}`,
1979
1979
  modelValue: e.value.platform.mappings.payments[d],
1980
1980
  "onUpdate:modelValue": (k) => e.value.platform.mappings.payments[d] = k,
@@ -2001,7 +2001,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2001
2001
  },
2002
2002
  emits: ["update:modelValue"],
2003
2003
  setup(f) {
2004
- const { t: o } = J(), e = B([]), s = q(
2004
+ const { t: o } = J(), e = B([]), i = q(
2005
2005
  () => e.value.reduce((c, h) => {
2006
2006
  const $ = c.length, { invoice: u, payments: y } = h;
2007
2007
  c[$] = {
@@ -2030,25 +2030,25 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2030
2030
  }
2031
2031
  return c;
2032
2032
  }, [])
2033
- ), V = [
2033
+ ), w = [
2034
2034
  {
2035
2035
  accessorKey: "date",
2036
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
2036
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
2037
2037
  enableSorting: !1
2038
2038
  },
2039
2039
  {
2040
2040
  accessorKey: "docNo",
2041
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Doc No"),
2041
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Doc No"),
2042
2042
  enableSorting: !1
2043
2043
  },
2044
2044
  {
2045
2045
  accessorKey: "projNo",
2046
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Project"),
2046
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Project"),
2047
2047
  enableSorting: !1
2048
2048
  },
2049
2049
  {
2050
2050
  accessorKey: "debtor",
2051
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Debtor"),
2051
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Debtor"),
2052
2052
  enableSorting: !1
2053
2053
  },
2054
2054
  {
@@ -2058,7 +2058,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2058
2058
  },
2059
2059
  {
2060
2060
  accessorKey: "itemAccount",
2061
- header: () => A("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
2061
+ header: () => I("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
2062
2062
  enableSorting: !1
2063
2063
  },
2064
2064
  {
@@ -2068,7 +2068,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2068
2068
  },
2069
2069
  {
2070
2070
  accessorKey: "itemDescription",
2071
- header: () => A("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
2071
+ header: () => I("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
2072
2072
  enableSorting: !1
2073
2073
  },
2074
2074
  {
@@ -2101,15 +2101,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2101
2101
  header: "Payment Amount",
2102
2102
  enableSorting: !1
2103
2103
  }
2104
- ], w = X(f, "modelValue"), x = B(!1), D = ge(), { dateRange: b } = Ie(ve());
2104
+ ], V = X(f, "modelValue"), x = B(!1), F = ge(), { dateRange: b } = Ie(ve());
2105
2105
  xe(
2106
2106
  () => b.value,
2107
2107
  async () => {
2108
- if (w.value._id)
2108
+ if (V.value._id)
2109
2109
  try {
2110
- x.value = !0, e.value = await Te(w.value._id);
2110
+ x.value = !0, e.value = await Te(V.value._id);
2111
2111
  } catch (c) {
2112
- D.open({ message: c.message, type: "error" });
2112
+ F.open({ message: c.message, type: "error" });
2113
2113
  } finally {
2114
2114
  x.value = !1;
2115
2115
  }
@@ -2120,37 +2120,37 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2120
2120
  );
2121
2121
  async function _() {
2122
2122
  try {
2123
- w.value._id ? (x.value = !0, await Be(w.value._id)) : D.open({ message: "Invalid accounting setting", type: "error" });
2123
+ V.value._id ? (x.value = !0, await Be(V.value._id)) : F.open({ message: "Invalid accounting setting", type: "error" });
2124
2124
  } catch (c) {
2125
- D.open({ message: c.message, type: "error" });
2125
+ F.open({ message: c.message, type: "error" });
2126
2126
  } finally {
2127
2127
  x.value = !1;
2128
2128
  }
2129
2129
  }
2130
2130
  return (c, h) => {
2131
2131
  const $ = S("FmButton"), u = S("FmCircularProgress"), y = S("FmTable");
2132
- return m(), F("div", Ra, [
2132
+ return m(), C("div", Ra, [
2133
2133
  t("div", Na, [
2134
- i(Re, {
2134
+ s(Re, {
2135
2135
  "date-range": p(b),
2136
2136
  "onUpdate:dateRange": h[0] || (h[0] = (n) => Se(b) ? b.value = n : null),
2137
2137
  compare: !1
2138
2138
  }, null, 8, ["date-range"]),
2139
- i($, {
2139
+ s($, {
2140
2140
  loading: x.value,
2141
2141
  variant: "primary",
2142
2142
  label: p(o)("report.common.download"),
2143
2143
  onClick: _
2144
2144
  }, null, 8, ["loading", "label"])
2145
2145
  ]),
2146
- x.value ? (m(), F("div", Ka, [
2147
- i(u, { size: "xl" }),
2148
- t("span", Ma, U(p(o)("report.common.isLoading")), 1)
2149
- ])) : s.value.length > 0 ? (m(), I(y, {
2146
+ x.value ? (m(), C("div", Ka, [
2147
+ s(u, { size: "xl" }),
2148
+ t("span", Ma, D(p(o)("report.common.isLoading")), 1)
2149
+ ])) : i.value.length > 0 ? (m(), R(y, {
2150
2150
  key: 1,
2151
2151
  class: "flex overflow-y-auto",
2152
- "row-data": s.value,
2153
- "column-defs": V
2152
+ "row-data": i.value,
2153
+ "column-defs": w
2154
2154
  }, null, 8, ["row-data"])) : M("", !0)
2155
2155
  ]);
2156
2156
  };
@@ -2163,7 +2163,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2163
2163
  },
2164
2164
  emits: ["update:modelValue"],
2165
2165
  setup(f) {
2166
- const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = [
2166
+ const { t: o } = J(), e = X(f, "modelValue"), i = B("setting"), w = [
2167
2167
  {
2168
2168
  label: o("report.integration.setting"),
2169
2169
  value: "setting",
@@ -2174,8 +2174,8 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2174
2174
  value: "preview",
2175
2175
  icon: "table"
2176
2176
  }
2177
- ], w = fe(), x = q(() => {
2178
- switch (s.value) {
2177
+ ], V = fe(), x = q(() => {
2178
+ switch (i.value) {
2179
2179
  case "preview":
2180
2180
  return Pa;
2181
2181
  case "setting":
@@ -2184,28 +2184,28 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2184
2184
  return null;
2185
2185
  }
2186
2186
  });
2187
- return (D, b) => {
2187
+ return (F, b) => {
2188
2188
  var h;
2189
2189
  const _ = S("FmPageHead"), c = S("FmTabs");
2190
- return m(), F("div", ja, [
2191
- i(_, {
2190
+ return m(), C("div", ja, [
2191
+ s(_, {
2192
2192
  title: ((h = e.value) == null ? void 0 : h.name) || "AutoCount",
2193
2193
  "back-button": !0,
2194
2194
  style: { paddingLeft: "0px", paddingRight: "0px" },
2195
- "onClick:back": p(w).back
2195
+ "onClick:back": p(V).back
2196
2196
  }, {
2197
2197
  description: _e(() => b[2] || (b[2] = [
2198
2198
  t("div", null, null, -1)
2199
2199
  ])),
2200
2200
  _: 1
2201
2201
  }, 8, ["title", "onClick:back"]),
2202
- i(c, {
2203
- "model-value": s.value,
2204
- "onUpdate:modelValue": b[0] || (b[0] = ($) => s.value = $),
2205
- items: V
2202
+ s(c, {
2203
+ "model-value": i.value,
2204
+ "onUpdate:modelValue": b[0] || (b[0] = ($) => i.value = $),
2205
+ items: w
2206
2206
  }, null, 8, ["model-value"]),
2207
2207
  t("div", Oa, [
2208
- (m(), I(we(x.value), {
2208
+ (m(), R(we(x.value), {
2209
2209
  modelValue: e.value,
2210
2210
  "onUpdate:modelValue": b[1] || (b[1] = ($) => e.value = $)
2211
2211
  }, null, 8, ["modelValue"]))
@@ -2224,34 +2224,34 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2224
2224
  },
2225
2225
  emits: ["update:modelValue"],
2226
2226
  setup(f) {
2227
- const { t: o } = J(), e = X(f, "modelValue"), s = ge(), V = Ve(), w = fe(), { promptLoader: x } = Ce(), { promptMessage: D } = Ae(), { restaurants: b } = ve(), _ = q(
2227
+ const { t: o } = J(), e = X(f, "modelValue"), i = ge(), w = Ve(), V = fe(), { promptLoader: x } = Ce(), { promptMessage: F } = Ae(), { restaurants: b } = ve(), _ = q(
2228
2228
  () => b.map((a) => ({ label: a.name, value: a.id }))
2229
2229
  );
2230
2230
  async function c() {
2231
- await D({
2231
+ await F({
2232
2232
  message: o("report.messages.confirmDelete", { name: e.value.name }),
2233
2233
  title: o("report.common.delete")
2234
2234
  }) && await x(async () => {
2235
2235
  try {
2236
- await Fe(e.value._id), await V.getSettings(), w.back();
2236
+ await Fe(e.value._id), await w.getSettings(), V.back();
2237
2237
  } catch (l) {
2238
- s.open({ type: "error", message: l.message });
2238
+ i.open({ type: "error", message: l.message });
2239
2239
  }
2240
2240
  });
2241
2241
  }
2242
2242
  async function h() {
2243
2243
  await x(async () => {
2244
2244
  try {
2245
- await De(e.value._id, e.value), await V.getSettings();
2245
+ await De(e.value._id, e.value), await w.getSettings();
2246
2246
  } catch (a) {
2247
- s.open({ type: "error", message: a.message });
2247
+ i.open({ type: "error", message: a.message });
2248
2248
  }
2249
2249
  });
2250
2250
  }
2251
2251
  function $(a, l) {
2252
2252
  var v, r;
2253
2253
  (r = (v = e.value.platform) == null ? void 0 : v.mappings) != null && r[a] && (e.value.platform.mappings[a] = e.value.platform.mappings[a].filter(
2254
- (K, N) => N !== l
2254
+ (N, A) => A !== l
2255
2255
  ));
2256
2256
  }
2257
2257
  function u(a) {
@@ -2296,39 +2296,39 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2296
2296
  account: { placeholder: a, editable: !0 }
2297
2297
  };
2298
2298
  }
2299
- async function C() {
2299
+ async function U() {
2300
2300
  await x(async () => {
2301
2301
  try {
2302
- await Ue(e.value._id), await V.getSettings();
2302
+ await Ue(e.value._id), await w.getSettings();
2303
2303
  } catch (a) {
2304
- s.open({ type: "error", message: a.message });
2304
+ i.open({ type: "error", message: a.message });
2305
2305
  }
2306
2306
  });
2307
2307
  }
2308
2308
  return $e(async () => {
2309
- await V.getSettings();
2309
+ await w.getSettings();
2310
2310
  }), (a, l) => {
2311
2311
  var Y, Q, j, E, z, ee, te, oe, ae, le, ne, se, ie, re, me, ce, de;
2312
- const v = S("FmIcon"), r = S("FmButton"), K = S("FmMenuDivider"), N = S("FmTextField"), G = S("FmSelect");
2313
- return (Q = (Y = e.value) == null ? void 0 : Y.platform) != null && Q.mappings ? (m(), F("div", La, [
2312
+ const v = S("FmIcon"), r = S("FmButton"), N = S("FmMenuDivider"), A = S("FmTextField"), G = S("FmSelect");
2313
+ return (Q = (Y = e.value) == null ? void 0 : Y.platform) != null && Q.mappings ? (m(), C("div", La, [
2314
2314
  t("div", Ea, [
2315
2315
  t("div", Ya, [
2316
2316
  l[15] || (l[15] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
2317
2317
  t("div", za, [
2318
2318
  t("div", qa, [
2319
- i(v, {
2319
+ s(v, {
2320
2320
  name: "refresh",
2321
2321
  class: "p-2 bg-gray-100 rounded-full",
2322
- onClick: C
2322
+ onClick: U
2323
2323
  }),
2324
- t("span", Ha, U(p(o)("report.integration.refreshSetting")), 1)
2324
+ t("span", Ha, D(p(o)("report.integration.refreshSetting")), 1)
2325
2325
  ]),
2326
- i(r, {
2326
+ s(r, {
2327
2327
  variant: "tertiary",
2328
2328
  label: p(o)("report.common.delete"),
2329
2329
  onClick: c
2330
2330
  }, null, 8, ["label"]),
2331
- i(r, {
2331
+ s(r, {
2332
2332
  variant: "primary",
2333
2333
  label: p(o)("report.common.update"),
2334
2334
  onClick: h
@@ -2336,22 +2336,22 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2336
2336
  ])
2337
2337
  ])
2338
2338
  ]),
2339
- i(K, { style: { margin: 0 } }),
2339
+ s(N, { style: { margin: 0 } }),
2340
2340
  t("div", Xa, [
2341
2341
  t("div", Ga, [
2342
- t("div", Qa, U(p(o)("report.integration.general")), 1),
2342
+ t("div", Qa, D(p(o)("report.integration.general")), 1),
2343
2343
  t("div", Ja, [
2344
- t("div", Wa, U(p(o)("report.common.name")), 1),
2344
+ t("div", Wa, D(p(o)("report.common.name")), 1),
2345
2345
  t("div", Za, [
2346
- i(N, {
2346
+ s(A, {
2347
2347
  modelValue: e.value.name,
2348
2348
  "onUpdate:modelValue": l[0] || (l[0] = (T) => e.value.name = T)
2349
2349
  }, null, 8, ["modelValue"])
2350
2350
  ])
2351
2351
  ]),
2352
2352
  t("div", el, [
2353
- t("div", tl, U(p(o)("report.integration.location")), 1),
2354
- i(G, {
2353
+ t("div", tl, D(p(o)("report.integration.location")), 1),
2354
+ s(G, {
2355
2355
  modelValue: e.value.platform.locationIds,
2356
2356
  "onUpdate:modelValue": l[1] || (l[1] = (T) => e.value.platform.locationIds = T),
2357
2357
  multiselect: !0,
@@ -2362,8 +2362,8 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2362
2362
  }, null, 8, ["modelValue", "items", "rules"])
2363
2363
  ]),
2364
2364
  t("div", ol, [
2365
- t("div", al, U(p(o)("report.integration.grouping.title")), 1),
2366
- i(G, {
2365
+ t("div", al, D(p(o)("report.integration.grouping.title")), 1),
2366
+ s(G, {
2367
2367
  modelValue: e.value.platform.grouping,
2368
2368
  "onUpdate:modelValue": l[2] || (l[2] = (T) => e.value.platform.grouping = T),
2369
2369
  multiselect: !1,
@@ -2375,12 +2375,12 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2375
2375
  ]),
2376
2376
  t("div", ll, [
2377
2377
  t("div", nl, [
2378
- i(R, {
2378
+ s(K, {
2379
2379
  "model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
2380
2380
  options: g("Debtor"),
2381
2381
  "onUpdate:modelValue": l[3] || (l[3] = (T) => n({ key: "debtor", value: T.account }))
2382
2382
  }, null, 8, ["model-value", "options"]),
2383
- i(R, {
2383
+ s(K, {
2384
2384
  "model-value": {
2385
2385
  key: "Project header",
2386
2386
  account: e.value.platform.mappings.projectHeader
@@ -2388,7 +2388,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2388
2388
  options: g("Project header"),
2389
2389
  "onUpdate:modelValue": l[4] || (l[4] = (T) => n({ key: "projectHeader", value: T.account }))
2390
2390
  }, null, 8, ["model-value", "options"]),
2391
- i(R, {
2391
+ s(K, {
2392
2392
  "model-value": {
2393
2393
  key: "Project detail",
2394
2394
  account: e.value.platform.mappings.projectDetail
@@ -2398,7 +2398,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2398
2398
  }, null, 8, ["model-value", "options"])
2399
2399
  ]),
2400
2400
  t("div", sl, [
2401
- i(R, {
2401
+ s(K, {
2402
2402
  "model-value": {
2403
2403
  key: "Rounding",
2404
2404
  account: e.value.platform.mappings.rounding.account,
@@ -2414,7 +2414,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2414
2414
  (P = (k = (d = e.value) == null ? void 0 : d.platform) == null ? void 0 : k.mappings) != null && P.rounding && (e.value.platform.mappings.rounding.account = T.account, e.value.platform.mappings.rounding.code = T.code);
2415
2415
  })
2416
2416
  }, null, 8, ["model-value"]),
2417
- (m(!0), F(O, null, L((z = (E = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : z.charges, (T, d) => (m(), I(R, {
2417
+ (m(!0), C(O, null, L((z = (E = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : z.charges, (T, d) => (m(), R(K, {
2418
2418
  key: `charge-${d}`,
2419
2419
  modelValue: e.value.platform.mappings.charges[d],
2420
2420
  "onUpdate:modelValue": (k) => e.value.platform.mappings.charges[d] = k,
@@ -2428,11 +2428,11 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2428
2428
  ]),
2429
2429
  t("div", il, [
2430
2430
  t("div", rl, [
2431
- t("div", ml, U(p(o)("report.integration.refNumFormat")), 1),
2432
- i(Pe)
2431
+ t("div", ml, D(p(o)("report.integration.refNumFormat")), 1),
2432
+ s(Pe)
2433
2433
  ]),
2434
2434
  t("div", cl, [
2435
- i(R, {
2435
+ s(K, {
2436
2436
  "model-value": {
2437
2437
  key: "Invoice no",
2438
2438
  account: e.value.platform.mappings.invoiceDocNo
@@ -2440,7 +2440,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2440
2440
  options: g("Invoice no"),
2441
2441
  "onUpdate:modelValue": l[7] || (l[7] = (T) => n({ key: "invoiceDocNo", value: T.account }))
2442
2442
  }, null, 8, ["model-value", "options"]),
2443
- i(R, {
2443
+ s(K, {
2444
2444
  "model-value": {
2445
2445
  key: "Credit note no",
2446
2446
  account: e.value.platform.mappings.creditNoteDocNo
@@ -2448,7 +2448,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2448
2448
  options: g("Credit note no"),
2449
2449
  "onUpdate:modelValue": l[8] || (l[8] = (T) => n({ key: "creditNoteDocNo", value: T.account }))
2450
2450
  }, null, 8, ["model-value", "options"]),
2451
- i(R, {
2451
+ s(K, {
2452
2452
  "model-value": {
2453
2453
  key: "Payment no",
2454
2454
  account: e.value.platform.mappings.paymentDocNo
@@ -2456,7 +2456,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2456
2456
  options: g("Payment no"),
2457
2457
  "onUpdate:modelValue": l[9] || (l[9] = (T) => n({ key: "paymentDocNo", value: T.account }))
2458
2458
  }, null, 8, ["model-value", "options"]),
2459
- i(R, {
2459
+ s(K, {
2460
2460
  "model-value": {
2461
2461
  key: "Refund no",
2462
2462
  account: e.value.platform.mappings.refundDocNo
@@ -2466,21 +2466,21 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2466
2466
  }, null, 8, ["model-value", "options"])
2467
2467
  ])
2468
2468
  ]),
2469
- i(Ne, {
2469
+ s(Ne, {
2470
2470
  modelValue: e.value.platform,
2471
2471
  "onUpdate:modelValue": l[11] || (l[11] = (T) => e.value.platform = T),
2472
2472
  label: "email"
2473
2473
  }, null, 8, ["modelValue"]),
2474
2474
  t("div", dl, [
2475
- t("div", ul, U(p(o)("report.integration.items")), 1),
2476
- i(r, {
2475
+ t("div", ul, D(p(o)("report.integration.items")), 1),
2476
+ s(r, {
2477
2477
  variant: "primary",
2478
2478
  icon: "add",
2479
2479
  onClick: l[12] || (l[12] = () => u("items"))
2480
2480
  })
2481
2481
  ]),
2482
2482
  t("div", pl, [
2483
- (m(!0), F(O, null, L((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, (T, d) => (m(), I(R, {
2483
+ (m(!0), C(O, null, L((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, (T, d) => (m(), R(K, {
2484
2484
  key: `item-${d}`,
2485
2485
  modelValue: e.value.platform.mappings.items[d],
2486
2486
  "onUpdate:modelValue": (k) => e.value.platform.mappings.items[d] = k,
@@ -2494,15 +2494,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2494
2494
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2495
2495
  ]),
2496
2496
  t("div", fl, [
2497
- t("div", vl, U(p(o)("report.integration.taxes")), 1),
2498
- i(r, {
2497
+ t("div", vl, D(p(o)("report.integration.taxes")), 1),
2498
+ s(r, {
2499
2499
  variant: "primary",
2500
2500
  icon: "add",
2501
2501
  onClick: l[13] || (l[13] = () => u("taxes"))
2502
2502
  })
2503
2503
  ]),
2504
2504
  t("div", gl, [
2505
- (m(!0), F(O, null, L((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, (T, d) => (m(), I(R, {
2505
+ (m(!0), C(O, null, L((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, (T, d) => (m(), R(K, {
2506
2506
  key: `tax-${d}`,
2507
2507
  modelValue: e.value.platform.mappings.taxes[d],
2508
2508
  "onUpdate:modelValue": (k) => e.value.platform.mappings.taxes[d] = k,
@@ -2513,7 +2513,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2513
2513
  removable: !0,
2514
2514
  onRemove: () => $("taxes", d)
2515
2515
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
2516
- (m(!0), F(O, null, L((re = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : re.taxRoundingAdjustments, (T, d) => (m(), I(R, {
2516
+ (m(!0), C(O, null, L((re = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : re.taxRoundingAdjustments, (T, d) => (m(), R(K, {
2517
2517
  key: `tax-rounding-adjustment-${d}`,
2518
2518
  modelValue: e.value.platform.mappings.taxRoundingAdjustments[d],
2519
2519
  "onUpdate:modelValue": (k) => e.value.platform.mappings.taxRoundingAdjustments[d] = k,
@@ -2526,15 +2526,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2526
2526
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
2527
2527
  ]),
2528
2528
  t("div", yl, [
2529
- t("div", xl, U(p(o)("report.integration.payments")), 1),
2530
- i(r, {
2529
+ t("div", xl, D(p(o)("report.integration.payments")), 1),
2530
+ s(r, {
2531
2531
  variant: "primary",
2532
2532
  icon: "add",
2533
2533
  onClick: l[14] || (l[14] = () => u("payments"))
2534
2534
  })
2535
2535
  ]),
2536
2536
  t("div", _l, [
2537
- (m(!0), F(O, null, L((de = (ce = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ce.mappings) == null ? void 0 : de.payments, (T, d) => (m(), I(R, {
2537
+ (m(!0), C(O, null, L((de = (ce = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ce.mappings) == null ? void 0 : de.payments, (T, d) => (m(), R(K, {
2538
2538
  key: `payment-${d}`,
2539
2539
  modelValue: e.value.platform.mappings.payments[d],
2540
2540
  "onUpdate:modelValue": (k) => e.value.platform.mappings.payments[d] = k,
@@ -2561,7 +2561,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2561
2561
  },
2562
2562
  emits: ["update:modelValue"],
2563
2563
  setup(f) {
2564
- const { t: o } = J(), e = B([]), s = q(
2564
+ const { t: o } = J(), e = B([]), i = q(
2565
2565
  () => e.value.reduce((c, h) => {
2566
2566
  const $ = c.length, { invoice: u, payments: y } = h;
2567
2567
  c[$] = {
@@ -2590,20 +2590,20 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2590
2590
  }
2591
2591
  return c;
2592
2592
  }, [])
2593
- ), V = [
2593
+ ), w = [
2594
2594
  {
2595
2595
  accessorKey: "date",
2596
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
2596
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
2597
2597
  enableSorting: !1
2598
2598
  },
2599
2599
  {
2600
2600
  accessorKey: "docNo",
2601
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Doc No"),
2601
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Doc No"),
2602
2602
  enableSorting: !1
2603
2603
  },
2604
2604
  {
2605
2605
  accessorKey: "debtor",
2606
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Debtor"),
2606
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Debtor"),
2607
2607
  enableSorting: !1
2608
2608
  },
2609
2609
  {
@@ -2613,7 +2613,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2613
2613
  },
2614
2614
  {
2615
2615
  accessorKey: "itemAccount",
2616
- header: () => A("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
2616
+ header: () => I("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
2617
2617
  enableSorting: !1
2618
2618
  },
2619
2619
  {
@@ -2623,7 +2623,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2623
2623
  },
2624
2624
  {
2625
2625
  accessorKey: "itemDescription",
2626
- header: () => A("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
2626
+ header: () => I("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
2627
2627
  enableSorting: !1
2628
2628
  },
2629
2629
  {
@@ -2656,15 +2656,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2656
2656
  header: "Payment Amount",
2657
2657
  enableSorting: !1
2658
2658
  }
2659
- ], w = X(f, "modelValue"), x = B(!1), D = ge(), { dateRange: b } = Ie(ve());
2659
+ ], V = X(f, "modelValue"), x = B(!1), F = ge(), { dateRange: b } = Ie(ve());
2660
2660
  xe(
2661
2661
  () => b.value,
2662
2662
  async () => {
2663
- if (w.value._id)
2663
+ if (V.value._id)
2664
2664
  try {
2665
- x.value = !0, e.value = await Te(w.value._id);
2665
+ x.value = !0, e.value = await Te(V.value._id);
2666
2666
  } catch (c) {
2667
- D.open({ message: c.message, type: "error" });
2667
+ F.open({ message: c.message, type: "error" });
2668
2668
  } finally {
2669
2669
  x.value = !1;
2670
2670
  }
@@ -2675,37 +2675,37 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2675
2675
  );
2676
2676
  async function _() {
2677
2677
  try {
2678
- w.value._id ? (x.value = !0, await Be(w.value._id)) : D.open({ message: "Invalid accounting setting", type: "error" });
2678
+ V.value._id ? (x.value = !0, await Be(V.value._id)) : F.open({ message: "Invalid accounting setting", type: "error" });
2679
2679
  } catch (c) {
2680
- D.open({ message: c.message, type: "error" });
2680
+ F.open({ message: c.message, type: "error" });
2681
2681
  } finally {
2682
2682
  x.value = !1;
2683
2683
  }
2684
2684
  }
2685
2685
  return (c, h) => {
2686
2686
  const $ = S("FmButton"), u = S("FmCircularProgress"), y = S("FmTable");
2687
- return m(), F("div", hl, [
2687
+ return m(), C("div", hl, [
2688
2688
  t("div", wl, [
2689
- i(Re, {
2689
+ s(Re, {
2690
2690
  "date-range": p(b),
2691
2691
  "onUpdate:dateRange": h[0] || (h[0] = (n) => Se(b) ? b.value = n : null),
2692
2692
  compare: !1
2693
2693
  }, null, 8, ["date-range"]),
2694
- i($, {
2694
+ s($, {
2695
2695
  loading: x.value,
2696
2696
  variant: "primary",
2697
2697
  label: p(o)("report.common.download"),
2698
2698
  onClick: _
2699
2699
  }, null, 8, ["loading", "label"])
2700
2700
  ]),
2701
- x.value ? (m(), F("div", Vl, [
2702
- i(u, { size: "xl" }),
2703
- t("span", kl, U(p(o)("report.common.isLoading")), 1)
2704
- ])) : s.value.length > 0 ? (m(), I(y, {
2701
+ x.value ? (m(), C("div", Vl, [
2702
+ s(u, { size: "xl" }),
2703
+ t("span", kl, D(p(o)("report.common.isLoading")), 1)
2704
+ ])) : i.value.length > 0 ? (m(), R(y, {
2705
2705
  key: 1,
2706
2706
  class: "flex overflow-y-auto",
2707
- "row-data": s.value,
2708
- "column-defs": V
2707
+ "row-data": i.value,
2708
+ "column-defs": w
2709
2709
  }, null, 8, ["row-data"])) : M("", !0)
2710
2710
  ]);
2711
2711
  };
@@ -2718,7 +2718,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2718
2718
  },
2719
2719
  emits: ["update:modelValue"],
2720
2720
  setup(f) {
2721
- const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = [
2721
+ const { t: o } = J(), e = X(f, "modelValue"), i = B("setting"), w = [
2722
2722
  {
2723
2723
  label: o("report.integration.setting"),
2724
2724
  value: "setting",
@@ -2729,8 +2729,8 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2729
2729
  value: "preview",
2730
2730
  icon: "table"
2731
2731
  }
2732
- ], w = fe(), x = q(() => {
2733
- switch (s.value) {
2732
+ ], V = fe(), x = q(() => {
2733
+ switch (i.value) {
2734
2734
  case "preview":
2735
2735
  return $l;
2736
2736
  case "setting":
@@ -2739,28 +2739,28 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2739
2739
  return null;
2740
2740
  }
2741
2741
  });
2742
- return (D, b) => {
2742
+ return (F, b) => {
2743
2743
  var h;
2744
2744
  const _ = S("FmPageHead"), c = S("FmTabs");
2745
- return m(), F("div", Sl, [
2746
- i(_, {
2745
+ return m(), C("div", Sl, [
2746
+ s(_, {
2747
2747
  title: ((h = e.value) == null ? void 0 : h.name) || "SQL",
2748
2748
  "back-button": !0,
2749
2749
  style: { paddingLeft: "0px", paddingRight: "0px" },
2750
- "onClick:back": p(w).back
2750
+ "onClick:back": p(V).back
2751
2751
  }, {
2752
2752
  description: _e(() => b[2] || (b[2] = [
2753
2753
  t("div", null, null, -1)
2754
2754
  ])),
2755
2755
  _: 1
2756
2756
  }, 8, ["title", "onClick:back"]),
2757
- i(c, {
2758
- "model-value": s.value,
2759
- "onUpdate:modelValue": b[0] || (b[0] = ($) => s.value = $),
2760
- items: V
2757
+ s(c, {
2758
+ "model-value": i.value,
2759
+ "onUpdate:modelValue": b[0] || (b[0] = ($) => i.value = $),
2760
+ items: w
2761
2761
  }, null, 8, ["model-value"]),
2762
2762
  t("div", Cl, [
2763
- (m(), I(we(x.value), {
2763
+ (m(), R(we(x.value), {
2764
2764
  modelValue: e.value,
2765
2765
  "onUpdate:modelValue": b[1] || (b[1] = ($) => e.value = $)
2766
2766
  }, null, 8, ["modelValue"]))
@@ -2803,53 +2803,53 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2803
2803
  }),
2804
2804
  emits: ["update:modelValue"],
2805
2805
  setup(f) {
2806
- const { t: o } = J(), e = X(f, "modelValue"), s = ge(), V = Ve(), w = fe(), { promptLoader: x } = Ce(), { promptMessage: D } = Ae(), { restaurants: b } = ve(), _ = q(
2807
- () => b.map((C) => ({ label: C.name, value: C.id }))
2806
+ const { t: o } = J(), e = X(f, "modelValue"), i = ge(), w = Ve(), V = fe(), { promptLoader: x } = Ce(), { promptMessage: F } = Ae(), { restaurants: b } = ve(), _ = q(
2807
+ () => b.map((U) => ({ label: U.name, value: U.id }))
2808
2808
  );
2809
- function c(C) {
2809
+ function c(U) {
2810
2810
  var a;
2811
- !((a = f.retrievedMethods) != null && a.data) || !Array.isArray(f.retrievedMethods.data) || C.forEach((l) => {
2811
+ !((a = f.retrievedMethods) != null && a.data) || !Array.isArray(f.retrievedMethods.data) || U.forEach((l) => {
2812
2812
  const v = f.retrievedMethods.data.find((r) => r.value == l.id);
2813
2813
  v && (l.cnId = v.cnId);
2814
2814
  });
2815
2815
  }
2816
2816
  async function h() {
2817
- await D({
2817
+ await F({
2818
2818
  message: o("report.messages.confirmDelete", { name: e.value.name }),
2819
2819
  title: o("report.common.delete")
2820
2820
  }) && await x(async () => {
2821
2821
  try {
2822
- await Fe(e.value._id), await V.getSettings(), w.back();
2822
+ await Fe(e.value._id), await w.getSettings(), V.back();
2823
2823
  } catch (a) {
2824
- s.open({ type: "error", message: a.message });
2824
+ i.open({ type: "error", message: a.message });
2825
2825
  }
2826
2826
  });
2827
2827
  }
2828
2828
  async function $() {
2829
2829
  await x(async () => {
2830
- var C, a, l;
2830
+ var U, a, l;
2831
2831
  try {
2832
- (l = (a = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : a.mappings) != null && l.paymentMethods && c(e.value.platform.mappings.paymentMethods), await De(e.value._id, e.value), await V.getSettings();
2832
+ (l = (a = (U = e.value) == null ? void 0 : U.platform) == null ? void 0 : a.mappings) != null && l.paymentMethods && c(e.value.platform.mappings.paymentMethods), await De(e.value._id, e.value), await w.getSettings();
2833
2833
  } catch (v) {
2834
- s.open({ type: "error", message: v.message });
2834
+ i.open({ type: "error", message: v.message });
2835
2835
  }
2836
2836
  });
2837
2837
  }
2838
- function u(C, a) {
2838
+ function u(U, a) {
2839
2839
  var l, v;
2840
- (v = (l = e.value.platform) == null ? void 0 : l.mappings) != null && v[C] && (e.value.platform.mappings[C] = e.value.platform.mappings[C].filter(
2841
- (r, K) => K !== a
2840
+ (v = (l = e.value.platform) == null ? void 0 : l.mappings) != null && v[U] && (e.value.platform.mappings[U] = e.value.platform.mappings[U].filter(
2841
+ (r, N) => N !== a
2842
2842
  ));
2843
2843
  }
2844
- function y(C) {
2844
+ function y(U) {
2845
2845
  var a, l;
2846
- (l = (a = e.value.platform) == null ? void 0 : a.mappings) != null && l[C] && (e.value.platform.mappings[C] = [
2847
- ...e.value.platform.mappings[C],
2848
- C === "items" ? {
2846
+ (l = (a = e.value.platform) == null ? void 0 : a.mappings) != null && l[U] && (e.value.platform.mappings[U] = [
2847
+ ...e.value.platform.mappings[U],
2848
+ U === "items" ? {
2849
2849
  key: "",
2850
2850
  account: "",
2851
2851
  description: ""
2852
- } : C === "taxes" ? {
2852
+ } : U === "taxes" ? {
2853
2853
  key: "",
2854
2854
  account: "SST-"
2855
2855
  } : {
@@ -2866,12 +2866,12 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2866
2866
  ];
2867
2867
  xe(
2868
2868
  () => {
2869
- var C, a, l;
2870
- return (l = (a = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : a.mappings) == null ? void 0 : l.taxes;
2869
+ var U, a, l;
2870
+ return (l = (a = (U = e.value) == null ? void 0 : U.platform) == null ? void 0 : a.mappings) == null ? void 0 : l.taxes;
2871
2871
  },
2872
- (C) => {
2873
- C && C.forEach((a, l) => {
2874
- var K;
2872
+ (U) => {
2873
+ U && U.forEach((a, l) => {
2874
+ var N;
2875
2875
  const v = a.key || "";
2876
2876
  let r = a.account;
2877
2877
  if (!r && v) {
@@ -2886,7 +2886,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2886
2886
  r = "SST-0";
2887
2887
  break;
2888
2888
  }
2889
- (K = e.value.platform) != null && K.mappings && (e.value.platform.mappings.taxes[l] = {
2889
+ (N = e.value.platform) != null && N.mappings && (e.value.platform.mappings.taxes[l] = {
2890
2890
  ...a,
2891
2891
  account: r
2892
2892
  });
@@ -2896,12 +2896,12 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2896
2896
  { immediate: !0, deep: !0 }
2897
2897
  ), xe(
2898
2898
  () => {
2899
- var C, a, l;
2900
- return (l = (a = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : a.mappings) == null ? void 0 : l.version;
2899
+ var U, a, l;
2900
+ return (l = (a = (U = e.value) == null ? void 0 : U.platform) == null ? void 0 : a.mappings) == null ? void 0 : l.version;
2901
2901
  },
2902
- (C) => {
2903
- var a, l, v, r, K;
2904
- C === "v1" && !((v = (l = (a = e.value) == null ? void 0 : a.platform) == null ? void 0 : l.mappings) != null && v.payee) && (K = (r = e.value) == null ? void 0 : r.platform) != null && K.mappings && (e.value.platform.mappings.payee = {
2902
+ (U) => {
2903
+ var a, l, v, r, N;
2904
+ U === "v1" && !((v = (l = (a = e.value) == null ? void 0 : a.platform) == null ? void 0 : l.mappings) != null && v.payee) && (N = (r = e.value) == null ? void 0 : r.platform) != null && N.mappings && (e.value.platform.mappings.payee = {
2905
2905
  id: 1,
2906
2906
  name: ""
2907
2907
  });
@@ -2911,37 +2911,37 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2911
2911
  async function g() {
2912
2912
  await x(async () => {
2913
2913
  try {
2914
- await Ue(e.value._id), await V.getSettings();
2915
- } catch (C) {
2916
- s.open({ type: "error", message: C.message });
2914
+ await Ue(e.value._id), await w.getSettings();
2915
+ } catch (U) {
2916
+ i.open({ type: "error", message: U.message });
2917
2917
  }
2918
2918
  });
2919
2919
  }
2920
2920
  return $e(async () => {
2921
- await V.getSettings();
2922
- }), (C, a) => {
2921
+ await w.getSettings();
2922
+ }), (U, a) => {
2923
2923
  var Q, j, E, z, ee, te, oe, ae, le, ne, se, ie, re, me, ce, de, T;
2924
- const l = S("FmIcon"), v = S("FmButton"), r = S("FmSelect"), K = S("FmMenuDivider"), N = S("FmTextField"), G = S("FmCircularProgress"), Y = S("FmCheckbox");
2925
- return (j = (Q = e.value) == null ? void 0 : Q.platform) != null && j.mappings ? (m(), F("div", Dl, [
2924
+ const l = S("FmIcon"), v = S("FmButton"), r = S("FmSelect"), N = S("FmMenuDivider"), A = S("FmTextField"), G = S("FmCircularProgress"), Y = S("FmCheckbox");
2925
+ return (j = (Q = e.value) == null ? void 0 : Q.platform) != null && j.mappings ? (m(), C("div", Dl, [
2926
2926
  t("div", Ul, [
2927
2927
  t("div", Tl, [
2928
- t("div", Al, U(p(o)("report.integration.connect")), 1),
2928
+ t("div", Al, D(p(o)("report.integration.connect")), 1),
2929
2929
  t("div", Il, [
2930
2930
  t("div", Rl, [
2931
2931
  t("div", Nl, [
2932
- i(l, {
2932
+ s(l, {
2933
2933
  name: "refresh",
2934
2934
  class: "p-2 bg-gray-100 rounded-full",
2935
2935
  onClick: g
2936
2936
  }),
2937
- t("span", Kl, U(p(o)("report.integration.refreshSetting")), 1)
2937
+ t("span", Kl, D(p(o)("report.integration.refreshSetting")), 1)
2938
2938
  ]),
2939
- i(v, {
2939
+ s(v, {
2940
2940
  variant: "tertiary",
2941
2941
  label: p(o)("report.common.delete"),
2942
2942
  onClick: h
2943
2943
  }, null, 8, ["label"]),
2944
- i(v, {
2944
+ s(v, {
2945
2945
  variant: "primary",
2946
2946
  label: p(o)("report.common.update"),
2947
2947
  onClick: $
@@ -2951,11 +2951,11 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2951
2951
  ])
2952
2952
  ]),
2953
2953
  t("div", Ml, [
2954
- t("div", Pl, U(p(o)("report.integration.biztory.authenticate")), 1),
2954
+ t("div", Pl, D(p(o)("report.integration.biztory.authenticate")), 1),
2955
2955
  t("div", jl, [
2956
- t("div", Ol, "Biztory " + U(p(o)("report.integration.biztory.version")), 1),
2956
+ t("div", Ol, "Biztory " + D(p(o)("report.integration.biztory.version")), 1),
2957
2957
  t("div", Bl, [
2958
- i(r, {
2958
+ s(r, {
2959
2959
  modelValue: e.value.platform.mappings.version,
2960
2960
  "onUpdate:modelValue": a[0] || (a[0] = (d) => e.value.platform.mappings.version = d),
2961
2961
  items: [
@@ -2966,12 +2966,12 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2966
2966
  }, null, 8, ["modelValue"])
2967
2967
  ])
2968
2968
  ]),
2969
- i(K, { style: { margin: 0 } }),
2969
+ s(N, { style: { margin: 0 } }),
2970
2970
  t("div", Ll, [
2971
2971
  t("div", El, [
2972
- t("div", Yl, U(p(o)("report.integration.biztory.subdomain")), 1),
2972
+ t("div", Yl, D(p(o)("report.integration.biztory.subdomain")), 1),
2973
2973
  t("div", zl, [
2974
- i(N, {
2974
+ s(A, {
2975
2975
  modelValue: e.value.platform.subdomain,
2976
2976
  "onUpdate:modelValue": a[1] || (a[1] = (d) => e.value.platform.subdomain = d),
2977
2977
  placeholder: "Subdomain"
@@ -2979,9 +2979,9 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2979
2979
  ])
2980
2980
  ]),
2981
2981
  t("div", ql, [
2982
- t("div", Hl, U(p(o)("report.integration.biztory.apiKey")), 1),
2982
+ t("div", Hl, D(p(o)("report.integration.biztory.apiKey")), 1),
2983
2983
  t("div", Xl, [
2984
- i(N, {
2984
+ s(A, {
2985
2985
  modelValue: e.value.platform.api_key,
2986
2986
  "onUpdate:modelValue": a[2] || (a[2] = (d) => e.value.platform.api_key = d),
2987
2987
  placeholder: "API Key"
@@ -2989,19 +2989,19 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
2989
2989
  ])
2990
2990
  ]),
2991
2991
  t("div", Gl, [
2992
- t("div", Ql, U(p(o)("report.integration.general")), 1),
2992
+ t("div", Ql, D(p(o)("report.integration.general")), 1),
2993
2993
  t("div", Jl, [
2994
- t("div", Wl, U(p(o)("report.common.name")), 1),
2994
+ t("div", Wl, D(p(o)("report.common.name")), 1),
2995
2995
  t("div", Zl, [
2996
- i(N, {
2996
+ s(A, {
2997
2997
  modelValue: e.value.name,
2998
2998
  "onUpdate:modelValue": a[3] || (a[3] = (d) => e.value.name = d)
2999
2999
  }, null, 8, ["modelValue"])
3000
3000
  ])
3001
3001
  ]),
3002
3002
  t("div", en, [
3003
- t("div", tn, U(p(o)("report.common.location")), 1),
3004
- i(r, {
3003
+ t("div", tn, D(p(o)("report.common.location")), 1),
3004
+ s(r, {
3005
3005
  modelValue: e.value.platform.locationIds,
3006
3006
  "onUpdate:modelValue": a[4] || (a[4] = (d) => e.value.platform.locationIds = d),
3007
3007
  multiselect: !0,
@@ -3011,8 +3011,8 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3011
3011
  }, null, 8, ["modelValue", "items", "placeholder"])
3012
3012
  ]),
3013
3013
  t("div", on, [
3014
- t("div", an, U(p(o)("report.integration.grouping.title")), 1),
3015
- i(r, {
3014
+ t("div", an, D(p(o)("report.integration.grouping.title")), 1),
3015
+ s(r, {
3016
3016
  modelValue: e.value.platform.grouping,
3017
3017
  "onUpdate:modelValue": a[5] || (a[5] = (d) => e.value.platform.grouping = d),
3018
3018
  multiselect: !1,
@@ -3022,9 +3022,9 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3022
3022
  disabled: ""
3023
3023
  }, null, 8, ["modelValue", "placeholder"])
3024
3024
  ]),
3025
- e.value.platform.mappings.version == "v1" ? (m(), F("div", ln, [
3025
+ e.value.platform.mappings.version == "v1" ? (m(), C("div", ln, [
3026
3026
  a[15] || (a[15] = t("div", { class: "w-[33%]" }, "Payee ID", -1)),
3027
- e.value.platform.mappings.version == "v1" ? (m(), I(R, {
3027
+ e.value.platform.mappings.version == "v1" ? (m(), R(K, {
3028
3028
  key: 0,
3029
3029
  modelValue: e.value.platform.mappings.payee,
3030
3030
  "onUpdate:modelValue": a[6] || (a[6] = (d) => e.value.platform.mappings.payee = d),
@@ -3036,12 +3036,12 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3036
3036
  ])) : M("", !0),
3037
3037
  t("div", nn, [
3038
3038
  t("div", sn, [
3039
- !f.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (m(), I(G, {
3039
+ !f.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (m(), R(G, {
3040
3040
  key: 0,
3041
3041
  size: "xl"
3042
3042
  })) : M("", !0),
3043
- f.retrievedCustomers.isLoaded && f.retrievedCustomers.data && ((E = f.retrievedCustomers.data) == null ? void 0 : E.length) != 0 ? (m(), F("div", rn, [
3044
- e.value.platform.mappings.version == "v2" ? (m(), I(ke, {
3043
+ f.retrievedCustomers.isLoaded && f.retrievedCustomers.data && ((E = f.retrievedCustomers.data) == null ? void 0 : E.length) != 0 ? (m(), C("div", rn, [
3044
+ e.value.platform.mappings.version == "v2" ? (m(), R(ke, {
3045
3045
  key: 0,
3046
3046
  modelValue: e.value.platform.mappings.payeeId,
3047
3047
  "onUpdate:modelValue": a[7] || (a[7] = (d) => e.value.platform.mappings.payeeId = d),
@@ -3062,44 +3062,44 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3062
3062
  ]),
3063
3063
  t("div", mn, [
3064
3064
  t("div", cn, [
3065
- t("div", dn, U(p(o)("report.integration.refNumFormat")), 1),
3066
- i(Pe)
3065
+ t("div", dn, D(p(o)("report.integration.refNumFormat")), 1),
3066
+ s(Pe)
3067
3067
  ]),
3068
3068
  t("div", un, [
3069
- a[16] || (a[16] = t("div", { class: "w-[25%]" }, U("Invoice no"), -1)),
3069
+ a[16] || (a[16] = t("div", { class: "w-[25%]" }, D("Invoice no"), -1)),
3070
3070
  t("div", pn, [
3071
- i(N, {
3071
+ s(A, {
3072
3072
  modelValue: e.value.platform.mappings.invoiceDocNo,
3073
3073
  "onUpdate:modelValue": a[8] || (a[8] = (d) => e.value.platform.mappings.invoiceDocNo = d)
3074
3074
  }, null, 8, ["modelValue"])
3075
3075
  ])
3076
3076
  ]),
3077
3077
  t("div", fn, [
3078
- a[17] || (a[17] = t("div", { class: "w-[25%]" }, U("Credit no"), -1)),
3078
+ a[17] || (a[17] = t("div", { class: "w-[25%]" }, D("Credit no"), -1)),
3079
3079
  t("div", vn, [
3080
- i(N, {
3080
+ s(A, {
3081
3081
  modelValue: e.value.platform.mappings.creditNoteDocNo,
3082
3082
  "onUpdate:modelValue": a[9] || (a[9] = (d) => e.value.platform.mappings.creditNoteDocNo = d)
3083
3083
  }, null, 8, ["modelValue"])
3084
3084
  ])
3085
3085
  ])
3086
3086
  ]),
3087
- i(Ne, {
3087
+ s(Ne, {
3088
3088
  modelValue: e.value.platform,
3089
3089
  "onUpdate:modelValue": a[10] || (a[10] = (d) => e.value.platform = d),
3090
3090
  label: "upload",
3091
3091
  "last-upload-date": (ee = e.value.platform) == null ? void 0 : ee.lastUploadDate
3092
3092
  }, null, 8, ["modelValue", "last-upload-date"]),
3093
3093
  t("div", gn, [
3094
- t("div", yn, U(p(o)("report.integration.biztory.items")), 1),
3095
- i(v, {
3094
+ t("div", yn, D(p(o)("report.integration.biztory.items")), 1),
3095
+ s(v, {
3096
3096
  variant: "primary",
3097
3097
  icon: "add",
3098
3098
  onClick: a[11] || (a[11] = () => y("items"))
3099
3099
  })
3100
3100
  ]),
3101
3101
  t("div", xn, [
3102
- (m(!0), F(O, null, L((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (d, k) => (m(), I(R, {
3102
+ (m(!0), C(O, null, L((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (d, k) => (m(), R(K, {
3103
3103
  key: `item-${k}`,
3104
3104
  modelValue: e.value.platform.mappings.items[k],
3105
3105
  "onUpdate:modelValue": (P) => e.value.platform.mappings.items[k] = P,
@@ -3112,15 +3112,15 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3112
3112
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
3113
3113
  ]),
3114
3114
  t("div", _n, [
3115
- t("div", bn, U(p(o)("report.integration.biztory.taxes")), 1),
3116
- i(v, {
3115
+ t("div", bn, D(p(o)("report.integration.biztory.taxes")), 1),
3116
+ s(v, {
3117
3117
  variant: "primary",
3118
3118
  icon: "add",
3119
3119
  onClick: a[12] || (a[12] = () => y("taxes"))
3120
3120
  })
3121
3121
  ]),
3122
3122
  t("div", hn, [
3123
- (m(!0), F(O, null, L((se = (ne = (le = e.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (d, k) => (m(), I(R, {
3123
+ (m(!0), C(O, null, L((se = (ne = (le = e.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (d, k) => (m(), R(K, {
3124
3124
  key: `tax-${k}`,
3125
3125
  modelValue: e.value.platform.mappings.taxes[k],
3126
3126
  "onUpdate:modelValue": (P) => e.value.platform.mappings.taxes[k] = P,
@@ -3131,7 +3131,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3131
3131
  removable: !0,
3132
3132
  onRemove: () => u("taxes", k)
3133
3133
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
3134
- (m(!0), F(O, null, L((me = (re = (ie = e.value) == null ? void 0 : ie.platform) == null ? void 0 : re.mappings) == null ? void 0 : me.taxRoundingAdjustments, (d, k) => (m(), I(R, {
3134
+ (m(!0), C(O, null, L((me = (re = (ie = e.value) == null ? void 0 : ie.platform) == null ? void 0 : re.mappings) == null ? void 0 : me.taxRoundingAdjustments, (d, k) => (m(), R(K, {
3135
3135
  key: `tax-rounding-adjustment-${k}`,
3136
3136
  modelValue: e.value.platform.mappings.taxRoundingAdjustments[k],
3137
3137
  "onUpdate:modelValue": (P) => e.value.platform.mappings.taxRoundingAdjustments[k] = P,
@@ -3144,8 +3144,8 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3144
3144
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
3145
3145
  ]),
3146
3146
  t("div", wn, [
3147
- t("div", Vn, U(p(o)("report.integration.biztory.payments")), 1),
3148
- i(v, {
3147
+ t("div", Vn, D(p(o)("report.integration.biztory.payments")), 1),
3148
+ s(v, {
3149
3149
  variant: "primary",
3150
3150
  icon: "add",
3151
3151
  onClick: a[13] || (a[13] = () => y("paymentMethods"))
@@ -3154,7 +3154,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3154
3154
  t("div", kn, [
3155
3155
  a[18] || (a[18] = t("div", { class: "w-[25%]" }, "Payment Term", -1)),
3156
3156
  t("div", $n, [
3157
- i(R, {
3157
+ s(K, {
3158
3158
  modelValue: e.value.platform.mappings.paymentTerm,
3159
3159
  "onUpdate:modelValue": a[14] || (a[14] = (d) => e.value.platform.mappings.paymentTerm = d),
3160
3160
  options: {
@@ -3165,21 +3165,21 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3165
3165
  }, null, 8, ["modelValue"])
3166
3166
  ])
3167
3167
  ]),
3168
- f.retrievedMethods.isError ? M("", !0) : (m(), F("div", Sn, U(p(o)("report.integration.biztory.paymentTerm")), 1)),
3169
- f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length == 0 && !f.retrievedMethods.isError ? (m(), F("span", Cn, U(p(o)("report.integration.biztory.noPaymentMethods")), 1)) : M("", !0),
3170
- f.retrievedMethods.isLoaded ? M("", !0) : (m(), I(G, {
3168
+ f.retrievedMethods.isError ? M("", !0) : (m(), C("div", Sn, D(p(o)("report.integration.biztory.paymentTerm")), 1)),
3169
+ f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length == 0 && !f.retrievedMethods.isError ? (m(), C("span", Cn, D(p(o)("report.integration.biztory.noPaymentMethods")), 1)) : M("", !0),
3170
+ f.retrievedMethods.isLoaded ? M("", !0) : (m(), R(G, {
3171
3171
  key: 2,
3172
3172
  size: "xl"
3173
3173
  })),
3174
- f.retrievedMethods.isError ? (m(), F("span", Fn, U(p(o)("report.integration.biztory.error")), 1)) : M("", !0),
3175
- (m(!0), F(O, null, L((T = (de = (ce = e.value) == null ? void 0 : ce.platform) == null ? void 0 : de.mappings) == null ? void 0 : T.paymentMethods, (d, k) => {
3174
+ f.retrievedMethods.isError ? (m(), C("span", Fn, D(p(o)("report.integration.biztory.error")), 1)) : M("", !0),
3175
+ (m(!0), C(O, null, L((T = (de = (ce = e.value) == null ? void 0 : ce.platform) == null ? void 0 : de.mappings) == null ? void 0 : T.paymentMethods, (d, k) => {
3176
3176
  var P;
3177
- return m(), F("div", {
3177
+ return m(), C("div", {
3178
3178
  key: `payment-${k}`,
3179
3179
  class: "grid-cols-1 grid gap-x-16"
3180
3180
  }, [
3181
- f.retrievedMethods.isLoaded && f.retrievedMethods.data && ((P = f.retrievedMethods.data) == null ? void 0 : P.length) != 0 ? (m(), F("div", Dn, [
3182
- i(Y, {
3181
+ f.retrievedMethods.isLoaded && f.retrievedMethods.data && ((P = f.retrievedMethods.data) == null ? void 0 : P.length) != 0 ? (m(), C("div", Dn, [
3182
+ s(Y, {
3183
3183
  "model-value": !e.value.platform.mappings.paymentMethods[k].skip,
3184
3184
  value: "",
3185
3185
  "onUpdate:modelValue": (ue) => {
@@ -3187,7 +3187,7 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3187
3187
  (Me = (Ke = e.value.platform) == null ? void 0 : Ke.mappings) != null && Me.paymentMethods[k] && (e.value.platform.mappings.paymentMethods[k].skip = !ue);
3188
3188
  }
3189
3189
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
3190
- i(ke, {
3190
+ s(ke, {
3191
3191
  modelValue: e.value.platform.mappings.paymentMethods[k],
3192
3192
  "onUpdate:modelValue": (ue) => e.value.platform.mappings.paymentMethods[k] = ue,
3193
3193
  options: {
@@ -3215,28 +3215,28 @@ const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
3215
3215
  });
3216
3216
  function Tn(f) {
3217
3217
  return f.reduce((o, e) => {
3218
- var w, x, D, b, _, c, h, $, u, y, n, g, C, a, l, v, r, K, N, G, Y, Q;
3219
- const { invoice: s } = e, V = o.length;
3220
- o[V] = {
3221
- invoice_date: s.invoice_date,
3222
- ref_num: s.ref_num,
3223
- grandTotal: s.grandTotal,
3218
+ var V, x, F, b, _, c, h, $, u, y, n, g, U, a, l, v, r, N, A, G, Y, Q;
3219
+ const { invoice: i } = e, w = o.length;
3220
+ o[w] = {
3221
+ invoice_date: i.invoice_date,
3222
+ ref_num: i.ref_num,
3223
+ grandTotal: i.grandTotal,
3224
3224
  // tax_code: invoice.tax[0].tax_code,
3225
3225
  // tax: invoice.tax.reduce((sum, tax) => sum + tax.tax, 0),
3226
3226
  // service_charge: invoice.service_charge.total,
3227
- item_code: (w = s.items[0]) == null ? void 0 : w.code,
3228
- item_desc: (x = s.items[0]) == null ? void 0 : x.description,
3229
- item_price: (D = s.items[0]) == null ? void 0 : D.price,
3230
- item_tax: (b = s.items[0]) == null ? void 0 : b.total_tax,
3231
- item_tax_label: ((_ = s.items[0]) == null ? void 0 : _.tax_label) || "-",
3232
- payment_amount: ((h = (c = s.transactions) == null ? void 0 : c[0]) == null ? void 0 : h.amount) || void 0,
3233
- payment_method: ((u = ($ = s.transactions) == null ? void 0 : $[0]) == null ? void 0 : u.payment_method) || "-",
3234
- payment_term: ((y = s == null ? void 0 : s.payment_term) == null ? void 0 : y.name) || ""
3227
+ item_code: (V = i.items[0]) == null ? void 0 : V.code,
3228
+ item_desc: (x = i.items[0]) == null ? void 0 : x.description,
3229
+ item_price: (F = i.items[0]) == null ? void 0 : F.price,
3230
+ item_tax: (b = i.items[0]) == null ? void 0 : b.total_tax,
3231
+ item_tax_label: ((_ = i.items[0]) == null ? void 0 : _.tax_label) || "-",
3232
+ payment_amount: ((h = (c = i.transactions) == null ? void 0 : c[0]) == null ? void 0 : h.amount) || void 0,
3233
+ payment_method: ((u = ($ = i.transactions) == null ? void 0 : $[0]) == null ? void 0 : u.payment_method) || "-",
3234
+ payment_term: ((y = i == null ? void 0 : i.payment_term) == null ? void 0 : y.name) || ""
3235
3235
  };
3236
- for (let j = 1; j < Math.max(((n = s.items) == null ? void 0 : n.length) || 0, ((g = s.transactions) == null ? void 0 : g.length) || 0); j++) {
3237
- const E = V + j;
3236
+ for (let j = 1; j < Math.max(((n = i.items) == null ? void 0 : n.length) || 0, ((g = i.transactions) == null ? void 0 : g.length) || 0); j++) {
3237
+ const E = w + j;
3238
3238
  o[E] || (o[E] = {});
3239
- const z = s.items[j];
3239
+ const z = i.items[j];
3240
3240
  z ? o[E] = {
3241
3241
  ...o[E],
3242
3242
  item_code: z.code,
@@ -3244,13 +3244,13 @@ function Tn(f) {
3244
3244
  item_price: z.price,
3245
3245
  item_tax: z.total_tax,
3246
3246
  item_tax_label: z.tax_label || "-",
3247
- payment_amount: ((a = (C = s.transactions) == null ? void 0 : C[j]) == null ? void 0 : a.amount) || void 0,
3248
- payment_method: ((v = (l = s.transactions) == null ? void 0 : l[j]) == null ? void 0 : v.payment_method) || "-",
3249
- payment_term: ((r = s == null ? void 0 : s.payment_term) == null ? void 0 : r.name) || ""
3247
+ payment_amount: ((a = (U = i.transactions) == null ? void 0 : U[j]) == null ? void 0 : a.amount) || void 0,
3248
+ payment_method: ((v = (l = i.transactions) == null ? void 0 : l[j]) == null ? void 0 : v.payment_method) || "-",
3249
+ payment_term: ((r = i == null ? void 0 : i.payment_term) == null ? void 0 : r.name) || ""
3250
3250
  } : o[E] = {
3251
- payment_amount: ((N = (K = s.transactions) == null ? void 0 : K[j]) == null ? void 0 : N.amount) || void 0,
3252
- payment_method: ((Y = (G = s.transactions) == null ? void 0 : G[j]) == null ? void 0 : Y.payment_method) || "-",
3253
- payment_term: ((Q = s == null ? void 0 : s.payment_term) == null ? void 0 : Q.name) || ""
3251
+ payment_amount: ((A = (N = i.transactions) == null ? void 0 : N[j]) == null ? void 0 : A.amount) || void 0,
3252
+ payment_method: ((Y = (G = i.transactions) == null ? void 0 : G[j]) == null ? void 0 : Y.payment_method) || "-",
3253
+ payment_term: ((Q = i == null ? void 0 : i.payment_term) == null ? void 0 : Q.name) || ""
3254
3254
  };
3255
3255
  }
3256
3256
  return o;
@@ -3259,17 +3259,17 @@ function Tn(f) {
3259
3259
  const An = [
3260
3260
  {
3261
3261
  accessorKey: "invoice_date",
3262
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
3262
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
3263
3263
  enableSorting: !1
3264
3264
  },
3265
3265
  {
3266
3266
  accessorKey: "ref_num",
3267
- header: () => A("p", { class: "min-w-[130px] text-nowrap text-ellipsis" }, "Doc No"),
3267
+ header: () => I("p", { class: "min-w-[130px] text-nowrap text-ellipsis" }, "Doc No"),
3268
3268
  enableSorting: !1
3269
3269
  },
3270
3270
  {
3271
3271
  accessorKey: "grandTotal",
3272
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Total"),
3272
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Total"),
3273
3273
  enableSorting: !1
3274
3274
  },
3275
3275
  // {
@@ -3289,87 +3289,88 @@ const An = [
3289
3289
  // },
3290
3290
  {
3291
3291
  accessorKey: "item_code",
3292
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Code"),
3292
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Code"),
3293
3293
  enableSorting: !1
3294
3294
  },
3295
3295
  {
3296
3296
  accessorKey: "item_desc",
3297
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Description"),
3297
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Description"),
3298
3298
  enableSorting: !1
3299
3299
  },
3300
3300
  {
3301
3301
  accessorKey: "item_price",
3302
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Price"),
3302
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Price"),
3303
3303
  enableSorting: !1
3304
3304
  },
3305
3305
  {
3306
3306
  accessorKey: "item_tax",
3307
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Tax"),
3307
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Tax"),
3308
3308
  enableSorting: !1
3309
3309
  },
3310
3310
  {
3311
3311
  accessorKey: "item_tax_label",
3312
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Tax Label"),
3312
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Tax Label"),
3313
3313
  enableSorting: !1
3314
3314
  },
3315
3315
  {
3316
3316
  accessorKey: "payment_amount",
3317
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Amount"),
3317
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Amount"),
3318
3318
  enableSorting: !1
3319
3319
  },
3320
3320
  {
3321
3321
  accessorKey: "payment_term",
3322
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Term"),
3322
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Term"),
3323
3323
  enableSorting: !1
3324
3324
  },
3325
3325
  {
3326
3326
  accessorKey: "payment_method",
3327
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Method"),
3327
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Method"),
3328
3328
  enableSorting: !1
3329
3329
  }
3330
3330
  ];
3331
3331
  function In(f) {
3332
3332
  return f.reduce((o, e) => {
3333
- var D, b, _, c, h, $, u, y, n, g;
3334
- const { invoice: s, payments: V } = e, w = o.length;
3335
- o[w] = {
3336
- invoice_date: s.invoice_date,
3337
- ref_num: s.ref_num,
3338
- total: s.total,
3339
- item_code: (D = s.items[0]) == null ? void 0 : D.code,
3340
- item_description: (b = s.items[0]) == null ? void 0 : b.description,
3341
- item_price: (_ = s.items[0]) == null ? void 0 : _.price,
3342
- item_tax_label: ((c = s.items[0]) == null ? void 0 : c.tax_label) ?? "",
3343
- item_tax_amount: ((h = s.items[0]) == null ? void 0 : h.total_tax) ?? "",
3344
- service_charge_amount: (($ = s.service_charges[0]) == null ? void 0 : $.total) ?? "",
3345
- rounding: s.rounding ?? 0,
3346
- payment_term_id: s.payment_term.name ?? "",
3347
- payment_term_amount: ((u = s.terms[w]) == null ? void 0 : u.amount) ?? "",
3348
- payment_method: ((y = V[0]) == null ? void 0 : y.payment_method_name) || ""
3333
+ var F, b, _, c, h, $, u, y, n, g, U, a, l;
3334
+ const { invoice: i, payments: w } = e, V = o.length;
3335
+ o[V] = {
3336
+ invoice_date: i.invoice_date,
3337
+ ref_num: i.ref_num,
3338
+ total: i.total,
3339
+ item_code: (F = i.items[0]) == null ? void 0 : F.code,
3340
+ item_description: (b = i.items[0]) == null ? void 0 : b.description,
3341
+ item_price: (_ = i.items[0]) == null ? void 0 : _.price,
3342
+ item_tax_label: ((c = i.items[0]) == null ? void 0 : c.tax_label) ?? "",
3343
+ item_tax_amount: ((h = i.items[0]) == null ? void 0 : h.total_tax) ?? "",
3344
+ service_charge_amount: (($ = i.service_charges[0]) == null ? void 0 : $.total) ?? "",
3345
+ rounding: i.rounding ?? 0,
3346
+ payment_term_id: i.payment_term.name ?? "",
3347
+ payment_term_amount: ((y = (u = w[0]) == null ? void 0 : u.ids[0]) == null ? void 0 : y.amount) ?? "",
3348
+ payment_method: ((n = w[0]) == null ? void 0 : n.payment_method_name) || ""
3349
3349
  };
3350
3350
  const x = Math.max(
3351
- ((n = s.items) == null ? void 0 : n.length) || 0,
3352
- ((g = s.terms) == null ? void 0 : g.length) || 0,
3353
- (V == null ? void 0 : V.length) || 0
3351
+ ((g = i.items) == null ? void 0 : g.length) || 0,
3352
+ ((U = i.terms) == null ? void 0 : U.length) || 0,
3353
+ (w == null ? void 0 : w.length) || 0
3354
3354
  );
3355
- for (let C = 1; C < x; C++) {
3356
- const a = w + C;
3357
- o[a] || (o[a] = {});
3358
- const l = s.items[C], v = s.terms[C], r = V[C];
3359
- l ? o[a] = {
3360
- ...o[a],
3361
- item_code: l.code,
3362
- item_description: l.description,
3363
- item_price: l.total,
3364
- item_tax_label: l.tax_label == "?" ? "" : l.tax_label ?? "",
3365
- item_tax_amount: l.total_tax ?? "",
3366
- payment_term_id: s.payment_term.name ?? "",
3367
- payment_term_amount: (v == null ? void 0 : v.amount) ?? "",
3368
- payment_method: (r == null ? void 0 : r.payment_method_name) || ""
3369
- } : o[a] = {
3370
- payment_term_id: s.payment_term.name ?? "",
3371
- payment_term_amount: (v == null ? void 0 : v.amount) ?? "",
3372
- payment_method: (r == null ? void 0 : r.payment_method_name) || ""
3355
+ for (let v = 1; v < x; v++) {
3356
+ const r = V + v;
3357
+ o[r] || (o[r] = {});
3358
+ const N = i.items[v], A = w[v];
3359
+ N ? o[r] = {
3360
+ ...o[r],
3361
+ item_code: N.code,
3362
+ item_description: N.description,
3363
+ item_price: N.total,
3364
+ item_tax_label: N.tax_label == "?" ? "" : N.tax_label ?? "",
3365
+ item_tax_amount: N.total_tax ?? "",
3366
+ payment_term_id: i.payment_term.name ?? "",
3367
+ payment_term_amount: ((a = A == null ? void 0 : A.ids[0]) == null ? void 0 : a.amount) ?? "",
3368
+ payment_method: (A == null ? void 0 : A.payment_method_name) || ""
3369
+ } : o[r] = {
3370
+ ...o[r],
3371
+ payment_term_id: i.payment_term.name ?? "",
3372
+ payment_term_amount: ((l = A == null ? void 0 : A.ids[0]) == null ? void 0 : l.amount) ?? "",
3373
+ payment_method: (A == null ? void 0 : A.payment_method_name) || ""
3373
3374
  };
3374
3375
  }
3375
3376
  return o;
@@ -3378,7 +3379,7 @@ function In(f) {
3378
3379
  const Rn = [
3379
3380
  {
3380
3381
  accessorKey: "invoice_date",
3381
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
3382
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
3382
3383
  enableSorting: !1
3383
3384
  },
3384
3385
  // {
@@ -3388,57 +3389,57 @@ const Rn = [
3388
3389
  // },
3389
3390
  {
3390
3391
  accessorKey: "total",
3391
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Total"),
3392
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Total"),
3392
3393
  enableSorting: !1
3393
3394
  },
3394
3395
  {
3395
3396
  accessorKey: "item_code",
3396
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Code"),
3397
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Code"),
3397
3398
  enableSorting: !1
3398
3399
  },
3399
3400
  {
3400
3401
  accessorKey: "item_description",
3401
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Description"),
3402
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Description"),
3402
3403
  enableSorting: !1
3403
3404
  },
3404
3405
  {
3405
3406
  accessorKey: "item_price",
3406
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Price"),
3407
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Price"),
3407
3408
  enableSorting: !1
3408
3409
  },
3409
3410
  {
3410
3411
  accessorKey: "item_tax_label",
3411
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Tax Label"),
3412
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Tax Label"),
3412
3413
  enableSorting: !1
3413
3414
  },
3414
3415
  {
3415
3416
  accessorKey: "item_tax_amount",
3416
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Tax Amount"),
3417
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Tax Amount"),
3417
3418
  enableSorting: !1
3418
3419
  },
3419
3420
  {
3420
3421
  accessorKey: "service_charge_amount",
3421
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Service Charge Amount"),
3422
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Service Charge Amount"),
3422
3423
  enableSorting: !1
3423
3424
  },
3424
3425
  {
3425
3426
  accessorKey: "rounding",
3426
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Rounding"),
3427
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Rounding"),
3427
3428
  enableSorting: !1
3428
3429
  },
3429
3430
  {
3430
3431
  accessorKey: "payment_term_id",
3431
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Term"),
3432
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Term"),
3432
3433
  enableSorting: !1
3433
3434
  },
3434
3435
  {
3435
3436
  accessorKey: "payment_term_amount",
3436
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Term Amount"),
3437
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Term Amount"),
3437
3438
  enableSorting: !1
3438
3439
  },
3439
3440
  {
3440
3441
  accessorKey: "payment_method",
3441
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Method (ID)"),
3442
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Method (ID)"),
3442
3443
  enableSorting: !1
3443
3444
  }
3444
3445
  ], Nn = { class: "h-full flex flex-col gap-16" }, Kn = { class: "flex flex-row gap-2 justify-between items-center" }, Mn = {
@@ -3452,24 +3453,24 @@ const Rn = [
3452
3453
  },
3453
3454
  emits: ["update:modelValue"],
3454
3455
  setup(f) {
3455
- const { t: o } = J(), e = X(f, "modelValue"), s = B(!1), V = ge(), { dateRange: w } = Ie(ve()), x = B([]);
3456
+ const { t: o } = J(), e = X(f, "modelValue"), i = B(!1), w = ge(), { dateRange: V } = Ie(ve()), x = B([]);
3456
3457
  xe(
3457
- () => w.value,
3458
+ () => V.value,
3458
3459
  async () => {
3459
3460
  if (e.value._id)
3460
3461
  try {
3461
- s.value = !0, x.value = await Te(e.value._id);
3462
+ i.value = !0, x.value = await Te(e.value._id);
3462
3463
  } catch (c) {
3463
- V.open({ message: c.message, type: "error" });
3464
+ w.open({ message: c.message, type: "error" });
3464
3465
  } finally {
3465
- s.value = !1;
3466
+ i.value = !1;
3466
3467
  }
3467
3468
  },
3468
3469
  {
3469
3470
  immediate: !0
3470
3471
  }
3471
3472
  );
3472
- const D = q(() => {
3473
+ const F = q(() => {
3473
3474
  switch (e.value.platform.mappings.version) {
3474
3475
  case "v1":
3475
3476
  return Tn(x.value);
@@ -3488,36 +3489,36 @@ const Rn = [
3488
3489
  });
3489
3490
  async function _() {
3490
3491
  try {
3491
- e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (s.value = !0, await Oe(e.value._id), V.open({ message: "Upload successful", type: "success" })) : V.open({ message: "Invalid accounting setting", type: "error" });
3492
+ e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (i.value = !0, await Oe(e.value._id), w.open({ message: "Upload successful", type: "success" })) : w.open({ message: "Invalid accounting setting", type: "error" });
3492
3493
  } catch (c) {
3493
- c.message && V.open({ message: c.message, type: "error" }), c.errors && c.errors.forEach((h) => V.open({ message: h, type: "error" }));
3494
+ c.message && w.open({ message: c.message, type: "error" }), c.errors && c.errors.forEach((h) => w.open({ message: h, type: "error" }));
3494
3495
  } finally {
3495
- s.value = !1;
3496
+ i.value = !1;
3496
3497
  }
3497
3498
  }
3498
3499
  return (c, h) => {
3499
3500
  const $ = S("FmButton"), u = S("FmCircularProgress"), y = S("FmTable");
3500
- return m(), F("div", Nn, [
3501
+ return m(), C("div", Nn, [
3501
3502
  t("div", Kn, [
3502
- i(Re, {
3503
- "date-range": p(w),
3504
- "onUpdate:dateRange": h[0] || (h[0] = (n) => Se(w) ? w.value = n : null),
3503
+ s(Re, {
3504
+ "date-range": p(V),
3505
+ "onUpdate:dateRange": h[0] || (h[0] = (n) => Se(V) ? V.value = n : null),
3505
3506
  compare: !1
3506
3507
  }, null, 8, ["date-range"]),
3507
- i($, {
3508
- loading: s.value,
3508
+ s($, {
3509
+ loading: i.value,
3509
3510
  variant: "primary",
3510
3511
  label: "Upload",
3511
3512
  onClick: _
3512
3513
  }, null, 8, ["loading"])
3513
3514
  ]),
3514
- s.value ? (m(), F("div", Mn, [
3515
- i(u, { size: "xl" }),
3516
- t("span", Pn, U(p(o)("report.common.isLoading")), 1)
3517
- ])) : (m(), I(y, {
3515
+ i.value ? (m(), C("div", Mn, [
3516
+ s(u, { size: "xl" }),
3517
+ t("span", Pn, D(p(o)("report.common.isLoading")), 1)
3518
+ ])) : (m(), R(y, {
3518
3519
  key: 1,
3519
3520
  class: "flex overflow-y-auto",
3520
- "row-data": D.value,
3521
+ "row-data": F.value,
3521
3522
  "column-defs": b.value
3522
3523
  }, null, 8, ["row-data", "column-defs"]))
3523
3524
  ]);
@@ -3531,7 +3532,7 @@ const Rn = [
3531
3532
  },
3532
3533
  emits: ["update:modelValue"],
3533
3534
  setup(f) {
3534
- const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = [
3535
+ const { t: o } = J(), e = X(f, "modelValue"), i = B("setting"), w = [
3535
3536
  {
3536
3537
  label: o("report.integration.setting"),
3537
3538
  value: "setting",
@@ -3542,8 +3543,8 @@ const Rn = [
3542
3543
  value: "preview",
3543
3544
  icon: "table"
3544
3545
  }
3545
- ], w = fe(), x = q(() => {
3546
- switch (s.value) {
3546
+ ], V = fe(), x = q(() => {
3547
+ switch (i.value) {
3547
3548
  case "preview":
3548
3549
  return {
3549
3550
  component: jn
@@ -3552,23 +3553,23 @@ const Rn = [
3552
3553
  return {
3553
3554
  component: Un,
3554
3555
  props: {
3555
- retrievedMethods: D.value,
3556
+ retrievedMethods: F.value,
3556
3557
  retrievedCustomers: b.value
3557
3558
  }
3558
3559
  };
3559
3560
  default:
3560
3561
  return null;
3561
3562
  }
3562
- }), D = B({}), b = B({}), _ = (y, n) => y.map((g) => ({
3563
+ }), F = B({}), b = B({}), _ = (y, n) => y.map((g) => ({
3563
3564
  label: n.length > 2 ? `ID:${g[n[2]]} [${g[n[0]]}] ${g[n[1]]}` : `[${g[n[0]]}] ${g[n[1]]}`,
3564
3565
  value: g.id,
3565
3566
  cnId: g.cnId ? g.cnId : null
3566
- })), c = (y) => _(y, ["wallet", "name"]), h = (y) => _(y, ["id", "name"]), $ = async (y, n, g, C) => {
3567
+ })), c = (y) => _(y, ["wallet", "name"]), h = (y) => _(y, ["id", "name"]), $ = async (y, n, g, U) => {
3567
3568
  try {
3568
3569
  const a = await y(e.value._id);
3569
3570
  g.value.data = n(a);
3570
3571
  } catch (a) {
3571
- console.error(C, a), g.value.isError = !0;
3572
+ console.error(U, a), g.value.isError = !0;
3572
3573
  } finally {
3573
3574
  g.value.isLoaded = !0;
3574
3575
  }
@@ -3577,40 +3578,40 @@ const Rn = [
3577
3578
  (y = e.value.platform.mappings) != null && y.version && await $(
3578
3579
  tt,
3579
3580
  c,
3580
- D,
3581
+ F,
3581
3582
  "Failed to fetch payment methods:"
3582
3583
  ), ((n = e.value.platform.mappings) == null ? void 0 : n.version) == "v2" && await $(
3583
3584
  ot,
3584
3585
  h,
3585
3586
  b,
3586
3587
  "Failed to fetch customers:"
3587
- ), D.value.isLoaded = !0, b.value.isLoaded = !0;
3588
+ ), F.value.isLoaded = !0, b.value.isLoaded = !0;
3588
3589
  };
3589
3590
  return Xe(u), xe(() => {
3590
3591
  var y;
3591
3592
  return (y = e.value.platform.mappings) == null ? void 0 : y.version;
3592
3593
  }, u), (y, n) => {
3593
3594
  var a, l, v;
3594
- const g = S("FmPageHead"), C = S("FmTabs");
3595
- return m(), F("div", On, [
3596
- i(g, {
3595
+ const g = S("FmPageHead"), U = S("FmTabs");
3596
+ return m(), C("div", On, [
3597
+ s(g, {
3597
3598
  title: ((a = e.value) == null ? void 0 : a.name) || "Biztory",
3598
3599
  "back-button": !0,
3599
3600
  style: { paddingLeft: "0px", paddingRight: "0px" },
3600
- "onClick:back": p(w).back
3601
+ "onClick:back": p(V).back
3601
3602
  }, {
3602
3603
  description: _e(() => n[2] || (n[2] = [
3603
3604
  t("div", null, null, -1)
3604
3605
  ])),
3605
3606
  _: 1
3606
3607
  }, 8, ["title", "onClick:back"]),
3607
- i(C, {
3608
- "model-value": s.value,
3609
- "onUpdate:modelValue": n[0] || (n[0] = (r) => s.value = r),
3610
- items: V
3608
+ s(U, {
3609
+ "model-value": i.value,
3610
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => i.value = r),
3611
+ items: w
3611
3612
  }, null, 8, ["model-value"]),
3612
3613
  t("div", Bn, [
3613
- (m(), I(we((l = x.value) == null ? void 0 : l.component), He({
3614
+ (m(), R(we((l = x.value) == null ? void 0 : l.component), He({
3614
3615
  modelValue: e.value,
3615
3616
  "onUpdate:modelValue": n[1] || (n[1] = (r) => e.value = r)
3616
3617
  }, (v = x.value) == null ? void 0 : v.props), null, 16, ["modelValue"]))
@@ -3629,39 +3630,39 @@ const Rn = [
3629
3630
  },
3630
3631
  emits: ["update:modelValue"],
3631
3632
  setup(f) {
3632
- const { t: o } = J(), e = X(f, "modelValue"), s = ge(), V = Ve(), w = fe(), { promptLoader: x } = Ce(), { promptMessage: D } = Ae(), { restaurants: b } = ve(), _ = q(
3633
+ const { t: o } = J(), e = X(f, "modelValue"), i = ge(), w = Ve(), V = fe(), { promptLoader: x } = Ce(), { promptMessage: F } = Ae(), { restaurants: b } = ve(), _ = q(
3633
3634
  () => b.map((n) => ({ label: n.name, value: n.id }))
3634
3635
  );
3635
3636
  async function c() {
3636
- await D({
3637
+ await F({
3637
3638
  message: o("report.messages.confirmDelete", { name: e.value.name }),
3638
3639
  title: o("report.common.delete")
3639
3640
  }) && await x(async () => {
3640
3641
  try {
3641
- await Fe(e.value._id), await V.getSettings(), w.back();
3642
+ await Fe(e.value._id), await w.getSettings(), V.back();
3642
3643
  } catch (g) {
3643
- s.open({ type: "error", message: g.message });
3644
+ i.open({ type: "error", message: g.message });
3644
3645
  }
3645
3646
  });
3646
3647
  }
3647
3648
  async function h() {
3648
3649
  await x(async () => {
3649
3650
  try {
3650
- await De(e.value._id, e.value), await V.getSettings();
3651
+ await De(e.value._id, e.value), await w.getSettings();
3651
3652
  } catch (n) {
3652
- s.open({ type: "error", message: n.message });
3653
+ i.open({ type: "error", message: n.message });
3653
3654
  }
3654
3655
  });
3655
3656
  }
3656
3657
  function $(n, g) {
3657
- var C, a;
3658
- (a = (C = e.value.platform) == null ? void 0 : C.mappings) != null && a[n] && (e.value.platform.mappings[n] = e.value.platform.mappings[n].filter(
3658
+ var U, a;
3659
+ (a = (U = e.value.platform) == null ? void 0 : U.mappings) != null && a[n] && (e.value.platform.mappings[n] = e.value.platform.mappings[n].filter(
3659
3660
  (l, v) => v !== g
3660
3661
  ));
3661
3662
  }
3662
3663
  function u(n) {
3663
- var g, C;
3664
- (C = (g = e.value.platform) == null ? void 0 : g.mappings) != null && C[n] && (e.value.platform.mappings[n] = [
3664
+ var g, U;
3665
+ (U = (g = e.value.platform) == null ? void 0 : g.mappings) != null && U[n] && (e.value.platform.mappings[n] = [
3665
3666
  ...e.value.platform.mappings[n],
3666
3667
  {
3667
3668
  key: "",
@@ -3674,36 +3675,36 @@ const Rn = [
3674
3675
  async function y() {
3675
3676
  await x(async () => {
3676
3677
  try {
3677
- await Ue(e.value._id), await V.getSettings();
3678
+ await Ue(e.value._id), await w.getSettings();
3678
3679
  } catch (n) {
3679
- s.open({ type: "error", message: n.message });
3680
+ i.open({ type: "error", message: n.message });
3680
3681
  }
3681
3682
  });
3682
3683
  }
3683
3684
  return $e(async () => {
3684
- await V.getSettings();
3685
+ await w.getSettings();
3685
3686
  }), (n, g) => {
3686
- var K, N, G, Y, Q;
3687
- const C = S("FmIcon"), a = S("FmButton"), l = S("FmMenuDivider"), v = S("FmTextField"), r = S("FmSelect");
3688
- return (N = (K = e.value) == null ? void 0 : K.platform) != null && N.mappings ? (m(), F("div", En, [
3687
+ var N, A, G, Y, Q;
3688
+ const U = S("FmIcon"), a = S("FmButton"), l = S("FmMenuDivider"), v = S("FmTextField"), r = S("FmSelect");
3689
+ return (A = (N = e.value) == null ? void 0 : N.platform) != null && A.mappings ? (m(), C("div", En, [
3689
3690
  t("div", Yn, [
3690
3691
  t("div", zn, [
3691
3692
  g[4] || (g[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
3692
3693
  t("div", qn, [
3693
3694
  t("div", Hn, [
3694
- i(C, {
3695
+ s(U, {
3695
3696
  name: "refresh",
3696
3697
  class: "p-2 bg-gray-100 rounded-full",
3697
3698
  onClick: y
3698
3699
  }),
3699
- t("span", Xn, U(p(o)("report.integration.refreshSetting")), 1)
3700
+ t("span", Xn, D(p(o)("report.integration.refreshSetting")), 1)
3700
3701
  ]),
3701
- i(a, {
3702
+ s(a, {
3702
3703
  variant: "tertiary",
3703
3704
  label: p(o)("report.common.delete"),
3704
3705
  onClick: c
3705
3706
  }, null, 8, ["label"]),
3706
- i(a, {
3707
+ s(a, {
3707
3708
  variant: "primary",
3708
3709
  label: p(o)("report.common.update"),
3709
3710
  onClick: h
@@ -3711,22 +3712,22 @@ const Rn = [
3711
3712
  ])
3712
3713
  ])
3713
3714
  ]),
3714
- i(l, { style: { margin: 0 } }),
3715
+ s(l, { style: { margin: 0 } }),
3715
3716
  t("div", Gn, [
3716
3717
  t("div", Qn, [
3717
- t("div", Jn, U(p(o)("report.integration.general")), 1),
3718
+ t("div", Jn, D(p(o)("report.integration.general")), 1),
3718
3719
  t("div", Wn, [
3719
- t("div", Zn, U(p(o)("report.common.name")), 1),
3720
+ t("div", Zn, D(p(o)("report.common.name")), 1),
3720
3721
  t("div", es, [
3721
- i(v, {
3722
+ s(v, {
3722
3723
  modelValue: e.value.name,
3723
3724
  "onUpdate:modelValue": g[0] || (g[0] = (j) => e.value.name = j)
3724
3725
  }, null, 8, ["modelValue"])
3725
3726
  ])
3726
3727
  ]),
3727
3728
  t("div", ts, [
3728
- t("div", os, U(p(o)("report.integration.location")), 1),
3729
- i(r, {
3729
+ t("div", os, D(p(o)("report.integration.location")), 1),
3730
+ s(r, {
3730
3731
  "model-value": e.value.platform.locationIds[0],
3731
3732
  multiselect: !1,
3732
3733
  items: _.value,
@@ -3736,21 +3737,21 @@ const Rn = [
3736
3737
  }, null, 8, ["model-value", "items"])
3737
3738
  ])
3738
3739
  ]),
3739
- i(Ne, {
3740
+ s(Ne, {
3740
3741
  modelValue: e.value.platform,
3741
3742
  "onUpdate:modelValue": g[2] || (g[2] = (j) => e.value.platform = j),
3742
3743
  label: p(o)("report.input.email")
3743
3744
  }, null, 8, ["modelValue", "label"]),
3744
3745
  t("div", as, [
3745
- t("div", ls, U(p(o)("report.integration.iflexiHrms.employee")), 1),
3746
- i(a, {
3746
+ t("div", ls, D(p(o)("report.integration.iflexiHrms.employee")), 1),
3747
+ s(a, {
3747
3748
  variant: "primary",
3748
3749
  icon: "add",
3749
3750
  onClick: g[3] || (g[3] = () => u("employees"))
3750
3751
  })
3751
3752
  ]),
3752
3753
  t("div", ns, [
3753
- (m(!0), F(O, null, L((Q = (Y = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : Y.mappings) == null ? void 0 : Q.employees, (j, E) => (m(), I(R, {
3754
+ (m(!0), C(O, null, L((Q = (Y = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : Y.mappings) == null ? void 0 : Q.employees, (j, E) => (m(), R(K, {
3754
3755
  key: `employee-${E}`,
3755
3756
  modelValue: e.value.platform.mappings.employees[E],
3756
3757
  "onUpdate:modelValue": (z) => e.value.platform.mappings.employees[E] = z,
@@ -3778,43 +3779,43 @@ const Rn = [
3778
3779
  },
3779
3780
  emits: ["update:modelValue"],
3780
3781
  setup(f) {
3781
- const { t: o } = J(), e = B([]), s = [
3782
+ const { t: o } = J(), e = B([]), i = [
3782
3783
  {
3783
3784
  accessorKey: "name",
3784
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Name"),
3785
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Name"),
3785
3786
  enableSorting: !1
3786
3787
  },
3787
3788
  {
3788
3789
  accessorKey: "badgeNo",
3789
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Badge No"),
3790
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Badge No"),
3790
3791
  enableSorting: !1
3791
3792
  },
3792
3793
  {
3793
3794
  accessorKey: "employeeNo",
3794
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Employee No"),
3795
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Employee No"),
3795
3796
  enableSorting: !1
3796
3797
  },
3797
3798
  {
3798
3799
  accessorKey: "date",
3799
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
3800
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
3800
3801
  enableSorting: !1
3801
3802
  },
3802
3803
  {
3803
3804
  accessorKey: "time",
3804
- header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
3805
+ header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
3805
3806
  enableSorting: !1
3806
3807
  }
3807
- ], V = X(f, "modelValue"), w = B(!1), x = ge(), { dateRange: D } = Ie(ve());
3808
+ ], w = X(f, "modelValue"), V = B(!1), x = ge(), { dateRange: F } = Ie(ve());
3808
3809
  xe(
3809
- () => D.value,
3810
+ () => F.value,
3810
3811
  async () => {
3811
- if (V.value._id)
3812
+ if (w.value._id)
3812
3813
  try {
3813
- w.value = !0, e.value = await Te(V.value._id);
3814
+ V.value = !0, e.value = await Te(w.value._id);
3814
3815
  } catch (_) {
3815
3816
  x.open({ message: _.message, type: "error" });
3816
3817
  } finally {
3817
- w.value = !1;
3818
+ V.value = !1;
3818
3819
  }
3819
3820
  },
3820
3821
  {
@@ -3823,37 +3824,37 @@ const Rn = [
3823
3824
  );
3824
3825
  async function b() {
3825
3826
  try {
3826
- V.value._id ? (w.value = !0, await Be(V.value._id)) : x.open({ message: "Invalid setting", type: "error" });
3827
+ w.value._id ? (V.value = !0, await Be(w.value._id)) : x.open({ message: "Invalid setting", type: "error" });
3827
3828
  } catch (_) {
3828
3829
  x.open({ message: _.message, type: "error" });
3829
3830
  } finally {
3830
- w.value = !1;
3831
+ V.value = !1;
3831
3832
  }
3832
3833
  }
3833
3834
  return (_, c) => {
3834
3835
  const h = S("FmButton"), $ = S("FmCircularProgress"), u = S("FmTable");
3835
- return m(), F("div", is, [
3836
+ return m(), C("div", is, [
3836
3837
  t("div", rs, [
3837
- i(Re, {
3838
- "date-range": p(D),
3839
- "onUpdate:dateRange": c[0] || (c[0] = (y) => Se(D) ? D.value = y : null),
3838
+ s(Re, {
3839
+ "date-range": p(F),
3840
+ "onUpdate:dateRange": c[0] || (c[0] = (y) => Se(F) ? F.value = y : null),
3840
3841
  compare: !1
3841
3842
  }, null, 8, ["date-range"]),
3842
- i(h, {
3843
- loading: w.value,
3843
+ s(h, {
3844
+ loading: V.value,
3844
3845
  variant: "primary",
3845
3846
  label: p(o)("report.common.download"),
3846
3847
  onClick: b
3847
3848
  }, null, 8, ["loading", "label"])
3848
3849
  ]),
3849
- w.value ? (m(), F("div", ms, [
3850
- i($, { size: "xl" }),
3851
- t("span", cs, U(p(o)("report.common.isLoading")), 1)
3852
- ])) : e.value.length > 0 ? (m(), I(u, {
3850
+ V.value ? (m(), C("div", ms, [
3851
+ s($, { size: "xl" }),
3852
+ t("span", cs, D(p(o)("report.common.isLoading")), 1)
3853
+ ])) : e.value.length > 0 ? (m(), R(u, {
3853
3854
  key: 1,
3854
3855
  class: "flex overflow-y-auto",
3855
3856
  "row-data": e.value,
3856
- "column-defs": s
3857
+ "column-defs": i
3857
3858
  }, null, 8, ["row-data"])) : M("", !0)
3858
3859
  ]);
3859
3860
  };
@@ -3866,7 +3867,7 @@ const Rn = [
3866
3867
  },
3867
3868
  emits: ["update:modelValue"],
3868
3869
  setup(f) {
3869
- const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = [
3870
+ const { t: o } = J(), e = X(f, "modelValue"), i = B("setting"), w = [
3870
3871
  {
3871
3872
  label: o("report.integration.setting"),
3872
3873
  value: "setting",
@@ -3877,8 +3878,8 @@ const Rn = [
3877
3878
  value: "preview",
3878
3879
  icon: "table"
3879
3880
  }
3880
- ], w = fe(), x = q(() => {
3881
- switch (s.value) {
3881
+ ], V = fe(), x = q(() => {
3882
+ switch (i.value) {
3882
3883
  case "preview":
3883
3884
  return ds;
3884
3885
  case "setting":
@@ -3887,28 +3888,28 @@ const Rn = [
3887
3888
  return null;
3888
3889
  }
3889
3890
  });
3890
- return (D, b) => {
3891
+ return (F, b) => {
3891
3892
  var h;
3892
3893
  const _ = S("FmPageHead"), c = S("FmTabs");
3893
- return m(), F("div", us, [
3894
- i(_, {
3894
+ return m(), C("div", us, [
3895
+ s(_, {
3895
3896
  title: ((h = e.value) == null ? void 0 : h.name) || "AutoCount",
3896
3897
  "back-button": !0,
3897
3898
  style: { paddingLeft: "0px", paddingRight: "0px" },
3898
- "onClick:back": p(w).back
3899
+ "onClick:back": p(V).back
3899
3900
  }, {
3900
3901
  description: _e(() => b[2] || (b[2] = [
3901
3902
  t("div", null, null, -1)
3902
3903
  ])),
3903
3904
  _: 1
3904
3905
  }, 8, ["title", "onClick:back"]),
3905
- i(c, {
3906
- "model-value": s.value,
3907
- "onUpdate:modelValue": b[0] || (b[0] = ($) => s.value = $),
3908
- items: V
3906
+ s(c, {
3907
+ "model-value": i.value,
3908
+ "onUpdate:modelValue": b[0] || (b[0] = ($) => i.value = $),
3909
+ items: w
3909
3910
  }, null, 8, ["model-value"]),
3910
3911
  t("div", ps, [
3911
- (m(), I(we(x.value), {
3912
+ (m(), R(we(x.value), {
3912
3913
  modelValue: e.value,
3913
3914
  "onUpdate:modelValue": b[1] || (b[1] = ($) => e.value = $)
3914
3915
  }, null, 8, ["modelValue"]))
@@ -3919,19 +3920,19 @@ const Rn = [
3919
3920
  }), vs = { class: "px-24 h-full relative" }, ks = /* @__PURE__ */ H({
3920
3921
  __name: "Integration",
3921
3922
  setup(f) {
3922
- const o = B(void 0), { params: e } = Ge(), s = Ve(), V = B();
3923
+ const o = B(void 0), { params: e } = Ge(), i = Ve(), w = B();
3923
3924
  Xe(async () => {
3924
- s.settings.length === 0 && await s.getSettings();
3925
+ i.settings.length === 0 && await i.getSettings();
3925
3926
  }), xe(
3926
- () => s.settings,
3927
+ () => i.settings,
3927
3928
  (x) => {
3928
3929
  var b;
3929
- const D = x.find((_) => _._id === e.id);
3930
- D && (V.value = D, o.value = (b = V.value.platform) == null ? void 0 : b.name);
3930
+ const F = x.find((_) => _._id === e.id);
3931
+ F && (w.value = F, o.value = (b = w.value.platform) == null ? void 0 : b.name);
3931
3932
  },
3932
3933
  { immediate: !0 }
3933
3934
  );
3934
- const w = q(() => {
3935
+ const V = q(() => {
3935
3936
  switch (o.value) {
3936
3937
  case pe.Xero:
3937
3938
  return no;
@@ -3949,10 +3950,10 @@ const Rn = [
3949
3950
  return null;
3950
3951
  }
3951
3952
  });
3952
- return (x, D) => (m(), F("div", vs, [
3953
- (m(), I(we(w.value), {
3954
- modelValue: V.value,
3955
- "onUpdate:modelValue": D[0] || (D[0] = (b) => V.value = b)
3953
+ return (x, F) => (m(), C("div", vs, [
3954
+ (m(), R(we(V.value), {
3955
+ modelValue: w.value,
3956
+ "onUpdate:modelValue": F[0] || (F[0] = (b) => w.value = b)
3956
3957
  }, null, 8, ["modelValue"]))
3957
3958
  ]));
3958
3959
  }