@feedmepos/mf-report 5.4.35-beta.0 → 5.4.36-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as q, mergeModels as ye, useModel as X, computed as Y, resolveComponent as S, createElementBlock as C, openBlock as c, createElementVNode as t, createCommentVNode as N, normalizeClass as Ke, Fragment as L, renderList as H, createBlock as M, createVNode as i, withCtx as ge, toDisplayString as T, unref as v, ref as B, watch as ve, isRef as be, h as I, resolveDynamicComponent as xe, mergeProps as Le, onMounted as Ee } from "vue";
|
|
2
2
|
import { useRouter as de, useRoute as ze } from "vue-router";
|
|
3
|
-
import { u as J, I as ce, d as je, e as _e, f as we, b as
|
|
3
|
+
import { u as J, I as ce, d as je, e as _e, f as we, b as pe, q as Ye, m as qe, p as he, r as Ve, s as ke, t as $e, v as Ae, w as He, x as Xe, y as Qe, A as fe, z as Pe, B as Ge, E as Je } from "./global-loader-BqFQzk46.js";
|
|
4
4
|
import { u as Se } from "./message-dialog-UoMWOnil.js";
|
|
5
|
-
import { useSnackbar as
|
|
5
|
+
import { useSnackbar as ue } from "@feedmepos/ui-library";
|
|
6
6
|
import { s as We } from "./index-Cmh079Bh.js";
|
|
7
7
|
import { storeToRefs as Ce } from "pinia";
|
|
8
8
|
import { _ as Fe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-Xex8S8XX.js";
|
|
@@ -64,11 +64,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
64
64
|
placeholder: V.placeholder,
|
|
65
65
|
type: g.type,
|
|
66
66
|
rules: g.rules,
|
|
67
|
-
"onUpdate:modelValue": (
|
|
68
|
-
let
|
|
69
|
-
g.type === "number" && (
|
|
67
|
+
"onUpdate:modelValue": (u) => {
|
|
68
|
+
let p = u;
|
|
69
|
+
g.type === "number" && (p = Number(u)), e.value = {
|
|
70
70
|
...e.value,
|
|
71
|
-
[V.key]:
|
|
71
|
+
[V.key]: p
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
|
|
@@ -103,7 +103,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
103
103
|
}, nt = { class: "flex flex-row items-center w-[100%] justify-start" }, st = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, it = {
|
|
104
104
|
key: 0,
|
|
105
105
|
class: "flex flex-row items-center w-[100%] justify-start"
|
|
106
|
-
}, rt = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, mt = { class: "w-[calc(75%+4px)]" }, ct = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, dt = { class: "flex flex-row items-center w-[100%] justify-between" },
|
|
106
|
+
}, rt = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, mt = { class: "w-[calc(75%+4px)]" }, ct = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, dt = { class: "flex flex-row items-center w-[100%] justify-between" }, pt = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis" }, ut = { class: "w-[50%]" }, De = /* @__PURE__ */ q({
|
|
107
107
|
__name: "UploadSection",
|
|
108
108
|
props: /* @__PURE__ */ ye({
|
|
109
109
|
label: {
|
|
@@ -166,8 +166,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
166
166
|
])) : N("", !0),
|
|
167
167
|
t("div", ct, [
|
|
168
168
|
t("div", dt, [
|
|
169
|
-
t("div",
|
|
170
|
-
t("div",
|
|
169
|
+
t("div", pt, T(v(We)(g.label)) + " time ", 1),
|
|
170
|
+
t("div", ut, [
|
|
171
171
|
i(h, {
|
|
172
172
|
class: "gap-[0px]",
|
|
173
173
|
"model-value": v(je)().hour(((m = e.value.triggerTime) == null ? void 0 : m.hour) ?? 0).minute(((d = e.value.triggerTime) == null ? void 0 : d.minute) ?? 0).format("HH:mm"),
|
|
@@ -251,7 +251,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
251
251
|
return n.singleValueMode ? n.options.key.placeholder : (d = e.value[m.key]) == null ? void 0 : d.toString();
|
|
252
252
|
}, F = (m) => n.singleValueMode ? e.value : e.value[m.key], h = o;
|
|
253
253
|
return (m, d) => {
|
|
254
|
-
const V = S("FmSelect"), b = S("FmTextField"),
|
|
254
|
+
const V = S("FmSelect"), b = S("FmTextField"), u = S("FmTooltip"), p = S("FmIcon");
|
|
255
255
|
return c(), C("div", ft, [
|
|
256
256
|
t("div", {
|
|
257
257
|
class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
@@ -275,7 +275,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
275
275
|
rules: g.rules,
|
|
276
276
|
"onUpdate:modelValue": (x) => w(x, r.key)
|
|
277
277
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
|
|
278
|
-
])) : (c(), M(
|
|
278
|
+
])) : (c(), M(u, {
|
|
279
279
|
key: 1,
|
|
280
280
|
content: _(r),
|
|
281
281
|
class: "w-[50%]"
|
|
@@ -288,7 +288,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
288
288
|
], 64))), 128))
|
|
289
289
|
], 2),
|
|
290
290
|
g.removable ? (c(), C("div", yt, [
|
|
291
|
-
i(
|
|
291
|
+
i(p, {
|
|
292
292
|
color: "system-error-300",
|
|
293
293
|
class: "cursor-pointer",
|
|
294
294
|
name: "close",
|
|
@@ -341,13 +341,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
341
341
|
}),
|
|
342
342
|
emits: ["update:modelValue"],
|
|
343
343
|
setup(g) {
|
|
344
|
-
const { t: o } = J(), e = X(g, "modelValue"), n =
|
|
344
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = ue(), k = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = B(!1), d = Y(
|
|
345
345
|
() => h.map((f) => ({ label: f.name, value: f.id }))
|
|
346
346
|
), V = Y(() => {
|
|
347
347
|
var f, s;
|
|
348
348
|
return m.value ? "Connecting" : (s = (f = e.value) == null ? void 0 : f.platform) != null && s.accessToken ? "Disconnect" : "Connect";
|
|
349
349
|
}), b = B(0);
|
|
350
|
-
async function
|
|
350
|
+
async function u() {
|
|
351
351
|
var f;
|
|
352
352
|
if (m.value)
|
|
353
353
|
n.open({ type: "error", message: "Connecting in progress" });
|
|
@@ -376,7 +376,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
376
376
|
else
|
|
377
377
|
n.open({ type: "error", message: `invalid accounting ${e.value._id}` });
|
|
378
378
|
}
|
|
379
|
-
async function
|
|
379
|
+
async function p() {
|
|
380
380
|
await F({
|
|
381
381
|
message: `Confirm delete ${e.value.name}?`,
|
|
382
382
|
title: "Delete"
|
|
@@ -455,7 +455,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
455
455
|
i(P, {
|
|
456
456
|
variant: "tertiary",
|
|
457
457
|
label: "Delete",
|
|
458
|
-
onClick:
|
|
458
|
+
onClick: p
|
|
459
459
|
}),
|
|
460
460
|
i(P, {
|
|
461
461
|
variant: "primary",
|
|
@@ -474,7 +474,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
474
474
|
disabled: m.value,
|
|
475
475
|
variant: "primary",
|
|
476
476
|
label: V.value,
|
|
477
|
-
onClick:
|
|
477
|
+
onClick: u
|
|
478
478
|
}, null, 8, ["disabled", "label"])
|
|
479
479
|
]),
|
|
480
480
|
!g.tenantOptions.isLoaded && ((Z = e.value.platform) != null && Z.accessToken) ? (c(), M(E, {
|
|
@@ -662,31 +662,31 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
662
662
|
setup(g) {
|
|
663
663
|
const o = B([]), e = Y(
|
|
664
664
|
() => o.value.reduce((m, d) => {
|
|
665
|
-
const V = m.length, { invoice: b, payments:
|
|
665
|
+
const V = m.length, { invoice: b, payments: u } = d;
|
|
666
666
|
m[V] = {
|
|
667
667
|
date: b.Date,
|
|
668
668
|
contact: b.Contact.ContactID,
|
|
669
669
|
status: b.Status,
|
|
670
670
|
ref: b.Reference
|
|
671
671
|
};
|
|
672
|
-
for (let
|
|
673
|
-
const r = V +
|
|
674
|
-
m[r] || (m[r] = {}), b.LineItems[
|
|
672
|
+
for (let p = 0; p < Math.max(b.LineItems.length, u.length); p++) {
|
|
673
|
+
const r = V + p;
|
|
674
|
+
m[r] || (m[r] = {}), b.LineItems[p] && (m[r] = {
|
|
675
675
|
...m[r],
|
|
676
|
-
itemDescription: b.LineItems[
|
|
677
|
-
itemQuantity: b.LineItems[
|
|
678
|
-
itemUnitAmount: b.LineItems[
|
|
676
|
+
itemDescription: b.LineItems[p].Description,
|
|
677
|
+
itemQuantity: b.LineItems[p].Quantity,
|
|
678
|
+
itemUnitAmount: b.LineItems[p].UnitAmount,
|
|
679
679
|
// itemCode: invoice.LineItems[i].ItemCode,
|
|
680
|
-
itemAccount: b.LineItems[
|
|
681
|
-
itemTax: b.LineItems[
|
|
682
|
-
itemTaxType: b.LineItems[
|
|
683
|
-
itemAmount: b.LineItems[
|
|
684
|
-
itemDiscount: b.LineItems[
|
|
685
|
-
}), p
|
|
680
|
+
itemAccount: b.LineItems[p].AccountCode,
|
|
681
|
+
itemTax: b.LineItems[p].TaxAmount,
|
|
682
|
+
itemTaxType: b.LineItems[p].TaxType,
|
|
683
|
+
itemAmount: b.LineItems[p].LineAmount,
|
|
684
|
+
itemDiscount: b.LineItems[p].DiscountAmount
|
|
685
|
+
}), u[p] && (m[r] = {
|
|
686
686
|
...m[r],
|
|
687
|
-
paymentAccount: p
|
|
688
|
-
paymentReference: p
|
|
689
|
-
paymentAmount: p
|
|
687
|
+
paymentAccount: u[p].Account.Code,
|
|
688
|
+
paymentReference: u[p].Reference,
|
|
689
|
+
paymentAmount: u[p].Amount
|
|
690
690
|
});
|
|
691
691
|
}
|
|
692
692
|
return m;
|
|
@@ -767,7 +767,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
767
767
|
header: "Payment Amount",
|
|
768
768
|
enableSorting: !1
|
|
769
769
|
}
|
|
770
|
-
], k = X(g, "modelValue"), w = B(!1), _ =
|
|
770
|
+
], k = X(g, "modelValue"), w = B(!1), _ = ue(), { dateRange: F } = Ce(pe());
|
|
771
771
|
ve(
|
|
772
772
|
() => F.value,
|
|
773
773
|
async () => {
|
|
@@ -794,12 +794,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
return (m, d) => {
|
|
797
|
-
const V = S("FmButton"), b = S("FmCircularProgress"),
|
|
797
|
+
const V = S("FmButton"), b = S("FmCircularProgress"), u = S("FmTable");
|
|
798
798
|
return c(), C("div", Ht, [
|
|
799
799
|
t("div", Xt, [
|
|
800
800
|
i(Fe, {
|
|
801
801
|
"date-range": v(F),
|
|
802
|
-
"onUpdate:dateRange": d[0] || (d[0] = (
|
|
802
|
+
"onUpdate:dateRange": d[0] || (d[0] = (p) => be(F) ? F.value = p : null),
|
|
803
803
|
compare: !1
|
|
804
804
|
}, null, 8, ["date-range"]),
|
|
805
805
|
i(V, {
|
|
@@ -812,7 +812,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
812
812
|
w.value ? (c(), C("div", Qt, [
|
|
813
813
|
i(b, { size: "xl" }),
|
|
814
814
|
d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
|
|
815
|
-
])) : e.value.length > 0 ? (c(), M(
|
|
815
|
+
])) : e.value.length > 0 ? (c(), M(u, {
|
|
816
816
|
key: 1,
|
|
817
817
|
class: "flex overflow-scroll",
|
|
818
818
|
"row-data": e.value,
|
|
@@ -860,13 +860,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
860
860
|
async function d() {
|
|
861
861
|
if (e.value._id)
|
|
862
862
|
try {
|
|
863
|
-
const
|
|
864
|
-
k.value.data =
|
|
865
|
-
value:
|
|
866
|
-
label:
|
|
863
|
+
const u = await He(e.value._id);
|
|
864
|
+
k.value.data = u.map((p) => ({
|
|
865
|
+
value: p.id,
|
|
866
|
+
label: p.name
|
|
867
867
|
}));
|
|
868
|
-
} catch (
|
|
869
|
-
console.error("Failed to fetch tenants:",
|
|
868
|
+
} catch (u) {
|
|
869
|
+
console.error("Failed to fetch tenants:", u), k.value.isError = !0;
|
|
870
870
|
} finally {
|
|
871
871
|
k.value.isLoaded = !0;
|
|
872
872
|
}
|
|
@@ -874,13 +874,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
874
874
|
async function V() {
|
|
875
875
|
if (e.value._id)
|
|
876
876
|
try {
|
|
877
|
-
const
|
|
878
|
-
w.value.data =
|
|
879
|
-
value:
|
|
880
|
-
label: `${
|
|
877
|
+
const u = await Xe(e.value._id);
|
|
878
|
+
w.value.data = u.map((p) => ({
|
|
879
|
+
value: p.Name,
|
|
880
|
+
label: `${p.Name} - (${p.EffectiveRate}%)`
|
|
881
881
|
}));
|
|
882
|
-
} catch (
|
|
883
|
-
console.error("Failed to fetch taxes:",
|
|
882
|
+
} catch (u) {
|
|
883
|
+
console.error("Failed to fetch taxes:", u), w.value.isError = !0;
|
|
884
884
|
} finally {
|
|
885
885
|
w.value.isLoaded = !0;
|
|
886
886
|
}
|
|
@@ -888,27 +888,27 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
888
888
|
async function b() {
|
|
889
889
|
if (e.value._id)
|
|
890
890
|
try {
|
|
891
|
-
const
|
|
892
|
-
_.value.data =
|
|
893
|
-
value:
|
|
894
|
-
label: `${
|
|
891
|
+
const u = await Qe(e.value._id);
|
|
892
|
+
_.value.data = u.map((p) => ({
|
|
893
|
+
value: p.Code,
|
|
894
|
+
label: `${p.Code} ${p.Name} - [${p.Class}_${p.Type}]`
|
|
895
895
|
}));
|
|
896
|
-
} catch (
|
|
897
|
-
console.error("Failed to fetch accounts:",
|
|
896
|
+
} catch (u) {
|
|
897
|
+
console.error("Failed to fetch accounts:", u), _.value.isError = !0;
|
|
898
898
|
} finally {
|
|
899
899
|
_.value.isLoaded = !0;
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
902
|
return ve(
|
|
903
903
|
() => {
|
|
904
|
-
var
|
|
905
|
-
return (
|
|
904
|
+
var u;
|
|
905
|
+
return (u = e.value.platform) == null ? void 0 : u.accessToken;
|
|
906
906
|
},
|
|
907
|
-
(
|
|
908
|
-
|
|
907
|
+
(u) => {
|
|
908
|
+
u && (d(), V(), b());
|
|
909
909
|
},
|
|
910
910
|
{ immediate: !0 }
|
|
911
|
-
), (
|
|
911
|
+
), (u, p) => {
|
|
912
912
|
var $, l, a;
|
|
913
913
|
const r = S("FmPageHead"), x = S("FmTabs");
|
|
914
914
|
return c(), C("div", Jt, [
|
|
@@ -918,20 +918,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
918
918
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
919
919
|
"onClick:back": v(h).back
|
|
920
920
|
}, {
|
|
921
|
-
description: ge(() =>
|
|
921
|
+
description: ge(() => p[2] || (p[2] = [
|
|
922
922
|
t("div", null, null, -1)
|
|
923
923
|
])),
|
|
924
924
|
_: 1
|
|
925
925
|
}, 8, ["title", "onClick:back"]),
|
|
926
926
|
i(x, {
|
|
927
927
|
"model-value": n.value,
|
|
928
|
-
"onUpdate:modelValue":
|
|
928
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => n.value = f),
|
|
929
929
|
items: F
|
|
930
930
|
}, null, 8, ["model-value"]),
|
|
931
931
|
t("div", Wt, [
|
|
932
932
|
(c(), M(xe((l = m.value) == null ? void 0 : l.component), Le({
|
|
933
933
|
modelValue: e.value,
|
|
934
|
-
"onUpdate:modelValue":
|
|
934
|
+
"onUpdate:modelValue": p[1] || (p[1] = (f) => e.value = f)
|
|
935
935
|
}, (a = m.value) == null ? void 0 : a.props), null, 16, ["modelValue"]))
|
|
936
936
|
])
|
|
937
937
|
]);
|
|
@@ -940,7 +940,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
940
940
|
}), eo = {
|
|
941
941
|
key: 0,
|
|
942
942
|
class: "flex flex-col h-full"
|
|
943
|
-
}, to = { class: "flex flex-col gap-16 pb-[24px]" }, oo = { class: "flex flex-row justify-between items-center gap-2" }, ao = { class: "fm-typo-en-title-sm-800" }, lo = { class: "flex flex-row gap-2 items-center" }, no = { class: "relative group cursor-pointer" }, so = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, io = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mo = { class: "flex flex-row items-center justify-between" }, co = { class: "w-[25%]" },
|
|
943
|
+
}, to = { class: "flex flex-col gap-16 pb-[24px]" }, oo = { class: "flex flex-row justify-between items-center gap-2" }, ao = { class: "fm-typo-en-title-sm-800" }, lo = { class: "flex flex-row gap-2 items-center" }, no = { class: "relative group cursor-pointer" }, so = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, io = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mo = { class: "flex flex-row items-center justify-between" }, co = { class: "w-[25%]" }, po = { class: "flex-grow" }, uo = { class: "flex flex-row items-center justify-between" }, fo = { class: "w-[25%]" }, vo = { class: "flex-grow" }, go = { class: "flex flex-col gap-16" }, yo = { class: "fm-typo-en-title-sm-800" }, xo = { class: "flex flex-row items-center max-w-[100%]" }, _o = { class: "w-[25%]" }, bo = { class: "flex-grow" }, wo = { class: "flex flex-row items-center max-w-[100%]" }, ho = { class: "w-[25%]" }, Vo = { class: "flex flex-row items-center max-w-[100%]" }, ko = { class: "w-[25%]" }, $o = { class: "flex flex-col gap-16" }, So = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Co = { class: "flex flex-row items-center gap-x-16" }, Fo = { class: "fm-typo-en-title-sm-800" }, Do = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Uo = { class: "flex flex-row items-center gap-x-16" }, To = { class: "fm-typo-en-title-sm-800" }, Io = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Mo = { class: "flex flex-row items-center gap-x-16" }, Ko = { class: "fm-typo-en-title-sm-800" }, Ao = /* @__PURE__ */ q({
|
|
944
944
|
__name: "Setting",
|
|
945
945
|
props: {
|
|
946
946
|
modelValue: { required: !0 },
|
|
@@ -948,7 +948,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
948
948
|
},
|
|
949
949
|
emits: ["update:modelValue"],
|
|
950
950
|
setup(g) {
|
|
951
|
-
const o = X(g, "modelValue"), e =
|
|
951
|
+
const o = X(g, "modelValue"), e = ue(), n = _e(), k = de(), { promptLoader: w } = we(), { promptMessage: _ } = Se(), { restaurants: F } = pe(), h = Y(
|
|
952
952
|
() => F.map((l) => ({ label: l.name, value: l.id }))
|
|
953
953
|
), { t: m } = J();
|
|
954
954
|
async function d() {
|
|
@@ -978,7 +978,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
978
978
|
(A, P) => P !== a
|
|
979
979
|
));
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function u(l) {
|
|
982
982
|
var a, f;
|
|
983
983
|
if ((f = (a = o.value.platform) == null ? void 0 : a.mappings) != null && f[l]) {
|
|
984
984
|
let s;
|
|
@@ -1011,7 +1011,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1011
1011
|
];
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
|
-
const
|
|
1014
|
+
const p = [
|
|
1015
1015
|
{
|
|
1016
1016
|
label: m("report.integration.grouping.byDay"),
|
|
1017
1017
|
value: fe.BY_DAY
|
|
@@ -1085,7 +1085,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1085
1085
|
t("div", ro, T(v(m)("report.integration.bukku.authentication")), 1),
|
|
1086
1086
|
t("div", mo, [
|
|
1087
1087
|
t("div", co, T(v(m)("report.integration.subdomain")), 1),
|
|
1088
|
-
t("div",
|
|
1088
|
+
t("div", po, [
|
|
1089
1089
|
i(P, {
|
|
1090
1090
|
modelValue: o.value.platform.subdomain,
|
|
1091
1091
|
"onUpdate:modelValue": a[0] || (a[0] = (y) => o.value.platform.subdomain = y),
|
|
@@ -1093,7 +1093,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1093
1093
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1094
1094
|
])
|
|
1095
1095
|
]),
|
|
1096
|
-
t("div",
|
|
1096
|
+
t("div", uo, [
|
|
1097
1097
|
t("div", fo, T(v(m)("report.integration.token")), 1),
|
|
1098
1098
|
t("div", vo, [
|
|
1099
1099
|
i(P, {
|
|
@@ -1104,7 +1104,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1104
1104
|
])
|
|
1105
1105
|
]),
|
|
1106
1106
|
t("div", go, [
|
|
1107
|
-
t("div", yo, T(v(m)("report.integration.
|
|
1107
|
+
t("div", yo, T(v(m)("report.integration.general")), 1),
|
|
1108
1108
|
t("div", xo, [
|
|
1109
1109
|
t("div", _o, T(v(m)("report.common.name")), 1),
|
|
1110
1110
|
t("div", bo, [
|
|
@@ -1126,12 +1126,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1126
1126
|
}, null, 8, ["modelValue", "items"])
|
|
1127
1127
|
]),
|
|
1128
1128
|
t("div", Vo, [
|
|
1129
|
-
t("div", ko, T(v(m)("report.integration.
|
|
1129
|
+
t("div", ko, T(v(m)("report.integration.grouping.title")), 1),
|
|
1130
1130
|
i(Q, {
|
|
1131
1131
|
modelValue: o.value.platform.grouping,
|
|
1132
1132
|
"onUpdate:modelValue": a[4] || (a[4] = (y) => o.value.platform.grouping = y),
|
|
1133
1133
|
multiselect: !1,
|
|
1134
|
-
items:
|
|
1134
|
+
items: p,
|
|
1135
1135
|
placeholder: "Select grouping",
|
|
1136
1136
|
class: "flex-grow"
|
|
1137
1137
|
}, null, 8, ["modelValue"])
|
|
@@ -1230,7 +1230,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1230
1230
|
i(s, {
|
|
1231
1231
|
variant: "primary",
|
|
1232
1232
|
icon: "add",
|
|
1233
|
-
onClick: a[12] || (a[12] = () =>
|
|
1233
|
+
onClick: a[12] || (a[12] = () => u("items"))
|
|
1234
1234
|
})
|
|
1235
1235
|
]),
|
|
1236
1236
|
t("div", Do, [
|
|
@@ -1251,7 +1251,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1251
1251
|
i(s, {
|
|
1252
1252
|
variant: "primary",
|
|
1253
1253
|
icon: "add",
|
|
1254
|
-
onClick: a[13] || (a[13] = () =>
|
|
1254
|
+
onClick: a[13] || (a[13] = () => u("taxes"))
|
|
1255
1255
|
})
|
|
1256
1256
|
]),
|
|
1257
1257
|
t("div", Io, [
|
|
@@ -1272,7 +1272,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1272
1272
|
i(s, {
|
|
1273
1273
|
variant: "primary",
|
|
1274
1274
|
icon: "add",
|
|
1275
|
-
onClick: a[14] || (a[14] = () =>
|
|
1275
|
+
onClick: a[14] || (a[14] = () => u("payments"))
|
|
1276
1276
|
})
|
|
1277
1277
|
]),
|
|
1278
1278
|
(c(!0), C(L, null, H((D = (se = (ne = o.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.payments, (y, U) => (c(), C("div", {
|
|
@@ -1308,18 +1308,18 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1308
1308
|
setup(g) {
|
|
1309
1309
|
const o = B([]), e = Y(
|
|
1310
1310
|
() => o.value.reduce((d, V) => {
|
|
1311
|
-
const b = d.length, { invoice:
|
|
1311
|
+
const b = d.length, { invoice: u, payments: p } = V;
|
|
1312
1312
|
d[b] = {
|
|
1313
|
-
no:
|
|
1314
|
-
date:
|
|
1315
|
-
contact:
|
|
1316
|
-
status:
|
|
1317
|
-
title:
|
|
1313
|
+
no: u.number,
|
|
1314
|
+
date: u.date,
|
|
1315
|
+
contact: u._contact_name,
|
|
1316
|
+
status: u.status,
|
|
1317
|
+
title: u.title
|
|
1318
1318
|
};
|
|
1319
|
-
for (let r = 0; r < Math.max(
|
|
1319
|
+
for (let r = 0; r < Math.max(u.form_items.length, p.length); r++) {
|
|
1320
1320
|
const x = b + r;
|
|
1321
1321
|
d[x] || (d[x] = {});
|
|
1322
|
-
const $ =
|
|
1322
|
+
const $ = u.form_items[r];
|
|
1323
1323
|
$ && (d[x] = {
|
|
1324
1324
|
...d[x],
|
|
1325
1325
|
itemDescription: $.description,
|
|
@@ -1329,7 +1329,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1329
1329
|
itemTaxCode: $._tax_code_name,
|
|
1330
1330
|
itemDiscount: $.discount
|
|
1331
1331
|
});
|
|
1332
|
-
const l =
|
|
1332
|
+
const l = p[r];
|
|
1333
1333
|
l && (d[x] = {
|
|
1334
1334
|
...d[x],
|
|
1335
1335
|
paymentNo: l.number,
|
|
@@ -1432,7 +1432,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1432
1432
|
header: "Skip",
|
|
1433
1433
|
enableSorting: !1
|
|
1434
1434
|
}
|
|
1435
|
-
], w = X(g, "modelValue"), _ = B(!1), F =
|
|
1435
|
+
], w = X(g, "modelValue"), _ = B(!1), F = ue(), { dateRange: h } = Ce(pe());
|
|
1436
1436
|
ve(
|
|
1437
1437
|
() => h.value,
|
|
1438
1438
|
async () => {
|
|
@@ -1459,7 +1459,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1459
1459
|
}
|
|
1460
1460
|
}
|
|
1461
1461
|
return (d, V) => {
|
|
1462
|
-
const b = S("FmButton"),
|
|
1462
|
+
const b = S("FmButton"), u = S("FmCircularProgress"), p = S("FmTable");
|
|
1463
1463
|
return c(), C("div", Po, [
|
|
1464
1464
|
t("div", No, [
|
|
1465
1465
|
i(Fe, {
|
|
@@ -1475,9 +1475,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1475
1475
|
}, null, 8, ["loading", "label"])
|
|
1476
1476
|
]),
|
|
1477
1477
|
_.value ? (c(), C("div", Ro, [
|
|
1478
|
-
i(
|
|
1478
|
+
i(u, { size: "xl" }),
|
|
1479
1479
|
t("span", Oo, T(v(n)("report.integration.table.loading")), 1)
|
|
1480
|
-
])) : e.value.length > 0 ? (c(), M(
|
|
1480
|
+
])) : e.value.length > 0 ? (c(), M(p, {
|
|
1481
1481
|
key: 1,
|
|
1482
1482
|
class: "flex overflow-scroll",
|
|
1483
1483
|
"row-data": e.value,
|
|
@@ -1547,7 +1547,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1547
1547
|
}), zo = {
|
|
1548
1548
|
key: 0,
|
|
1549
1549
|
class: "flex flex-col h-full"
|
|
1550
|
-
}, Yo = { class: "flex flex-col gap-16 pb-[24px]" }, qo = { class: "flex flex-row justify-between items-center gap-2" }, Ho = { class: "flex flex-row gap-2 items-center" }, Xo = { class: "relative group cursor-pointer" }, Qo = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Go = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Jo = { class: "flex flex-col gap-16" }, Wo = { class: "fm-typo-en-title-sm-800" }, Zo = { class: "flex flex-row items-center max-w-[100%]" }, ea = { class: "w-[25%]" }, ta = { class: "flex-grow" }, oa = { class: "flex flex-row items-center max-w-[100%]" }, aa = { class: "w-[25%]" }, la = { class: "flex flex-row items-center max-w-[100%]" }, na = { class: "w-[25%]" }, sa = { class: "flex flex-col gap-16" }, ia = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ra = { class: "flex flex-row items-center gap-x-16" }, ma = { class: "fm-typo-en-title-sm-800" }, ca = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, da = { class: "flex flex-row items-center gap-x-16" },
|
|
1550
|
+
}, Yo = { class: "flex flex-col gap-16 pb-[24px]" }, qo = { class: "flex flex-row justify-between items-center gap-2" }, Ho = { class: "flex flex-row gap-2 items-center" }, Xo = { class: "relative group cursor-pointer" }, Qo = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Go = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Jo = { class: "flex flex-col gap-16" }, Wo = { class: "fm-typo-en-title-sm-800" }, Zo = { class: "flex flex-row items-center max-w-[100%]" }, ea = { class: "w-[25%]" }, ta = { class: "flex-grow" }, oa = { class: "flex flex-row items-center max-w-[100%]" }, aa = { class: "w-[25%]" }, la = { class: "flex flex-row items-center max-w-[100%]" }, na = { class: "w-[25%]" }, sa = { class: "flex flex-col gap-16" }, ia = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ra = { class: "flex flex-row items-center gap-x-16" }, ma = { class: "fm-typo-en-title-sm-800" }, ca = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, da = { class: "flex flex-row items-center gap-x-16" }, pa = { class: "fm-typo-en-title-sm-800" }, ua = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, fa = { class: "flex flex-row items-center gap-x-16" }, va = { class: "fm-typo-en-title-sm-800" }, ga = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ya = /* @__PURE__ */ q({
|
|
1551
1551
|
__name: "Setting",
|
|
1552
1552
|
props: {
|
|
1553
1553
|
modelValue: { required: !0 },
|
|
@@ -1555,7 +1555,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1555
1555
|
},
|
|
1556
1556
|
emits: ["update:modelValue"],
|
|
1557
1557
|
setup(g) {
|
|
1558
|
-
const { t: o } = J(), e = X(g, "modelValue"), n =
|
|
1558
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = ue(), k = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
|
|
1559
1559
|
() => h.map((l) => ({ label: l.name, value: l.id }))
|
|
1560
1560
|
);
|
|
1561
1561
|
async function d() {
|
|
@@ -1585,7 +1585,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1585
1585
|
(A, P) => P !== a
|
|
1586
1586
|
));
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1588
|
+
function u(l) {
|
|
1589
1589
|
var a, f;
|
|
1590
1590
|
(f = (a = e.value.platform) == null ? void 0 : a.mappings) != null && f[l] && (e.value.platform.mappings[l] = [
|
|
1591
1591
|
...e.value.platform.mappings[l],
|
|
@@ -1599,7 +1599,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1599
1599
|
}
|
|
1600
1600
|
]);
|
|
1601
1601
|
}
|
|
1602
|
-
const
|
|
1602
|
+
const p = [
|
|
1603
1603
|
{
|
|
1604
1604
|
label: "By day",
|
|
1605
1605
|
value: fe.BY_DAY
|
|
@@ -1649,7 +1649,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1649
1649
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1650
1650
|
onClick: $
|
|
1651
1651
|
}),
|
|
1652
|
-
t("span", Qo, T(v(o)("report.integration.
|
|
1652
|
+
t("span", Qo, T(v(o)("report.integration.refreshSetting")), 1)
|
|
1653
1653
|
]),
|
|
1654
1654
|
i(s, {
|
|
1655
1655
|
variant: "tertiary",
|
|
@@ -1667,7 +1667,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1667
1667
|
i(A, { style: { margin: 0 } }),
|
|
1668
1668
|
t("div", Go, [
|
|
1669
1669
|
t("div", Jo, [
|
|
1670
|
-
t("div", Wo, T(v(o)("report.integration.
|
|
1670
|
+
t("div", Wo, T(v(o)("report.integration.general")), 1),
|
|
1671
1671
|
t("div", Zo, [
|
|
1672
1672
|
t("div", ea, T(v(o)("report.common.name")), 1),
|
|
1673
1673
|
t("div", ta, [
|
|
@@ -1690,12 +1690,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1690
1690
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
1691
1691
|
]),
|
|
1692
1692
|
t("div", la, [
|
|
1693
|
-
t("div", na, T(v(o)("report.integration.
|
|
1693
|
+
t("div", na, T(v(o)("report.integration.grouping.title")), 1),
|
|
1694
1694
|
i(Q, {
|
|
1695
1695
|
modelValue: e.value.platform.grouping,
|
|
1696
1696
|
"onUpdate:modelValue": a[2] || (a[2] = (D) => e.value.platform.grouping = D),
|
|
1697
1697
|
multiselect: !1,
|
|
1698
|
-
items:
|
|
1698
|
+
items: p,
|
|
1699
1699
|
placeholder: "Select grouping",
|
|
1700
1700
|
class: "flex-grow"
|
|
1701
1701
|
}, null, 8, ["modelValue"])
|
|
@@ -1777,7 +1777,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1777
1777
|
i(s, {
|
|
1778
1778
|
variant: "primary",
|
|
1779
1779
|
icon: "add",
|
|
1780
|
-
onClick: a[11] || (a[11] = () =>
|
|
1780
|
+
onClick: a[11] || (a[11] = () => u("items"))
|
|
1781
1781
|
})
|
|
1782
1782
|
]),
|
|
1783
1783
|
t("div", ca, [
|
|
@@ -1794,14 +1794,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1794
1794
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1795
1795
|
]),
|
|
1796
1796
|
t("div", da, [
|
|
1797
|
-
t("div",
|
|
1797
|
+
t("div", pa, T(v(o)("report.integration.taxes")), 1),
|
|
1798
1798
|
i(s, {
|
|
1799
1799
|
variant: "primary",
|
|
1800
1800
|
icon: "add",
|
|
1801
|
-
onClick: a[12] || (a[12] = () =>
|
|
1801
|
+
onClick: a[12] || (a[12] = () => u("taxes"))
|
|
1802
1802
|
})
|
|
1803
1803
|
]),
|
|
1804
|
-
t("div",
|
|
1804
|
+
t("div", ua, [
|
|
1805
1805
|
(c(!0), C(L, null, H((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.taxes, (D, y) => (c(), M(K, {
|
|
1806
1806
|
key: `tax-${y}`,
|
|
1807
1807
|
modelValue: e.value.platform.mappings.taxes[y],
|
|
@@ -1819,7 +1819,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1819
1819
|
i(s, {
|
|
1820
1820
|
variant: "primary",
|
|
1821
1821
|
icon: "add",
|
|
1822
|
-
onClick: a[13] || (a[13] = () =>
|
|
1822
|
+
onClick: a[13] || (a[13] = () => u("payments"))
|
|
1823
1823
|
})
|
|
1824
1824
|
]),
|
|
1825
1825
|
t("div", ga, [
|
|
@@ -1852,29 +1852,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1852
1852
|
setup(g) {
|
|
1853
1853
|
const { t: o } = J(), e = B([]), n = Y(
|
|
1854
1854
|
() => e.value.reduce((d, V) => {
|
|
1855
|
-
const b = d.length, { invoice:
|
|
1855
|
+
const b = d.length, { invoice: u, payments: p } = V;
|
|
1856
1856
|
d[b] = {
|
|
1857
|
-
date:
|
|
1858
|
-
docNo:
|
|
1859
|
-
projNo:
|
|
1860
|
-
debtor:
|
|
1861
|
-
description:
|
|
1857
|
+
date: u.DocDate,
|
|
1858
|
+
docNo: u.DocNo,
|
|
1859
|
+
projNo: u.ProjNo,
|
|
1860
|
+
debtor: u.DebtorCode,
|
|
1861
|
+
description: u.Description
|
|
1862
1862
|
};
|
|
1863
|
-
for (let r = 0; r < Math.max(
|
|
1863
|
+
for (let r = 0; r < Math.max(u._items.length, p.length); r++) {
|
|
1864
1864
|
const x = b + r;
|
|
1865
|
-
d[x] || (d[x] = {}),
|
|
1865
|
+
d[x] || (d[x] = {}), u._items[r] && (d[x] = {
|
|
1866
1866
|
...d[x],
|
|
1867
|
-
itemDescription:
|
|
1868
|
-
itemUnitPrice:
|
|
1869
|
-
itemAccount:
|
|
1870
|
-
itemTaxCode:
|
|
1871
|
-
itemTax:
|
|
1872
|
-
}),
|
|
1867
|
+
itemDescription: u._items[r].DetailDescription,
|
|
1868
|
+
itemUnitPrice: u._items[r].Amount,
|
|
1869
|
+
itemAccount: u._items[r].AccNo,
|
|
1870
|
+
itemTaxCode: u._items[r].TaxType,
|
|
1871
|
+
itemTax: u._items[r].Tax
|
|
1872
|
+
}), p[r] && (d[x] = {
|
|
1873
1873
|
...d[x],
|
|
1874
|
-
paymentDocNo:
|
|
1875
|
-
paymentMethod:
|
|
1876
|
-
paymentDescription:
|
|
1877
|
-
paymentAmount:
|
|
1874
|
+
paymentDocNo: p[r].DocNo,
|
|
1875
|
+
paymentMethod: p[r].paymentMethod,
|
|
1876
|
+
paymentDescription: p[r].Description,
|
|
1877
|
+
paymentAmount: p[r].PaymentAmt
|
|
1878
1878
|
});
|
|
1879
1879
|
}
|
|
1880
1880
|
return d;
|
|
@@ -1950,7 +1950,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1950
1950
|
header: "Payment Amount",
|
|
1951
1951
|
enableSorting: !1
|
|
1952
1952
|
}
|
|
1953
|
-
], w = X(g, "modelValue"), _ = B(!1), F =
|
|
1953
|
+
], w = X(g, "modelValue"), _ = B(!1), F = ue(), { dateRange: h } = Ce(pe());
|
|
1954
1954
|
ve(
|
|
1955
1955
|
() => h.value,
|
|
1956
1956
|
async () => {
|
|
@@ -1977,7 +1977,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1977
1977
|
}
|
|
1978
1978
|
}
|
|
1979
1979
|
return (d, V) => {
|
|
1980
|
-
const b = S("FmButton"),
|
|
1980
|
+
const b = S("FmButton"), u = S("FmCircularProgress"), p = S("FmTable");
|
|
1981
1981
|
return c(), C("div", xa, [
|
|
1982
1982
|
t("div", _a, [
|
|
1983
1983
|
i(Fe, {
|
|
@@ -1993,9 +1993,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1993
1993
|
}, null, 8, ["loading", "label"])
|
|
1994
1994
|
]),
|
|
1995
1995
|
_.value ? (c(), C("div", ba, [
|
|
1996
|
-
i(
|
|
1996
|
+
i(u, { size: "xl" }),
|
|
1997
1997
|
t("span", wa, T(v(o)("report.common.isLoading")), 1)
|
|
1998
|
-
])) : n.value.length > 0 ? (c(), M(
|
|
1998
|
+
])) : n.value.length > 0 ? (c(), M(p, {
|
|
1999
1999
|
key: 1,
|
|
2000
2000
|
class: "flex overflow-scroll",
|
|
2001
2001
|
"row-data": n.value,
|
|
@@ -2073,7 +2073,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2073
2073
|
},
|
|
2074
2074
|
emits: ["update:modelValue"],
|
|
2075
2075
|
setup(g) {
|
|
2076
|
-
const { t: o } = J(), e = X(g, "modelValue"), n =
|
|
2076
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = ue(), k = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
|
|
2077
2077
|
() => h.map((l) => ({ label: l.name, value: l.id }))
|
|
2078
2078
|
);
|
|
2079
2079
|
async function d() {
|
|
@@ -2103,7 +2103,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2103
2103
|
(A, P) => P !== a
|
|
2104
2104
|
));
|
|
2105
2105
|
}
|
|
2106
|
-
function
|
|
2106
|
+
function u(l) {
|
|
2107
2107
|
var a, f;
|
|
2108
2108
|
(f = (a = e.value.platform) == null ? void 0 : a.mappings) != null && f[l] && (e.value.platform.mappings[l] = [
|
|
2109
2109
|
...e.value.platform.mappings[l],
|
|
@@ -2118,7 +2118,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2118
2118
|
}
|
|
2119
2119
|
]);
|
|
2120
2120
|
}
|
|
2121
|
-
const
|
|
2121
|
+
const p = [
|
|
2122
2122
|
{
|
|
2123
2123
|
label: "By day",
|
|
2124
2124
|
value: fe.BY_DAY
|
|
@@ -2186,7 +2186,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2186
2186
|
i(A, { style: { margin: 0 } }),
|
|
2187
2187
|
t("div", Ia, [
|
|
2188
2188
|
t("div", Ma, [
|
|
2189
|
-
t("div", Ka, T(v(o)("report.integration.
|
|
2189
|
+
t("div", Ka, T(v(o)("report.integration.general")), 1),
|
|
2190
2190
|
t("div", Aa, [
|
|
2191
2191
|
t("div", Pa, T(v(o)("report.common.name")), 1),
|
|
2192
2192
|
t("div", Na, [
|
|
@@ -2209,12 +2209,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2209
2209
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
2210
2210
|
]),
|
|
2211
2211
|
t("div", Ba, [
|
|
2212
|
-
t("div", ja, T(v(o)("report.integration.grouping")), 1),
|
|
2212
|
+
t("div", ja, T(v(o)("report.integration.grouping.title")), 1),
|
|
2213
2213
|
i(Q, {
|
|
2214
2214
|
modelValue: e.value.platform.grouping,
|
|
2215
2215
|
"onUpdate:modelValue": a[2] || (a[2] = (D) => e.value.platform.grouping = D),
|
|
2216
2216
|
multiselect: !1,
|
|
2217
|
-
items:
|
|
2217
|
+
items: p,
|
|
2218
2218
|
placeholder: "Select grouping",
|
|
2219
2219
|
class: "flex-grow"
|
|
2220
2220
|
}, null, 8, ["modelValue"])
|
|
@@ -2315,7 +2315,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2315
2315
|
i(s, {
|
|
2316
2316
|
variant: "primary",
|
|
2317
2317
|
icon: "add",
|
|
2318
|
-
onClick: a[12] || (a[12] = () =>
|
|
2318
|
+
onClick: a[12] || (a[12] = () => u("items"))
|
|
2319
2319
|
})
|
|
2320
2320
|
]),
|
|
2321
2321
|
t("div", Ha, [
|
|
@@ -2337,7 +2337,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2337
2337
|
i(s, {
|
|
2338
2338
|
variant: "primary",
|
|
2339
2339
|
icon: "add",
|
|
2340
|
-
onClick: a[13] || (a[13] = () =>
|
|
2340
|
+
onClick: a[13] || (a[13] = () => u("taxes"))
|
|
2341
2341
|
})
|
|
2342
2342
|
]),
|
|
2343
2343
|
t("div", Ga, [
|
|
@@ -2358,7 +2358,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2358
2358
|
i(s, {
|
|
2359
2359
|
variant: "primary",
|
|
2360
2360
|
icon: "add",
|
|
2361
|
-
onClick: a[14] || (a[14] = () =>
|
|
2361
|
+
onClick: a[14] || (a[14] = () => u("payments"))
|
|
2362
2362
|
})
|
|
2363
2363
|
]),
|
|
2364
2364
|
t("div", Za, [
|
|
@@ -2391,29 +2391,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2391
2391
|
setup(g) {
|
|
2392
2392
|
const { t: o } = J(), e = B([]), n = Y(
|
|
2393
2393
|
() => e.value.reduce((d, V) => {
|
|
2394
|
-
const b = d.length, { invoice:
|
|
2394
|
+
const b = d.length, { invoice: u, payments: p } = V;
|
|
2395
2395
|
d[b] = {
|
|
2396
|
-
date:
|
|
2397
|
-
docNo:
|
|
2398
|
-
debtor:
|
|
2399
|
-
description:
|
|
2396
|
+
date: u.DocDate,
|
|
2397
|
+
docNo: u.DocNo,
|
|
2398
|
+
debtor: u.Code,
|
|
2399
|
+
description: u.Description_HDR
|
|
2400
2400
|
};
|
|
2401
|
-
for (let r = 0; r < Math.max(
|
|
2401
|
+
for (let r = 0; r < Math.max(u._items.length, p.length); r++) {
|
|
2402
2402
|
const x = b + r;
|
|
2403
|
-
d[x] || (d[x] = {}),
|
|
2403
|
+
d[x] || (d[x] = {}), u._items[r] && (d[x] = {
|
|
2404
2404
|
...d[x],
|
|
2405
|
-
itemDescription:
|
|
2406
|
-
itemUnitPrice:
|
|
2407
|
-
itemAccount:
|
|
2408
|
-
itemTaxCode:
|
|
2409
|
-
itemTax:
|
|
2410
|
-
}),
|
|
2405
|
+
itemDescription: u._items[r].Description_DTL,
|
|
2406
|
+
itemUnitPrice: u._items[r].UnitPrice,
|
|
2407
|
+
itemAccount: u._items[r].ACCOUNT,
|
|
2408
|
+
itemTaxCode: u._items[r].Tax,
|
|
2409
|
+
itemTax: u._items[r].TaxAmt
|
|
2410
|
+
}), p[r] && (d[x] = {
|
|
2411
2411
|
...d[x],
|
|
2412
|
-
paymentDocNo:
|
|
2413
|
-
paymentMethod:
|
|
2414
|
-
paymentAccount:
|
|
2415
|
-
paymentDescription:
|
|
2416
|
-
paymentAmount:
|
|
2412
|
+
paymentDocNo: p[r].DOCNO_Header,
|
|
2413
|
+
paymentMethod: p[r].PAYMENTMETHOD,
|
|
2414
|
+
paymentAccount: p[r].CODE,
|
|
2415
|
+
paymentDescription: p[r].DESCRIPTION,
|
|
2416
|
+
paymentAmount: p[r].KOAMT
|
|
2417
2417
|
});
|
|
2418
2418
|
}
|
|
2419
2419
|
return d;
|
|
@@ -2484,7 +2484,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2484
2484
|
header: "Payment Amount",
|
|
2485
2485
|
enableSorting: !1
|
|
2486
2486
|
}
|
|
2487
|
-
], w = X(g, "modelValue"), _ = B(!1), F =
|
|
2487
|
+
], w = X(g, "modelValue"), _ = B(!1), F = ue(), { dateRange: h } = Ce(pe());
|
|
2488
2488
|
ve(
|
|
2489
2489
|
() => h.value,
|
|
2490
2490
|
async () => {
|
|
@@ -2511,7 +2511,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
2513
|
return (d, V) => {
|
|
2514
|
-
const b = S("FmButton"),
|
|
2514
|
+
const b = S("FmButton"), u = S("FmCircularProgress"), p = S("FmTable");
|
|
2515
2515
|
return c(), C("div", tl, [
|
|
2516
2516
|
t("div", ol, [
|
|
2517
2517
|
i(Fe, {
|
|
@@ -2527,9 +2527,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2527
2527
|
}, null, 8, ["loading", "label"])
|
|
2528
2528
|
]),
|
|
2529
2529
|
_.value ? (c(), C("div", al, [
|
|
2530
|
-
i(
|
|
2530
|
+
i(u, { size: "xl" }),
|
|
2531
2531
|
t("span", ll, T(v(o)("report.common.isLoading")), 1)
|
|
2532
|
-
])) : n.value.length > 0 ? (c(), M(
|
|
2532
|
+
])) : n.value.length > 0 ? (c(), M(p, {
|
|
2533
2533
|
key: 1,
|
|
2534
2534
|
class: "flex overflow-scroll",
|
|
2535
2535
|
"row-data": n.value,
|
|
@@ -2599,7 +2599,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2599
2599
|
}), ml = {
|
|
2600
2600
|
key: 0,
|
|
2601
2601
|
class: "flex flex-col h-full"
|
|
2602
|
-
}, cl = { class: "flex flex-col gap-16 pb-[24px]" }, dl = { class: "flex flex-row justify-between items-center gap-2" },
|
|
2602
|
+
}, cl = { class: "flex flex-col gap-16 pb-[24px]" }, dl = { class: "flex flex-row justify-between items-center gap-2" }, pl = { class: "fm-typo-en-title-sm-800" }, ul = { class: "flex flex-row gap-2 items-center" }, fl = { class: "flex flex-row gap-2 items-center" }, vl = { class: "relative group cursor-pointer" }, gl = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, yl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, xl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _l = { class: "flex flex-row items-center max-w-[100%]" }, bl = { class: "w-[25%]" }, wl = { class: "flex-grow" }, hl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Vl = { class: "flex flex-row items-center justify-between" }, kl = { class: "w-[25%]" }, $l = { class: "flex-grow" }, Sl = { class: "flex flex-row items-center justify-between" }, Cl = { class: "w-[25%]" }, Fl = { class: "flex-grow" }, Dl = { class: "flex flex-col gap-16" }, Ul = { class: "fm-typo-en-title-sm-800" }, Tl = { class: "flex flex-row items-center max-w-[100%]" }, Il = { class: "w-[25%]" }, Ml = { class: "flex-grow" }, Kl = { class: "flex flex-row items-center max-w-[100%]" }, Al = { class: "w-[25%]" }, Pl = { class: "flex flex-row items-center max-w-[100%]" }, Nl = { class: "w-[25%]" }, Rl = {
|
|
2603
2603
|
key: 0,
|
|
2604
2604
|
class: "flex flex-row items-center max-w-[100%]"
|
|
2605
2605
|
}, Ol = { class: "flex flex-col gap-16" }, Bl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, jl = { key: 1 }, Ll = { class: "flex flex-row items-center gap-x-16" }, El = { class: "fm-typo-en-title-sm-800" }, zl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Yl = { class: "flex flex-row items-center gap-x-16" }, ql = { class: "fm-typo-en-title-sm-800" }, Hl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Xl = { class: "flex flex-row items-center gap-x-16" }, Ql = { class: "fm-typo-en-title-sm-800" }, Gl = { class: "flex flex-row items-center justify-between" }, Jl = { class: "flex-grow" }, Wl = {
|
|
@@ -2631,7 +2631,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2631
2631
|
}),
|
|
2632
2632
|
emits: ["update:modelValue"],
|
|
2633
2633
|
setup(g) {
|
|
2634
|
-
const { t: o } = J(), e = X(g, "modelValue"), n =
|
|
2634
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = ue(), k = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
|
|
2635
2635
|
() => h.map(($) => ({ label: $.name, value: $.id }))
|
|
2636
2636
|
);
|
|
2637
2637
|
function d($) {
|
|
@@ -2663,13 +2663,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2663
2663
|
}
|
|
2664
2664
|
});
|
|
2665
2665
|
}
|
|
2666
|
-
function
|
|
2666
|
+
function u($, l) {
|
|
2667
2667
|
var a, f;
|
|
2668
2668
|
(f = (a = e.value.platform) == null ? void 0 : a.mappings) != null && f[$] && (e.value.platform.mappings[$] = e.value.platform.mappings[$].filter(
|
|
2669
2669
|
(s, A) => A !== l
|
|
2670
2670
|
));
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2672
|
+
function p($) {
|
|
2673
2673
|
var l, a;
|
|
2674
2674
|
(a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[$] && (e.value.platform.mappings[$] = [
|
|
2675
2675
|
...e.value.platform.mappings[$],
|
|
@@ -2751,8 +2751,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2751
2751
|
return (R = (G = e.value) == null ? void 0 : G.platform) != null && R.mappings ? (c(), C("div", ml, [
|
|
2752
2752
|
t("div", cl, [
|
|
2753
2753
|
t("div", dl, [
|
|
2754
|
-
t("div",
|
|
2755
|
-
t("div",
|
|
2754
|
+
t("div", pl, T(v(o)("report.integration.connect")), 1),
|
|
2755
|
+
t("div", ul, [
|
|
2756
2756
|
t("div", fl, [
|
|
2757
2757
|
t("div", vl, [
|
|
2758
2758
|
i(a, {
|
|
@@ -2815,7 +2815,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2815
2815
|
])
|
|
2816
2816
|
]),
|
|
2817
2817
|
t("div", Dl, [
|
|
2818
|
-
t("div", Ul, T(v(o)("report.integration.
|
|
2818
|
+
t("div", Ul, T(v(o)("report.integration.general")), 1),
|
|
2819
2819
|
t("div", Tl, [
|
|
2820
2820
|
t("div", Il, T(v(o)("report.common.name")), 1),
|
|
2821
2821
|
t("div", Ml, [
|
|
@@ -2837,13 +2837,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2837
2837
|
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
2838
2838
|
]),
|
|
2839
2839
|
t("div", Pl, [
|
|
2840
|
-
t("div", Nl, T(v(o)("report.integration.
|
|
2840
|
+
t("div", Nl, T(v(o)("report.integration.grouping.title")), 1),
|
|
2841
2841
|
i(s, {
|
|
2842
2842
|
modelValue: e.value.platform.grouping,
|
|
2843
2843
|
"onUpdate:modelValue": l[5] || (l[5] = (y) => e.value.platform.grouping = y),
|
|
2844
2844
|
multiselect: !1,
|
|
2845
2845
|
items: r,
|
|
2846
|
-
placeholder: v(o)("report.integration.
|
|
2846
|
+
placeholder: v(o)("report.integration.grouping.title"),
|
|
2847
2847
|
class: "flex-grow",
|
|
2848
2848
|
disabled: ""
|
|
2849
2849
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -2897,7 +2897,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2897
2897
|
i(f, {
|
|
2898
2898
|
variant: "primary",
|
|
2899
2899
|
icon: "add",
|
|
2900
|
-
onClick: l[9] || (l[9] = () =>
|
|
2900
|
+
onClick: l[9] || (l[9] = () => p("items"))
|
|
2901
2901
|
})
|
|
2902
2902
|
]),
|
|
2903
2903
|
t("div", zl, [
|
|
@@ -2910,7 +2910,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2910
2910
|
code: { placeholder: "Account code", editable: !0 }
|
|
2911
2911
|
},
|
|
2912
2912
|
removable: !0,
|
|
2913
|
-
onRemove: () =>
|
|
2913
|
+
onRemove: () => u("items", U)
|
|
2914
2914
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2915
2915
|
]),
|
|
2916
2916
|
t("div", Yl, [
|
|
@@ -2918,7 +2918,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2918
2918
|
i(f, {
|
|
2919
2919
|
variant: "primary",
|
|
2920
2920
|
icon: "add",
|
|
2921
|
-
onClick: l[10] || (l[10] = () =>
|
|
2921
|
+
onClick: l[10] || (l[10] = () => p("taxes"))
|
|
2922
2922
|
})
|
|
2923
2923
|
]),
|
|
2924
2924
|
t("div", Hl, [
|
|
@@ -2931,7 +2931,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2931
2931
|
account: { placeholder: "Account code", editable: !0 }
|
|
2932
2932
|
},
|
|
2933
2933
|
removable: !0,
|
|
2934
|
-
onRemove: () =>
|
|
2934
|
+
onRemove: () => u("taxes", U)
|
|
2935
2935
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2936
2936
|
]),
|
|
2937
2937
|
t("div", Xl, [
|
|
@@ -2939,7 +2939,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2939
2939
|
i(f, {
|
|
2940
2940
|
variant: "primary",
|
|
2941
2941
|
icon: "add",
|
|
2942
|
-
onClick: l[11] || (l[11] = () =>
|
|
2942
|
+
onClick: l[11] || (l[11] = () => p("paymentMethods"))
|
|
2943
2943
|
})
|
|
2944
2944
|
]),
|
|
2945
2945
|
t("div", Gl, [
|
|
@@ -2993,7 +2993,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2993
2993
|
}
|
|
2994
2994
|
},
|
|
2995
2995
|
removable: !0,
|
|
2996
|
-
onRemove: () =>
|
|
2996
|
+
onRemove: () => u("paymentMethods", U)
|
|
2997
2997
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"])
|
|
2998
2998
|
])) : N("", !0)
|
|
2999
2999
|
]);
|
|
@@ -3006,7 +3006,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3006
3006
|
});
|
|
3007
3007
|
function an(g) {
|
|
3008
3008
|
return g.reduce((o, e) => {
|
|
3009
|
-
var w, _, F, h, m, d, V, b,
|
|
3009
|
+
var w, _, F, h, m, d, V, b, u, p, r, x, $, l, a, f, s, A, P, Q, E, G;
|
|
3010
3010
|
const { invoice: n } = e, k = o.length;
|
|
3011
3011
|
o[k] = {
|
|
3012
3012
|
invoice_date: n.invoice_date,
|
|
@@ -3021,8 +3021,8 @@ function an(g) {
|
|
|
3021
3021
|
item_tax: (h = n.items[0]) == null ? void 0 : h.total_tax,
|
|
3022
3022
|
item_tax_label: ((m = n.items[0]) == null ? void 0 : m.tax_label) || "-",
|
|
3023
3023
|
payment_amount: ((V = (d = n.transactions) == null ? void 0 : d[0]) == null ? void 0 : V.amount) || void 0,
|
|
3024
|
-
payment_method: ((
|
|
3025
|
-
payment_term: ((
|
|
3024
|
+
payment_method: ((u = (b = n.transactions) == null ? void 0 : b[0]) == null ? void 0 : u.payment_method) || "-",
|
|
3025
|
+
payment_term: ((p = n == null ? void 0 : n.payment_term) == null ? void 0 : p.name) || ""
|
|
3026
3026
|
};
|
|
3027
3027
|
for (let R = 1; R < Math.max(((r = n.items) == null ? void 0 : r.length) || 0, ((x = n.transactions) == null ? void 0 : x.length) || 0); R++) {
|
|
3028
3028
|
const j = k + R;
|
|
@@ -3121,7 +3121,7 @@ const ln = [
|
|
|
3121
3121
|
];
|
|
3122
3122
|
function nn(g) {
|
|
3123
3123
|
return g.reduce((o, e) => {
|
|
3124
|
-
var F, h, m, d, V, b,
|
|
3124
|
+
var F, h, m, d, V, b, u, p, r, x;
|
|
3125
3125
|
const { invoice: n, payments: k } = e, w = o.length;
|
|
3126
3126
|
o[w] = {
|
|
3127
3127
|
invoice_date: n.invoice_date,
|
|
@@ -3135,8 +3135,8 @@ function nn(g) {
|
|
|
3135
3135
|
service_charge_amount: ((b = n.service_charges[0]) == null ? void 0 : b.total) ?? "",
|
|
3136
3136
|
rounding: n.rounding ?? 0,
|
|
3137
3137
|
payment_term_id: n.payment_term.name ?? "",
|
|
3138
|
-
payment_term_amount: ((
|
|
3139
|
-
payment_method: ((
|
|
3138
|
+
payment_term_amount: ((u = n.terms[w]) == null ? void 0 : u.amount) ?? "",
|
|
3139
|
+
payment_method: ((p = k[0]) == null ? void 0 : p.payment_method_name) || ""
|
|
3140
3140
|
};
|
|
3141
3141
|
const _ = Math.max(
|
|
3142
3142
|
((r = n.items) == null ? void 0 : r.length) || 0,
|
|
@@ -3243,7 +3243,7 @@ const sn = [
|
|
|
3243
3243
|
},
|
|
3244
3244
|
emits: ["update:modelValue"],
|
|
3245
3245
|
setup(g) {
|
|
3246
|
-
const o = X(g, "modelValue"), e = B(!1), n =
|
|
3246
|
+
const o = X(g, "modelValue"), e = B(!1), n = ue(), { dateRange: k } = Ce(pe()), w = B([]);
|
|
3247
3247
|
ve(
|
|
3248
3248
|
() => k.value,
|
|
3249
3249
|
async () => {
|
|
@@ -3287,12 +3287,12 @@ const sn = [
|
|
|
3287
3287
|
}
|
|
3288
3288
|
}
|
|
3289
3289
|
return (m, d) => {
|
|
3290
|
-
const V = S("FmButton"), b = S("FmCircularProgress"),
|
|
3290
|
+
const V = S("FmButton"), b = S("FmCircularProgress"), u = S("FmTable");
|
|
3291
3291
|
return c(), C("div", rn, [
|
|
3292
3292
|
t("div", mn, [
|
|
3293
3293
|
i(Fe, {
|
|
3294
3294
|
"date-range": v(k),
|
|
3295
|
-
"onUpdate:dateRange": d[0] || (d[0] = (
|
|
3295
|
+
"onUpdate:dateRange": d[0] || (d[0] = (p) => be(k) ? k.value = p : null),
|
|
3296
3296
|
compare: !1
|
|
3297
3297
|
}, null, 8, ["date-range"]),
|
|
3298
3298
|
i(V, {
|
|
@@ -3305,7 +3305,7 @@ const sn = [
|
|
|
3305
3305
|
e.value ? (c(), C("div", cn, [
|
|
3306
3306
|
i(b, { size: "xl" }),
|
|
3307
3307
|
d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
|
|
3308
|
-
])) : (c(), M(
|
|
3308
|
+
])) : (c(), M(u, {
|
|
3309
3309
|
key: 1,
|
|
3310
3310
|
class: "flex overflow-scroll",
|
|
3311
3311
|
"row-data": _.value,
|
|
@@ -3314,7 +3314,7 @@ const sn = [
|
|
|
3314
3314
|
]);
|
|
3315
3315
|
};
|
|
3316
3316
|
}
|
|
3317
|
-
}),
|
|
3317
|
+
}), pn = { class: "h-full relative flex flex-col" }, un = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, fn = /* @__PURE__ */ q({
|
|
3318
3318
|
__name: "Biztory",
|
|
3319
3319
|
props: {
|
|
3320
3320
|
modelValue: { required: !0 },
|
|
@@ -3350,22 +3350,22 @@ const sn = [
|
|
|
3350
3350
|
default:
|
|
3351
3351
|
return null;
|
|
3352
3352
|
}
|
|
3353
|
-
}), F = B({}), h = B({}), m = (
|
|
3353
|
+
}), F = B({}), h = B({}), m = (p, r) => p.map((x) => ({
|
|
3354
3354
|
label: r.length > 2 ? `ID:${x[r[2]]} [${x[r[0]]}] ${x[r[1]]}` : `[${x[r[0]]}] ${x[r[1]]}`,
|
|
3355
3355
|
value: x.id,
|
|
3356
3356
|
cnId: x.cnId ? x.cnId : null
|
|
3357
|
-
})), d = (
|
|
3357
|
+
})), d = (p) => m(p, ["wallet", "name"]), V = (p) => m(p, ["id", "name"]), b = async (p, r, x, $) => {
|
|
3358
3358
|
try {
|
|
3359
|
-
const l = await
|
|
3359
|
+
const l = await p(e.value._id);
|
|
3360
3360
|
x.value.data = r(l);
|
|
3361
3361
|
} catch (l) {
|
|
3362
3362
|
console.error($, l), x.value.isError = !0;
|
|
3363
3363
|
} finally {
|
|
3364
3364
|
x.value.isLoaded = !0;
|
|
3365
3365
|
}
|
|
3366
|
-
},
|
|
3367
|
-
var
|
|
3368
|
-
(
|
|
3366
|
+
}, u = async () => {
|
|
3367
|
+
var p, r;
|
|
3368
|
+
(p = e.value.platform.mappings) != null && p.version && await b(
|
|
3369
3369
|
Ge,
|
|
3370
3370
|
d,
|
|
3371
3371
|
F,
|
|
@@ -3377,13 +3377,13 @@ const sn = [
|
|
|
3377
3377
|
"Failed to fetch customers:"
|
|
3378
3378
|
), F.value.isLoaded = !0, h.value.isLoaded = !0;
|
|
3379
3379
|
};
|
|
3380
|
-
return Ee(
|
|
3381
|
-
var
|
|
3382
|
-
return (
|
|
3383
|
-
},
|
|
3380
|
+
return Ee(u), ve(() => {
|
|
3381
|
+
var p;
|
|
3382
|
+
return (p = e.value.platform.mappings) == null ? void 0 : p.version;
|
|
3383
|
+
}, u), (p, r) => {
|
|
3384
3384
|
var l, a, f;
|
|
3385
3385
|
const x = S("FmPageHead"), $ = S("FmTabs");
|
|
3386
|
-
return c(), C("div",
|
|
3386
|
+
return c(), C("div", pn, [
|
|
3387
3387
|
i(x, {
|
|
3388
3388
|
title: ((l = e.value) == null ? void 0 : l.name) || "Biztory",
|
|
3389
3389
|
"back-button": !0,
|
|
@@ -3400,7 +3400,7 @@ const sn = [
|
|
|
3400
3400
|
"onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
|
|
3401
3401
|
items: k
|
|
3402
3402
|
}, null, 8, ["model-value"]),
|
|
3403
|
-
t("div",
|
|
3403
|
+
t("div", un, [
|
|
3404
3404
|
(c(), M(xe((a = _.value) == null ? void 0 : a.component), Le({
|
|
3405
3405
|
modelValue: e.value,
|
|
3406
3406
|
"onUpdate:modelValue": r[1] || (r[1] = (s) => e.value = s)
|
|
@@ -3420,7 +3420,7 @@ const sn = [
|
|
|
3420
3420
|
},
|
|
3421
3421
|
emits: ["update:modelValue"],
|
|
3422
3422
|
setup(g) {
|
|
3423
|
-
const { t: o } = J(), e = X(g, "modelValue"), n =
|
|
3423
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = ue(), k = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
|
|
3424
3424
|
() => h.map((r) => ({ label: r.name, value: r.id }))
|
|
3425
3425
|
);
|
|
3426
3426
|
async function d() {
|
|
@@ -3450,7 +3450,7 @@ const sn = [
|
|
|
3450
3450
|
(a, f) => f !== x
|
|
3451
3451
|
));
|
|
3452
3452
|
}
|
|
3453
|
-
function
|
|
3453
|
+
function u(r) {
|
|
3454
3454
|
var x, $;
|
|
3455
3455
|
($ = (x = e.value.platform) == null ? void 0 : x.mappings) != null && $[r] && (e.value.platform.mappings[r] = [
|
|
3456
3456
|
...e.value.platform.mappings[r],
|
|
@@ -3462,7 +3462,7 @@ const sn = [
|
|
|
3462
3462
|
}
|
|
3463
3463
|
]);
|
|
3464
3464
|
}
|
|
3465
|
-
async function
|
|
3465
|
+
async function p() {
|
|
3466
3466
|
await _(async () => {
|
|
3467
3467
|
try {
|
|
3468
3468
|
await ke(e.value._id), await k.getSettings();
|
|
@@ -3483,7 +3483,7 @@ const sn = [
|
|
|
3483
3483
|
i($, {
|
|
3484
3484
|
name: "refresh",
|
|
3485
3485
|
class: "p-2 bg-gray-100 rounded-full",
|
|
3486
|
-
onClick:
|
|
3486
|
+
onClick: p
|
|
3487
3487
|
}),
|
|
3488
3488
|
t("span", bn, T(v(o)("report.integration.refreshSetting")), 1)
|
|
3489
3489
|
]),
|
|
@@ -3503,7 +3503,7 @@ const sn = [
|
|
|
3503
3503
|
i(a, { style: { margin: 0 } }),
|
|
3504
3504
|
t("div", wn, [
|
|
3505
3505
|
t("div", hn, [
|
|
3506
|
-
t("div", Vn, T(v(o)("report.integration.
|
|
3506
|
+
t("div", Vn, T(v(o)("report.integration.general")), 1),
|
|
3507
3507
|
t("div", kn, [
|
|
3508
3508
|
t("div", $n, T(v(o)("report.common.name")), 1),
|
|
3509
3509
|
t("div", Sn, [
|
|
@@ -3535,7 +3535,7 @@ const sn = [
|
|
|
3535
3535
|
i(l, {
|
|
3536
3536
|
variant: "primary",
|
|
3537
3537
|
icon: "add",
|
|
3538
|
-
onClick: x[3] || (x[3] = () =>
|
|
3538
|
+
onClick: x[3] || (x[3] = () => u("employees"))
|
|
3539
3539
|
})
|
|
3540
3540
|
]),
|
|
3541
3541
|
t("div", Tn, [
|
|
@@ -3593,7 +3593,7 @@ const sn = [
|
|
|
3593
3593
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
|
|
3594
3594
|
enableSorting: !1
|
|
3595
3595
|
}
|
|
3596
|
-
], k = X(g, "modelValue"), w = B(!1), _ =
|
|
3596
|
+
], k = X(g, "modelValue"), w = B(!1), _ = ue(), { dateRange: F } = Ce(pe());
|
|
3597
3597
|
ve(
|
|
3598
3598
|
() => F.value,
|
|
3599
3599
|
async () => {
|
|
@@ -3620,12 +3620,12 @@ const sn = [
|
|
|
3620
3620
|
}
|
|
3621
3621
|
}
|
|
3622
3622
|
return (m, d) => {
|
|
3623
|
-
const V = S("FmButton"), b = S("FmCircularProgress"),
|
|
3623
|
+
const V = S("FmButton"), b = S("FmCircularProgress"), u = S("FmTable");
|
|
3624
3624
|
return c(), C("div", Mn, [
|
|
3625
3625
|
t("div", Kn, [
|
|
3626
3626
|
i(Fe, {
|
|
3627
3627
|
"date-range": v(F),
|
|
3628
|
-
"onUpdate:dateRange": d[0] || (d[0] = (
|
|
3628
|
+
"onUpdate:dateRange": d[0] || (d[0] = (p) => be(F) ? F.value = p : null),
|
|
3629
3629
|
compare: !1
|
|
3630
3630
|
}, null, 8, ["date-range"]),
|
|
3631
3631
|
i(V, {
|
|
@@ -3638,7 +3638,7 @@ const sn = [
|
|
|
3638
3638
|
w.value ? (c(), C("div", An, [
|
|
3639
3639
|
i(b, { size: "xl" }),
|
|
3640
3640
|
t("span", Pn, T(v(o)("report.common.isLoading")), 1)
|
|
3641
|
-
])) : e.value.length > 0 ? (c(), M(
|
|
3641
|
+
])) : e.value.length > 0 ? (c(), M(u, {
|
|
3642
3642
|
key: 1,
|
|
3643
3643
|
class: "flex overflow-scroll",
|
|
3644
3644
|
"row-data": e.value,
|