@feedmepos/mf-report 5.22.30 → 5.22.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-Cof-X-OX.js → App-DrNd0OhG.js} +4 -4
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-Cn_mVx9D.js → BaseDialog.vue_vue_type_script_setup_true_lang-DT0G5YTp.js} +4 -4
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CJOaN-RA.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-D03qImVk.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-Dz_5iNus.js → Default.vue_vue_type_script_setup_true_lang-SYfUr7CV.js} +1 -1
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-Lnxc9CzU.js → FilterSelector.vue_vue_type_script_setup_true_lang-BAlKmQBN.js} +221 -221
- package/dist/{InsightView-DktFtdy9.js → InsightView-BKxwhqE-.js} +4 -4
- package/dist/{Integration-CFtbFghr.js → Integration-CSe9xLiD.js} +908 -897
- package/dist/{Integrations-fSWspKwj.js → Integrations-DstbRAv7.js} +2 -2
- package/dist/{Layout-CcunW_mF.js → Layout-KqHc-oe1.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-Bwq0tcXV.js → MenuTab.vue_vue_type_script_setup_true_lang-D353Xres.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-C5bwFbZj.js → NavigationTab.vue_vue_type_script_setup_true_lang-m8FuKdYv.js} +3 -3
- package/dist/{OverviewView-Dq5tvKOF.js → OverviewView-DyMe7oQN.js} +4 -4
- package/dist/{Report-CHlX2qrM.js → Report-DQiEnVY1.js} +3 -3
- package/dist/{ReportEditor-Dj3PktxT.js → ReportEditor-z5Ca_cPt.js} +4 -4
- package/dist/{ReportView-lwvhOIVg.js → ReportView-CU5RY0cS.js} +6 -6
- package/dist/{Setting-BhK2ktyL.js → Setting-BlyScc05.js} +3 -3
- package/dist/{TileEditor-B_JDpB3I.js → TileEditor-CJHk2GIH.js} +5 -5
- package/dist/{TransitionFade-D7Yi5DZW.js → TransitionFade-Bo_RUoyJ.js} +4 -4
- package/dist/{app-DlT1RNrY.js → app-Ceu3CTy8.js} +11 -11
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-CKB5if5c.js → formatChartData.worker-DR8QpYfd.js} +1 -1
- package/dist/assets/{processTableData.worker-C1Lshb3k.js → processTableData.worker-V2pxR4IU.js} +1 -1
- package/dist/{useRestaurantPermission-DB3sRIJN.js → useRestaurantPermission-D7hSebq7.js} +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as te, mergeModels as Ve, useModel as ne, computed as Y, resolveComponent as K, createElementBlock as N, openBlock as b, createElementVNode as t, createCommentVNode as B, normalizeClass as We, Fragment as De, createBlock as O, withCtx as ke, toDisplayString as S, renderList as Le, createVNode as l, unref as
|
|
2
|
-
import { useRouter as Ce, useRoute as
|
|
3
|
-
import { G as we, H as et, d as Ie, J as rt, K as
|
|
1
|
+
import { defineComponent as te, mergeModels as Ve, useModel as ne, computed as Y, resolveComponent as K, createElementBlock as N, openBlock as b, createElementVNode as t, createCommentVNode as B, normalizeClass as We, Fragment as De, createBlock as O, withCtx as ke, toDisplayString as S, renderList as Le, createVNode as l, unref as u, h as V, normalizeStyle as dt, createTextVNode as mt, ref as W, onUnmounted as Oe, watch as Ke, isRef as Me, resolveDynamicComponent as Pe, mergeProps as tt, onMounted as nt } from "vue";
|
|
2
|
+
import { useRouter as Ce, useRoute as ut } from "vue-router";
|
|
3
|
+
import { G as we, H as et, d as Ie, J as rt, K as pt, e as Re, a as $e, L as he, M as ct, v as ft, A as Z, E as Be, N as Ye, O as Ne, P as qe, Q as ot, R as gt, S as vt, T as yt, U as at, b as st, V as xt, W as bt, w as wt, I as Ue, X as ht, Y as _t, Z as Ct } from "./app-Ceu3CTy8.js";
|
|
4
4
|
import { u as se, a as ze } from "./vue-i18n-DVWuTfed.js";
|
|
5
5
|
import { u as He } from "./message-dialog-UoMWOnil.js";
|
|
6
6
|
import { useSnackbar as Se } from "@feedmepos/ui-library";
|
|
7
|
-
import { u as je, h as _e } from "./useRestaurantPermission-
|
|
7
|
+
import { u as je, h as _e } from "./useRestaurantPermission-D7hSebq7.js";
|
|
8
8
|
import { storeToRefs as Ge } from "pinia";
|
|
9
|
-
import { _ as Qe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as Qe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-D03qImVk.js";
|
|
10
10
|
const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, $t = { class: "w-[100%]" }, St = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, At = { class: "w-[100%] flex flex-row gap-[4px]" }, Vt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, Dt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, Kt = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "w-[24px] flex items-center"
|
|
@@ -39,32 +39,32 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
39
39
|
}),
|
|
40
40
|
emits: /* @__PURE__ */ Ve(["remove"], ["update:modelValue"]),
|
|
41
41
|
setup(g, { emit: a }) {
|
|
42
|
-
const e = ne(g, "modelValue"),
|
|
43
|
-
() => Object.keys(
|
|
44
|
-
const w =
|
|
42
|
+
const e = ne(g, "modelValue"), m = g, y = Y(
|
|
43
|
+
() => Object.keys(m.options).map((I) => {
|
|
44
|
+
const w = m.options[I];
|
|
45
45
|
return {
|
|
46
46
|
placeholder: w.placeholder,
|
|
47
|
-
key:
|
|
47
|
+
key: I,
|
|
48
48
|
editable: w.editable
|
|
49
49
|
};
|
|
50
50
|
})
|
|
51
51
|
);
|
|
52
|
-
function I
|
|
52
|
+
function F(I, w) {
|
|
53
53
|
let x = w;
|
|
54
|
-
|
|
54
|
+
m.type === "number" && (x = Number(w)), e.value = {
|
|
55
55
|
...e.value,
|
|
56
|
-
[
|
|
56
|
+
[I]: x
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
const D = a;
|
|
60
|
-
return (
|
|
60
|
+
return (I, w) => {
|
|
61
61
|
var R;
|
|
62
|
-
const x = K("FmTextField"), c = K("FmTooltip"),
|
|
62
|
+
const x = K("FmTextField"), c = K("FmTooltip"), k = K("FmIcon");
|
|
63
63
|
return b(), N("div", kt, [
|
|
64
64
|
t("div", {
|
|
65
65
|
class: We(`${g.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-col items-start gap-[4px]`)
|
|
66
66
|
}, [
|
|
67
|
-
y.value.length === 3 && !y.value.every((
|
|
67
|
+
y.value.length === 3 && !y.value.every((C) => C.editable) ? (b(), N(De, { key: 0 }, [
|
|
68
68
|
t("div", $t, [
|
|
69
69
|
y.value[0].editable ? (b(), O(x, {
|
|
70
70
|
key: 0,
|
|
@@ -72,7 +72,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
72
72
|
placeholder: y.value[0].placeholder,
|
|
73
73
|
type: g.type,
|
|
74
74
|
rules: g.rules,
|
|
75
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
75
|
+
"onUpdate:modelValue": w[0] || (w[0] = (C) => F(y.value[0].key, C))
|
|
76
76
|
}, null, 8, ["model-value", "placeholder", "type", "rules"])) : (b(), O(c, {
|
|
77
77
|
key: 1,
|
|
78
78
|
content: (R = e.value[y.value[0].key]) == null ? void 0 : R.toString(),
|
|
@@ -85,26 +85,26 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
85
85
|
}, 8, ["content"]))
|
|
86
86
|
]),
|
|
87
87
|
t("div", At, [
|
|
88
|
-
(b(!0), N(De, null, Le(y.value.slice(1), (
|
|
88
|
+
(b(!0), N(De, null, Le(y.value.slice(1), (C) => {
|
|
89
89
|
var f;
|
|
90
90
|
return b(), N("div", {
|
|
91
|
-
key:
|
|
91
|
+
key: C.key,
|
|
92
92
|
class: "w-[50%]"
|
|
93
93
|
}, [
|
|
94
|
-
|
|
94
|
+
C.editable ? (b(), O(x, {
|
|
95
95
|
key: 0,
|
|
96
|
-
"model-value": e.value[
|
|
97
|
-
placeholder:
|
|
96
|
+
"model-value": e.value[C.key],
|
|
97
|
+
placeholder: C.placeholder,
|
|
98
98
|
type: g.type,
|
|
99
99
|
rules: g.rules,
|
|
100
|
-
"onUpdate:modelValue": (i) =>
|
|
100
|
+
"onUpdate:modelValue": (i) => F(C.key, i)
|
|
101
101
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])) : (b(), O(c, {
|
|
102
102
|
key: 1,
|
|
103
|
-
content: (f = e.value[
|
|
103
|
+
content: (f = e.value[C.key]) == null ? void 0 : f.toString(),
|
|
104
104
|
class: "w-[100%]"
|
|
105
105
|
}, {
|
|
106
106
|
default: ke(() => [
|
|
107
|
-
t("div", Vt, S(e.value[
|
|
107
|
+
t("div", Vt, S(e.value[C.key]), 1)
|
|
108
108
|
]),
|
|
109
109
|
_: 2
|
|
110
110
|
}, 1032, ["content"]))
|
|
@@ -115,29 +115,29 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
115
115
|
key: 1,
|
|
116
116
|
class: We(`${g.removable || !g.isTakeWholeRow ? "flex-row" : "flex-col"} flex items-start gap-[4px] w-[100%]`)
|
|
117
117
|
}, [
|
|
118
|
-
(b(!0), N(De, null, Le(y.value, (
|
|
118
|
+
(b(!0), N(De, null, Le(y.value, (C) => {
|
|
119
119
|
var f;
|
|
120
120
|
return b(), N(De, {
|
|
121
|
-
key:
|
|
121
|
+
key: C.key
|
|
122
122
|
}, [
|
|
123
|
-
|
|
123
|
+
C.editable ? (b(), N("div", {
|
|
124
124
|
key: 0,
|
|
125
125
|
class: We(`${g.removable || !g.isTakeWholeRow ? "w-[50%]" : "w-[100%]"}`)
|
|
126
126
|
}, [
|
|
127
127
|
l(x, {
|
|
128
|
-
"model-value": e.value[
|
|
129
|
-
placeholder:
|
|
128
|
+
"model-value": e.value[C.key],
|
|
129
|
+
placeholder: C.placeholder,
|
|
130
130
|
type: g.type,
|
|
131
131
|
rules: g.rules,
|
|
132
|
-
"onUpdate:modelValue": (i) =>
|
|
132
|
+
"onUpdate:modelValue": (i) => F(C.key, i)
|
|
133
133
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
|
|
134
134
|
], 2)) : (b(), O(c, {
|
|
135
135
|
key: 1,
|
|
136
|
-
content: (f = e.value[
|
|
136
|
+
content: (f = e.value[C.key]) == null ? void 0 : f.toString(),
|
|
137
137
|
class: "w-[50%]"
|
|
138
138
|
}, {
|
|
139
139
|
default: ke(() => [
|
|
140
|
-
t("div", Dt, S(e.value[
|
|
140
|
+
t("div", Dt, S(e.value[C.key]), 1)
|
|
141
141
|
]),
|
|
142
142
|
_: 2
|
|
143
143
|
}, 1032, ["content"]))
|
|
@@ -146,11 +146,11 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
146
146
|
], 2))
|
|
147
147
|
], 2),
|
|
148
148
|
g.removable ? (b(), N("div", Kt, [
|
|
149
|
-
l(
|
|
149
|
+
l(k, {
|
|
150
150
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
151
151
|
name: "delete",
|
|
152
152
|
size: "md",
|
|
153
|
-
onClick: w[1] || (w[1] = (
|
|
153
|
+
onClick: w[1] || (w[1] = (C) => D("remove"))
|
|
154
154
|
})
|
|
155
155
|
])) : B("", !0)
|
|
156
156
|
]);
|
|
@@ -203,7 +203,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
203
203
|
}),
|
|
204
204
|
emits: ["update:modelValue"],
|
|
205
205
|
setup(g) {
|
|
206
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
206
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = g, y = Y(() => [
|
|
207
207
|
{ label: a("report.days.monday"), value: 1 },
|
|
208
208
|
{ label: a("report.days.tuesday"), value: 2 },
|
|
209
209
|
{ label: a("report.days.wednesday"), value: 3 },
|
|
@@ -211,7 +211,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
211
211
|
{ label: a("report.days.friday"), value: 5 },
|
|
212
212
|
{ label: a("report.days.saturday"), value: 6 },
|
|
213
213
|
{ label: a("report.days.sunday"), value: 0 }
|
|
214
|
-
]),
|
|
214
|
+
]), F = Y(() => [
|
|
215
215
|
{ label: a("report.integration.schedule.daily"), value: we.Day },
|
|
216
216
|
{ label: a("report.integration.schedule.weekly"), value: we.Week },
|
|
217
217
|
{ label: a("report.integration.schedule.monthly"), value: we.Month }
|
|
@@ -224,7 +224,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
224
224
|
label: a("report.integration.schedule.lastDayOfMonth"),
|
|
225
225
|
value: et.LastDay
|
|
226
226
|
}
|
|
227
|
-
]),
|
|
227
|
+
]), I = Y({
|
|
228
228
|
get: () => {
|
|
229
229
|
var d;
|
|
230
230
|
return ((d = e.value.autoEmailSchedule) == null ? void 0 : d.type) ?? we.Day;
|
|
@@ -270,10 +270,10 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
270
270
|
monthlyMode: d
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
|
-
}), c = Y(() =>
|
|
274
|
-
() => !
|
|
275
|
-
), R = Y(() =>
|
|
276
|
-
(d === we.Day || d === we.Week || d === we.Month) && (
|
|
273
|
+
}), c = Y(() => m.isAutoEmailMode), k = Y(
|
|
274
|
+
() => !m.isAutoEmailMode || I.value === we.Day
|
|
275
|
+
), R = Y(() => I.value === we.Week ? a("report.integration.schedule.weeklyDescription") : I.value === we.Month ? a("report.integration.schedule.monthlyDescription") : a("report.integration.schedule.dailyDescription")), C = (d) => {
|
|
276
|
+
(d === we.Day || d === we.Week || d === we.Month) && (I.value = d);
|
|
277
277
|
}, f = (d) => {
|
|
278
278
|
const s = "font-medium px-1 py-1 rounded-md inline-block mr-2 flex-none w-[80px] text-center whitespace-nowrap overflow-hidden text-ellipsis";
|
|
279
279
|
switch (d) {
|
|
@@ -362,21 +362,21 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
362
362
|
},
|
|
363
363
|
enableSorting: !1
|
|
364
364
|
}
|
|
365
|
-
], _ = Y(() =>
|
|
366
|
-
_.value &&
|
|
367
|
-
|
|
365
|
+
], _ = Y(() => m.errorLogs.some((d) => !d.isRead)), $ = () => {
|
|
366
|
+
_.value && pt(m.integrationId).then(() => {
|
|
367
|
+
m.errorLogs.forEach((d) => d.isRead = !0);
|
|
368
368
|
}).catch((d) => {
|
|
369
369
|
console.error("Failed to mark error logs as read:", d);
|
|
370
370
|
});
|
|
371
371
|
};
|
|
372
372
|
return (d, s) => {
|
|
373
373
|
var P, z, oe, le;
|
|
374
|
-
const v = K("FmBadge"), n = K("FmTable"), o = K("FmSideSheet"), h = K("FmSwitch"), r = K("FmTextField"),
|
|
374
|
+
const v = K("FmBadge"), n = K("FmTable"), o = K("FmSideSheet"), h = K("FmSwitch"), r = K("FmTextField"), p = K("FmTabs"), U = K("FmSelect"), T = K("FmTimePicker");
|
|
375
375
|
return b(), N(De, null, [
|
|
376
376
|
t("div", Ft, [
|
|
377
|
-
t("div", It, S(
|
|
377
|
+
t("div", It, S(u(a)("report.integration.auto", { label: g.label })), 1),
|
|
378
378
|
t("div", Tt, [
|
|
379
|
-
g.label == "upload" ? (b(), N("div", Rt, S(
|
|
379
|
+
g.label == "upload" ? (b(), N("div", Rt, S(u(a)("report.integration.lastUploadDate")) + ": " + S(g.lastUploadDate ? u(Ie)(g.lastUploadDate).format("MMMM D, YYYY h:mm A") : u(a)("report.integration.noData.title")), 1)) : B("", !0),
|
|
380
380
|
l(o, {
|
|
381
381
|
header: "Cron Job Error Log",
|
|
382
382
|
"dismiss-away": "",
|
|
@@ -393,20 +393,20 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
393
393
|
default: ke(() => [
|
|
394
394
|
t("div", {
|
|
395
395
|
class: We(["ms-3 fm-typo-en-body-md-400 p-1 border-solid border-2 rounded-md cursor-pointer max-w-[360px] md:max-w-[520px] lg:max-w-[640px] !truncate", _.value ? "text-fm-color-primary" : "text-fm-color-typo-secondary"])
|
|
396
|
-
}, S(
|
|
396
|
+
}, S(m.errorLogs.length > 0 && m.errorLogs[0].messages && m.errorLogs[0].messages.length > 0 ? `${m.errorLogs[0].messages[m.errorLogs[0].messages.length - 1].status} - ${m.errorLogs[0].messages[m.errorLogs[0].messages.length - 1].message}` : u(a)("No error logs")), 3)
|
|
397
397
|
]),
|
|
398
398
|
_: 1
|
|
399
399
|
})) : (b(), N("div", {
|
|
400
400
|
key: 1,
|
|
401
401
|
class: We(["ms-3 fm-typo-en-body-md-400 p-1 border-solid border-2 rounded-md cursor-pointer max-w-[360px] md:max-w-[520px] lg:max-w-[640px] !truncate", _.value ? "text-fm-color-primary" : "text-fm-color-typo-secondary"])
|
|
402
|
-
}, S(
|
|
402
|
+
}, S(m.errorLogs.length > 0 && m.errorLogs[0].messages && m.errorLogs[0].messages.length > 0 ? `${m.errorLogs[0].messages[m.errorLogs[0].messages.length - 1].status} - ${m.errorLogs[0].messages[m.errorLogs[0].messages.length - 1].message}` : u(a)("No error logs")), 3))
|
|
403
403
|
])) : B("", !0)
|
|
404
404
|
]),
|
|
405
405
|
default: ke(() => [
|
|
406
406
|
t("div", Nt, [
|
|
407
407
|
t("div", Mt, [
|
|
408
408
|
l(n, {
|
|
409
|
-
"row-data":
|
|
409
|
+
"row-data": m.errorLogs,
|
|
410
410
|
"column-defs": i,
|
|
411
411
|
"hide-footer": !0
|
|
412
412
|
}, null, 8, ["row-data"])
|
|
@@ -419,7 +419,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
419
419
|
]),
|
|
420
420
|
t("div", Pt, [
|
|
421
421
|
t("div", jt, [
|
|
422
|
-
t("div", Lt, S(
|
|
422
|
+
t("div", Lt, S(u(a)("report.common.enable")), 1),
|
|
423
423
|
l(h, {
|
|
424
424
|
modelValue: e.value.enable,
|
|
425
425
|
"onUpdate:modelValue": s[1] || (s[1] = (X) => e.value.enable = X),
|
|
@@ -427,7 +427,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
427
427
|
}, null, 8, ["modelValue"])
|
|
428
428
|
]),
|
|
429
429
|
g.isAutoEmailMode ? (b(), N("div", Et, [
|
|
430
|
-
t("div", Ot, S(
|
|
430
|
+
t("div", Ot, S(u(a)("report.common.email")), 1),
|
|
431
431
|
t("div", Bt, [
|
|
432
432
|
l(r, {
|
|
433
433
|
"model-value": (e.value.emails || []).join(","),
|
|
@@ -441,17 +441,17 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
441
441
|
c.value ? (b(), N("div", Yt, [
|
|
442
442
|
t("div", qt, [
|
|
443
443
|
t("div", zt, [
|
|
444
|
-
l(
|
|
445
|
-
"model-value":
|
|
446
|
-
items:
|
|
447
|
-
"onUpdate:modelValue":
|
|
444
|
+
l(p, {
|
|
445
|
+
"model-value": I.value,
|
|
446
|
+
items: F.value,
|
|
447
|
+
"onUpdate:modelValue": C
|
|
448
448
|
}, null, 8, ["model-value", "items"])
|
|
449
449
|
])
|
|
450
450
|
]),
|
|
451
451
|
t("div", Ht, [
|
|
452
452
|
t("div", Gt, S(R.value), 1),
|
|
453
|
-
|
|
454
|
-
t("div", Xt, S(
|
|
453
|
+
I.value === u(we).Week ? (b(), N("div", Qt, [
|
|
454
|
+
t("div", Xt, S(u(a)("report.integration.schedule.weekday")), 1),
|
|
455
455
|
l(U, {
|
|
456
456
|
"model-value": w.value,
|
|
457
457
|
items: y.value,
|
|
@@ -459,41 +459,41 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
459
459
|
"onUpdate:modelValue": s[3] || (s[3] = (X) => w.value = X)
|
|
460
460
|
}, null, 8, ["model-value", "items"])
|
|
461
461
|
])) : B("", !0),
|
|
462
|
-
|
|
463
|
-
t("div", Jt, S(
|
|
462
|
+
I.value === u(we).Month ? (b(), N("div", Wt, [
|
|
463
|
+
t("div", Jt, S(u(a)("report.integration.schedule.monthlyOption")), 1),
|
|
464
464
|
l(U, {
|
|
465
465
|
"model-value": x.value,
|
|
466
466
|
items: D.value,
|
|
467
467
|
multiselect: !1,
|
|
468
468
|
"onUpdate:modelValue": s[4] || (s[4] = (X) => x.value = X)
|
|
469
469
|
}, null, 8, ["model-value", "items"]),
|
|
470
|
-
t("div", Zt, S(x.value ===
|
|
470
|
+
t("div", Zt, S(x.value === u(et).FirstDay ? u(a)("report.integration.schedule.firstDayHint") : u(a)("report.integration.schedule.lastDayHint")), 1)
|
|
471
471
|
])) : B("", !0),
|
|
472
472
|
t("div", eo, [
|
|
473
473
|
t("div", to, [
|
|
474
|
-
t("div", oo, S(
|
|
474
|
+
t("div", oo, S(u(rt)(g.label)) + " time ", 1),
|
|
475
475
|
t("div", ao, [
|
|
476
476
|
l(T, {
|
|
477
477
|
class: "gap-[0px]",
|
|
478
|
-
"model-value":
|
|
478
|
+
"model-value": u(Ie)().hour(((P = e.value.triggerTime) == null ? void 0 : P.hour) ?? 0).minute(((z = e.value.triggerTime) == null ? void 0 : z.minute) ?? 0).format("HH:mm"),
|
|
479
479
|
"onUpdate:modelValue": s[5] || (s[5] = (X) => {
|
|
480
480
|
X && (e.value.triggerTime.hour = Number(X.split(":")[0]), e.value.triggerTime.minute = Number(X.split(":")[1]));
|
|
481
481
|
})
|
|
482
482
|
}, null, 8, ["model-value"])
|
|
483
483
|
])
|
|
484
484
|
]),
|
|
485
|
-
|
|
485
|
+
k.value ? (b(), O(Q, {
|
|
486
486
|
key: 0,
|
|
487
487
|
"model-value": {
|
|
488
|
-
label:
|
|
488
|
+
label: u(a)("report.integration.delayDay"),
|
|
489
489
|
delayDay: e.value.delayDay
|
|
490
490
|
},
|
|
491
491
|
type: "number",
|
|
492
492
|
options: {
|
|
493
|
-
label: { placeholder:
|
|
494
|
-
delayDay: { placeholder:
|
|
493
|
+
label: { placeholder: u(a)("report.integration.delayDay"), editable: !1 },
|
|
494
|
+
delayDay: { placeholder: u(a)("report.integration.delayDay"), editable: !0 }
|
|
495
495
|
},
|
|
496
|
-
rules: [(X) => X >= 0 ||
|
|
496
|
+
rules: [(X) => X >= 0 || u(a)("report.integration.schedule.delayDayValidation")],
|
|
497
497
|
"onUpdate:modelValue": s[6] || (s[6] = (X) => {
|
|
498
498
|
e.value.delayDay = X.delayDay;
|
|
499
499
|
})
|
|
@@ -502,11 +502,11 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
502
502
|
])
|
|
503
503
|
])) : (b(), N("div", lo, [
|
|
504
504
|
t("div", no, [
|
|
505
|
-
t("div", so, S(
|
|
505
|
+
t("div", so, S(u(rt)(g.label)) + " time ", 1),
|
|
506
506
|
t("div", ro, [
|
|
507
507
|
l(T, {
|
|
508
508
|
class: "gap-[0px]",
|
|
509
|
-
"model-value":
|
|
509
|
+
"model-value": u(Ie)().hour(((oe = e.value.triggerTime) == null ? void 0 : oe.hour) ?? 0).minute(((le = e.value.triggerTime) == null ? void 0 : le.minute) ?? 0).format("HH:mm"),
|
|
510
510
|
"onUpdate:modelValue": s[7] || (s[7] = (X) => {
|
|
511
511
|
X && (e.value.triggerTime.hour = Number(X.split(":")[0]), e.value.triggerTime.minute = Number(X.split(":")[1]));
|
|
512
512
|
})
|
|
@@ -515,15 +515,15 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
515
515
|
]),
|
|
516
516
|
l(Q, {
|
|
517
517
|
"model-value": {
|
|
518
|
-
label:
|
|
518
|
+
label: u(a)("report.integration.delayDay"),
|
|
519
519
|
delayDay: e.value.delayDay
|
|
520
520
|
},
|
|
521
521
|
type: "number",
|
|
522
522
|
options: {
|
|
523
|
-
label: { placeholder:
|
|
524
|
-
delayDay: { placeholder:
|
|
523
|
+
label: { placeholder: u(a)("report.integration.delayDay"), editable: !1 },
|
|
524
|
+
delayDay: { placeholder: u(a)("report.integration.delayDay"), editable: !0 }
|
|
525
525
|
},
|
|
526
|
-
rules: [(X) => X >= 0 ||
|
|
526
|
+
rules: [(X) => X >= 0 || u(a)("report.integration.schedule.delayDayValidation")],
|
|
527
527
|
"onUpdate:modelValue": s[8] || (s[8] = (X) => {
|
|
528
528
|
e.value.delayDay = X.delayDay;
|
|
529
529
|
})
|
|
@@ -533,7 +533,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
533
533
|
], 64);
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
}), io = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, mo = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" },
|
|
536
|
+
}), io = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, mo = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, uo = {
|
|
537
537
|
key: 0,
|
|
538
538
|
class: "w-[24px] flex items-center"
|
|
539
539
|
}, it = /* @__PURE__ */ te({
|
|
@@ -565,9 +565,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
565
565
|
}),
|
|
566
566
|
emits: /* @__PURE__ */ Ve(["remove"], ["update:modelValue"]),
|
|
567
567
|
setup(g, { emit: a }) {
|
|
568
|
-
const e = ne(g, "modelValue"),
|
|
569
|
-
() => Object.keys(
|
|
570
|
-
const c =
|
|
568
|
+
const e = ne(g, "modelValue"), m = g, y = Y(
|
|
569
|
+
() => Object.keys(m.options).map((x) => {
|
|
570
|
+
const c = m.options[x];
|
|
571
571
|
return {
|
|
572
572
|
placeholder: c.placeholder,
|
|
573
573
|
key: x,
|
|
@@ -575,17 +575,17 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
575
575
|
dropdownOptions: c.dropdownOptions
|
|
576
576
|
};
|
|
577
577
|
})
|
|
578
|
-
),
|
|
579
|
-
|
|
578
|
+
), F = (x, c) => {
|
|
579
|
+
m.singleValueMode ? e.value = m.type === "number" ? Number(x) : x : c && (e.value = {
|
|
580
580
|
...e.value,
|
|
581
|
-
[c]:
|
|
581
|
+
[c]: m.type === "number" ? Number(x) : x
|
|
582
582
|
});
|
|
583
583
|
}, D = (x) => {
|
|
584
584
|
var c;
|
|
585
|
-
return
|
|
586
|
-
},
|
|
585
|
+
return m.singleValueMode ? m.options.key.placeholder : (c = e.value[x.key]) == null ? void 0 : c.toString();
|
|
586
|
+
}, I = (x) => m.singleValueMode ? e.value : e.value[x.key], w = a;
|
|
587
587
|
return (x, c) => {
|
|
588
|
-
const
|
|
588
|
+
const k = K("FmSelect"), R = K("FmTextField"), C = K("FmTooltip"), f = K("FmIcon");
|
|
589
589
|
return b(), N("div", io, [
|
|
590
590
|
t("div", {
|
|
591
591
|
class: We(`${g.removable ? "w-[calc(100%-24px)] flex-row" : "w-[100%] flex-col"} flex items-center gap-[4px]`),
|
|
@@ -598,24 +598,24 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
598
598
|
key: 0,
|
|
599
599
|
class: We(g.removable ? "w-[50%]" : "w-[100%]")
|
|
600
600
|
}, [
|
|
601
|
-
i.dropdownOptions ? (b(), O(
|
|
601
|
+
i.dropdownOptions ? (b(), O(k, {
|
|
602
602
|
key: 0,
|
|
603
603
|
searchable: "",
|
|
604
604
|
"search-target": "label",
|
|
605
|
-
"model-value":
|
|
605
|
+
"model-value": I(i),
|
|
606
606
|
placeholder: i.placeholder,
|
|
607
607
|
items: i.dropdownOptions,
|
|
608
608
|
"shift-menu": !0,
|
|
609
|
-
"onUpdate:modelValue": (_) =>
|
|
609
|
+
"onUpdate:modelValue": (_) => F(_, i.key)
|
|
610
610
|
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (b(), O(R, {
|
|
611
611
|
key: 1,
|
|
612
|
-
"model-value":
|
|
612
|
+
"model-value": I(i),
|
|
613
613
|
placeholder: i.placeholder,
|
|
614
614
|
type: g.type,
|
|
615
615
|
rules: g.rules,
|
|
616
|
-
"onUpdate:modelValue": (_) =>
|
|
616
|
+
"onUpdate:modelValue": (_) => F(_, i.key)
|
|
617
617
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
|
|
618
|
-
], 2)) : (b(), O(
|
|
618
|
+
], 2)) : (b(), O(C, {
|
|
619
619
|
key: 1,
|
|
620
620
|
content: D(i),
|
|
621
621
|
class: "w-[50%]"
|
|
@@ -627,7 +627,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
627
627
|
}, 1032, ["content"]))
|
|
628
628
|
], 64))), 128))
|
|
629
629
|
], 2),
|
|
630
|
-
g.removable ? (b(), N("div",
|
|
630
|
+
g.removable ? (b(), N("div", uo, [
|
|
631
631
|
l(f, {
|
|
632
632
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
633
633
|
name: "delete",
|
|
@@ -638,7 +638,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
638
638
|
]);
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
|
-
}),
|
|
641
|
+
}), po = { class: "flex flex-row flex-wrap gap-4 justify-between w-[100%]" }, co = {
|
|
642
642
|
key: 0,
|
|
643
643
|
class: "w-[24px] flex-shrink-0"
|
|
644
644
|
}, ee = /* @__PURE__ */ te({
|
|
@@ -653,9 +653,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
653
653
|
},
|
|
654
654
|
emits: ["remove", "update:rows"],
|
|
655
655
|
setup(g, { emit: a }) {
|
|
656
|
-
const e = g,
|
|
657
|
-
return (
|
|
658
|
-
(b(!0), N(De, null, Le(e.rows, (
|
|
656
|
+
const e = g, m = Y(() => e.rows.length > 1 ? Math.min(e.rows.length, e.columnsPerRow) : 1), y = a;
|
|
657
|
+
return (F, D) => (b(), N("div", po, [
|
|
658
|
+
(b(!0), N(De, null, Le(e.rows, (I, w) => (b(), N("div", {
|
|
659
659
|
key: w,
|
|
660
660
|
class: "flex flex-col",
|
|
661
661
|
style: dt(
|
|
@@ -664,7 +664,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
664
664
|
}, [
|
|
665
665
|
t("div", {
|
|
666
666
|
class: We([
|
|
667
|
-
w <
|
|
667
|
+
w < m.value ? "p-3 bg-gray-100 border-b-4" : "",
|
|
668
668
|
"flex flex-row items-center w-full font-medium text-gray-600 mb-2"
|
|
669
669
|
])
|
|
670
670
|
}, [
|
|
@@ -672,11 +672,11 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
672
672
|
key: `header-item-${c}`,
|
|
673
673
|
class: "w-[50%]"
|
|
674
674
|
}, [
|
|
675
|
-
w <
|
|
675
|
+
w < m.value ? (b(), N(De, { key: 0 }, [
|
|
676
676
|
mt(S(x), 1)
|
|
677
677
|
], 64)) : B("", !0)
|
|
678
678
|
]))), 128)),
|
|
679
|
-
|
|
679
|
+
F.removable ? (b(), N("div", co)) : B("", !0)
|
|
680
680
|
], 2),
|
|
681
681
|
!e.fieldsOptions || !Object.values(e.fieldsOptions).some((x) => x.dropdownOptions) ? (b(), O(Q, {
|
|
682
682
|
key: `item-${w}`,
|
|
@@ -743,40 +743,40 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
743
743
|
}),
|
|
744
744
|
emits: ["update:modelValue"],
|
|
745
745
|
setup(g) {
|
|
746
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
746
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = Se(), y = Re(), F = Ce(), { promptLoader: D } = ze(), { promptMessage: I } = He(), { restaurants: w } = $e(), { rules: x, notifyUnauthorized: c } = je(), k = W(!1), R = Y(
|
|
747
747
|
() => w.map((h) => ({ label: h.name, value: h.id }))
|
|
748
|
-
),
|
|
748
|
+
), C = Y(() => {
|
|
749
749
|
var h, r;
|
|
750
|
-
return
|
|
750
|
+
return k.value ? "Connecting" : (r = (h = e.value) == null ? void 0 : h.platform) != null && r.accessToken ? "Disconnect" : "Connect";
|
|
751
751
|
}), f = W(0);
|
|
752
752
|
async function i() {
|
|
753
753
|
var h;
|
|
754
|
-
if (
|
|
755
|
-
|
|
754
|
+
if (k.value)
|
|
755
|
+
m.open({ type: "error", message: "Connecting in progress" });
|
|
756
756
|
else if ((h = e.value.platform) != null && h.accessToken)
|
|
757
|
-
await
|
|
757
|
+
await I({
|
|
758
758
|
message: a("report.integration.xero.confirmDisconnect", { name: e.value.name }),
|
|
759
759
|
title: a("report.integration.xero.disconnectTitle")
|
|
760
760
|
}) && (await ct(e.value._id), await y.getSettings());
|
|
761
761
|
else if (e.value._id)
|
|
762
762
|
try {
|
|
763
763
|
const r = await ft(e.value._id);
|
|
764
|
-
|
|
765
|
-
const
|
|
764
|
+
k.value = !0;
|
|
765
|
+
const p = setInterval(async () => {
|
|
766
766
|
var U;
|
|
767
767
|
f.value += 1;
|
|
768
768
|
try {
|
|
769
769
|
await y.getSettings();
|
|
770
770
|
} finally {
|
|
771
|
-
(f.value === 12 || (U = e.value.platform) != null && U.accessToken) && (
|
|
771
|
+
(f.value === 12 || (U = e.value.platform) != null && U.accessToken) && (k.value = !1, p && clearInterval(p), f.value = 0);
|
|
772
772
|
}
|
|
773
773
|
}, 5e3);
|
|
774
774
|
window.open(r.redirect, "_blank");
|
|
775
775
|
} catch (r) {
|
|
776
|
-
|
|
776
|
+
m.open({ type: "error", message: r.message });
|
|
777
777
|
}
|
|
778
778
|
else
|
|
779
|
-
|
|
779
|
+
m.open({ type: "error", message: `invalid accounting ${e.value._id}` });
|
|
780
780
|
}
|
|
781
781
|
async function _() {
|
|
782
782
|
var U;
|
|
@@ -789,20 +789,20 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
789
789
|
c(Z.delete);
|
|
790
790
|
return;
|
|
791
791
|
}
|
|
792
|
-
await
|
|
792
|
+
await I({
|
|
793
793
|
message: `Confirm delete ${e.value.name}?`,
|
|
794
794
|
title: "Delete"
|
|
795
795
|
}) && await D(async () => {
|
|
796
796
|
try {
|
|
797
|
-
await Be(e.value._id), await y.getSettings(),
|
|
797
|
+
await Be(e.value._id), await y.getSettings(), F.back();
|
|
798
798
|
} catch (T) {
|
|
799
|
-
|
|
799
|
+
m.open({ type: "error", message: T.message });
|
|
800
800
|
}
|
|
801
801
|
});
|
|
802
802
|
}
|
|
803
803
|
async function $() {
|
|
804
|
-
var
|
|
805
|
-
const h = (
|
|
804
|
+
var p;
|
|
805
|
+
const h = (p = e.value.platform) == null ? void 0 : p.locationIds;
|
|
806
806
|
if (_e({
|
|
807
807
|
integrationRestaurantIds: h,
|
|
808
808
|
rules: x.value,
|
|
@@ -815,26 +815,26 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
815
815
|
try {
|
|
816
816
|
await Ye(e.value._id, e.value), await y.getSettings();
|
|
817
817
|
} catch (U) {
|
|
818
|
-
|
|
818
|
+
m.open({ type: "error", message: U.message });
|
|
819
819
|
}
|
|
820
820
|
});
|
|
821
821
|
}
|
|
822
822
|
function d(h) {
|
|
823
|
-
const r = g.tenantOptions.data.find((
|
|
823
|
+
const r = g.tenantOptions.data.find((p) => p.value === h);
|
|
824
824
|
r && e.value.platform && (e.value.platform.tenant = {
|
|
825
825
|
id: r.value,
|
|
826
826
|
name: r.label
|
|
827
827
|
});
|
|
828
828
|
}
|
|
829
829
|
function s(h, r) {
|
|
830
|
-
var
|
|
831
|
-
(U = (
|
|
830
|
+
var p, U;
|
|
831
|
+
(U = (p = e.value.platform) == null ? void 0 : p.mappings) != null && U[h] && (e.value.platform.mappings[h] = e.value.platform.mappings[h].filter(
|
|
832
832
|
(T, P) => P !== r
|
|
833
833
|
));
|
|
834
834
|
}
|
|
835
835
|
function v(h) {
|
|
836
|
-
var r,
|
|
837
|
-
(
|
|
836
|
+
var r, p;
|
|
837
|
+
(p = (r = e.value.platform) == null ? void 0 : r.mappings) != null && p[h] && (e.value.platform.mappings[h] = [
|
|
838
838
|
...e.value.platform.mappings[h],
|
|
839
839
|
h === "items" ? {
|
|
840
840
|
feedmeKey: "",
|
|
@@ -851,7 +851,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
851
851
|
try {
|
|
852
852
|
await Ne(e.value._id), await y.getSettings();
|
|
853
853
|
} catch (h) {
|
|
854
|
-
|
|
854
|
+
m.open({ type: "error", message: h.message });
|
|
855
855
|
}
|
|
856
856
|
});
|
|
857
857
|
}
|
|
@@ -872,15 +872,15 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
872
872
|
return Oe(async () => {
|
|
873
873
|
await y.getSettings();
|
|
874
874
|
}), (h, r) => {
|
|
875
|
-
var X, de, me,
|
|
876
|
-
const
|
|
875
|
+
var X, de, me, ue, pe, ce, fe, ge, ve, ye, xe, J, M, L, A, j, H, Fe, E, ie, Ae, Je, q, G, ae, Xe, Ze;
|
|
876
|
+
const p = K("FmIcon"), U = K("FmButton"), T = K("FmMenuDivider"), P = K("FmCircularProgress"), z = K("FmSelect"), oe = K("FmTextField"), le = K("FmSwitch");
|
|
877
877
|
return (de = (X = e.value) == null ? void 0 : X.platform) != null && de.mappings ? (b(), N("div", fo, [
|
|
878
878
|
t("div", go, [
|
|
879
879
|
t("div", vo, [
|
|
880
880
|
r[21] || (r[21] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
|
|
881
881
|
t("div", yo, [
|
|
882
882
|
t("div", xo, [
|
|
883
|
-
l(
|
|
883
|
+
l(p, {
|
|
884
884
|
name: "refresh",
|
|
885
885
|
class: "p-2 bg-gray-100 rounded-full",
|
|
886
886
|
onClick: n
|
|
@@ -894,7 +894,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
894
894
|
}),
|
|
895
895
|
l(U, {
|
|
896
896
|
variant: "primary",
|
|
897
|
-
label:
|
|
897
|
+
label: u(a)("report.common.update"),
|
|
898
898
|
"prepend-icon": "update",
|
|
899
899
|
onClick: $
|
|
900
900
|
}, null, 8, ["label"])
|
|
@@ -908,9 +908,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
908
908
|
t("div", ho, [
|
|
909
909
|
t("div", _o, [
|
|
910
910
|
l(U, {
|
|
911
|
-
disabled:
|
|
911
|
+
disabled: k.value,
|
|
912
912
|
variant: "primary",
|
|
913
|
-
label:
|
|
913
|
+
label: C.value,
|
|
914
914
|
onClick: i
|
|
915
915
|
}, null, 8, ["disabled", "label"])
|
|
916
916
|
]),
|
|
@@ -921,8 +921,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
921
921
|
l(z, {
|
|
922
922
|
class: "flex-grow",
|
|
923
923
|
items: g.tenantOptions.data || [],
|
|
924
|
-
"model-value": (
|
|
925
|
-
placeholder: g.tenantOptions.data ? (
|
|
924
|
+
"model-value": (ue = e.value.platform.tenant) == null ? void 0 : ue.id,
|
|
925
|
+
placeholder: g.tenantOptions.data ? (pe = e.value.platform.tenant) == null ? void 0 : pe.name : "Select tenant ",
|
|
926
926
|
"onUpdate:modelValue": d
|
|
927
927
|
}, null, 8, ["items", "model-value", "placeholder"])
|
|
928
928
|
]),
|
|
@@ -950,13 +950,13 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
950
950
|
}, null, 8, ["modelValue", "items"])
|
|
951
951
|
]),
|
|
952
952
|
t("div", Ao, [
|
|
953
|
-
t("div", Vo, S(
|
|
953
|
+
t("div", Vo, S(u(a)("report.integration.grouping.title")), 1),
|
|
954
954
|
l(z, {
|
|
955
955
|
modelValue: e.value.platform.grouping,
|
|
956
956
|
"onUpdate:modelValue": r[2] || (r[2] = (re) => e.value.platform.grouping = re),
|
|
957
957
|
multiselect: !1,
|
|
958
958
|
items: o,
|
|
959
|
-
placeholder:
|
|
959
|
+
placeholder: u(a)("report.integration.grouping.title"),
|
|
960
960
|
class: "flex-grow"
|
|
961
961
|
}, null, 8, ["modelValue", "placeholder"])
|
|
962
962
|
])
|
|
@@ -1001,7 +1001,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1001
1001
|
l(le, {
|
|
1002
1002
|
"model-value": e.value.platform.mappings.isCombineRefund ?? !1,
|
|
1003
1003
|
style: { gap: 0 },
|
|
1004
|
-
disabled: e.value.platform.grouping !=
|
|
1004
|
+
disabled: e.value.platform.grouping != u(he).BY_DAY,
|
|
1005
1005
|
"onUpdate:modelValue": r[6] || (r[6] = (re) => {
|
|
1006
1006
|
e.value.platform.mappings.isCombineRefund = re;
|
|
1007
1007
|
})
|
|
@@ -1180,28 +1180,28 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1180
1180
|
},
|
|
1181
1181
|
emits: ["update:modelValue"],
|
|
1182
1182
|
setup(g) {
|
|
1183
|
-
const a = W([]), { t: e } = se(),
|
|
1184
|
-
() => a.value.reduce((c,
|
|
1185
|
-
const R = c.length, { invoice:
|
|
1183
|
+
const a = W([]), { t: e } = se(), m = Y(
|
|
1184
|
+
() => a.value.reduce((c, k) => {
|
|
1185
|
+
const R = c.length, { invoice: C, payments: f } = k;
|
|
1186
1186
|
c[R] = {
|
|
1187
|
-
date:
|
|
1188
|
-
contact:
|
|
1189
|
-
status:
|
|
1190
|
-
ref:
|
|
1187
|
+
date: C.Date,
|
|
1188
|
+
contact: C.Contact.ContactID,
|
|
1189
|
+
status: C.Status,
|
|
1190
|
+
ref: C.Reference
|
|
1191
1191
|
};
|
|
1192
|
-
for (let i = 0; i < Math.max(
|
|
1192
|
+
for (let i = 0; i < Math.max(C.LineItems.length, f.length); i++) {
|
|
1193
1193
|
const _ = R + i;
|
|
1194
|
-
c[_] || (c[_] = {}),
|
|
1194
|
+
c[_] || (c[_] = {}), C.LineItems[i] && (c[_] = {
|
|
1195
1195
|
...c[_],
|
|
1196
|
-
itemDescription:
|
|
1197
|
-
itemQuantity:
|
|
1198
|
-
itemUnitAmount:
|
|
1196
|
+
itemDescription: C.LineItems[i].Description,
|
|
1197
|
+
itemQuantity: C.LineItems[i].Quantity,
|
|
1198
|
+
itemUnitAmount: C.LineItems[i].UnitAmount,
|
|
1199
1199
|
// itemCode: invoice.LineItems[i].ItemCode,
|
|
1200
|
-
itemAccount:
|
|
1201
|
-
itemTax:
|
|
1202
|
-
itemTaxType:
|
|
1203
|
-
itemLineAmount:
|
|
1204
|
-
itemDiscount:
|
|
1200
|
+
itemAccount: C.LineItems[i].AccountCode,
|
|
1201
|
+
itemTax: C.LineItems[i].TaxAmount,
|
|
1202
|
+
itemTaxType: C.LineItems[i].TaxType,
|
|
1203
|
+
itemLineAmount: C.LineItems[i].LineAmount,
|
|
1204
|
+
itemDiscount: C.LineItems[i].DiscountAmount
|
|
1205
1205
|
}), f[i] && (c[_] = {
|
|
1206
1206
|
...c[_],
|
|
1207
1207
|
paymentAccount: f[i].Account.Code,
|
|
@@ -1287,15 +1287,15 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1287
1287
|
header: "Payment Amount",
|
|
1288
1288
|
enableSorting: !1
|
|
1289
1289
|
}
|
|
1290
|
-
],
|
|
1290
|
+
], F = ne(g, "modelValue"), D = W(!1), I = Se(), { dateRange: w } = Ge($e());
|
|
1291
1291
|
Ke(
|
|
1292
1292
|
() => w.value,
|
|
1293
1293
|
async () => {
|
|
1294
|
-
if (
|
|
1294
|
+
if (F.value._id)
|
|
1295
1295
|
try {
|
|
1296
|
-
D.value = !0, a.value = await qe(
|
|
1296
|
+
D.value = !0, a.value = await qe(F.value._id);
|
|
1297
1297
|
} catch (c) {
|
|
1298
|
-
|
|
1298
|
+
I.open({ message: c.message, type: "error" });
|
|
1299
1299
|
} finally {
|
|
1300
1300
|
D.value = !1;
|
|
1301
1301
|
}
|
|
@@ -1306,20 +1306,20 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1306
1306
|
);
|
|
1307
1307
|
async function x() {
|
|
1308
1308
|
try {
|
|
1309
|
-
|
|
1309
|
+
F.value._id ? (D.value = !0, await ot(F.value._id), I.open({ message: "Upload successful", type: "success" })) : I.open({ message: "Invalid accounting setting", type: "error" });
|
|
1310
1310
|
} catch (c) {
|
|
1311
|
-
c.message &&
|
|
1311
|
+
c.message && I.open({ message: c.message, type: "error" }), Array.isArray(c.errors) ? c.errors.forEach((k) => I.open({ message: String(k), type: "error" })) : typeof c.errors == "string" && I.open({ message: c.errors, type: "error" });
|
|
1312
1312
|
} finally {
|
|
1313
1313
|
D.value = !1;
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
|
-
return (c,
|
|
1317
|
-
const R = K("FmButton"),
|
|
1316
|
+
return (c, k) => {
|
|
1317
|
+
const R = K("FmButton"), C = K("FmCircularProgress"), f = K("FmTable");
|
|
1318
1318
|
return b(), N("div", zo, [
|
|
1319
1319
|
t("div", Ho, [
|
|
1320
1320
|
l(Qe, {
|
|
1321
|
-
"date-range":
|
|
1322
|
-
"onUpdate:dateRange":
|
|
1321
|
+
"date-range": u(w),
|
|
1322
|
+
"onUpdate:dateRange": k[0] || (k[0] = (i) => Me(w) ? w.value = i : null),
|
|
1323
1323
|
compare: !1
|
|
1324
1324
|
}, null, 8, ["date-range"]),
|
|
1325
1325
|
l(R, {
|
|
@@ -1330,12 +1330,12 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1330
1330
|
}, null, 8, ["loading"])
|
|
1331
1331
|
]),
|
|
1332
1332
|
D.value ? (b(), N("div", Go, [
|
|
1333
|
-
l(
|
|
1334
|
-
t("span", Qo, S(
|
|
1335
|
-
])) :
|
|
1333
|
+
l(C, { size: "xl" }),
|
|
1334
|
+
t("span", Qo, S(u(e)("report.common.isLoading")), 1)
|
|
1335
|
+
])) : m.value.length > 0 ? (b(), O(f, {
|
|
1336
1336
|
key: 1,
|
|
1337
1337
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
1338
|
-
"row-data":
|
|
1338
|
+
"row-data": m.value,
|
|
1339
1339
|
"column-defs": y
|
|
1340
1340
|
}, null, 8, ["row-data"])) : B("", !0)
|
|
1341
1341
|
]);
|
|
@@ -1351,7 +1351,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1351
1351
|
}),
|
|
1352
1352
|
emits: ["update:modelValue"],
|
|
1353
1353
|
setup(g) {
|
|
1354
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
1354
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = g, y = W("setting"), F = W({}), D = W({}), I = W({}), w = [
|
|
1355
1355
|
{
|
|
1356
1356
|
label: a("report.integration.setting"),
|
|
1357
1357
|
value: "setting",
|
|
@@ -1370,28 +1370,28 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1370
1370
|
return {
|
|
1371
1371
|
component: qo,
|
|
1372
1372
|
props: {
|
|
1373
|
-
tenantOptions:
|
|
1373
|
+
tenantOptions: F.value,
|
|
1374
1374
|
taxOptions: D.value,
|
|
1375
|
-
accountCodeOptions:
|
|
1376
|
-
errorLogs:
|
|
1375
|
+
accountCodeOptions: I.value,
|
|
1376
|
+
errorLogs: m.errorLogs
|
|
1377
1377
|
}
|
|
1378
1378
|
};
|
|
1379
1379
|
default:
|
|
1380
1380
|
return null;
|
|
1381
1381
|
}
|
|
1382
1382
|
});
|
|
1383
|
-
async function
|
|
1383
|
+
async function k() {
|
|
1384
1384
|
if (e.value._id)
|
|
1385
1385
|
try {
|
|
1386
1386
|
const f = await gt(e.value._id);
|
|
1387
|
-
|
|
1387
|
+
F.value.data = f.map((i) => ({
|
|
1388
1388
|
value: i.id,
|
|
1389
1389
|
label: i.name
|
|
1390
1390
|
}));
|
|
1391
1391
|
} catch (f) {
|
|
1392
|
-
console.error("Failed to fetch tenants:", f),
|
|
1392
|
+
console.error("Failed to fetch tenants:", f), F.value.isError = !0;
|
|
1393
1393
|
} finally {
|
|
1394
|
-
|
|
1394
|
+
F.value.isLoaded = !0;
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
1397
|
async function R() {
|
|
@@ -1408,28 +1408,28 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1408
1408
|
D.value.isLoaded = !0;
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
async function
|
|
1411
|
+
async function C() {
|
|
1412
1412
|
if (e.value._id)
|
|
1413
1413
|
try {
|
|
1414
1414
|
const f = await yt(e.value._id);
|
|
1415
|
-
|
|
1415
|
+
I.value.data = f.map((i) => ({
|
|
1416
1416
|
value: i.Code,
|
|
1417
1417
|
label: `${i.Code} ${i.Name} - [${i.Class}_${i.Type}]`
|
|
1418
1418
|
}));
|
|
1419
1419
|
} catch (f) {
|
|
1420
|
-
console.error("Failed to fetch accounts:", f),
|
|
1420
|
+
console.error("Failed to fetch accounts:", f), I.value.isError = !0;
|
|
1421
1421
|
} finally {
|
|
1422
|
-
|
|
1422
|
+
I.value.isLoaded = !0;
|
|
1423
1423
|
}
|
|
1424
1424
|
}
|
|
1425
1425
|
return Ke(
|
|
1426
1426
|
() => {
|
|
1427
1427
|
var f;
|
|
1428
|
-
return [(f = e.value.platform) == null ? void 0 : f.accessToken,
|
|
1428
|
+
return [(f = e.value.platform) == null ? void 0 : f.accessToken, F.value.isLoaded];
|
|
1429
1429
|
},
|
|
1430
1430
|
(f) => {
|
|
1431
1431
|
var i, _;
|
|
1432
|
-
f && (
|
|
1432
|
+
f && (k(), (_ = (i = e.value.platform) == null ? void 0 : i.tenant) != null && _.id && F.value.isLoaded && (R(), C()));
|
|
1433
1433
|
},
|
|
1434
1434
|
{ immediate: !0 }
|
|
1435
1435
|
), (f, i) => {
|
|
@@ -1440,7 +1440,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1440
1440
|
title: ((d = e.value) == null ? void 0 : d.name) || "Xero",
|
|
1441
1441
|
"back-button": !0,
|
|
1442
1442
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
1443
|
-
"onClick:back": i[0] || (i[0] = (n) =>
|
|
1443
|
+
"onClick:back": i[0] || (i[0] = (n) => u(x).push({ name: "integrations" }))
|
|
1444
1444
|
}, {
|
|
1445
1445
|
description: ke(() => i[3] || (i[3] = [
|
|
1446
1446
|
t("div", null, null, -1)
|
|
@@ -1507,7 +1507,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1507
1507
|
meaning: a("report.integration.refNumExplain.5digit.meaning"),
|
|
1508
1508
|
output: "[5DIGIT]"
|
|
1509
1509
|
}
|
|
1510
|
-
],
|
|
1510
|
+
], m = [
|
|
1511
1511
|
{
|
|
1512
1512
|
accessorKey: "placeholder",
|
|
1513
1513
|
header: a("report.integration.placeholder")
|
|
@@ -1516,13 +1516,13 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1516
1516
|
accessorKey: "category",
|
|
1517
1517
|
header: a("report.integration.category"),
|
|
1518
1518
|
cell: (y) => {
|
|
1519
|
-
const
|
|
1519
|
+
const F = y.getValue();
|
|
1520
1520
|
return V(
|
|
1521
1521
|
"div",
|
|
1522
1522
|
{
|
|
1523
1523
|
class: "font-medium text-[#194C97] bg-blue-700 bg-opacity-10 px-2 py-1 rounded-md inline-block"
|
|
1524
1524
|
},
|
|
1525
|
-
|
|
1525
|
+
F
|
|
1526
1526
|
);
|
|
1527
1527
|
}
|
|
1528
1528
|
},
|
|
@@ -1535,10 +1535,10 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1535
1535
|
header: a("report.integration.output")
|
|
1536
1536
|
}
|
|
1537
1537
|
];
|
|
1538
|
-
return (y,
|
|
1539
|
-
const D = K("FmIcon"),
|
|
1538
|
+
return (y, F) => {
|
|
1539
|
+
const D = K("FmIcon"), I = K("FmTable"), w = K("FmSideSheet");
|
|
1540
1540
|
return b(), O(w, {
|
|
1541
|
-
header:
|
|
1541
|
+
header: u(a)("report.integration.refNumFormatInfo"),
|
|
1542
1542
|
"dismiss-away": "",
|
|
1543
1543
|
"max-width": 780
|
|
1544
1544
|
}, {
|
|
@@ -1552,15 +1552,15 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1552
1552
|
default: ke(() => [
|
|
1553
1553
|
t("div", ea, [
|
|
1554
1554
|
t("ul", ta, [
|
|
1555
|
-
t("li", null, S(
|
|
1556
|
-
t("li", null, S(
|
|
1557
|
-
t("li", null, S(
|
|
1558
|
-
t("li", null, S(
|
|
1555
|
+
t("li", null, S(u(a)("report.integration.refNumGuide.1stPoint")), 1),
|
|
1556
|
+
t("li", null, S(u(a)("report.integration.refNumGuide.2ndPoint")), 1),
|
|
1557
|
+
t("li", null, S(u(a)("report.integration.refNumGuide.3ndPoint")), 1),
|
|
1558
|
+
t("li", null, S(u(a)("report.integration.refNumGuide.4thPoint")), 1)
|
|
1559
1559
|
])
|
|
1560
1560
|
]),
|
|
1561
|
-
l(
|
|
1561
|
+
l(I, {
|
|
1562
1562
|
"row-data": e,
|
|
1563
|
-
"column-defs":
|
|
1563
|
+
"column-defs": m,
|
|
1564
1564
|
"shrink-at": !1,
|
|
1565
1565
|
"hide-footer": !0
|
|
1566
1566
|
})
|
|
@@ -1572,7 +1572,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1572
1572
|
}), oa = {
|
|
1573
1573
|
key: 0,
|
|
1574
1574
|
class: "flex flex-col h-full"
|
|
1575
|
-
}, aa = { class: "flex flex-col gap-16 pb-[24px]" }, la = { class: "flex flex-row justify-between items-center gap-2" }, na = { class: "fm-typo-en-title-sm-800" }, sa = { class: "flex flex-row gap-2 items-center" }, ra = { class: "relative group cursor-pointer" }, ia = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, da = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ma = { class: "w-[90%] flex flex-col gap-24" },
|
|
1575
|
+
}, aa = { class: "flex flex-col gap-16 pb-[24px]" }, la = { class: "flex flex-row justify-between items-center gap-2" }, na = { class: "fm-typo-en-title-sm-800" }, sa = { class: "flex flex-row gap-2 items-center" }, ra = { class: "relative group cursor-pointer" }, ia = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, da = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ma = { class: "w-[90%] flex flex-col gap-24" }, ua = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pa = { class: "flex flex-col justify-between" }, ca = { class: "w-[25%] font-semibold" }, fa = { class: "flex-grow" }, ga = { class: "flex flex-col justify-between" }, va = { class: "w-[25%] font-semibold" }, ya = { class: "flex-grow" }, xa = { class: "flex flex-col gap-16" }, ba = { class: "fm-typo-en-title-sm-800" }, wa = { class: "flex flex-col max-w-[100%]" }, ha = { class: "w-[25%] font-semibold" }, _a = { class: "flex-grow" }, Ca = { class: "flex flex-col max-w-[100%]" }, ka = { class: "w-[25%] font-semibold" }, $a = { class: "flex flex-col max-w-[100%]" }, Sa = { class: "w-[25%] font-semibold" }, Aa = { class: "flex flex-col max-w-[100%]" }, Va = { class: "flex flex-col gap-16" }, Da = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ka = { class: "flex flex-col gap-16 pt-3 pb-3" }, Fa = { class: "flex flex-row items-center gap-5" }, Ia = { class: "fm-typo-en-title-sm-800" }, Ta = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ra = { class: "flex flex-row items-center justify-between gap-x-16" }, Ua = { class: "fm-typo-en-title-sm-800" }, Na = { class: "flex flex-row items-center justify-between gap-x-16" }, Ma = { class: "fm-typo-en-title-sm-800" }, Pa = { class: "flex flex-row items-center justify-between gap-x-16" }, ja = { class: "fm-typo-en-title-sm-800" }, La = { class: "flex flex-row items-center justify-between gap-x-16" }, Ea = { class: "fm-typo-en-title-sm-800" }, Oa = /* @__PURE__ */ te({
|
|
1576
1576
|
__name: "Setting",
|
|
1577
1577
|
props: /* @__PURE__ */ Ve({
|
|
1578
1578
|
errorLogs: {}
|
|
@@ -1582,9 +1582,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1582
1582
|
}),
|
|
1583
1583
|
emits: ["update:modelValue"],
|
|
1584
1584
|
setup(g) {
|
|
1585
|
-
const a = ne(g, "modelValue"), e = Se(),
|
|
1586
|
-
() =>
|
|
1587
|
-
), { t: x } = se(), { rules: c, notifyUnauthorized:
|
|
1585
|
+
const a = ne(g, "modelValue"), e = Se(), m = Re(), y = Ce(), { promptLoader: F } = ze(), { promptMessage: D } = He(), { restaurants: I } = $e(), w = Y(
|
|
1586
|
+
() => I.map((n) => ({ label: n.name, value: n.id }))
|
|
1587
|
+
), { t: x } = se(), { rules: c, notifyUnauthorized: k } = je();
|
|
1588
1588
|
async function R() {
|
|
1589
1589
|
var r;
|
|
1590
1590
|
const n = (r = a.value.platform) == null ? void 0 : r.locationIds;
|
|
@@ -1593,21 +1593,21 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1593
1593
|
rules: c.value,
|
|
1594
1594
|
action: Z.delete
|
|
1595
1595
|
})) {
|
|
1596
|
-
|
|
1596
|
+
k(Z.delete);
|
|
1597
1597
|
return;
|
|
1598
1598
|
}
|
|
1599
1599
|
await D({
|
|
1600
1600
|
message: x("report.messages.confirmDelete", { name: a.value.name }),
|
|
1601
1601
|
title: x("report.common.delete")
|
|
1602
|
-
}) && await
|
|
1602
|
+
}) && await F(async () => {
|
|
1603
1603
|
try {
|
|
1604
|
-
await Be(a.value._id), await
|
|
1605
|
-
} catch (
|
|
1606
|
-
e.open({ type: "error", message:
|
|
1604
|
+
await Be(a.value._id), await m.getSettings(), y.back();
|
|
1605
|
+
} catch (p) {
|
|
1606
|
+
e.open({ type: "error", message: p.message });
|
|
1607
1607
|
}
|
|
1608
1608
|
});
|
|
1609
1609
|
}
|
|
1610
|
-
async function
|
|
1610
|
+
async function C() {
|
|
1611
1611
|
var h;
|
|
1612
1612
|
const n = (h = a.value.platform) == null ? void 0 : h.locationIds;
|
|
1613
1613
|
if (_e({
|
|
@@ -1615,20 +1615,20 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1615
1615
|
rules: c.value,
|
|
1616
1616
|
action: Z.update
|
|
1617
1617
|
})) {
|
|
1618
|
-
|
|
1618
|
+
k(Z.update);
|
|
1619
1619
|
return;
|
|
1620
1620
|
}
|
|
1621
|
-
await
|
|
1621
|
+
await F(async () => {
|
|
1622
1622
|
try {
|
|
1623
|
-
await Ye(a.value._id, a.value), await
|
|
1623
|
+
await Ye(a.value._id, a.value), await m.getSettings();
|
|
1624
1624
|
} catch (r) {
|
|
1625
1625
|
e.open({ type: "error", message: r.message });
|
|
1626
1626
|
}
|
|
1627
1627
|
});
|
|
1628
1628
|
}
|
|
1629
1629
|
function f(n, o) {
|
|
1630
|
-
var
|
|
1631
|
-
const h = (
|
|
1630
|
+
var p;
|
|
1631
|
+
const h = (p = a.value.platform) == null ? void 0 : p.mappings;
|
|
1632
1632
|
if (!h) return;
|
|
1633
1633
|
if (["items", "taxes", "payments", "taxRoundingAdjustments"].includes(n)) {
|
|
1634
1634
|
const U = n;
|
|
@@ -1715,23 +1715,23 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1715
1715
|
};
|
|
1716
1716
|
}
|
|
1717
1717
|
async function v() {
|
|
1718
|
-
await
|
|
1718
|
+
await F(async () => {
|
|
1719
1719
|
try {
|
|
1720
|
-
await Ne(a.value._id), await
|
|
1720
|
+
await Ne(a.value._id), await m.getSettings();
|
|
1721
1721
|
} catch (n) {
|
|
1722
1722
|
e.open({ type: "error", message: n.message });
|
|
1723
1723
|
}
|
|
1724
1724
|
});
|
|
1725
1725
|
}
|
|
1726
1726
|
return Oe(async () => {
|
|
1727
|
-
await
|
|
1727
|
+
await m.getSettings();
|
|
1728
1728
|
}), (n, o) => {
|
|
1729
|
-
var P, z, oe, le, X, de, me,
|
|
1730
|
-
const h = K("FmIcon"), r = K("FmButton"),
|
|
1729
|
+
var P, z, oe, le, X, de, me, ue, pe, ce, fe, ge, ve, ye, xe, J, M, L;
|
|
1730
|
+
const h = K("FmIcon"), r = K("FmButton"), p = K("FmMenuDivider"), U = K("FmTextField"), T = K("FmSelect");
|
|
1731
1731
|
return (z = (P = a.value) == null ? void 0 : P.platform) != null && z.mappings ? (b(), N("div", oa, [
|
|
1732
1732
|
t("div", aa, [
|
|
1733
1733
|
t("div", la, [
|
|
1734
|
-
t("div", na, S(
|
|
1734
|
+
t("div", na, S(u(x)("report.integration.bukku.connect")), 1),
|
|
1735
1735
|
t("div", sa, [
|
|
1736
1736
|
t("div", ra, [
|
|
1737
1737
|
l(h, {
|
|
@@ -1739,51 +1739,51 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1739
1739
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1740
1740
|
onClick: v
|
|
1741
1741
|
}),
|
|
1742
|
-
t("span", ia, S(
|
|
1742
|
+
t("span", ia, S(u(x)("report.integration.refreshSetting")), 1)
|
|
1743
1743
|
]),
|
|
1744
1744
|
l(r, {
|
|
1745
1745
|
variant: "tertiary",
|
|
1746
|
-
label:
|
|
1746
|
+
label: u(x)("report.common.delete"),
|
|
1747
1747
|
onClick: R
|
|
1748
1748
|
}, null, 8, ["label"]),
|
|
1749
1749
|
l(r, {
|
|
1750
1750
|
variant: "primary",
|
|
1751
|
-
label:
|
|
1751
|
+
label: u(x)("report.common.update"),
|
|
1752
1752
|
"prepend-icon": "update",
|
|
1753
|
-
onClick:
|
|
1753
|
+
onClick: C
|
|
1754
1754
|
}, null, 8, ["label"])
|
|
1755
1755
|
])
|
|
1756
1756
|
])
|
|
1757
1757
|
]),
|
|
1758
|
-
l(
|
|
1758
|
+
l(p, { style: { margin: 0 } }),
|
|
1759
1759
|
t("div", da, [
|
|
1760
1760
|
t("div", ma, [
|
|
1761
|
-
t("div",
|
|
1762
|
-
t("div",
|
|
1763
|
-
t("div", ca, S(
|
|
1761
|
+
t("div", ua, S(u(x)("report.integration.bukku.authentication")), 1),
|
|
1762
|
+
t("div", pa, [
|
|
1763
|
+
t("div", ca, S(u(x)("report.integration.subdomain")), 1),
|
|
1764
1764
|
t("div", fa, [
|
|
1765
1765
|
l(U, {
|
|
1766
1766
|
modelValue: a.value.platform.subdomain,
|
|
1767
1767
|
"onUpdate:modelValue": o[0] || (o[0] = (A) => a.value.platform.subdomain = A),
|
|
1768
|
-
placeholder:
|
|
1768
|
+
placeholder: u(x)("report.integration.subdomain")
|
|
1769
1769
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1770
1770
|
])
|
|
1771
1771
|
]),
|
|
1772
1772
|
t("div", ga, [
|
|
1773
|
-
t("div", va, S(
|
|
1773
|
+
t("div", va, S(u(x)("report.integration.token")), 1),
|
|
1774
1774
|
t("div", ya, [
|
|
1775
1775
|
l(U, {
|
|
1776
1776
|
modelValue: a.value.platform.token,
|
|
1777
1777
|
"onUpdate:modelValue": o[1] || (o[1] = (A) => a.value.platform.token = A),
|
|
1778
|
-
placeholder:
|
|
1778
|
+
placeholder: u(x)("report.integration.token")
|
|
1779
1779
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1780
1780
|
])
|
|
1781
1781
|
]),
|
|
1782
|
-
l(
|
|
1782
|
+
l(p, { style: { margin: 0 } }),
|
|
1783
1783
|
t("div", xa, [
|
|
1784
|
-
t("div", ba, S(
|
|
1784
|
+
t("div", ba, S(u(x)("report.integration.general")), 1),
|
|
1785
1785
|
t("div", wa, [
|
|
1786
|
-
t("div", ha, S(
|
|
1786
|
+
t("div", ha, S(u(x)("report.common.name")), 1),
|
|
1787
1787
|
t("div", _a, [
|
|
1788
1788
|
l(U, {
|
|
1789
1789
|
modelValue: a.value.name,
|
|
@@ -1792,7 +1792,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1792
1792
|
])
|
|
1793
1793
|
]),
|
|
1794
1794
|
t("div", Ca, [
|
|
1795
|
-
t("div", ka, S(
|
|
1795
|
+
t("div", ka, S(u(x)("report.common.location")), 1),
|
|
1796
1796
|
l(T, {
|
|
1797
1797
|
modelValue: a.value.platform.locationIds,
|
|
1798
1798
|
"onUpdate:modelValue": o[3] || (o[3] = (A) => a.value.platform.locationIds = A),
|
|
@@ -1803,7 +1803,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1803
1803
|
}, null, 8, ["modelValue", "items"])
|
|
1804
1804
|
]),
|
|
1805
1805
|
t("div", $a, [
|
|
1806
|
-
t("div", Sa, S(
|
|
1806
|
+
t("div", Sa, S(u(x)("report.integration.grouping.title")), 1),
|
|
1807
1807
|
l(T, {
|
|
1808
1808
|
modelValue: a.value.platform.grouping,
|
|
1809
1809
|
"onUpdate:modelValue": o[4] || (o[4] = (A) => a.value.platform.grouping = A),
|
|
@@ -1875,10 +1875,10 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1875
1875
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
1876
1876
|
])
|
|
1877
1877
|
]),
|
|
1878
|
-
l(
|
|
1878
|
+
l(p, { style: { margin: 0 } }),
|
|
1879
1879
|
t("div", Ka, [
|
|
1880
1880
|
t("div", Fa, [
|
|
1881
|
-
t("div", Ia, S(
|
|
1881
|
+
t("div", Ia, S(u(x)("report.integration.refNumFormat")), 1),
|
|
1882
1882
|
l(lt)
|
|
1883
1883
|
]),
|
|
1884
1884
|
t("div", Ta, [
|
|
@@ -1916,7 +1916,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1916
1916
|
}, null, 8, ["model-value", "options"])
|
|
1917
1917
|
])
|
|
1918
1918
|
]),
|
|
1919
|
-
l(
|
|
1919
|
+
l(p, { style: { margin: 0 } }),
|
|
1920
1920
|
l(Ee, {
|
|
1921
1921
|
modelValue: a.value.platform,
|
|
1922
1922
|
"onUpdate:modelValue": o[12] || (o[12] = (A) => a.value.platform = A),
|
|
@@ -1925,9 +1925,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1925
1925
|
"error-logs": n.errorLogs,
|
|
1926
1926
|
"integration-id": a.value._id
|
|
1927
1927
|
}, null, 8, ["modelValue", "last-upload-date", "error-logs", "integration-id"]),
|
|
1928
|
-
l(
|
|
1928
|
+
l(p, { style: { margin: 0 } }),
|
|
1929
1929
|
t("div", Ra, [
|
|
1930
|
-
t("div", Ua, S(
|
|
1930
|
+
t("div", Ua, S(u(x)("report.integration.items")), 1),
|
|
1931
1931
|
l(r, {
|
|
1932
1932
|
variant: "secondary",
|
|
1933
1933
|
"prepend-icon": "add",
|
|
@@ -1937,7 +1937,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1937
1937
|
]),
|
|
1938
1938
|
l(ee, {
|
|
1939
1939
|
"header-items": ["Key", "Account Code"],
|
|
1940
|
-
rows: ((
|
|
1940
|
+
rows: ((pe = (ue = (me = a.value) == null ? void 0 : me.platform) == null ? void 0 : ue.mappings) == null ? void 0 : pe.items) || [],
|
|
1941
1941
|
"columns-per-row": 2,
|
|
1942
1942
|
removable: !0,
|
|
1943
1943
|
"mapping-type": "items",
|
|
@@ -1951,9 +1951,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1951
1951
|
(H = (j = a.value) == null ? void 0 : j.platform) != null && H.mappings && (a.value.platform.mappings.items = A);
|
|
1952
1952
|
})
|
|
1953
1953
|
}, null, 8, ["rows"]),
|
|
1954
|
-
l(
|
|
1954
|
+
l(p, { style: { margin: 0 } }),
|
|
1955
1955
|
t("div", Na, [
|
|
1956
|
-
t("div", Ma, S(
|
|
1956
|
+
t("div", Ma, S(u(x)("report.integration.taxes")), 1),
|
|
1957
1957
|
l(r, {
|
|
1958
1958
|
variant: "secondary",
|
|
1959
1959
|
"prepend-icon": "add",
|
|
@@ -1977,9 +1977,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1977
1977
|
(H = (j = a.value) == null ? void 0 : j.platform) != null && H.mappings && (a.value.platform.mappings.taxes = A);
|
|
1978
1978
|
})
|
|
1979
1979
|
}, null, 8, ["rows"]),
|
|
1980
|
-
l(
|
|
1980
|
+
l(p, { style: { margin: 0 } }),
|
|
1981
1981
|
t("div", Pa, [
|
|
1982
|
-
t("div", ja, S(
|
|
1982
|
+
t("div", ja, S(u(x)("report.integration.taxRoundingAdjustments")), 1),
|
|
1983
1983
|
l(r, {
|
|
1984
1984
|
variant: "secondary",
|
|
1985
1985
|
"prepend-icon": "add",
|
|
@@ -2003,9 +2003,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2003
2003
|
(H = (j = a.value) == null ? void 0 : j.platform) != null && H.mappings && (a.value.platform.mappings.taxRoundingAdjustments = A);
|
|
2004
2004
|
})
|
|
2005
2005
|
}, null, 8, ["rows"]),
|
|
2006
|
-
l(
|
|
2006
|
+
l(p, { style: { margin: 0 } }),
|
|
2007
2007
|
t("div", La, [
|
|
2008
|
-
t("div", Ea, S(
|
|
2008
|
+
t("div", Ea, S(u(x)("report.integration.payments")), 1),
|
|
2009
2009
|
l(r, {
|
|
2010
2010
|
variant: "secondary",
|
|
2011
2011
|
"prepend-icon": "add",
|
|
@@ -2047,12 +2047,12 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2047
2047
|
emits: ["update:modelValue"],
|
|
2048
2048
|
setup(g) {
|
|
2049
2049
|
const a = W([]);
|
|
2050
|
-
function e(
|
|
2051
|
-
const R =
|
|
2050
|
+
function e(k) {
|
|
2051
|
+
const R = k.number || "";
|
|
2052
2052
|
if (!R) return R;
|
|
2053
|
-
const
|
|
2054
|
-
if (isNaN(
|
|
2055
|
-
const f = String(
|
|
2053
|
+
const C = new Date(k.date);
|
|
2054
|
+
if (isNaN(C.getTime())) return R;
|
|
2055
|
+
const f = String(C.getFullYear()), i = String(C.getMonth() + 1).padStart(2, "0"), _ = String(C.getDate()).padStart(2, "0");
|
|
2056
2056
|
return R.replace(/\[(YYYY|MM|DD)\]/g, ($, d) => {
|
|
2057
2057
|
switch (d) {
|
|
2058
2058
|
case "YYYY":
|
|
@@ -2066,10 +2066,10 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2066
2066
|
}
|
|
2067
2067
|
});
|
|
2068
2068
|
}
|
|
2069
|
-
const
|
|
2070
|
-
() => a.value.reduce((
|
|
2071
|
-
const
|
|
2072
|
-
C
|
|
2069
|
+
const m = Y(
|
|
2070
|
+
() => a.value.reduce((k, R) => {
|
|
2071
|
+
const C = k.length, { invoice: f, payments: i } = R;
|
|
2072
|
+
k[C] = {
|
|
2073
2073
|
no: e(f),
|
|
2074
2074
|
date: f.date,
|
|
2075
2075
|
contact: f._contact_name,
|
|
@@ -2077,11 +2077,11 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2077
2077
|
title: f.title
|
|
2078
2078
|
};
|
|
2079
2079
|
for (let _ = 0; _ < Math.max(f.form_items.length, i.length); _++) {
|
|
2080
|
-
const $ =
|
|
2081
|
-
|
|
2080
|
+
const $ = C + _;
|
|
2081
|
+
k[$] || (k[$] = {});
|
|
2082
2082
|
const d = f.form_items[_];
|
|
2083
|
-
d && (
|
|
2084
|
-
...
|
|
2083
|
+
d && (k[$] = {
|
|
2084
|
+
...k[$],
|
|
2085
2085
|
itemDescription: d.description,
|
|
2086
2086
|
itemQuantity: d.quantity,
|
|
2087
2087
|
itemUnitPrice: d.unit_price,
|
|
@@ -2090,8 +2090,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2090
2090
|
itemDiscount: d.discount
|
|
2091
2091
|
});
|
|
2092
2092
|
const s = i[_];
|
|
2093
|
-
s && (
|
|
2094
|
-
...
|
|
2093
|
+
s && (k[$] = {
|
|
2094
|
+
...k[$],
|
|
2095
2095
|
paymentNo: s.number,
|
|
2096
2096
|
paymentMethod: s.deposit_items[0]._payment_method_name,
|
|
2097
2097
|
paymentAccount: s.deposit_items[0]._account_name,
|
|
@@ -2099,9 +2099,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2099
2099
|
paymentAmount: s.amount
|
|
2100
2100
|
});
|
|
2101
2101
|
}
|
|
2102
|
-
return
|
|
2102
|
+
return k;
|
|
2103
2103
|
}, [])
|
|
2104
|
-
), { t: y } = se(),
|
|
2104
|
+
), { t: y } = se(), F = [
|
|
2105
2105
|
{
|
|
2106
2106
|
accessorKey: "date",
|
|
2107
2107
|
header: () => V(
|
|
@@ -2186,17 +2186,17 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2186
2186
|
header: "Payment Amount",
|
|
2187
2187
|
enableSorting: !1
|
|
2188
2188
|
}
|
|
2189
|
-
], D = ne(g, "modelValue"),
|
|
2189
|
+
], D = ne(g, "modelValue"), I = W(!1), w = Se(), { dateRange: x } = Ge($e());
|
|
2190
2190
|
Ke(
|
|
2191
2191
|
() => x.value,
|
|
2192
2192
|
async () => {
|
|
2193
2193
|
if (D.value._id)
|
|
2194
2194
|
try {
|
|
2195
|
-
|
|
2196
|
-
} catch (
|
|
2197
|
-
w.open({ message:
|
|
2195
|
+
I.value = !0, a.value = await qe(D.value._id);
|
|
2196
|
+
} catch (k) {
|
|
2197
|
+
w.open({ message: k.message, type: "error" });
|
|
2198
2198
|
} finally {
|
|
2199
|
-
|
|
2199
|
+
I.value = !1;
|
|
2200
2200
|
}
|
|
2201
2201
|
},
|
|
2202
2202
|
{
|
|
@@ -2205,37 +2205,37 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2205
2205
|
);
|
|
2206
2206
|
async function c() {
|
|
2207
2207
|
try {
|
|
2208
|
-
D.value._id ? (
|
|
2209
|
-
} catch (
|
|
2210
|
-
|
|
2208
|
+
D.value._id ? (I.value = !0, await ot(D.value._id), w.open({ message: y("report.integration.uploadSuccess"), type: "success" })) : w.open({ message: y("report.integration.error.invalid"), type: "error" });
|
|
2209
|
+
} catch (k) {
|
|
2210
|
+
k.message && w.open({ message: k.message, type: "error" }), Array.isArray(k.errors) ? k.errors.forEach((R) => w.open({ message: String(R), type: "error" })) : typeof k.errors == "string" && w.open({ message: k.errors, type: "error" });
|
|
2211
2211
|
} finally {
|
|
2212
|
-
|
|
2212
|
+
I.value = !1;
|
|
2213
2213
|
}
|
|
2214
2214
|
}
|
|
2215
|
-
return (
|
|
2216
|
-
const
|
|
2215
|
+
return (k, R) => {
|
|
2216
|
+
const C = K("FmButton"), f = K("FmCircularProgress"), i = K("FmTable");
|
|
2217
2217
|
return b(), N("div", Ba, [
|
|
2218
2218
|
t("div", Ya, [
|
|
2219
2219
|
l(Qe, {
|
|
2220
|
-
"date-range":
|
|
2220
|
+
"date-range": u(x),
|
|
2221
2221
|
"onUpdate:dateRange": R[0] || (R[0] = (_) => Me(x) ? x.value = _ : null),
|
|
2222
2222
|
compare: !1
|
|
2223
2223
|
}, null, 8, ["date-range"]),
|
|
2224
|
-
l(
|
|
2225
|
-
loading:
|
|
2224
|
+
l(C, {
|
|
2225
|
+
loading: I.value,
|
|
2226
2226
|
variant: "primary",
|
|
2227
|
-
label:
|
|
2227
|
+
label: u(y)("report.common.upload"),
|
|
2228
2228
|
onClick: c
|
|
2229
2229
|
}, null, 8, ["loading", "label"])
|
|
2230
2230
|
]),
|
|
2231
|
-
|
|
2231
|
+
I.value ? (b(), N("div", qa, [
|
|
2232
2232
|
l(f, { size: "xl" }),
|
|
2233
|
-
t("span", za, S(
|
|
2234
|
-
])) :
|
|
2233
|
+
t("span", za, S(u(y)("report.integration.table.loading")), 1)
|
|
2234
|
+
])) : m.value.length > 0 ? (b(), O(i, {
|
|
2235
2235
|
key: 1,
|
|
2236
2236
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
2237
|
-
"row-data":
|
|
2238
|
-
"column-defs":
|
|
2237
|
+
"row-data": m.value,
|
|
2238
|
+
"column-defs": F
|
|
2239
2239
|
}, null, 8, ["row-data"])) : B("", !0)
|
|
2240
2240
|
]);
|
|
2241
2241
|
};
|
|
@@ -2250,12 +2250,12 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2250
2250
|
}),
|
|
2251
2251
|
emits: ["update:modelValue"],
|
|
2252
2252
|
setup(g) {
|
|
2253
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
2253
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = g, y = Y({
|
|
2254
2254
|
get: () => e.value,
|
|
2255
2255
|
set: (x) => {
|
|
2256
2256
|
e.value = x;
|
|
2257
2257
|
}
|
|
2258
|
-
}),
|
|
2258
|
+
}), F = W("setting"), D = [
|
|
2259
2259
|
{
|
|
2260
2260
|
label: a("report.integration.setting"),
|
|
2261
2261
|
value: "setting",
|
|
@@ -2266,8 +2266,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2266
2266
|
value: "preview",
|
|
2267
2267
|
icon: "table"
|
|
2268
2268
|
}
|
|
2269
|
-
],
|
|
2270
|
-
switch (
|
|
2269
|
+
], I = Ce(), w = Y(() => {
|
|
2270
|
+
switch (F.value) {
|
|
2271
2271
|
case "preview":
|
|
2272
2272
|
return {
|
|
2273
2273
|
component: Ha
|
|
@@ -2276,7 +2276,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2276
2276
|
return {
|
|
2277
2277
|
component: Oa,
|
|
2278
2278
|
props: {
|
|
2279
|
-
errorLogs:
|
|
2279
|
+
errorLogs: m.errorLogs
|
|
2280
2280
|
}
|
|
2281
2281
|
};
|
|
2282
2282
|
default:
|
|
@@ -2284,14 +2284,14 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2284
2284
|
}
|
|
2285
2285
|
});
|
|
2286
2286
|
return (x, c) => {
|
|
2287
|
-
var
|
|
2288
|
-
const
|
|
2287
|
+
var C, f;
|
|
2288
|
+
const k = K("FmPageHead"), R = K("FmTabs");
|
|
2289
2289
|
return b(), N("div", Ga, [
|
|
2290
|
-
l(
|
|
2290
|
+
l(k, {
|
|
2291
2291
|
title: y.value.name || "Bukku",
|
|
2292
2292
|
"back-button": !0,
|
|
2293
2293
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2294
|
-
"onClick:back": c[0] || (c[0] = (i) =>
|
|
2294
|
+
"onClick:back": c[0] || (c[0] = (i) => u(I).push({ name: "integrations" }))
|
|
2295
2295
|
}, {
|
|
2296
2296
|
description: ke(() => c[3] || (c[3] = [
|
|
2297
2297
|
t("div", null, null, -1)
|
|
@@ -2299,12 +2299,12 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2299
2299
|
_: 1
|
|
2300
2300
|
}, 8, ["title"]),
|
|
2301
2301
|
l(R, {
|
|
2302
|
-
"model-value":
|
|
2303
|
-
"onUpdate:modelValue": c[1] || (c[1] = (i) =>
|
|
2302
|
+
"model-value": F.value,
|
|
2303
|
+
"onUpdate:modelValue": c[1] || (c[1] = (i) => F.value = i),
|
|
2304
2304
|
items: D
|
|
2305
2305
|
}, null, 8, ["model-value"]),
|
|
2306
2306
|
t("div", Qa, [
|
|
2307
|
-
(b(), O(Pe((
|
|
2307
|
+
(b(), O(Pe((C = w.value) == null ? void 0 : C.component), tt({
|
|
2308
2308
|
modelValue: y.value,
|
|
2309
2309
|
"onUpdate:modelValue": c[2] || (c[2] = (i) => y.value = i)
|
|
2310
2310
|
}, (f = w.value) == null ? void 0 : f.props), null, 16, ["modelValue"]))
|
|
@@ -2315,7 +2315,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2315
2315
|
}), Wa = {
|
|
2316
2316
|
key: 0,
|
|
2317
2317
|
class: "flex flex-col h-full"
|
|
2318
|
-
}, Ja = { class: "flex flex-col gap-16 pb-[24px]" }, Za = { class: "flex flex-row justify-between items-center gap-2" }, el = { class: "flex flex-row gap-2 items-center" }, tl = { class: "relative group cursor-pointer" }, ol = { 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" }, al = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ll = { class: "w-[90%] flex flex-col gap-24" }, nl = { class: "flex flex-col gap-16" }, sl = { class: "fm-typo-en-title-sm-800" }, rl = { class: "flex flex-col max-w-[100%]" }, il = { class: "w-[25%] font-semibold" }, dl = { class: "flex-grow" }, ml = { class: "flex flex-col max-w-[100%]" },
|
|
2318
|
+
}, Ja = { class: "flex flex-col gap-16 pb-[24px]" }, Za = { class: "flex flex-row justify-between items-center gap-2" }, el = { class: "flex flex-row gap-2 items-center" }, tl = { class: "relative group cursor-pointer" }, ol = { 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" }, al = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ll = { class: "w-[90%] flex flex-col gap-24" }, nl = { class: "flex flex-col gap-16" }, sl = { class: "fm-typo-en-title-sm-800" }, rl = { class: "flex flex-col max-w-[100%]" }, il = { class: "w-[25%] font-semibold" }, dl = { class: "flex-grow" }, ml = { class: "flex flex-col max-w-[100%]" }, ul = { class: "w-[25%] font-semibold" }, pl = { class: "flex flex-col max-w-[100%]" }, cl = { class: "w-[25%] font-semibold" }, fl = { class: "flex flex-col gap-16" }, gl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, vl = { class: "flex flex-col gap-16 pt-3 pb-3" }, yl = { class: "flex flex-row items-center gap-5" }, xl = { class: "fm-typo-en-title-sm-800" }, bl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, wl = { class: "flex flex-row items-center justify-between gap-x-16" }, hl = { class: "fm-typo-en-title-sm-800" }, _l = { class: "flex flex-row items-center justify-between gap-x-16" }, Cl = { class: "fm-typo-en-title-sm-800" }, kl = { class: "flex flex-row items-center justify-between gap-x-16" }, $l = { class: "fm-typo-en-title-sm-800" }, Sl = { class: "flex flex-row items-center justify-between gap-x-16" }, Al = { class: "fm-typo-en-title-sm-800" }, Vl = /* @__PURE__ */ te({
|
|
2319
2319
|
__name: "Setting",
|
|
2320
2320
|
props: /* @__PURE__ */ Ve({
|
|
2321
2321
|
errorLogs: {}
|
|
@@ -2325,7 +2325,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2325
2325
|
}),
|
|
2326
2326
|
emits: ["update:modelValue"],
|
|
2327
2327
|
setup(g) {
|
|
2328
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
2328
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = Se(), y = Re(), F = Ce(), { promptLoader: D } = ze(), { promptMessage: I } = He(), { restaurants: w } = $e(), { rules: x, notifyUnauthorized: c } = je(), k = Y(
|
|
2329
2329
|
() => w.map((v) => ({ label: v.name, value: v.id }))
|
|
2330
2330
|
);
|
|
2331
2331
|
async function R() {
|
|
@@ -2339,18 +2339,18 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2339
2339
|
c(Z.delete);
|
|
2340
2340
|
return;
|
|
2341
2341
|
}
|
|
2342
|
-
await
|
|
2342
|
+
await I({
|
|
2343
2343
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
2344
2344
|
title: a("report.common.delete")
|
|
2345
2345
|
}) && await D(async () => {
|
|
2346
2346
|
try {
|
|
2347
|
-
await Be(e.value._id), await y.getSettings(),
|
|
2347
|
+
await Be(e.value._id), await y.getSettings(), F.back();
|
|
2348
2348
|
} catch (r) {
|
|
2349
|
-
|
|
2349
|
+
m.open({ type: "error", message: r.message });
|
|
2350
2350
|
}
|
|
2351
2351
|
});
|
|
2352
2352
|
}
|
|
2353
|
-
async function
|
|
2353
|
+
async function C() {
|
|
2354
2354
|
var o;
|
|
2355
2355
|
const v = (o = e.value.platform) == null ? void 0 : o.locationIds;
|
|
2356
2356
|
if (_e({
|
|
@@ -2365,7 +2365,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2365
2365
|
try {
|
|
2366
2366
|
await Ye(e.value._id, e.value), await y.getSettings();
|
|
2367
2367
|
} catch (h) {
|
|
2368
|
-
|
|
2368
|
+
m.open({ type: "error", message: h.message });
|
|
2369
2369
|
}
|
|
2370
2370
|
});
|
|
2371
2371
|
}
|
|
@@ -2374,8 +2374,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2374
2374
|
const o = (r = e.value.platform) == null ? void 0 : r.mappings;
|
|
2375
2375
|
if (!o) return;
|
|
2376
2376
|
if (["items", "taxes", "payments", "taxRoundingAdjustments"].includes(v)) {
|
|
2377
|
-
const
|
|
2378
|
-
o[
|
|
2377
|
+
const p = v;
|
|
2378
|
+
o[p] && Array.isArray(o[p]) && (o[p] = o[p].filter(
|
|
2379
2379
|
(U, T) => T !== n
|
|
2380
2380
|
));
|
|
2381
2381
|
}
|
|
@@ -2426,15 +2426,15 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2426
2426
|
try {
|
|
2427
2427
|
await Ne(e.value._id), await y.getSettings();
|
|
2428
2428
|
} catch (v) {
|
|
2429
|
-
|
|
2429
|
+
m.open({ type: "error", message: v.message });
|
|
2430
2430
|
}
|
|
2431
2431
|
});
|
|
2432
2432
|
}
|
|
2433
2433
|
return Oe(async () => {
|
|
2434
2434
|
await y.getSettings();
|
|
2435
2435
|
}), (v, n) => {
|
|
2436
|
-
var T, P, z, oe, le, X, de, me,
|
|
2437
|
-
const o = K("FmIcon"), h = K("FmButton"), r = K("FmMenuDivider"),
|
|
2436
|
+
var T, P, z, oe, le, X, de, me, ue, pe, ce, fe, ge, ve, ye, xe, J;
|
|
2437
|
+
const o = K("FmIcon"), h = K("FmButton"), r = K("FmMenuDivider"), p = K("FmTextField"), U = K("FmSelect");
|
|
2438
2438
|
return (P = (T = e.value) == null ? void 0 : T.platform) != null && P.mappings ? (b(), N("div", Wa, [
|
|
2439
2439
|
t("div", Ja, [
|
|
2440
2440
|
t("div", Za, [
|
|
@@ -2446,18 +2446,18 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2446
2446
|
class: "p-2 bg-gray-100 rounded-full",
|
|
2447
2447
|
onClick: s
|
|
2448
2448
|
}),
|
|
2449
|
-
t("span", ol, S(
|
|
2449
|
+
t("span", ol, S(u(a)("report.integration.refreshSetting")), 1)
|
|
2450
2450
|
]),
|
|
2451
2451
|
l(h, {
|
|
2452
2452
|
variant: "tertiary",
|
|
2453
|
-
label:
|
|
2453
|
+
label: u(a)("report.common.remove"),
|
|
2454
2454
|
onClick: R
|
|
2455
2455
|
}, null, 8, ["label"]),
|
|
2456
2456
|
l(h, {
|
|
2457
2457
|
variant: "primary",
|
|
2458
|
-
label:
|
|
2458
|
+
label: u(a)("report.common.update"),
|
|
2459
2459
|
"prepend-icon": "update",
|
|
2460
|
-
onClick:
|
|
2460
|
+
onClick: C
|
|
2461
2461
|
}, null, 8, ["label"])
|
|
2462
2462
|
])
|
|
2463
2463
|
])
|
|
@@ -2466,30 +2466,30 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2466
2466
|
t("div", al, [
|
|
2467
2467
|
t("div", ll, [
|
|
2468
2468
|
t("div", nl, [
|
|
2469
|
-
t("div", sl, S(
|
|
2469
|
+
t("div", sl, S(u(a)("report.integration.general")), 1),
|
|
2470
2470
|
t("div", rl, [
|
|
2471
|
-
t("div", il, S(
|
|
2471
|
+
t("div", il, S(u(a)("report.common.name")), 1),
|
|
2472
2472
|
t("div", dl, [
|
|
2473
|
-
l(
|
|
2473
|
+
l(p, {
|
|
2474
2474
|
modelValue: e.value.name,
|
|
2475
2475
|
"onUpdate:modelValue": n[0] || (n[0] = (M) => e.value.name = M)
|
|
2476
2476
|
}, null, 8, ["modelValue"])
|
|
2477
2477
|
])
|
|
2478
2478
|
]),
|
|
2479
2479
|
t("div", ml, [
|
|
2480
|
-
t("div",
|
|
2480
|
+
t("div", ul, S(u(a)("report.integration.location")), 1),
|
|
2481
2481
|
l(U, {
|
|
2482
2482
|
modelValue: e.value.platform.locationIds,
|
|
2483
2483
|
"onUpdate:modelValue": n[1] || (n[1] = (M) => e.value.platform.locationIds = M),
|
|
2484
2484
|
multiselect: !0,
|
|
2485
|
-
items:
|
|
2485
|
+
items: k.value,
|
|
2486
2486
|
placeholder: "Select location",
|
|
2487
2487
|
class: "flex-grow",
|
|
2488
2488
|
rules: [(M) => M.length !== 0 || "Please select at least 1 location"]
|
|
2489
2489
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
2490
2490
|
]),
|
|
2491
|
-
t("div",
|
|
2492
|
-
t("div", cl, S(
|
|
2491
|
+
t("div", pl, [
|
|
2492
|
+
t("div", cl, S(u(a)("report.integration.grouping.title")), 1),
|
|
2493
2493
|
l(U, {
|
|
2494
2494
|
modelValue: e.value.platform.grouping,
|
|
2495
2495
|
"onUpdate:modelValue": n[2] || (n[2] = (M) => e.value.platform.grouping = M),
|
|
@@ -2537,7 +2537,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2537
2537
|
l(r, { style: { margin: 0 } }),
|
|
2538
2538
|
t("div", vl, [
|
|
2539
2539
|
t("div", yl, [
|
|
2540
|
-
t("div", xl, S(
|
|
2540
|
+
t("div", xl, S(u(a)("report.integration.refNumFormat")), 1),
|
|
2541
2541
|
l(lt)
|
|
2542
2542
|
]),
|
|
2543
2543
|
t("div", bl, [
|
|
@@ -2579,14 +2579,14 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2579
2579
|
l(Ee, {
|
|
2580
2580
|
modelValue: e.value.platform,
|
|
2581
2581
|
"onUpdate:modelValue": n[10] || (n[10] = (M) => e.value.platform = M),
|
|
2582
|
-
label:
|
|
2582
|
+
label: u(a)("report.input.email"),
|
|
2583
2583
|
"error-logs": v.errorLogs,
|
|
2584
2584
|
"integration-id": e.value._id,
|
|
2585
2585
|
"is-auto-email-mode": !0
|
|
2586
2586
|
}, null, 8, ["modelValue", "label", "error-logs", "integration-id"]),
|
|
2587
2587
|
l(r, { style: { margin: 0 } }),
|
|
2588
2588
|
t("div", wl, [
|
|
2589
|
-
t("div", hl, S(
|
|
2589
|
+
t("div", hl, S(u(a)("report.integration.items")), 1),
|
|
2590
2590
|
l(h, {
|
|
2591
2591
|
variant: "secondary",
|
|
2592
2592
|
"prepend-icon": "add",
|
|
@@ -2612,7 +2612,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2612
2612
|
}, null, 8, ["rows"]),
|
|
2613
2613
|
l(r, { style: { margin: 0 } }),
|
|
2614
2614
|
t("div", _l, [
|
|
2615
|
-
t("div", Cl, S(
|
|
2615
|
+
t("div", Cl, S(u(a)("report.integration.taxes")), 1),
|
|
2616
2616
|
l(h, {
|
|
2617
2617
|
variant: "secondary",
|
|
2618
2618
|
"prepend-icon": "add",
|
|
@@ -2622,7 +2622,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2622
2622
|
]),
|
|
2623
2623
|
l(ee, {
|
|
2624
2624
|
"header-items": ["Key", "Account Code"],
|
|
2625
|
-
rows: ((ce = (
|
|
2625
|
+
rows: ((ce = (pe = (ue = e.value) == null ? void 0 : ue.platform) == null ? void 0 : pe.mappings) == null ? void 0 : ce.taxes) || [],
|
|
2626
2626
|
"columns-per-row": 2,
|
|
2627
2627
|
removable: !0,
|
|
2628
2628
|
"mapping-type": "taxes",
|
|
@@ -2638,7 +2638,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2638
2638
|
}, null, 8, ["rows"]),
|
|
2639
2639
|
l(r, { style: { margin: 0 } }),
|
|
2640
2640
|
t("div", kl, [
|
|
2641
|
-
t("div", $l, S(
|
|
2641
|
+
t("div", $l, S(u(a)("report.integration.taxRoundingAdjustments")), 1),
|
|
2642
2642
|
l(h, {
|
|
2643
2643
|
variant: "secondary",
|
|
2644
2644
|
"prepend-icon": "add",
|
|
@@ -2664,7 +2664,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2664
2664
|
}, null, 8, ["rows"]),
|
|
2665
2665
|
l(r, { style: { margin: 0 } }),
|
|
2666
2666
|
t("div", Sl, [
|
|
2667
|
-
t("div", Al, S(
|
|
2667
|
+
t("div", Al, S(u(a)("report.integration.payments")), 1),
|
|
2668
2668
|
l(h, {
|
|
2669
2669
|
variant: "secondary",
|
|
2670
2670
|
"prepend-icon": "add",
|
|
@@ -2704,25 +2704,25 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2704
2704
|
},
|
|
2705
2705
|
emits: ["update:modelValue"],
|
|
2706
2706
|
setup(g) {
|
|
2707
|
-
const { t: a } = se(), e = W([]),
|
|
2708
|
-
() => e.value.reduce((c,
|
|
2709
|
-
const R = c.length, { invoice:
|
|
2707
|
+
const { t: a } = se(), e = W([]), m = Y(
|
|
2708
|
+
() => e.value.reduce((c, k) => {
|
|
2709
|
+
const R = c.length, { invoice: C, payments: f } = k;
|
|
2710
2710
|
c[R] = {
|
|
2711
|
-
date:
|
|
2712
|
-
docNo:
|
|
2713
|
-
projNo:
|
|
2714
|
-
debtor:
|
|
2715
|
-
description:
|
|
2711
|
+
date: C.DocDate,
|
|
2712
|
+
docNo: C.DocNo,
|
|
2713
|
+
projNo: C.ProjNo,
|
|
2714
|
+
debtor: C.DebtorCode,
|
|
2715
|
+
description: C.Description
|
|
2716
2716
|
};
|
|
2717
|
-
for (let i = 0; i < Math.max(
|
|
2717
|
+
for (let i = 0; i < Math.max(C._items.length, f.length); i++) {
|
|
2718
2718
|
const _ = R + i;
|
|
2719
|
-
c[_] || (c[_] = {}),
|
|
2719
|
+
c[_] || (c[_] = {}), C._items[i] && (c[_] = {
|
|
2720
2720
|
...c[_],
|
|
2721
|
-
itemDescription:
|
|
2722
|
-
itemUnitPrice:
|
|
2723
|
-
itemAccount:
|
|
2724
|
-
itemTaxCode:
|
|
2725
|
-
itemTax:
|
|
2721
|
+
itemDescription: C._items[i].DetailDescription,
|
|
2722
|
+
itemUnitPrice: C._items[i].Amount,
|
|
2723
|
+
itemAccount: C._items[i].AccNo,
|
|
2724
|
+
itemTaxCode: C._items[i].TaxType,
|
|
2725
|
+
itemTax: C._items[i].Tax
|
|
2726
2726
|
}), f[i] && (c[_] = {
|
|
2727
2727
|
...c[_],
|
|
2728
2728
|
paymentDocNo: f[i].DocNo,
|
|
@@ -2804,15 +2804,15 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2804
2804
|
header: "Payment Amount",
|
|
2805
2805
|
enableSorting: !1
|
|
2806
2806
|
}
|
|
2807
|
-
],
|
|
2807
|
+
], F = ne(g, "modelValue"), D = W(!1), I = Se(), { dateRange: w } = Ge($e());
|
|
2808
2808
|
Ke(
|
|
2809
2809
|
() => w.value,
|
|
2810
2810
|
async () => {
|
|
2811
|
-
if (
|
|
2811
|
+
if (F.value._id)
|
|
2812
2812
|
try {
|
|
2813
|
-
D.value = !0, e.value = await qe(
|
|
2813
|
+
D.value = !0, e.value = await qe(F.value._id);
|
|
2814
2814
|
} catch (c) {
|
|
2815
|
-
|
|
2815
|
+
I.open({ message: c.message, type: "error" });
|
|
2816
2816
|
} finally {
|
|
2817
2817
|
D.value = !1;
|
|
2818
2818
|
}
|
|
@@ -2823,36 +2823,36 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2823
2823
|
);
|
|
2824
2824
|
async function x() {
|
|
2825
2825
|
try {
|
|
2826
|
-
|
|
2826
|
+
F.value._id ? (D.value = !0, await at(F.value._id)) : I.open({ message: "Invalid accounting setting", type: "error" });
|
|
2827
2827
|
} catch (c) {
|
|
2828
|
-
c.message &&
|
|
2828
|
+
c.message && I.open({ message: c.message, type: "error" }), Array.isArray(c.errors) ? c.errors.forEach((k) => I.open({ message: String(k), type: "error" })) : typeof c.errors == "string" && I.open({ message: c.errors, type: "error" });
|
|
2829
2829
|
} finally {
|
|
2830
2830
|
D.value = !1;
|
|
2831
2831
|
}
|
|
2832
2832
|
}
|
|
2833
|
-
return (c,
|
|
2834
|
-
const R = K("FmButton"),
|
|
2833
|
+
return (c, k) => {
|
|
2834
|
+
const R = K("FmButton"), C = K("FmCircularProgress"), f = K("FmTable");
|
|
2835
2835
|
return b(), N("div", Dl, [
|
|
2836
2836
|
t("div", Kl, [
|
|
2837
2837
|
l(Qe, {
|
|
2838
|
-
"date-range":
|
|
2839
|
-
"onUpdate:dateRange":
|
|
2838
|
+
"date-range": u(w),
|
|
2839
|
+
"onUpdate:dateRange": k[0] || (k[0] = (i) => Me(w) ? w.value = i : null),
|
|
2840
2840
|
compare: !1
|
|
2841
2841
|
}, null, 8, ["date-range"]),
|
|
2842
2842
|
l(R, {
|
|
2843
2843
|
loading: D.value,
|
|
2844
2844
|
variant: "primary",
|
|
2845
|
-
label:
|
|
2845
|
+
label: u(a)("report.common.download"),
|
|
2846
2846
|
onClick: x
|
|
2847
2847
|
}, null, 8, ["loading", "label"])
|
|
2848
2848
|
]),
|
|
2849
2849
|
D.value ? (b(), N("div", Fl, [
|
|
2850
|
-
l(
|
|
2851
|
-
t("span", Il, S(
|
|
2852
|
-
])) :
|
|
2850
|
+
l(C, { size: "xl" }),
|
|
2851
|
+
t("span", Il, S(u(a)("report.common.isLoading")), 1)
|
|
2852
|
+
])) : m.value.length > 0 ? (b(), O(f, {
|
|
2853
2853
|
key: 1,
|
|
2854
2854
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
2855
|
-
"row-data":
|
|
2855
|
+
"row-data": m.value,
|
|
2856
2856
|
"column-defs": y
|
|
2857
2857
|
}, null, 8, ["row-data"])) : B("", !0)
|
|
2858
2858
|
]);
|
|
@@ -2866,7 +2866,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2866
2866
|
},
|
|
2867
2867
|
emits: ["update:modelValue"],
|
|
2868
2868
|
setup(g) {
|
|
2869
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
2869
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = W("setting"), y = [
|
|
2870
2870
|
{
|
|
2871
2871
|
label: a("report.integration.setting"),
|
|
2872
2872
|
value: "setting",
|
|
@@ -2877,8 +2877,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2877
2877
|
value: "preview",
|
|
2878
2878
|
icon: "table"
|
|
2879
2879
|
}
|
|
2880
|
-
],
|
|
2881
|
-
switch (
|
|
2880
|
+
], F = Ce(), D = Y(() => {
|
|
2881
|
+
switch (m.value) {
|
|
2882
2882
|
case "preview":
|
|
2883
2883
|
return Tl;
|
|
2884
2884
|
case "setting":
|
|
@@ -2887,15 +2887,15 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2887
2887
|
return null;
|
|
2888
2888
|
}
|
|
2889
2889
|
});
|
|
2890
|
-
return (
|
|
2891
|
-
var
|
|
2890
|
+
return (I, w) => {
|
|
2891
|
+
var k;
|
|
2892
2892
|
const x = K("FmPageHead"), c = K("FmTabs");
|
|
2893
2893
|
return b(), N("div", Rl, [
|
|
2894
2894
|
l(x, {
|
|
2895
|
-
title: ((
|
|
2895
|
+
title: ((k = e.value) == null ? void 0 : k.name) || "AutoCount",
|
|
2896
2896
|
"back-button": !0,
|
|
2897
2897
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2898
|
-
"onClick:back": w[0] || (w[0] = (R) =>
|
|
2898
|
+
"onClick:back": w[0] || (w[0] = (R) => u(F).push({ name: "integrations" }))
|
|
2899
2899
|
}, {
|
|
2900
2900
|
description: ke(() => w[3] || (w[3] = [
|
|
2901
2901
|
t("div", null, null, -1)
|
|
@@ -2903,8 +2903,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2903
2903
|
_: 1
|
|
2904
2904
|
}, 8, ["title"]),
|
|
2905
2905
|
l(c, {
|
|
2906
|
-
"model-value":
|
|
2907
|
-
"onUpdate:modelValue": w[1] || (w[1] = (R) =>
|
|
2906
|
+
"model-value": m.value,
|
|
2907
|
+
"onUpdate:modelValue": w[1] || (w[1] = (R) => m.value = R),
|
|
2908
2908
|
items: y
|
|
2909
2909
|
}, null, 8, ["model-value"]),
|
|
2910
2910
|
t("div", Ul, [
|
|
@@ -2919,7 +2919,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2919
2919
|
}), Ml = {
|
|
2920
2920
|
key: 0,
|
|
2921
2921
|
class: "flex flex-col h-full"
|
|
2922
|
-
}, Pl = { class: "flex flex-col gap-16 pb-[24px]" }, jl = { class: "flex flex-row justify-between items-center gap-2" }, Ll = { class: "flex flex-row gap-2 items-center" }, El = { class: "relative group cursor-pointer" }, Ol = { 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" }, Bl = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Yl = { class: "w-[90%] flex flex-col gap-24" }, ql = { class: "flex flex-col gap-16" }, zl = { class: "fm-typo-en-title-sm-800" }, Hl = { class: "flex flex-col max-w-[100%]" }, Gl = { class: "w-[25%] font-semibold" }, Ql = { class: "flex-grow" }, Xl = { class: "flex flex-col max-w-[100%]" }, Wl = { class: "w-[25%] font-semibold" }, Jl = { class: "flex flex-col max-w-[100%]" }, Zl = { class: "w-[25%] font-semibold" }, en = { class: "flex flex-col gap-16" }, tn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, on = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, an = { class: "flex flex-col gap-16 pt-3 pb-3" }, ln = { class: "flex flex-row items-center gap-5" }, nn = { class: "fm-typo-en-title-sm-800" }, sn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, rn = { class: "flex flex-row items-center justify-between gap-x-16" }, dn = { class: "fm-typo-en-title-sm-800" }, mn = { class: "flex flex-row items-center justify-between gap-x-16" },
|
|
2922
|
+
}, Pl = { class: "flex flex-col gap-16 pb-[24px]" }, jl = { class: "flex flex-row justify-between items-center gap-2" }, Ll = { class: "flex flex-row gap-2 items-center" }, El = { class: "relative group cursor-pointer" }, Ol = { 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" }, Bl = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Yl = { class: "w-[90%] flex flex-col gap-24" }, ql = { class: "flex flex-col gap-16" }, zl = { class: "fm-typo-en-title-sm-800" }, Hl = { class: "flex flex-col max-w-[100%]" }, Gl = { class: "w-[25%] font-semibold" }, Ql = { class: "flex-grow" }, Xl = { class: "flex flex-col max-w-[100%]" }, Wl = { class: "w-[25%] font-semibold" }, Jl = { class: "flex flex-col max-w-[100%]" }, Zl = { class: "w-[25%] font-semibold" }, en = { class: "flex flex-col gap-16" }, tn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, on = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, an = { class: "flex flex-col gap-16 pt-3 pb-3" }, ln = { class: "flex flex-row items-center gap-5" }, nn = { class: "fm-typo-en-title-sm-800" }, sn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, rn = { class: "flex flex-row items-center justify-between gap-x-16" }, dn = { class: "fm-typo-en-title-sm-800" }, mn = { class: "flex flex-row items-center justify-between gap-x-16" }, un = { class: "fm-typo-en-title-sm-800" }, pn = { class: "flex flex-row items-center justify-between gap-x-16" }, cn = { class: "fm-typo-en-title-sm-800" }, fn = { class: "flex flex-row items-center justify-between gap-x-16" }, gn = { class: "fm-typo-en-title-sm-800" }, vn = { class: "flex flex-row items-center justify-between gap-x-16" }, yn = { class: "fm-typo-en-title-sm-800" }, xn = { class: "flex flex-row items-center justify-between gap-x-16" }, bn = { class: "flex flex-row items-center justify-between gap-x-16" }, wn = /* @__PURE__ */ te({
|
|
2923
2923
|
__name: "Setting",
|
|
2924
2924
|
props: {
|
|
2925
2925
|
modelValue: { required: !0 },
|
|
@@ -2927,7 +2927,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2927
2927
|
},
|
|
2928
2928
|
emits: ["update:modelValue"],
|
|
2929
2929
|
setup(g) {
|
|
2930
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
2930
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = Se(), y = Re(), F = Ce(), { promptLoader: D } = ze(), { promptMessage: I } = He(), { restaurants: w } = $e(), { rules: x, notifyUnauthorized: c } = je(), k = Y(
|
|
2931
2931
|
() => w.map((n) => ({ label: n.name, value: n.id }))
|
|
2932
2932
|
);
|
|
2933
2933
|
async function R() {
|
|
@@ -2941,18 +2941,18 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2941
2941
|
c(Z.delete);
|
|
2942
2942
|
return;
|
|
2943
2943
|
}
|
|
2944
|
-
await
|
|
2944
|
+
await I({
|
|
2945
2945
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
2946
2946
|
title: a("report.common.delete")
|
|
2947
2947
|
}) && await D(async () => {
|
|
2948
2948
|
try {
|
|
2949
|
-
await Be(e.value._id), await y.getSettings(),
|
|
2950
|
-
} catch (
|
|
2951
|
-
|
|
2949
|
+
await Be(e.value._id), await y.getSettings(), F.back();
|
|
2950
|
+
} catch (p) {
|
|
2951
|
+
m.open({ type: "error", message: p.message });
|
|
2952
2952
|
}
|
|
2953
2953
|
});
|
|
2954
2954
|
}
|
|
2955
|
-
async function
|
|
2955
|
+
async function C() {
|
|
2956
2956
|
var h;
|
|
2957
2957
|
const n = (h = e.value.platform) == null ? void 0 : h.locationIds;
|
|
2958
2958
|
if (_e({
|
|
@@ -2967,7 +2967,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2967
2967
|
try {
|
|
2968
2968
|
await Ye(e.value._id, e.value), await Ne(e.value._id), await y.getSettings();
|
|
2969
2969
|
} catch (r) {
|
|
2970
|
-
|
|
2970
|
+
m.open({ type: "error", message: r.message });
|
|
2971
2971
|
}
|
|
2972
2972
|
});
|
|
2973
2973
|
}
|
|
@@ -3022,7 +3022,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3022
3022
|
try {
|
|
3023
3023
|
await Ne(e.value._id), await y.getSettings();
|
|
3024
3024
|
} catch (n) {
|
|
3025
|
-
|
|
3025
|
+
m.open({ type: "error", message: n.message });
|
|
3026
3026
|
}
|
|
3027
3027
|
});
|
|
3028
3028
|
}
|
|
@@ -3054,8 +3054,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3054
3054
|
return Oe(async () => {
|
|
3055
3055
|
await y.getSettings();
|
|
3056
3056
|
}), (n, o) => {
|
|
3057
|
-
var P, z, oe, le, X, de, me,
|
|
3058
|
-
const h = K("FmIcon"), r = K("FmButton"),
|
|
3057
|
+
var P, z, oe, le, X, de, me, ue, pe, ce, fe, ge, ve, ye, xe, J, M, L, A, j, H, Fe, E, ie, Ae, Je;
|
|
3058
|
+
const h = K("FmIcon"), r = K("FmButton"), p = K("FmMenuDivider"), U = K("FmTextField"), T = K("FmSelect");
|
|
3059
3059
|
return (z = (P = e.value) == null ? void 0 : P.platform) != null && z.mappings ? (b(), N("div", Ml, [
|
|
3060
3060
|
t("div", Pl, [
|
|
3061
3061
|
t("div", jl, [
|
|
@@ -3067,29 +3067,29 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3067
3067
|
class: "p-2 bg-gray-100 rounded-full",
|
|
3068
3068
|
onClick: d
|
|
3069
3069
|
}),
|
|
3070
|
-
t("span", Ol, S(
|
|
3070
|
+
t("span", Ol, S(u(a)("report.integration.refreshSetting")), 1)
|
|
3071
3071
|
]),
|
|
3072
3072
|
l(r, {
|
|
3073
3073
|
variant: "tertiary",
|
|
3074
|
-
label:
|
|
3074
|
+
label: u(a)("report.common.delete"),
|
|
3075
3075
|
onClick: R
|
|
3076
3076
|
}, null, 8, ["label"]),
|
|
3077
3077
|
l(r, {
|
|
3078
3078
|
variant: "primary",
|
|
3079
|
-
label:
|
|
3079
|
+
label: u(a)("report.common.update"),
|
|
3080
3080
|
"prepend-icon": "update",
|
|
3081
|
-
onClick:
|
|
3081
|
+
onClick: C
|
|
3082
3082
|
}, null, 8, ["label"])
|
|
3083
3083
|
])
|
|
3084
3084
|
])
|
|
3085
3085
|
]),
|
|
3086
|
-
l(
|
|
3086
|
+
l(p, { style: { margin: 0 } }),
|
|
3087
3087
|
t("div", Bl, [
|
|
3088
3088
|
t("div", Yl, [
|
|
3089
3089
|
t("div", ql, [
|
|
3090
|
-
t("div", zl, S(
|
|
3090
|
+
t("div", zl, S(u(a)("report.integration.general")), 1),
|
|
3091
3091
|
t("div", Hl, [
|
|
3092
|
-
t("div", Gl, S(
|
|
3092
|
+
t("div", Gl, S(u(a)("report.common.name")), 1),
|
|
3093
3093
|
t("div", Ql, [
|
|
3094
3094
|
l(U, {
|
|
3095
3095
|
modelValue: e.value.name,
|
|
@@ -3098,19 +3098,19 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3098
3098
|
])
|
|
3099
3099
|
]),
|
|
3100
3100
|
t("div", Xl, [
|
|
3101
|
-
t("div", Wl, S(
|
|
3101
|
+
t("div", Wl, S(u(a)("report.integration.location")), 1),
|
|
3102
3102
|
l(T, {
|
|
3103
3103
|
modelValue: e.value.platform.locationIds,
|
|
3104
3104
|
"onUpdate:modelValue": o[1] || (o[1] = (q) => e.value.platform.locationIds = q),
|
|
3105
3105
|
multiselect: !0,
|
|
3106
|
-
items:
|
|
3106
|
+
items: k.value,
|
|
3107
3107
|
placeholder: "Select location",
|
|
3108
3108
|
class: "flex-grow",
|
|
3109
3109
|
rules: [(q) => q.length !== 0 || "Please select at least 1 location"]
|
|
3110
3110
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
3111
3111
|
]),
|
|
3112
3112
|
t("div", Jl, [
|
|
3113
|
-
t("div", Zl, S(
|
|
3113
|
+
t("div", Zl, S(u(a)("report.integration.grouping.title")), 1),
|
|
3114
3114
|
l(T, {
|
|
3115
3115
|
modelValue: e.value.platform.grouping,
|
|
3116
3116
|
"onUpdate:modelValue": o[2] || (o[2] = (q) => e.value.platform.grouping = q),
|
|
@@ -3182,10 +3182,10 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3182
3182
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
3183
3183
|
])
|
|
3184
3184
|
]),
|
|
3185
|
-
l(
|
|
3185
|
+
l(p, { style: { margin: 0 } }),
|
|
3186
3186
|
t("div", an, [
|
|
3187
3187
|
t("div", ln, [
|
|
3188
|
-
t("div", nn, S(
|
|
3188
|
+
t("div", nn, S(u(a)("report.integration.refNumFormat")), 1),
|
|
3189
3189
|
l(lt)
|
|
3190
3190
|
]),
|
|
3191
3191
|
t("div", sn, [
|
|
@@ -3223,7 +3223,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3223
3223
|
}, null, 8, ["model-value", "options"])
|
|
3224
3224
|
])
|
|
3225
3225
|
]),
|
|
3226
|
-
l(
|
|
3226
|
+
l(p, { style: { margin: 0 } }),
|
|
3227
3227
|
l(Ee, {
|
|
3228
3228
|
modelValue: e.value.platform,
|
|
3229
3229
|
"onUpdate:modelValue": o[12] || (o[12] = (q) => e.value.platform = q),
|
|
@@ -3231,9 +3231,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3231
3231
|
"integration-id": e.value._id,
|
|
3232
3232
|
"is-auto-email-mode": !0
|
|
3233
3233
|
}, null, 8, ["modelValue", "integration-id"]),
|
|
3234
|
-
l(
|
|
3234
|
+
l(p, { style: { margin: 0 } }),
|
|
3235
3235
|
t("div", rn, [
|
|
3236
|
-
t("div", dn, S(
|
|
3236
|
+
t("div", dn, S(u(a)("report.integration.items")), 1),
|
|
3237
3237
|
l(r, {
|
|
3238
3238
|
variant: "secondary",
|
|
3239
3239
|
"prepend-icon": "add",
|
|
@@ -3243,7 +3243,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3243
3243
|
]),
|
|
3244
3244
|
l(ee, {
|
|
3245
3245
|
"header-items": ["Key", "Account Code", "Item Code"],
|
|
3246
|
-
rows: ((
|
|
3246
|
+
rows: ((ue = (me = (de = e.value) == null ? void 0 : de.platform) == null ? void 0 : me.mappings) == null ? void 0 : ue.items) || [],
|
|
3247
3247
|
"columns-per-row": 1,
|
|
3248
3248
|
removable: !0,
|
|
3249
3249
|
"mapping-type": "items",
|
|
@@ -3258,9 +3258,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3258
3258
|
(ae = (G = e.value) == null ? void 0 : G.platform) != null && ae.mappings && (e.value.platform.mappings.items = q);
|
|
3259
3259
|
})
|
|
3260
3260
|
}, null, 8, ["rows"]),
|
|
3261
|
-
l(
|
|
3261
|
+
l(p, { style: { margin: 0 } }),
|
|
3262
3262
|
t("div", mn, [
|
|
3263
|
-
t("div",
|
|
3263
|
+
t("div", un, S(u(a)("report.integration.taxes")), 1),
|
|
3264
3264
|
l(r, {
|
|
3265
3265
|
variant: "secondary",
|
|
3266
3266
|
"prepend-icon": "add",
|
|
@@ -3270,7 +3270,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3270
3270
|
]),
|
|
3271
3271
|
l(ee, {
|
|
3272
3272
|
"header-items": ["Key", "Account Code"],
|
|
3273
|
-
rows: ((fe = (ce = (
|
|
3273
|
+
rows: ((fe = (ce = (pe = e.value) == null ? void 0 : pe.platform) == null ? void 0 : ce.mappings) == null ? void 0 : fe.taxes) || [],
|
|
3274
3274
|
"columns-per-row": 2,
|
|
3275
3275
|
removable: !0,
|
|
3276
3276
|
"mapping-type": "taxes",
|
|
@@ -3284,13 +3284,13 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3284
3284
|
(ae = (G = e.value) == null ? void 0 : G.platform) != null && ae.mappings && (e.value.platform.mappings.taxes = q);
|
|
3285
3285
|
})
|
|
3286
3286
|
}, null, 8, ["rows"]),
|
|
3287
|
-
l(
|
|
3288
|
-
t("div",
|
|
3289
|
-
t("div", cn, S(
|
|
3287
|
+
l(p, { style: { margin: 0 } }),
|
|
3288
|
+
t("div", pn, [
|
|
3289
|
+
t("div", cn, S(u(a)("report.integration.taxesForRefund")), 1),
|
|
3290
3290
|
l(r, {
|
|
3291
3291
|
variant: "secondary",
|
|
3292
3292
|
"prepend-icon": "add",
|
|
3293
|
-
label:
|
|
3293
|
+
label: u(a)("report.integration.addTaxesForRefund"),
|
|
3294
3294
|
onClick: o[19] || (o[19] = () => i("mappings", "taxesForRefund"))
|
|
3295
3295
|
}, null, 8, ["label"])
|
|
3296
3296
|
]),
|
|
@@ -3310,9 +3310,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3310
3310
|
(ae = (G = e.value) == null ? void 0 : G.platform) != null && ae.mappings && (e.value.platform.mappings.taxesForRefund = q);
|
|
3311
3311
|
})
|
|
3312
3312
|
}, null, 8, ["rows"]),
|
|
3313
|
-
l(
|
|
3313
|
+
l(p, { style: { margin: 0 } }),
|
|
3314
3314
|
t("div", fn, [
|
|
3315
|
-
t("div", gn, S(
|
|
3315
|
+
t("div", gn, S(u(a)("report.integration.taxRoundingAdjustments")), 1),
|
|
3316
3316
|
l(r, {
|
|
3317
3317
|
variant: "secondary",
|
|
3318
3318
|
"prepend-icon": "add",
|
|
@@ -3336,9 +3336,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3336
3336
|
(ae = (G = e.value) == null ? void 0 : G.platform) != null && ae.mappings && (e.value.platform.mappings.taxRoundingAdjustments = q);
|
|
3337
3337
|
})
|
|
3338
3338
|
}, null, 8, ["rows"]),
|
|
3339
|
-
l(
|
|
3339
|
+
l(p, { style: { margin: 0 } }),
|
|
3340
3340
|
t("div", vn, [
|
|
3341
|
-
t("div", yn, S(
|
|
3341
|
+
t("div", yn, S(u(a)("report.integration.payments")), 1),
|
|
3342
3342
|
l(r, {
|
|
3343
3343
|
variant: "secondary",
|
|
3344
3344
|
"prepend-icon": "add",
|
|
@@ -3362,7 +3362,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3362
3362
|
(ae = (G = e.value) == null ? void 0 : G.platform) != null && ae.mappings && (e.value.platform.mappings.payments = q);
|
|
3363
3363
|
})
|
|
3364
3364
|
}, null, 8, ["rows"]),
|
|
3365
|
-
l(
|
|
3365
|
+
l(p, { style: { margin: 0 } }),
|
|
3366
3366
|
s.value ? (b(), N(De, { key: 0 }, [
|
|
3367
3367
|
t("div", xn, [
|
|
3368
3368
|
o[35] || (o[35] = t("div", { class: "fm-typo-en-title-sm-800" }, "Inventory Items", -1)),
|
|
@@ -3388,7 +3388,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3388
3388
|
onRemove: o[29] || (o[29] = (q, G) => {
|
|
3389
3389
|
var ae, Xe, Ze;
|
|
3390
3390
|
if (((Ze = (Xe = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : Xe.inventoryMappings) == null ? void 0 : Ze.items[G].key) === "DEFAULT") {
|
|
3391
|
-
m
|
|
3391
|
+
u(m).open({
|
|
3392
3392
|
type: "error",
|
|
3393
3393
|
message: "DEFAULT item cannot be removed."
|
|
3394
3394
|
});
|
|
@@ -3401,7 +3401,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3401
3401
|
(ae = (G = e.value) == null ? void 0 : G.platform) != null && ae.inventoryMappings && (e.value.platform.inventoryMappings.items = q);
|
|
3402
3402
|
})
|
|
3403
3403
|
}, null, 8, ["rows"]),
|
|
3404
|
-
l(
|
|
3404
|
+
l(p, { style: { margin: 0 } }),
|
|
3405
3405
|
t("div", bn, [
|
|
3406
3406
|
o[36] || (o[36] = t("div", { class: "fm-typo-en-title-sm-800" }, "Supplier", -1)),
|
|
3407
3407
|
l(r, {
|
|
@@ -3453,7 +3453,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3453
3453
|
const { t: a } = se(), e = W({
|
|
3454
3454
|
invoices: [],
|
|
3455
3455
|
deliveryOrders: []
|
|
3456
|
-
}),
|
|
3456
|
+
}), m = Y(
|
|
3457
3457
|
() => e.value.invoices.reduce((i, _) => {
|
|
3458
3458
|
const $ = i.length, { invoice: d, payments: s } = _;
|
|
3459
3459
|
i[$] = {
|
|
@@ -3548,7 +3548,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3548
3548
|
header: "Payment Amount",
|
|
3549
3549
|
enableSorting: !1
|
|
3550
3550
|
}
|
|
3551
|
-
],
|
|
3551
|
+
], F = Y(
|
|
3552
3552
|
() => e.value.deliveryOrders.reduce((i, _) => {
|
|
3553
3553
|
const $ = i.length, { _items: d } = _;
|
|
3554
3554
|
i[$] = {
|
|
@@ -3630,13 +3630,13 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3630
3630
|
header: "Item Amount",
|
|
3631
3631
|
enableSorting: !1
|
|
3632
3632
|
}
|
|
3633
|
-
],
|
|
3633
|
+
], I = ne(g, "modelValue"), w = W(!1), x = Se(), { dateRange: c } = Ge($e());
|
|
3634
3634
|
Ke(
|
|
3635
3635
|
() => c.value,
|
|
3636
3636
|
async () => {
|
|
3637
|
-
if (
|
|
3637
|
+
if (I.value._id)
|
|
3638
3638
|
try {
|
|
3639
|
-
w.value = !0, e.value = await qe(
|
|
3639
|
+
w.value = !0, e.value = await qe(I.value._id);
|
|
3640
3640
|
} catch (i) {
|
|
3641
3641
|
x.open({ message: i.message, type: "error" });
|
|
3642
3642
|
} finally {
|
|
@@ -3647,13 +3647,13 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3647
3647
|
immediate: !0
|
|
3648
3648
|
}
|
|
3649
3649
|
);
|
|
3650
|
-
async function
|
|
3650
|
+
async function k() {
|
|
3651
3651
|
try {
|
|
3652
|
-
if (!
|
|
3652
|
+
if (!I.value._id) {
|
|
3653
3653
|
x.open({ message: "Invalid accounting setting", type: "error" });
|
|
3654
3654
|
return;
|
|
3655
3655
|
}
|
|
3656
|
-
w.value = !0, await at(
|
|
3656
|
+
w.value = !0, await at(I.value._id, [f.value]);
|
|
3657
3657
|
} catch (i) {
|
|
3658
3658
|
i.message && x.open({ message: i.message, type: "error" }), Array.isArray(i.errors) ? i.errors.forEach((_) => x.open({ message: String(_), type: "error" })) : typeof i.errors == "string" && x.open({ message: i.errors, type: "error" });
|
|
3659
3659
|
} finally {
|
|
@@ -3665,7 +3665,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3665
3665
|
return i.some(
|
|
3666
3666
|
(_) => _.key === "report_portal_integration_custom_sql" && _.value === !0
|
|
3667
3667
|
);
|
|
3668
|
-
}),
|
|
3668
|
+
}), C = [
|
|
3669
3669
|
{
|
|
3670
3670
|
label: "Sales (Inv, Cn, Payment, Refund)",
|
|
3671
3671
|
value: "SALE"
|
|
@@ -3678,42 +3678,42 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3678
3678
|
/* ORDER */
|
|
3679
3679
|
}
|
|
3680
3680
|
] : []
|
|
3681
|
-
], f = W(
|
|
3681
|
+
], f = W(C[0].value);
|
|
3682
3682
|
return (i, _) => {
|
|
3683
3683
|
const $ = K("FmButton"), d = K("FmCircularProgress"), s = K("FmTabs"), v = K("FmTable");
|
|
3684
3684
|
return b(), N("div", hn, [
|
|
3685
3685
|
t("div", _n, [
|
|
3686
3686
|
l(Qe, {
|
|
3687
|
-
"date-range":
|
|
3687
|
+
"date-range": u(c),
|
|
3688
3688
|
"onUpdate:dateRange": _[0] || (_[0] = (n) => Me(c) ? c.value = n : null),
|
|
3689
3689
|
compare: !1
|
|
3690
3690
|
}, null, 8, ["date-range"]),
|
|
3691
3691
|
l($, {
|
|
3692
3692
|
loading: w.value,
|
|
3693
3693
|
variant: "primary",
|
|
3694
|
-
label:
|
|
3695
|
-
onClick:
|
|
3694
|
+
label: u(a)("report.common.download"),
|
|
3695
|
+
onClick: k
|
|
3696
3696
|
}, null, 8, ["loading", "label"])
|
|
3697
3697
|
]),
|
|
3698
3698
|
w.value ? (b(), N("div", Cn, [
|
|
3699
3699
|
l(d, { size: "xl" }),
|
|
3700
|
-
t("span", kn, S(
|
|
3700
|
+
t("span", kn, S(u(a)("report.common.isLoading")), 1)
|
|
3701
3701
|
])) : (b(), N("div", $n, [
|
|
3702
3702
|
l(s, {
|
|
3703
3703
|
"model-value": f.value,
|
|
3704
3704
|
"onUpdate:modelValue": _[1] || (_[1] = (n) => f.value = n),
|
|
3705
|
-
items:
|
|
3705
|
+
items: C
|
|
3706
3706
|
}, null, 8, ["model-value"]),
|
|
3707
|
-
f.value === "SALE" &&
|
|
3707
|
+
f.value === "SALE" && m.value.length > 0 ? (b(), O(v, {
|
|
3708
3708
|
key: 0,
|
|
3709
3709
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
3710
|
-
"row-data":
|
|
3710
|
+
"row-data": m.value,
|
|
3711
3711
|
"column-defs": y
|
|
3712
3712
|
}, null, 8, ["row-data"])) : B("", !0),
|
|
3713
|
-
f.value === "ORDER" &&
|
|
3713
|
+
f.value === "ORDER" && F.value.length > 0 ? (b(), O(v, {
|
|
3714
3714
|
key: 1,
|
|
3715
3715
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
3716
|
-
"row-data":
|
|
3716
|
+
"row-data": F.value,
|
|
3717
3717
|
"column-defs": D
|
|
3718
3718
|
}, null, 8, ["row-data"])) : B("", !0)
|
|
3719
3719
|
]))
|
|
@@ -3728,7 +3728,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3728
3728
|
},
|
|
3729
3729
|
emits: ["update:modelValue"],
|
|
3730
3730
|
setup(g) {
|
|
3731
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
3731
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = W("setting"), y = [
|
|
3732
3732
|
{
|
|
3733
3733
|
label: a("report.integration.setting"),
|
|
3734
3734
|
value: "setting",
|
|
@@ -3739,8 +3739,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3739
3739
|
value: "preview",
|
|
3740
3740
|
icon: "table"
|
|
3741
3741
|
}
|
|
3742
|
-
],
|
|
3743
|
-
switch (
|
|
3742
|
+
], F = Ce(), D = Y(() => {
|
|
3743
|
+
switch (m.value) {
|
|
3744
3744
|
case "preview":
|
|
3745
3745
|
return Sn;
|
|
3746
3746
|
case "setting":
|
|
@@ -3749,15 +3749,15 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3749
3749
|
return null;
|
|
3750
3750
|
}
|
|
3751
3751
|
});
|
|
3752
|
-
return (
|
|
3753
|
-
var
|
|
3752
|
+
return (I, w) => {
|
|
3753
|
+
var k;
|
|
3754
3754
|
const x = K("FmPageHead"), c = K("FmTabs");
|
|
3755
3755
|
return b(), N("div", An, [
|
|
3756
3756
|
l(x, {
|
|
3757
|
-
title: ((
|
|
3757
|
+
title: ((k = e.value) == null ? void 0 : k.name) || "SQL",
|
|
3758
3758
|
"back-button": !0,
|
|
3759
3759
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
3760
|
-
"onClick:back": w[0] || (w[0] = (R) =>
|
|
3760
|
+
"onClick:back": w[0] || (w[0] = (R) => u(F).push({ name: "integrations" }))
|
|
3761
3761
|
}, {
|
|
3762
3762
|
description: ke(() => w[3] || (w[3] = [
|
|
3763
3763
|
t("div", null, null, -1)
|
|
@@ -3765,8 +3765,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3765
3765
|
_: 1
|
|
3766
3766
|
}, 8, ["title"]),
|
|
3767
3767
|
l(c, {
|
|
3768
|
-
"model-value":
|
|
3769
|
-
"onUpdate:modelValue": w[1] || (w[1] = (R) =>
|
|
3768
|
+
"model-value": m.value,
|
|
3769
|
+
"onUpdate:modelValue": w[1] || (w[1] = (R) => m.value = R),
|
|
3770
3770
|
items: y
|
|
3771
3771
|
}, null, 8, ["model-value"]),
|
|
3772
3772
|
t("div", Vn, [
|
|
@@ -3784,7 +3784,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3784
3784
|
}, Fn = { class: "flex flex-col gap-16 pb-[24px]" }, In = { class: "flex flex-row justify-between items-center gap-2" }, Tn = { class: "fm-typo-en-title-sm-800" }, Rn = { class: "flex flex-row gap-2 items-center" }, Un = { class: "flex flex-row gap-2 items-center" }, Nn = { class: "relative group cursor-pointer" }, Mn = { 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" }, Pn = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, jn = { class: "w-[90%] flex flex-col gap-24" }, Ln = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, En = { class: "flex flex-col max-w-[100%]" }, On = { class: "w-[25%] font-semibold" }, Bn = { class: "flex-grow" }, Yn = { class: "flex flex-col gap-24 pt-[24px]" }, qn = { class: "flex flex-col justify-between" }, zn = { class: "w-[25%] font-semibold" }, Hn = { class: "flex-grow" }, Gn = { class: "flex flex-col justify-between" }, Qn = { class: "w-[25%] font-semibold" }, Xn = { class: "flex-grow" }, Wn = { class: "flex flex-col gap-16" }, Jn = { class: "fm-typo-en-title-sm-800" }, Zn = { class: "flex flex-col max-w-[100%]" }, es = { class: "w-[25%] font-semibold" }, ts = { class: "flex-grow" }, os = { class: "flex flex-col max-w-[100%]" }, as = { class: "w-[25%] font-semibold" }, ls = { class: "flex flex-col max-w-[100%]" }, ns = { class: "w-[25%] font-semibold" }, ss = {
|
|
3785
3785
|
key: 0,
|
|
3786
3786
|
class: "flex flex-col max-w-[100%]"
|
|
3787
|
-
}, rs = { class: "flex flex-col gap-16" }, is = { class: "xs:grid-cols-1 grid gap-16" }, ds = { key: 1 }, ms = { class: "flex flex-col gap-16 pt-3 pb-3" },
|
|
3787
|
+
}, rs = { class: "flex flex-col gap-16" }, is = { class: "xs:grid-cols-1 grid gap-16" }, ds = { key: 1 }, ms = { class: "flex flex-col gap-16 pt-3 pb-3" }, us = { class: "flex flex-row items-center gap-5" }, ps = { class: "fm-typo-en-title-sm-800" }, cs = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, fs = { class: "flex flex-row items-center justify-between gap-x-16" }, gs = { class: "fm-typo-en-title-sm-800" }, vs = { class: "flex flex-row items-center justify-between gap-x-16" }, ys = { class: "fm-typo-en-title-sm-800" }, xs = { class: "flex flex-row items-center justify-between gap-x-16" }, bs = { class: "fm-typo-en-title-sm-800" }, ws = { class: "flex flex-row items-center justify-between gap-x-16" }, hs = { class: "fm-typo-en-title-sm-800" }, _s = { class: "flex flex-row items-center justify-between" }, Cs = { class: "flex-grow" }, ks = {
|
|
3788
3788
|
key: 0,
|
|
3789
3789
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
3790
3790
|
}, $s = {
|
|
@@ -3814,17 +3814,17 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3814
3814
|
}),
|
|
3815
3815
|
emits: ["update:modelValue"],
|
|
3816
3816
|
setup(g) {
|
|
3817
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
3817
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = Se(), y = Re(), F = Ce(), { promptLoader: D } = ze(), { promptMessage: I } = He(), { restaurants: w } = $e(), { rules: x, notifyUnauthorized: c } = je(), k = Y(
|
|
3818
3818
|
() => w.map((n) => ({ label: n.name, value: n.id }))
|
|
3819
3819
|
);
|
|
3820
3820
|
function R(n) {
|
|
3821
3821
|
var o;
|
|
3822
3822
|
!((o = g.retrievedMethods) != null && o.data) || !Array.isArray(g.retrievedMethods.data) || n.forEach((h) => {
|
|
3823
|
-
const r = g.retrievedMethods.data.find((
|
|
3823
|
+
const r = g.retrievedMethods.data.find((p) => p.value == h.id);
|
|
3824
3824
|
r && (h.cnId = r.cnId);
|
|
3825
3825
|
});
|
|
3826
3826
|
}
|
|
3827
|
-
async function
|
|
3827
|
+
async function C() {
|
|
3828
3828
|
var r;
|
|
3829
3829
|
const n = (r = e.value.platform) == null ? void 0 : r.locationIds;
|
|
3830
3830
|
if (_e({
|
|
@@ -3835,14 +3835,14 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3835
3835
|
c(Z.delete);
|
|
3836
3836
|
return;
|
|
3837
3837
|
}
|
|
3838
|
-
await
|
|
3838
|
+
await I({
|
|
3839
3839
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
3840
3840
|
title: a("report.common.delete")
|
|
3841
3841
|
}) && await D(async () => {
|
|
3842
3842
|
try {
|
|
3843
|
-
await Be(e.value._id), await y.getSettings(),
|
|
3844
|
-
} catch (
|
|
3845
|
-
|
|
3843
|
+
await Be(e.value._id), await y.getSettings(), F.back();
|
|
3844
|
+
} catch (p) {
|
|
3845
|
+
m.open({ type: "error", message: p.message });
|
|
3846
3846
|
}
|
|
3847
3847
|
});
|
|
3848
3848
|
}
|
|
@@ -3858,17 +3858,17 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3858
3858
|
return;
|
|
3859
3859
|
}
|
|
3860
3860
|
await D(async () => {
|
|
3861
|
-
var r,
|
|
3861
|
+
var r, p, U;
|
|
3862
3862
|
try {
|
|
3863
|
-
(U = (
|
|
3863
|
+
(U = (p = (r = e.value) == null ? void 0 : r.platform) == null ? void 0 : p.mappings) != null && U.paymentMethods && R(e.value.platform.mappings.paymentMethods), await Ye(e.value._id, e.value), await y.getSettings();
|
|
3864
3864
|
} catch (T) {
|
|
3865
|
-
|
|
3865
|
+
m.open({ type: "error", message: T.message });
|
|
3866
3866
|
}
|
|
3867
3867
|
});
|
|
3868
3868
|
}
|
|
3869
3869
|
function i(n, o) {
|
|
3870
|
-
var
|
|
3871
|
-
const h = (
|
|
3870
|
+
var p;
|
|
3871
|
+
const h = (p = e.value.platform) == null ? void 0 : p.mappings;
|
|
3872
3872
|
if (!h) return;
|
|
3873
3873
|
if (["items", "taxes", "paymentMethods", "taxRoundingAdjustments"].includes(n)) {
|
|
3874
3874
|
const U = n;
|
|
@@ -3922,22 +3922,22 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3922
3922
|
n && n.forEach((o, h) => {
|
|
3923
3923
|
var U;
|
|
3924
3924
|
const r = o.key || "";
|
|
3925
|
-
let
|
|
3926
|
-
if (!
|
|
3925
|
+
let p = o.account;
|
|
3926
|
+
if (!p && r) {
|
|
3927
3927
|
switch (r) {
|
|
3928
3928
|
case "SST_SV":
|
|
3929
|
-
|
|
3929
|
+
p = "SST-6";
|
|
3930
3930
|
break;
|
|
3931
3931
|
case "SST_SV8":
|
|
3932
|
-
|
|
3932
|
+
p = "SST-8";
|
|
3933
3933
|
break;
|
|
3934
3934
|
case "SST_EX":
|
|
3935
|
-
|
|
3935
|
+
p = "SST-0";
|
|
3936
3936
|
break;
|
|
3937
3937
|
}
|
|
3938
3938
|
(U = e.value.platform) != null && U.mappings && (e.value.platform.mappings.taxes[h] = {
|
|
3939
3939
|
...o,
|
|
3940
|
-
account:
|
|
3940
|
+
account: p
|
|
3941
3941
|
});
|
|
3942
3942
|
}
|
|
3943
3943
|
});
|
|
@@ -3949,8 +3949,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3949
3949
|
return (h = (o = (n = e.value) == null ? void 0 : n.platform) == null ? void 0 : o.mappings) == null ? void 0 : h.version;
|
|
3950
3950
|
},
|
|
3951
3951
|
(n) => {
|
|
3952
|
-
var o, h, r,
|
|
3953
|
-
n === "v1" && !((r = (h = (o = e.value) == null ? void 0 : o.platform) == null ? void 0 : h.mappings) != null && r.payee) && (U = (
|
|
3952
|
+
var o, h, r, p, U;
|
|
3953
|
+
n === "v1" && !((r = (h = (o = e.value) == null ? void 0 : o.platform) == null ? void 0 : h.mappings) != null && r.payee) && (U = (p = e.value) == null ? void 0 : p.platform) != null && U.mappings && (e.value.platform.mappings.payee = {
|
|
3954
3954
|
id: 1,
|
|
3955
3955
|
name: ""
|
|
3956
3956
|
});
|
|
@@ -3962,19 +3962,19 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3962
3962
|
try {
|
|
3963
3963
|
await Ne(e.value._id), await y.getSettings();
|
|
3964
3964
|
} catch (n) {
|
|
3965
|
-
|
|
3965
|
+
m.open({ type: "error", message: n.message });
|
|
3966
3966
|
}
|
|
3967
3967
|
});
|
|
3968
3968
|
}
|
|
3969
3969
|
return Oe(async () => {
|
|
3970
3970
|
await y.getSettings();
|
|
3971
3971
|
}), (n, o) => {
|
|
3972
|
-
var z, oe, le, X, de, me,
|
|
3973
|
-
const h = K("FmIcon"), r = K("FmButton"),
|
|
3972
|
+
var z, oe, le, X, de, me, ue, pe, ce, fe, ge, ve, ye, xe, J, M, L;
|
|
3973
|
+
const h = K("FmIcon"), r = K("FmButton"), p = K("FmSelect"), U = K("FmMenuDivider"), T = K("FmTextField"), P = K("FmCircularProgress");
|
|
3974
3974
|
return (oe = (z = e.value) == null ? void 0 : z.platform) != null && oe.mappings ? (b(), N("div", Kn, [
|
|
3975
3975
|
t("div", Fn, [
|
|
3976
3976
|
t("div", In, [
|
|
3977
|
-
t("div", Tn, S(
|
|
3977
|
+
t("div", Tn, S(u(a)("report.integration.connect")), 1),
|
|
3978
3978
|
t("div", Rn, [
|
|
3979
3979
|
t("div", Un, [
|
|
3980
3980
|
t("div", Nn, [
|
|
@@ -3983,16 +3983,16 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3983
3983
|
class: "p-2 bg-gray-100 rounded-full",
|
|
3984
3984
|
onClick: v
|
|
3985
3985
|
}),
|
|
3986
|
-
t("span", Mn, S(
|
|
3986
|
+
t("span", Mn, S(u(a)("report.integration.refreshSetting")), 1)
|
|
3987
3987
|
]),
|
|
3988
3988
|
l(r, {
|
|
3989
3989
|
variant: "tertiary",
|
|
3990
|
-
label:
|
|
3991
|
-
onClick:
|
|
3990
|
+
label: u(a)("report.common.delete"),
|
|
3991
|
+
onClick: C
|
|
3992
3992
|
}, null, 8, ["label"]),
|
|
3993
3993
|
l(r, {
|
|
3994
3994
|
variant: "primary",
|
|
3995
|
-
label:
|
|
3995
|
+
label: u(a)("report.common.update"),
|
|
3996
3996
|
"prepend-icon": "update",
|
|
3997
3997
|
onClick: f
|
|
3998
3998
|
}, null, 8, ["label"])
|
|
@@ -4002,11 +4002,11 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4002
4002
|
]),
|
|
4003
4003
|
t("div", Pn, [
|
|
4004
4004
|
t("div", jn, [
|
|
4005
|
-
t("div", Ln, S(
|
|
4005
|
+
t("div", Ln, S(u(a)("report.integration.biztory.authenticate")), 1),
|
|
4006
4006
|
t("div", En, [
|
|
4007
|
-
t("div", On, " Biztory " + S(
|
|
4007
|
+
t("div", On, " Biztory " + S(u(a)("report.integration.biztory.version")), 1),
|
|
4008
4008
|
t("div", Bn, [
|
|
4009
|
-
l(
|
|
4009
|
+
l(p, {
|
|
4010
4010
|
modelValue: e.value.platform.mappings.version,
|
|
4011
4011
|
"onUpdate:modelValue": o[0] || (o[0] = (A) => e.value.platform.mappings.version = A),
|
|
4012
4012
|
items: [
|
|
@@ -4020,7 +4020,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4020
4020
|
l(U, { style: { margin: 0 } }),
|
|
4021
4021
|
t("div", Yn, [
|
|
4022
4022
|
t("div", qn, [
|
|
4023
|
-
t("div", zn, S(
|
|
4023
|
+
t("div", zn, S(u(a)("report.integration.biztory.subdomain")), 1),
|
|
4024
4024
|
t("div", Hn, [
|
|
4025
4025
|
l(T, {
|
|
4026
4026
|
modelValue: e.value.platform.subdomain,
|
|
@@ -4030,7 +4030,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4030
4030
|
])
|
|
4031
4031
|
]),
|
|
4032
4032
|
t("div", Gn, [
|
|
4033
|
-
t("div", Qn, S(
|
|
4033
|
+
t("div", Qn, S(u(a)("report.integration.biztory.apiKey")), 1),
|
|
4034
4034
|
t("div", Xn, [
|
|
4035
4035
|
l(T, {
|
|
4036
4036
|
modelValue: e.value.platform.api_key,
|
|
@@ -4040,9 +4040,9 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4040
4040
|
])
|
|
4041
4041
|
]),
|
|
4042
4042
|
t("div", Wn, [
|
|
4043
|
-
t("div", Jn, S(
|
|
4043
|
+
t("div", Jn, S(u(a)("report.integration.general")), 1),
|
|
4044
4044
|
t("div", Zn, [
|
|
4045
|
-
t("div", es, S(
|
|
4045
|
+
t("div", es, S(u(a)("report.common.name")), 1),
|
|
4046
4046
|
t("div", ts, [
|
|
4047
4047
|
l(T, {
|
|
4048
4048
|
modelValue: e.value.name,
|
|
@@ -4051,24 +4051,24 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4051
4051
|
])
|
|
4052
4052
|
]),
|
|
4053
4053
|
t("div", os, [
|
|
4054
|
-
t("div", as, S(
|
|
4055
|
-
l(
|
|
4054
|
+
t("div", as, S(u(a)("report.common.location")), 1),
|
|
4055
|
+
l(p, {
|
|
4056
4056
|
modelValue: e.value.platform.locationIds,
|
|
4057
4057
|
"onUpdate:modelValue": o[4] || (o[4] = (A) => e.value.platform.locationIds = A),
|
|
4058
4058
|
multiselect: !0,
|
|
4059
|
-
items:
|
|
4060
|
-
placeholder:
|
|
4059
|
+
items: k.value,
|
|
4060
|
+
placeholder: u(a)("report.common.location"),
|
|
4061
4061
|
class: "flex-grow"
|
|
4062
4062
|
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
4063
4063
|
]),
|
|
4064
4064
|
t("div", ls, [
|
|
4065
|
-
t("div", ns, S(
|
|
4066
|
-
l(
|
|
4065
|
+
t("div", ns, S(u(a)("report.integration.grouping.title")), 1),
|
|
4066
|
+
l(p, {
|
|
4067
4067
|
modelValue: e.value.platform.grouping,
|
|
4068
4068
|
"onUpdate:modelValue": o[5] || (o[5] = (A) => e.value.platform.grouping = A),
|
|
4069
4069
|
multiselect: !1,
|
|
4070
4070
|
items: $,
|
|
4071
|
-
placeholder:
|
|
4071
|
+
placeholder: u(a)("report.integration.grouping.title"),
|
|
4072
4072
|
class: "flex-grow",
|
|
4073
4073
|
disabled: ""
|
|
4074
4074
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -4113,8 +4113,8 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4113
4113
|
]),
|
|
4114
4114
|
l(U, { style: { margin: 0 } }),
|
|
4115
4115
|
t("div", ms, [
|
|
4116
|
-
t("div",
|
|
4117
|
-
t("div",
|
|
4116
|
+
t("div", us, [
|
|
4117
|
+
t("div", ps, S(u(a)("report.integration.refNumFormat")), 1),
|
|
4118
4118
|
l(lt)
|
|
4119
4119
|
]),
|
|
4120
4120
|
t("div", cs, [
|
|
@@ -4165,7 +4165,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4165
4165
|
}, null, 8, ["modelValue", "last-upload-date", "error-logs", "integration-id"]),
|
|
4166
4166
|
l(U, { style: { margin: 0 } }),
|
|
4167
4167
|
t("div", fs, [
|
|
4168
|
-
t("div", gs, S(
|
|
4168
|
+
t("div", gs, S(u(a)("report.integration.biztory.items")), 1),
|
|
4169
4169
|
l(r, {
|
|
4170
4170
|
variant: "secondary",
|
|
4171
4171
|
"prepend-icon": "add",
|
|
@@ -4175,7 +4175,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4175
4175
|
]),
|
|
4176
4176
|
l(ee, {
|
|
4177
4177
|
"header-items": ["Key", "Account Code"],
|
|
4178
|
-
rows: ((
|
|
4178
|
+
rows: ((pe = (ue = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ue.mappings) == null ? void 0 : pe.items) || [],
|
|
4179
4179
|
"columns-per-row": 2,
|
|
4180
4180
|
removable: !0,
|
|
4181
4181
|
"mapping-type": "items",
|
|
@@ -4191,7 +4191,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4191
4191
|
}, null, 8, ["rows"]),
|
|
4192
4192
|
l(U, { style: { margin: 0 } }),
|
|
4193
4193
|
t("div", vs, [
|
|
4194
|
-
t("div", ys, S(
|
|
4194
|
+
t("div", ys, S(u(a)("report.integration.biztory.taxes")), 1),
|
|
4195
4195
|
l(r, {
|
|
4196
4196
|
variant: "secondary",
|
|
4197
4197
|
"prepend-icon": "add",
|
|
@@ -4217,7 +4217,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4217
4217
|
}, null, 8, ["rows"]),
|
|
4218
4218
|
l(U, { style: { margin: 0 } }),
|
|
4219
4219
|
t("div", xs, [
|
|
4220
|
-
t("div", bs, S(
|
|
4220
|
+
t("div", bs, S(u(a)("report.integration.taxRoundingAdjustments")), 1),
|
|
4221
4221
|
l(r, {
|
|
4222
4222
|
variant: "secondary",
|
|
4223
4223
|
"prepend-icon": "add",
|
|
@@ -4243,7 +4243,7 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4243
4243
|
}, null, 8, ["rows"]),
|
|
4244
4244
|
l(U, { style: { margin: 0 } }),
|
|
4245
4245
|
t("div", ws, [
|
|
4246
|
-
t("div", hs, S(
|
|
4246
|
+
t("div", hs, S(u(a)("report.integration.biztory.payments")), 1),
|
|
4247
4247
|
l(r, {
|
|
4248
4248
|
variant: "secondary",
|
|
4249
4249
|
"prepend-icon": "add",
|
|
@@ -4266,13 +4266,13 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4266
4266
|
}, null, 8, ["modelValue"])
|
|
4267
4267
|
])
|
|
4268
4268
|
]),
|
|
4269
|
-
g.retrievedMethods.isError ? B("", !0) : (b(), N("div", ks, S(
|
|
4270
|
-
g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length == 0 && !g.retrievedMethods.isError ? (b(), N("span", $s, S(
|
|
4269
|
+
g.retrievedMethods.isError ? B("", !0) : (b(), N("div", ks, S(u(a)("report.integration.biztory.paymentTerm")), 1)),
|
|
4270
|
+
g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length == 0 && !g.retrievedMethods.isError ? (b(), N("span", $s, S(u(a)("report.integration.biztory.noPaymentMethods")), 1)) : B("", !0),
|
|
4271
4271
|
g.retrievedMethods.isLoaded ? B("", !0) : (b(), O(P, {
|
|
4272
4272
|
key: 2,
|
|
4273
4273
|
size: "xl"
|
|
4274
4274
|
})),
|
|
4275
|
-
g.retrievedMethods.isError ? (b(), N("span", Ss, S(
|
|
4275
|
+
g.retrievedMethods.isError ? (b(), N("span", Ss, S(u(a)("report.integration.biztory.error")), 1)) : B("", !0),
|
|
4276
4276
|
g.retrievedMethods.isLoaded && g.retrievedMethods.data && g.retrievedMethods.data.length != 0 ? (b(), O(ee, {
|
|
4277
4277
|
key: 4,
|
|
4278
4278
|
"header-items": ["Key", "Payment Method"],
|
|
@@ -4303,28 +4303,28 @@ const kt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4303
4303
|
});
|
|
4304
4304
|
function Vs(g) {
|
|
4305
4305
|
return g.reduce((a, e) => {
|
|
4306
|
-
var
|
|
4307
|
-
const { invoice:
|
|
4306
|
+
var F, D, I, w, x, c, k, R, C, f, i, _, $, d, s, v, n, o, h, r, p, U;
|
|
4307
|
+
const { invoice: m } = e, y = a.length;
|
|
4308
4308
|
a[y] = {
|
|
4309
|
-
invoice_date:
|
|
4310
|
-
ref_num:
|
|
4311
|
-
grandTotal:
|
|
4309
|
+
invoice_date: m.invoice_date,
|
|
4310
|
+
ref_num: m.ref_num,
|
|
4311
|
+
grandTotal: m.grandTotal,
|
|
4312
4312
|
// tax_code: invoice.tax[0].tax_code,
|
|
4313
4313
|
// tax: invoice.tax.reduce((sum, tax) => sum + tax.tax, 0),
|
|
4314
4314
|
// service_charge: invoice.service_charge.total,
|
|
4315
|
-
item_code: (
|
|
4316
|
-
item_desc: (D =
|
|
4317
|
-
item_price: (
|
|
4318
|
-
item_tax: (w =
|
|
4319
|
-
item_tax_label: ((x =
|
|
4320
|
-
payment_amount: ((
|
|
4321
|
-
payment_method: ((
|
|
4322
|
-
payment_term: ((f =
|
|
4315
|
+
item_code: (F = m.items[0]) == null ? void 0 : F.code,
|
|
4316
|
+
item_desc: (D = m.items[0]) == null ? void 0 : D.description,
|
|
4317
|
+
item_price: (I = m.items[0]) == null ? void 0 : I.price,
|
|
4318
|
+
item_tax: (w = m.items[0]) == null ? void 0 : w.total_tax,
|
|
4319
|
+
item_tax_label: ((x = m.items[0]) == null ? void 0 : x.tax_label) || "-",
|
|
4320
|
+
payment_amount: ((k = (c = m.transactions) == null ? void 0 : c[0]) == null ? void 0 : k.amount) || void 0,
|
|
4321
|
+
payment_method: ((C = (R = m.transactions) == null ? void 0 : R[0]) == null ? void 0 : C.payment_method) || "-",
|
|
4322
|
+
payment_term: ((f = m == null ? void 0 : m.payment_term) == null ? void 0 : f.name) || ""
|
|
4323
4323
|
};
|
|
4324
|
-
for (let T = 1; T < Math.max(((i =
|
|
4324
|
+
for (let T = 1; T < Math.max(((i = m.items) == null ? void 0 : i.length) || 0, ((_ = m.transactions) == null ? void 0 : _.length) || 0); T++) {
|
|
4325
4325
|
const P = y + T;
|
|
4326
4326
|
a[P] || (a[P] = {});
|
|
4327
|
-
const z =
|
|
4327
|
+
const z = m.items[T];
|
|
4328
4328
|
z ? a[P] = {
|
|
4329
4329
|
...a[P],
|
|
4330
4330
|
item_code: z.code,
|
|
@@ -4332,13 +4332,13 @@ function Vs(g) {
|
|
|
4332
4332
|
item_price: z.price,
|
|
4333
4333
|
item_tax: z.total_tax,
|
|
4334
4334
|
item_tax_label: z.tax_label || "-",
|
|
4335
|
-
payment_amount: ((d = ($ =
|
|
4336
|
-
payment_method: ((v = (s =
|
|
4337
|
-
payment_term: ((n =
|
|
4335
|
+
payment_amount: ((d = ($ = m.transactions) == null ? void 0 : $[T]) == null ? void 0 : d.amount) || void 0,
|
|
4336
|
+
payment_method: ((v = (s = m.transactions) == null ? void 0 : s[T]) == null ? void 0 : v.payment_method) || "-",
|
|
4337
|
+
payment_term: ((n = m == null ? void 0 : m.payment_term) == null ? void 0 : n.name) || ""
|
|
4338
4338
|
} : a[P] = {
|
|
4339
|
-
payment_amount: ((h = (o =
|
|
4340
|
-
payment_method: ((
|
|
4341
|
-
payment_term: ((U =
|
|
4339
|
+
payment_amount: ((h = (o = m.transactions) == null ? void 0 : o[T]) == null ? void 0 : h.amount) || void 0,
|
|
4340
|
+
payment_method: ((p = (r = m.transactions) == null ? void 0 : r[T]) == null ? void 0 : p.payment_method) || "-",
|
|
4341
|
+
payment_term: ((U = m == null ? void 0 : m.payment_term) == null ? void 0 : U.name) || ""
|
|
4342
4342
|
};
|
|
4343
4343
|
}
|
|
4344
4344
|
return a;
|
|
@@ -4418,32 +4418,32 @@ const Ds = [
|
|
|
4418
4418
|
];
|
|
4419
4419
|
function Ks(g) {
|
|
4420
4420
|
return g.reduce((a, e) => {
|
|
4421
|
-
var
|
|
4422
|
-
const { invoice:
|
|
4423
|
-
a[
|
|
4424
|
-
invoice_date:
|
|
4425
|
-
ref_num: e.isRefund && e.credit_notes && e.credit_notes.length > 0 ? ((
|
|
4426
|
-
total:
|
|
4427
|
-
item_code: (w =
|
|
4428
|
-
item_description: (x =
|
|
4429
|
-
item_price: (c =
|
|
4430
|
-
item_tax_label: ((
|
|
4431
|
-
item_tax_amount: ((R =
|
|
4432
|
-
service_charge_amount: ((
|
|
4433
|
-
rounding:
|
|
4434
|
-
payment_term_id:
|
|
4421
|
+
var I, w, x, c, k, R, C, f, i, _, $, d, s, v;
|
|
4422
|
+
const { invoice: m, payments: y } = e, F = a.length;
|
|
4423
|
+
a[F] = {
|
|
4424
|
+
invoice_date: m.invoice_date,
|
|
4425
|
+
ref_num: e.isRefund && e.credit_notes && e.credit_notes.length > 0 ? ((I = e.credit_notes[0]) == null ? void 0 : I.ref_num) ?? m.ref_num : m.ref_num,
|
|
4426
|
+
total: m.total,
|
|
4427
|
+
item_code: (w = m.items[0]) == null ? void 0 : w.code,
|
|
4428
|
+
item_description: (x = m.items[0]) == null ? void 0 : x.description,
|
|
4429
|
+
item_price: (c = m.items[0]) == null ? void 0 : c.price,
|
|
4430
|
+
item_tax_label: ((k = m.items[0]) == null ? void 0 : k.tax_label) ?? "",
|
|
4431
|
+
item_tax_amount: ((R = m.items[0]) == null ? void 0 : R.total_tax) ?? "",
|
|
4432
|
+
service_charge_amount: ((C = m.service_charges[0]) == null ? void 0 : C.total) ?? "",
|
|
4433
|
+
rounding: m.rounding ?? 0,
|
|
4434
|
+
payment_term_id: m.payment_term.name ?? "",
|
|
4435
4435
|
payment_term_amount: ((i = (f = y[0]) == null ? void 0 : f.ids[0]) == null ? void 0 : i.amount) ?? "",
|
|
4436
4436
|
payment_method: ((_ = y[0]) == null ? void 0 : _.payment_method_name) || ""
|
|
4437
4437
|
};
|
|
4438
4438
|
const D = Math.max(
|
|
4439
|
-
(($ =
|
|
4440
|
-
((d =
|
|
4439
|
+
(($ = m.items) == null ? void 0 : $.length) || 0,
|
|
4440
|
+
((d = m.terms) == null ? void 0 : d.length) || 0,
|
|
4441
4441
|
(y == null ? void 0 : y.length) || 0
|
|
4442
4442
|
);
|
|
4443
4443
|
for (let n = 1; n < D; n++) {
|
|
4444
|
-
const o =
|
|
4444
|
+
const o = F + n;
|
|
4445
4445
|
a[o] || (a[o] = {});
|
|
4446
|
-
const h =
|
|
4446
|
+
const h = m.items[n], r = y[n];
|
|
4447
4447
|
h ? a[o] = {
|
|
4448
4448
|
...a[o],
|
|
4449
4449
|
item_code: h.code,
|
|
@@ -4451,12 +4451,12 @@ function Ks(g) {
|
|
|
4451
4451
|
item_price: h.total,
|
|
4452
4452
|
item_tax_label: h.tax_label == "?" ? "" : h.tax_label ?? "",
|
|
4453
4453
|
item_tax_amount: h.total_tax ?? "",
|
|
4454
|
-
payment_term_id:
|
|
4454
|
+
payment_term_id: m.payment_term.name ?? "",
|
|
4455
4455
|
payment_term_amount: ((s = r == null ? void 0 : r.ids[0]) == null ? void 0 : s.amount) ?? "",
|
|
4456
4456
|
payment_method: (r == null ? void 0 : r.payment_method_name) || ""
|
|
4457
4457
|
} : a[o] = {
|
|
4458
4458
|
...a[o],
|
|
4459
|
-
payment_term_id:
|
|
4459
|
+
payment_term_id: m.payment_term.name ?? "",
|
|
4460
4460
|
payment_term_amount: ((v = r == null ? void 0 : r.ids[0]) == null ? void 0 : v.amount) ?? "",
|
|
4461
4461
|
payment_method: (r == null ? void 0 : r.payment_method_name) || ""
|
|
4462
4462
|
};
|
|
@@ -4541,24 +4541,24 @@ const Fs = [
|
|
|
4541
4541
|
},
|
|
4542
4542
|
emits: ["update:modelValue"],
|
|
4543
4543
|
setup(g) {
|
|
4544
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
4544
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = W(!1), y = Se(), { dateRange: F } = Ge($e()), D = W([]);
|
|
4545
4545
|
Ke(
|
|
4546
|
-
() =>
|
|
4546
|
+
() => F.value,
|
|
4547
4547
|
async () => {
|
|
4548
4548
|
if (e.value._id)
|
|
4549
4549
|
try {
|
|
4550
|
-
|
|
4550
|
+
m.value = !0, D.value = await qe(e.value._id);
|
|
4551
4551
|
} catch (c) {
|
|
4552
4552
|
y.open({ message: c.message, type: "error" });
|
|
4553
4553
|
} finally {
|
|
4554
|
-
|
|
4554
|
+
m.value = !1;
|
|
4555
4555
|
}
|
|
4556
4556
|
},
|
|
4557
4557
|
{
|
|
4558
4558
|
immediate: !0
|
|
4559
4559
|
}
|
|
4560
4560
|
);
|
|
4561
|
-
const
|
|
4561
|
+
const I = Y(() => {
|
|
4562
4562
|
switch (e.value.platform.mappings.version) {
|
|
4563
4563
|
case "v1":
|
|
4564
4564
|
return Vs(D.value);
|
|
@@ -4577,36 +4577,36 @@ const Fs = [
|
|
|
4577
4577
|
});
|
|
4578
4578
|
async function x() {
|
|
4579
4579
|
try {
|
|
4580
|
-
e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (
|
|
4580
|
+
e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (m.value = !0, await ot(e.value._id), y.open({ message: "Upload successful", type: "success" })) : y.open({ message: "Invalid accounting setting", type: "error" });
|
|
4581
4581
|
} catch (c) {
|
|
4582
|
-
c.message && y.open({ message: c.message, type: "error" }), Array.isArray(c.errors) ? c.errors.forEach((
|
|
4582
|
+
c.message && y.open({ message: c.message, type: "error" }), Array.isArray(c.errors) ? c.errors.forEach((k) => y.open({ message: String(k), type: "error" })) : typeof c.errors == "string" && y.open({ message: c.errors, type: "error" });
|
|
4583
4583
|
} finally {
|
|
4584
|
-
|
|
4584
|
+
m.value = !1;
|
|
4585
4585
|
}
|
|
4586
4586
|
}
|
|
4587
|
-
return (c,
|
|
4588
|
-
const R = K("FmButton"),
|
|
4587
|
+
return (c, k) => {
|
|
4588
|
+
const R = K("FmButton"), C = K("FmCircularProgress"), f = K("FmTable");
|
|
4589
4589
|
return b(), N("div", Is, [
|
|
4590
4590
|
t("div", Ts, [
|
|
4591
4591
|
l(Qe, {
|
|
4592
|
-
"date-range":
|
|
4593
|
-
"onUpdate:dateRange":
|
|
4592
|
+
"date-range": u(F),
|
|
4593
|
+
"onUpdate:dateRange": k[0] || (k[0] = (i) => Me(F) ? F.value = i : null),
|
|
4594
4594
|
compare: !1
|
|
4595
4595
|
}, null, 8, ["date-range"]),
|
|
4596
4596
|
l(R, {
|
|
4597
|
-
loading:
|
|
4597
|
+
loading: m.value,
|
|
4598
4598
|
variant: "primary",
|
|
4599
4599
|
label: "Upload",
|
|
4600
4600
|
onClick: x
|
|
4601
4601
|
}, null, 8, ["loading"])
|
|
4602
4602
|
]),
|
|
4603
|
-
|
|
4604
|
-
l(
|
|
4605
|
-
t("span", Us, S(
|
|
4603
|
+
m.value ? (b(), N("div", Rs, [
|
|
4604
|
+
l(C, { size: "xl" }),
|
|
4605
|
+
t("span", Us, S(u(a)("report.common.isLoading")), 1)
|
|
4606
4606
|
])) : (b(), O(f, {
|
|
4607
4607
|
key: 1,
|
|
4608
4608
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
4609
|
-
"row-data":
|
|
4609
|
+
"row-data": I.value,
|
|
4610
4610
|
"column-defs": w.value
|
|
4611
4611
|
}, null, 8, ["row-data", "column-defs"]))
|
|
4612
4612
|
]);
|
|
@@ -4622,7 +4622,7 @@ const Fs = [
|
|
|
4622
4622
|
}),
|
|
4623
4623
|
emits: ["update:modelValue"],
|
|
4624
4624
|
setup(g) {
|
|
4625
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
4625
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = g, y = W("setting"), F = [
|
|
4626
4626
|
{
|
|
4627
4627
|
label: a("report.integration.setting"),
|
|
4628
4628
|
value: "setting",
|
|
@@ -4633,7 +4633,7 @@ const Fs = [
|
|
|
4633
4633
|
value: "preview",
|
|
4634
4634
|
icon: "table"
|
|
4635
4635
|
}
|
|
4636
|
-
], D = Ce(),
|
|
4636
|
+
], D = Ce(), I = Y(() => {
|
|
4637
4637
|
switch (y.value) {
|
|
4638
4638
|
case "preview":
|
|
4639
4639
|
return {
|
|
@@ -4645,7 +4645,7 @@ const Fs = [
|
|
|
4645
4645
|
props: {
|
|
4646
4646
|
retrievedMethods: w.value,
|
|
4647
4647
|
retrievedCustomers: x.value,
|
|
4648
|
-
errorLogs:
|
|
4648
|
+
errorLogs: m.errorLogs
|
|
4649
4649
|
}
|
|
4650
4650
|
};
|
|
4651
4651
|
default:
|
|
@@ -4655,7 +4655,7 @@ const Fs = [
|
|
|
4655
4655
|
label: _.length > 2 ? `ID:${$[_[2]]} [${$[_[0]]}] ${$[_[1]]}` : `[${$[_[0]]}] ${$[_[1]]}`,
|
|
4656
4656
|
value: $.id,
|
|
4657
4657
|
cnId: $.cnId ? $.cnId : null
|
|
4658
|
-
})),
|
|
4658
|
+
})), k = (i) => c(i, ["wallet", "name"]), R = (i) => c(i, ["id", "name"]), C = async (i, _, $, d) => {
|
|
4659
4659
|
try {
|
|
4660
4660
|
const s = await i(e.value._id);
|
|
4661
4661
|
$.value.data = _(s);
|
|
@@ -4666,12 +4666,12 @@ const Fs = [
|
|
|
4666
4666
|
}
|
|
4667
4667
|
}, f = async () => {
|
|
4668
4668
|
var i, _;
|
|
4669
|
-
(i = e.value.platform.mappings) != null && i.version && await
|
|
4669
|
+
(i = e.value.platform.mappings) != null && i.version && await C(
|
|
4670
4670
|
xt,
|
|
4671
|
-
|
|
4671
|
+
k,
|
|
4672
4672
|
w,
|
|
4673
4673
|
"Failed to fetch payment methods:"
|
|
4674
|
-
), ((_ = e.value.platform.mappings) == null ? void 0 : _.version) == "v2" && await
|
|
4674
|
+
), ((_ = e.value.platform.mappings) == null ? void 0 : _.version) == "v2" && await C(
|
|
4675
4675
|
bt,
|
|
4676
4676
|
R,
|
|
4677
4677
|
x,
|
|
@@ -4689,7 +4689,7 @@ const Fs = [
|
|
|
4689
4689
|
title: ((s = e.value) == null ? void 0 : s.name) || "Biztory",
|
|
4690
4690
|
"back-button": !0,
|
|
4691
4691
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
4692
|
-
"onClick:back": _[0] || (_[0] = (o) =>
|
|
4692
|
+
"onClick:back": _[0] || (_[0] = (o) => u(D).push({ name: "integrations" }))
|
|
4693
4693
|
}, {
|
|
4694
4694
|
description: ke(() => _[3] || (_[3] = [
|
|
4695
4695
|
t("div", null, null, -1)
|
|
@@ -4699,13 +4699,13 @@ const Fs = [
|
|
|
4699
4699
|
l(d, {
|
|
4700
4700
|
"model-value": y.value,
|
|
4701
4701
|
"onUpdate:modelValue": _[1] || (_[1] = (o) => y.value = o),
|
|
4702
|
-
items:
|
|
4702
|
+
items: F
|
|
4703
4703
|
}, null, 8, ["model-value"]),
|
|
4704
4704
|
t("div", Ps, [
|
|
4705
|
-
(b(), O(Pe((v =
|
|
4705
|
+
(b(), O(Pe((v = I.value) == null ? void 0 : v.component), tt({
|
|
4706
4706
|
modelValue: e.value,
|
|
4707
4707
|
"onUpdate:modelValue": _[2] || (_[2] = (o) => e.value = o)
|
|
4708
|
-
}, (n =
|
|
4708
|
+
}, (n = I.value) == null ? void 0 : n.props), null, 16, ["modelValue"]))
|
|
4709
4709
|
])
|
|
4710
4710
|
]);
|
|
4711
4711
|
};
|
|
@@ -4721,7 +4721,7 @@ const Fs = [
|
|
|
4721
4721
|
},
|
|
4722
4722
|
emits: ["update:modelValue"],
|
|
4723
4723
|
setup(g) {
|
|
4724
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
4724
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = Se(), y = Re(), F = Ce(), { promptLoader: D } = ze(), { promptMessage: I } = He(), { restaurants: w } = $e(), { rules: x, notifyUnauthorized: c } = je(), k = Y(
|
|
4725
4725
|
() => w.map(($) => ({ label: $.name, value: $.id }))
|
|
4726
4726
|
);
|
|
4727
4727
|
async function R() {
|
|
@@ -4735,18 +4735,18 @@ const Fs = [
|
|
|
4735
4735
|
c(Z.delete);
|
|
4736
4736
|
return;
|
|
4737
4737
|
}
|
|
4738
|
-
await
|
|
4738
|
+
await I({
|
|
4739
4739
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
4740
4740
|
title: a("report.common.delete")
|
|
4741
4741
|
}) && await D(async () => {
|
|
4742
4742
|
try {
|
|
4743
|
-
await Be(e.value._id), await y.getSettings(),
|
|
4743
|
+
await Be(e.value._id), await y.getSettings(), F.back();
|
|
4744
4744
|
} catch (n) {
|
|
4745
|
-
|
|
4745
|
+
m.open({ type: "error", message: n.message });
|
|
4746
4746
|
}
|
|
4747
4747
|
});
|
|
4748
4748
|
}
|
|
4749
|
-
async function
|
|
4749
|
+
async function C() {
|
|
4750
4750
|
var s;
|
|
4751
4751
|
const $ = (s = e.value.platform) == null ? void 0 : s.locationIds;
|
|
4752
4752
|
if (_e({
|
|
@@ -4761,7 +4761,7 @@ const Fs = [
|
|
|
4761
4761
|
try {
|
|
4762
4762
|
await Ye(e.value._id, e.value), await y.getSettings();
|
|
4763
4763
|
} catch (v) {
|
|
4764
|
-
|
|
4764
|
+
m.open({ type: "error", message: v.message });
|
|
4765
4765
|
}
|
|
4766
4766
|
});
|
|
4767
4767
|
}
|
|
@@ -4788,16 +4788,16 @@ const Fs = [
|
|
|
4788
4788
|
try {
|
|
4789
4789
|
await Ne(e.value._id), await y.getSettings();
|
|
4790
4790
|
} catch ($) {
|
|
4791
|
-
|
|
4791
|
+
m.open({ type: "error", message: $.message });
|
|
4792
4792
|
}
|
|
4793
4793
|
});
|
|
4794
4794
|
}
|
|
4795
4795
|
return Oe(async () => {
|
|
4796
4796
|
await y.getSettings();
|
|
4797
4797
|
}), ($, d) => {
|
|
4798
|
-
var r,
|
|
4798
|
+
var r, p, U, T, P;
|
|
4799
4799
|
const s = K("FmIcon"), v = K("FmButton"), n = K("FmMenuDivider"), o = K("FmTextField"), h = K("FmSelect");
|
|
4800
|
-
return (
|
|
4800
|
+
return (p = (r = e.value) == null ? void 0 : r.platform) != null && p.mappings ? (b(), N("div", Ls, [
|
|
4801
4801
|
t("div", Es, [
|
|
4802
4802
|
t("div", Os, [
|
|
4803
4803
|
d[6] || (d[6] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
@@ -4808,18 +4808,18 @@ const Fs = [
|
|
|
4808
4808
|
class: "p-2 bg-gray-100 rounded-full",
|
|
4809
4809
|
onClick: _
|
|
4810
4810
|
}),
|
|
4811
|
-
t("span", qs, S(
|
|
4811
|
+
t("span", qs, S(u(a)("report.integration.refreshSetting")), 1)
|
|
4812
4812
|
]),
|
|
4813
4813
|
l(v, {
|
|
4814
4814
|
variant: "tertiary",
|
|
4815
|
-
label:
|
|
4815
|
+
label: u(a)("report.common.delete"),
|
|
4816
4816
|
onClick: R
|
|
4817
4817
|
}, null, 8, ["label"]),
|
|
4818
4818
|
l(v, {
|
|
4819
4819
|
variant: "primary",
|
|
4820
|
-
label:
|
|
4820
|
+
label: u(a)("report.common.update"),
|
|
4821
4821
|
"prepend-icon": "update",
|
|
4822
|
-
onClick:
|
|
4822
|
+
onClick: C
|
|
4823
4823
|
}, null, 8, ["label"])
|
|
4824
4824
|
])
|
|
4825
4825
|
])
|
|
@@ -4828,9 +4828,9 @@ const Fs = [
|
|
|
4828
4828
|
t("div", zs, [
|
|
4829
4829
|
t("div", Hs, [
|
|
4830
4830
|
t("div", Gs, [
|
|
4831
|
-
t("div", Qs, S(
|
|
4831
|
+
t("div", Qs, S(u(a)("report.integration.general")), 1),
|
|
4832
4832
|
t("div", Xs, [
|
|
4833
|
-
t("div", Ws, S(
|
|
4833
|
+
t("div", Ws, S(u(a)("report.common.name")), 1),
|
|
4834
4834
|
t("div", Js, [
|
|
4835
4835
|
l(o, {
|
|
4836
4836
|
modelValue: e.value.name,
|
|
@@ -4839,11 +4839,11 @@ const Fs = [
|
|
|
4839
4839
|
])
|
|
4840
4840
|
]),
|
|
4841
4841
|
t("div", Zs, [
|
|
4842
|
-
t("div", er, S(
|
|
4842
|
+
t("div", er, S(u(a)("report.integration.location")), 1),
|
|
4843
4843
|
l(h, {
|
|
4844
4844
|
"model-value": e.value.platform.locationIds[0],
|
|
4845
4845
|
multiselect: !1,
|
|
4846
|
-
items:
|
|
4846
|
+
items: k.value,
|
|
4847
4847
|
placeholder: "Select location",
|
|
4848
4848
|
class: "flex-grow",
|
|
4849
4849
|
"onUpdate:modelValue": d[1] || (d[1] = (z) => e.value.platform.locationIds[0] = z)
|
|
@@ -4854,12 +4854,12 @@ const Fs = [
|
|
|
4854
4854
|
l(Ee, {
|
|
4855
4855
|
modelValue: e.value.platform,
|
|
4856
4856
|
"onUpdate:modelValue": d[2] || (d[2] = (z) => e.value.platform = z),
|
|
4857
|
-
label:
|
|
4857
|
+
label: u(a)("report.input.email"),
|
|
4858
4858
|
"is-auto-email-mode": !0
|
|
4859
4859
|
}, null, 8, ["modelValue", "label"]),
|
|
4860
4860
|
l(n, { style: { margin: 0 } }),
|
|
4861
4861
|
t("div", tr, [
|
|
4862
|
-
t("div", or, S(
|
|
4862
|
+
t("div", or, S(u(a)("report.integration.iflexiHrms.employee")), 1),
|
|
4863
4863
|
l(v, {
|
|
4864
4864
|
variant: "secondary",
|
|
4865
4865
|
"prepend-icon": "add",
|
|
@@ -4900,7 +4900,7 @@ const Fs = [
|
|
|
4900
4900
|
},
|
|
4901
4901
|
emits: ["update:modelValue"],
|
|
4902
4902
|
setup(g) {
|
|
4903
|
-
const { t: a } = se(), e = W([]),
|
|
4903
|
+
const { t: a } = se(), e = W([]), m = [
|
|
4904
4904
|
{
|
|
4905
4905
|
accessorKey: "name",
|
|
4906
4906
|
header: () => V("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Name"),
|
|
@@ -4926,17 +4926,17 @@ const Fs = [
|
|
|
4926
4926
|
header: () => V("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
|
|
4927
4927
|
enableSorting: !1
|
|
4928
4928
|
}
|
|
4929
|
-
], y = ne(g, "modelValue"),
|
|
4929
|
+
], y = ne(g, "modelValue"), F = W(!1), D = Se(), { dateRange: I } = Ge($e());
|
|
4930
4930
|
Ke(
|
|
4931
|
-
() =>
|
|
4931
|
+
() => I.value,
|
|
4932
4932
|
async () => {
|
|
4933
4933
|
if (y.value._id)
|
|
4934
4934
|
try {
|
|
4935
|
-
|
|
4935
|
+
F.value = !0, e.value = await qe(y.value._id);
|
|
4936
4936
|
} catch (x) {
|
|
4937
4937
|
D.open({ message: x.message, type: "error" });
|
|
4938
4938
|
} finally {
|
|
4939
|
-
|
|
4939
|
+
F.value = !1;
|
|
4940
4940
|
}
|
|
4941
4941
|
},
|
|
4942
4942
|
{
|
|
@@ -4945,42 +4945,42 @@ const Fs = [
|
|
|
4945
4945
|
);
|
|
4946
4946
|
async function w() {
|
|
4947
4947
|
try {
|
|
4948
|
-
y.value._id ? (
|
|
4948
|
+
y.value._id ? (F.value = !0, await at(y.value._id)) : D.open({ message: "Invalid setting", type: "error" });
|
|
4949
4949
|
} catch (x) {
|
|
4950
4950
|
x.message && D.open({ message: x.message, type: "error" }), Array.isArray(x.errors) ? x.errors.forEach((c) => D.open({ message: String(c), type: "error" })) : typeof x.errors == "string" && D.open({ message: x.errors, type: "error" });
|
|
4951
4951
|
} finally {
|
|
4952
|
-
|
|
4952
|
+
F.value = !1;
|
|
4953
4953
|
}
|
|
4954
4954
|
}
|
|
4955
4955
|
return (x, c) => {
|
|
4956
|
-
const
|
|
4956
|
+
const k = K("FmButton"), R = K("FmCircularProgress"), C = K("FmTable");
|
|
4957
4957
|
return b(), N("div", lr, [
|
|
4958
4958
|
t("div", nr, [
|
|
4959
4959
|
l(Qe, {
|
|
4960
|
-
"date-range":
|
|
4961
|
-
"onUpdate:dateRange": c[0] || (c[0] = (f) => Me(
|
|
4960
|
+
"date-range": u(I),
|
|
4961
|
+
"onUpdate:dateRange": c[0] || (c[0] = (f) => Me(I) ? I.value = f : null),
|
|
4962
4962
|
compare: !1
|
|
4963
4963
|
}, null, 8, ["date-range"]),
|
|
4964
|
-
l(
|
|
4965
|
-
loading:
|
|
4964
|
+
l(k, {
|
|
4965
|
+
loading: F.value,
|
|
4966
4966
|
variant: "primary",
|
|
4967
|
-
label:
|
|
4967
|
+
label: u(a)("report.common.download"),
|
|
4968
4968
|
onClick: w
|
|
4969
4969
|
}, null, 8, ["loading", "label"])
|
|
4970
4970
|
]),
|
|
4971
|
-
|
|
4971
|
+
F.value ? (b(), N("div", sr, [
|
|
4972
4972
|
l(R, { size: "xl" }),
|
|
4973
|
-
t("span", rr, S(
|
|
4974
|
-
])) : e.value.length > 0 ? (b(), O(
|
|
4973
|
+
t("span", rr, S(u(a)("report.common.isLoading")), 1)
|
|
4974
|
+
])) : e.value.length > 0 ? (b(), O(C, {
|
|
4975
4975
|
key: 1,
|
|
4976
4976
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
4977
4977
|
"row-data": e.value,
|
|
4978
|
-
"column-defs":
|
|
4978
|
+
"column-defs": m
|
|
4979
4979
|
}, null, 8, ["row-data"])) : B("", !0)
|
|
4980
4980
|
]);
|
|
4981
4981
|
};
|
|
4982
4982
|
}
|
|
4983
|
-
}), dr = { class: "h-full relative flex flex-col" }, mr = { class: "py-16 px-16 overflow-hidden flex-grow relative" },
|
|
4983
|
+
}), dr = { class: "h-full relative flex flex-col" }, mr = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, ur = /* @__PURE__ */ te({
|
|
4984
4984
|
__name: "IFlexiHRMS",
|
|
4985
4985
|
props: {
|
|
4986
4986
|
modelValue: {},
|
|
@@ -4988,7 +4988,7 @@ const Fs = [
|
|
|
4988
4988
|
},
|
|
4989
4989
|
emits: ["update:modelValue"],
|
|
4990
4990
|
setup(g) {
|
|
4991
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
4991
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = W("setting"), y = [
|
|
4992
4992
|
{
|
|
4993
4993
|
label: a("report.integration.setting"),
|
|
4994
4994
|
value: "setting",
|
|
@@ -4999,8 +4999,8 @@ const Fs = [
|
|
|
4999
4999
|
value: "preview",
|
|
5000
5000
|
icon: "table"
|
|
5001
5001
|
}
|
|
5002
|
-
],
|
|
5003
|
-
switch (
|
|
5002
|
+
], F = Ce(), D = Y(() => {
|
|
5003
|
+
switch (m.value) {
|
|
5004
5004
|
case "preview":
|
|
5005
5005
|
return ir;
|
|
5006
5006
|
case "setting":
|
|
@@ -5009,15 +5009,15 @@ const Fs = [
|
|
|
5009
5009
|
return null;
|
|
5010
5010
|
}
|
|
5011
5011
|
});
|
|
5012
|
-
return (
|
|
5013
|
-
var
|
|
5012
|
+
return (I, w) => {
|
|
5013
|
+
var k;
|
|
5014
5014
|
const x = K("FmPageHead"), c = K("FmTabs");
|
|
5015
5015
|
return b(), N("div", dr, [
|
|
5016
5016
|
l(x, {
|
|
5017
|
-
title: ((
|
|
5017
|
+
title: ((k = e.value) == null ? void 0 : k.name) || "AutoCount",
|
|
5018
5018
|
"back-button": !0,
|
|
5019
5019
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
5020
|
-
"onClick:back": w[0] || (w[0] = (R) =>
|
|
5020
|
+
"onClick:back": w[0] || (w[0] = (R) => u(F).push({ name: "integrations" }))
|
|
5021
5021
|
}, {
|
|
5022
5022
|
description: ke(() => w[3] || (w[3] = [
|
|
5023
5023
|
t("div", null, null, -1)
|
|
@@ -5025,8 +5025,8 @@ const Fs = [
|
|
|
5025
5025
|
_: 1
|
|
5026
5026
|
}, 8, ["title"]),
|
|
5027
5027
|
l(c, {
|
|
5028
|
-
"model-value":
|
|
5029
|
-
"onUpdate:modelValue": w[1] || (w[1] = (R) =>
|
|
5028
|
+
"model-value": m.value,
|
|
5029
|
+
"onUpdate:modelValue": w[1] || (w[1] = (R) => m.value = R),
|
|
5030
5030
|
items: y
|
|
5031
5031
|
}, null, 8, ["model-value"]),
|
|
5032
5032
|
t("div", mr, [
|
|
@@ -5038,7 +5038,7 @@ const Fs = [
|
|
|
5038
5038
|
]);
|
|
5039
5039
|
};
|
|
5040
5040
|
}
|
|
5041
|
-
}),
|
|
5041
|
+
}), pr = {
|
|
5042
5042
|
key: 0,
|
|
5043
5043
|
class: "flex flex-col h-full"
|
|
5044
5044
|
}, cr = { class: "flex flex-col gap-16 pb-[24px]" }, fr = { class: "flex flex-row justify-between items-center gap-2" }, gr = { class: "fm-typo-en-title-sm-800" }, vr = { class: "flex flex-row gap-2 items-center" }, yr = { class: "flex flex-row gap-2 items-center" }, xr = { class: "relative group cursor-pointer" }, br = { 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" }, wr = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, hr = { class: "flex flex-col gap-24 w-[90%]" }, _r = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Cr = { class: "flex flex-col gap-24 overflow-y-auto overflow-x-hidden" }, kr = { class: "flex flex-col justify-between" }, $r = { class: "w-[25%] font-semibold" }, Sr = { class: "flex-grow" }, Ar = { class: "flex flex-col justify-between" }, Vr = { class: "w-[25%] font-semibold" }, Dr = { class: "flex-grow" }, Kr = { class: "flex flex-col justify-between" }, Fr = { class: "w-[25%] font-semibold" }, Ir = { class: "flex-grow" }, Tr = { class: "flex flex-col gap-16" }, Rr = { class: "flex flex-row items-center gap-5" }, Ur = { class: "fm-typo-en-title-sm-800" }, Nr = { class: "flex flex-col max-w-[100%]" }, Mr = { class: "w-[25%] font-semibold" }, Pr = { class: "flex-grow" }, jr = { class: "flex flex-col max-w-[100%]" }, Lr = { class: "w-[25%] font-semibold" }, Er = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Or = { class: "flex-grow" }, Br = { class: "flex flex-col max-w-[100%]" }, Yr = { class: "w-[25%] font-semibold" }, qr = { class: "flex flex-col max-w-[100%]" }, zr = { class: "w-[25%] font-semibold" }, Hr = {
|
|
@@ -5053,7 +5053,7 @@ const Fs = [
|
|
|
5053
5053
|
}, Jr = {
|
|
5054
5054
|
key: 2,
|
|
5055
5055
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
5056
|
-
}, Zr = { class: "flex flex-col gap-16" }, ei = { class: "fm-typo-en-title-sm-800" }, ti = { class: "flex flex-row items-center w-[100%] justify-start" }, oi = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ai = { class: "flex flex-row items-center w-[100%] justify-start" }, li = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ni = { class: "flex flex-row items-center w-[100%] justify-start" }, si = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ri = { class: "flex flex-col gap-16 pt-3 pb-3" }, ii = { class: "flex flex-row items-center gap-5" }, di = { class: "fm-typo-en-title-sm-800" }, mi = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" },
|
|
5056
|
+
}, Zr = { class: "flex flex-col gap-16" }, ei = { class: "fm-typo-en-title-sm-800" }, ti = { class: "flex flex-row items-center w-[100%] justify-start" }, oi = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ai = { class: "flex flex-row items-center w-[100%] justify-start" }, li = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ni = { class: "flex flex-row items-center w-[100%] justify-start" }, si = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ri = { class: "flex flex-col gap-16 pt-3 pb-3" }, ii = { class: "flex flex-row items-center gap-5" }, di = { class: "fm-typo-en-title-sm-800" }, mi = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ui = { class: "flex flex-row items-center justify-between gap-x-16" }, pi = { class: "fm-typo-en-title-sm-800" }, ci = { class: "flex flex-row items-center justify-between gap-x-16" }, fi = { class: "fm-typo-en-title-sm-800" }, gi = { class: "flex flex-row items-center justify-between gap-x-16" }, vi = { class: "fm-typo-en-title-sm-800" }, yi = { class: "flex flex-row items-center justify-between gap-x-16" }, xi = { class: "fm-typo-en-title-sm-800" }, bi = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, wi = /* @__PURE__ */ te({
|
|
5057
5057
|
__name: "Setting",
|
|
5058
5058
|
props: /* @__PURE__ */ Ve({
|
|
5059
5059
|
retrievedDebtors: {
|
|
@@ -5074,10 +5074,10 @@ const Fs = [
|
|
|
5074
5074
|
}),
|
|
5075
5075
|
emits: ["update:modelValue"],
|
|
5076
5076
|
setup(g) {
|
|
5077
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
5077
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = Se(), y = Re(), F = Ce(), { promptLoader: D } = ze(), { promptMessage: I } = He(), { restaurants: w } = $e(), { rules: x, notifyUnauthorized: c } = je(), { flags: k } = st(), R = Y(
|
|
5078
5078
|
() => w.map((r) => ({ label: r.name, value: r.id }))
|
|
5079
|
-
),
|
|
5080
|
-
() => !
|
|
5079
|
+
), C = Y(
|
|
5080
|
+
() => !k.some(
|
|
5081
5081
|
(r) => r.key === wt.report_portal_integration_autocount_cloud_api && r.value === !0
|
|
5082
5082
|
)
|
|
5083
5083
|
);
|
|
@@ -5093,14 +5093,14 @@ const Fs = [
|
|
|
5093
5093
|
c(Z.delete);
|
|
5094
5094
|
return;
|
|
5095
5095
|
}
|
|
5096
|
-
await
|
|
5096
|
+
await I({
|
|
5097
5097
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
5098
5098
|
title: a("report.common.delete")
|
|
5099
5099
|
}) && await D(async () => {
|
|
5100
5100
|
try {
|
|
5101
|
-
await Be(e.value._id), await y.getSettings(),
|
|
5101
|
+
await Be(e.value._id), await y.getSettings(), F.back();
|
|
5102
5102
|
} catch (P) {
|
|
5103
|
-
|
|
5103
|
+
m.open({ type: "error", message: P.message });
|
|
5104
5104
|
}
|
|
5105
5105
|
});
|
|
5106
5106
|
}
|
|
@@ -5119,24 +5119,24 @@ const Fs = [
|
|
|
5119
5119
|
try {
|
|
5120
5120
|
await Ye(e.value._id, e.value), await y.getSettings();
|
|
5121
5121
|
} catch (T) {
|
|
5122
|
-
|
|
5122
|
+
m.open({ type: "error", message: T.message });
|
|
5123
5123
|
}
|
|
5124
5124
|
});
|
|
5125
5125
|
}
|
|
5126
|
-
function $(r,
|
|
5126
|
+
function $(r, p) {
|
|
5127
5127
|
var P;
|
|
5128
5128
|
const U = (P = e.value.platform) == null ? void 0 : P.mappings;
|
|
5129
5129
|
if (!U) return;
|
|
5130
5130
|
if (["items", "taxes", "payments", "taxRoundingAdjustments"].includes(r)) {
|
|
5131
5131
|
const z = r;
|
|
5132
5132
|
U[z] && Array.isArray(U[z]) && (U[z] = U[z].filter(
|
|
5133
|
-
(oe, le) => le !==
|
|
5133
|
+
(oe, le) => le !== p
|
|
5134
5134
|
));
|
|
5135
5135
|
}
|
|
5136
5136
|
}
|
|
5137
5137
|
function d(r) {
|
|
5138
|
-
var
|
|
5139
|
-
(U = (
|
|
5138
|
+
var p, U;
|
|
5139
|
+
(U = (p = e.value.platform) == null ? void 0 : p.mappings) != null && U[r] && (e.value.platform.mappings[r] = [
|
|
5140
5140
|
...e.value.platform.mappings[r],
|
|
5141
5141
|
r === "items" ? {
|
|
5142
5142
|
feedmeKey: "",
|
|
@@ -5165,16 +5165,16 @@ const Fs = [
|
|
|
5165
5165
|
try {
|
|
5166
5166
|
await Ne(e.value._id), await y.getSettings();
|
|
5167
5167
|
} catch (r) {
|
|
5168
|
-
|
|
5168
|
+
m.open({ type: "error", message: r.message });
|
|
5169
5169
|
}
|
|
5170
5170
|
});
|
|
5171
5171
|
}
|
|
5172
5172
|
function n({
|
|
5173
5173
|
key: r,
|
|
5174
|
-
value:
|
|
5174
|
+
value: p
|
|
5175
5175
|
}) {
|
|
5176
5176
|
var U, T;
|
|
5177
|
-
(T = (U = e.value) == null ? void 0 : U.platform) != null && T.mappings && (e.value.platform.mappings[r] =
|
|
5177
|
+
(T = (U = e.value) == null ? void 0 : U.platform) != null && T.mappings && (e.value.platform.mappings[r] = p);
|
|
5178
5178
|
}
|
|
5179
5179
|
function o(r) {
|
|
5180
5180
|
return {
|
|
@@ -5186,16 +5186,16 @@ const Fs = [
|
|
|
5186
5186
|
await y.getSettings();
|
|
5187
5187
|
});
|
|
5188
5188
|
function h(r) {
|
|
5189
|
-
const
|
|
5189
|
+
const p = g.retrievedDebtors.data.find(
|
|
5190
5190
|
(U) => U.valueAccNo === r || U.value === r
|
|
5191
5191
|
);
|
|
5192
|
-
|
|
5192
|
+
p && (f.value = r, e.value.platform.mappings.debtorCode = p.valueAccNo, e.value.platform.mappings.debtorName = p.valueCompanyName);
|
|
5193
5193
|
}
|
|
5194
5194
|
return Ke(
|
|
5195
5195
|
() => g.retrievedDebtors.isLoaded,
|
|
5196
5196
|
(r) => {
|
|
5197
|
-
var
|
|
5198
|
-
if (r && ((
|
|
5197
|
+
var p;
|
|
5198
|
+
if (r && ((p = g.retrievedDebtors.data) == null ? void 0 : p.length) > 0) {
|
|
5199
5199
|
const U = g.retrievedDebtors.data.find(
|
|
5200
5200
|
(T) => T.valueAccNo === e.value.platform.mappings.debtorCode
|
|
5201
5201
|
);
|
|
@@ -5203,13 +5203,13 @@ const Fs = [
|
|
|
5203
5203
|
}
|
|
5204
5204
|
},
|
|
5205
5205
|
{ immediate: !0 }
|
|
5206
|
-
), (r,
|
|
5207
|
-
var de, me,
|
|
5206
|
+
), (r, p) => {
|
|
5207
|
+
var de, me, ue, pe, ce, fe, ge, ve, ye, xe, J, M, L, A, j, H, Fe;
|
|
5208
5208
|
const U = K("FmIcon"), T = K("FmButton"), P = K("FmMenuDivider"), z = K("FmTextField"), oe = K("FmSelect"), le = K("FmSwitch"), X = K("FmCircularProgress");
|
|
5209
|
-
return (me = (de = e.value) == null ? void 0 : de.platform) != null && me.mappings ? (b(), N("div",
|
|
5209
|
+
return (me = (de = e.value) == null ? void 0 : de.platform) != null && me.mappings ? (b(), N("div", pr, [
|
|
5210
5210
|
t("div", cr, [
|
|
5211
5211
|
t("div", fr, [
|
|
5212
|
-
t("div", gr, S(
|
|
5212
|
+
t("div", gr, S(u(a)("report.integration.connect")), 1),
|
|
5213
5213
|
t("div", vr, [
|
|
5214
5214
|
t("div", yr, [
|
|
5215
5215
|
t("div", xr, [
|
|
@@ -5218,16 +5218,16 @@ const Fs = [
|
|
|
5218
5218
|
class: "p-2 bg-gray-100 rounded-full",
|
|
5219
5219
|
onClick: v
|
|
5220
5220
|
}),
|
|
5221
|
-
t("span", br, S(
|
|
5221
|
+
t("span", br, S(u(a)("report.integration.refreshSetting")), 1)
|
|
5222
5222
|
]),
|
|
5223
5223
|
l(T, {
|
|
5224
5224
|
variant: "tertiary",
|
|
5225
|
-
label:
|
|
5225
|
+
label: u(a)("report.common.delete"),
|
|
5226
5226
|
onClick: i
|
|
5227
5227
|
}, null, 8, ["label"]),
|
|
5228
5228
|
l(T, {
|
|
5229
5229
|
variant: "primary",
|
|
5230
|
-
label:
|
|
5230
|
+
label: u(a)("report.common.update"),
|
|
5231
5231
|
"prepend-icon": "update",
|
|
5232
5232
|
onClick: _
|
|
5233
5233
|
}, null, 8, ["label"])
|
|
@@ -5237,149 +5237,149 @@ const Fs = [
|
|
|
5237
5237
|
]),
|
|
5238
5238
|
t("div", wr, [
|
|
5239
5239
|
t("div", hr, [
|
|
5240
|
-
t("div", _r, S(
|
|
5240
|
+
t("div", _r, S(u(a)("report.integration.authDescription")), 1),
|
|
5241
5241
|
l(P, { style: { margin: 0 } }),
|
|
5242
5242
|
t("div", Cr, [
|
|
5243
5243
|
t("div", kr, [
|
|
5244
|
-
t("div", $r, S(
|
|
5244
|
+
t("div", $r, S(u(a)("report.integration.autocount.keyId")), 1),
|
|
5245
5245
|
t("div", Sr, [
|
|
5246
5246
|
l(z, {
|
|
5247
5247
|
modelValue: e.value.platform.keyId,
|
|
5248
|
-
"onUpdate:modelValue":
|
|
5249
|
-
placeholder:
|
|
5248
|
+
"onUpdate:modelValue": p[0] || (p[0] = (E) => e.value.platform.keyId = E),
|
|
5249
|
+
placeholder: u(a)("report.integration.autocount.keyId")
|
|
5250
5250
|
}, null, 8, ["modelValue", "placeholder"])
|
|
5251
5251
|
])
|
|
5252
5252
|
]),
|
|
5253
5253
|
t("div", Ar, [
|
|
5254
|
-
t("div", Vr, S(
|
|
5254
|
+
t("div", Vr, S(u(a)("report.integration.apiKey")), 1),
|
|
5255
5255
|
t("div", Dr, [
|
|
5256
5256
|
l(z, {
|
|
5257
5257
|
modelValue: e.value.platform.apiKey,
|
|
5258
|
-
"onUpdate:modelValue":
|
|
5259
|
-
placeholder:
|
|
5258
|
+
"onUpdate:modelValue": p[1] || (p[1] = (E) => e.value.platform.apiKey = E),
|
|
5259
|
+
placeholder: u(a)("report.integration.apiKey")
|
|
5260
5260
|
}, null, 8, ["modelValue", "placeholder"])
|
|
5261
5261
|
])
|
|
5262
5262
|
]),
|
|
5263
5263
|
t("div", Kr, [
|
|
5264
|
-
t("div", Fr, S(
|
|
5264
|
+
t("div", Fr, S(u(a)("report.integration.autocount.accountBookId")), 1),
|
|
5265
5265
|
t("div", Ir, [
|
|
5266
5266
|
l(z, {
|
|
5267
5267
|
modelValue: e.value.platform.accountBookId,
|
|
5268
|
-
"onUpdate:modelValue":
|
|
5269
|
-
placeholder:
|
|
5268
|
+
"onUpdate:modelValue": p[2] || (p[2] = (E) => e.value.platform.accountBookId = E),
|
|
5269
|
+
placeholder: u(a)("report.integration.autocount.accountBookId")
|
|
5270
5270
|
}, null, 8, ["modelValue", "placeholder"])
|
|
5271
5271
|
])
|
|
5272
5272
|
]),
|
|
5273
5273
|
l(P, { style: { margin: 0 } }),
|
|
5274
5274
|
t("div", Tr, [
|
|
5275
5275
|
t("div", Rr, [
|
|
5276
|
-
t("div", Ur, S(
|
|
5276
|
+
t("div", Ur, S(u(a)("report.common.general")), 1)
|
|
5277
5277
|
]),
|
|
5278
5278
|
t("div", Nr, [
|
|
5279
|
-
t("div", Mr, S(
|
|
5279
|
+
t("div", Mr, S(u(a)("report.common.name")), 1),
|
|
5280
5280
|
t("div", Pr, [
|
|
5281
5281
|
l(z, {
|
|
5282
5282
|
modelValue: e.value.name,
|
|
5283
|
-
"onUpdate:modelValue":
|
|
5283
|
+
"onUpdate:modelValue": p[3] || (p[3] = (E) => e.value.name = E)
|
|
5284
5284
|
}, null, 8, ["modelValue"])
|
|
5285
5285
|
])
|
|
5286
5286
|
]),
|
|
5287
5287
|
t("div", jr, [
|
|
5288
|
-
t("div", Lr, S(
|
|
5288
|
+
t("div", Lr, S(u(a)("report.common.location")), 1),
|
|
5289
5289
|
l(oe, {
|
|
5290
5290
|
modelValue: e.value.platform.locationIds,
|
|
5291
|
-
"onUpdate:modelValue":
|
|
5291
|
+
"onUpdate:modelValue": p[4] || (p[4] = (E) => e.value.platform.locationIds = E),
|
|
5292
5292
|
multiselect: !0,
|
|
5293
5293
|
items: R.value,
|
|
5294
|
-
placeholder:
|
|
5294
|
+
placeholder: u(a)("report.common.location"),
|
|
5295
5295
|
class: "flex-grow"
|
|
5296
5296
|
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
5297
5297
|
]),
|
|
5298
5298
|
t("div", Er, [
|
|
5299
|
-
|
|
5299
|
+
p[33] || (p[33] = t("div", { class: "w-[25%] font-semibold" }, "Discount as Item", -1)),
|
|
5300
5300
|
t("div", Or, [
|
|
5301
5301
|
l(le, {
|
|
5302
5302
|
"model-value": e.value.platform.discountItem ?? !1,
|
|
5303
5303
|
style: { gap: 0 },
|
|
5304
|
-
"onUpdate:modelValue":
|
|
5304
|
+
"onUpdate:modelValue": p[5] || (p[5] = (E) => {
|
|
5305
5305
|
e.value.platform.discountItem = E;
|
|
5306
5306
|
})
|
|
5307
5307
|
}, null, 8, ["model-value"])
|
|
5308
5308
|
])
|
|
5309
5309
|
]),
|
|
5310
5310
|
t("div", Br, [
|
|
5311
|
-
t("div", Yr, S(
|
|
5311
|
+
t("div", Yr, S(u(a)("report.integration.grouping.title")), 1),
|
|
5312
5312
|
l(oe, {
|
|
5313
5313
|
modelValue: e.value.platform.grouping,
|
|
5314
|
-
"onUpdate:modelValue":
|
|
5314
|
+
"onUpdate:modelValue": p[6] || (p[6] = (E) => e.value.platform.grouping = E),
|
|
5315
5315
|
multiselect: !1,
|
|
5316
5316
|
items: s,
|
|
5317
|
-
placeholder:
|
|
5317
|
+
placeholder: u(a)("report.integration.grouping.title"),
|
|
5318
5318
|
class: "flex-grow"
|
|
5319
5319
|
}, null, 8, ["modelValue", "placeholder"])
|
|
5320
5320
|
]),
|
|
5321
5321
|
t("div", qr, [
|
|
5322
|
-
t("div", zr, S(
|
|
5322
|
+
t("div", zr, S(u(a)("report.integration.autocount.debtor")), 1),
|
|
5323
5323
|
g.retrievedDebtors.isLoaded ? B("", !0) : (b(), O(X, {
|
|
5324
5324
|
key: 0,
|
|
5325
5325
|
size: "xl"
|
|
5326
5326
|
})),
|
|
5327
|
-
g.retrievedDebtors.isLoaded && g.retrievedDebtors.data && ((
|
|
5327
|
+
g.retrievedDebtors.isLoaded && g.retrievedDebtors.data && ((ue = g.retrievedDebtors.data) == null ? void 0 : ue.length) != 0 && !g.retrievedDebtors.isError ? (b(), N("div", Hr, [
|
|
5328
5328
|
l(oe, {
|
|
5329
|
-
modelValue:
|
|
5329
|
+
modelValue: u(f),
|
|
5330
5330
|
"onUpdate:modelValue": [
|
|
5331
|
-
|
|
5331
|
+
p[7] || (p[7] = (E) => Me(f) ? f.value = E : f = E),
|
|
5332
5332
|
h
|
|
5333
5333
|
],
|
|
5334
5334
|
items: g.retrievedDebtors.data,
|
|
5335
|
-
placeholder:
|
|
5335
|
+
placeholder: u(a)("report.integration.autocount.selectDebtor"),
|
|
5336
5336
|
class: "flex-grow",
|
|
5337
5337
|
disabled: !g.retrievedDebtors.isLoaded
|
|
5338
5338
|
}, null, 8, ["modelValue", "items", "placeholder", "disabled"])
|
|
5339
|
-
])) : g.retrievedDebtors.isError ? (b(), N("div", Gr, S(
|
|
5339
|
+
])) : g.retrievedDebtors.isError ? (b(), N("div", Gr, S(u(a)("report.integration.errorFetchingDebtor")), 1)) : B("", !0)
|
|
5340
5340
|
]),
|
|
5341
5341
|
t("div", Qr, [
|
|
5342
|
-
t("div", Xr, S(
|
|
5342
|
+
t("div", Xr, S(u(a)("report.integration.autocount.location")), 1),
|
|
5343
5343
|
g.retrievedLocations.isLoaded ? B("", !0) : (b(), O(X, {
|
|
5344
5344
|
key: 0,
|
|
5345
5345
|
size: "xl"
|
|
5346
5346
|
})),
|
|
5347
|
-
g.retrievedLocations.isLoaded && g.retrievedLocations.data && ((
|
|
5347
|
+
g.retrievedLocations.isLoaded && g.retrievedLocations.data && ((pe = g.retrievedLocations.data) == null ? void 0 : pe.length) != 0 && !g.retrievedLocations.isError ? (b(), N("div", Wr, [
|
|
5348
5348
|
l(oe, {
|
|
5349
5349
|
modelValue: e.value.platform.mappings.salesLocation,
|
|
5350
|
-
"onUpdate:modelValue":
|
|
5350
|
+
"onUpdate:modelValue": p[8] || (p[8] = (E) => e.value.platform.mappings.salesLocation = E),
|
|
5351
5351
|
items: g.retrievedLocations.data,
|
|
5352
|
-
placeholder:
|
|
5352
|
+
placeholder: u(a)("report.integration.autocount.selectLocation"),
|
|
5353
5353
|
class: "flex-grow",
|
|
5354
5354
|
disabled: !g.retrievedLocations.isLoaded
|
|
5355
5355
|
}, null, 8, ["modelValue", "items", "placeholder", "disabled"])
|
|
5356
|
-
])) : g.retrievedLocations.isError ? (b(), N("div", Jr, S(
|
|
5356
|
+
])) : g.retrievedLocations.isError ? (b(), N("div", Jr, S(u(a)("report.integration.errorFetchingLocation")), 1)) : B("", !0)
|
|
5357
5357
|
])
|
|
5358
5358
|
]),
|
|
5359
5359
|
l(P, { style: { margin: 0 } }),
|
|
5360
5360
|
t("div", Zr, [
|
|
5361
|
-
t("div", ei, S(
|
|
5361
|
+
t("div", ei, S(u(a)("report.integration.autocount.saveAndApprove")), 1),
|
|
5362
5362
|
t("div", ti, [
|
|
5363
|
-
t("div", oi, S(
|
|
5363
|
+
t("div", oi, S(u(a)("report.integration.autocount.invoice")), 1),
|
|
5364
5364
|
l(le, {
|
|
5365
5365
|
modelValue: e.value.platform.mappings.saveApproveInvoice,
|
|
5366
|
-
"onUpdate:modelValue":
|
|
5366
|
+
"onUpdate:modelValue": p[9] || (p[9] = (E) => e.value.platform.mappings.saveApproveInvoice = E),
|
|
5367
5367
|
style: { gap: "0px" }
|
|
5368
5368
|
}, null, 8, ["modelValue"])
|
|
5369
5369
|
]),
|
|
5370
5370
|
t("div", ai, [
|
|
5371
|
-
t("div", li, S(
|
|
5371
|
+
t("div", li, S(u(a)("report.integration.autocount.creditNote")), 1),
|
|
5372
5372
|
l(le, {
|
|
5373
5373
|
modelValue: e.value.platform.mappings.saveApproveCreditNote,
|
|
5374
|
-
"onUpdate:modelValue":
|
|
5374
|
+
"onUpdate:modelValue": p[10] || (p[10] = (E) => e.value.platform.mappings.saveApproveCreditNote = E),
|
|
5375
5375
|
style: { gap: "0px" }
|
|
5376
5376
|
}, null, 8, ["modelValue"])
|
|
5377
5377
|
]),
|
|
5378
5378
|
t("div", ni, [
|
|
5379
|
-
t("div", si, S(
|
|
5379
|
+
t("div", si, S(u(a)("report.integration.autocount.payment")), 1),
|
|
5380
5380
|
l(le, {
|
|
5381
5381
|
modelValue: e.value.platform.mappings.saveApprovePayment,
|
|
5382
|
-
"onUpdate:modelValue":
|
|
5382
|
+
"onUpdate:modelValue": p[11] || (p[11] = (E) => e.value.platform.mappings.saveApprovePayment = E),
|
|
5383
5383
|
style: { gap: "0px" }
|
|
5384
5384
|
}, null, 8, ["modelValue"])
|
|
5385
5385
|
])
|
|
@@ -5387,7 +5387,7 @@ const Fs = [
|
|
|
5387
5387
|
l(P, { style: { margin: 0 } }),
|
|
5388
5388
|
t("div", ri, [
|
|
5389
5389
|
t("div", ii, [
|
|
5390
|
-
t("div", di, S(
|
|
5390
|
+
t("div", di, S(u(a)("report.integration.refNumFormat")), 1),
|
|
5391
5391
|
l(lt)
|
|
5392
5392
|
]),
|
|
5393
5393
|
t("div", mi, [
|
|
@@ -5397,7 +5397,7 @@ const Fs = [
|
|
|
5397
5397
|
account: e.value.platform.mappings.invoiceDocNo
|
|
5398
5398
|
},
|
|
5399
5399
|
options: o("Invoice no"),
|
|
5400
|
-
"onUpdate:modelValue":
|
|
5400
|
+
"onUpdate:modelValue": p[12] || (p[12] = (E) => n({ key: "invoiceDocNo", value: E.account }))
|
|
5401
5401
|
}, null, 8, ["model-value", "options"]),
|
|
5402
5402
|
l(Q, {
|
|
5403
5403
|
"model-value": {
|
|
@@ -5405,7 +5405,7 @@ const Fs = [
|
|
|
5405
5405
|
account: e.value.platform.mappings.creditNoteDocNo
|
|
5406
5406
|
},
|
|
5407
5407
|
options: o("Credit note no"),
|
|
5408
|
-
"onUpdate:modelValue":
|
|
5408
|
+
"onUpdate:modelValue": p[13] || (p[13] = (E) => n({ key: "creditNoteDocNo", value: E.account }))
|
|
5409
5409
|
}, null, 8, ["model-value", "options"]),
|
|
5410
5410
|
l(Q, {
|
|
5411
5411
|
"model-value": {
|
|
@@ -5413,7 +5413,7 @@ const Fs = [
|
|
|
5413
5413
|
account: e.value.platform.mappings.paymentDocNo
|
|
5414
5414
|
},
|
|
5415
5415
|
options: o("Payment no"),
|
|
5416
|
-
"onUpdate:modelValue":
|
|
5416
|
+
"onUpdate:modelValue": p[14] || (p[14] = (E) => n({ key: "paymentDocNo", value: E.account }))
|
|
5417
5417
|
}, null, 8, ["model-value", "options"]),
|
|
5418
5418
|
l(Q, {
|
|
5419
5419
|
"model-value": {
|
|
@@ -5421,36 +5421,36 @@ const Fs = [
|
|
|
5421
5421
|
account: e.value.platform.mappings.refundDocNo
|
|
5422
5422
|
},
|
|
5423
5423
|
options: o("Refund no"),
|
|
5424
|
-
"onUpdate:modelValue":
|
|
5424
|
+
"onUpdate:modelValue": p[15] || (p[15] = (E) => n({ key: "refundDocNo", value: E.account }))
|
|
5425
5425
|
}, null, 8, ["model-value", "options"])
|
|
5426
5426
|
])
|
|
5427
5427
|
]),
|
|
5428
5428
|
l(P, { style: { margin: 0 } }),
|
|
5429
5429
|
l(Ee, {
|
|
5430
5430
|
modelValue: e.value.platform,
|
|
5431
|
-
"onUpdate:modelValue":
|
|
5432
|
-
label:
|
|
5431
|
+
"onUpdate:modelValue": p[16] || (p[16] = (E) => e.value.platform = E),
|
|
5432
|
+
label: C.value ? "email" : "upload",
|
|
5433
5433
|
"last-upload-date": (ce = e.value.platform) == null ? void 0 : ce.lastUploadDate,
|
|
5434
5434
|
"error-logs": g.errorLogs,
|
|
5435
5435
|
"integration-id": e.value._id,
|
|
5436
|
-
"is-auto-email-mode":
|
|
5436
|
+
"is-auto-email-mode": C.value
|
|
5437
5437
|
}, null, 8, ["modelValue", "label", "last-upload-date", "error-logs", "integration-id", "is-auto-email-mode"]),
|
|
5438
5438
|
l(P, { style: { margin: 0 } }),
|
|
5439
|
-
t("div",
|
|
5440
|
-
t("div",
|
|
5439
|
+
t("div", ui, [
|
|
5440
|
+
t("div", pi, S(u(a)("report.integration.biztory.items")), 1),
|
|
5441
5441
|
l(T, {
|
|
5442
5442
|
variant: "secondary",
|
|
5443
5443
|
"prepend-icon": "add",
|
|
5444
5444
|
label: "Add items",
|
|
5445
|
-
onClick:
|
|
5445
|
+
onClick: p[17] || (p[17] = () => d("items"))
|
|
5446
5446
|
})
|
|
5447
5447
|
]),
|
|
5448
|
-
|
|
5448
|
+
p[34] || (p[34] = t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, S("`ROUNDING` items: Auto set `Product Code` to blank to support AutoCount Cloud syncing."), -1)),
|
|
5449
5449
|
l(ee, {
|
|
5450
5450
|
"header-items": [
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5451
|
+
u(a)("report.integration.autocount.feedmeKey"),
|
|
5452
|
+
u(a)("report.integration.autocount.productCode"),
|
|
5453
|
+
u(a)("report.integration.autocount.accountCode")
|
|
5454
5454
|
],
|
|
5455
5455
|
rows: ((ve = (ge = (fe = e.value) == null ? void 0 : fe.platform) == null ? void 0 : ge.mappings) == null ? void 0 : ve.items) || [],
|
|
5456
5456
|
"columns-per-row": 1,
|
|
@@ -5458,38 +5458,38 @@ const Fs = [
|
|
|
5458
5458
|
"mapping-type": "items",
|
|
5459
5459
|
"fields-options": {
|
|
5460
5460
|
feedmeKey: {
|
|
5461
|
-
placeholder:
|
|
5461
|
+
placeholder: u(a)("report.integration.autocount.feedmeKey"),
|
|
5462
5462
|
editable: !0
|
|
5463
5463
|
},
|
|
5464
5464
|
productCode: {
|
|
5465
|
-
placeholder:
|
|
5465
|
+
placeholder: u(a)("report.integration.autocount.productCode"),
|
|
5466
5466
|
editable: !0
|
|
5467
5467
|
},
|
|
5468
5468
|
accountCode: {
|
|
5469
|
-
placeholder:
|
|
5469
|
+
placeholder: u(a)("report.integration.autocount.accountCode"),
|
|
5470
5470
|
editable: !0
|
|
5471
5471
|
}
|
|
5472
5472
|
},
|
|
5473
|
-
onRemove:
|
|
5474
|
-
"onUpdate:rows":
|
|
5473
|
+
onRemove: p[18] || (p[18] = (E, ie) => $(E, ie)),
|
|
5474
|
+
"onUpdate:rows": p[19] || (p[19] = (E) => {
|
|
5475
5475
|
var ie, Ae;
|
|
5476
5476
|
(Ae = (ie = e.value) == null ? void 0 : ie.platform) != null && Ae.mappings && (e.value.platform.mappings.items = E);
|
|
5477
5477
|
})
|
|
5478
5478
|
}, null, 8, ["header-items", "rows", "fields-options"]),
|
|
5479
5479
|
l(P, { style: { margin: 0 } }),
|
|
5480
5480
|
t("div", ci, [
|
|
5481
|
-
t("div", fi, S(
|
|
5481
|
+
t("div", fi, S(u(a)("report.integration.biztory.taxes")), 1),
|
|
5482
5482
|
l(T, {
|
|
5483
5483
|
variant: "secondary",
|
|
5484
5484
|
"prepend-icon": "add",
|
|
5485
5485
|
label: "Add taxes",
|
|
5486
|
-
onClick:
|
|
5486
|
+
onClick: p[20] || (p[20] = () => d("taxes"))
|
|
5487
5487
|
})
|
|
5488
5488
|
]),
|
|
5489
5489
|
l(ee, {
|
|
5490
5490
|
"header-items": [
|
|
5491
|
-
|
|
5492
|
-
|
|
5491
|
+
u(a)("report.integration.autocount.feedmeKey"),
|
|
5492
|
+
u(a)("report.integration.autocount.accountCode")
|
|
5493
5493
|
],
|
|
5494
5494
|
rows: ((J = (xe = (ye = e.value) == null ? void 0 : ye.platform) == null ? void 0 : xe.mappings) == null ? void 0 : J.taxes) || [],
|
|
5495
5495
|
"columns-per-row": 2,
|
|
@@ -5497,34 +5497,34 @@ const Fs = [
|
|
|
5497
5497
|
"mapping-type": "taxes",
|
|
5498
5498
|
"fields-options": {
|
|
5499
5499
|
feedmeKey: {
|
|
5500
|
-
placeholder:
|
|
5500
|
+
placeholder: u(a)("report.integration.autocount.feedmeKey"),
|
|
5501
5501
|
editable: !0
|
|
5502
5502
|
},
|
|
5503
5503
|
accountCode: {
|
|
5504
|
-
placeholder:
|
|
5504
|
+
placeholder: u(a)("report.integration.autocount.accountCode"),
|
|
5505
5505
|
editable: !0
|
|
5506
5506
|
}
|
|
5507
5507
|
},
|
|
5508
|
-
onRemove:
|
|
5509
|
-
"onUpdate:rows":
|
|
5508
|
+
onRemove: p[21] || (p[21] = (E, ie) => $(E, ie)),
|
|
5509
|
+
"onUpdate:rows": p[22] || (p[22] = (E) => {
|
|
5510
5510
|
var ie, Ae;
|
|
5511
5511
|
(Ae = (ie = e.value) == null ? void 0 : ie.platform) != null && Ae.mappings && (e.value.platform.mappings.taxes = E);
|
|
5512
5512
|
})
|
|
5513
5513
|
}, null, 8, ["header-items", "rows", "fields-options"]),
|
|
5514
5514
|
l(P, { style: { margin: 0 } }),
|
|
5515
5515
|
t("div", gi, [
|
|
5516
|
-
t("div", vi, S(
|
|
5516
|
+
t("div", vi, S(u(a)("report.integration.taxRoundingAdjustments")), 1),
|
|
5517
5517
|
l(T, {
|
|
5518
5518
|
variant: "secondary",
|
|
5519
5519
|
"prepend-icon": "add",
|
|
5520
5520
|
label: "Add tax rounding adjustments",
|
|
5521
|
-
onClick:
|
|
5521
|
+
onClick: p[23] || (p[23] = () => d("taxRoundingAdjustments"))
|
|
5522
5522
|
})
|
|
5523
5523
|
]),
|
|
5524
5524
|
l(ee, {
|
|
5525
5525
|
"header-items": [
|
|
5526
|
-
|
|
5527
|
-
|
|
5526
|
+
u(a)("report.integration.autocount.feedmeKey"),
|
|
5527
|
+
u(a)("report.integration.autocount.accountCode")
|
|
5528
5528
|
],
|
|
5529
5529
|
rows: ((A = (L = (M = e.value) == null ? void 0 : M.platform) == null ? void 0 : L.mappings) == null ? void 0 : A.taxRoundingAdjustments) || [],
|
|
5530
5530
|
"columns-per-row": 2,
|
|
@@ -5532,28 +5532,28 @@ const Fs = [
|
|
|
5532
5532
|
"mapping-type": "taxRoundingAdjustments",
|
|
5533
5533
|
"fields-options": {
|
|
5534
5534
|
feedmeKey: {
|
|
5535
|
-
placeholder:
|
|
5535
|
+
placeholder: u(a)("report.integration.autocount.feedmeKey"),
|
|
5536
5536
|
editable: !0
|
|
5537
5537
|
},
|
|
5538
5538
|
accountCode: {
|
|
5539
|
-
placeholder:
|
|
5539
|
+
placeholder: u(a)("report.integration.autocount.accountCode"),
|
|
5540
5540
|
editable: !0
|
|
5541
5541
|
}
|
|
5542
5542
|
},
|
|
5543
|
-
onRemove:
|
|
5544
|
-
"onUpdate:rows":
|
|
5543
|
+
onRemove: p[24] || (p[24] = (E, ie) => $(E, ie)),
|
|
5544
|
+
"onUpdate:rows": p[25] || (p[25] = (E) => {
|
|
5545
5545
|
var ie, Ae;
|
|
5546
5546
|
(Ae = (ie = e.value) == null ? void 0 : ie.platform) != null && Ae.mappings && (e.value.platform.mappings.taxRoundingAdjustments = E);
|
|
5547
5547
|
})
|
|
5548
5548
|
}, null, 8, ["header-items", "rows", "fields-options"]),
|
|
5549
5549
|
l(P, { style: { margin: 0 } }),
|
|
5550
5550
|
t("div", yi, [
|
|
5551
|
-
t("div", xi, S(
|
|
5551
|
+
t("div", xi, S(u(a)("report.integration.biztory.payments")), 1),
|
|
5552
5552
|
l(T, {
|
|
5553
5553
|
variant: "secondary",
|
|
5554
5554
|
"prepend-icon": "add",
|
|
5555
5555
|
label: "Add payments",
|
|
5556
|
-
onClick:
|
|
5556
|
+
onClick: p[26] || (p[26] = () => d("payments"))
|
|
5557
5557
|
})
|
|
5558
5558
|
]),
|
|
5559
5559
|
t("div", bi, [
|
|
@@ -5563,7 +5563,7 @@ const Fs = [
|
|
|
5563
5563
|
account: e.value.platform.mappings.creditTerm
|
|
5564
5564
|
},
|
|
5565
5565
|
options: o("creditTerm"),
|
|
5566
|
-
"onUpdate:modelValue":
|
|
5566
|
+
"onUpdate:modelValue": p[27] || (p[27] = (E) => n({ key: "creditTerm", value: E.account }))
|
|
5567
5567
|
}, null, 8, ["model-value", "options"]),
|
|
5568
5568
|
l(Q, {
|
|
5569
5569
|
"model-value": {
|
|
@@ -5571,7 +5571,7 @@ const Fs = [
|
|
|
5571
5571
|
account: e.value.platform.mappings.currencyCode
|
|
5572
5572
|
},
|
|
5573
5573
|
options: o("currencyCode"),
|
|
5574
|
-
"onUpdate:modelValue":
|
|
5574
|
+
"onUpdate:modelValue": p[28] || (p[28] = (E) => n({ key: "currencyCode", value: E.account }))
|
|
5575
5575
|
}, null, 8, ["model-value", "options"]),
|
|
5576
5576
|
l(Q, {
|
|
5577
5577
|
"model-value": {
|
|
@@ -5579,7 +5579,7 @@ const Fs = [
|
|
|
5579
5579
|
account: e.value.platform.mappings.journalType
|
|
5580
5580
|
},
|
|
5581
5581
|
options: o("journalType"),
|
|
5582
|
-
"onUpdate:modelValue":
|
|
5582
|
+
"onUpdate:modelValue": p[29] || (p[29] = (E) => n({ key: "journalType", value: E.account }))
|
|
5583
5583
|
}, null, 8, ["model-value", "options"]),
|
|
5584
5584
|
l(Q, {
|
|
5585
5585
|
"model-value": {
|
|
@@ -5587,14 +5587,14 @@ const Fs = [
|
|
|
5587
5587
|
account: e.value.platform.mappings.currencyRate
|
|
5588
5588
|
},
|
|
5589
5589
|
options: o("currencyRate"),
|
|
5590
|
-
"onUpdate:modelValue":
|
|
5590
|
+
"onUpdate:modelValue": p[30] || (p[30] = (E) => n({ key: "currencyRate", value: E.account }))
|
|
5591
5591
|
}, null, 8, ["model-value", "options"])
|
|
5592
5592
|
]),
|
|
5593
5593
|
l(ee, {
|
|
5594
5594
|
"header-items": [
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5595
|
+
u(a)("report.integration.autocount.feedmeKey"),
|
|
5596
|
+
u(a)("report.integration.autocount.accountCode"),
|
|
5597
|
+
u(a)("report.integration.autocount.paymentMethod")
|
|
5598
5598
|
],
|
|
5599
5599
|
rows: ((Fe = (H = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : H.mappings) == null ? void 0 : Fe.payments) || [],
|
|
5600
5600
|
"columns-per-row": 1,
|
|
@@ -5602,20 +5602,20 @@ const Fs = [
|
|
|
5602
5602
|
"mapping-type": "payments",
|
|
5603
5603
|
"fields-options": {
|
|
5604
5604
|
feedmeKey: {
|
|
5605
|
-
placeholder:
|
|
5605
|
+
placeholder: u(a)("report.integration.autocount.feedmeKey"),
|
|
5606
5606
|
editable: !0
|
|
5607
5607
|
},
|
|
5608
5608
|
accountCode: {
|
|
5609
|
-
placeholder:
|
|
5609
|
+
placeholder: u(a)("report.integration.autocount.accountCode"),
|
|
5610
5610
|
editable: !0
|
|
5611
5611
|
},
|
|
5612
5612
|
paymentName: {
|
|
5613
|
-
placeholder:
|
|
5613
|
+
placeholder: u(a)("report.integration.autocount.paymentMethod"),
|
|
5614
5614
|
editable: !0
|
|
5615
5615
|
}
|
|
5616
5616
|
},
|
|
5617
|
-
onRemove:
|
|
5618
|
-
"onUpdate:rows":
|
|
5617
|
+
onRemove: p[31] || (p[31] = (E, ie) => $(E, ie)),
|
|
5618
|
+
"onUpdate:rows": p[32] || (p[32] = (E) => {
|
|
5619
5619
|
var ie, Ae;
|
|
5620
5620
|
(Ae = (ie = e.value) == null ? void 0 : ie.platform) != null && Ae.mappings && (e.value.platform.mappings.payments = E);
|
|
5621
5621
|
})
|
|
@@ -5629,36 +5629,36 @@ const Fs = [
|
|
|
5629
5629
|
});
|
|
5630
5630
|
function hi(g) {
|
|
5631
5631
|
return g.reduce((a, e) => {
|
|
5632
|
-
var
|
|
5633
|
-
const { invoice:
|
|
5634
|
-
a[
|
|
5635
|
-
docNo:
|
|
5636
|
-
debtorCode:
|
|
5637
|
-
debtorName:
|
|
5638
|
-
itemProductCode: (
|
|
5639
|
-
description: (w =
|
|
5640
|
-
qty: (x =
|
|
5641
|
-
unitPrice: (c =
|
|
5642
|
-
roundAdj:
|
|
5643
|
-
discount: (
|
|
5644
|
-
taxCode: (R =
|
|
5645
|
-
creditTerm:
|
|
5646
|
-
docType: (
|
|
5632
|
+
var I, w, x, c, k, R, C, f, i, _, $, d, s, v;
|
|
5633
|
+
const { invoice: m, payments: y } = e, F = a.length;
|
|
5634
|
+
a[F] = {
|
|
5635
|
+
docNo: m.master.docNo,
|
|
5636
|
+
debtorCode: m.master.debtorCode,
|
|
5637
|
+
debtorName: m.master.debtorName,
|
|
5638
|
+
itemProductCode: (I = m.details[0]) == null ? void 0 : I.productCode,
|
|
5639
|
+
description: (w = m.details[0]) == null ? void 0 : w.description,
|
|
5640
|
+
qty: (x = m.details[0]) == null ? void 0 : x.qty,
|
|
5641
|
+
unitPrice: (c = m.details[0]) == null ? void 0 : c.unitPrice,
|
|
5642
|
+
roundAdj: m.master.roundAdj,
|
|
5643
|
+
discount: (k = m.details[0]) == null ? void 0 : k.discount,
|
|
5644
|
+
taxCode: (R = m.details[0]) == null ? void 0 : R.taxCode,
|
|
5645
|
+
creditTerm: m.master.creditTerm,
|
|
5646
|
+
docType: (C = y[0]) == null ? void 0 : C.master.docType,
|
|
5647
5647
|
paymentMethod: (i = (f = y[0]) == null ? void 0 : f.paymentDetails[0]) == null ? void 0 : i.paymentMethod,
|
|
5648
5648
|
amount: ((_ = y[0]) == null ? void 0 : _.details[0].amount) || 0,
|
|
5649
5649
|
currencyCode: ($ = y[0]) == null ? void 0 : $.master.currencyCode,
|
|
5650
5650
|
journalType: (d = y[0]) == null ? void 0 : d.master.journalType
|
|
5651
5651
|
};
|
|
5652
|
-
const D = Math.max(
|
|
5652
|
+
const D = Math.max(m.details.length, (y == null ? void 0 : y.length) || 0);
|
|
5653
5653
|
for (let n = 1; n < D; n++) {
|
|
5654
|
-
const o =
|
|
5654
|
+
const o = F + n;
|
|
5655
5655
|
a[o] || (a[o] = {});
|
|
5656
|
-
const h =
|
|
5656
|
+
const h = m.details[n], r = y[n];
|
|
5657
5657
|
h && (a[o] = {
|
|
5658
5658
|
...a[o],
|
|
5659
|
-
debtorCode:
|
|
5660
|
-
debtorName:
|
|
5661
|
-
creditTerm:
|
|
5659
|
+
debtorCode: m.master.debtorCode,
|
|
5660
|
+
debtorName: m.master.debtorName,
|
|
5661
|
+
creditTerm: m.master.creditTerm,
|
|
5662
5662
|
itemProductCode: h.productCode,
|
|
5663
5663
|
description: h.description,
|
|
5664
5664
|
qty: h.qty,
|
|
@@ -5667,9 +5667,9 @@ function hi(g) {
|
|
|
5667
5667
|
taxCode: h.taxCode
|
|
5668
5668
|
}), r && (a[o] = {
|
|
5669
5669
|
...a[o],
|
|
5670
|
-
debtorCode:
|
|
5671
|
-
debtorName:
|
|
5672
|
-
creditTerm:
|
|
5670
|
+
debtorCode: m.master.debtorCode,
|
|
5671
|
+
debtorName: m.master.debtorName,
|
|
5672
|
+
creditTerm: m.master.creditTerm,
|
|
5673
5673
|
docType: r.master.docType,
|
|
5674
5674
|
paymentMethod: (s = r.paymentDetails[0]) == null ? void 0 : s.paymentMethod,
|
|
5675
5675
|
amount: ((v = r.details[0]) == null ? void 0 : v.amount) || 0,
|
|
@@ -5767,46 +5767,46 @@ const _i = [
|
|
|
5767
5767
|
},
|
|
5768
5768
|
emits: ["update:modelValue"],
|
|
5769
5769
|
setup(g) {
|
|
5770
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
5770
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = W(!1), y = Se(), { dateRange: F } = Ge($e()), { options: D, isFeatureAvailable: I } = Re(), w = W([]);
|
|
5771
5771
|
Ke(
|
|
5772
|
-
() =>
|
|
5772
|
+
() => F.value,
|
|
5773
5773
|
async () => {
|
|
5774
5774
|
if (e.value._id)
|
|
5775
5775
|
try {
|
|
5776
|
-
|
|
5776
|
+
m.value = !0, w.value = await qe(e.value._id);
|
|
5777
5777
|
} catch (f) {
|
|
5778
5778
|
y.open({ message: f.message, type: "error" });
|
|
5779
5779
|
} finally {
|
|
5780
|
-
|
|
5780
|
+
m.value = !1;
|
|
5781
5781
|
}
|
|
5782
5782
|
},
|
|
5783
5783
|
{
|
|
5784
5784
|
immediate: !0
|
|
5785
5785
|
}
|
|
5786
5786
|
);
|
|
5787
|
-
const x = Y(() => hi(w.value)), c = Y(() => _i),
|
|
5787
|
+
const x = Y(() => hi(w.value)), c = Y(() => _i), k = Y(() => {
|
|
5788
5788
|
var i;
|
|
5789
5789
|
const f = (i = D.find(
|
|
5790
5790
|
(_) => _.platform === Ue.AutoCountCloud
|
|
5791
5791
|
)) == null ? void 0 : i.flags;
|
|
5792
|
-
return f ?
|
|
5792
|
+
return f ? I(f) : !1;
|
|
5793
5793
|
});
|
|
5794
5794
|
async function R() {
|
|
5795
5795
|
try {
|
|
5796
|
-
e.value._id && e.value.platform.apiKey ? (
|
|
5796
|
+
e.value._id && e.value.platform.apiKey ? (m.value = !0, await ot(e.value._id), y.open({ message: a("report.integration.uploadSuccess"), type: "success" })) : y.open({ message: a("report.integration.invalidSetting"), type: "error" });
|
|
5797
5797
|
} catch (f) {
|
|
5798
5798
|
f.message && y.open({ message: f.message, type: "error" }), Array.isArray(f.errors) ? f.errors.forEach((i) => y.open({ message: String(i), type: "error" })) : typeof f.errors == "string" && y.open({ message: f.errors, type: "error" });
|
|
5799
5799
|
} finally {
|
|
5800
|
-
|
|
5800
|
+
m.value = !1;
|
|
5801
5801
|
}
|
|
5802
5802
|
}
|
|
5803
|
-
async function
|
|
5803
|
+
async function C() {
|
|
5804
5804
|
try {
|
|
5805
|
-
e.value._id ? (
|
|
5805
|
+
e.value._id ? (m.value = !0, await at(e.value._id)) : y.open({ message: a("report.integration.invalidSetting"), type: "error" });
|
|
5806
5806
|
} catch (f) {
|
|
5807
5807
|
f.message && y.open({ message: f.message, type: "error" }), Array.isArray(f.errors) ? f.errors.forEach((i) => y.open({ message: String(i), type: "error" })) : typeof f.errors == "string" && y.open({ message: f.errors, type: "error" });
|
|
5808
5808
|
} finally {
|
|
5809
|
-
|
|
5809
|
+
m.value = !1;
|
|
5810
5810
|
}
|
|
5811
5811
|
}
|
|
5812
5812
|
return (f, i) => {
|
|
@@ -5814,29 +5814,29 @@ const _i = [
|
|
|
5814
5814
|
return b(), N("div", Ci, [
|
|
5815
5815
|
t("div", ki, [
|
|
5816
5816
|
l(Qe, {
|
|
5817
|
-
"date-range":
|
|
5818
|
-
"onUpdate:dateRange": i[0] || (i[0] = (s) => Me(
|
|
5817
|
+
"date-range": u(F),
|
|
5818
|
+
"onUpdate:dateRange": i[0] || (i[0] = (s) => Me(F) ? F.value = s : null),
|
|
5819
5819
|
compare: !1
|
|
5820
5820
|
}, null, 8, ["date-range"]),
|
|
5821
5821
|
t("div", $i, [
|
|
5822
|
-
|
|
5822
|
+
k.value ? (b(), O(_, {
|
|
5823
5823
|
key: 0,
|
|
5824
|
-
loading:
|
|
5824
|
+
loading: m.value,
|
|
5825
5825
|
variant: "primary",
|
|
5826
|
-
label:
|
|
5826
|
+
label: u(a)("report.common.upload"),
|
|
5827
5827
|
onClick: R
|
|
5828
5828
|
}, null, 8, ["loading", "label"])) : B("", !0),
|
|
5829
5829
|
l(_, {
|
|
5830
|
-
loading:
|
|
5830
|
+
loading: m.value,
|
|
5831
5831
|
variant: "primary",
|
|
5832
|
-
label:
|
|
5833
|
-
onClick:
|
|
5832
|
+
label: u(a)("report.common.download"),
|
|
5833
|
+
onClick: C
|
|
5834
5834
|
}, null, 8, ["loading", "label"])
|
|
5835
5835
|
])
|
|
5836
5836
|
]),
|
|
5837
|
-
|
|
5837
|
+
m.value ? (b(), N("div", Si, [
|
|
5838
5838
|
l($, { size: "xl" }),
|
|
5839
|
-
t("span", Ai, S(
|
|
5839
|
+
t("span", Ai, S(u(a)("report.common.isLoading")), 1)
|
|
5840
5840
|
])) : (b(), O(d, {
|
|
5841
5841
|
key: 1,
|
|
5842
5842
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
@@ -5856,7 +5856,7 @@ const _i = [
|
|
|
5856
5856
|
}),
|
|
5857
5857
|
emits: ["update:modelValue"],
|
|
5858
5858
|
setup(g) {
|
|
5859
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
5859
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = g, y = W("setting"), F = [
|
|
5860
5860
|
{
|
|
5861
5861
|
label: a("report.integration.setting"),
|
|
5862
5862
|
value: "setting",
|
|
@@ -5867,7 +5867,7 @@ const _i = [
|
|
|
5867
5867
|
value: "preview",
|
|
5868
5868
|
icon: "table"
|
|
5869
5869
|
}
|
|
5870
|
-
], D = Ce(),
|
|
5870
|
+
], D = Ce(), I = Y(() => {
|
|
5871
5871
|
switch (y.value) {
|
|
5872
5872
|
case "preview":
|
|
5873
5873
|
return {
|
|
@@ -5879,7 +5879,7 @@ const _i = [
|
|
|
5879
5879
|
props: {
|
|
5880
5880
|
retrievedLocations: w.value,
|
|
5881
5881
|
retrievedDebtors: x.value,
|
|
5882
|
-
errorLogs:
|
|
5882
|
+
errorLogs: m.errorLogs
|
|
5883
5883
|
}
|
|
5884
5884
|
};
|
|
5885
5885
|
default:
|
|
@@ -5888,7 +5888,7 @@ const _i = [
|
|
|
5888
5888
|
}), w = W({}), x = W({}), c = (f) => f.data.map((i) => ({
|
|
5889
5889
|
label: i.location + " - " + i.description,
|
|
5890
5890
|
value: i.location
|
|
5891
|
-
})),
|
|
5891
|
+
})), k = (f) => f.data.map((i) => ({
|
|
5892
5892
|
label: i.AccNo + " - " + i.CompanyName,
|
|
5893
5893
|
value: i.AccNo + " - " + i.CompanyName,
|
|
5894
5894
|
valueAccNo: i.AccNo,
|
|
@@ -5902,10 +5902,10 @@ const _i = [
|
|
|
5902
5902
|
} finally {
|
|
5903
5903
|
_.value.isLoaded = !0;
|
|
5904
5904
|
}
|
|
5905
|
-
},
|
|
5905
|
+
}, C = async () => {
|
|
5906
5906
|
await R(
|
|
5907
5907
|
ht,
|
|
5908
|
-
|
|
5908
|
+
k,
|
|
5909
5909
|
x,
|
|
5910
5910
|
"Failed to fetch debtors:"
|
|
5911
5911
|
), await R(
|
|
@@ -5916,7 +5916,7 @@ const _i = [
|
|
|
5916
5916
|
), w.value.isLoaded = !0, x.value.isLoaded = !0;
|
|
5917
5917
|
};
|
|
5918
5918
|
return nt(() => {
|
|
5919
|
-
e.value.platform.apiKey && e.value.platform.accountBookId && e.value.platform.keyId ?
|
|
5919
|
+
e.value.platform.apiKey && e.value.platform.accountBookId && e.value.platform.keyId ? C() : (w.value.isLoaded = !0, x.value.isLoaded = !0, w.value.isError = !0, x.value.isError = !0);
|
|
5920
5920
|
}), (f, i) => {
|
|
5921
5921
|
var d, s, v;
|
|
5922
5922
|
const _ = K("FmPageHead"), $ = K("FmTabs");
|
|
@@ -5925,7 +5925,7 @@ const _i = [
|
|
|
5925
5925
|
title: ((d = e.value) == null ? void 0 : d.name) || "Autocount Cloud",
|
|
5926
5926
|
"back-button": !0,
|
|
5927
5927
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
5928
|
-
"onClick:back": i[0] || (i[0] = (n) =>
|
|
5928
|
+
"onClick:back": i[0] || (i[0] = (n) => u(D).push({ name: "integrations" }))
|
|
5929
5929
|
}, {
|
|
5930
5930
|
description: ke(() => i[3] || (i[3] = [
|
|
5931
5931
|
t("div", null, null, -1)
|
|
@@ -5935,13 +5935,13 @@ const _i = [
|
|
|
5935
5935
|
l($, {
|
|
5936
5936
|
"model-value": y.value,
|
|
5937
5937
|
"onUpdate:modelValue": i[1] || (i[1] = (n) => y.value = n),
|
|
5938
|
-
items:
|
|
5938
|
+
items: F
|
|
5939
5939
|
}, null, 8, ["model-value"]),
|
|
5940
5940
|
t("div", Ki, [
|
|
5941
|
-
(b(), O(Pe((s =
|
|
5941
|
+
(b(), O(Pe((s = I.value) == null ? void 0 : s.component), tt({
|
|
5942
5942
|
modelValue: e.value,
|
|
5943
5943
|
"onUpdate:modelValue": i[2] || (i[2] = (n) => e.value = n)
|
|
5944
|
-
}, (v =
|
|
5944
|
+
}, (v = I.value) == null ? void 0 : v.props), null, 16, ["modelValue"]))
|
|
5945
5945
|
])
|
|
5946
5946
|
]);
|
|
5947
5947
|
};
|
|
@@ -5957,7 +5957,7 @@ const _i = [
|
|
|
5957
5957
|
},
|
|
5958
5958
|
emits: ["update:modelValue"],
|
|
5959
5959
|
setup(g) {
|
|
5960
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
5960
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = Se(), y = Re(), F = Ce(), { promptLoader: D } = ze(), { promptMessage: I } = He(), { restaurants: w } = $e(), { rules: x, notifyUnauthorized: c } = je(), k = Y(
|
|
5961
5961
|
() => w.map(($) => ({ label: $.name, value: $.id }))
|
|
5962
5962
|
);
|
|
5963
5963
|
async function R() {
|
|
@@ -5971,18 +5971,18 @@ const _i = [
|
|
|
5971
5971
|
c(Z.delete);
|
|
5972
5972
|
return;
|
|
5973
5973
|
}
|
|
5974
|
-
await
|
|
5974
|
+
await I({
|
|
5975
5975
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
5976
5976
|
title: a("report.common.delete")
|
|
5977
5977
|
}) && await D(async () => {
|
|
5978
5978
|
try {
|
|
5979
|
-
await Be(e.value._id), await y.getSettings(),
|
|
5979
|
+
await Be(e.value._id), await y.getSettings(), F.back();
|
|
5980
5980
|
} catch (n) {
|
|
5981
|
-
|
|
5981
|
+
m.open({ type: "error", message: n.message });
|
|
5982
5982
|
}
|
|
5983
5983
|
});
|
|
5984
5984
|
}
|
|
5985
|
-
async function
|
|
5985
|
+
async function C() {
|
|
5986
5986
|
var s;
|
|
5987
5987
|
const $ = (s = e.value.platform) == null ? void 0 : s.locationIds;
|
|
5988
5988
|
if (_e({
|
|
@@ -5997,7 +5997,7 @@ const _i = [
|
|
|
5997
5997
|
try {
|
|
5998
5998
|
await Ye(e.value._id, e.value), await y.getSettings();
|
|
5999
5999
|
} catch (v) {
|
|
6000
|
-
|
|
6000
|
+
m.open({ type: "error", message: v.message });
|
|
6001
6001
|
}
|
|
6002
6002
|
});
|
|
6003
6003
|
}
|
|
@@ -6022,16 +6022,16 @@ const _i = [
|
|
|
6022
6022
|
try {
|
|
6023
6023
|
await Ne(e.value._id), await y.getSettings();
|
|
6024
6024
|
} catch ($) {
|
|
6025
|
-
|
|
6025
|
+
m.open({ type: "error", message: $.message });
|
|
6026
6026
|
}
|
|
6027
6027
|
});
|
|
6028
6028
|
}
|
|
6029
6029
|
return Oe(async () => {
|
|
6030
6030
|
await y.getSettings();
|
|
6031
6031
|
}), ($, d) => {
|
|
6032
|
-
var r,
|
|
6032
|
+
var r, p, U, T, P, z, oe, le, X, de, me, ue, pe, ce, fe, ge, ve, ye, xe;
|
|
6033
6033
|
const s = K("FmIcon"), v = K("FmButton"), n = K("FmMenuDivider"), o = K("FmTextField"), h = K("FmSelect");
|
|
6034
|
-
return (
|
|
6034
|
+
return (p = (r = e.value) == null ? void 0 : r.platform) != null && p.mappings ? (b(), N("div", Ii, [
|
|
6035
6035
|
t("div", Ti, [
|
|
6036
6036
|
t("div", Ri, [
|
|
6037
6037
|
d[16] || (d[16] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
@@ -6042,18 +6042,18 @@ const _i = [
|
|
|
6042
6042
|
class: "p-2 bg-gray-100 rounded-full",
|
|
6043
6043
|
onClick: _
|
|
6044
6044
|
}),
|
|
6045
|
-
t("span", Mi, S(
|
|
6045
|
+
t("span", Mi, S(u(a)("report.integration.refreshSetting")), 1)
|
|
6046
6046
|
]),
|
|
6047
6047
|
l(v, {
|
|
6048
6048
|
variant: "tertiary",
|
|
6049
|
-
label:
|
|
6049
|
+
label: u(a)("report.common.delete"),
|
|
6050
6050
|
onClick: R
|
|
6051
6051
|
}, null, 8, ["label"]),
|
|
6052
6052
|
l(v, {
|
|
6053
6053
|
variant: "primary",
|
|
6054
|
-
label:
|
|
6054
|
+
label: u(a)("report.common.update"),
|
|
6055
6055
|
"prepend-icon": "update",
|
|
6056
|
-
onClick:
|
|
6056
|
+
onClick: C
|
|
6057
6057
|
}, null, 8, ["label"])
|
|
6058
6058
|
])
|
|
6059
6059
|
])
|
|
@@ -6062,9 +6062,9 @@ const _i = [
|
|
|
6062
6062
|
t("div", Pi, [
|
|
6063
6063
|
t("div", ji, [
|
|
6064
6064
|
t("div", Li, [
|
|
6065
|
-
t("div", Ei, S(
|
|
6065
|
+
t("div", Ei, S(u(a)("report.integration.general")), 1),
|
|
6066
6066
|
t("div", Oi, [
|
|
6067
|
-
t("div", Bi, S(
|
|
6067
|
+
t("div", Bi, S(u(a)("report.common.name")), 1),
|
|
6068
6068
|
t("div", Yi, [
|
|
6069
6069
|
l(o, {
|
|
6070
6070
|
modelValue: e.value.name,
|
|
@@ -6073,12 +6073,12 @@ const _i = [
|
|
|
6073
6073
|
])
|
|
6074
6074
|
]),
|
|
6075
6075
|
t("div", qi, [
|
|
6076
|
-
t("div", zi, S(
|
|
6076
|
+
t("div", zi, S(u(a)("report.integration.location")), 1),
|
|
6077
6077
|
l(h, {
|
|
6078
6078
|
modelValue: e.value.platform.locationIds,
|
|
6079
6079
|
"onUpdate:modelValue": d[1] || (d[1] = (J) => e.value.platform.locationIds = J),
|
|
6080
6080
|
multiselect: !0,
|
|
6081
|
-
items:
|
|
6081
|
+
items: k.value,
|
|
6082
6082
|
placeholder: "Select location",
|
|
6083
6083
|
class: "flex-grow",
|
|
6084
6084
|
rules: [(J) => J.length !== 0 || "Please select at least 1 location"]
|
|
@@ -6158,7 +6158,7 @@ const _i = [
|
|
|
6158
6158
|
onRemove: d[5] || (d[5] = (J, M) => {
|
|
6159
6159
|
var L, A, j, H;
|
|
6160
6160
|
if (((H = (j = (A = (L = e.value) == null ? void 0 : L.platform) == null ? void 0 : A.mappings) == null ? void 0 : j.invoice) == null ? void 0 : H.items[M].key) === "DEFAULT") {
|
|
6161
|
-
m
|
|
6161
|
+
u(m).open({
|
|
6162
6162
|
type: "error",
|
|
6163
6163
|
message: "DEFAULT item cannot be removed."
|
|
6164
6164
|
});
|
|
@@ -6173,7 +6173,7 @@ const _i = [
|
|
|
6173
6173
|
}, null, 8, ["rows"]),
|
|
6174
6174
|
l(n, { style: { margin: 0 } }),
|
|
6175
6175
|
t("div", Xi, [
|
|
6176
|
-
t("div", Wi, S(
|
|
6176
|
+
t("div", Wi, S(u(a)("report.integration.taxes")), 1),
|
|
6177
6177
|
l(v, {
|
|
6178
6178
|
variant: "secondary",
|
|
6179
6179
|
"prepend-icon": "add",
|
|
@@ -6183,7 +6183,7 @@ const _i = [
|
|
|
6183
6183
|
]),
|
|
6184
6184
|
l(ee, {
|
|
6185
6185
|
"header-items": ["Key", "Account Code"],
|
|
6186
|
-
rows: ((
|
|
6186
|
+
rows: ((pe = (ue = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ue.mappings) == null ? void 0 : pe.invoice.taxes) || [],
|
|
6187
6187
|
"columns-per-row": 1,
|
|
6188
6188
|
removable: !0,
|
|
6189
6189
|
"mapping-type": "taxes",
|
|
@@ -6223,7 +6223,7 @@ const _i = [
|
|
|
6223
6223
|
onRemove: d[11] || (d[11] = (J, M) => {
|
|
6224
6224
|
var L, A, j, H;
|
|
6225
6225
|
if (((H = (j = (A = (L = e.value) == null ? void 0 : L.platform) == null ? void 0 : A.mappings) == null ? void 0 : j.inventory) == null ? void 0 : H.items[M].key) === "DEFAULT") {
|
|
6226
|
-
m
|
|
6226
|
+
u(m).open({
|
|
6227
6227
|
type: "error",
|
|
6228
6228
|
message: "DEFAULT item cannot be removed."
|
|
6229
6229
|
});
|
|
@@ -6290,7 +6290,7 @@ const _i = [
|
|
|
6290
6290
|
creditNotes: [],
|
|
6291
6291
|
deliveryOrders: [],
|
|
6292
6292
|
purchaseOrders: []
|
|
6293
|
-
}),
|
|
6293
|
+
}), m = Y(() => e.value.invoices.reduce((v, n) => {
|
|
6294
6294
|
for (const o of n._items)
|
|
6295
6295
|
v.push({
|
|
6296
6296
|
rDate: Ie(n.rDate).format("D-MMM-YY"),
|
|
@@ -6341,7 +6341,7 @@ const _i = [
|
|
|
6341
6341
|
cardType: o.cardType
|
|
6342
6342
|
});
|
|
6343
6343
|
return v;
|
|
6344
|
-
}, [])),
|
|
6344
|
+
}, [])), F = Y(() => e.value.creditNotes.reduce((v, n) => {
|
|
6345
6345
|
for (const o of n._items)
|
|
6346
6346
|
v.push({
|
|
6347
6347
|
rDate: Ie(n.rDate).format("D-MMM-YY"),
|
|
@@ -6376,7 +6376,7 @@ const _i = [
|
|
|
6376
6376
|
unitPrice: o.unitPrice
|
|
6377
6377
|
});
|
|
6378
6378
|
return v;
|
|
6379
|
-
}, [])),
|
|
6379
|
+
}, [])), I = Y(() => e.value.deliveryOrders.reduce((v, n) => {
|
|
6380
6380
|
for (const o of n._skus)
|
|
6381
6381
|
v.push({
|
|
6382
6382
|
poNo: n.poNo,
|
|
@@ -6513,7 +6513,7 @@ const _i = [
|
|
|
6513
6513
|
header: () => V("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Account Code"),
|
|
6514
6514
|
enableSorting: !1
|
|
6515
6515
|
}
|
|
6516
|
-
], c = [...x],
|
|
6516
|
+
], c = [...x], k = [
|
|
6517
6517
|
{
|
|
6518
6518
|
accessorKey: "_date",
|
|
6519
6519
|
header: () => V("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -6625,13 +6625,13 @@ const _i = [
|
|
|
6625
6625
|
header: () => V("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Net Amt"),
|
|
6626
6626
|
enableSorting: !1
|
|
6627
6627
|
}
|
|
6628
|
-
],
|
|
6628
|
+
], C = ne(g, "modelValue"), f = W(!1), i = Se(), { dateRange: _ } = Ge($e());
|
|
6629
6629
|
Ke(
|
|
6630
6630
|
() => _.value,
|
|
6631
6631
|
async () => {
|
|
6632
|
-
if (
|
|
6632
|
+
if (C.value._id)
|
|
6633
6633
|
try {
|
|
6634
|
-
f.value = !0, e.value = await qe(
|
|
6634
|
+
f.value = !0, e.value = await qe(C.value._id);
|
|
6635
6635
|
} catch (v) {
|
|
6636
6636
|
i.open({ message: v.message, type: "error" });
|
|
6637
6637
|
} finally {
|
|
@@ -6644,7 +6644,7 @@ const _i = [
|
|
|
6644
6644
|
);
|
|
6645
6645
|
async function $() {
|
|
6646
6646
|
try {
|
|
6647
|
-
|
|
6647
|
+
C.value._id ? (f.value = !0, await at(C.value._id, [s.value])) : i.open({ message: "Invalid accounting setting", type: "error" });
|
|
6648
6648
|
} catch (v) {
|
|
6649
6649
|
i.open({ message: v.message, type: "error" });
|
|
6650
6650
|
} finally {
|
|
@@ -6679,53 +6679,53 @@ const _i = [
|
|
|
6679
6679
|
}
|
|
6680
6680
|
], s = W(d[0].value);
|
|
6681
6681
|
return (v, n) => {
|
|
6682
|
-
const o = K("FmButton"), h = K("FmCircularProgress"), r = K("FmTabs"),
|
|
6682
|
+
const o = K("FmButton"), h = K("FmCircularProgress"), r = K("FmTabs"), p = K("FmTable");
|
|
6683
6683
|
return b(), N("div", td, [
|
|
6684
6684
|
t("div", od, [
|
|
6685
6685
|
l(Qe, {
|
|
6686
|
-
"date-range":
|
|
6686
|
+
"date-range": u(_),
|
|
6687
6687
|
"onUpdate:dateRange": n[0] || (n[0] = (U) => Me(_) ? _.value = U : null),
|
|
6688
6688
|
compare: !1
|
|
6689
6689
|
}, null, 8, ["date-range"]),
|
|
6690
6690
|
l(o, {
|
|
6691
6691
|
loading: f.value,
|
|
6692
6692
|
variant: "primary",
|
|
6693
|
-
label:
|
|
6693
|
+
label: u(a)("report.common.download"),
|
|
6694
6694
|
onClick: $
|
|
6695
6695
|
}, null, 8, ["loading", "label"])
|
|
6696
6696
|
]),
|
|
6697
6697
|
f.value ? (b(), N("div", ad, [
|
|
6698
6698
|
l(h, { size: "xl" }),
|
|
6699
|
-
t("span", ld, S(
|
|
6699
|
+
t("span", ld, S(u(a)("report.common.isLoading")), 1)
|
|
6700
6700
|
])) : (b(), N("div", nd, [
|
|
6701
6701
|
l(r, {
|
|
6702
6702
|
"model-value": s.value,
|
|
6703
6703
|
"onUpdate:modelValue": n[1] || (n[1] = (U) => s.value = U),
|
|
6704
6704
|
items: d
|
|
6705
6705
|
}, null, 8, ["model-value"]),
|
|
6706
|
-
s.value === "INVOICE" ? (b(), O(
|
|
6706
|
+
s.value === "INVOICE" ? (b(), O(p, {
|
|
6707
6707
|
key: 0,
|
|
6708
6708
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
|
|
6709
|
-
"row-data":
|
|
6709
|
+
"row-data": m.value,
|
|
6710
6710
|
"column-defs": x
|
|
6711
6711
|
}, null, 8, ["row-data"])) : B("", !0),
|
|
6712
|
-
s.value === "CREDIT_NOTE" ? (b(), O(
|
|
6712
|
+
s.value === "CREDIT_NOTE" ? (b(), O(p, {
|
|
6713
6713
|
key: 1,
|
|
6714
6714
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
|
|
6715
|
-
"row-data":
|
|
6715
|
+
"row-data": F.value,
|
|
6716
6716
|
"column-defs": c
|
|
6717
|
-
}, null, 8, ["row-data"])) : s.value === "DELIVERY_ORDER" ? (b(), O(
|
|
6717
|
+
}, null, 8, ["row-data"])) : s.value === "DELIVERY_ORDER" ? (b(), O(p, {
|
|
6718
6718
|
key: 2,
|
|
6719
6719
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
|
|
6720
|
-
"row-data":
|
|
6720
|
+
"row-data": I.value,
|
|
6721
6721
|
"column-defs": R
|
|
6722
|
-
}, null, 8, ["row-data"])) : s.value === "PURCHASE_ORDER" ? (b(), O(
|
|
6722
|
+
}, null, 8, ["row-data"])) : s.value === "PURCHASE_ORDER" ? (b(), O(p, {
|
|
6723
6723
|
key: 3,
|
|
6724
6724
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
|
|
6725
6725
|
"row-data": D.value,
|
|
6726
|
-
"column-defs":
|
|
6726
|
+
"column-defs": k
|
|
6727
6727
|
}, null, 8, ["row-data"])) : B("", !0),
|
|
6728
|
-
s.value === "RAW_INVOICE" ? (b(), O(
|
|
6728
|
+
s.value === "RAW_INVOICE" ? (b(), O(p, {
|
|
6729
6729
|
key: 4,
|
|
6730
6730
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
|
|
6731
6731
|
"row-data": y.value,
|
|
@@ -6743,7 +6743,7 @@ const _i = [
|
|
|
6743
6743
|
},
|
|
6744
6744
|
emits: ["update:modelValue"],
|
|
6745
6745
|
setup(g) {
|
|
6746
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
6746
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = W("setting"), y = [
|
|
6747
6747
|
{
|
|
6748
6748
|
label: a("report.integration.setting"),
|
|
6749
6749
|
value: "setting",
|
|
@@ -6754,8 +6754,8 @@ const _i = [
|
|
|
6754
6754
|
value: "preview",
|
|
6755
6755
|
icon: "table"
|
|
6756
6756
|
}
|
|
6757
|
-
],
|
|
6758
|
-
switch (
|
|
6757
|
+
], F = Ce(), D = Y(() => {
|
|
6758
|
+
switch (m.value) {
|
|
6759
6759
|
case "preview":
|
|
6760
6760
|
return sd;
|
|
6761
6761
|
case "setting":
|
|
@@ -6764,15 +6764,15 @@ const _i = [
|
|
|
6764
6764
|
return null;
|
|
6765
6765
|
}
|
|
6766
6766
|
});
|
|
6767
|
-
return (
|
|
6768
|
-
var
|
|
6767
|
+
return (I, w) => {
|
|
6768
|
+
var k;
|
|
6769
6769
|
const x = K("FmPageHead"), c = K("FmTabs");
|
|
6770
6770
|
return b(), N("div", rd, [
|
|
6771
6771
|
l(x, {
|
|
6772
|
-
title: ((
|
|
6772
|
+
title: ((k = e.value) == null ? void 0 : k.name) || "Synergy",
|
|
6773
6773
|
"back-button": !0,
|
|
6774
6774
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
6775
|
-
"onClick:back": w[0] || (w[0] = (R) =>
|
|
6775
|
+
"onClick:back": w[0] || (w[0] = (R) => u(F).push({ name: "integrations" }))
|
|
6776
6776
|
}, {
|
|
6777
6777
|
description: ke(() => w[3] || (w[3] = [
|
|
6778
6778
|
t("div", null, null, -1)
|
|
@@ -6780,8 +6780,8 @@ const _i = [
|
|
|
6780
6780
|
_: 1
|
|
6781
6781
|
}, 8, ["title"]),
|
|
6782
6782
|
l(c, {
|
|
6783
|
-
"model-value":
|
|
6784
|
-
"onUpdate:modelValue": w[1] || (w[1] = (R) =>
|
|
6783
|
+
"model-value": m.value,
|
|
6784
|
+
"onUpdate:modelValue": w[1] || (w[1] = (R) => m.value = R),
|
|
6785
6785
|
items: y
|
|
6786
6786
|
}, null, 8, ["model-value"]),
|
|
6787
6787
|
t("div", id, [
|
|
@@ -6796,7 +6796,7 @@ const _i = [
|
|
|
6796
6796
|
}), md = {
|
|
6797
6797
|
key: 0,
|
|
6798
6798
|
class: "flex flex-col h-full w-full"
|
|
6799
|
-
},
|
|
6799
|
+
}, ud = { class: "flex flex-col gap-16 pb-[24px]" }, pd = { class: "flex flex-row justify-between items-center gap-2" }, cd = { class: "fm-typo-en-title-sm-800" }, fd = { class: "flex flex-row gap-2 items-center" }, gd = { class: "relative group cursor-pointer" }, vd = { 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" }, yd = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, xd = { class: "w-[90%] flex flex-col gap-24" }, bd = { class: "flex flex-col gap-16" }, wd = { class: "fm-typo-en-title-sm-800" }, hd = { class: "flex flex-col max-w-[100%]" }, _d = { class: "w-[25%] font-semibold" }, Cd = { class: "flex flex-col max-w-[100%]" }, kd = { class: "w-[25%] font-semibold" }, $d = { class: "flex flex-col max-w-[100%]" }, Sd = { class: "grid-cols-2 grid gap-16" }, Ad = { class: "flex flex-col max-w-[100%]" }, Vd = { class: "flex flex-col max-w-[100%]" }, Dd = { class: "flex flex-col max-w-[100%]" }, Kd = { class: "flex flex-col max-w-[100%]" }, Fd = { class: "flex flex-row items-center justify-between gap-x-16" }, Id = { class: "flex flex-row items-center justify-between gap-x-16" }, Td = { class: "flex flex-row items-center justify-between gap-x-16" }, Rd = { class: "flex flex-row items-center justify-between gap-x-16" }, Ud = /* @__PURE__ */ te({
|
|
6800
6800
|
__name: "Setting",
|
|
6801
6801
|
props: /* @__PURE__ */ Ve({
|
|
6802
6802
|
errorLogs: {
|
|
@@ -6809,7 +6809,7 @@ const _i = [
|
|
|
6809
6809
|
}),
|
|
6810
6810
|
emits: ["update:modelValue"],
|
|
6811
6811
|
setup(g) {
|
|
6812
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
6812
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = Se(), y = Re(), F = Ce(), { promptLoader: D } = ze(), { promptMessage: I } = He(), { restaurants: w } = $e(), { rules: x, notifyUnauthorized: c } = je(), k = Y(
|
|
6813
6813
|
() => w.map((d) => ({ label: d.name, value: d.id }))
|
|
6814
6814
|
), R = [
|
|
6815
6815
|
{
|
|
@@ -6817,7 +6817,7 @@ const _i = [
|
|
|
6817
6817
|
value: he.BY_INVOICE
|
|
6818
6818
|
}
|
|
6819
6819
|
];
|
|
6820
|
-
async function
|
|
6820
|
+
async function C() {
|
|
6821
6821
|
var n;
|
|
6822
6822
|
const d = (n = e.value.platform) == null ? void 0 : n.locationIds;
|
|
6823
6823
|
if (_e({
|
|
@@ -6828,14 +6828,14 @@ const _i = [
|
|
|
6828
6828
|
c(Z.delete);
|
|
6829
6829
|
return;
|
|
6830
6830
|
}
|
|
6831
|
-
await
|
|
6831
|
+
await I({
|
|
6832
6832
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
6833
6833
|
title: a("report.common.delete")
|
|
6834
6834
|
}) && await D(async () => {
|
|
6835
6835
|
try {
|
|
6836
|
-
await Be(e.value._id), await y.getSettings(),
|
|
6836
|
+
await Be(e.value._id), await y.getSettings(), F.back();
|
|
6837
6837
|
} catch (o) {
|
|
6838
|
-
|
|
6838
|
+
m.open({ type: "error", message: o.message });
|
|
6839
6839
|
}
|
|
6840
6840
|
});
|
|
6841
6841
|
}
|
|
@@ -6854,7 +6854,7 @@ const _i = [
|
|
|
6854
6854
|
try {
|
|
6855
6855
|
await Ye(e.value._id, e.value), await y.getSettings();
|
|
6856
6856
|
} catch (n) {
|
|
6857
|
-
|
|
6857
|
+
m.open({ type: "error", message: n.message });
|
|
6858
6858
|
}
|
|
6859
6859
|
});
|
|
6860
6860
|
}
|
|
@@ -6863,7 +6863,7 @@ const _i = [
|
|
|
6863
6863
|
try {
|
|
6864
6864
|
await Ne(e.value._id), await y.getSettings();
|
|
6865
6865
|
} catch (d) {
|
|
6866
|
-
|
|
6866
|
+
m.open({ type: "error", message: d.message });
|
|
6867
6867
|
}
|
|
6868
6868
|
});
|
|
6869
6869
|
}
|
|
@@ -6892,12 +6892,12 @@ const _i = [
|
|
|
6892
6892
|
return Oe(async () => {
|
|
6893
6893
|
await y.getSettings();
|
|
6894
6894
|
}), (d, s) => {
|
|
6895
|
-
var
|
|
6895
|
+
var p, U;
|
|
6896
6896
|
const v = K("FmIcon"), n = K("FmButton"), o = K("FmTextField"), h = K("FmSelect"), r = K("FmMenuDivider");
|
|
6897
|
-
return (U = (
|
|
6898
|
-
t("div",
|
|
6899
|
-
t("div",
|
|
6900
|
-
t("div", cd, S(
|
|
6897
|
+
return (U = (p = e.value) == null ? void 0 : p.platform) != null && U.mappings ? (b(), N("div", md, [
|
|
6898
|
+
t("div", ud, [
|
|
6899
|
+
t("div", pd, [
|
|
6900
|
+
t("div", cd, S(u(a)("report.integration.connect")), 1),
|
|
6901
6901
|
t("div", fd, [
|
|
6902
6902
|
t("div", gd, [
|
|
6903
6903
|
l(v, {
|
|
@@ -6905,16 +6905,16 @@ const _i = [
|
|
|
6905
6905
|
class: "p-2 bg-gray-100 rounded-full",
|
|
6906
6906
|
onClick: i
|
|
6907
6907
|
}),
|
|
6908
|
-
t("span", vd, S(
|
|
6908
|
+
t("span", vd, S(u(a)("report.integration.refreshSetting")), 1)
|
|
6909
6909
|
]),
|
|
6910
6910
|
l(n, {
|
|
6911
6911
|
variant: "tertiary",
|
|
6912
|
-
label:
|
|
6913
|
-
onClick:
|
|
6912
|
+
label: u(a)("report.common.delete"),
|
|
6913
|
+
onClick: C
|
|
6914
6914
|
}, null, 8, ["label"]),
|
|
6915
6915
|
l(n, {
|
|
6916
6916
|
variant: "primary",
|
|
6917
|
-
label:
|
|
6917
|
+
label: u(a)("report.common.update"),
|
|
6918
6918
|
"prepend-icon": "update",
|
|
6919
6919
|
onClick: f
|
|
6920
6920
|
}, null, 8, ["label"])
|
|
@@ -6925,22 +6925,22 @@ const _i = [
|
|
|
6925
6925
|
t("div", xd, [
|
|
6926
6926
|
s[29] || (s[29] = t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Authenticate with your CodeMax POS account to enable FeedMe to securely upload data. ", -1)),
|
|
6927
6927
|
t("div", bd, [
|
|
6928
|
-
t("div", wd, S(
|
|
6928
|
+
t("div", wd, S(u(a)("report.common.general")), 1),
|
|
6929
6929
|
t("div", hd, [
|
|
6930
|
-
t("div", _d, S(
|
|
6930
|
+
t("div", _d, S(u(a)("report.common.name")), 1),
|
|
6931
6931
|
l(o, {
|
|
6932
6932
|
modelValue: e.value.name,
|
|
6933
6933
|
"onUpdate:modelValue": s[0] || (s[0] = (T) => e.value.name = T)
|
|
6934
6934
|
}, null, 8, ["modelValue"])
|
|
6935
6935
|
]),
|
|
6936
6936
|
t("div", Cd, [
|
|
6937
|
-
t("div", kd, S(
|
|
6937
|
+
t("div", kd, S(u(a)("report.common.location")), 1),
|
|
6938
6938
|
l(h, {
|
|
6939
6939
|
modelValue: e.value.platform.locationIds,
|
|
6940
6940
|
"onUpdate:modelValue": s[1] || (s[1] = (T) => e.value.platform.locationIds = T),
|
|
6941
|
-
items:
|
|
6941
|
+
items: k.value,
|
|
6942
6942
|
multiselect: !0,
|
|
6943
|
-
placeholder:
|
|
6943
|
+
placeholder: u(a)("report.common.location"),
|
|
6944
6944
|
class: "flex-grow"
|
|
6945
6945
|
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
6946
6946
|
]),
|
|
@@ -7121,40 +7121,40 @@ const _i = [
|
|
|
7121
7121
|
},
|
|
7122
7122
|
emits: ["update:modelValue"],
|
|
7123
7123
|
setup(g) {
|
|
7124
|
-
const { t: a } = se(), e = ne(g, "modelValue"),
|
|
7124
|
+
const { t: a } = se(), e = ne(g, "modelValue"), m = W(!1), y = Se(), F = W([]), { dateRange: D } = Ge($e());
|
|
7125
7125
|
Ke(
|
|
7126
7126
|
() => D.value,
|
|
7127
7127
|
async () => {
|
|
7128
7128
|
if (e.value._id)
|
|
7129
7129
|
try {
|
|
7130
|
-
|
|
7130
|
+
m.value = !0, F.value = await qe(e.value._id);
|
|
7131
7131
|
} catch (c) {
|
|
7132
7132
|
y.open({ message: c.message, type: "error" });
|
|
7133
7133
|
} finally {
|
|
7134
|
-
|
|
7134
|
+
m.value = !1;
|
|
7135
7135
|
}
|
|
7136
7136
|
},
|
|
7137
7137
|
{ immediate: !0 }
|
|
7138
7138
|
);
|
|
7139
|
-
const
|
|
7140
|
-
var
|
|
7139
|
+
const I = Y(() => F.value.reduce((c, k) => {
|
|
7140
|
+
var C, f, i, _, $, d;
|
|
7141
7141
|
const R = Math.max(
|
|
7142
|
-
((
|
|
7143
|
-
((f =
|
|
7144
|
-
((i =
|
|
7142
|
+
((C = k.invoiceItems) == null ? void 0 : C.length) || 0,
|
|
7143
|
+
((f = k.invoicePayments) == null ? void 0 : f.length) || 0,
|
|
7144
|
+
((i = k.taxDetails) == null ? void 0 : i.length) || 0,
|
|
7145
7145
|
1
|
|
7146
7146
|
);
|
|
7147
7147
|
for (let s = 0; s < R; s++) {
|
|
7148
|
-
const v = (_ =
|
|
7148
|
+
const v = (_ = k.invoiceItems) == null ? void 0 : _[s], n = ($ = k.invoicePayments) == null ? void 0 : $[s], o = (d = k.taxDetails) == null ? void 0 : d[s];
|
|
7149
7149
|
c.push({
|
|
7150
|
-
invoiceNo: s === 0 ?
|
|
7150
|
+
invoiceNo: s === 0 ? k.invoiceNo : void 0,
|
|
7151
7151
|
// refNo: i === 0 ? record.refNo : undefined,
|
|
7152
|
-
status: s === 0 ?
|
|
7152
|
+
status: s === 0 ? k.invoiceStatus : void 0,
|
|
7153
7153
|
// businessDate: i === 0 ? record.businessDate : undefined,
|
|
7154
|
-
salesChannel: s === 0 ?
|
|
7154
|
+
salesChannel: s === 0 ? k.salesChannel : void 0,
|
|
7155
7155
|
// tableNo: i === 0 ? record.tableNo : undefined,
|
|
7156
|
-
roundingAdj: s === 0 ?
|
|
7157
|
-
grandTotal: s === 0 ?
|
|
7156
|
+
roundingAdj: s === 0 ? k.roundingAdj : void 0,
|
|
7157
|
+
grandTotal: s === 0 ? k.grandTotal : void 0,
|
|
7158
7158
|
discountAmount: v == null ? void 0 : v.discountAmount,
|
|
7159
7159
|
itemCode: v == null ? void 0 : v.itemCode,
|
|
7160
7160
|
itemName: v == null ? void 0 : v.itemName,
|
|
@@ -7194,37 +7194,37 @@ const _i = [
|
|
|
7194
7194
|
];
|
|
7195
7195
|
async function x() {
|
|
7196
7196
|
try {
|
|
7197
|
-
e.value._id && e.value.platform.endpoint && e.value.platform.loginId && e.value.platform.password && e.value.platform.branchCode ? (
|
|
7197
|
+
e.value._id && e.value.platform.endpoint && e.value.platform.loginId && e.value.platform.password && e.value.platform.branchCode ? (m.value = !0, await ot(e.value._id), y.open({ message: a("report.integration.uploadSuccess"), type: "success" })) : y.open({ message: a("report.integration.invalidSetting"), type: "error" });
|
|
7198
7198
|
} catch (c) {
|
|
7199
|
-
c.message && y.open({ message: c.message, type: "error" }), Array.isArray(c.errors) ? c.errors.forEach((
|
|
7199
|
+
c.message && y.open({ message: c.message, type: "error" }), Array.isArray(c.errors) ? c.errors.forEach((k) => y.open({ message: String(k), type: "error" })) : typeof c.errors == "string" && y.open({ message: c.errors, type: "error" });
|
|
7200
7200
|
} finally {
|
|
7201
|
-
|
|
7201
|
+
m.value = !1;
|
|
7202
7202
|
}
|
|
7203
7203
|
}
|
|
7204
|
-
return (c,
|
|
7205
|
-
const R = K("FmButton"),
|
|
7204
|
+
return (c, k) => {
|
|
7205
|
+
const R = K("FmButton"), C = K("FmCircularProgress"), f = K("FmTable");
|
|
7206
7206
|
return b(), N("div", Nd, [
|
|
7207
7207
|
t("div", Md, [
|
|
7208
7208
|
l(Qe, {
|
|
7209
|
-
"date-range":
|
|
7210
|
-
"onUpdate:dateRange":
|
|
7209
|
+
"date-range": u(D),
|
|
7210
|
+
"onUpdate:dateRange": k[0] || (k[0] = (i) => Me(D) ? D.value = i : null),
|
|
7211
7211
|
compare: !1
|
|
7212
7212
|
}, null, 8, ["date-range"]),
|
|
7213
7213
|
l(R, {
|
|
7214
|
-
loading:
|
|
7214
|
+
loading: m.value,
|
|
7215
7215
|
variant: "primary",
|
|
7216
|
-
label:
|
|
7216
|
+
label: u(a)("report.common.upload"),
|
|
7217
7217
|
onClick: x
|
|
7218
7218
|
}, null, 8, ["loading", "label"])
|
|
7219
7219
|
]),
|
|
7220
7220
|
t("div", Pd, [
|
|
7221
|
-
|
|
7222
|
-
l(
|
|
7223
|
-
t("span", Ld, S(
|
|
7221
|
+
m.value ? (b(), N("div", jd, [
|
|
7222
|
+
l(C, { size: "xl" }),
|
|
7223
|
+
t("span", Ld, S(u(a)("report.common.isLoading")), 1)
|
|
7224
7224
|
])) : (b(), O(f, {
|
|
7225
7225
|
key: 1,
|
|
7226
7226
|
class: "flex p-5 border border-fm-color-border-secondary rounded-lg h-auto min-w-full",
|
|
7227
|
-
"row-data":
|
|
7227
|
+
"row-data": I.value,
|
|
7228
7228
|
"column-defs": w
|
|
7229
7229
|
}, null, 8, ["row-data"]))
|
|
7230
7230
|
])
|
|
@@ -7244,7 +7244,7 @@ const _i = [
|
|
|
7244
7244
|
}),
|
|
7245
7245
|
emits: ["update:modelValue"],
|
|
7246
7246
|
setup(g) {
|
|
7247
|
-
const { t: a } = se(), e = g,
|
|
7247
|
+
const { t: a } = se(), e = g, m = ne(g, "modelValue"), y = W("setting"), F = [
|
|
7248
7248
|
{
|
|
7249
7249
|
label: a("report.integration.setting"),
|
|
7250
7250
|
value: "setting",
|
|
@@ -7255,7 +7255,7 @@ const _i = [
|
|
|
7255
7255
|
value: "preview",
|
|
7256
7256
|
icon: "table"
|
|
7257
7257
|
}
|
|
7258
|
-
], D = Ce(),
|
|
7258
|
+
], D = Ce(), I = Y(() => {
|
|
7259
7259
|
switch (y.value) {
|
|
7260
7260
|
case "preview":
|
|
7261
7261
|
return {
|
|
@@ -7273,30 +7273,30 @@ const _i = [
|
|
|
7273
7273
|
}
|
|
7274
7274
|
});
|
|
7275
7275
|
return (w, x) => {
|
|
7276
|
-
var R,
|
|
7277
|
-
const c = K("FmPageHead"),
|
|
7276
|
+
var R, C, f;
|
|
7277
|
+
const c = K("FmPageHead"), k = K("FmTabs");
|
|
7278
7278
|
return b(), N("div", Od, [
|
|
7279
7279
|
l(c, {
|
|
7280
|
-
title: ((R =
|
|
7280
|
+
title: ((R = m.value) == null ? void 0 : R.name) || "Codemax POS",
|
|
7281
7281
|
"back-button": !0,
|
|
7282
7282
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
7283
|
-
"onClick:back": x[0] || (x[0] = (i) =>
|
|
7283
|
+
"onClick:back": x[0] || (x[0] = (i) => u(D).push({ name: "integrations" }))
|
|
7284
7284
|
}, {
|
|
7285
7285
|
description: ke(() => x[3] || (x[3] = [
|
|
7286
7286
|
t("div", null, null, -1)
|
|
7287
7287
|
])),
|
|
7288
7288
|
_: 1
|
|
7289
7289
|
}, 8, ["title"]),
|
|
7290
|
-
l(
|
|
7290
|
+
l(k, {
|
|
7291
7291
|
"model-value": y.value,
|
|
7292
7292
|
"onUpdate:modelValue": x[1] || (x[1] = (i) => y.value = i),
|
|
7293
|
-
items:
|
|
7293
|
+
items: F
|
|
7294
7294
|
}, null, 8, ["model-value"]),
|
|
7295
7295
|
t("div", Bd, [
|
|
7296
|
-
(b(), O(Pe((
|
|
7297
|
-
modelValue:
|
|
7298
|
-
"onUpdate:modelValue": x[2] || (x[2] = (i) =>
|
|
7299
|
-
}, (f =
|
|
7296
|
+
(b(), O(Pe((C = I.value) == null ? void 0 : C.component), tt({
|
|
7297
|
+
modelValue: m.value,
|
|
7298
|
+
"onUpdate:modelValue": x[2] || (x[2] = (i) => m.value = i)
|
|
7299
|
+
}, (f = I.value) == null ? void 0 : f.props), null, 16, ["modelValue"]))
|
|
7300
7300
|
])
|
|
7301
7301
|
]);
|
|
7302
7302
|
};
|
|
@@ -7304,30 +7304,41 @@ const _i = [
|
|
|
7304
7304
|
}), qd = { class: "px-24 h-full relative" }, tm = /* @__PURE__ */ te({
|
|
7305
7305
|
__name: "Integration",
|
|
7306
7306
|
setup(g) {
|
|
7307
|
-
const a = W(void 0), e =
|
|
7307
|
+
const a = W(void 0), e = ut(), m = Ce(), y = Re(), F = W(), D = W([]), { rules: I, notifyUnauthorized: w } = je(), x = W(!1), c = W(y.settings.length > 0);
|
|
7308
7308
|
nt(async () => {
|
|
7309
|
-
|
|
7309
|
+
try {
|
|
7310
|
+
y.settings.length === 0 && await y.getSettings();
|
|
7311
|
+
} catch {
|
|
7312
|
+
F.value = void 0, a.value = void 0, D.value = [], await m.replace({ name: "integrations", query: e.query });
|
|
7313
|
+
} finally {
|
|
7314
|
+
c.value = !0;
|
|
7315
|
+
}
|
|
7310
7316
|
}), Ke(
|
|
7311
|
-
() =>
|
|
7312
|
-
async (
|
|
7313
|
-
var
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
+
[() => y.settings, () => e.params.id, c],
|
|
7318
|
+
async ([R, C, f]) => {
|
|
7319
|
+
var $, d;
|
|
7320
|
+
if (!f) return;
|
|
7321
|
+
const i = Array.isArray(C) ? C[0] : C, _ = R.find((s) => s._id === i);
|
|
7322
|
+
if (!_) {
|
|
7323
|
+
F.value = void 0, a.value = void 0, D.value = [], await m.replace({ name: "integrations", query: e.query });
|
|
7324
|
+
return;
|
|
7325
|
+
}
|
|
7326
|
+
if (_) {
|
|
7327
|
+
const s = ($ = _.platform) == null ? void 0 : $.locationIds;
|
|
7317
7328
|
if (_e({
|
|
7318
|
-
integrationRestaurantIds:
|
|
7319
|
-
rules:
|
|
7329
|
+
integrationRestaurantIds: s,
|
|
7330
|
+
rules: I.value,
|
|
7320
7331
|
action: Z.read
|
|
7321
|
-
}) && !
|
|
7322
|
-
|
|
7332
|
+
}) && !x.value) {
|
|
7333
|
+
x.value = !0, w(Z.read), m.replace({ name: "integrations", query: e.query });
|
|
7323
7334
|
return;
|
|
7324
7335
|
}
|
|
7325
|
-
F.value =
|
|
7336
|
+
F.value = _, a.value = (d = F.value.platform) == null ? void 0 : d.name, F.value._id && (D.value = await Ct(F.value._id));
|
|
7326
7337
|
}
|
|
7327
7338
|
},
|
|
7328
7339
|
{ immediate: !0 }
|
|
7329
7340
|
);
|
|
7330
|
-
const
|
|
7341
|
+
const k = Y(() => {
|
|
7331
7342
|
switch (a.value) {
|
|
7332
7343
|
case Ue.Xero:
|
|
7333
7344
|
return Zo;
|
|
@@ -7338,7 +7349,7 @@ const _i = [
|
|
|
7338
7349
|
case Ue.SQL:
|
|
7339
7350
|
return Dn;
|
|
7340
7351
|
case Ue.iFlexi_HRMS:
|
|
7341
|
-
return
|
|
7352
|
+
return ur;
|
|
7342
7353
|
case Ue.Biztory:
|
|
7343
7354
|
return js;
|
|
7344
7355
|
case Ue.AutoCountCloud:
|
|
@@ -7351,11 +7362,11 @@ const _i = [
|
|
|
7351
7362
|
return null;
|
|
7352
7363
|
}
|
|
7353
7364
|
});
|
|
7354
|
-
return (
|
|
7355
|
-
(b(), O(Pe(
|
|
7365
|
+
return (R, C) => (b(), N("div", qd, [
|
|
7366
|
+
(b(), O(Pe(k.value), {
|
|
7356
7367
|
modelValue: F.value,
|
|
7357
|
-
"onUpdate:modelValue":
|
|
7358
|
-
"error-logs":
|
|
7368
|
+
"onUpdate:modelValue": C[0] || (C[0] = (f) => F.value = f),
|
|
7369
|
+
"error-logs": D.value
|
|
7359
7370
|
}, null, 8, ["modelValue", "error-logs"]))
|
|
7360
7371
|
]));
|
|
7361
7372
|
}
|