@feedmepos/mf-report 5.4.34 → 5.4.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as q, mergeModels as ye, useModel as X, computed as Y, resolveComponent as S, createElementBlock as C, openBlock as c, createElementVNode as t, createCommentVNode as N, normalizeClass as Ke, Fragment as L, renderList as H, createBlock as M, createVNode as i, withCtx as ge, toDisplayString as T, unref as
|
|
1
|
+
import { defineComponent as q, mergeModels as ye, useModel as X, computed as Y, resolveComponent as S, createElementBlock as C, openBlock as c, createElementVNode as t, createCommentVNode as N, normalizeClass as Ke, Fragment as L, renderList as H, createBlock as M, createVNode as i, withCtx as ge, toDisplayString as T, unref as v, ref as B, watch as ve, isRef as be, h as I, resolveDynamicComponent as xe, mergeProps as Le, onMounted as Ee } from "vue";
|
|
2
2
|
import { useRouter as de, useRoute as ze } from "vue-router";
|
|
3
|
-
import { u as J, I as ce, d as je, e as _e, f as we, b as
|
|
3
|
+
import { u as J, I as ce, d as je, e as _e, f as we, b as ue, 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-KvOGLx9k.js";
|
|
4
4
|
import { u as Se } from "./message-dialog-UoMWOnil.js";
|
|
5
|
-
import { useSnackbar as
|
|
5
|
+
import { useSnackbar as pe } from "@feedmepos/ui-library";
|
|
6
6
|
import { s as We } from "./index-CDf9QIwq.js";
|
|
7
7
|
import { storeToRefs as Ce } from "pinia";
|
|
8
8
|
import { _ as Fe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-wgBB4qb8.js";
|
|
@@ -34,7 +34,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
34
34
|
}),
|
|
35
35
|
emits: /* @__PURE__ */ ye(["remove"], ["update:modelValue"]),
|
|
36
36
|
setup(g, { emit: o }) {
|
|
37
|
-
const e = X(g, "modelValue"), n = g,
|
|
37
|
+
const e = X(g, "modelValue"), n = g, k = Y(
|
|
38
38
|
() => Object.keys(n.options).map((_) => {
|
|
39
39
|
const F = n.options[_];
|
|
40
40
|
return {
|
|
@@ -50,35 +50,35 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
50
50
|
t("div", {
|
|
51
51
|
class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
52
52
|
}, [
|
|
53
|
-
(c(!0), C(L, null, H(
|
|
53
|
+
(c(!0), C(L, null, H(k.value, (V) => {
|
|
54
54
|
var b;
|
|
55
55
|
return c(), C(L, {
|
|
56
|
-
key:
|
|
56
|
+
key: V.key
|
|
57
57
|
}, [
|
|
58
|
-
|
|
58
|
+
V.editable ? (c(), C("div", {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: Ke(`${g.removable ? "w-[50%]" : "w-[100%]"}`)
|
|
61
61
|
}, [
|
|
62
62
|
i(h, {
|
|
63
|
-
"model-value": e.value[
|
|
64
|
-
placeholder:
|
|
63
|
+
"model-value": e.value[V.key],
|
|
64
|
+
placeholder: V.placeholder,
|
|
65
65
|
type: g.type,
|
|
66
66
|
rules: g.rules,
|
|
67
|
-
"onUpdate:modelValue": (
|
|
68
|
-
let
|
|
69
|
-
g.type === "number" && (
|
|
67
|
+
"onUpdate:modelValue": (p) => {
|
|
68
|
+
let u = p;
|
|
69
|
+
g.type === "number" && (u = Number(p)), e.value = {
|
|
70
70
|
...e.value,
|
|
71
|
-
[
|
|
71
|
+
[V.key]: u
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
|
|
75
75
|
], 2)) : (c(), M(m, {
|
|
76
76
|
key: 1,
|
|
77
|
-
content: (b = e.value[
|
|
77
|
+
content: (b = e.value[V.key]) == null ? void 0 : b.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[V.key]), 1)
|
|
82
82
|
]),
|
|
83
83
|
_: 2
|
|
84
84
|
}, 1032, ["content"]))
|
|
@@ -91,7 +91,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
91
91
|
class: "cursor-pointer",
|
|
92
92
|
name: "close",
|
|
93
93
|
size: "md",
|
|
94
|
-
onClick: F[0] || (F[0] = (
|
|
94
|
+
onClick: F[0] || (F[0] = (V) => w("remove"))
|
|
95
95
|
})
|
|
96
96
|
])) : N("", !0)
|
|
97
97
|
]);
|
|
@@ -103,7 +103,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
103
103
|
}, nt = { class: "flex flex-row items-center w-[100%] justify-start" }, st = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, it = {
|
|
104
104
|
key: 0,
|
|
105
105
|
class: "flex flex-row items-center w-[100%] justify-start"
|
|
106
|
-
}, rt = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, mt = { class: "w-[calc(75%+4px)]" }, ct = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, dt = { class: "flex flex-row items-center w-[100%] justify-between" },
|
|
106
|
+
}, rt = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, mt = { class: "w-[calc(75%+4px)]" }, ct = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, dt = { class: "flex flex-row items-center w-[100%] justify-between" }, ut = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis" }, pt = { class: "w-[50%]" }, De = /* @__PURE__ */ q({
|
|
107
107
|
__name: "UploadSection",
|
|
108
108
|
props: /* @__PURE__ */ ye({
|
|
109
109
|
label: {
|
|
@@ -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 (
|
|
133
|
+
return (k, w) => {
|
|
134
134
|
var m, d;
|
|
135
135
|
const _ = S("FmSwitch"), F = S("FmTextField"), h = S("FmTimePicker");
|
|
136
136
|
return c(), C(L, null, [
|
|
137
137
|
t("div", ot, [
|
|
138
|
-
t("div", at, T(
|
|
139
|
-
g.label == "upload" ? (c(), C("div", lt, T(
|
|
138
|
+
t("div", at, T(v(o)("report.integration.auto", { label: g.label })), 1),
|
|
139
|
+
g.label == "upload" ? (c(), C("div", lt, T(v(o)("report.integration.lastUploadDate")) + ": " + T(g.lastUploadDate ? v(je)(g.lastUploadDate).format("MMMM D, YYYY h:mm A") : v(o)("report.integration.noData.title")), 1)) : N("", !0)
|
|
140
140
|
]),
|
|
141
141
|
t("div", nt, [
|
|
142
|
-
t("div", st, T(
|
|
142
|
+
t("div", st, T(v(o)("report.common.enable")), 1),
|
|
143
143
|
i(_, {
|
|
144
144
|
modelValue: e.value.enable,
|
|
145
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
145
|
+
"onUpdate:modelValue": w[0] || (w[0] = (V) => e.value.enable = V),
|
|
146
146
|
style: { gap: "0px" }
|
|
147
147
|
}, null, 8, ["modelValue"])
|
|
148
148
|
]),
|
|
149
149
|
n.value ? (c(), C("div", it, [
|
|
150
|
-
t("div", rt, T(
|
|
150
|
+
t("div", rt, T(v(o)("report.common.email")), 1),
|
|
151
151
|
t("div", mt, [
|
|
152
152
|
i(F, {
|
|
153
153
|
"model-value": (e.value.emails || []).join(","),
|
|
154
154
|
placeholder: "Email",
|
|
155
|
-
"onUpdate:modelValue": w[1] || (w[1] = (
|
|
155
|
+
"onUpdate:modelValue": w[1] || (w[1] = (V) => {
|
|
156
156
|
switch (e.value.name) {
|
|
157
|
-
case
|
|
158
|
-
case
|
|
159
|
-
case
|
|
160
|
-
e.value.emails =
|
|
157
|
+
case v(ce).AutoCount:
|
|
158
|
+
case v(ce).SQL:
|
|
159
|
+
case v(ce).iFlexi_HRMS:
|
|
160
|
+
e.value.emails = V.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",
|
|
170
|
-
t("div",
|
|
169
|
+
t("div", ut, T(v(We)(g.label)) + " time ", 1),
|
|
170
|
+
t("div", pt, [
|
|
171
171
|
i(h, {
|
|
172
172
|
class: "gap-[0px]",
|
|
173
|
-
"model-value":
|
|
174
|
-
"onUpdate:modelValue": w[2] || (w[2] = (
|
|
175
|
-
|
|
173
|
+
"model-value": v(je)().hour(((m = e.value.triggerTime) == null ? void 0 : m.hour) ?? 0).minute(((d = e.value.triggerTime) == null ? void 0 : d.minute) ?? 0).format("HH:mm"),
|
|
174
|
+
"onUpdate:modelValue": w[2] || (w[2] = (V) => {
|
|
175
|
+
V && (e.value.triggerTime.hour = Number(V.split(":")[0]), e.value.triggerTime.minute = Number(V.split(":")[1]));
|
|
176
176
|
})
|
|
177
177
|
}, null, 8, ["model-value"])
|
|
178
178
|
])
|
|
179
179
|
]),
|
|
180
180
|
i(K, {
|
|
181
181
|
"model-value": {
|
|
182
|
-
label:
|
|
182
|
+
label: v(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: v(o)("report.integration.delayDay"), editable: !1 },
|
|
188
|
+
delayDay: { placeholder: v(o)("report.integration.delayDay"), editable: !0 }
|
|
189
189
|
},
|
|
190
|
-
rules: [(
|
|
191
|
-
"onUpdate:modelValue": w[3] || (w[3] = (
|
|
192
|
-
e.value.delayDay =
|
|
190
|
+
rules: [(V) => V > 0 || "Delay days must be greater than 0"],
|
|
191
|
+
"onUpdate:modelValue": w[3] || (w[3] = (V) => {
|
|
192
|
+
e.value.delayDay = V.delayDay;
|
|
193
193
|
})
|
|
194
194
|
}, null, 8, ["model-value", "options", "rules"])
|
|
195
195
|
])
|
|
@@ -231,7 +231,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
231
231
|
}),
|
|
232
232
|
emits: /* @__PURE__ */ ye(["remove"], ["update:modelValue"]),
|
|
233
233
|
setup(g, { emit: o }) {
|
|
234
|
-
const e = X(g, "modelValue"), n = g,
|
|
234
|
+
const e = X(g, "modelValue"), n = g, k = Y(
|
|
235
235
|
() => Object.keys(n.options).map((m) => {
|
|
236
236
|
const d = n.options[m];
|
|
237
237
|
return {
|
|
@@ -251,16 +251,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
251
251
|
return n.singleValueMode ? n.options.key.placeholder : (d = e.value[m.key]) == null ? void 0 : d.toString();
|
|
252
252
|
}, F = (m) => n.singleValueMode ? e.value : e.value[m.key], h = o;
|
|
253
253
|
return (m, d) => {
|
|
254
|
-
const
|
|
254
|
+
const V = S("FmSelect"), b = S("FmTextField"), p = S("FmTooltip"), u = S("FmIcon");
|
|
255
255
|
return c(), C("div", ft, [
|
|
256
256
|
t("div", {
|
|
257
257
|
class: Ke(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
258
258
|
}, [
|
|
259
|
-
(c(!0), C(L, null, H(
|
|
259
|
+
(c(!0), C(L, null, H(k.value, (r) => (c(), C(L, {
|
|
260
260
|
key: r.key
|
|
261
261
|
}, [
|
|
262
262
|
r.editable ? (c(), C("div", vt, [
|
|
263
|
-
r.dropdownOptions ? (c(), M(
|
|
263
|
+
r.dropdownOptions ? (c(), M(V, {
|
|
264
264
|
key: 0,
|
|
265
265
|
"model-value": F(r),
|
|
266
266
|
placeholder: r.placeholder,
|
|
@@ -275,7 +275,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
275
275
|
rules: g.rules,
|
|
276
276
|
"onUpdate:modelValue": (x) => w(x, r.key)
|
|
277
277
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
|
|
278
|
-
])) : (c(), M(
|
|
278
|
+
])) : (c(), M(p, {
|
|
279
279
|
key: 1,
|
|
280
280
|
content: _(r),
|
|
281
281
|
class: "w-[50%]"
|
|
@@ -288,7 +288,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
288
288
|
], 64))), 128))
|
|
289
289
|
], 2),
|
|
290
290
|
g.removable ? (c(), C("div", yt, [
|
|
291
|
-
i(
|
|
291
|
+
i(u, {
|
|
292
292
|
color: "system-error-300",
|
|
293
293
|
class: "cursor-pointer",
|
|
294
294
|
name: "close",
|
|
@@ -302,7 +302,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
302
302
|
}), xt = {
|
|
303
303
|
key: 0,
|
|
304
304
|
class: "flex flex-col h-full"
|
|
305
|
-
}, _t = { class: "flex flex-col gap-[16px] pb-[24px]" }, bt = { class: "flex flex-row justify-between items-center gap-2" }, wt = { class: "flex flex-row gap-2 items-center" }, ht = { class: "relative group cursor-pointer" },
|
|
305
|
+
}, _t = { class: "flex flex-col gap-[16px] pb-[24px]" }, bt = { class: "flex flex-row justify-between items-center gap-2" }, wt = { class: "flex flex-row gap-2 items-center" }, ht = { class: "relative group cursor-pointer" }, Vt = { class: "flex flex-col gap-16 pt-[24px] overflow-scroll" }, kt = { class: "flex flex-row items-center justify-between gap-2" }, $t = { class: "w-[25%]" }, St = { class: "flex flex-col gap-[16px]" }, Ct = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Ft = { class: "flex-grow" }, Dt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Ut = { class: "flex flex-col gap-[16px]" }, Tt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, It = { class: "flex-grow" }, Mt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Kt = { class: "flex-grow" }, At = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Pt = { class: "flex-grow" }, Nt = { class: "flex flex-row items-center gap-x-16" }, Rt = {
|
|
306
306
|
key: 0,
|
|
307
307
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
308
308
|
}, Ot = {
|
|
@@ -341,21 +341,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
341
341
|
}),
|
|
342
342
|
emits: ["update:modelValue"],
|
|
343
343
|
setup(g) {
|
|
344
|
-
const { t: o } = J(), e = X(g, "modelValue"), n =
|
|
345
|
-
() => h.map((
|
|
346
|
-
),
|
|
347
|
-
var
|
|
348
|
-
return m.value ? "Connecting" : (s = (
|
|
344
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = pe(), k = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = ue(), m = B(!1), d = Y(
|
|
345
|
+
() => h.map((f) => ({ label: f.name, value: f.id }))
|
|
346
|
+
), V = Y(() => {
|
|
347
|
+
var f, s;
|
|
348
|
+
return m.value ? "Connecting" : (s = (f = e.value) == null ? void 0 : f.platform) != null && s.accessToken ? "Disconnect" : "Connect";
|
|
349
349
|
}), b = B(0);
|
|
350
|
-
async function
|
|
351
|
-
var
|
|
350
|
+
async function p() {
|
|
351
|
+
var f;
|
|
352
352
|
if (m.value)
|
|
353
353
|
n.open({ type: "error", message: "Connecting in progress" });
|
|
354
|
-
else if ((
|
|
354
|
+
else if ((f = e.value.platform) != null && f.accessToken)
|
|
355
355
|
await F({
|
|
356
356
|
message: o("report.integration.xero.confirmDisconnect", { name: e.value.name }),
|
|
357
357
|
title: o("report.integration.xero.disconnectTitle")
|
|
358
|
-
}) && (await Ye(e.value._id), await
|
|
358
|
+
}) && (await Ye(e.value._id), await k.getSettings());
|
|
359
359
|
else if (e.value._id)
|
|
360
360
|
try {
|
|
361
361
|
const s = await qe(e.value._id);
|
|
@@ -364,7 +364,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
364
364
|
var P;
|
|
365
365
|
b.value += 1;
|
|
366
366
|
try {
|
|
367
|
-
await
|
|
367
|
+
await k.getSettings();
|
|
368
368
|
} finally {
|
|
369
369
|
(b.value === 12 || (P = e.value.platform) != null && P.accessToken) && (m.value = !1, A && clearInterval(A), b.value = 0);
|
|
370
370
|
}
|
|
@@ -376,13 +376,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
376
376
|
else
|
|
377
377
|
n.open({ type: "error", message: `invalid accounting ${e.value._id}` });
|
|
378
378
|
}
|
|
379
|
-
async function
|
|
379
|
+
async function u() {
|
|
380
380
|
await F({
|
|
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
|
|
385
|
+
await he(e.value._id), await k.getSettings(), w.back();
|
|
386
386
|
} catch (s) {
|
|
387
387
|
n.open({ type: "error", message: s.message });
|
|
388
388
|
}
|
|
@@ -391,34 +391,34 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
391
391
|
async function r() {
|
|
392
392
|
await _(async () => {
|
|
393
393
|
try {
|
|
394
|
-
await
|
|
395
|
-
} catch (
|
|
396
|
-
n.open({ type: "error", message:
|
|
394
|
+
await Ve(e.value._id, e.value), await k.getSettings();
|
|
395
|
+
} catch (f) {
|
|
396
|
+
n.open({ type: "error", message: f.message });
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
|
-
function x(
|
|
401
|
-
const s = g.tenantOptions.data.find((A) => A.value ===
|
|
400
|
+
function x(f) {
|
|
401
|
+
const s = g.tenantOptions.data.find((A) => A.value === f);
|
|
402
402
|
s && e.value.platform && (e.value.platform.tenant = {
|
|
403
403
|
id: s.value,
|
|
404
404
|
name: s.label
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
|
-
function $(
|
|
407
|
+
function $(f, s) {
|
|
408
408
|
var A, P;
|
|
409
|
-
(P = (A = e.value.platform) == null ? void 0 : A.mappings) != null && P[
|
|
409
|
+
(P = (A = e.value.platform) == null ? void 0 : A.mappings) != null && P[f] && (e.value.platform.mappings[f] = e.value.platform.mappings[f].filter(
|
|
410
410
|
(Q, E) => E !== s
|
|
411
411
|
));
|
|
412
412
|
}
|
|
413
|
-
function l(
|
|
413
|
+
function l(f) {
|
|
414
414
|
var s, A;
|
|
415
|
-
(A = (s = e.value.platform) == null ? void 0 : s.mappings) != null && A[
|
|
416
|
-
...e.value.platform.mappings[
|
|
417
|
-
|
|
415
|
+
(A = (s = e.value.platform) == null ? void 0 : s.mappings) != null && A[f] && (e.value.platform.mappings[f] = [
|
|
416
|
+
...e.value.platform.mappings[f],
|
|
417
|
+
f === "items" ? {
|
|
418
418
|
feedmeKey: "",
|
|
419
419
|
xeroAccount: "",
|
|
420
420
|
name: ""
|
|
421
|
-
} :
|
|
421
|
+
} : f === "taxes" ? {
|
|
422
422
|
feedmeKey: "",
|
|
423
423
|
xeroAccount: ""
|
|
424
424
|
} : {
|
|
@@ -430,13 +430,13 @@ 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
|
|
434
|
-
} catch (
|
|
435
|
-
n.open({ type: "error", message:
|
|
433
|
+
await ke(e.value._id), await k.getSettings();
|
|
434
|
+
} catch (f) {
|
|
435
|
+
n.open({ type: "error", message: f.message });
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
|
-
return (
|
|
439
|
+
return (f, s) => {
|
|
440
440
|
var z, W, Z, ee, te, oe, ae, le, ne, se, D, y, 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
442
|
return (W = (z = e.value) == null ? void 0 : z.platform) != null && W.mappings ? (c(), C("div", xt, [
|
|
@@ -455,7 +455,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
455
455
|
i(P, {
|
|
456
456
|
variant: "tertiary",
|
|
457
457
|
label: "Delete",
|
|
458
|
-
onClick:
|
|
458
|
+
onClick: u
|
|
459
459
|
}),
|
|
460
460
|
i(P, {
|
|
461
461
|
variant: "primary",
|
|
@@ -466,15 +466,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
466
466
|
])
|
|
467
467
|
]),
|
|
468
468
|
i(Q, { style: { margin: 0 } }),
|
|
469
|
-
t("div",
|
|
469
|
+
t("div", Vt, [
|
|
470
470
|
s[21] || (s[21] = t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Authenticate with your official Xero account to enable FeedMe to securely upload data to Xero. ", -1)),
|
|
471
|
-
t("div",
|
|
471
|
+
t("div", kt, [
|
|
472
472
|
t("div", $t, [
|
|
473
473
|
i(P, {
|
|
474
474
|
disabled: m.value,
|
|
475
475
|
variant: "primary",
|
|
476
|
-
label:
|
|
477
|
-
onClick:
|
|
476
|
+
label: V.value,
|
|
477
|
+
onClick: p
|
|
478
478
|
}, null, 8, ["disabled", "label"])
|
|
479
479
|
]),
|
|
480
480
|
!g.tenantOptions.isLoaded && ((Z = e.value.platform) != null && Z.accessToken) ? (c(), M(E, {
|
|
@@ -662,31 +662,31 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
662
662
|
setup(g) {
|
|
663
663
|
const o = B([]), e = Y(
|
|
664
664
|
() => o.value.reduce((m, d) => {
|
|
665
|
-
const
|
|
666
|
-
m[
|
|
665
|
+
const V = m.length, { invoice: b, payments: p } = d;
|
|
666
|
+
m[V] = {
|
|
667
667
|
date: b.Date,
|
|
668
668
|
contact: b.Contact.ContactID,
|
|
669
669
|
status: b.Status,
|
|
670
670
|
ref: b.Reference
|
|
671
671
|
};
|
|
672
|
-
for (let
|
|
673
|
-
const r =
|
|
674
|
-
m[r] || (m[r] = {}), b.LineItems[
|
|
672
|
+
for (let u = 0; u < Math.max(b.LineItems.length, p.length); u++) {
|
|
673
|
+
const r = V + u;
|
|
674
|
+
m[r] || (m[r] = {}), b.LineItems[u] && (m[r] = {
|
|
675
675
|
...m[r],
|
|
676
|
-
itemDescription: b.LineItems[
|
|
677
|
-
itemQuantity: b.LineItems[
|
|
678
|
-
itemUnitAmount: b.LineItems[
|
|
676
|
+
itemDescription: b.LineItems[u].Description,
|
|
677
|
+
itemQuantity: b.LineItems[u].Quantity,
|
|
678
|
+
itemUnitAmount: b.LineItems[u].UnitAmount,
|
|
679
679
|
// itemCode: invoice.LineItems[i].ItemCode,
|
|
680
|
-
itemAccount: b.LineItems[
|
|
681
|
-
itemTax: b.LineItems[
|
|
682
|
-
itemTaxType: b.LineItems[
|
|
683
|
-
itemAmount: b.LineItems[
|
|
684
|
-
itemDiscount: b.LineItems[
|
|
685
|
-
}), u
|
|
680
|
+
itemAccount: b.LineItems[u].AccountCode,
|
|
681
|
+
itemTax: b.LineItems[u].TaxAmount,
|
|
682
|
+
itemTaxType: b.LineItems[u].TaxType,
|
|
683
|
+
itemAmount: b.LineItems[u].LineAmount,
|
|
684
|
+
itemDiscount: b.LineItems[u].DiscountAmount
|
|
685
|
+
}), p[u] && (m[r] = {
|
|
686
686
|
...m[r],
|
|
687
|
-
paymentAccount: u
|
|
688
|
-
paymentReference: u
|
|
689
|
-
paymentAmount: u
|
|
687
|
+
paymentAccount: p[u].Account.Code,
|
|
688
|
+
paymentReference: p[u].Reference,
|
|
689
|
+
paymentAmount: p[u].Amount
|
|
690
690
|
});
|
|
691
691
|
}
|
|
692
692
|
return m;
|
|
@@ -767,13 +767,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
767
767
|
header: "Payment Amount",
|
|
768
768
|
enableSorting: !1
|
|
769
769
|
}
|
|
770
|
-
],
|
|
770
|
+
], k = X(g, "modelValue"), w = B(!1), _ = pe(), { dateRange: F } = Ce(ue());
|
|
771
771
|
ve(
|
|
772
772
|
() => F.value,
|
|
773
773
|
async () => {
|
|
774
|
-
if (
|
|
774
|
+
if (k.value._id)
|
|
775
775
|
try {
|
|
776
|
-
w.value = !0, o.value = await $e(
|
|
776
|
+
w.value = !0, o.value = await $e(k.value._id);
|
|
777
777
|
} catch (m) {
|
|
778
778
|
_.open({ message: m.message, type: "error" });
|
|
779
779
|
} finally {
|
|
@@ -786,7 +786,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
786
786
|
);
|
|
787
787
|
async function h() {
|
|
788
788
|
try {
|
|
789
|
-
|
|
789
|
+
k.value._id ? (w.value = !0, await Ae(k.value._id), _.open({ message: "Upload successful", type: "success" })) : _.open({ message: "Invalid accounting setting", type: "error" });
|
|
790
790
|
} catch (m) {
|
|
791
791
|
m.message && _.open({ message: m.message, type: "error" }), m.errors && m.errors.forEach((d) => _.open({ message: d.Message, type: "error" }));
|
|
792
792
|
} finally {
|
|
@@ -794,15 +794,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
return (m, d) => {
|
|
797
|
-
const
|
|
797
|
+
const V = S("FmButton"), b = S("FmCircularProgress"), p = S("FmTable");
|
|
798
798
|
return c(), C("div", Ht, [
|
|
799
799
|
t("div", Xt, [
|
|
800
800
|
i(Fe, {
|
|
801
|
-
"date-range":
|
|
802
|
-
"onUpdate:dateRange": d[0] || (d[0] = (
|
|
801
|
+
"date-range": v(F),
|
|
802
|
+
"onUpdate:dateRange": d[0] || (d[0] = (u) => be(F) ? F.value = u : null),
|
|
803
803
|
compare: !1
|
|
804
804
|
}, null, 8, ["date-range"]),
|
|
805
|
-
i(
|
|
805
|
+
i(V, {
|
|
806
806
|
loading: w.value,
|
|
807
807
|
variant: "primary",
|
|
808
808
|
label: "Upload",
|
|
@@ -812,7 +812,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
812
812
|
w.value ? (c(), C("div", Qt, [
|
|
813
813
|
i(b, { size: "xl" }),
|
|
814
814
|
d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
|
|
815
|
-
])) : e.value.length > 0 ? (c(), M(
|
|
815
|
+
])) : e.value.length > 0 ? (c(), M(p, {
|
|
816
816
|
key: 1,
|
|
817
817
|
class: "flex overflow-scroll",
|
|
818
818
|
"row-data": e.value,
|
|
@@ -829,7 +829,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
829
829
|
},
|
|
830
830
|
emits: ["update:modelValue"],
|
|
831
831
|
setup(g) {
|
|
832
|
-
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"),
|
|
832
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), k = B({}), w = B({}), _ = B({}), F = [
|
|
833
833
|
{
|
|
834
834
|
label: o("report.integration.setting"),
|
|
835
835
|
value: "setting",
|
|
@@ -848,7 +848,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
848
848
|
return {
|
|
849
849
|
component: qt,
|
|
850
850
|
props: {
|
|
851
|
-
tenantOptions:
|
|
851
|
+
tenantOptions: k.value,
|
|
852
852
|
taxOptions: w.value,
|
|
853
853
|
accountCodeOptions: _.value
|
|
854
854
|
}
|
|
@@ -860,27 +860,27 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
860
860
|
async function d() {
|
|
861
861
|
if (e.value._id)
|
|
862
862
|
try {
|
|
863
|
-
const
|
|
864
|
-
|
|
865
|
-
value:
|
|
866
|
-
label:
|
|
863
|
+
const p = await He(e.value._id);
|
|
864
|
+
k.value.data = p.map((u) => ({
|
|
865
|
+
value: u.id,
|
|
866
|
+
label: u.name
|
|
867
867
|
}));
|
|
868
|
-
} catch (
|
|
869
|
-
console.error("Failed to fetch tenants:",
|
|
868
|
+
} catch (p) {
|
|
869
|
+
console.error("Failed to fetch tenants:", p), k.value.isError = !0;
|
|
870
870
|
} finally {
|
|
871
|
-
|
|
871
|
+
k.value.isLoaded = !0;
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
|
-
async function
|
|
874
|
+
async function V() {
|
|
875
875
|
if (e.value._id)
|
|
876
876
|
try {
|
|
877
|
-
const
|
|
878
|
-
w.value.data =
|
|
879
|
-
value:
|
|
880
|
-
label: `${
|
|
877
|
+
const p = await Xe(e.value._id);
|
|
878
|
+
w.value.data = p.map((u) => ({
|
|
879
|
+
value: u.Name,
|
|
880
|
+
label: `${u.Name} - (${u.EffectiveRate}%)`
|
|
881
881
|
}));
|
|
882
|
-
} catch (
|
|
883
|
-
console.error("Failed to fetch taxes:",
|
|
882
|
+
} catch (p) {
|
|
883
|
+
console.error("Failed to fetch taxes:", p), w.value.isError = !0;
|
|
884
884
|
} finally {
|
|
885
885
|
w.value.isLoaded = !0;
|
|
886
886
|
}
|
|
@@ -888,27 +888,27 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
888
888
|
async function b() {
|
|
889
889
|
if (e.value._id)
|
|
890
890
|
try {
|
|
891
|
-
const
|
|
892
|
-
_.value.data =
|
|
893
|
-
value:
|
|
894
|
-
label: `${
|
|
891
|
+
const p = await Qe(e.value._id);
|
|
892
|
+
_.value.data = p.map((u) => ({
|
|
893
|
+
value: u.Code,
|
|
894
|
+
label: `${u.Code} ${u.Name} - [${u.Class}_${u.Type}]`
|
|
895
895
|
}));
|
|
896
|
-
} catch (
|
|
897
|
-
console.error("Failed to fetch accounts:",
|
|
896
|
+
} catch (p) {
|
|
897
|
+
console.error("Failed to fetch accounts:", p), _.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 p;
|
|
905
|
+
return (p = e.value.platform) == null ? void 0 : p.accessToken;
|
|
906
906
|
},
|
|
907
|
-
(
|
|
908
|
-
|
|
907
|
+
(p) => {
|
|
908
|
+
p && (d(), V(), b());
|
|
909
909
|
},
|
|
910
910
|
{ immediate: !0 }
|
|
911
|
-
), (
|
|
911
|
+
), (p, u) => {
|
|
912
912
|
var $, l, a;
|
|
913
913
|
const r = S("FmPageHead"), x = S("FmTabs");
|
|
914
914
|
return c(), C("div", Jt, [
|
|
@@ -916,22 +916,22 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
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": v(h).back
|
|
920
920
|
}, {
|
|
921
|
-
description: ge(() =>
|
|
921
|
+
description: ge(() => u[2] || (u[2] = [
|
|
922
922
|
t("div", null, null, -1)
|
|
923
923
|
])),
|
|
924
924
|
_: 1
|
|
925
925
|
}, 8, ["title", "onClick:back"]),
|
|
926
926
|
i(x, {
|
|
927
927
|
"model-value": n.value,
|
|
928
|
-
"onUpdate:modelValue":
|
|
928
|
+
"onUpdate:modelValue": u[0] || (u[0] = (f) => n.value = f),
|
|
929
929
|
items: F
|
|
930
930
|
}, null, 8, ["model-value"]),
|
|
931
931
|
t("div", Wt, [
|
|
932
932
|
(c(), M(xe((l = m.value) == null ? void 0 : l.component), Le({
|
|
933
933
|
modelValue: e.value,
|
|
934
|
-
"onUpdate:modelValue":
|
|
934
|
+
"onUpdate:modelValue": u[1] || (u[1] = (f) => e.value = f)
|
|
935
935
|
}, (a = m.value) == null ? void 0 : a.props), null, 16, ["modelValue"]))
|
|
936
936
|
])
|
|
937
937
|
]);
|
|
@@ -940,7 +940,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
940
940
|
}), eo = {
|
|
941
941
|
key: 0,
|
|
942
942
|
class: "flex flex-col h-full"
|
|
943
|
-
}, to = { class: "flex flex-col gap-16 pb-[24px]" }, oo = { class: "flex flex-row justify-between items-center gap-2" }, ao = { class: "fm-typo-en-title-sm-800" }, lo = { class: "flex flex-row gap-2 items-center" }, no = { class: "relative group cursor-pointer" }, so = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, io = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mo = { class: "flex flex-row items-center justify-between" }, co = { class: "w-[25%]" },
|
|
943
|
+
}, to = { class: "flex flex-col gap-16 pb-[24px]" }, oo = { class: "flex flex-row justify-between items-center gap-2" }, ao = { class: "fm-typo-en-title-sm-800" }, lo = { class: "flex flex-row gap-2 items-center" }, no = { class: "relative group cursor-pointer" }, so = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, io = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mo = { class: "flex flex-row items-center justify-between" }, co = { class: "w-[25%]" }, uo = { class: "flex-grow" }, po = { class: "flex flex-row items-center justify-between" }, fo = { class: "w-[25%]" }, vo = { class: "flex-grow" }, go = { class: "flex flex-col gap-16" }, yo = { class: "fm-typo-en-title-sm-800" }, xo = { class: "flex flex-row items-center max-w-[100%]" }, _o = { class: "w-[25%]" }, bo = { class: "flex-grow" }, wo = { class: "flex flex-row items-center max-w-[100%]" }, ho = { class: "w-[25%]" }, Vo = { class: "flex flex-row items-center max-w-[100%]" }, ko = { class: "w-[25%]" }, $o = { class: "flex flex-col gap-16" }, So = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Co = { class: "flex flex-row items-center gap-x-16" }, Fo = { class: "fm-typo-en-title-sm-800" }, Do = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Uo = { class: "flex flex-row items-center gap-x-16" }, To = { class: "fm-typo-en-title-sm-800" }, Io = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Mo = { class: "flex flex-row items-center gap-x-16" }, Ko = { class: "fm-typo-en-title-sm-800" }, Ao = /* @__PURE__ */ q({
|
|
944
944
|
__name: "Setting",
|
|
945
945
|
props: {
|
|
946
946
|
modelValue: { required: !0 },
|
|
@@ -948,7 +948,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
948
948
|
},
|
|
949
949
|
emits: ["update:modelValue"],
|
|
950
950
|
setup(g) {
|
|
951
|
-
const o = X(g, "modelValue"), e =
|
|
951
|
+
const o = X(g, "modelValue"), e = pe(), n = _e(), k = de(), { promptLoader: w } = we(), { promptMessage: _ } = Se(), { restaurants: F } = ue(), h = Y(
|
|
952
952
|
() => F.map((l) => ({ label: l.name, value: l.id }))
|
|
953
953
|
), { t: m } = J();
|
|
954
954
|
async function d() {
|
|
@@ -957,30 +957,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
957
957
|
title: m("report.common.delete")
|
|
958
958
|
}) && await w(async () => {
|
|
959
959
|
try {
|
|
960
|
-
await he(o.value._id), await n.getSettings(),
|
|
960
|
+
await he(o.value._id), await n.getSettings(), k.back();
|
|
961
961
|
} catch (a) {
|
|
962
962
|
e.open({ type: "error", message: a.message });
|
|
963
963
|
}
|
|
964
964
|
});
|
|
965
965
|
}
|
|
966
|
-
async function
|
|
966
|
+
async function V() {
|
|
967
967
|
await w(async () => {
|
|
968
968
|
try {
|
|
969
|
-
await
|
|
969
|
+
await Ve(o.value._id, o.value), await n.getSettings();
|
|
970
970
|
} catch (l) {
|
|
971
971
|
e.open({ type: "error", message: l.message });
|
|
972
972
|
}
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
975
|
function b(l, a) {
|
|
976
|
-
var
|
|
977
|
-
(s = (
|
|
976
|
+
var f, s;
|
|
977
|
+
(s = (f = o.value.platform) == null ? void 0 : f.mappings) != null && s[l] && (o.value.platform.mappings[l] = o.value.platform.mappings[l].filter(
|
|
978
978
|
(A, P) => P !== a
|
|
979
979
|
));
|
|
980
980
|
}
|
|
981
|
-
function
|
|
982
|
-
var a,
|
|
983
|
-
if ((
|
|
981
|
+
function p(l) {
|
|
982
|
+
var a, f;
|
|
983
|
+
if ((f = (a = o.value.platform) == null ? void 0 : a.mappings) != null && f[l]) {
|
|
984
984
|
let s;
|
|
985
985
|
switch (l) {
|
|
986
986
|
case "items":
|
|
@@ -1011,21 +1011,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1011
1011
|
];
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
|
-
const
|
|
1014
|
+
const u = [
|
|
1015
1015
|
{
|
|
1016
|
-
label: m("report.integration.
|
|
1016
|
+
label: m("report.integration.grouping.byDay"),
|
|
1017
1017
|
value: fe.BY_DAY
|
|
1018
1018
|
},
|
|
1019
1019
|
{
|
|
1020
|
-
label: m("report.integration.
|
|
1020
|
+
label: m("report.integration.grouping.byDayItem"),
|
|
1021
1021
|
value: fe.BY_DAY_ITEM
|
|
1022
1022
|
},
|
|
1023
1023
|
{
|
|
1024
|
-
label: m("report.integration.
|
|
1024
|
+
label: m("report.integration.grouping.byInvoice"),
|
|
1025
1025
|
value: fe.BY_INVOICE
|
|
1026
1026
|
},
|
|
1027
1027
|
{
|
|
1028
|
-
label: m("report.integration.
|
|
1028
|
+
label: m("report.integration.grouping.byDaySeparatePayment"),
|
|
1029
1029
|
value: fe.BY_DAY_SEPARATE_PAYMENT
|
|
1030
1030
|
}
|
|
1031
1031
|
];
|
|
@@ -1033,8 +1033,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1033
1033
|
key: l,
|
|
1034
1034
|
value: a
|
|
1035
1035
|
}) {
|
|
1036
|
-
var
|
|
1037
|
-
(s = (
|
|
1036
|
+
var f, s;
|
|
1037
|
+
(s = (f = o.value) == null ? void 0 : f.platform) != null && s.mappings && (o.value.platform.mappings[l] = a);
|
|
1038
1038
|
}
|
|
1039
1039
|
function x(l) {
|
|
1040
1040
|
return {
|
|
@@ -1045,7 +1045,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1045
1045
|
async function $() {
|
|
1046
1046
|
await w(async () => {
|
|
1047
1047
|
try {
|
|
1048
|
-
await
|
|
1048
|
+
await ke(o.value._id), await n.getSettings();
|
|
1049
1049
|
} catch (l) {
|
|
1050
1050
|
e.open({ type: "error", message: l.message });
|
|
1051
1051
|
}
|
|
@@ -1053,60 +1053,60 @@ 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
|
|
1056
|
+
const f = S("FmIcon"), s = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
|
|
1057
1057
|
return (G = (E = o.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), C("div", eo, [
|
|
1058
1058
|
t("div", to, [
|
|
1059
1059
|
t("div", oo, [
|
|
1060
|
-
t("div", ao, T(
|
|
1060
|
+
t("div", ao, T(v(m)("report.integration.bukku.connect")), 1),
|
|
1061
1061
|
t("div", lo, [
|
|
1062
1062
|
t("div", no, [
|
|
1063
|
-
i(
|
|
1063
|
+
i(f, {
|
|
1064
1064
|
name: "refresh",
|
|
1065
1065
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1066
1066
|
onClick: $
|
|
1067
1067
|
}),
|
|
1068
|
-
t("span", so, T(
|
|
1068
|
+
t("span", so, T(v(m)("report.integration.refreshSetting")), 1)
|
|
1069
1069
|
]),
|
|
1070
1070
|
i(s, {
|
|
1071
1071
|
variant: "tertiary",
|
|
1072
|
-
label:
|
|
1072
|
+
label: v(m)("report.common.delete"),
|
|
1073
1073
|
onClick: d
|
|
1074
1074
|
}, null, 8, ["label"]),
|
|
1075
1075
|
i(s, {
|
|
1076
1076
|
variant: "primary",
|
|
1077
|
-
label:
|
|
1078
|
-
onClick:
|
|
1077
|
+
label: v(m)("report.common.update"),
|
|
1078
|
+
onClick: V
|
|
1079
1079
|
}, null, 8, ["label"])
|
|
1080
1080
|
])
|
|
1081
1081
|
])
|
|
1082
1082
|
]),
|
|
1083
1083
|
i(A, { style: { margin: 0 } }),
|
|
1084
1084
|
t("div", io, [
|
|
1085
|
-
t("div", ro, T(
|
|
1085
|
+
t("div", ro, T(v(m)("report.integration.bukku.authentication")), 1),
|
|
1086
1086
|
t("div", mo, [
|
|
1087
|
-
t("div", co, T(
|
|
1088
|
-
t("div",
|
|
1087
|
+
t("div", co, T(v(m)("report.integration.subdomain")), 1),
|
|
1088
|
+
t("div", uo, [
|
|
1089
1089
|
i(P, {
|
|
1090
1090
|
modelValue: o.value.platform.subdomain,
|
|
1091
1091
|
"onUpdate:modelValue": a[0] || (a[0] = (y) => o.value.platform.subdomain = y),
|
|
1092
|
-
placeholder:
|
|
1092
|
+
placeholder: v(m)("report.integration.subdomain")
|
|
1093
1093
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1094
1094
|
])
|
|
1095
1095
|
]),
|
|
1096
|
-
t("div",
|
|
1097
|
-
t("div", fo, T(
|
|
1096
|
+
t("div", po, [
|
|
1097
|
+
t("div", fo, T(v(m)("report.integration.token")), 1),
|
|
1098
1098
|
t("div", vo, [
|
|
1099
1099
|
i(P, {
|
|
1100
1100
|
modelValue: o.value.platform.token,
|
|
1101
1101
|
"onUpdate:modelValue": a[1] || (a[1] = (y) => o.value.platform.token = y),
|
|
1102
|
-
placeholder:
|
|
1102
|
+
placeholder: v(m)("report.integration.token")
|
|
1103
1103
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1104
1104
|
])
|
|
1105
1105
|
]),
|
|
1106
1106
|
t("div", go, [
|
|
1107
|
-
t("div", yo, T(
|
|
1107
|
+
t("div", yo, T(v(m)("report.integration.bukku.general")), 1),
|
|
1108
1108
|
t("div", xo, [
|
|
1109
|
-
t("div", _o, T(
|
|
1109
|
+
t("div", _o, T(v(m)("report.common.name")), 1),
|
|
1110
1110
|
t("div", bo, [
|
|
1111
1111
|
i(P, {
|
|
1112
1112
|
modelValue: o.value.name,
|
|
@@ -1115,7 +1115,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1115
1115
|
])
|
|
1116
1116
|
]),
|
|
1117
1117
|
t("div", wo, [
|
|
1118
|
-
t("div", ho, T(
|
|
1118
|
+
t("div", ho, T(v(m)("report.common.location")), 1),
|
|
1119
1119
|
i(Q, {
|
|
1120
1120
|
modelValue: o.value.platform.locationIds,
|
|
1121
1121
|
"onUpdate:modelValue": a[3] || (a[3] = (y) => o.value.platform.locationIds = y),
|
|
@@ -1125,13 +1125,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1125
1125
|
class: "flex-grow"
|
|
1126
1126
|
}, null, 8, ["modelValue", "items"])
|
|
1127
1127
|
]),
|
|
1128
|
-
t("div",
|
|
1129
|
-
t("div",
|
|
1128
|
+
t("div", Vo, [
|
|
1129
|
+
t("div", ko, T(v(m)("report.integration.bukku.grouping.title")), 1),
|
|
1130
1130
|
i(Q, {
|
|
1131
1131
|
modelValue: o.value.platform.grouping,
|
|
1132
1132
|
"onUpdate:modelValue": a[4] || (a[4] = (y) => o.value.platform.grouping = y),
|
|
1133
1133
|
multiselect: !1,
|
|
1134
|
-
items:
|
|
1134
|
+
items: u,
|
|
1135
1135
|
placeholder: "Select grouping",
|
|
1136
1136
|
class: "flex-grow"
|
|
1137
1137
|
}, null, 8, ["modelValue"])
|
|
@@ -1208,15 +1208,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1208
1208
|
"onUpdate:modelValue": (O) => o.value.platform.mappings.charges[U] = O,
|
|
1209
1209
|
options: {
|
|
1210
1210
|
key: {
|
|
1211
|
-
placeholder:
|
|
1211
|
+
placeholder: "Key",
|
|
1212
1212
|
editable: !1
|
|
1213
1213
|
},
|
|
1214
1214
|
account: {
|
|
1215
|
-
placeholder:
|
|
1215
|
+
placeholder: "Account code",
|
|
1216
1216
|
editable: !0
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"
|
|
1219
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
1220
1220
|
])
|
|
1221
1221
|
]),
|
|
1222
1222
|
i(De, {
|
|
@@ -1226,11 +1226,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1226
1226
|
"last-upload-date": (W = o.value.platform) == null ? void 0 : W.lastUploadDate
|
|
1227
1227
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
1228
1228
|
t("div", Co, [
|
|
1229
|
-
t("div", Fo, T(
|
|
1229
|
+
t("div", Fo, T(v(m)("report.integration.items")), 1),
|
|
1230
1230
|
i(s, {
|
|
1231
1231
|
variant: "primary",
|
|
1232
1232
|
icon: "add",
|
|
1233
|
-
onClick: a[12] || (a[12] = () =>
|
|
1233
|
+
onClick: a[12] || (a[12] = () => p("items"))
|
|
1234
1234
|
})
|
|
1235
1235
|
]),
|
|
1236
1236
|
t("div", Do, [
|
|
@@ -1247,11 +1247,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1247
1247
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1248
1248
|
]),
|
|
1249
1249
|
t("div", Uo, [
|
|
1250
|
-
t("div", To, T(
|
|
1250
|
+
t("div", To, T(v(m)("report.integration.taxes")), 1),
|
|
1251
1251
|
i(s, {
|
|
1252
1252
|
variant: "primary",
|
|
1253
1253
|
icon: "add",
|
|
1254
|
-
onClick: a[13] || (a[13] = () =>
|
|
1254
|
+
onClick: a[13] || (a[13] = () => p("taxes"))
|
|
1255
1255
|
})
|
|
1256
1256
|
]),
|
|
1257
1257
|
t("div", Io, [
|
|
@@ -1268,11 +1268,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1268
1268
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1269
1269
|
]),
|
|
1270
1270
|
t("div", Mo, [
|
|
1271
|
-
t("div", Ko, T(
|
|
1271
|
+
t("div", Ko, T(v(m)("report.integration.payments")), 1),
|
|
1272
1272
|
i(s, {
|
|
1273
1273
|
variant: "primary",
|
|
1274
1274
|
icon: "add",
|
|
1275
|
-
onClick: a[14] || (a[14] = () =>
|
|
1275
|
+
onClick: a[14] || (a[14] = () => p("payments"))
|
|
1276
1276
|
})
|
|
1277
1277
|
]),
|
|
1278
1278
|
(c(!0), C(L, null, H((D = (se = (ne = o.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.payments, (y, U) => (c(), C("div", {
|
|
@@ -1307,19 +1307,19 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1307
1307
|
emits: ["update:modelValue"],
|
|
1308
1308
|
setup(g) {
|
|
1309
1309
|
const o = B([]), e = Y(
|
|
1310
|
-
() => o.value.reduce((d,
|
|
1311
|
-
const b = d.length, { invoice:
|
|
1310
|
+
() => o.value.reduce((d, V) => {
|
|
1311
|
+
const b = d.length, { invoice: p, payments: u } = V;
|
|
1312
1312
|
d[b] = {
|
|
1313
|
-
no:
|
|
1314
|
-
date:
|
|
1315
|
-
contact:
|
|
1316
|
-
status:
|
|
1317
|
-
title:
|
|
1313
|
+
no: p.number,
|
|
1314
|
+
date: p.date,
|
|
1315
|
+
contact: p._contact_name,
|
|
1316
|
+
status: p.status,
|
|
1317
|
+
title: p.title
|
|
1318
1318
|
};
|
|
1319
|
-
for (let r = 0; r < Math.max(
|
|
1319
|
+
for (let r = 0; r < Math.max(p.form_items.length, u.length); r++) {
|
|
1320
1320
|
const x = b + r;
|
|
1321
1321
|
d[x] || (d[x] = {});
|
|
1322
|
-
const $ =
|
|
1322
|
+
const $ = p.form_items[r];
|
|
1323
1323
|
$ && (d[x] = {
|
|
1324
1324
|
...d[x],
|
|
1325
1325
|
itemDescription: $.description,
|
|
@@ -1329,7 +1329,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1329
1329
|
itemTaxCode: $._tax_code_name,
|
|
1330
1330
|
itemDiscount: $.discount
|
|
1331
1331
|
});
|
|
1332
|
-
const l =
|
|
1332
|
+
const l = u[r];
|
|
1333
1333
|
l && (d[x] = {
|
|
1334
1334
|
...d[x],
|
|
1335
1335
|
paymentNo: l.number,
|
|
@@ -1342,23 +1342,19 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1342
1342
|
}
|
|
1343
1343
|
return d;
|
|
1344
1344
|
}, [])
|
|
1345
|
-
), { t: n } = J(),
|
|
1345
|
+
), { t: n } = J(), k = [
|
|
1346
1346
|
{
|
|
1347
1347
|
accessorKey: "date",
|
|
1348
1348
|
header: () => I(
|
|
1349
1349
|
"p",
|
|
1350
1350
|
{ class: "min-w-[90px] text-nowrap text-ellipsis" },
|
|
1351
|
-
n("report.integration.
|
|
1351
|
+
n("report.integration.table.date")
|
|
1352
1352
|
),
|
|
1353
1353
|
enableSorting: !1
|
|
1354
1354
|
},
|
|
1355
1355
|
{
|
|
1356
1356
|
accessorKey: "no",
|
|
1357
|
-
header: () => I(
|
|
1358
|
-
"p",
|
|
1359
|
-
{ class: "min-w-[90px] text-nowrap text-ellipsis" },
|
|
1360
|
-
n("report.integration.preview.table.no")
|
|
1361
|
-
),
|
|
1357
|
+
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, n("report.integration.table.no")),
|
|
1362
1358
|
enableSorting: !1
|
|
1363
1359
|
},
|
|
1364
1360
|
{
|
|
@@ -1436,7 +1432,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1436
1432
|
header: "Skip",
|
|
1437
1433
|
enableSorting: !1
|
|
1438
1434
|
}
|
|
1439
|
-
], w = X(g, "modelValue"), _ = B(!1), F =
|
|
1435
|
+
], w = X(g, "modelValue"), _ = B(!1), F = pe(), { dateRange: h } = Ce(ue());
|
|
1440
1436
|
ve(
|
|
1441
1437
|
() => h.value,
|
|
1442
1438
|
async () => {
|
|
@@ -1455,37 +1451,37 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1455
1451
|
);
|
|
1456
1452
|
async function m() {
|
|
1457
1453
|
try {
|
|
1458
|
-
w.value._id ? (_.value = !0, await Ae(w.value._id), F.open({ message: n("report.integration.
|
|
1454
|
+
w.value._id ? (_.value = !0, await Ae(w.value._id), F.open({ message: n("report.integration.uploadSuccess"), type: "success" })) : F.open({ message: n("report.integration.error.invalid"), type: "error" });
|
|
1459
1455
|
} catch (d) {
|
|
1460
1456
|
F.open({ message: d.message, type: "error" });
|
|
1461
1457
|
} finally {
|
|
1462
1458
|
_.value = !1;
|
|
1463
1459
|
}
|
|
1464
1460
|
}
|
|
1465
|
-
return (d,
|
|
1466
|
-
const b = S("FmButton"),
|
|
1461
|
+
return (d, V) => {
|
|
1462
|
+
const b = S("FmButton"), p = S("FmCircularProgress"), u = S("FmTable");
|
|
1467
1463
|
return c(), C("div", Po, [
|
|
1468
1464
|
t("div", No, [
|
|
1469
1465
|
i(Fe, {
|
|
1470
|
-
"date-range":
|
|
1471
|
-
"onUpdate:dateRange":
|
|
1466
|
+
"date-range": v(h),
|
|
1467
|
+
"onUpdate:dateRange": V[0] || (V[0] = (r) => be(h) ? h.value = r : null),
|
|
1472
1468
|
compare: !1
|
|
1473
1469
|
}, null, 8, ["date-range"]),
|
|
1474
1470
|
i(b, {
|
|
1475
1471
|
loading: _.value,
|
|
1476
1472
|
variant: "primary",
|
|
1477
|
-
label:
|
|
1473
|
+
label: v(n)("report.common.upload"),
|
|
1478
1474
|
onClick: m
|
|
1479
1475
|
}, null, 8, ["loading", "label"])
|
|
1480
1476
|
]),
|
|
1481
1477
|
_.value ? (c(), C("div", Ro, [
|
|
1482
|
-
i(
|
|
1483
|
-
t("span", Oo, T(
|
|
1484
|
-
])) : e.value.length > 0 ? (c(), M(
|
|
1478
|
+
i(p, { size: "xl" }),
|
|
1479
|
+
t("span", Oo, T(v(n)("report.integration.table.loading")), 1)
|
|
1480
|
+
])) : e.value.length > 0 ? (c(), M(u, {
|
|
1485
1481
|
key: 1,
|
|
1486
1482
|
class: "flex overflow-scroll",
|
|
1487
1483
|
"row-data": e.value,
|
|
1488
|
-
"column-defs":
|
|
1484
|
+
"column-defs": k
|
|
1489
1485
|
}, null, 8, ["row-data"])) : N("", !0)
|
|
1490
1486
|
]);
|
|
1491
1487
|
};
|
|
@@ -1498,7 +1494,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1498
1494
|
},
|
|
1499
1495
|
emits: ["update:modelValue"],
|
|
1500
1496
|
setup(g) {
|
|
1501
|
-
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"),
|
|
1497
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), k = [
|
|
1502
1498
|
{
|
|
1503
1499
|
label: o("report.integration.setting"),
|
|
1504
1500
|
value: "setting",
|
|
@@ -1520,14 +1516,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1520
1516
|
}
|
|
1521
1517
|
});
|
|
1522
1518
|
return (F, h) => {
|
|
1523
|
-
var
|
|
1519
|
+
var V;
|
|
1524
1520
|
const m = S("FmPageHead"), d = S("FmTabs");
|
|
1525
1521
|
return c(), C("div", jo, [
|
|
1526
1522
|
i(m, {
|
|
1527
|
-
title: ((
|
|
1523
|
+
title: ((V = e.value) == null ? void 0 : V.name) || "Bukku",
|
|
1528
1524
|
"back-button": !0,
|
|
1529
1525
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
1530
|
-
"onClick:back":
|
|
1526
|
+
"onClick:back": v(w).back
|
|
1531
1527
|
}, {
|
|
1532
1528
|
description: ge(() => h[2] || (h[2] = [
|
|
1533
1529
|
t("div", null, null, -1)
|
|
@@ -1537,7 +1533,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1537
1533
|
i(d, {
|
|
1538
1534
|
"model-value": n.value,
|
|
1539
1535
|
"onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
|
|
1540
|
-
items:
|
|
1536
|
+
items: k
|
|
1541
1537
|
}, null, 8, ["model-value"]),
|
|
1542
1538
|
t("div", Lo, [
|
|
1543
1539
|
(c(), M(xe(_.value), {
|
|
@@ -1551,7 +1547,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1551
1547
|
}), zo = {
|
|
1552
1548
|
key: 0,
|
|
1553
1549
|
class: "flex flex-col h-full"
|
|
1554
|
-
}, Yo = { class: "flex flex-col gap-16 pb-[24px]" }, qo = { class: "flex flex-row justify-between items-center gap-2" }, Ho = { class: "flex flex-row gap-2 items-center" }, Xo = { class: "relative group cursor-pointer" }, Qo = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Go = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Jo = { class: "flex flex-col gap-16" }, Wo = { class: "fm-typo-en-title-sm-800" }, Zo = { class: "flex flex-row items-center max-w-[100%]" }, ea = { class: "w-[25%]" }, ta = { class: "flex-grow" }, oa = { class: "flex flex-row items-center max-w-[100%]" }, aa = { class: "w-[25%]" }, la = { class: "flex flex-row items-center max-w-[100%]" }, na = { class: "w-[25%]" }, sa = { class: "flex flex-col gap-16" }, ia = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ra = { class: "flex flex-row items-center gap-x-16" }, ma = { class: "fm-typo-en-title-sm-800" }, ca = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, da = { class: "flex flex-row items-center gap-x-16" },
|
|
1550
|
+
}, Yo = { class: "flex flex-col gap-16 pb-[24px]" }, qo = { class: "flex flex-row justify-between items-center gap-2" }, Ho = { class: "flex flex-row gap-2 items-center" }, Xo = { class: "relative group cursor-pointer" }, Qo = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Go = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Jo = { class: "flex flex-col gap-16" }, Wo = { class: "fm-typo-en-title-sm-800" }, Zo = { class: "flex flex-row items-center max-w-[100%]" }, ea = { class: "w-[25%]" }, ta = { class: "flex-grow" }, oa = { class: "flex flex-row items-center max-w-[100%]" }, aa = { class: "w-[25%]" }, la = { class: "flex flex-row items-center max-w-[100%]" }, na = { class: "w-[25%]" }, sa = { class: "flex flex-col gap-16" }, ia = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ra = { class: "flex flex-row items-center gap-x-16" }, ma = { class: "fm-typo-en-title-sm-800" }, ca = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, da = { class: "flex flex-row items-center gap-x-16" }, ua = { class: "fm-typo-en-title-sm-800" }, pa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, fa = { class: "flex flex-row items-center gap-x-16" }, va = { class: "fm-typo-en-title-sm-800" }, ga = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ya = /* @__PURE__ */ q({
|
|
1555
1551
|
__name: "Setting",
|
|
1556
1552
|
props: {
|
|
1557
1553
|
modelValue: { required: !0 },
|
|
@@ -1559,7 +1555,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1559
1555
|
},
|
|
1560
1556
|
emits: ["update:modelValue"],
|
|
1561
1557
|
setup(g) {
|
|
1562
|
-
const { t: o } = J(), e = X(g, "modelValue"), n =
|
|
1558
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = pe(), k = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = ue(), m = Y(
|
|
1563
1559
|
() => h.map((l) => ({ label: l.name, value: l.id }))
|
|
1564
1560
|
);
|
|
1565
1561
|
async function d() {
|
|
@@ -1568,30 +1564,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1568
1564
|
title: o("report.common.delete")
|
|
1569
1565
|
}) && await _(async () => {
|
|
1570
1566
|
try {
|
|
1571
|
-
await he(e.value._id), await
|
|
1567
|
+
await he(e.value._id), await k.getSettings(), w.back();
|
|
1572
1568
|
} catch (a) {
|
|
1573
1569
|
n.open({ type: "error", message: a.message });
|
|
1574
1570
|
}
|
|
1575
1571
|
});
|
|
1576
1572
|
}
|
|
1577
|
-
async function
|
|
1573
|
+
async function V() {
|
|
1578
1574
|
await _(async () => {
|
|
1579
1575
|
try {
|
|
1580
|
-
await
|
|
1576
|
+
await Ve(e.value._id, e.value), await k.getSettings();
|
|
1581
1577
|
} catch (l) {
|
|
1582
1578
|
n.open({ type: "error", message: l.message });
|
|
1583
1579
|
}
|
|
1584
1580
|
});
|
|
1585
1581
|
}
|
|
1586
1582
|
function b(l, a) {
|
|
1587
|
-
var
|
|
1588
|
-
(s = (
|
|
1583
|
+
var f, s;
|
|
1584
|
+
(s = (f = e.value.platform) == null ? void 0 : f.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
|
|
1589
1585
|
(A, P) => P !== a
|
|
1590
1586
|
));
|
|
1591
1587
|
}
|
|
1592
|
-
function
|
|
1593
|
-
var a,
|
|
1594
|
-
(
|
|
1588
|
+
function p(l) {
|
|
1589
|
+
var a, f;
|
|
1590
|
+
(f = (a = e.value.platform) == null ? void 0 : a.mappings) != null && f[l] && (e.value.platform.mappings[l] = [
|
|
1595
1591
|
...e.value.platform.mappings[l],
|
|
1596
1592
|
l === "items" ? {
|
|
1597
1593
|
key: "",
|
|
@@ -1603,7 +1599,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1603
1599
|
}
|
|
1604
1600
|
]);
|
|
1605
1601
|
}
|
|
1606
|
-
const
|
|
1602
|
+
const u = [
|
|
1607
1603
|
{
|
|
1608
1604
|
label: "By day",
|
|
1609
1605
|
value: fe.BY_DAY
|
|
@@ -1621,8 +1617,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1621
1617
|
key: l,
|
|
1622
1618
|
value: a
|
|
1623
1619
|
}) {
|
|
1624
|
-
var
|
|
1625
|
-
(s = (
|
|
1620
|
+
var f, s;
|
|
1621
|
+
(s = (f = e.value) == null ? void 0 : f.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
|
|
1626
1622
|
}
|
|
1627
1623
|
function x(l) {
|
|
1628
1624
|
return {
|
|
@@ -1633,7 +1629,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1633
1629
|
async function $() {
|
|
1634
1630
|
await _(async () => {
|
|
1635
1631
|
try {
|
|
1636
|
-
await
|
|
1632
|
+
await ke(e.value._id), await k.getSettings();
|
|
1637
1633
|
} catch (l) {
|
|
1638
1634
|
n.open({ type: "error", message: l.message });
|
|
1639
1635
|
}
|
|
@@ -1641,29 +1637,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1641
1637
|
}
|
|
1642
1638
|
return (l, a) => {
|
|
1643
1639
|
var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se;
|
|
1644
|
-
const
|
|
1640
|
+
const f = S("FmIcon"), s = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
|
|
1645
1641
|
return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), C("div", zo, [
|
|
1646
1642
|
t("div", Yo, [
|
|
1647
1643
|
t("div", qo, [
|
|
1648
1644
|
a[14] || (a[14] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
1649
1645
|
t("div", Ho, [
|
|
1650
1646
|
t("div", Xo, [
|
|
1651
|
-
i(
|
|
1647
|
+
i(f, {
|
|
1652
1648
|
name: "refresh",
|
|
1653
1649
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1654
1650
|
onClick: $
|
|
1655
1651
|
}),
|
|
1656
|
-
t("span", Qo, T(
|
|
1652
|
+
t("span", Qo, T(v(o)("report.integration.autoCount.repopulate")), 1)
|
|
1657
1653
|
]),
|
|
1658
1654
|
i(s, {
|
|
1659
1655
|
variant: "tertiary",
|
|
1660
|
-
label:
|
|
1656
|
+
label: v(o)("report.common.remove"),
|
|
1661
1657
|
onClick: d
|
|
1662
1658
|
}, null, 8, ["label"]),
|
|
1663
1659
|
i(s, {
|
|
1664
1660
|
variant: "primary",
|
|
1665
|
-
label:
|
|
1666
|
-
onClick:
|
|
1661
|
+
label: v(o)("report.common.update"),
|
|
1662
|
+
onClick: V
|
|
1667
1663
|
}, null, 8, ["label"])
|
|
1668
1664
|
])
|
|
1669
1665
|
])
|
|
@@ -1671,9 +1667,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1671
1667
|
i(A, { style: { margin: 0 } }),
|
|
1672
1668
|
t("div", Go, [
|
|
1673
1669
|
t("div", Jo, [
|
|
1674
|
-
t("div", Wo, T(
|
|
1670
|
+
t("div", Wo, T(v(o)("report.integration.autocount.general")), 1),
|
|
1675
1671
|
t("div", Zo, [
|
|
1676
|
-
t("div", ea, T(
|
|
1672
|
+
t("div", ea, T(v(o)("report.common.name")), 1),
|
|
1677
1673
|
t("div", ta, [
|
|
1678
1674
|
i(P, {
|
|
1679
1675
|
modelValue: e.value.name,
|
|
@@ -1682,7 +1678,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1682
1678
|
])
|
|
1683
1679
|
]),
|
|
1684
1680
|
t("div", oa, [
|
|
1685
|
-
t("div", aa, T(
|
|
1681
|
+
t("div", aa, T(v(o)("report.integration.location")), 1),
|
|
1686
1682
|
i(Q, {
|
|
1687
1683
|
modelValue: e.value.platform.locationIds,
|
|
1688
1684
|
"onUpdate:modelValue": a[1] || (a[1] = (D) => e.value.platform.locationIds = D),
|
|
@@ -1694,12 +1690,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1694
1690
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
1695
1691
|
]),
|
|
1696
1692
|
t("div", la, [
|
|
1697
|
-
t("div", na, T(
|
|
1693
|
+
t("div", na, T(v(o)("report.integration.autoCount.grouping.title")), 1),
|
|
1698
1694
|
i(Q, {
|
|
1699
1695
|
modelValue: e.value.platform.grouping,
|
|
1700
1696
|
"onUpdate:modelValue": a[2] || (a[2] = (D) => e.value.platform.grouping = D),
|
|
1701
1697
|
multiselect: !1,
|
|
1702
|
-
items:
|
|
1698
|
+
items: u,
|
|
1703
1699
|
placeholder: "Select grouping",
|
|
1704
1700
|
class: "flex-grow"
|
|
1705
1701
|
}, null, 8, ["modelValue"])
|
|
@@ -1774,14 +1770,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1774
1770
|
i(De, {
|
|
1775
1771
|
modelValue: e.value.platform,
|
|
1776
1772
|
"onUpdate:modelValue": a[10] || (a[10] = (D) => e.value.platform = D),
|
|
1777
|
-
label:
|
|
1773
|
+
label: v(o)("report.input.email")
|
|
1778
1774
|
}, null, 8, ["modelValue", "label"]),
|
|
1779
1775
|
t("div", ra, [
|
|
1780
|
-
t("div", ma, T(
|
|
1776
|
+
t("div", ma, T(v(o)("report.integration.items")), 1),
|
|
1781
1777
|
i(s, {
|
|
1782
1778
|
variant: "primary",
|
|
1783
1779
|
icon: "add",
|
|
1784
|
-
onClick: a[11] || (a[11] = () =>
|
|
1780
|
+
onClick: a[11] || (a[11] = () => p("items"))
|
|
1785
1781
|
})
|
|
1786
1782
|
]),
|
|
1787
1783
|
t("div", ca, [
|
|
@@ -1798,14 +1794,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1798
1794
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1799
1795
|
]),
|
|
1800
1796
|
t("div", da, [
|
|
1801
|
-
t("div",
|
|
1797
|
+
t("div", ua, T(v(o)("report.integration.taxes")), 1),
|
|
1802
1798
|
i(s, {
|
|
1803
1799
|
variant: "primary",
|
|
1804
1800
|
icon: "add",
|
|
1805
|
-
onClick: a[12] || (a[12] = () =>
|
|
1801
|
+
onClick: a[12] || (a[12] = () => p("taxes"))
|
|
1806
1802
|
})
|
|
1807
1803
|
]),
|
|
1808
|
-
t("div",
|
|
1804
|
+
t("div", pa, [
|
|
1809
1805
|
(c(!0), C(L, null, H((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.taxes, (D, y) => (c(), M(K, {
|
|
1810
1806
|
key: `tax-${y}`,
|
|
1811
1807
|
modelValue: e.value.platform.mappings.taxes[y],
|
|
@@ -1819,11 +1815,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1819
1815
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1820
1816
|
]),
|
|
1821
1817
|
t("div", fa, [
|
|
1822
|
-
t("div", va, T(
|
|
1818
|
+
t("div", va, T(v(o)("report.integration.payments")), 1),
|
|
1823
1819
|
i(s, {
|
|
1824
1820
|
variant: "primary",
|
|
1825
1821
|
icon: "add",
|
|
1826
|
-
onClick: a[13] || (a[13] = () =>
|
|
1822
|
+
onClick: a[13] || (a[13] = () => p("payments"))
|
|
1827
1823
|
})
|
|
1828
1824
|
]),
|
|
1829
1825
|
t("div", ga, [
|
|
@@ -1855,35 +1851,35 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1855
1851
|
emits: ["update:modelValue"],
|
|
1856
1852
|
setup(g) {
|
|
1857
1853
|
const { t: o } = J(), e = B([]), n = Y(
|
|
1858
|
-
() => e.value.reduce((d,
|
|
1859
|
-
const b = d.length, { invoice:
|
|
1854
|
+
() => e.value.reduce((d, V) => {
|
|
1855
|
+
const b = d.length, { invoice: p, payments: u } = V;
|
|
1860
1856
|
d[b] = {
|
|
1861
|
-
date:
|
|
1862
|
-
docNo:
|
|
1863
|
-
projNo:
|
|
1864
|
-
debtor:
|
|
1865
|
-
description:
|
|
1857
|
+
date: p.DocDate,
|
|
1858
|
+
docNo: p.DocNo,
|
|
1859
|
+
projNo: p.ProjNo,
|
|
1860
|
+
debtor: p.DebtorCode,
|
|
1861
|
+
description: p.Description
|
|
1866
1862
|
};
|
|
1867
|
-
for (let r = 0; r < Math.max(
|
|
1863
|
+
for (let r = 0; r < Math.max(p._items.length, u.length); r++) {
|
|
1868
1864
|
const x = b + r;
|
|
1869
|
-
d[x] || (d[x] = {}),
|
|
1865
|
+
d[x] || (d[x] = {}), p._items[r] && (d[x] = {
|
|
1870
1866
|
...d[x],
|
|
1871
|
-
itemDescription:
|
|
1872
|
-
itemUnitPrice:
|
|
1873
|
-
itemAccount:
|
|
1874
|
-
itemTaxCode:
|
|
1875
|
-
itemTax:
|
|
1876
|
-
}),
|
|
1867
|
+
itemDescription: p._items[r].DetailDescription,
|
|
1868
|
+
itemUnitPrice: p._items[r].Amount,
|
|
1869
|
+
itemAccount: p._items[r].AccNo,
|
|
1870
|
+
itemTaxCode: p._items[r].TaxType,
|
|
1871
|
+
itemTax: p._items[r].Tax
|
|
1872
|
+
}), u[r] && (d[x] = {
|
|
1877
1873
|
...d[x],
|
|
1878
|
-
paymentDocNo:
|
|
1879
|
-
paymentMethod:
|
|
1880
|
-
paymentDescription:
|
|
1881
|
-
paymentAmount:
|
|
1874
|
+
paymentDocNo: u[r].DocNo,
|
|
1875
|
+
paymentMethod: u[r].paymentMethod,
|
|
1876
|
+
paymentDescription: u[r].Description,
|
|
1877
|
+
paymentAmount: u[r].PaymentAmt
|
|
1882
1878
|
});
|
|
1883
1879
|
}
|
|
1884
1880
|
return d;
|
|
1885
1881
|
}, [])
|
|
1886
|
-
),
|
|
1882
|
+
), k = [
|
|
1887
1883
|
{
|
|
1888
1884
|
accessorKey: "date",
|
|
1889
1885
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -1954,7 +1950,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1954
1950
|
header: "Payment Amount",
|
|
1955
1951
|
enableSorting: !1
|
|
1956
1952
|
}
|
|
1957
|
-
], w = X(g, "modelValue"), _ = B(!1), F =
|
|
1953
|
+
], w = X(g, "modelValue"), _ = B(!1), F = pe(), { dateRange: h } = Ce(ue());
|
|
1958
1954
|
ve(
|
|
1959
1955
|
() => h.value,
|
|
1960
1956
|
async () => {
|
|
@@ -1980,35 +1976,35 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1980
1976
|
_.value = !1;
|
|
1981
1977
|
}
|
|
1982
1978
|
}
|
|
1983
|
-
return (d,
|
|
1984
|
-
const b = S("FmButton"),
|
|
1979
|
+
return (d, V) => {
|
|
1980
|
+
const b = S("FmButton"), p = S("FmCircularProgress"), u = S("FmTable");
|
|
1985
1981
|
return c(), C("div", xa, [
|
|
1986
1982
|
t("div", _a, [
|
|
1987
1983
|
i(Fe, {
|
|
1988
|
-
"date-range":
|
|
1989
|
-
"onUpdate:dateRange":
|
|
1984
|
+
"date-range": v(h),
|
|
1985
|
+
"onUpdate:dateRange": V[0] || (V[0] = (r) => be(h) ? h.value = r : null),
|
|
1990
1986
|
compare: !1
|
|
1991
1987
|
}, null, 8, ["date-range"]),
|
|
1992
1988
|
i(b, {
|
|
1993
1989
|
loading: _.value,
|
|
1994
1990
|
variant: "primary",
|
|
1995
|
-
label:
|
|
1991
|
+
label: v(o)("report.common.download"),
|
|
1996
1992
|
onClick: m
|
|
1997
1993
|
}, null, 8, ["loading", "label"])
|
|
1998
1994
|
]),
|
|
1999
1995
|
_.value ? (c(), C("div", ba, [
|
|
2000
|
-
i(
|
|
2001
|
-
t("span", wa, T(
|
|
2002
|
-
])) : n.value.length > 0 ? (c(), M(
|
|
1996
|
+
i(p, { size: "xl" }),
|
|
1997
|
+
t("span", wa, T(v(o)("report.common.isLoading")), 1)
|
|
1998
|
+
])) : n.value.length > 0 ? (c(), M(u, {
|
|
2003
1999
|
key: 1,
|
|
2004
2000
|
class: "flex overflow-scroll",
|
|
2005
2001
|
"row-data": n.value,
|
|
2006
|
-
"column-defs":
|
|
2002
|
+
"column-defs": k
|
|
2007
2003
|
}, null, 8, ["row-data"])) : N("", !0)
|
|
2008
2004
|
]);
|
|
2009
2005
|
};
|
|
2010
2006
|
}
|
|
2011
|
-
}),
|
|
2007
|
+
}), Va = { class: "h-full relative flex flex-col" }, ka = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, $a = /* @__PURE__ */ q({
|
|
2012
2008
|
__name: "AutoCount",
|
|
2013
2009
|
props: {
|
|
2014
2010
|
modelValue: {},
|
|
@@ -2016,7 +2012,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2016
2012
|
},
|
|
2017
2013
|
emits: ["update:modelValue"],
|
|
2018
2014
|
setup(g) {
|
|
2019
|
-
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"),
|
|
2015
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), k = [
|
|
2020
2016
|
{
|
|
2021
2017
|
label: o("report.integration.setting"),
|
|
2022
2018
|
value: "setting",
|
|
@@ -2038,14 +2034,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2038
2034
|
}
|
|
2039
2035
|
});
|
|
2040
2036
|
return (F, h) => {
|
|
2041
|
-
var
|
|
2037
|
+
var V;
|
|
2042
2038
|
const m = S("FmPageHead"), d = S("FmTabs");
|
|
2043
|
-
return c(), C("div",
|
|
2039
|
+
return c(), C("div", Va, [
|
|
2044
2040
|
i(m, {
|
|
2045
|
-
title: ((
|
|
2041
|
+
title: ((V = e.value) == null ? void 0 : V.name) || "AutoCount",
|
|
2046
2042
|
"back-button": !0,
|
|
2047
2043
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2048
|
-
"onClick:back":
|
|
2044
|
+
"onClick:back": v(w).back
|
|
2049
2045
|
}, {
|
|
2050
2046
|
description: ge(() => h[2] || (h[2] = [
|
|
2051
2047
|
t("div", null, null, -1)
|
|
@@ -2055,9 +2051,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2055
2051
|
i(d, {
|
|
2056
2052
|
"model-value": n.value,
|
|
2057
2053
|
"onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
|
|
2058
|
-
items:
|
|
2054
|
+
items: k
|
|
2059
2055
|
}, null, 8, ["model-value"]),
|
|
2060
|
-
t("div",
|
|
2056
|
+
t("div", ka, [
|
|
2061
2057
|
(c(), M(xe(_.value), {
|
|
2062
2058
|
modelValue: e.value,
|
|
2063
2059
|
"onUpdate:modelValue": h[1] || (h[1] = (b) => e.value = b)
|
|
@@ -2077,7 +2073,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2077
2073
|
},
|
|
2078
2074
|
emits: ["update:modelValue"],
|
|
2079
2075
|
setup(g) {
|
|
2080
|
-
const { t: o } = J(), e = X(g, "modelValue"), n =
|
|
2076
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = pe(), k = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = ue(), m = Y(
|
|
2081
2077
|
() => h.map((l) => ({ label: l.name, value: l.id }))
|
|
2082
2078
|
);
|
|
2083
2079
|
async function d() {
|
|
@@ -2086,30 +2082,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2086
2082
|
title: o("report.common.delete")
|
|
2087
2083
|
}) && await _(async () => {
|
|
2088
2084
|
try {
|
|
2089
|
-
await he(e.value._id), await
|
|
2085
|
+
await he(e.value._id), await k.getSettings(), w.back();
|
|
2090
2086
|
} catch (a) {
|
|
2091
2087
|
n.open({ type: "error", message: a.message });
|
|
2092
2088
|
}
|
|
2093
2089
|
});
|
|
2094
2090
|
}
|
|
2095
|
-
async function
|
|
2091
|
+
async function V() {
|
|
2096
2092
|
await _(async () => {
|
|
2097
2093
|
try {
|
|
2098
|
-
await
|
|
2094
|
+
await Ve(e.value._id, e.value), await k.getSettings();
|
|
2099
2095
|
} catch (l) {
|
|
2100
2096
|
n.open({ type: "error", message: l.message });
|
|
2101
2097
|
}
|
|
2102
2098
|
});
|
|
2103
2099
|
}
|
|
2104
2100
|
function b(l, a) {
|
|
2105
|
-
var
|
|
2106
|
-
(s = (
|
|
2101
|
+
var f, s;
|
|
2102
|
+
(s = (f = e.value.platform) == null ? void 0 : f.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
|
|
2107
2103
|
(A, P) => P !== a
|
|
2108
2104
|
));
|
|
2109
2105
|
}
|
|
2110
|
-
function
|
|
2111
|
-
var a,
|
|
2112
|
-
(
|
|
2106
|
+
function p(l) {
|
|
2107
|
+
var a, f;
|
|
2108
|
+
(f = (a = e.value.platform) == null ? void 0 : a.mappings) != null && f[l] && (e.value.platform.mappings[l] = [
|
|
2113
2109
|
...e.value.platform.mappings[l],
|
|
2114
2110
|
l === "items" ? {
|
|
2115
2111
|
key: "",
|
|
@@ -2122,7 +2118,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2122
2118
|
}
|
|
2123
2119
|
]);
|
|
2124
2120
|
}
|
|
2125
|
-
const
|
|
2121
|
+
const u = [
|
|
2126
2122
|
{
|
|
2127
2123
|
label: "By day",
|
|
2128
2124
|
value: fe.BY_DAY
|
|
@@ -2140,8 +2136,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2140
2136
|
key: l,
|
|
2141
2137
|
value: a
|
|
2142
2138
|
}) {
|
|
2143
|
-
var
|
|
2144
|
-
(s = (
|
|
2139
|
+
var f, s;
|
|
2140
|
+
(s = (f = e.value) == null ? void 0 : f.platform) != null && s.mappings && (e.value.platform.mappings[l] = a);
|
|
2145
2141
|
}
|
|
2146
2142
|
function x(l) {
|
|
2147
2143
|
return {
|
|
@@ -2152,7 +2148,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2152
2148
|
async function $() {
|
|
2153
2149
|
await _(async () => {
|
|
2154
2150
|
try {
|
|
2155
|
-
await
|
|
2151
|
+
await ke(e.value._id), await k.getSettings();
|
|
2156
2152
|
} catch (l) {
|
|
2157
2153
|
n.open({ type: "error", message: l.message });
|
|
2158
2154
|
}
|
|
@@ -2160,29 +2156,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2160
2156
|
}
|
|
2161
2157
|
return (l, a) => {
|
|
2162
2158
|
var E, G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se;
|
|
2163
|
-
const
|
|
2159
|
+
const f = S("FmIcon"), s = S("FmButton"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmSelect");
|
|
2164
2160
|
return (G = (E = e.value) == null ? void 0 : E.platform) != null && G.mappings ? (c(), C("div", Sa, [
|
|
2165
2161
|
t("div", Ca, [
|
|
2166
2162
|
t("div", Fa, [
|
|
2167
2163
|
a[15] || (a[15] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
2168
2164
|
t("div", Da, [
|
|
2169
2165
|
t("div", Ua, [
|
|
2170
|
-
i(
|
|
2166
|
+
i(f, {
|
|
2171
2167
|
name: "refresh",
|
|
2172
2168
|
class: "p-2 bg-gray-100 rounded-full",
|
|
2173
2169
|
onClick: $
|
|
2174
2170
|
}),
|
|
2175
|
-
t("span", Ta, T(
|
|
2171
|
+
t("span", Ta, T(v(o)("report.integration.refreshSetting")), 1)
|
|
2176
2172
|
]),
|
|
2177
2173
|
i(s, {
|
|
2178
2174
|
variant: "tertiary",
|
|
2179
|
-
label:
|
|
2175
|
+
label: v(o)("report.common.delete"),
|
|
2180
2176
|
onClick: d
|
|
2181
2177
|
}, null, 8, ["label"]),
|
|
2182
2178
|
i(s, {
|
|
2183
2179
|
variant: "primary",
|
|
2184
|
-
label:
|
|
2185
|
-
onClick:
|
|
2180
|
+
label: v(o)("report.common.update"),
|
|
2181
|
+
onClick: V
|
|
2186
2182
|
}, null, 8, ["label"])
|
|
2187
2183
|
])
|
|
2188
2184
|
])
|
|
@@ -2190,9 +2186,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2190
2186
|
i(A, { style: { margin: 0 } }),
|
|
2191
2187
|
t("div", Ia, [
|
|
2192
2188
|
t("div", Ma, [
|
|
2193
|
-
t("div", Ka, T(
|
|
2189
|
+
t("div", Ka, T(v(o)("report.integration.sql.general")), 1),
|
|
2194
2190
|
t("div", Aa, [
|
|
2195
|
-
t("div", Pa, T(
|
|
2191
|
+
t("div", Pa, T(v(o)("report.common.name")), 1),
|
|
2196
2192
|
t("div", Na, [
|
|
2197
2193
|
i(P, {
|
|
2198
2194
|
modelValue: e.value.name,
|
|
@@ -2201,7 +2197,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2201
2197
|
])
|
|
2202
2198
|
]),
|
|
2203
2199
|
t("div", Ra, [
|
|
2204
|
-
t("div", Oa, T(
|
|
2200
|
+
t("div", Oa, T(v(o)("report.integration.location")), 1),
|
|
2205
2201
|
i(Q, {
|
|
2206
2202
|
modelValue: e.value.platform.locationIds,
|
|
2207
2203
|
"onUpdate:modelValue": a[1] || (a[1] = (D) => e.value.platform.locationIds = D),
|
|
@@ -2213,12 +2209,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2213
2209
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
2214
2210
|
]),
|
|
2215
2211
|
t("div", Ba, [
|
|
2216
|
-
t("div", ja, T(
|
|
2212
|
+
t("div", ja, T(v(o)("report.integration.grouping")), 1),
|
|
2217
2213
|
i(Q, {
|
|
2218
2214
|
modelValue: e.value.platform.grouping,
|
|
2219
2215
|
"onUpdate:modelValue": a[2] || (a[2] = (D) => e.value.platform.grouping = D),
|
|
2220
2216
|
multiselect: !1,
|
|
2221
|
-
items:
|
|
2217
|
+
items: u,
|
|
2222
2218
|
placeholder: "Select grouping",
|
|
2223
2219
|
class: "flex-grow"
|
|
2224
2220
|
}, null, 8, ["modelValue"])
|
|
@@ -2315,12 +2311,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2315
2311
|
label: "email"
|
|
2316
2312
|
}, null, 8, ["modelValue"]),
|
|
2317
2313
|
t("div", Ya, [
|
|
2318
|
-
t("div", qa, T(
|
|
2314
|
+
t("div", qa, T(v(o)("report.integration.items")), 1),
|
|
2319
2315
|
i(s, {
|
|
2320
2316
|
variant: "primary",
|
|
2321
|
-
|
|
2322
|
-
onClick: a[12] || (a[12] = () =>
|
|
2323
|
-
}
|
|
2317
|
+
icon: "add",
|
|
2318
|
+
onClick: a[12] || (a[12] = () => p("items"))
|
|
2319
|
+
})
|
|
2324
2320
|
]),
|
|
2325
2321
|
t("div", Ha, [
|
|
2326
2322
|
(c(!0), C(L, null, H((ee = (Z = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : Z.mappings) == null ? void 0 : ee.items, (D, y) => (c(), M(K, {
|
|
@@ -2337,11 +2333,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2337
2333
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2338
2334
|
]),
|
|
2339
2335
|
t("div", Xa, [
|
|
2340
|
-
t("div", Qa, T(
|
|
2336
|
+
t("div", Qa, T(v(o)("report.integration.taxes")), 1),
|
|
2341
2337
|
i(s, {
|
|
2342
2338
|
variant: "primary",
|
|
2343
2339
|
icon: "add",
|
|
2344
|
-
onClick: a[13] || (a[13] = () =>
|
|
2340
|
+
onClick: a[13] || (a[13] = () => p("taxes"))
|
|
2345
2341
|
})
|
|
2346
2342
|
]),
|
|
2347
2343
|
t("div", Ga, [
|
|
@@ -2358,11 +2354,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2358
2354
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2359
2355
|
]),
|
|
2360
2356
|
t("div", Ja, [
|
|
2361
|
-
t("div", Wa, T(
|
|
2357
|
+
t("div", Wa, T(v(o)("report.integration.payments")), 1),
|
|
2362
2358
|
i(s, {
|
|
2363
2359
|
variant: "primary",
|
|
2364
2360
|
icon: "add",
|
|
2365
|
-
onClick: a[14] || (a[14] = () =>
|
|
2361
|
+
onClick: a[14] || (a[14] = () => p("payments"))
|
|
2366
2362
|
})
|
|
2367
2363
|
]),
|
|
2368
2364
|
t("div", Za, [
|
|
@@ -2394,35 +2390,35 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2394
2390
|
emits: ["update:modelValue"],
|
|
2395
2391
|
setup(g) {
|
|
2396
2392
|
const { t: o } = J(), e = B([]), n = Y(
|
|
2397
|
-
() => e.value.reduce((d,
|
|
2398
|
-
const b = d.length, { invoice:
|
|
2393
|
+
() => e.value.reduce((d, V) => {
|
|
2394
|
+
const b = d.length, { invoice: p, payments: u } = V;
|
|
2399
2395
|
d[b] = {
|
|
2400
|
-
date:
|
|
2401
|
-
docNo:
|
|
2402
|
-
debtor:
|
|
2403
|
-
description:
|
|
2396
|
+
date: p.DocDate,
|
|
2397
|
+
docNo: p.DocNo,
|
|
2398
|
+
debtor: p.Code,
|
|
2399
|
+
description: p.Description_HDR
|
|
2404
2400
|
};
|
|
2405
|
-
for (let r = 0; r < Math.max(
|
|
2401
|
+
for (let r = 0; r < Math.max(p._items.length, u.length); r++) {
|
|
2406
2402
|
const x = b + r;
|
|
2407
|
-
d[x] || (d[x] = {}),
|
|
2403
|
+
d[x] || (d[x] = {}), p._items[r] && (d[x] = {
|
|
2408
2404
|
...d[x],
|
|
2409
|
-
itemDescription:
|
|
2410
|
-
itemUnitPrice:
|
|
2411
|
-
itemAccount:
|
|
2412
|
-
itemTaxCode:
|
|
2413
|
-
itemTax:
|
|
2414
|
-
}),
|
|
2405
|
+
itemDescription: p._items[r].Description_DTL,
|
|
2406
|
+
itemUnitPrice: p._items[r].UnitPrice,
|
|
2407
|
+
itemAccount: p._items[r].ACCOUNT,
|
|
2408
|
+
itemTaxCode: p._items[r].Tax,
|
|
2409
|
+
itemTax: p._items[r].TaxAmt
|
|
2410
|
+
}), u[r] && (d[x] = {
|
|
2415
2411
|
...d[x],
|
|
2416
|
-
paymentDocNo:
|
|
2417
|
-
paymentMethod:
|
|
2418
|
-
paymentAccount:
|
|
2419
|
-
paymentDescription:
|
|
2420
|
-
paymentAmount:
|
|
2412
|
+
paymentDocNo: u[r].DOCNO_Header,
|
|
2413
|
+
paymentMethod: u[r].PAYMENTMETHOD,
|
|
2414
|
+
paymentAccount: u[r].CODE,
|
|
2415
|
+
paymentDescription: u[r].DESCRIPTION,
|
|
2416
|
+
paymentAmount: u[r].KOAMT
|
|
2421
2417
|
});
|
|
2422
2418
|
}
|
|
2423
2419
|
return d;
|
|
2424
2420
|
}, [])
|
|
2425
|
-
),
|
|
2421
|
+
), k = [
|
|
2426
2422
|
{
|
|
2427
2423
|
accessorKey: "date",
|
|
2428
2424
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -2488,7 +2484,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2488
2484
|
header: "Payment Amount",
|
|
2489
2485
|
enableSorting: !1
|
|
2490
2486
|
}
|
|
2491
|
-
], w = X(g, "modelValue"), _ = B(!1), F =
|
|
2487
|
+
], w = X(g, "modelValue"), _ = B(!1), F = pe(), { dateRange: h } = Ce(ue());
|
|
2492
2488
|
ve(
|
|
2493
2489
|
() => h.value,
|
|
2494
2490
|
async () => {
|
|
@@ -2514,30 +2510,30 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2514
2510
|
_.value = !1;
|
|
2515
2511
|
}
|
|
2516
2512
|
}
|
|
2517
|
-
return (d,
|
|
2518
|
-
const b = S("FmButton"),
|
|
2513
|
+
return (d, V) => {
|
|
2514
|
+
const b = S("FmButton"), p = S("FmCircularProgress"), u = S("FmTable");
|
|
2519
2515
|
return c(), C("div", tl, [
|
|
2520
2516
|
t("div", ol, [
|
|
2521
2517
|
i(Fe, {
|
|
2522
|
-
"date-range":
|
|
2523
|
-
"onUpdate:dateRange":
|
|
2518
|
+
"date-range": v(h),
|
|
2519
|
+
"onUpdate:dateRange": V[0] || (V[0] = (r) => be(h) ? h.value = r : null),
|
|
2524
2520
|
compare: !1
|
|
2525
2521
|
}, null, 8, ["date-range"]),
|
|
2526
2522
|
i(b, {
|
|
2527
2523
|
loading: _.value,
|
|
2528
2524
|
variant: "primary",
|
|
2529
|
-
label:
|
|
2525
|
+
label: v(o)("report.common.download"),
|
|
2530
2526
|
onClick: m
|
|
2531
2527
|
}, null, 8, ["loading", "label"])
|
|
2532
2528
|
]),
|
|
2533
2529
|
_.value ? (c(), C("div", al, [
|
|
2534
|
-
i(
|
|
2535
|
-
t("span", ll, T(
|
|
2536
|
-
])) : n.value.length > 0 ? (c(), M(
|
|
2530
|
+
i(p, { size: "xl" }),
|
|
2531
|
+
t("span", ll, T(v(o)("report.common.isLoading")), 1)
|
|
2532
|
+
])) : n.value.length > 0 ? (c(), M(u, {
|
|
2537
2533
|
key: 1,
|
|
2538
2534
|
class: "flex overflow-scroll",
|
|
2539
2535
|
"row-data": n.value,
|
|
2540
|
-
"column-defs":
|
|
2536
|
+
"column-defs": k
|
|
2541
2537
|
}, null, 8, ["row-data"])) : N("", !0)
|
|
2542
2538
|
]);
|
|
2543
2539
|
};
|
|
@@ -2550,7 +2546,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2550
2546
|
},
|
|
2551
2547
|
emits: ["update:modelValue"],
|
|
2552
2548
|
setup(g) {
|
|
2553
|
-
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"),
|
|
2549
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), k = [
|
|
2554
2550
|
{
|
|
2555
2551
|
label: o("report.integration.setting"),
|
|
2556
2552
|
value: "setting",
|
|
@@ -2572,14 +2568,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2572
2568
|
}
|
|
2573
2569
|
});
|
|
2574
2570
|
return (F, h) => {
|
|
2575
|
-
var
|
|
2571
|
+
var V;
|
|
2576
2572
|
const m = S("FmPageHead"), d = S("FmTabs");
|
|
2577
2573
|
return c(), C("div", sl, [
|
|
2578
2574
|
i(m, {
|
|
2579
|
-
title: ((
|
|
2575
|
+
title: ((V = e.value) == null ? void 0 : V.name) || "SQL",
|
|
2580
2576
|
"back-button": !0,
|
|
2581
2577
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2582
|
-
"onClick:back":
|
|
2578
|
+
"onClick:back": v(w).back
|
|
2583
2579
|
}, {
|
|
2584
2580
|
description: ge(() => h[2] || (h[2] = [
|
|
2585
2581
|
t("div", null, null, -1)
|
|
@@ -2589,7 +2585,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2589
2585
|
i(d, {
|
|
2590
2586
|
"model-value": n.value,
|
|
2591
2587
|
"onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
|
|
2592
|
-
items:
|
|
2588
|
+
items: k
|
|
2593
2589
|
}, null, 8, ["model-value"]),
|
|
2594
2590
|
t("div", il, [
|
|
2595
2591
|
(c(), M(xe(_.value), {
|
|
@@ -2603,7 +2599,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2603
2599
|
}), ml = {
|
|
2604
2600
|
key: 0,
|
|
2605
2601
|
class: "flex flex-col h-full"
|
|
2606
|
-
}, cl = { class: "flex flex-col gap-16 pb-[24px]" }, dl = { class: "flex flex-row justify-between items-center gap-2" },
|
|
2602
|
+
}, cl = { class: "flex flex-col gap-16 pb-[24px]" }, dl = { class: "flex flex-row justify-between items-center gap-2" }, ul = { class: "fm-typo-en-title-sm-800" }, pl = { class: "flex flex-row gap-2 items-center" }, fl = { class: "flex flex-row gap-2 items-center" }, vl = { class: "relative group cursor-pointer" }, gl = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, yl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, xl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _l = { class: "flex flex-row items-center max-w-[100%]" }, bl = { class: "w-[25%]" }, wl = { class: "flex-grow" }, hl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Vl = { class: "flex flex-row items-center justify-between" }, kl = { class: "w-[25%]" }, $l = { class: "flex-grow" }, Sl = { class: "flex flex-row items-center justify-between" }, Cl = { class: "w-[25%]" }, Fl = { class: "flex-grow" }, Dl = { class: "flex flex-col gap-16" }, Ul = { class: "fm-typo-en-title-sm-800" }, Tl = { class: "flex flex-row items-center max-w-[100%]" }, Il = { class: "w-[25%]" }, Ml = { class: "flex-grow" }, Kl = { class: "flex flex-row items-center max-w-[100%]" }, Al = { class: "w-[25%]" }, Pl = { class: "flex flex-row items-center max-w-[100%]" }, Nl = { class: "w-[25%]" }, Rl = {
|
|
2607
2603
|
key: 0,
|
|
2608
2604
|
class: "flex flex-row items-center max-w-[100%]"
|
|
2609
2605
|
}, Ol = { class: "flex flex-col gap-16" }, Bl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, jl = { key: 1 }, Ll = { class: "flex flex-row items-center gap-x-16" }, El = { class: "fm-typo-en-title-sm-800" }, zl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Yl = { class: "flex flex-row items-center gap-x-16" }, ql = { class: "fm-typo-en-title-sm-800" }, Hl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Xl = { class: "flex flex-row items-center gap-x-16" }, Ql = { class: "fm-typo-en-title-sm-800" }, Gl = { class: "flex flex-row items-center justify-between" }, Jl = { class: "flex-grow" }, Wl = {
|
|
@@ -2635,23 +2631,23 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2635
2631
|
}),
|
|
2636
2632
|
emits: ["update:modelValue"],
|
|
2637
2633
|
setup(g) {
|
|
2638
|
-
const { t: o } = J(), e = X(g, "modelValue"), n =
|
|
2634
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = pe(), k = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = ue(), m = Y(
|
|
2639
2635
|
() => h.map(($) => ({ label: $.name, value: $.id }))
|
|
2640
2636
|
);
|
|
2641
2637
|
function d($) {
|
|
2642
2638
|
var l;
|
|
2643
2639
|
!((l = g.retrievedMethods) != null && l.data) || !Array.isArray(g.retrievedMethods.data) || $.forEach((a) => {
|
|
2644
|
-
const
|
|
2645
|
-
|
|
2640
|
+
const f = g.retrievedMethods.data.find((s) => s.value == a.id);
|
|
2641
|
+
f && (a.cnId = f.cnId);
|
|
2646
2642
|
});
|
|
2647
2643
|
}
|
|
2648
|
-
async function
|
|
2644
|
+
async function V() {
|
|
2649
2645
|
await F({
|
|
2650
2646
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
2651
2647
|
title: o("report.common.delete")
|
|
2652
2648
|
}) && await _(async () => {
|
|
2653
2649
|
try {
|
|
2654
|
-
await he(e.value._id), await
|
|
2650
|
+
await he(e.value._id), await k.getSettings(), w.back();
|
|
2655
2651
|
} catch (l) {
|
|
2656
2652
|
n.open({ type: "error", message: l.message });
|
|
2657
2653
|
}
|
|
@@ -2661,19 +2657,19 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2661
2657
|
await _(async () => {
|
|
2662
2658
|
var $, l, a;
|
|
2663
2659
|
try {
|
|
2664
|
-
(a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && d(e.value.platform.mappings.paymentMethods), await
|
|
2665
|
-
} catch (
|
|
2666
|
-
n.open({ type: "error", message:
|
|
2660
|
+
(a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && d(e.value.platform.mappings.paymentMethods), await Ve(e.value._id, e.value), await k.getSettings();
|
|
2661
|
+
} catch (f) {
|
|
2662
|
+
n.open({ type: "error", message: f.message });
|
|
2667
2663
|
}
|
|
2668
2664
|
});
|
|
2669
2665
|
}
|
|
2670
|
-
function
|
|
2671
|
-
var a,
|
|
2672
|
-
(
|
|
2666
|
+
function p($, l) {
|
|
2667
|
+
var a, f;
|
|
2668
|
+
(f = (a = e.value.platform) == null ? void 0 : a.mappings) != null && f[$] && (e.value.platform.mappings[$] = e.value.platform.mappings[$].filter(
|
|
2673
2669
|
(s, A) => A !== l
|
|
2674
2670
|
));
|
|
2675
2671
|
}
|
|
2676
|
-
function
|
|
2672
|
+
function u($) {
|
|
2677
2673
|
var l, a;
|
|
2678
2674
|
(a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[$] && (e.value.platform.mappings[$] = [
|
|
2679
2675
|
...e.value.platform.mappings[$],
|
|
@@ -2704,10 +2700,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2704
2700
|
($) => {
|
|
2705
2701
|
$ && $.forEach((l, a) => {
|
|
2706
2702
|
var A;
|
|
2707
|
-
const
|
|
2703
|
+
const f = l.key || "";
|
|
2708
2704
|
let s = l.account;
|
|
2709
|
-
if (!s &&
|
|
2710
|
-
switch (
|
|
2705
|
+
if (!s && f) {
|
|
2706
|
+
switch (f) {
|
|
2711
2707
|
case "SST_SV":
|
|
2712
2708
|
s = "SST-6";
|
|
2713
2709
|
break;
|
|
@@ -2732,8 +2728,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2732
2728
|
return (a = (l = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.version;
|
|
2733
2729
|
},
|
|
2734
2730
|
($) => {
|
|
2735
|
-
var l, a,
|
|
2736
|
-
$ === "v1" && !((
|
|
2731
|
+
var l, a, f, s, A;
|
|
2732
|
+
$ === "v1" && !((f = (a = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : a.mappings) != null && f.payee) && (A = (s = e.value) == null ? void 0 : s.platform) != null && A.mappings && (e.value.platform.mappings.payee = {
|
|
2737
2733
|
id: 1,
|
|
2738
2734
|
name: ""
|
|
2739
2735
|
});
|
|
@@ -2743,7 +2739,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2743
2739
|
async function x() {
|
|
2744
2740
|
await _(async () => {
|
|
2745
2741
|
try {
|
|
2746
|
-
await
|
|
2742
|
+
await ke(e.value._id), await k.getSettings();
|
|
2747
2743
|
} catch ($) {
|
|
2748
2744
|
n.open({ type: "error", message: $.message });
|
|
2749
2745
|
}
|
|
@@ -2751,12 +2747,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2751
2747
|
}
|
|
2752
2748
|
return ($, l) => {
|
|
2753
2749
|
var G, R, j, z, W, Z, ee, te, oe, ae, le, ne, se, D;
|
|
2754
|
-
const a = S("FmIcon"),
|
|
2750
|
+
const a = S("FmIcon"), f = S("FmButton"), s = S("FmSelect"), A = S("FmMenuDivider"), P = S("FmTextField"), Q = S("FmCircularProgress"), E = S("FmCheckbox");
|
|
2755
2751
|
return (R = (G = e.value) == null ? void 0 : G.platform) != null && R.mappings ? (c(), C("div", ml, [
|
|
2756
2752
|
t("div", cl, [
|
|
2757
2753
|
t("div", dl, [
|
|
2758
|
-
t("div",
|
|
2759
|
-
t("div",
|
|
2754
|
+
t("div", ul, T(v(o)("report.integration.connect")), 1),
|
|
2755
|
+
t("div", pl, [
|
|
2760
2756
|
t("div", fl, [
|
|
2761
2757
|
t("div", vl, [
|
|
2762
2758
|
i(a, {
|
|
@@ -2764,16 +2760,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2764
2760
|
class: "p-2 bg-gray-100 rounded-full",
|
|
2765
2761
|
onClick: x
|
|
2766
2762
|
}),
|
|
2767
|
-
t("span", gl, T(
|
|
2763
|
+
t("span", gl, T(v(o)("report.integration.refreshSetting")), 1)
|
|
2768
2764
|
]),
|
|
2769
|
-
i(
|
|
2765
|
+
i(f, {
|
|
2770
2766
|
variant: "tertiary",
|
|
2771
|
-
label:
|
|
2772
|
-
onClick:
|
|
2767
|
+
label: v(o)("report.common.delete"),
|
|
2768
|
+
onClick: V
|
|
2773
2769
|
}, null, 8, ["label"]),
|
|
2774
|
-
i(
|
|
2770
|
+
i(f, {
|
|
2775
2771
|
variant: "primary",
|
|
2776
|
-
label:
|
|
2772
|
+
label: v(o)("report.common.update"),
|
|
2777
2773
|
onClick: b
|
|
2778
2774
|
}, null, 8, ["label"])
|
|
2779
2775
|
])
|
|
@@ -2781,9 +2777,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2781
2777
|
])
|
|
2782
2778
|
]),
|
|
2783
2779
|
t("div", yl, [
|
|
2784
|
-
t("div", xl, T(
|
|
2780
|
+
t("div", xl, T(v(o)("report.integration.biztory.authenticate")), 1),
|
|
2785
2781
|
t("div", _l, [
|
|
2786
|
-
t("div", bl, "Biztory " + T(
|
|
2782
|
+
t("div", bl, "Biztory " + T(v(o)("report.integration.biztory.version")), 1),
|
|
2787
2783
|
t("div", wl, [
|
|
2788
2784
|
i(s, {
|
|
2789
2785
|
modelValue: e.value.platform.mappings.version,
|
|
@@ -2798,8 +2794,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2798
2794
|
]),
|
|
2799
2795
|
i(A, { style: { margin: 0 } }),
|
|
2800
2796
|
t("div", hl, [
|
|
2801
|
-
t("div",
|
|
2802
|
-
t("div",
|
|
2797
|
+
t("div", Vl, [
|
|
2798
|
+
t("div", kl, T(v(o)("report.integration.biztory.subdomain")), 1),
|
|
2803
2799
|
t("div", $l, [
|
|
2804
2800
|
i(P, {
|
|
2805
2801
|
modelValue: e.value.platform.subdomain,
|
|
@@ -2809,7 +2805,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2809
2805
|
])
|
|
2810
2806
|
]),
|
|
2811
2807
|
t("div", Sl, [
|
|
2812
|
-
t("div", Cl, T(
|
|
2808
|
+
t("div", Cl, T(v(o)("report.integration.biztory.apiKey")), 1),
|
|
2813
2809
|
t("div", Fl, [
|
|
2814
2810
|
i(P, {
|
|
2815
2811
|
modelValue: e.value.platform.api_key,
|
|
@@ -2819,9 +2815,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2819
2815
|
])
|
|
2820
2816
|
]),
|
|
2821
2817
|
t("div", Dl, [
|
|
2822
|
-
t("div", Ul, T(
|
|
2818
|
+
t("div", Ul, T(v(o)("report.integration.biztory.general")), 1),
|
|
2823
2819
|
t("div", Tl, [
|
|
2824
|
-
t("div", Il, T(
|
|
2820
|
+
t("div", Il, T(v(o)("report.common.name")), 1),
|
|
2825
2821
|
t("div", Ml, [
|
|
2826
2822
|
i(P, {
|
|
2827
2823
|
modelValue: e.value.name,
|
|
@@ -2830,24 +2826,24 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2830
2826
|
])
|
|
2831
2827
|
]),
|
|
2832
2828
|
t("div", Kl, [
|
|
2833
|
-
t("div", Al, T(
|
|
2829
|
+
t("div", Al, T(v(o)("report.common.location")), 1),
|
|
2834
2830
|
i(s, {
|
|
2835
2831
|
modelValue: e.value.platform.locationIds,
|
|
2836
2832
|
"onUpdate:modelValue": l[4] || (l[4] = (y) => e.value.platform.locationIds = y),
|
|
2837
2833
|
multiselect: !0,
|
|
2838
2834
|
items: m.value,
|
|
2839
|
-
placeholder:
|
|
2835
|
+
placeholder: v(o)("report.common.location"),
|
|
2840
2836
|
class: "flex-grow"
|
|
2841
2837
|
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
2842
2838
|
]),
|
|
2843
2839
|
t("div", Pl, [
|
|
2844
|
-
t("div", Nl, T(
|
|
2840
|
+
t("div", Nl, T(v(o)("report.integration.biztory.grouping")), 1),
|
|
2845
2841
|
i(s, {
|
|
2846
2842
|
modelValue: e.value.platform.grouping,
|
|
2847
2843
|
"onUpdate:modelValue": l[5] || (l[5] = (y) => e.value.platform.grouping = y),
|
|
2848
2844
|
multiselect: !1,
|
|
2849
2845
|
items: r,
|
|
2850
|
-
placeholder:
|
|
2846
|
+
placeholder: v(o)("report.integration.biztory.grouping"),
|
|
2851
2847
|
class: "flex-grow",
|
|
2852
2848
|
disabled: ""
|
|
2853
2849
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -2897,11 +2893,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2897
2893
|
"last-upload-date": (W = e.value.platform) == null ? void 0 : W.lastUploadDate
|
|
2898
2894
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
2899
2895
|
t("div", Ll, [
|
|
2900
|
-
t("div", El, T(
|
|
2901
|
-
i(
|
|
2896
|
+
t("div", El, T(v(o)("report.integration.biztory.items")), 1),
|
|
2897
|
+
i(f, {
|
|
2902
2898
|
variant: "primary",
|
|
2903
2899
|
icon: "add",
|
|
2904
|
-
onClick: l[9] || (l[9] = () =>
|
|
2900
|
+
onClick: l[9] || (l[9] = () => u("items"))
|
|
2905
2901
|
})
|
|
2906
2902
|
]),
|
|
2907
2903
|
t("div", zl, [
|
|
@@ -2914,15 +2910,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2914
2910
|
code: { placeholder: "Account code", editable: !0 }
|
|
2915
2911
|
},
|
|
2916
2912
|
removable: !0,
|
|
2917
|
-
onRemove: () =>
|
|
2913
|
+
onRemove: () => p("items", U)
|
|
2918
2914
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2919
2915
|
]),
|
|
2920
2916
|
t("div", Yl, [
|
|
2921
|
-
t("div", ql, T(
|
|
2922
|
-
i(
|
|
2917
|
+
t("div", ql, T(v(o)("report.integration.biztory.taxes")), 1),
|
|
2918
|
+
i(f, {
|
|
2923
2919
|
variant: "primary",
|
|
2924
2920
|
icon: "add",
|
|
2925
|
-
onClick: l[10] || (l[10] = () =>
|
|
2921
|
+
onClick: l[10] || (l[10] = () => u("taxes"))
|
|
2926
2922
|
})
|
|
2927
2923
|
]),
|
|
2928
2924
|
t("div", Hl, [
|
|
@@ -2935,15 +2931,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2935
2931
|
account: { placeholder: "Account code", editable: !0 }
|
|
2936
2932
|
},
|
|
2937
2933
|
removable: !0,
|
|
2938
|
-
onRemove: () =>
|
|
2934
|
+
onRemove: () => p("taxes", U)
|
|
2939
2935
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2940
2936
|
]),
|
|
2941
2937
|
t("div", Xl, [
|
|
2942
|
-
t("div", Ql, T(
|
|
2943
|
-
i(
|
|
2938
|
+
t("div", Ql, T(v(o)("report.integration.biztory.payments")), 1),
|
|
2939
|
+
i(f, {
|
|
2944
2940
|
variant: "primary",
|
|
2945
2941
|
icon: "add",
|
|
2946
|
-
onClick: l[11] || (l[11] = () =>
|
|
2942
|
+
onClick: l[11] || (l[11] = () => u("paymentMethods"))
|
|
2947
2943
|
})
|
|
2948
2944
|
]),
|
|
2949
2945
|
t("div", Gl, [
|
|
@@ -2960,13 +2956,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2960
2956
|
}, null, 8, ["modelValue"])
|
|
2961
2957
|
])
|
|
2962
2958
|
]),
|
|
2963
|
-
g.retrievedMethods.isError ? N("", !0) : (c(), C("div", Wl, T(
|
|
2964
|
-
g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length == 0 && !g.retrievedMethods.isError ? (c(), C("span", Zl, T(
|
|
2959
|
+
g.retrievedMethods.isError ? N("", !0) : (c(), C("div", Wl, T(v(o)("report.integration.biztory.paymentTerm")), 1)),
|
|
2960
|
+
g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length == 0 && !g.retrievedMethods.isError ? (c(), C("span", Zl, T(v(o)("report.integration.biztory.noPaymentMethods")), 1)) : N("", !0),
|
|
2965
2961
|
g.retrievedMethods.isLoaded ? N("", !0) : (c(), M(Q, {
|
|
2966
2962
|
key: 2,
|
|
2967
2963
|
size: "xl"
|
|
2968
2964
|
})),
|
|
2969
|
-
g.retrievedMethods.isError ? (c(), C("span", en, T(
|
|
2965
|
+
g.retrievedMethods.isError ? (c(), C("span", en, T(v(o)("report.integration.biztory.error")), 1)) : N("", !0),
|
|
2970
2966
|
(c(!0), C(L, null, H((D = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : D.paymentMethods, (y, U) => {
|
|
2971
2967
|
var O;
|
|
2972
2968
|
return c(), C("div", {
|
|
@@ -2997,7 +2993,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2997
2993
|
}
|
|
2998
2994
|
},
|
|
2999
2995
|
removable: !0,
|
|
3000
|
-
onRemove: () =>
|
|
2996
|
+
onRemove: () => p("paymentMethods", U)
|
|
3001
2997
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"])
|
|
3002
2998
|
])) : N("", !0)
|
|
3003
2999
|
]);
|
|
@@ -3010,9 +3006,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3010
3006
|
});
|
|
3011
3007
|
function an(g) {
|
|
3012
3008
|
return g.reduce((o, e) => {
|
|
3013
|
-
var w, _, F, h, m, d,
|
|
3014
|
-
const { invoice: n } = e,
|
|
3015
|
-
o[
|
|
3009
|
+
var w, _, F, h, m, d, V, b, p, u, r, x, $, l, a, f, s, A, P, Q, E, G;
|
|
3010
|
+
const { invoice: n } = e, k = o.length;
|
|
3011
|
+
o[k] = {
|
|
3016
3012
|
invoice_date: n.invoice_date,
|
|
3017
3013
|
ref_num: n.ref_num,
|
|
3018
3014
|
grandTotal: n.grandTotal,
|
|
@@ -3024,12 +3020,12 @@ function an(g) {
|
|
|
3024
3020
|
item_price: (F = n.items[0]) == null ? void 0 : F.price,
|
|
3025
3021
|
item_tax: (h = n.items[0]) == null ? void 0 : h.total_tax,
|
|
3026
3022
|
item_tax_label: ((m = n.items[0]) == null ? void 0 : m.tax_label) || "-",
|
|
3027
|
-
payment_amount: ((
|
|
3028
|
-
payment_method: ((
|
|
3029
|
-
payment_term: ((
|
|
3023
|
+
payment_amount: ((V = (d = n.transactions) == null ? void 0 : d[0]) == null ? void 0 : V.amount) || void 0,
|
|
3024
|
+
payment_method: ((p = (b = n.transactions) == null ? void 0 : b[0]) == null ? void 0 : p.payment_method) || "-",
|
|
3025
|
+
payment_term: ((u = n == null ? void 0 : n.payment_term) == null ? void 0 : u.name) || ""
|
|
3030
3026
|
};
|
|
3031
3027
|
for (let R = 1; R < Math.max(((r = n.items) == null ? void 0 : r.length) || 0, ((x = n.transactions) == null ? void 0 : x.length) || 0); R++) {
|
|
3032
|
-
const j =
|
|
3028
|
+
const j = k + R;
|
|
3033
3029
|
o[j] || (o[j] = {});
|
|
3034
3030
|
const z = n.items[R];
|
|
3035
3031
|
z ? o[j] = {
|
|
@@ -3040,7 +3036,7 @@ function an(g) {
|
|
|
3040
3036
|
item_tax: z.total_tax,
|
|
3041
3037
|
item_tax_label: z.tax_label || "-",
|
|
3042
3038
|
payment_amount: ((l = ($ = n.transactions) == null ? void 0 : $[R]) == null ? void 0 : l.amount) || void 0,
|
|
3043
|
-
payment_method: ((
|
|
3039
|
+
payment_method: ((f = (a = n.transactions) == null ? void 0 : a[R]) == null ? void 0 : f.payment_method) || "-",
|
|
3044
3040
|
payment_term: ((s = n == null ? void 0 : n.payment_term) == null ? void 0 : s.name) || ""
|
|
3045
3041
|
} : o[j] = {
|
|
3046
3042
|
payment_amount: ((P = (A = n.transactions) == null ? void 0 : A[R]) == null ? void 0 : P.amount) || void 0,
|
|
@@ -3125,8 +3121,8 @@ const ln = [
|
|
|
3125
3121
|
];
|
|
3126
3122
|
function nn(g) {
|
|
3127
3123
|
return g.reduce((o, e) => {
|
|
3128
|
-
var F, h, m, d,
|
|
3129
|
-
const { invoice: n, payments:
|
|
3124
|
+
var F, h, m, d, V, b, p, u, r, x;
|
|
3125
|
+
const { invoice: n, payments: k } = e, w = o.length;
|
|
3130
3126
|
o[w] = {
|
|
3131
3127
|
invoice_date: n.invoice_date,
|
|
3132
3128
|
ref_num: n.ref_num,
|
|
@@ -3135,22 +3131,22 @@ function nn(g) {
|
|
|
3135
3131
|
item_description: (h = n.items[0]) == null ? void 0 : h.description,
|
|
3136
3132
|
item_price: (m = n.items[0]) == null ? void 0 : m.price,
|
|
3137
3133
|
item_tax_label: ((d = n.items[0]) == null ? void 0 : d.tax_label) ?? "",
|
|
3138
|
-
item_tax_amount: ((
|
|
3134
|
+
item_tax_amount: ((V = n.items[0]) == null ? void 0 : V.total_tax) ?? "",
|
|
3139
3135
|
service_charge_amount: ((b = n.service_charges[0]) == null ? void 0 : b.total) ?? "",
|
|
3140
3136
|
rounding: n.rounding ?? 0,
|
|
3141
3137
|
payment_term_id: n.payment_term.name ?? "",
|
|
3142
|
-
payment_term_amount: ((
|
|
3143
|
-
payment_method: ((
|
|
3138
|
+
payment_term_amount: ((p = n.terms[w]) == null ? void 0 : p.amount) ?? "",
|
|
3139
|
+
payment_method: ((u = k[0]) == null ? void 0 : u.payment_method_name) || ""
|
|
3144
3140
|
};
|
|
3145
3141
|
const _ = Math.max(
|
|
3146
3142
|
((r = n.items) == null ? void 0 : r.length) || 0,
|
|
3147
3143
|
((x = n.terms) == null ? void 0 : x.length) || 0,
|
|
3148
|
-
(
|
|
3144
|
+
(k == null ? void 0 : k.length) || 0
|
|
3149
3145
|
);
|
|
3150
3146
|
for (let $ = 1; $ < _; $++) {
|
|
3151
3147
|
const l = w + $;
|
|
3152
3148
|
o[l] || (o[l] = {});
|
|
3153
|
-
const a = n.items[$],
|
|
3149
|
+
const a = n.items[$], f = n.terms[$], s = k[$];
|
|
3154
3150
|
a ? o[l] = {
|
|
3155
3151
|
...o[l],
|
|
3156
3152
|
item_code: a.code,
|
|
@@ -3159,11 +3155,11 @@ function nn(g) {
|
|
|
3159
3155
|
item_tax_label: a.tax_label == "?" ? "" : a.tax_label ?? "",
|
|
3160
3156
|
item_tax_amount: a.total_tax ?? "",
|
|
3161
3157
|
payment_term_id: n.payment_term.name ?? "",
|
|
3162
|
-
payment_term_amount: (
|
|
3158
|
+
payment_term_amount: (f == null ? void 0 : f.amount) ?? "",
|
|
3163
3159
|
payment_method: (s == null ? void 0 : s.payment_method_name) || ""
|
|
3164
3160
|
} : o[l] = {
|
|
3165
3161
|
payment_term_id: n.payment_term.name ?? "",
|
|
3166
|
-
payment_term_amount: (
|
|
3162
|
+
payment_term_amount: (f == null ? void 0 : f.amount) ?? "",
|
|
3167
3163
|
payment_method: (s == null ? void 0 : s.payment_method_name) || ""
|
|
3168
3164
|
};
|
|
3169
3165
|
}
|
|
@@ -3247,9 +3243,9 @@ const sn = [
|
|
|
3247
3243
|
},
|
|
3248
3244
|
emits: ["update:modelValue"],
|
|
3249
3245
|
setup(g) {
|
|
3250
|
-
const o = X(g, "modelValue"), e = B(!1), n =
|
|
3246
|
+
const o = X(g, "modelValue"), e = B(!1), n = pe(), { dateRange: k } = Ce(ue()), w = B([]);
|
|
3251
3247
|
ve(
|
|
3252
|
-
() =>
|
|
3248
|
+
() => k.value,
|
|
3253
3249
|
async () => {
|
|
3254
3250
|
if (o.value._id)
|
|
3255
3251
|
try {
|
|
@@ -3291,15 +3287,15 @@ const sn = [
|
|
|
3291
3287
|
}
|
|
3292
3288
|
}
|
|
3293
3289
|
return (m, d) => {
|
|
3294
|
-
const
|
|
3290
|
+
const V = S("FmButton"), b = S("FmCircularProgress"), p = S("FmTable");
|
|
3295
3291
|
return c(), C("div", rn, [
|
|
3296
3292
|
t("div", mn, [
|
|
3297
3293
|
i(Fe, {
|
|
3298
|
-
"date-range":
|
|
3299
|
-
"onUpdate:dateRange": d[0] || (d[0] = (
|
|
3294
|
+
"date-range": v(k),
|
|
3295
|
+
"onUpdate:dateRange": d[0] || (d[0] = (u) => be(k) ? k.value = u : null),
|
|
3300
3296
|
compare: !1
|
|
3301
3297
|
}, null, 8, ["date-range"]),
|
|
3302
|
-
i(
|
|
3298
|
+
i(V, {
|
|
3303
3299
|
loading: e.value,
|
|
3304
3300
|
variant: "primary",
|
|
3305
3301
|
label: "Upload",
|
|
@@ -3309,7 +3305,7 @@ const sn = [
|
|
|
3309
3305
|
e.value ? (c(), C("div", cn, [
|
|
3310
3306
|
i(b, { size: "xl" }),
|
|
3311
3307
|
d[1] || (d[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
|
|
3312
|
-
])) : (c(), M(
|
|
3308
|
+
])) : (c(), M(p, {
|
|
3313
3309
|
key: 1,
|
|
3314
3310
|
class: "flex overflow-scroll",
|
|
3315
3311
|
"row-data": _.value,
|
|
@@ -3318,7 +3314,7 @@ const sn = [
|
|
|
3318
3314
|
]);
|
|
3319
3315
|
};
|
|
3320
3316
|
}
|
|
3321
|
-
}),
|
|
3317
|
+
}), un = { class: "h-full relative flex flex-col" }, pn = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, fn = /* @__PURE__ */ q({
|
|
3322
3318
|
__name: "Biztory",
|
|
3323
3319
|
props: {
|
|
3324
3320
|
modelValue: { required: !0 },
|
|
@@ -3326,7 +3322,7 @@ const sn = [
|
|
|
3326
3322
|
},
|
|
3327
3323
|
emits: ["update:modelValue"],
|
|
3328
3324
|
setup(g) {
|
|
3329
|
-
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"),
|
|
3325
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), k = [
|
|
3330
3326
|
{
|
|
3331
3327
|
label: o("report.integration.setting"),
|
|
3332
3328
|
value: "setting",
|
|
@@ -3354,45 +3350,45 @@ const sn = [
|
|
|
3354
3350
|
default:
|
|
3355
3351
|
return null;
|
|
3356
3352
|
}
|
|
3357
|
-
}), F = B({}), h = B({}), m = (
|
|
3353
|
+
}), F = B({}), h = B({}), m = (u, r) => u.map((x) => ({
|
|
3358
3354
|
label: r.length > 2 ? `ID:${x[r[2]]} [${x[r[0]]}] ${x[r[1]]}` : `[${x[r[0]]}] ${x[r[1]]}`,
|
|
3359
3355
|
value: x.id,
|
|
3360
3356
|
cnId: x.cnId ? x.cnId : null
|
|
3361
|
-
})), d = (
|
|
3357
|
+
})), d = (u) => m(u, ["wallet", "name"]), V = (u) => m(u, ["id", "name"]), b = async (u, r, x, $) => {
|
|
3362
3358
|
try {
|
|
3363
|
-
const l = await
|
|
3359
|
+
const l = await u(e.value._id);
|
|
3364
3360
|
x.value.data = r(l);
|
|
3365
3361
|
} catch (l) {
|
|
3366
3362
|
console.error($, l), x.value.isError = !0;
|
|
3367
3363
|
} finally {
|
|
3368
3364
|
x.value.isLoaded = !0;
|
|
3369
3365
|
}
|
|
3370
|
-
},
|
|
3371
|
-
var
|
|
3372
|
-
(
|
|
3366
|
+
}, p = async () => {
|
|
3367
|
+
var u, r;
|
|
3368
|
+
(u = e.value.platform.mappings) != null && u.version && await b(
|
|
3373
3369
|
Ge,
|
|
3374
3370
|
d,
|
|
3375
3371
|
F,
|
|
3376
3372
|
"Failed to fetch payment methods:"
|
|
3377
3373
|
), ((r = e.value.platform.mappings) == null ? void 0 : r.version) == "v2" && await b(
|
|
3378
3374
|
Je,
|
|
3379
|
-
|
|
3375
|
+
V,
|
|
3380
3376
|
h,
|
|
3381
3377
|
"Failed to fetch customers:"
|
|
3382
3378
|
), F.value.isLoaded = !0, h.value.isLoaded = !0;
|
|
3383
3379
|
};
|
|
3384
|
-
return Ee(
|
|
3385
|
-
var
|
|
3386
|
-
return (
|
|
3387
|
-
},
|
|
3388
|
-
var l, a,
|
|
3380
|
+
return Ee(p), ve(() => {
|
|
3381
|
+
var u;
|
|
3382
|
+
return (u = e.value.platform.mappings) == null ? void 0 : u.version;
|
|
3383
|
+
}, p), (u, r) => {
|
|
3384
|
+
var l, a, f;
|
|
3389
3385
|
const x = S("FmPageHead"), $ = S("FmTabs");
|
|
3390
|
-
return c(), C("div",
|
|
3386
|
+
return c(), C("div", un, [
|
|
3391
3387
|
i(x, {
|
|
3392
3388
|
title: ((l = e.value) == null ? void 0 : l.name) || "Biztory",
|
|
3393
3389
|
"back-button": !0,
|
|
3394
3390
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
3395
|
-
"onClick:back":
|
|
3391
|
+
"onClick:back": v(w).back
|
|
3396
3392
|
}, {
|
|
3397
3393
|
description: ge(() => r[2] || (r[2] = [
|
|
3398
3394
|
t("div", null, null, -1)
|
|
@@ -3402,13 +3398,13 @@ const sn = [
|
|
|
3402
3398
|
i($, {
|
|
3403
3399
|
"model-value": n.value,
|
|
3404
3400
|
"onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
|
|
3405
|
-
items:
|
|
3401
|
+
items: k
|
|
3406
3402
|
}, null, 8, ["model-value"]),
|
|
3407
|
-
t("div",
|
|
3403
|
+
t("div", pn, [
|
|
3408
3404
|
(c(), M(xe((a = _.value) == null ? void 0 : a.component), Le({
|
|
3409
3405
|
modelValue: e.value,
|
|
3410
3406
|
"onUpdate:modelValue": r[1] || (r[1] = (s) => e.value = s)
|
|
3411
|
-
}, (
|
|
3407
|
+
}, (f = _.value) == null ? void 0 : f.props), null, 16, ["modelValue"]))
|
|
3412
3408
|
])
|
|
3413
3409
|
]);
|
|
3414
3410
|
};
|
|
@@ -3416,7 +3412,7 @@ const sn = [
|
|
|
3416
3412
|
}), vn = {
|
|
3417
3413
|
key: 0,
|
|
3418
3414
|
class: "flex flex-col h-full"
|
|
3419
|
-
}, gn = { class: "flex flex-col gap-16 pb-[24px]" }, yn = { class: "flex flex-row justify-between items-center gap-2" }, xn = { class: "flex flex-row gap-2 items-center" }, _n = { class: "relative group cursor-pointer" }, bn = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, wn = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, hn = { class: "flex flex-col gap-16" },
|
|
3415
|
+
}, gn = { class: "flex flex-col gap-16 pb-[24px]" }, yn = { class: "flex flex-row justify-between items-center gap-2" }, xn = { class: "flex flex-row gap-2 items-center" }, _n = { class: "relative group cursor-pointer" }, bn = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, wn = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, hn = { class: "flex flex-col gap-16" }, Vn = { class: "fm-typo-en-title-sm-800" }, kn = { class: "flex flex-row items-center max-w-[100%]" }, $n = { class: "w-[25%]" }, Sn = { class: "flex-grow" }, Cn = { class: "flex flex-row items-center max-w-[100%]" }, Fn = { class: "w-[25%]" }, Dn = { class: "flex flex-row items-center gap-x-16" }, Un = { class: "fm-typo-en-title-sm-800" }, Tn = { class: "grid-cols-1 grid gap-16" }, In = /* @__PURE__ */ q({
|
|
3420
3416
|
__name: "Setting",
|
|
3421
3417
|
props: {
|
|
3422
3418
|
modelValue: { required: !0 },
|
|
@@ -3424,7 +3420,7 @@ const sn = [
|
|
|
3424
3420
|
},
|
|
3425
3421
|
emits: ["update:modelValue"],
|
|
3426
3422
|
setup(g) {
|
|
3427
|
-
const { t: o } = J(), e = X(g, "modelValue"), n =
|
|
3423
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = pe(), k = _e(), w = de(), { promptLoader: _ } = we(), { promptMessage: F } = Se(), { restaurants: h } = ue(), m = Y(
|
|
3428
3424
|
() => h.map((r) => ({ label: r.name, value: r.id }))
|
|
3429
3425
|
);
|
|
3430
3426
|
async function d() {
|
|
@@ -3433,16 +3429,16 @@ const sn = [
|
|
|
3433
3429
|
title: o("report.common.delete")
|
|
3434
3430
|
}) && await _(async () => {
|
|
3435
3431
|
try {
|
|
3436
|
-
await he(e.value._id), await
|
|
3432
|
+
await he(e.value._id), await k.getSettings(), w.back();
|
|
3437
3433
|
} catch (x) {
|
|
3438
3434
|
n.open({ type: "error", message: x.message });
|
|
3439
3435
|
}
|
|
3440
3436
|
});
|
|
3441
3437
|
}
|
|
3442
|
-
async function
|
|
3438
|
+
async function V() {
|
|
3443
3439
|
await _(async () => {
|
|
3444
3440
|
try {
|
|
3445
|
-
await
|
|
3441
|
+
await Ve(e.value._id, e.value), await k.getSettings();
|
|
3446
3442
|
} catch (r) {
|
|
3447
3443
|
n.open({ type: "error", message: r.message });
|
|
3448
3444
|
}
|
|
@@ -3451,10 +3447,10 @@ const sn = [
|
|
|
3451
3447
|
function b(r, x) {
|
|
3452
3448
|
var $, l;
|
|
3453
3449
|
(l = ($ = e.value.platform) == null ? void 0 : $.mappings) != null && l[r] && (e.value.platform.mappings[r] = e.value.platform.mappings[r].filter(
|
|
3454
|
-
(a,
|
|
3450
|
+
(a, f) => f !== x
|
|
3455
3451
|
));
|
|
3456
3452
|
}
|
|
3457
|
-
function
|
|
3453
|
+
function p(r) {
|
|
3458
3454
|
var x, $;
|
|
3459
3455
|
($ = (x = e.value.platform) == null ? void 0 : x.mappings) != null && $[r] && (e.value.platform.mappings[r] = [
|
|
3460
3456
|
...e.value.platform.mappings[r],
|
|
@@ -3466,10 +3462,10 @@ const sn = [
|
|
|
3466
3462
|
}
|
|
3467
3463
|
]);
|
|
3468
3464
|
}
|
|
3469
|
-
async function
|
|
3465
|
+
async function u() {
|
|
3470
3466
|
await _(async () => {
|
|
3471
3467
|
try {
|
|
3472
|
-
await
|
|
3468
|
+
await ke(e.value._id), await k.getSettings();
|
|
3473
3469
|
} catch (r) {
|
|
3474
3470
|
n.open({ type: "error", message: r.message });
|
|
3475
3471
|
}
|
|
@@ -3477,7 +3473,7 @@ const sn = [
|
|
|
3477
3473
|
}
|
|
3478
3474
|
return (r, x) => {
|
|
3479
3475
|
var A, P, Q, E, G;
|
|
3480
|
-
const $ = S("FmIcon"), l = S("FmButton"), a = S("FmMenuDivider"),
|
|
3476
|
+
const $ = S("FmIcon"), l = S("FmButton"), a = S("FmMenuDivider"), f = S("FmTextField"), s = S("FmSelect");
|
|
3481
3477
|
return (P = (A = e.value) == null ? void 0 : A.platform) != null && P.mappings ? (c(), C("div", vn, [
|
|
3482
3478
|
t("div", gn, [
|
|
3483
3479
|
t("div", yn, [
|
|
@@ -3487,19 +3483,19 @@ const sn = [
|
|
|
3487
3483
|
i($, {
|
|
3488
3484
|
name: "refresh",
|
|
3489
3485
|
class: "p-2 bg-gray-100 rounded-full",
|
|
3490
|
-
onClick:
|
|
3486
|
+
onClick: u
|
|
3491
3487
|
}),
|
|
3492
|
-
t("span", bn, T(
|
|
3488
|
+
t("span", bn, T(v(o)("report.integration.refreshSetting")), 1)
|
|
3493
3489
|
]),
|
|
3494
3490
|
i(l, {
|
|
3495
3491
|
variant: "tertiary",
|
|
3496
|
-
label:
|
|
3492
|
+
label: v(o)("report.common.delete"),
|
|
3497
3493
|
onClick: d
|
|
3498
3494
|
}, null, 8, ["label"]),
|
|
3499
3495
|
i(l, {
|
|
3500
3496
|
variant: "primary",
|
|
3501
|
-
label:
|
|
3502
|
-
onClick:
|
|
3497
|
+
label: v(o)("report.common.update"),
|
|
3498
|
+
onClick: V
|
|
3503
3499
|
}, null, 8, ["label"])
|
|
3504
3500
|
])
|
|
3505
3501
|
])
|
|
@@ -3507,18 +3503,18 @@ const sn = [
|
|
|
3507
3503
|
i(a, { style: { margin: 0 } }),
|
|
3508
3504
|
t("div", wn, [
|
|
3509
3505
|
t("div", hn, [
|
|
3510
|
-
t("div",
|
|
3511
|
-
t("div",
|
|
3512
|
-
t("div", $n, T(
|
|
3506
|
+
t("div", Vn, T(v(o)("report.integration.iflexiHrms.general")), 1),
|
|
3507
|
+
t("div", kn, [
|
|
3508
|
+
t("div", $n, T(v(o)("report.common.name")), 1),
|
|
3513
3509
|
t("div", Sn, [
|
|
3514
|
-
i(
|
|
3510
|
+
i(f, {
|
|
3515
3511
|
modelValue: e.value.name,
|
|
3516
3512
|
"onUpdate:modelValue": x[0] || (x[0] = (R) => e.value.name = R)
|
|
3517
3513
|
}, null, 8, ["modelValue"])
|
|
3518
3514
|
])
|
|
3519
3515
|
]),
|
|
3520
3516
|
t("div", Cn, [
|
|
3521
|
-
t("div", Fn, T(
|
|
3517
|
+
t("div", Fn, T(v(o)("report.integration.location")), 1),
|
|
3522
3518
|
i(s, {
|
|
3523
3519
|
"model-value": e.value.platform.locationIds[0],
|
|
3524
3520
|
multiselect: !1,
|
|
@@ -3532,14 +3528,14 @@ const sn = [
|
|
|
3532
3528
|
i(De, {
|
|
3533
3529
|
modelValue: e.value.platform,
|
|
3534
3530
|
"onUpdate:modelValue": x[2] || (x[2] = (R) => e.value.platform = R),
|
|
3535
|
-
label:
|
|
3531
|
+
label: v(o)("report.input.email")
|
|
3536
3532
|
}, null, 8, ["modelValue", "label"]),
|
|
3537
3533
|
t("div", Dn, [
|
|
3538
|
-
t("div", Un, T(
|
|
3534
|
+
t("div", Un, T(v(o)("report.integration.iflexiHrms.employee")), 1),
|
|
3539
3535
|
i(l, {
|
|
3540
3536
|
variant: "primary",
|
|
3541
3537
|
icon: "add",
|
|
3542
|
-
onClick: x[3] || (x[3] = () =>
|
|
3538
|
+
onClick: x[3] || (x[3] = () => p("employees"))
|
|
3543
3539
|
})
|
|
3544
3540
|
]),
|
|
3545
3541
|
t("div", Tn, [
|
|
@@ -3597,13 +3593,13 @@ const sn = [
|
|
|
3597
3593
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
|
|
3598
3594
|
enableSorting: !1
|
|
3599
3595
|
}
|
|
3600
|
-
],
|
|
3596
|
+
], k = X(g, "modelValue"), w = B(!1), _ = pe(), { dateRange: F } = Ce(ue());
|
|
3601
3597
|
ve(
|
|
3602
3598
|
() => F.value,
|
|
3603
3599
|
async () => {
|
|
3604
|
-
if (
|
|
3600
|
+
if (k.value._id)
|
|
3605
3601
|
try {
|
|
3606
|
-
w.value = !0, e.value = await $e(
|
|
3602
|
+
w.value = !0, e.value = await $e(k.value._id);
|
|
3607
3603
|
} catch (m) {
|
|
3608
3604
|
_.open({ message: m.message, type: "error" });
|
|
3609
3605
|
} finally {
|
|
@@ -3616,7 +3612,7 @@ const sn = [
|
|
|
3616
3612
|
);
|
|
3617
3613
|
async function h() {
|
|
3618
3614
|
try {
|
|
3619
|
-
|
|
3615
|
+
k.value._id ? (w.value = !0, await Pe(k.value._id)) : _.open({ message: "Invalid setting", type: "error" });
|
|
3620
3616
|
} catch (m) {
|
|
3621
3617
|
_.open({ message: m.message, type: "error" });
|
|
3622
3618
|
} finally {
|
|
@@ -3624,25 +3620,25 @@ const sn = [
|
|
|
3624
3620
|
}
|
|
3625
3621
|
}
|
|
3626
3622
|
return (m, d) => {
|
|
3627
|
-
const
|
|
3623
|
+
const V = S("FmButton"), b = S("FmCircularProgress"), p = S("FmTable");
|
|
3628
3624
|
return c(), C("div", Mn, [
|
|
3629
3625
|
t("div", Kn, [
|
|
3630
3626
|
i(Fe, {
|
|
3631
|
-
"date-range":
|
|
3632
|
-
"onUpdate:dateRange": d[0] || (d[0] = (
|
|
3627
|
+
"date-range": v(F),
|
|
3628
|
+
"onUpdate:dateRange": d[0] || (d[0] = (u) => be(F) ? F.value = u : null),
|
|
3633
3629
|
compare: !1
|
|
3634
3630
|
}, null, 8, ["date-range"]),
|
|
3635
|
-
i(
|
|
3631
|
+
i(V, {
|
|
3636
3632
|
loading: w.value,
|
|
3637
3633
|
variant: "primary",
|
|
3638
|
-
label:
|
|
3634
|
+
label: v(o)("report.common.download"),
|
|
3639
3635
|
onClick: h
|
|
3640
3636
|
}, null, 8, ["loading", "label"])
|
|
3641
3637
|
]),
|
|
3642
3638
|
w.value ? (c(), C("div", An, [
|
|
3643
3639
|
i(b, { size: "xl" }),
|
|
3644
|
-
t("span", Pn, T(
|
|
3645
|
-
])) : e.value.length > 0 ? (c(), M(
|
|
3640
|
+
t("span", Pn, T(v(o)("report.common.isLoading")), 1)
|
|
3641
|
+
])) : e.value.length > 0 ? (c(), M(p, {
|
|
3646
3642
|
key: 1,
|
|
3647
3643
|
class: "flex overflow-scroll",
|
|
3648
3644
|
"row-data": e.value,
|
|
@@ -3659,7 +3655,7 @@ const sn = [
|
|
|
3659
3655
|
},
|
|
3660
3656
|
emits: ["update:modelValue"],
|
|
3661
3657
|
setup(g) {
|
|
3662
|
-
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"),
|
|
3658
|
+
const { t: o } = J(), e = X(g, "modelValue"), n = B("setting"), k = [
|
|
3663
3659
|
{
|
|
3664
3660
|
label: o("report.integration.setting"),
|
|
3665
3661
|
value: "setting",
|
|
@@ -3681,14 +3677,14 @@ const sn = [
|
|
|
3681
3677
|
}
|
|
3682
3678
|
});
|
|
3683
3679
|
return (F, h) => {
|
|
3684
|
-
var
|
|
3680
|
+
var V;
|
|
3685
3681
|
const m = S("FmPageHead"), d = S("FmTabs");
|
|
3686
3682
|
return c(), C("div", Rn, [
|
|
3687
3683
|
i(m, {
|
|
3688
|
-
title: ((
|
|
3684
|
+
title: ((V = e.value) == null ? void 0 : V.name) || "AutoCount",
|
|
3689
3685
|
"back-button": !0,
|
|
3690
3686
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
3691
|
-
"onClick:back":
|
|
3687
|
+
"onClick:back": v(w).back
|
|
3692
3688
|
}, {
|
|
3693
3689
|
description: ge(() => h[2] || (h[2] = [
|
|
3694
3690
|
t("div", null, null, -1)
|
|
@@ -3698,7 +3694,7 @@ const sn = [
|
|
|
3698
3694
|
i(d, {
|
|
3699
3695
|
"model-value": n.value,
|
|
3700
3696
|
"onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
|
|
3701
|
-
items:
|
|
3697
|
+
items: k
|
|
3702
3698
|
}, null, 8, ["model-value"]),
|
|
3703
3699
|
t("div", On, [
|
|
3704
3700
|
(c(), M(xe(_.value), {
|
|
@@ -3712,7 +3708,7 @@ const sn = [
|
|
|
3712
3708
|
}), jn = { class: "px-24 h-full relative" }, Gn = /* @__PURE__ */ q({
|
|
3713
3709
|
__name: "Integration",
|
|
3714
3710
|
setup(g) {
|
|
3715
|
-
const o = B(void 0), { params: e } = ze(), n = _e(),
|
|
3711
|
+
const o = B(void 0), { params: e } = ze(), n = _e(), k = B();
|
|
3716
3712
|
Ee(async () => {
|
|
3717
3713
|
n.settings.length === 0 && await n.getSettings();
|
|
3718
3714
|
}), ve(
|
|
@@ -3720,7 +3716,7 @@ const sn = [
|
|
|
3720
3716
|
(_) => {
|
|
3721
3717
|
var h;
|
|
3722
3718
|
const F = _.find((m) => m._id === e.id);
|
|
3723
|
-
F && (
|
|
3719
|
+
F && (k.value = F, o.value = (h = k.value.platform) == null ? void 0 : h.name);
|
|
3724
3720
|
},
|
|
3725
3721
|
{ immediate: !0 }
|
|
3726
3722
|
);
|
|
@@ -3744,8 +3740,8 @@ const sn = [
|
|
|
3744
3740
|
});
|
|
3745
3741
|
return (_, F) => (c(), C("div", jn, [
|
|
3746
3742
|
(c(), M(xe(w.value), {
|
|
3747
|
-
modelValue:
|
|
3748
|
-
"onUpdate:modelValue": F[0] || (F[0] = (h) =>
|
|
3743
|
+
modelValue: k.value,
|
|
3744
|
+
"onUpdate:modelValue": F[0] || (F[0] = (h) => k.value = h)
|
|
3749
3745
|
}, null, 8, ["modelValue"]))
|
|
3750
3746
|
]));
|
|
3751
3747
|
}
|