@feedmepos/mf-report 5.4.32-beta.1 → 5.4.32-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-C1AEHzCS.js → App-CcAzQi12.js} +5 -5
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-BaVjCBz9.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-DAx1-Jaw.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BDcIq11J.js → Default.vue_vue_type_script_setup_true_lang-CUl_gNrZ.js} +2 -2
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-Dco06WdY.js → DynamicWidget.vue_vue_type_script_setup_true_lang-DPkeX6hM.js} +4 -4
- package/dist/{InsightView-D1TUzdPw.js → InsightView-DL0xjacy.js} +7 -7
- package/dist/{Integration-X5G5hIQx.js → Integration-BZXyd7k0.js} +1085 -1095
- package/dist/{Integrations-OOJ4jft8.js → Integrations-CgGNd_Y-.js} +3 -3
- package/dist/{Layout-B94FVbat.js → Layout-Ct4xPb6I.js} +1 -1
- package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DtCmKms0.js → LocationSelect.vue_vue_type_script_setup_true_lang-BEmovdSc.js} +2 -2
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CwPa5SJD.js → MenuTab.vue_vue_type_script_setup_true_lang-DyPe4Xcj.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-Cjea9jVd.js → NavigationTab.vue_vue_type_script_setup_true_lang-EmzfpRFl.js} +4 -4
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-8iT-uGdI.js → NoData.vue_vue_type_script_setup_true_lang-DTmKd2VT.js} +1 -1
- package/dist/{OverviewView-DQh0nNr6.js → OverviewView-DckzW6ye.js} +5 -5
- package/dist/{Report-D3IEb8uz.js → Report-BW_cQWYm.js} +4 -4
- package/dist/{ReportEditor-Ip2rXQQm.js → ReportEditor-CHjM1Iyi.js} +5 -5
- package/dist/{ReportView-BBYQqaBN.js → ReportView-fEP_QKSD.js} +7 -7
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-gtUCqf4j.js → SelectComponent.vue_vue_type_script_setup_true_lang-BXUbn_MI.js} +1 -1
- package/dist/{Setting-BKCz5uez.js → Setting-CP_lT9s4.js} +4 -4
- package/dist/{TileEditor-Yur5bqwb.js → TileEditor-BvoEHqNR.js} +8 -8
- package/dist/{TransitionFade-C85fKWxH.js → TransitionFade-CjhLQW9G.js} +4 -4
- package/dist/app.js +11 -11
- package/dist/{global-loader-BKQvLNRz.js → global-loader--ZxoOdVy.js} +912 -901
- package/dist/{index-2OLtpO8C.js → index-C39f39g-.js} +1 -1
- package/dist/{report-schema-D791R8wK.js → report-schema-C2rVcJg7.js} +1 -1
- package/dist/{timeFormat-DWBAXBup.js → timeFormat-COEL7roU.js} +1 -1
- package/dist/{v4-BXa2oefR.js → v4-B8URBUYR.js} +1 -1
- package/package.json +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as
|
|
5
|
-
import { useSnackbar as
|
|
6
|
-
import { s as We } from "./index-
|
|
7
|
-
import { storeToRefs as
|
|
8
|
-
import { _ as
|
|
1
|
+
import { defineComponent as q, mergeModels as ye, useModel as X, computed as Y, resolveComponent as S, createElementBlock as C, openBlock as c, createElementVNode as t, createCommentVNode as N, normalizeClass as Ke, Fragment as L, renderList as H, createBlock as M, createVNode as i, withCtx as ge, toDisplayString as T, unref as f, ref as B, watch as ve, isRef as be, h as I, resolveDynamicComponent as xe, mergeProps as Le, onMounted as Ee } from "vue";
|
|
2
|
+
import { useRouter as de, useRoute as ze } from "vue-router";
|
|
3
|
+
import { u as J, I as ce, d as je, e as _e, f as we, b as pe, q as Ye, m as qe, p as he, r as ke, s as Ve, t as $e, v as Ae, w as He, x as Xe, y as Qe, A as fe, z as Pe, B as Ge, E as Je } from "./global-loader--ZxoOdVy.js";
|
|
4
|
+
import { u as Se } from "./message-dialog-UoMWOnil.js";
|
|
5
|
+
import { useSnackbar as ue } from "@feedmepos/ui-library";
|
|
6
|
+
import { s as We } from "./index-C39f39g-.js";
|
|
7
|
+
import { storeToRefs as Ce } from "pinia";
|
|
8
|
+
import { _ as Fe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DAx1-Jaw.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
|
+
}, K = /* @__PURE__ */ q({
|
|
13
13
|
__name: "MappingField",
|
|
14
|
-
props: /* @__PURE__ */
|
|
14
|
+
props: /* @__PURE__ */ ye({
|
|
15
15
|
removable: {
|
|
16
16
|
type: Boolean,
|
|
17
17
|
default: !1
|
|
@@ -32,68 +32,68 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
32
32
|
modelValue: { required: !0 },
|
|
33
33
|
modelModifiers: {}
|
|
34
34
|
}),
|
|
35
|
-
emits: /* @__PURE__ */
|
|
35
|
+
emits: /* @__PURE__ */ ye(["remove"], ["update:modelValue"]),
|
|
36
36
|
setup(g, { emit: o }) {
|
|
37
|
-
const e =
|
|
38
|
-
() => Object.keys(n.options).map((
|
|
39
|
-
const
|
|
37
|
+
const e = X(g, "modelValue"), n = g, V = Y(
|
|
38
|
+
() => Object.keys(n.options).map((_) => {
|
|
39
|
+
const F = n.options[_];
|
|
40
40
|
return {
|
|
41
|
-
placeholder:
|
|
42
|
-
key:
|
|
43
|
-
editable:
|
|
41
|
+
placeholder: F.placeholder,
|
|
42
|
+
key: _,
|
|
43
|
+
editable: F.editable
|
|
44
44
|
};
|
|
45
45
|
})
|
|
46
|
-
),
|
|
47
|
-
return (
|
|
48
|
-
const
|
|
49
|
-
return c(),
|
|
46
|
+
), w = o;
|
|
47
|
+
return (_, F) => {
|
|
48
|
+
const h = S("FmTextField"), m = S("FmTooltip"), d = S("FmIcon");
|
|
49
|
+
return c(), C("div", Ze, [
|
|
50
50
|
t("div", {
|
|
51
51
|
class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
52
52
|
}, [
|
|
53
|
-
(c(!0),
|
|
54
|
-
var
|
|
55
|
-
return c(),
|
|
56
|
-
key:
|
|
53
|
+
(c(!0), C(L, null, H(V.value, (k) => {
|
|
54
|
+
var b;
|
|
55
|
+
return c(), C(L, {
|
|
56
|
+
key: k.key
|
|
57
57
|
}, [
|
|
58
|
-
|
|
58
|
+
k.editable ? (c(), C("div", {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: Ke(`${g.removable ? "w-[50%]" : "w-[100%]"}`)
|
|
61
61
|
}, [
|
|
62
|
-
i(
|
|
63
|
-
"model-value": e.value[
|
|
64
|
-
placeholder:
|
|
62
|
+
i(h, {
|
|
63
|
+
"model-value": e.value[k.key],
|
|
64
|
+
placeholder: k.placeholder,
|
|
65
65
|
type: g.type,
|
|
66
66
|
rules: g.rules,
|
|
67
67
|
"onUpdate:modelValue": (u) => {
|
|
68
68
|
let p = u;
|
|
69
69
|
g.type === "number" && (p = Number(u)), e.value = {
|
|
70
70
|
...e.value,
|
|
71
|
-
[
|
|
71
|
+
[k.key]: p
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
|
|
75
|
-
], 2)) : (c(),
|
|
75
|
+
], 2)) : (c(), M(m, {
|
|
76
76
|
key: 1,
|
|
77
|
-
content: (
|
|
77
|
+
content: (b = e.value[k.key]) == null ? void 0 : b.toString(),
|
|
78
78
|
class: "w-[50%]"
|
|
79
79
|
}, {
|
|
80
|
-
default:
|
|
81
|
-
t("div", et, T(e.value[
|
|
80
|
+
default: ge(() => [
|
|
81
|
+
t("div", et, T(e.value[k.key]), 1)
|
|
82
82
|
]),
|
|
83
83
|
_: 2
|
|
84
84
|
}, 1032, ["content"]))
|
|
85
85
|
], 64);
|
|
86
86
|
}), 128))
|
|
87
87
|
], 2),
|
|
88
|
-
g.removable ? (c(),
|
|
88
|
+
g.removable ? (c(), C("div", tt, [
|
|
89
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: F[0] || (F[0] = (k) => w("remove"))
|
|
95
95
|
})
|
|
96
|
-
])) :
|
|
96
|
+
])) : N("", !0)
|
|
97
97
|
]);
|
|
98
98
|
};
|
|
99
99
|
}
|
|
@@ -103,9 +103,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
103
103
|
}, nt = { class: "flex flex-row items-center w-[100%] justify-start" }, st = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, it = {
|
|
104
104
|
key: 0,
|
|
105
105
|
class: "flex flex-row items-center w-[100%] justify-start"
|
|
106
|
-
}, rt = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, mt = { class: "w-[calc(75%+4px)]" }, ct = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, dt = { class: "flex flex-row items-center w-[100%] justify-between" }, pt = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis" }, ut = { class: "w-[50%]" },
|
|
106
|
+
}, rt = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, mt = { class: "w-[calc(75%+4px)]" }, ct = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, dt = { class: "flex flex-row items-center w-[100%] justify-between" }, pt = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis" }, ut = { class: "w-[50%]" }, De = /* @__PURE__ */ q({
|
|
107
107
|
__name: "UploadSection",
|
|
108
|
-
props: /* @__PURE__ */
|
|
108
|
+
props: /* @__PURE__ */ ye({
|
|
109
109
|
label: {
|
|
110
110
|
type: String,
|
|
111
111
|
default: "upload"
|
|
@@ -120,64 +120,64 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
120
120
|
}),
|
|
121
121
|
emits: ["update:modelValue"],
|
|
122
122
|
setup(g) {
|
|
123
|
-
const { t: o } =
|
|
123
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = Y(() => {
|
|
124
124
|
switch (e.value.name) {
|
|
125
|
-
case
|
|
126
|
-
case
|
|
127
|
-
case
|
|
125
|
+
case ce.AutoCount:
|
|
126
|
+
case ce.SQL:
|
|
127
|
+
case ce.iFlexi_HRMS:
|
|
128
128
|
return !0;
|
|
129
129
|
default:
|
|
130
130
|
return !1;
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
-
return (
|
|
133
|
+
return (V, w) => {
|
|
134
134
|
var m, d;
|
|
135
|
-
const
|
|
136
|
-
return c(),
|
|
135
|
+
const _ = S("FmSwitch"), F = S("FmTextField"), h = S("FmTimePicker");
|
|
136
|
+
return c(), C(L, null, [
|
|
137
137
|
t("div", ot, [
|
|
138
138
|
t("div", at, T(f(o)("report.integration.auto", { label: g.label })), 1),
|
|
139
|
-
g.label == "upload" ? (c(),
|
|
139
|
+
g.label == "upload" ? (c(), C("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)) : N("", !0)
|
|
140
140
|
]),
|
|
141
141
|
t("div", nt, [
|
|
142
142
|
t("div", st, T(f(o)("report.common.enable")), 1),
|
|
143
|
-
i(
|
|
143
|
+
i(_, {
|
|
144
144
|
modelValue: e.value.enable,
|
|
145
|
-
"onUpdate:modelValue":
|
|
145
|
+
"onUpdate:modelValue": w[0] || (w[0] = (k) => e.value.enable = k),
|
|
146
146
|
style: { gap: "0px" }
|
|
147
147
|
}, null, 8, ["modelValue"])
|
|
148
148
|
]),
|
|
149
|
-
n.value ? (c(),
|
|
149
|
+
n.value ? (c(), C("div", it, [
|
|
150
150
|
t("div", rt, T(f(o)("report.common.email")), 1),
|
|
151
151
|
t("div", mt, [
|
|
152
|
-
i(
|
|
152
|
+
i(F, {
|
|
153
153
|
"model-value": (e.value.emails || []).join(","),
|
|
154
154
|
placeholder: "Email",
|
|
155
|
-
"onUpdate:modelValue":
|
|
155
|
+
"onUpdate:modelValue": w[1] || (w[1] = (k) => {
|
|
156
156
|
switch (e.value.name) {
|
|
157
|
-
case f(
|
|
158
|
-
case f(
|
|
159
|
-
case f(
|
|
160
|
-
e.value.emails =
|
|
157
|
+
case f(ce).AutoCount:
|
|
158
|
+
case f(ce).SQL:
|
|
159
|
+
case f(ce).iFlexi_HRMS:
|
|
160
|
+
e.value.emails = k.split(",");
|
|
161
161
|
break;
|
|
162
162
|
}
|
|
163
163
|
})
|
|
164
164
|
}, null, 8, ["model-value"])
|
|
165
165
|
])
|
|
166
|
-
])) :
|
|
166
|
+
])) : N("", !0),
|
|
167
167
|
t("div", ct, [
|
|
168
168
|
t("div", dt, [
|
|
169
169
|
t("div", pt, T(f(We)(g.label)) + " time ", 1),
|
|
170
170
|
t("div", ut, [
|
|
171
|
-
i(
|
|
171
|
+
i(h, {
|
|
172
172
|
class: "gap-[0px]",
|
|
173
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":
|
|
175
|
-
|
|
174
|
+
"onUpdate:modelValue": w[2] || (w[2] = (k) => {
|
|
175
|
+
k && (e.value.triggerTime.hour = Number(k.split(":")[0]), e.value.triggerTime.minute = Number(k.split(":")[1]));
|
|
176
176
|
})
|
|
177
177
|
}, null, 8, ["model-value"])
|
|
178
178
|
])
|
|
179
179
|
]),
|
|
180
|
-
i(
|
|
180
|
+
i(K, {
|
|
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: [(k) => k > 0 || "Delay days must be greater than 0"],
|
|
191
|
+
"onUpdate:modelValue": w[3] || (w[3] = (k) => {
|
|
192
|
+
e.value.delayDay = k.delayDay;
|
|
193
193
|
})
|
|
194
194
|
}, null, 8, ["model-value", "options", "rules"])
|
|
195
195
|
])
|
|
@@ -202,9 +202,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
202
202
|
}, gt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, yt = {
|
|
203
203
|
key: 0,
|
|
204
204
|
class: "w-[24px] flex items-center"
|
|
205
|
-
}, Me = /* @__PURE__ */
|
|
205
|
+
}, Me = /* @__PURE__ */ q({
|
|
206
206
|
__name: "MappingDropdown",
|
|
207
|
-
props: /* @__PURE__ */
|
|
207
|
+
props: /* @__PURE__ */ ye({
|
|
208
208
|
removable: {
|
|
209
209
|
type: Boolean,
|
|
210
210
|
default: !1
|
|
@@ -229,9 +229,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
229
229
|
modelValue: { required: !0 },
|
|
230
230
|
modelModifiers: {}
|
|
231
231
|
}),
|
|
232
|
-
emits: /* @__PURE__ */
|
|
232
|
+
emits: /* @__PURE__ */ ye(["remove"], ["update:modelValue"]),
|
|
233
233
|
setup(g, { emit: o }) {
|
|
234
|
-
const e =
|
|
234
|
+
const e = X(g, "modelValue"), n = g, V = Y(
|
|
235
235
|
() => Object.keys(n.options).map((m) => {
|
|
236
236
|
const d = n.options[m];
|
|
237
237
|
return {
|
|
@@ -241,61 +241,61 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
241
241
|
dropdownOptions: d.dropdownOptions
|
|
242
242
|
};
|
|
243
243
|
})
|
|
244
|
-
),
|
|
244
|
+
), w = (m, d) => {
|
|
245
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
|
-
},
|
|
249
|
+
}, _ = (m) => {
|
|
250
250
|
var d;
|
|
251
251
|
return n.singleValueMode ? n.options.key.placeholder : (d = e.value[m.key]) == null ? void 0 : d.toString();
|
|
252
|
-
},
|
|
252
|
+
}, F = (m) => n.singleValueMode ? e.value : e.value[m.key], h = o;
|
|
253
253
|
return (m, d) => {
|
|
254
|
-
const
|
|
255
|
-
return c(),
|
|
254
|
+
const k = S("FmSelect"), b = S("FmTextField"), u = S("FmTooltip"), p = S("FmIcon");
|
|
255
|
+
return c(), C("div", ft, [
|
|
256
256
|
t("div", {
|
|
257
257
|
class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
258
258
|
}, [
|
|
259
|
-
(c(!0),
|
|
259
|
+
(c(!0), C(L, null, H(V.value, (r) => (c(), C(L, {
|
|
260
260
|
key: r.key
|
|
261
261
|
}, [
|
|
262
|
-
r.editable ? (c(),
|
|
263
|
-
r.dropdownOptions ? (c(),
|
|
262
|
+
r.editable ? (c(), C("div", vt, [
|
|
263
|
+
r.dropdownOptions ? (c(), M(k, {
|
|
264
264
|
key: 0,
|
|
265
|
-
"model-value":
|
|
265
|
+
"model-value": F(r),
|
|
266
266
|
placeholder: r.placeholder,
|
|
267
267
|
items: r.dropdownOptions,
|
|
268
268
|
"shift-menu": !0,
|
|
269
|
-
"onUpdate:modelValue": (
|
|
270
|
-
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (c(),
|
|
269
|
+
"onUpdate:modelValue": (x) => w(x, r.key)
|
|
270
|
+
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (c(), M(b, {
|
|
271
271
|
key: 1,
|
|
272
|
-
"model-value":
|
|
272
|
+
"model-value": F(r),
|
|
273
273
|
placeholder: r.placeholder,
|
|
274
274
|
type: g.type,
|
|
275
275
|
rules: g.rules,
|
|
276
|
-
"onUpdate:modelValue": (
|
|
276
|
+
"onUpdate:modelValue": (x) => w(x, r.key)
|
|
277
277
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
|
|
278
|
-
])) : (c(),
|
|
278
|
+
])) : (c(), M(u, {
|
|
279
279
|
key: 1,
|
|
280
|
-
content:
|
|
280
|
+
content: _(r),
|
|
281
281
|
class: "w-[50%]"
|
|
282
282
|
}, {
|
|
283
|
-
default:
|
|
284
|
-
t("div", gt, T(
|
|
283
|
+
default: ge(() => [
|
|
284
|
+
t("div", gt, T(_(r)), 1)
|
|
285
285
|
]),
|
|
286
286
|
_: 2
|
|
287
287
|
}, 1032, ["content"]))
|
|
288
288
|
], 64))), 128))
|
|
289
289
|
], 2),
|
|
290
|
-
g.removable ? (c(),
|
|
290
|
+
g.removable ? (c(), C("div", yt, [
|
|
291
291
|
i(p, {
|
|
292
292
|
color: "system-error-300",
|
|
293
293
|
class: "cursor-pointer",
|
|
294
294
|
name: "close",
|
|
295
295
|
size: "md",
|
|
296
|
-
onClick: d[0] || (d[0] = (r) =>
|
|
296
|
+
onClick: d[0] || (d[0] = (r) => h("remove"))
|
|
297
297
|
})
|
|
298
|
-
])) :
|
|
298
|
+
])) : N("", !0)
|
|
299
299
|
]);
|
|
300
300
|
};
|
|
301
301
|
}
|
|
@@ -320,9 +320,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
320
320
|
}, Yt = {
|
|
321
321
|
key: 8,
|
|
322
322
|
class: "xs:grid-cols-1 grid-cols-2 grid gap-16"
|
|
323
|
-
}, qt = /* @__PURE__ */
|
|
323
|
+
}, qt = /* @__PURE__ */ q({
|
|
324
324
|
__name: "Setting",
|
|
325
|
-
props: /* @__PURE__ */
|
|
325
|
+
props: /* @__PURE__ */ ye({
|
|
326
326
|
tenantOptions: {
|
|
327
327
|
type: Object,
|
|
328
328
|
required: !0
|
|
@@ -341,32 +341,32 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
341
341
|
}),
|
|
342
342
|
emits: ["update:modelValue"],
|
|
343
343
|
setup(g) {
|
|
344
|
-
const { t: o } =
|
|
345
|
-
() =>
|
|
346
|
-
),
|
|
344
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = ue(), V = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = B(!1), d = Y(
|
|
345
|
+
() => h.map((v) => ({ label: v.name, value: v.id }))
|
|
346
|
+
), k = Y(() => {
|
|
347
347
|
var v, s;
|
|
348
348
|
return m.value ? "Connecting" : (s = (v = e.value) == null ? void 0 : v.platform) != null && s.accessToken ? "Disconnect" : "Connect";
|
|
349
|
-
}),
|
|
349
|
+
}), b = B(0);
|
|
350
350
|
async function u() {
|
|
351
351
|
var v;
|
|
352
352
|
if (m.value)
|
|
353
353
|
n.open({ type: "error", message: "Connecting in progress" });
|
|
354
354
|
else if ((v = e.value.platform) != null && v.accessToken)
|
|
355
|
-
await
|
|
355
|
+
await F({
|
|
356
356
|
message: o("report.integration.xero.confirmDisconnect", { name: e.value.name }),
|
|
357
357
|
title: o("report.integration.xero.disconnectTitle")
|
|
358
|
-
}) && (await Ye(e.value._id), await
|
|
358
|
+
}) && (await Ye(e.value._id), await V.getSettings());
|
|
359
359
|
else if (e.value._id)
|
|
360
360
|
try {
|
|
361
361
|
const s = await qe(e.value._id);
|
|
362
362
|
m.value = !0;
|
|
363
|
-
const
|
|
364
|
-
var
|
|
365
|
-
|
|
363
|
+
const A = setInterval(async () => {
|
|
364
|
+
var P;
|
|
365
|
+
b.value += 1;
|
|
366
366
|
try {
|
|
367
|
-
await
|
|
367
|
+
await V.getSettings();
|
|
368
368
|
} finally {
|
|
369
|
-
(
|
|
369
|
+
(b.value === 12 || (P = e.value.platform) != null && P.accessToken) && (m.value = !1, A && clearInterval(A), b.value = 0);
|
|
370
370
|
}
|
|
371
371
|
}, 5e3);
|
|
372
372
|
window.open(s.redirect, "_blank");
|
|
@@ -377,42 +377,42 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
377
377
|
n.open({ type: "error", message: `invalid accounting ${e.value._id}` });
|
|
378
378
|
}
|
|
379
379
|
async function p() {
|
|
380
|
-
await
|
|
380
|
+
await F({
|
|
381
381
|
message: `Confirm delete ${e.value.name}?`,
|
|
382
382
|
title: "Delete"
|
|
383
|
-
}) && await
|
|
383
|
+
}) && await _(async () => {
|
|
384
384
|
try {
|
|
385
|
-
await
|
|
385
|
+
await he(e.value._id), await V.getSettings(), w.back();
|
|
386
386
|
} catch (s) {
|
|
387
387
|
n.open({ type: "error", message: s.message });
|
|
388
388
|
}
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
async function r() {
|
|
392
|
-
await
|
|
392
|
+
await _(async () => {
|
|
393
393
|
try {
|
|
394
|
-
await
|
|
394
|
+
await ke(e.value._id, e.value), await V.getSettings();
|
|
395
395
|
} catch (v) {
|
|
396
396
|
n.open({ type: "error", message: v.message });
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
const s = g.tenantOptions.data.find((
|
|
400
|
+
function x(v) {
|
|
401
|
+
const s = g.tenantOptions.data.find((A) => A.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
|
-
(
|
|
410
|
-
(
|
|
407
|
+
function $(v, s) {
|
|
408
|
+
var A, P;
|
|
409
|
+
(P = (A = e.value.platform) == null ? void 0 : A.mappings) != null && P[v] && (e.value.platform.mappings[v] = e.value.platform.mappings[v].filter(
|
|
410
|
+
(Q, E) => E !== s
|
|
411
411
|
));
|
|
412
412
|
}
|
|
413
413
|
function l(v) {
|
|
414
|
-
var s,
|
|
415
|
-
(
|
|
414
|
+
var s, A;
|
|
415
|
+
(A = (s = e.value.platform) == null ? void 0 : s.mappings) != null && A[v] && (e.value.platform.mappings[v] = [
|
|
416
416
|
...e.value.platform.mappings[v],
|
|
417
417
|
v === "items" ? {
|
|
418
418
|
feedmeKey: "",
|
|
@@ -428,36 +428,36 @@ 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 _(async () => {
|
|
432
432
|
try {
|
|
433
|
-
await
|
|
433
|
+
await Ve(e.value._id), await V.getSettings();
|
|
434
434
|
} catch (v) {
|
|
435
435
|
n.open({ type: "error", message: v.message });
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
439
|
return (v, s) => {
|
|
440
|
-
var
|
|
441
|
-
const
|
|
442
|
-
return (
|
|
440
|
+
var z, W, Z, ee, te, oe, ae, le, ne, se, D, y, U, O, me, Ue, Te, Ne, Re, Oe, Be;
|
|
441
|
+
const A = S("FmIcon"), P = S("FmButton"), Q = S("FmMenuDivider"), E = S("FmCircularProgress"), G = S("FmSelect"), R = S("FmTextField"), j = S("FmSwitch");
|
|
442
|
+
return (W = (z = e.value) == null ? void 0 : z.platform) != null && W.mappings ? (c(), C("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(A, {
|
|
449
449
|
name: "refresh",
|
|
450
450
|
class: "p-2 bg-gray-100 rounded-full",
|
|
451
451
|
onClick: a
|
|
452
452
|
}),
|
|
453
453
|
s[9] || (s[9] = t("span", { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, " Repopulate the fields based on the dates selected in Preview. ", -1))
|
|
454
454
|
]),
|
|
455
|
-
i(
|
|
455
|
+
i(P, {
|
|
456
456
|
variant: "tertiary",
|
|
457
457
|
label: "Delete",
|
|
458
458
|
onClick: p
|
|
459
459
|
}),
|
|
460
|
-
i(
|
|
460
|
+
i(P, {
|
|
461
461
|
variant: "primary",
|
|
462
462
|
label: "Update",
|
|
463
463
|
onClick: r
|
|
@@ -465,28 +465,28 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
465
465
|
])
|
|
466
466
|
])
|
|
467
467
|
]),
|
|
468
|
-
i(
|
|
468
|
+
i(Q, { style: { margin: 0 } }),
|
|
469
469
|
t("div", kt, [
|
|
470
470
|
s[21] || (s[21] = t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Authenticate with your official Xero account to enable FeedMe to securely upload data to Xero. ", -1)),
|
|
471
471
|
t("div", Vt, [
|
|
472
472
|
t("div", $t, [
|
|
473
|
-
i(
|
|
473
|
+
i(P, {
|
|
474
474
|
disabled: m.value,
|
|
475
475
|
variant: "primary",
|
|
476
|
-
label:
|
|
476
|
+
label: k.value,
|
|
477
477
|
onClick: u
|
|
478
478
|
}, null, 8, ["disabled", "label"])
|
|
479
479
|
]),
|
|
480
|
-
!g.tenantOptions.isLoaded && ((
|
|
480
|
+
!g.tenantOptions.isLoaded && ((Z = e.value.platform) != null && Z.accessToken) ? (c(), M(E, {
|
|
481
481
|
key: 0,
|
|
482
482
|
size: "xl"
|
|
483
|
-
})) :
|
|
484
|
-
i(
|
|
483
|
+
})) : N("", !0),
|
|
484
|
+
i(G, {
|
|
485
485
|
class: "flex-grow",
|
|
486
486
|
items: g.tenantOptions.data || [],
|
|
487
|
-
"model-value": (
|
|
488
|
-
placeholder: g.tenantOptions.data ? "Select tenant " : (
|
|
489
|
-
"onUpdate:modelValue":
|
|
487
|
+
"model-value": (ee = e.value.platform.tenant) == null ? void 0 : ee.id,
|
|
488
|
+
placeholder: g.tenantOptions.data ? "Select tenant " : (te = e.value.platform.tenant) == null ? void 0 : te.name,
|
|
489
|
+
"onUpdate:modelValue": x
|
|
490
490
|
}, null, 8, ["items", "model-value", "placeholder"])
|
|
491
491
|
]),
|
|
492
492
|
t("div", St, [
|
|
@@ -494,17 +494,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
494
494
|
t("div", Ct, [
|
|
495
495
|
s[11] || (s[11] = t("div", { class: "w-[25%]" }, "Name", -1)),
|
|
496
496
|
t("div", Ft, [
|
|
497
|
-
i(
|
|
497
|
+
i(R, {
|
|
498
498
|
modelValue: e.value.name,
|
|
499
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
499
|
+
"onUpdate:modelValue": s[0] || (s[0] = (ie) => e.value.name = ie)
|
|
500
500
|
}, null, 8, ["modelValue"])
|
|
501
501
|
])
|
|
502
502
|
]),
|
|
503
503
|
t("div", Dt, [
|
|
504
504
|
s[12] || (s[12] = t("div", { class: "w-[25%]" }, "Location", -1)),
|
|
505
|
-
i(
|
|
505
|
+
i(G, {
|
|
506
506
|
modelValue: e.value.platform.locationIds,
|
|
507
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
507
|
+
"onUpdate:modelValue": s[1] || (s[1] = (ie) => e.value.platform.locationIds = ie),
|
|
508
508
|
multiselect: !0,
|
|
509
509
|
items: d.value,
|
|
510
510
|
placeholder: "Select location",
|
|
@@ -512,20 +512,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
512
512
|
}, null, 8, ["modelValue", "items"])
|
|
513
513
|
])
|
|
514
514
|
]),
|
|
515
|
-
i(
|
|
515
|
+
i(De, {
|
|
516
516
|
modelValue: e.value.platform,
|
|
517
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
|
517
|
+
"onUpdate:modelValue": s[2] || (s[2] = (ie) => e.value.platform = ie),
|
|
518
518
|
label: "upload",
|
|
519
|
-
"last-upload-date": (
|
|
519
|
+
"last-upload-date": (oe = e.value.platform) == null ? void 0 : oe.lastUploadDate
|
|
520
520
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
521
521
|
t("div", Ut, [
|
|
522
522
|
s[20] || (s[20] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "Mapping", -1)),
|
|
523
523
|
t("div", Tt, [
|
|
524
524
|
s[14] || (s[14] = t("div", { class: "w-[25%]" }, "Contact", -1)),
|
|
525
525
|
t("div", It, [
|
|
526
|
-
i(
|
|
526
|
+
i(R, {
|
|
527
527
|
modelValue: e.value.platform.mappings.contact.xeroAccount,
|
|
528
|
-
"onUpdate:modelValue": s[3] || (s[3] = (
|
|
528
|
+
"onUpdate:modelValue": s[3] || (s[3] = (ie) => e.value.platform.mappings.contact.xeroAccount = ie),
|
|
529
529
|
placeholder: "Contact account number"
|
|
530
530
|
}, null, 8, ["modelValue"])
|
|
531
531
|
])
|
|
@@ -536,8 +536,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
536
536
|
i(j, {
|
|
537
537
|
"model-value": e.value.platform.discountItem ?? !1,
|
|
538
538
|
style: { gap: 0 },
|
|
539
|
-
"onUpdate:modelValue": s[4] || (s[4] = (
|
|
540
|
-
e.value.platform.discountItem =
|
|
539
|
+
"onUpdate:modelValue": s[4] || (s[4] = (ie) => {
|
|
540
|
+
e.value.platform.discountItem = ie;
|
|
541
541
|
})
|
|
542
542
|
}, null, 8, ["model-value"])
|
|
543
543
|
])
|
|
@@ -548,30 +548,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
548
548
|
i(j, {
|
|
549
549
|
"model-value": e.value.platform.mappings.isCombineRefund ?? !1,
|
|
550
550
|
style: { gap: 0 },
|
|
551
|
-
"onUpdate:modelValue": s[5] || (s[5] = (
|
|
552
|
-
e.value.platform.mappings.isCombineRefund =
|
|
551
|
+
"onUpdate:modelValue": s[5] || (s[5] = (ie) => {
|
|
552
|
+
e.value.platform.mappings.isCombineRefund = ie;
|
|
553
553
|
})
|
|
554
554
|
}, null, 8, ["model-value"])
|
|
555
555
|
])
|
|
556
556
|
]),
|
|
557
557
|
t("div", Nt, [
|
|
558
558
|
s[17] || (s[17] = t("div", { class: "fm-typo-en-title-sm-800" }, "Taxes", -1)),
|
|
559
|
-
i(
|
|
559
|
+
i(P, {
|
|
560
560
|
variant: "primary",
|
|
561
561
|
icon: "add",
|
|
562
562
|
onClick: s[6] || (s[6] = () => l("taxes"))
|
|
563
563
|
})
|
|
564
564
|
]),
|
|
565
|
-
g.taxOptions.isError || e.value.platform.accessToken == null ? (c(),
|
|
566
|
-
!g.taxOptions.isLoaded && ((
|
|
565
|
+
g.taxOptions.isError || e.value.platform.accessToken == null ? (c(), C("div", Rt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
|
|
566
|
+
!g.taxOptions.isLoaded && ((ae = e.value.platform) != null && ae.accessToken) ? (c(), M(E, {
|
|
567
567
|
key: 1,
|
|
568
568
|
size: "xl"
|
|
569
|
-
})) :
|
|
570
|
-
((
|
|
571
|
-
(c(!0),
|
|
572
|
-
key: `tax-${
|
|
573
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
574
|
-
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.taxes[
|
|
569
|
+
})) : N("", !0),
|
|
570
|
+
((le = g.taxOptions.data) == null ? void 0 : le.length) > 0 ? (c(), C("div", Ot, [
|
|
571
|
+
(c(!0), C(L, null, H((D = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.taxes, (ie, re) => (c(), M(Me, {
|
|
572
|
+
key: `tax-${re}`,
|
|
573
|
+
modelValue: e.value.platform.mappings.taxes[re],
|
|
574
|
+
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.taxes[re] = Ie,
|
|
575
575
|
options: {
|
|
576
576
|
feedmeKey: { placeholder: "Feedme Key", editable: !0 },
|
|
577
577
|
xeroAccount: {
|
|
@@ -581,27 +581,27 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
581
581
|
}
|
|
582
582
|
},
|
|
583
583
|
removable: !0,
|
|
584
|
-
onRemove: () =>
|
|
584
|
+
onRemove: () => $("taxes", re)
|
|
585
585
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
586
|
-
])) :
|
|
586
|
+
])) : N("", !0),
|
|
587
587
|
t("div", Bt, [
|
|
588
588
|
s[18] || (s[18] = t("div", { class: "fm-typo-en-title-sm-800" }, "Items", -1)),
|
|
589
|
-
i(
|
|
589
|
+
i(P, {
|
|
590
590
|
variant: "primary",
|
|
591
591
|
icon: "add",
|
|
592
592
|
onClick: s[7] || (s[7] = () => l("items"))
|
|
593
593
|
})
|
|
594
594
|
]),
|
|
595
|
-
g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(),
|
|
596
|
-
!g.accountCodeOptions.isLoaded && ((
|
|
595
|
+
g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), C("div", jt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
|
|
596
|
+
!g.accountCodeOptions.isLoaded && ((y = e.value.platform) != null && y.accessToken) ? (c(), M(E, {
|
|
597
597
|
key: 4,
|
|
598
598
|
size: "xl"
|
|
599
|
-
})) :
|
|
600
|
-
((
|
|
601
|
-
(c(!0),
|
|
602
|
-
key: `item-${
|
|
603
|
-
modelValue: e.value.platform.mappings.items[
|
|
604
|
-
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.items[
|
|
599
|
+
})) : N("", !0),
|
|
600
|
+
((U = g.accountCodeOptions.data) == null ? void 0 : U.length) > 0 ? (c(), C("div", Lt, [
|
|
601
|
+
(c(!0), C(L, null, H((Ue = (me = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : me.mappings) == null ? void 0 : Ue.items, (ie, re) => (c(), M(Me, {
|
|
602
|
+
key: `item-${re}`,
|
|
603
|
+
modelValue: e.value.platform.mappings.items[re],
|
|
604
|
+
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.items[re] = Ie,
|
|
605
605
|
options: {
|
|
606
606
|
feedmeKey: { placeholder: "Feedme Key", editable: !0 },
|
|
607
607
|
xeroAccount: {
|
|
@@ -611,27 +611,27 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
611
611
|
}
|
|
612
612
|
},
|
|
613
613
|
removable: !0,
|
|
614
|
-
onRemove: () =>
|
|
614
|
+
onRemove: () => $("items", re)
|
|
615
615
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
616
|
-
])) :
|
|
616
|
+
])) : N("", !0),
|
|
617
617
|
t("div", Et, [
|
|
618
618
|
s[19] || (s[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Payments", -1)),
|
|
619
|
-
i(
|
|
619
|
+
i(P, {
|
|
620
620
|
variant: "primary",
|
|
621
621
|
icon: "add",
|
|
622
622
|
onClick: s[8] || (s[8] = () => l("payments"))
|
|
623
623
|
})
|
|
624
624
|
]),
|
|
625
|
-
g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(),
|
|
626
|
-
!g.accountCodeOptions.isLoaded && ((
|
|
625
|
+
g.accountCodeOptions.isError || e.value.platform.accessToken == null ? (c(), C("div", zt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : N("", !0),
|
|
626
|
+
!g.accountCodeOptions.isLoaded && ((Te = e.value.platform) != null && Te.accessToken) ? (c(), M(E, {
|
|
627
627
|
key: 7,
|
|
628
628
|
size: "xl"
|
|
629
|
-
})) :
|
|
630
|
-
((Ne = g.accountCodeOptions.data) == null ? void 0 : Ne.length) > 0 ? (c(),
|
|
631
|
-
(c(!0),
|
|
632
|
-
key: `payment-${
|
|
633
|
-
modelValue: e.value.platform.mappings.payments[
|
|
634
|
-
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.payments[
|
|
629
|
+
})) : N("", !0),
|
|
630
|
+
((Ne = g.accountCodeOptions.data) == null ? void 0 : Ne.length) > 0 ? (c(), C("div", Yt, [
|
|
631
|
+
(c(!0), C(L, null, H((Be = (Oe = (Re = e.value) == null ? void 0 : Re.platform) == null ? void 0 : Oe.mappings) == null ? void 0 : Be.payments, (ie, re) => (c(), M(Me, {
|
|
632
|
+
key: `payment-${re}`,
|
|
633
|
+
modelValue: e.value.platform.mappings.payments[re],
|
|
634
|
+
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.payments[re] = Ie,
|
|
635
635
|
options: {
|
|
636
636
|
feedmeKey: { placeholder: "Feedme Key", editable: !0 },
|
|
637
637
|
xeroAccount: {
|
|
@@ -641,18 +641,18 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
641
641
|
}
|
|
642
642
|
},
|
|
643
643
|
removable: !0,
|
|
644
|
-
onRemove: () =>
|
|
644
|
+
onRemove: () => $("payments", re)
|
|
645
645
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
646
|
-
])) :
|
|
646
|
+
])) : N("", !0)
|
|
647
647
|
])
|
|
648
648
|
])
|
|
649
|
-
])) :
|
|
649
|
+
])) : N("", !0);
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
652
|
}), Ht = { class: "h-full flex flex-col gap-16" }, Xt = { class: "flex flex-row gap-2 justify-between items-center" }, Qt = {
|
|
653
653
|
key: 0,
|
|
654
654
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
655
|
-
}, Gt = /* @__PURE__ */
|
|
655
|
+
}, Gt = /* @__PURE__ */ q({
|
|
656
656
|
__name: "Preview",
|
|
657
657
|
props: {
|
|
658
658
|
modelValue: { required: !0 },
|
|
@@ -660,28 +660,28 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
660
660
|
},
|
|
661
661
|
emits: ["update:modelValue"],
|
|
662
662
|
setup(g) {
|
|
663
|
-
const o = B([]), e =
|
|
663
|
+
const o = B([]), e = Y(
|
|
664
664
|
() => o.value.reduce((m, d) => {
|
|
665
|
-
const
|
|
666
|
-
m[
|
|
667
|
-
date:
|
|
668
|
-
contact:
|
|
669
|
-
status:
|
|
670
|
-
ref:
|
|
665
|
+
const k = m.length, { invoice: b, payments: u } = d;
|
|
666
|
+
m[k] = {
|
|
667
|
+
date: b.Date,
|
|
668
|
+
contact: b.Contact.ContactID,
|
|
669
|
+
status: b.Status,
|
|
670
|
+
ref: b.Reference
|
|
671
671
|
};
|
|
672
|
-
for (let p = 0; p < Math.max(
|
|
673
|
-
const r =
|
|
674
|
-
m[r] || (m[r] = {}),
|
|
672
|
+
for (let p = 0; p < Math.max(b.LineItems.length, u.length); p++) {
|
|
673
|
+
const r = k + p;
|
|
674
|
+
m[r] || (m[r] = {}), b.LineItems[p] && (m[r] = {
|
|
675
675
|
...m[r],
|
|
676
|
-
itemDescription:
|
|
677
|
-
itemQuantity:
|
|
678
|
-
itemUnitAmount:
|
|
676
|
+
itemDescription: b.LineItems[p].Description,
|
|
677
|
+
itemQuantity: b.LineItems[p].Quantity,
|
|
678
|
+
itemUnitAmount: b.LineItems[p].UnitAmount,
|
|
679
679
|
// itemCode: invoice.LineItems[i].ItemCode,
|
|
680
|
-
itemAccount:
|
|
681
|
-
itemTax:
|
|
682
|
-
itemTaxType:
|
|
683
|
-
itemAmount:
|
|
684
|
-
itemDiscount:
|
|
680
|
+
itemAccount: b.LineItems[p].AccountCode,
|
|
681
|
+
itemTax: b.LineItems[p].TaxAmount,
|
|
682
|
+
itemTaxType: b.LineItems[p].TaxType,
|
|
683
|
+
itemAmount: b.LineItems[p].LineAmount,
|
|
684
|
+
itemDiscount: b.LineItems[p].DiscountAmount
|
|
685
685
|
}), u[p] && (m[r] = {
|
|
686
686
|
...m[r],
|
|
687
687
|
paymentAccount: u[p].Account.Code,
|
|
@@ -767,61 +767,61 @@ 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
|
-
],
|
|
771
|
-
|
|
772
|
-
() =>
|
|
770
|
+
], V = X(g, "modelValue"), w = B(!1), _ = ue(), { dateRange: F } = Ce(pe());
|
|
771
|
+
ve(
|
|
772
|
+
() => F.value,
|
|
773
773
|
async () => {
|
|
774
|
-
if (
|
|
774
|
+
if (V.value._id)
|
|
775
775
|
try {
|
|
776
|
-
|
|
776
|
+
w.value = !0, o.value = await $e(V.value._id);
|
|
777
777
|
} catch (m) {
|
|
778
|
-
|
|
778
|
+
_.open({ message: m.message, type: "error" });
|
|
779
779
|
} finally {
|
|
780
|
-
|
|
780
|
+
w.value = !1;
|
|
781
781
|
}
|
|
782
782
|
},
|
|
783
783
|
{
|
|
784
784
|
immediate: !0
|
|
785
785
|
}
|
|
786
786
|
);
|
|
787
|
-
async function
|
|
787
|
+
async function h() {
|
|
788
788
|
try {
|
|
789
|
-
|
|
789
|
+
V.value._id ? (w.value = !0, await Ae(V.value._id), _.open({ message: "Upload successful", type: "success" })) : _.open({ message: "Invalid accounting setting", type: "error" });
|
|
790
790
|
} catch (m) {
|
|
791
|
-
m.message &&
|
|
791
|
+
m.message && _.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((d) => _.open({ message: d.Message, type: "error" }));
|
|
792
792
|
} finally {
|
|
793
|
-
|
|
793
|
+
w.value = !1;
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
return (m, d) => {
|
|
797
|
-
const
|
|
798
|
-
return c(),
|
|
797
|
+
const k = S("FmButton"), b = S("FmCircularProgress"), u = S("FmTable");
|
|
798
|
+
return c(), C("div", Ht, [
|
|
799
799
|
t("div", Xt, [
|
|
800
|
-
i(
|
|
801
|
-
"date-range": f(
|
|
802
|
-
"onUpdate:dateRange": d[0] || (d[0] = (p) =>
|
|
800
|
+
i(Fe, {
|
|
801
|
+
"date-range": f(F),
|
|
802
|
+
"onUpdate:dateRange": d[0] || (d[0] = (p) => be(F) ? F.value = p : null),
|
|
803
803
|
compare: !1
|
|
804
804
|
}, null, 8, ["date-range"]),
|
|
805
|
-
i(
|
|
806
|
-
loading:
|
|
805
|
+
i(k, {
|
|
806
|
+
loading: w.value,
|
|
807
807
|
variant: "primary",
|
|
808
808
|
label: "Upload",
|
|
809
|
-
onClick:
|
|
809
|
+
onClick: h
|
|
810
810
|
}, null, 8, ["loading"])
|
|
811
811
|
]),
|
|
812
|
-
|
|
813
|
-
i(
|
|
812
|
+
w.value ? (c(), C("div", Qt, [
|
|
813
|
+
i(b, { size: "xl" }),
|
|
814
814
|
d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
|
|
815
|
-
])) : e.value.length > 0 ? (c(),
|
|
815
|
+
])) : e.value.length > 0 ? (c(), M(u, {
|
|
816
816
|
key: 1,
|
|
817
817
|
class: "flex overflow-scroll",
|
|
818
818
|
"row-data": e.value,
|
|
819
819
|
"column-defs": n
|
|
820
|
-
}, null, 8, ["row-data"])) :
|
|
820
|
+
}, null, 8, ["row-data"])) : N("", !0)
|
|
821
821
|
]);
|
|
822
822
|
};
|
|
823
823
|
}
|
|
824
|
-
}), Jt = { class: "h-full relative flex flex-col" }, Wt = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Zt = /* @__PURE__ */
|
|
824
|
+
}), Jt = { class: "h-full relative flex flex-col" }, Wt = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Zt = /* @__PURE__ */ q({
|
|
825
825
|
__name: "Xero",
|
|
826
826
|
props: {
|
|
827
827
|
modelValue: { required: !0 },
|
|
@@ -829,7 +829,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
829
829
|
},
|
|
830
830
|
emits: ["update:modelValue"],
|
|
831
831
|
setup(g) {
|
|
832
|
-
const { t: o } =
|
|
832
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = B({}), w = B({}), _ = B({}), F = [
|
|
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
|
+
], h = de(), m = Y(() => {
|
|
844
844
|
switch (n.value) {
|
|
845
845
|
case "preview":
|
|
846
846
|
return { component: Gt };
|
|
@@ -848,9 +848,9 @@ 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: V.value,
|
|
852
|
+
taxOptions: w.value,
|
|
853
|
+
accountCodeOptions: _.value
|
|
854
854
|
}
|
|
855
855
|
};
|
|
856
856
|
default:
|
|
@@ -861,75 +861,75 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
861
861
|
if (e.value._id)
|
|
862
862
|
try {
|
|
863
863
|
const u = await He(e.value._id);
|
|
864
|
-
|
|
864
|
+
V.value.data = u.map((p) => ({
|
|
865
865
|
value: p.id,
|
|
866
866
|
label: p.name
|
|
867
867
|
}));
|
|
868
868
|
} catch (u) {
|
|
869
|
-
console.error("Failed to fetch tenants:", u),
|
|
869
|
+
console.error("Failed to fetch tenants:", u), V.value.isError = !0;
|
|
870
870
|
} finally {
|
|
871
|
-
|
|
871
|
+
V.value.isLoaded = !0;
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
|
-
async function
|
|
874
|
+
async function k() {
|
|
875
875
|
if (e.value._id)
|
|
876
876
|
try {
|
|
877
877
|
const u = await Xe(e.value._id);
|
|
878
|
-
|
|
878
|
+
w.value.data = u.map((p) => ({
|
|
879
879
|
value: p.Name,
|
|
880
880
|
label: `${p.Name} - (${p.EffectiveRate}%)`
|
|
881
881
|
}));
|
|
882
882
|
} catch (u) {
|
|
883
|
-
console.error("Failed to fetch taxes:", u),
|
|
883
|
+
console.error("Failed to fetch taxes:", u), w.value.isError = !0;
|
|
884
884
|
} finally {
|
|
885
|
-
|
|
885
|
+
w.value.isLoaded = !0;
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
|
-
async function
|
|
888
|
+
async function b() {
|
|
889
889
|
if (e.value._id)
|
|
890
890
|
try {
|
|
891
891
|
const u = await Qe(e.value._id);
|
|
892
|
-
|
|
892
|
+
_.value.data = u.map((p) => ({
|
|
893
893
|
value: p.Code,
|
|
894
894
|
label: `${p.Code} ${p.Name} - [${p.Class}_${p.Type}]`
|
|
895
895
|
}));
|
|
896
896
|
} catch (u) {
|
|
897
|
-
console.error("Failed to fetch accounts:", u),
|
|
897
|
+
console.error("Failed to fetch accounts:", u), _.value.isError = !0;
|
|
898
898
|
} finally {
|
|
899
|
-
|
|
899
|
+
_.value.isLoaded = !0;
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
|
-
return
|
|
902
|
+
return ve(
|
|
903
903
|
() => {
|
|
904
904
|
var u;
|
|
905
905
|
return (u = e.value.platform) == null ? void 0 : u.accessToken;
|
|
906
906
|
},
|
|
907
907
|
(u) => {
|
|
908
|
-
u && (d(),
|
|
908
|
+
u && (d(), k(), b());
|
|
909
909
|
},
|
|
910
910
|
{ immediate: !0 }
|
|
911
911
|
), (u, p) => {
|
|
912
|
-
var
|
|
913
|
-
const r =
|
|
914
|
-
return c(),
|
|
912
|
+
var $, l, a;
|
|
913
|
+
const r = S("FmPageHead"), x = S("FmTabs");
|
|
914
|
+
return c(), C("div", Jt, [
|
|
915
915
|
i(r, {
|
|
916
|
-
title: ((
|
|
916
|
+
title: (($ = e.value) == null ? void 0 : $.name) || "Xero",
|
|
917
917
|
"back-button": !0,
|
|
918
918
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
919
|
-
"onClick:back": f(
|
|
919
|
+
"onClick:back": f(h).back
|
|
920
920
|
}, {
|
|
921
|
-
description:
|
|
921
|
+
description: ge(() => p[2] || (p[2] = [
|
|
922
922
|
t("div", null, null, -1)
|
|
923
923
|
])),
|
|
924
924
|
_: 1
|
|
925
925
|
}, 8, ["title", "onClick:back"]),
|
|
926
|
-
i(
|
|
926
|
+
i(x, {
|
|
927
927
|
"model-value": n.value,
|
|
928
928
|
"onUpdate:modelValue": p[0] || (p[0] = (v) => n.value = v),
|
|
929
|
-
items:
|
|
929
|
+
items: F
|
|
930
930
|
}, null, 8, ["model-value"]),
|
|
931
931
|
t("div", Wt, [
|
|
932
|
-
(c(),
|
|
932
|
+
(c(), M(xe((l = m.value) == null ? void 0 : l.component), Le({
|
|
933
933
|
modelValue: e.value,
|
|
934
934
|
"onUpdate:modelValue": p[1] || (p[1] = (v) => e.value = v)
|
|
935
935
|
}, (a = m.value) == null ? void 0 : a.props), null, 16, ["modelValue"]))
|
|
@@ -940,7 +940,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
940
940
|
}), eo = {
|
|
941
941
|
key: 0,
|
|
942
942
|
class: "flex flex-col h-full"
|
|
943
|
-
}, to = { class: "flex flex-col gap-16 pb-[24px]" }, oo = { class: "flex flex-row justify-between items-center gap-2" }, ao = { class: "fm-typo-en-title-sm-800" }, lo = { class: "flex flex-row gap-2 items-center" }, no = { class: "relative group cursor-pointer" }, so = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, io = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mo = { class: "flex flex-row items-center justify-between" }, co = { class: "w-[25%]" }, po = { class: "flex-grow" }, uo = { class: "flex flex-row items-center justify-between" }, fo = { class: "w-[25%]" }, vo = { class: "flex-grow" }, go = { class: "flex flex-col gap-16" }, yo = { class: "fm-typo-en-title-sm-800" }, xo = { class: "flex flex-row items-center max-w-[100%]" }, _o = { class: "w-[25%]" }, bo = { class: "flex-grow" }, wo = { class: "flex flex-row items-center max-w-[100%]" }, ho = { class: "w-[25%]" }, ko = { class: "flex flex-row items-center max-w-[100%]" }, Vo = { class: "w-[25%]" }, $o = { class: "flex flex-col gap-16" }, So = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Co = { class: "flex flex-row items-center gap-x-16" }, Fo = { class: "fm-typo-en-title-sm-800" }, Do = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Uo = { class: "flex flex-row items-center gap-x-16" }, To = { class: "fm-typo-en-title-sm-800" }, Io = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Mo = { class: "flex flex-row items-center gap-x-16" }, Ko = { class: "fm-typo-en-title-sm-800" }, Ao =
|
|
943
|
+
}, to = { class: "flex flex-col gap-16 pb-[24px]" }, oo = { class: "flex flex-row justify-between items-center gap-2" }, ao = { class: "fm-typo-en-title-sm-800" }, lo = { class: "flex flex-row gap-2 items-center" }, no = { class: "relative group cursor-pointer" }, so = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, io = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mo = { class: "flex flex-row items-center justify-between" }, co = { class: "w-[25%]" }, po = { class: "flex-grow" }, uo = { class: "flex flex-row items-center justify-between" }, fo = { class: "w-[25%]" }, vo = { class: "flex-grow" }, go = { class: "flex flex-col gap-16" }, yo = { class: "fm-typo-en-title-sm-800" }, xo = { class: "flex flex-row items-center max-w-[100%]" }, _o = { class: "w-[25%]" }, bo = { class: "flex-grow" }, wo = { class: "flex flex-row items-center max-w-[100%]" }, ho = { class: "w-[25%]" }, ko = { class: "flex flex-row items-center max-w-[100%]" }, Vo = { class: "w-[25%]" }, $o = { class: "flex flex-col gap-16" }, So = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Co = { class: "flex flex-row items-center gap-x-16" }, Fo = { class: "fm-typo-en-title-sm-800" }, Do = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Uo = { class: "flex flex-row items-center gap-x-16" }, To = { class: "fm-typo-en-title-sm-800" }, Io = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Mo = { class: "flex flex-row items-center gap-x-16" }, Ko = { class: "fm-typo-en-title-sm-800" }, Ao = /* @__PURE__ */ q({
|
|
944
944
|
__name: "Setting",
|
|
945
945
|
props: {
|
|
946
946
|
modelValue: { required: !0 },
|
|
@@ -948,34 +948,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
948
948
|
},
|
|
949
949
|
emits: ["update:modelValue"],
|
|
950
950
|
setup(g) {
|
|
951
|
-
const o =
|
|
952
|
-
() =>
|
|
953
|
-
), { t: m } =
|
|
951
|
+
const o = X(g, "modelValue"), e = ue(), n = _e(), V = de(), { promptLoader: w } = we(), { promptMessage: _ } = Se(), { restaurants: F } = pe(), h = Y(
|
|
952
|
+
() => F.map((l) => ({ label: l.name, value: l.id }))
|
|
953
|
+
), { t: m } = J();
|
|
954
954
|
async function d() {
|
|
955
|
-
await
|
|
955
|
+
await _({
|
|
956
956
|
message: m("report.messages.confirmDelete", { name: o.value.name }),
|
|
957
957
|
title: m("report.common.delete")
|
|
958
|
-
}) && await
|
|
958
|
+
}) && await w(async () => {
|
|
959
959
|
try {
|
|
960
|
-
await
|
|
960
|
+
await he(o.value._id), await n.getSettings(), V.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 k() {
|
|
967
|
+
await w(async () => {
|
|
968
968
|
try {
|
|
969
|
-
await
|
|
969
|
+
await ke(o.value._id, o.value), await n.getSettings();
|
|
970
970
|
} catch (l) {
|
|
971
971
|
e.open({ type: "error", message: l.message });
|
|
972
972
|
}
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function b(l, a) {
|
|
976
976
|
var v, s;
|
|
977
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
|
-
(
|
|
978
|
+
(A, P) => P !== a
|
|
979
979
|
));
|
|
980
980
|
}
|
|
981
981
|
function u(l) {
|
|
@@ -1014,19 +1014,19 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1014
1014
|
const p = [
|
|
1015
1015
|
{
|
|
1016
1016
|
label: m("report.integration.setting.grouping.byDay"),
|
|
1017
|
-
value:
|
|
1017
|
+
value: fe.BY_DAY
|
|
1018
1018
|
},
|
|
1019
1019
|
{
|
|
1020
1020
|
label: m("report.integration.setting.grouping.byDayItem"),
|
|
1021
|
-
value:
|
|
1021
|
+
value: fe.BY_DAY_ITEM
|
|
1022
1022
|
},
|
|
1023
1023
|
{
|
|
1024
1024
|
label: m("report.integration.setting.grouping.byInvoice"),
|
|
1025
|
-
value:
|
|
1025
|
+
value: fe.BY_INVOICE
|
|
1026
1026
|
},
|
|
1027
1027
|
{
|
|
1028
1028
|
label: m("report.integration.setting.grouping.byDaySeparatePayment"),
|
|
1029
|
-
value:
|
|
1029
|
+
value: fe.BY_DAY_SEPARATE_PAYMENT
|
|
1030
1030
|
}
|
|
1031
1031
|
];
|
|
1032
1032
|
function r({
|
|
@@ -1036,25 +1036,25 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1036
1036
|
var v, s;
|
|
1037
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 x(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 $() {
|
|
1046
|
+
await w(async () => {
|
|
1047
1047
|
try {
|
|
1048
|
-
await
|
|
1048
|
+
await Ve(o.value._id), await n.getSettings();
|
|
1049
1049
|
} catch (l) {
|
|
1050
1050
|
e.open({ type: "error", message: l.message });
|
|
1051
1051
|
}
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
1054
|
return (l, a) => {
|
|
1055
|
-
var
|
|
1056
|
-
const v =
|
|
1057
|
-
return (
|
|
1055
|
+
var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se, D;
|
|
1056
|
+
const v = S("FmIcon"), s = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
|
|
1057
|
+
return (G = (E = o.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), C("div", eo, [
|
|
1058
1058
|
t("div", to, [
|
|
1059
1059
|
t("div", oo, [
|
|
1060
1060
|
t("div", ao, T(f(m)("report.integration.bukku.connect")), 1),
|
|
@@ -1063,7 +1063,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1063
1063
|
i(v, {
|
|
1064
1064
|
name: "refresh",
|
|
1065
1065
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1066
|
-
onClick:
|
|
1066
|
+
onClick: $
|
|
1067
1067
|
}),
|
|
1068
1068
|
t("span", so, T(f(m)("report.integration.setting.refreshTooltip")), 1)
|
|
1069
1069
|
]),
|
|
@@ -1075,20 +1075,20 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1075
1075
|
i(s, {
|
|
1076
1076
|
variant: "primary",
|
|
1077
1077
|
label: f(m)("report.common.update"),
|
|
1078
|
-
onClick:
|
|
1078
|
+
onClick: k
|
|
1079
1079
|
}, null, 8, ["label"])
|
|
1080
1080
|
])
|
|
1081
1081
|
])
|
|
1082
1082
|
]),
|
|
1083
|
-
i(
|
|
1083
|
+
i(A, { style: { margin: 0 } }),
|
|
1084
1084
|
t("div", io, [
|
|
1085
1085
|
t("div", ro, T(f(m)("report.integration.bukku.authentication")), 1),
|
|
1086
1086
|
t("div", mo, [
|
|
1087
1087
|
t("div", co, T(f(m)("report.integration.subdomain")), 1),
|
|
1088
1088
|
t("div", po, [
|
|
1089
|
-
i(
|
|
1089
|
+
i(P, {
|
|
1090
1090
|
modelValue: o.value.platform.subdomain,
|
|
1091
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
1091
|
+
"onUpdate:modelValue": a[0] || (a[0] = (y) => o.value.platform.subdomain = y),
|
|
1092
1092
|
placeholder: f(m)("report.integration.subdomain")
|
|
1093
1093
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1094
1094
|
])
|
|
@@ -1096,9 +1096,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1096
1096
|
t("div", uo, [
|
|
1097
1097
|
t("div", fo, T(f(m)("report.integration.token")), 1),
|
|
1098
1098
|
t("div", vo, [
|
|
1099
|
-
i(
|
|
1099
|
+
i(P, {
|
|
1100
1100
|
modelValue: o.value.platform.token,
|
|
1101
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
1101
|
+
"onUpdate:modelValue": a[1] || (a[1] = (y) => o.value.platform.token = y),
|
|
1102
1102
|
placeholder: f(m)("report.integration.token")
|
|
1103
1103
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1104
1104
|
])
|
|
@@ -1108,28 +1108,28 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1108
1108
|
t("div", xo, [
|
|
1109
1109
|
t("div", _o, T(f(m)("report.common.name")), 1),
|
|
1110
1110
|
t("div", bo, [
|
|
1111
|
-
i(
|
|
1111
|
+
i(P, {
|
|
1112
1112
|
modelValue: o.value.name,
|
|
1113
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
1113
|
+
"onUpdate:modelValue": a[2] || (a[2] = (y) => o.value.name = y)
|
|
1114
1114
|
}, null, 8, ["modelValue"])
|
|
1115
1115
|
])
|
|
1116
1116
|
]),
|
|
1117
1117
|
t("div", wo, [
|
|
1118
1118
|
t("div", ho, T(f(m)("report.common.location")), 1),
|
|
1119
|
-
i(
|
|
1119
|
+
i(Q, {
|
|
1120
1120
|
modelValue: o.value.platform.locationIds,
|
|
1121
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
1121
|
+
"onUpdate:modelValue": a[3] || (a[3] = (y) => o.value.platform.locationIds = y),
|
|
1122
1122
|
multiselect: !0,
|
|
1123
|
-
items:
|
|
1123
|
+
items: h.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
1129
|
t("div", Vo, T(f(m)("report.integration.bukku.grouping.title")), 1),
|
|
1130
|
-
i(
|
|
1130
|
+
i(Q, {
|
|
1131
1131
|
modelValue: o.value.platform.grouping,
|
|
1132
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
1132
|
+
"onUpdate:modelValue": a[4] || (a[4] = (y) => o.value.platform.grouping = y),
|
|
1133
1133
|
multiselect: !1,
|
|
1134
1134
|
items: p,
|
|
1135
1135
|
placeholder: "Select grouping",
|
|
@@ -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(K, {
|
|
1143
1143
|
"model-value": {
|
|
1144
1144
|
key: "Contact",
|
|
1145
1145
|
account: o.value.platform.mappings.contact.account
|
|
@@ -1154,61 +1154,61 @@ 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
|
-
(
|
|
1157
|
+
"onUpdate:modelValue": a[5] || (a[5] = (y) => {
|
|
1158
|
+
var U, O, me;
|
|
1159
|
+
(me = (O = (U = o.value) == null ? void 0 : U.platform) == null ? void 0 : O.mappings) != null && me.contact && (o.value.platform.mappings.contact.account = y.account);
|
|
1160
1160
|
})
|
|
1161
1161
|
}, null, 8, ["model-value"]),
|
|
1162
|
-
i(
|
|
1162
|
+
i(K, {
|
|
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: x("Invoice no"),
|
|
1168
|
+
"onUpdate:modelValue": a[6] || (a[6] = (y) => r({ key: "invoiceDocNo", value: y.account }))
|
|
1169
1169
|
}, null, 8, ["model-value", "options"]),
|
|
1170
|
-
i(
|
|
1170
|
+
i(K, {
|
|
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: x("Credit note no"),
|
|
1176
|
+
"onUpdate:modelValue": a[7] || (a[7] = (y) => r({ key: "creditNoteDocNo", value: y.account }))
|
|
1177
1177
|
}, null, 8, ["model-value", "options"]),
|
|
1178
|
-
i(
|
|
1178
|
+
i(K, {
|
|
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: x("Payment no"),
|
|
1184
|
+
"onUpdate:modelValue": a[8] || (a[8] = (y) => r({ key: "paymentDocNo", value: y.account }))
|
|
1185
1185
|
}, null, 8, ["model-value", "options"]),
|
|
1186
|
-
i(
|
|
1186
|
+
i(K, {
|
|
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: x("Refund no"),
|
|
1192
|
+
"onUpdate:modelValue": a[9] || (a[9] = (y) => r({ key: "refundDocNo", value: y.account }))
|
|
1193
1193
|
}, null, 8, ["model-value", "options"]),
|
|
1194
|
-
i(
|
|
1194
|
+
i(K, {
|
|
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
|
-
(
|
|
1199
|
+
options: x("Rounding"),
|
|
1200
|
+
"onUpdate:modelValue": a[10] || (a[10] = (y) => {
|
|
1201
|
+
var U, O, me;
|
|
1202
|
+
(me = (O = (U = o.value) == null ? void 0 : U.platform) == null ? void 0 : O.mappings) != null && me.rounding && (o.value.platform.mappings.rounding.account = y.account);
|
|
1203
1203
|
})
|
|
1204
1204
|
}, null, 8, ["model-value", "options"]),
|
|
1205
|
-
(c(!0),
|
|
1206
|
-
key: `charge-${
|
|
1207
|
-
modelValue: o.value.platform.mappings.charges[
|
|
1208
|
-
"onUpdate:modelValue": (
|
|
1205
|
+
(c(!0), C(L, null, H((z = (j = (R = o.value) == null ? void 0 : R.platform) == null ? void 0 : j.mappings) == null ? void 0 : z.charges, (y, U) => (c(), M(K, {
|
|
1206
|
+
key: `charge-${U}`,
|
|
1207
|
+
modelValue: o.value.platform.mappings.charges[U],
|
|
1208
|
+
"onUpdate:modelValue": (O) => o.value.platform.mappings.charges[U] = O,
|
|
1209
1209
|
options: {
|
|
1210
1210
|
key: {
|
|
1211
|
-
placeholder: f(m)(`report.integration.bukku.mapping.charge.${
|
|
1211
|
+
placeholder: f(m)(`report.integration.bukku.mapping.charge.${y.key}`),
|
|
1212
1212
|
editable: !1
|
|
1213
1213
|
},
|
|
1214
1214
|
account: {
|
|
@@ -1219,11 +1219,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1219
1219
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"]))), 128))
|
|
1220
1220
|
])
|
|
1221
1221
|
]),
|
|
1222
|
-
i(
|
|
1222
|
+
i(De, {
|
|
1223
1223
|
modelValue: o.value.platform,
|
|
1224
|
-
"onUpdate:modelValue": a[11] || (a[11] = (
|
|
1224
|
+
"onUpdate:modelValue": a[11] || (a[11] = (y) => o.value.platform = y),
|
|
1225
1225
|
label: "upload",
|
|
1226
|
-
"last-upload-date": (
|
|
1226
|
+
"last-upload-date": (W = o.value.platform) == null ? void 0 : W.lastUploadDate
|
|
1227
1227
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
1228
1228
|
t("div", Co, [
|
|
1229
1229
|
t("div", Fo, T(f(m)("report.integration.items")), 1),
|
|
@@ -1234,16 +1234,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1234
1234
|
})
|
|
1235
1235
|
]),
|
|
1236
1236
|
t("div", Do, [
|
|
1237
|
-
(c(!0),
|
|
1238
|
-
key: `item-${
|
|
1239
|
-
modelValue: o.value.platform.mappings.items[
|
|
1240
|
-
"onUpdate:modelValue": (
|
|
1237
|
+
(c(!0), C(L, null, H((te = (ee = (Z = o.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (y, U) => (c(), M(K, {
|
|
1238
|
+
key: `item-${U}`,
|
|
1239
|
+
modelValue: o.value.platform.mappings.items[U],
|
|
1240
|
+
"onUpdate:modelValue": (O) => o.value.platform.mappings.items[U] = O,
|
|
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: () => b("items", U)
|
|
1247
1247
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1248
1248
|
]),
|
|
1249
1249
|
t("div", Uo, [
|
|
@@ -1255,16 +1255,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1255
1255
|
})
|
|
1256
1256
|
]),
|
|
1257
1257
|
t("div", Io, [
|
|
1258
|
-
(c(!0),
|
|
1259
|
-
key: `tax-${
|
|
1260
|
-
modelValue: o.value.platform.mappings.taxes[
|
|
1261
|
-
"onUpdate:modelValue": (
|
|
1258
|
+
(c(!0), C(L, null, H((le = (ae = (oe = o.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (y, U) => (c(), M(K, {
|
|
1259
|
+
key: `tax-${U}`,
|
|
1260
|
+
modelValue: o.value.platform.mappings.taxes[U],
|
|
1261
|
+
"onUpdate:modelValue": (O) => o.value.platform.mappings.taxes[U] = O,
|
|
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: () => b("taxes", U)
|
|
1268
1268
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1269
1269
|
]),
|
|
1270
1270
|
t("div", Mo, [
|
|
@@ -1275,40 +1275,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1275
1275
|
onClick: a[14] || (a[14] = () => u("payments"))
|
|
1276
1276
|
})
|
|
1277
1277
|
]),
|
|
1278
|
-
(c(!0),
|
|
1279
|
-
key: `payment-${
|
|
1278
|
+
(c(!0), C(L, null, H((D = (se = (ne = o.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.payments, (y, U) => (c(), C("div", {
|
|
1279
|
+
key: `payment-${U}`,
|
|
1280
1280
|
class: "grid-cols-1 grid gap-x-16"
|
|
1281
1281
|
}, [
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
"onUpdate:modelValue": (q) => o.value.platform.mappings.payments[M] = q,
|
|
1294
|
-
options: {
|
|
1295
|
-
key: { placeholder: "Key", editable: !0 },
|
|
1296
|
-
method: { placeholder: "Method", editable: !0 },
|
|
1297
|
-
account: { placeholder: "Account code", editable: !0 }
|
|
1298
|
-
},
|
|
1299
|
-
removable: !0,
|
|
1300
|
-
onRemove: () => _("payments", M)
|
|
1301
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"])
|
|
1302
|
-
])
|
|
1282
|
+
i(K, {
|
|
1283
|
+
modelValue: o.value.platform.mappings.payments[U],
|
|
1284
|
+
"onUpdate:modelValue": (O) => o.value.platform.mappings.payments[U] = O,
|
|
1285
|
+
options: {
|
|
1286
|
+
key: { placeholder: "Key", editable: !0 },
|
|
1287
|
+
method: { placeholder: "Method", editable: !0 },
|
|
1288
|
+
account: { placeholder: "Account code", editable: !0 }
|
|
1289
|
+
},
|
|
1290
|
+
removable: !0,
|
|
1291
|
+
onRemove: () => b("payments", U)
|
|
1292
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"])
|
|
1303
1293
|
]))), 128))
|
|
1304
1294
|
])
|
|
1305
|
-
])) :
|
|
1295
|
+
])) : N("", !0);
|
|
1306
1296
|
};
|
|
1307
1297
|
}
|
|
1308
|
-
}),
|
|
1298
|
+
}), Po = { class: "h-full flex flex-col gap-16" }, No = { class: "flex flex-row gap-2 justify-between items-center" }, Ro = {
|
|
1309
1299
|
key: 0,
|
|
1310
1300
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
1311
|
-
},
|
|
1301
|
+
}, Oo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bo = /* @__PURE__ */ q({
|
|
1312
1302
|
__name: "Preview",
|
|
1313
1303
|
props: {
|
|
1314
1304
|
modelValue: { required: !0 },
|
|
@@ -1316,10 +1306,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1316
1306
|
},
|
|
1317
1307
|
emits: ["update:modelValue"],
|
|
1318
1308
|
setup(g) {
|
|
1319
|
-
const o = B([]), e =
|
|
1320
|
-
() => o.value.reduce((d,
|
|
1321
|
-
const
|
|
1322
|
-
d[
|
|
1309
|
+
const o = B([]), e = Y(
|
|
1310
|
+
() => o.value.reduce((d, k) => {
|
|
1311
|
+
const b = d.length, { invoice: u, payments: p } = k;
|
|
1312
|
+
d[b] = {
|
|
1323
1313
|
no: u.number,
|
|
1324
1314
|
date: u.date,
|
|
1325
1315
|
contact: u._contact_name,
|
|
@@ -1327,21 +1317,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1327
1317
|
title: u.title
|
|
1328
1318
|
};
|
|
1329
1319
|
for (let r = 0; r < Math.max(u.form_items.length, p.length); r++) {
|
|
1330
|
-
const
|
|
1331
|
-
d[
|
|
1332
|
-
const
|
|
1333
|
-
|
|
1334
|
-
...d[
|
|
1335
|
-
itemDescription:
|
|
1336
|
-
itemQuantity:
|
|
1337
|
-
itemUnitPrice:
|
|
1338
|
-
itemAccount:
|
|
1339
|
-
itemTaxCode:
|
|
1340
|
-
itemDiscount:
|
|
1320
|
+
const x = b + r;
|
|
1321
|
+
d[x] || (d[x] = {});
|
|
1322
|
+
const $ = u.form_items[r];
|
|
1323
|
+
$ && (d[x] = {
|
|
1324
|
+
...d[x],
|
|
1325
|
+
itemDescription: $.description,
|
|
1326
|
+
itemQuantity: $.quantity,
|
|
1327
|
+
itemUnitPrice: $.unit_price,
|
|
1328
|
+
itemAccount: $._account_name,
|
|
1329
|
+
itemTaxCode: $._tax_code_name,
|
|
1330
|
+
itemDiscount: $.discount
|
|
1341
1331
|
});
|
|
1342
1332
|
const l = p[r];
|
|
1343
|
-
l && (d[
|
|
1344
|
-
...d[
|
|
1333
|
+
l && (d[x] = {
|
|
1334
|
+
...d[x],
|
|
1345
1335
|
paymentNo: l.number,
|
|
1346
1336
|
paymentMethod: l.deposit_items[0]._payment_method_name,
|
|
1347
1337
|
paymentAccount: l.deposit_items[0]._account_name,
|
|
@@ -1352,7 +1342,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1352
1342
|
}
|
|
1353
1343
|
return d;
|
|
1354
1344
|
}, [])
|
|
1355
|
-
), { t: n } =
|
|
1345
|
+
), { t: n } = J(), V = [
|
|
1356
1346
|
{
|
|
1357
1347
|
accessorKey: "date",
|
|
1358
1348
|
header: () => I(
|
|
@@ -1446,17 +1436,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1446
1436
|
header: "Skip",
|
|
1447
1437
|
enableSorting: !1
|
|
1448
1438
|
}
|
|
1449
|
-
],
|
|
1450
|
-
|
|
1451
|
-
() =>
|
|
1439
|
+
], w = X(g, "modelValue"), _ = B(!1), F = ue(), { dateRange: h } = Ce(pe());
|
|
1440
|
+
ve(
|
|
1441
|
+
() => h.value,
|
|
1452
1442
|
async () => {
|
|
1453
|
-
if (
|
|
1443
|
+
if (w.value._id)
|
|
1454
1444
|
try {
|
|
1455
|
-
|
|
1445
|
+
_.value = !0, o.value = await $e(w.value._id);
|
|
1456
1446
|
} catch (d) {
|
|
1457
|
-
|
|
1447
|
+
F.open({ message: d.message, type: "error" });
|
|
1458
1448
|
} finally {
|
|
1459
|
-
|
|
1449
|
+
_.value = !1;
|
|
1460
1450
|
}
|
|
1461
1451
|
},
|
|
1462
1452
|
{
|
|
@@ -1465,42 +1455,42 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1465
1455
|
);
|
|
1466
1456
|
async function m() {
|
|
1467
1457
|
try {
|
|
1468
|
-
|
|
1458
|
+
w.value._id ? (_.value = !0, await Ae(w.value._id), F.open({ message: n("report.integration.preview.uploadSuccess"), type: "success" })) : F.open({ message: n("report.integration.error.invalid"), type: "error" });
|
|
1469
1459
|
} catch (d) {
|
|
1470
|
-
|
|
1460
|
+
F.open({ message: d.message, type: "error" });
|
|
1471
1461
|
} finally {
|
|
1472
|
-
|
|
1462
|
+
_.value = !1;
|
|
1473
1463
|
}
|
|
1474
1464
|
}
|
|
1475
|
-
return (d,
|
|
1476
|
-
const
|
|
1477
|
-
return c(),
|
|
1478
|
-
t("div",
|
|
1479
|
-
i(
|
|
1480
|
-
"date-range": f(
|
|
1481
|
-
"onUpdate:dateRange":
|
|
1465
|
+
return (d, k) => {
|
|
1466
|
+
const b = S("FmButton"), u = S("FmCircularProgress"), p = S("FmTable");
|
|
1467
|
+
return c(), C("div", Po, [
|
|
1468
|
+
t("div", No, [
|
|
1469
|
+
i(Fe, {
|
|
1470
|
+
"date-range": f(h),
|
|
1471
|
+
"onUpdate:dateRange": k[0] || (k[0] = (r) => be(h) ? h.value = r : null),
|
|
1482
1472
|
compare: !1
|
|
1483
1473
|
}, null, 8, ["date-range"]),
|
|
1484
|
-
i(
|
|
1485
|
-
loading:
|
|
1474
|
+
i(b, {
|
|
1475
|
+
loading: _.value,
|
|
1486
1476
|
variant: "primary",
|
|
1487
1477
|
label: f(n)("report.common.upload"),
|
|
1488
1478
|
onClick: m
|
|
1489
1479
|
}, null, 8, ["loading", "label"])
|
|
1490
1480
|
]),
|
|
1491
|
-
|
|
1481
|
+
_.value ? (c(), C("div", Ro, [
|
|
1492
1482
|
i(u, { size: "xl" }),
|
|
1493
|
-
t("span",
|
|
1494
|
-
])) : e.value.length > 0 ? (c(),
|
|
1483
|
+
t("span", Oo, T(f(n)("report.integration.preview.loading")), 1)
|
|
1484
|
+
])) : e.value.length > 0 ? (c(), M(p, {
|
|
1495
1485
|
key: 1,
|
|
1496
1486
|
class: "flex overflow-scroll",
|
|
1497
1487
|
"row-data": e.value,
|
|
1498
|
-
"column-defs":
|
|
1499
|
-
}, null, 8, ["row-data"])) :
|
|
1488
|
+
"column-defs": V
|
|
1489
|
+
}, null, 8, ["row-data"])) : N("", !0)
|
|
1500
1490
|
]);
|
|
1501
1491
|
};
|
|
1502
1492
|
}
|
|
1503
|
-
}),
|
|
1493
|
+
}), jo = { class: "h-full relative flex flex-col" }, Lo = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Eo = /* @__PURE__ */ q({
|
|
1504
1494
|
__name: "Bukku",
|
|
1505
1495
|
props: {
|
|
1506
1496
|
modelValue: {},
|
|
@@ -1508,7 +1498,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1508
1498
|
},
|
|
1509
1499
|
emits: ["update:modelValue"],
|
|
1510
1500
|
setup(g) {
|
|
1511
|
-
const { t: o } =
|
|
1501
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = [
|
|
1512
1502
|
{
|
|
1513
1503
|
label: o("report.integration.setting"),
|
|
1514
1504
|
value: "setting",
|
|
@@ -1519,49 +1509,49 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1519
1509
|
value: "preview",
|
|
1520
1510
|
icon: "table"
|
|
1521
1511
|
}
|
|
1522
|
-
],
|
|
1512
|
+
], w = de(), _ = Y(() => {
|
|
1523
1513
|
switch (n.value) {
|
|
1524
1514
|
case "preview":
|
|
1525
|
-
return
|
|
1515
|
+
return Bo;
|
|
1526
1516
|
case "setting":
|
|
1527
|
-
return
|
|
1517
|
+
return Ao;
|
|
1528
1518
|
default:
|
|
1529
1519
|
return null;
|
|
1530
1520
|
}
|
|
1531
1521
|
});
|
|
1532
|
-
return (
|
|
1533
|
-
var
|
|
1534
|
-
const m =
|
|
1535
|
-
return c(),
|
|
1522
|
+
return (F, h) => {
|
|
1523
|
+
var k;
|
|
1524
|
+
const m = S("FmPageHead"), d = S("FmTabs");
|
|
1525
|
+
return c(), C("div", jo, [
|
|
1536
1526
|
i(m, {
|
|
1537
|
-
title: ((
|
|
1527
|
+
title: ((k = e.value) == null ? void 0 : k.name) || "Bukku",
|
|
1538
1528
|
"back-button": !0,
|
|
1539
1529
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
1540
|
-
"onClick:back": f(
|
|
1530
|
+
"onClick:back": f(w).back
|
|
1541
1531
|
}, {
|
|
1542
|
-
description:
|
|
1532
|
+
description: ge(() => h[2] || (h[2] = [
|
|
1543
1533
|
t("div", null, null, -1)
|
|
1544
1534
|
])),
|
|
1545
1535
|
_: 1
|
|
1546
1536
|
}, 8, ["title", "onClick:back"]),
|
|
1547
1537
|
i(d, {
|
|
1548
1538
|
"model-value": n.value,
|
|
1549
|
-
"onUpdate:modelValue":
|
|
1550
|
-
items:
|
|
1539
|
+
"onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
|
|
1540
|
+
items: V
|
|
1551
1541
|
}, null, 8, ["model-value"]),
|
|
1552
|
-
t("div",
|
|
1553
|
-
(c(),
|
|
1542
|
+
t("div", Lo, [
|
|
1543
|
+
(c(), M(xe(_.value), {
|
|
1554
1544
|
modelValue: e.value,
|
|
1555
|
-
"onUpdate:modelValue":
|
|
1545
|
+
"onUpdate:modelValue": h[1] || (h[1] = (b) => e.value = b)
|
|
1556
1546
|
}, null, 8, ["modelValue"]))
|
|
1557
1547
|
])
|
|
1558
1548
|
]);
|
|
1559
1549
|
};
|
|
1560
1550
|
}
|
|
1561
|
-
}),
|
|
1551
|
+
}), zo = {
|
|
1562
1552
|
key: 0,
|
|
1563
1553
|
class: "flex flex-col h-full"
|
|
1564
|
-
},
|
|
1554
|
+
}, Yo = { class: "flex flex-col gap-16 pb-[24px]" }, qo = { class: "flex flex-row justify-between items-center gap-2" }, Ho = { class: "flex flex-row gap-2 items-center" }, Xo = { class: "relative group cursor-pointer" }, Qo = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Go = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Jo = { class: "flex flex-col gap-16" }, Wo = { class: "fm-typo-en-title-sm-800" }, Zo = { class: "flex flex-row items-center max-w-[100%]" }, ea = { class: "w-[25%]" }, ta = { class: "flex-grow" }, oa = { class: "flex flex-row items-center max-w-[100%]" }, aa = { class: "w-[25%]" }, la = { class: "flex flex-row items-center max-w-[100%]" }, na = { class: "w-[25%]" }, sa = { class: "flex flex-col gap-16" }, ia = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ra = { class: "flex flex-row items-center gap-x-16" }, ma = { class: "fm-typo-en-title-sm-800" }, ca = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, da = { class: "flex flex-row items-center gap-x-16" }, pa = { class: "fm-typo-en-title-sm-800" }, ua = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, fa = { class: "flex flex-row items-center gap-x-16" }, va = { class: "fm-typo-en-title-sm-800" }, ga = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ya = /* @__PURE__ */ q({
|
|
1565
1555
|
__name: "Setting",
|
|
1566
1556
|
props: {
|
|
1567
1557
|
modelValue: { required: !0 },
|
|
@@ -1569,34 +1559,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1569
1559
|
},
|
|
1570
1560
|
emits: ["update:modelValue"],
|
|
1571
1561
|
setup(g) {
|
|
1572
|
-
const { t: o } =
|
|
1573
|
-
() =>
|
|
1562
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = ue(), V = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
|
|
1563
|
+
() => h.map((l) => ({ label: l.name, value: l.id }))
|
|
1574
1564
|
);
|
|
1575
1565
|
async function d() {
|
|
1576
|
-
await
|
|
1566
|
+
await F({
|
|
1577
1567
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
1578
1568
|
title: o("report.common.delete")
|
|
1579
|
-
}) && await
|
|
1569
|
+
}) && await _(async () => {
|
|
1580
1570
|
try {
|
|
1581
|
-
await
|
|
1571
|
+
await he(e.value._id), await V.getSettings(), w.back();
|
|
1582
1572
|
} catch (a) {
|
|
1583
1573
|
n.open({ type: "error", message: a.message });
|
|
1584
1574
|
}
|
|
1585
1575
|
});
|
|
1586
1576
|
}
|
|
1587
|
-
async function
|
|
1588
|
-
await
|
|
1577
|
+
async function k() {
|
|
1578
|
+
await _(async () => {
|
|
1589
1579
|
try {
|
|
1590
|
-
await
|
|
1580
|
+
await ke(e.value._id, e.value), await V.getSettings();
|
|
1591
1581
|
} catch (l) {
|
|
1592
1582
|
n.open({ type: "error", message: l.message });
|
|
1593
1583
|
}
|
|
1594
1584
|
});
|
|
1595
1585
|
}
|
|
1596
|
-
function
|
|
1586
|
+
function b(l, a) {
|
|
1597
1587
|
var v, s;
|
|
1598
1588
|
(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
|
-
(
|
|
1589
|
+
(A, P) => P !== a
|
|
1600
1590
|
));
|
|
1601
1591
|
}
|
|
1602
1592
|
function u(l) {
|
|
@@ -1616,15 +1606,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1616
1606
|
const p = [
|
|
1617
1607
|
{
|
|
1618
1608
|
label: "By day",
|
|
1619
|
-
value:
|
|
1609
|
+
value: fe.BY_DAY
|
|
1620
1610
|
},
|
|
1621
1611
|
{
|
|
1622
1612
|
label: "By invoice",
|
|
1623
|
-
value:
|
|
1613
|
+
value: fe.BY_INVOICE
|
|
1624
1614
|
},
|
|
1625
1615
|
{
|
|
1626
1616
|
label: "By day and category",
|
|
1627
|
-
value:
|
|
1617
|
+
value: fe.BY_DAY_CATEGORY
|
|
1628
1618
|
}
|
|
1629
1619
|
];
|
|
1630
1620
|
function r({
|
|
@@ -1634,36 +1624,36 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1634
1624
|
var v, s;
|
|
1635
1625
|
(s = (v = e.value) == null ? void 0 : v.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
|
|
1636
1626
|
}
|
|
1637
|
-
function
|
|
1627
|
+
function x(l) {
|
|
1638
1628
|
return {
|
|
1639
1629
|
key: { placeholder: l, editable: !1 },
|
|
1640
1630
|
account: { placeholder: l, editable: !0 }
|
|
1641
1631
|
};
|
|
1642
1632
|
}
|
|
1643
|
-
async function
|
|
1644
|
-
await
|
|
1633
|
+
async function $() {
|
|
1634
|
+
await _(async () => {
|
|
1645
1635
|
try {
|
|
1646
|
-
await
|
|
1636
|
+
await Ve(e.value._id), await V.getSettings();
|
|
1647
1637
|
} catch (l) {
|
|
1648
1638
|
n.open({ type: "error", message: l.message });
|
|
1649
1639
|
}
|
|
1650
1640
|
});
|
|
1651
1641
|
}
|
|
1652
1642
|
return (l, a) => {
|
|
1653
|
-
var
|
|
1654
|
-
const v =
|
|
1655
|
-
return (
|
|
1656
|
-
t("div",
|
|
1657
|
-
t("div",
|
|
1643
|
+
var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se;
|
|
1644
|
+
const v = S("FmIcon"), s = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
|
|
1645
|
+
return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), C("div", zo, [
|
|
1646
|
+
t("div", Yo, [
|
|
1647
|
+
t("div", qo, [
|
|
1658
1648
|
a[14] || (a[14] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
1659
|
-
t("div",
|
|
1660
|
-
t("div",
|
|
1649
|
+
t("div", Ho, [
|
|
1650
|
+
t("div", Xo, [
|
|
1661
1651
|
i(v, {
|
|
1662
1652
|
name: "refresh",
|
|
1663
1653
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1664
|
-
onClick:
|
|
1654
|
+
onClick: $
|
|
1665
1655
|
}),
|
|
1666
|
-
t("span",
|
|
1656
|
+
t("span", Qo, T(f(o)("report.integration.autoCount.repopulate")), 1)
|
|
1667
1657
|
]),
|
|
1668
1658
|
i(s, {
|
|
1669
1659
|
variant: "tertiary",
|
|
@@ -1673,41 +1663,41 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1673
1663
|
i(s, {
|
|
1674
1664
|
variant: "primary",
|
|
1675
1665
|
label: f(o)("report.common.update"),
|
|
1676
|
-
onClick:
|
|
1666
|
+
onClick: k
|
|
1677
1667
|
}, null, 8, ["label"])
|
|
1678
1668
|
])
|
|
1679
1669
|
])
|
|
1680
1670
|
]),
|
|
1681
|
-
i(
|
|
1682
|
-
t("div",
|
|
1683
|
-
t("div",
|
|
1684
|
-
t("div",
|
|
1685
|
-
t("div",
|
|
1686
|
-
t("div",
|
|
1687
|
-
t("div",
|
|
1688
|
-
i(
|
|
1671
|
+
i(A, { style: { margin: 0 } }),
|
|
1672
|
+
t("div", Go, [
|
|
1673
|
+
t("div", Jo, [
|
|
1674
|
+
t("div", Wo, T(f(o)("report.integration.autocount.general")), 1),
|
|
1675
|
+
t("div", Zo, [
|
|
1676
|
+
t("div", ea, T(f(o)("report.common.name")), 1),
|
|
1677
|
+
t("div", ta, [
|
|
1678
|
+
i(P, {
|
|
1689
1679
|
modelValue: e.value.name,
|
|
1690
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
1680
|
+
"onUpdate:modelValue": a[0] || (a[0] = (D) => e.value.name = D)
|
|
1691
1681
|
}, null, 8, ["modelValue"])
|
|
1692
1682
|
])
|
|
1693
1683
|
]),
|
|
1694
|
-
t("div",
|
|
1695
|
-
t("div",
|
|
1696
|
-
i(
|
|
1684
|
+
t("div", oa, [
|
|
1685
|
+
t("div", aa, T(f(o)("report.integration.location")), 1),
|
|
1686
|
+
i(Q, {
|
|
1697
1687
|
modelValue: e.value.platform.locationIds,
|
|
1698
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
1688
|
+
"onUpdate:modelValue": a[1] || (a[1] = (D) => e.value.platform.locationIds = D),
|
|
1699
1689
|
multiselect: !0,
|
|
1700
1690
|
items: m.value,
|
|
1701
1691
|
placeholder: "Select location",
|
|
1702
1692
|
class: "flex-grow",
|
|
1703
|
-
rules: [(
|
|
1693
|
+
rules: [(D) => D.length !== 0 || "Please select at least 1 location"]
|
|
1704
1694
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
1705
1695
|
]),
|
|
1706
|
-
t("div",
|
|
1707
|
-
t("div",
|
|
1708
|
-
i(
|
|
1696
|
+
t("div", la, [
|
|
1697
|
+
t("div", na, T(f(o)("report.integration.autoCount.grouping.title")), 1),
|
|
1698
|
+
i(Q, {
|
|
1709
1699
|
modelValue: e.value.platform.grouping,
|
|
1710
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
1700
|
+
"onUpdate:modelValue": a[2] || (a[2] = (D) => e.value.platform.grouping = D),
|
|
1711
1701
|
multiselect: !1,
|
|
1712
1702
|
items: p,
|
|
1713
1703
|
placeholder: "Select grouping",
|
|
@@ -1715,65 +1705,65 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1715
1705
|
}, null, 8, ["modelValue"])
|
|
1716
1706
|
])
|
|
1717
1707
|
]),
|
|
1718
|
-
t("div",
|
|
1719
|
-
t("div",
|
|
1720
|
-
i(
|
|
1708
|
+
t("div", sa, [
|
|
1709
|
+
t("div", ia, [
|
|
1710
|
+
i(K, {
|
|
1721
1711
|
"model-value": { key: "Project", account: e.value.platform.mappings.project },
|
|
1722
|
-
options:
|
|
1723
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
1712
|
+
options: x("Project"),
|
|
1713
|
+
"onUpdate:modelValue": a[3] || (a[3] = (D) => r({ key: "project", value: D.account }))
|
|
1724
1714
|
}, null, 8, ["model-value", "options"]),
|
|
1725
|
-
i(
|
|
1715
|
+
i(K, {
|
|
1726
1716
|
"model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
|
|
1727
|
-
options:
|
|
1728
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
1717
|
+
options: x("Debtor"),
|
|
1718
|
+
"onUpdate:modelValue": a[4] || (a[4] = (D) => r({ key: "debtor", value: D.account }))
|
|
1729
1719
|
}, null, 8, ["model-value", "options"]),
|
|
1730
|
-
i(
|
|
1720
|
+
i(K, {
|
|
1731
1721
|
"model-value": {
|
|
1732
1722
|
key: "Invoice no",
|
|
1733
1723
|
account: e.value.platform.mappings.invoiceDocNo
|
|
1734
1724
|
},
|
|
1735
|
-
options:
|
|
1736
|
-
"onUpdate:modelValue": a[5] || (a[5] = (
|
|
1725
|
+
options: x("Invoice no"),
|
|
1726
|
+
"onUpdate:modelValue": a[5] || (a[5] = (D) => r({ key: "invoiceDocNo", value: D.account }))
|
|
1737
1727
|
}, null, 8, ["model-value", "options"]),
|
|
1738
|
-
i(
|
|
1728
|
+
i(K, {
|
|
1739
1729
|
"model-value": {
|
|
1740
1730
|
key: "Credit note no",
|
|
1741
1731
|
account: e.value.platform.mappings.creditNoteDocNo
|
|
1742
1732
|
},
|
|
1743
|
-
options:
|
|
1744
|
-
"onUpdate:modelValue": a[6] || (a[6] = (
|
|
1733
|
+
options: x("Credit note no"),
|
|
1734
|
+
"onUpdate:modelValue": a[6] || (a[6] = (D) => r({ key: "creditNoteDocNo", value: D.account }))
|
|
1745
1735
|
}, null, 8, ["model-value", "options"]),
|
|
1746
|
-
i(
|
|
1736
|
+
i(K, {
|
|
1747
1737
|
"model-value": {
|
|
1748
1738
|
key: "Payment no",
|
|
1749
1739
|
account: e.value.platform.mappings.paymentDocNo
|
|
1750
1740
|
},
|
|
1751
|
-
options:
|
|
1752
|
-
"onUpdate:modelValue": a[7] || (a[7] = (
|
|
1741
|
+
options: x("Payment no"),
|
|
1742
|
+
"onUpdate:modelValue": a[7] || (a[7] = (D) => r({ key: "paymentDocNo", value: D.account }))
|
|
1753
1743
|
}, null, 8, ["model-value", "options"]),
|
|
1754
|
-
i(
|
|
1744
|
+
i(K, {
|
|
1755
1745
|
"model-value": {
|
|
1756
1746
|
key: "Refund no",
|
|
1757
1747
|
account: e.value.platform.mappings.refundDocNo
|
|
1758
1748
|
},
|
|
1759
|
-
options:
|
|
1760
|
-
"onUpdate:modelValue": a[8] || (a[8] = (
|
|
1749
|
+
options: x("Refund no"),
|
|
1750
|
+
"onUpdate:modelValue": a[8] || (a[8] = (D) => r({ key: "refundDocNo", value: D.account }))
|
|
1761
1751
|
}, null, 8, ["model-value", "options"]),
|
|
1762
|
-
i(
|
|
1752
|
+
i(K, {
|
|
1763
1753
|
"model-value": {
|
|
1764
1754
|
key: "Rounding",
|
|
1765
1755
|
account: e.value.platform.mappings.rounding.account
|
|
1766
1756
|
},
|
|
1767
|
-
options:
|
|
1768
|
-
"onUpdate:modelValue": a[9] || (a[9] = (
|
|
1769
|
-
var
|
|
1770
|
-
(
|
|
1757
|
+
options: x("Rounding"),
|
|
1758
|
+
"onUpdate:modelValue": a[9] || (a[9] = (D) => {
|
|
1759
|
+
var y, U, O;
|
|
1760
|
+
(O = (U = (y = e.value) == null ? void 0 : y.platform) == null ? void 0 : U.mappings) != null && O.rounding && (e.value.platform.mappings.rounding.account = D.account);
|
|
1771
1761
|
})
|
|
1772
1762
|
}, null, 8, ["model-value", "options"]),
|
|
1773
|
-
(c(!0),
|
|
1774
|
-
key: `charge-${
|
|
1775
|
-
modelValue: e.value.platform.mappings.charges[
|
|
1776
|
-
"onUpdate:modelValue": (
|
|
1763
|
+
(c(!0), C(L, null, H((z = (j = (R = e.value) == null ? void 0 : R.platform) == null ? void 0 : j.mappings) == null ? void 0 : z.charges, (D, y) => (c(), M(K, {
|
|
1764
|
+
key: `charge-${y}`,
|
|
1765
|
+
modelValue: e.value.platform.mappings.charges[y],
|
|
1766
|
+
"onUpdate:modelValue": (U) => e.value.platform.mappings.charges[y] = U,
|
|
1777
1767
|
options: {
|
|
1778
1768
|
key: { placeholder: "Key", editable: !1 },
|
|
1779
1769
|
account: { placeholder: "Account code", editable: !0 }
|
|
@@ -1781,82 +1771,82 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1781
1771
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
1782
1772
|
])
|
|
1783
1773
|
]),
|
|
1784
|
-
i(
|
|
1774
|
+
i(De, {
|
|
1785
1775
|
modelValue: e.value.platform,
|
|
1786
|
-
"onUpdate:modelValue": a[10] || (a[10] = (
|
|
1776
|
+
"onUpdate:modelValue": a[10] || (a[10] = (D) => e.value.platform = D),
|
|
1787
1777
|
label: f(o)("report.input.email")
|
|
1788
1778
|
}, null, 8, ["modelValue", "label"]),
|
|
1789
|
-
t("div",
|
|
1790
|
-
t("div",
|
|
1779
|
+
t("div", ra, [
|
|
1780
|
+
t("div", ma, T(f(o)("report.integration.items")), 1),
|
|
1791
1781
|
i(s, {
|
|
1792
1782
|
variant: "primary",
|
|
1793
1783
|
icon: "add",
|
|
1794
1784
|
onClick: a[11] || (a[11] = () => u("items"))
|
|
1795
1785
|
})
|
|
1796
1786
|
]),
|
|
1797
|
-
t("div",
|
|
1798
|
-
(c(!0),
|
|
1799
|
-
key: `item-${
|
|
1800
|
-
modelValue: e.value.platform.mappings.items[
|
|
1801
|
-
"onUpdate:modelValue": (
|
|
1787
|
+
t("div", ca, [
|
|
1788
|
+
(c(!0), C(L, null, H((ee = (Z = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : Z.mappings) == null ? void 0 : ee.items, (D, y) => (c(), M(K, {
|
|
1789
|
+
key: `item-${y}`,
|
|
1790
|
+
modelValue: e.value.platform.mappings.items[y],
|
|
1791
|
+
"onUpdate:modelValue": (U) => e.value.platform.mappings.items[y] = U,
|
|
1802
1792
|
options: {
|
|
1803
1793
|
key: { placeholder: "Key", editable: !0 },
|
|
1804
1794
|
account: { placeholder: "Account code", editable: !0 }
|
|
1805
1795
|
},
|
|
1806
1796
|
removable: !0,
|
|
1807
|
-
onRemove: () =>
|
|
1797
|
+
onRemove: () => b("items", y)
|
|
1808
1798
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1809
1799
|
]),
|
|
1810
|
-
t("div",
|
|
1811
|
-
t("div",
|
|
1800
|
+
t("div", da, [
|
|
1801
|
+
t("div", pa, T(f(o)("report.integration.taxes")), 1),
|
|
1812
1802
|
i(s, {
|
|
1813
1803
|
variant: "primary",
|
|
1814
1804
|
icon: "add",
|
|
1815
1805
|
onClick: a[12] || (a[12] = () => u("taxes"))
|
|
1816
1806
|
})
|
|
1817
1807
|
]),
|
|
1818
|
-
t("div",
|
|
1819
|
-
(c(!0),
|
|
1820
|
-
key: `tax-${
|
|
1821
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
1822
|
-
"onUpdate:modelValue": (
|
|
1808
|
+
t("div", ua, [
|
|
1809
|
+
(c(!0), C(L, null, H((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.taxes, (D, y) => (c(), M(K, {
|
|
1810
|
+
key: `tax-${y}`,
|
|
1811
|
+
modelValue: e.value.platform.mappings.taxes[y],
|
|
1812
|
+
"onUpdate:modelValue": (U) => e.value.platform.mappings.taxes[y] = U,
|
|
1823
1813
|
options: {
|
|
1824
1814
|
key: { placeholder: "Key", editable: !0 },
|
|
1825
1815
|
account: { placeholder: "Account code", editable: !0 }
|
|
1826
1816
|
},
|
|
1827
1817
|
removable: !0,
|
|
1828
|
-
onRemove: () =>
|
|
1818
|
+
onRemove: () => b("taxes", y)
|
|
1829
1819
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1830
1820
|
]),
|
|
1831
|
-
t("div",
|
|
1832
|
-
t("div",
|
|
1821
|
+
t("div", fa, [
|
|
1822
|
+
t("div", va, T(f(o)("report.integration.payments")), 1),
|
|
1833
1823
|
i(s, {
|
|
1834
1824
|
variant: "primary",
|
|
1835
1825
|
icon: "add",
|
|
1836
1826
|
onClick: a[13] || (a[13] = () => u("payments"))
|
|
1837
1827
|
})
|
|
1838
1828
|
]),
|
|
1839
|
-
t("div",
|
|
1840
|
-
(c(!0),
|
|
1841
|
-
key: `payment-${
|
|
1842
|
-
modelValue: e.value.platform.mappings.payments[
|
|
1843
|
-
"onUpdate:modelValue": (
|
|
1829
|
+
t("div", ga, [
|
|
1830
|
+
(c(!0), C(L, null, H((se = (ne = (le = e.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.payments, (D, y) => (c(), M(K, {
|
|
1831
|
+
key: `payment-${y}`,
|
|
1832
|
+
modelValue: e.value.platform.mappings.payments[y],
|
|
1833
|
+
"onUpdate:modelValue": (U) => e.value.platform.mappings.payments[y] = U,
|
|
1844
1834
|
options: {
|
|
1845
1835
|
key: { placeholder: "Key", editable: !0 },
|
|
1846
1836
|
account: { placeholder: "Payment name", editable: !0 }
|
|
1847
1837
|
},
|
|
1848
1838
|
removable: !0,
|
|
1849
|
-
onRemove: () =>
|
|
1839
|
+
onRemove: () => b("payments", y)
|
|
1850
1840
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1851
1841
|
])
|
|
1852
1842
|
])
|
|
1853
|
-
])) :
|
|
1843
|
+
])) : N("", !0);
|
|
1854
1844
|
};
|
|
1855
1845
|
}
|
|
1856
|
-
}),
|
|
1846
|
+
}), xa = { class: "h-full flex flex-col gap-16" }, _a = { class: "flex flex-row gap-2 justify-between items-center" }, ba = {
|
|
1857
1847
|
key: 0,
|
|
1858
1848
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
1859
|
-
},
|
|
1849
|
+
}, wa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ha = /* @__PURE__ */ q({
|
|
1860
1850
|
__name: "Preview",
|
|
1861
1851
|
props: {
|
|
1862
1852
|
modelValue: { required: !0 },
|
|
@@ -1864,10 +1854,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1864
1854
|
},
|
|
1865
1855
|
emits: ["update:modelValue"],
|
|
1866
1856
|
setup(g) {
|
|
1867
|
-
const { t: o } =
|
|
1868
|
-
() => e.value.reduce((d,
|
|
1869
|
-
const
|
|
1870
|
-
d[
|
|
1857
|
+
const { t: o } = J(), e = B([]), n = Y(
|
|
1858
|
+
() => e.value.reduce((d, k) => {
|
|
1859
|
+
const b = d.length, { invoice: u, payments: p } = k;
|
|
1860
|
+
d[b] = {
|
|
1871
1861
|
date: u.DocDate,
|
|
1872
1862
|
docNo: u.DocNo,
|
|
1873
1863
|
projNo: u.ProjNo,
|
|
@@ -1875,16 +1865,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1875
1865
|
description: u.Description
|
|
1876
1866
|
};
|
|
1877
1867
|
for (let r = 0; r < Math.max(u._items.length, p.length); r++) {
|
|
1878
|
-
const
|
|
1879
|
-
d[
|
|
1880
|
-
...d[
|
|
1868
|
+
const x = b + r;
|
|
1869
|
+
d[x] || (d[x] = {}), u._items[r] && (d[x] = {
|
|
1870
|
+
...d[x],
|
|
1881
1871
|
itemDescription: u._items[r].DetailDescription,
|
|
1882
1872
|
itemUnitPrice: u._items[r].Amount,
|
|
1883
1873
|
itemAccount: u._items[r].AccNo,
|
|
1884
1874
|
itemTaxCode: u._items[r].TaxType,
|
|
1885
1875
|
itemTax: u._items[r].Tax
|
|
1886
|
-
}), p[r] && (d[
|
|
1887
|
-
...d[
|
|
1876
|
+
}), p[r] && (d[x] = {
|
|
1877
|
+
...d[x],
|
|
1888
1878
|
paymentDocNo: p[r].DocNo,
|
|
1889
1879
|
paymentMethod: p[r].paymentMethod,
|
|
1890
1880
|
paymentDescription: p[r].Description,
|
|
@@ -1893,7 +1883,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1893
1883
|
}
|
|
1894
1884
|
return d;
|
|
1895
1885
|
}, [])
|
|
1896
|
-
),
|
|
1886
|
+
), V = [
|
|
1897
1887
|
{
|
|
1898
1888
|
accessorKey: "date",
|
|
1899
1889
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -1964,17 +1954,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1964
1954
|
header: "Payment Amount",
|
|
1965
1955
|
enableSorting: !1
|
|
1966
1956
|
}
|
|
1967
|
-
],
|
|
1968
|
-
|
|
1969
|
-
() =>
|
|
1957
|
+
], w = X(g, "modelValue"), _ = B(!1), F = ue(), { dateRange: h } = Ce(pe());
|
|
1958
|
+
ve(
|
|
1959
|
+
() => h.value,
|
|
1970
1960
|
async () => {
|
|
1971
|
-
if (
|
|
1961
|
+
if (w.value._id)
|
|
1972
1962
|
try {
|
|
1973
|
-
|
|
1963
|
+
_.value = !0, e.value = await $e(w.value._id);
|
|
1974
1964
|
} catch (d) {
|
|
1975
|
-
|
|
1965
|
+
F.open({ message: d.message, type: "error" });
|
|
1976
1966
|
} finally {
|
|
1977
|
-
|
|
1967
|
+
_.value = !1;
|
|
1978
1968
|
}
|
|
1979
1969
|
},
|
|
1980
1970
|
{
|
|
@@ -1983,42 +1973,42 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1983
1973
|
);
|
|
1984
1974
|
async function m() {
|
|
1985
1975
|
try {
|
|
1986
|
-
|
|
1976
|
+
w.value._id ? (_.value = !0, await Pe(w.value._id)) : F.open({ message: "Invalid accounting setting", type: "error" });
|
|
1987
1977
|
} catch (d) {
|
|
1988
|
-
|
|
1978
|
+
F.open({ message: d.message, type: "error" });
|
|
1989
1979
|
} finally {
|
|
1990
|
-
|
|
1980
|
+
_.value = !1;
|
|
1991
1981
|
}
|
|
1992
1982
|
}
|
|
1993
|
-
return (d,
|
|
1994
|
-
const
|
|
1995
|
-
return c(),
|
|
1996
|
-
t("div",
|
|
1997
|
-
i(
|
|
1998
|
-
"date-range": f(
|
|
1999
|
-
"onUpdate:dateRange":
|
|
1983
|
+
return (d, k) => {
|
|
1984
|
+
const b = S("FmButton"), u = S("FmCircularProgress"), p = S("FmTable");
|
|
1985
|
+
return c(), C("div", xa, [
|
|
1986
|
+
t("div", _a, [
|
|
1987
|
+
i(Fe, {
|
|
1988
|
+
"date-range": f(h),
|
|
1989
|
+
"onUpdate:dateRange": k[0] || (k[0] = (r) => be(h) ? h.value = r : null),
|
|
2000
1990
|
compare: !1
|
|
2001
1991
|
}, null, 8, ["date-range"]),
|
|
2002
|
-
i(
|
|
2003
|
-
loading:
|
|
1992
|
+
i(b, {
|
|
1993
|
+
loading: _.value,
|
|
2004
1994
|
variant: "primary",
|
|
2005
1995
|
label: f(o)("report.common.download"),
|
|
2006
1996
|
onClick: m
|
|
2007
1997
|
}, null, 8, ["loading", "label"])
|
|
2008
1998
|
]),
|
|
2009
|
-
|
|
1999
|
+
_.value ? (c(), C("div", ba, [
|
|
2010
2000
|
i(u, { size: "xl" }),
|
|
2011
|
-
t("span",
|
|
2012
|
-
])) : n.value.length > 0 ? (c(),
|
|
2001
|
+
t("span", wa, T(f(o)("report.common.isLoading")), 1)
|
|
2002
|
+
])) : n.value.length > 0 ? (c(), M(p, {
|
|
2013
2003
|
key: 1,
|
|
2014
2004
|
class: "flex overflow-scroll",
|
|
2015
2005
|
"row-data": n.value,
|
|
2016
|
-
"column-defs":
|
|
2017
|
-
}, null, 8, ["row-data"])) :
|
|
2006
|
+
"column-defs": V
|
|
2007
|
+
}, null, 8, ["row-data"])) : N("", !0)
|
|
2018
2008
|
]);
|
|
2019
2009
|
};
|
|
2020
2010
|
}
|
|
2021
|
-
}),
|
|
2011
|
+
}), ka = { class: "h-full relative flex flex-col" }, Va = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, $a = /* @__PURE__ */ q({
|
|
2022
2012
|
__name: "AutoCount",
|
|
2023
2013
|
props: {
|
|
2024
2014
|
modelValue: {},
|
|
@@ -2026,7 +2016,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2026
2016
|
},
|
|
2027
2017
|
emits: ["update:modelValue"],
|
|
2028
2018
|
setup(g) {
|
|
2029
|
-
const { t: o } =
|
|
2019
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = [
|
|
2030
2020
|
{
|
|
2031
2021
|
label: o("report.integration.setting"),
|
|
2032
2022
|
value: "setting",
|
|
@@ -2037,49 +2027,49 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2037
2027
|
value: "preview",
|
|
2038
2028
|
icon: "table"
|
|
2039
2029
|
}
|
|
2040
|
-
],
|
|
2030
|
+
], w = de(), _ = Y(() => {
|
|
2041
2031
|
switch (n.value) {
|
|
2042
2032
|
case "preview":
|
|
2043
|
-
return
|
|
2033
|
+
return ha;
|
|
2044
2034
|
case "setting":
|
|
2045
|
-
return
|
|
2035
|
+
return ya;
|
|
2046
2036
|
default:
|
|
2047
2037
|
return null;
|
|
2048
2038
|
}
|
|
2049
2039
|
});
|
|
2050
|
-
return (
|
|
2051
|
-
var
|
|
2052
|
-
const m =
|
|
2053
|
-
return c(),
|
|
2040
|
+
return (F, h) => {
|
|
2041
|
+
var k;
|
|
2042
|
+
const m = S("FmPageHead"), d = S("FmTabs");
|
|
2043
|
+
return c(), C("div", ka, [
|
|
2054
2044
|
i(m, {
|
|
2055
|
-
title: ((
|
|
2045
|
+
title: ((k = e.value) == null ? void 0 : k.name) || "AutoCount",
|
|
2056
2046
|
"back-button": !0,
|
|
2057
2047
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2058
|
-
"onClick:back": f(
|
|
2048
|
+
"onClick:back": f(w).back
|
|
2059
2049
|
}, {
|
|
2060
|
-
description:
|
|
2050
|
+
description: ge(() => h[2] || (h[2] = [
|
|
2061
2051
|
t("div", null, null, -1)
|
|
2062
2052
|
])),
|
|
2063
2053
|
_: 1
|
|
2064
2054
|
}, 8, ["title", "onClick:back"]),
|
|
2065
2055
|
i(d, {
|
|
2066
2056
|
"model-value": n.value,
|
|
2067
|
-
"onUpdate:modelValue":
|
|
2068
|
-
items:
|
|
2057
|
+
"onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
|
|
2058
|
+
items: V
|
|
2069
2059
|
}, null, 8, ["model-value"]),
|
|
2070
|
-
t("div",
|
|
2071
|
-
(c(),
|
|
2060
|
+
t("div", Va, [
|
|
2061
|
+
(c(), M(xe(_.value), {
|
|
2072
2062
|
modelValue: e.value,
|
|
2073
|
-
"onUpdate:modelValue":
|
|
2063
|
+
"onUpdate:modelValue": h[1] || (h[1] = (b) => e.value = b)
|
|
2074
2064
|
}, null, 8, ["modelValue"]))
|
|
2075
2065
|
])
|
|
2076
2066
|
]);
|
|
2077
2067
|
};
|
|
2078
2068
|
}
|
|
2079
|
-
}),
|
|
2069
|
+
}), Sa = {
|
|
2080
2070
|
key: 0,
|
|
2081
2071
|
class: "flex flex-col h-full"
|
|
2082
|
-
},
|
|
2072
|
+
}, Ca = { class: "flex flex-col gap-16 pb-[24px]" }, Fa = { class: "flex flex-row justify-between items-center gap-2" }, Da = { class: "flex flex-row gap-2 items-center" }, Ua = { class: "relative group cursor-pointer" }, Ta = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Ia = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ma = { class: "flex flex-col gap-16" }, Ka = { class: "fm-typo-en-title-sm-800" }, Aa = { class: "flex flex-row items-center max-w-[100%]" }, Pa = { class: "w-[25%]" }, Na = { class: "flex-grow" }, Ra = { class: "flex flex-row items-center max-w-[100%]" }, Oa = { class: "w-[25%]" }, Ba = { class: "flex flex-row items-center max-w-[100%]" }, ja = { class: "w-[25%]" }, La = { class: "flex flex-col gap-16" }, Ea = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, za = { class: "grid-cols-1 grid gap-16" }, Ya = { class: "flex flex-row items-center gap-x-16" }, qa = { class: "fm-typo-en-title-sm-800" }, Ha = { class: "grid-cols-1 grid gap-16" }, Xa = { class: "flex flex-row items-center gap-x-16" }, Qa = { class: "fm-typo-en-title-sm-800" }, Ga = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ja = { class: "flex flex-row items-center gap-x-16" }, Wa = { class: "fm-typo-en-title-sm-800" }, Za = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, el = /* @__PURE__ */ q({
|
|
2083
2073
|
__name: "Setting",
|
|
2084
2074
|
props: {
|
|
2085
2075
|
modelValue: { required: !0 },
|
|
@@ -2087,34 +2077,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2087
2077
|
},
|
|
2088
2078
|
emits: ["update:modelValue"],
|
|
2089
2079
|
setup(g) {
|
|
2090
|
-
const { t: o } =
|
|
2091
|
-
() =>
|
|
2080
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = ue(), V = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
|
|
2081
|
+
() => h.map((l) => ({ label: l.name, value: l.id }))
|
|
2092
2082
|
);
|
|
2093
2083
|
async function d() {
|
|
2094
|
-
await
|
|
2084
|
+
await F({
|
|
2095
2085
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
2096
2086
|
title: o("report.common.delete")
|
|
2097
|
-
}) && await
|
|
2087
|
+
}) && await _(async () => {
|
|
2098
2088
|
try {
|
|
2099
|
-
await
|
|
2089
|
+
await he(e.value._id), await V.getSettings(), w.back();
|
|
2100
2090
|
} catch (a) {
|
|
2101
2091
|
n.open({ type: "error", message: a.message });
|
|
2102
2092
|
}
|
|
2103
2093
|
});
|
|
2104
2094
|
}
|
|
2105
|
-
async function
|
|
2106
|
-
await
|
|
2095
|
+
async function k() {
|
|
2096
|
+
await _(async () => {
|
|
2107
2097
|
try {
|
|
2108
|
-
await
|
|
2098
|
+
await ke(e.value._id, e.value), await V.getSettings();
|
|
2109
2099
|
} catch (l) {
|
|
2110
2100
|
n.open({ type: "error", message: l.message });
|
|
2111
2101
|
}
|
|
2112
2102
|
});
|
|
2113
2103
|
}
|
|
2114
|
-
function
|
|
2104
|
+
function b(l, a) {
|
|
2115
2105
|
var v, s;
|
|
2116
2106
|
(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
|
-
(
|
|
2107
|
+
(A, P) => P !== a
|
|
2118
2108
|
));
|
|
2119
2109
|
}
|
|
2120
2110
|
function u(l) {
|
|
@@ -2135,15 +2125,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2135
2125
|
const p = [
|
|
2136
2126
|
{
|
|
2137
2127
|
label: "By day",
|
|
2138
|
-
value:
|
|
2128
|
+
value: fe.BY_DAY
|
|
2139
2129
|
},
|
|
2140
2130
|
{
|
|
2141
2131
|
label: "By invoice",
|
|
2142
|
-
value:
|
|
2132
|
+
value: fe.BY_INVOICE
|
|
2143
2133
|
},
|
|
2144
2134
|
{
|
|
2145
2135
|
label: "By day and category",
|
|
2146
|
-
value:
|
|
2136
|
+
value: fe.BY_DAY_CATEGORY
|
|
2147
2137
|
}
|
|
2148
2138
|
];
|
|
2149
2139
|
function r({
|
|
@@ -2153,36 +2143,36 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2153
2143
|
var v, s;
|
|
2154
2144
|
(s = (v = e.value) == null ? void 0 : v.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
|
|
2155
2145
|
}
|
|
2156
|
-
function
|
|
2146
|
+
function x(l) {
|
|
2157
2147
|
return {
|
|
2158
2148
|
key: { placeholder: l, editable: !1 },
|
|
2159
2149
|
account: { placeholder: l, editable: !0 }
|
|
2160
2150
|
};
|
|
2161
2151
|
}
|
|
2162
|
-
async function
|
|
2163
|
-
await
|
|
2152
|
+
async function $() {
|
|
2153
|
+
await _(async () => {
|
|
2164
2154
|
try {
|
|
2165
|
-
await
|
|
2155
|
+
await Ve(e.value._id), await V.getSettings();
|
|
2166
2156
|
} catch (l) {
|
|
2167
2157
|
n.open({ type: "error", message: l.message });
|
|
2168
2158
|
}
|
|
2169
2159
|
});
|
|
2170
2160
|
}
|
|
2171
2161
|
return (l, a) => {
|
|
2172
|
-
var
|
|
2173
|
-
const v =
|
|
2174
|
-
return (
|
|
2175
|
-
t("div",
|
|
2176
|
-
t("div",
|
|
2162
|
+
var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se;
|
|
2163
|
+
const v = S("FmIcon"), s = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
|
|
2164
|
+
return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), C("div", Sa, [
|
|
2165
|
+
t("div", Ca, [
|
|
2166
|
+
t("div", Fa, [
|
|
2177
2167
|
a[15] || (a[15] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
2178
|
-
t("div",
|
|
2179
|
-
t("div",
|
|
2168
|
+
t("div", Da, [
|
|
2169
|
+
t("div", Ua, [
|
|
2180
2170
|
i(v, {
|
|
2181
2171
|
name: "refresh",
|
|
2182
2172
|
class: "p-2 bg-gray-100 rounded-full",
|
|
2183
|
-
onClick:
|
|
2173
|
+
onClick: $
|
|
2184
2174
|
}),
|
|
2185
|
-
t("span",
|
|
2175
|
+
t("span", Ta, T(f(o)("report.integration.sql.refreshTooltip")), 1)
|
|
2186
2176
|
]),
|
|
2187
2177
|
i(s, {
|
|
2188
2178
|
variant: "tertiary",
|
|
@@ -2192,41 +2182,41 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2192
2182
|
i(s, {
|
|
2193
2183
|
variant: "primary",
|
|
2194
2184
|
label: f(o)("report.common.update"),
|
|
2195
|
-
onClick:
|
|
2185
|
+
onClick: k
|
|
2196
2186
|
}, null, 8, ["label"])
|
|
2197
2187
|
])
|
|
2198
2188
|
])
|
|
2199
2189
|
]),
|
|
2200
|
-
i(
|
|
2201
|
-
t("div",
|
|
2202
|
-
t("div",
|
|
2203
|
-
t("div",
|
|
2204
|
-
t("div",
|
|
2205
|
-
t("div",
|
|
2206
|
-
t("div",
|
|
2207
|
-
i(
|
|
2190
|
+
i(A, { style: { margin: 0 } }),
|
|
2191
|
+
t("div", Ia, [
|
|
2192
|
+
t("div", Ma, [
|
|
2193
|
+
t("div", Ka, T(f(o)("report.integration.sql.general")), 1),
|
|
2194
|
+
t("div", Aa, [
|
|
2195
|
+
t("div", Pa, T(f(o)("report.common.name")), 1),
|
|
2196
|
+
t("div", Na, [
|
|
2197
|
+
i(P, {
|
|
2208
2198
|
modelValue: e.value.name,
|
|
2209
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
2199
|
+
"onUpdate:modelValue": a[0] || (a[0] = (D) => e.value.name = D)
|
|
2210
2200
|
}, null, 8, ["modelValue"])
|
|
2211
2201
|
])
|
|
2212
2202
|
]),
|
|
2213
|
-
t("div",
|
|
2214
|
-
t("div",
|
|
2215
|
-
i(
|
|
2203
|
+
t("div", Ra, [
|
|
2204
|
+
t("div", Oa, T(f(o)("report.integration.location")), 1),
|
|
2205
|
+
i(Q, {
|
|
2216
2206
|
modelValue: e.value.platform.locationIds,
|
|
2217
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
2207
|
+
"onUpdate:modelValue": a[1] || (a[1] = (D) => e.value.platform.locationIds = D),
|
|
2218
2208
|
multiselect: !0,
|
|
2219
2209
|
items: m.value,
|
|
2220
2210
|
placeholder: "Select location",
|
|
2221
2211
|
class: "flex-grow",
|
|
2222
|
-
rules: [(
|
|
2212
|
+
rules: [(D) => D.length !== 0 || "Please select at least 1 location"]
|
|
2223
2213
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
2224
2214
|
]),
|
|
2225
|
-
t("div",
|
|
2226
|
-
t("div",
|
|
2227
|
-
i(
|
|
2215
|
+
t("div", Ba, [
|
|
2216
|
+
t("div", ja, T(f(o)("report.integration.grouping")), 1),
|
|
2217
|
+
i(Q, {
|
|
2228
2218
|
modelValue: e.value.platform.grouping,
|
|
2229
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
2219
|
+
"onUpdate:modelValue": a[2] || (a[2] = (D) => e.value.platform.grouping = D),
|
|
2230
2220
|
multiselect: !1,
|
|
2231
2221
|
items: p,
|
|
2232
2222
|
placeholder: "Select grouping",
|
|
@@ -2234,64 +2224,64 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2234
2224
|
}, null, 8, ["modelValue"])
|
|
2235
2225
|
])
|
|
2236
2226
|
]),
|
|
2237
|
-
t("div",
|
|
2238
|
-
t("div",
|
|
2239
|
-
i(
|
|
2227
|
+
t("div", La, [
|
|
2228
|
+
t("div", Ea, [
|
|
2229
|
+
i(K, {
|
|
2240
2230
|
"model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
|
|
2241
|
-
options:
|
|
2242
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
2231
|
+
options: x("Debtor"),
|
|
2232
|
+
"onUpdate:modelValue": a[3] || (a[3] = (D) => r({ key: "debtor", value: D.account }))
|
|
2243
2233
|
}, null, 8, ["model-value", "options"]),
|
|
2244
|
-
i(
|
|
2234
|
+
i(K, {
|
|
2245
2235
|
"model-value": {
|
|
2246
2236
|
key: "Invoice no",
|
|
2247
2237
|
account: e.value.platform.mappings.invoiceDocNo
|
|
2248
2238
|
},
|
|
2249
|
-
options:
|
|
2250
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
2239
|
+
options: x("Invoice no"),
|
|
2240
|
+
"onUpdate:modelValue": a[4] || (a[4] = (D) => r({ key: "invoiceDocNo", value: D.account }))
|
|
2251
2241
|
}, null, 8, ["model-value", "options"]),
|
|
2252
|
-
i(
|
|
2242
|
+
i(K, {
|
|
2253
2243
|
"model-value": {
|
|
2254
2244
|
key: "Credit note no",
|
|
2255
2245
|
account: e.value.platform.mappings.creditNoteDocNo
|
|
2256
2246
|
},
|
|
2257
|
-
options:
|
|
2258
|
-
"onUpdate:modelValue": a[5] || (a[5] = (
|
|
2247
|
+
options: x("Credit note no"),
|
|
2248
|
+
"onUpdate:modelValue": a[5] || (a[5] = (D) => r({ key: "creditNoteDocNo", value: D.account }))
|
|
2259
2249
|
}, null, 8, ["model-value", "options"]),
|
|
2260
|
-
i(
|
|
2250
|
+
i(K, {
|
|
2261
2251
|
"model-value": {
|
|
2262
2252
|
key: "Payment no",
|
|
2263
2253
|
account: e.value.platform.mappings.paymentDocNo
|
|
2264
2254
|
},
|
|
2265
|
-
options:
|
|
2266
|
-
"onUpdate:modelValue": a[6] || (a[6] = (
|
|
2255
|
+
options: x("Payment no"),
|
|
2256
|
+
"onUpdate:modelValue": a[6] || (a[6] = (D) => r({ key: "paymentDocNo", value: D.account }))
|
|
2267
2257
|
}, null, 8, ["model-value", "options"]),
|
|
2268
|
-
i(
|
|
2258
|
+
i(K, {
|
|
2269
2259
|
"model-value": {
|
|
2270
2260
|
key: "Refund no",
|
|
2271
2261
|
account: e.value.platform.mappings.refundDocNo
|
|
2272
2262
|
},
|
|
2273
|
-
options:
|
|
2274
|
-
"onUpdate:modelValue": a[7] || (a[7] = (
|
|
2263
|
+
options: x("Refund no"),
|
|
2264
|
+
"onUpdate:modelValue": a[7] || (a[7] = (D) => r({ key: "refundDocNo", value: D.account }))
|
|
2275
2265
|
}, null, 8, ["model-value", "options"]),
|
|
2276
|
-
i(
|
|
2266
|
+
i(K, {
|
|
2277
2267
|
"model-value": {
|
|
2278
2268
|
key: "Project header",
|
|
2279
2269
|
account: e.value.platform.mappings.projectHeader
|
|
2280
2270
|
},
|
|
2281
|
-
options:
|
|
2282
|
-
"onUpdate:modelValue": a[8] || (a[8] = (
|
|
2271
|
+
options: x("Project header"),
|
|
2272
|
+
"onUpdate:modelValue": a[8] || (a[8] = (D) => r({ key: "projectHeader", value: D.account }))
|
|
2283
2273
|
}, null, 8, ["model-value", "options"]),
|
|
2284
|
-
i(
|
|
2274
|
+
i(K, {
|
|
2285
2275
|
"model-value": {
|
|
2286
2276
|
key: "Project detail",
|
|
2287
2277
|
account: e.value.platform.mappings.projectDetail
|
|
2288
2278
|
},
|
|
2289
|
-
options:
|
|
2290
|
-
"onUpdate:modelValue": a[9] || (a[9] = (
|
|
2279
|
+
options: x("Project detail"),
|
|
2280
|
+
"onUpdate:modelValue": a[9] || (a[9] = (D) => r({ key: "projectDetail", value: D.account }))
|
|
2291
2281
|
}, null, 8, ["model-value", "options"])
|
|
2292
2282
|
]),
|
|
2293
|
-
t("div",
|
|
2294
|
-
i(
|
|
2283
|
+
t("div", za, [
|
|
2284
|
+
i(K, {
|
|
2295
2285
|
"model-value": {
|
|
2296
2286
|
key: "Rounding",
|
|
2297
2287
|
account: e.value.platform.mappings.rounding.account,
|
|
@@ -2302,15 +2292,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2302
2292
|
account: { placeholder: "Account code", editable: !0 },
|
|
2303
2293
|
code: { placeholder: "Item code", editable: !0 }
|
|
2304
2294
|
},
|
|
2305
|
-
"onUpdate:modelValue": a[10] || (a[10] = (
|
|
2306
|
-
var
|
|
2307
|
-
(
|
|
2295
|
+
"onUpdate:modelValue": a[10] || (a[10] = (D) => {
|
|
2296
|
+
var y, U, O;
|
|
2297
|
+
(O = (U = (y = e.value) == null ? void 0 : y.platform) == null ? void 0 : U.mappings) != null && O.rounding && (e.value.platform.mappings.rounding.account = D.account, e.value.platform.mappings.rounding.code = D.code);
|
|
2308
2298
|
})
|
|
2309
2299
|
}, null, 8, ["model-value"]),
|
|
2310
|
-
(c(!0),
|
|
2311
|
-
key: `charge-${
|
|
2312
|
-
modelValue: e.value.platform.mappings.charges[
|
|
2313
|
-
"onUpdate:modelValue": (
|
|
2300
|
+
(c(!0), C(L, null, H((z = (j = (R = e.value) == null ? void 0 : R.platform) == null ? void 0 : j.mappings) == null ? void 0 : z.charges, (D, y) => (c(), M(K, {
|
|
2301
|
+
key: `charge-${y}`,
|
|
2302
|
+
modelValue: e.value.platform.mappings.charges[y],
|
|
2303
|
+
"onUpdate:modelValue": (U) => e.value.platform.mappings.charges[y] = U,
|
|
2314
2304
|
options: {
|
|
2315
2305
|
key: { placeholder: "Key", editable: !1 },
|
|
2316
2306
|
account: { placeholder: "Account code", editable: !0 },
|
|
@@ -2319,83 +2309,83 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2319
2309
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
2320
2310
|
])
|
|
2321
2311
|
]),
|
|
2322
|
-
i(
|
|
2312
|
+
i(De, {
|
|
2323
2313
|
modelValue: e.value.platform,
|
|
2324
|
-
"onUpdate:modelValue": a[11] || (a[11] = (
|
|
2314
|
+
"onUpdate:modelValue": a[11] || (a[11] = (D) => e.value.platform = D),
|
|
2325
2315
|
label: "email"
|
|
2326
2316
|
}, null, 8, ["modelValue"]),
|
|
2327
|
-
t("div",
|
|
2328
|
-
t("div",
|
|
2317
|
+
t("div", Ya, [
|
|
2318
|
+
t("div", qa, T(f(o)("report.integration.items")), 1),
|
|
2329
2319
|
i(s, {
|
|
2330
2320
|
variant: "primary",
|
|
2331
2321
|
label: f(o)("report.action.add"),
|
|
2332
2322
|
onClick: a[12] || (a[12] = () => u("items"))
|
|
2333
2323
|
}, null, 8, ["label"])
|
|
2334
2324
|
]),
|
|
2335
|
-
t("div",
|
|
2336
|
-
(c(!0),
|
|
2337
|
-
key: `item-${
|
|
2338
|
-
modelValue: e.value.platform.mappings.items[
|
|
2339
|
-
"onUpdate:modelValue": (
|
|
2325
|
+
t("div", Ha, [
|
|
2326
|
+
(c(!0), C(L, null, H((ee = (Z = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : Z.mappings) == null ? void 0 : ee.items, (D, y) => (c(), M(K, {
|
|
2327
|
+
key: `item-${y}`,
|
|
2328
|
+
modelValue: e.value.platform.mappings.items[y],
|
|
2329
|
+
"onUpdate:modelValue": (U) => e.value.platform.mappings.items[y] = U,
|
|
2340
2330
|
options: {
|
|
2341
2331
|
key: { placeholder: "Key", editable: !0 },
|
|
2342
2332
|
account: { placeholder: "Account code", editable: !0 },
|
|
2343
2333
|
code: { placeholder: "Item code", editable: !0 }
|
|
2344
2334
|
},
|
|
2345
2335
|
removable: !0,
|
|
2346
|
-
onRemove: () =>
|
|
2336
|
+
onRemove: () => b("items", y)
|
|
2347
2337
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2348
2338
|
]),
|
|
2349
|
-
t("div",
|
|
2350
|
-
t("div",
|
|
2339
|
+
t("div", Xa, [
|
|
2340
|
+
t("div", Qa, T(f(o)("report.integration.taxes")), 1),
|
|
2351
2341
|
i(s, {
|
|
2352
2342
|
variant: "primary",
|
|
2353
2343
|
icon: "add",
|
|
2354
2344
|
onClick: a[13] || (a[13] = () => u("taxes"))
|
|
2355
2345
|
})
|
|
2356
2346
|
]),
|
|
2357
|
-
t("div",
|
|
2358
|
-
(c(!0),
|
|
2359
|
-
key: `tax-${
|
|
2360
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
2361
|
-
"onUpdate:modelValue": (
|
|
2347
|
+
t("div", Ga, [
|
|
2348
|
+
(c(!0), C(L, null, H((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.taxes, (D, y) => (c(), M(K, {
|
|
2349
|
+
key: `tax-${y}`,
|
|
2350
|
+
modelValue: e.value.platform.mappings.taxes[y],
|
|
2351
|
+
"onUpdate:modelValue": (U) => e.value.platform.mappings.taxes[y] = U,
|
|
2362
2352
|
options: {
|
|
2363
2353
|
key: { placeholder: "Key", editable: !0 },
|
|
2364
2354
|
account: { placeholder: "Account code", editable: !0 }
|
|
2365
2355
|
},
|
|
2366
2356
|
removable: !0,
|
|
2367
|
-
onRemove: () =>
|
|
2357
|
+
onRemove: () => b("taxes", y)
|
|
2368
2358
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2369
2359
|
]),
|
|
2370
|
-
t("div",
|
|
2371
|
-
t("div",
|
|
2360
|
+
t("div", Ja, [
|
|
2361
|
+
t("div", Wa, T(f(o)("report.integration.payments")), 1),
|
|
2372
2362
|
i(s, {
|
|
2373
2363
|
variant: "primary",
|
|
2374
2364
|
icon: "add",
|
|
2375
2365
|
onClick: a[14] || (a[14] = () => u("payments"))
|
|
2376
2366
|
})
|
|
2377
2367
|
]),
|
|
2378
|
-
t("div",
|
|
2379
|
-
(c(!0),
|
|
2380
|
-
key: `payment-${
|
|
2381
|
-
modelValue: e.value.platform.mappings.payments[
|
|
2382
|
-
"onUpdate:modelValue": (
|
|
2368
|
+
t("div", Za, [
|
|
2369
|
+
(c(!0), C(L, null, H((se = (ne = (le = e.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.payments, (D, y) => (c(), M(K, {
|
|
2370
|
+
key: `payment-${y}`,
|
|
2371
|
+
modelValue: e.value.platform.mappings.payments[y],
|
|
2372
|
+
"onUpdate:modelValue": (U) => e.value.platform.mappings.payments[y] = U,
|
|
2383
2373
|
options: {
|
|
2384
2374
|
key: { placeholder: "Key", editable: !0 },
|
|
2385
2375
|
account: { placeholder: "Method", editable: !0 }
|
|
2386
2376
|
},
|
|
2387
2377
|
removable: !0,
|
|
2388
|
-
onRemove: () =>
|
|
2378
|
+
onRemove: () => b("payments", y)
|
|
2389
2379
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2390
2380
|
])
|
|
2391
2381
|
])
|
|
2392
|
-
])) :
|
|
2382
|
+
])) : N("", !0);
|
|
2393
2383
|
};
|
|
2394
2384
|
}
|
|
2395
|
-
}),
|
|
2385
|
+
}), tl = { class: "h-full flex flex-col gap-16" }, ol = { class: "flex flex-row gap-2 justify-between items-center" }, al = {
|
|
2396
2386
|
key: 0,
|
|
2397
2387
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
2398
|
-
},
|
|
2388
|
+
}, ll = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, nl = /* @__PURE__ */ q({
|
|
2399
2389
|
__name: "Preview",
|
|
2400
2390
|
props: {
|
|
2401
2391
|
modelValue: { required: !0 },
|
|
@@ -2403,26 +2393,26 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2403
2393
|
},
|
|
2404
2394
|
emits: ["update:modelValue"],
|
|
2405
2395
|
setup(g) {
|
|
2406
|
-
const { t: o } =
|
|
2407
|
-
() => e.value.reduce((d,
|
|
2408
|
-
const
|
|
2409
|
-
d[
|
|
2396
|
+
const { t: o } = J(), e = B([]), n = Y(
|
|
2397
|
+
() => e.value.reduce((d, k) => {
|
|
2398
|
+
const b = d.length, { invoice: u, payments: p } = k;
|
|
2399
|
+
d[b] = {
|
|
2410
2400
|
date: u.DocDate,
|
|
2411
2401
|
docNo: u.DocNo,
|
|
2412
2402
|
debtor: u.Code,
|
|
2413
2403
|
description: u.Description_HDR
|
|
2414
2404
|
};
|
|
2415
2405
|
for (let r = 0; r < Math.max(u._items.length, p.length); r++) {
|
|
2416
|
-
const
|
|
2417
|
-
d[
|
|
2418
|
-
...d[
|
|
2406
|
+
const x = b + r;
|
|
2407
|
+
d[x] || (d[x] = {}), u._items[r] && (d[x] = {
|
|
2408
|
+
...d[x],
|
|
2419
2409
|
itemDescription: u._items[r].Description_DTL,
|
|
2420
2410
|
itemUnitPrice: u._items[r].UnitPrice,
|
|
2421
2411
|
itemAccount: u._items[r].ACCOUNT,
|
|
2422
2412
|
itemTaxCode: u._items[r].Tax,
|
|
2423
2413
|
itemTax: u._items[r].TaxAmt
|
|
2424
|
-
}), p[r] && (d[
|
|
2425
|
-
...d[
|
|
2414
|
+
}), p[r] && (d[x] = {
|
|
2415
|
+
...d[x],
|
|
2426
2416
|
paymentDocNo: p[r].DOCNO_Header,
|
|
2427
2417
|
paymentMethod: p[r].PAYMENTMETHOD,
|
|
2428
2418
|
paymentAccount: p[r].CODE,
|
|
@@ -2432,7 +2422,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2432
2422
|
}
|
|
2433
2423
|
return d;
|
|
2434
2424
|
}, [])
|
|
2435
|
-
),
|
|
2425
|
+
), V = [
|
|
2436
2426
|
{
|
|
2437
2427
|
accessorKey: "date",
|
|
2438
2428
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -2498,17 +2488,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2498
2488
|
header: "Payment Amount",
|
|
2499
2489
|
enableSorting: !1
|
|
2500
2490
|
}
|
|
2501
|
-
],
|
|
2502
|
-
|
|
2503
|
-
() =>
|
|
2491
|
+
], w = X(g, "modelValue"), _ = B(!1), F = ue(), { dateRange: h } = Ce(pe());
|
|
2492
|
+
ve(
|
|
2493
|
+
() => h.value,
|
|
2504
2494
|
async () => {
|
|
2505
|
-
if (
|
|
2495
|
+
if (w.value._id)
|
|
2506
2496
|
try {
|
|
2507
|
-
|
|
2497
|
+
_.value = !0, e.value = await $e(w.value._id);
|
|
2508
2498
|
} catch (d) {
|
|
2509
|
-
|
|
2499
|
+
F.open({ message: d.message, type: "error" });
|
|
2510
2500
|
} finally {
|
|
2511
|
-
|
|
2501
|
+
_.value = !1;
|
|
2512
2502
|
}
|
|
2513
2503
|
},
|
|
2514
2504
|
{
|
|
@@ -2517,42 +2507,42 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2517
2507
|
);
|
|
2518
2508
|
async function m() {
|
|
2519
2509
|
try {
|
|
2520
|
-
|
|
2510
|
+
w.value._id ? (_.value = !0, await Pe(w.value._id)) : F.open({ message: "Invalid accounting setting", type: "error" });
|
|
2521
2511
|
} catch (d) {
|
|
2522
|
-
|
|
2512
|
+
F.open({ message: d.message, type: "error" });
|
|
2523
2513
|
} finally {
|
|
2524
|
-
|
|
2514
|
+
_.value = !1;
|
|
2525
2515
|
}
|
|
2526
2516
|
}
|
|
2527
|
-
return (d,
|
|
2528
|
-
const
|
|
2529
|
-
return c(),
|
|
2530
|
-
t("div",
|
|
2531
|
-
i(
|
|
2532
|
-
"date-range": f(
|
|
2533
|
-
"onUpdate:dateRange":
|
|
2517
|
+
return (d, k) => {
|
|
2518
|
+
const b = S("FmButton"), u = S("FmCircularProgress"), p = S("FmTable");
|
|
2519
|
+
return c(), C("div", tl, [
|
|
2520
|
+
t("div", ol, [
|
|
2521
|
+
i(Fe, {
|
|
2522
|
+
"date-range": f(h),
|
|
2523
|
+
"onUpdate:dateRange": k[0] || (k[0] = (r) => be(h) ? h.value = r : null),
|
|
2534
2524
|
compare: !1
|
|
2535
2525
|
}, null, 8, ["date-range"]),
|
|
2536
|
-
i(
|
|
2537
|
-
loading:
|
|
2526
|
+
i(b, {
|
|
2527
|
+
loading: _.value,
|
|
2538
2528
|
variant: "primary",
|
|
2539
2529
|
label: f(o)("report.common.download"),
|
|
2540
2530
|
onClick: m
|
|
2541
2531
|
}, null, 8, ["loading", "label"])
|
|
2542
2532
|
]),
|
|
2543
|
-
|
|
2533
|
+
_.value ? (c(), C("div", al, [
|
|
2544
2534
|
i(u, { size: "xl" }),
|
|
2545
|
-
t("span",
|
|
2546
|
-
])) : n.value.length > 0 ? (c(),
|
|
2535
|
+
t("span", ll, T(f(o)("report.common.isLoading")), 1)
|
|
2536
|
+
])) : n.value.length > 0 ? (c(), M(p, {
|
|
2547
2537
|
key: 1,
|
|
2548
2538
|
class: "flex overflow-scroll",
|
|
2549
2539
|
"row-data": n.value,
|
|
2550
|
-
"column-defs":
|
|
2551
|
-
}, null, 8, ["row-data"])) :
|
|
2540
|
+
"column-defs": V
|
|
2541
|
+
}, null, 8, ["row-data"])) : N("", !0)
|
|
2552
2542
|
]);
|
|
2553
2543
|
};
|
|
2554
2544
|
}
|
|
2555
|
-
}),
|
|
2545
|
+
}), sl = { class: "h-full relative flex flex-col" }, il = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, rl = /* @__PURE__ */ q({
|
|
2556
2546
|
__name: "SQL",
|
|
2557
2547
|
props: {
|
|
2558
2548
|
modelValue: {},
|
|
@@ -2560,7 +2550,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2560
2550
|
},
|
|
2561
2551
|
emits: ["update:modelValue"],
|
|
2562
2552
|
setup(g) {
|
|
2563
|
-
const { t: o } =
|
|
2553
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = [
|
|
2564
2554
|
{
|
|
2565
2555
|
label: o("report.integration.setting"),
|
|
2566
2556
|
value: "setting",
|
|
@@ -2571,66 +2561,66 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2571
2561
|
value: "preview",
|
|
2572
2562
|
icon: "table"
|
|
2573
2563
|
}
|
|
2574
|
-
],
|
|
2564
|
+
], w = de(), _ = Y(() => {
|
|
2575
2565
|
switch (n.value) {
|
|
2576
2566
|
case "preview":
|
|
2577
|
-
return
|
|
2567
|
+
return nl;
|
|
2578
2568
|
case "setting":
|
|
2579
|
-
return
|
|
2569
|
+
return el;
|
|
2580
2570
|
default:
|
|
2581
2571
|
return null;
|
|
2582
2572
|
}
|
|
2583
2573
|
});
|
|
2584
|
-
return (
|
|
2585
|
-
var
|
|
2586
|
-
const m =
|
|
2587
|
-
return c(),
|
|
2574
|
+
return (F, h) => {
|
|
2575
|
+
var k;
|
|
2576
|
+
const m = S("FmPageHead"), d = S("FmTabs");
|
|
2577
|
+
return c(), C("div", sl, [
|
|
2588
2578
|
i(m, {
|
|
2589
|
-
title: ((
|
|
2579
|
+
title: ((k = e.value) == null ? void 0 : k.name) || "SQL",
|
|
2590
2580
|
"back-button": !0,
|
|
2591
2581
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2592
|
-
"onClick:back": f(
|
|
2582
|
+
"onClick:back": f(w).back
|
|
2593
2583
|
}, {
|
|
2594
|
-
description:
|
|
2584
|
+
description: ge(() => h[2] || (h[2] = [
|
|
2595
2585
|
t("div", null, null, -1)
|
|
2596
2586
|
])),
|
|
2597
2587
|
_: 1
|
|
2598
2588
|
}, 8, ["title", "onClick:back"]),
|
|
2599
2589
|
i(d, {
|
|
2600
2590
|
"model-value": n.value,
|
|
2601
|
-
"onUpdate:modelValue":
|
|
2602
|
-
items:
|
|
2591
|
+
"onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
|
|
2592
|
+
items: V
|
|
2603
2593
|
}, null, 8, ["model-value"]),
|
|
2604
|
-
t("div",
|
|
2605
|
-
(c(),
|
|
2594
|
+
t("div", il, [
|
|
2595
|
+
(c(), M(xe(_.value), {
|
|
2606
2596
|
modelValue: e.value,
|
|
2607
|
-
"onUpdate:modelValue":
|
|
2597
|
+
"onUpdate:modelValue": h[1] || (h[1] = (b) => e.value = b)
|
|
2608
2598
|
}, null, 8, ["modelValue"]))
|
|
2609
2599
|
])
|
|
2610
2600
|
]);
|
|
2611
2601
|
};
|
|
2612
2602
|
}
|
|
2613
|
-
}),
|
|
2603
|
+
}), ml = {
|
|
2614
2604
|
key: 0,
|
|
2615
2605
|
class: "flex flex-col h-full"
|
|
2616
|
-
},
|
|
2606
|
+
}, cl = { class: "flex flex-col gap-16 pb-[24px]" }, dl = { class: "flex flex-row justify-between items-center gap-2" }, pl = { class: "fm-typo-en-title-sm-800" }, ul = { class: "flex flex-row gap-2 items-center" }, fl = { class: "flex flex-row gap-2 items-center" }, vl = { class: "relative group cursor-pointer" }, gl = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, yl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, xl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _l = { class: "flex flex-row items-center max-w-[100%]" }, bl = { class: "w-[25%]" }, wl = { class: "flex-grow" }, hl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, kl = { class: "flex flex-row items-center justify-between" }, Vl = { class: "w-[25%]" }, $l = { class: "flex-grow" }, Sl = { class: "flex flex-row items-center justify-between" }, Cl = { class: "w-[25%]" }, Fl = { class: "flex-grow" }, Dl = { class: "flex flex-col gap-16" }, Ul = { class: "fm-typo-en-title-sm-800" }, Tl = { class: "flex flex-row items-center max-w-[100%]" }, Il = { class: "w-[25%]" }, Ml = { class: "flex-grow" }, Kl = { class: "flex flex-row items-center max-w-[100%]" }, Al = { class: "w-[25%]" }, Pl = { class: "flex flex-row items-center max-w-[100%]" }, Nl = { class: "w-[25%]" }, Rl = {
|
|
2617
2607
|
key: 0,
|
|
2618
2608
|
class: "flex flex-row items-center max-w-[100%]"
|
|
2619
|
-
},
|
|
2609
|
+
}, Ol = { class: "flex flex-col gap-16" }, Bl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, jl = { key: 1 }, Ll = { class: "flex flex-row items-center gap-x-16" }, El = { class: "fm-typo-en-title-sm-800" }, zl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Yl = { class: "flex flex-row items-center gap-x-16" }, ql = { class: "fm-typo-en-title-sm-800" }, Hl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Xl = { class: "flex flex-row items-center gap-x-16" }, Ql = { class: "fm-typo-en-title-sm-800" }, Gl = { class: "flex flex-row items-center justify-between" }, Jl = { class: "flex-grow" }, Wl = {
|
|
2620
2610
|
key: 0,
|
|
2621
2611
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2622
|
-
},
|
|
2612
|
+
}, Zl = {
|
|
2623
2613
|
key: 1,
|
|
2624
2614
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2625
|
-
},
|
|
2615
|
+
}, en = {
|
|
2626
2616
|
key: 3,
|
|
2627
2617
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2628
|
-
},
|
|
2618
|
+
}, tn = {
|
|
2629
2619
|
key: 0,
|
|
2630
2620
|
class: "flex flex-row items-center"
|
|
2631
|
-
},
|
|
2621
|
+
}, on = /* @__PURE__ */ q({
|
|
2632
2622
|
__name: "Setting",
|
|
2633
|
-
props: /* @__PURE__ */
|
|
2623
|
+
props: /* @__PURE__ */ ye({
|
|
2634
2624
|
retrievedMethods: {
|
|
2635
2625
|
type: Object,
|
|
2636
2626
|
required: !0
|
|
@@ -2645,53 +2635,53 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2645
2635
|
}),
|
|
2646
2636
|
emits: ["update:modelValue"],
|
|
2647
2637
|
setup(g) {
|
|
2648
|
-
const { t: o } =
|
|
2649
|
-
() =>
|
|
2638
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = ue(), V = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
|
|
2639
|
+
() => h.map(($) => ({ label: $.name, value: $.id }))
|
|
2650
2640
|
);
|
|
2651
|
-
function d(
|
|
2641
|
+
function d($) {
|
|
2652
2642
|
var l;
|
|
2653
|
-
!((l = g.retrievedMethods) != null && l.data) || !Array.isArray(g.retrievedMethods.data) ||
|
|
2643
|
+
!((l = g.retrievedMethods) != null && l.data) || !Array.isArray(g.retrievedMethods.data) || $.forEach((a) => {
|
|
2654
2644
|
const v = g.retrievedMethods.data.find((s) => s.value == a.id);
|
|
2655
2645
|
v && (a.cnId = v.cnId);
|
|
2656
2646
|
});
|
|
2657
2647
|
}
|
|
2658
|
-
async function
|
|
2659
|
-
await
|
|
2648
|
+
async function k() {
|
|
2649
|
+
await F({
|
|
2660
2650
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
2661
2651
|
title: o("report.common.delete")
|
|
2662
|
-
}) && await
|
|
2652
|
+
}) && await _(async () => {
|
|
2663
2653
|
try {
|
|
2664
|
-
await
|
|
2654
|
+
await he(e.value._id), await V.getSettings(), w.back();
|
|
2665
2655
|
} catch (l) {
|
|
2666
2656
|
n.open({ type: "error", message: l.message });
|
|
2667
2657
|
}
|
|
2668
2658
|
});
|
|
2669
2659
|
}
|
|
2670
|
-
async function
|
|
2671
|
-
await
|
|
2672
|
-
var
|
|
2660
|
+
async function b() {
|
|
2661
|
+
await _(async () => {
|
|
2662
|
+
var $, l, a;
|
|
2673
2663
|
try {
|
|
2674
|
-
(a = (l = (
|
|
2664
|
+
(a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && d(e.value.platform.mappings.paymentMethods), await ke(e.value._id, e.value), await V.getSettings();
|
|
2675
2665
|
} catch (v) {
|
|
2676
2666
|
n.open({ type: "error", message: v.message });
|
|
2677
2667
|
}
|
|
2678
2668
|
});
|
|
2679
2669
|
}
|
|
2680
|
-
function u(
|
|
2670
|
+
function u($, l) {
|
|
2681
2671
|
var a, v;
|
|
2682
|
-
(v = (a = e.value.platform) == null ? void 0 : a.mappings) != null && v[
|
|
2683
|
-
(s,
|
|
2672
|
+
(v = (a = e.value.platform) == null ? void 0 : a.mappings) != null && v[$] && (e.value.platform.mappings[$] = e.value.platform.mappings[$].filter(
|
|
2673
|
+
(s, A) => A !== l
|
|
2684
2674
|
));
|
|
2685
2675
|
}
|
|
2686
|
-
function p(
|
|
2676
|
+
function p($) {
|
|
2687
2677
|
var l, a;
|
|
2688
|
-
(a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[
|
|
2689
|
-
...e.value.platform.mappings[
|
|
2690
|
-
|
|
2678
|
+
(a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[$] && (e.value.platform.mappings[$] = [
|
|
2679
|
+
...e.value.platform.mappings[$],
|
|
2680
|
+
$ === "items" ? {
|
|
2691
2681
|
key: "",
|
|
2692
2682
|
account: "",
|
|
2693
2683
|
description: ""
|
|
2694
|
-
} :
|
|
2684
|
+
} : $ === "taxes" ? {
|
|
2695
2685
|
key: "",
|
|
2696
2686
|
account: "SST-"
|
|
2697
2687
|
} : {
|
|
@@ -2703,17 +2693,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2703
2693
|
const r = [
|
|
2704
2694
|
{
|
|
2705
2695
|
label: "By day",
|
|
2706
|
-
value:
|
|
2696
|
+
value: fe.BY_DAY
|
|
2707
2697
|
}
|
|
2708
2698
|
];
|
|
2709
|
-
|
|
2699
|
+
ve(
|
|
2710
2700
|
() => {
|
|
2711
|
-
var
|
|
2712
|
-
return (a = (l = (
|
|
2701
|
+
var $, l, a;
|
|
2702
|
+
return (a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.taxes;
|
|
2713
2703
|
},
|
|
2714
|
-
(
|
|
2715
|
-
|
|
2716
|
-
var
|
|
2704
|
+
($) => {
|
|
2705
|
+
$ && $.forEach((l, a) => {
|
|
2706
|
+
var A;
|
|
2717
2707
|
const v = l.key || "";
|
|
2718
2708
|
let s = l.account;
|
|
2719
2709
|
if (!s && v) {
|
|
@@ -2728,7 +2718,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2728
2718
|
s = "SST-0";
|
|
2729
2719
|
break;
|
|
2730
2720
|
}
|
|
2731
|
-
(
|
|
2721
|
+
(A = e.value.platform) != null && A.mappings && (e.value.platform.mappings.taxes[a] = {
|
|
2732
2722
|
...l,
|
|
2733
2723
|
account: s
|
|
2734
2724
|
});
|
|
@@ -2736,68 +2726,68 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2736
2726
|
});
|
|
2737
2727
|
},
|
|
2738
2728
|
{ immediate: !0, deep: !0 }
|
|
2739
|
-
),
|
|
2729
|
+
), ve(
|
|
2740
2730
|
() => {
|
|
2741
|
-
var
|
|
2742
|
-
return (a = (l = (
|
|
2731
|
+
var $, l, a;
|
|
2732
|
+
return (a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.version;
|
|
2743
2733
|
},
|
|
2744
|
-
(
|
|
2745
|
-
var l, a, v, s,
|
|
2746
|
-
|
|
2734
|
+
($) => {
|
|
2735
|
+
var l, a, v, s, A;
|
|
2736
|
+
$ === "v1" && !((v = (a = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : a.mappings) != null && v.payee) && (A = (s = e.value) == null ? void 0 : s.platform) != null && A.mappings && (e.value.platform.mappings.payee = {
|
|
2747
2737
|
id: 1,
|
|
2748
2738
|
name: ""
|
|
2749
2739
|
});
|
|
2750
2740
|
},
|
|
2751
2741
|
{ immediate: !0 }
|
|
2752
2742
|
);
|
|
2753
|
-
async function
|
|
2754
|
-
await
|
|
2743
|
+
async function x() {
|
|
2744
|
+
await _(async () => {
|
|
2755
2745
|
try {
|
|
2756
|
-
await
|
|
2757
|
-
} catch (
|
|
2758
|
-
n.open({ type: "error", message:
|
|
2746
|
+
await Ve(e.value._id), await V.getSettings();
|
|
2747
|
+
} catch ($) {
|
|
2748
|
+
n.open({ type: "error", message: $.message });
|
|
2759
2749
|
}
|
|
2760
2750
|
});
|
|
2761
2751
|
}
|
|
2762
|
-
return (
|
|
2763
|
-
var
|
|
2764
|
-
const a =
|
|
2765
|
-
return (
|
|
2766
|
-
t("div",
|
|
2767
|
-
t("div",
|
|
2768
|
-
t("div",
|
|
2769
|
-
t("div",
|
|
2770
|
-
t("div",
|
|
2771
|
-
t("div",
|
|
2752
|
+
return ($, l) => {
|
|
2753
|
+
var G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se, D;
|
|
2754
|
+
const a = S("FmIcon"), v = S("FmButton"), s = S("FmSelect"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmCircularProgress"), E = S("FmCheckbox");
|
|
2755
|
+
return (R = (G = e.value) == null ? void 0 : G.platform) != null && R.mappings ? (c(), C("div", ml, [
|
|
2756
|
+
t("div", cl, [
|
|
2757
|
+
t("div", dl, [
|
|
2758
|
+
t("div", pl, T(f(o)("report.integration.connect")), 1),
|
|
2759
|
+
t("div", ul, [
|
|
2760
|
+
t("div", fl, [
|
|
2761
|
+
t("div", vl, [
|
|
2772
2762
|
i(a, {
|
|
2773
2763
|
name: "refresh",
|
|
2774
2764
|
class: "p-2 bg-gray-100 rounded-full",
|
|
2775
|
-
onClick:
|
|
2765
|
+
onClick: x
|
|
2776
2766
|
}),
|
|
2777
|
-
t("span",
|
|
2767
|
+
t("span", gl, T(f(o)("report.integration.biztory.refreshTooltip")), 1)
|
|
2778
2768
|
]),
|
|
2779
2769
|
i(v, {
|
|
2780
2770
|
variant: "tertiary",
|
|
2781
2771
|
label: f(o)("report.common.delete"),
|
|
2782
|
-
onClick:
|
|
2772
|
+
onClick: k
|
|
2783
2773
|
}, null, 8, ["label"]),
|
|
2784
2774
|
i(v, {
|
|
2785
2775
|
variant: "primary",
|
|
2786
2776
|
label: f(o)("report.common.update"),
|
|
2787
|
-
onClick:
|
|
2777
|
+
onClick: b
|
|
2788
2778
|
}, null, 8, ["label"])
|
|
2789
2779
|
])
|
|
2790
2780
|
])
|
|
2791
2781
|
])
|
|
2792
2782
|
]),
|
|
2793
|
-
t("div",
|
|
2794
|
-
t("div",
|
|
2795
|
-
t("div",
|
|
2796
|
-
t("div",
|
|
2797
|
-
t("div",
|
|
2783
|
+
t("div", yl, [
|
|
2784
|
+
t("div", xl, T(f(o)("report.integration.biztory.authenticate")), 1),
|
|
2785
|
+
t("div", _l, [
|
|
2786
|
+
t("div", bl, "Biztory " + T(f(o)("report.integration.biztory.version")), 1),
|
|
2787
|
+
t("div", wl, [
|
|
2798
2788
|
i(s, {
|
|
2799
2789
|
modelValue: e.value.platform.mappings.version,
|
|
2800
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
2790
|
+
"onUpdate:modelValue": l[0] || (l[0] = (y) => e.value.platform.mappings.version = y),
|
|
2801
2791
|
items: [
|
|
2802
2792
|
{ label: "v1", value: "v1" },
|
|
2803
2793
|
{ label: "v2", value: "v2" }
|
|
@@ -2806,55 +2796,55 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2806
2796
|
}, null, 8, ["modelValue"])
|
|
2807
2797
|
])
|
|
2808
2798
|
]),
|
|
2809
|
-
i(
|
|
2810
|
-
t("div",
|
|
2811
|
-
t("div",
|
|
2812
|
-
t("div",
|
|
2813
|
-
t("div",
|
|
2814
|
-
i(
|
|
2799
|
+
i(A, { style: { margin: 0 } }),
|
|
2800
|
+
t("div", hl, [
|
|
2801
|
+
t("div", kl, [
|
|
2802
|
+
t("div", Vl, T(f(o)("report.integration.biztory.subdomain")), 1),
|
|
2803
|
+
t("div", $l, [
|
|
2804
|
+
i(P, {
|
|
2815
2805
|
modelValue: e.value.platform.subdomain,
|
|
2816
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
2806
|
+
"onUpdate:modelValue": l[1] || (l[1] = (y) => e.value.platform.subdomain = y),
|
|
2817
2807
|
placeholder: "Subdomain"
|
|
2818
2808
|
}, null, 8, ["modelValue"])
|
|
2819
2809
|
])
|
|
2820
2810
|
]),
|
|
2821
|
-
t("div",
|
|
2822
|
-
t("div",
|
|
2823
|
-
t("div",
|
|
2824
|
-
i(
|
|
2811
|
+
t("div", Sl, [
|
|
2812
|
+
t("div", Cl, T(f(o)("report.integration.biztory.apiKey")), 1),
|
|
2813
|
+
t("div", Fl, [
|
|
2814
|
+
i(P, {
|
|
2825
2815
|
modelValue: e.value.platform.api_key,
|
|
2826
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
2816
|
+
"onUpdate:modelValue": l[2] || (l[2] = (y) => e.value.platform.api_key = y),
|
|
2827
2817
|
placeholder: "API Key"
|
|
2828
2818
|
}, null, 8, ["modelValue"])
|
|
2829
2819
|
])
|
|
2830
2820
|
]),
|
|
2831
|
-
t("div",
|
|
2832
|
-
t("div",
|
|
2833
|
-
t("div",
|
|
2834
|
-
t("div",
|
|
2835
|
-
t("div",
|
|
2836
|
-
i(
|
|
2821
|
+
t("div", Dl, [
|
|
2822
|
+
t("div", Ul, T(f(o)("report.integration.biztory.general")), 1),
|
|
2823
|
+
t("div", Tl, [
|
|
2824
|
+
t("div", Il, T(f(o)("report.common.name")), 1),
|
|
2825
|
+
t("div", Ml, [
|
|
2826
|
+
i(P, {
|
|
2837
2827
|
modelValue: e.value.name,
|
|
2838
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
2828
|
+
"onUpdate:modelValue": l[3] || (l[3] = (y) => e.value.name = y)
|
|
2839
2829
|
}, null, 8, ["modelValue"])
|
|
2840
2830
|
])
|
|
2841
2831
|
]),
|
|
2842
|
-
t("div",
|
|
2843
|
-
t("div",
|
|
2832
|
+
t("div", Kl, [
|
|
2833
|
+
t("div", Al, T(f(o)("report.common.location")), 1),
|
|
2844
2834
|
i(s, {
|
|
2845
2835
|
modelValue: e.value.platform.locationIds,
|
|
2846
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
2836
|
+
"onUpdate:modelValue": l[4] || (l[4] = (y) => e.value.platform.locationIds = y),
|
|
2847
2837
|
multiselect: !0,
|
|
2848
2838
|
items: m.value,
|
|
2849
2839
|
placeholder: f(o)("report.common.location"),
|
|
2850
2840
|
class: "flex-grow"
|
|
2851
2841
|
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
2852
2842
|
]),
|
|
2853
|
-
t("div",
|
|
2854
|
-
t("div",
|
|
2843
|
+
t("div", Pl, [
|
|
2844
|
+
t("div", Nl, T(f(o)("report.integration.biztory.grouping")), 1),
|
|
2855
2845
|
i(s, {
|
|
2856
2846
|
modelValue: e.value.platform.grouping,
|
|
2857
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
2847
|
+
"onUpdate:modelValue": l[5] || (l[5] = (y) => e.value.platform.grouping = y),
|
|
2858
2848
|
multiselect: !1,
|
|
2859
2849
|
items: r,
|
|
2860
2850
|
placeholder: f(o)("report.integration.biztory.grouping"),
|
|
@@ -2862,106 +2852,106 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2862
2852
|
disabled: ""
|
|
2863
2853
|
}, null, 8, ["modelValue", "placeholder"])
|
|
2864
2854
|
]),
|
|
2865
|
-
e.value.platform.mappings.version == "v1" ? (c(),
|
|
2855
|
+
e.value.platform.mappings.version == "v1" ? (c(), C("div", Rl, [
|
|
2866
2856
|
l[13] || (l[13] = t("div", { class: "w-[33%]" }, "Payee ID", -1)),
|
|
2867
|
-
e.value.platform.mappings.version == "v1" ? (c(), K
|
|
2857
|
+
e.value.platform.mappings.version == "v1" ? (c(), M(K, {
|
|
2868
2858
|
key: 0,
|
|
2869
2859
|
modelValue: e.value.platform.mappings.payee,
|
|
2870
|
-
"onUpdate:modelValue": l[6] || (l[6] = (
|
|
2860
|
+
"onUpdate:modelValue": l[6] || (l[6] = (y) => e.value.platform.mappings.payee = y),
|
|
2871
2861
|
options: {
|
|
2872
2862
|
id: { placeholder: "ID", editable: !0 }
|
|
2873
2863
|
},
|
|
2874
2864
|
removable: !1
|
|
2875
|
-
}, null, 8, ["modelValue"])) :
|
|
2876
|
-
])) :
|
|
2865
|
+
}, null, 8, ["modelValue"])) : N("", !0)
|
|
2866
|
+
])) : N("", !0)
|
|
2877
2867
|
]),
|
|
2878
|
-
t("div",
|
|
2879
|
-
t("div",
|
|
2880
|
-
!g.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (c(),
|
|
2868
|
+
t("div", Ol, [
|
|
2869
|
+
t("div", Bl, [
|
|
2870
|
+
!g.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (c(), M(Q, {
|
|
2881
2871
|
key: 0,
|
|
2882
2872
|
size: "xl"
|
|
2883
|
-
})) :
|
|
2884
|
-
g.retrievedCustomers.isLoaded && g.retrievedCustomers.data && ((j = g.retrievedCustomers.data) == null ? void 0 : j.length) != 0 ? (c(),
|
|
2885
|
-
e.value.platform.mappings.version == "v2" ? (c(),
|
|
2873
|
+
})) : N("", !0),
|
|
2874
|
+
g.retrievedCustomers.isLoaded && g.retrievedCustomers.data && ((j = g.retrievedCustomers.data) == null ? void 0 : j.length) != 0 ? (c(), C("div", jl, [
|
|
2875
|
+
e.value.platform.mappings.version == "v2" ? (c(), M(Me, {
|
|
2886
2876
|
key: 0,
|
|
2887
2877
|
modelValue: e.value.platform.mappings.payeeId,
|
|
2888
|
-
"onUpdate:modelValue": l[7] || (l[7] = (
|
|
2878
|
+
"onUpdate:modelValue": l[7] || (l[7] = (y) => e.value.platform.mappings.payeeId = y),
|
|
2889
2879
|
options: {
|
|
2890
2880
|
key: { placeholder: "Payee", editable: !1 },
|
|
2891
2881
|
customer: {
|
|
2892
2882
|
placeholder: "Select payee",
|
|
2893
2883
|
editable: !0,
|
|
2894
|
-
dropdownOptions: ((
|
|
2884
|
+
dropdownOptions: ((z = g.retrievedCustomers) == null ? void 0 : z.data) ?? []
|
|
2895
2885
|
}
|
|
2896
2886
|
},
|
|
2897
2887
|
removable: !1,
|
|
2898
2888
|
"single-value-mode": ""
|
|
2899
|
-
}, null, 8, ["modelValue", "options"])) :
|
|
2900
|
-
])) :
|
|
2889
|
+
}, null, 8, ["modelValue", "options"])) : N("", !0)
|
|
2890
|
+
])) : N("", !0)
|
|
2901
2891
|
])
|
|
2902
2892
|
]),
|
|
2903
|
-
i(
|
|
2893
|
+
i(De, {
|
|
2904
2894
|
modelValue: e.value.platform,
|
|
2905
|
-
"onUpdate:modelValue": l[8] || (l[8] = (
|
|
2895
|
+
"onUpdate:modelValue": l[8] || (l[8] = (y) => e.value.platform = y),
|
|
2906
2896
|
label: "upload",
|
|
2907
|
-
"last-upload-date": (
|
|
2897
|
+
"last-upload-date": (W = e.value.platform) == null ? void 0 : W.lastUploadDate
|
|
2908
2898
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
2909
|
-
t("div",
|
|
2910
|
-
t("div",
|
|
2899
|
+
t("div", Ll, [
|
|
2900
|
+
t("div", El, T(f(o)("report.integration.biztory.items")), 1),
|
|
2911
2901
|
i(v, {
|
|
2912
2902
|
variant: "primary",
|
|
2913
2903
|
icon: "add",
|
|
2914
2904
|
onClick: l[9] || (l[9] = () => p("items"))
|
|
2915
2905
|
})
|
|
2916
2906
|
]),
|
|
2917
|
-
t("div",
|
|
2918
|
-
(c(!0),
|
|
2919
|
-
key: `item-${
|
|
2920
|
-
modelValue: e.value.platform.mappings.items[
|
|
2921
|
-
"onUpdate:modelValue": (
|
|
2907
|
+
t("div", zl, [
|
|
2908
|
+
(c(!0), C(L, null, H((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (y, U) => (c(), M(K, {
|
|
2909
|
+
key: `item-${U}`,
|
|
2910
|
+
modelValue: e.value.platform.mappings.items[U],
|
|
2911
|
+
"onUpdate:modelValue": (O) => e.value.platform.mappings.items[U] = O,
|
|
2922
2912
|
options: {
|
|
2923
2913
|
key: { placeholder: "Key", editable: !0 },
|
|
2924
2914
|
code: { placeholder: "Account code", editable: !0 }
|
|
2925
2915
|
},
|
|
2926
2916
|
removable: !0,
|
|
2927
|
-
onRemove: () => u("items",
|
|
2917
|
+
onRemove: () => u("items", U)
|
|
2928
2918
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2929
2919
|
]),
|
|
2930
|
-
t("div",
|
|
2931
|
-
t("div",
|
|
2920
|
+
t("div", Yl, [
|
|
2921
|
+
t("div", ql, T(f(o)("report.integration.biztory.taxes")), 1),
|
|
2932
2922
|
i(v, {
|
|
2933
2923
|
variant: "primary",
|
|
2934
2924
|
icon: "add",
|
|
2935
2925
|
onClick: l[10] || (l[10] = () => p("taxes"))
|
|
2936
2926
|
})
|
|
2937
2927
|
]),
|
|
2938
|
-
t("div",
|
|
2939
|
-
(c(!0),
|
|
2940
|
-
key: `tax-${
|
|
2941
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
2942
|
-
"onUpdate:modelValue": (
|
|
2928
|
+
t("div", Hl, [
|
|
2929
|
+
(c(!0), C(L, null, H((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (y, U) => (c(), M(K, {
|
|
2930
|
+
key: `tax-${U}`,
|
|
2931
|
+
modelValue: e.value.platform.mappings.taxes[U],
|
|
2932
|
+
"onUpdate:modelValue": (O) => e.value.platform.mappings.taxes[U] = O,
|
|
2943
2933
|
options: {
|
|
2944
2934
|
key: { placeholder: "Key", editable: !0 },
|
|
2945
2935
|
account: { placeholder: "Account code", editable: !0 }
|
|
2946
2936
|
},
|
|
2947
2937
|
removable: !0,
|
|
2948
|
-
onRemove: () => u("taxes",
|
|
2938
|
+
onRemove: () => u("taxes", U)
|
|
2949
2939
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2950
2940
|
]),
|
|
2951
|
-
t("div",
|
|
2952
|
-
t("div",
|
|
2941
|
+
t("div", Xl, [
|
|
2942
|
+
t("div", Ql, T(f(o)("report.integration.biztory.payments")), 1),
|
|
2953
2943
|
i(v, {
|
|
2954
2944
|
variant: "primary",
|
|
2955
2945
|
icon: "add",
|
|
2956
2946
|
onClick: l[11] || (l[11] = () => p("paymentMethods"))
|
|
2957
2947
|
})
|
|
2958
2948
|
]),
|
|
2959
|
-
t("div",
|
|
2949
|
+
t("div", Gl, [
|
|
2960
2950
|
l[14] || (l[14] = t("div", { class: "w-[25%]" }, "Payment Term", -1)),
|
|
2961
|
-
t("div",
|
|
2962
|
-
i(
|
|
2951
|
+
t("div", Jl, [
|
|
2952
|
+
i(K, {
|
|
2963
2953
|
modelValue: e.value.platform.mappings.paymentTerm,
|
|
2964
|
-
"onUpdate:modelValue": l[12] || (l[12] = (
|
|
2954
|
+
"onUpdate:modelValue": l[12] || (l[12] = (y) => e.value.platform.mappings.paymentTerm = y),
|
|
2965
2955
|
options: {
|
|
2966
2956
|
id: { placeholder: "ID", editable: !0 },
|
|
2967
2957
|
name: { placeholder: "Name", editable: !0 }
|
|
@@ -2970,31 +2960,31 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2970
2960
|
}, null, 8, ["modelValue"])
|
|
2971
2961
|
])
|
|
2972
2962
|
]),
|
|
2973
|
-
g.retrievedMethods.isError ?
|
|
2974
|
-
g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length == 0 && !g.retrievedMethods.isError ? (c(),
|
|
2975
|
-
g.retrievedMethods.isLoaded ?
|
|
2963
|
+
g.retrievedMethods.isError ? N("", !0) : (c(), C("div", Wl, T(f(o)("report.integration.biztory.paymentTerm")), 1)),
|
|
2964
|
+
g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length == 0 && !g.retrievedMethods.isError ? (c(), C("span", Zl, T(f(o)("report.integration.biztory.noPaymentMethods")), 1)) : N("", !0),
|
|
2965
|
+
g.retrievedMethods.isLoaded ? N("", !0) : (c(), M(Q, {
|
|
2976
2966
|
key: 2,
|
|
2977
2967
|
size: "xl"
|
|
2978
2968
|
})),
|
|
2979
|
-
g.retrievedMethods.isError ? (c(),
|
|
2980
|
-
(c(!0),
|
|
2981
|
-
var
|
|
2982
|
-
return c(),
|
|
2983
|
-
key: `payment-${
|
|
2969
|
+
g.retrievedMethods.isError ? (c(), C("span", en, T(f(o)("report.integration.biztory.error")), 1)) : N("", !0),
|
|
2970
|
+
(c(!0), C(L, null, H((D = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.paymentMethods, (y, U) => {
|
|
2971
|
+
var O;
|
|
2972
|
+
return c(), C("div", {
|
|
2973
|
+
key: `payment-${U}`,
|
|
2984
2974
|
class: "grid-cols-1 grid gap-x-16"
|
|
2985
2975
|
}, [
|
|
2986
|
-
g.retrievedMethods.isLoaded && g.retrievedMethods.data && ((
|
|
2987
|
-
i(
|
|
2988
|
-
"model-value": !e.value.platform.mappings.paymentMethods[
|
|
2976
|
+
g.retrievedMethods.isLoaded && g.retrievedMethods.data && ((O = g.retrievedMethods.data) == null ? void 0 : O.length) != 0 ? (c(), C("div", tn, [
|
|
2977
|
+
i(E, {
|
|
2978
|
+
"model-value": !e.value.platform.mappings.paymentMethods[U].skip,
|
|
2989
2979
|
value: "",
|
|
2990
|
-
"onUpdate:modelValue": (
|
|
2991
|
-
var
|
|
2992
|
-
(
|
|
2980
|
+
"onUpdate:modelValue": (me) => {
|
|
2981
|
+
var Ue, Te;
|
|
2982
|
+
(Te = (Ue = e.value.platform) == null ? void 0 : Ue.mappings) != null && Te.paymentMethods[U] && (e.value.platform.mappings.paymentMethods[U].skip = !me);
|
|
2993
2983
|
}
|
|
2994
2984
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2995
2985
|
i(Me, {
|
|
2996
|
-
modelValue: e.value.platform.mappings.paymentMethods[
|
|
2997
|
-
"onUpdate:modelValue": (
|
|
2986
|
+
modelValue: e.value.platform.mappings.paymentMethods[U],
|
|
2987
|
+
"onUpdate:modelValue": (me) => e.value.platform.mappings.paymentMethods[U] = me,
|
|
2998
2988
|
options: {
|
|
2999
2989
|
key: {
|
|
3000
2990
|
placeholder: "Enter key",
|
|
@@ -3007,61 +2997,61 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3007
2997
|
}
|
|
3008
2998
|
},
|
|
3009
2999
|
removable: !0,
|
|
3010
|
-
onRemove: () => u("paymentMethods",
|
|
3000
|
+
onRemove: () => u("paymentMethods", U)
|
|
3011
3001
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"])
|
|
3012
|
-
])) :
|
|
3002
|
+
])) : N("", !0)
|
|
3013
3003
|
]);
|
|
3014
3004
|
}), 128))
|
|
3015
3005
|
])
|
|
3016
3006
|
])
|
|
3017
|
-
])) :
|
|
3007
|
+
])) : N("", !0);
|
|
3018
3008
|
};
|
|
3019
3009
|
}
|
|
3020
3010
|
});
|
|
3021
|
-
function
|
|
3011
|
+
function an(g) {
|
|
3022
3012
|
return g.reduce((o, e) => {
|
|
3023
|
-
var
|
|
3024
|
-
const { invoice: n } = e,
|
|
3025
|
-
o[
|
|
3013
|
+
var w, _, F, h, m, d, k, b, u, p, r, x, $, l, a, v, s, A, P, Q, E, G;
|
|
3014
|
+
const { invoice: n } = e, V = o.length;
|
|
3015
|
+
o[V] = {
|
|
3026
3016
|
invoice_date: n.invoice_date,
|
|
3027
3017
|
ref_num: n.ref_num,
|
|
3028
3018
|
grandTotal: n.grandTotal,
|
|
3029
3019
|
// tax_code: invoice.tax[0].tax_code,
|
|
3030
3020
|
// tax: invoice.tax.reduce((sum, tax) => sum + tax.tax, 0),
|
|
3031
3021
|
// service_charge: invoice.service_charge.total,
|
|
3032
|
-
item_code: (
|
|
3033
|
-
item_desc: (
|
|
3034
|
-
item_price: (
|
|
3035
|
-
item_tax: (
|
|
3022
|
+
item_code: (w = n.items[0]) == null ? void 0 : w.code,
|
|
3023
|
+
item_desc: (_ = n.items[0]) == null ? void 0 : _.description,
|
|
3024
|
+
item_price: (F = n.items[0]) == null ? void 0 : F.price,
|
|
3025
|
+
item_tax: (h = n.items[0]) == null ? void 0 : h.total_tax,
|
|
3036
3026
|
item_tax_label: ((m = n.items[0]) == null ? void 0 : m.tax_label) || "-",
|
|
3037
|
-
payment_amount: ((
|
|
3038
|
-
payment_method: ((u = (
|
|
3027
|
+
payment_amount: ((k = (d = n.transactions) == null ? void 0 : d[0]) == null ? void 0 : k.amount) || void 0,
|
|
3028
|
+
payment_method: ((u = (b = n.transactions) == null ? void 0 : b[0]) == null ? void 0 : u.payment_method) || "-",
|
|
3039
3029
|
payment_term: ((p = n == null ? void 0 : n.payment_term) == null ? void 0 : p.name) || ""
|
|
3040
3030
|
};
|
|
3041
|
-
for (let
|
|
3042
|
-
const j =
|
|
3031
|
+
for (let R = 1; R < Math.max(((r = n.items) == null ? void 0 : r.length) || 0, ((x = n.transactions) == null ? void 0 : x.length) || 0); R++) {
|
|
3032
|
+
const j = V + R;
|
|
3043
3033
|
o[j] || (o[j] = {});
|
|
3044
|
-
const
|
|
3045
|
-
|
|
3034
|
+
const z = n.items[R];
|
|
3035
|
+
z ? o[j] = {
|
|
3046
3036
|
...o[j],
|
|
3047
|
-
item_code:
|
|
3048
|
-
item_desc:
|
|
3049
|
-
item_price:
|
|
3050
|
-
item_tax:
|
|
3051
|
-
item_tax_label:
|
|
3052
|
-
payment_amount: ((l = (
|
|
3053
|
-
payment_method: ((v = (a = n.transactions) == null ? void 0 : a[
|
|
3037
|
+
item_code: z.code,
|
|
3038
|
+
item_desc: z.description,
|
|
3039
|
+
item_price: z.price,
|
|
3040
|
+
item_tax: z.total_tax,
|
|
3041
|
+
item_tax_label: z.tax_label || "-",
|
|
3042
|
+
payment_amount: ((l = ($ = n.transactions) == null ? void 0 : $[R]) == null ? void 0 : l.amount) || void 0,
|
|
3043
|
+
payment_method: ((v = (a = n.transactions) == null ? void 0 : a[R]) == null ? void 0 : v.payment_method) || "-",
|
|
3054
3044
|
payment_term: ((s = n == null ? void 0 : n.payment_term) == null ? void 0 : s.name) || ""
|
|
3055
3045
|
} : o[j] = {
|
|
3056
|
-
payment_amount: ((
|
|
3057
|
-
payment_method: ((
|
|
3058
|
-
payment_term: ((
|
|
3046
|
+
payment_amount: ((P = (A = n.transactions) == null ? void 0 : A[R]) == null ? void 0 : P.amount) || void 0,
|
|
3047
|
+
payment_method: ((E = (Q = n.transactions) == null ? void 0 : Q[R]) == null ? void 0 : E.payment_method) || "-",
|
|
3048
|
+
payment_term: ((G = n == null ? void 0 : n.payment_term) == null ? void 0 : G.name) || ""
|
|
3059
3049
|
};
|
|
3060
3050
|
}
|
|
3061
3051
|
return o;
|
|
3062
3052
|
}, []);
|
|
3063
3053
|
}
|
|
3064
|
-
const
|
|
3054
|
+
const ln = [
|
|
3065
3055
|
{
|
|
3066
3056
|
accessorKey: "invoice_date",
|
|
3067
3057
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -3133,34 +3123,34 @@ const nn = [
|
|
|
3133
3123
|
enableSorting: !1
|
|
3134
3124
|
}
|
|
3135
3125
|
];
|
|
3136
|
-
function
|
|
3126
|
+
function nn(g) {
|
|
3137
3127
|
return g.reduce((o, e) => {
|
|
3138
|
-
var
|
|
3139
|
-
const { invoice: n, payments:
|
|
3140
|
-
o[
|
|
3128
|
+
var F, h, m, d, k, b, u, p, r, x;
|
|
3129
|
+
const { invoice: n, payments: V } = e, w = o.length;
|
|
3130
|
+
o[w] = {
|
|
3141
3131
|
invoice_date: n.invoice_date,
|
|
3142
3132
|
ref_num: n.ref_num,
|
|
3143
3133
|
total: n.total,
|
|
3144
|
-
item_code: (
|
|
3145
|
-
item_description: (
|
|
3134
|
+
item_code: (F = n.items[0]) == null ? void 0 : F.code,
|
|
3135
|
+
item_description: (h = n.items[0]) == null ? void 0 : h.description,
|
|
3146
3136
|
item_price: (m = n.items[0]) == null ? void 0 : m.price,
|
|
3147
3137
|
item_tax_label: ((d = n.items[0]) == null ? void 0 : d.tax_label) ?? "",
|
|
3148
|
-
item_tax_amount: ((
|
|
3149
|
-
service_charge_amount: ((
|
|
3138
|
+
item_tax_amount: ((k = n.items[0]) == null ? void 0 : k.total_tax) ?? "",
|
|
3139
|
+
service_charge_amount: ((b = n.service_charges[0]) == null ? void 0 : b.total) ?? "",
|
|
3150
3140
|
rounding: n.rounding ?? 0,
|
|
3151
3141
|
payment_term_id: n.payment_term.name ?? "",
|
|
3152
|
-
payment_term_amount: ((u = n.terms[
|
|
3153
|
-
payment_method: ((p =
|
|
3142
|
+
payment_term_amount: ((u = n.terms[w]) == null ? void 0 : u.amount) ?? "",
|
|
3143
|
+
payment_method: ((p = V[0]) == null ? void 0 : p.payment_method_name) || ""
|
|
3154
3144
|
};
|
|
3155
|
-
const
|
|
3145
|
+
const _ = Math.max(
|
|
3156
3146
|
((r = n.items) == null ? void 0 : r.length) || 0,
|
|
3157
|
-
((
|
|
3158
|
-
(
|
|
3147
|
+
((x = n.terms) == null ? void 0 : x.length) || 0,
|
|
3148
|
+
(V == null ? void 0 : V.length) || 0
|
|
3159
3149
|
);
|
|
3160
|
-
for (let
|
|
3161
|
-
const l =
|
|
3150
|
+
for (let $ = 1; $ < _; $++) {
|
|
3151
|
+
const l = w + $;
|
|
3162
3152
|
o[l] || (o[l] = {});
|
|
3163
|
-
const a = n.items[
|
|
3153
|
+
const a = n.items[$], v = n.terms[$], s = V[$];
|
|
3164
3154
|
a ? o[l] = {
|
|
3165
3155
|
...o[l],
|
|
3166
3156
|
item_code: a.code,
|
|
@@ -3180,7 +3170,7 @@ function sn(g) {
|
|
|
3180
3170
|
return o;
|
|
3181
3171
|
}, []);
|
|
3182
3172
|
}
|
|
3183
|
-
const
|
|
3173
|
+
const sn = [
|
|
3184
3174
|
{
|
|
3185
3175
|
accessorKey: "invoice_date",
|
|
3186
3176
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -3246,10 +3236,10 @@ const rn = [
|
|
|
3246
3236
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Method (ID)"),
|
|
3247
3237
|
enableSorting: !1
|
|
3248
3238
|
}
|
|
3249
|
-
],
|
|
3239
|
+
], rn = { class: "h-full flex flex-col gap-16" }, mn = { class: "flex flex-row gap-2 justify-between items-center" }, cn = {
|
|
3250
3240
|
key: 0,
|
|
3251
3241
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
3252
|
-
},
|
|
3242
|
+
}, dn = /* @__PURE__ */ q({
|
|
3253
3243
|
__name: "Preview",
|
|
3254
3244
|
props: {
|
|
3255
3245
|
modelValue: { required: !0 },
|
|
@@ -3257,13 +3247,13 @@ const rn = [
|
|
|
3257
3247
|
},
|
|
3258
3248
|
emits: ["update:modelValue"],
|
|
3259
3249
|
setup(g) {
|
|
3260
|
-
const o =
|
|
3261
|
-
|
|
3262
|
-
() =>
|
|
3250
|
+
const o = X(g, "modelValue"), e = B(!1), n = ue(), { dateRange: V } = Ce(pe()), w = B([]);
|
|
3251
|
+
ve(
|
|
3252
|
+
() => V.value,
|
|
3263
3253
|
async () => {
|
|
3264
3254
|
if (o.value._id)
|
|
3265
3255
|
try {
|
|
3266
|
-
e.value = !0,
|
|
3256
|
+
e.value = !0, w.value = await $e(o.value._id);
|
|
3267
3257
|
} catch (m) {
|
|
3268
3258
|
n.open({ message: m.message, type: "error" });
|
|
3269
3259
|
} finally {
|
|
@@ -3274,24 +3264,24 @@ const rn = [
|
|
|
3274
3264
|
immediate: !0
|
|
3275
3265
|
}
|
|
3276
3266
|
);
|
|
3277
|
-
const
|
|
3267
|
+
const _ = Y(() => {
|
|
3278
3268
|
switch (o.value.platform.mappings.version) {
|
|
3279
3269
|
case "v1":
|
|
3280
|
-
return
|
|
3270
|
+
return an(w.value);
|
|
3281
3271
|
case "v2":
|
|
3282
|
-
return
|
|
3272
|
+
return nn(w.value);
|
|
3283
3273
|
}
|
|
3284
3274
|
return [];
|
|
3285
|
-
}),
|
|
3275
|
+
}), F = Y(() => {
|
|
3286
3276
|
switch (o.value.platform.mappings.version) {
|
|
3287
3277
|
case "v1":
|
|
3288
|
-
return
|
|
3278
|
+
return ln;
|
|
3289
3279
|
case "v2":
|
|
3290
|
-
return
|
|
3280
|
+
return sn;
|
|
3291
3281
|
}
|
|
3292
3282
|
return [];
|
|
3293
3283
|
});
|
|
3294
|
-
async function
|
|
3284
|
+
async function h() {
|
|
3295
3285
|
try {
|
|
3296
3286
|
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
3287
|
} catch (m) {
|
|
@@ -3301,34 +3291,34 @@ const rn = [
|
|
|
3301
3291
|
}
|
|
3302
3292
|
}
|
|
3303
3293
|
return (m, d) => {
|
|
3304
|
-
const
|
|
3305
|
-
return c(),
|
|
3306
|
-
t("div",
|
|
3307
|
-
i(
|
|
3308
|
-
"date-range": f(
|
|
3309
|
-
"onUpdate:dateRange": d[0] || (d[0] = (p) =>
|
|
3294
|
+
const k = S("FmButton"), b = S("FmCircularProgress"), u = S("FmTable");
|
|
3295
|
+
return c(), C("div", rn, [
|
|
3296
|
+
t("div", mn, [
|
|
3297
|
+
i(Fe, {
|
|
3298
|
+
"date-range": f(V),
|
|
3299
|
+
"onUpdate:dateRange": d[0] || (d[0] = (p) => be(V) ? V.value = p : null),
|
|
3310
3300
|
compare: !1
|
|
3311
3301
|
}, null, 8, ["date-range"]),
|
|
3312
|
-
i(
|
|
3302
|
+
i(k, {
|
|
3313
3303
|
loading: e.value,
|
|
3314
3304
|
variant: "primary",
|
|
3315
3305
|
label: "Upload",
|
|
3316
|
-
onClick:
|
|
3306
|
+
onClick: h
|
|
3317
3307
|
}, null, 8, ["loading"])
|
|
3318
3308
|
]),
|
|
3319
|
-
e.value ? (c(),
|
|
3320
|
-
i(
|
|
3309
|
+
e.value ? (c(), C("div", cn, [
|
|
3310
|
+
i(b, { size: "xl" }),
|
|
3321
3311
|
d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
|
|
3322
|
-
])) : (c(),
|
|
3312
|
+
])) : (c(), M(u, {
|
|
3323
3313
|
key: 1,
|
|
3324
3314
|
class: "flex overflow-scroll",
|
|
3325
|
-
"row-data":
|
|
3326
|
-
"column-defs":
|
|
3315
|
+
"row-data": _.value,
|
|
3316
|
+
"column-defs": F.value
|
|
3327
3317
|
}, null, 8, ["row-data", "column-defs"]))
|
|
3328
3318
|
]);
|
|
3329
3319
|
};
|
|
3330
3320
|
}
|
|
3331
|
-
}),
|
|
3321
|
+
}), pn = { class: "h-full relative flex flex-col" }, un = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, fn = /* @__PURE__ */ q({
|
|
3332
3322
|
__name: "Biztory",
|
|
3333
3323
|
props: {
|
|
3334
3324
|
modelValue: { required: !0 },
|
|
@@ -3336,7 +3326,7 @@ const rn = [
|
|
|
3336
3326
|
},
|
|
3337
3327
|
emits: ["update:modelValue"],
|
|
3338
3328
|
setup(g) {
|
|
3339
|
-
const { t: o } =
|
|
3329
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = [
|
|
3340
3330
|
{
|
|
3341
3331
|
label: o("report.integration.setting"),
|
|
3342
3332
|
value: "setting",
|
|
@@ -3347,86 +3337,86 @@ const rn = [
|
|
|
3347
3337
|
value: "preview",
|
|
3348
3338
|
icon: "table"
|
|
3349
3339
|
}
|
|
3350
|
-
],
|
|
3340
|
+
], w = de(), _ = Y(() => {
|
|
3351
3341
|
switch (n.value) {
|
|
3352
3342
|
case "preview":
|
|
3353
3343
|
return {
|
|
3354
|
-
component:
|
|
3344
|
+
component: dn
|
|
3355
3345
|
};
|
|
3356
3346
|
case "setting":
|
|
3357
3347
|
return {
|
|
3358
|
-
component:
|
|
3348
|
+
component: on,
|
|
3359
3349
|
props: {
|
|
3360
|
-
retrievedMethods:
|
|
3361
|
-
retrievedCustomers:
|
|
3350
|
+
retrievedMethods: F.value,
|
|
3351
|
+
retrievedCustomers: h.value
|
|
3362
3352
|
}
|
|
3363
3353
|
};
|
|
3364
3354
|
default:
|
|
3365
3355
|
return null;
|
|
3366
3356
|
}
|
|
3367
|
-
}),
|
|
3368
|
-
label: r.length > 2 ? `ID:${
|
|
3369
|
-
value:
|
|
3370
|
-
cnId:
|
|
3371
|
-
})), d = (p) => m(p, ["wallet", "name"]),
|
|
3357
|
+
}), F = B({}), h = B({}), m = (p, r) => p.map((x) => ({
|
|
3358
|
+
label: r.length > 2 ? `ID:${x[r[2]]} [${x[r[0]]}] ${x[r[1]]}` : `[${x[r[0]]}] ${x[r[1]]}`,
|
|
3359
|
+
value: x.id,
|
|
3360
|
+
cnId: x.cnId ? x.cnId : null
|
|
3361
|
+
})), d = (p) => m(p, ["wallet", "name"]), k = (p) => m(p, ["id", "name"]), b = async (p, r, x, $) => {
|
|
3372
3362
|
try {
|
|
3373
3363
|
const l = await p(e.value._id);
|
|
3374
|
-
|
|
3364
|
+
x.value.data = r(l);
|
|
3375
3365
|
} catch (l) {
|
|
3376
|
-
console.error(
|
|
3366
|
+
console.error($, l), x.value.isError = !0;
|
|
3377
3367
|
} finally {
|
|
3378
|
-
|
|
3368
|
+
x.value.isLoaded = !0;
|
|
3379
3369
|
}
|
|
3380
3370
|
}, u = async () => {
|
|
3381
3371
|
var p, r;
|
|
3382
|
-
(p = e.value.platform.mappings) != null && p.version && await
|
|
3372
|
+
(p = e.value.platform.mappings) != null && p.version && await b(
|
|
3383
3373
|
Ge,
|
|
3384
3374
|
d,
|
|
3385
|
-
|
|
3375
|
+
F,
|
|
3386
3376
|
"Failed to fetch payment methods:"
|
|
3387
|
-
), ((r = e.value.platform.mappings) == null ? void 0 : r.version) == "v2" && await
|
|
3377
|
+
), ((r = e.value.platform.mappings) == null ? void 0 : r.version) == "v2" && await b(
|
|
3388
3378
|
Je,
|
|
3379
|
+
k,
|
|
3389
3380
|
h,
|
|
3390
|
-
w,
|
|
3391
3381
|
"Failed to fetch customers:"
|
|
3392
|
-
),
|
|
3382
|
+
), F.value.isLoaded = !0, h.value.isLoaded = !0;
|
|
3393
3383
|
};
|
|
3394
|
-
return Ee(u),
|
|
3384
|
+
return Ee(u), ve(() => {
|
|
3395
3385
|
var p;
|
|
3396
3386
|
return (p = e.value.platform.mappings) == null ? void 0 : p.version;
|
|
3397
3387
|
}, u), (p, r) => {
|
|
3398
3388
|
var l, a, v;
|
|
3399
|
-
const
|
|
3400
|
-
return c(),
|
|
3401
|
-
i(
|
|
3389
|
+
const x = S("FmPageHead"), $ = S("FmTabs");
|
|
3390
|
+
return c(), C("div", pn, [
|
|
3391
|
+
i(x, {
|
|
3402
3392
|
title: ((l = e.value) == null ? void 0 : l.name) || "Biztory",
|
|
3403
3393
|
"back-button": !0,
|
|
3404
3394
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
3405
|
-
"onClick:back": f(
|
|
3395
|
+
"onClick:back": f(w).back
|
|
3406
3396
|
}, {
|
|
3407
|
-
description:
|
|
3397
|
+
description: ge(() => r[2] || (r[2] = [
|
|
3408
3398
|
t("div", null, null, -1)
|
|
3409
3399
|
])),
|
|
3410
3400
|
_: 1
|
|
3411
3401
|
}, 8, ["title", "onClick:back"]),
|
|
3412
|
-
i(
|
|
3402
|
+
i($, {
|
|
3413
3403
|
"model-value": n.value,
|
|
3414
3404
|
"onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
|
|
3415
|
-
items:
|
|
3405
|
+
items: V
|
|
3416
3406
|
}, null, 8, ["model-value"]),
|
|
3417
|
-
t("div",
|
|
3418
|
-
(c(),
|
|
3407
|
+
t("div", un, [
|
|
3408
|
+
(c(), M(xe((a = _.value) == null ? void 0 : a.component), Le({
|
|
3419
3409
|
modelValue: e.value,
|
|
3420
3410
|
"onUpdate:modelValue": r[1] || (r[1] = (s) => e.value = s)
|
|
3421
|
-
}, (v =
|
|
3411
|
+
}, (v = _.value) == null ? void 0 : v.props), null, 16, ["modelValue"]))
|
|
3422
3412
|
])
|
|
3423
3413
|
]);
|
|
3424
3414
|
};
|
|
3425
3415
|
}
|
|
3426
|
-
}),
|
|
3416
|
+
}), vn = {
|
|
3427
3417
|
key: 0,
|
|
3428
3418
|
class: "flex flex-col h-full"
|
|
3429
|
-
},
|
|
3419
|
+
}, gn = { class: "flex flex-col gap-16 pb-[24px]" }, yn = { class: "flex flex-row justify-between items-center gap-2" }, xn = { class: "flex flex-row gap-2 items-center" }, _n = { class: "relative group cursor-pointer" }, bn = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, wn = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, hn = { class: "flex flex-col gap-16" }, kn = { class: "fm-typo-en-title-sm-800" }, Vn = { class: "flex flex-row items-center max-w-[100%]" }, $n = { class: "w-[25%]" }, Sn = { class: "flex-grow" }, Cn = { class: "flex flex-row items-center max-w-[100%]" }, Fn = { class: "w-[25%]" }, Dn = { class: "flex flex-row items-center gap-x-16" }, Un = { class: "fm-typo-en-title-sm-800" }, Tn = { class: "grid-cols-1 grid gap-16" }, In = /* @__PURE__ */ q({
|
|
3430
3420
|
__name: "Setting",
|
|
3431
3421
|
props: {
|
|
3432
3422
|
modelValue: { required: !0 },
|
|
@@ -3434,39 +3424,39 @@ const rn = [
|
|
|
3434
3424
|
},
|
|
3435
3425
|
emits: ["update:modelValue"],
|
|
3436
3426
|
setup(g) {
|
|
3437
|
-
const { t: o } =
|
|
3438
|
-
() =>
|
|
3427
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = ue(), V = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = pe(), m = Y(
|
|
3428
|
+
() => h.map((r) => ({ label: r.name, value: r.id }))
|
|
3439
3429
|
);
|
|
3440
3430
|
async function d() {
|
|
3441
|
-
await
|
|
3431
|
+
await F({
|
|
3442
3432
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
3443
3433
|
title: o("report.common.delete")
|
|
3444
|
-
}) && await
|
|
3434
|
+
}) && await _(async () => {
|
|
3445
3435
|
try {
|
|
3446
|
-
await
|
|
3447
|
-
} catch (
|
|
3448
|
-
n.open({ type: "error", message:
|
|
3436
|
+
await he(e.value._id), await V.getSettings(), w.back();
|
|
3437
|
+
} catch (x) {
|
|
3438
|
+
n.open({ type: "error", message: x.message });
|
|
3449
3439
|
}
|
|
3450
3440
|
});
|
|
3451
3441
|
}
|
|
3452
|
-
async function
|
|
3453
|
-
await
|
|
3442
|
+
async function k() {
|
|
3443
|
+
await _(async () => {
|
|
3454
3444
|
try {
|
|
3455
|
-
await
|
|
3445
|
+
await ke(e.value._id, e.value), await V.getSettings();
|
|
3456
3446
|
} catch (r) {
|
|
3457
3447
|
n.open({ type: "error", message: r.message });
|
|
3458
3448
|
}
|
|
3459
3449
|
});
|
|
3460
3450
|
}
|
|
3461
|
-
function
|
|
3462
|
-
var
|
|
3463
|
-
(l = (
|
|
3464
|
-
(a, v) => v !==
|
|
3451
|
+
function b(r, x) {
|
|
3452
|
+
var $, l;
|
|
3453
|
+
(l = ($ = e.value.platform) == null ? void 0 : $.mappings) != null && l[r] && (e.value.platform.mappings[r] = e.value.platform.mappings[r].filter(
|
|
3454
|
+
(a, v) => v !== x
|
|
3465
3455
|
));
|
|
3466
3456
|
}
|
|
3467
3457
|
function u(r) {
|
|
3468
|
-
var
|
|
3469
|
-
(
|
|
3458
|
+
var x, $;
|
|
3459
|
+
($ = (x = e.value.platform) == null ? void 0 : x.mappings) != null && $[r] && (e.value.platform.mappings[r] = [
|
|
3470
3460
|
...e.value.platform.mappings[r],
|
|
3471
3461
|
{
|
|
3472
3462
|
key: "",
|
|
@@ -3477,29 +3467,29 @@ const rn = [
|
|
|
3477
3467
|
]);
|
|
3478
3468
|
}
|
|
3479
3469
|
async function p() {
|
|
3480
|
-
await
|
|
3470
|
+
await _(async () => {
|
|
3481
3471
|
try {
|
|
3482
|
-
await
|
|
3472
|
+
await Ve(e.value._id), await V.getSettings();
|
|
3483
3473
|
} catch (r) {
|
|
3484
3474
|
n.open({ type: "error", message: r.message });
|
|
3485
3475
|
}
|
|
3486
3476
|
});
|
|
3487
3477
|
}
|
|
3488
|
-
return (r,
|
|
3489
|
-
var
|
|
3490
|
-
const
|
|
3491
|
-
return (
|
|
3492
|
-
t("div",
|
|
3493
|
-
t("div",
|
|
3494
|
-
|
|
3495
|
-
t("div",
|
|
3496
|
-
t("div",
|
|
3497
|
-
i(
|
|
3478
|
+
return (r, x) => {
|
|
3479
|
+
var A, P, Q, E, G;
|
|
3480
|
+
const $ = S("FmIcon"), l = S("FmButton"), a = S("FmMenuDivider"), v = S("FmTextField"), s = S("FmSelect");
|
|
3481
|
+
return (P = (A = e.value) == null ? void 0 : A.platform) != null && P.mappings ? (c(), C("div", vn, [
|
|
3482
|
+
t("div", gn, [
|
|
3483
|
+
t("div", yn, [
|
|
3484
|
+
x[4] || (x[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
3485
|
+
t("div", xn, [
|
|
3486
|
+
t("div", _n, [
|
|
3487
|
+
i($, {
|
|
3498
3488
|
name: "refresh",
|
|
3499
3489
|
class: "p-2 bg-gray-100 rounded-full",
|
|
3500
3490
|
onClick: p
|
|
3501
3491
|
}),
|
|
3502
|
-
t("span",
|
|
3492
|
+
t("span", bn, T(f(o)("report.integration.iflexiHrms.refreshTooltip")), 1)
|
|
3503
3493
|
]),
|
|
3504
3494
|
i(l, {
|
|
3505
3495
|
variant: "tertiary",
|
|
@@ -3509,71 +3499,71 @@ const rn = [
|
|
|
3509
3499
|
i(l, {
|
|
3510
3500
|
variant: "primary",
|
|
3511
3501
|
label: f(o)("report.common.update"),
|
|
3512
|
-
onClick:
|
|
3502
|
+
onClick: k
|
|
3513
3503
|
}, null, 8, ["label"])
|
|
3514
3504
|
])
|
|
3515
3505
|
])
|
|
3516
3506
|
]),
|
|
3517
3507
|
i(a, { style: { margin: 0 } }),
|
|
3518
|
-
t("div",
|
|
3519
|
-
t("div",
|
|
3520
|
-
t("div",
|
|
3521
|
-
t("div",
|
|
3522
|
-
t("div",
|
|
3523
|
-
t("div",
|
|
3508
|
+
t("div", wn, [
|
|
3509
|
+
t("div", hn, [
|
|
3510
|
+
t("div", kn, T(f(o)("report.integration.iflexiHrms.general")), 1),
|
|
3511
|
+
t("div", Vn, [
|
|
3512
|
+
t("div", $n, T(f(o)("report.common.name")), 1),
|
|
3513
|
+
t("div", Sn, [
|
|
3524
3514
|
i(v, {
|
|
3525
3515
|
modelValue: e.value.name,
|
|
3526
|
-
"onUpdate:modelValue":
|
|
3516
|
+
"onUpdate:modelValue": x[0] || (x[0] = (R) => e.value.name = R)
|
|
3527
3517
|
}, null, 8, ["modelValue"])
|
|
3528
3518
|
])
|
|
3529
3519
|
]),
|
|
3530
|
-
t("div",
|
|
3531
|
-
t("div",
|
|
3520
|
+
t("div", Cn, [
|
|
3521
|
+
t("div", Fn, T(f(o)("report.integration.location")), 1),
|
|
3532
3522
|
i(s, {
|
|
3533
3523
|
"model-value": e.value.platform.locationIds[0],
|
|
3534
3524
|
multiselect: !1,
|
|
3535
3525
|
items: m.value,
|
|
3536
3526
|
placeholder: "Select location",
|
|
3537
3527
|
class: "flex-grow",
|
|
3538
|
-
"onUpdate:modelValue":
|
|
3528
|
+
"onUpdate:modelValue": x[1] || (x[1] = (R) => e.value.platform.locationIds[0] = R)
|
|
3539
3529
|
}, null, 8, ["model-value", "items"])
|
|
3540
3530
|
])
|
|
3541
3531
|
]),
|
|
3542
|
-
i(
|
|
3532
|
+
i(De, {
|
|
3543
3533
|
modelValue: e.value.platform,
|
|
3544
|
-
"onUpdate:modelValue":
|
|
3534
|
+
"onUpdate:modelValue": x[2] || (x[2] = (R) => e.value.platform = R),
|
|
3545
3535
|
label: f(o)("report.input.email")
|
|
3546
3536
|
}, null, 8, ["modelValue", "label"]),
|
|
3547
|
-
t("div",
|
|
3548
|
-
t("div",
|
|
3537
|
+
t("div", Dn, [
|
|
3538
|
+
t("div", Un, T(f(o)("report.integration.iflexiHrms.employee")), 1),
|
|
3549
3539
|
i(l, {
|
|
3550
3540
|
variant: "primary",
|
|
3551
3541
|
icon: "add",
|
|
3552
|
-
onClick:
|
|
3542
|
+
onClick: x[3] || (x[3] = () => u("employees"))
|
|
3553
3543
|
})
|
|
3554
3544
|
]),
|
|
3555
|
-
t("div",
|
|
3556
|
-
(c(!0),
|
|
3545
|
+
t("div", Tn, [
|
|
3546
|
+
(c(!0), C(L, null, H((G = (E = (Q = e.value) == null ? void 0 : Q.platform) == null ? void 0 : E.mappings) == null ? void 0 : G.employees, (R, j) => (c(), M(K, {
|
|
3557
3547
|
key: `employee-${j}`,
|
|
3558
3548
|
modelValue: e.value.platform.mappings.employees[j],
|
|
3559
|
-
"onUpdate:modelValue": (
|
|
3549
|
+
"onUpdate:modelValue": (z) => e.value.platform.mappings.employees[j] = z,
|
|
3560
3550
|
options: {
|
|
3561
3551
|
key: { placeholder: "Name", editable: !0 },
|
|
3562
3552
|
badgeNo: { placeholder: "Badge No", editable: !0 },
|
|
3563
3553
|
employeeNo: { placeholder: "Employee No", editable: !0 }
|
|
3564
3554
|
},
|
|
3565
3555
|
removable: !0,
|
|
3566
|
-
onRemove: () =>
|
|
3556
|
+
onRemove: () => b("employees", j)
|
|
3567
3557
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
3568
3558
|
])
|
|
3569
3559
|
])
|
|
3570
|
-
])) :
|
|
3560
|
+
])) : N("", !0);
|
|
3571
3561
|
};
|
|
3572
3562
|
}
|
|
3573
|
-
}),
|
|
3563
|
+
}), Mn = { class: "h-full flex flex-col gap-16" }, Kn = { class: "flex flex-row gap-2 justify-between items-center" }, An = {
|
|
3574
3564
|
key: 0,
|
|
3575
3565
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
3576
|
-
},
|
|
3566
|
+
}, Pn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nn = /* @__PURE__ */ q({
|
|
3577
3567
|
__name: "Preview",
|
|
3578
3568
|
props: {
|
|
3579
3569
|
modelValue: { required: !0 },
|
|
@@ -3581,7 +3571,7 @@ const rn = [
|
|
|
3581
3571
|
},
|
|
3582
3572
|
emits: ["update:modelValue"],
|
|
3583
3573
|
setup(g) {
|
|
3584
|
-
const { t: o } =
|
|
3574
|
+
const { t: o } = J(), e = B([]), n = [
|
|
3585
3575
|
{
|
|
3586
3576
|
accessorKey: "name",
|
|
3587
3577
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Name"),
|
|
@@ -3607,61 +3597,61 @@ const rn = [
|
|
|
3607
3597
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
|
|
3608
3598
|
enableSorting: !1
|
|
3609
3599
|
}
|
|
3610
|
-
],
|
|
3611
|
-
|
|
3612
|
-
() =>
|
|
3600
|
+
], V = X(g, "modelValue"), w = B(!1), _ = ue(), { dateRange: F } = Ce(pe());
|
|
3601
|
+
ve(
|
|
3602
|
+
() => F.value,
|
|
3613
3603
|
async () => {
|
|
3614
|
-
if (
|
|
3604
|
+
if (V.value._id)
|
|
3615
3605
|
try {
|
|
3616
|
-
|
|
3606
|
+
w.value = !0, e.value = await $e(V.value._id);
|
|
3617
3607
|
} catch (m) {
|
|
3618
|
-
|
|
3608
|
+
_.open({ message: m.message, type: "error" });
|
|
3619
3609
|
} finally {
|
|
3620
|
-
|
|
3610
|
+
w.value = !1;
|
|
3621
3611
|
}
|
|
3622
3612
|
},
|
|
3623
3613
|
{
|
|
3624
3614
|
immediate: !0
|
|
3625
3615
|
}
|
|
3626
3616
|
);
|
|
3627
|
-
async function
|
|
3617
|
+
async function h() {
|
|
3628
3618
|
try {
|
|
3629
|
-
|
|
3619
|
+
V.value._id ? (w.value = !0, await Pe(V.value._id)) : _.open({ message: "Invalid setting", type: "error" });
|
|
3630
3620
|
} catch (m) {
|
|
3631
|
-
|
|
3621
|
+
_.open({ message: m.message, type: "error" });
|
|
3632
3622
|
} finally {
|
|
3633
|
-
|
|
3623
|
+
w.value = !1;
|
|
3634
3624
|
}
|
|
3635
3625
|
}
|
|
3636
3626
|
return (m, d) => {
|
|
3637
|
-
const
|
|
3638
|
-
return c(),
|
|
3639
|
-
t("div",
|
|
3640
|
-
i(
|
|
3641
|
-
"date-range": f(
|
|
3642
|
-
"onUpdate:dateRange": d[0] || (d[0] = (p) =>
|
|
3627
|
+
const k = S("FmButton"), b = S("FmCircularProgress"), u = S("FmTable");
|
|
3628
|
+
return c(), C("div", Mn, [
|
|
3629
|
+
t("div", Kn, [
|
|
3630
|
+
i(Fe, {
|
|
3631
|
+
"date-range": f(F),
|
|
3632
|
+
"onUpdate:dateRange": d[0] || (d[0] = (p) => be(F) ? F.value = p : null),
|
|
3643
3633
|
compare: !1
|
|
3644
3634
|
}, null, 8, ["date-range"]),
|
|
3645
|
-
i(
|
|
3646
|
-
loading:
|
|
3635
|
+
i(k, {
|
|
3636
|
+
loading: w.value,
|
|
3647
3637
|
variant: "primary",
|
|
3648
3638
|
label: f(o)("report.common.download"),
|
|
3649
|
-
onClick:
|
|
3639
|
+
onClick: h
|
|
3650
3640
|
}, null, 8, ["loading", "label"])
|
|
3651
3641
|
]),
|
|
3652
|
-
|
|
3653
|
-
i(
|
|
3654
|
-
t("span",
|
|
3655
|
-
])) : e.value.length > 0 ? (c(),
|
|
3642
|
+
w.value ? (c(), C("div", An, [
|
|
3643
|
+
i(b, { size: "xl" }),
|
|
3644
|
+
t("span", Pn, T(f(o)("report.common.isLoading")), 1)
|
|
3645
|
+
])) : e.value.length > 0 ? (c(), M(u, {
|
|
3656
3646
|
key: 1,
|
|
3657
3647
|
class: "flex overflow-scroll",
|
|
3658
3648
|
"row-data": e.value,
|
|
3659
3649
|
"column-defs": n
|
|
3660
|
-
}, null, 8, ["row-data"])) :
|
|
3650
|
+
}, null, 8, ["row-data"])) : N("", !0)
|
|
3661
3651
|
]);
|
|
3662
3652
|
};
|
|
3663
3653
|
}
|
|
3664
|
-
}),
|
|
3654
|
+
}), Rn = { class: "h-full relative flex flex-col" }, On = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Bn = /* @__PURE__ */ q({
|
|
3665
3655
|
__name: "IFlexiHRMS",
|
|
3666
3656
|
props: {
|
|
3667
3657
|
modelValue: {},
|
|
@@ -3669,7 +3659,7 @@ const rn = [
|
|
|
3669
3659
|
},
|
|
3670
3660
|
emits: ["update:modelValue"],
|
|
3671
3661
|
setup(g) {
|
|
3672
|
-
const { t: o } =
|
|
3662
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), V = [
|
|
3673
3663
|
{
|
|
3674
3664
|
label: o("report.integration.setting"),
|
|
3675
3665
|
value: "setting",
|
|
@@ -3680,86 +3670,86 @@ const rn = [
|
|
|
3680
3670
|
value: "preview",
|
|
3681
3671
|
icon: "table"
|
|
3682
3672
|
}
|
|
3683
|
-
],
|
|
3673
|
+
], w = de(), _ = Y(() => {
|
|
3684
3674
|
switch (n.value) {
|
|
3685
3675
|
case "preview":
|
|
3686
|
-
return
|
|
3676
|
+
return Nn;
|
|
3687
3677
|
case "setting":
|
|
3688
|
-
return
|
|
3678
|
+
return In;
|
|
3689
3679
|
default:
|
|
3690
3680
|
return null;
|
|
3691
3681
|
}
|
|
3692
3682
|
});
|
|
3693
|
-
return (
|
|
3694
|
-
var
|
|
3695
|
-
const m =
|
|
3696
|
-
return c(),
|
|
3683
|
+
return (F, h) => {
|
|
3684
|
+
var k;
|
|
3685
|
+
const m = S("FmPageHead"), d = S("FmTabs");
|
|
3686
|
+
return c(), C("div", Rn, [
|
|
3697
3687
|
i(m, {
|
|
3698
|
-
title: ((
|
|
3688
|
+
title: ((k = e.value) == null ? void 0 : k.name) || "AutoCount",
|
|
3699
3689
|
"back-button": !0,
|
|
3700
3690
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
3701
|
-
"onClick:back": f(
|
|
3691
|
+
"onClick:back": f(w).back
|
|
3702
3692
|
}, {
|
|
3703
|
-
description:
|
|
3693
|
+
description: ge(() => h[2] || (h[2] = [
|
|
3704
3694
|
t("div", null, null, -1)
|
|
3705
3695
|
])),
|
|
3706
3696
|
_: 1
|
|
3707
3697
|
}, 8, ["title", "onClick:back"]),
|
|
3708
3698
|
i(d, {
|
|
3709
3699
|
"model-value": n.value,
|
|
3710
|
-
"onUpdate:modelValue":
|
|
3711
|
-
items:
|
|
3700
|
+
"onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
|
|
3701
|
+
items: V
|
|
3712
3702
|
}, null, 8, ["model-value"]),
|
|
3713
|
-
t("div",
|
|
3714
|
-
(c(),
|
|
3703
|
+
t("div", On, [
|
|
3704
|
+
(c(), M(xe(_.value), {
|
|
3715
3705
|
modelValue: e.value,
|
|
3716
|
-
"onUpdate:modelValue":
|
|
3706
|
+
"onUpdate:modelValue": h[1] || (h[1] = (b) => e.value = b)
|
|
3717
3707
|
}, null, 8, ["modelValue"]))
|
|
3718
3708
|
])
|
|
3719
3709
|
]);
|
|
3720
3710
|
};
|
|
3721
3711
|
}
|
|
3722
|
-
}),
|
|
3712
|
+
}), jn = { class: "px-24 h-full relative" }, Gn = /* @__PURE__ */ q({
|
|
3723
3713
|
__name: "Integration",
|
|
3724
3714
|
setup(g) {
|
|
3725
|
-
const o = B(void 0), { params: e } = ze(), n =
|
|
3715
|
+
const o = B(void 0), { params: e } = ze(), n = _e(), V = B();
|
|
3726
3716
|
Ee(async () => {
|
|
3727
3717
|
n.settings.length === 0 && await n.getSettings();
|
|
3728
|
-
}),
|
|
3718
|
+
}), ve(
|
|
3729
3719
|
() => n.settings,
|
|
3730
|
-
(
|
|
3731
|
-
var
|
|
3732
|
-
const
|
|
3733
|
-
|
|
3720
|
+
(_) => {
|
|
3721
|
+
var h;
|
|
3722
|
+
const F = _.find((m) => m._id === e.id);
|
|
3723
|
+
F && (V.value = F, o.value = (h = V.value.platform) == null ? void 0 : h.name);
|
|
3734
3724
|
},
|
|
3735
3725
|
{ immediate: !0 }
|
|
3736
3726
|
);
|
|
3737
|
-
const
|
|
3727
|
+
const w = Y(() => {
|
|
3738
3728
|
switch (o.value) {
|
|
3739
|
-
case
|
|
3729
|
+
case ce.Xero:
|
|
3740
3730
|
return Zt;
|
|
3741
|
-
case
|
|
3742
|
-
return
|
|
3743
|
-
case
|
|
3744
|
-
return
|
|
3745
|
-
case
|
|
3746
|
-
return
|
|
3747
|
-
case
|
|
3748
|
-
return
|
|
3749
|
-
case
|
|
3750
|
-
return
|
|
3731
|
+
case ce.Bukku:
|
|
3732
|
+
return Eo;
|
|
3733
|
+
case ce.AutoCount:
|
|
3734
|
+
return $a;
|
|
3735
|
+
case ce.SQL:
|
|
3736
|
+
return rl;
|
|
3737
|
+
case ce.iFlexi_HRMS:
|
|
3738
|
+
return Bn;
|
|
3739
|
+
case ce.Biztory:
|
|
3740
|
+
return fn;
|
|
3751
3741
|
default:
|
|
3752
3742
|
return null;
|
|
3753
3743
|
}
|
|
3754
3744
|
});
|
|
3755
|
-
return (
|
|
3756
|
-
(c(),
|
|
3757
|
-
modelValue:
|
|
3758
|
-
"onUpdate:modelValue":
|
|
3745
|
+
return (_, F) => (c(), C("div", jn, [
|
|
3746
|
+
(c(), M(xe(w.value), {
|
|
3747
|
+
modelValue: V.value,
|
|
3748
|
+
"onUpdate:modelValue": F[0] || (F[0] = (h) => V.value = h)
|
|
3759
3749
|
}, null, 8, ["modelValue"]))
|
|
3760
3750
|
]));
|
|
3761
3751
|
}
|
|
3762
3752
|
});
|
|
3763
3753
|
export {
|
|
3764
|
-
|
|
3754
|
+
Gn as default
|
|
3765
3755
|
};
|