@feedmepos/mf-report 5.6.0-beta.2 → 5.7.0-beta.1
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-DQxH_gFz.js → App-HkK7YCea.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-D5g1LcIE.js → Default.vue_vue_type_script_setup_true_lang-BHcrvnFI.js} +1 -1
- package/dist/{InsightView-C0pUphgU.js → InsightView-DA6fFjEw.js} +2 -2
- package/dist/{Integration-BVxULmIG.js → Integration-Bu0y1MDy.js} +1303 -1250
- package/dist/{Layout-dF_aZ7xo.js → Layout-C-X9UTyG.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-aMIxHe4A.js → MenuTab.vue_vue_type_script_setup_true_lang-XfIh8zpc.js} +1 -1
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CiVEIY-y.js → NavigationTab.vue_vue_type_script_setup_true_lang-DCd9X4G6.js} +1542 -1543
- package/dist/{OverviewView-DrqaX9tl.js → OverviewView-Bz_MAQrC.js} +2 -2
- package/dist/{Report-Y7DJRdpf.js → Report-B39vX8Op.js} +1 -1
- package/dist/{ReportView-BYWN3fLP.js → ReportView-DlLEIzKM.js} +3 -3
- package/dist/{Setting-BrhhAVcG.js → Setting-AtChC0Ii.js} +2 -2
- package/dist/app.js +8 -8
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { u as J, I as
|
|
4
|
-
import { u as
|
|
5
|
-
import { useSnackbar as
|
|
6
|
-
import { s as
|
|
7
|
-
import { storeToRefs as
|
|
8
|
-
import { _ as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as H, mergeModels as he, useModel as X, computed as q, resolveComponent as S, createElementBlock as F, openBlock as m, createElementVNode as t, createCommentVNode as M, normalizeClass as je, Fragment as O, renderList as L, createBlock as I, createVNode as i, withCtx as _e, toDisplayString as U, unref as p, ref as B, onUnmounted as $e, watch as xe, isRef as Se, h as A, resolveDynamicComponent as we, mergeProps as He, onMounted as Xe } from "vue";
|
|
2
|
+
import { useRouter as fe, useRoute as Ge } from "vue-router";
|
|
3
|
+
import { u as J, I as pe, d as qe, e as Ve, f as Ce, b as ve, q as Qe, m as Je, p as Fe, r as De, s as Ue, t as Te, v as Oe, w as We, x as Ze, y as et, A as ye, z as Be, B as tt, E as ot } from "./global-loader-DqYGIXIo.js";
|
|
4
|
+
import { u as Ae } from "./message-dialog-UoMWOnil.js";
|
|
5
|
+
import { useSnackbar as ge } from "@feedmepos/ui-library";
|
|
6
|
+
import { s as at } from "./index-BChph3k1.js";
|
|
7
|
+
import { storeToRefs as Ie } from "pinia";
|
|
8
|
+
import { _ as Re } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BD2DnN09.js";
|
|
9
|
+
const lt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, nt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, st = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "w-[24px] flex items-center"
|
|
12
|
-
},
|
|
12
|
+
}, R = /* @__PURE__ */ H({
|
|
13
13
|
__name: "MappingField",
|
|
14
|
-
props: /* @__PURE__ */
|
|
14
|
+
props: /* @__PURE__ */ he({
|
|
15
15
|
removable: {
|
|
16
16
|
type: Boolean,
|
|
17
17
|
default: !1
|
|
@@ -32,80 +32,80 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
32
32
|
modelValue: { required: !0 },
|
|
33
33
|
modelModifiers: {}
|
|
34
34
|
}),
|
|
35
|
-
emits: /* @__PURE__ */
|
|
36
|
-
setup(
|
|
37
|
-
const e = X(
|
|
35
|
+
emits: /* @__PURE__ */ he(["remove"], ["update:modelValue"]),
|
|
36
|
+
setup(f, { emit: o }) {
|
|
37
|
+
const e = X(f, "modelValue"), s = f, V = q(
|
|
38
38
|
() => Object.keys(s.options).map((x) => {
|
|
39
|
-
const
|
|
39
|
+
const D = s.options[x];
|
|
40
40
|
return {
|
|
41
|
-
placeholder:
|
|
41
|
+
placeholder: D.placeholder,
|
|
42
42
|
key: x,
|
|
43
|
-
editable:
|
|
43
|
+
editable: D.editable
|
|
44
44
|
};
|
|
45
45
|
})
|
|
46
46
|
), w = o;
|
|
47
|
-
return (x,
|
|
48
|
-
const b =
|
|
49
|
-
return
|
|
47
|
+
return (x, D) => {
|
|
48
|
+
const b = S("FmTextField"), _ = S("FmTooltip"), c = S("FmIcon");
|
|
49
|
+
return m(), F("div", lt, [
|
|
50
50
|
t("div", {
|
|
51
|
-
class:
|
|
51
|
+
class: je(`${f.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
52
52
|
}, [
|
|
53
|
-
(
|
|
53
|
+
(m(!0), F(O, null, L(V.value, (h) => {
|
|
54
54
|
var $;
|
|
55
|
-
return
|
|
55
|
+
return m(), F(O, {
|
|
56
56
|
key: h.key
|
|
57
57
|
}, [
|
|
58
|
-
h.editable ? (
|
|
58
|
+
h.editable ? (m(), F("div", {
|
|
59
59
|
key: 0,
|
|
60
|
-
class:
|
|
60
|
+
class: je(`${f.removable ? "w-[50%]" : "w-[100%]"}`)
|
|
61
61
|
}, [
|
|
62
62
|
i(b, {
|
|
63
63
|
"model-value": e.value[h.key],
|
|
64
64
|
placeholder: h.placeholder,
|
|
65
|
-
type:
|
|
66
|
-
rules:
|
|
67
|
-
"onUpdate:modelValue": (
|
|
68
|
-
let y =
|
|
69
|
-
|
|
65
|
+
type: f.type,
|
|
66
|
+
rules: f.rules,
|
|
67
|
+
"onUpdate:modelValue": (u) => {
|
|
68
|
+
let y = u;
|
|
69
|
+
f.type === "number" && (y = Number(u)), e.value = {
|
|
70
70
|
...e.value,
|
|
71
71
|
[h.key]: y
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
|
|
75
|
-
], 2)) : (
|
|
75
|
+
], 2)) : (m(), I(_, {
|
|
76
76
|
key: 1,
|
|
77
77
|
content: ($ = e.value[h.key]) == null ? void 0 : $.toString(),
|
|
78
78
|
class: "w-[50%]"
|
|
79
79
|
}, {
|
|
80
|
-
default:
|
|
81
|
-
t("div",
|
|
80
|
+
default: _e(() => [
|
|
81
|
+
t("div", nt, U(e.value[h.key]), 1)
|
|
82
82
|
]),
|
|
83
83
|
_: 2
|
|
84
84
|
}, 1032, ["content"]))
|
|
85
85
|
], 64);
|
|
86
86
|
}), 128))
|
|
87
87
|
], 2),
|
|
88
|
-
|
|
89
|
-
i(
|
|
88
|
+
f.removable ? (m(), F("div", st, [
|
|
89
|
+
i(c, {
|
|
90
90
|
color: "system-error-300",
|
|
91
91
|
class: "cursor-pointer",
|
|
92
92
|
name: "close",
|
|
93
93
|
size: "md",
|
|
94
|
-
onClick:
|
|
94
|
+
onClick: D[0] || (D[0] = (h) => w("remove"))
|
|
95
95
|
})
|
|
96
|
-
])) :
|
|
96
|
+
])) : M("", !0)
|
|
97
97
|
]);
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
}),
|
|
100
|
+
}), it = { class: "flex flex-col" }, rt = { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, mt = {
|
|
101
101
|
key: 0,
|
|
102
102
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
103
|
-
},
|
|
103
|
+
}, ct = { class: "flex flex-row items-center w-[100%] justify-start" }, dt = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ut = {
|
|
104
104
|
key: 0,
|
|
105
105
|
class: "flex flex-row items-center w-[100%] justify-start"
|
|
106
|
-
},
|
|
106
|
+
}, pt = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, ft = { class: "w-[calc(75%+4px)]" }, vt = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, gt = { class: "flex flex-row items-center w-[100%] justify-between" }, yt = { class: "text-nowrap w-[50%] overflow-hidden text-ellipsis" }, xt = { class: "w-[50%]" }, Ne = /* @__PURE__ */ H({
|
|
107
107
|
__name: "UploadSection",
|
|
108
|
-
props: /* @__PURE__ */
|
|
108
|
+
props: /* @__PURE__ */ he({
|
|
109
109
|
label: {
|
|
110
110
|
type: String,
|
|
111
111
|
default: "upload"
|
|
@@ -119,65 +119,65 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
119
119
|
modelModifiers: {}
|
|
120
120
|
}),
|
|
121
121
|
emits: ["update:modelValue"],
|
|
122
|
-
setup(
|
|
123
|
-
const { t: o } = J(), e = X(
|
|
122
|
+
setup(f) {
|
|
123
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = q(() => {
|
|
124
124
|
switch (e.value.name) {
|
|
125
|
-
case
|
|
126
|
-
case
|
|
127
|
-
case
|
|
125
|
+
case pe.AutoCount:
|
|
126
|
+
case pe.SQL:
|
|
127
|
+
case pe.iFlexi_HRMS:
|
|
128
128
|
return !0;
|
|
129
129
|
default:
|
|
130
130
|
return !1;
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
return (V, w) => {
|
|
134
|
-
var _,
|
|
135
|
-
const x =
|
|
136
|
-
return
|
|
137
|
-
t("div", lt, [
|
|
138
|
-
t("div", nt, F(p(o)("report.integration.auto", { label: v.label })), 1),
|
|
139
|
-
v.label == "upload" ? (c(), D("div", st, F(p(o)("report.integration.lastUploadDate")) + ": " + F(v.lastUploadDate ? p(Ee)(v.lastUploadDate).format("MMMM D, YYYY h:mm A") : p(o)("report.integration.noData.title")), 1)) : P("", !0)
|
|
140
|
-
]),
|
|
134
|
+
var _, c;
|
|
135
|
+
const x = S("FmSwitch"), D = S("FmTextField"), b = S("FmTimePicker");
|
|
136
|
+
return m(), F(O, null, [
|
|
141
137
|
t("div", it, [
|
|
142
|
-
t("div", rt,
|
|
138
|
+
t("div", rt, U(p(o)("report.integration.auto", { label: f.label })), 1),
|
|
139
|
+
f.label == "upload" ? (m(), F("div", mt, U(p(o)("report.integration.lastUploadDate")) + ": " + U(f.lastUploadDate ? p(qe)(f.lastUploadDate).format("MMMM D, YYYY h:mm A") : p(o)("report.integration.noData.title")), 1)) : M("", !0)
|
|
140
|
+
]),
|
|
141
|
+
t("div", ct, [
|
|
142
|
+
t("div", dt, U(p(o)("report.common.enable")), 1),
|
|
143
143
|
i(x, {
|
|
144
144
|
modelValue: e.value.enable,
|
|
145
145
|
"onUpdate:modelValue": w[0] || (w[0] = (h) => e.value.enable = h),
|
|
146
146
|
style: { gap: "0px" }
|
|
147
147
|
}, null, 8, ["modelValue"])
|
|
148
148
|
]),
|
|
149
|
-
s.value ? (
|
|
150
|
-
t("div",
|
|
151
|
-
t("div",
|
|
152
|
-
i(
|
|
149
|
+
s.value ? (m(), F("div", ut, [
|
|
150
|
+
t("div", pt, U(p(o)("report.common.email")), 1),
|
|
151
|
+
t("div", ft, [
|
|
152
|
+
i(D, {
|
|
153
153
|
"model-value": (e.value.emails || []).join(","),
|
|
154
154
|
placeholder: "Email",
|
|
155
155
|
"onUpdate:modelValue": w[1] || (w[1] = (h) => {
|
|
156
156
|
switch (e.value.name) {
|
|
157
|
-
case p(
|
|
158
|
-
case p(
|
|
159
|
-
case p(
|
|
157
|
+
case p(pe).AutoCount:
|
|
158
|
+
case p(pe).SQL:
|
|
159
|
+
case p(pe).iFlexi_HRMS:
|
|
160
160
|
e.value.emails = h.split(",");
|
|
161
161
|
break;
|
|
162
162
|
}
|
|
163
163
|
})
|
|
164
164
|
}, null, 8, ["model-value"])
|
|
165
165
|
])
|
|
166
|
-
])) :
|
|
167
|
-
t("div",
|
|
168
|
-
t("div",
|
|
169
|
-
t("div",
|
|
170
|
-
t("div",
|
|
166
|
+
])) : M("", !0),
|
|
167
|
+
t("div", vt, [
|
|
168
|
+
t("div", gt, [
|
|
169
|
+
t("div", yt, U(p(at)(f.label)) + " time ", 1),
|
|
170
|
+
t("div", xt, [
|
|
171
171
|
i(b, {
|
|
172
172
|
class: "gap-[0px]",
|
|
173
|
-
"model-value": p(
|
|
173
|
+
"model-value": p(qe)().hour(((_ = e.value.triggerTime) == null ? void 0 : _.hour) ?? 0).minute(((c = e.value.triggerTime) == null ? void 0 : c.minute) ?? 0).format("HH:mm"),
|
|
174
174
|
"onUpdate:modelValue": w[2] || (w[2] = (h) => {
|
|
175
175
|
h && (e.value.triggerTime.hour = Number(h.split(":")[0]), e.value.triggerTime.minute = Number(h.split(":")[1]));
|
|
176
176
|
})
|
|
177
177
|
}, null, 8, ["model-value"])
|
|
178
178
|
])
|
|
179
179
|
]),
|
|
180
|
-
i(
|
|
180
|
+
i(R, {
|
|
181
181
|
"model-value": {
|
|
182
182
|
label: p(o)("report.integration.delayDay"),
|
|
183
183
|
delayDay: e.value.delayDay
|
|
@@ -196,15 +196,15 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
196
196
|
], 64);
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
}),
|
|
199
|
+
}), _t = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, bt = {
|
|
200
200
|
key: 0,
|
|
201
201
|
class: "w-[50%]"
|
|
202
|
-
},
|
|
202
|
+
}, ht = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, wt = {
|
|
203
203
|
key: 0,
|
|
204
204
|
class: "w-[24px] flex items-center"
|
|
205
|
-
},
|
|
205
|
+
}, ke = /* @__PURE__ */ H({
|
|
206
206
|
__name: "MappingDropdown",
|
|
207
|
-
props: /* @__PURE__ */
|
|
207
|
+
props: /* @__PURE__ */ he({
|
|
208
208
|
removable: {
|
|
209
209
|
type: Boolean,
|
|
210
210
|
default: !1
|
|
@@ -229,100 +229,100 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
229
229
|
modelValue: { required: !0 },
|
|
230
230
|
modelModifiers: {}
|
|
231
231
|
}),
|
|
232
|
-
emits: /* @__PURE__ */
|
|
233
|
-
setup(
|
|
234
|
-
const e = X(
|
|
232
|
+
emits: /* @__PURE__ */ he(["remove"], ["update:modelValue"]),
|
|
233
|
+
setup(f, { emit: o }) {
|
|
234
|
+
const e = X(f, "modelValue"), s = f, V = q(
|
|
235
235
|
() => Object.keys(s.options).map((_) => {
|
|
236
|
-
const
|
|
236
|
+
const c = s.options[_];
|
|
237
237
|
return {
|
|
238
|
-
placeholder:
|
|
238
|
+
placeholder: c.placeholder,
|
|
239
239
|
key: _,
|
|
240
|
-
editable:
|
|
241
|
-
dropdownOptions:
|
|
240
|
+
editable: c.editable,
|
|
241
|
+
dropdownOptions: c.dropdownOptions
|
|
242
242
|
};
|
|
243
243
|
})
|
|
244
|
-
), w = (_,
|
|
245
|
-
s.singleValueMode ? e.value = s.type === "number" ? Number(_) : _ :
|
|
244
|
+
), w = (_, c) => {
|
|
245
|
+
s.singleValueMode ? e.value = s.type === "number" ? Number(_) : _ : c && (e.value = {
|
|
246
246
|
...e.value,
|
|
247
|
-
[
|
|
247
|
+
[c]: s.type === "number" ? Number(_) : _
|
|
248
248
|
});
|
|
249
249
|
}, x = (_) => {
|
|
250
|
-
var
|
|
251
|
-
return s.singleValueMode ? s.options.key.placeholder : (
|
|
252
|
-
},
|
|
253
|
-
return (_,
|
|
254
|
-
const h =
|
|
255
|
-
return
|
|
250
|
+
var c;
|
|
251
|
+
return s.singleValueMode ? s.options.key.placeholder : (c = e.value[_.key]) == null ? void 0 : c.toString();
|
|
252
|
+
}, D = (_) => s.singleValueMode ? e.value : e.value[_.key], b = o;
|
|
253
|
+
return (_, c) => {
|
|
254
|
+
const h = S("FmSelect"), $ = S("FmTextField"), u = S("FmTooltip"), y = S("FmIcon");
|
|
255
|
+
return m(), F("div", _t, [
|
|
256
256
|
t("div", {
|
|
257
|
-
class:
|
|
257
|
+
class: je(`${f.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
258
258
|
}, [
|
|
259
|
-
(
|
|
259
|
+
(m(!0), F(O, null, L(V.value, (n) => (m(), F(O, {
|
|
260
260
|
key: n.key
|
|
261
261
|
}, [
|
|
262
|
-
n.editable ? (
|
|
263
|
-
n.dropdownOptions ? (
|
|
262
|
+
n.editable ? (m(), F("div", bt, [
|
|
263
|
+
n.dropdownOptions ? (m(), I(h, {
|
|
264
264
|
key: 0,
|
|
265
|
-
"model-value":
|
|
265
|
+
"model-value": D(n),
|
|
266
266
|
placeholder: n.placeholder,
|
|
267
267
|
items: n.dropdownOptions,
|
|
268
268
|
"shift-menu": !0,
|
|
269
269
|
"onUpdate:modelValue": (g) => w(g, n.key)
|
|
270
|
-
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (
|
|
270
|
+
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (m(), I($, {
|
|
271
271
|
key: 1,
|
|
272
|
-
"model-value":
|
|
272
|
+
"model-value": D(n),
|
|
273
273
|
placeholder: n.placeholder,
|
|
274
|
-
type:
|
|
275
|
-
rules:
|
|
274
|
+
type: f.type,
|
|
275
|
+
rules: f.rules,
|
|
276
276
|
"onUpdate:modelValue": (g) => w(g, n.key)
|
|
277
277
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
|
|
278
|
-
])) : (
|
|
278
|
+
])) : (m(), I(u, {
|
|
279
279
|
key: 1,
|
|
280
280
|
content: x(n),
|
|
281
281
|
class: "w-[50%]"
|
|
282
282
|
}, {
|
|
283
|
-
default:
|
|
284
|
-
t("div",
|
|
283
|
+
default: _e(() => [
|
|
284
|
+
t("div", ht, U(x(n)), 1)
|
|
285
285
|
]),
|
|
286
286
|
_: 2
|
|
287
287
|
}, 1032, ["content"]))
|
|
288
288
|
], 64))), 128))
|
|
289
289
|
], 2),
|
|
290
|
-
|
|
290
|
+
f.removable ? (m(), F("div", wt, [
|
|
291
291
|
i(y, {
|
|
292
292
|
color: "system-error-300",
|
|
293
293
|
class: "cursor-pointer",
|
|
294
294
|
name: "close",
|
|
295
295
|
size: "md",
|
|
296
|
-
onClick:
|
|
296
|
+
onClick: c[0] || (c[0] = (n) => b("remove"))
|
|
297
297
|
})
|
|
298
|
-
])) :
|
|
298
|
+
])) : M("", !0)
|
|
299
299
|
]);
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
}),
|
|
302
|
+
}), Vt = {
|
|
303
303
|
key: 0,
|
|
304
304
|
class: "flex flex-col h-full"
|
|
305
|
-
},
|
|
305
|
+
}, kt = { class: "flex flex-col gap-[16px] pb-[24px]" }, $t = { class: "flex flex-row justify-between items-center gap-2" }, St = { class: "flex flex-row gap-2 items-center" }, Ct = { class: "relative group cursor-pointer" }, Ft = { class: "flex flex-col gap-16 pt-[24px] overflow-scroll" }, Dt = { class: "flex flex-row items-center justify-between gap-2" }, Ut = { class: "w-[25%]" }, Tt = { class: "flex flex-col gap-[16px]" }, At = { class: "flex flex-row items-center max-w-[100%] justify-between" }, It = { class: "flex-grow" }, Rt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Nt = { class: "flex flex-col gap-[16px]" }, Kt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Mt = { class: "flex-grow" }, Pt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, jt = { class: "flex-grow" }, Ot = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Bt = { class: "flex-grow" }, Lt = { class: "flex flex-row items-center gap-x-16" }, Et = {
|
|
306
306
|
key: 0,
|
|
307
307
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
308
|
-
},
|
|
308
|
+
}, Yt = {
|
|
309
309
|
key: 2,
|
|
310
310
|
class: "xs:grid-cols-1 grid-cols-2 grid gap-16"
|
|
311
|
-
},
|
|
311
|
+
}, zt = { class: "flex flex-row items-center gap-x-16" }, qt = {
|
|
312
312
|
key: 3,
|
|
313
313
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
314
|
-
},
|
|
314
|
+
}, Ht = {
|
|
315
315
|
key: 5,
|
|
316
316
|
class: "xs:grid-cols-1 grid-cols-2 grid gap-16"
|
|
317
|
-
},
|
|
317
|
+
}, Xt = { class: "flex flex-row items-center gap-x-16" }, Gt = {
|
|
318
318
|
key: 6,
|
|
319
319
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
320
|
-
},
|
|
320
|
+
}, Qt = {
|
|
321
321
|
key: 8,
|
|
322
322
|
class: "xs:grid-cols-1 grid-cols-2 grid gap-16"
|
|
323
|
-
},
|
|
323
|
+
}, Jt = /* @__PURE__ */ H({
|
|
324
324
|
__name: "Setting",
|
|
325
|
-
props: /* @__PURE__ */
|
|
325
|
+
props: /* @__PURE__ */ he({
|
|
326
326
|
tenantOptions: {
|
|
327
327
|
type: Object,
|
|
328
328
|
required: !0
|
|
@@ -340,33 +340,33 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
340
340
|
modelModifiers: {}
|
|
341
341
|
}),
|
|
342
342
|
emits: ["update:modelValue"],
|
|
343
|
-
setup(
|
|
344
|
-
const { t: o } = J(), e = X(
|
|
345
|
-
() => b.map((
|
|
346
|
-
), h =
|
|
347
|
-
var
|
|
348
|
-
return _.value ? "Connecting" : (r = (
|
|
343
|
+
setup(f) {
|
|
344
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = ge(), V = Ve(), w = fe(), { promptLoader: x } = Ce(), { promptMessage: D } = Ae(), { restaurants: b } = ve(), _ = B(!1), c = q(
|
|
345
|
+
() => b.map((v) => ({ label: v.name, value: v.id }))
|
|
346
|
+
), h = q(() => {
|
|
347
|
+
var v, r;
|
|
348
|
+
return _.value ? "Connecting" : (r = (v = e.value) == null ? void 0 : v.platform) != null && r.accessToken ? "Disconnect" : "Connect";
|
|
349
349
|
}), $ = B(0);
|
|
350
|
-
async function
|
|
351
|
-
var
|
|
350
|
+
async function u() {
|
|
351
|
+
var v;
|
|
352
352
|
if (_.value)
|
|
353
353
|
s.open({ type: "error", message: "Connecting in progress" });
|
|
354
|
-
else if ((
|
|
355
|
-
await
|
|
354
|
+
else if ((v = e.value.platform) != null && v.accessToken)
|
|
355
|
+
await D({
|
|
356
356
|
message: o("report.integration.xero.confirmDisconnect", { name: e.value.name }),
|
|
357
357
|
title: o("report.integration.xero.disconnectTitle")
|
|
358
|
-
}) && (await
|
|
358
|
+
}) && (await Qe(e.value._id), await V.getSettings());
|
|
359
359
|
else if (e.value._id)
|
|
360
360
|
try {
|
|
361
|
-
const r = await
|
|
361
|
+
const r = await Je(e.value._id);
|
|
362
362
|
_.value = !0;
|
|
363
|
-
const
|
|
364
|
-
var
|
|
363
|
+
const K = setInterval(async () => {
|
|
364
|
+
var N;
|
|
365
365
|
$.value += 1;
|
|
366
366
|
try {
|
|
367
367
|
await V.getSettings();
|
|
368
368
|
} finally {
|
|
369
|
-
($.value === 12 || (
|
|
369
|
+
($.value === 12 || (N = e.value.platform) != null && N.accessToken) && (_.value = !1, K && clearInterval(K), $.value = 0);
|
|
370
370
|
}
|
|
371
371
|
}, 5e3);
|
|
372
372
|
window.open(r.redirect, "_blank");
|
|
@@ -377,12 +377,12 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
377
377
|
s.open({ type: "error", message: `invalid accounting ${e.value._id}` });
|
|
378
378
|
}
|
|
379
379
|
async function y() {
|
|
380
|
-
await
|
|
380
|
+
await D({
|
|
381
381
|
message: `Confirm delete ${e.value.name}?`,
|
|
382
382
|
title: "Delete"
|
|
383
383
|
}) && await x(async () => {
|
|
384
384
|
try {
|
|
385
|
-
await
|
|
385
|
+
await Fe(e.value._id), await V.getSettings(), w.back();
|
|
386
386
|
} catch (r) {
|
|
387
387
|
s.open({ type: "error", message: r.message });
|
|
388
388
|
}
|
|
@@ -391,34 +391,34 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
391
391
|
async function n() {
|
|
392
392
|
await x(async () => {
|
|
393
393
|
try {
|
|
394
|
-
await
|
|
395
|
-
} catch (
|
|
396
|
-
s.open({ type: "error", message:
|
|
394
|
+
await De(e.value._id, e.value), await V.getSettings();
|
|
395
|
+
} catch (v) {
|
|
396
|
+
s.open({ type: "error", message: v.message });
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
|
-
function g(
|
|
401
|
-
const r =
|
|
400
|
+
function g(v) {
|
|
401
|
+
const r = f.tenantOptions.data.find((K) => K.value === v);
|
|
402
402
|
r && e.value.platform && (e.value.platform.tenant = {
|
|
403
403
|
id: r.value,
|
|
404
404
|
name: r.label
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
var
|
|
409
|
-
(
|
|
410
|
-
(G,
|
|
407
|
+
function C(v, r) {
|
|
408
|
+
var K, N;
|
|
409
|
+
(N = (K = e.value.platform) == null ? void 0 : K.mappings) != null && N[v] && (e.value.platform.mappings[v] = e.value.platform.mappings[v].filter(
|
|
410
|
+
(G, Y) => Y !== r
|
|
411
411
|
));
|
|
412
412
|
}
|
|
413
|
-
function a(
|
|
414
|
-
var r,
|
|
415
|
-
(
|
|
416
|
-
...e.value.platform.mappings[
|
|
417
|
-
|
|
413
|
+
function a(v) {
|
|
414
|
+
var r, K;
|
|
415
|
+
(K = (r = e.value.platform) == null ? void 0 : r.mappings) != null && K[v] && (e.value.platform.mappings[v] = [
|
|
416
|
+
...e.value.platform.mappings[v],
|
|
417
|
+
v === "items" ? {
|
|
418
418
|
feedmeKey: "",
|
|
419
419
|
xeroAccount: "",
|
|
420
420
|
name: ""
|
|
421
|
-
} :
|
|
421
|
+
} : v === "taxes" ? {
|
|
422
422
|
feedmeKey: "",
|
|
423
423
|
xeroAccount: ""
|
|
424
424
|
} : {
|
|
@@ -430,36 +430,36 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
430
430
|
async function l() {
|
|
431
431
|
await x(async () => {
|
|
432
432
|
try {
|
|
433
|
-
await
|
|
434
|
-
} catch (
|
|
435
|
-
s.open({ type: "error", message:
|
|
433
|
+
await Ue(e.value._id), await V.getSettings();
|
|
434
|
+
} catch (v) {
|
|
435
|
+
s.open({ type: "error", message: v.message });
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
|
-
return
|
|
439
|
+
return $e(async () => {
|
|
440
440
|
await V.getSettings();
|
|
441
|
-
}), (
|
|
442
|
-
var
|
|
443
|
-
const
|
|
444
|
-
return (
|
|
445
|
-
t("div",
|
|
446
|
-
t("div",
|
|
441
|
+
}), (v, r) => {
|
|
442
|
+
var z, ee, te, oe, ae, le, ne, se, ie, re, me, ce, de, T, d, k, P, ue, Ke, Me, Le, Ee, Ye, ze;
|
|
443
|
+
const K = S("FmIcon"), N = S("FmButton"), G = S("FmMenuDivider"), Y = S("FmCircularProgress"), Q = S("FmSelect"), j = S("FmTextField"), E = S("FmSwitch");
|
|
444
|
+
return (ee = (z = e.value) == null ? void 0 : z.platform) != null && ee.mappings ? (m(), F("div", Vt, [
|
|
445
|
+
t("div", kt, [
|
|
446
|
+
t("div", $t, [
|
|
447
447
|
r[10] || (r[10] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
|
|
448
|
-
t("div",
|
|
449
|
-
t("div",
|
|
450
|
-
i(
|
|
448
|
+
t("div", St, [
|
|
449
|
+
t("div", Ct, [
|
|
450
|
+
i(K, {
|
|
451
451
|
name: "refresh",
|
|
452
452
|
class: "p-2 bg-gray-100 rounded-full",
|
|
453
453
|
onClick: l
|
|
454
454
|
}),
|
|
455
455
|
r[9] || (r[9] = t("span", { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, " Repopulate the fields based on the dates selected in Preview. ", -1))
|
|
456
456
|
]),
|
|
457
|
-
i(
|
|
457
|
+
i(N, {
|
|
458
458
|
variant: "tertiary",
|
|
459
459
|
label: "Delete",
|
|
460
460
|
onClick: y
|
|
461
461
|
}),
|
|
462
|
-
i(
|
|
462
|
+
i(N, {
|
|
463
463
|
variant: "primary",
|
|
464
464
|
label: "Update",
|
|
465
465
|
onClick: n
|
|
@@ -468,240 +468,255 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
468
468
|
])
|
|
469
469
|
]),
|
|
470
470
|
i(G, { style: { margin: 0 } }),
|
|
471
|
-
t("div",
|
|
471
|
+
t("div", Ft, [
|
|
472
472
|
r[21] || (r[21] = t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Authenticate with your official Xero account to enable FeedMe to securely upload data to Xero. ", -1)),
|
|
473
|
-
t("div",
|
|
474
|
-
t("div",
|
|
475
|
-
i(
|
|
473
|
+
t("div", Dt, [
|
|
474
|
+
t("div", Ut, [
|
|
475
|
+
i(N, {
|
|
476
476
|
disabled: _.value,
|
|
477
477
|
variant: "primary",
|
|
478
478
|
label: h.value,
|
|
479
|
-
onClick:
|
|
479
|
+
onClick: u
|
|
480
480
|
}, null, 8, ["disabled", "label"])
|
|
481
481
|
]),
|
|
482
|
-
!
|
|
482
|
+
!f.tenantOptions.isLoaded && ((te = e.value.platform) != null && te.accessToken) ? (m(), I(Y, {
|
|
483
483
|
key: 0,
|
|
484
484
|
size: "xl"
|
|
485
|
-
})) :
|
|
485
|
+
})) : M("", !0),
|
|
486
486
|
i(Q, {
|
|
487
487
|
class: "flex-grow",
|
|
488
|
-
items:
|
|
489
|
-
"model-value": (
|
|
490
|
-
placeholder:
|
|
488
|
+
items: f.tenantOptions.data || [],
|
|
489
|
+
"model-value": (oe = e.value.platform.tenant) == null ? void 0 : oe.id,
|
|
490
|
+
placeholder: f.tenantOptions.data ? "Select tenant " : (ae = e.value.platform.tenant) == null ? void 0 : ae.name,
|
|
491
491
|
"onUpdate:modelValue": g
|
|
492
492
|
}, null, 8, ["items", "model-value", "placeholder"])
|
|
493
493
|
]),
|
|
494
|
-
t("div",
|
|
494
|
+
t("div", Tt, [
|
|
495
495
|
r[13] || (r[13] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "General", -1)),
|
|
496
|
-
t("div",
|
|
496
|
+
t("div", At, [
|
|
497
497
|
r[11] || (r[11] = t("div", { class: "w-[25%]" }, "Name", -1)),
|
|
498
|
-
t("div",
|
|
499
|
-
i(
|
|
498
|
+
t("div", It, [
|
|
499
|
+
i(j, {
|
|
500
500
|
modelValue: e.value.name,
|
|
501
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
501
|
+
"onUpdate:modelValue": r[0] || (r[0] = (Z) => e.value.name = Z)
|
|
502
502
|
}, null, 8, ["modelValue"])
|
|
503
503
|
])
|
|
504
504
|
]),
|
|
505
|
-
t("div",
|
|
505
|
+
t("div", Rt, [
|
|
506
506
|
r[12] || (r[12] = t("div", { class: "w-[25%]" }, "Location", -1)),
|
|
507
507
|
i(Q, {
|
|
508
508
|
modelValue: e.value.platform.locationIds,
|
|
509
|
-
"onUpdate:modelValue": r[1] || (r[1] = (
|
|
509
|
+
"onUpdate:modelValue": r[1] || (r[1] = (Z) => e.value.platform.locationIds = Z),
|
|
510
510
|
multiselect: !0,
|
|
511
|
-
items:
|
|
511
|
+
items: c.value,
|
|
512
512
|
placeholder: "Select location",
|
|
513
513
|
class: "flex-grow"
|
|
514
514
|
}, null, 8, ["modelValue", "items"])
|
|
515
515
|
])
|
|
516
516
|
]),
|
|
517
|
-
i(
|
|
517
|
+
i(Ne, {
|
|
518
518
|
modelValue: e.value.platform,
|
|
519
|
-
"onUpdate:modelValue": r[2] || (r[2] = (
|
|
519
|
+
"onUpdate:modelValue": r[2] || (r[2] = (Z) => e.value.platform = Z),
|
|
520
520
|
label: "upload",
|
|
521
|
-
"last-upload-date": (
|
|
521
|
+
"last-upload-date": (le = e.value.platform) == null ? void 0 : le.lastUploadDate
|
|
522
522
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
523
|
-
t("div",
|
|
523
|
+
t("div", Nt, [
|
|
524
524
|
r[20] || (r[20] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "Mapping", -1)),
|
|
525
|
-
t("div",
|
|
525
|
+
t("div", Kt, [
|
|
526
526
|
r[14] || (r[14] = t("div", { class: "w-[25%]" }, "Contact", -1)),
|
|
527
527
|
t("div", Mt, [
|
|
528
|
-
i(
|
|
528
|
+
i(j, {
|
|
529
529
|
modelValue: e.value.platform.mappings.contact.xeroAccount,
|
|
530
|
-
"onUpdate:modelValue": r[3] || (r[3] = (
|
|
530
|
+
"onUpdate:modelValue": r[3] || (r[3] = (Z) => e.value.platform.mappings.contact.xeroAccount = Z),
|
|
531
531
|
placeholder: "Contact account number"
|
|
532
532
|
}, null, 8, ["modelValue"])
|
|
533
533
|
])
|
|
534
534
|
]),
|
|
535
|
-
t("div",
|
|
535
|
+
t("div", Pt, [
|
|
536
536
|
r[15] || (r[15] = t("div", { class: "w-[25%]" }, "Discount as Item", -1)),
|
|
537
|
-
t("div",
|
|
538
|
-
i(
|
|
537
|
+
t("div", jt, [
|
|
538
|
+
i(E, {
|
|
539
539
|
"model-value": e.value.platform.discountItem ?? !1,
|
|
540
540
|
style: { gap: 0 },
|
|
541
|
-
"onUpdate:modelValue": r[4] || (r[4] = (
|
|
542
|
-
e.value.platform.discountItem =
|
|
541
|
+
"onUpdate:modelValue": r[4] || (r[4] = (Z) => {
|
|
542
|
+
e.value.platform.discountItem = Z;
|
|
543
543
|
})
|
|
544
544
|
}, null, 8, ["model-value"])
|
|
545
545
|
])
|
|
546
546
|
]),
|
|
547
|
-
t("div",
|
|
547
|
+
t("div", Ot, [
|
|
548
548
|
r[16] || (r[16] = t("div", { class: "w-[25%]" }, "Combine Refund", -1)),
|
|
549
|
-
t("div",
|
|
550
|
-
i(
|
|
549
|
+
t("div", Bt, [
|
|
550
|
+
i(E, {
|
|
551
551
|
"model-value": e.value.platform.mappings.isCombineRefund ?? !1,
|
|
552
552
|
style: { gap: 0 },
|
|
553
|
-
"onUpdate:modelValue": r[5] || (r[5] = (
|
|
554
|
-
e.value.platform.mappings.isCombineRefund =
|
|
553
|
+
"onUpdate:modelValue": r[5] || (r[5] = (Z) => {
|
|
554
|
+
e.value.platform.mappings.isCombineRefund = Z;
|
|
555
555
|
})
|
|
556
556
|
}, null, 8, ["model-value"])
|
|
557
557
|
])
|
|
558
558
|
]),
|
|
559
|
-
t("div",
|
|
559
|
+
t("div", Lt, [
|
|
560
560
|
r[17] || (r[17] = t("div", { class: "fm-typo-en-title-sm-800" }, "Taxes", -1)),
|
|
561
|
-
i(
|
|
561
|
+
i(N, {
|
|
562
562
|
variant: "primary",
|
|
563
563
|
icon: "add",
|
|
564
564
|
onClick: r[6] || (r[6] = () => a("taxes"))
|
|
565
565
|
})
|
|
566
566
|
]),
|
|
567
|
-
|
|
568
|
-
!
|
|
567
|
+
f.taxOptions.isError || e.value.platform.accessToken == null ? (m(), F("div", Et, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : M("", !0),
|
|
568
|
+
!f.taxOptions.isLoaded && ((ne = e.value.platform) != null && ne.accessToken) ? (m(), I(Y, {
|
|
569
569
|
key: 1,
|
|
570
570
|
size: "xl"
|
|
571
|
-
})) :
|
|
572
|
-
((
|
|
573
|
-
(
|
|
574
|
-
key: `tax-${
|
|
575
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
576
|
-
"onUpdate:modelValue": (
|
|
571
|
+
})) : M("", !0),
|
|
572
|
+
((se = f.taxOptions.data) == null ? void 0 : se.length) > 0 ? (m(), F("div", Yt, [
|
|
573
|
+
(m(!0), F(O, null, L((me = (re = (ie = e.value) == null ? void 0 : ie.platform) == null ? void 0 : re.mappings) == null ? void 0 : me.taxes, (Z, W) => (m(), I(ke, {
|
|
574
|
+
key: `tax-${W}`,
|
|
575
|
+
modelValue: e.value.platform.mappings.taxes[W],
|
|
576
|
+
"onUpdate:modelValue": (be) => e.value.platform.mappings.taxes[W] = be,
|
|
577
577
|
options: {
|
|
578
578
|
feedmeKey: { placeholder: "Feedme Key", editable: !0 },
|
|
579
579
|
xeroAccount: {
|
|
580
580
|
placeholder: "Select Tax",
|
|
581
581
|
editable: !0,
|
|
582
|
-
dropdownOptions:
|
|
582
|
+
dropdownOptions: f.taxOptions.data ?? []
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
removable: !0,
|
|
586
|
+
onRemove: () => C("taxes", W)
|
|
587
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128)),
|
|
588
|
+
(m(!0), F(O, null, L((T = (de = (ce = e.value) == null ? void 0 : ce.platform) == null ? void 0 : de.mappings) == null ? void 0 : T.taxRoundingAdjustments, (Z, W) => (m(), I(ke, {
|
|
589
|
+
key: `tax-rounding-adjustment-${W}`,
|
|
590
|
+
modelValue: e.value.platform.mappings.taxRoundingAdjustments[W],
|
|
591
|
+
"onUpdate:modelValue": (be) => e.value.platform.mappings.taxRoundingAdjustments[W] = be,
|
|
592
|
+
options: {
|
|
593
|
+
feedmeKey: { placeholder: "Feedme Key", editable: !0 },
|
|
594
|
+
xeroAccount: {
|
|
595
|
+
placeholder: "Select Tax Rounding Adjustment",
|
|
596
|
+
editable: !0,
|
|
597
|
+
dropdownOptions: f.accountCodeOptions.data ?? []
|
|
583
598
|
}
|
|
584
599
|
},
|
|
585
600
|
removable: !0,
|
|
586
|
-
onRemove: () =>
|
|
601
|
+
onRemove: () => C("taxRoundingAdjustments", W)
|
|
587
602
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
588
|
-
])) :
|
|
589
|
-
t("div",
|
|
603
|
+
])) : M("", !0),
|
|
604
|
+
t("div", zt, [
|
|
590
605
|
r[18] || (r[18] = t("div", { class: "fm-typo-en-title-sm-800" }, "Items", -1)),
|
|
591
|
-
i(
|
|
606
|
+
i(N, {
|
|
592
607
|
variant: "primary",
|
|
593
608
|
icon: "add",
|
|
594
609
|
onClick: r[7] || (r[7] = () => a("items"))
|
|
595
610
|
})
|
|
596
611
|
]),
|
|
597
|
-
|
|
598
|
-
!
|
|
612
|
+
f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (m(), F("div", qt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : M("", !0),
|
|
613
|
+
!f.accountCodeOptions.isLoaded && ((d = e.value.platform) != null && d.accessToken) ? (m(), I(Y, {
|
|
599
614
|
key: 4,
|
|
600
615
|
size: "xl"
|
|
601
|
-
})) :
|
|
602
|
-
((
|
|
603
|
-
(
|
|
604
|
-
key: `item-${
|
|
605
|
-
modelValue: e.value.platform.mappings.items[
|
|
606
|
-
"onUpdate:modelValue": (
|
|
616
|
+
})) : M("", !0),
|
|
617
|
+
((k = f.accountCodeOptions.data) == null ? void 0 : k.length) > 0 ? (m(), F("div", Ht, [
|
|
618
|
+
(m(!0), F(O, null, L((Ke = (ue = (P = e.value) == null ? void 0 : P.platform) == null ? void 0 : ue.mappings) == null ? void 0 : Ke.items, (Z, W) => (m(), I(ke, {
|
|
619
|
+
key: `item-${W}`,
|
|
620
|
+
modelValue: e.value.platform.mappings.items[W],
|
|
621
|
+
"onUpdate:modelValue": (be) => e.value.platform.mappings.items[W] = be,
|
|
607
622
|
options: {
|
|
608
623
|
feedmeKey: { placeholder: "Feedme Key", editable: !0 },
|
|
609
624
|
xeroAccount: {
|
|
610
625
|
placeholder: "Select Item Code",
|
|
611
626
|
editable: !0,
|
|
612
|
-
dropdownOptions:
|
|
627
|
+
dropdownOptions: f.accountCodeOptions.data ?? []
|
|
613
628
|
}
|
|
614
629
|
},
|
|
615
630
|
removable: !0,
|
|
616
|
-
onRemove: () =>
|
|
631
|
+
onRemove: () => C("items", W)
|
|
617
632
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
618
|
-
])) :
|
|
619
|
-
t("div",
|
|
633
|
+
])) : M("", !0),
|
|
634
|
+
t("div", Xt, [
|
|
620
635
|
r[19] || (r[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Payments", -1)),
|
|
621
|
-
i(
|
|
636
|
+
i(N, {
|
|
622
637
|
variant: "primary",
|
|
623
638
|
icon: "add",
|
|
624
639
|
onClick: r[8] || (r[8] = () => a("payments"))
|
|
625
640
|
})
|
|
626
641
|
]),
|
|
627
|
-
|
|
628
|
-
!
|
|
642
|
+
f.accountCodeOptions.isError || e.value.platform.accessToken == null ? (m(), F("div", Gt, " Error connecting xero. Please connect to your Xero account to view the setting options. ")) : M("", !0),
|
|
643
|
+
!f.accountCodeOptions.isLoaded && ((Me = e.value.platform) != null && Me.accessToken) ? (m(), I(Y, {
|
|
629
644
|
key: 7,
|
|
630
645
|
size: "xl"
|
|
631
|
-
})) :
|
|
632
|
-
((
|
|
633
|
-
(
|
|
634
|
-
key: `payment-${
|
|
635
|
-
modelValue: e.value.platform.mappings.payments[
|
|
636
|
-
"onUpdate:modelValue": (
|
|
646
|
+
})) : M("", !0),
|
|
647
|
+
((Le = f.accountCodeOptions.data) == null ? void 0 : Le.length) > 0 ? (m(), F("div", Qt, [
|
|
648
|
+
(m(!0), F(O, null, L((ze = (Ye = (Ee = e.value) == null ? void 0 : Ee.platform) == null ? void 0 : Ye.mappings) == null ? void 0 : ze.payments, (Z, W) => (m(), I(ke, {
|
|
649
|
+
key: `payment-${W}`,
|
|
650
|
+
modelValue: e.value.platform.mappings.payments[W],
|
|
651
|
+
"onUpdate:modelValue": (be) => e.value.platform.mappings.payments[W] = be,
|
|
637
652
|
options: {
|
|
638
653
|
feedmeKey: { placeholder: "Feedme Key", editable: !0 },
|
|
639
654
|
xeroAccount: {
|
|
640
655
|
placeholder: "Select Payment Code",
|
|
641
656
|
editable: !0,
|
|
642
|
-
dropdownOptions:
|
|
657
|
+
dropdownOptions: f.accountCodeOptions.data ?? []
|
|
643
658
|
}
|
|
644
659
|
},
|
|
645
660
|
removable: !0,
|
|
646
|
-
onRemove: () =>
|
|
661
|
+
onRemove: () => C("payments", W)
|
|
647
662
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
648
|
-
])) :
|
|
663
|
+
])) : M("", !0)
|
|
649
664
|
])
|
|
650
665
|
])
|
|
651
|
-
])) :
|
|
666
|
+
])) : M("", !0);
|
|
652
667
|
};
|
|
653
668
|
}
|
|
654
|
-
}),
|
|
669
|
+
}), Wt = { class: "h-full flex flex-col gap-16" }, Zt = { class: "flex flex-row gap-2 justify-between items-center" }, eo = {
|
|
655
670
|
key: 0,
|
|
656
671
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
657
|
-
},
|
|
672
|
+
}, to = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, oo = /* @__PURE__ */ H({
|
|
658
673
|
__name: "Preview",
|
|
659
674
|
props: {
|
|
660
675
|
modelValue: { required: !0 },
|
|
661
676
|
modelModifiers: {}
|
|
662
677
|
},
|
|
663
678
|
emits: ["update:modelValue"],
|
|
664
|
-
setup(
|
|
665
|
-
const o = B([]), { t: e } = J(), s =
|
|
666
|
-
() => o.value.reduce((
|
|
667
|
-
const $ =
|
|
668
|
-
|
|
669
|
-
date:
|
|
670
|
-
contact:
|
|
671
|
-
status:
|
|
672
|
-
ref:
|
|
679
|
+
setup(f) {
|
|
680
|
+
const o = B([]), { t: e } = J(), s = q(
|
|
681
|
+
() => o.value.reduce((c, h) => {
|
|
682
|
+
const $ = c.length, { invoice: u, payments: y } = h;
|
|
683
|
+
c[$] = {
|
|
684
|
+
date: u.Date,
|
|
685
|
+
contact: u.Contact.ContactID,
|
|
686
|
+
status: u.Status,
|
|
687
|
+
ref: u.Reference
|
|
673
688
|
};
|
|
674
|
-
for (let n = 0; n < Math.max(
|
|
689
|
+
for (let n = 0; n < Math.max(u.LineItems.length, y.length); n++) {
|
|
675
690
|
const g = $ + n;
|
|
676
|
-
|
|
677
|
-
...
|
|
678
|
-
itemDescription:
|
|
679
|
-
itemQuantity:
|
|
680
|
-
itemUnitAmount:
|
|
691
|
+
c[g] || (c[g] = {}), u.LineItems[n] && (c[g] = {
|
|
692
|
+
...c[g],
|
|
693
|
+
itemDescription: u.LineItems[n].Description,
|
|
694
|
+
itemQuantity: u.LineItems[n].Quantity,
|
|
695
|
+
itemUnitAmount: u.LineItems[n].UnitAmount,
|
|
681
696
|
// itemCode: invoice.LineItems[i].ItemCode,
|
|
682
|
-
itemAccount:
|
|
683
|
-
itemTax:
|
|
684
|
-
itemTaxType:
|
|
685
|
-
itemAmount:
|
|
686
|
-
itemDiscount:
|
|
687
|
-
}), y[n] && (
|
|
688
|
-
...
|
|
697
|
+
itemAccount: u.LineItems[n].AccountCode,
|
|
698
|
+
itemTax: u.LineItems[n].TaxAmount,
|
|
699
|
+
itemTaxType: u.LineItems[n].TaxType,
|
|
700
|
+
itemAmount: u.LineItems[n].LineAmount,
|
|
701
|
+
itemDiscount: u.LineItems[n].DiscountAmount
|
|
702
|
+
}), y[n] && (c[g] = {
|
|
703
|
+
...c[g],
|
|
689
704
|
paymentAccount: y[n].Account.Code,
|
|
690
705
|
paymentReference: y[n].Reference,
|
|
691
706
|
paymentAmount: y[n].Amount
|
|
692
707
|
});
|
|
693
708
|
}
|
|
694
|
-
return
|
|
709
|
+
return c;
|
|
695
710
|
}, [])
|
|
696
711
|
), V = [
|
|
697
712
|
{
|
|
698
713
|
accessorKey: "date",
|
|
699
|
-
header: () =>
|
|
714
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
700
715
|
enableSorting: !1
|
|
701
716
|
},
|
|
702
717
|
{
|
|
703
718
|
accessorKey: "status",
|
|
704
|
-
header: () =>
|
|
719
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Status"),
|
|
705
720
|
enableSorting: !1
|
|
706
721
|
},
|
|
707
722
|
{
|
|
@@ -711,7 +726,7 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
711
726
|
},
|
|
712
727
|
{
|
|
713
728
|
accessorKey: "itemDescription",
|
|
714
|
-
header: () =>
|
|
729
|
+
header: () => A("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
|
|
715
730
|
enableSorting: !1
|
|
716
731
|
},
|
|
717
732
|
{
|
|
@@ -731,7 +746,7 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
731
746
|
// },
|
|
732
747
|
{
|
|
733
748
|
accessorKey: "itemAccount",
|
|
734
|
-
header: () =>
|
|
749
|
+
header: () => A("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
|
|
735
750
|
enableSorting: !1
|
|
736
751
|
},
|
|
737
752
|
{
|
|
@@ -769,15 +784,15 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
769
784
|
header: "Payment Amount",
|
|
770
785
|
enableSorting: !1
|
|
771
786
|
}
|
|
772
|
-
], w = X(
|
|
773
|
-
|
|
787
|
+
], w = X(f, "modelValue"), x = B(!1), D = ge(), { dateRange: b } = Ie(ve());
|
|
788
|
+
xe(
|
|
774
789
|
() => b.value,
|
|
775
790
|
async () => {
|
|
776
791
|
if (w.value._id)
|
|
777
792
|
try {
|
|
778
|
-
x.value = !0, o.value = await
|
|
779
|
-
} catch (
|
|
780
|
-
|
|
793
|
+
x.value = !0, o.value = await Te(w.value._id);
|
|
794
|
+
} catch (c) {
|
|
795
|
+
D.open({ message: c.message, type: "error" });
|
|
781
796
|
} finally {
|
|
782
797
|
x.value = !1;
|
|
783
798
|
}
|
|
@@ -788,20 +803,20 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
788
803
|
);
|
|
789
804
|
async function _() {
|
|
790
805
|
try {
|
|
791
|
-
w.value._id ? (x.value = !0, await
|
|
792
|
-
} catch (
|
|
793
|
-
|
|
806
|
+
w.value._id ? (x.value = !0, await Oe(w.value._id), D.open({ message: "Upload successful", type: "success" })) : D.open({ message: "Invalid accounting setting", type: "error" });
|
|
807
|
+
} catch (c) {
|
|
808
|
+
c.message && D.open({ message: c.message, type: "error" }), c.errors && c.errors.forEach((h) => D.open({ message: h.Message, type: "error" }));
|
|
794
809
|
} finally {
|
|
795
810
|
x.value = !1;
|
|
796
811
|
}
|
|
797
812
|
}
|
|
798
|
-
return (
|
|
799
|
-
const $ =
|
|
800
|
-
return
|
|
801
|
-
t("div",
|
|
802
|
-
i(
|
|
813
|
+
return (c, h) => {
|
|
814
|
+
const $ = S("FmButton"), u = S("FmCircularProgress"), y = S("FmTable");
|
|
815
|
+
return m(), F("div", Wt, [
|
|
816
|
+
t("div", Zt, [
|
|
817
|
+
i(Re, {
|
|
803
818
|
"date-range": p(b),
|
|
804
|
-
"onUpdate:dateRange": h[0] || (h[0] = (n) =>
|
|
819
|
+
"onUpdate:dateRange": h[0] || (h[0] = (n) => Se(b) ? b.value = n : null),
|
|
805
820
|
compare: !1
|
|
806
821
|
}, null, 8, ["date-range"]),
|
|
807
822
|
i($, {
|
|
@@ -811,27 +826,27 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
811
826
|
onClick: _
|
|
812
827
|
}, null, 8, ["loading"])
|
|
813
828
|
]),
|
|
814
|
-
x.value ? (
|
|
815
|
-
i(
|
|
816
|
-
t("span",
|
|
817
|
-
])) : s.value.length > 0 ? (
|
|
829
|
+
x.value ? (m(), F("div", eo, [
|
|
830
|
+
i(u, { size: "xl" }),
|
|
831
|
+
t("span", to, U(p(e)("report.common.isLoading")), 1)
|
|
832
|
+
])) : s.value.length > 0 ? (m(), I(y, {
|
|
818
833
|
key: 1,
|
|
819
834
|
class: "flex overflow-y-auto",
|
|
820
835
|
"row-data": s.value,
|
|
821
836
|
"column-defs": V
|
|
822
|
-
}, null, 8, ["row-data"])) :
|
|
837
|
+
}, null, 8, ["row-data"])) : M("", !0)
|
|
823
838
|
]);
|
|
824
839
|
};
|
|
825
840
|
}
|
|
826
|
-
}),
|
|
841
|
+
}), ao = { class: "h-full relative flex flex-col" }, lo = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, no = /* @__PURE__ */ H({
|
|
827
842
|
__name: "Xero",
|
|
828
843
|
props: {
|
|
829
844
|
modelValue: { required: !0 },
|
|
830
845
|
modelModifiers: {}
|
|
831
846
|
},
|
|
832
847
|
emits: ["update:modelValue"],
|
|
833
|
-
setup(
|
|
834
|
-
const { t: o } = J(), e = X(
|
|
848
|
+
setup(f) {
|
|
849
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = B({}), w = B({}), x = B({}), D = [
|
|
835
850
|
{
|
|
836
851
|
label: o("report.integration.setting"),
|
|
837
852
|
value: "setting",
|
|
@@ -842,13 +857,13 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
842
857
|
value: "preview",
|
|
843
858
|
icon: "table"
|
|
844
859
|
}
|
|
845
|
-
], b =
|
|
860
|
+
], b = fe(), _ = q(() => {
|
|
846
861
|
switch (s.value) {
|
|
847
862
|
case "preview":
|
|
848
|
-
return { component:
|
|
863
|
+
return { component: oo };
|
|
849
864
|
case "setting":
|
|
850
865
|
return {
|
|
851
|
-
component:
|
|
866
|
+
component: Jt,
|
|
852
867
|
props: {
|
|
853
868
|
tenantOptions: V.value,
|
|
854
869
|
taxOptions: w.value,
|
|
@@ -859,16 +874,16 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
859
874
|
return null;
|
|
860
875
|
}
|
|
861
876
|
});
|
|
862
|
-
async function
|
|
877
|
+
async function c() {
|
|
863
878
|
if (e.value._id)
|
|
864
879
|
try {
|
|
865
|
-
const
|
|
866
|
-
V.value.data =
|
|
880
|
+
const u = await We(e.value._id);
|
|
881
|
+
V.value.data = u.map((y) => ({
|
|
867
882
|
value: y.id,
|
|
868
883
|
label: y.name
|
|
869
884
|
}));
|
|
870
|
-
} catch (
|
|
871
|
-
console.error("Failed to fetch tenants:",
|
|
885
|
+
} catch (u) {
|
|
886
|
+
console.error("Failed to fetch tenants:", u), V.value.isError = !0;
|
|
872
887
|
} finally {
|
|
873
888
|
V.value.isLoaded = !0;
|
|
874
889
|
}
|
|
@@ -876,13 +891,13 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
876
891
|
async function h() {
|
|
877
892
|
if (e.value._id)
|
|
878
893
|
try {
|
|
879
|
-
const
|
|
880
|
-
w.value.data =
|
|
894
|
+
const u = await Ze(e.value._id);
|
|
895
|
+
w.value.data = u.map((y) => ({
|
|
881
896
|
value: y.Name,
|
|
882
897
|
label: `${y.Name} - (${y.EffectiveRate}%)`
|
|
883
898
|
}));
|
|
884
|
-
} catch (
|
|
885
|
-
console.error("Failed to fetch taxes:",
|
|
899
|
+
} catch (u) {
|
|
900
|
+
console.error("Failed to fetch taxes:", u), w.value.isError = !0;
|
|
886
901
|
} finally {
|
|
887
902
|
w.value.isLoaded = !0;
|
|
888
903
|
}
|
|
@@ -890,58 +905,58 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
890
905
|
async function $() {
|
|
891
906
|
if (e.value._id)
|
|
892
907
|
try {
|
|
893
|
-
const
|
|
894
|
-
x.value.data =
|
|
908
|
+
const u = await et(e.value._id);
|
|
909
|
+
x.value.data = u.map((y) => ({
|
|
895
910
|
value: y.Code,
|
|
896
911
|
label: `${y.Code} ${y.Name} - [${y.Class}_${y.Type}]`
|
|
897
912
|
}));
|
|
898
|
-
} catch (
|
|
899
|
-
console.error("Failed to fetch accounts:",
|
|
913
|
+
} catch (u) {
|
|
914
|
+
console.error("Failed to fetch accounts:", u), x.value.isError = !0;
|
|
900
915
|
} finally {
|
|
901
916
|
x.value.isLoaded = !0;
|
|
902
917
|
}
|
|
903
918
|
}
|
|
904
|
-
return
|
|
919
|
+
return xe(
|
|
905
920
|
() => {
|
|
906
|
-
var
|
|
907
|
-
return (
|
|
921
|
+
var u;
|
|
922
|
+
return (u = e.value.platform) == null ? void 0 : u.accessToken;
|
|
908
923
|
},
|
|
909
|
-
(
|
|
910
|
-
|
|
924
|
+
(u) => {
|
|
925
|
+
u && (c(), h(), $());
|
|
911
926
|
},
|
|
912
927
|
{ immediate: !0 }
|
|
913
|
-
), (
|
|
914
|
-
var
|
|
915
|
-
const n =
|
|
916
|
-
return
|
|
928
|
+
), (u, y) => {
|
|
929
|
+
var C, a, l;
|
|
930
|
+
const n = S("FmPageHead"), g = S("FmTabs");
|
|
931
|
+
return m(), F("div", ao, [
|
|
917
932
|
i(n, {
|
|
918
|
-
title: ((
|
|
933
|
+
title: ((C = e.value) == null ? void 0 : C.name) || "Xero",
|
|
919
934
|
"back-button": !0,
|
|
920
935
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
921
936
|
"onClick:back": p(b).back
|
|
922
937
|
}, {
|
|
923
|
-
description:
|
|
938
|
+
description: _e(() => y[2] || (y[2] = [
|
|
924
939
|
t("div", null, null, -1)
|
|
925
940
|
])),
|
|
926
941
|
_: 1
|
|
927
942
|
}, 8, ["title", "onClick:back"]),
|
|
928
943
|
i(g, {
|
|
929
944
|
"model-value": s.value,
|
|
930
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
931
|
-
items:
|
|
945
|
+
"onUpdate:modelValue": y[0] || (y[0] = (v) => s.value = v),
|
|
946
|
+
items: D
|
|
932
947
|
}, null, 8, ["model-value"]),
|
|
933
|
-
t("div",
|
|
934
|
-
(
|
|
948
|
+
t("div", lo, [
|
|
949
|
+
(m(), I(we((a = _.value) == null ? void 0 : a.component), He({
|
|
935
950
|
modelValue: e.value,
|
|
936
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
951
|
+
"onUpdate:modelValue": y[1] || (y[1] = (v) => e.value = v)
|
|
937
952
|
}, (l = _.value) == null ? void 0 : l.props), null, 16, ["modelValue"]))
|
|
938
953
|
])
|
|
939
954
|
]);
|
|
940
955
|
};
|
|
941
956
|
}
|
|
942
|
-
}),
|
|
957
|
+
}), so = { class: "mt-6 mb-6" }, io = { class: "list-disc pl-6 space-y-1" }, Pe = /* @__PURE__ */ H({
|
|
943
958
|
__name: "ReferenceNumberGuideButton",
|
|
944
|
-
setup(
|
|
959
|
+
setup(f) {
|
|
945
960
|
const { t: o } = J(), e = [
|
|
946
961
|
{
|
|
947
962
|
placeholder: "[NO]",
|
|
@@ -1004,29 +1019,29 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1004
1019
|
}
|
|
1005
1020
|
];
|
|
1006
1021
|
return (V, w) => {
|
|
1007
|
-
const x =
|
|
1008
|
-
return
|
|
1022
|
+
const x = S("FmIcon"), D = S("FmTable"), b = S("FmSideSheet");
|
|
1023
|
+
return m(), I(b, {
|
|
1009
1024
|
header: p(o)("report.integration.refNumFormatInfo"),
|
|
1010
1025
|
"dismiss-away": "",
|
|
1011
1026
|
"max-width": 780
|
|
1012
1027
|
}, {
|
|
1013
|
-
"side-sheet-button":
|
|
1028
|
+
"side-sheet-button": _e(() => [
|
|
1014
1029
|
i(x, {
|
|
1015
1030
|
name: "info",
|
|
1016
1031
|
color: "primary",
|
|
1017
1032
|
class: "cursor-pointer p-2"
|
|
1018
1033
|
})
|
|
1019
1034
|
]),
|
|
1020
|
-
default:
|
|
1021
|
-
t("div",
|
|
1022
|
-
t("ul",
|
|
1023
|
-
t("li", null,
|
|
1024
|
-
t("li", null,
|
|
1025
|
-
t("li", null,
|
|
1026
|
-
t("li", null,
|
|
1035
|
+
default: _e(() => [
|
|
1036
|
+
t("div", so, [
|
|
1037
|
+
t("ul", io, [
|
|
1038
|
+
t("li", null, U(p(o)("report.integration.refNumGuide.1stPoint")), 1),
|
|
1039
|
+
t("li", null, U(p(o)("report.integration.refNumGuide.2ndPoint")), 1),
|
|
1040
|
+
t("li", null, U(p(o)("report.integration.refNumGuide.3ndPoint")), 1),
|
|
1041
|
+
t("li", null, U(p(o)("report.integration.refNumGuide.4thPoint")), 1)
|
|
1027
1042
|
])
|
|
1028
1043
|
]),
|
|
1029
|
-
i(
|
|
1044
|
+
i(D, {
|
|
1030
1045
|
"row-data": e,
|
|
1031
1046
|
"column-defs": s,
|
|
1032
1047
|
"shrink-at": !1,
|
|
@@ -1037,27 +1052,27 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1037
1052
|
}, 8, ["header"]);
|
|
1038
1053
|
};
|
|
1039
1054
|
}
|
|
1040
|
-
}),
|
|
1055
|
+
}), ro = {
|
|
1041
1056
|
key: 0,
|
|
1042
1057
|
class: "flex flex-col h-full"
|
|
1043
|
-
},
|
|
1058
|
+
}, mo = { class: "flex flex-col gap-16 pb-[24px]" }, co = { class: "flex flex-row justify-between items-center gap-2" }, uo = { class: "fm-typo-en-title-sm-800" }, po = { class: "flex flex-row gap-2 items-center" }, fo = { class: "relative group cursor-pointer" }, vo = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, go = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, yo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xo = { class: "flex flex-row items-center justify-between" }, _o = { class: "w-[25%]" }, bo = { class: "flex-grow" }, ho = { class: "flex flex-row items-center justify-between" }, wo = { class: "w-[25%]" }, Vo = { class: "flex-grow" }, ko = { class: "flex flex-col gap-16" }, $o = { class: "fm-typo-en-title-sm-800" }, So = { class: "flex flex-row items-center max-w-[100%]" }, Co = { class: "w-[25%]" }, Fo = { class: "flex-grow" }, Do = { class: "flex flex-row items-center max-w-[100%]" }, Uo = { class: "w-[25%]" }, To = { class: "flex flex-row items-center max-w-[100%]" }, Ao = { class: "w-[25%]" }, Io = { class: "flex flex-col gap-16" }, Ro = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, No = { class: "flex flex-col gap-16 pt-3 pb-3" }, Ko = { class: "flex flex-row items-center gap-5" }, Mo = { class: "fm-typo-en-title-sm-800" }, Po = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, jo = { class: "flex flex-row items-center gap-x-16" }, Oo = { class: "fm-typo-en-title-sm-800" }, Bo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Lo = { class: "flex flex-row items-center gap-x-16" }, Eo = { class: "fm-typo-en-title-sm-800" }, Yo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, zo = { class: "flex flex-row items-center gap-x-16" }, qo = { class: "fm-typo-en-title-sm-800" }, Ho = /* @__PURE__ */ H({
|
|
1044
1059
|
__name: "Setting",
|
|
1045
1060
|
props: {
|
|
1046
1061
|
modelValue: { required: !0 },
|
|
1047
1062
|
modelModifiers: {}
|
|
1048
1063
|
},
|
|
1049
1064
|
emits: ["update:modelValue"],
|
|
1050
|
-
setup(
|
|
1051
|
-
const o = X(
|
|
1052
|
-
() =>
|
|
1065
|
+
setup(f) {
|
|
1066
|
+
const o = X(f, "modelValue"), e = ge(), s = Ve(), V = fe(), { promptLoader: w } = Ce(), { promptMessage: x } = Ae(), { restaurants: D } = ve(), b = q(
|
|
1067
|
+
() => D.map((a) => ({ label: a.name, value: a.id }))
|
|
1053
1068
|
), { t: _ } = J();
|
|
1054
|
-
async function
|
|
1069
|
+
async function c() {
|
|
1055
1070
|
await x({
|
|
1056
1071
|
message: _("report.messages.confirmDelete", { name: o.value.name }),
|
|
1057
1072
|
title: _("report.common.delete")
|
|
1058
1073
|
}) && await w(async () => {
|
|
1059
1074
|
try {
|
|
1060
|
-
await
|
|
1075
|
+
await Fe(o.value._id), await s.getSettings(), V.back();
|
|
1061
1076
|
} catch (l) {
|
|
1062
1077
|
e.open({ type: "error", message: l.message });
|
|
1063
1078
|
}
|
|
@@ -1066,21 +1081,21 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1066
1081
|
async function h() {
|
|
1067
1082
|
await w(async () => {
|
|
1068
1083
|
try {
|
|
1069
|
-
await
|
|
1084
|
+
await De(o.value._id, o.value), await s.getSettings();
|
|
1070
1085
|
} catch (a) {
|
|
1071
1086
|
e.open({ type: "error", message: a.message });
|
|
1072
1087
|
}
|
|
1073
1088
|
});
|
|
1074
1089
|
}
|
|
1075
1090
|
function $(a, l) {
|
|
1076
|
-
var
|
|
1077
|
-
(r = (
|
|
1078
|
-
(
|
|
1091
|
+
var v, r;
|
|
1092
|
+
(r = (v = o.value.platform) == null ? void 0 : v.mappings) != null && r[a] && (o.value.platform.mappings[a] = o.value.platform.mappings[a].filter(
|
|
1093
|
+
(K, N) => N !== l
|
|
1079
1094
|
));
|
|
1080
1095
|
}
|
|
1081
|
-
function
|
|
1082
|
-
var l,
|
|
1083
|
-
if ((
|
|
1096
|
+
function u(a) {
|
|
1097
|
+
var l, v;
|
|
1098
|
+
if ((v = (l = o.value.platform) == null ? void 0 : l.mappings) != null && v[a]) {
|
|
1084
1099
|
let r;
|
|
1085
1100
|
switch (a) {
|
|
1086
1101
|
case "items":
|
|
@@ -1114,27 +1129,27 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1114
1129
|
const y = [
|
|
1115
1130
|
{
|
|
1116
1131
|
label: _("report.integration.grouping.byDay"),
|
|
1117
|
-
value:
|
|
1132
|
+
value: ye.BY_DAY
|
|
1118
1133
|
},
|
|
1119
1134
|
{
|
|
1120
1135
|
label: _("report.integration.grouping.byDayItem"),
|
|
1121
|
-
value:
|
|
1136
|
+
value: ye.BY_DAY_ITEM
|
|
1122
1137
|
},
|
|
1123
1138
|
{
|
|
1124
1139
|
label: _("report.integration.grouping.byInvoice"),
|
|
1125
|
-
value:
|
|
1140
|
+
value: ye.BY_INVOICE
|
|
1126
1141
|
},
|
|
1127
1142
|
{
|
|
1128
1143
|
label: _("report.integration.grouping.byDaySeparatePayment"),
|
|
1129
|
-
value:
|
|
1144
|
+
value: ye.BY_DAY_SEPARATE_PAYMENT
|
|
1130
1145
|
}
|
|
1131
1146
|
];
|
|
1132
1147
|
function n({
|
|
1133
1148
|
key: a,
|
|
1134
1149
|
value: l
|
|
1135
1150
|
}) {
|
|
1136
|
-
var
|
|
1137
|
-
(r = (
|
|
1151
|
+
var v, r;
|
|
1152
|
+
(r = (v = o.value) == null ? void 0 : v.platform) != null && r.mappings && (o.value.platform.mappings[a] = l);
|
|
1138
1153
|
}
|
|
1139
1154
|
function g(a) {
|
|
1140
1155
|
return {
|
|
@@ -1142,37 +1157,37 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1142
1157
|
account: { placeholder: a, editable: !0 }
|
|
1143
1158
|
};
|
|
1144
1159
|
}
|
|
1145
|
-
async function
|
|
1160
|
+
async function C() {
|
|
1146
1161
|
await w(async () => {
|
|
1147
1162
|
try {
|
|
1148
|
-
await
|
|
1163
|
+
await Ue(o.value._id), await s.getSettings();
|
|
1149
1164
|
} catch (a) {
|
|
1150
1165
|
e.open({ type: "error", message: a.message });
|
|
1151
1166
|
}
|
|
1152
1167
|
});
|
|
1153
1168
|
}
|
|
1154
|
-
return
|
|
1169
|
+
return $e(async () => {
|
|
1155
1170
|
await s.getSettings();
|
|
1156
1171
|
}), (a, l) => {
|
|
1157
|
-
var
|
|
1158
|
-
const
|
|
1159
|
-
return (Q = (
|
|
1160
|
-
t("div",
|
|
1161
|
-
t("div",
|
|
1162
|
-
t("div",
|
|
1163
|
-
t("div",
|
|
1164
|
-
t("div",
|
|
1165
|
-
i(
|
|
1172
|
+
var Y, Q, j, E, z, ee, te, oe, ae, le, ne, se, ie, re, me, ce, de, T;
|
|
1173
|
+
const v = S("FmIcon"), r = S("FmButton"), K = S("FmMenuDivider"), N = S("FmTextField"), G = S("FmSelect");
|
|
1174
|
+
return (Q = (Y = o.value) == null ? void 0 : Y.platform) != null && Q.mappings ? (m(), F("div", ro, [
|
|
1175
|
+
t("div", mo, [
|
|
1176
|
+
t("div", co, [
|
|
1177
|
+
t("div", uo, U(p(_)("report.integration.bukku.connect")), 1),
|
|
1178
|
+
t("div", po, [
|
|
1179
|
+
t("div", fo, [
|
|
1180
|
+
i(v, {
|
|
1166
1181
|
name: "refresh",
|
|
1167
1182
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1168
|
-
onClick:
|
|
1183
|
+
onClick: C
|
|
1169
1184
|
}),
|
|
1170
|
-
t("span",
|
|
1185
|
+
t("span", vo, U(p(_)("report.integration.refreshSetting")), 1)
|
|
1171
1186
|
]),
|
|
1172
1187
|
i(r, {
|
|
1173
1188
|
variant: "tertiary",
|
|
1174
1189
|
label: p(_)("report.common.delete"),
|
|
1175
|
-
onClick:
|
|
1190
|
+
onClick: c
|
|
1176
1191
|
}, null, 8, ["label"]),
|
|
1177
1192
|
i(r, {
|
|
1178
1193
|
variant: "primary",
|
|
@@ -1182,56 +1197,56 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1182
1197
|
])
|
|
1183
1198
|
])
|
|
1184
1199
|
]),
|
|
1185
|
-
i(
|
|
1186
|
-
t("div",
|
|
1187
|
-
t("div",
|
|
1188
|
-
t("div",
|
|
1189
|
-
t("div",
|
|
1190
|
-
t("div",
|
|
1191
|
-
i(
|
|
1200
|
+
i(K, { style: { margin: 0 } }),
|
|
1201
|
+
t("div", go, [
|
|
1202
|
+
t("div", yo, U(p(_)("report.integration.bukku.authentication")), 1),
|
|
1203
|
+
t("div", xo, [
|
|
1204
|
+
t("div", _o, U(p(_)("report.integration.subdomain")), 1),
|
|
1205
|
+
t("div", bo, [
|
|
1206
|
+
i(N, {
|
|
1192
1207
|
modelValue: o.value.platform.subdomain,
|
|
1193
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
1208
|
+
"onUpdate:modelValue": l[0] || (l[0] = (d) => o.value.platform.subdomain = d),
|
|
1194
1209
|
placeholder: p(_)("report.integration.subdomain")
|
|
1195
1210
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1196
1211
|
])
|
|
1197
1212
|
]),
|
|
1198
|
-
t("div",
|
|
1199
|
-
t("div",
|
|
1200
|
-
t("div",
|
|
1201
|
-
i(
|
|
1213
|
+
t("div", ho, [
|
|
1214
|
+
t("div", wo, U(p(_)("report.integration.token")), 1),
|
|
1215
|
+
t("div", Vo, [
|
|
1216
|
+
i(N, {
|
|
1202
1217
|
modelValue: o.value.platform.token,
|
|
1203
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
1218
|
+
"onUpdate:modelValue": l[1] || (l[1] = (d) => o.value.platform.token = d),
|
|
1204
1219
|
placeholder: p(_)("report.integration.token")
|
|
1205
1220
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1206
1221
|
])
|
|
1207
1222
|
]),
|
|
1208
|
-
t("div",
|
|
1209
|
-
t("div",
|
|
1210
|
-
t("div",
|
|
1211
|
-
t("div",
|
|
1212
|
-
t("div",
|
|
1213
|
-
i(
|
|
1223
|
+
t("div", ko, [
|
|
1224
|
+
t("div", $o, U(p(_)("report.integration.general")), 1),
|
|
1225
|
+
t("div", So, [
|
|
1226
|
+
t("div", Co, U(p(_)("report.common.name")), 1),
|
|
1227
|
+
t("div", Fo, [
|
|
1228
|
+
i(N, {
|
|
1214
1229
|
modelValue: o.value.name,
|
|
1215
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
1230
|
+
"onUpdate:modelValue": l[2] || (l[2] = (d) => o.value.name = d)
|
|
1216
1231
|
}, null, 8, ["modelValue"])
|
|
1217
1232
|
])
|
|
1218
1233
|
]),
|
|
1219
|
-
t("div",
|
|
1220
|
-
t("div",
|
|
1234
|
+
t("div", Do, [
|
|
1235
|
+
t("div", Uo, U(p(_)("report.common.location")), 1),
|
|
1221
1236
|
i(G, {
|
|
1222
1237
|
modelValue: o.value.platform.locationIds,
|
|
1223
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
1238
|
+
"onUpdate:modelValue": l[3] || (l[3] = (d) => o.value.platform.locationIds = d),
|
|
1224
1239
|
multiselect: !0,
|
|
1225
1240
|
items: b.value,
|
|
1226
1241
|
placeholder: "Select location",
|
|
1227
1242
|
class: "flex-grow"
|
|
1228
1243
|
}, null, 8, ["modelValue", "items"])
|
|
1229
1244
|
]),
|
|
1230
|
-
t("div",
|
|
1231
|
-
t("div",
|
|
1245
|
+
t("div", To, [
|
|
1246
|
+
t("div", Ao, U(p(_)("report.integration.grouping.title")), 1),
|
|
1232
1247
|
i(G, {
|
|
1233
1248
|
modelValue: o.value.platform.grouping,
|
|
1234
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
1249
|
+
"onUpdate:modelValue": l[4] || (l[4] = (d) => o.value.platform.grouping = d),
|
|
1235
1250
|
multiselect: !1,
|
|
1236
1251
|
items: y,
|
|
1237
1252
|
placeholder: "Select grouping",
|
|
@@ -1239,9 +1254,9 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1239
1254
|
}, null, 8, ["modelValue"])
|
|
1240
1255
|
])
|
|
1241
1256
|
]),
|
|
1242
|
-
t("div",
|
|
1243
|
-
t("div",
|
|
1244
|
-
i(
|
|
1257
|
+
t("div", Io, [
|
|
1258
|
+
t("div", Ro, [
|
|
1259
|
+
i(R, {
|
|
1245
1260
|
"model-value": {
|
|
1246
1261
|
key: "Contact",
|
|
1247
1262
|
account: o.value.platform.mappings.contact.account
|
|
@@ -1256,26 +1271,26 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1256
1271
|
editable: !0
|
|
1257
1272
|
}
|
|
1258
1273
|
},
|
|
1259
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
1260
|
-
var
|
|
1261
|
-
(
|
|
1274
|
+
"onUpdate:modelValue": l[5] || (l[5] = (d) => {
|
|
1275
|
+
var k, P, ue;
|
|
1276
|
+
(ue = (P = (k = o.value) == null ? void 0 : k.platform) == null ? void 0 : P.mappings) != null && ue.contact && (o.value.platform.mappings.contact.account = d.account);
|
|
1262
1277
|
})
|
|
1263
1278
|
}, null, 8, ["model-value"]),
|
|
1264
|
-
i(
|
|
1279
|
+
i(R, {
|
|
1265
1280
|
"model-value": {
|
|
1266
1281
|
key: "Rounding",
|
|
1267
1282
|
account: o.value.platform.mappings.rounding.account
|
|
1268
1283
|
},
|
|
1269
1284
|
options: g("Rounding"),
|
|
1270
|
-
"onUpdate:modelValue": l[6] || (l[6] = (
|
|
1271
|
-
var
|
|
1272
|
-
(
|
|
1285
|
+
"onUpdate:modelValue": l[6] || (l[6] = (d) => {
|
|
1286
|
+
var k, P, ue;
|
|
1287
|
+
(ue = (P = (k = o.value) == null ? void 0 : k.platform) == null ? void 0 : P.mappings) != null && ue.rounding && (o.value.platform.mappings.rounding.account = d.account);
|
|
1273
1288
|
})
|
|
1274
1289
|
}, null, 8, ["model-value", "options"]),
|
|
1275
|
-
(
|
|
1276
|
-
key: `charge-${
|
|
1277
|
-
modelValue: o.value.platform.mappings.charges[
|
|
1278
|
-
"onUpdate:modelValue": (
|
|
1290
|
+
(m(!0), F(O, null, L((z = (E = (j = o.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : z.charges, (d, k) => (m(), I(R, {
|
|
1291
|
+
key: `charge-${k}`,
|
|
1292
|
+
modelValue: o.value.platform.mappings.charges[k],
|
|
1293
|
+
"onUpdate:modelValue": (P) => o.value.platform.mappings.charges[k] = P,
|
|
1279
1294
|
options: {
|
|
1280
1295
|
key: {
|
|
1281
1296
|
placeholder: "Key",
|
|
@@ -1289,173 +1304,183 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1289
1304
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
1290
1305
|
])
|
|
1291
1306
|
]),
|
|
1292
|
-
t("div",
|
|
1293
|
-
t("div", No, [
|
|
1294
|
-
t("div", Mo, F(p(_)("report.integration.refNumFormat")), 1),
|
|
1295
|
-
i(Ke)
|
|
1296
|
-
]),
|
|
1307
|
+
t("div", No, [
|
|
1297
1308
|
t("div", Ko, [
|
|
1298
|
-
|
|
1309
|
+
t("div", Mo, U(p(_)("report.integration.refNumFormat")), 1),
|
|
1310
|
+
i(Pe)
|
|
1311
|
+
]),
|
|
1312
|
+
t("div", Po, [
|
|
1313
|
+
i(R, {
|
|
1299
1314
|
"model-value": {
|
|
1300
1315
|
key: "Invoice no",
|
|
1301
1316
|
account: o.value.platform.mappings.invoiceDocNo
|
|
1302
1317
|
},
|
|
1303
1318
|
options: g("Invoice no"),
|
|
1304
|
-
"onUpdate:modelValue": l[7] || (l[7] = (
|
|
1319
|
+
"onUpdate:modelValue": l[7] || (l[7] = (d) => n({ key: "invoiceDocNo", value: d.account }))
|
|
1305
1320
|
}, null, 8, ["model-value", "options"]),
|
|
1306
|
-
i(
|
|
1321
|
+
i(R, {
|
|
1307
1322
|
"model-value": {
|
|
1308
1323
|
key: "Credit note no",
|
|
1309
1324
|
account: o.value.platform.mappings.creditNoteDocNo
|
|
1310
1325
|
},
|
|
1311
1326
|
options: g("Credit note no"),
|
|
1312
|
-
"onUpdate:modelValue": l[8] || (l[8] = (
|
|
1327
|
+
"onUpdate:modelValue": l[8] || (l[8] = (d) => n({ key: "creditNoteDocNo", value: d.account }))
|
|
1313
1328
|
}, null, 8, ["model-value", "options"]),
|
|
1314
|
-
i(
|
|
1329
|
+
i(R, {
|
|
1315
1330
|
"model-value": {
|
|
1316
1331
|
key: "Payment no",
|
|
1317
1332
|
account: o.value.platform.mappings.paymentDocNo
|
|
1318
1333
|
},
|
|
1319
1334
|
options: g("Payment no"),
|
|
1320
|
-
"onUpdate:modelValue": l[9] || (l[9] = (
|
|
1335
|
+
"onUpdate:modelValue": l[9] || (l[9] = (d) => n({ key: "paymentDocNo", value: d.account }))
|
|
1321
1336
|
}, null, 8, ["model-value", "options"]),
|
|
1322
|
-
i(
|
|
1337
|
+
i(R, {
|
|
1323
1338
|
"model-value": {
|
|
1324
1339
|
key: "Refund no",
|
|
1325
1340
|
account: o.value.platform.mappings.refundDocNo
|
|
1326
1341
|
},
|
|
1327
1342
|
options: g("Refund no"),
|
|
1328
|
-
"onUpdate:modelValue": l[10] || (l[10] = (
|
|
1343
|
+
"onUpdate:modelValue": l[10] || (l[10] = (d) => n({ key: "refundDocNo", value: d.account }))
|
|
1329
1344
|
}, null, 8, ["model-value", "options"])
|
|
1330
1345
|
])
|
|
1331
1346
|
]),
|
|
1332
|
-
i(
|
|
1347
|
+
i(Ne, {
|
|
1333
1348
|
modelValue: o.value.platform,
|
|
1334
|
-
"onUpdate:modelValue": l[11] || (l[11] = (
|
|
1349
|
+
"onUpdate:modelValue": l[11] || (l[11] = (d) => o.value.platform = d),
|
|
1335
1350
|
label: "upload",
|
|
1336
|
-
"last-upload-date": (
|
|
1351
|
+
"last-upload-date": (ee = o.value.platform) == null ? void 0 : ee.lastUploadDate
|
|
1337
1352
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
1338
|
-
t("div",
|
|
1339
|
-
t("div",
|
|
1353
|
+
t("div", jo, [
|
|
1354
|
+
t("div", Oo, U(p(_)("report.integration.items")), 1),
|
|
1340
1355
|
i(r, {
|
|
1341
1356
|
variant: "primary",
|
|
1342
1357
|
icon: "add",
|
|
1343
|
-
onClick: l[12] || (l[12] = () =>
|
|
1358
|
+
onClick: l[12] || (l[12] = () => u("items"))
|
|
1344
1359
|
})
|
|
1345
1360
|
]),
|
|
1346
|
-
t("div",
|
|
1347
|
-
(
|
|
1348
|
-
key: `item-${
|
|
1349
|
-
modelValue: o.value.platform.mappings.items[
|
|
1350
|
-
"onUpdate:modelValue": (
|
|
1361
|
+
t("div", Bo, [
|
|
1362
|
+
(m(!0), F(O, null, L((ae = (oe = (te = o.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (d, k) => (m(), I(R, {
|
|
1363
|
+
key: `item-${k}`,
|
|
1364
|
+
modelValue: o.value.platform.mappings.items[k],
|
|
1365
|
+
"onUpdate:modelValue": (P) => o.value.platform.mappings.items[k] = P,
|
|
1351
1366
|
options: {
|
|
1352
1367
|
key: { placeholder: "Key", editable: !0 },
|
|
1353
1368
|
account: { placeholder: "Account code", editable: !0 }
|
|
1354
1369
|
},
|
|
1355
1370
|
removable: !0,
|
|
1356
|
-
onRemove: () => $("items",
|
|
1371
|
+
onRemove: () => $("items", k)
|
|
1357
1372
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1358
1373
|
]),
|
|
1359
|
-
t("div",
|
|
1360
|
-
t("div",
|
|
1374
|
+
t("div", Lo, [
|
|
1375
|
+
t("div", Eo, U(p(_)("report.integration.taxes")), 1),
|
|
1361
1376
|
i(r, {
|
|
1362
1377
|
variant: "primary",
|
|
1363
1378
|
icon: "add",
|
|
1364
|
-
onClick: l[13] || (l[13] = () =>
|
|
1379
|
+
onClick: l[13] || (l[13] = () => u("taxes"))
|
|
1365
1380
|
})
|
|
1366
1381
|
]),
|
|
1367
|
-
t("div",
|
|
1368
|
-
(
|
|
1369
|
-
key: `tax-${
|
|
1370
|
-
modelValue: o.value.platform.mappings.taxes[
|
|
1371
|
-
"onUpdate:modelValue": (
|
|
1382
|
+
t("div", Yo, [
|
|
1383
|
+
(m(!0), F(O, null, L((se = (ne = (le = o.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (d, k) => (m(), I(R, {
|
|
1384
|
+
key: `tax-${k}`,
|
|
1385
|
+
modelValue: o.value.platform.mappings.taxes[k],
|
|
1386
|
+
"onUpdate:modelValue": (P) => o.value.platform.mappings.taxes[k] = P,
|
|
1387
|
+
options: {
|
|
1388
|
+
key: { placeholder: "Key", editable: !0 },
|
|
1389
|
+
account: { placeholder: "Account code", editable: !0 }
|
|
1390
|
+
},
|
|
1391
|
+
removable: !0,
|
|
1392
|
+
onRemove: () => $("taxes", k)
|
|
1393
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
|
|
1394
|
+
(m(!0), F(O, null, L((me = (re = (ie = o.value) == null ? void 0 : ie.platform) == null ? void 0 : re.mappings) == null ? void 0 : me.taxRoundingAdjustments, (d, k) => (m(), I(R, {
|
|
1395
|
+
key: `tax-rounding-adjustment-${k}`,
|
|
1396
|
+
modelValue: o.value.platform.mappings.taxRoundingAdjustments[k],
|
|
1397
|
+
"onUpdate:modelValue": (P) => o.value.platform.mappings.taxRoundingAdjustments[k] = P,
|
|
1372
1398
|
options: {
|
|
1373
1399
|
key: { placeholder: "Key", editable: !0 },
|
|
1374
1400
|
account: { placeholder: "Account code", editable: !0 }
|
|
1375
1401
|
},
|
|
1376
1402
|
removable: !0,
|
|
1377
|
-
onRemove: () => $("
|
|
1403
|
+
onRemove: () => $("taxRoundingAdjustments", k)
|
|
1378
1404
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1379
1405
|
]),
|
|
1380
|
-
t("div",
|
|
1381
|
-
t("div",
|
|
1406
|
+
t("div", zo, [
|
|
1407
|
+
t("div", qo, U(p(_)("report.integration.payments")), 1),
|
|
1382
1408
|
i(r, {
|
|
1383
1409
|
variant: "primary",
|
|
1384
1410
|
icon: "add",
|
|
1385
|
-
onClick: l[14] || (l[14] = () =>
|
|
1411
|
+
onClick: l[14] || (l[14] = () => u("payments"))
|
|
1386
1412
|
})
|
|
1387
1413
|
]),
|
|
1388
|
-
(
|
|
1389
|
-
key: `payment-${
|
|
1414
|
+
(m(!0), F(O, null, L((T = (de = (ce = o.value) == null ? void 0 : ce.platform) == null ? void 0 : de.mappings) == null ? void 0 : T.payments, (d, k) => (m(), F("div", {
|
|
1415
|
+
key: `payment-${k}`,
|
|
1390
1416
|
class: "grid-cols-1 grid gap-x-16"
|
|
1391
1417
|
}, [
|
|
1392
|
-
i(
|
|
1393
|
-
modelValue: o.value.platform.mappings.payments[
|
|
1394
|
-
"onUpdate:modelValue": (
|
|
1418
|
+
i(R, {
|
|
1419
|
+
modelValue: o.value.platform.mappings.payments[k],
|
|
1420
|
+
"onUpdate:modelValue": (P) => o.value.platform.mappings.payments[k] = P,
|
|
1395
1421
|
options: {
|
|
1396
1422
|
key: { placeholder: "Key", editable: !0 },
|
|
1397
1423
|
method: { placeholder: "Method", editable: !0 },
|
|
1398
1424
|
account: { placeholder: "Account code", editable: !0 }
|
|
1399
1425
|
},
|
|
1400
1426
|
removable: !0,
|
|
1401
|
-
onRemove: () => $("payments",
|
|
1427
|
+
onRemove: () => $("payments", k)
|
|
1402
1428
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"])
|
|
1403
1429
|
]))), 128))
|
|
1404
1430
|
])
|
|
1405
|
-
])) :
|
|
1431
|
+
])) : M("", !0);
|
|
1406
1432
|
};
|
|
1407
1433
|
}
|
|
1408
|
-
}),
|
|
1434
|
+
}), Xo = { class: "h-full flex flex-col gap-16" }, Go = { class: "flex flex-row gap-2 justify-between items-center" }, Qo = {
|
|
1409
1435
|
key: 0,
|
|
1410
1436
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
1411
|
-
},
|
|
1437
|
+
}, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wo = /* @__PURE__ */ H({
|
|
1412
1438
|
__name: "Preview",
|
|
1413
1439
|
props: {
|
|
1414
1440
|
modelValue: { required: !0 },
|
|
1415
1441
|
modelModifiers: {}
|
|
1416
1442
|
},
|
|
1417
1443
|
emits: ["update:modelValue"],
|
|
1418
|
-
setup(
|
|
1419
|
-
const o = B([]), e =
|
|
1420
|
-
() => o.value.reduce((
|
|
1421
|
-
const $ =
|
|
1422
|
-
|
|
1423
|
-
no:
|
|
1424
|
-
date:
|
|
1425
|
-
contact:
|
|
1426
|
-
status:
|
|
1427
|
-
title:
|
|
1444
|
+
setup(f) {
|
|
1445
|
+
const o = B([]), e = q(
|
|
1446
|
+
() => o.value.reduce((c, h) => {
|
|
1447
|
+
const $ = c.length, { invoice: u, payments: y } = h;
|
|
1448
|
+
c[$] = {
|
|
1449
|
+
no: u.number,
|
|
1450
|
+
date: u.date,
|
|
1451
|
+
contact: u._contact_name,
|
|
1452
|
+
status: u.status,
|
|
1453
|
+
title: u.title
|
|
1428
1454
|
};
|
|
1429
|
-
for (let n = 0; n < Math.max(
|
|
1455
|
+
for (let n = 0; n < Math.max(u.form_items.length, y.length); n++) {
|
|
1430
1456
|
const g = $ + n;
|
|
1431
|
-
|
|
1432
|
-
const
|
|
1433
|
-
|
|
1434
|
-
...
|
|
1435
|
-
itemDescription:
|
|
1436
|
-
itemQuantity:
|
|
1437
|
-
itemUnitPrice:
|
|
1438
|
-
itemAccount:
|
|
1439
|
-
itemTaxCode:
|
|
1440
|
-
itemDiscount:
|
|
1457
|
+
c[g] || (c[g] = {});
|
|
1458
|
+
const C = u.form_items[n];
|
|
1459
|
+
C && (c[g] = {
|
|
1460
|
+
...c[g],
|
|
1461
|
+
itemDescription: C.description,
|
|
1462
|
+
itemQuantity: C.quantity,
|
|
1463
|
+
itemUnitPrice: C.unit_price,
|
|
1464
|
+
itemAccount: C._account_name,
|
|
1465
|
+
itemTaxCode: C._tax_code_name,
|
|
1466
|
+
itemDiscount: C.discount
|
|
1441
1467
|
});
|
|
1442
1468
|
const a = y[n];
|
|
1443
|
-
a && (
|
|
1444
|
-
...
|
|
1469
|
+
a && (c[g] = {
|
|
1470
|
+
...c[g],
|
|
1445
1471
|
paymentNo: a.number,
|
|
1446
1472
|
paymentMethod: a.deposit_items[0]._payment_method_name,
|
|
1447
1473
|
paymentAccount: a.deposit_items[0]._account_name,
|
|
1448
1474
|
paymentDescription: a.description,
|
|
1449
|
-
paymentAmount: a.amount
|
|
1450
|
-
paymentSkip: a.skip
|
|
1475
|
+
paymentAmount: a.amount
|
|
1451
1476
|
});
|
|
1452
1477
|
}
|
|
1453
|
-
return
|
|
1478
|
+
return c;
|
|
1454
1479
|
}, [])
|
|
1455
1480
|
), { t: s } = J(), V = [
|
|
1456
1481
|
{
|
|
1457
1482
|
accessorKey: "date",
|
|
1458
|
-
header: () =>
|
|
1483
|
+
header: () => A(
|
|
1459
1484
|
"p",
|
|
1460
1485
|
{ class: "min-w-[90px] text-nowrap text-ellipsis" },
|
|
1461
1486
|
s("report.integration.table.date")
|
|
@@ -1464,17 +1489,17 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1464
1489
|
},
|
|
1465
1490
|
{
|
|
1466
1491
|
accessorKey: "no",
|
|
1467
|
-
header: () =>
|
|
1492
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, s("report.integration.table.no")),
|
|
1468
1493
|
enableSorting: !1
|
|
1469
1494
|
},
|
|
1470
1495
|
{
|
|
1471
1496
|
accessorKey: "contact",
|
|
1472
|
-
header: () =>
|
|
1497
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Contact"),
|
|
1473
1498
|
enableSorting: !1
|
|
1474
1499
|
},
|
|
1475
1500
|
{
|
|
1476
1501
|
accessorKey: "status",
|
|
1477
|
-
header: () =>
|
|
1502
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Status"),
|
|
1478
1503
|
enableSorting: !1
|
|
1479
1504
|
},
|
|
1480
1505
|
{
|
|
@@ -1484,7 +1509,7 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1484
1509
|
},
|
|
1485
1510
|
{
|
|
1486
1511
|
accessorKey: "itemDescription",
|
|
1487
|
-
header: () =>
|
|
1512
|
+
header: () => A("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
|
|
1488
1513
|
enableSorting: !1
|
|
1489
1514
|
},
|
|
1490
1515
|
{
|
|
@@ -1499,7 +1524,7 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1499
1524
|
},
|
|
1500
1525
|
{
|
|
1501
1526
|
accessorKey: "itemAccount",
|
|
1502
|
-
header: () =>
|
|
1527
|
+
header: () => A("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
|
|
1503
1528
|
enableSorting: !1
|
|
1504
1529
|
},
|
|
1505
1530
|
{
|
|
@@ -1514,7 +1539,7 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1514
1539
|
},
|
|
1515
1540
|
{
|
|
1516
1541
|
accessorKey: "paymentNo",
|
|
1517
|
-
header: () =>
|
|
1542
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment No"),
|
|
1518
1543
|
enableSorting: !1
|
|
1519
1544
|
},
|
|
1520
1545
|
{
|
|
@@ -1536,21 +1561,16 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1536
1561
|
accessorKey: "paymentAmount",
|
|
1537
1562
|
header: "Payment Amount",
|
|
1538
1563
|
enableSorting: !1
|
|
1539
|
-
},
|
|
1540
|
-
{
|
|
1541
|
-
accessorKey: "paymentSkip",
|
|
1542
|
-
header: "Skip",
|
|
1543
|
-
enableSorting: !1
|
|
1544
1564
|
}
|
|
1545
|
-
], w = X(
|
|
1546
|
-
|
|
1565
|
+
], w = X(f, "modelValue"), x = B(!1), D = ge(), { dateRange: b } = Ie(ve());
|
|
1566
|
+
xe(
|
|
1547
1567
|
() => b.value,
|
|
1548
1568
|
async () => {
|
|
1549
1569
|
if (w.value._id)
|
|
1550
1570
|
try {
|
|
1551
|
-
x.value = !0, o.value = await
|
|
1552
|
-
} catch (
|
|
1553
|
-
|
|
1571
|
+
x.value = !0, o.value = await Te(w.value._id);
|
|
1572
|
+
} catch (c) {
|
|
1573
|
+
D.open({ message: c.message, type: "error" });
|
|
1554
1574
|
} finally {
|
|
1555
1575
|
x.value = !1;
|
|
1556
1576
|
}
|
|
@@ -1561,20 +1581,20 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1561
1581
|
);
|
|
1562
1582
|
async function _() {
|
|
1563
1583
|
try {
|
|
1564
|
-
w.value._id ? (x.value = !0, await
|
|
1565
|
-
} catch (
|
|
1566
|
-
|
|
1584
|
+
w.value._id ? (x.value = !0, await Oe(w.value._id), D.open({ message: s("report.integration.uploadSuccess"), type: "success" })) : D.open({ message: s("report.integration.error.invalid"), type: "error" });
|
|
1585
|
+
} catch (c) {
|
|
1586
|
+
D.open({ message: c.message, type: "error" });
|
|
1567
1587
|
} finally {
|
|
1568
1588
|
x.value = !1;
|
|
1569
1589
|
}
|
|
1570
1590
|
}
|
|
1571
|
-
return (
|
|
1572
|
-
const $ =
|
|
1573
|
-
return
|
|
1574
|
-
t("div",
|
|
1575
|
-
i(
|
|
1591
|
+
return (c, h) => {
|
|
1592
|
+
const $ = S("FmButton"), u = S("FmCircularProgress"), y = S("FmTable");
|
|
1593
|
+
return m(), F("div", Xo, [
|
|
1594
|
+
t("div", Go, [
|
|
1595
|
+
i(Re, {
|
|
1576
1596
|
"date-range": p(b),
|
|
1577
|
-
"onUpdate:dateRange": h[0] || (h[0] = (n) =>
|
|
1597
|
+
"onUpdate:dateRange": h[0] || (h[0] = (n) => Se(b) ? b.value = n : null),
|
|
1578
1598
|
compare: !1
|
|
1579
1599
|
}, null, 8, ["date-range"]),
|
|
1580
1600
|
i($, {
|
|
@@ -1584,27 +1604,27 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1584
1604
|
onClick: _
|
|
1585
1605
|
}, null, 8, ["loading", "label"])
|
|
1586
1606
|
]),
|
|
1587
|
-
x.value ? (
|
|
1588
|
-
i(
|
|
1589
|
-
t("span",
|
|
1590
|
-
])) : e.value.length > 0 ? (
|
|
1607
|
+
x.value ? (m(), F("div", Qo, [
|
|
1608
|
+
i(u, { size: "xl" }),
|
|
1609
|
+
t("span", Jo, U(p(s)("report.integration.table.loading")), 1)
|
|
1610
|
+
])) : e.value.length > 0 ? (m(), I(y, {
|
|
1591
1611
|
key: 1,
|
|
1592
1612
|
class: "flex overflow-y-auto",
|
|
1593
1613
|
"row-data": e.value,
|
|
1594
1614
|
"column-defs": V
|
|
1595
|
-
}, null, 8, ["row-data"])) :
|
|
1615
|
+
}, null, 8, ["row-data"])) : M("", !0)
|
|
1596
1616
|
]);
|
|
1597
1617
|
};
|
|
1598
1618
|
}
|
|
1599
|
-
}),
|
|
1619
|
+
}), Zo = { class: "h-full relative flex flex-col" }, ea = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, ta = /* @__PURE__ */ H({
|
|
1600
1620
|
__name: "Bukku",
|
|
1601
1621
|
props: {
|
|
1602
1622
|
modelValue: {},
|
|
1603
1623
|
modelModifiers: {}
|
|
1604
1624
|
},
|
|
1605
1625
|
emits: ["update:modelValue"],
|
|
1606
|
-
setup(
|
|
1607
|
-
const { t: o } = J(), e = X(
|
|
1626
|
+
setup(f) {
|
|
1627
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = [
|
|
1608
1628
|
{
|
|
1609
1629
|
label: o("report.integration.setting"),
|
|
1610
1630
|
value: "setting",
|
|
@@ -1615,38 +1635,38 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1615
1635
|
value: "preview",
|
|
1616
1636
|
icon: "table"
|
|
1617
1637
|
}
|
|
1618
|
-
], w =
|
|
1638
|
+
], w = fe(), x = q(() => {
|
|
1619
1639
|
switch (s.value) {
|
|
1620
1640
|
case "preview":
|
|
1621
|
-
return
|
|
1641
|
+
return Wo;
|
|
1622
1642
|
case "setting":
|
|
1623
|
-
return
|
|
1643
|
+
return Ho;
|
|
1624
1644
|
default:
|
|
1625
1645
|
return null;
|
|
1626
1646
|
}
|
|
1627
1647
|
});
|
|
1628
|
-
return (
|
|
1648
|
+
return (D, b) => {
|
|
1629
1649
|
var h;
|
|
1630
|
-
const _ =
|
|
1631
|
-
return
|
|
1650
|
+
const _ = S("FmPageHead"), c = S("FmTabs");
|
|
1651
|
+
return m(), F("div", Zo, [
|
|
1632
1652
|
i(_, {
|
|
1633
1653
|
title: ((h = e.value) == null ? void 0 : h.name) || "Bukku",
|
|
1634
1654
|
"back-button": !0,
|
|
1635
1655
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
1636
1656
|
"onClick:back": p(w).back
|
|
1637
1657
|
}, {
|
|
1638
|
-
description:
|
|
1658
|
+
description: _e(() => b[2] || (b[2] = [
|
|
1639
1659
|
t("div", null, null, -1)
|
|
1640
1660
|
])),
|
|
1641
1661
|
_: 1
|
|
1642
1662
|
}, 8, ["title", "onClick:back"]),
|
|
1643
|
-
i(
|
|
1663
|
+
i(c, {
|
|
1644
1664
|
"model-value": s.value,
|
|
1645
1665
|
"onUpdate:modelValue": b[0] || (b[0] = ($) => s.value = $),
|
|
1646
1666
|
items: V
|
|
1647
1667
|
}, null, 8, ["model-value"]),
|
|
1648
|
-
t("div",
|
|
1649
|
-
(
|
|
1668
|
+
t("div", ea, [
|
|
1669
|
+
(m(), I(we(x.value), {
|
|
1650
1670
|
modelValue: e.value,
|
|
1651
1671
|
"onUpdate:modelValue": b[1] || (b[1] = ($) => e.value = $)
|
|
1652
1672
|
}, null, 8, ["modelValue"]))
|
|
@@ -1654,27 +1674,27 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1654
1674
|
]);
|
|
1655
1675
|
};
|
|
1656
1676
|
}
|
|
1657
|
-
}),
|
|
1677
|
+
}), oa = {
|
|
1658
1678
|
key: 0,
|
|
1659
1679
|
class: "flex flex-col h-full"
|
|
1660
|
-
},
|
|
1680
|
+
}, aa = { class: "flex flex-col gap-16 pb-[24px]" }, la = { class: "flex flex-row justify-between items-center gap-2" }, na = { class: "flex flex-row gap-2 items-center" }, sa = { 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" }, ra = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ma = { class: "flex flex-col gap-16" }, ca = { class: "fm-typo-en-title-sm-800" }, da = { class: "flex flex-row items-center max-w-[100%]" }, ua = { class: "w-[25%]" }, pa = { class: "flex-grow" }, fa = { class: "flex flex-row items-center max-w-[100%]" }, va = { class: "w-[25%]" }, ga = { class: "flex flex-row items-center max-w-[100%]" }, ya = { class: "w-[25%]" }, xa = { class: "flex flex-col gap-16" }, _a = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ba = { class: "flex flex-col gap-16 pt-3 pb-3" }, ha = { class: "flex flex-row items-center gap-5" }, wa = { class: "fm-typo-en-title-sm-800" }, Va = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ka = { class: "flex flex-row items-center gap-x-16" }, $a = { class: "fm-typo-en-title-sm-800" }, Sa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ca = { class: "flex flex-row items-center gap-x-16" }, Fa = { class: "fm-typo-en-title-sm-800" }, Da = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ua = { class: "flex flex-row items-center gap-x-16" }, Ta = { class: "fm-typo-en-title-sm-800" }, Aa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ia = /* @__PURE__ */ H({
|
|
1661
1681
|
__name: "Setting",
|
|
1662
1682
|
props: {
|
|
1663
1683
|
modelValue: { required: !0 },
|
|
1664
1684
|
modelModifiers: {}
|
|
1665
1685
|
},
|
|
1666
1686
|
emits: ["update:modelValue"],
|
|
1667
|
-
setup(
|
|
1668
|
-
const { t: o } = J(), e = X(
|
|
1687
|
+
setup(f) {
|
|
1688
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = ge(), V = Ve(), w = fe(), { promptLoader: x } = Ce(), { promptMessage: D } = Ae(), { restaurants: b } = ve(), _ = q(
|
|
1669
1689
|
() => b.map((a) => ({ label: a.name, value: a.id }))
|
|
1670
1690
|
);
|
|
1671
|
-
async function
|
|
1672
|
-
await
|
|
1691
|
+
async function c() {
|
|
1692
|
+
await D({
|
|
1673
1693
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
1674
1694
|
title: o("report.common.delete")
|
|
1675
1695
|
}) && await x(async () => {
|
|
1676
1696
|
try {
|
|
1677
|
-
await
|
|
1697
|
+
await Fe(e.value._id), await V.getSettings(), w.back();
|
|
1678
1698
|
} catch (l) {
|
|
1679
1699
|
s.open({ type: "error", message: l.message });
|
|
1680
1700
|
}
|
|
@@ -1683,21 +1703,21 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1683
1703
|
async function h() {
|
|
1684
1704
|
await x(async () => {
|
|
1685
1705
|
try {
|
|
1686
|
-
await
|
|
1706
|
+
await De(e.value._id, e.value), await V.getSettings();
|
|
1687
1707
|
} catch (a) {
|
|
1688
1708
|
s.open({ type: "error", message: a.message });
|
|
1689
1709
|
}
|
|
1690
1710
|
});
|
|
1691
1711
|
}
|
|
1692
1712
|
function $(a, l) {
|
|
1693
|
-
var
|
|
1694
|
-
(r = (
|
|
1695
|
-
(
|
|
1713
|
+
var v, r;
|
|
1714
|
+
(r = (v = e.value.platform) == null ? void 0 : v.mappings) != null && r[a] && (e.value.platform.mappings[a] = e.value.platform.mappings[a].filter(
|
|
1715
|
+
(K, N) => N !== l
|
|
1696
1716
|
));
|
|
1697
1717
|
}
|
|
1698
|
-
function
|
|
1699
|
-
var l,
|
|
1700
|
-
(
|
|
1718
|
+
function u(a) {
|
|
1719
|
+
var l, v;
|
|
1720
|
+
(v = (l = e.value.platform) == null ? void 0 : l.mappings) != null && v[a] && (e.value.platform.mappings[a] = [
|
|
1701
1721
|
...e.value.platform.mappings[a],
|
|
1702
1722
|
a === "items" ? {
|
|
1703
1723
|
key: "",
|
|
@@ -1712,23 +1732,23 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1712
1732
|
const y = [
|
|
1713
1733
|
{
|
|
1714
1734
|
label: "By day",
|
|
1715
|
-
value:
|
|
1735
|
+
value: ye.BY_DAY
|
|
1716
1736
|
},
|
|
1717
1737
|
{
|
|
1718
1738
|
label: "By invoice",
|
|
1719
|
-
value:
|
|
1739
|
+
value: ye.BY_INVOICE
|
|
1720
1740
|
},
|
|
1721
1741
|
{
|
|
1722
1742
|
label: "By day and category",
|
|
1723
|
-
value:
|
|
1743
|
+
value: ye.BY_DAY_CATEGORY
|
|
1724
1744
|
}
|
|
1725
1745
|
];
|
|
1726
1746
|
function n({
|
|
1727
1747
|
key: a,
|
|
1728
1748
|
value: l
|
|
1729
1749
|
}) {
|
|
1730
|
-
var
|
|
1731
|
-
(r = (
|
|
1750
|
+
var v, r;
|
|
1751
|
+
(r = (v = e.value) == null ? void 0 : v.platform) != null && r.mappings && (e.value.platform.mappings[a] = l);
|
|
1732
1752
|
}
|
|
1733
1753
|
function g(a) {
|
|
1734
1754
|
return {
|
|
@@ -1736,37 +1756,37 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1736
1756
|
account: { placeholder: a, editable: !0 }
|
|
1737
1757
|
};
|
|
1738
1758
|
}
|
|
1739
|
-
async function
|
|
1759
|
+
async function C() {
|
|
1740
1760
|
await x(async () => {
|
|
1741
1761
|
try {
|
|
1742
|
-
await
|
|
1762
|
+
await Ue(e.value._id), await V.getSettings();
|
|
1743
1763
|
} catch (a) {
|
|
1744
1764
|
s.open({ type: "error", message: a.message });
|
|
1745
1765
|
}
|
|
1746
1766
|
});
|
|
1747
1767
|
}
|
|
1748
|
-
return
|
|
1768
|
+
return $e(async () => {
|
|
1749
1769
|
await V.getSettings();
|
|
1750
1770
|
}), (a, l) => {
|
|
1751
|
-
var
|
|
1752
|
-
const
|
|
1753
|
-
return (Q = (
|
|
1754
|
-
t("div",
|
|
1755
|
-
t("div",
|
|
1771
|
+
var Y, Q, j, E, z, ee, te, oe, ae, le, ne, se, ie, re, me, ce, de;
|
|
1772
|
+
const v = S("FmIcon"), r = S("FmButton"), K = S("FmMenuDivider"), N = S("FmTextField"), G = S("FmSelect");
|
|
1773
|
+
return (Q = (Y = e.value) == null ? void 0 : Y.platform) != null && Q.mappings ? (m(), F("div", oa, [
|
|
1774
|
+
t("div", aa, [
|
|
1775
|
+
t("div", la, [
|
|
1756
1776
|
l[14] || (l[14] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
1757
|
-
t("div",
|
|
1758
|
-
t("div",
|
|
1759
|
-
i(
|
|
1777
|
+
t("div", na, [
|
|
1778
|
+
t("div", sa, [
|
|
1779
|
+
i(v, {
|
|
1760
1780
|
name: "refresh",
|
|
1761
1781
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1762
|
-
onClick:
|
|
1782
|
+
onClick: C
|
|
1763
1783
|
}),
|
|
1764
|
-
t("span",
|
|
1784
|
+
t("span", ia, U(p(o)("report.integration.refreshSetting")), 1)
|
|
1765
1785
|
]),
|
|
1766
1786
|
i(r, {
|
|
1767
1787
|
variant: "tertiary",
|
|
1768
1788
|
label: p(o)("report.common.remove"),
|
|
1769
|
-
onClick:
|
|
1789
|
+
onClick: c
|
|
1770
1790
|
}, null, 8, ["label"]),
|
|
1771
1791
|
i(r, {
|
|
1772
1792
|
variant: "primary",
|
|
@@ -1776,36 +1796,36 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1776
1796
|
])
|
|
1777
1797
|
])
|
|
1778
1798
|
]),
|
|
1779
|
-
i(
|
|
1780
|
-
t("div",
|
|
1781
|
-
t("div",
|
|
1782
|
-
t("div",
|
|
1783
|
-
t("div",
|
|
1784
|
-
t("div",
|
|
1785
|
-
t("div",
|
|
1786
|
-
i(
|
|
1799
|
+
i(K, { style: { margin: 0 } }),
|
|
1800
|
+
t("div", ra, [
|
|
1801
|
+
t("div", ma, [
|
|
1802
|
+
t("div", ca, U(p(o)("report.integration.general")), 1),
|
|
1803
|
+
t("div", da, [
|
|
1804
|
+
t("div", ua, U(p(o)("report.common.name")), 1),
|
|
1805
|
+
t("div", pa, [
|
|
1806
|
+
i(N, {
|
|
1787
1807
|
modelValue: e.value.name,
|
|
1788
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
1808
|
+
"onUpdate:modelValue": l[0] || (l[0] = (T) => e.value.name = T)
|
|
1789
1809
|
}, null, 8, ["modelValue"])
|
|
1790
1810
|
])
|
|
1791
1811
|
]),
|
|
1792
|
-
t("div",
|
|
1793
|
-
t("div",
|
|
1812
|
+
t("div", fa, [
|
|
1813
|
+
t("div", va, U(p(o)("report.integration.location")), 1),
|
|
1794
1814
|
i(G, {
|
|
1795
1815
|
modelValue: e.value.platform.locationIds,
|
|
1796
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
1816
|
+
"onUpdate:modelValue": l[1] || (l[1] = (T) => e.value.platform.locationIds = T),
|
|
1797
1817
|
multiselect: !0,
|
|
1798
1818
|
items: _.value,
|
|
1799
1819
|
placeholder: "Select location",
|
|
1800
1820
|
class: "flex-grow",
|
|
1801
|
-
rules: [(
|
|
1821
|
+
rules: [(T) => T.length !== 0 || "Please select at least 1 location"]
|
|
1802
1822
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
1803
1823
|
]),
|
|
1804
|
-
t("div",
|
|
1805
|
-
t("div",
|
|
1824
|
+
t("div", ga, [
|
|
1825
|
+
t("div", ya, U(p(o)("report.integration.grouping.title")), 1),
|
|
1806
1826
|
i(G, {
|
|
1807
1827
|
modelValue: e.value.platform.grouping,
|
|
1808
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
1828
|
+
"onUpdate:modelValue": l[2] || (l[2] = (T) => e.value.platform.grouping = T),
|
|
1809
1829
|
multiselect: !1,
|
|
1810
1830
|
items: y,
|
|
1811
1831
|
placeholder: "Select grouping",
|
|
@@ -1813,33 +1833,33 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1813
1833
|
}, null, 8, ["modelValue"])
|
|
1814
1834
|
])
|
|
1815
1835
|
]),
|
|
1816
|
-
t("div",
|
|
1817
|
-
t("div",
|
|
1818
|
-
i(
|
|
1836
|
+
t("div", xa, [
|
|
1837
|
+
t("div", _a, [
|
|
1838
|
+
i(R, {
|
|
1819
1839
|
"model-value": { key: "Project", account: e.value.platform.mappings.project },
|
|
1820
1840
|
options: g("Project"),
|
|
1821
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
1841
|
+
"onUpdate:modelValue": l[3] || (l[3] = (T) => n({ key: "project", value: T.account }))
|
|
1822
1842
|
}, null, 8, ["model-value", "options"]),
|
|
1823
|
-
i(
|
|
1843
|
+
i(R, {
|
|
1824
1844
|
"model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
|
|
1825
1845
|
options: g("Debtor"),
|
|
1826
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
1846
|
+
"onUpdate:modelValue": l[4] || (l[4] = (T) => n({ key: "debtor", value: T.account }))
|
|
1827
1847
|
}, null, 8, ["model-value", "options"]),
|
|
1828
|
-
i(
|
|
1848
|
+
i(R, {
|
|
1829
1849
|
"model-value": {
|
|
1830
1850
|
key: "Rounding",
|
|
1831
1851
|
account: e.value.platform.mappings.rounding.account
|
|
1832
1852
|
},
|
|
1833
1853
|
options: g("Rounding"),
|
|
1834
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
1835
|
-
var
|
|
1836
|
-
(
|
|
1854
|
+
"onUpdate:modelValue": l[5] || (l[5] = (T) => {
|
|
1855
|
+
var d, k, P;
|
|
1856
|
+
(P = (k = (d = e.value) == null ? void 0 : d.platform) == null ? void 0 : k.mappings) != null && P.rounding && (e.value.platform.mappings.rounding.account = T.account);
|
|
1837
1857
|
})
|
|
1838
1858
|
}, null, 8, ["model-value", "options"]),
|
|
1839
|
-
(
|
|
1840
|
-
key: `charge-${
|
|
1841
|
-
modelValue: e.value.platform.mappings.charges[
|
|
1842
|
-
"onUpdate:modelValue": (
|
|
1859
|
+
(m(!0), F(O, null, L((z = (E = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : z.charges, (T, d) => (m(), I(R, {
|
|
1860
|
+
key: `charge-${d}`,
|
|
1861
|
+
modelValue: e.value.platform.mappings.charges[d],
|
|
1862
|
+
"onUpdate:modelValue": (k) => e.value.platform.mappings.charges[d] = k,
|
|
1843
1863
|
options: {
|
|
1844
1864
|
key: { placeholder: "Key", editable: !1 },
|
|
1845
1865
|
account: { placeholder: "Account code", editable: !0 }
|
|
@@ -1847,177 +1867,188 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1847
1867
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
1848
1868
|
])
|
|
1849
1869
|
]),
|
|
1850
|
-
t("div",
|
|
1851
|
-
t("div",
|
|
1852
|
-
t("div",
|
|
1853
|
-
i(
|
|
1870
|
+
t("div", ba, [
|
|
1871
|
+
t("div", ha, [
|
|
1872
|
+
t("div", wa, U(p(o)("report.integration.refNumFormat")), 1),
|
|
1873
|
+
i(Pe)
|
|
1854
1874
|
]),
|
|
1855
|
-
t("div",
|
|
1856
|
-
i(
|
|
1875
|
+
t("div", Va, [
|
|
1876
|
+
i(R, {
|
|
1857
1877
|
"model-value": {
|
|
1858
1878
|
key: "Invoice no",
|
|
1859
1879
|
account: e.value.platform.mappings.invoiceDocNo
|
|
1860
1880
|
},
|
|
1861
1881
|
options: g("Invoice no"),
|
|
1862
|
-
"onUpdate:modelValue": l[6] || (l[6] = (
|
|
1882
|
+
"onUpdate:modelValue": l[6] || (l[6] = (T) => n({ key: "invoiceDocNo", value: T.account }))
|
|
1863
1883
|
}, null, 8, ["model-value", "options"]),
|
|
1864
|
-
i(
|
|
1884
|
+
i(R, {
|
|
1865
1885
|
"model-value": {
|
|
1866
1886
|
key: "Credit note no",
|
|
1867
1887
|
account: e.value.platform.mappings.creditNoteDocNo
|
|
1868
1888
|
},
|
|
1869
1889
|
options: g("Credit note no"),
|
|
1870
|
-
"onUpdate:modelValue": l[7] || (l[7] = (
|
|
1890
|
+
"onUpdate:modelValue": l[7] || (l[7] = (T) => n({ key: "creditNoteDocNo", value: T.account }))
|
|
1871
1891
|
}, null, 8, ["model-value", "options"]),
|
|
1872
|
-
i(
|
|
1892
|
+
i(R, {
|
|
1873
1893
|
"model-value": {
|
|
1874
1894
|
key: "Payment no",
|
|
1875
1895
|
account: e.value.platform.mappings.paymentDocNo
|
|
1876
1896
|
},
|
|
1877
1897
|
options: g("Payment no"),
|
|
1878
|
-
"onUpdate:modelValue": l[8] || (l[8] = (
|
|
1898
|
+
"onUpdate:modelValue": l[8] || (l[8] = (T) => n({ key: "paymentDocNo", value: T.account }))
|
|
1879
1899
|
}, null, 8, ["model-value", "options"]),
|
|
1880
|
-
i(
|
|
1900
|
+
i(R, {
|
|
1881
1901
|
"model-value": {
|
|
1882
1902
|
key: "Refund no",
|
|
1883
1903
|
account: e.value.platform.mappings.refundDocNo
|
|
1884
1904
|
},
|
|
1885
1905
|
options: g("Refund no"),
|
|
1886
|
-
"onUpdate:modelValue": l[9] || (l[9] = (
|
|
1906
|
+
"onUpdate:modelValue": l[9] || (l[9] = (T) => n({ key: "refundDocNo", value: T.account }))
|
|
1887
1907
|
}, null, 8, ["model-value", "options"])
|
|
1888
1908
|
])
|
|
1889
1909
|
]),
|
|
1890
|
-
i(
|
|
1910
|
+
i(Ne, {
|
|
1891
1911
|
modelValue: e.value.platform,
|
|
1892
|
-
"onUpdate:modelValue": l[10] || (l[10] = (
|
|
1912
|
+
"onUpdate:modelValue": l[10] || (l[10] = (T) => e.value.platform = T),
|
|
1893
1913
|
label: p(o)("report.input.email")
|
|
1894
1914
|
}, null, 8, ["modelValue", "label"]),
|
|
1895
|
-
t("div",
|
|
1896
|
-
t("div",
|
|
1915
|
+
t("div", ka, [
|
|
1916
|
+
t("div", $a, U(p(o)("report.integration.items")), 1),
|
|
1897
1917
|
i(r, {
|
|
1898
1918
|
variant: "primary",
|
|
1899
1919
|
icon: "add",
|
|
1900
|
-
onClick: l[11] || (l[11] = () =>
|
|
1920
|
+
onClick: l[11] || (l[11] = () => u("items"))
|
|
1901
1921
|
})
|
|
1902
1922
|
]),
|
|
1903
|
-
t("div",
|
|
1904
|
-
(
|
|
1905
|
-
key: `item-${
|
|
1906
|
-
modelValue: e.value.platform.mappings.items[
|
|
1907
|
-
"onUpdate:modelValue": (
|
|
1923
|
+
t("div", Sa, [
|
|
1924
|
+
(m(!0), F(O, null, L((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, (T, d) => (m(), I(R, {
|
|
1925
|
+
key: `item-${d}`,
|
|
1926
|
+
modelValue: e.value.platform.mappings.items[d],
|
|
1927
|
+
"onUpdate:modelValue": (k) => e.value.platform.mappings.items[d] = k,
|
|
1908
1928
|
options: {
|
|
1909
1929
|
key: { placeholder: "Key", editable: !0 },
|
|
1910
1930
|
account: { placeholder: "Account code", editable: !0 }
|
|
1911
1931
|
},
|
|
1912
1932
|
removable: !0,
|
|
1913
|
-
onRemove: () => $("items",
|
|
1933
|
+
onRemove: () => $("items", d)
|
|
1914
1934
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1915
1935
|
]),
|
|
1916
|
-
t("div",
|
|
1917
|
-
t("div",
|
|
1936
|
+
t("div", Ca, [
|
|
1937
|
+
t("div", Fa, U(p(o)("report.integration.taxes")), 1),
|
|
1918
1938
|
i(r, {
|
|
1919
1939
|
variant: "primary",
|
|
1920
1940
|
icon: "add",
|
|
1921
|
-
onClick: l[12] || (l[12] = () =>
|
|
1941
|
+
onClick: l[12] || (l[12] = () => u("taxes"))
|
|
1922
1942
|
})
|
|
1923
1943
|
]),
|
|
1924
|
-
t("div",
|
|
1925
|
-
(
|
|
1926
|
-
key: `tax-${
|
|
1927
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
1928
|
-
"onUpdate:modelValue": (
|
|
1944
|
+
t("div", Da, [
|
|
1945
|
+
(m(!0), F(O, null, L((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, (T, d) => (m(), I(R, {
|
|
1946
|
+
key: `tax-${d}`,
|
|
1947
|
+
modelValue: e.value.platform.mappings.taxes[d],
|
|
1948
|
+
"onUpdate:modelValue": (k) => e.value.platform.mappings.taxes[d] = k,
|
|
1929
1949
|
options: {
|
|
1930
1950
|
key: { placeholder: "Key", editable: !0 },
|
|
1931
1951
|
account: { placeholder: "Account code", editable: !0 }
|
|
1932
1952
|
},
|
|
1933
1953
|
removable: !0,
|
|
1934
|
-
onRemove: () => $("taxes",
|
|
1954
|
+
onRemove: () => $("taxes", d)
|
|
1955
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
|
|
1956
|
+
(m(!0), F(O, null, L((re = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : re.taxRoundingAdjustments, (T, d) => (m(), I(R, {
|
|
1957
|
+
key: `tax-rounding-adjustment-${d}`,
|
|
1958
|
+
modelValue: e.value.platform.mappings.taxRoundingAdjustments[d],
|
|
1959
|
+
"onUpdate:modelValue": (k) => e.value.platform.mappings.taxRoundingAdjustments[d] = k,
|
|
1960
|
+
options: {
|
|
1961
|
+
key: { placeholder: "Key", editable: !0 },
|
|
1962
|
+
account: { placeholder: "Account code", editable: !0 }
|
|
1963
|
+
},
|
|
1964
|
+
removable: !0,
|
|
1965
|
+
onRemove: () => $("taxRoundingAdjustments", d)
|
|
1935
1966
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1936
1967
|
]),
|
|
1937
|
-
t("div",
|
|
1938
|
-
t("div",
|
|
1968
|
+
t("div", Ua, [
|
|
1969
|
+
t("div", Ta, U(p(o)("report.integration.payments")), 1),
|
|
1939
1970
|
i(r, {
|
|
1940
1971
|
variant: "primary",
|
|
1941
1972
|
icon: "add",
|
|
1942
|
-
onClick: l[13] || (l[13] = () =>
|
|
1973
|
+
onClick: l[13] || (l[13] = () => u("payments"))
|
|
1943
1974
|
})
|
|
1944
1975
|
]),
|
|
1945
|
-
t("div",
|
|
1946
|
-
(
|
|
1947
|
-
key: `payment-${
|
|
1948
|
-
modelValue: e.value.platform.mappings.payments[
|
|
1949
|
-
"onUpdate:modelValue": (
|
|
1976
|
+
t("div", Aa, [
|
|
1977
|
+
(m(!0), F(O, null, L((de = (ce = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ce.mappings) == null ? void 0 : de.payments, (T, d) => (m(), I(R, {
|
|
1978
|
+
key: `payment-${d}`,
|
|
1979
|
+
modelValue: e.value.platform.mappings.payments[d],
|
|
1980
|
+
"onUpdate:modelValue": (k) => e.value.platform.mappings.payments[d] = k,
|
|
1950
1981
|
options: {
|
|
1951
1982
|
key: { placeholder: "Key", editable: !0 },
|
|
1952
1983
|
account: { placeholder: "Payment name", editable: !0 }
|
|
1953
1984
|
},
|
|
1954
1985
|
removable: !0,
|
|
1955
|
-
onRemove: () => $("payments",
|
|
1986
|
+
onRemove: () => $("payments", d)
|
|
1956
1987
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1957
1988
|
])
|
|
1958
1989
|
])
|
|
1959
|
-
])) :
|
|
1990
|
+
])) : M("", !0);
|
|
1960
1991
|
};
|
|
1961
1992
|
}
|
|
1962
|
-
}),
|
|
1993
|
+
}), Ra = { class: "h-full flex flex-col gap-16" }, Na = { class: "flex flex-row gap-2 justify-between items-center" }, Ka = {
|
|
1963
1994
|
key: 0,
|
|
1964
1995
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
1965
|
-
}, Ma = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1996
|
+
}, Ma = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pa = /* @__PURE__ */ H({
|
|
1966
1997
|
__name: "Preview",
|
|
1967
1998
|
props: {
|
|
1968
1999
|
modelValue: { required: !0 },
|
|
1969
2000
|
modelModifiers: {}
|
|
1970
2001
|
},
|
|
1971
2002
|
emits: ["update:modelValue"],
|
|
1972
|
-
setup(
|
|
1973
|
-
const { t: o } = J(), e = B([]), s =
|
|
1974
|
-
() => e.value.reduce((
|
|
1975
|
-
const $ =
|
|
1976
|
-
|
|
1977
|
-
date:
|
|
1978
|
-
docNo:
|
|
1979
|
-
projNo:
|
|
1980
|
-
debtor:
|
|
1981
|
-
description:
|
|
2003
|
+
setup(f) {
|
|
2004
|
+
const { t: o } = J(), e = B([]), s = q(
|
|
2005
|
+
() => e.value.reduce((c, h) => {
|
|
2006
|
+
const $ = c.length, { invoice: u, payments: y } = h;
|
|
2007
|
+
c[$] = {
|
|
2008
|
+
date: u.DocDate,
|
|
2009
|
+
docNo: u.DocNo,
|
|
2010
|
+
projNo: u.ProjNo,
|
|
2011
|
+
debtor: u.DebtorCode,
|
|
2012
|
+
description: u.Description
|
|
1982
2013
|
};
|
|
1983
|
-
for (let n = 0; n < Math.max(
|
|
2014
|
+
for (let n = 0; n < Math.max(u._items.length, y.length); n++) {
|
|
1984
2015
|
const g = $ + n;
|
|
1985
|
-
|
|
1986
|
-
...
|
|
1987
|
-
itemDescription:
|
|
1988
|
-
itemUnitPrice:
|
|
1989
|
-
itemAccount:
|
|
1990
|
-
itemTaxCode:
|
|
1991
|
-
itemTax:
|
|
1992
|
-
}), y[n] && (
|
|
1993
|
-
...
|
|
2016
|
+
c[g] || (c[g] = {}), u._items[n] && (c[g] = {
|
|
2017
|
+
...c[g],
|
|
2018
|
+
itemDescription: u._items[n].DetailDescription,
|
|
2019
|
+
itemUnitPrice: u._items[n].Amount,
|
|
2020
|
+
itemAccount: u._items[n].AccNo,
|
|
2021
|
+
itemTaxCode: u._items[n].TaxType,
|
|
2022
|
+
itemTax: u._items[n].Tax
|
|
2023
|
+
}), y[n] && (c[g] = {
|
|
2024
|
+
...c[g],
|
|
1994
2025
|
paymentDocNo: y[n].DocNo,
|
|
1995
2026
|
paymentMethod: y[n].paymentMethod,
|
|
1996
2027
|
paymentDescription: y[n].Description,
|
|
1997
2028
|
paymentAmount: y[n].PaymentAmt
|
|
1998
2029
|
});
|
|
1999
2030
|
}
|
|
2000
|
-
return
|
|
2031
|
+
return c;
|
|
2001
2032
|
}, [])
|
|
2002
2033
|
), V = [
|
|
2003
2034
|
{
|
|
2004
2035
|
accessorKey: "date",
|
|
2005
|
-
header: () =>
|
|
2036
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
2006
2037
|
enableSorting: !1
|
|
2007
2038
|
},
|
|
2008
2039
|
{
|
|
2009
2040
|
accessorKey: "docNo",
|
|
2010
|
-
header: () =>
|
|
2041
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Doc No"),
|
|
2011
2042
|
enableSorting: !1
|
|
2012
2043
|
},
|
|
2013
2044
|
{
|
|
2014
2045
|
accessorKey: "projNo",
|
|
2015
|
-
header: () =>
|
|
2046
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Project"),
|
|
2016
2047
|
enableSorting: !1
|
|
2017
2048
|
},
|
|
2018
2049
|
{
|
|
2019
2050
|
accessorKey: "debtor",
|
|
2020
|
-
header: () =>
|
|
2051
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Debtor"),
|
|
2021
2052
|
enableSorting: !1
|
|
2022
2053
|
},
|
|
2023
2054
|
{
|
|
@@ -2027,7 +2058,7 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2027
2058
|
},
|
|
2028
2059
|
{
|
|
2029
2060
|
accessorKey: "itemAccount",
|
|
2030
|
-
header: () =>
|
|
2061
|
+
header: () => A("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
|
|
2031
2062
|
enableSorting: !1
|
|
2032
2063
|
},
|
|
2033
2064
|
{
|
|
@@ -2037,7 +2068,7 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2037
2068
|
},
|
|
2038
2069
|
{
|
|
2039
2070
|
accessorKey: "itemDescription",
|
|
2040
|
-
header: () =>
|
|
2071
|
+
header: () => A("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
|
|
2041
2072
|
enableSorting: !1
|
|
2042
2073
|
},
|
|
2043
2074
|
{
|
|
@@ -2070,15 +2101,15 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2070
2101
|
header: "Payment Amount",
|
|
2071
2102
|
enableSorting: !1
|
|
2072
2103
|
}
|
|
2073
|
-
], w = X(
|
|
2074
|
-
|
|
2104
|
+
], w = X(f, "modelValue"), x = B(!1), D = ge(), { dateRange: b } = Ie(ve());
|
|
2105
|
+
xe(
|
|
2075
2106
|
() => b.value,
|
|
2076
2107
|
async () => {
|
|
2077
2108
|
if (w.value._id)
|
|
2078
2109
|
try {
|
|
2079
|
-
x.value = !0, e.value = await
|
|
2080
|
-
} catch (
|
|
2081
|
-
|
|
2110
|
+
x.value = !0, e.value = await Te(w.value._id);
|
|
2111
|
+
} catch (c) {
|
|
2112
|
+
D.open({ message: c.message, type: "error" });
|
|
2082
2113
|
} finally {
|
|
2083
2114
|
x.value = !1;
|
|
2084
2115
|
}
|
|
@@ -2089,20 +2120,20 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2089
2120
|
);
|
|
2090
2121
|
async function _() {
|
|
2091
2122
|
try {
|
|
2092
|
-
w.value._id ? (x.value = !0, await
|
|
2093
|
-
} catch (
|
|
2094
|
-
|
|
2123
|
+
w.value._id ? (x.value = !0, await Be(w.value._id)) : D.open({ message: "Invalid accounting setting", type: "error" });
|
|
2124
|
+
} catch (c) {
|
|
2125
|
+
D.open({ message: c.message, type: "error" });
|
|
2095
2126
|
} finally {
|
|
2096
2127
|
x.value = !1;
|
|
2097
2128
|
}
|
|
2098
2129
|
}
|
|
2099
|
-
return (
|
|
2100
|
-
const $ =
|
|
2101
|
-
return
|
|
2102
|
-
t("div",
|
|
2103
|
-
i(
|
|
2130
|
+
return (c, h) => {
|
|
2131
|
+
const $ = S("FmButton"), u = S("FmCircularProgress"), y = S("FmTable");
|
|
2132
|
+
return m(), F("div", Ra, [
|
|
2133
|
+
t("div", Na, [
|
|
2134
|
+
i(Re, {
|
|
2104
2135
|
"date-range": p(b),
|
|
2105
|
-
"onUpdate:dateRange": h[0] || (h[0] = (n) =>
|
|
2136
|
+
"onUpdate:dateRange": h[0] || (h[0] = (n) => Se(b) ? b.value = n : null),
|
|
2106
2137
|
compare: !1
|
|
2107
2138
|
}, null, 8, ["date-range"]),
|
|
2108
2139
|
i($, {
|
|
@@ -2112,27 +2143,27 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2112
2143
|
onClick: _
|
|
2113
2144
|
}, null, 8, ["loading", "label"])
|
|
2114
2145
|
]),
|
|
2115
|
-
x.value ? (
|
|
2116
|
-
i(
|
|
2117
|
-
t("span", Ma,
|
|
2118
|
-
])) : s.value.length > 0 ? (
|
|
2146
|
+
x.value ? (m(), F("div", Ka, [
|
|
2147
|
+
i(u, { size: "xl" }),
|
|
2148
|
+
t("span", Ma, U(p(o)("report.common.isLoading")), 1)
|
|
2149
|
+
])) : s.value.length > 0 ? (m(), I(y, {
|
|
2119
2150
|
key: 1,
|
|
2120
2151
|
class: "flex overflow-y-auto",
|
|
2121
2152
|
"row-data": s.value,
|
|
2122
2153
|
"column-defs": V
|
|
2123
|
-
}, null, 8, ["row-data"])) :
|
|
2154
|
+
}, null, 8, ["row-data"])) : M("", !0)
|
|
2124
2155
|
]);
|
|
2125
2156
|
};
|
|
2126
2157
|
}
|
|
2127
|
-
}),
|
|
2158
|
+
}), ja = { class: "h-full relative flex flex-col" }, Oa = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Ba = /* @__PURE__ */ H({
|
|
2128
2159
|
__name: "AutoCount",
|
|
2129
2160
|
props: {
|
|
2130
2161
|
modelValue: {},
|
|
2131
2162
|
modelModifiers: {}
|
|
2132
2163
|
},
|
|
2133
2164
|
emits: ["update:modelValue"],
|
|
2134
|
-
setup(
|
|
2135
|
-
const { t: o } = J(), e = X(
|
|
2165
|
+
setup(f) {
|
|
2166
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = [
|
|
2136
2167
|
{
|
|
2137
2168
|
label: o("report.integration.setting"),
|
|
2138
2169
|
value: "setting",
|
|
@@ -2143,38 +2174,38 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2143
2174
|
value: "preview",
|
|
2144
2175
|
icon: "table"
|
|
2145
2176
|
}
|
|
2146
|
-
], w =
|
|
2177
|
+
], w = fe(), x = q(() => {
|
|
2147
2178
|
switch (s.value) {
|
|
2148
2179
|
case "preview":
|
|
2149
|
-
return
|
|
2180
|
+
return Pa;
|
|
2150
2181
|
case "setting":
|
|
2151
|
-
return
|
|
2182
|
+
return Ia;
|
|
2152
2183
|
default:
|
|
2153
2184
|
return null;
|
|
2154
2185
|
}
|
|
2155
2186
|
});
|
|
2156
|
-
return (
|
|
2187
|
+
return (D, b) => {
|
|
2157
2188
|
var h;
|
|
2158
|
-
const _ =
|
|
2159
|
-
return
|
|
2189
|
+
const _ = S("FmPageHead"), c = S("FmTabs");
|
|
2190
|
+
return m(), F("div", ja, [
|
|
2160
2191
|
i(_, {
|
|
2161
2192
|
title: ((h = e.value) == null ? void 0 : h.name) || "AutoCount",
|
|
2162
2193
|
"back-button": !0,
|
|
2163
2194
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2164
2195
|
"onClick:back": p(w).back
|
|
2165
2196
|
}, {
|
|
2166
|
-
description:
|
|
2197
|
+
description: _e(() => b[2] || (b[2] = [
|
|
2167
2198
|
t("div", null, null, -1)
|
|
2168
2199
|
])),
|
|
2169
2200
|
_: 1
|
|
2170
2201
|
}, 8, ["title", "onClick:back"]),
|
|
2171
|
-
i(
|
|
2202
|
+
i(c, {
|
|
2172
2203
|
"model-value": s.value,
|
|
2173
2204
|
"onUpdate:modelValue": b[0] || (b[0] = ($) => s.value = $),
|
|
2174
2205
|
items: V
|
|
2175
2206
|
}, null, 8, ["model-value"]),
|
|
2176
|
-
t("div",
|
|
2177
|
-
(
|
|
2207
|
+
t("div", Oa, [
|
|
2208
|
+
(m(), I(we(x.value), {
|
|
2178
2209
|
modelValue: e.value,
|
|
2179
2210
|
"onUpdate:modelValue": b[1] || (b[1] = ($) => e.value = $)
|
|
2180
2211
|
}, null, 8, ["modelValue"]))
|
|
@@ -2182,27 +2213,27 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2182
2213
|
]);
|
|
2183
2214
|
};
|
|
2184
2215
|
}
|
|
2185
|
-
}),
|
|
2216
|
+
}), La = {
|
|
2186
2217
|
key: 0,
|
|
2187
2218
|
class: "flex flex-col h-full"
|
|
2188
|
-
},
|
|
2219
|
+
}, Ea = { class: "flex flex-col gap-16 pb-[24px]" }, Ya = { class: "flex flex-row justify-between items-center gap-2" }, za = { class: "flex flex-row gap-2 items-center" }, qa = { class: "relative group cursor-pointer" }, Ha = { 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" }, Xa = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ga = { class: "flex flex-col gap-16" }, Qa = { class: "fm-typo-en-title-sm-800" }, Ja = { class: "flex flex-row items-center max-w-[100%]" }, Wa = { class: "w-[25%]" }, Za = { class: "flex-grow" }, el = { class: "flex flex-row items-center max-w-[100%]" }, tl = { class: "w-[25%]" }, ol = { class: "flex flex-row items-center max-w-[100%]" }, al = { class: "w-[25%]" }, ll = { class: "flex flex-col gap-16" }, nl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, sl = { class: "grid-cols-1 grid gap-16" }, il = { class: "flex flex-col gap-16 pt-3 pb-3" }, rl = { class: "flex flex-row items-center gap-5" }, ml = { class: "fm-typo-en-title-sm-800" }, cl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, dl = { class: "flex flex-row items-center gap-x-16" }, ul = { class: "fm-typo-en-title-sm-800" }, pl = { class: "grid-cols-1 grid gap-16" }, fl = { class: "flex flex-row items-center gap-x-16" }, vl = { class: "fm-typo-en-title-sm-800" }, gl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, yl = { class: "flex flex-row items-center gap-x-16" }, xl = { class: "fm-typo-en-title-sm-800" }, _l = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, bl = /* @__PURE__ */ H({
|
|
2189
2220
|
__name: "Setting",
|
|
2190
2221
|
props: {
|
|
2191
2222
|
modelValue: { required: !0 },
|
|
2192
2223
|
modelModifiers: {}
|
|
2193
2224
|
},
|
|
2194
2225
|
emits: ["update:modelValue"],
|
|
2195
|
-
setup(
|
|
2196
|
-
const { t: o } = J(), e = X(
|
|
2226
|
+
setup(f) {
|
|
2227
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = ge(), V = Ve(), w = fe(), { promptLoader: x } = Ce(), { promptMessage: D } = Ae(), { restaurants: b } = ve(), _ = q(
|
|
2197
2228
|
() => b.map((a) => ({ label: a.name, value: a.id }))
|
|
2198
2229
|
);
|
|
2199
|
-
async function
|
|
2200
|
-
await
|
|
2230
|
+
async function c() {
|
|
2231
|
+
await D({
|
|
2201
2232
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
2202
2233
|
title: o("report.common.delete")
|
|
2203
2234
|
}) && await x(async () => {
|
|
2204
2235
|
try {
|
|
2205
|
-
await
|
|
2236
|
+
await Fe(e.value._id), await V.getSettings(), w.back();
|
|
2206
2237
|
} catch (l) {
|
|
2207
2238
|
s.open({ type: "error", message: l.message });
|
|
2208
2239
|
}
|
|
@@ -2211,21 +2242,21 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2211
2242
|
async function h() {
|
|
2212
2243
|
await x(async () => {
|
|
2213
2244
|
try {
|
|
2214
|
-
await
|
|
2245
|
+
await De(e.value._id, e.value), await V.getSettings();
|
|
2215
2246
|
} catch (a) {
|
|
2216
2247
|
s.open({ type: "error", message: a.message });
|
|
2217
2248
|
}
|
|
2218
2249
|
});
|
|
2219
2250
|
}
|
|
2220
2251
|
function $(a, l) {
|
|
2221
|
-
var
|
|
2222
|
-
(r = (
|
|
2223
|
-
(
|
|
2252
|
+
var v, r;
|
|
2253
|
+
(r = (v = e.value.platform) == null ? void 0 : v.mappings) != null && r[a] && (e.value.platform.mappings[a] = e.value.platform.mappings[a].filter(
|
|
2254
|
+
(K, N) => N !== l
|
|
2224
2255
|
));
|
|
2225
2256
|
}
|
|
2226
|
-
function
|
|
2227
|
-
var l,
|
|
2228
|
-
(
|
|
2257
|
+
function u(a) {
|
|
2258
|
+
var l, v;
|
|
2259
|
+
(v = (l = e.value.platform) == null ? void 0 : l.mappings) != null && v[a] && (e.value.platform.mappings[a] = [
|
|
2229
2260
|
...e.value.platform.mappings[a],
|
|
2230
2261
|
a === "items" ? {
|
|
2231
2262
|
key: "",
|
|
@@ -2241,23 +2272,23 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2241
2272
|
const y = [
|
|
2242
2273
|
{
|
|
2243
2274
|
label: "By day",
|
|
2244
|
-
value:
|
|
2275
|
+
value: ye.BY_DAY
|
|
2245
2276
|
},
|
|
2246
2277
|
{
|
|
2247
2278
|
label: "By invoice",
|
|
2248
|
-
value:
|
|
2279
|
+
value: ye.BY_INVOICE
|
|
2249
2280
|
},
|
|
2250
2281
|
{
|
|
2251
2282
|
label: "By day and category",
|
|
2252
|
-
value:
|
|
2283
|
+
value: ye.BY_DAY_CATEGORY
|
|
2253
2284
|
}
|
|
2254
2285
|
];
|
|
2255
2286
|
function n({
|
|
2256
2287
|
key: a,
|
|
2257
2288
|
value: l
|
|
2258
2289
|
}) {
|
|
2259
|
-
var
|
|
2260
|
-
(r = (
|
|
2290
|
+
var v, r;
|
|
2291
|
+
(r = (v = e.value) == null ? void 0 : v.platform) != null && r.mappings && (e.value.platform.mappings[a] = l);
|
|
2261
2292
|
}
|
|
2262
2293
|
function g(a) {
|
|
2263
2294
|
return {
|
|
@@ -2265,37 +2296,37 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2265
2296
|
account: { placeholder: a, editable: !0 }
|
|
2266
2297
|
};
|
|
2267
2298
|
}
|
|
2268
|
-
async function
|
|
2299
|
+
async function C() {
|
|
2269
2300
|
await x(async () => {
|
|
2270
2301
|
try {
|
|
2271
|
-
await
|
|
2302
|
+
await Ue(e.value._id), await V.getSettings();
|
|
2272
2303
|
} catch (a) {
|
|
2273
2304
|
s.open({ type: "error", message: a.message });
|
|
2274
2305
|
}
|
|
2275
2306
|
});
|
|
2276
2307
|
}
|
|
2277
|
-
return
|
|
2308
|
+
return $e(async () => {
|
|
2278
2309
|
await V.getSettings();
|
|
2279
2310
|
}), (a, l) => {
|
|
2280
|
-
var
|
|
2281
|
-
const
|
|
2282
|
-
return (Q = (
|
|
2283
|
-
t("div",
|
|
2284
|
-
t("div",
|
|
2311
|
+
var Y, Q, j, E, z, ee, te, oe, ae, le, ne, se, ie, re, me, ce, de;
|
|
2312
|
+
const v = S("FmIcon"), r = S("FmButton"), K = S("FmMenuDivider"), N = S("FmTextField"), G = S("FmSelect");
|
|
2313
|
+
return (Q = (Y = e.value) == null ? void 0 : Y.platform) != null && Q.mappings ? (m(), F("div", La, [
|
|
2314
|
+
t("div", Ea, [
|
|
2315
|
+
t("div", Ya, [
|
|
2285
2316
|
l[15] || (l[15] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
2286
|
-
t("div",
|
|
2287
|
-
t("div",
|
|
2288
|
-
i(
|
|
2317
|
+
t("div", za, [
|
|
2318
|
+
t("div", qa, [
|
|
2319
|
+
i(v, {
|
|
2289
2320
|
name: "refresh",
|
|
2290
2321
|
class: "p-2 bg-gray-100 rounded-full",
|
|
2291
|
-
onClick:
|
|
2322
|
+
onClick: C
|
|
2292
2323
|
}),
|
|
2293
|
-
t("span",
|
|
2324
|
+
t("span", Ha, U(p(o)("report.integration.refreshSetting")), 1)
|
|
2294
2325
|
]),
|
|
2295
2326
|
i(r, {
|
|
2296
2327
|
variant: "tertiary",
|
|
2297
2328
|
label: p(o)("report.common.delete"),
|
|
2298
|
-
onClick:
|
|
2329
|
+
onClick: c
|
|
2299
2330
|
}, null, 8, ["label"]),
|
|
2300
2331
|
i(r, {
|
|
2301
2332
|
variant: "primary",
|
|
@@ -2305,36 +2336,36 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2305
2336
|
])
|
|
2306
2337
|
])
|
|
2307
2338
|
]),
|
|
2308
|
-
i(
|
|
2309
|
-
t("div",
|
|
2310
|
-
t("div",
|
|
2311
|
-
t("div",
|
|
2312
|
-
t("div",
|
|
2313
|
-
t("div",
|
|
2314
|
-
t("div",
|
|
2315
|
-
i(
|
|
2339
|
+
i(K, { style: { margin: 0 } }),
|
|
2340
|
+
t("div", Xa, [
|
|
2341
|
+
t("div", Ga, [
|
|
2342
|
+
t("div", Qa, U(p(o)("report.integration.general")), 1),
|
|
2343
|
+
t("div", Ja, [
|
|
2344
|
+
t("div", Wa, U(p(o)("report.common.name")), 1),
|
|
2345
|
+
t("div", Za, [
|
|
2346
|
+
i(N, {
|
|
2316
2347
|
modelValue: e.value.name,
|
|
2317
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
2348
|
+
"onUpdate:modelValue": l[0] || (l[0] = (T) => e.value.name = T)
|
|
2318
2349
|
}, null, 8, ["modelValue"])
|
|
2319
2350
|
])
|
|
2320
2351
|
]),
|
|
2321
|
-
t("div",
|
|
2322
|
-
t("div",
|
|
2352
|
+
t("div", el, [
|
|
2353
|
+
t("div", tl, U(p(o)("report.integration.location")), 1),
|
|
2323
2354
|
i(G, {
|
|
2324
2355
|
modelValue: e.value.platform.locationIds,
|
|
2325
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
2356
|
+
"onUpdate:modelValue": l[1] || (l[1] = (T) => e.value.platform.locationIds = T),
|
|
2326
2357
|
multiselect: !0,
|
|
2327
2358
|
items: _.value,
|
|
2328
2359
|
placeholder: "Select location",
|
|
2329
2360
|
class: "flex-grow",
|
|
2330
|
-
rules: [(
|
|
2361
|
+
rules: [(T) => T.length !== 0 || "Please select at least 1 location"]
|
|
2331
2362
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
2332
2363
|
]),
|
|
2333
|
-
t("div",
|
|
2334
|
-
t("div",
|
|
2364
|
+
t("div", ol, [
|
|
2365
|
+
t("div", al, U(p(o)("report.integration.grouping.title")), 1),
|
|
2335
2366
|
i(G, {
|
|
2336
2367
|
modelValue: e.value.platform.grouping,
|
|
2337
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
2368
|
+
"onUpdate:modelValue": l[2] || (l[2] = (T) => e.value.platform.grouping = T),
|
|
2338
2369
|
multiselect: !1,
|
|
2339
2370
|
items: y,
|
|
2340
2371
|
placeholder: "Select grouping",
|
|
@@ -2342,32 +2373,32 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2342
2373
|
}, null, 8, ["modelValue"])
|
|
2343
2374
|
])
|
|
2344
2375
|
]),
|
|
2345
|
-
t("div",
|
|
2346
|
-
t("div",
|
|
2347
|
-
i(
|
|
2376
|
+
t("div", ll, [
|
|
2377
|
+
t("div", nl, [
|
|
2378
|
+
i(R, {
|
|
2348
2379
|
"model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
|
|
2349
2380
|
options: g("Debtor"),
|
|
2350
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
2381
|
+
"onUpdate:modelValue": l[3] || (l[3] = (T) => n({ key: "debtor", value: T.account }))
|
|
2351
2382
|
}, null, 8, ["model-value", "options"]),
|
|
2352
|
-
i(
|
|
2383
|
+
i(R, {
|
|
2353
2384
|
"model-value": {
|
|
2354
2385
|
key: "Project header",
|
|
2355
2386
|
account: e.value.platform.mappings.projectHeader
|
|
2356
2387
|
},
|
|
2357
2388
|
options: g("Project header"),
|
|
2358
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
2389
|
+
"onUpdate:modelValue": l[4] || (l[4] = (T) => n({ key: "projectHeader", value: T.account }))
|
|
2359
2390
|
}, null, 8, ["model-value", "options"]),
|
|
2360
|
-
i(
|
|
2391
|
+
i(R, {
|
|
2361
2392
|
"model-value": {
|
|
2362
2393
|
key: "Project detail",
|
|
2363
2394
|
account: e.value.platform.mappings.projectDetail
|
|
2364
2395
|
},
|
|
2365
2396
|
options: g("Project detail"),
|
|
2366
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
2397
|
+
"onUpdate:modelValue": l[5] || (l[5] = (T) => n({ key: "projectDetail", value: T.account }))
|
|
2367
2398
|
}, null, 8, ["model-value", "options"])
|
|
2368
2399
|
]),
|
|
2369
|
-
t("div",
|
|
2370
|
-
i(
|
|
2400
|
+
t("div", sl, [
|
|
2401
|
+
i(R, {
|
|
2371
2402
|
"model-value": {
|
|
2372
2403
|
key: "Rounding",
|
|
2373
2404
|
account: e.value.platform.mappings.rounding.account,
|
|
@@ -2378,15 +2409,15 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2378
2409
|
account: { placeholder: "Account code", editable: !0 },
|
|
2379
2410
|
code: { placeholder: "Item code", editable: !0 }
|
|
2380
2411
|
},
|
|
2381
|
-
"onUpdate:modelValue": l[6] || (l[6] = (
|
|
2382
|
-
var
|
|
2383
|
-
(
|
|
2412
|
+
"onUpdate:modelValue": l[6] || (l[6] = (T) => {
|
|
2413
|
+
var d, k, P;
|
|
2414
|
+
(P = (k = (d = e.value) == null ? void 0 : d.platform) == null ? void 0 : k.mappings) != null && P.rounding && (e.value.platform.mappings.rounding.account = T.account, e.value.platform.mappings.rounding.code = T.code);
|
|
2384
2415
|
})
|
|
2385
2416
|
}, null, 8, ["model-value"]),
|
|
2386
|
-
(
|
|
2387
|
-
key: `charge-${
|
|
2388
|
-
modelValue: e.value.platform.mappings.charges[
|
|
2389
|
-
"onUpdate:modelValue": (
|
|
2417
|
+
(m(!0), F(O, null, L((z = (E = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : E.mappings) == null ? void 0 : z.charges, (T, d) => (m(), I(R, {
|
|
2418
|
+
key: `charge-${d}`,
|
|
2419
|
+
modelValue: e.value.platform.mappings.charges[d],
|
|
2420
|
+
"onUpdate:modelValue": (k) => e.value.platform.mappings.charges[d] = k,
|
|
2390
2421
|
options: {
|
|
2391
2422
|
key: { placeholder: "Key", editable: !1 },
|
|
2392
2423
|
account: { placeholder: "Account code", editable: !0 },
|
|
@@ -2395,150 +2426,161 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2395
2426
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
2396
2427
|
])
|
|
2397
2428
|
]),
|
|
2398
|
-
t("div",
|
|
2399
|
-
t("div",
|
|
2400
|
-
t("div",
|
|
2401
|
-
i(
|
|
2429
|
+
t("div", il, [
|
|
2430
|
+
t("div", rl, [
|
|
2431
|
+
t("div", ml, U(p(o)("report.integration.refNumFormat")), 1),
|
|
2432
|
+
i(Pe)
|
|
2402
2433
|
]),
|
|
2403
|
-
t("div",
|
|
2404
|
-
i(
|
|
2434
|
+
t("div", cl, [
|
|
2435
|
+
i(R, {
|
|
2405
2436
|
"model-value": {
|
|
2406
2437
|
key: "Invoice no",
|
|
2407
2438
|
account: e.value.platform.mappings.invoiceDocNo
|
|
2408
2439
|
},
|
|
2409
2440
|
options: g("Invoice no"),
|
|
2410
|
-
"onUpdate:modelValue": l[7] || (l[7] = (
|
|
2441
|
+
"onUpdate:modelValue": l[7] || (l[7] = (T) => n({ key: "invoiceDocNo", value: T.account }))
|
|
2411
2442
|
}, null, 8, ["model-value", "options"]),
|
|
2412
|
-
i(
|
|
2443
|
+
i(R, {
|
|
2413
2444
|
"model-value": {
|
|
2414
2445
|
key: "Credit note no",
|
|
2415
2446
|
account: e.value.platform.mappings.creditNoteDocNo
|
|
2416
2447
|
},
|
|
2417
2448
|
options: g("Credit note no"),
|
|
2418
|
-
"onUpdate:modelValue": l[8] || (l[8] = (
|
|
2449
|
+
"onUpdate:modelValue": l[8] || (l[8] = (T) => n({ key: "creditNoteDocNo", value: T.account }))
|
|
2419
2450
|
}, null, 8, ["model-value", "options"]),
|
|
2420
|
-
i(
|
|
2451
|
+
i(R, {
|
|
2421
2452
|
"model-value": {
|
|
2422
2453
|
key: "Payment no",
|
|
2423
2454
|
account: e.value.platform.mappings.paymentDocNo
|
|
2424
2455
|
},
|
|
2425
2456
|
options: g("Payment no"),
|
|
2426
|
-
"onUpdate:modelValue": l[9] || (l[9] = (
|
|
2457
|
+
"onUpdate:modelValue": l[9] || (l[9] = (T) => n({ key: "paymentDocNo", value: T.account }))
|
|
2427
2458
|
}, null, 8, ["model-value", "options"]),
|
|
2428
|
-
i(
|
|
2459
|
+
i(R, {
|
|
2429
2460
|
"model-value": {
|
|
2430
2461
|
key: "Refund no",
|
|
2431
2462
|
account: e.value.platform.mappings.refundDocNo
|
|
2432
2463
|
},
|
|
2433
2464
|
options: g("Refund no"),
|
|
2434
|
-
"onUpdate:modelValue": l[10] || (l[10] = (
|
|
2465
|
+
"onUpdate:modelValue": l[10] || (l[10] = (T) => n({ key: "refundDocNo", value: T.account }))
|
|
2435
2466
|
}, null, 8, ["model-value", "options"])
|
|
2436
2467
|
])
|
|
2437
2468
|
]),
|
|
2438
|
-
i(
|
|
2469
|
+
i(Ne, {
|
|
2439
2470
|
modelValue: e.value.platform,
|
|
2440
|
-
"onUpdate:modelValue": l[11] || (l[11] = (
|
|
2471
|
+
"onUpdate:modelValue": l[11] || (l[11] = (T) => e.value.platform = T),
|
|
2441
2472
|
label: "email"
|
|
2442
2473
|
}, null, 8, ["modelValue"]),
|
|
2443
|
-
t("div",
|
|
2444
|
-
t("div",
|
|
2474
|
+
t("div", dl, [
|
|
2475
|
+
t("div", ul, U(p(o)("report.integration.items")), 1),
|
|
2445
2476
|
i(r, {
|
|
2446
2477
|
variant: "primary",
|
|
2447
2478
|
icon: "add",
|
|
2448
|
-
onClick: l[12] || (l[12] = () =>
|
|
2479
|
+
onClick: l[12] || (l[12] = () => u("items"))
|
|
2449
2480
|
})
|
|
2450
2481
|
]),
|
|
2451
|
-
t("div",
|
|
2452
|
-
(
|
|
2453
|
-
key: `item-${
|
|
2454
|
-
modelValue: e.value.platform.mappings.items[
|
|
2455
|
-
"onUpdate:modelValue": (
|
|
2482
|
+
t("div", pl, [
|
|
2483
|
+
(m(!0), F(O, null, L((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, (T, d) => (m(), I(R, {
|
|
2484
|
+
key: `item-${d}`,
|
|
2485
|
+
modelValue: e.value.platform.mappings.items[d],
|
|
2486
|
+
"onUpdate:modelValue": (k) => e.value.platform.mappings.items[d] = k,
|
|
2456
2487
|
options: {
|
|
2457
2488
|
key: { placeholder: "Key", editable: !0 },
|
|
2458
2489
|
account: { placeholder: "Account code", editable: !0 },
|
|
2459
2490
|
code: { placeholder: "Item code", editable: !0 }
|
|
2460
2491
|
},
|
|
2461
2492
|
removable: !0,
|
|
2462
|
-
onRemove: () => $("items",
|
|
2493
|
+
onRemove: () => $("items", d)
|
|
2463
2494
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2464
2495
|
]),
|
|
2465
|
-
t("div",
|
|
2466
|
-
t("div",
|
|
2496
|
+
t("div", fl, [
|
|
2497
|
+
t("div", vl, U(p(o)("report.integration.taxes")), 1),
|
|
2467
2498
|
i(r, {
|
|
2468
2499
|
variant: "primary",
|
|
2469
2500
|
icon: "add",
|
|
2470
|
-
onClick: l[13] || (l[13] = () =>
|
|
2501
|
+
onClick: l[13] || (l[13] = () => u("taxes"))
|
|
2471
2502
|
})
|
|
2472
2503
|
]),
|
|
2473
|
-
t("div",
|
|
2474
|
-
(
|
|
2475
|
-
key: `tax-${
|
|
2476
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
2477
|
-
"onUpdate:modelValue": (
|
|
2504
|
+
t("div", gl, [
|
|
2505
|
+
(m(!0), F(O, null, L((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, (T, d) => (m(), I(R, {
|
|
2506
|
+
key: `tax-${d}`,
|
|
2507
|
+
modelValue: e.value.platform.mappings.taxes[d],
|
|
2508
|
+
"onUpdate:modelValue": (k) => e.value.platform.mappings.taxes[d] = k,
|
|
2509
|
+
options: {
|
|
2510
|
+
key: { placeholder: "Key", editable: !0 },
|
|
2511
|
+
account: { placeholder: "Account code", editable: !0 }
|
|
2512
|
+
},
|
|
2513
|
+
removable: !0,
|
|
2514
|
+
onRemove: () => $("taxes", d)
|
|
2515
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
|
|
2516
|
+
(m(!0), F(O, null, L((re = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : re.taxRoundingAdjustments, (T, d) => (m(), I(R, {
|
|
2517
|
+
key: `tax-rounding-adjustment-${d}`,
|
|
2518
|
+
modelValue: e.value.platform.mappings.taxRoundingAdjustments[d],
|
|
2519
|
+
"onUpdate:modelValue": (k) => e.value.platform.mappings.taxRoundingAdjustments[d] = k,
|
|
2478
2520
|
options: {
|
|
2479
2521
|
key: { placeholder: "Key", editable: !0 },
|
|
2480
2522
|
account: { placeholder: "Account code", editable: !0 }
|
|
2481
2523
|
},
|
|
2482
2524
|
removable: !0,
|
|
2483
|
-
onRemove: () => $("
|
|
2525
|
+
onRemove: () => $("taxRoundingAdjustments", d)
|
|
2484
2526
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2485
2527
|
]),
|
|
2486
|
-
t("div",
|
|
2487
|
-
t("div",
|
|
2528
|
+
t("div", yl, [
|
|
2529
|
+
t("div", xl, U(p(o)("report.integration.payments")), 1),
|
|
2488
2530
|
i(r, {
|
|
2489
2531
|
variant: "primary",
|
|
2490
2532
|
icon: "add",
|
|
2491
|
-
onClick: l[14] || (l[14] = () =>
|
|
2533
|
+
onClick: l[14] || (l[14] = () => u("payments"))
|
|
2492
2534
|
})
|
|
2493
2535
|
]),
|
|
2494
|
-
t("div",
|
|
2495
|
-
(
|
|
2496
|
-
key: `payment-${
|
|
2497
|
-
modelValue: e.value.platform.mappings.payments[
|
|
2498
|
-
"onUpdate:modelValue": (
|
|
2536
|
+
t("div", _l, [
|
|
2537
|
+
(m(!0), F(O, null, L((de = (ce = (me = e.value) == null ? void 0 : me.platform) == null ? void 0 : ce.mappings) == null ? void 0 : de.payments, (T, d) => (m(), I(R, {
|
|
2538
|
+
key: `payment-${d}`,
|
|
2539
|
+
modelValue: e.value.platform.mappings.payments[d],
|
|
2540
|
+
"onUpdate:modelValue": (k) => e.value.platform.mappings.payments[d] = k,
|
|
2499
2541
|
options: {
|
|
2500
2542
|
key: { placeholder: "Key", editable: !0 },
|
|
2501
2543
|
account: { placeholder: "Method", editable: !0 }
|
|
2502
2544
|
},
|
|
2503
2545
|
removable: !0,
|
|
2504
|
-
onRemove: () => $("payments",
|
|
2546
|
+
onRemove: () => $("payments", d)
|
|
2505
2547
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2506
2548
|
])
|
|
2507
2549
|
])
|
|
2508
|
-
])) :
|
|
2550
|
+
])) : M("", !0);
|
|
2509
2551
|
};
|
|
2510
2552
|
}
|
|
2511
|
-
}),
|
|
2553
|
+
}), hl = { class: "h-full flex flex-col gap-16" }, wl = { class: "flex flex-row gap-2 justify-between items-center" }, Vl = {
|
|
2512
2554
|
key: 0,
|
|
2513
2555
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
2514
|
-
},
|
|
2556
|
+
}, kl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $l = /* @__PURE__ */ H({
|
|
2515
2557
|
__name: "Preview",
|
|
2516
2558
|
props: {
|
|
2517
2559
|
modelValue: { required: !0 },
|
|
2518
2560
|
modelModifiers: {}
|
|
2519
2561
|
},
|
|
2520
2562
|
emits: ["update:modelValue"],
|
|
2521
|
-
setup(
|
|
2522
|
-
const { t: o } = J(), e = B([]), s =
|
|
2523
|
-
() => e.value.reduce((
|
|
2524
|
-
const $ =
|
|
2525
|
-
|
|
2526
|
-
date:
|
|
2527
|
-
docNo:
|
|
2528
|
-
debtor:
|
|
2529
|
-
description:
|
|
2563
|
+
setup(f) {
|
|
2564
|
+
const { t: o } = J(), e = B([]), s = q(
|
|
2565
|
+
() => e.value.reduce((c, h) => {
|
|
2566
|
+
const $ = c.length, { invoice: u, payments: y } = h;
|
|
2567
|
+
c[$] = {
|
|
2568
|
+
date: u.DocDate,
|
|
2569
|
+
docNo: u.DocNo,
|
|
2570
|
+
debtor: u.Code,
|
|
2571
|
+
description: u.Description_HDR
|
|
2530
2572
|
};
|
|
2531
|
-
for (let n = 0; n < Math.max(
|
|
2573
|
+
for (let n = 0; n < Math.max(u._items.length, y.length); n++) {
|
|
2532
2574
|
const g = $ + n;
|
|
2533
|
-
|
|
2534
|
-
...
|
|
2535
|
-
itemDescription:
|
|
2536
|
-
itemUnitPrice:
|
|
2537
|
-
itemAccount:
|
|
2538
|
-
itemTaxCode:
|
|
2539
|
-
itemTax:
|
|
2540
|
-
}), y[n] && (
|
|
2541
|
-
...
|
|
2575
|
+
c[g] || (c[g] = {}), u._items[n] && (c[g] = {
|
|
2576
|
+
...c[g],
|
|
2577
|
+
itemDescription: u._items[n].Description_DTL,
|
|
2578
|
+
itemUnitPrice: u._items[n].UnitPrice,
|
|
2579
|
+
itemAccount: u._items[n].ACCOUNT,
|
|
2580
|
+
itemTaxCode: u._items[n].Tax,
|
|
2581
|
+
itemTax: u._items[n].TaxAmt
|
|
2582
|
+
}), y[n] && (c[g] = {
|
|
2583
|
+
...c[g],
|
|
2542
2584
|
paymentDocNo: y[n].DOCNO_Header,
|
|
2543
2585
|
paymentMethod: y[n].PAYMENTMETHOD,
|
|
2544
2586
|
paymentAccount: y[n].CODE,
|
|
@@ -2546,22 +2588,22 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2546
2588
|
paymentAmount: y[n].KOAMT
|
|
2547
2589
|
});
|
|
2548
2590
|
}
|
|
2549
|
-
return
|
|
2591
|
+
return c;
|
|
2550
2592
|
}, [])
|
|
2551
2593
|
), V = [
|
|
2552
2594
|
{
|
|
2553
2595
|
accessorKey: "date",
|
|
2554
|
-
header: () =>
|
|
2596
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
2555
2597
|
enableSorting: !1
|
|
2556
2598
|
},
|
|
2557
2599
|
{
|
|
2558
2600
|
accessorKey: "docNo",
|
|
2559
|
-
header: () =>
|
|
2601
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Doc No"),
|
|
2560
2602
|
enableSorting: !1
|
|
2561
2603
|
},
|
|
2562
2604
|
{
|
|
2563
2605
|
accessorKey: "debtor",
|
|
2564
|
-
header: () =>
|
|
2606
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Debtor"),
|
|
2565
2607
|
enableSorting: !1
|
|
2566
2608
|
},
|
|
2567
2609
|
{
|
|
@@ -2571,7 +2613,7 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2571
2613
|
},
|
|
2572
2614
|
{
|
|
2573
2615
|
accessorKey: "itemAccount",
|
|
2574
|
-
header: () =>
|
|
2616
|
+
header: () => A("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Item Account"),
|
|
2575
2617
|
enableSorting: !1
|
|
2576
2618
|
},
|
|
2577
2619
|
{
|
|
@@ -2581,7 +2623,7 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2581
2623
|
},
|
|
2582
2624
|
{
|
|
2583
2625
|
accessorKey: "itemDescription",
|
|
2584
|
-
header: () =>
|
|
2626
|
+
header: () => A("p", { class: "min-w-[140px] text-nowrap text-ellipsis" }, "Item Description"),
|
|
2585
2627
|
enableSorting: !1
|
|
2586
2628
|
},
|
|
2587
2629
|
{
|
|
@@ -2614,15 +2656,15 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2614
2656
|
header: "Payment Amount",
|
|
2615
2657
|
enableSorting: !1
|
|
2616
2658
|
}
|
|
2617
|
-
], w = X(
|
|
2618
|
-
|
|
2659
|
+
], w = X(f, "modelValue"), x = B(!1), D = ge(), { dateRange: b } = Ie(ve());
|
|
2660
|
+
xe(
|
|
2619
2661
|
() => b.value,
|
|
2620
2662
|
async () => {
|
|
2621
2663
|
if (w.value._id)
|
|
2622
2664
|
try {
|
|
2623
|
-
x.value = !0, e.value = await
|
|
2624
|
-
} catch (
|
|
2625
|
-
|
|
2665
|
+
x.value = !0, e.value = await Te(w.value._id);
|
|
2666
|
+
} catch (c) {
|
|
2667
|
+
D.open({ message: c.message, type: "error" });
|
|
2626
2668
|
} finally {
|
|
2627
2669
|
x.value = !1;
|
|
2628
2670
|
}
|
|
@@ -2633,20 +2675,20 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2633
2675
|
);
|
|
2634
2676
|
async function _() {
|
|
2635
2677
|
try {
|
|
2636
|
-
w.value._id ? (x.value = !0, await
|
|
2637
|
-
} catch (
|
|
2638
|
-
|
|
2678
|
+
w.value._id ? (x.value = !0, await Be(w.value._id)) : D.open({ message: "Invalid accounting setting", type: "error" });
|
|
2679
|
+
} catch (c) {
|
|
2680
|
+
D.open({ message: c.message, type: "error" });
|
|
2639
2681
|
} finally {
|
|
2640
2682
|
x.value = !1;
|
|
2641
2683
|
}
|
|
2642
2684
|
}
|
|
2643
|
-
return (
|
|
2644
|
-
const $ =
|
|
2645
|
-
return
|
|
2646
|
-
t("div",
|
|
2647
|
-
i(
|
|
2685
|
+
return (c, h) => {
|
|
2686
|
+
const $ = S("FmButton"), u = S("FmCircularProgress"), y = S("FmTable");
|
|
2687
|
+
return m(), F("div", hl, [
|
|
2688
|
+
t("div", wl, [
|
|
2689
|
+
i(Re, {
|
|
2648
2690
|
"date-range": p(b),
|
|
2649
|
-
"onUpdate:dateRange": h[0] || (h[0] = (n) =>
|
|
2691
|
+
"onUpdate:dateRange": h[0] || (h[0] = (n) => Se(b) ? b.value = n : null),
|
|
2650
2692
|
compare: !1
|
|
2651
2693
|
}, null, 8, ["date-range"]),
|
|
2652
2694
|
i($, {
|
|
@@ -2656,27 +2698,27 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2656
2698
|
onClick: _
|
|
2657
2699
|
}, null, 8, ["loading", "label"])
|
|
2658
2700
|
]),
|
|
2659
|
-
x.value ? (
|
|
2660
|
-
i(
|
|
2661
|
-
t("span",
|
|
2662
|
-
])) : s.value.length > 0 ? (
|
|
2701
|
+
x.value ? (m(), F("div", Vl, [
|
|
2702
|
+
i(u, { size: "xl" }),
|
|
2703
|
+
t("span", kl, U(p(o)("report.common.isLoading")), 1)
|
|
2704
|
+
])) : s.value.length > 0 ? (m(), I(y, {
|
|
2663
2705
|
key: 1,
|
|
2664
2706
|
class: "flex overflow-y-auto",
|
|
2665
2707
|
"row-data": s.value,
|
|
2666
2708
|
"column-defs": V
|
|
2667
|
-
}, null, 8, ["row-data"])) :
|
|
2709
|
+
}, null, 8, ["row-data"])) : M("", !0)
|
|
2668
2710
|
]);
|
|
2669
2711
|
};
|
|
2670
2712
|
}
|
|
2671
|
-
}),
|
|
2713
|
+
}), Sl = { class: "h-full relative flex flex-col" }, Cl = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Fl = /* @__PURE__ */ H({
|
|
2672
2714
|
__name: "SQL",
|
|
2673
2715
|
props: {
|
|
2674
2716
|
modelValue: {},
|
|
2675
2717
|
modelModifiers: {}
|
|
2676
2718
|
},
|
|
2677
2719
|
emits: ["update:modelValue"],
|
|
2678
|
-
setup(
|
|
2679
|
-
const { t: o } = J(), e = X(
|
|
2720
|
+
setup(f) {
|
|
2721
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = [
|
|
2680
2722
|
{
|
|
2681
2723
|
label: o("report.integration.setting"),
|
|
2682
2724
|
value: "setting",
|
|
@@ -2687,38 +2729,38 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2687
2729
|
value: "preview",
|
|
2688
2730
|
icon: "table"
|
|
2689
2731
|
}
|
|
2690
|
-
], w =
|
|
2732
|
+
], w = fe(), x = q(() => {
|
|
2691
2733
|
switch (s.value) {
|
|
2692
2734
|
case "preview":
|
|
2693
|
-
return
|
|
2735
|
+
return $l;
|
|
2694
2736
|
case "setting":
|
|
2695
|
-
return
|
|
2737
|
+
return bl;
|
|
2696
2738
|
default:
|
|
2697
2739
|
return null;
|
|
2698
2740
|
}
|
|
2699
2741
|
});
|
|
2700
|
-
return (
|
|
2742
|
+
return (D, b) => {
|
|
2701
2743
|
var h;
|
|
2702
|
-
const _ =
|
|
2703
|
-
return
|
|
2744
|
+
const _ = S("FmPageHead"), c = S("FmTabs");
|
|
2745
|
+
return m(), F("div", Sl, [
|
|
2704
2746
|
i(_, {
|
|
2705
2747
|
title: ((h = e.value) == null ? void 0 : h.name) || "SQL",
|
|
2706
2748
|
"back-button": !0,
|
|
2707
2749
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2708
2750
|
"onClick:back": p(w).back
|
|
2709
2751
|
}, {
|
|
2710
|
-
description:
|
|
2752
|
+
description: _e(() => b[2] || (b[2] = [
|
|
2711
2753
|
t("div", null, null, -1)
|
|
2712
2754
|
])),
|
|
2713
2755
|
_: 1
|
|
2714
2756
|
}, 8, ["title", "onClick:back"]),
|
|
2715
|
-
i(
|
|
2757
|
+
i(c, {
|
|
2716
2758
|
"model-value": s.value,
|
|
2717
2759
|
"onUpdate:modelValue": b[0] || (b[0] = ($) => s.value = $),
|
|
2718
2760
|
items: V
|
|
2719
2761
|
}, null, 8, ["model-value"]),
|
|
2720
|
-
t("div",
|
|
2721
|
-
(
|
|
2762
|
+
t("div", Cl, [
|
|
2763
|
+
(m(), I(we(x.value), {
|
|
2722
2764
|
modelValue: e.value,
|
|
2723
2765
|
"onUpdate:modelValue": b[1] || (b[1] = ($) => e.value = $)
|
|
2724
2766
|
}, null, 8, ["modelValue"]))
|
|
@@ -2726,27 +2768,27 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2726
2768
|
]);
|
|
2727
2769
|
};
|
|
2728
2770
|
}
|
|
2729
|
-
}),
|
|
2771
|
+
}), Dl = {
|
|
2730
2772
|
key: 0,
|
|
2731
2773
|
class: "flex flex-col h-full"
|
|
2732
|
-
},
|
|
2774
|
+
}, Ul = { class: "flex flex-col gap-16 pb-[24px]" }, Tl = { class: "flex flex-row justify-between items-center gap-2" }, Al = { class: "fm-typo-en-title-sm-800" }, Il = { class: "flex flex-row gap-2 items-center" }, Rl = { class: "flex flex-row gap-2 items-center" }, Nl = { class: "relative group cursor-pointer" }, Kl = { 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" }, Ml = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Pl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jl = { class: "flex flex-row items-center max-w-[100%]" }, Ol = { class: "w-[25%]" }, Bl = { class: "flex-grow" }, Ll = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, El = { class: "flex flex-row items-center justify-between" }, Yl = { class: "w-[25%]" }, zl = { class: "flex-grow" }, ql = { class: "flex flex-row items-center justify-between" }, Hl = { class: "w-[25%]" }, Xl = { class: "flex-grow" }, Gl = { class: "flex flex-col gap-16" }, Ql = { class: "fm-typo-en-title-sm-800" }, Jl = { class: "flex flex-row items-center max-w-[100%]" }, Wl = { class: "w-[25%]" }, Zl = { class: "flex-grow" }, en = { class: "flex flex-row items-center max-w-[100%]" }, tn = { class: "w-[25%]" }, on = { class: "flex flex-row items-center max-w-[100%]" }, an = { class: "w-[25%]" }, ln = {
|
|
2733
2775
|
key: 0,
|
|
2734
2776
|
class: "flex flex-row items-center max-w-[100%]"
|
|
2735
|
-
},
|
|
2777
|
+
}, nn = { class: "flex flex-col gap-16" }, sn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, rn = { key: 1 }, mn = { class: "flex flex-col gap-16 pt-3 pb-3" }, cn = { class: "flex flex-row items-center gap-5" }, dn = { class: "fm-typo-en-title-sm-800" }, un = { class: "flex flex-row items-center max-w-[100%]" }, pn = { class: "flex-grow" }, fn = { class: "flex flex-row items-center max-w-[100%]" }, vn = { class: "flex-grow" }, gn = { class: "flex flex-row items-center gap-x-16" }, yn = { class: "fm-typo-en-title-sm-800" }, xn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, _n = { class: "flex flex-row items-center gap-x-16" }, bn = { class: "fm-typo-en-title-sm-800" }, hn = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, wn = { class: "flex flex-row items-center gap-x-16" }, Vn = { class: "fm-typo-en-title-sm-800" }, kn = { class: "flex flex-row items-center justify-between" }, $n = { class: "flex-grow" }, Sn = {
|
|
2736
2778
|
key: 0,
|
|
2737
2779
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2738
|
-
},
|
|
2780
|
+
}, Cn = {
|
|
2739
2781
|
key: 1,
|
|
2740
2782
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2741
|
-
},
|
|
2783
|
+
}, Fn = {
|
|
2742
2784
|
key: 3,
|
|
2743
2785
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2744
|
-
},
|
|
2786
|
+
}, Dn = {
|
|
2745
2787
|
key: 0,
|
|
2746
2788
|
class: "flex flex-row items-center"
|
|
2747
|
-
},
|
|
2789
|
+
}, Un = /* @__PURE__ */ H({
|
|
2748
2790
|
__name: "Setting",
|
|
2749
|
-
props: /* @__PURE__ */
|
|
2791
|
+
props: /* @__PURE__ */ he({
|
|
2750
2792
|
retrievedMethods: {
|
|
2751
2793
|
type: Object,
|
|
2752
2794
|
required: !0
|
|
@@ -2760,24 +2802,24 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2760
2802
|
modelModifiers: {}
|
|
2761
2803
|
}),
|
|
2762
2804
|
emits: ["update:modelValue"],
|
|
2763
|
-
setup(
|
|
2764
|
-
const { t: o } = J(), e = X(
|
|
2765
|
-
() => b.map((
|
|
2805
|
+
setup(f) {
|
|
2806
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = ge(), V = Ve(), w = fe(), { promptLoader: x } = Ce(), { promptMessage: D } = Ae(), { restaurants: b } = ve(), _ = q(
|
|
2807
|
+
() => b.map((C) => ({ label: C.name, value: C.id }))
|
|
2766
2808
|
);
|
|
2767
|
-
function
|
|
2809
|
+
function c(C) {
|
|
2768
2810
|
var a;
|
|
2769
|
-
!((a =
|
|
2770
|
-
const
|
|
2771
|
-
|
|
2811
|
+
!((a = f.retrievedMethods) != null && a.data) || !Array.isArray(f.retrievedMethods.data) || C.forEach((l) => {
|
|
2812
|
+
const v = f.retrievedMethods.data.find((r) => r.value == l.id);
|
|
2813
|
+
v && (l.cnId = v.cnId);
|
|
2772
2814
|
});
|
|
2773
2815
|
}
|
|
2774
2816
|
async function h() {
|
|
2775
|
-
await
|
|
2817
|
+
await D({
|
|
2776
2818
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
2777
2819
|
title: o("report.common.delete")
|
|
2778
2820
|
}) && await x(async () => {
|
|
2779
2821
|
try {
|
|
2780
|
-
await
|
|
2822
|
+
await Fe(e.value._id), await V.getSettings(), w.back();
|
|
2781
2823
|
} catch (a) {
|
|
2782
2824
|
s.open({ type: "error", message: a.message });
|
|
2783
2825
|
}
|
|
@@ -2785,29 +2827,29 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2785
2827
|
}
|
|
2786
2828
|
async function $() {
|
|
2787
2829
|
await x(async () => {
|
|
2788
|
-
var
|
|
2830
|
+
var C, a, l;
|
|
2789
2831
|
try {
|
|
2790
|
-
(l = (a = (
|
|
2791
|
-
} catch (
|
|
2792
|
-
s.open({ type: "error", message:
|
|
2832
|
+
(l = (a = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : a.mappings) != null && l.paymentMethods && c(e.value.platform.mappings.paymentMethods), await De(e.value._id, e.value), await V.getSettings();
|
|
2833
|
+
} catch (v) {
|
|
2834
|
+
s.open({ type: "error", message: v.message });
|
|
2793
2835
|
}
|
|
2794
2836
|
});
|
|
2795
2837
|
}
|
|
2796
|
-
function
|
|
2797
|
-
var l,
|
|
2798
|
-
(
|
|
2799
|
-
(r,
|
|
2838
|
+
function u(C, a) {
|
|
2839
|
+
var l, v;
|
|
2840
|
+
(v = (l = e.value.platform) == null ? void 0 : l.mappings) != null && v[C] && (e.value.platform.mappings[C] = e.value.platform.mappings[C].filter(
|
|
2841
|
+
(r, K) => K !== a
|
|
2800
2842
|
));
|
|
2801
2843
|
}
|
|
2802
|
-
function y(
|
|
2844
|
+
function y(C) {
|
|
2803
2845
|
var a, l;
|
|
2804
|
-
(l = (a = e.value.platform) == null ? void 0 : a.mappings) != null && l[
|
|
2805
|
-
...e.value.platform.mappings[
|
|
2806
|
-
|
|
2846
|
+
(l = (a = e.value.platform) == null ? void 0 : a.mappings) != null && l[C] && (e.value.platform.mappings[C] = [
|
|
2847
|
+
...e.value.platform.mappings[C],
|
|
2848
|
+
C === "items" ? {
|
|
2807
2849
|
key: "",
|
|
2808
2850
|
account: "",
|
|
2809
2851
|
description: ""
|
|
2810
|
-
} :
|
|
2852
|
+
} : C === "taxes" ? {
|
|
2811
2853
|
key: "",
|
|
2812
2854
|
account: "SST-"
|
|
2813
2855
|
} : {
|
|
@@ -2819,21 +2861,21 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2819
2861
|
const n = [
|
|
2820
2862
|
{
|
|
2821
2863
|
label: "By day",
|
|
2822
|
-
value:
|
|
2864
|
+
value: ye.BY_DAY
|
|
2823
2865
|
}
|
|
2824
2866
|
];
|
|
2825
|
-
|
|
2867
|
+
xe(
|
|
2826
2868
|
() => {
|
|
2827
|
-
var
|
|
2828
|
-
return (l = (a = (
|
|
2869
|
+
var C, a, l;
|
|
2870
|
+
return (l = (a = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : a.mappings) == null ? void 0 : l.taxes;
|
|
2829
2871
|
},
|
|
2830
|
-
(
|
|
2831
|
-
|
|
2832
|
-
var
|
|
2833
|
-
const
|
|
2872
|
+
(C) => {
|
|
2873
|
+
C && C.forEach((a, l) => {
|
|
2874
|
+
var K;
|
|
2875
|
+
const v = a.key || "";
|
|
2834
2876
|
let r = a.account;
|
|
2835
|
-
if (!r &&
|
|
2836
|
-
switch (
|
|
2877
|
+
if (!r && v) {
|
|
2878
|
+
switch (v) {
|
|
2837
2879
|
case "SST_SV":
|
|
2838
2880
|
r = "SST-6";
|
|
2839
2881
|
break;
|
|
@@ -2844,7 +2886,7 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2844
2886
|
r = "SST-0";
|
|
2845
2887
|
break;
|
|
2846
2888
|
}
|
|
2847
|
-
(
|
|
2889
|
+
(K = e.value.platform) != null && K.mappings && (e.value.platform.mappings.taxes[l] = {
|
|
2848
2890
|
...a,
|
|
2849
2891
|
account: r
|
|
2850
2892
|
});
|
|
@@ -2852,14 +2894,14 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2852
2894
|
});
|
|
2853
2895
|
},
|
|
2854
2896
|
{ immediate: !0, deep: !0 }
|
|
2855
|
-
),
|
|
2897
|
+
), xe(
|
|
2856
2898
|
() => {
|
|
2857
|
-
var
|
|
2858
|
-
return (l = (a = (
|
|
2899
|
+
var C, a, l;
|
|
2900
|
+
return (l = (a = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : a.mappings) == null ? void 0 : l.version;
|
|
2859
2901
|
},
|
|
2860
|
-
(
|
|
2861
|
-
var a, l,
|
|
2862
|
-
|
|
2902
|
+
(C) => {
|
|
2903
|
+
var a, l, v, r, K;
|
|
2904
|
+
C === "v1" && !((v = (l = (a = e.value) == null ? void 0 : a.platform) == null ? void 0 : l.mappings) != null && v.payee) && (K = (r = e.value) == null ? void 0 : r.platform) != null && K.mappings && (e.value.platform.mappings.payee = {
|
|
2863
2905
|
id: 1,
|
|
2864
2906
|
name: ""
|
|
2865
2907
|
});
|
|
@@ -2869,37 +2911,37 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2869
2911
|
async function g() {
|
|
2870
2912
|
await x(async () => {
|
|
2871
2913
|
try {
|
|
2872
|
-
await
|
|
2873
|
-
} catch (
|
|
2874
|
-
s.open({ type: "error", message:
|
|
2914
|
+
await Ue(e.value._id), await V.getSettings();
|
|
2915
|
+
} catch (C) {
|
|
2916
|
+
s.open({ type: "error", message: C.message });
|
|
2875
2917
|
}
|
|
2876
2918
|
});
|
|
2877
2919
|
}
|
|
2878
|
-
return
|
|
2920
|
+
return $e(async () => {
|
|
2879
2921
|
await V.getSettings();
|
|
2880
|
-
}), (
|
|
2881
|
-
var Q,
|
|
2882
|
-
const l =
|
|
2883
|
-
return (
|
|
2884
|
-
t("div",
|
|
2885
|
-
t("div",
|
|
2886
|
-
t("div",
|
|
2887
|
-
t("div",
|
|
2888
|
-
t("div",
|
|
2889
|
-
t("div",
|
|
2922
|
+
}), (C, a) => {
|
|
2923
|
+
var Q, j, E, z, ee, te, oe, ae, le, ne, se, ie, re, me, ce, de, T;
|
|
2924
|
+
const l = S("FmIcon"), v = S("FmButton"), r = S("FmSelect"), K = S("FmMenuDivider"), N = S("FmTextField"), G = S("FmCircularProgress"), Y = S("FmCheckbox");
|
|
2925
|
+
return (j = (Q = e.value) == null ? void 0 : Q.platform) != null && j.mappings ? (m(), F("div", Dl, [
|
|
2926
|
+
t("div", Ul, [
|
|
2927
|
+
t("div", Tl, [
|
|
2928
|
+
t("div", Al, U(p(o)("report.integration.connect")), 1),
|
|
2929
|
+
t("div", Il, [
|
|
2930
|
+
t("div", Rl, [
|
|
2931
|
+
t("div", Nl, [
|
|
2890
2932
|
i(l, {
|
|
2891
2933
|
name: "refresh",
|
|
2892
2934
|
class: "p-2 bg-gray-100 rounded-full",
|
|
2893
2935
|
onClick: g
|
|
2894
2936
|
}),
|
|
2895
|
-
t("span",
|
|
2937
|
+
t("span", Kl, U(p(o)("report.integration.refreshSetting")), 1)
|
|
2896
2938
|
]),
|
|
2897
|
-
i(
|
|
2939
|
+
i(v, {
|
|
2898
2940
|
variant: "tertiary",
|
|
2899
2941
|
label: p(o)("report.common.delete"),
|
|
2900
2942
|
onClick: h
|
|
2901
2943
|
}, null, 8, ["label"]),
|
|
2902
|
-
i(
|
|
2944
|
+
i(v, {
|
|
2903
2945
|
variant: "primary",
|
|
2904
2946
|
label: p(o)("report.common.update"),
|
|
2905
2947
|
onClick: $
|
|
@@ -2909,13 +2951,13 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2909
2951
|
])
|
|
2910
2952
|
]),
|
|
2911
2953
|
t("div", Ml, [
|
|
2912
|
-
t("div",
|
|
2913
|
-
t("div",
|
|
2914
|
-
t("div",
|
|
2915
|
-
t("div",
|
|
2954
|
+
t("div", Pl, U(p(o)("report.integration.biztory.authenticate")), 1),
|
|
2955
|
+
t("div", jl, [
|
|
2956
|
+
t("div", Ol, "Biztory " + U(p(o)("report.integration.biztory.version")), 1),
|
|
2957
|
+
t("div", Bl, [
|
|
2916
2958
|
i(r, {
|
|
2917
2959
|
modelValue: e.value.platform.mappings.version,
|
|
2918
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
2960
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => e.value.platform.mappings.version = d),
|
|
2919
2961
|
items: [
|
|
2920
2962
|
{ label: "v1", value: "v1" },
|
|
2921
2963
|
{ label: "v2", value: "v2" }
|
|
@@ -2924,55 +2966,55 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2924
2966
|
}, null, 8, ["modelValue"])
|
|
2925
2967
|
])
|
|
2926
2968
|
]),
|
|
2927
|
-
i(
|
|
2928
|
-
t("div",
|
|
2929
|
-
t("div",
|
|
2930
|
-
t("div",
|
|
2931
|
-
t("div",
|
|
2932
|
-
i(
|
|
2969
|
+
i(K, { style: { margin: 0 } }),
|
|
2970
|
+
t("div", Ll, [
|
|
2971
|
+
t("div", El, [
|
|
2972
|
+
t("div", Yl, U(p(o)("report.integration.biztory.subdomain")), 1),
|
|
2973
|
+
t("div", zl, [
|
|
2974
|
+
i(N, {
|
|
2933
2975
|
modelValue: e.value.platform.subdomain,
|
|
2934
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
2976
|
+
"onUpdate:modelValue": a[1] || (a[1] = (d) => e.value.platform.subdomain = d),
|
|
2935
2977
|
placeholder: "Subdomain"
|
|
2936
2978
|
}, null, 8, ["modelValue"])
|
|
2937
2979
|
])
|
|
2938
2980
|
]),
|
|
2939
|
-
t("div",
|
|
2940
|
-
t("div",
|
|
2941
|
-
t("div",
|
|
2942
|
-
i(
|
|
2981
|
+
t("div", ql, [
|
|
2982
|
+
t("div", Hl, U(p(o)("report.integration.biztory.apiKey")), 1),
|
|
2983
|
+
t("div", Xl, [
|
|
2984
|
+
i(N, {
|
|
2943
2985
|
modelValue: e.value.platform.api_key,
|
|
2944
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
2986
|
+
"onUpdate:modelValue": a[2] || (a[2] = (d) => e.value.platform.api_key = d),
|
|
2945
2987
|
placeholder: "API Key"
|
|
2946
2988
|
}, null, 8, ["modelValue"])
|
|
2947
2989
|
])
|
|
2948
2990
|
]),
|
|
2949
|
-
t("div",
|
|
2950
|
-
t("div",
|
|
2951
|
-
t("div",
|
|
2952
|
-
t("div",
|
|
2953
|
-
t("div",
|
|
2954
|
-
i(
|
|
2991
|
+
t("div", Gl, [
|
|
2992
|
+
t("div", Ql, U(p(o)("report.integration.general")), 1),
|
|
2993
|
+
t("div", Jl, [
|
|
2994
|
+
t("div", Wl, U(p(o)("report.common.name")), 1),
|
|
2995
|
+
t("div", Zl, [
|
|
2996
|
+
i(N, {
|
|
2955
2997
|
modelValue: e.value.name,
|
|
2956
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
2998
|
+
"onUpdate:modelValue": a[3] || (a[3] = (d) => e.value.name = d)
|
|
2957
2999
|
}, null, 8, ["modelValue"])
|
|
2958
3000
|
])
|
|
2959
3001
|
]),
|
|
2960
|
-
t("div",
|
|
2961
|
-
t("div",
|
|
3002
|
+
t("div", en, [
|
|
3003
|
+
t("div", tn, U(p(o)("report.common.location")), 1),
|
|
2962
3004
|
i(r, {
|
|
2963
3005
|
modelValue: e.value.platform.locationIds,
|
|
2964
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
3006
|
+
"onUpdate:modelValue": a[4] || (a[4] = (d) => e.value.platform.locationIds = d),
|
|
2965
3007
|
multiselect: !0,
|
|
2966
3008
|
items: _.value,
|
|
2967
3009
|
placeholder: p(o)("report.common.location"),
|
|
2968
3010
|
class: "flex-grow"
|
|
2969
3011
|
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
2970
3012
|
]),
|
|
2971
|
-
t("div",
|
|
2972
|
-
t("div",
|
|
3013
|
+
t("div", on, [
|
|
3014
|
+
t("div", an, U(p(o)("report.integration.grouping.title")), 1),
|
|
2973
3015
|
i(r, {
|
|
2974
3016
|
modelValue: e.value.platform.grouping,
|
|
2975
|
-
"onUpdate:modelValue": a[5] || (a[5] = (
|
|
3017
|
+
"onUpdate:modelValue": a[5] || (a[5] = (d) => e.value.platform.grouping = d),
|
|
2976
3018
|
multiselect: !1,
|
|
2977
3019
|
items: n,
|
|
2978
3020
|
placeholder: p(o)("report.integration.grouping.title"),
|
|
@@ -2980,130 +3022,141 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2980
3022
|
disabled: ""
|
|
2981
3023
|
}, null, 8, ["modelValue", "placeholder"])
|
|
2982
3024
|
]),
|
|
2983
|
-
e.value.platform.mappings.version == "v1" ? (
|
|
3025
|
+
e.value.platform.mappings.version == "v1" ? (m(), F("div", ln, [
|
|
2984
3026
|
a[15] || (a[15] = t("div", { class: "w-[33%]" }, "Payee ID", -1)),
|
|
2985
|
-
e.value.platform.mappings.version == "v1" ? (
|
|
3027
|
+
e.value.platform.mappings.version == "v1" ? (m(), I(R, {
|
|
2986
3028
|
key: 0,
|
|
2987
3029
|
modelValue: e.value.platform.mappings.payee,
|
|
2988
|
-
"onUpdate:modelValue": a[6] || (a[6] = (
|
|
3030
|
+
"onUpdate:modelValue": a[6] || (a[6] = (d) => e.value.platform.mappings.payee = d),
|
|
2989
3031
|
options: {
|
|
2990
3032
|
id: { placeholder: "ID", editable: !0 }
|
|
2991
3033
|
},
|
|
2992
3034
|
removable: !1
|
|
2993
|
-
}, null, 8, ["modelValue"])) :
|
|
2994
|
-
])) :
|
|
2995
|
-
t("div",
|
|
2996
|
-
t("div",
|
|
2997
|
-
!
|
|
3035
|
+
}, null, 8, ["modelValue"])) : M("", !0)
|
|
3036
|
+
])) : M("", !0),
|
|
3037
|
+
t("div", nn, [
|
|
3038
|
+
t("div", sn, [
|
|
3039
|
+
!f.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (m(), I(G, {
|
|
2998
3040
|
key: 0,
|
|
2999
3041
|
size: "xl"
|
|
3000
|
-
})) :
|
|
3001
|
-
|
|
3002
|
-
e.value.platform.mappings.version == "v2" ? (
|
|
3042
|
+
})) : M("", !0),
|
|
3043
|
+
f.retrievedCustomers.isLoaded && f.retrievedCustomers.data && ((E = f.retrievedCustomers.data) == null ? void 0 : E.length) != 0 ? (m(), F("div", rn, [
|
|
3044
|
+
e.value.platform.mappings.version == "v2" ? (m(), I(ke, {
|
|
3003
3045
|
key: 0,
|
|
3004
3046
|
modelValue: e.value.platform.mappings.payeeId,
|
|
3005
|
-
"onUpdate:modelValue": a[7] || (a[7] = (
|
|
3047
|
+
"onUpdate:modelValue": a[7] || (a[7] = (d) => e.value.platform.mappings.payeeId = d),
|
|
3006
3048
|
options: {
|
|
3007
3049
|
key: { placeholder: "Payee", editable: !1 },
|
|
3008
3050
|
customer: {
|
|
3009
3051
|
placeholder: "Select payee",
|
|
3010
3052
|
editable: !0,
|
|
3011
|
-
dropdownOptions: ((
|
|
3053
|
+
dropdownOptions: ((z = f.retrievedCustomers) == null ? void 0 : z.data) ?? []
|
|
3012
3054
|
}
|
|
3013
3055
|
},
|
|
3014
3056
|
removable: !1,
|
|
3015
3057
|
"single-value-mode": ""
|
|
3016
|
-
}, null, 8, ["modelValue", "options"])) :
|
|
3017
|
-
])) :
|
|
3058
|
+
}, null, 8, ["modelValue", "options"])) : M("", !0)
|
|
3059
|
+
])) : M("", !0)
|
|
3018
3060
|
])
|
|
3019
3061
|
])
|
|
3020
3062
|
]),
|
|
3021
|
-
t("div",
|
|
3022
|
-
t("div",
|
|
3023
|
-
t("div",
|
|
3024
|
-
i(
|
|
3063
|
+
t("div", mn, [
|
|
3064
|
+
t("div", cn, [
|
|
3065
|
+
t("div", dn, U(p(o)("report.integration.refNumFormat")), 1),
|
|
3066
|
+
i(Pe)
|
|
3025
3067
|
]),
|
|
3026
|
-
t("div",
|
|
3027
|
-
a[16] || (a[16] = t("div", { class: "w-[25%]" },
|
|
3028
|
-
t("div",
|
|
3029
|
-
i(
|
|
3068
|
+
t("div", un, [
|
|
3069
|
+
a[16] || (a[16] = t("div", { class: "w-[25%]" }, U("Invoice no"), -1)),
|
|
3070
|
+
t("div", pn, [
|
|
3071
|
+
i(N, {
|
|
3030
3072
|
modelValue: e.value.platform.mappings.invoiceDocNo,
|
|
3031
|
-
"onUpdate:modelValue": a[8] || (a[8] = (
|
|
3073
|
+
"onUpdate:modelValue": a[8] || (a[8] = (d) => e.value.platform.mappings.invoiceDocNo = d)
|
|
3032
3074
|
}, null, 8, ["modelValue"])
|
|
3033
3075
|
])
|
|
3034
3076
|
]),
|
|
3035
|
-
t("div",
|
|
3036
|
-
a[17] || (a[17] = t("div", { class: "w-[25%]" },
|
|
3037
|
-
t("div",
|
|
3038
|
-
i(
|
|
3077
|
+
t("div", fn, [
|
|
3078
|
+
a[17] || (a[17] = t("div", { class: "w-[25%]" }, U("Credit no"), -1)),
|
|
3079
|
+
t("div", vn, [
|
|
3080
|
+
i(N, {
|
|
3039
3081
|
modelValue: e.value.platform.mappings.creditNoteDocNo,
|
|
3040
|
-
"onUpdate:modelValue": a[9] || (a[9] = (
|
|
3082
|
+
"onUpdate:modelValue": a[9] || (a[9] = (d) => e.value.platform.mappings.creditNoteDocNo = d)
|
|
3041
3083
|
}, null, 8, ["modelValue"])
|
|
3042
3084
|
])
|
|
3043
3085
|
])
|
|
3044
3086
|
]),
|
|
3045
|
-
i(
|
|
3087
|
+
i(Ne, {
|
|
3046
3088
|
modelValue: e.value.platform,
|
|
3047
|
-
"onUpdate:modelValue": a[10] || (a[10] = (
|
|
3089
|
+
"onUpdate:modelValue": a[10] || (a[10] = (d) => e.value.platform = d),
|
|
3048
3090
|
label: "upload",
|
|
3049
|
-
"last-upload-date": (
|
|
3091
|
+
"last-upload-date": (ee = e.value.platform) == null ? void 0 : ee.lastUploadDate
|
|
3050
3092
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
3051
|
-
t("div",
|
|
3052
|
-
t("div",
|
|
3053
|
-
i(
|
|
3093
|
+
t("div", gn, [
|
|
3094
|
+
t("div", yn, U(p(o)("report.integration.biztory.items")), 1),
|
|
3095
|
+
i(v, {
|
|
3054
3096
|
variant: "primary",
|
|
3055
3097
|
icon: "add",
|
|
3056
3098
|
onClick: a[11] || (a[11] = () => y("items"))
|
|
3057
3099
|
})
|
|
3058
3100
|
]),
|
|
3059
|
-
t("div",
|
|
3060
|
-
(
|
|
3061
|
-
key: `item-${
|
|
3062
|
-
modelValue: e.value.platform.mappings.items[
|
|
3063
|
-
"onUpdate:modelValue": (
|
|
3101
|
+
t("div", xn, [
|
|
3102
|
+
(m(!0), F(O, null, L((ae = (oe = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (d, k) => (m(), I(R, {
|
|
3103
|
+
key: `item-${k}`,
|
|
3104
|
+
modelValue: e.value.platform.mappings.items[k],
|
|
3105
|
+
"onUpdate:modelValue": (P) => e.value.platform.mappings.items[k] = P,
|
|
3064
3106
|
options: {
|
|
3065
3107
|
key: { placeholder: "Key", editable: !0 },
|
|
3066
3108
|
code: { placeholder: "Account code", editable: !0 }
|
|
3067
3109
|
},
|
|
3068
3110
|
removable: !0,
|
|
3069
|
-
onRemove: () =>
|
|
3111
|
+
onRemove: () => u("items", k)
|
|
3070
3112
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
3071
3113
|
]),
|
|
3072
|
-
t("div",
|
|
3073
|
-
t("div",
|
|
3074
|
-
i(
|
|
3114
|
+
t("div", _n, [
|
|
3115
|
+
t("div", bn, U(p(o)("report.integration.biztory.taxes")), 1),
|
|
3116
|
+
i(v, {
|
|
3075
3117
|
variant: "primary",
|
|
3076
3118
|
icon: "add",
|
|
3077
3119
|
onClick: a[12] || (a[12] = () => y("taxes"))
|
|
3078
3120
|
})
|
|
3079
3121
|
]),
|
|
3080
|
-
t("div",
|
|
3081
|
-
(
|
|
3082
|
-
key: `tax-${
|
|
3083
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
3084
|
-
"onUpdate:modelValue": (
|
|
3122
|
+
t("div", hn, [
|
|
3123
|
+
(m(!0), F(O, null, L((se = (ne = (le = e.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (d, k) => (m(), I(R, {
|
|
3124
|
+
key: `tax-${k}`,
|
|
3125
|
+
modelValue: e.value.platform.mappings.taxes[k],
|
|
3126
|
+
"onUpdate:modelValue": (P) => e.value.platform.mappings.taxes[k] = P,
|
|
3085
3127
|
options: {
|
|
3086
3128
|
key: { placeholder: "Key", editable: !0 },
|
|
3087
3129
|
account: { placeholder: "Account code", editable: !0 }
|
|
3088
3130
|
},
|
|
3089
3131
|
removable: !0,
|
|
3090
|
-
onRemove: () =>
|
|
3132
|
+
onRemove: () => u("taxes", k)
|
|
3133
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128)),
|
|
3134
|
+
(m(!0), F(O, null, L((me = (re = (ie = e.value) == null ? void 0 : ie.platform) == null ? void 0 : re.mappings) == null ? void 0 : me.taxRoundingAdjustments, (d, k) => (m(), I(R, {
|
|
3135
|
+
key: `tax-rounding-adjustment-${k}`,
|
|
3136
|
+
modelValue: e.value.platform.mappings.taxRoundingAdjustments[k],
|
|
3137
|
+
"onUpdate:modelValue": (P) => e.value.platform.mappings.taxRoundingAdjustments[k] = P,
|
|
3138
|
+
options: {
|
|
3139
|
+
key: { placeholder: "Key", editable: !0 },
|
|
3140
|
+
account: { placeholder: "Account code", editable: !0 }
|
|
3141
|
+
},
|
|
3142
|
+
removable: !0,
|
|
3143
|
+
onRemove: () => u("taxRoundingAdjustments", k)
|
|
3091
3144
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
3092
3145
|
]),
|
|
3093
|
-
t("div",
|
|
3094
|
-
t("div",
|
|
3095
|
-
i(
|
|
3146
|
+
t("div", wn, [
|
|
3147
|
+
t("div", Vn, U(p(o)("report.integration.biztory.payments")), 1),
|
|
3148
|
+
i(v, {
|
|
3096
3149
|
variant: "primary",
|
|
3097
3150
|
icon: "add",
|
|
3098
3151
|
onClick: a[13] || (a[13] = () => y("paymentMethods"))
|
|
3099
3152
|
})
|
|
3100
3153
|
]),
|
|
3101
|
-
t("div",
|
|
3154
|
+
t("div", kn, [
|
|
3102
3155
|
a[18] || (a[18] = t("div", { class: "w-[25%]" }, "Payment Term", -1)),
|
|
3103
|
-
t("div",
|
|
3104
|
-
i(
|
|
3156
|
+
t("div", $n, [
|
|
3157
|
+
i(R, {
|
|
3105
3158
|
modelValue: e.value.platform.mappings.paymentTerm,
|
|
3106
|
-
"onUpdate:modelValue": a[14] || (a[14] = (
|
|
3159
|
+
"onUpdate:modelValue": a[14] || (a[14] = (d) => e.value.platform.mappings.paymentTerm = d),
|
|
3107
3160
|
options: {
|
|
3108
3161
|
id: { placeholder: "ID", editable: !0 },
|
|
3109
3162
|
name: { placeholder: "Name", editable: !0 }
|
|
@@ -3112,31 +3165,31 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3112
3165
|
}, null, 8, ["modelValue"])
|
|
3113
3166
|
])
|
|
3114
3167
|
]),
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3168
|
+
f.retrievedMethods.isError ? M("", !0) : (m(), F("div", Sn, U(p(o)("report.integration.biztory.paymentTerm")), 1)),
|
|
3169
|
+
f.retrievedMethods.isLoaded && f.retrievedMethods.data && f.retrievedMethods.data.length == 0 && !f.retrievedMethods.isError ? (m(), F("span", Cn, U(p(o)("report.integration.biztory.noPaymentMethods")), 1)) : M("", !0),
|
|
3170
|
+
f.retrievedMethods.isLoaded ? M("", !0) : (m(), I(G, {
|
|
3118
3171
|
key: 2,
|
|
3119
3172
|
size: "xl"
|
|
3120
3173
|
})),
|
|
3121
|
-
|
|
3122
|
-
(
|
|
3123
|
-
var
|
|
3124
|
-
return
|
|
3125
|
-
key: `payment-${
|
|
3174
|
+
f.retrievedMethods.isError ? (m(), F("span", Fn, U(p(o)("report.integration.biztory.error")), 1)) : M("", !0),
|
|
3175
|
+
(m(!0), F(O, null, L((T = (de = (ce = e.value) == null ? void 0 : ce.platform) == null ? void 0 : de.mappings) == null ? void 0 : T.paymentMethods, (d, k) => {
|
|
3176
|
+
var P;
|
|
3177
|
+
return m(), F("div", {
|
|
3178
|
+
key: `payment-${k}`,
|
|
3126
3179
|
class: "grid-cols-1 grid gap-x-16"
|
|
3127
3180
|
}, [
|
|
3128
|
-
|
|
3129
|
-
i(
|
|
3130
|
-
"model-value": !e.value.platform.mappings.paymentMethods[
|
|
3181
|
+
f.retrievedMethods.isLoaded && f.retrievedMethods.data && ((P = f.retrievedMethods.data) == null ? void 0 : P.length) != 0 ? (m(), F("div", Dn, [
|
|
3182
|
+
i(Y, {
|
|
3183
|
+
"model-value": !e.value.platform.mappings.paymentMethods[k].skip,
|
|
3131
3184
|
value: "",
|
|
3132
|
-
"onUpdate:modelValue": (
|
|
3133
|
-
var
|
|
3134
|
-
(
|
|
3185
|
+
"onUpdate:modelValue": (ue) => {
|
|
3186
|
+
var Ke, Me;
|
|
3187
|
+
(Me = (Ke = e.value.platform) == null ? void 0 : Ke.mappings) != null && Me.paymentMethods[k] && (e.value.platform.mappings.paymentMethods[k].skip = !ue);
|
|
3135
3188
|
}
|
|
3136
3189
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
3137
|
-
i(
|
|
3138
|
-
modelValue: e.value.platform.mappings.paymentMethods[
|
|
3139
|
-
"onUpdate:modelValue": (
|
|
3190
|
+
i(ke, {
|
|
3191
|
+
modelValue: e.value.platform.mappings.paymentMethods[k],
|
|
3192
|
+
"onUpdate:modelValue": (ue) => e.value.platform.mappings.paymentMethods[k] = ue,
|
|
3140
3193
|
options: {
|
|
3141
3194
|
key: {
|
|
3142
3195
|
placeholder: "Enter key",
|
|
@@ -3145,24 +3198,24 @@ const tt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3145
3198
|
id: {
|
|
3146
3199
|
placeholder: "Select mapping",
|
|
3147
3200
|
editable: !0,
|
|
3148
|
-
dropdownOptions:
|
|
3201
|
+
dropdownOptions: f.retrievedMethods.data
|
|
3149
3202
|
}
|
|
3150
3203
|
},
|
|
3151
3204
|
removable: !0,
|
|
3152
|
-
onRemove: () =>
|
|
3205
|
+
onRemove: () => u("paymentMethods", k)
|
|
3153
3206
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"])
|
|
3154
|
-
])) :
|
|
3207
|
+
])) : M("", !0)
|
|
3155
3208
|
]);
|
|
3156
3209
|
}), 128))
|
|
3157
3210
|
])
|
|
3158
3211
|
])
|
|
3159
|
-
])) :
|
|
3212
|
+
])) : M("", !0);
|
|
3160
3213
|
};
|
|
3161
3214
|
}
|
|
3162
3215
|
});
|
|
3163
|
-
function
|
|
3164
|
-
return
|
|
3165
|
-
var w, x,
|
|
3216
|
+
function Tn(f) {
|
|
3217
|
+
return f.reduce((o, e) => {
|
|
3218
|
+
var w, x, D, b, _, c, h, $, u, y, n, g, C, a, l, v, r, K, N, G, Y, Q;
|
|
3166
3219
|
const { invoice: s } = e, V = o.length;
|
|
3167
3220
|
o[V] = {
|
|
3168
3221
|
invoice_date: s.invoice_date,
|
|
@@ -3173,50 +3226,50 @@ function Fn(v) {
|
|
|
3173
3226
|
// service_charge: invoice.service_charge.total,
|
|
3174
3227
|
item_code: (w = s.items[0]) == null ? void 0 : w.code,
|
|
3175
3228
|
item_desc: (x = s.items[0]) == null ? void 0 : x.description,
|
|
3176
|
-
item_price: (
|
|
3229
|
+
item_price: (D = s.items[0]) == null ? void 0 : D.price,
|
|
3177
3230
|
item_tax: (b = s.items[0]) == null ? void 0 : b.total_tax,
|
|
3178
3231
|
item_tax_label: ((_ = s.items[0]) == null ? void 0 : _.tax_label) || "-",
|
|
3179
|
-
payment_amount: ((h = (
|
|
3180
|
-
payment_method: ((
|
|
3232
|
+
payment_amount: ((h = (c = s.transactions) == null ? void 0 : c[0]) == null ? void 0 : h.amount) || void 0,
|
|
3233
|
+
payment_method: ((u = ($ = s.transactions) == null ? void 0 : $[0]) == null ? void 0 : u.payment_method) || "-",
|
|
3181
3234
|
payment_term: ((y = s == null ? void 0 : s.payment_term) == null ? void 0 : y.name) || ""
|
|
3182
3235
|
};
|
|
3183
|
-
for (let
|
|
3184
|
-
const
|
|
3185
|
-
o[
|
|
3186
|
-
const
|
|
3187
|
-
|
|
3188
|
-
...o[
|
|
3189
|
-
item_code:
|
|
3190
|
-
item_desc:
|
|
3191
|
-
item_price:
|
|
3192
|
-
item_tax:
|
|
3193
|
-
item_tax_label:
|
|
3194
|
-
payment_amount: ((a = (
|
|
3195
|
-
payment_method: ((
|
|
3236
|
+
for (let j = 1; j < Math.max(((n = s.items) == null ? void 0 : n.length) || 0, ((g = s.transactions) == null ? void 0 : g.length) || 0); j++) {
|
|
3237
|
+
const E = V + j;
|
|
3238
|
+
o[E] || (o[E] = {});
|
|
3239
|
+
const z = s.items[j];
|
|
3240
|
+
z ? o[E] = {
|
|
3241
|
+
...o[E],
|
|
3242
|
+
item_code: z.code,
|
|
3243
|
+
item_desc: z.description,
|
|
3244
|
+
item_price: z.price,
|
|
3245
|
+
item_tax: z.total_tax,
|
|
3246
|
+
item_tax_label: z.tax_label || "-",
|
|
3247
|
+
payment_amount: ((a = (C = s.transactions) == null ? void 0 : C[j]) == null ? void 0 : a.amount) || void 0,
|
|
3248
|
+
payment_method: ((v = (l = s.transactions) == null ? void 0 : l[j]) == null ? void 0 : v.payment_method) || "-",
|
|
3196
3249
|
payment_term: ((r = s == null ? void 0 : s.payment_term) == null ? void 0 : r.name) || ""
|
|
3197
|
-
} : o[
|
|
3198
|
-
payment_amount: ((
|
|
3199
|
-
payment_method: ((
|
|
3250
|
+
} : o[E] = {
|
|
3251
|
+
payment_amount: ((N = (K = s.transactions) == null ? void 0 : K[j]) == null ? void 0 : N.amount) || void 0,
|
|
3252
|
+
payment_method: ((Y = (G = s.transactions) == null ? void 0 : G[j]) == null ? void 0 : Y.payment_method) || "-",
|
|
3200
3253
|
payment_term: ((Q = s == null ? void 0 : s.payment_term) == null ? void 0 : Q.name) || ""
|
|
3201
3254
|
};
|
|
3202
3255
|
}
|
|
3203
3256
|
return o;
|
|
3204
3257
|
}, []);
|
|
3205
3258
|
}
|
|
3206
|
-
const
|
|
3259
|
+
const An = [
|
|
3207
3260
|
{
|
|
3208
3261
|
accessorKey: "invoice_date",
|
|
3209
|
-
header: () =>
|
|
3262
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
3210
3263
|
enableSorting: !1
|
|
3211
3264
|
},
|
|
3212
3265
|
{
|
|
3213
3266
|
accessorKey: "ref_num",
|
|
3214
|
-
header: () =>
|
|
3267
|
+
header: () => A("p", { class: "min-w-[130px] text-nowrap text-ellipsis" }, "Doc No"),
|
|
3215
3268
|
enableSorting: !1
|
|
3216
3269
|
},
|
|
3217
3270
|
{
|
|
3218
3271
|
accessorKey: "grandTotal",
|
|
3219
|
-
header: () =>
|
|
3272
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Total"),
|
|
3220
3273
|
enableSorting: !1
|
|
3221
3274
|
},
|
|
3222
3275
|
// {
|
|
@@ -3236,62 +3289,62 @@ const Dn = [
|
|
|
3236
3289
|
// },
|
|
3237
3290
|
{
|
|
3238
3291
|
accessorKey: "item_code",
|
|
3239
|
-
header: () =>
|
|
3292
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Code"),
|
|
3240
3293
|
enableSorting: !1
|
|
3241
3294
|
},
|
|
3242
3295
|
{
|
|
3243
3296
|
accessorKey: "item_desc",
|
|
3244
|
-
header: () =>
|
|
3297
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Description"),
|
|
3245
3298
|
enableSorting: !1
|
|
3246
3299
|
},
|
|
3247
3300
|
{
|
|
3248
3301
|
accessorKey: "item_price",
|
|
3249
|
-
header: () =>
|
|
3302
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Price"),
|
|
3250
3303
|
enableSorting: !1
|
|
3251
3304
|
},
|
|
3252
3305
|
{
|
|
3253
3306
|
accessorKey: "item_tax",
|
|
3254
|
-
header: () =>
|
|
3307
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Tax"),
|
|
3255
3308
|
enableSorting: !1
|
|
3256
3309
|
},
|
|
3257
3310
|
{
|
|
3258
3311
|
accessorKey: "item_tax_label",
|
|
3259
|
-
header: () =>
|
|
3312
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Tax Label"),
|
|
3260
3313
|
enableSorting: !1
|
|
3261
3314
|
},
|
|
3262
3315
|
{
|
|
3263
3316
|
accessorKey: "payment_amount",
|
|
3264
|
-
header: () =>
|
|
3317
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Amount"),
|
|
3265
3318
|
enableSorting: !1
|
|
3266
3319
|
},
|
|
3267
3320
|
{
|
|
3268
3321
|
accessorKey: "payment_term",
|
|
3269
|
-
header: () =>
|
|
3322
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Term"),
|
|
3270
3323
|
enableSorting: !1
|
|
3271
3324
|
},
|
|
3272
3325
|
{
|
|
3273
3326
|
accessorKey: "payment_method",
|
|
3274
|
-
header: () =>
|
|
3327
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Method"),
|
|
3275
3328
|
enableSorting: !1
|
|
3276
3329
|
}
|
|
3277
3330
|
];
|
|
3278
|
-
function
|
|
3279
|
-
return
|
|
3280
|
-
var
|
|
3331
|
+
function In(f) {
|
|
3332
|
+
return f.reduce((o, e) => {
|
|
3333
|
+
var D, b, _, c, h, $, u, y, n, g;
|
|
3281
3334
|
const { invoice: s, payments: V } = e, w = o.length;
|
|
3282
3335
|
o[w] = {
|
|
3283
3336
|
invoice_date: s.invoice_date,
|
|
3284
3337
|
ref_num: s.ref_num,
|
|
3285
3338
|
total: s.total,
|
|
3286
|
-
item_code: (
|
|
3339
|
+
item_code: (D = s.items[0]) == null ? void 0 : D.code,
|
|
3287
3340
|
item_description: (b = s.items[0]) == null ? void 0 : b.description,
|
|
3288
3341
|
item_price: (_ = s.items[0]) == null ? void 0 : _.price,
|
|
3289
|
-
item_tax_label: ((
|
|
3342
|
+
item_tax_label: ((c = s.items[0]) == null ? void 0 : c.tax_label) ?? "",
|
|
3290
3343
|
item_tax_amount: ((h = s.items[0]) == null ? void 0 : h.total_tax) ?? "",
|
|
3291
3344
|
service_charge_amount: (($ = s.service_charges[0]) == null ? void 0 : $.total) ?? "",
|
|
3292
3345
|
rounding: s.rounding ?? 0,
|
|
3293
3346
|
payment_term_id: s.payment_term.name ?? "",
|
|
3294
|
-
payment_term_amount: ((
|
|
3347
|
+
payment_term_amount: ((u = s.terms[w]) == null ? void 0 : u.amount) ?? "",
|
|
3295
3348
|
payment_method: ((y = V[0]) == null ? void 0 : y.payment_method_name) || ""
|
|
3296
3349
|
};
|
|
3297
3350
|
const x = Math.max(
|
|
@@ -3299,10 +3352,10 @@ function Un(v) {
|
|
|
3299
3352
|
((g = s.terms) == null ? void 0 : g.length) || 0,
|
|
3300
3353
|
(V == null ? void 0 : V.length) || 0
|
|
3301
3354
|
);
|
|
3302
|
-
for (let
|
|
3303
|
-
const a = w +
|
|
3355
|
+
for (let C = 1; C < x; C++) {
|
|
3356
|
+
const a = w + C;
|
|
3304
3357
|
o[a] || (o[a] = {});
|
|
3305
|
-
const l = s.items[
|
|
3358
|
+
const l = s.items[C], v = s.terms[C], r = V[C];
|
|
3306
3359
|
l ? o[a] = {
|
|
3307
3360
|
...o[a],
|
|
3308
3361
|
item_code: l.code,
|
|
@@ -3311,21 +3364,21 @@ function Un(v) {
|
|
|
3311
3364
|
item_tax_label: l.tax_label == "?" ? "" : l.tax_label ?? "",
|
|
3312
3365
|
item_tax_amount: l.total_tax ?? "",
|
|
3313
3366
|
payment_term_id: s.payment_term.name ?? "",
|
|
3314
|
-
payment_term_amount: (
|
|
3367
|
+
payment_term_amount: (v == null ? void 0 : v.amount) ?? "",
|
|
3315
3368
|
payment_method: (r == null ? void 0 : r.payment_method_name) || ""
|
|
3316
3369
|
} : o[a] = {
|
|
3317
3370
|
payment_term_id: s.payment_term.name ?? "",
|
|
3318
|
-
payment_term_amount: (
|
|
3371
|
+
payment_term_amount: (v == null ? void 0 : v.amount) ?? "",
|
|
3319
3372
|
payment_method: (r == null ? void 0 : r.payment_method_name) || ""
|
|
3320
3373
|
};
|
|
3321
3374
|
}
|
|
3322
3375
|
return o;
|
|
3323
3376
|
}, []);
|
|
3324
3377
|
}
|
|
3325
|
-
const
|
|
3378
|
+
const Rn = [
|
|
3326
3379
|
{
|
|
3327
3380
|
accessorKey: "invoice_date",
|
|
3328
|
-
header: () =>
|
|
3381
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
3329
3382
|
enableSorting: !1
|
|
3330
3383
|
},
|
|
3331
3384
|
// {
|
|
@@ -3335,79 +3388,79 @@ const Tn = [
|
|
|
3335
3388
|
// },
|
|
3336
3389
|
{
|
|
3337
3390
|
accessorKey: "total",
|
|
3338
|
-
header: () =>
|
|
3391
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Total"),
|
|
3339
3392
|
enableSorting: !1
|
|
3340
3393
|
},
|
|
3341
3394
|
{
|
|
3342
3395
|
accessorKey: "item_code",
|
|
3343
|
-
header: () =>
|
|
3396
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Code"),
|
|
3344
3397
|
enableSorting: !1
|
|
3345
3398
|
},
|
|
3346
3399
|
{
|
|
3347
3400
|
accessorKey: "item_description",
|
|
3348
|
-
header: () =>
|
|
3401
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Item Description"),
|
|
3349
3402
|
enableSorting: !1
|
|
3350
3403
|
},
|
|
3351
3404
|
{
|
|
3352
3405
|
accessorKey: "item_price",
|
|
3353
|
-
header: () =>
|
|
3406
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Price"),
|
|
3354
3407
|
enableSorting: !1
|
|
3355
3408
|
},
|
|
3356
3409
|
{
|
|
3357
3410
|
accessorKey: "item_tax_label",
|
|
3358
|
-
header: () =>
|
|
3411
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Tax Label"),
|
|
3359
3412
|
enableSorting: !1
|
|
3360
3413
|
},
|
|
3361
3414
|
{
|
|
3362
3415
|
accessorKey: "item_tax_amount",
|
|
3363
|
-
header: () =>
|
|
3416
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Tax Amount"),
|
|
3364
3417
|
enableSorting: !1
|
|
3365
3418
|
},
|
|
3366
3419
|
{
|
|
3367
3420
|
accessorKey: "service_charge_amount",
|
|
3368
|
-
header: () =>
|
|
3421
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Service Charge Amount"),
|
|
3369
3422
|
enableSorting: !1
|
|
3370
3423
|
},
|
|
3371
3424
|
{
|
|
3372
3425
|
accessorKey: "rounding",
|
|
3373
|
-
header: () =>
|
|
3426
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Rounding"),
|
|
3374
3427
|
enableSorting: !1
|
|
3375
3428
|
},
|
|
3376
3429
|
{
|
|
3377
3430
|
accessorKey: "payment_term_id",
|
|
3378
|
-
header: () =>
|
|
3431
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Term"),
|
|
3379
3432
|
enableSorting: !1
|
|
3380
3433
|
},
|
|
3381
3434
|
{
|
|
3382
3435
|
accessorKey: "payment_term_amount",
|
|
3383
|
-
header: () =>
|
|
3436
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Term Amount"),
|
|
3384
3437
|
enableSorting: !1
|
|
3385
3438
|
},
|
|
3386
3439
|
{
|
|
3387
3440
|
accessorKey: "payment_method",
|
|
3388
|
-
header: () =>
|
|
3441
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Payment Method (ID)"),
|
|
3389
3442
|
enableSorting: !1
|
|
3390
3443
|
}
|
|
3391
|
-
],
|
|
3444
|
+
], Nn = { class: "h-full flex flex-col gap-16" }, Kn = { class: "flex flex-row gap-2 justify-between items-center" }, Mn = {
|
|
3392
3445
|
key: 0,
|
|
3393
3446
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-y-auto"
|
|
3394
|
-
},
|
|
3447
|
+
}, Pn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jn = /* @__PURE__ */ H({
|
|
3395
3448
|
__name: "Preview",
|
|
3396
3449
|
props: {
|
|
3397
3450
|
modelValue: { required: !0 },
|
|
3398
3451
|
modelModifiers: {}
|
|
3399
3452
|
},
|
|
3400
3453
|
emits: ["update:modelValue"],
|
|
3401
|
-
setup(
|
|
3402
|
-
const { t: o } = J(), e = X(
|
|
3403
|
-
|
|
3454
|
+
setup(f) {
|
|
3455
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = B(!1), V = ge(), { dateRange: w } = Ie(ve()), x = B([]);
|
|
3456
|
+
xe(
|
|
3404
3457
|
() => w.value,
|
|
3405
3458
|
async () => {
|
|
3406
3459
|
if (e.value._id)
|
|
3407
3460
|
try {
|
|
3408
|
-
s.value = !0, x.value = await
|
|
3409
|
-
} catch (
|
|
3410
|
-
V.open({ message:
|
|
3461
|
+
s.value = !0, x.value = await Te(e.value._id);
|
|
3462
|
+
} catch (c) {
|
|
3463
|
+
V.open({ message: c.message, type: "error" });
|
|
3411
3464
|
} finally {
|
|
3412
3465
|
s.value = !1;
|
|
3413
3466
|
}
|
|
@@ -3416,39 +3469,39 @@ const Tn = [
|
|
|
3416
3469
|
immediate: !0
|
|
3417
3470
|
}
|
|
3418
3471
|
);
|
|
3419
|
-
const
|
|
3472
|
+
const D = q(() => {
|
|
3420
3473
|
switch (e.value.platform.mappings.version) {
|
|
3421
3474
|
case "v1":
|
|
3422
|
-
return
|
|
3475
|
+
return Tn(x.value);
|
|
3423
3476
|
case "v2":
|
|
3424
|
-
return
|
|
3477
|
+
return In(x.value);
|
|
3425
3478
|
}
|
|
3426
3479
|
return [];
|
|
3427
|
-
}), b =
|
|
3480
|
+
}), b = q(() => {
|
|
3428
3481
|
switch (e.value.platform.mappings.version) {
|
|
3429
3482
|
case "v1":
|
|
3430
|
-
return
|
|
3483
|
+
return An;
|
|
3431
3484
|
case "v2":
|
|
3432
|
-
return
|
|
3485
|
+
return Rn;
|
|
3433
3486
|
}
|
|
3434
3487
|
return [];
|
|
3435
3488
|
});
|
|
3436
3489
|
async function _() {
|
|
3437
3490
|
try {
|
|
3438
|
-
e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (s.value = !0, await
|
|
3439
|
-
} catch (
|
|
3440
|
-
|
|
3491
|
+
e.value._id && e.value.platform.subdomain && e.value.platform.api_key ? (s.value = !0, await Oe(e.value._id), V.open({ message: "Upload successful", type: "success" })) : V.open({ message: "Invalid accounting setting", type: "error" });
|
|
3492
|
+
} catch (c) {
|
|
3493
|
+
c.message && V.open({ message: c.message, type: "error" }), c.errors && c.errors.forEach((h) => V.open({ message: h, type: "error" }));
|
|
3441
3494
|
} finally {
|
|
3442
3495
|
s.value = !1;
|
|
3443
3496
|
}
|
|
3444
3497
|
}
|
|
3445
|
-
return (
|
|
3446
|
-
const $ =
|
|
3447
|
-
return
|
|
3448
|
-
t("div",
|
|
3449
|
-
i(
|
|
3498
|
+
return (c, h) => {
|
|
3499
|
+
const $ = S("FmButton"), u = S("FmCircularProgress"), y = S("FmTable");
|
|
3500
|
+
return m(), F("div", Nn, [
|
|
3501
|
+
t("div", Kn, [
|
|
3502
|
+
i(Re, {
|
|
3450
3503
|
"date-range": p(w),
|
|
3451
|
-
"onUpdate:dateRange": h[0] || (h[0] = (n) =>
|
|
3504
|
+
"onUpdate:dateRange": h[0] || (h[0] = (n) => Se(w) ? w.value = n : null),
|
|
3452
3505
|
compare: !1
|
|
3453
3506
|
}, null, 8, ["date-range"]),
|
|
3454
3507
|
i($, {
|
|
@@ -3458,27 +3511,27 @@ const Tn = [
|
|
|
3458
3511
|
onClick: _
|
|
3459
3512
|
}, null, 8, ["loading"])
|
|
3460
3513
|
]),
|
|
3461
|
-
s.value ? (
|
|
3462
|
-
i(
|
|
3463
|
-
t("span",
|
|
3464
|
-
])) : (
|
|
3514
|
+
s.value ? (m(), F("div", Mn, [
|
|
3515
|
+
i(u, { size: "xl" }),
|
|
3516
|
+
t("span", Pn, U(p(o)("report.common.isLoading")), 1)
|
|
3517
|
+
])) : (m(), I(y, {
|
|
3465
3518
|
key: 1,
|
|
3466
3519
|
class: "flex overflow-y-auto",
|
|
3467
|
-
"row-data":
|
|
3520
|
+
"row-data": D.value,
|
|
3468
3521
|
"column-defs": b.value
|
|
3469
3522
|
}, null, 8, ["row-data", "column-defs"]))
|
|
3470
3523
|
]);
|
|
3471
3524
|
};
|
|
3472
3525
|
}
|
|
3473
|
-
}),
|
|
3526
|
+
}), On = { class: "h-full relative flex flex-col" }, Bn = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Ln = /* @__PURE__ */ H({
|
|
3474
3527
|
__name: "Biztory",
|
|
3475
3528
|
props: {
|
|
3476
3529
|
modelValue: { required: !0 },
|
|
3477
3530
|
modelModifiers: {}
|
|
3478
3531
|
},
|
|
3479
3532
|
emits: ["update:modelValue"],
|
|
3480
|
-
setup(
|
|
3481
|
-
const { t: o } = J(), e = X(
|
|
3533
|
+
setup(f) {
|
|
3534
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = [
|
|
3482
3535
|
{
|
|
3483
3536
|
label: o("report.integration.setting"),
|
|
3484
3537
|
value: "setting",
|
|
@@ -3489,103 +3542,103 @@ const Tn = [
|
|
|
3489
3542
|
value: "preview",
|
|
3490
3543
|
icon: "table"
|
|
3491
3544
|
}
|
|
3492
|
-
], w =
|
|
3545
|
+
], w = fe(), x = q(() => {
|
|
3493
3546
|
switch (s.value) {
|
|
3494
3547
|
case "preview":
|
|
3495
3548
|
return {
|
|
3496
|
-
component:
|
|
3549
|
+
component: jn
|
|
3497
3550
|
};
|
|
3498
3551
|
case "setting":
|
|
3499
3552
|
return {
|
|
3500
|
-
component:
|
|
3553
|
+
component: Un,
|
|
3501
3554
|
props: {
|
|
3502
|
-
retrievedMethods:
|
|
3555
|
+
retrievedMethods: D.value,
|
|
3503
3556
|
retrievedCustomers: b.value
|
|
3504
3557
|
}
|
|
3505
3558
|
};
|
|
3506
3559
|
default:
|
|
3507
3560
|
return null;
|
|
3508
3561
|
}
|
|
3509
|
-
}),
|
|
3562
|
+
}), D = B({}), b = B({}), _ = (y, n) => y.map((g) => ({
|
|
3510
3563
|
label: n.length > 2 ? `ID:${g[n[2]]} [${g[n[0]]}] ${g[n[1]]}` : `[${g[n[0]]}] ${g[n[1]]}`,
|
|
3511
3564
|
value: g.id,
|
|
3512
3565
|
cnId: g.cnId ? g.cnId : null
|
|
3513
|
-
})),
|
|
3566
|
+
})), c = (y) => _(y, ["wallet", "name"]), h = (y) => _(y, ["id", "name"]), $ = async (y, n, g, C) => {
|
|
3514
3567
|
try {
|
|
3515
3568
|
const a = await y(e.value._id);
|
|
3516
3569
|
g.value.data = n(a);
|
|
3517
3570
|
} catch (a) {
|
|
3518
|
-
console.error(
|
|
3571
|
+
console.error(C, a), g.value.isError = !0;
|
|
3519
3572
|
} finally {
|
|
3520
3573
|
g.value.isLoaded = !0;
|
|
3521
3574
|
}
|
|
3522
|
-
},
|
|
3575
|
+
}, u = async () => {
|
|
3523
3576
|
var y, n;
|
|
3524
3577
|
(y = e.value.platform.mappings) != null && y.version && await $(
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3578
|
+
tt,
|
|
3579
|
+
c,
|
|
3580
|
+
D,
|
|
3528
3581
|
"Failed to fetch payment methods:"
|
|
3529
3582
|
), ((n = e.value.platform.mappings) == null ? void 0 : n.version) == "v2" && await $(
|
|
3530
|
-
|
|
3583
|
+
ot,
|
|
3531
3584
|
h,
|
|
3532
3585
|
b,
|
|
3533
3586
|
"Failed to fetch customers:"
|
|
3534
|
-
),
|
|
3587
|
+
), D.value.isLoaded = !0, b.value.isLoaded = !0;
|
|
3535
3588
|
};
|
|
3536
|
-
return
|
|
3589
|
+
return Xe(u), xe(() => {
|
|
3537
3590
|
var y;
|
|
3538
3591
|
return (y = e.value.platform.mappings) == null ? void 0 : y.version;
|
|
3539
|
-
},
|
|
3540
|
-
var a, l,
|
|
3541
|
-
const g =
|
|
3542
|
-
return
|
|
3592
|
+
}, u), (y, n) => {
|
|
3593
|
+
var a, l, v;
|
|
3594
|
+
const g = S("FmPageHead"), C = S("FmTabs");
|
|
3595
|
+
return m(), F("div", On, [
|
|
3543
3596
|
i(g, {
|
|
3544
3597
|
title: ((a = e.value) == null ? void 0 : a.name) || "Biztory",
|
|
3545
3598
|
"back-button": !0,
|
|
3546
3599
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
3547
3600
|
"onClick:back": p(w).back
|
|
3548
3601
|
}, {
|
|
3549
|
-
description:
|
|
3602
|
+
description: _e(() => n[2] || (n[2] = [
|
|
3550
3603
|
t("div", null, null, -1)
|
|
3551
3604
|
])),
|
|
3552
3605
|
_: 1
|
|
3553
3606
|
}, 8, ["title", "onClick:back"]),
|
|
3554
|
-
i(
|
|
3607
|
+
i(C, {
|
|
3555
3608
|
"model-value": s.value,
|
|
3556
3609
|
"onUpdate:modelValue": n[0] || (n[0] = (r) => s.value = r),
|
|
3557
3610
|
items: V
|
|
3558
3611
|
}, null, 8, ["model-value"]),
|
|
3559
|
-
t("div",
|
|
3560
|
-
(
|
|
3612
|
+
t("div", Bn, [
|
|
3613
|
+
(m(), I(we((l = x.value) == null ? void 0 : l.component), He({
|
|
3561
3614
|
modelValue: e.value,
|
|
3562
3615
|
"onUpdate:modelValue": n[1] || (n[1] = (r) => e.value = r)
|
|
3563
|
-
}, (
|
|
3616
|
+
}, (v = x.value) == null ? void 0 : v.props), null, 16, ["modelValue"]))
|
|
3564
3617
|
])
|
|
3565
3618
|
]);
|
|
3566
3619
|
};
|
|
3567
3620
|
}
|
|
3568
|
-
}),
|
|
3621
|
+
}), En = {
|
|
3569
3622
|
key: 0,
|
|
3570
3623
|
class: "flex flex-col h-full"
|
|
3571
|
-
},
|
|
3624
|
+
}, Yn = { class: "flex flex-col gap-16 pb-[24px]" }, zn = { class: "flex flex-row justify-between items-center gap-2" }, qn = { class: "flex flex-row gap-2 items-center" }, Hn = { class: "relative group cursor-pointer" }, Xn = { 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" }, Gn = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Qn = { class: "flex flex-col gap-16" }, Jn = { class: "fm-typo-en-title-sm-800" }, Wn = { class: "flex flex-row items-center max-w-[100%]" }, Zn = { class: "w-[25%]" }, es = { class: "flex-grow" }, ts = { class: "flex flex-row items-center max-w-[100%]" }, os = { class: "w-[25%]" }, as = { class: "flex flex-row items-center gap-x-16" }, ls = { class: "fm-typo-en-title-sm-800" }, ns = { class: "grid-cols-1 grid gap-16" }, ss = /* @__PURE__ */ H({
|
|
3572
3625
|
__name: "Setting",
|
|
3573
3626
|
props: {
|
|
3574
3627
|
modelValue: { required: !0 },
|
|
3575
3628
|
modelModifiers: {}
|
|
3576
3629
|
},
|
|
3577
3630
|
emits: ["update:modelValue"],
|
|
3578
|
-
setup(
|
|
3579
|
-
const { t: o } = J(), e = X(
|
|
3631
|
+
setup(f) {
|
|
3632
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = ge(), V = Ve(), w = fe(), { promptLoader: x } = Ce(), { promptMessage: D } = Ae(), { restaurants: b } = ve(), _ = q(
|
|
3580
3633
|
() => b.map((n) => ({ label: n.name, value: n.id }))
|
|
3581
3634
|
);
|
|
3582
|
-
async function
|
|
3583
|
-
await
|
|
3635
|
+
async function c() {
|
|
3636
|
+
await D({
|
|
3584
3637
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
3585
3638
|
title: o("report.common.delete")
|
|
3586
3639
|
}) && await x(async () => {
|
|
3587
3640
|
try {
|
|
3588
|
-
await
|
|
3641
|
+
await Fe(e.value._id), await V.getSettings(), w.back();
|
|
3589
3642
|
} catch (g) {
|
|
3590
3643
|
s.open({ type: "error", message: g.message });
|
|
3591
3644
|
}
|
|
@@ -3594,21 +3647,21 @@ const Tn = [
|
|
|
3594
3647
|
async function h() {
|
|
3595
3648
|
await x(async () => {
|
|
3596
3649
|
try {
|
|
3597
|
-
await
|
|
3650
|
+
await De(e.value._id, e.value), await V.getSettings();
|
|
3598
3651
|
} catch (n) {
|
|
3599
3652
|
s.open({ type: "error", message: n.message });
|
|
3600
3653
|
}
|
|
3601
3654
|
});
|
|
3602
3655
|
}
|
|
3603
3656
|
function $(n, g) {
|
|
3604
|
-
var
|
|
3605
|
-
(a = (
|
|
3606
|
-
(l,
|
|
3657
|
+
var C, a;
|
|
3658
|
+
(a = (C = e.value.platform) == null ? void 0 : C.mappings) != null && a[n] && (e.value.platform.mappings[n] = e.value.platform.mappings[n].filter(
|
|
3659
|
+
(l, v) => v !== g
|
|
3607
3660
|
));
|
|
3608
3661
|
}
|
|
3609
|
-
function
|
|
3610
|
-
var g,
|
|
3611
|
-
(
|
|
3662
|
+
function u(n) {
|
|
3663
|
+
var g, C;
|
|
3664
|
+
(C = (g = e.value.platform) == null ? void 0 : g.mappings) != null && C[n] && (e.value.platform.mappings[n] = [
|
|
3612
3665
|
...e.value.platform.mappings[n],
|
|
3613
3666
|
{
|
|
3614
3667
|
key: "",
|
|
@@ -3621,34 +3674,34 @@ const Tn = [
|
|
|
3621
3674
|
async function y() {
|
|
3622
3675
|
await x(async () => {
|
|
3623
3676
|
try {
|
|
3624
|
-
await
|
|
3677
|
+
await Ue(e.value._id), await V.getSettings();
|
|
3625
3678
|
} catch (n) {
|
|
3626
3679
|
s.open({ type: "error", message: n.message });
|
|
3627
3680
|
}
|
|
3628
3681
|
});
|
|
3629
3682
|
}
|
|
3630
|
-
return
|
|
3683
|
+
return $e(async () => {
|
|
3631
3684
|
await V.getSettings();
|
|
3632
3685
|
}), (n, g) => {
|
|
3633
|
-
var
|
|
3634
|
-
const
|
|
3635
|
-
return (
|
|
3636
|
-
t("div",
|
|
3637
|
-
t("div",
|
|
3686
|
+
var K, N, G, Y, Q;
|
|
3687
|
+
const C = S("FmIcon"), a = S("FmButton"), l = S("FmMenuDivider"), v = S("FmTextField"), r = S("FmSelect");
|
|
3688
|
+
return (N = (K = e.value) == null ? void 0 : K.platform) != null && N.mappings ? (m(), F("div", En, [
|
|
3689
|
+
t("div", Yn, [
|
|
3690
|
+
t("div", zn, [
|
|
3638
3691
|
g[4] || (g[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
3639
|
-
t("div",
|
|
3640
|
-
t("div",
|
|
3641
|
-
i(
|
|
3692
|
+
t("div", qn, [
|
|
3693
|
+
t("div", Hn, [
|
|
3694
|
+
i(C, {
|
|
3642
3695
|
name: "refresh",
|
|
3643
3696
|
class: "p-2 bg-gray-100 rounded-full",
|
|
3644
3697
|
onClick: y
|
|
3645
3698
|
}),
|
|
3646
|
-
t("span",
|
|
3699
|
+
t("span", Xn, U(p(o)("report.integration.refreshSetting")), 1)
|
|
3647
3700
|
]),
|
|
3648
3701
|
i(a, {
|
|
3649
3702
|
variant: "tertiary",
|
|
3650
3703
|
label: p(o)("report.common.delete"),
|
|
3651
|
-
onClick:
|
|
3704
|
+
onClick: c
|
|
3652
3705
|
}, null, 8, ["label"]),
|
|
3653
3706
|
i(a, {
|
|
3654
3707
|
variant: "primary",
|
|
@@ -3659,105 +3712,105 @@ const Tn = [
|
|
|
3659
3712
|
])
|
|
3660
3713
|
]),
|
|
3661
3714
|
i(l, { style: { margin: 0 } }),
|
|
3662
|
-
t("div",
|
|
3663
|
-
t("div",
|
|
3664
|
-
t("div",
|
|
3665
|
-
t("div",
|
|
3666
|
-
t("div",
|
|
3667
|
-
t("div",
|
|
3668
|
-
i(
|
|
3715
|
+
t("div", Gn, [
|
|
3716
|
+
t("div", Qn, [
|
|
3717
|
+
t("div", Jn, U(p(o)("report.integration.general")), 1),
|
|
3718
|
+
t("div", Wn, [
|
|
3719
|
+
t("div", Zn, U(p(o)("report.common.name")), 1),
|
|
3720
|
+
t("div", es, [
|
|
3721
|
+
i(v, {
|
|
3669
3722
|
modelValue: e.value.name,
|
|
3670
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
3723
|
+
"onUpdate:modelValue": g[0] || (g[0] = (j) => e.value.name = j)
|
|
3671
3724
|
}, null, 8, ["modelValue"])
|
|
3672
3725
|
])
|
|
3673
3726
|
]),
|
|
3674
|
-
t("div",
|
|
3675
|
-
t("div",
|
|
3727
|
+
t("div", ts, [
|
|
3728
|
+
t("div", os, U(p(o)("report.integration.location")), 1),
|
|
3676
3729
|
i(r, {
|
|
3677
3730
|
"model-value": e.value.platform.locationIds[0],
|
|
3678
3731
|
multiselect: !1,
|
|
3679
3732
|
items: _.value,
|
|
3680
3733
|
placeholder: "Select location",
|
|
3681
3734
|
class: "flex-grow",
|
|
3682
|
-
"onUpdate:modelValue": g[1] || (g[1] = (
|
|
3735
|
+
"onUpdate:modelValue": g[1] || (g[1] = (j) => e.value.platform.locationIds[0] = j)
|
|
3683
3736
|
}, null, 8, ["model-value", "items"])
|
|
3684
3737
|
])
|
|
3685
3738
|
]),
|
|
3686
|
-
i(
|
|
3739
|
+
i(Ne, {
|
|
3687
3740
|
modelValue: e.value.platform,
|
|
3688
|
-
"onUpdate:modelValue": g[2] || (g[2] = (
|
|
3741
|
+
"onUpdate:modelValue": g[2] || (g[2] = (j) => e.value.platform = j),
|
|
3689
3742
|
label: p(o)("report.input.email")
|
|
3690
3743
|
}, null, 8, ["modelValue", "label"]),
|
|
3691
|
-
t("div",
|
|
3692
|
-
t("div",
|
|
3744
|
+
t("div", as, [
|
|
3745
|
+
t("div", ls, U(p(o)("report.integration.iflexiHrms.employee")), 1),
|
|
3693
3746
|
i(a, {
|
|
3694
3747
|
variant: "primary",
|
|
3695
3748
|
icon: "add",
|
|
3696
|
-
onClick: g[3] || (g[3] = () =>
|
|
3749
|
+
onClick: g[3] || (g[3] = () => u("employees"))
|
|
3697
3750
|
})
|
|
3698
3751
|
]),
|
|
3699
|
-
t("div",
|
|
3700
|
-
(
|
|
3701
|
-
key: `employee-${
|
|
3702
|
-
modelValue: e.value.platform.mappings.employees[
|
|
3703
|
-
"onUpdate:modelValue": (
|
|
3752
|
+
t("div", ns, [
|
|
3753
|
+
(m(!0), F(O, null, L((Q = (Y = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : Y.mappings) == null ? void 0 : Q.employees, (j, E) => (m(), I(R, {
|
|
3754
|
+
key: `employee-${E}`,
|
|
3755
|
+
modelValue: e.value.platform.mappings.employees[E],
|
|
3756
|
+
"onUpdate:modelValue": (z) => e.value.platform.mappings.employees[E] = z,
|
|
3704
3757
|
options: {
|
|
3705
3758
|
key: { placeholder: "Name", editable: !0 },
|
|
3706
3759
|
badgeNo: { placeholder: "Badge No", editable: !0 },
|
|
3707
3760
|
employeeNo: { placeholder: "Employee No", editable: !0 }
|
|
3708
3761
|
},
|
|
3709
3762
|
removable: !0,
|
|
3710
|
-
onRemove: () => $("employees",
|
|
3763
|
+
onRemove: () => $("employees", E)
|
|
3711
3764
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
3712
3765
|
])
|
|
3713
3766
|
])
|
|
3714
|
-
])) :
|
|
3767
|
+
])) : M("", !0);
|
|
3715
3768
|
};
|
|
3716
3769
|
}
|
|
3717
|
-
}),
|
|
3770
|
+
}), is = { class: "h-full flex flex-col gap-16" }, rs = { class: "flex flex-row gap-2 justify-between items-center" }, ms = {
|
|
3718
3771
|
key: 0,
|
|
3719
3772
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
3720
|
-
},
|
|
3773
|
+
}, cs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ds = /* @__PURE__ */ H({
|
|
3721
3774
|
__name: "Preview",
|
|
3722
3775
|
props: {
|
|
3723
3776
|
modelValue: { required: !0 },
|
|
3724
3777
|
modelModifiers: {}
|
|
3725
3778
|
},
|
|
3726
3779
|
emits: ["update:modelValue"],
|
|
3727
|
-
setup(
|
|
3780
|
+
setup(f) {
|
|
3728
3781
|
const { t: o } = J(), e = B([]), s = [
|
|
3729
3782
|
{
|
|
3730
3783
|
accessorKey: "name",
|
|
3731
|
-
header: () =>
|
|
3784
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Name"),
|
|
3732
3785
|
enableSorting: !1
|
|
3733
3786
|
},
|
|
3734
3787
|
{
|
|
3735
3788
|
accessorKey: "badgeNo",
|
|
3736
|
-
header: () =>
|
|
3789
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Badge No"),
|
|
3737
3790
|
enableSorting: !1
|
|
3738
3791
|
},
|
|
3739
3792
|
{
|
|
3740
3793
|
accessorKey: "employeeNo",
|
|
3741
|
-
header: () =>
|
|
3794
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Employee No"),
|
|
3742
3795
|
enableSorting: !1
|
|
3743
3796
|
},
|
|
3744
3797
|
{
|
|
3745
3798
|
accessorKey: "date",
|
|
3746
|
-
header: () =>
|
|
3799
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
3747
3800
|
enableSorting: !1
|
|
3748
3801
|
},
|
|
3749
3802
|
{
|
|
3750
3803
|
accessorKey: "time",
|
|
3751
|
-
header: () =>
|
|
3804
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
|
|
3752
3805
|
enableSorting: !1
|
|
3753
3806
|
}
|
|
3754
|
-
], V = X(
|
|
3755
|
-
|
|
3756
|
-
() =>
|
|
3807
|
+
], V = X(f, "modelValue"), w = B(!1), x = ge(), { dateRange: D } = Ie(ve());
|
|
3808
|
+
xe(
|
|
3809
|
+
() => D.value,
|
|
3757
3810
|
async () => {
|
|
3758
3811
|
if (V.value._id)
|
|
3759
3812
|
try {
|
|
3760
|
-
w.value = !0, e.value = await
|
|
3813
|
+
w.value = !0, e.value = await Te(V.value._id);
|
|
3761
3814
|
} catch (_) {
|
|
3762
3815
|
x.open({ message: _.message, type: "error" });
|
|
3763
3816
|
} finally {
|
|
@@ -3770,20 +3823,20 @@ const Tn = [
|
|
|
3770
3823
|
);
|
|
3771
3824
|
async function b() {
|
|
3772
3825
|
try {
|
|
3773
|
-
V.value._id ? (w.value = !0, await
|
|
3826
|
+
V.value._id ? (w.value = !0, await Be(V.value._id)) : x.open({ message: "Invalid setting", type: "error" });
|
|
3774
3827
|
} catch (_) {
|
|
3775
3828
|
x.open({ message: _.message, type: "error" });
|
|
3776
3829
|
} finally {
|
|
3777
3830
|
w.value = !1;
|
|
3778
3831
|
}
|
|
3779
3832
|
}
|
|
3780
|
-
return (_,
|
|
3781
|
-
const h =
|
|
3782
|
-
return
|
|
3783
|
-
t("div",
|
|
3784
|
-
i(
|
|
3785
|
-
"date-range": p(
|
|
3786
|
-
"onUpdate:dateRange":
|
|
3833
|
+
return (_, c) => {
|
|
3834
|
+
const h = S("FmButton"), $ = S("FmCircularProgress"), u = S("FmTable");
|
|
3835
|
+
return m(), F("div", is, [
|
|
3836
|
+
t("div", rs, [
|
|
3837
|
+
i(Re, {
|
|
3838
|
+
"date-range": p(D),
|
|
3839
|
+
"onUpdate:dateRange": c[0] || (c[0] = (y) => Se(D) ? D.value = y : null),
|
|
3787
3840
|
compare: !1
|
|
3788
3841
|
}, null, 8, ["date-range"]),
|
|
3789
3842
|
i(h, {
|
|
@@ -3793,27 +3846,27 @@ const Tn = [
|
|
|
3793
3846
|
onClick: b
|
|
3794
3847
|
}, null, 8, ["loading", "label"])
|
|
3795
3848
|
]),
|
|
3796
|
-
w.value ? (
|
|
3849
|
+
w.value ? (m(), F("div", ms, [
|
|
3797
3850
|
i($, { size: "xl" }),
|
|
3798
|
-
t("span",
|
|
3799
|
-
])) : e.value.length > 0 ? (
|
|
3851
|
+
t("span", cs, U(p(o)("report.common.isLoading")), 1)
|
|
3852
|
+
])) : e.value.length > 0 ? (m(), I(u, {
|
|
3800
3853
|
key: 1,
|
|
3801
3854
|
class: "flex overflow-y-auto",
|
|
3802
3855
|
"row-data": e.value,
|
|
3803
3856
|
"column-defs": s
|
|
3804
|
-
}, null, 8, ["row-data"])) :
|
|
3857
|
+
}, null, 8, ["row-data"])) : M("", !0)
|
|
3805
3858
|
]);
|
|
3806
3859
|
};
|
|
3807
3860
|
}
|
|
3808
|
-
}),
|
|
3861
|
+
}), us = { class: "h-full relative flex flex-col" }, ps = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, fs = /* @__PURE__ */ H({
|
|
3809
3862
|
__name: "IFlexiHRMS",
|
|
3810
3863
|
props: {
|
|
3811
3864
|
modelValue: {},
|
|
3812
3865
|
modelModifiers: {}
|
|
3813
3866
|
},
|
|
3814
3867
|
emits: ["update:modelValue"],
|
|
3815
|
-
setup(
|
|
3816
|
-
const { t: o } = J(), e = X(
|
|
3868
|
+
setup(f) {
|
|
3869
|
+
const { t: o } = J(), e = X(f, "modelValue"), s = B("setting"), V = [
|
|
3817
3870
|
{
|
|
3818
3871
|
label: o("report.integration.setting"),
|
|
3819
3872
|
value: "setting",
|
|
@@ -3824,38 +3877,38 @@ const Tn = [
|
|
|
3824
3877
|
value: "preview",
|
|
3825
3878
|
icon: "table"
|
|
3826
3879
|
}
|
|
3827
|
-
], w =
|
|
3880
|
+
], w = fe(), x = q(() => {
|
|
3828
3881
|
switch (s.value) {
|
|
3829
3882
|
case "preview":
|
|
3830
|
-
return
|
|
3883
|
+
return ds;
|
|
3831
3884
|
case "setting":
|
|
3832
|
-
return
|
|
3885
|
+
return ss;
|
|
3833
3886
|
default:
|
|
3834
3887
|
return null;
|
|
3835
3888
|
}
|
|
3836
3889
|
});
|
|
3837
|
-
return (
|
|
3890
|
+
return (D, b) => {
|
|
3838
3891
|
var h;
|
|
3839
|
-
const _ =
|
|
3840
|
-
return
|
|
3892
|
+
const _ = S("FmPageHead"), c = S("FmTabs");
|
|
3893
|
+
return m(), F("div", us, [
|
|
3841
3894
|
i(_, {
|
|
3842
3895
|
title: ((h = e.value) == null ? void 0 : h.name) || "AutoCount",
|
|
3843
3896
|
"back-button": !0,
|
|
3844
3897
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
3845
3898
|
"onClick:back": p(w).back
|
|
3846
3899
|
}, {
|
|
3847
|
-
description:
|
|
3900
|
+
description: _e(() => b[2] || (b[2] = [
|
|
3848
3901
|
t("div", null, null, -1)
|
|
3849
3902
|
])),
|
|
3850
3903
|
_: 1
|
|
3851
3904
|
}, 8, ["title", "onClick:back"]),
|
|
3852
|
-
i(
|
|
3905
|
+
i(c, {
|
|
3853
3906
|
"model-value": s.value,
|
|
3854
3907
|
"onUpdate:modelValue": b[0] || (b[0] = ($) => s.value = $),
|
|
3855
3908
|
items: V
|
|
3856
3909
|
}, null, 8, ["model-value"]),
|
|
3857
|
-
t("div",
|
|
3858
|
-
(
|
|
3910
|
+
t("div", ps, [
|
|
3911
|
+
(m(), I(we(x.value), {
|
|
3859
3912
|
modelValue: e.value,
|
|
3860
3913
|
"onUpdate:modelValue": b[1] || (b[1] = ($) => e.value = $)
|
|
3861
3914
|
}, null, 8, ["modelValue"]))
|
|
@@ -3863,47 +3916,47 @@ const Tn = [
|
|
|
3863
3916
|
]);
|
|
3864
3917
|
};
|
|
3865
3918
|
}
|
|
3866
|
-
}),
|
|
3919
|
+
}), vs = { class: "px-24 h-full relative" }, ks = /* @__PURE__ */ H({
|
|
3867
3920
|
__name: "Integration",
|
|
3868
|
-
setup(
|
|
3869
|
-
const o = B(void 0), { params: e } =
|
|
3870
|
-
|
|
3921
|
+
setup(f) {
|
|
3922
|
+
const o = B(void 0), { params: e } = Ge(), s = Ve(), V = B();
|
|
3923
|
+
Xe(async () => {
|
|
3871
3924
|
s.settings.length === 0 && await s.getSettings();
|
|
3872
|
-
}),
|
|
3925
|
+
}), xe(
|
|
3873
3926
|
() => s.settings,
|
|
3874
3927
|
(x) => {
|
|
3875
3928
|
var b;
|
|
3876
|
-
const
|
|
3877
|
-
|
|
3929
|
+
const D = x.find((_) => _._id === e.id);
|
|
3930
|
+
D && (V.value = D, o.value = (b = V.value.platform) == null ? void 0 : b.name);
|
|
3878
3931
|
},
|
|
3879
3932
|
{ immediate: !0 }
|
|
3880
3933
|
);
|
|
3881
|
-
const w =
|
|
3934
|
+
const w = q(() => {
|
|
3882
3935
|
switch (o.value) {
|
|
3883
|
-
case
|
|
3884
|
-
return
|
|
3885
|
-
case
|
|
3886
|
-
return
|
|
3887
|
-
case
|
|
3888
|
-
return
|
|
3889
|
-
case
|
|
3890
|
-
return
|
|
3891
|
-
case
|
|
3892
|
-
return
|
|
3893
|
-
case
|
|
3894
|
-
return
|
|
3936
|
+
case pe.Xero:
|
|
3937
|
+
return no;
|
|
3938
|
+
case pe.Bukku:
|
|
3939
|
+
return ta;
|
|
3940
|
+
case pe.AutoCount:
|
|
3941
|
+
return Ba;
|
|
3942
|
+
case pe.SQL:
|
|
3943
|
+
return Fl;
|
|
3944
|
+
case pe.iFlexi_HRMS:
|
|
3945
|
+
return fs;
|
|
3946
|
+
case pe.Biztory:
|
|
3947
|
+
return Ln;
|
|
3895
3948
|
default:
|
|
3896
3949
|
return null;
|
|
3897
3950
|
}
|
|
3898
3951
|
});
|
|
3899
|
-
return (x,
|
|
3900
|
-
(
|
|
3952
|
+
return (x, D) => (m(), F("div", vs, [
|
|
3953
|
+
(m(), I(we(w.value), {
|
|
3901
3954
|
modelValue: V.value,
|
|
3902
|
-
"onUpdate:modelValue":
|
|
3955
|
+
"onUpdate:modelValue": D[0] || (D[0] = (b) => V.value = b)
|
|
3903
3956
|
}, null, 8, ["modelValue"]))
|
|
3904
3957
|
]));
|
|
3905
3958
|
}
|
|
3906
3959
|
});
|
|
3907
3960
|
export {
|
|
3908
|
-
|
|
3961
|
+
ks as default
|
|
3909
3962
|
};
|