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