@feedmepos/mf-report 5.4.26-beta.0 → 5.4.26
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.
- package/dist/{App-BoZH2PYv.js → App-BTtLL4Ww.js} +42 -42
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-BaVjCBz9.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-CIDrrVrf.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-B4f9Qgei.js → Default.vue_vue_type_script_setup_true_lang-Z5LtA_sJ.js} +2 -2
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-Cvi0PIHZ.js → DynamicWidget.vue_vue_type_script_setup_true_lang-Clf_cFM6.js} +4 -4
- package/dist/{InsightView-iO1DgaKN.js → InsightView-B9wieGwJ.js} +6 -6
- package/dist/{Integration-ClrG1i5Y.js → Integration-B7CQ-7rL.js} +1057 -1057
- package/dist/{Integrations-OOJ4jft8.js → Integrations-C0KEvLA9.js} +3 -3
- package/dist/{Layout-ClwUF-EC.js → Layout-oCm1ZKHc.js} +1 -1
- package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DtCmKms0.js → LocationSelect.vue_vue_type_script_setup_true_lang-CGsQmh3S.js} +2 -2
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CwPa5SJD.js → MenuTab.vue_vue_type_script_setup_true_lang-oIsq1i1c.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CJ3bPh1t.js → NavigationTab.vue_vue_type_script_setup_true_lang-BYnAPN-Z.js} +4 -4
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-8iT-uGdI.js → NoData.vue_vue_type_script_setup_true_lang-O7qHGZkw.js} +1 -1
- package/dist/{OverviewView-Cu0vhmvX.js → OverviewView-CgTMd0bI.js} +5 -5
- package/dist/{Report-BTZHT5qB.js → Report-D84YMAZ8.js} +4 -4
- package/dist/{ReportEditor-GzXgUnoj.js → ReportEditor-B9JjBn2E.js} +6 -6
- package/dist/{ReportView-luv8kSxp.js → ReportView-DMt1g_wQ.js} +7 -7
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-gtUCqf4j.js → SelectComponent.vue_vue_type_script_setup_true_lang-B5OLIl_Y.js} +1 -1
- package/dist/{Setting-Dq2bJn7G.js → Setting-DLEnDfks.js} +4 -4
- package/dist/{TileEditor-BJl21OHA.js → TileEditor-BZMoyToa.js} +8 -8
- package/dist/{TransitionFade-Du_mD_Gy.js → TransitionFade-DOnRrPSQ.js} +4 -4
- package/dist/app.js +11 -11
- package/dist/{global-loader-BKQvLNRz.js → global-loader-D9UMph7l.js} +308 -308
- package/dist/{index-2OLtpO8C.js → index-CxVnRxOJ.js} +1 -1
- package/dist/{report-schema-D791R8wK.js → report-schema-BEEUlheS.js} +1 -1
- package/dist/{timeFormat-DWBAXBup.js → timeFormat-BRqkZ3bP.js} +1 -1
- package/dist/{v4-D9BAXC_9.js → v4-Da8QN1GW.js} +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as H, mergeModels as _e, useModel as Q, computed as z, resolveComponent as
|
|
1
|
+
import { defineComponent as H, mergeModels as _e, useModel as Q, computed as z, resolveComponent as $, createElementBlock as F, openBlock as c, createElementVNode as t, createCommentVNode as R, normalizeClass as Ke, Fragment as L, renderList as X, createBlock as K, createVNode as i, withCtx as xe, toDisplayString as T, unref as f, ref as B, watch as ge, isRef as he, h as I, resolveDynamicComponent as be, mergeProps as Le, onMounted as Ee } from "vue";
|
|
2
2
|
import { useRouter as pe, useRoute as ze } from "vue-router";
|
|
3
|
-
import { u as W, I as de, d as je, e as we, f as ke, b as ue, q as Ye, m as qe, p as Ve, r as $e, s as Se, t as Ce, v as Ae, w as He, x as Xe, y as Qe, A as ve, z as Pe, B as Ge, E as Je } from "./global-loader-
|
|
3
|
+
import { u as W, I as de, d as je, e as we, f as ke, b as ue, q as Ye, m as qe, p as Ve, r as $e, s as Se, t as Ce, v as Ae, w as He, x as Xe, y as Qe, A as ve, z as Pe, B as Ge, E as Je } from "./global-loader-D9UMph7l.js";
|
|
4
4
|
import { u as Fe } from "./message-dialog-UoMWOnil.js";
|
|
5
5
|
import { useSnackbar as fe } from "@feedmepos/ui-library";
|
|
6
|
-
import { s as We } from "./index-
|
|
6
|
+
import { s as We } from "./index-CxVnRxOJ.js";
|
|
7
7
|
import { storeToRefs as De } from "pinia";
|
|
8
|
-
import { _ as Ue } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as Ue } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-CIDrrVrf.js";
|
|
9
9
|
const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, et = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, tt = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "w-[24px] flex items-center"
|
|
12
|
-
},
|
|
12
|
+
}, A = /* @__PURE__ */ H({
|
|
13
13
|
__name: "MappingField",
|
|
14
14
|
props: /* @__PURE__ */ _e({
|
|
15
15
|
removable: {
|
|
@@ -33,65 +33,65 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
33
33
|
modelModifiers: {}
|
|
34
34
|
}),
|
|
35
35
|
emits: /* @__PURE__ */ _e(["remove"], ["update:modelValue"]),
|
|
36
|
-
setup(
|
|
37
|
-
const e = Q(
|
|
38
|
-
() => Object.keys(n.options).map((
|
|
39
|
-
const
|
|
36
|
+
setup(g, { emit: o }) {
|
|
37
|
+
const e = Q(g, "modelValue"), n = g, k = z(
|
|
38
|
+
() => Object.keys(n.options).map((x) => {
|
|
39
|
+
const D = n.options[x];
|
|
40
40
|
return {
|
|
41
|
-
placeholder:
|
|
42
|
-
key:
|
|
43
|
-
editable:
|
|
41
|
+
placeholder: D.placeholder,
|
|
42
|
+
key: x,
|
|
43
|
+
editable: D.editable
|
|
44
44
|
};
|
|
45
45
|
})
|
|
46
|
-
),
|
|
47
|
-
return (
|
|
48
|
-
const
|
|
49
|
-
return
|
|
46
|
+
), b = o;
|
|
47
|
+
return (x, D) => {
|
|
48
|
+
const w = $("FmTextField"), m = $("FmTooltip"), d = $("FmIcon");
|
|
49
|
+
return c(), F("div", Ze, [
|
|
50
50
|
t("div", {
|
|
51
|
-
class: Ke(`${
|
|
51
|
+
class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
52
52
|
}, [
|
|
53
|
-
(
|
|
54
|
-
var
|
|
55
|
-
return
|
|
56
|
-
key:
|
|
53
|
+
(c(!0), F(L, null, X(k.value, (h) => {
|
|
54
|
+
var _;
|
|
55
|
+
return c(), F(L, {
|
|
56
|
+
key: h.key
|
|
57
57
|
}, [
|
|
58
|
-
|
|
58
|
+
h.editable ? (c(), F("div", {
|
|
59
59
|
key: 0,
|
|
60
|
-
class: Ke(`${
|
|
60
|
+
class: Ke(`${g.removable ? "w-[50%]" : "w-[100%]"}`)
|
|
61
61
|
}, [
|
|
62
|
-
i(
|
|
63
|
-
"model-value": e.value[
|
|
64
|
-
placeholder:
|
|
65
|
-
type:
|
|
66
|
-
rules:
|
|
67
|
-
"onUpdate:modelValue": (
|
|
68
|
-
let
|
|
69
|
-
|
|
62
|
+
i(w, {
|
|
63
|
+
"model-value": e.value[h.key],
|
|
64
|
+
placeholder: h.placeholder,
|
|
65
|
+
type: g.type,
|
|
66
|
+
rules: g.rules,
|
|
67
|
+
"onUpdate:modelValue": (u) => {
|
|
68
|
+
let p = u;
|
|
69
|
+
g.type === "number" && (p = Number(u)), e.value = {
|
|
70
70
|
...e.value,
|
|
71
|
-
[
|
|
71
|
+
[h.key]: p
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
|
|
75
|
-
], 2)) : (
|
|
75
|
+
], 2)) : (c(), K(m, {
|
|
76
76
|
key: 1,
|
|
77
|
-
content: (
|
|
77
|
+
content: (_ = e.value[h.key]) == null ? void 0 : _.toString(),
|
|
78
78
|
class: "w-[50%]"
|
|
79
79
|
}, {
|
|
80
80
|
default: xe(() => [
|
|
81
|
-
t("div", et, T(e.value[
|
|
81
|
+
t("div", et, T(e.value[h.key]), 1)
|
|
82
82
|
]),
|
|
83
83
|
_: 2
|
|
84
84
|
}, 1032, ["content"]))
|
|
85
85
|
], 64);
|
|
86
86
|
}), 128))
|
|
87
87
|
], 2),
|
|
88
|
-
|
|
89
|
-
i(
|
|
88
|
+
g.removable ? (c(), F("div", tt, [
|
|
89
|
+
i(d, {
|
|
90
90
|
color: "system-error-300",
|
|
91
91
|
class: "cursor-pointer",
|
|
92
92
|
name: "close",
|
|
93
93
|
size: "md",
|
|
94
|
-
onClick:
|
|
94
|
+
onClick: D[0] || (D[0] = (h) => b("remove"))
|
|
95
95
|
})
|
|
96
96
|
])) : R("", !0)
|
|
97
97
|
]);
|
|
@@ -119,8 +119,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
119
119
|
modelModifiers: {}
|
|
120
120
|
}),
|
|
121
121
|
emits: ["update:modelValue"],
|
|
122
|
-
setup(
|
|
123
|
-
const { t: o } = W(), e = Q(
|
|
122
|
+
setup(g) {
|
|
123
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = z(() => {
|
|
124
124
|
switch (e.value.name) {
|
|
125
125
|
case de.AutoCount:
|
|
126
126
|
case de.SQL:
|
|
@@ -130,34 +130,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
130
130
|
return !1;
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
-
return (
|
|
134
|
-
var
|
|
135
|
-
const
|
|
136
|
-
return
|
|
133
|
+
return (k, b) => {
|
|
134
|
+
var m, d;
|
|
135
|
+
const x = $("FmSwitch"), D = $("FmTextField"), w = $("FmTimePicker");
|
|
136
|
+
return c(), F(L, null, [
|
|
137
137
|
t("div", ot, [
|
|
138
|
-
t("div", at, T(f(o)("report.integration.auto", { label:
|
|
139
|
-
|
|
138
|
+
t("div", at, T(f(o)("report.integration.auto", { label: g.label })), 1),
|
|
139
|
+
g.label == "upload" ? (c(), F("div", lt, T(f(o)("report.integration.lastUploadDate")) + ": " + T(g.lastUploadDate ? f(je)(g.lastUploadDate).format("MMMM D, YYYY h:mm A") : f(o)("report.integration.noData.title")), 1)) : R("", !0)
|
|
140
140
|
]),
|
|
141
141
|
t("div", nt, [
|
|
142
142
|
t("div", st, T(f(o)("report.common.enable")), 1),
|
|
143
|
-
i(
|
|
143
|
+
i(x, {
|
|
144
144
|
modelValue: e.value.enable,
|
|
145
|
-
"onUpdate:modelValue":
|
|
145
|
+
"onUpdate:modelValue": b[0] || (b[0] = (h) => e.value.enable = h),
|
|
146
146
|
style: { gap: "0px" }
|
|
147
147
|
}, null, 8, ["modelValue"])
|
|
148
148
|
]),
|
|
149
|
-
n.value ? (
|
|
149
|
+
n.value ? (c(), F("div", it, [
|
|
150
150
|
t("div", rt, T(f(o)("report.common.email")), 1),
|
|
151
151
|
t("div", mt, [
|
|
152
|
-
i(
|
|
152
|
+
i(D, {
|
|
153
153
|
"model-value": (e.value.emails || []).join(","),
|
|
154
154
|
placeholder: "Email",
|
|
155
|
-
"onUpdate:modelValue":
|
|
155
|
+
"onUpdate:modelValue": b[1] || (b[1] = (h) => {
|
|
156
156
|
switch (e.value.name) {
|
|
157
157
|
case f(de).AutoCount:
|
|
158
158
|
case f(de).SQL:
|
|
159
159
|
case f(de).iFlexi_HRMS:
|
|
160
|
-
e.value.emails =
|
|
160
|
+
e.value.emails = h.split(",");
|
|
161
161
|
break;
|
|
162
162
|
}
|
|
163
163
|
})
|
|
@@ -166,18 +166,18 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
166
166
|
])) : R("", !0),
|
|
167
167
|
t("div", ct, [
|
|
168
168
|
t("div", dt, [
|
|
169
|
-
t("div", pt, T(f(We)(
|
|
169
|
+
t("div", pt, T(f(We)(g.label)) + " time ", 1),
|
|
170
170
|
t("div", ut, [
|
|
171
|
-
i(
|
|
171
|
+
i(w, {
|
|
172
172
|
class: "gap-[0px]",
|
|
173
|
-
"model-value": f(je)().hour(((
|
|
174
|
-
"onUpdate:modelValue":
|
|
175
|
-
|
|
173
|
+
"model-value": f(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"),
|
|
174
|
+
"onUpdate:modelValue": b[2] || (b[2] = (h) => {
|
|
175
|
+
h && (e.value.triggerTime.hour = Number(h.split(":")[0]), e.value.triggerTime.minute = Number(h.split(":")[1]));
|
|
176
176
|
})
|
|
177
177
|
}, null, 8, ["model-value"])
|
|
178
178
|
])
|
|
179
179
|
]),
|
|
180
|
-
i(
|
|
180
|
+
i(A, {
|
|
181
181
|
"model-value": {
|
|
182
182
|
label: f(o)("report.integration.delayDay"),
|
|
183
183
|
delayDay: e.value.delayDay
|
|
@@ -187,9 +187,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
187
187
|
label: { placeholder: f(o)("report.integration.delayDay"), editable: !1 },
|
|
188
188
|
delayDay: { placeholder: f(o)("report.integration.delayDay"), editable: !0 }
|
|
189
189
|
},
|
|
190
|
-
rules: [(
|
|
191
|
-
"onUpdate:modelValue":
|
|
192
|
-
e.value.delayDay =
|
|
190
|
+
rules: [(h) => h > 0 || "Delay days must be greater than 0"],
|
|
191
|
+
"onUpdate:modelValue": b[3] || (b[3] = (h) => {
|
|
192
|
+
e.value.delayDay = h.delayDay;
|
|
193
193
|
})
|
|
194
194
|
}, null, 8, ["model-value", "options", "rules"])
|
|
195
195
|
])
|
|
@@ -230,70 +230,70 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
230
230
|
modelModifiers: {}
|
|
231
231
|
}),
|
|
232
232
|
emits: /* @__PURE__ */ _e(["remove"], ["update:modelValue"]),
|
|
233
|
-
setup(
|
|
234
|
-
const e = Q(
|
|
235
|
-
() => Object.keys(n.options).map((
|
|
236
|
-
const
|
|
233
|
+
setup(g, { emit: o }) {
|
|
234
|
+
const e = Q(g, "modelValue"), n = g, k = z(
|
|
235
|
+
() => Object.keys(n.options).map((m) => {
|
|
236
|
+
const d = n.options[m];
|
|
237
237
|
return {
|
|
238
|
-
placeholder:
|
|
239
|
-
key:
|
|
240
|
-
editable:
|
|
241
|
-
dropdownOptions:
|
|
238
|
+
placeholder: d.placeholder,
|
|
239
|
+
key: m,
|
|
240
|
+
editable: d.editable,
|
|
241
|
+
dropdownOptions: d.dropdownOptions
|
|
242
242
|
};
|
|
243
243
|
})
|
|
244
|
-
),
|
|
245
|
-
n.singleValueMode ? e.value = n.type === "number" ? Number(
|
|
244
|
+
), b = (m, d) => {
|
|
245
|
+
n.singleValueMode ? e.value = n.type === "number" ? Number(m) : m : d && (e.value = {
|
|
246
246
|
...e.value,
|
|
247
|
-
[
|
|
247
|
+
[d]: n.type === "number" ? Number(m) : m
|
|
248
248
|
});
|
|
249
|
-
},
|
|
250
|
-
var
|
|
251
|
-
return n.singleValueMode ? n.options.key.placeholder : (
|
|
252
|
-
},
|
|
253
|
-
return (
|
|
254
|
-
const
|
|
255
|
-
return
|
|
249
|
+
}, x = (m) => {
|
|
250
|
+
var d;
|
|
251
|
+
return n.singleValueMode ? n.options.key.placeholder : (d = e.value[m.key]) == null ? void 0 : d.toString();
|
|
252
|
+
}, D = (m) => n.singleValueMode ? e.value : e.value[m.key], w = o;
|
|
253
|
+
return (m, d) => {
|
|
254
|
+
const h = $("FmSelect"), _ = $("FmTextField"), u = $("FmTooltip"), p = $("FmIcon");
|
|
255
|
+
return c(), F("div", ft, [
|
|
256
256
|
t("div", {
|
|
257
|
-
class: Ke(`${
|
|
257
|
+
class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
258
258
|
}, [
|
|
259
|
-
(
|
|
260
|
-
key:
|
|
259
|
+
(c(!0), F(L, null, X(k.value, (r) => (c(), F(L, {
|
|
260
|
+
key: r.key
|
|
261
261
|
}, [
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
r.editable ? (c(), F("div", vt, [
|
|
263
|
+
r.dropdownOptions ? (c(), K(h, {
|
|
264
264
|
key: 0,
|
|
265
|
-
"model-value":
|
|
266
|
-
placeholder:
|
|
267
|
-
items:
|
|
265
|
+
"model-value": D(r),
|
|
266
|
+
placeholder: r.placeholder,
|
|
267
|
+
items: r.dropdownOptions,
|
|
268
268
|
"shift-menu": !0,
|
|
269
|
-
"onUpdate:modelValue": (
|
|
270
|
-
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (
|
|
269
|
+
"onUpdate:modelValue": (y) => b(y, r.key)
|
|
270
|
+
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (c(), K(_, {
|
|
271
271
|
key: 1,
|
|
272
|
-
"model-value":
|
|
273
|
-
placeholder:
|
|
274
|
-
type:
|
|
275
|
-
rules:
|
|
276
|
-
"onUpdate:modelValue": (
|
|
272
|
+
"model-value": D(r),
|
|
273
|
+
placeholder: r.placeholder,
|
|
274
|
+
type: g.type,
|
|
275
|
+
rules: g.rules,
|
|
276
|
+
"onUpdate:modelValue": (y) => b(y, r.key)
|
|
277
277
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
|
|
278
|
-
])) : (
|
|
278
|
+
])) : (c(), K(u, {
|
|
279
279
|
key: 1,
|
|
280
|
-
content:
|
|
280
|
+
content: x(r),
|
|
281
281
|
class: "w-[50%]"
|
|
282
282
|
}, {
|
|
283
283
|
default: xe(() => [
|
|
284
|
-
t("div", gt, T(
|
|
284
|
+
t("div", gt, T(x(r)), 1)
|
|
285
285
|
]),
|
|
286
286
|
_: 2
|
|
287
287
|
}, 1032, ["content"]))
|
|
288
288
|
], 64))), 128))
|
|
289
289
|
], 2),
|
|
290
|
-
|
|
291
|
-
i(
|
|
290
|
+
g.removable ? (c(), F("div", yt, [
|
|
291
|
+
i(p, {
|
|
292
292
|
color: "system-error-300",
|
|
293
293
|
class: "cursor-pointer",
|
|
294
294
|
name: "close",
|
|
295
295
|
size: "md",
|
|
296
|
-
onClick:
|
|
296
|
+
onClick: d[0] || (d[0] = (r) => w("remove"))
|
|
297
297
|
})
|
|
298
298
|
])) : R("", !0)
|
|
299
299
|
]);
|
|
@@ -340,33 +340,33 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
340
340
|
modelModifiers: {}
|
|
341
341
|
}),
|
|
342
342
|
emits: ["update:modelValue"],
|
|
343
|
-
setup(
|
|
344
|
-
const { t: o } = W(), e = Q(
|
|
345
|
-
() =>
|
|
346
|
-
),
|
|
347
|
-
var
|
|
348
|
-
return
|
|
349
|
-
}),
|
|
350
|
-
async function
|
|
351
|
-
var
|
|
352
|
-
if (
|
|
343
|
+
setup(g) {
|
|
344
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = B(!1), d = z(
|
|
345
|
+
() => w.map((v) => ({ label: v.name, value: v.id }))
|
|
346
|
+
), h = z(() => {
|
|
347
|
+
var v, s;
|
|
348
|
+
return m.value ? "Connecting" : (s = (v = e.value) == null ? void 0 : v.platform) != null && s.accessToken ? "Disconnect" : "Connect";
|
|
349
|
+
}), _ = B(0);
|
|
350
|
+
async function u() {
|
|
351
|
+
var v;
|
|
352
|
+
if (m.value)
|
|
353
353
|
n.open({ type: "error", message: "Connecting in progress" });
|
|
354
|
-
else if ((
|
|
355
|
-
await
|
|
354
|
+
else if ((v = e.value.platform) != null && v.accessToken)
|
|
355
|
+
await D({
|
|
356
356
|
message: o("report.integration.xero.confirmDisconnect", { name: e.value.name }),
|
|
357
357
|
title: o("report.integration.xero.disconnectTitle")
|
|
358
|
-
}) && (await Ye(e.value._id), await
|
|
358
|
+
}) && (await Ye(e.value._id), await k.getSettings());
|
|
359
359
|
else if (e.value._id)
|
|
360
360
|
try {
|
|
361
361
|
const s = await qe(e.value._id);
|
|
362
|
-
|
|
363
|
-
const
|
|
362
|
+
m.value = !0;
|
|
363
|
+
const P = setInterval(async () => {
|
|
364
364
|
var N;
|
|
365
|
-
|
|
365
|
+
_.value += 1;
|
|
366
366
|
try {
|
|
367
|
-
await
|
|
367
|
+
await k.getSettings();
|
|
368
368
|
} finally {
|
|
369
|
-
(
|
|
369
|
+
(_.value === 12 || (N = e.value.platform) != null && N.accessToken) && (m.value = !1, P && clearInterval(P), _.value = 0);
|
|
370
370
|
}
|
|
371
371
|
}, 5e3);
|
|
372
372
|
window.open(s.redirect, "_blank");
|
|
@@ -376,49 +376,49 @@ 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
|
|
380
|
-
await
|
|
379
|
+
async function p() {
|
|
380
|
+
await D({
|
|
381
381
|
message: `Confirm delete ${e.value.name}?`,
|
|
382
382
|
title: "Delete"
|
|
383
|
-
}) && await
|
|
383
|
+
}) && await x(async () => {
|
|
384
384
|
try {
|
|
385
|
-
await Ve(e.value._id), await
|
|
385
|
+
await Ve(e.value._id), await k.getSettings(), b.back();
|
|
386
386
|
} catch (s) {
|
|
387
387
|
n.open({ type: "error", message: s.message });
|
|
388
388
|
}
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
async function
|
|
392
|
-
await
|
|
391
|
+
async function r() {
|
|
392
|
+
await x(async () => {
|
|
393
393
|
try {
|
|
394
|
-
await $e(e.value._id, e.value), await
|
|
395
|
-
} catch (
|
|
396
|
-
n.open({ type: "error", message:
|
|
394
|
+
await $e(e.value._id, e.value), await k.getSettings();
|
|
395
|
+
} catch (v) {
|
|
396
|
+
n.open({ type: "error", message: v.message });
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
const s =
|
|
400
|
+
function y(v) {
|
|
401
|
+
const s = g.tenantOptions.data.find((P) => P.value === v);
|
|
402
402
|
s && e.value.platform && (e.value.platform.tenant = {
|
|
403
403
|
id: s.value,
|
|
404
404
|
name: s.label
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
var
|
|
409
|
-
(N = (
|
|
407
|
+
function V(v, s) {
|
|
408
|
+
var P, N;
|
|
409
|
+
(N = (P = e.value.platform) == null ? void 0 : P.mappings) != null && N[v] && (e.value.platform.mappings[v] = e.value.platform.mappings[v].filter(
|
|
410
410
|
(G, Y) => Y !== s
|
|
411
411
|
));
|
|
412
412
|
}
|
|
413
|
-
function l(
|
|
414
|
-
var s,
|
|
415
|
-
(
|
|
416
|
-
...e.value.platform.mappings[
|
|
417
|
-
|
|
413
|
+
function l(v) {
|
|
414
|
+
var s, P;
|
|
415
|
+
(P = (s = e.value.platform) == null ? void 0 : s.mappings) != null && P[v] && (e.value.platform.mappings[v] = [
|
|
416
|
+
...e.value.platform.mappings[v],
|
|
417
|
+
v === "items" ? {
|
|
418
418
|
feedmeKey: "",
|
|
419
419
|
xeroAccount: "",
|
|
420
420
|
name: ""
|
|
421
|
-
} :
|
|
421
|
+
} : v === "taxes" ? {
|
|
422
422
|
feedmeKey: "",
|
|
423
423
|
xeroAccount: ""
|
|
424
424
|
} : {
|
|
@@ -428,24 +428,24 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
428
428
|
]);
|
|
429
429
|
}
|
|
430
430
|
async function a() {
|
|
431
|
-
await
|
|
431
|
+
await x(async () => {
|
|
432
432
|
try {
|
|
433
|
-
await Se(e.value._id), await
|
|
434
|
-
} catch (
|
|
435
|
-
n.open({ type: "error", message:
|
|
433
|
+
await Se(e.value._id), await k.getSettings();
|
|
434
|
+
} catch (v) {
|
|
435
|
+
n.open({ type: "error", message: v.message });
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
|
-
return (
|
|
440
|
-
var E, Z, ee, te, oe, ae, le, ne, se, ie, U,
|
|
441
|
-
const
|
|
442
|
-
return (Z = (E = e.value) == null ? void 0 : E.platform) != null && Z.mappings ? (
|
|
439
|
+
return (v, s) => {
|
|
440
|
+
var E, Z, ee, te, oe, ae, le, ne, se, ie, U, S, C, M, q, re, ye, Ne, Re, Oe, Be;
|
|
441
|
+
const P = $("FmIcon"), N = $("FmButton"), G = $("FmMenuDivider"), Y = $("FmCircularProgress"), J = $("FmSelect"), O = $("FmTextField"), j = $("FmSwitch");
|
|
442
|
+
return (Z = (E = e.value) == null ? void 0 : E.platform) != null && Z.mappings ? (c(), F("div", xt, [
|
|
443
443
|
t("div", _t, [
|
|
444
444
|
t("div", bt, [
|
|
445
445
|
s[10] || (s[10] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
|
|
446
446
|
t("div", wt, [
|
|
447
447
|
t("div", ht, [
|
|
448
|
-
i(
|
|
448
|
+
i(P, {
|
|
449
449
|
name: "refresh",
|
|
450
450
|
class: "p-2 bg-gray-100 rounded-full",
|
|
451
451
|
onClick: a
|
|
@@ -455,12 +455,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
455
455
|
i(N, {
|
|
456
456
|
variant: "tertiary",
|
|
457
457
|
label: "Delete",
|
|
458
|
-
onClick:
|
|
458
|
+
onClick: p
|
|
459
459
|
}),
|
|
460
460
|
i(N, {
|
|
461
461
|
variant: "primary",
|
|
462
462
|
label: "Update",
|
|
463
|
-
onClick:
|
|
463
|
+
onClick: r
|
|
464
464
|
})
|
|
465
465
|
])
|
|
466
466
|
])
|
|
@@ -471,22 +471,22 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
471
471
|
t("div", Vt, [
|
|
472
472
|
t("div", $t, [
|
|
473
473
|
i(N, {
|
|
474
|
-
disabled:
|
|
474
|
+
disabled: m.value,
|
|
475
475
|
variant: "primary",
|
|
476
|
-
label:
|
|
477
|
-
onClick:
|
|
476
|
+
label: h.value,
|
|
477
|
+
onClick: u
|
|
478
478
|
}, null, 8, ["disabled", "label"])
|
|
479
479
|
]),
|
|
480
|
-
!
|
|
480
|
+
!g.tenantOptions.isLoaded && ((ee = e.value.platform) != null && ee.accessToken) ? (c(), K(Y, {
|
|
481
481
|
key: 0,
|
|
482
482
|
size: "xl"
|
|
483
483
|
})) : R("", !0),
|
|
484
484
|
i(J, {
|
|
485
485
|
class: "flex-grow",
|
|
486
|
-
items:
|
|
486
|
+
items: g.tenantOptions.data || [],
|
|
487
487
|
"model-value": (te = e.value.platform.tenant) == null ? void 0 : te.id,
|
|
488
|
-
placeholder:
|
|
489
|
-
"onUpdate:modelValue":
|
|
488
|
+
placeholder: g.tenantOptions.data ? "Select tenant " : (oe = e.value.platform.tenant) == null ? void 0 : oe.name,
|
|
489
|
+
"onUpdate:modelValue": y
|
|
490
490
|
}, null, 8, ["items", "model-value", "placeholder"])
|
|
491
491
|
]),
|
|
492
492
|
t("div", St, [
|
|
@@ -506,7 +506,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
506
506
|
modelValue: e.value.platform.locationIds,
|
|
507
507
|
"onUpdate:modelValue": s[1] || (s[1] = (me) => e.value.platform.locationIds = me),
|
|
508
508
|
multiselect: !0,
|
|
509
|
-
items:
|
|
509
|
+
items: d.value,
|
|
510
510
|
placeholder: "Select location",
|
|
511
511
|
class: "flex-grow"
|
|
512
512
|
}, null, 8, ["modelValue", "items"])
|
|
@@ -562,13 +562,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
562
562
|
onClick: s[6] || (s[6] = () => l("taxes"))
|
|
563
563
|
})
|
|
564
564
|
]),
|
|
565
|
-
|
|
566
|
-
!
|
|
565
|
+
g.taxOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", Rt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
|
|
566
|
+
!g.taxOptions.isLoaded && ((le = e.value.platform) != null && le.accessToken) ? (c(), K(Y, {
|
|
567
567
|
key: 1,
|
|
568
568
|
size: "xl"
|
|
569
569
|
})) : R("", !0),
|
|
570
|
-
((ne =
|
|
571
|
-
(
|
|
570
|
+
((ne = g.taxOptions.data) == null ? void 0 : ne.length) > 0 ? (c(), F("div", Ot, [
|
|
571
|
+
(c(!0), F(L, null, X((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.taxes, (me, ce) => (c(), K(Me, {
|
|
572
572
|
key: `tax-${ce}`,
|
|
573
573
|
modelValue: e.value.platform.mappings.taxes[ce],
|
|
574
574
|
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.taxes[ce] = Ie,
|
|
@@ -577,11 +577,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
577
577
|
xeroAccount: {
|
|
578
578
|
placeholder: "Select Tax",
|
|
579
579
|
editable: !0,
|
|
580
|
-
dropdownOptions:
|
|
580
|
+
dropdownOptions: g.taxOptions.data ?? []
|
|
581
581
|
}
|
|
582
582
|
},
|
|
583
583
|
removable: !0,
|
|
584
|
-
onRemove: () =>
|
|
584
|
+
onRemove: () => V("taxes", ce)
|
|
585
585
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
586
586
|
])) : R("", !0),
|
|
587
587
|
t("div", Bt, [
|
|
@@ -592,13 +592,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
592
592
|
onClick: s[7] || (s[7] = () => l("items"))
|
|
593
593
|
})
|
|
594
594
|
]),
|
|
595
|
-
|
|
596
|
-
!
|
|
595
|
+
g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", jt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
|
|
596
|
+
!g.accountCodeOptions.isLoaded && ((S = e.value.platform) != null && S.accessToken) ? (c(), K(Y, {
|
|
597
597
|
key: 4,
|
|
598
598
|
size: "xl"
|
|
599
599
|
})) : R("", !0),
|
|
600
|
-
((
|
|
601
|
-
(
|
|
600
|
+
((C = g.accountCodeOptions.data) == null ? void 0 : C.length) > 0 ? (c(), F("div", Lt, [
|
|
601
|
+
(c(!0), F(L, null, X((re = (q = (M = e.value) == null ? void 0 : M.platform) == null ? void 0 : q.mappings) == null ? void 0 : re.items, (me, ce) => (c(), K(Me, {
|
|
602
602
|
key: `item-${ce}`,
|
|
603
603
|
modelValue: e.value.platform.mappings.items[ce],
|
|
604
604
|
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.items[ce] = Ie,
|
|
@@ -607,11 +607,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
607
607
|
xeroAccount: {
|
|
608
608
|
placeholder: "Select Item Code",
|
|
609
609
|
editable: !0,
|
|
610
|
-
dropdownOptions:
|
|
610
|
+
dropdownOptions: g.accountCodeOptions.data ?? []
|
|
611
611
|
}
|
|
612
612
|
},
|
|
613
613
|
removable: !0,
|
|
614
|
-
onRemove: () =>
|
|
614
|
+
onRemove: () => V("items", ce)
|
|
615
615
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
616
616
|
])) : R("", !0),
|
|
617
617
|
t("div", Et, [
|
|
@@ -622,13 +622,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
622
622
|
onClick: s[8] || (s[8] = () => l("payments"))
|
|
623
623
|
})
|
|
624
624
|
]),
|
|
625
|
-
|
|
626
|
-
!
|
|
625
|
+
g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), F("div", zt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : R("", !0),
|
|
626
|
+
!g.accountCodeOptions.isLoaded && ((ye = e.value.platform) != null && ye.accessToken) ? (c(), K(Y, {
|
|
627
627
|
key: 7,
|
|
628
628
|
size: "xl"
|
|
629
629
|
})) : R("", !0),
|
|
630
|
-
((Ne =
|
|
631
|
-
(
|
|
630
|
+
((Ne = g.accountCodeOptions.data) == null ? void 0 : Ne.length) > 0 ? (c(), F("div", Yt, [
|
|
631
|
+
(c(!0), F(L, null, X((Be = (Oe = (Re = e.value) == null ? void 0 : Re.platform) == null ? void 0 : Oe.mappings) == null ? void 0 : Be.payments, (me, ce) => (c(), K(Me, {
|
|
632
632
|
key: `payment-${ce}`,
|
|
633
633
|
modelValue: e.value.platform.mappings.payments[ce],
|
|
634
634
|
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.payments[ce] = Ie,
|
|
@@ -637,11 +637,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
637
637
|
xeroAccount: {
|
|
638
638
|
placeholder: "Select Payment Code",
|
|
639
639
|
editable: !0,
|
|
640
|
-
dropdownOptions:
|
|
640
|
+
dropdownOptions: g.accountCodeOptions.data ?? []
|
|
641
641
|
}
|
|
642
642
|
},
|
|
643
643
|
removable: !0,
|
|
644
|
-
onRemove: () =>
|
|
644
|
+
onRemove: () => V("payments", ce)
|
|
645
645
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
646
646
|
])) : R("", !0)
|
|
647
647
|
])
|
|
@@ -659,37 +659,37 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
659
659
|
modelModifiers: {}
|
|
660
660
|
},
|
|
661
661
|
emits: ["update:modelValue"],
|
|
662
|
-
setup(
|
|
662
|
+
setup(g) {
|
|
663
663
|
const o = B([]), e = z(
|
|
664
|
-
() => o.value.reduce((
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
date:
|
|
668
|
-
contact:
|
|
669
|
-
status:
|
|
670
|
-
ref:
|
|
664
|
+
() => o.value.reduce((m, d) => {
|
|
665
|
+
const h = m.length, { invoice: _, payments: u } = d;
|
|
666
|
+
m[h] = {
|
|
667
|
+
date: _.Date,
|
|
668
|
+
contact: _.Contact.ContactID,
|
|
669
|
+
status: _.Status,
|
|
670
|
+
ref: _.Reference
|
|
671
671
|
};
|
|
672
|
-
for (let
|
|
673
|
-
const
|
|
674
|
-
r
|
|
675
|
-
...r
|
|
676
|
-
itemDescription:
|
|
677
|
-
itemQuantity:
|
|
678
|
-
itemUnitAmount:
|
|
672
|
+
for (let p = 0; p < Math.max(_.LineItems.length, u.length); p++) {
|
|
673
|
+
const r = h + p;
|
|
674
|
+
m[r] || (m[r] = {}), _.LineItems[p] && (m[r] = {
|
|
675
|
+
...m[r],
|
|
676
|
+
itemDescription: _.LineItems[p].Description,
|
|
677
|
+
itemQuantity: _.LineItems[p].Quantity,
|
|
678
|
+
itemUnitAmount: _.LineItems[p].UnitAmount,
|
|
679
679
|
// itemCode: invoice.LineItems[i].ItemCode,
|
|
680
|
-
itemAccount:
|
|
681
|
-
itemTax:
|
|
682
|
-
itemTaxType:
|
|
683
|
-
itemAmount:
|
|
684
|
-
itemDiscount:
|
|
685
|
-
}),
|
|
686
|
-
...r
|
|
687
|
-
paymentAccount:
|
|
688
|
-
paymentReference:
|
|
689
|
-
paymentAmount:
|
|
680
|
+
itemAccount: _.LineItems[p].AccountCode,
|
|
681
|
+
itemTax: _.LineItems[p].TaxAmount,
|
|
682
|
+
itemTaxType: _.LineItems[p].TaxType,
|
|
683
|
+
itemAmount: _.LineItems[p].LineAmount,
|
|
684
|
+
itemDiscount: _.LineItems[p].DiscountAmount
|
|
685
|
+
}), u[p] && (m[r] = {
|
|
686
|
+
...m[r],
|
|
687
|
+
paymentAccount: u[p].Account.Code,
|
|
688
|
+
paymentReference: u[p].Reference,
|
|
689
|
+
paymentAmount: u[p].Amount
|
|
690
690
|
});
|
|
691
691
|
}
|
|
692
|
-
return
|
|
692
|
+
return m;
|
|
693
693
|
}, [])
|
|
694
694
|
), n = [
|
|
695
695
|
{
|
|
@@ -767,52 +767,52 @@ 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
|
-
],
|
|
770
|
+
], k = Q(g, "modelValue"), b = B(!1), x = fe(), { dateRange: D } = De(ue());
|
|
771
771
|
ge(
|
|
772
|
-
() =>
|
|
772
|
+
() => D.value,
|
|
773
773
|
async () => {
|
|
774
|
-
if (
|
|
774
|
+
if (k.value._id)
|
|
775
775
|
try {
|
|
776
|
-
|
|
777
|
-
} catch (
|
|
778
|
-
|
|
776
|
+
b.value = !0, o.value = await Ce(k.value._id);
|
|
777
|
+
} catch (m) {
|
|
778
|
+
x.open({ message: m.message, type: "error" });
|
|
779
779
|
} finally {
|
|
780
|
-
|
|
780
|
+
b.value = !1;
|
|
781
781
|
}
|
|
782
782
|
},
|
|
783
783
|
{
|
|
784
784
|
immediate: !0
|
|
785
785
|
}
|
|
786
786
|
);
|
|
787
|
-
async function
|
|
787
|
+
async function w() {
|
|
788
788
|
try {
|
|
789
|
-
|
|
790
|
-
} catch (
|
|
791
|
-
|
|
789
|
+
k.value._id ? (b.value = !0, await Ae(k.value._id), x.open({ message: "Upload successful", type: "success" })) : x.open({ message: "Invalid accounting setting", type: "error" });
|
|
790
|
+
} catch (m) {
|
|
791
|
+
m.message && x.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((d) => x.open({ message: d.Message, type: "error" }));
|
|
792
792
|
} finally {
|
|
793
|
-
|
|
793
|
+
b.value = !1;
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
|
-
return (
|
|
797
|
-
const
|
|
798
|
-
return
|
|
796
|
+
return (m, d) => {
|
|
797
|
+
const h = $("FmButton"), _ = $("FmCircularProgress"), u = $("FmTable");
|
|
798
|
+
return c(), F("div", Ht, [
|
|
799
799
|
t("div", Xt, [
|
|
800
800
|
i(Ue, {
|
|
801
|
-
"date-range": f(
|
|
802
|
-
"onUpdate:dateRange":
|
|
801
|
+
"date-range": f(D),
|
|
802
|
+
"onUpdate:dateRange": d[0] || (d[0] = (p) => he(D) ? D.value = p : null),
|
|
803
803
|
compare: !1
|
|
804
804
|
}, null, 8, ["date-range"]),
|
|
805
|
-
i(
|
|
806
|
-
loading:
|
|
805
|
+
i(h, {
|
|
806
|
+
loading: b.value,
|
|
807
807
|
variant: "primary",
|
|
808
808
|
label: "Upload",
|
|
809
|
-
onClick:
|
|
809
|
+
onClick: w
|
|
810
810
|
}, null, 8, ["loading"])
|
|
811
811
|
]),
|
|
812
|
-
|
|
813
|
-
i(
|
|
814
|
-
|
|
815
|
-
])) : e.value.length > 0 ? (
|
|
812
|
+
b.value ? (c(), F("div", Qt, [
|
|
813
|
+
i(_, { size: "xl" }),
|
|
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(), K(u, {
|
|
816
816
|
key: 1,
|
|
817
817
|
class: "flex overflow-scroll",
|
|
818
818
|
"row-data": e.value,
|
|
@@ -828,8 +828,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
828
828
|
modelModifiers: {}
|
|
829
829
|
},
|
|
830
830
|
emits: ["update:modelValue"],
|
|
831
|
-
setup(
|
|
832
|
-
const { t: o } = W(), e = Q(
|
|
831
|
+
setup(g) {
|
|
832
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = B({}), b = B({}), x = B({}), D = [
|
|
833
833
|
{
|
|
834
834
|
label: o("report.integration.setting"),
|
|
835
835
|
value: "setting",
|
|
@@ -840,7 +840,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
840
840
|
value: "preview",
|
|
841
841
|
icon: "table"
|
|
842
842
|
}
|
|
843
|
-
],
|
|
843
|
+
], w = pe(), m = z(() => {
|
|
844
844
|
switch (n.value) {
|
|
845
845
|
case "preview":
|
|
846
846
|
return { component: Gt };
|
|
@@ -848,91 +848,91 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
848
848
|
return {
|
|
849
849
|
component: qt,
|
|
850
850
|
props: {
|
|
851
|
-
tenantOptions:
|
|
852
|
-
taxOptions:
|
|
853
|
-
accountCodeOptions:
|
|
851
|
+
tenantOptions: k.value,
|
|
852
|
+
taxOptions: b.value,
|
|
853
|
+
accountCodeOptions: x.value
|
|
854
854
|
}
|
|
855
855
|
};
|
|
856
856
|
default:
|
|
857
857
|
return null;
|
|
858
858
|
}
|
|
859
859
|
});
|
|
860
|
-
async function
|
|
860
|
+
async function d() {
|
|
861
861
|
if (e.value._id)
|
|
862
862
|
try {
|
|
863
|
-
const
|
|
864
|
-
|
|
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
|
}
|
|
873
873
|
}
|
|
874
|
-
async function
|
|
874
|
+
async function h() {
|
|
875
875
|
if (e.value._id)
|
|
876
876
|
try {
|
|
877
|
-
const
|
|
878
|
-
|
|
879
|
-
value:
|
|
880
|
-
label: `${
|
|
877
|
+
const u = await Xe(e.value._id);
|
|
878
|
+
b.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), b.value.isError = !0;
|
|
884
884
|
} finally {
|
|
885
|
-
|
|
885
|
+
b.value.isLoaded = !0;
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
|
-
async function
|
|
888
|
+
async function _() {
|
|
889
889
|
if (e.value._id)
|
|
890
890
|
try {
|
|
891
|
-
const
|
|
892
|
-
|
|
893
|
-
value:
|
|
894
|
-
label: `${
|
|
891
|
+
const u = await Qe(e.value._id);
|
|
892
|
+
x.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), x.value.isError = !0;
|
|
898
898
|
} finally {
|
|
899
|
-
|
|
899
|
+
x.value.isLoaded = !0;
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
902
|
return ge(
|
|
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(), h(), _());
|
|
909
909
|
},
|
|
910
910
|
{ immediate: !0 }
|
|
911
|
-
), (
|
|
912
|
-
var
|
|
913
|
-
const
|
|
914
|
-
return
|
|
915
|
-
i(
|
|
916
|
-
title: ((
|
|
911
|
+
), (u, p) => {
|
|
912
|
+
var V, l, a;
|
|
913
|
+
const r = $("FmPageHead"), y = $("FmTabs");
|
|
914
|
+
return c(), F("div", Jt, [
|
|
915
|
+
i(r, {
|
|
916
|
+
title: ((V = e.value) == null ? void 0 : V.name) || "Xero",
|
|
917
917
|
"back-button": !0,
|
|
918
918
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
919
|
-
"onClick:back": f(
|
|
919
|
+
"onClick:back": f(w).back
|
|
920
920
|
}, {
|
|
921
|
-
description: xe(() =>
|
|
921
|
+
description: xe(() => p[2] || (p[2] = [
|
|
922
922
|
t("div", null, null, -1)
|
|
923
923
|
])),
|
|
924
924
|
_: 1
|
|
925
925
|
}, 8, ["title", "onClick:back"]),
|
|
926
|
-
i(
|
|
926
|
+
i(y, {
|
|
927
927
|
"model-value": n.value,
|
|
928
|
-
"onUpdate:modelValue":
|
|
929
|
-
items:
|
|
928
|
+
"onUpdate:modelValue": p[0] || (p[0] = (v) => n.value = v),
|
|
929
|
+
items: D
|
|
930
930
|
}, null, 8, ["model-value"]),
|
|
931
931
|
t("div", Wt, [
|
|
932
|
-
(
|
|
932
|
+
(c(), K(be((l = m.value) == null ? void 0 : l.component), Le({
|
|
933
933
|
modelValue: e.value,
|
|
934
|
-
"onUpdate:modelValue":
|
|
935
|
-
}, (a =
|
|
934
|
+
"onUpdate:modelValue": p[1] || (p[1] = (v) => e.value = v)
|
|
935
|
+
}, (a = m.value) == null ? void 0 : a.props), null, 16, ["modelValue"]))
|
|
936
936
|
])
|
|
937
937
|
]);
|
|
938
938
|
};
|
|
@@ -947,24 +947,24 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
947
947
|
modelModifiers: {}
|
|
948
948
|
},
|
|
949
949
|
emits: ["update:modelValue"],
|
|
950
|
-
setup(
|
|
951
|
-
const o = Q(
|
|
952
|
-
() =>
|
|
953
|
-
), { t:
|
|
954
|
-
async function
|
|
955
|
-
await
|
|
956
|
-
message:
|
|
957
|
-
title:
|
|
958
|
-
}) && await
|
|
950
|
+
setup(g) {
|
|
951
|
+
const o = Q(g, "modelValue"), e = fe(), n = we(), k = pe(), { promptLoader: b } = ke(), { promptMessage: x } = Fe(), { restaurants: D } = ue(), w = z(
|
|
952
|
+
() => D.map((l) => ({ label: l.name, value: l.id }))
|
|
953
|
+
), { t: m } = W();
|
|
954
|
+
async function d() {
|
|
955
|
+
await x({
|
|
956
|
+
message: m("report.messages.confirmDelete", { name: o.value.name }),
|
|
957
|
+
title: m("report.common.delete")
|
|
958
|
+
}) && await b(async () => {
|
|
959
959
|
try {
|
|
960
|
-
await Ve(o.value._id), await n.getSettings(),
|
|
960
|
+
await Ve(o.value._id), await n.getSettings(), k.back();
|
|
961
961
|
} catch (a) {
|
|
962
962
|
e.open({ type: "error", message: a.message });
|
|
963
963
|
}
|
|
964
964
|
});
|
|
965
965
|
}
|
|
966
|
-
async function
|
|
967
|
-
await
|
|
966
|
+
async function h() {
|
|
967
|
+
await b(async () => {
|
|
968
968
|
try {
|
|
969
969
|
await $e(o.value._id, o.value), await n.getSettings();
|
|
970
970
|
} catch (l) {
|
|
@@ -972,15 +972,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
972
972
|
}
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
|
-
function
|
|
976
|
-
var
|
|
977
|
-
(s = (
|
|
978
|
-
(
|
|
975
|
+
function _(l, a) {
|
|
976
|
+
var v, s;
|
|
977
|
+
(s = (v = o.value.platform) == null ? void 0 : v.mappings) != null && s[l] && (o.value.platform.mappings[l] = o.value.platform.mappings[l].filter(
|
|
978
|
+
(P, N) => N !== a
|
|
979
979
|
));
|
|
980
980
|
}
|
|
981
|
-
function
|
|
982
|
-
var a,
|
|
983
|
-
if ((
|
|
981
|
+
function u(l) {
|
|
982
|
+
var a, v;
|
|
983
|
+
if ((v = (a = o.value.platform) == null ? void 0 : a.mappings) != null && v[l]) {
|
|
984
984
|
let s;
|
|
985
985
|
switch (l) {
|
|
986
986
|
case "items":
|
|
@@ -1011,39 +1011,39 @@ 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
|
-
label:
|
|
1016
|
+
label: m("report.integration.setting.grouping.byDay"),
|
|
1017
1017
|
value: ve.BY_DAY
|
|
1018
1018
|
},
|
|
1019
1019
|
{
|
|
1020
|
-
label:
|
|
1020
|
+
label: m("report.integration.setting.grouping.byDayItem"),
|
|
1021
1021
|
value: ve.BY_DAY_ITEM
|
|
1022
1022
|
},
|
|
1023
1023
|
{
|
|
1024
|
-
label:
|
|
1024
|
+
label: m("report.integration.setting.grouping.byInvoice"),
|
|
1025
1025
|
value: ve.BY_INVOICE
|
|
1026
1026
|
},
|
|
1027
1027
|
{
|
|
1028
|
-
label:
|
|
1028
|
+
label: m("report.integration.setting.grouping.byDaySeparatePayment"),
|
|
1029
1029
|
value: ve.BY_DAY_SEPARATE_PAYMENT
|
|
1030
1030
|
}
|
|
1031
1031
|
];
|
|
1032
|
-
function
|
|
1032
|
+
function r({
|
|
1033
1033
|
key: l,
|
|
1034
1034
|
value: a
|
|
1035
1035
|
}) {
|
|
1036
|
-
var
|
|
1037
|
-
(s = (
|
|
1036
|
+
var v, s;
|
|
1037
|
+
(s = (v = o.value) == null ? void 0 : v.platform) != null && s.mappings && (o.value.platform.mappings[l] = a);
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function y(l) {
|
|
1040
1040
|
return {
|
|
1041
1041
|
key: { placeholder: l, editable: !1 },
|
|
1042
1042
|
account: { placeholder: l, editable: !0 }
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
|
-
async function
|
|
1046
|
-
await
|
|
1045
|
+
async function V() {
|
|
1046
|
+
await b(async () => {
|
|
1047
1047
|
try {
|
|
1048
1048
|
await Se(o.value._id), await n.getSettings();
|
|
1049
1049
|
} catch (l) {
|
|
@@ -1052,86 +1052,86 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
1054
|
return (l, a) => {
|
|
1055
|
-
var J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie, U,
|
|
1056
|
-
const
|
|
1057
|
-
return (O = (J = o.value) == null ? void 0 : J.platform) != null && O.mappings ? (
|
|
1055
|
+
var J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie, U, S;
|
|
1056
|
+
const v = $("FmIcon"), s = $("FmButton"), P = $("FmMenuDivider"), N = $("FmTextField"), G = $("FmSelect"), Y = $("FmCheckbox");
|
|
1057
|
+
return (O = (J = o.value) == null ? void 0 : J.platform) != null && O.mappings ? (c(), F("div", eo, [
|
|
1058
1058
|
t("div", to, [
|
|
1059
1059
|
t("div", oo, [
|
|
1060
|
-
t("div", ao, T(f(
|
|
1060
|
+
t("div", ao, T(f(m)("report.integration.bukku.connect")), 1),
|
|
1061
1061
|
t("div", lo, [
|
|
1062
1062
|
t("div", no, [
|
|
1063
|
-
i(
|
|
1063
|
+
i(v, {
|
|
1064
1064
|
name: "refresh",
|
|
1065
1065
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1066
|
-
onClick:
|
|
1066
|
+
onClick: V
|
|
1067
1067
|
}),
|
|
1068
|
-
t("span", so, T(f(
|
|
1068
|
+
t("span", so, T(f(m)("report.integration.setting.refreshTooltip")), 1)
|
|
1069
1069
|
]),
|
|
1070
1070
|
i(s, {
|
|
1071
1071
|
variant: "tertiary",
|
|
1072
|
-
label: f(
|
|
1073
|
-
onClick:
|
|
1072
|
+
label: f(m)("report.common.delete"),
|
|
1073
|
+
onClick: d
|
|
1074
1074
|
}, null, 8, ["label"]),
|
|
1075
1075
|
i(s, {
|
|
1076
1076
|
variant: "primary",
|
|
1077
|
-
label: f(
|
|
1078
|
-
onClick:
|
|
1077
|
+
label: f(m)("report.common.update"),
|
|
1078
|
+
onClick: h
|
|
1079
1079
|
}, null, 8, ["label"])
|
|
1080
1080
|
])
|
|
1081
1081
|
])
|
|
1082
1082
|
]),
|
|
1083
|
-
i(
|
|
1083
|
+
i(P, { style: { margin: 0 } }),
|
|
1084
1084
|
t("div", io, [
|
|
1085
|
-
t("div", ro, T(f(
|
|
1085
|
+
t("div", ro, T(f(m)("report.integration.bukku.authentication")), 1),
|
|
1086
1086
|
t("div", mo, [
|
|
1087
|
-
t("div", co, T(f(
|
|
1087
|
+
t("div", co, T(f(m)("report.integration.subdomain")), 1),
|
|
1088
1088
|
t("div", po, [
|
|
1089
1089
|
i(N, {
|
|
1090
1090
|
modelValue: o.value.platform.subdomain,
|
|
1091
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
1092
|
-
placeholder: f(
|
|
1091
|
+
"onUpdate:modelValue": a[0] || (a[0] = (C) => o.value.platform.subdomain = C),
|
|
1092
|
+
placeholder: f(m)("report.integration.subdomain")
|
|
1093
1093
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1094
1094
|
])
|
|
1095
1095
|
]),
|
|
1096
1096
|
t("div", uo, [
|
|
1097
|
-
t("div", fo, T(f(
|
|
1097
|
+
t("div", fo, T(f(m)("report.integration.token")), 1),
|
|
1098
1098
|
t("div", vo, [
|
|
1099
1099
|
i(N, {
|
|
1100
1100
|
modelValue: o.value.platform.token,
|
|
1101
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
1102
|
-
placeholder: f(
|
|
1101
|
+
"onUpdate:modelValue": a[1] || (a[1] = (C) => o.value.platform.token = C),
|
|
1102
|
+
placeholder: f(m)("report.integration.token")
|
|
1103
1103
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1104
1104
|
])
|
|
1105
1105
|
]),
|
|
1106
1106
|
t("div", go, [
|
|
1107
|
-
t("div", yo, T(f(
|
|
1107
|
+
t("div", yo, T(f(m)("report.integration.bukku.general")), 1),
|
|
1108
1108
|
t("div", xo, [
|
|
1109
|
-
t("div", _o, T(f(
|
|
1109
|
+
t("div", _o, T(f(m)("report.common.name")), 1),
|
|
1110
1110
|
t("div", bo, [
|
|
1111
1111
|
i(N, {
|
|
1112
1112
|
modelValue: o.value.name,
|
|
1113
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
1113
|
+
"onUpdate:modelValue": a[2] || (a[2] = (C) => o.value.name = C)
|
|
1114
1114
|
}, null, 8, ["modelValue"])
|
|
1115
1115
|
])
|
|
1116
1116
|
]),
|
|
1117
1117
|
t("div", wo, [
|
|
1118
|
-
t("div", ho, T(f(
|
|
1118
|
+
t("div", ho, T(f(m)("report.common.location")), 1),
|
|
1119
1119
|
i(G, {
|
|
1120
1120
|
modelValue: o.value.platform.locationIds,
|
|
1121
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
1121
|
+
"onUpdate:modelValue": a[3] || (a[3] = (C) => o.value.platform.locationIds = C),
|
|
1122
1122
|
multiselect: !0,
|
|
1123
|
-
items:
|
|
1123
|
+
items: w.value,
|
|
1124
1124
|
placeholder: "Select location",
|
|
1125
1125
|
class: "flex-grow"
|
|
1126
1126
|
}, null, 8, ["modelValue", "items"])
|
|
1127
1127
|
]),
|
|
1128
1128
|
t("div", ko, [
|
|
1129
|
-
t("div", Vo, T(f(
|
|
1129
|
+
t("div", Vo, T(f(m)("report.integration.bukku.grouping.title")), 1),
|
|
1130
1130
|
i(G, {
|
|
1131
1131
|
modelValue: o.value.platform.grouping,
|
|
1132
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
1132
|
+
"onUpdate:modelValue": a[4] || (a[4] = (C) => o.value.platform.grouping = C),
|
|
1133
1133
|
multiselect: !1,
|
|
1134
|
-
items:
|
|
1134
|
+
items: p,
|
|
1135
1135
|
placeholder: "Select grouping",
|
|
1136
1136
|
class: "flex-grow"
|
|
1137
1137
|
}, null, 8, ["modelValue"])
|
|
@@ -1139,7 +1139,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1139
1139
|
]),
|
|
1140
1140
|
t("div", $o, [
|
|
1141
1141
|
t("div", So, [
|
|
1142
|
-
i(
|
|
1142
|
+
i(A, {
|
|
1143
1143
|
"model-value": {
|
|
1144
1144
|
key: "Contact",
|
|
1145
1145
|
account: o.value.platform.mappings.contact.account
|
|
@@ -1154,65 +1154,65 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1154
1154
|
editable: !0
|
|
1155
1155
|
}
|
|
1156
1156
|
},
|
|
1157
|
-
"onUpdate:modelValue": a[5] || (a[5] = (
|
|
1158
|
-
var
|
|
1159
|
-
(re = (q = (
|
|
1157
|
+
"onUpdate:modelValue": a[5] || (a[5] = (C) => {
|
|
1158
|
+
var M, q, re;
|
|
1159
|
+
(re = (q = (M = o.value) == null ? void 0 : M.platform) == null ? void 0 : q.mappings) != null && re.contact && (o.value.platform.mappings.contact.account = C.account);
|
|
1160
1160
|
})
|
|
1161
1161
|
}, null, 8, ["model-value"]),
|
|
1162
|
-
i(
|
|
1162
|
+
i(A, {
|
|
1163
1163
|
"model-value": {
|
|
1164
1164
|
key: "Invoice no",
|
|
1165
1165
|
account: o.value.platform.mappings.invoiceDocNo
|
|
1166
1166
|
},
|
|
1167
|
-
options:
|
|
1168
|
-
"onUpdate:modelValue": a[6] || (a[6] = (
|
|
1167
|
+
options: y("Invoice no"),
|
|
1168
|
+
"onUpdate:modelValue": a[6] || (a[6] = (C) => r({ key: "invoiceDocNo", value: C.account }))
|
|
1169
1169
|
}, null, 8, ["model-value", "options"]),
|
|
1170
|
-
i(
|
|
1170
|
+
i(A, {
|
|
1171
1171
|
"model-value": {
|
|
1172
1172
|
key: "Credit note no",
|
|
1173
1173
|
account: o.value.platform.mappings.creditNoteDocNo
|
|
1174
1174
|
},
|
|
1175
|
-
options:
|
|
1176
|
-
"onUpdate:modelValue": a[7] || (a[7] = (
|
|
1175
|
+
options: y("Credit note no"),
|
|
1176
|
+
"onUpdate:modelValue": a[7] || (a[7] = (C) => r({ key: "creditNoteDocNo", value: C.account }))
|
|
1177
1177
|
}, null, 8, ["model-value", "options"]),
|
|
1178
|
-
i(
|
|
1178
|
+
i(A, {
|
|
1179
1179
|
"model-value": {
|
|
1180
1180
|
key: "Payment no",
|
|
1181
1181
|
account: o.value.platform.mappings.paymentDocNo
|
|
1182
1182
|
},
|
|
1183
|
-
options:
|
|
1184
|
-
"onUpdate:modelValue": a[8] || (a[8] = (
|
|
1183
|
+
options: y("Payment no"),
|
|
1184
|
+
"onUpdate:modelValue": a[8] || (a[8] = (C) => r({ key: "paymentDocNo", value: C.account }))
|
|
1185
1185
|
}, null, 8, ["model-value", "options"]),
|
|
1186
|
-
i(
|
|
1186
|
+
i(A, {
|
|
1187
1187
|
"model-value": {
|
|
1188
1188
|
key: "Refund no",
|
|
1189
1189
|
account: o.value.platform.mappings.refundDocNo
|
|
1190
1190
|
},
|
|
1191
|
-
options:
|
|
1192
|
-
"onUpdate:modelValue": a[9] || (a[9] = (
|
|
1191
|
+
options: y("Refund no"),
|
|
1192
|
+
"onUpdate:modelValue": a[9] || (a[9] = (C) => r({ key: "refundDocNo", value: C.account }))
|
|
1193
1193
|
}, null, 8, ["model-value", "options"]),
|
|
1194
|
-
i(
|
|
1194
|
+
i(A, {
|
|
1195
1195
|
"model-value": {
|
|
1196
1196
|
key: "Rounding",
|
|
1197
1197
|
account: o.value.platform.mappings.rounding.account
|
|
1198
1198
|
},
|
|
1199
|
-
options:
|
|
1200
|
-
"onUpdate:modelValue": a[10] || (a[10] = (
|
|
1201
|
-
var
|
|
1202
|
-
(re = (q = (
|
|
1199
|
+
options: y("Rounding"),
|
|
1200
|
+
"onUpdate:modelValue": a[10] || (a[10] = (C) => {
|
|
1201
|
+
var M, q, re;
|
|
1202
|
+
(re = (q = (M = o.value) == null ? void 0 : M.platform) == null ? void 0 : q.mappings) != null && re.rounding && (o.value.platform.mappings.rounding.account = C.account);
|
|
1203
1203
|
})
|
|
1204
1204
|
}, null, 8, ["model-value", "options"]),
|
|
1205
|
-
(
|
|
1206
|
-
key: `charge-${
|
|
1207
|
-
modelValue: o.value.platform.mappings.charges[
|
|
1208
|
-
"onUpdate:modelValue": (q) => o.value.platform.mappings.charges[
|
|
1205
|
+
(c(!0), F(L, null, X((Z = (E = (j = o.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : Z.charges, (C, M) => (c(), K(A, {
|
|
1206
|
+
key: `charge-${M}`,
|
|
1207
|
+
modelValue: o.value.platform.mappings.charges[M],
|
|
1208
|
+
"onUpdate:modelValue": (q) => o.value.platform.mappings.charges[M] = q,
|
|
1209
1209
|
options: {
|
|
1210
1210
|
key: {
|
|
1211
|
-
placeholder: f(
|
|
1211
|
+
placeholder: f(m)(`report.integration.bukku.mapping.charge.${C.key}`),
|
|
1212
1212
|
editable: !1
|
|
1213
1213
|
},
|
|
1214
1214
|
account: {
|
|
1215
|
-
placeholder: f(
|
|
1215
|
+
placeholder: f(m)("report.integration.bukku.mapping.charge.account"),
|
|
1216
1216
|
editable: !0
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
@@ -1221,83 +1221,83 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1221
1221
|
]),
|
|
1222
1222
|
i(Te, {
|
|
1223
1223
|
modelValue: o.value.platform,
|
|
1224
|
-
"onUpdate:modelValue": a[11] || (a[11] = (
|
|
1224
|
+
"onUpdate:modelValue": a[11] || (a[11] = (C) => o.value.platform = C),
|
|
1225
1225
|
label: "upload",
|
|
1226
1226
|
"last-upload-date": (ee = o.value.platform) == null ? void 0 : ee.lastUploadDate
|
|
1227
1227
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
1228
1228
|
t("div", Co, [
|
|
1229
|
-
t("div", Fo, T(f(
|
|
1229
|
+
t("div", Fo, T(f(m)("report.integration.items")), 1),
|
|
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, [
|
|
1237
|
-
(
|
|
1238
|
-
key: `item-${
|
|
1239
|
-
modelValue: o.value.platform.mappings.items[
|
|
1240
|
-
"onUpdate:modelValue": (q) => o.value.platform.mappings.items[
|
|
1237
|
+
(c(!0), F(L, null, X((ae = (oe = (te = o.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (C, M) => (c(), K(A, {
|
|
1238
|
+
key: `item-${M}`,
|
|
1239
|
+
modelValue: o.value.platform.mappings.items[M],
|
|
1240
|
+
"onUpdate:modelValue": (q) => o.value.platform.mappings.items[M] = q,
|
|
1241
1241
|
options: {
|
|
1242
1242
|
key: { placeholder: "Key", editable: !0 },
|
|
1243
1243
|
account: { placeholder: "Account code", editable: !0 }
|
|
1244
1244
|
},
|
|
1245
1245
|
removable: !0,
|
|
1246
|
-
onRemove: () =>
|
|
1246
|
+
onRemove: () => _("items", M)
|
|
1247
1247
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1248
1248
|
]),
|
|
1249
1249
|
t("div", Uo, [
|
|
1250
|
-
t("div", To, T(f(
|
|
1250
|
+
t("div", To, T(f(m)("report.integration.taxes")), 1),
|
|
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, [
|
|
1258
|
-
(
|
|
1259
|
-
key: `tax-${
|
|
1260
|
-
modelValue: o.value.platform.mappings.taxes[
|
|
1261
|
-
"onUpdate:modelValue": (q) => o.value.platform.mappings.taxes[
|
|
1258
|
+
(c(!0), F(L, null, X((se = (ne = (le = o.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (C, M) => (c(), K(A, {
|
|
1259
|
+
key: `tax-${M}`,
|
|
1260
|
+
modelValue: o.value.platform.mappings.taxes[M],
|
|
1261
|
+
"onUpdate:modelValue": (q) => o.value.platform.mappings.taxes[M] = q,
|
|
1262
1262
|
options: {
|
|
1263
1263
|
key: { placeholder: "Key", editable: !0 },
|
|
1264
1264
|
account: { placeholder: "Account code", editable: !0 }
|
|
1265
1265
|
},
|
|
1266
1266
|
removable: !0,
|
|
1267
|
-
onRemove: () =>
|
|
1267
|
+
onRemove: () => _("taxes", M)
|
|
1268
1268
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1269
1269
|
]),
|
|
1270
1270
|
t("div", Mo, [
|
|
1271
|
-
t("div", Ko, T(f(
|
|
1271
|
+
t("div", Ko, T(f(m)("report.integration.payments")), 1),
|
|
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
|
-
(
|
|
1279
|
-
key: `payment-${
|
|
1278
|
+
(c(!0), F(L, null, X((S = (U = (ie = o.value) == null ? void 0 : ie.platform) == null ? void 0 : U.mappings) == null ? void 0 : S.payments, (C, M) => (c(), F("div", {
|
|
1279
|
+
key: `payment-${M}`,
|
|
1280
1280
|
class: "grid-cols-1 grid gap-x-16"
|
|
1281
1281
|
}, [
|
|
1282
1282
|
t("div", Ao, [
|
|
1283
1283
|
i(Y, {
|
|
1284
|
-
"model-value": !o.value.platform.mappings.payments[
|
|
1284
|
+
"model-value": !o.value.platform.mappings.payments[M].skip,
|
|
1285
1285
|
value: "",
|
|
1286
1286
|
"onUpdate:modelValue": (q) => {
|
|
1287
1287
|
var re, ye;
|
|
1288
|
-
(ye = (re = o.value.platform) == null ? void 0 : re.mappings) != null && ye.payments[
|
|
1288
|
+
(ye = (re = o.value.platform) == null ? void 0 : re.mappings) != null && ye.payments[M] && (o.value.platform.mappings.payments[M].skip = !q);
|
|
1289
1289
|
}
|
|
1290
1290
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1291
|
-
i(
|
|
1292
|
-
modelValue: o.value.platform.mappings.payments[
|
|
1293
|
-
"onUpdate:modelValue": (q) => o.value.platform.mappings.payments[
|
|
1291
|
+
i(A, {
|
|
1292
|
+
modelValue: o.value.platform.mappings.payments[M],
|
|
1293
|
+
"onUpdate:modelValue": (q) => o.value.platform.mappings.payments[M] = q,
|
|
1294
1294
|
options: {
|
|
1295
1295
|
key: { placeholder: "Key", editable: !0 },
|
|
1296
1296
|
method: { placeholder: "Method", editable: !0 },
|
|
1297
1297
|
account: { placeholder: "Account code", editable: !0 }
|
|
1298
1298
|
},
|
|
1299
1299
|
removable: !0,
|
|
1300
|
-
onRemove: () =>
|
|
1300
|
+
onRemove: () => _("payments", M)
|
|
1301
1301
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"])
|
|
1302
1302
|
])
|
|
1303
1303
|
]))), 128))
|
|
@@ -1315,33 +1315,33 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1315
1315
|
modelModifiers: {}
|
|
1316
1316
|
},
|
|
1317
1317
|
emits: ["update:modelValue"],
|
|
1318
|
-
setup(
|
|
1318
|
+
setup(g) {
|
|
1319
1319
|
const o = B([]), e = z(
|
|
1320
|
-
() => o.value.reduce((
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1323
|
-
no:
|
|
1324
|
-
date:
|
|
1325
|
-
contact:
|
|
1326
|
-
status:
|
|
1327
|
-
title:
|
|
1320
|
+
() => o.value.reduce((d, h) => {
|
|
1321
|
+
const _ = d.length, { invoice: u, payments: p } = h;
|
|
1322
|
+
d[_] = {
|
|
1323
|
+
no: u.number,
|
|
1324
|
+
date: u.date,
|
|
1325
|
+
contact: u._contact_name,
|
|
1326
|
+
status: u.status,
|
|
1327
|
+
title: u.title
|
|
1328
1328
|
};
|
|
1329
|
-
for (let
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1332
|
-
const
|
|
1333
|
-
|
|
1334
|
-
...
|
|
1335
|
-
itemDescription:
|
|
1336
|
-
itemQuantity:
|
|
1337
|
-
itemUnitPrice:
|
|
1338
|
-
itemAccount:
|
|
1339
|
-
itemTaxCode:
|
|
1340
|
-
itemDiscount:
|
|
1329
|
+
for (let r = 0; r < Math.max(u.form_items.length, p.length); r++) {
|
|
1330
|
+
const y = _ + r;
|
|
1331
|
+
d[y] || (d[y] = {});
|
|
1332
|
+
const V = u.form_items[r];
|
|
1333
|
+
V && (d[y] = {
|
|
1334
|
+
...d[y],
|
|
1335
|
+
itemDescription: V.description,
|
|
1336
|
+
itemQuantity: V.quantity,
|
|
1337
|
+
itemUnitPrice: V.unit_price,
|
|
1338
|
+
itemAccount: V._account_name,
|
|
1339
|
+
itemTaxCode: V._tax_code_name,
|
|
1340
|
+
itemDiscount: V.discount
|
|
1341
1341
|
});
|
|
1342
|
-
const l =
|
|
1343
|
-
l && (
|
|
1344
|
-
...
|
|
1342
|
+
const l = p[r];
|
|
1343
|
+
l && (d[y] = {
|
|
1344
|
+
...d[y],
|
|
1345
1345
|
paymentNo: l.number,
|
|
1346
1346
|
paymentMethod: l.deposit_items[0]._payment_method_name,
|
|
1347
1347
|
paymentAccount: l.deposit_items[0]._account_name,
|
|
@@ -1350,9 +1350,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1350
1350
|
paymentSkip: l.skip
|
|
1351
1351
|
});
|
|
1352
1352
|
}
|
|
1353
|
-
return
|
|
1353
|
+
return d;
|
|
1354
1354
|
}, [])
|
|
1355
|
-
), { t: n } = W(),
|
|
1355
|
+
), { t: n } = W(), k = [
|
|
1356
1356
|
{
|
|
1357
1357
|
accessorKey: "date",
|
|
1358
1358
|
header: () => I(
|
|
@@ -1446,56 +1446,56 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1446
1446
|
header: "Skip",
|
|
1447
1447
|
enableSorting: !1
|
|
1448
1448
|
}
|
|
1449
|
-
],
|
|
1449
|
+
], b = Q(g, "modelValue"), x = B(!1), D = fe(), { dateRange: w } = De(ue());
|
|
1450
1450
|
ge(
|
|
1451
|
-
() =>
|
|
1451
|
+
() => w.value,
|
|
1452
1452
|
async () => {
|
|
1453
|
-
if (
|
|
1453
|
+
if (b.value._id)
|
|
1454
1454
|
try {
|
|
1455
|
-
|
|
1456
|
-
} catch (
|
|
1457
|
-
|
|
1455
|
+
x.value = !0, o.value = await Ce(b.value._id);
|
|
1456
|
+
} catch (d) {
|
|
1457
|
+
D.open({ message: d.message, type: "error" });
|
|
1458
1458
|
} finally {
|
|
1459
|
-
|
|
1459
|
+
x.value = !1;
|
|
1460
1460
|
}
|
|
1461
1461
|
},
|
|
1462
1462
|
{
|
|
1463
1463
|
immediate: !0
|
|
1464
1464
|
}
|
|
1465
1465
|
);
|
|
1466
|
-
async function
|
|
1466
|
+
async function m() {
|
|
1467
1467
|
try {
|
|
1468
|
-
|
|
1469
|
-
} catch (
|
|
1470
|
-
|
|
1468
|
+
b.value._id ? (x.value = !0, await Ae(b.value._id), D.open({ message: n("report.integration.preview.uploadSuccess"), type: "success" })) : D.open({ message: n("report.integration.error.invalid"), type: "error" });
|
|
1469
|
+
} catch (d) {
|
|
1470
|
+
D.open({ message: d.message, type: "error" });
|
|
1471
1471
|
} finally {
|
|
1472
|
-
|
|
1472
|
+
x.value = !1;
|
|
1473
1473
|
}
|
|
1474
1474
|
}
|
|
1475
|
-
return (
|
|
1476
|
-
const
|
|
1477
|
-
return
|
|
1475
|
+
return (d, h) => {
|
|
1476
|
+
const _ = $("FmButton"), u = $("FmCircularProgress"), p = $("FmTable");
|
|
1477
|
+
return c(), F("div", No, [
|
|
1478
1478
|
t("div", Ro, [
|
|
1479
1479
|
i(Ue, {
|
|
1480
|
-
"date-range": f(
|
|
1481
|
-
"onUpdate:dateRange":
|
|
1480
|
+
"date-range": f(w),
|
|
1481
|
+
"onUpdate:dateRange": h[0] || (h[0] = (r) => he(w) ? w.value = r : null),
|
|
1482
1482
|
compare: !1
|
|
1483
1483
|
}, null, 8, ["date-range"]),
|
|
1484
|
-
i(
|
|
1485
|
-
loading:
|
|
1484
|
+
i(_, {
|
|
1485
|
+
loading: x.value,
|
|
1486
1486
|
variant: "primary",
|
|
1487
1487
|
label: f(n)("report.common.upload"),
|
|
1488
|
-
onClick:
|
|
1488
|
+
onClick: m
|
|
1489
1489
|
}, null, 8, ["loading", "label"])
|
|
1490
1490
|
]),
|
|
1491
|
-
|
|
1492
|
-
i(
|
|
1491
|
+
x.value ? (c(), F("div", Oo, [
|
|
1492
|
+
i(u, { size: "xl" }),
|
|
1493
1493
|
t("span", Bo, T(f(n)("report.integration.preview.loading")), 1)
|
|
1494
|
-
])) : e.value.length > 0 ? (
|
|
1494
|
+
])) : e.value.length > 0 ? (c(), K(p, {
|
|
1495
1495
|
key: 1,
|
|
1496
1496
|
class: "flex overflow-scroll",
|
|
1497
1497
|
"row-data": e.value,
|
|
1498
|
-
"column-defs":
|
|
1498
|
+
"column-defs": k
|
|
1499
1499
|
}, null, 8, ["row-data"])) : R("", !0)
|
|
1500
1500
|
]);
|
|
1501
1501
|
};
|
|
@@ -1507,8 +1507,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1507
1507
|
modelModifiers: {}
|
|
1508
1508
|
},
|
|
1509
1509
|
emits: ["update:modelValue"],
|
|
1510
|
-
setup(
|
|
1511
|
-
const { t: o } = W(), e = Q(
|
|
1510
|
+
setup(g) {
|
|
1511
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
|
|
1512
1512
|
{
|
|
1513
1513
|
label: o("report.integration.setting"),
|
|
1514
1514
|
value: "setting",
|
|
@@ -1519,7 +1519,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1519
1519
|
value: "preview",
|
|
1520
1520
|
icon: "table"
|
|
1521
1521
|
}
|
|
1522
|
-
],
|
|
1522
|
+
], b = pe(), x = z(() => {
|
|
1523
1523
|
switch (n.value) {
|
|
1524
1524
|
case "preview":
|
|
1525
1525
|
return jo;
|
|
@@ -1529,30 +1529,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1529
1529
|
return null;
|
|
1530
1530
|
}
|
|
1531
1531
|
});
|
|
1532
|
-
return (
|
|
1533
|
-
var
|
|
1534
|
-
const
|
|
1535
|
-
return
|
|
1536
|
-
i(
|
|
1537
|
-
title: ((
|
|
1532
|
+
return (D, w) => {
|
|
1533
|
+
var h;
|
|
1534
|
+
const m = $("FmPageHead"), d = $("FmTabs");
|
|
1535
|
+
return c(), F("div", Lo, [
|
|
1536
|
+
i(m, {
|
|
1537
|
+
title: ((h = e.value) == null ? void 0 : h.name) || "Bukku",
|
|
1538
1538
|
"back-button": !0,
|
|
1539
1539
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
1540
|
-
"onClick:back": f(
|
|
1540
|
+
"onClick:back": f(b).back
|
|
1541
1541
|
}, {
|
|
1542
|
-
description: xe(() =>
|
|
1542
|
+
description: xe(() => w[2] || (w[2] = [
|
|
1543
1543
|
t("div", null, null, -1)
|
|
1544
1544
|
])),
|
|
1545
1545
|
_: 1
|
|
1546
1546
|
}, 8, ["title", "onClick:back"]),
|
|
1547
|
-
i(
|
|
1547
|
+
i(d, {
|
|
1548
1548
|
"model-value": n.value,
|
|
1549
|
-
"onUpdate:modelValue":
|
|
1550
|
-
items:
|
|
1549
|
+
"onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
|
|
1550
|
+
items: k
|
|
1551
1551
|
}, null, 8, ["model-value"]),
|
|
1552
1552
|
t("div", Eo, [
|
|
1553
|
-
(
|
|
1553
|
+
(c(), K(be(x.value), {
|
|
1554
1554
|
modelValue: e.value,
|
|
1555
|
-
"onUpdate:modelValue":
|
|
1555
|
+
"onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
|
|
1556
1556
|
}, null, 8, ["modelValue"]))
|
|
1557
1557
|
])
|
|
1558
1558
|
]);
|
|
@@ -1568,40 +1568,40 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1568
1568
|
modelModifiers: {}
|
|
1569
1569
|
},
|
|
1570
1570
|
emits: ["update:modelValue"],
|
|
1571
|
-
setup(
|
|
1572
|
-
const { t: o } = W(), e = Q(
|
|
1573
|
-
() =>
|
|
1571
|
+
setup(g) {
|
|
1572
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
|
|
1573
|
+
() => w.map((l) => ({ label: l.name, value: l.id }))
|
|
1574
1574
|
);
|
|
1575
|
-
async function
|
|
1576
|
-
await
|
|
1575
|
+
async function d() {
|
|
1576
|
+
await D({
|
|
1577
1577
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
1578
1578
|
title: o("report.common.delete")
|
|
1579
|
-
}) && await
|
|
1579
|
+
}) && await x(async () => {
|
|
1580
1580
|
try {
|
|
1581
|
-
await Ve(e.value._id), await
|
|
1581
|
+
await Ve(e.value._id), await k.getSettings(), b.back();
|
|
1582
1582
|
} catch (a) {
|
|
1583
1583
|
n.open({ type: "error", message: a.message });
|
|
1584
1584
|
}
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
|
-
async function
|
|
1588
|
-
await
|
|
1587
|
+
async function h() {
|
|
1588
|
+
await x(async () => {
|
|
1589
1589
|
try {
|
|
1590
|
-
await $e(e.value._id, e.value), await
|
|
1590
|
+
await $e(e.value._id, e.value), await k.getSettings();
|
|
1591
1591
|
} catch (l) {
|
|
1592
1592
|
n.open({ type: "error", message: l.message });
|
|
1593
1593
|
}
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1597
|
-
var
|
|
1598
|
-
(s = (
|
|
1599
|
-
(
|
|
1596
|
+
function _(l, a) {
|
|
1597
|
+
var v, s;
|
|
1598
|
+
(s = (v = e.value.platform) == null ? void 0 : v.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
|
|
1599
|
+
(P, N) => N !== a
|
|
1600
1600
|
));
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1603
|
-
var a,
|
|
1604
|
-
(
|
|
1602
|
+
function u(l) {
|
|
1603
|
+
var a, v;
|
|
1604
|
+
(v = (a = e.value.platform) == null ? void 0 : a.mappings) != null && v[l] && (e.value.platform.mappings[l] = [
|
|
1605
1605
|
...e.value.platform.mappings[l],
|
|
1606
1606
|
l === "items" ? {
|
|
1607
1607
|
key: "",
|
|
@@ -1613,7 +1613,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1613
1613
|
}
|
|
1614
1614
|
]);
|
|
1615
1615
|
}
|
|
1616
|
-
const
|
|
1616
|
+
const p = [
|
|
1617
1617
|
{
|
|
1618
1618
|
label: "By day",
|
|
1619
1619
|
value: ve.BY_DAY
|
|
@@ -1627,23 +1627,23 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1627
1627
|
value: ve.BY_DAY_CATEGORY
|
|
1628
1628
|
}
|
|
1629
1629
|
];
|
|
1630
|
-
function
|
|
1630
|
+
function r({
|
|
1631
1631
|
key: l,
|
|
1632
1632
|
value: a
|
|
1633
1633
|
}) {
|
|
1634
|
-
var
|
|
1635
|
-
(s = (
|
|
1634
|
+
var v, s;
|
|
1635
|
+
(s = (v = e.value) == null ? void 0 : v.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1637
|
+
function y(l) {
|
|
1638
1638
|
return {
|
|
1639
1639
|
key: { placeholder: l, editable: !1 },
|
|
1640
1640
|
account: { placeholder: l, editable: !0 }
|
|
1641
1641
|
};
|
|
1642
1642
|
}
|
|
1643
|
-
async function
|
|
1644
|
-
await
|
|
1643
|
+
async function V() {
|
|
1644
|
+
await x(async () => {
|
|
1645
1645
|
try {
|
|
1646
|
-
await Se(e.value._id), await
|
|
1646
|
+
await Se(e.value._id), await k.getSettings();
|
|
1647
1647
|
} catch (l) {
|
|
1648
1648
|
n.open({ type: "error", message: l.message });
|
|
1649
1649
|
}
|
|
@@ -1651,34 +1651,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1651
1651
|
}
|
|
1652
1652
|
return (l, a) => {
|
|
1653
1653
|
var Y, J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie;
|
|
1654
|
-
const
|
|
1655
|
-
return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (
|
|
1654
|
+
const v = $("FmIcon"), s = $("FmButton"), P = $("FmMenuDivider"), N = $("FmTextField"), G = $("FmSelect");
|
|
1655
|
+
return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (c(), F("div", Yo, [
|
|
1656
1656
|
t("div", qo, [
|
|
1657
1657
|
t("div", Ho, [
|
|
1658
1658
|
a[14] || (a[14] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
1659
1659
|
t("div", Xo, [
|
|
1660
1660
|
t("div", Qo, [
|
|
1661
|
-
i(
|
|
1661
|
+
i(v, {
|
|
1662
1662
|
name: "refresh",
|
|
1663
1663
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1664
|
-
onClick:
|
|
1664
|
+
onClick: V
|
|
1665
1665
|
}),
|
|
1666
1666
|
t("span", Go, T(f(o)("report.integration.autoCount.repopulate")), 1)
|
|
1667
1667
|
]),
|
|
1668
1668
|
i(s, {
|
|
1669
1669
|
variant: "tertiary",
|
|
1670
1670
|
label: f(o)("report.common.remove"),
|
|
1671
|
-
onClick:
|
|
1671
|
+
onClick: d
|
|
1672
1672
|
}, null, 8, ["label"]),
|
|
1673
1673
|
i(s, {
|
|
1674
1674
|
variant: "primary",
|
|
1675
1675
|
label: f(o)("report.common.update"),
|
|
1676
|
-
onClick:
|
|
1676
|
+
onClick: h
|
|
1677
1677
|
}, null, 8, ["label"])
|
|
1678
1678
|
])
|
|
1679
1679
|
])
|
|
1680
1680
|
]),
|
|
1681
|
-
i(
|
|
1681
|
+
i(P, { style: { margin: 0 } }),
|
|
1682
1682
|
t("div", Jo, [
|
|
1683
1683
|
t("div", Wo, [
|
|
1684
1684
|
t("div", Zo, T(f(o)("report.integration.autocount.general")), 1),
|
|
@@ -1697,7 +1697,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1697
1697
|
modelValue: e.value.platform.locationIds,
|
|
1698
1698
|
"onUpdate:modelValue": a[1] || (a[1] = (U) => e.value.platform.locationIds = U),
|
|
1699
1699
|
multiselect: !0,
|
|
1700
|
-
items:
|
|
1700
|
+
items: m.value,
|
|
1701
1701
|
placeholder: "Select location",
|
|
1702
1702
|
class: "flex-grow",
|
|
1703
1703
|
rules: [(U) => U.length !== 0 || "Please select at least 1 location"]
|
|
@@ -1709,7 +1709,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1709
1709
|
modelValue: e.value.platform.grouping,
|
|
1710
1710
|
"onUpdate:modelValue": a[2] || (a[2] = (U) => e.value.platform.grouping = U),
|
|
1711
1711
|
multiselect: !1,
|
|
1712
|
-
items:
|
|
1712
|
+
items: p,
|
|
1713
1713
|
placeholder: "Select grouping",
|
|
1714
1714
|
class: "flex-grow"
|
|
1715
1715
|
}, null, 8, ["modelValue"])
|
|
@@ -1717,63 +1717,63 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1717
1717
|
]),
|
|
1718
1718
|
t("div", ia, [
|
|
1719
1719
|
t("div", ra, [
|
|
1720
|
-
i(
|
|
1720
|
+
i(A, {
|
|
1721
1721
|
"model-value": { key: "Project", account: e.value.platform.mappings.project },
|
|
1722
|
-
options:
|
|
1723
|
-
"onUpdate:modelValue": a[3] || (a[3] = (U) =>
|
|
1722
|
+
options: y("Project"),
|
|
1723
|
+
"onUpdate:modelValue": a[3] || (a[3] = (U) => r({ key: "project", value: U.account }))
|
|
1724
1724
|
}, null, 8, ["model-value", "options"]),
|
|
1725
|
-
i(
|
|
1725
|
+
i(A, {
|
|
1726
1726
|
"model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
|
|
1727
|
-
options:
|
|
1728
|
-
"onUpdate:modelValue": a[4] || (a[4] = (U) =>
|
|
1727
|
+
options: y("Debtor"),
|
|
1728
|
+
"onUpdate:modelValue": a[4] || (a[4] = (U) => r({ key: "debtor", value: U.account }))
|
|
1729
1729
|
}, null, 8, ["model-value", "options"]),
|
|
1730
|
-
i(
|
|
1730
|
+
i(A, {
|
|
1731
1731
|
"model-value": {
|
|
1732
1732
|
key: "Invoice no",
|
|
1733
1733
|
account: e.value.platform.mappings.invoiceDocNo
|
|
1734
1734
|
},
|
|
1735
|
-
options:
|
|
1736
|
-
"onUpdate:modelValue": a[5] || (a[5] = (U) =>
|
|
1735
|
+
options: y("Invoice no"),
|
|
1736
|
+
"onUpdate:modelValue": a[5] || (a[5] = (U) => r({ key: "invoiceDocNo", value: U.account }))
|
|
1737
1737
|
}, null, 8, ["model-value", "options"]),
|
|
1738
|
-
i(
|
|
1738
|
+
i(A, {
|
|
1739
1739
|
"model-value": {
|
|
1740
1740
|
key: "Credit note no",
|
|
1741
1741
|
account: e.value.platform.mappings.creditNoteDocNo
|
|
1742
1742
|
},
|
|
1743
|
-
options:
|
|
1744
|
-
"onUpdate:modelValue": a[6] || (a[6] = (U) =>
|
|
1743
|
+
options: y("Credit note no"),
|
|
1744
|
+
"onUpdate:modelValue": a[6] || (a[6] = (U) => r({ key: "creditNoteDocNo", value: U.account }))
|
|
1745
1745
|
}, null, 8, ["model-value", "options"]),
|
|
1746
|
-
i(
|
|
1746
|
+
i(A, {
|
|
1747
1747
|
"model-value": {
|
|
1748
1748
|
key: "Payment no",
|
|
1749
1749
|
account: e.value.platform.mappings.paymentDocNo
|
|
1750
1750
|
},
|
|
1751
|
-
options:
|
|
1752
|
-
"onUpdate:modelValue": a[7] || (a[7] = (U) =>
|
|
1751
|
+
options: y("Payment no"),
|
|
1752
|
+
"onUpdate:modelValue": a[7] || (a[7] = (U) => r({ key: "paymentDocNo", value: U.account }))
|
|
1753
1753
|
}, null, 8, ["model-value", "options"]),
|
|
1754
|
-
i(
|
|
1754
|
+
i(A, {
|
|
1755
1755
|
"model-value": {
|
|
1756
1756
|
key: "Refund no",
|
|
1757
1757
|
account: e.value.platform.mappings.refundDocNo
|
|
1758
1758
|
},
|
|
1759
|
-
options:
|
|
1760
|
-
"onUpdate:modelValue": a[8] || (a[8] = (U) =>
|
|
1759
|
+
options: y("Refund no"),
|
|
1760
|
+
"onUpdate:modelValue": a[8] || (a[8] = (U) => r({ key: "refundDocNo", value: U.account }))
|
|
1761
1761
|
}, null, 8, ["model-value", "options"]),
|
|
1762
|
-
i(
|
|
1762
|
+
i(A, {
|
|
1763
1763
|
"model-value": {
|
|
1764
1764
|
key: "Rounding",
|
|
1765
1765
|
account: e.value.platform.mappings.rounding.account
|
|
1766
1766
|
},
|
|
1767
|
-
options:
|
|
1767
|
+
options: y("Rounding"),
|
|
1768
1768
|
"onUpdate:modelValue": a[9] || (a[9] = (U) => {
|
|
1769
|
-
var
|
|
1770
|
-
(
|
|
1769
|
+
var S, C, M;
|
|
1770
|
+
(M = (C = (S = e.value) == null ? void 0 : S.platform) == null ? void 0 : C.mappings) != null && M.rounding && (e.value.platform.mappings.rounding.account = U.account);
|
|
1771
1771
|
})
|
|
1772
1772
|
}, null, 8, ["model-value", "options"]),
|
|
1773
|
-
(
|
|
1774
|
-
key: `charge-${
|
|
1775
|
-
modelValue: e.value.platform.mappings.charges[
|
|
1776
|
-
"onUpdate:modelValue": (
|
|
1773
|
+
(c(!0), F(L, null, X((E = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : E.charges, (U, S) => (c(), K(A, {
|
|
1774
|
+
key: `charge-${S}`,
|
|
1775
|
+
modelValue: e.value.platform.mappings.charges[S],
|
|
1776
|
+
"onUpdate:modelValue": (C) => e.value.platform.mappings.charges[S] = C,
|
|
1777
1777
|
options: {
|
|
1778
1778
|
key: { placeholder: "Key", editable: !1 },
|
|
1779
1779
|
account: { placeholder: "Account code", editable: !0 }
|
|
@@ -1791,20 +1791,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1791
1791
|
i(s, {
|
|
1792
1792
|
variant: "primary",
|
|
1793
1793
|
icon: "add",
|
|
1794
|
-
onClick: a[11] || (a[11] = () =>
|
|
1794
|
+
onClick: a[11] || (a[11] = () => u("items"))
|
|
1795
1795
|
})
|
|
1796
1796
|
]),
|
|
1797
1797
|
t("div", da, [
|
|
1798
|
-
(
|
|
1799
|
-
key: `item-${
|
|
1800
|
-
modelValue: e.value.platform.mappings.items[
|
|
1801
|
-
"onUpdate:modelValue": (
|
|
1798
|
+
(c(!0), F(L, null, X((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U, S) => (c(), K(A, {
|
|
1799
|
+
key: `item-${S}`,
|
|
1800
|
+
modelValue: e.value.platform.mappings.items[S],
|
|
1801
|
+
"onUpdate:modelValue": (C) => e.value.platform.mappings.items[S] = C,
|
|
1802
1802
|
options: {
|
|
1803
1803
|
key: { placeholder: "Key", editable: !0 },
|
|
1804
1804
|
account: { placeholder: "Account code", editable: !0 }
|
|
1805
1805
|
},
|
|
1806
1806
|
removable: !0,
|
|
1807
|
-
onRemove: () =>
|
|
1807
|
+
onRemove: () => _("items", S)
|
|
1808
1808
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1809
1809
|
]),
|
|
1810
1810
|
t("div", pa, [
|
|
@@ -1812,20 +1812,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1812
1812
|
i(s, {
|
|
1813
1813
|
variant: "primary",
|
|
1814
1814
|
icon: "add",
|
|
1815
|
-
onClick: a[12] || (a[12] = () =>
|
|
1815
|
+
onClick: a[12] || (a[12] = () => u("taxes"))
|
|
1816
1816
|
})
|
|
1817
1817
|
]),
|
|
1818
1818
|
t("div", fa, [
|
|
1819
|
-
(
|
|
1820
|
-
key: `tax-${
|
|
1821
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
1822
|
-
"onUpdate:modelValue": (
|
|
1819
|
+
(c(!0), F(L, null, X((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U, S) => (c(), K(A, {
|
|
1820
|
+
key: `tax-${S}`,
|
|
1821
|
+
modelValue: e.value.platform.mappings.taxes[S],
|
|
1822
|
+
"onUpdate:modelValue": (C) => e.value.platform.mappings.taxes[S] = C,
|
|
1823
1823
|
options: {
|
|
1824
1824
|
key: { placeholder: "Key", editable: !0 },
|
|
1825
1825
|
account: { placeholder: "Account code", editable: !0 }
|
|
1826
1826
|
},
|
|
1827
1827
|
removable: !0,
|
|
1828
|
-
onRemove: () =>
|
|
1828
|
+
onRemove: () => _("taxes", S)
|
|
1829
1829
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1830
1830
|
]),
|
|
1831
1831
|
t("div", va, [
|
|
@@ -1833,20 +1833,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1833
1833
|
i(s, {
|
|
1834
1834
|
variant: "primary",
|
|
1835
1835
|
icon: "add",
|
|
1836
|
-
onClick: a[13] || (a[13] = () =>
|
|
1836
|
+
onClick: a[13] || (a[13] = () => u("payments"))
|
|
1837
1837
|
})
|
|
1838
1838
|
]),
|
|
1839
1839
|
t("div", ya, [
|
|
1840
|
-
(
|
|
1841
|
-
key: `payment-${
|
|
1842
|
-
modelValue: e.value.platform.mappings.payments[
|
|
1843
|
-
"onUpdate:modelValue": (
|
|
1840
|
+
(c(!0), F(L, null, X((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U, S) => (c(), K(A, {
|
|
1841
|
+
key: `payment-${S}`,
|
|
1842
|
+
modelValue: e.value.platform.mappings.payments[S],
|
|
1843
|
+
"onUpdate:modelValue": (C) => e.value.platform.mappings.payments[S] = C,
|
|
1844
1844
|
options: {
|
|
1845
1845
|
key: { placeholder: "Key", editable: !0 },
|
|
1846
1846
|
account: { placeholder: "Payment name", editable: !0 }
|
|
1847
1847
|
},
|
|
1848
1848
|
removable: !0,
|
|
1849
|
-
onRemove: () =>
|
|
1849
|
+
onRemove: () => _("payments", S)
|
|
1850
1850
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1851
1851
|
])
|
|
1852
1852
|
])
|
|
@@ -1863,37 +1863,37 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1863
1863
|
modelModifiers: {}
|
|
1864
1864
|
},
|
|
1865
1865
|
emits: ["update:modelValue"],
|
|
1866
|
-
setup(
|
|
1867
|
-
const o = B([]),
|
|
1868
|
-
() =>
|
|
1869
|
-
const
|
|
1870
|
-
|
|
1871
|
-
date:
|
|
1872
|
-
docNo:
|
|
1873
|
-
projNo:
|
|
1874
|
-
debtor:
|
|
1875
|
-
description:
|
|
1866
|
+
setup(g) {
|
|
1867
|
+
const { t: o } = W(), e = B([]), n = z(
|
|
1868
|
+
() => e.value.reduce((d, h) => {
|
|
1869
|
+
const _ = d.length, { invoice: u, payments: p } = h;
|
|
1870
|
+
d[_] = {
|
|
1871
|
+
date: u.DocDate,
|
|
1872
|
+
docNo: u.DocNo,
|
|
1873
|
+
projNo: u.ProjNo,
|
|
1874
|
+
debtor: u.DebtorCode,
|
|
1875
|
+
description: u.Description
|
|
1876
1876
|
};
|
|
1877
|
-
for (let
|
|
1878
|
-
const
|
|
1879
|
-
|
|
1880
|
-
...
|
|
1881
|
-
itemDescription:
|
|
1882
|
-
itemUnitPrice:
|
|
1883
|
-
itemAccount:
|
|
1884
|
-
itemTaxCode:
|
|
1885
|
-
itemTax:
|
|
1886
|
-
}),
|
|
1887
|
-
...
|
|
1888
|
-
paymentDocNo:
|
|
1889
|
-
paymentMethod:
|
|
1890
|
-
paymentDescription:
|
|
1891
|
-
paymentAmount:
|
|
1877
|
+
for (let r = 0; r < Math.max(u._items.length, p.length); r++) {
|
|
1878
|
+
const y = _ + r;
|
|
1879
|
+
d[y] || (d[y] = {}), u._items[r] && (d[y] = {
|
|
1880
|
+
...d[y],
|
|
1881
|
+
itemDescription: u._items[r].DetailDescription,
|
|
1882
|
+
itemUnitPrice: u._items[r].Amount,
|
|
1883
|
+
itemAccount: u._items[r].AccNo,
|
|
1884
|
+
itemTaxCode: u._items[r].TaxType,
|
|
1885
|
+
itemTax: u._items[r].Tax
|
|
1886
|
+
}), p[r] && (d[y] = {
|
|
1887
|
+
...d[y],
|
|
1888
|
+
paymentDocNo: p[r].DocNo,
|
|
1889
|
+
paymentMethod: p[r].paymentMethod,
|
|
1890
|
+
paymentDescription: p[r].Description,
|
|
1891
|
+
paymentAmount: p[r].PaymentAmt
|
|
1892
1892
|
});
|
|
1893
1893
|
}
|
|
1894
|
-
return
|
|
1894
|
+
return d;
|
|
1895
1895
|
}, [])
|
|
1896
|
-
),
|
|
1896
|
+
), k = [
|
|
1897
1897
|
{
|
|
1898
1898
|
accessorKey: "date",
|
|
1899
1899
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -1964,15 +1964,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1964
1964
|
header: "Payment Amount",
|
|
1965
1965
|
enableSorting: !1
|
|
1966
1966
|
}
|
|
1967
|
-
],
|
|
1967
|
+
], b = Q(g, "modelValue"), x = B(!1), D = fe(), { dateRange: w } = De(ue());
|
|
1968
1968
|
ge(
|
|
1969
|
-
() =>
|
|
1969
|
+
() => w.value,
|
|
1970
1970
|
async () => {
|
|
1971
|
-
if (
|
|
1971
|
+
if (b.value._id)
|
|
1972
1972
|
try {
|
|
1973
|
-
x.value = !0,
|
|
1974
|
-
} catch (
|
|
1975
|
-
|
|
1973
|
+
x.value = !0, e.value = await Ce(b.value._id);
|
|
1974
|
+
} catch (d) {
|
|
1975
|
+
D.open({ message: d.message, type: "error" });
|
|
1976
1976
|
} finally {
|
|
1977
1977
|
x.value = !1;
|
|
1978
1978
|
}
|
|
@@ -1981,39 +1981,39 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1981
1981
|
immediate: !0
|
|
1982
1982
|
}
|
|
1983
1983
|
);
|
|
1984
|
-
async function
|
|
1984
|
+
async function m() {
|
|
1985
1985
|
try {
|
|
1986
|
-
|
|
1987
|
-
} catch (
|
|
1988
|
-
|
|
1986
|
+
b.value._id ? (x.value = !0, await Pe(b.value._id)) : D.open({ message: "Invalid accounting setting", type: "error" });
|
|
1987
|
+
} catch (d) {
|
|
1988
|
+
D.open({ message: d.message, type: "error" });
|
|
1989
1989
|
} finally {
|
|
1990
1990
|
x.value = !1;
|
|
1991
1991
|
}
|
|
1992
1992
|
}
|
|
1993
|
-
return (
|
|
1994
|
-
const
|
|
1995
|
-
return
|
|
1993
|
+
return (d, h) => {
|
|
1994
|
+
const _ = $("FmButton"), u = $("FmCircularProgress"), p = $("FmTable");
|
|
1995
|
+
return c(), F("div", _a, [
|
|
1996
1996
|
t("div", ba, [
|
|
1997
1997
|
i(Ue, {
|
|
1998
|
-
"date-range": f(
|
|
1999
|
-
"onUpdate:dateRange":
|
|
1998
|
+
"date-range": f(w),
|
|
1999
|
+
"onUpdate:dateRange": h[0] || (h[0] = (r) => he(w) ? w.value = r : null),
|
|
2000
2000
|
compare: !1
|
|
2001
2001
|
}, null, 8, ["date-range"]),
|
|
2002
|
-
i(
|
|
2002
|
+
i(_, {
|
|
2003
2003
|
loading: x.value,
|
|
2004
2004
|
variant: "primary",
|
|
2005
|
-
label:
|
|
2006
|
-
onClick:
|
|
2005
|
+
label: f(o)("report.common.download"),
|
|
2006
|
+
onClick: m
|
|
2007
2007
|
}, null, 8, ["loading", "label"])
|
|
2008
2008
|
]),
|
|
2009
|
-
x.value ? (
|
|
2010
|
-
i(
|
|
2011
|
-
t("span", ha, T(
|
|
2012
|
-
])) :
|
|
2009
|
+
x.value ? (c(), F("div", wa, [
|
|
2010
|
+
i(u, { size: "xl" }),
|
|
2011
|
+
t("span", ha, T(f(o)("report.common.isLoading")), 1)
|
|
2012
|
+
])) : n.value.length > 0 ? (c(), K(p, {
|
|
2013
2013
|
key: 1,
|
|
2014
2014
|
class: "flex overflow-scroll",
|
|
2015
|
-
"row-data":
|
|
2016
|
-
"column-defs":
|
|
2015
|
+
"row-data": n.value,
|
|
2016
|
+
"column-defs": k
|
|
2017
2017
|
}, null, 8, ["row-data"])) : R("", !0)
|
|
2018
2018
|
]);
|
|
2019
2019
|
};
|
|
@@ -2025,8 +2025,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2025
2025
|
modelModifiers: {}
|
|
2026
2026
|
},
|
|
2027
2027
|
emits: ["update:modelValue"],
|
|
2028
|
-
setup(
|
|
2029
|
-
const { t: o } = W(), e = Q(
|
|
2028
|
+
setup(g) {
|
|
2029
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
|
|
2030
2030
|
{
|
|
2031
2031
|
label: o("report.integration.setting"),
|
|
2032
2032
|
value: "setting",
|
|
@@ -2037,7 +2037,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2037
2037
|
value: "preview",
|
|
2038
2038
|
icon: "table"
|
|
2039
2039
|
}
|
|
2040
|
-
],
|
|
2040
|
+
], b = pe(), x = z(() => {
|
|
2041
2041
|
switch (n.value) {
|
|
2042
2042
|
case "preview":
|
|
2043
2043
|
return ka;
|
|
@@ -2047,30 +2047,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2047
2047
|
return null;
|
|
2048
2048
|
}
|
|
2049
2049
|
});
|
|
2050
|
-
return (
|
|
2051
|
-
var
|
|
2052
|
-
const
|
|
2053
|
-
return
|
|
2054
|
-
i(
|
|
2055
|
-
title: ((
|
|
2050
|
+
return (D, w) => {
|
|
2051
|
+
var h;
|
|
2052
|
+
const m = $("FmPageHead"), d = $("FmTabs");
|
|
2053
|
+
return c(), F("div", Va, [
|
|
2054
|
+
i(m, {
|
|
2055
|
+
title: ((h = e.value) == null ? void 0 : h.name) || "AutoCount",
|
|
2056
2056
|
"back-button": !0,
|
|
2057
2057
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2058
|
-
"onClick:back": f(
|
|
2058
|
+
"onClick:back": f(b).back
|
|
2059
2059
|
}, {
|
|
2060
|
-
description: xe(() =>
|
|
2060
|
+
description: xe(() => w[2] || (w[2] = [
|
|
2061
2061
|
t("div", null, null, -1)
|
|
2062
2062
|
])),
|
|
2063
2063
|
_: 1
|
|
2064
2064
|
}, 8, ["title", "onClick:back"]),
|
|
2065
|
-
i(
|
|
2065
|
+
i(d, {
|
|
2066
2066
|
"model-value": n.value,
|
|
2067
|
-
"onUpdate:modelValue":
|
|
2068
|
-
items:
|
|
2067
|
+
"onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
|
|
2068
|
+
items: k
|
|
2069
2069
|
}, null, 8, ["model-value"]),
|
|
2070
2070
|
t("div", $a, [
|
|
2071
|
-
(
|
|
2071
|
+
(c(), K(be(x.value), {
|
|
2072
2072
|
modelValue: e.value,
|
|
2073
|
-
"onUpdate:modelValue":
|
|
2073
|
+
"onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
|
|
2074
2074
|
}, null, 8, ["modelValue"]))
|
|
2075
2075
|
])
|
|
2076
2076
|
]);
|
|
@@ -2086,40 +2086,40 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2086
2086
|
modelModifiers: {}
|
|
2087
2087
|
},
|
|
2088
2088
|
emits: ["update:modelValue"],
|
|
2089
|
-
setup(
|
|
2090
|
-
const { t: o } = W(), e = Q(
|
|
2091
|
-
() =>
|
|
2089
|
+
setup(g) {
|
|
2090
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
|
|
2091
|
+
() => w.map((l) => ({ label: l.name, value: l.id }))
|
|
2092
2092
|
);
|
|
2093
|
-
async function
|
|
2094
|
-
await
|
|
2093
|
+
async function d() {
|
|
2094
|
+
await D({
|
|
2095
2095
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
2096
2096
|
title: o("report.common.delete")
|
|
2097
|
-
}) && await
|
|
2097
|
+
}) && await x(async () => {
|
|
2098
2098
|
try {
|
|
2099
|
-
await Ve(e.value._id), await
|
|
2099
|
+
await Ve(e.value._id), await k.getSettings(), b.back();
|
|
2100
2100
|
} catch (a) {
|
|
2101
2101
|
n.open({ type: "error", message: a.message });
|
|
2102
2102
|
}
|
|
2103
2103
|
});
|
|
2104
2104
|
}
|
|
2105
|
-
async function
|
|
2106
|
-
await
|
|
2105
|
+
async function h() {
|
|
2106
|
+
await x(async () => {
|
|
2107
2107
|
try {
|
|
2108
|
-
await $e(e.value._id, e.value), await
|
|
2108
|
+
await $e(e.value._id, e.value), await k.getSettings();
|
|
2109
2109
|
} catch (l) {
|
|
2110
2110
|
n.open({ type: "error", message: l.message });
|
|
2111
2111
|
}
|
|
2112
2112
|
});
|
|
2113
2113
|
}
|
|
2114
|
-
function
|
|
2115
|
-
var
|
|
2116
|
-
(s = (
|
|
2117
|
-
(
|
|
2114
|
+
function _(l, a) {
|
|
2115
|
+
var v, s;
|
|
2116
|
+
(s = (v = e.value.platform) == null ? void 0 : v.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
|
|
2117
|
+
(P, N) => N !== a
|
|
2118
2118
|
));
|
|
2119
2119
|
}
|
|
2120
|
-
function
|
|
2121
|
-
var a,
|
|
2122
|
-
(
|
|
2120
|
+
function u(l) {
|
|
2121
|
+
var a, v;
|
|
2122
|
+
(v = (a = e.value.platform) == null ? void 0 : a.mappings) != null && v[l] && (e.value.platform.mappings[l] = [
|
|
2123
2123
|
...e.value.platform.mappings[l],
|
|
2124
2124
|
l === "items" ? {
|
|
2125
2125
|
key: "",
|
|
@@ -2132,7 +2132,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2132
2132
|
}
|
|
2133
2133
|
]);
|
|
2134
2134
|
}
|
|
2135
|
-
const
|
|
2135
|
+
const p = [
|
|
2136
2136
|
{
|
|
2137
2137
|
label: "By day",
|
|
2138
2138
|
value: ve.BY_DAY
|
|
@@ -2146,23 +2146,23 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2146
2146
|
value: ve.BY_DAY_CATEGORY
|
|
2147
2147
|
}
|
|
2148
2148
|
];
|
|
2149
|
-
function
|
|
2149
|
+
function r({
|
|
2150
2150
|
key: l,
|
|
2151
2151
|
value: a
|
|
2152
2152
|
}) {
|
|
2153
|
-
var
|
|
2154
|
-
(s = (
|
|
2153
|
+
var v, s;
|
|
2154
|
+
(s = (v = e.value) == null ? void 0 : v.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
|
|
2155
2155
|
}
|
|
2156
|
-
function
|
|
2156
|
+
function y(l) {
|
|
2157
2157
|
return {
|
|
2158
2158
|
key: { placeholder: l, editable: !1 },
|
|
2159
2159
|
account: { placeholder: l, editable: !0 }
|
|
2160
2160
|
};
|
|
2161
2161
|
}
|
|
2162
|
-
async function
|
|
2163
|
-
await
|
|
2162
|
+
async function V() {
|
|
2163
|
+
await x(async () => {
|
|
2164
2164
|
try {
|
|
2165
|
-
await Se(e.value._id), await
|
|
2165
|
+
await Se(e.value._id), await k.getSettings();
|
|
2166
2166
|
} catch (l) {
|
|
2167
2167
|
n.open({ type: "error", message: l.message });
|
|
2168
2168
|
}
|
|
@@ -2170,34 +2170,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2170
2170
|
}
|
|
2171
2171
|
return (l, a) => {
|
|
2172
2172
|
var Y, J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie;
|
|
2173
|
-
const
|
|
2174
|
-
return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (
|
|
2173
|
+
const v = $("FmIcon"), s = $("FmButton"), P = $("FmMenuDivider"), N = $("FmTextField"), G = $("FmSelect");
|
|
2174
|
+
return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (c(), F("div", Ca, [
|
|
2175
2175
|
t("div", Fa, [
|
|
2176
2176
|
t("div", Da, [
|
|
2177
2177
|
a[15] || (a[15] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
2178
2178
|
t("div", Ua, [
|
|
2179
2179
|
t("div", Ta, [
|
|
2180
|
-
i(
|
|
2180
|
+
i(v, {
|
|
2181
2181
|
name: "refresh",
|
|
2182
2182
|
class: "p-2 bg-gray-100 rounded-full",
|
|
2183
|
-
onClick:
|
|
2183
|
+
onClick: V
|
|
2184
2184
|
}),
|
|
2185
2185
|
t("span", Ia, T(f(o)("report.integration.sql.refreshTooltip")), 1)
|
|
2186
2186
|
]),
|
|
2187
2187
|
i(s, {
|
|
2188
2188
|
variant: "tertiary",
|
|
2189
2189
|
label: f(o)("report.common.delete"),
|
|
2190
|
-
onClick:
|
|
2190
|
+
onClick: d
|
|
2191
2191
|
}, null, 8, ["label"]),
|
|
2192
2192
|
i(s, {
|
|
2193
2193
|
variant: "primary",
|
|
2194
2194
|
label: f(o)("report.common.update"),
|
|
2195
|
-
onClick:
|
|
2195
|
+
onClick: h
|
|
2196
2196
|
}, null, 8, ["label"])
|
|
2197
2197
|
])
|
|
2198
2198
|
])
|
|
2199
2199
|
]),
|
|
2200
|
-
i(
|
|
2200
|
+
i(P, { style: { margin: 0 } }),
|
|
2201
2201
|
t("div", Ma, [
|
|
2202
2202
|
t("div", Ka, [
|
|
2203
2203
|
t("div", Aa, T(f(o)("report.integration.sql.general")), 1),
|
|
@@ -2216,7 +2216,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2216
2216
|
modelValue: e.value.platform.locationIds,
|
|
2217
2217
|
"onUpdate:modelValue": a[1] || (a[1] = (U) => e.value.platform.locationIds = U),
|
|
2218
2218
|
multiselect: !0,
|
|
2219
|
-
items:
|
|
2219
|
+
items: m.value,
|
|
2220
2220
|
placeholder: "Select location",
|
|
2221
2221
|
class: "flex-grow",
|
|
2222
2222
|
rules: [(U) => U.length !== 0 || "Please select at least 1 location"]
|
|
@@ -2228,7 +2228,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2228
2228
|
modelValue: e.value.platform.grouping,
|
|
2229
2229
|
"onUpdate:modelValue": a[2] || (a[2] = (U) => e.value.platform.grouping = U),
|
|
2230
2230
|
multiselect: !1,
|
|
2231
|
-
items:
|
|
2231
|
+
items: p,
|
|
2232
2232
|
placeholder: "Select grouping",
|
|
2233
2233
|
class: "flex-grow"
|
|
2234
2234
|
}, null, 8, ["modelValue"])
|
|
@@ -2236,62 +2236,62 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2236
2236
|
]),
|
|
2237
2237
|
t("div", Ea, [
|
|
2238
2238
|
t("div", za, [
|
|
2239
|
-
i(
|
|
2239
|
+
i(A, {
|
|
2240
2240
|
"model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
|
|
2241
|
-
options:
|
|
2242
|
-
"onUpdate:modelValue": a[3] || (a[3] = (U) =>
|
|
2241
|
+
options: y("Debtor"),
|
|
2242
|
+
"onUpdate:modelValue": a[3] || (a[3] = (U) => r({ key: "debtor", value: U.account }))
|
|
2243
2243
|
}, null, 8, ["model-value", "options"]),
|
|
2244
|
-
i(
|
|
2244
|
+
i(A, {
|
|
2245
2245
|
"model-value": {
|
|
2246
2246
|
key: "Invoice no",
|
|
2247
2247
|
account: e.value.platform.mappings.invoiceDocNo
|
|
2248
2248
|
},
|
|
2249
|
-
options:
|
|
2250
|
-
"onUpdate:modelValue": a[4] || (a[4] = (U) =>
|
|
2249
|
+
options: y("Invoice no"),
|
|
2250
|
+
"onUpdate:modelValue": a[4] || (a[4] = (U) => r({ key: "invoiceDocNo", value: U.account }))
|
|
2251
2251
|
}, null, 8, ["model-value", "options"]),
|
|
2252
|
-
i(
|
|
2252
|
+
i(A, {
|
|
2253
2253
|
"model-value": {
|
|
2254
2254
|
key: "Credit note no",
|
|
2255
2255
|
account: e.value.platform.mappings.creditNoteDocNo
|
|
2256
2256
|
},
|
|
2257
|
-
options:
|
|
2258
|
-
"onUpdate:modelValue": a[5] || (a[5] = (U) =>
|
|
2257
|
+
options: y("Credit note no"),
|
|
2258
|
+
"onUpdate:modelValue": a[5] || (a[5] = (U) => r({ key: "creditNoteDocNo", value: U.account }))
|
|
2259
2259
|
}, null, 8, ["model-value", "options"]),
|
|
2260
|
-
i(
|
|
2260
|
+
i(A, {
|
|
2261
2261
|
"model-value": {
|
|
2262
2262
|
key: "Payment no",
|
|
2263
2263
|
account: e.value.platform.mappings.paymentDocNo
|
|
2264
2264
|
},
|
|
2265
|
-
options:
|
|
2266
|
-
"onUpdate:modelValue": a[6] || (a[6] = (U) =>
|
|
2265
|
+
options: y("Payment no"),
|
|
2266
|
+
"onUpdate:modelValue": a[6] || (a[6] = (U) => r({ key: "paymentDocNo", value: U.account }))
|
|
2267
2267
|
}, null, 8, ["model-value", "options"]),
|
|
2268
|
-
i(
|
|
2268
|
+
i(A, {
|
|
2269
2269
|
"model-value": {
|
|
2270
2270
|
key: "Refund no",
|
|
2271
2271
|
account: e.value.platform.mappings.refundDocNo
|
|
2272
2272
|
},
|
|
2273
|
-
options:
|
|
2274
|
-
"onUpdate:modelValue": a[7] || (a[7] = (U) =>
|
|
2273
|
+
options: y("Refund no"),
|
|
2274
|
+
"onUpdate:modelValue": a[7] || (a[7] = (U) => r({ key: "refundDocNo", value: U.account }))
|
|
2275
2275
|
}, null, 8, ["model-value", "options"]),
|
|
2276
|
-
i(
|
|
2276
|
+
i(A, {
|
|
2277
2277
|
"model-value": {
|
|
2278
2278
|
key: "Project header",
|
|
2279
2279
|
account: e.value.platform.mappings.projectHeader
|
|
2280
2280
|
},
|
|
2281
|
-
options:
|
|
2282
|
-
"onUpdate:modelValue": a[8] || (a[8] = (U) =>
|
|
2281
|
+
options: y("Project header"),
|
|
2282
|
+
"onUpdate:modelValue": a[8] || (a[8] = (U) => r({ key: "projectHeader", value: U.account }))
|
|
2283
2283
|
}, null, 8, ["model-value", "options"]),
|
|
2284
|
-
i(
|
|
2284
|
+
i(A, {
|
|
2285
2285
|
"model-value": {
|
|
2286
2286
|
key: "Project detail",
|
|
2287
2287
|
account: e.value.platform.mappings.projectDetail
|
|
2288
2288
|
},
|
|
2289
|
-
options:
|
|
2290
|
-
"onUpdate:modelValue": a[9] || (a[9] = (U) =>
|
|
2289
|
+
options: y("Project detail"),
|
|
2290
|
+
"onUpdate:modelValue": a[9] || (a[9] = (U) => r({ key: "projectDetail", value: U.account }))
|
|
2291
2291
|
}, null, 8, ["model-value", "options"])
|
|
2292
2292
|
]),
|
|
2293
2293
|
t("div", Ya, [
|
|
2294
|
-
i(
|
|
2294
|
+
i(A, {
|
|
2295
2295
|
"model-value": {
|
|
2296
2296
|
key: "Rounding",
|
|
2297
2297
|
account: e.value.platform.mappings.rounding.account,
|
|
@@ -2303,14 +2303,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2303
2303
|
code: { placeholder: "Item code", editable: !0 }
|
|
2304
2304
|
},
|
|
2305
2305
|
"onUpdate:modelValue": a[10] || (a[10] = (U) => {
|
|
2306
|
-
var
|
|
2307
|
-
(
|
|
2306
|
+
var S, C, M;
|
|
2307
|
+
(M = (C = (S = e.value) == null ? void 0 : S.platform) == null ? void 0 : C.mappings) != null && M.rounding && (e.value.platform.mappings.rounding.account = U.account, e.value.platform.mappings.rounding.code = U.code);
|
|
2308
2308
|
})
|
|
2309
2309
|
}, null, 8, ["model-value"]),
|
|
2310
|
-
(
|
|
2311
|
-
key: `charge-${
|
|
2312
|
-
modelValue: e.value.platform.mappings.charges[
|
|
2313
|
-
"onUpdate:modelValue": (
|
|
2310
|
+
(c(!0), F(L, null, X((E = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : E.charges, (U, S) => (c(), K(A, {
|
|
2311
|
+
key: `charge-${S}`,
|
|
2312
|
+
modelValue: e.value.platform.mappings.charges[S],
|
|
2313
|
+
"onUpdate:modelValue": (C) => e.value.platform.mappings.charges[S] = C,
|
|
2314
2314
|
options: {
|
|
2315
2315
|
key: { placeholder: "Key", editable: !1 },
|
|
2316
2316
|
account: { placeholder: "Account code", editable: !0 },
|
|
@@ -2329,21 +2329,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2329
2329
|
i(s, {
|
|
2330
2330
|
variant: "primary",
|
|
2331
2331
|
label: f(o)("report.action.add"),
|
|
2332
|
-
onClick: a[12] || (a[12] = () =>
|
|
2332
|
+
onClick: a[12] || (a[12] = () => u("items"))
|
|
2333
2333
|
}, null, 8, ["label"])
|
|
2334
2334
|
]),
|
|
2335
2335
|
t("div", Xa, [
|
|
2336
|
-
(
|
|
2337
|
-
key: `item-${
|
|
2338
|
-
modelValue: e.value.platform.mappings.items[
|
|
2339
|
-
"onUpdate:modelValue": (
|
|
2336
|
+
(c(!0), F(L, null, X((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U, S) => (c(), K(A, {
|
|
2337
|
+
key: `item-${S}`,
|
|
2338
|
+
modelValue: e.value.platform.mappings.items[S],
|
|
2339
|
+
"onUpdate:modelValue": (C) => e.value.platform.mappings.items[S] = C,
|
|
2340
2340
|
options: {
|
|
2341
2341
|
key: { placeholder: "Key", editable: !0 },
|
|
2342
2342
|
account: { placeholder: "Account code", editable: !0 },
|
|
2343
2343
|
code: { placeholder: "Item code", editable: !0 }
|
|
2344
2344
|
},
|
|
2345
2345
|
removable: !0,
|
|
2346
|
-
onRemove: () =>
|
|
2346
|
+
onRemove: () => _("items", S)
|
|
2347
2347
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2348
2348
|
]),
|
|
2349
2349
|
t("div", Qa, [
|
|
@@ -2351,20 +2351,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2351
2351
|
i(s, {
|
|
2352
2352
|
variant: "primary",
|
|
2353
2353
|
icon: "add",
|
|
2354
|
-
onClick: a[13] || (a[13] = () =>
|
|
2354
|
+
onClick: a[13] || (a[13] = () => u("taxes"))
|
|
2355
2355
|
})
|
|
2356
2356
|
]),
|
|
2357
2357
|
t("div", Ja, [
|
|
2358
|
-
(
|
|
2359
|
-
key: `tax-${
|
|
2360
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
2361
|
-
"onUpdate:modelValue": (
|
|
2358
|
+
(c(!0), F(L, null, X((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U, S) => (c(), K(A, {
|
|
2359
|
+
key: `tax-${S}`,
|
|
2360
|
+
modelValue: e.value.platform.mappings.taxes[S],
|
|
2361
|
+
"onUpdate:modelValue": (C) => e.value.platform.mappings.taxes[S] = C,
|
|
2362
2362
|
options: {
|
|
2363
2363
|
key: { placeholder: "Key", editable: !0 },
|
|
2364
2364
|
account: { placeholder: "Account code", editable: !0 }
|
|
2365
2365
|
},
|
|
2366
2366
|
removable: !0,
|
|
2367
|
-
onRemove: () =>
|
|
2367
|
+
onRemove: () => _("taxes", S)
|
|
2368
2368
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2369
2369
|
]),
|
|
2370
2370
|
t("div", Wa, [
|
|
@@ -2372,20 +2372,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2372
2372
|
i(s, {
|
|
2373
2373
|
variant: "primary",
|
|
2374
2374
|
icon: "add",
|
|
2375
|
-
onClick: a[14] || (a[14] = () =>
|
|
2375
|
+
onClick: a[14] || (a[14] = () => u("payments"))
|
|
2376
2376
|
})
|
|
2377
2377
|
]),
|
|
2378
2378
|
t("div", el, [
|
|
2379
|
-
(
|
|
2380
|
-
key: `payment-${
|
|
2381
|
-
modelValue: e.value.platform.mappings.payments[
|
|
2382
|
-
"onUpdate:modelValue": (
|
|
2379
|
+
(c(!0), F(L, null, X((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U, S) => (c(), K(A, {
|
|
2380
|
+
key: `payment-${S}`,
|
|
2381
|
+
modelValue: e.value.platform.mappings.payments[S],
|
|
2382
|
+
"onUpdate:modelValue": (C) => e.value.platform.mappings.payments[S] = C,
|
|
2383
2383
|
options: {
|
|
2384
2384
|
key: { placeholder: "Key", editable: !0 },
|
|
2385
2385
|
account: { placeholder: "Method", editable: !0 }
|
|
2386
2386
|
},
|
|
2387
2387
|
removable: !0,
|
|
2388
|
-
onRemove: () =>
|
|
2388
|
+
onRemove: () => _("payments", S)
|
|
2389
2389
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2390
2390
|
])
|
|
2391
2391
|
])
|
|
@@ -2402,37 +2402,37 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2402
2402
|
modelModifiers: {}
|
|
2403
2403
|
},
|
|
2404
2404
|
emits: ["update:modelValue"],
|
|
2405
|
-
setup(
|
|
2405
|
+
setup(g) {
|
|
2406
2406
|
const { t: o } = W(), e = B([]), n = z(
|
|
2407
|
-
() => e.value.reduce((
|
|
2408
|
-
const
|
|
2409
|
-
|
|
2410
|
-
date:
|
|
2411
|
-
docNo:
|
|
2412
|
-
debtor:
|
|
2413
|
-
description:
|
|
2407
|
+
() => e.value.reduce((d, h) => {
|
|
2408
|
+
const _ = d.length, { invoice: u, payments: p } = h;
|
|
2409
|
+
d[_] = {
|
|
2410
|
+
date: u.DocDate,
|
|
2411
|
+
docNo: u.DocNo,
|
|
2412
|
+
debtor: u.Code,
|
|
2413
|
+
description: u.Description_HDR
|
|
2414
2414
|
};
|
|
2415
|
-
for (let
|
|
2416
|
-
const
|
|
2417
|
-
|
|
2418
|
-
...
|
|
2419
|
-
itemDescription:
|
|
2420
|
-
itemUnitPrice:
|
|
2421
|
-
itemAccount:
|
|
2422
|
-
itemTaxCode:
|
|
2423
|
-
itemTax:
|
|
2424
|
-
}),
|
|
2425
|
-
...
|
|
2426
|
-
paymentDocNo:
|
|
2427
|
-
paymentMethod:
|
|
2428
|
-
paymentAccount:
|
|
2429
|
-
paymentDescription:
|
|
2430
|
-
paymentAmount:
|
|
2415
|
+
for (let r = 0; r < Math.max(u._items.length, p.length); r++) {
|
|
2416
|
+
const y = _ + r;
|
|
2417
|
+
d[y] || (d[y] = {}), u._items[r] && (d[y] = {
|
|
2418
|
+
...d[y],
|
|
2419
|
+
itemDescription: u._items[r].Description_DTL,
|
|
2420
|
+
itemUnitPrice: u._items[r].UnitPrice,
|
|
2421
|
+
itemAccount: u._items[r].ACCOUNT,
|
|
2422
|
+
itemTaxCode: u._items[r].Tax,
|
|
2423
|
+
itemTax: u._items[r].TaxAmt
|
|
2424
|
+
}), p[r] && (d[y] = {
|
|
2425
|
+
...d[y],
|
|
2426
|
+
paymentDocNo: p[r].DOCNO_Header,
|
|
2427
|
+
paymentMethod: p[r].PAYMENTMETHOD,
|
|
2428
|
+
paymentAccount: p[r].CODE,
|
|
2429
|
+
paymentDescription: p[r].DESCRIPTION,
|
|
2430
|
+
paymentAmount: p[r].KOAMT
|
|
2431
2431
|
});
|
|
2432
2432
|
}
|
|
2433
|
-
return
|
|
2433
|
+
return d;
|
|
2434
2434
|
}, [])
|
|
2435
|
-
),
|
|
2435
|
+
), k = [
|
|
2436
2436
|
{
|
|
2437
2437
|
accessorKey: "date",
|
|
2438
2438
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -2498,56 +2498,56 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2498
2498
|
header: "Payment Amount",
|
|
2499
2499
|
enableSorting: !1
|
|
2500
2500
|
}
|
|
2501
|
-
],
|
|
2501
|
+
], b = Q(g, "modelValue"), x = B(!1), D = fe(), { dateRange: w } = De(ue());
|
|
2502
2502
|
ge(
|
|
2503
|
-
() =>
|
|
2503
|
+
() => w.value,
|
|
2504
2504
|
async () => {
|
|
2505
|
-
if (
|
|
2505
|
+
if (b.value._id)
|
|
2506
2506
|
try {
|
|
2507
|
-
|
|
2508
|
-
} catch (
|
|
2509
|
-
|
|
2507
|
+
x.value = !0, e.value = await Ce(b.value._id);
|
|
2508
|
+
} catch (d) {
|
|
2509
|
+
D.open({ message: d.message, type: "error" });
|
|
2510
2510
|
} finally {
|
|
2511
|
-
|
|
2511
|
+
x.value = !1;
|
|
2512
2512
|
}
|
|
2513
2513
|
},
|
|
2514
2514
|
{
|
|
2515
2515
|
immediate: !0
|
|
2516
2516
|
}
|
|
2517
2517
|
);
|
|
2518
|
-
async function
|
|
2518
|
+
async function m() {
|
|
2519
2519
|
try {
|
|
2520
|
-
|
|
2521
|
-
} catch (
|
|
2522
|
-
|
|
2520
|
+
b.value._id ? (x.value = !0, await Pe(b.value._id)) : D.open({ message: "Invalid accounting setting", type: "error" });
|
|
2521
|
+
} catch (d) {
|
|
2522
|
+
D.open({ message: d.message, type: "error" });
|
|
2523
2523
|
} finally {
|
|
2524
|
-
|
|
2524
|
+
x.value = !1;
|
|
2525
2525
|
}
|
|
2526
2526
|
}
|
|
2527
|
-
return (
|
|
2528
|
-
const
|
|
2529
|
-
return
|
|
2527
|
+
return (d, h) => {
|
|
2528
|
+
const _ = $("FmButton"), u = $("FmCircularProgress"), p = $("FmTable");
|
|
2529
|
+
return c(), F("div", ol, [
|
|
2530
2530
|
t("div", al, [
|
|
2531
2531
|
i(Ue, {
|
|
2532
|
-
"date-range": f(
|
|
2533
|
-
"onUpdate:dateRange":
|
|
2532
|
+
"date-range": f(w),
|
|
2533
|
+
"onUpdate:dateRange": h[0] || (h[0] = (r) => he(w) ? w.value = r : null),
|
|
2534
2534
|
compare: !1
|
|
2535
2535
|
}, null, 8, ["date-range"]),
|
|
2536
|
-
i(
|
|
2537
|
-
loading:
|
|
2536
|
+
i(_, {
|
|
2537
|
+
loading: x.value,
|
|
2538
2538
|
variant: "primary",
|
|
2539
2539
|
label: f(o)("report.common.download"),
|
|
2540
|
-
onClick:
|
|
2540
|
+
onClick: m
|
|
2541
2541
|
}, null, 8, ["loading", "label"])
|
|
2542
2542
|
]),
|
|
2543
|
-
|
|
2544
|
-
i(
|
|
2545
|
-
t("span", nl, T(f(o)("report.common.
|
|
2546
|
-
])) : n.value.length > 0 ? (
|
|
2543
|
+
x.value ? (c(), F("div", ll, [
|
|
2544
|
+
i(u, { size: "xl" }),
|
|
2545
|
+
t("span", nl, T(f(o)("report.common.isLoading")), 1)
|
|
2546
|
+
])) : n.value.length > 0 ? (c(), K(p, {
|
|
2547
2547
|
key: 1,
|
|
2548
2548
|
class: "flex overflow-scroll",
|
|
2549
2549
|
"row-data": n.value,
|
|
2550
|
-
"column-defs":
|
|
2550
|
+
"column-defs": k
|
|
2551
2551
|
}, null, 8, ["row-data"])) : R("", !0)
|
|
2552
2552
|
]);
|
|
2553
2553
|
};
|
|
@@ -2559,8 +2559,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2559
2559
|
modelModifiers: {}
|
|
2560
2560
|
},
|
|
2561
2561
|
emits: ["update:modelValue"],
|
|
2562
|
-
setup(
|
|
2563
|
-
const { t: o } = W(), e = Q(
|
|
2562
|
+
setup(g) {
|
|
2563
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
|
|
2564
2564
|
{
|
|
2565
2565
|
label: o("report.integration.setting"),
|
|
2566
2566
|
value: "setting",
|
|
@@ -2571,7 +2571,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2571
2571
|
value: "preview",
|
|
2572
2572
|
icon: "table"
|
|
2573
2573
|
}
|
|
2574
|
-
],
|
|
2574
|
+
], b = pe(), x = z(() => {
|
|
2575
2575
|
switch (n.value) {
|
|
2576
2576
|
case "preview":
|
|
2577
2577
|
return sl;
|
|
@@ -2581,30 +2581,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2581
2581
|
return null;
|
|
2582
2582
|
}
|
|
2583
2583
|
});
|
|
2584
|
-
return (
|
|
2585
|
-
var
|
|
2586
|
-
const
|
|
2587
|
-
return
|
|
2588
|
-
i(
|
|
2589
|
-
title: ((
|
|
2584
|
+
return (D, w) => {
|
|
2585
|
+
var h;
|
|
2586
|
+
const m = $("FmPageHead"), d = $("FmTabs");
|
|
2587
|
+
return c(), F("div", il, [
|
|
2588
|
+
i(m, {
|
|
2589
|
+
title: ((h = e.value) == null ? void 0 : h.name) || "SQL",
|
|
2590
2590
|
"back-button": !0,
|
|
2591
2591
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2592
|
-
"onClick:back": f(
|
|
2592
|
+
"onClick:back": f(b).back
|
|
2593
2593
|
}, {
|
|
2594
|
-
description: xe(() =>
|
|
2594
|
+
description: xe(() => w[2] || (w[2] = [
|
|
2595
2595
|
t("div", null, null, -1)
|
|
2596
2596
|
])),
|
|
2597
2597
|
_: 1
|
|
2598
2598
|
}, 8, ["title", "onClick:back"]),
|
|
2599
|
-
i(
|
|
2599
|
+
i(d, {
|
|
2600
2600
|
"model-value": n.value,
|
|
2601
|
-
"onUpdate:modelValue":
|
|
2602
|
-
items:
|
|
2601
|
+
"onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
|
|
2602
|
+
items: k
|
|
2603
2603
|
}, null, 8, ["model-value"]),
|
|
2604
2604
|
t("div", rl, [
|
|
2605
|
-
(
|
|
2605
|
+
(c(), K(be(x.value), {
|
|
2606
2606
|
modelValue: e.value,
|
|
2607
|
-
"onUpdate:modelValue":
|
|
2607
|
+
"onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
|
|
2608
2608
|
}, null, 8, ["modelValue"]))
|
|
2609
2609
|
])
|
|
2610
2610
|
]);
|
|
@@ -2644,54 +2644,54 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2644
2644
|
modelModifiers: {}
|
|
2645
2645
|
}),
|
|
2646
2646
|
emits: ["update:modelValue"],
|
|
2647
|
-
setup(
|
|
2648
|
-
const { t: o } = W(), e = Q(
|
|
2649
|
-
() =>
|
|
2647
|
+
setup(g) {
|
|
2648
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
|
|
2649
|
+
() => w.map((V) => ({ label: V.name, value: V.id }))
|
|
2650
2650
|
);
|
|
2651
|
-
function
|
|
2651
|
+
function d(V) {
|
|
2652
2652
|
var l;
|
|
2653
|
-
!((l =
|
|
2654
|
-
const
|
|
2655
|
-
|
|
2653
|
+
!((l = g.retrievedMethods) != null && l.data) || !Array.isArray(g.retrievedMethods.data) || V.forEach((a) => {
|
|
2654
|
+
const v = g.retrievedMethods.data.find((s) => s.value == a.id);
|
|
2655
|
+
v && (a.cnId = v.cnId);
|
|
2656
2656
|
});
|
|
2657
2657
|
}
|
|
2658
|
-
async function
|
|
2659
|
-
await
|
|
2658
|
+
async function h() {
|
|
2659
|
+
await D({
|
|
2660
2660
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
2661
2661
|
title: o("report.common.delete")
|
|
2662
|
-
}) && await
|
|
2662
|
+
}) && await x(async () => {
|
|
2663
2663
|
try {
|
|
2664
|
-
await Ve(e.value._id), await
|
|
2664
|
+
await Ve(e.value._id), await k.getSettings(), b.back();
|
|
2665
2665
|
} catch (l) {
|
|
2666
2666
|
n.open({ type: "error", message: l.message });
|
|
2667
2667
|
}
|
|
2668
2668
|
});
|
|
2669
2669
|
}
|
|
2670
|
-
async function
|
|
2671
|
-
await
|
|
2672
|
-
var
|
|
2670
|
+
async function _() {
|
|
2671
|
+
await x(async () => {
|
|
2672
|
+
var V, l, a;
|
|
2673
2673
|
try {
|
|
2674
|
-
(a = (l = (
|
|
2675
|
-
} catch (
|
|
2676
|
-
n.open({ type: "error", message:
|
|
2674
|
+
(a = (l = (V = e.value) == null ? void 0 : V.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && d(e.value.platform.mappings.paymentMethods), await $e(e.value._id, e.value), await k.getSettings();
|
|
2675
|
+
} catch (v) {
|
|
2676
|
+
n.open({ type: "error", message: v.message });
|
|
2677
2677
|
}
|
|
2678
2678
|
});
|
|
2679
2679
|
}
|
|
2680
|
-
function
|
|
2681
|
-
var a,
|
|
2682
|
-
(
|
|
2683
|
-
(s,
|
|
2680
|
+
function u(V, l) {
|
|
2681
|
+
var a, v;
|
|
2682
|
+
(v = (a = e.value.platform) == null ? void 0 : a.mappings) != null && v[V] && (e.value.platform.mappings[V] = e.value.platform.mappings[V].filter(
|
|
2683
|
+
(s, P) => P !== l
|
|
2684
2684
|
));
|
|
2685
2685
|
}
|
|
2686
|
-
function
|
|
2686
|
+
function p(V) {
|
|
2687
2687
|
var l, a;
|
|
2688
|
-
(a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[
|
|
2689
|
-
...e.value.platform.mappings[
|
|
2690
|
-
|
|
2688
|
+
(a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[V] && (e.value.platform.mappings[V] = [
|
|
2689
|
+
...e.value.platform.mappings[V],
|
|
2690
|
+
V === "items" ? {
|
|
2691
2691
|
key: "",
|
|
2692
2692
|
account: "",
|
|
2693
2693
|
description: ""
|
|
2694
|
-
} :
|
|
2694
|
+
} : V === "taxes" ? {
|
|
2695
2695
|
key: "",
|
|
2696
2696
|
account: "SST-"
|
|
2697
2697
|
} : {
|
|
@@ -2700,7 +2700,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2700
2700
|
}
|
|
2701
2701
|
]);
|
|
2702
2702
|
}
|
|
2703
|
-
const
|
|
2703
|
+
const r = [
|
|
2704
2704
|
{
|
|
2705
2705
|
label: "By day",
|
|
2706
2706
|
value: ve.BY_DAY
|
|
@@ -2708,16 +2708,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2708
2708
|
];
|
|
2709
2709
|
ge(
|
|
2710
2710
|
() => {
|
|
2711
|
-
var
|
|
2712
|
-
return (a = (l = (
|
|
2711
|
+
var V, l, a;
|
|
2712
|
+
return (a = (l = (V = e.value) == null ? void 0 : V.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.taxes;
|
|
2713
2713
|
},
|
|
2714
|
-
(
|
|
2715
|
-
|
|
2716
|
-
var
|
|
2717
|
-
const
|
|
2714
|
+
(V) => {
|
|
2715
|
+
V && V.forEach((l, a) => {
|
|
2716
|
+
var P;
|
|
2717
|
+
const v = l.key || "";
|
|
2718
2718
|
let s = l.account;
|
|
2719
|
-
if (!s &&
|
|
2720
|
-
switch (
|
|
2719
|
+
if (!s && v) {
|
|
2720
|
+
switch (v) {
|
|
2721
2721
|
case "SST_SV":
|
|
2722
2722
|
s = "SST-6";
|
|
2723
2723
|
break;
|
|
@@ -2728,7 +2728,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2728
2728
|
s = "SST-0";
|
|
2729
2729
|
break;
|
|
2730
2730
|
}
|
|
2731
|
-
(
|
|
2731
|
+
(P = e.value.platform) != null && P.mappings && (e.value.platform.mappings.taxes[a] = {
|
|
2732
2732
|
...l,
|
|
2733
2733
|
account: s
|
|
2734
2734
|
});
|
|
@@ -2738,31 +2738,31 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2738
2738
|
{ immediate: !0, deep: !0 }
|
|
2739
2739
|
), ge(
|
|
2740
2740
|
() => {
|
|
2741
|
-
var
|
|
2742
|
-
return (a = (l = (
|
|
2741
|
+
var V, l, a;
|
|
2742
|
+
return (a = (l = (V = e.value) == null ? void 0 : V.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.version;
|
|
2743
2743
|
},
|
|
2744
|
-
(
|
|
2745
|
-
var l, a,
|
|
2746
|
-
|
|
2744
|
+
(V) => {
|
|
2745
|
+
var l, a, v, s, P;
|
|
2746
|
+
V === "v1" && !((v = (a = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : a.mappings) != null && v.payee) && (P = (s = e.value) == null ? void 0 : s.platform) != null && P.mappings && (e.value.platform.mappings.payee = {
|
|
2747
2747
|
id: 1,
|
|
2748
2748
|
name: ""
|
|
2749
2749
|
});
|
|
2750
2750
|
},
|
|
2751
2751
|
{ immediate: !0 }
|
|
2752
2752
|
);
|
|
2753
|
-
async function
|
|
2754
|
-
await
|
|
2753
|
+
async function y() {
|
|
2754
|
+
await x(async () => {
|
|
2755
2755
|
try {
|
|
2756
|
-
await Se(e.value._id), await
|
|
2757
|
-
} catch (
|
|
2758
|
-
n.open({ type: "error", message:
|
|
2756
|
+
await Se(e.value._id), await k.getSettings();
|
|
2757
|
+
} catch (V) {
|
|
2758
|
+
n.open({ type: "error", message: V.message });
|
|
2759
2759
|
}
|
|
2760
2760
|
});
|
|
2761
2761
|
}
|
|
2762
|
-
return (
|
|
2762
|
+
return (V, l) => {
|
|
2763
2763
|
var J, O, j, E, Z, ee, te, oe, ae, le, ne, se, ie, U;
|
|
2764
|
-
const a =
|
|
2765
|
-
return (O = (J = e.value) == null ? void 0 : J.platform) != null && O.mappings ? (
|
|
2764
|
+
const a = $("FmIcon"), v = $("FmButton"), s = $("FmSelect"), P = $("FmMenuDivider"), N = $("FmTextField"), G = $("FmCircularProgress"), Y = $("FmCheckbox");
|
|
2765
|
+
return (O = (J = e.value) == null ? void 0 : J.platform) != null && O.mappings ? (c(), F("div", cl, [
|
|
2766
2766
|
t("div", dl, [
|
|
2767
2767
|
t("div", pl, [
|
|
2768
2768
|
t("div", ul, T(f(o)("report.integration.connect")), 1),
|
|
@@ -2772,19 +2772,19 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2772
2772
|
i(a, {
|
|
2773
2773
|
name: "refresh",
|
|
2774
2774
|
class: "p-2 bg-gray-100 rounded-full",
|
|
2775
|
-
onClick:
|
|
2775
|
+
onClick: y
|
|
2776
2776
|
}),
|
|
2777
2777
|
t("span", yl, T(f(o)("report.integration.biztory.refreshTooltip")), 1)
|
|
2778
2778
|
]),
|
|
2779
|
-
i(
|
|
2779
|
+
i(v, {
|
|
2780
2780
|
variant: "tertiary",
|
|
2781
2781
|
label: f(o)("report.common.delete"),
|
|
2782
|
-
onClick:
|
|
2782
|
+
onClick: h
|
|
2783
2783
|
}, null, 8, ["label"]),
|
|
2784
|
-
i(
|
|
2784
|
+
i(v, {
|
|
2785
2785
|
variant: "primary",
|
|
2786
2786
|
label: f(o)("report.common.update"),
|
|
2787
|
-
onClick:
|
|
2787
|
+
onClick: _
|
|
2788
2788
|
}, null, 8, ["label"])
|
|
2789
2789
|
])
|
|
2790
2790
|
])
|
|
@@ -2797,7 +2797,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2797
2797
|
t("div", hl, [
|
|
2798
2798
|
i(s, {
|
|
2799
2799
|
modelValue: e.value.platform.mappings.version,
|
|
2800
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
2800
|
+
"onUpdate:modelValue": l[0] || (l[0] = (S) => e.value.platform.mappings.version = S),
|
|
2801
2801
|
items: [
|
|
2802
2802
|
{ label: "v1", value: "v1" },
|
|
2803
2803
|
{ label: "v2", value: "v2" }
|
|
@@ -2806,14 +2806,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2806
2806
|
}, null, 8, ["modelValue"])
|
|
2807
2807
|
])
|
|
2808
2808
|
]),
|
|
2809
|
-
i(
|
|
2809
|
+
i(P, { style: { margin: 0 } }),
|
|
2810
2810
|
t("div", kl, [
|
|
2811
2811
|
t("div", Vl, [
|
|
2812
2812
|
t("div", $l, T(f(o)("report.integration.biztory.subdomain")), 1),
|
|
2813
2813
|
t("div", Sl, [
|
|
2814
2814
|
i(N, {
|
|
2815
2815
|
modelValue: e.value.platform.subdomain,
|
|
2816
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
2816
|
+
"onUpdate:modelValue": l[1] || (l[1] = (S) => e.value.platform.subdomain = S),
|
|
2817
2817
|
placeholder: "Subdomain"
|
|
2818
2818
|
}, null, 8, ["modelValue"])
|
|
2819
2819
|
])
|
|
@@ -2823,7 +2823,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2823
2823
|
t("div", Dl, [
|
|
2824
2824
|
i(N, {
|
|
2825
2825
|
modelValue: e.value.platform.api_key,
|
|
2826
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
2826
|
+
"onUpdate:modelValue": l[2] || (l[2] = (S) => e.value.platform.api_key = S),
|
|
2827
2827
|
placeholder: "API Key"
|
|
2828
2828
|
}, null, 8, ["modelValue"])
|
|
2829
2829
|
])
|
|
@@ -2835,7 +2835,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2835
2835
|
t("div", Kl, [
|
|
2836
2836
|
i(N, {
|
|
2837
2837
|
modelValue: e.value.name,
|
|
2838
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
2838
|
+
"onUpdate:modelValue": l[3] || (l[3] = (S) => e.value.name = S)
|
|
2839
2839
|
}, null, 8, ["modelValue"])
|
|
2840
2840
|
])
|
|
2841
2841
|
]),
|
|
@@ -2843,9 +2843,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2843
2843
|
t("div", Pl, T(f(o)("report.common.location")), 1),
|
|
2844
2844
|
i(s, {
|
|
2845
2845
|
modelValue: e.value.platform.locationIds,
|
|
2846
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
2846
|
+
"onUpdate:modelValue": l[4] || (l[4] = (S) => e.value.platform.locationIds = S),
|
|
2847
2847
|
multiselect: !0,
|
|
2848
|
-
items:
|
|
2848
|
+
items: m.value,
|
|
2849
2849
|
placeholder: f(o)("report.common.location"),
|
|
2850
2850
|
class: "flex-grow"
|
|
2851
2851
|
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
@@ -2854,20 +2854,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2854
2854
|
t("div", Rl, T(f(o)("report.integration.biztory.grouping")), 1),
|
|
2855
2855
|
i(s, {
|
|
2856
2856
|
modelValue: e.value.platform.grouping,
|
|
2857
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
2857
|
+
"onUpdate:modelValue": l[5] || (l[5] = (S) => e.value.platform.grouping = S),
|
|
2858
2858
|
multiselect: !1,
|
|
2859
|
-
items:
|
|
2859
|
+
items: r,
|
|
2860
2860
|
placeholder: f(o)("report.integration.biztory.grouping"),
|
|
2861
2861
|
class: "flex-grow",
|
|
2862
2862
|
disabled: ""
|
|
2863
2863
|
}, null, 8, ["modelValue", "placeholder"])
|
|
2864
2864
|
]),
|
|
2865
|
-
e.value.platform.mappings.version == "v1" ? (
|
|
2865
|
+
e.value.platform.mappings.version == "v1" ? (c(), F("div", Ol, [
|
|
2866
2866
|
l[13] || (l[13] = t("div", { class: "w-[33%]" }, "Payee ID", -1)),
|
|
2867
|
-
e.value.platform.mappings.version == "v1" ? (
|
|
2867
|
+
e.value.platform.mappings.version == "v1" ? (c(), K(A, {
|
|
2868
2868
|
key: 0,
|
|
2869
2869
|
modelValue: e.value.platform.mappings.payee,
|
|
2870
|
-
"onUpdate:modelValue": l[6] || (l[6] = (
|
|
2870
|
+
"onUpdate:modelValue": l[6] || (l[6] = (S) => e.value.platform.mappings.payee = S),
|
|
2871
2871
|
options: {
|
|
2872
2872
|
id: { placeholder: "ID", editable: !0 }
|
|
2873
2873
|
},
|
|
@@ -2877,21 +2877,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2877
2877
|
]),
|
|
2878
2878
|
t("div", Bl, [
|
|
2879
2879
|
t("div", jl, [
|
|
2880
|
-
!
|
|
2880
|
+
!g.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (c(), K(G, {
|
|
2881
2881
|
key: 0,
|
|
2882
2882
|
size: "xl"
|
|
2883
2883
|
})) : R("", !0),
|
|
2884
|
-
|
|
2885
|
-
e.value.platform.mappings.version == "v2" ? (
|
|
2884
|
+
g.retrievedCustomers.isLoaded && g.retrievedCustomers.data && ((j = g.retrievedCustomers.data) == null ? void 0 : j.length) != 0 ? (c(), F("div", Ll, [
|
|
2885
|
+
e.value.platform.mappings.version == "v2" ? (c(), K(Me, {
|
|
2886
2886
|
key: 0,
|
|
2887
2887
|
modelValue: e.value.platform.mappings.payeeId,
|
|
2888
|
-
"onUpdate:modelValue": l[7] || (l[7] = (
|
|
2888
|
+
"onUpdate:modelValue": l[7] || (l[7] = (S) => e.value.platform.mappings.payeeId = S),
|
|
2889
2889
|
options: {
|
|
2890
2890
|
key: { placeholder: "Payee", editable: !1 },
|
|
2891
2891
|
customer: {
|
|
2892
2892
|
placeholder: "Select payee",
|
|
2893
2893
|
editable: !0,
|
|
2894
|
-
dropdownOptions: ((E =
|
|
2894
|
+
dropdownOptions: ((E = g.retrievedCustomers) == null ? void 0 : E.data) ?? []
|
|
2895
2895
|
}
|
|
2896
2896
|
},
|
|
2897
2897
|
removable: !1,
|
|
@@ -2902,66 +2902,66 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2902
2902
|
]),
|
|
2903
2903
|
i(Te, {
|
|
2904
2904
|
modelValue: e.value.platform,
|
|
2905
|
-
"onUpdate:modelValue": l[8] || (l[8] = (
|
|
2905
|
+
"onUpdate:modelValue": l[8] || (l[8] = (S) => e.value.platform = S),
|
|
2906
2906
|
label: "upload",
|
|
2907
2907
|
"last-upload-date": (Z = e.value.platform) == null ? void 0 : Z.lastUploadDate
|
|
2908
2908
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
2909
2909
|
t("div", El, [
|
|
2910
2910
|
t("div", zl, T(f(o)("report.integration.biztory.items")), 1),
|
|
2911
|
-
i(
|
|
2911
|
+
i(v, {
|
|
2912
2912
|
variant: "primary",
|
|
2913
2913
|
icon: "add",
|
|
2914
|
-
onClick: l[9] || (l[9] = () =>
|
|
2914
|
+
onClick: l[9] || (l[9] = () => p("items"))
|
|
2915
2915
|
})
|
|
2916
2916
|
]),
|
|
2917
2917
|
t("div", Yl, [
|
|
2918
|
-
(
|
|
2919
|
-
key: `item-${
|
|
2920
|
-
modelValue: e.value.platform.mappings.items[
|
|
2921
|
-
"onUpdate:modelValue": (
|
|
2918
|
+
(c(!0), F(L, null, X((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, (S, C) => (c(), K(A, {
|
|
2919
|
+
key: `item-${C}`,
|
|
2920
|
+
modelValue: e.value.platform.mappings.items[C],
|
|
2921
|
+
"onUpdate:modelValue": (M) => e.value.platform.mappings.items[C] = M,
|
|
2922
2922
|
options: {
|
|
2923
2923
|
key: { placeholder: "Key", editable: !0 },
|
|
2924
2924
|
code: { placeholder: "Account code", editable: !0 }
|
|
2925
2925
|
},
|
|
2926
2926
|
removable: !0,
|
|
2927
|
-
onRemove: () =>
|
|
2927
|
+
onRemove: () => u("items", C)
|
|
2928
2928
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2929
2929
|
]),
|
|
2930
2930
|
t("div", ql, [
|
|
2931
2931
|
t("div", Hl, T(f(o)("report.integration.biztory.taxes")), 1),
|
|
2932
|
-
i(
|
|
2932
|
+
i(v, {
|
|
2933
2933
|
variant: "primary",
|
|
2934
2934
|
icon: "add",
|
|
2935
|
-
onClick: l[10] || (l[10] = () =>
|
|
2935
|
+
onClick: l[10] || (l[10] = () => p("taxes"))
|
|
2936
2936
|
})
|
|
2937
2937
|
]),
|
|
2938
2938
|
t("div", Xl, [
|
|
2939
|
-
(
|
|
2940
|
-
key: `tax-${
|
|
2941
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
2942
|
-
"onUpdate:modelValue": (
|
|
2939
|
+
(c(!0), F(L, null, X((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, (S, C) => (c(), K(A, {
|
|
2940
|
+
key: `tax-${C}`,
|
|
2941
|
+
modelValue: e.value.platform.mappings.taxes[C],
|
|
2942
|
+
"onUpdate:modelValue": (M) => e.value.platform.mappings.taxes[C] = M,
|
|
2943
2943
|
options: {
|
|
2944
2944
|
key: { placeholder: "Key", editable: !0 },
|
|
2945
2945
|
account: { placeholder: "Account code", editable: !0 }
|
|
2946
2946
|
},
|
|
2947
2947
|
removable: !0,
|
|
2948
|
-
onRemove: () =>
|
|
2948
|
+
onRemove: () => u("taxes", C)
|
|
2949
2949
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2950
2950
|
]),
|
|
2951
2951
|
t("div", Ql, [
|
|
2952
2952
|
t("div", Gl, T(f(o)("report.integration.biztory.payments")), 1),
|
|
2953
|
-
i(
|
|
2953
|
+
i(v, {
|
|
2954
2954
|
variant: "primary",
|
|
2955
2955
|
icon: "add",
|
|
2956
|
-
onClick: l[11] || (l[11] = () =>
|
|
2956
|
+
onClick: l[11] || (l[11] = () => p("paymentMethods"))
|
|
2957
2957
|
})
|
|
2958
2958
|
]),
|
|
2959
2959
|
t("div", Jl, [
|
|
2960
2960
|
l[14] || (l[14] = t("div", { class: "w-[25%]" }, "Payment Term", -1)),
|
|
2961
2961
|
t("div", Wl, [
|
|
2962
|
-
i(
|
|
2962
|
+
i(A, {
|
|
2963
2963
|
modelValue: e.value.platform.mappings.paymentTerm,
|
|
2964
|
-
"onUpdate:modelValue": l[12] || (l[12] = (
|
|
2964
|
+
"onUpdate:modelValue": l[12] || (l[12] = (S) => e.value.platform.mappings.paymentTerm = S),
|
|
2965
2965
|
options: {
|
|
2966
2966
|
id: { placeholder: "ID", editable: !0 },
|
|
2967
2967
|
name: { placeholder: "Name", editable: !0 }
|
|
@@ -2970,31 +2970,31 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2970
2970
|
}, null, 8, ["modelValue"])
|
|
2971
2971
|
])
|
|
2972
2972
|
]),
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2973
|
+
g.retrievedMethods.isError ? R("", !0) : (c(), F("div", Zl, T(f(o)("report.integration.biztory.paymentTerm")), 1)),
|
|
2974
|
+
g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length == 0 && !g.retrievedMethods.isError ? (c(), F("span", en, T(f(o)("report.integration.biztory.noPaymentMethods")), 1)) : R("", !0),
|
|
2975
|
+
g.retrievedMethods.isLoaded ? R("", !0) : (c(), K(G, {
|
|
2976
2976
|
key: 2,
|
|
2977
2977
|
size: "xl"
|
|
2978
2978
|
})),
|
|
2979
|
-
|
|
2980
|
-
(
|
|
2981
|
-
var
|
|
2982
|
-
return
|
|
2983
|
-
key: `payment-${
|
|
2979
|
+
g.retrievedMethods.isError ? (c(), F("span", tn, T(f(o)("report.integration.biztory.error")), 1)) : R("", !0),
|
|
2980
|
+
(c(!0), F(L, null, X((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.paymentMethods, (S, C) => {
|
|
2981
|
+
var M;
|
|
2982
|
+
return c(), F("div", {
|
|
2983
|
+
key: `payment-${C}`,
|
|
2984
2984
|
class: "grid-cols-1 grid gap-x-16"
|
|
2985
2985
|
}, [
|
|
2986
|
-
|
|
2986
|
+
g.retrievedMethods.isLoaded && g.retrievedMethods.data && ((M = g.retrievedMethods.data) == null ? void 0 : M.length) != 0 ? (c(), F("div", on, [
|
|
2987
2987
|
i(Y, {
|
|
2988
|
-
"model-value": !e.value.platform.mappings.paymentMethods[
|
|
2988
|
+
"model-value": !e.value.platform.mappings.paymentMethods[C].skip,
|
|
2989
2989
|
value: "",
|
|
2990
2990
|
"onUpdate:modelValue": (q) => {
|
|
2991
2991
|
var re, ye;
|
|
2992
|
-
(ye = (re = e.value.platform) == null ? void 0 : re.mappings) != null && ye.paymentMethods[
|
|
2992
|
+
(ye = (re = e.value.platform) == null ? void 0 : re.mappings) != null && ye.paymentMethods[C] && (e.value.platform.mappings.paymentMethods[C].skip = !q);
|
|
2993
2993
|
}
|
|
2994
2994
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2995
2995
|
i(Me, {
|
|
2996
|
-
modelValue: e.value.platform.mappings.paymentMethods[
|
|
2997
|
-
"onUpdate:modelValue": (q) => e.value.platform.mappings.paymentMethods[
|
|
2996
|
+
modelValue: e.value.platform.mappings.paymentMethods[C],
|
|
2997
|
+
"onUpdate:modelValue": (q) => e.value.platform.mappings.paymentMethods[C] = q,
|
|
2998
2998
|
options: {
|
|
2999
2999
|
key: {
|
|
3000
3000
|
placeholder: "Enter key",
|
|
@@ -3003,11 +3003,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3003
3003
|
id: {
|
|
3004
3004
|
placeholder: "Select mapping",
|
|
3005
3005
|
editable: !0,
|
|
3006
|
-
dropdownOptions:
|
|
3006
|
+
dropdownOptions: g.retrievedMethods.data
|
|
3007
3007
|
}
|
|
3008
3008
|
},
|
|
3009
3009
|
removable: !0,
|
|
3010
|
-
onRemove: () =>
|
|
3010
|
+
onRemove: () => u("paymentMethods", C)
|
|
3011
3011
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"])
|
|
3012
3012
|
])) : R("", !0)
|
|
3013
3013
|
]);
|
|
@@ -3018,28 +3018,28 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3018
3018
|
};
|
|
3019
3019
|
}
|
|
3020
3020
|
});
|
|
3021
|
-
function ln(
|
|
3022
|
-
return
|
|
3023
|
-
var
|
|
3024
|
-
const { invoice: n } = e,
|
|
3025
|
-
o[
|
|
3021
|
+
function ln(g) {
|
|
3022
|
+
return g.reduce((o, e) => {
|
|
3023
|
+
var b, x, D, w, m, d, h, _, u, p, r, y, V, l, a, v, s, P, N, G, Y, J;
|
|
3024
|
+
const { invoice: n } = e, k = o.length;
|
|
3025
|
+
o[k] = {
|
|
3026
3026
|
invoice_date: n.invoice_date,
|
|
3027
3027
|
ref_num: n.ref_num,
|
|
3028
3028
|
grandTotal: n.grandTotal,
|
|
3029
3029
|
// tax_code: invoice.tax[0].tax_code,
|
|
3030
3030
|
// tax: invoice.tax.reduce((sum, tax) => sum + tax.tax, 0),
|
|
3031
3031
|
// service_charge: invoice.service_charge.total,
|
|
3032
|
-
item_code: (
|
|
3033
|
-
item_desc: (
|
|
3034
|
-
item_price: (
|
|
3035
|
-
item_tax: (
|
|
3036
|
-
item_tax_label: ((
|
|
3037
|
-
payment_amount: ((
|
|
3038
|
-
payment_method: ((
|
|
3039
|
-
payment_term: ((
|
|
3032
|
+
item_code: (b = n.items[0]) == null ? void 0 : b.code,
|
|
3033
|
+
item_desc: (x = n.items[0]) == null ? void 0 : x.description,
|
|
3034
|
+
item_price: (D = n.items[0]) == null ? void 0 : D.price,
|
|
3035
|
+
item_tax: (w = n.items[0]) == null ? void 0 : w.total_tax,
|
|
3036
|
+
item_tax_label: ((m = n.items[0]) == null ? void 0 : m.tax_label) || "-",
|
|
3037
|
+
payment_amount: ((h = (d = n.transactions) == null ? void 0 : d[0]) == null ? void 0 : h.amount) || void 0,
|
|
3038
|
+
payment_method: ((u = (_ = n.transactions) == null ? void 0 : _[0]) == null ? void 0 : u.payment_method) || "-",
|
|
3039
|
+
payment_term: ((p = n == null ? void 0 : n.payment_term) == null ? void 0 : p.name) || ""
|
|
3040
3040
|
};
|
|
3041
|
-
for (let O = 1; O < Math.max(((
|
|
3042
|
-
const j =
|
|
3041
|
+
for (let O = 1; O < Math.max(((r = n.items) == null ? void 0 : r.length) || 0, ((y = n.transactions) == null ? void 0 : y.length) || 0); O++) {
|
|
3042
|
+
const j = k + O;
|
|
3043
3043
|
o[j] || (o[j] = {});
|
|
3044
3044
|
const E = n.items[O];
|
|
3045
3045
|
E ? o[j] = {
|
|
@@ -3049,11 +3049,11 @@ function ln(v) {
|
|
|
3049
3049
|
item_price: E.price,
|
|
3050
3050
|
item_tax: E.total_tax,
|
|
3051
3051
|
item_tax_label: E.tax_label || "-",
|
|
3052
|
-
payment_amount: ((l = (
|
|
3053
|
-
payment_method: ((
|
|
3052
|
+
payment_amount: ((l = (V = n.transactions) == null ? void 0 : V[O]) == null ? void 0 : l.amount) || void 0,
|
|
3053
|
+
payment_method: ((v = (a = n.transactions) == null ? void 0 : a[O]) == null ? void 0 : v.payment_method) || "-",
|
|
3054
3054
|
payment_term: ((s = n == null ? void 0 : n.payment_term) == null ? void 0 : s.name) || ""
|
|
3055
3055
|
} : o[j] = {
|
|
3056
|
-
payment_amount: ((N = (
|
|
3056
|
+
payment_amount: ((N = (P = n.transactions) == null ? void 0 : P[O]) == null ? void 0 : N.amount) || void 0,
|
|
3057
3057
|
payment_method: ((Y = (G = n.transactions) == null ? void 0 : G[O]) == null ? void 0 : Y.payment_method) || "-",
|
|
3058
3058
|
payment_term: ((J = n == null ? void 0 : n.payment_term) == null ? void 0 : J.name) || ""
|
|
3059
3059
|
};
|
|
@@ -3133,48 +3133,48 @@ const nn = [
|
|
|
3133
3133
|
enableSorting: !1
|
|
3134
3134
|
}
|
|
3135
3135
|
];
|
|
3136
|
-
function sn(
|
|
3137
|
-
return
|
|
3138
|
-
var
|
|
3139
|
-
const { invoice: n, payments:
|
|
3140
|
-
o[
|
|
3136
|
+
function sn(g) {
|
|
3137
|
+
return g.reduce((o, e) => {
|
|
3138
|
+
var D, w, m, d, h, _, u, p, r, y;
|
|
3139
|
+
const { invoice: n, payments: k } = e, b = o.length;
|
|
3140
|
+
o[b] = {
|
|
3141
3141
|
invoice_date: n.invoice_date,
|
|
3142
3142
|
ref_num: n.ref_num,
|
|
3143
3143
|
total: n.total,
|
|
3144
|
-
item_code: (
|
|
3145
|
-
item_description: (
|
|
3146
|
-
item_price: (
|
|
3147
|
-
item_tax_label: ((
|
|
3148
|
-
item_tax_amount: ((
|
|
3149
|
-
service_charge_amount: ((
|
|
3144
|
+
item_code: (D = n.items[0]) == null ? void 0 : D.code,
|
|
3145
|
+
item_description: (w = n.items[0]) == null ? void 0 : w.description,
|
|
3146
|
+
item_price: (m = n.items[0]) == null ? void 0 : m.price,
|
|
3147
|
+
item_tax_label: ((d = n.items[0]) == null ? void 0 : d.tax_label) ?? "",
|
|
3148
|
+
item_tax_amount: ((h = n.items[0]) == null ? void 0 : h.total_tax) ?? "",
|
|
3149
|
+
service_charge_amount: ((_ = n.service_charges[0]) == null ? void 0 : _.total) ?? "",
|
|
3150
3150
|
rounding: n.rounding ?? 0,
|
|
3151
3151
|
payment_term_id: n.payment_term.name ?? "",
|
|
3152
|
-
payment_term_amount: ((
|
|
3153
|
-
payment_method: ((
|
|
3152
|
+
payment_term_amount: ((u = n.terms[b]) == null ? void 0 : u.amount) ?? "",
|
|
3153
|
+
payment_method: ((p = k[0]) == null ? void 0 : p.payment_method_name) || ""
|
|
3154
3154
|
};
|
|
3155
|
-
const
|
|
3156
|
-
((
|
|
3157
|
-
((
|
|
3158
|
-
(
|
|
3155
|
+
const x = Math.max(
|
|
3156
|
+
((r = n.items) == null ? void 0 : r.length) || 0,
|
|
3157
|
+
((y = n.terms) == null ? void 0 : y.length) || 0,
|
|
3158
|
+
(k == null ? void 0 : k.length) || 0
|
|
3159
3159
|
);
|
|
3160
|
-
for (let
|
|
3161
|
-
const
|
|
3162
|
-
o[
|
|
3163
|
-
const
|
|
3164
|
-
|
|
3165
|
-
...o[
|
|
3166
|
-
item_code:
|
|
3167
|
-
item_description:
|
|
3168
|
-
item_price:
|
|
3169
|
-
item_tax_label:
|
|
3170
|
-
item_tax_amount:
|
|
3160
|
+
for (let V = 1; V < x; V++) {
|
|
3161
|
+
const l = b + V;
|
|
3162
|
+
o[l] || (o[l] = {});
|
|
3163
|
+
const a = n.items[V], v = n.terms[V], s = k[V];
|
|
3164
|
+
a ? o[l] = {
|
|
3165
|
+
...o[l],
|
|
3166
|
+
item_code: a.code,
|
|
3167
|
+
item_description: a.description,
|
|
3168
|
+
item_price: a.total,
|
|
3169
|
+
item_tax_label: a.tax_label == "?" ? "" : a.tax_label ?? "",
|
|
3170
|
+
item_tax_amount: a.total_tax ?? "",
|
|
3171
3171
|
payment_term_id: n.payment_term.name ?? "",
|
|
3172
|
-
payment_term_amount: (
|
|
3173
|
-
payment_method: (
|
|
3174
|
-
} : o[
|
|
3172
|
+
payment_term_amount: (v == null ? void 0 : v.amount) ?? "",
|
|
3173
|
+
payment_method: (s == null ? void 0 : s.payment_method_name) || ""
|
|
3174
|
+
} : o[l] = {
|
|
3175
3175
|
payment_term_id: n.payment_term.name ?? "",
|
|
3176
|
-
payment_term_amount: (
|
|
3177
|
-
payment_method: (
|
|
3176
|
+
payment_term_amount: (v == null ? void 0 : v.amount) ?? "",
|
|
3177
|
+
payment_method: (s == null ? void 0 : s.payment_method_name) || ""
|
|
3178
3178
|
};
|
|
3179
3179
|
}
|
|
3180
3180
|
return o;
|
|
@@ -3256,16 +3256,16 @@ const rn = [
|
|
|
3256
3256
|
modelModifiers: {}
|
|
3257
3257
|
},
|
|
3258
3258
|
emits: ["update:modelValue"],
|
|
3259
|
-
setup(
|
|
3260
|
-
const o = Q(
|
|
3259
|
+
setup(g) {
|
|
3260
|
+
const o = Q(g, "modelValue"), e = B(!1), n = fe(), { dateRange: k } = De(ue()), b = B([]);
|
|
3261
3261
|
ge(
|
|
3262
|
-
() =>
|
|
3262
|
+
() => k.value,
|
|
3263
3263
|
async () => {
|
|
3264
3264
|
if (o.value._id)
|
|
3265
3265
|
try {
|
|
3266
|
-
e.value = !0,
|
|
3267
|
-
} catch (
|
|
3268
|
-
n.open({ message:
|
|
3266
|
+
e.value = !0, b.value = await Ce(o.value._id);
|
|
3267
|
+
} catch (m) {
|
|
3268
|
+
n.open({ message: m.message, type: "error" });
|
|
3269
3269
|
} finally {
|
|
3270
3270
|
e.value = !1;
|
|
3271
3271
|
}
|
|
@@ -3274,15 +3274,15 @@ const rn = [
|
|
|
3274
3274
|
immediate: !0
|
|
3275
3275
|
}
|
|
3276
3276
|
);
|
|
3277
|
-
const
|
|
3277
|
+
const x = z(() => {
|
|
3278
3278
|
switch (o.value.platform.mappings.version) {
|
|
3279
3279
|
case "v1":
|
|
3280
|
-
return ln(
|
|
3280
|
+
return ln(b.value);
|
|
3281
3281
|
case "v2":
|
|
3282
|
-
return sn(
|
|
3282
|
+
return sn(b.value);
|
|
3283
3283
|
}
|
|
3284
3284
|
return [];
|
|
3285
|
-
}),
|
|
3285
|
+
}), D = z(() => {
|
|
3286
3286
|
switch (o.value.platform.mappings.version) {
|
|
3287
3287
|
case "v1":
|
|
3288
3288
|
return nn;
|
|
@@ -3291,39 +3291,39 @@ const rn = [
|
|
|
3291
3291
|
}
|
|
3292
3292
|
return [];
|
|
3293
3293
|
});
|
|
3294
|
-
async function
|
|
3294
|
+
async function w() {
|
|
3295
3295
|
try {
|
|
3296
3296
|
o.value._id && o.value.platform.subdomain && o.value.platform.api_key ? (e.value = !0, await Ae(o.value._id), n.open({ message: "Upload successful", type: "success" })) : n.open({ message: "Invalid accounting setting", type: "error" });
|
|
3297
|
-
} catch (
|
|
3298
|
-
|
|
3297
|
+
} catch (m) {
|
|
3298
|
+
m.message && n.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((d) => n.open({ message: d, type: "error" }));
|
|
3299
3299
|
} finally {
|
|
3300
3300
|
e.value = !1;
|
|
3301
3301
|
}
|
|
3302
3302
|
}
|
|
3303
|
-
return (
|
|
3304
|
-
const
|
|
3305
|
-
return
|
|
3303
|
+
return (m, d) => {
|
|
3304
|
+
const h = $("FmButton"), _ = $("FmCircularProgress"), u = $("FmTable");
|
|
3305
|
+
return c(), F("div", mn, [
|
|
3306
3306
|
t("div", cn, [
|
|
3307
3307
|
i(Ue, {
|
|
3308
|
-
"date-range": f(
|
|
3309
|
-
"onUpdate:dateRange":
|
|
3308
|
+
"date-range": f(k),
|
|
3309
|
+
"onUpdate:dateRange": d[0] || (d[0] = (p) => he(k) ? k.value = p : null),
|
|
3310
3310
|
compare: !1
|
|
3311
3311
|
}, null, 8, ["date-range"]),
|
|
3312
|
-
i(
|
|
3312
|
+
i(h, {
|
|
3313
3313
|
loading: e.value,
|
|
3314
3314
|
variant: "primary",
|
|
3315
3315
|
label: "Upload",
|
|
3316
|
-
onClick:
|
|
3316
|
+
onClick: w
|
|
3317
3317
|
}, null, 8, ["loading"])
|
|
3318
3318
|
]),
|
|
3319
|
-
e.value ? (
|
|
3320
|
-
i(
|
|
3321
|
-
|
|
3322
|
-
])) : (
|
|
3319
|
+
e.value ? (c(), F("div", dn, [
|
|
3320
|
+
i(_, { size: "xl" }),
|
|
3321
|
+
d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
|
|
3322
|
+
])) : (c(), K(u, {
|
|
3323
3323
|
key: 1,
|
|
3324
3324
|
class: "flex overflow-scroll",
|
|
3325
|
-
"row-data":
|
|
3326
|
-
"column-defs":
|
|
3325
|
+
"row-data": x.value,
|
|
3326
|
+
"column-defs": D.value
|
|
3327
3327
|
}, null, 8, ["row-data", "column-defs"]))
|
|
3328
3328
|
]);
|
|
3329
3329
|
};
|
|
@@ -3335,8 +3335,8 @@ const rn = [
|
|
|
3335
3335
|
modelModifiers: {}
|
|
3336
3336
|
},
|
|
3337
3337
|
emits: ["update:modelValue"],
|
|
3338
|
-
setup(
|
|
3339
|
-
const { t: o } = W(), e = Q(
|
|
3338
|
+
setup(g) {
|
|
3339
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
|
|
3340
3340
|
{
|
|
3341
3341
|
label: o("report.integration.setting"),
|
|
3342
3342
|
value: "setting",
|
|
@@ -3347,7 +3347,7 @@ const rn = [
|
|
|
3347
3347
|
value: "preview",
|
|
3348
3348
|
icon: "table"
|
|
3349
3349
|
}
|
|
3350
|
-
],
|
|
3350
|
+
], b = pe(), x = z(() => {
|
|
3351
3351
|
switch (n.value) {
|
|
3352
3352
|
case "preview":
|
|
3353
3353
|
return {
|
|
@@ -3357,68 +3357,68 @@ const rn = [
|
|
|
3357
3357
|
return {
|
|
3358
3358
|
component: an,
|
|
3359
3359
|
props: {
|
|
3360
|
-
retrievedMethods:
|
|
3361
|
-
retrievedCustomers:
|
|
3360
|
+
retrievedMethods: D.value,
|
|
3361
|
+
retrievedCustomers: w.value
|
|
3362
3362
|
}
|
|
3363
3363
|
};
|
|
3364
3364
|
default:
|
|
3365
3365
|
return null;
|
|
3366
3366
|
}
|
|
3367
|
-
}),
|
|
3368
|
-
label:
|
|
3369
|
-
value:
|
|
3370
|
-
cnId:
|
|
3371
|
-
})),
|
|
3367
|
+
}), D = B({}), w = B({}), m = (p, r) => p.map((y) => ({
|
|
3368
|
+
label: r.length > 2 ? `ID:${y[r[2]]} [${y[r[0]]}] ${y[r[1]]}` : `[${y[r[0]]}] ${y[r[1]]}`,
|
|
3369
|
+
value: y.id,
|
|
3370
|
+
cnId: y.cnId ? y.cnId : null
|
|
3371
|
+
})), d = (p) => m(p, ["wallet", "name"]), h = (p) => m(p, ["id", "name"]), _ = async (p, r, y, V) => {
|
|
3372
3372
|
try {
|
|
3373
|
-
const l = await
|
|
3374
|
-
|
|
3373
|
+
const l = await p(e.value._id);
|
|
3374
|
+
y.value.data = r(l);
|
|
3375
3375
|
} catch (l) {
|
|
3376
|
-
console.error(
|
|
3376
|
+
console.error(V, l), y.value.isError = !0;
|
|
3377
3377
|
} finally {
|
|
3378
|
-
|
|
3378
|
+
y.value.isLoaded = !0;
|
|
3379
3379
|
}
|
|
3380
|
-
},
|
|
3381
|
-
var
|
|
3382
|
-
(
|
|
3380
|
+
}, u = async () => {
|
|
3381
|
+
var p, r;
|
|
3382
|
+
(p = e.value.platform.mappings) != null && p.version && await _(
|
|
3383
3383
|
Ge,
|
|
3384
|
-
|
|
3385
|
-
|
|
3384
|
+
d,
|
|
3385
|
+
D,
|
|
3386
3386
|
"Failed to fetch payment methods:"
|
|
3387
|
-
), ((
|
|
3387
|
+
), ((r = e.value.platform.mappings) == null ? void 0 : r.version) == "v2" && await _(
|
|
3388
3388
|
Je,
|
|
3389
|
-
k,
|
|
3390
3389
|
h,
|
|
3390
|
+
w,
|
|
3391
3391
|
"Failed to fetch customers:"
|
|
3392
|
-
),
|
|
3392
|
+
), D.value.isLoaded = !0, w.value.isLoaded = !0;
|
|
3393
3393
|
};
|
|
3394
|
-
return Ee(
|
|
3395
|
-
var
|
|
3396
|
-
return (
|
|
3397
|
-
},
|
|
3398
|
-
var l, a,
|
|
3399
|
-
const
|
|
3400
|
-
return
|
|
3401
|
-
i(
|
|
3394
|
+
return Ee(u), ge(() => {
|
|
3395
|
+
var p;
|
|
3396
|
+
return (p = e.value.platform.mappings) == null ? void 0 : p.version;
|
|
3397
|
+
}, u), (p, r) => {
|
|
3398
|
+
var l, a, v;
|
|
3399
|
+
const y = $("FmPageHead"), V = $("FmTabs");
|
|
3400
|
+
return c(), F("div", un, [
|
|
3401
|
+
i(y, {
|
|
3402
3402
|
title: ((l = e.value) == null ? void 0 : l.name) || "Biztory",
|
|
3403
3403
|
"back-button": !0,
|
|
3404
3404
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
3405
|
-
"onClick:back": f(
|
|
3405
|
+
"onClick:back": f(b).back
|
|
3406
3406
|
}, {
|
|
3407
|
-
description: xe(() =>
|
|
3407
|
+
description: xe(() => r[2] || (r[2] = [
|
|
3408
3408
|
t("div", null, null, -1)
|
|
3409
3409
|
])),
|
|
3410
3410
|
_: 1
|
|
3411
3411
|
}, 8, ["title", "onClick:back"]),
|
|
3412
|
-
i(
|
|
3412
|
+
i(V, {
|
|
3413
3413
|
"model-value": n.value,
|
|
3414
|
-
"onUpdate:modelValue":
|
|
3415
|
-
items:
|
|
3414
|
+
"onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
|
|
3415
|
+
items: k
|
|
3416
3416
|
}, null, 8, ["model-value"]),
|
|
3417
3417
|
t("div", fn, [
|
|
3418
|
-
(
|
|
3418
|
+
(c(), K(be((a = x.value) == null ? void 0 : a.component), Le({
|
|
3419
3419
|
modelValue: e.value,
|
|
3420
|
-
"onUpdate:modelValue":
|
|
3421
|
-
}, (
|
|
3420
|
+
"onUpdate:modelValue": r[1] || (r[1] = (s) => e.value = s)
|
|
3421
|
+
}, (v = x.value) == null ? void 0 : v.props), null, 16, ["modelValue"]))
|
|
3422
3422
|
])
|
|
3423
3423
|
]);
|
|
3424
3424
|
};
|
|
@@ -3433,41 +3433,41 @@ const rn = [
|
|
|
3433
3433
|
modelModifiers: {}
|
|
3434
3434
|
},
|
|
3435
3435
|
emits: ["update:modelValue"],
|
|
3436
|
-
setup(
|
|
3437
|
-
const { t: o } = W(), e = Q(
|
|
3438
|
-
() =>
|
|
3436
|
+
setup(g) {
|
|
3437
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = fe(), k = we(), b = pe(), { promptLoader: x } = ke(), { promptMessage: D } = Fe(), { restaurants: w } = ue(), m = z(
|
|
3438
|
+
() => w.map((r) => ({ label: r.name, value: r.id }))
|
|
3439
3439
|
);
|
|
3440
|
-
async function
|
|
3441
|
-
await
|
|
3440
|
+
async function d() {
|
|
3441
|
+
await D({
|
|
3442
3442
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
3443
3443
|
title: o("report.common.delete")
|
|
3444
|
-
}) && await
|
|
3444
|
+
}) && await x(async () => {
|
|
3445
3445
|
try {
|
|
3446
|
-
await Ve(e.value._id), await
|
|
3447
|
-
} catch (
|
|
3448
|
-
n.open({ type: "error", message:
|
|
3446
|
+
await Ve(e.value._id), await k.getSettings(), b.back();
|
|
3447
|
+
} catch (y) {
|
|
3448
|
+
n.open({ type: "error", message: y.message });
|
|
3449
3449
|
}
|
|
3450
3450
|
});
|
|
3451
3451
|
}
|
|
3452
|
-
async function
|
|
3453
|
-
await
|
|
3452
|
+
async function h() {
|
|
3453
|
+
await x(async () => {
|
|
3454
3454
|
try {
|
|
3455
|
-
await $e(e.value._id, e.value), await
|
|
3456
|
-
} catch (
|
|
3457
|
-
n.open({ type: "error", message:
|
|
3455
|
+
await $e(e.value._id, e.value), await k.getSettings();
|
|
3456
|
+
} catch (r) {
|
|
3457
|
+
n.open({ type: "error", message: r.message });
|
|
3458
3458
|
}
|
|
3459
3459
|
});
|
|
3460
3460
|
}
|
|
3461
|
-
function
|
|
3462
|
-
var
|
|
3463
|
-
(l = (
|
|
3464
|
-
(a,
|
|
3461
|
+
function _(r, y) {
|
|
3462
|
+
var V, l;
|
|
3463
|
+
(l = (V = e.value.platform) == null ? void 0 : V.mappings) != null && l[r] && (e.value.platform.mappings[r] = e.value.platform.mappings[r].filter(
|
|
3464
|
+
(a, v) => v !== y
|
|
3465
3465
|
));
|
|
3466
3466
|
}
|
|
3467
|
-
function
|
|
3468
|
-
var
|
|
3469
|
-
(
|
|
3470
|
-
...e.value.platform.mappings[
|
|
3467
|
+
function u(r) {
|
|
3468
|
+
var y, V;
|
|
3469
|
+
(V = (y = e.value.platform) == null ? void 0 : y.mappings) != null && V[r] && (e.value.platform.mappings[r] = [
|
|
3470
|
+
...e.value.platform.mappings[r],
|
|
3471
3471
|
{
|
|
3472
3472
|
key: "",
|
|
3473
3473
|
name: "",
|
|
@@ -3476,40 +3476,40 @@ const rn = [
|
|
|
3476
3476
|
}
|
|
3477
3477
|
]);
|
|
3478
3478
|
}
|
|
3479
|
-
async function
|
|
3480
|
-
await
|
|
3479
|
+
async function p() {
|
|
3480
|
+
await x(async () => {
|
|
3481
3481
|
try {
|
|
3482
|
-
await Se(e.value._id), await
|
|
3483
|
-
} catch (
|
|
3484
|
-
n.open({ type: "error", message:
|
|
3482
|
+
await Se(e.value._id), await k.getSettings();
|
|
3483
|
+
} catch (r) {
|
|
3484
|
+
n.open({ type: "error", message: r.message });
|
|
3485
3485
|
}
|
|
3486
3486
|
});
|
|
3487
3487
|
}
|
|
3488
|
-
return (
|
|
3489
|
-
var
|
|
3490
|
-
const
|
|
3491
|
-
return (N = (
|
|
3488
|
+
return (r, y) => {
|
|
3489
|
+
var P, N, G, Y, J;
|
|
3490
|
+
const V = $("FmIcon"), l = $("FmButton"), a = $("FmMenuDivider"), v = $("FmTextField"), s = $("FmSelect");
|
|
3491
|
+
return (N = (P = e.value) == null ? void 0 : P.platform) != null && N.mappings ? (c(), F("div", gn, [
|
|
3492
3492
|
t("div", yn, [
|
|
3493
3493
|
t("div", xn, [
|
|
3494
|
-
|
|
3494
|
+
y[4] || (y[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
3495
3495
|
t("div", _n, [
|
|
3496
3496
|
t("div", bn, [
|
|
3497
|
-
i(
|
|
3497
|
+
i(V, {
|
|
3498
3498
|
name: "refresh",
|
|
3499
3499
|
class: "p-2 bg-gray-100 rounded-full",
|
|
3500
|
-
onClick:
|
|
3500
|
+
onClick: p
|
|
3501
3501
|
}),
|
|
3502
3502
|
t("span", wn, T(f(o)("report.integration.iflexiHrms.refreshTooltip")), 1)
|
|
3503
3503
|
]),
|
|
3504
3504
|
i(l, {
|
|
3505
3505
|
variant: "tertiary",
|
|
3506
3506
|
label: f(o)("report.common.delete"),
|
|
3507
|
-
onClick:
|
|
3507
|
+
onClick: d
|
|
3508
3508
|
}, null, 8, ["label"]),
|
|
3509
3509
|
i(l, {
|
|
3510
3510
|
variant: "primary",
|
|
3511
3511
|
label: f(o)("report.common.update"),
|
|
3512
|
-
onClick:
|
|
3512
|
+
onClick: h
|
|
3513
3513
|
}, null, 8, ["label"])
|
|
3514
3514
|
])
|
|
3515
3515
|
])
|
|
@@ -3521,9 +3521,9 @@ const rn = [
|
|
|
3521
3521
|
t("div", $n, [
|
|
3522
3522
|
t("div", Sn, T(f(o)("report.common.name")), 1),
|
|
3523
3523
|
t("div", Cn, [
|
|
3524
|
-
i(
|
|
3524
|
+
i(v, {
|
|
3525
3525
|
modelValue: e.value.name,
|
|
3526
|
-
"onUpdate:modelValue":
|
|
3526
|
+
"onUpdate:modelValue": y[0] || (y[0] = (O) => e.value.name = O)
|
|
3527
3527
|
}, null, 8, ["modelValue"])
|
|
3528
3528
|
])
|
|
3529
3529
|
]),
|
|
@@ -3532,16 +3532,16 @@ const rn = [
|
|
|
3532
3532
|
i(s, {
|
|
3533
3533
|
"model-value": e.value.platform.locationIds[0],
|
|
3534
3534
|
multiselect: !1,
|
|
3535
|
-
items:
|
|
3535
|
+
items: m.value,
|
|
3536
3536
|
placeholder: "Select location",
|
|
3537
3537
|
class: "flex-grow",
|
|
3538
|
-
"onUpdate:modelValue":
|
|
3538
|
+
"onUpdate:modelValue": y[1] || (y[1] = (O) => e.value.platform.locationIds[0] = O)
|
|
3539
3539
|
}, null, 8, ["model-value", "items"])
|
|
3540
3540
|
])
|
|
3541
3541
|
]),
|
|
3542
3542
|
i(Te, {
|
|
3543
3543
|
modelValue: e.value.platform,
|
|
3544
|
-
"onUpdate:modelValue":
|
|
3544
|
+
"onUpdate:modelValue": y[2] || (y[2] = (O) => e.value.platform = O),
|
|
3545
3545
|
label: f(o)("report.input.email")
|
|
3546
3546
|
}, null, 8, ["modelValue", "label"]),
|
|
3547
3547
|
t("div", Un, [
|
|
@@ -3549,11 +3549,11 @@ const rn = [
|
|
|
3549
3549
|
i(l, {
|
|
3550
3550
|
variant: "primary",
|
|
3551
3551
|
icon: "add",
|
|
3552
|
-
onClick:
|
|
3552
|
+
onClick: y[3] || (y[3] = () => u("employees"))
|
|
3553
3553
|
})
|
|
3554
3554
|
]),
|
|
3555
3555
|
t("div", In, [
|
|
3556
|
-
(
|
|
3556
|
+
(c(!0), F(L, null, X((J = (Y = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : Y.mappings) == null ? void 0 : J.employees, (O, j) => (c(), K(A, {
|
|
3557
3557
|
key: `employee-${j}`,
|
|
3558
3558
|
modelValue: e.value.platform.mappings.employees[j],
|
|
3559
3559
|
"onUpdate:modelValue": (E) => e.value.platform.mappings.employees[j] = E,
|
|
@@ -3563,7 +3563,7 @@ const rn = [
|
|
|
3563
3563
|
employeeNo: { placeholder: "Employee No", editable: !0 }
|
|
3564
3564
|
},
|
|
3565
3565
|
removable: !0,
|
|
3566
|
-
onRemove: () =>
|
|
3566
|
+
onRemove: () => _("employees", j)
|
|
3567
3567
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
3568
3568
|
])
|
|
3569
3569
|
])
|
|
@@ -3580,7 +3580,7 @@ const rn = [
|
|
|
3580
3580
|
modelModifiers: {}
|
|
3581
3581
|
},
|
|
3582
3582
|
emits: ["update:modelValue"],
|
|
3583
|
-
setup(
|
|
3583
|
+
setup(g) {
|
|
3584
3584
|
const { t: o } = W(), e = B([]), n = [
|
|
3585
3585
|
{
|
|
3586
3586
|
accessorKey: "name",
|
|
@@ -3607,52 +3607,52 @@ const rn = [
|
|
|
3607
3607
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
|
|
3608
3608
|
enableSorting: !1
|
|
3609
3609
|
}
|
|
3610
|
-
],
|
|
3610
|
+
], k = Q(g, "modelValue"), b = B(!1), x = fe(), { dateRange: D } = De(ue());
|
|
3611
3611
|
ge(
|
|
3612
|
-
() =>
|
|
3612
|
+
() => D.value,
|
|
3613
3613
|
async () => {
|
|
3614
|
-
if (
|
|
3614
|
+
if (k.value._id)
|
|
3615
3615
|
try {
|
|
3616
|
-
|
|
3617
|
-
} catch (
|
|
3618
|
-
|
|
3616
|
+
b.value = !0, e.value = await Ce(k.value._id);
|
|
3617
|
+
} catch (m) {
|
|
3618
|
+
x.open({ message: m.message, type: "error" });
|
|
3619
3619
|
} finally {
|
|
3620
|
-
|
|
3620
|
+
b.value = !1;
|
|
3621
3621
|
}
|
|
3622
3622
|
},
|
|
3623
3623
|
{
|
|
3624
3624
|
immediate: !0
|
|
3625
3625
|
}
|
|
3626
3626
|
);
|
|
3627
|
-
async function
|
|
3627
|
+
async function w() {
|
|
3628
3628
|
try {
|
|
3629
|
-
|
|
3630
|
-
} catch (
|
|
3631
|
-
|
|
3629
|
+
k.value._id ? (b.value = !0, await Pe(k.value._id)) : x.open({ message: "Invalid setting", type: "error" });
|
|
3630
|
+
} catch (m) {
|
|
3631
|
+
x.open({ message: m.message, type: "error" });
|
|
3632
3632
|
} finally {
|
|
3633
|
-
|
|
3633
|
+
b.value = !1;
|
|
3634
3634
|
}
|
|
3635
3635
|
}
|
|
3636
|
-
return (
|
|
3637
|
-
const
|
|
3638
|
-
return
|
|
3636
|
+
return (m, d) => {
|
|
3637
|
+
const h = $("FmButton"), _ = $("FmCircularProgress"), u = $("FmTable");
|
|
3638
|
+
return c(), F("div", Kn, [
|
|
3639
3639
|
t("div", An, [
|
|
3640
3640
|
i(Ue, {
|
|
3641
|
-
"date-range": f(
|
|
3642
|
-
"onUpdate:dateRange":
|
|
3641
|
+
"date-range": f(D),
|
|
3642
|
+
"onUpdate:dateRange": d[0] || (d[0] = (p) => he(D) ? D.value = p : null),
|
|
3643
3643
|
compare: !1
|
|
3644
3644
|
}, null, 8, ["date-range"]),
|
|
3645
|
-
i(
|
|
3646
|
-
loading:
|
|
3645
|
+
i(h, {
|
|
3646
|
+
loading: b.value,
|
|
3647
3647
|
variant: "primary",
|
|
3648
3648
|
label: f(o)("report.common.download"),
|
|
3649
|
-
onClick:
|
|
3649
|
+
onClick: w
|
|
3650
3650
|
}, null, 8, ["loading", "label"])
|
|
3651
3651
|
]),
|
|
3652
|
-
|
|
3653
|
-
i(
|
|
3654
|
-
t("span", Nn, T(f(o)("report.common.
|
|
3655
|
-
])) : e.value.length > 0 ? (
|
|
3652
|
+
b.value ? (c(), F("div", Pn, [
|
|
3653
|
+
i(_, { size: "xl" }),
|
|
3654
|
+
t("span", Nn, T(f(o)("report.common.isLoading")), 1)
|
|
3655
|
+
])) : e.value.length > 0 ? (c(), K(u, {
|
|
3656
3656
|
key: 1,
|
|
3657
3657
|
class: "flex overflow-scroll",
|
|
3658
3658
|
"row-data": e.value,
|
|
@@ -3668,8 +3668,8 @@ const rn = [
|
|
|
3668
3668
|
modelModifiers: {}
|
|
3669
3669
|
},
|
|
3670
3670
|
emits: ["update:modelValue"],
|
|
3671
|
-
setup(
|
|
3672
|
-
const { t: o } = W(), e = Q(
|
|
3671
|
+
setup(g) {
|
|
3672
|
+
const { t: o } = W(), e = Q(g, "modelValue"), n = B("setting"), k = [
|
|
3673
3673
|
{
|
|
3674
3674
|
label: o("report.integration.setting"),
|
|
3675
3675
|
value: "setting",
|
|
@@ -3680,7 +3680,7 @@ const rn = [
|
|
|
3680
3680
|
value: "preview",
|
|
3681
3681
|
icon: "table"
|
|
3682
3682
|
}
|
|
3683
|
-
],
|
|
3683
|
+
], b = pe(), x = z(() => {
|
|
3684
3684
|
switch (n.value) {
|
|
3685
3685
|
case "preview":
|
|
3686
3686
|
return Rn;
|
|
@@ -3690,30 +3690,30 @@ const rn = [
|
|
|
3690
3690
|
return null;
|
|
3691
3691
|
}
|
|
3692
3692
|
});
|
|
3693
|
-
return (
|
|
3694
|
-
var
|
|
3695
|
-
const
|
|
3696
|
-
return
|
|
3697
|
-
i(
|
|
3698
|
-
title: ((
|
|
3693
|
+
return (D, w) => {
|
|
3694
|
+
var h;
|
|
3695
|
+
const m = $("FmPageHead"), d = $("FmTabs");
|
|
3696
|
+
return c(), F("div", On, [
|
|
3697
|
+
i(m, {
|
|
3698
|
+
title: ((h = e.value) == null ? void 0 : h.name) || "AutoCount",
|
|
3699
3699
|
"back-button": !0,
|
|
3700
3700
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
3701
|
-
"onClick:back": f(
|
|
3701
|
+
"onClick:back": f(b).back
|
|
3702
3702
|
}, {
|
|
3703
|
-
description: xe(() =>
|
|
3703
|
+
description: xe(() => w[2] || (w[2] = [
|
|
3704
3704
|
t("div", null, null, -1)
|
|
3705
3705
|
])),
|
|
3706
3706
|
_: 1
|
|
3707
3707
|
}, 8, ["title", "onClick:back"]),
|
|
3708
|
-
i(
|
|
3708
|
+
i(d, {
|
|
3709
3709
|
"model-value": n.value,
|
|
3710
|
-
"onUpdate:modelValue":
|
|
3711
|
-
items:
|
|
3710
|
+
"onUpdate:modelValue": w[0] || (w[0] = (_) => n.value = _),
|
|
3711
|
+
items: k
|
|
3712
3712
|
}, null, 8, ["model-value"]),
|
|
3713
3713
|
t("div", Bn, [
|
|
3714
|
-
(
|
|
3714
|
+
(c(), K(be(x.value), {
|
|
3715
3715
|
modelValue: e.value,
|
|
3716
|
-
"onUpdate:modelValue":
|
|
3716
|
+
"onUpdate:modelValue": w[1] || (w[1] = (_) => e.value = _)
|
|
3717
3717
|
}, null, 8, ["modelValue"]))
|
|
3718
3718
|
])
|
|
3719
3719
|
]);
|
|
@@ -3721,20 +3721,20 @@ const rn = [
|
|
|
3721
3721
|
}
|
|
3722
3722
|
}), Ln = { class: "px-24 h-full relative" }, Jn = /* @__PURE__ */ H({
|
|
3723
3723
|
__name: "Integration",
|
|
3724
|
-
setup(
|
|
3725
|
-
const o = B(void 0), { params: e } = ze(), n = we(),
|
|
3724
|
+
setup(g) {
|
|
3725
|
+
const o = B(void 0), { params: e } = ze(), n = we(), k = B();
|
|
3726
3726
|
Ee(async () => {
|
|
3727
3727
|
n.settings.length === 0 && await n.getSettings();
|
|
3728
3728
|
}), ge(
|
|
3729
3729
|
() => n.settings,
|
|
3730
|
-
(
|
|
3731
|
-
var
|
|
3732
|
-
const
|
|
3733
|
-
|
|
3730
|
+
(x) => {
|
|
3731
|
+
var w;
|
|
3732
|
+
const D = x.find((m) => m._id === e.id);
|
|
3733
|
+
D && (k.value = D, o.value = (w = k.value.platform) == null ? void 0 : w.name);
|
|
3734
3734
|
},
|
|
3735
3735
|
{ immediate: !0 }
|
|
3736
3736
|
);
|
|
3737
|
-
const
|
|
3737
|
+
const b = z(() => {
|
|
3738
3738
|
switch (o.value) {
|
|
3739
3739
|
case de.Xero:
|
|
3740
3740
|
return Zt;
|
|
@@ -3752,10 +3752,10 @@ const rn = [
|
|
|
3752
3752
|
return null;
|
|
3753
3753
|
}
|
|
3754
3754
|
});
|
|
3755
|
-
return (
|
|
3756
|
-
(
|
|
3757
|
-
modelValue:
|
|
3758
|
-
"onUpdate:modelValue":
|
|
3755
|
+
return (x, D) => (c(), F("div", Ln, [
|
|
3756
|
+
(c(), K(be(b.value), {
|
|
3757
|
+
modelValue: k.value,
|
|
3758
|
+
"onUpdate:modelValue": D[0] || (D[0] = (w) => k.value = w)
|
|
3759
3759
|
}, null, 8, ["modelValue"]))
|
|
3760
3760
|
]));
|
|
3761
3761
|
}
|