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