@feedmepos/mf-report 5.4.21-beta.0 → 5.4.22
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-C-jZYb8W.js → App-DNgpJqdO.js} +42 -42
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-BaVjCBz9.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-CIDrrVrf.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DF2k79j3.js → Default.vue_vue_type_script_setup_true_lang-QaO-A2KF.js} +2 -2
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-B9lO4Xn1.js → DynamicWidget.vue_vue_type_script_setup_true_lang-BOZ2aYFX.js} +4 -4
- package/dist/{InsightView-DGe9I2eo.js → InsightView-BDEkCY5x.js} +6 -6
- package/dist/{Integration-Rpft-wWc.js → Integration-CQmN91F8.js} +326 -326
- package/dist/{Integrations-OOJ4jft8.js → Integrations-C0KEvLA9.js} +3 -3
- package/dist/{Layout-DG22wg9C.js → Layout-D_1xOC3n.js} +1 -1
- package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DtCmKms0.js → LocationSelect.vue_vue_type_script_setup_true_lang-CGsQmh3S.js} +2 -2
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CwPa5SJD.js → MenuTab.vue_vue_type_script_setup_true_lang-oIsq1i1c.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-C9O5yO0_.js → NavigationTab.vue_vue_type_script_setup_true_lang-JQ8q5zdC.js} +4 -4
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-8iT-uGdI.js → NoData.vue_vue_type_script_setup_true_lang-O7qHGZkw.js} +1 -1
- package/dist/{OverviewView-DfATrawV.js → OverviewView-CWRciv3c.js} +5 -5
- package/dist/{Report-CKpOrNwx.js → Report-BPF-9gdd.js} +71 -70
- package/dist/{ReportEditor-BcC_gLX7.js → ReportEditor-CzyPup9N.js} +5 -5
- package/dist/{ReportView-CBv6vAEA.js → ReportView-zOENNxNw.js} +7 -7
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-gtUCqf4j.js → SelectComponent.vue_vue_type_script_setup_true_lang-B5OLIl_Y.js} +1 -1
- package/dist/{Setting-DUTaqkHT.js → Setting-BDAU2rhU.js} +4 -4
- package/dist/{TileEditor-BnxzyDyT.js → TileEditor-CWYj_7FE.js} +8 -8
- package/dist/{TransitionFade-ZVhmbHPE.js → TransitionFade-CmvrKBHp.js} +4 -4
- package/dist/app.js +30 -20
- package/dist/{global-loader-BKQvLNRz.js → global-loader-D9UMph7l.js} +308 -308
- package/dist/{index-2OLtpO8C.js → index-CxVnRxOJ.js} +1 -1
- package/dist/{report-schema-D791R8wK.js → report-schema-BEEUlheS.js} +1 -1
- package/dist/{timeFormat-DWBAXBup.js → timeFormat-BRqkZ3bP.js} +1 -1
- package/dist/{v4-6qwV7ITU.js → v4-DnHLPdn4.js} +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as H, mergeModels as _e, useModel as X, computed as E, resolveComponent as
|
|
1
|
+
import { defineComponent as H, mergeModels as _e, useModel as X, computed as E, resolveComponent as V, createElementBlock as D, openBlock as d, createElementVNode as t, createCommentVNode as R, normalizeClass as Ke, Fragment as L, renderList as Q, createBlock as A, createVNode as i, withCtx as xe, toDisplayString as T, unref as f, ref as B, watch as ge, isRef as he, h as I, resolveDynamicComponent as be, mergeProps as Le, onMounted as ze } from "vue";
|
|
2
2
|
import { useRouter as pe, useRoute as Ee } from "vue-router";
|
|
3
|
-
import { u as W, I as de, d as je, e as we, f as ke, b as ue, q as Ye, m as qe, p as Ve, r as $e, s as Se, t as Ce, v as Ae, w as He, x as Qe, y as Xe, A as ve, z as Pe, B as Ge, E as Je } from "./global-loader-
|
|
3
|
+
import { u as W, I as de, d as je, e as we, f as ke, b as ue, q as Ye, m as qe, p as Ve, r as $e, s as Se, t as Ce, v as Ae, w as He, x as Qe, y as Xe, A as ve, z as Pe, B as Ge, E as Je } from "./global-loader-D9UMph7l.js";
|
|
4
4
|
import { u as Fe } from "./message-dialog-UoMWOnil.js";
|
|
5
5
|
import { useSnackbar as fe } from "@feedmepos/ui-library";
|
|
6
|
-
import { s as We } from "./index-
|
|
6
|
+
import { s as We } from "./index-CxVnRxOJ.js";
|
|
7
7
|
import { storeToRefs as De } from "pinia";
|
|
8
|
-
import { _ as Ue } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as Ue } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-CIDrrVrf.js";
|
|
9
9
|
const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, et = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis" }, tt = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "w-[24px] flex items-center"
|
|
12
|
-
},
|
|
12
|
+
}, P = /* @__PURE__ */ H({
|
|
13
13
|
__name: "MappingField",
|
|
14
14
|
props: /* @__PURE__ */ _e({
|
|
15
15
|
removable: {
|
|
@@ -36,16 +36,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
36
36
|
setup(y, { emit: o }) {
|
|
37
37
|
const e = X(y, "modelValue"), n = y, w = E(
|
|
38
38
|
() => Object.keys(n.options).map((_) => {
|
|
39
|
-
const
|
|
39
|
+
const S = n.options[_];
|
|
40
40
|
return {
|
|
41
|
-
placeholder:
|
|
41
|
+
placeholder: S.placeholder,
|
|
42
42
|
key: _,
|
|
43
|
-
editable:
|
|
43
|
+
editable: S.editable
|
|
44
44
|
};
|
|
45
45
|
})
|
|
46
46
|
), x = o;
|
|
47
|
-
return (_,
|
|
48
|
-
const h =
|
|
47
|
+
return (_, S) => {
|
|
48
|
+
const h = V("FmTextField"), r = V("FmTooltip"), p = V("FmIcon");
|
|
49
49
|
return d(), D("div", Ze, [
|
|
50
50
|
t("div", {
|
|
51
51
|
class: Ke(`${y.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
@@ -72,7 +72,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"])
|
|
75
|
-
], 2)) : (d(),
|
|
75
|
+
], 2)) : (d(), A(r, {
|
|
76
76
|
key: 1,
|
|
77
77
|
content: (v = e.value[k.key]) == null ? void 0 : v.toString(),
|
|
78
78
|
class: "w-[50%]"
|
|
@@ -91,7 +91,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
91
91
|
class: "cursor-pointer",
|
|
92
92
|
name: "close",
|
|
93
93
|
size: "md",
|
|
94
|
-
onClick:
|
|
94
|
+
onClick: S[0] || (S[0] = (k) => x("remove"))
|
|
95
95
|
})
|
|
96
96
|
])) : R("", !0)
|
|
97
97
|
]);
|
|
@@ -132,7 +132,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
132
132
|
});
|
|
133
133
|
return (w, x) => {
|
|
134
134
|
var r, p;
|
|
135
|
-
const _ =
|
|
135
|
+
const _ = V("FmSwitch"), S = V("FmTextField"), h = V("FmTimePicker");
|
|
136
136
|
return d(), D(L, null, [
|
|
137
137
|
t("div", ot, [
|
|
138
138
|
t("div", at, T(f(o)("report.integration.auto", { label: y.label })), 1),
|
|
@@ -149,7 +149,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
149
149
|
n.value ? (d(), D("div", it, [
|
|
150
150
|
t("div", rt, T(f(o)("report.common.email")), 1),
|
|
151
151
|
t("div", mt, [
|
|
152
|
-
i(
|
|
152
|
+
i(S, {
|
|
153
153
|
"model-value": (e.value.emails || []).join(","),
|
|
154
154
|
placeholder: "Email",
|
|
155
155
|
"onUpdate:modelValue": x[1] || (x[1] = (k) => {
|
|
@@ -177,7 +177,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
177
177
|
}, null, 8, ["model-value"])
|
|
178
178
|
])
|
|
179
179
|
]),
|
|
180
|
-
i(
|
|
180
|
+
i(P, {
|
|
181
181
|
"model-value": {
|
|
182
182
|
label: f(o)("report.integration.delayDay"),
|
|
183
183
|
delayDay: e.value.delayDay
|
|
@@ -249,9 +249,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
249
249
|
}, _ = (r) => {
|
|
250
250
|
var p;
|
|
251
251
|
return n.singleValueMode ? n.options.key.placeholder : (p = e.value[r.key]) == null ? void 0 : p.toString();
|
|
252
|
-
},
|
|
252
|
+
}, S = (r) => n.singleValueMode ? e.value : e.value[r.key], h = o;
|
|
253
253
|
return (r, p) => {
|
|
254
|
-
const k =
|
|
254
|
+
const k = V("FmSelect"), v = V("FmTextField"), g = V("FmTooltip"), c = V("FmIcon");
|
|
255
255
|
return d(), D("div", ft, [
|
|
256
256
|
t("div", {
|
|
257
257
|
class: Ke(`${y.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-row items-center gap-[4px]`)
|
|
@@ -260,22 +260,22 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
260
260
|
key: m.key
|
|
261
261
|
}, [
|
|
262
262
|
m.editable ? (d(), D("div", vt, [
|
|
263
|
-
m.dropdownOptions ? (d(),
|
|
263
|
+
m.dropdownOptions ? (d(), A(k, {
|
|
264
264
|
key: 0,
|
|
265
|
-
"model-value":
|
|
265
|
+
"model-value": S(m),
|
|
266
266
|
placeholder: m.placeholder,
|
|
267
267
|
items: m.dropdownOptions,
|
|
268
268
|
"shift-menu": !0,
|
|
269
269
|
"onUpdate:modelValue": (b) => x(b, m.key)
|
|
270
|
-
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (d(),
|
|
270
|
+
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (d(), A(v, {
|
|
271
271
|
key: 1,
|
|
272
|
-
"model-value":
|
|
272
|
+
"model-value": S(m),
|
|
273
273
|
placeholder: m.placeholder,
|
|
274
274
|
type: y.type,
|
|
275
275
|
rules: y.rules,
|
|
276
276
|
"onUpdate:modelValue": (b) => x(b, m.key)
|
|
277
277
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
|
|
278
|
-
])) : (d(),
|
|
278
|
+
])) : (d(), A(g, {
|
|
279
279
|
key: 1,
|
|
280
280
|
content: _(m),
|
|
281
281
|
class: "w-[50%]"
|
|
@@ -332,7 +332,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
332
332
|
}),
|
|
333
333
|
emits: ["update:modelValue"],
|
|
334
334
|
setup(y) {
|
|
335
|
-
const { t: o } = W(), e = X(y, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage:
|
|
335
|
+
const { t: o } = W(), e = X(y, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage: S } = Fe(), { restaurants: h } = ue(), r = B(!1), p = E(
|
|
336
336
|
() => h.map((u) => ({ label: u.name, value: u.id }))
|
|
337
337
|
), k = E(() => {
|
|
338
338
|
var u, s;
|
|
@@ -343,7 +343,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
343
343
|
if (r.value)
|
|
344
344
|
n.open({ type: "error", message: "Connecting in progress" });
|
|
345
345
|
else if ((u = e.value.platform) != null && u.accessToken)
|
|
346
|
-
await
|
|
346
|
+
await S({
|
|
347
347
|
message: o("report.integration.xero.confirmDisconnect", { name: e.value.name }),
|
|
348
348
|
title: o("report.integration.xero.disconnectTitle")
|
|
349
349
|
}) && (await Ye(e.value._id), await w.getSettings());
|
|
@@ -351,13 +351,13 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
351
351
|
try {
|
|
352
352
|
const s = await qe(e.value._id);
|
|
353
353
|
r.value = !0;
|
|
354
|
-
const
|
|
354
|
+
const M = setInterval(async () => {
|
|
355
355
|
var N;
|
|
356
356
|
v.value += 1;
|
|
357
357
|
try {
|
|
358
358
|
await w.getSettings();
|
|
359
359
|
} finally {
|
|
360
|
-
(v.value === 12 || (N = e.value.platform) != null && N.accessToken) && (r.value = !1,
|
|
360
|
+
(v.value === 12 || (N = e.value.platform) != null && N.accessToken) && (r.value = !1, M && clearInterval(M), v.value = 0);
|
|
361
361
|
}
|
|
362
362
|
}, 5e3);
|
|
363
363
|
window.open(s.redirect, "_blank");
|
|
@@ -368,7 +368,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
368
368
|
n.open({ type: "error", message: `invalid accounting ${e.value._id}` });
|
|
369
369
|
}
|
|
370
370
|
async function c() {
|
|
371
|
-
await
|
|
371
|
+
await S({
|
|
372
372
|
message: `Confirm delete ${e.value.name}?`,
|
|
373
373
|
title: "Delete"
|
|
374
374
|
}) && await _(async () => {
|
|
@@ -389,21 +389,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
function b(u) {
|
|
392
|
-
const s = y.tenantOptions.data.find((
|
|
392
|
+
const s = y.tenantOptions.data.find((M) => M.value === u);
|
|
393
393
|
s && e.value.platform && (e.value.platform.tenant = {
|
|
394
394
|
id: s.value,
|
|
395
395
|
name: s.label
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
var
|
|
400
|
-
(N = (
|
|
398
|
+
function C(u, s) {
|
|
399
|
+
var M, N;
|
|
400
|
+
(N = (M = e.value.platform) == null ? void 0 : M.mappings) != null && N[u] && (e.value.platform.mappings[u] = e.value.platform.mappings[u].filter(
|
|
401
401
|
(G, Y) => Y !== s
|
|
402
402
|
));
|
|
403
403
|
}
|
|
404
404
|
function l(u) {
|
|
405
|
-
var s,
|
|
406
|
-
(
|
|
405
|
+
var s, M;
|
|
406
|
+
(M = (s = e.value.platform) == null ? void 0 : s.mappings) != null && M[u] && (e.value.platform.mappings[u] = [
|
|
407
407
|
...e.value.platform.mappings[u],
|
|
408
408
|
u === "items" ? {
|
|
409
409
|
feedmeKey: "",
|
|
@@ -428,15 +428,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
430
|
return (u, s) => {
|
|
431
|
-
var z, Z, ee, te, oe, ae, le, ne, se, ie, U,
|
|
432
|
-
const
|
|
431
|
+
var z, Z, ee, te, oe, ae, le, ne, se, ie, U, $, F, K, q, re, ye, Ne, Re, Oe, Be;
|
|
432
|
+
const M = V("FmIcon"), N = V("FmButton"), G = V("FmMenuDivider"), Y = V("FmCircularProgress"), J = V("FmSelect"), O = V("FmTextField"), j = V("FmSwitch");
|
|
433
433
|
return (Z = (z = e.value) == null ? void 0 : z.platform) != null && Z.mappings ? (d(), D("div", xt, [
|
|
434
434
|
t("div", _t, [
|
|
435
435
|
t("div", bt, [
|
|
436
436
|
s[10] || (s[10] = t("div", { class: "fm-typo-en-title-sm-800" }, "Connect", -1)),
|
|
437
437
|
t("div", wt, [
|
|
438
438
|
t("div", ht, [
|
|
439
|
-
i(
|
|
439
|
+
i(M, {
|
|
440
440
|
name: "refresh",
|
|
441
441
|
class: "p-2 bg-gray-100 rounded-full",
|
|
442
442
|
onClick: a
|
|
@@ -468,11 +468,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
468
468
|
onClick: g
|
|
469
469
|
}, null, 8, ["disabled", "label"])
|
|
470
470
|
]),
|
|
471
|
-
!y.tenantOptions.isLoaded && ((ee = e.value.platform) != null && ee.accessToken) ? (d(),
|
|
471
|
+
!y.tenantOptions.isLoaded && ((ee = e.value.platform) != null && ee.accessToken) ? (d(), A(Y, {
|
|
472
472
|
key: 0,
|
|
473
473
|
size: "xl"
|
|
474
474
|
})) : R("", !0),
|
|
475
|
-
((te = y.tenantOptions.data) == null ? void 0 : te.length) > 0 ? (d(),
|
|
475
|
+
((te = y.tenantOptions.data) == null ? void 0 : te.length) > 0 ? (d(), A(J, {
|
|
476
476
|
key: 1,
|
|
477
477
|
class: "flex-grow",
|
|
478
478
|
items: y.tenantOptions.data,
|
|
@@ -554,12 +554,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
554
554
|
onClick: s[6] || (s[6] = () => l("taxes"))
|
|
555
555
|
})
|
|
556
556
|
]),
|
|
557
|
-
!y.taxOptions.isLoaded && ((le = e.value.platform) != null && le.accessToken) ? (d(),
|
|
557
|
+
!y.taxOptions.isLoaded && ((le = e.value.platform) != null && le.accessToken) ? (d(), A(Y, {
|
|
558
558
|
key: 0,
|
|
559
559
|
size: "xl"
|
|
560
560
|
})) : R("", !0),
|
|
561
561
|
((ne = y.taxOptions.data) == null ? void 0 : ne.length) > 0 ? (d(), D("div", Rt, [
|
|
562
|
-
(d(!0), D(L, null, Q((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.taxes, (me, ce) => (d(),
|
|
562
|
+
(d(!0), D(L, null, Q((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.taxes, (me, ce) => (d(), A(Me, {
|
|
563
563
|
key: `tax-${ce}`,
|
|
564
564
|
modelValue: e.value.platform.mappings.taxes[ce],
|
|
565
565
|
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.taxes[ce] = Ie,
|
|
@@ -572,7 +572,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
572
572
|
}
|
|
573
573
|
},
|
|
574
574
|
removable: !0,
|
|
575
|
-
onRemove: () =>
|
|
575
|
+
onRemove: () => C("taxes", ce)
|
|
576
576
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
577
577
|
])) : R("", !0),
|
|
578
578
|
t("div", Ot, [
|
|
@@ -583,12 +583,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
583
583
|
onClick: s[7] || (s[7] = () => l("items"))
|
|
584
584
|
})
|
|
585
585
|
]),
|
|
586
|
-
!y.accountCodeOptions.isLoaded && ((
|
|
586
|
+
!y.accountCodeOptions.isLoaded && (($ = e.value.platform) != null && $.accessToken) ? (d(), A(Y, {
|
|
587
587
|
key: 2,
|
|
588
588
|
size: "xl"
|
|
589
589
|
})) : R("", !0),
|
|
590
590
|
((F = y.accountCodeOptions.data) == null ? void 0 : F.length) > 0 ? (d(), D("div", Bt, [
|
|
591
|
-
(d(!0), D(L, null, Q((re = (q = (
|
|
591
|
+
(d(!0), D(L, null, Q((re = (q = (K = e.value) == null ? void 0 : K.platform) == null ? void 0 : q.mappings) == null ? void 0 : re.items, (me, ce) => (d(), A(Me, {
|
|
592
592
|
key: `item-${ce}`,
|
|
593
593
|
modelValue: e.value.platform.mappings.items[ce],
|
|
594
594
|
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.items[ce] = Ie,
|
|
@@ -601,7 +601,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
601
601
|
}
|
|
602
602
|
},
|
|
603
603
|
removable: !0,
|
|
604
|
-
onRemove: () =>
|
|
604
|
+
onRemove: () => C("items", ce)
|
|
605
605
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
606
606
|
])) : R("", !0),
|
|
607
607
|
t("div", jt, [
|
|
@@ -612,12 +612,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
612
612
|
onClick: s[8] || (s[8] = () => l("payments"))
|
|
613
613
|
})
|
|
614
614
|
]),
|
|
615
|
-
!y.accountCodeOptions.isLoaded && ((ye = e.value.platform) != null && ye.accessToken) ? (d(),
|
|
615
|
+
!y.accountCodeOptions.isLoaded && ((ye = e.value.platform) != null && ye.accessToken) ? (d(), A(Y, {
|
|
616
616
|
key: 4,
|
|
617
617
|
size: "xl"
|
|
618
618
|
})) : R("", !0),
|
|
619
619
|
((Ne = y.accountCodeOptions.data) == null ? void 0 : Ne.length) > 0 ? (d(), D("div", Lt, [
|
|
620
|
-
(d(!0), D(L, null, Q((Be = (Oe = (Re = e.value) == null ? void 0 : Re.platform) == null ? void 0 : Oe.mappings) == null ? void 0 : Be.payments, (me, ce) => (d(),
|
|
620
|
+
(d(!0), D(L, null, Q((Be = (Oe = (Re = e.value) == null ? void 0 : Re.platform) == null ? void 0 : Oe.mappings) == null ? void 0 : Be.payments, (me, ce) => (d(), A(Me, {
|
|
621
621
|
key: `payment-${ce}`,
|
|
622
622
|
modelValue: e.value.platform.mappings.payments[ce],
|
|
623
623
|
"onUpdate:modelValue": (Ie) => e.value.platform.mappings.payments[ce] = Ie,
|
|
@@ -630,7 +630,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
630
630
|
}
|
|
631
631
|
},
|
|
632
632
|
removable: !0,
|
|
633
|
-
onRemove: () =>
|
|
633
|
+
onRemove: () => C("payments", ce)
|
|
634
634
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onRemove"]))), 128))
|
|
635
635
|
])) : R("", !0)
|
|
636
636
|
])
|
|
@@ -756,9 +756,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
756
756
|
header: "Payment Amount",
|
|
757
757
|
enableSorting: !1
|
|
758
758
|
}
|
|
759
|
-
], w = X(y, "modelValue"), x = B(!1), _ = fe(), { dateRange:
|
|
759
|
+
], w = X(y, "modelValue"), x = B(!1), _ = fe(), { dateRange: S } = De(ue());
|
|
760
760
|
ge(
|
|
761
|
-
() =>
|
|
761
|
+
() => S.value,
|
|
762
762
|
async () => {
|
|
763
763
|
if (w.value._id)
|
|
764
764
|
try {
|
|
@@ -783,12 +783,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
785
|
return (r, p) => {
|
|
786
|
-
const k =
|
|
786
|
+
const k = V("FmButton"), v = V("FmCircularProgress"), g = V("FmTable");
|
|
787
787
|
return d(), D("div", Et, [
|
|
788
788
|
t("div", Yt, [
|
|
789
789
|
i(Ue, {
|
|
790
|
-
"date-range": f(
|
|
791
|
-
"onUpdate:dateRange": p[0] || (p[0] = (c) => he(
|
|
790
|
+
"date-range": f(S),
|
|
791
|
+
"onUpdate:dateRange": p[0] || (p[0] = (c) => he(S) ? S.value = c : null),
|
|
792
792
|
compare: !1
|
|
793
793
|
}, null, 8, ["date-range"]),
|
|
794
794
|
i(k, {
|
|
@@ -801,7 +801,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
801
801
|
x.value ? (d(), D("div", qt, [
|
|
802
802
|
i(v, { size: "xl" }),
|
|
803
803
|
p[1] || (p[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
|
|
804
|
-
])) : e.value.length > 0 ? (d(),
|
|
804
|
+
])) : e.value.length > 0 ? (d(), A(g, {
|
|
805
805
|
key: 1,
|
|
806
806
|
class: "flex overflow-scroll",
|
|
807
807
|
"row-data": e.value,
|
|
@@ -818,7 +818,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
818
818
|
},
|
|
819
819
|
emits: ["update:modelValue"],
|
|
820
820
|
setup(y) {
|
|
821
|
-
const { t: o } = W(), e = X(y, "modelValue"), n = B("setting"), w = B({}), x = B({}), _ = B({}),
|
|
821
|
+
const { t: o } = W(), e = X(y, "modelValue"), n = B("setting"), w = B({}), x = B({}), _ = B({}), S = [
|
|
822
822
|
{
|
|
823
823
|
label: o("report.integration.setting"),
|
|
824
824
|
value: "setting",
|
|
@@ -898,11 +898,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
898
898
|
},
|
|
899
899
|
{ immediate: !0 }
|
|
900
900
|
), (g, c) => {
|
|
901
|
-
var
|
|
902
|
-
const m =
|
|
901
|
+
var C, l, a;
|
|
902
|
+
const m = V("FmPageHead"), b = V("FmTabs");
|
|
903
903
|
return d(), D("div", Qt, [
|
|
904
904
|
i(m, {
|
|
905
|
-
title: ((
|
|
905
|
+
title: ((C = e.value) == null ? void 0 : C.name) || "Xero",
|
|
906
906
|
"back-button": !0,
|
|
907
907
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
908
908
|
"onClick:back": f(h).back
|
|
@@ -915,10 +915,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
915
915
|
i(b, {
|
|
916
916
|
"model-value": n.value,
|
|
917
917
|
"onUpdate:modelValue": c[0] || (c[0] = (u) => n.value = u),
|
|
918
|
-
items:
|
|
918
|
+
items: S
|
|
919
919
|
}, null, 8, ["model-value"]),
|
|
920
920
|
t("div", Xt, [
|
|
921
|
-
(d(),
|
|
921
|
+
(d(), A(be((l = r.value) == null ? void 0 : l.component), Le({
|
|
922
922
|
modelValue: e.value,
|
|
923
923
|
"onUpdate:modelValue": c[1] || (c[1] = (u) => e.value = u)
|
|
924
924
|
}, (a = r.value) == null ? void 0 : a.props), null, 16, ["modelValue"]))
|
|
@@ -937,8 +937,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
937
937
|
},
|
|
938
938
|
emits: ["update:modelValue"],
|
|
939
939
|
setup(y) {
|
|
940
|
-
const o = X(y, "modelValue"), e = fe(), n = we(), w = pe(), { promptLoader: x } = ke(), { promptMessage: _ } = Fe(), { restaurants:
|
|
941
|
-
() =>
|
|
940
|
+
const o = X(y, "modelValue"), e = fe(), n = we(), w = pe(), { promptLoader: x } = ke(), { promptMessage: _ } = Fe(), { restaurants: S } = ue(), h = E(
|
|
941
|
+
() => S.map((l) => ({ label: l.name, value: l.id }))
|
|
942
942
|
), { t: r } = W();
|
|
943
943
|
async function p() {
|
|
944
944
|
await _({
|
|
@@ -964,7 +964,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
964
964
|
function v(l, a) {
|
|
965
965
|
var u, s;
|
|
966
966
|
(s = (u = o.value.platform) == null ? void 0 : u.mappings) != null && s[l] && (o.value.platform.mappings[l] = o.value.platform.mappings[l].filter(
|
|
967
|
-
(
|
|
967
|
+
(M, N) => N !== a
|
|
968
968
|
));
|
|
969
969
|
}
|
|
970
970
|
function g(l) {
|
|
@@ -1031,7 +1031,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1031
1031
|
account: { placeholder: l, editable: !0 }
|
|
1032
1032
|
};
|
|
1033
1033
|
}
|
|
1034
|
-
async function
|
|
1034
|
+
async function C() {
|
|
1035
1035
|
await x(async () => {
|
|
1036
1036
|
try {
|
|
1037
1037
|
await Se(o.value._id), await n.getSettings();
|
|
@@ -1041,8 +1041,8 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1041
1041
|
});
|
|
1042
1042
|
}
|
|
1043
1043
|
return (l, a) => {
|
|
1044
|
-
var J, O, j, z, Z, ee, te, oe, ae, le, ne, se, ie, U,
|
|
1045
|
-
const u =
|
|
1044
|
+
var J, O, j, z, Z, ee, te, oe, ae, le, ne, se, ie, U, $;
|
|
1045
|
+
const u = V("FmIcon"), s = V("FmButton"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmSelect"), Y = V("FmCheckbox");
|
|
1046
1046
|
return (O = (J = o.value) == null ? void 0 : J.platform) != null && O.mappings ? (d(), D("div", Jt, [
|
|
1047
1047
|
t("div", Wt, [
|
|
1048
1048
|
t("div", Zt, [
|
|
@@ -1052,7 +1052,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1052
1052
|
i(u, {
|
|
1053
1053
|
name: "refresh",
|
|
1054
1054
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1055
|
-
onClick:
|
|
1055
|
+
onClick: C
|
|
1056
1056
|
}),
|
|
1057
1057
|
t("span", ao, T(f(r)("report.integration.setting.refreshTooltip")), 1)
|
|
1058
1058
|
]),
|
|
@@ -1069,7 +1069,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1069
1069
|
])
|
|
1070
1070
|
])
|
|
1071
1071
|
]),
|
|
1072
|
-
i(
|
|
1072
|
+
i(M, { style: { margin: 0 } }),
|
|
1073
1073
|
t("div", lo, [
|
|
1074
1074
|
t("div", no, T(f(r)("report.integration.bukku.authentication")), 1),
|
|
1075
1075
|
t("div", so, [
|
|
@@ -1128,7 +1128,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1128
1128
|
]),
|
|
1129
1129
|
t("div", ho, [
|
|
1130
1130
|
t("div", ko, [
|
|
1131
|
-
i(
|
|
1131
|
+
i(P, {
|
|
1132
1132
|
"model-value": {
|
|
1133
1133
|
key: "Contact",
|
|
1134
1134
|
account: o.value.platform.mappings.contact.account
|
|
@@ -1144,11 +1144,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1144
1144
|
}
|
|
1145
1145
|
},
|
|
1146
1146
|
"onUpdate:modelValue": a[5] || (a[5] = (F) => {
|
|
1147
|
-
var
|
|
1148
|
-
(re = (q = (
|
|
1147
|
+
var K, q, re;
|
|
1148
|
+
(re = (q = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : q.mappings) != null && re.contact && (o.value.platform.mappings.contact.account = F.account);
|
|
1149
1149
|
})
|
|
1150
1150
|
}, null, 8, ["model-value"]),
|
|
1151
|
-
i(
|
|
1151
|
+
i(P, {
|
|
1152
1152
|
"model-value": {
|
|
1153
1153
|
key: "Invoice no",
|
|
1154
1154
|
account: o.value.platform.mappings.invoiceDocNo
|
|
@@ -1156,7 +1156,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1156
1156
|
options: b("Invoice no"),
|
|
1157
1157
|
"onUpdate:modelValue": a[6] || (a[6] = (F) => m({ key: "invoiceDocNo", value: F.account }))
|
|
1158
1158
|
}, null, 8, ["model-value", "options"]),
|
|
1159
|
-
i(
|
|
1159
|
+
i(P, {
|
|
1160
1160
|
"model-value": {
|
|
1161
1161
|
key: "Credit note no",
|
|
1162
1162
|
account: o.value.platform.mappings.creditNoteDocNo
|
|
@@ -1164,7 +1164,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1164
1164
|
options: b("Credit note no"),
|
|
1165
1165
|
"onUpdate:modelValue": a[7] || (a[7] = (F) => m({ key: "creditNoteDocNo", value: F.account }))
|
|
1166
1166
|
}, null, 8, ["model-value", "options"]),
|
|
1167
|
-
i(
|
|
1167
|
+
i(P, {
|
|
1168
1168
|
"model-value": {
|
|
1169
1169
|
key: "Payment no",
|
|
1170
1170
|
account: o.value.platform.mappings.paymentDocNo
|
|
@@ -1172,7 +1172,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1172
1172
|
options: b("Payment no"),
|
|
1173
1173
|
"onUpdate:modelValue": a[8] || (a[8] = (F) => m({ key: "paymentDocNo", value: F.account }))
|
|
1174
1174
|
}, null, 8, ["model-value", "options"]),
|
|
1175
|
-
i(
|
|
1175
|
+
i(P, {
|
|
1176
1176
|
"model-value": {
|
|
1177
1177
|
key: "Refund no",
|
|
1178
1178
|
account: o.value.platform.mappings.refundDocNo
|
|
@@ -1180,21 +1180,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1180
1180
|
options: b("Refund no"),
|
|
1181
1181
|
"onUpdate:modelValue": a[9] || (a[9] = (F) => m({ key: "refundDocNo", value: F.account }))
|
|
1182
1182
|
}, null, 8, ["model-value", "options"]),
|
|
1183
|
-
i(
|
|
1183
|
+
i(P, {
|
|
1184
1184
|
"model-value": {
|
|
1185
1185
|
key: "Rounding",
|
|
1186
1186
|
account: o.value.platform.mappings.rounding.account
|
|
1187
1187
|
},
|
|
1188
1188
|
options: b("Rounding"),
|
|
1189
1189
|
"onUpdate:modelValue": a[10] || (a[10] = (F) => {
|
|
1190
|
-
var
|
|
1191
|
-
(re = (q = (
|
|
1190
|
+
var K, q, re;
|
|
1191
|
+
(re = (q = (K = o.value) == null ? void 0 : K.platform) == null ? void 0 : q.mappings) != null && re.rounding && (o.value.platform.mappings.rounding.account = F.account);
|
|
1192
1192
|
})
|
|
1193
1193
|
}, null, 8, ["model-value", "options"]),
|
|
1194
|
-
(d(!0), D(L, null, Q((Z = (z = (j = o.value) == null ? void 0 : j.platform) == null ? void 0 : z.mappings) == null ? void 0 : Z.charges, (F,
|
|
1195
|
-
key: `charge-${
|
|
1196
|
-
modelValue: o.value.platform.mappings.charges[
|
|
1197
|
-
"onUpdate:modelValue": (q) => o.value.platform.mappings.charges[
|
|
1194
|
+
(d(!0), D(L, null, Q((Z = (z = (j = o.value) == null ? void 0 : j.platform) == null ? void 0 : z.mappings) == null ? void 0 : Z.charges, (F, K) => (d(), A(P, {
|
|
1195
|
+
key: `charge-${K}`,
|
|
1196
|
+
modelValue: o.value.platform.mappings.charges[K],
|
|
1197
|
+
"onUpdate:modelValue": (q) => o.value.platform.mappings.charges[K] = q,
|
|
1198
1198
|
options: {
|
|
1199
1199
|
key: {
|
|
1200
1200
|
placeholder: f(r)(`report.integration.bukku.mapping.charge.${F.key}`),
|
|
@@ -1223,16 +1223,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1223
1223
|
})
|
|
1224
1224
|
]),
|
|
1225
1225
|
t("div", So, [
|
|
1226
|
-
(d(!0), D(L, null, Q((ae = (oe = (te = o.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (F,
|
|
1227
|
-
key: `item-${
|
|
1228
|
-
modelValue: o.value.platform.mappings.items[
|
|
1229
|
-
"onUpdate:modelValue": (q) => o.value.platform.mappings.items[
|
|
1226
|
+
(d(!0), D(L, null, Q((ae = (oe = (te = o.value) == null ? void 0 : te.platform) == null ? void 0 : oe.mappings) == null ? void 0 : ae.items, (F, K) => (d(), A(P, {
|
|
1227
|
+
key: `item-${K}`,
|
|
1228
|
+
modelValue: o.value.platform.mappings.items[K],
|
|
1229
|
+
"onUpdate:modelValue": (q) => o.value.platform.mappings.items[K] = q,
|
|
1230
1230
|
options: {
|
|
1231
1231
|
key: { placeholder: "Key", editable: !0 },
|
|
1232
1232
|
account: { placeholder: "Account code", editable: !0 }
|
|
1233
1233
|
},
|
|
1234
1234
|
removable: !0,
|
|
1235
|
-
onRemove: () => v("items",
|
|
1235
|
+
onRemove: () => v("items", K)
|
|
1236
1236
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1237
1237
|
]),
|
|
1238
1238
|
t("div", Co, [
|
|
@@ -1244,16 +1244,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1244
1244
|
})
|
|
1245
1245
|
]),
|
|
1246
1246
|
t("div", Do, [
|
|
1247
|
-
(d(!0), D(L, null, Q((se = (ne = (le = o.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (F,
|
|
1248
|
-
key: `tax-${
|
|
1249
|
-
modelValue: o.value.platform.mappings.taxes[
|
|
1250
|
-
"onUpdate:modelValue": (q) => o.value.platform.mappings.taxes[
|
|
1247
|
+
(d(!0), D(L, null, Q((se = (ne = (le = o.value) == null ? void 0 : le.platform) == null ? void 0 : ne.mappings) == null ? void 0 : se.taxes, (F, K) => (d(), A(P, {
|
|
1248
|
+
key: `tax-${K}`,
|
|
1249
|
+
modelValue: o.value.platform.mappings.taxes[K],
|
|
1250
|
+
"onUpdate:modelValue": (q) => o.value.platform.mappings.taxes[K] = q,
|
|
1251
1251
|
options: {
|
|
1252
1252
|
key: { placeholder: "Key", editable: !0 },
|
|
1253
1253
|
account: { placeholder: "Account code", editable: !0 }
|
|
1254
1254
|
},
|
|
1255
1255
|
removable: !0,
|
|
1256
|
-
onRemove: () => v("taxes",
|
|
1256
|
+
onRemove: () => v("taxes", K)
|
|
1257
1257
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1258
1258
|
]),
|
|
1259
1259
|
t("div", Uo, [
|
|
@@ -1264,29 +1264,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1264
1264
|
onClick: a[14] || (a[14] = () => g("payments"))
|
|
1265
1265
|
})
|
|
1266
1266
|
]),
|
|
1267
|
-
(d(!0), D(L, null, Q((
|
|
1268
|
-
key: `payment-${
|
|
1267
|
+
(d(!0), D(L, null, Q(($ = (U = (ie = o.value) == null ? void 0 : ie.platform) == null ? void 0 : U.mappings) == null ? void 0 : $.payments, (F, K) => (d(), D("div", {
|
|
1268
|
+
key: `payment-${K}`,
|
|
1269
1269
|
class: "grid-cols-1 grid gap-x-16"
|
|
1270
1270
|
}, [
|
|
1271
1271
|
t("div", Io, [
|
|
1272
1272
|
i(Y, {
|
|
1273
|
-
"model-value": !o.value.platform.mappings.payments[
|
|
1273
|
+
"model-value": !o.value.platform.mappings.payments[K].skip,
|
|
1274
1274
|
value: "",
|
|
1275
1275
|
"onUpdate:modelValue": (q) => {
|
|
1276
1276
|
var re, ye;
|
|
1277
|
-
(ye = (re = o.value.platform) == null ? void 0 : re.mappings) != null && ye.payments[
|
|
1277
|
+
(ye = (re = o.value.platform) == null ? void 0 : re.mappings) != null && ye.payments[K] && (o.value.platform.mappings.payments[K].skip = !q);
|
|
1278
1278
|
}
|
|
1279
1279
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1280
|
-
i(
|
|
1281
|
-
modelValue: o.value.platform.mappings.payments[
|
|
1282
|
-
"onUpdate:modelValue": (q) => o.value.platform.mappings.payments[
|
|
1280
|
+
i(P, {
|
|
1281
|
+
modelValue: o.value.platform.mappings.payments[K],
|
|
1282
|
+
"onUpdate:modelValue": (q) => o.value.platform.mappings.payments[K] = q,
|
|
1283
1283
|
options: {
|
|
1284
1284
|
key: { placeholder: "Key", editable: !0 },
|
|
1285
1285
|
method: { placeholder: "Method", editable: !0 },
|
|
1286
1286
|
account: { placeholder: "Account code", editable: !0 }
|
|
1287
1287
|
},
|
|
1288
1288
|
removable: !0,
|
|
1289
|
-
onRemove: () => v("payments",
|
|
1289
|
+
onRemove: () => v("payments", K)
|
|
1290
1290
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"])
|
|
1291
1291
|
])
|
|
1292
1292
|
]))), 128))
|
|
@@ -1318,15 +1318,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1318
1318
|
for (let m = 0; m < Math.max(g.form_items.length, c.length); m++) {
|
|
1319
1319
|
const b = v + m;
|
|
1320
1320
|
p[b] || (p[b] = {});
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1321
|
+
const C = g.form_items[m];
|
|
1322
|
+
C && (p[b] = {
|
|
1323
1323
|
...p[b],
|
|
1324
|
-
itemDescription:
|
|
1325
|
-
itemQuantity:
|
|
1326
|
-
itemUnitPrice:
|
|
1327
|
-
itemAccount:
|
|
1328
|
-
itemTaxCode:
|
|
1329
|
-
itemDiscount:
|
|
1324
|
+
itemDescription: C.description,
|
|
1325
|
+
itemQuantity: C.quantity,
|
|
1326
|
+
itemUnitPrice: C.unit_price,
|
|
1327
|
+
itemAccount: C._account_name,
|
|
1328
|
+
itemTaxCode: C._tax_code_name,
|
|
1329
|
+
itemDiscount: C.discount
|
|
1330
1330
|
});
|
|
1331
1331
|
const l = c[m];
|
|
1332
1332
|
l && (p[b] = {
|
|
@@ -1435,7 +1435,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1435
1435
|
header: "Skip",
|
|
1436
1436
|
enableSorting: !1
|
|
1437
1437
|
}
|
|
1438
|
-
], x = X(y, "modelValue"), _ = B(!1),
|
|
1438
|
+
], x = X(y, "modelValue"), _ = B(!1), S = fe(), { dateRange: h } = De(ue());
|
|
1439
1439
|
ge(
|
|
1440
1440
|
() => h.value,
|
|
1441
1441
|
async () => {
|
|
@@ -1443,7 +1443,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1443
1443
|
try {
|
|
1444
1444
|
_.value = !0, o.value = await Ce(x.value._id);
|
|
1445
1445
|
} catch (p) {
|
|
1446
|
-
|
|
1446
|
+
S.open({ message: p.message, type: "error" });
|
|
1447
1447
|
} finally {
|
|
1448
1448
|
_.value = !1;
|
|
1449
1449
|
}
|
|
@@ -1454,15 +1454,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1454
1454
|
);
|
|
1455
1455
|
async function r() {
|
|
1456
1456
|
try {
|
|
1457
|
-
x.value._id ? (_.value = !0, await Ae(x.value._id),
|
|
1457
|
+
x.value._id ? (_.value = !0, await Ae(x.value._id), S.open({ message: n("report.integration.preview.uploadSuccess"), type: "success" })) : S.open({ message: n("report.integration.error.invalid"), type: "error" });
|
|
1458
1458
|
} catch (p) {
|
|
1459
|
-
|
|
1459
|
+
S.open({ message: p.message, type: "error" });
|
|
1460
1460
|
} finally {
|
|
1461
1461
|
_.value = !1;
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
1464
|
return (p, k) => {
|
|
1465
|
-
const v =
|
|
1465
|
+
const v = V("FmButton"), g = V("FmCircularProgress"), c = V("FmTable");
|
|
1466
1466
|
return d(), D("div", Ko, [
|
|
1467
1467
|
t("div", Ao, [
|
|
1468
1468
|
i(Ue, {
|
|
@@ -1480,7 +1480,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1480
1480
|
_.value ? (d(), D("div", Po, [
|
|
1481
1481
|
i(g, { size: "xl" }),
|
|
1482
1482
|
t("span", No, T(f(n)("report.integration.preview.loading")), 1)
|
|
1483
|
-
])) : e.value.length > 0 ? (d(),
|
|
1483
|
+
])) : e.value.length > 0 ? (d(), A(c, {
|
|
1484
1484
|
key: 1,
|
|
1485
1485
|
class: "flex overflow-scroll",
|
|
1486
1486
|
"row-data": e.value,
|
|
@@ -1518,9 +1518,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1518
1518
|
return null;
|
|
1519
1519
|
}
|
|
1520
1520
|
});
|
|
1521
|
-
return (
|
|
1521
|
+
return (S, h) => {
|
|
1522
1522
|
var k;
|
|
1523
|
-
const r =
|
|
1523
|
+
const r = V("FmPageHead"), p = V("FmTabs");
|
|
1524
1524
|
return d(), D("div", Oo, [
|
|
1525
1525
|
i(r, {
|
|
1526
1526
|
title: ((k = e.value) == null ? void 0 : k.name) || "Bukku",
|
|
@@ -1539,7 +1539,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1539
1539
|
items: w
|
|
1540
1540
|
}, null, 8, ["model-value"]),
|
|
1541
1541
|
t("div", Bo, [
|
|
1542
|
-
(d(),
|
|
1542
|
+
(d(), A(be(_.value), {
|
|
1543
1543
|
modelValue: e.value,
|
|
1544
1544
|
"onUpdate:modelValue": h[1] || (h[1] = (v) => e.value = v)
|
|
1545
1545
|
}, null, 8, ["modelValue"]))
|
|
@@ -1558,11 +1558,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1558
1558
|
},
|
|
1559
1559
|
emits: ["update:modelValue"],
|
|
1560
1560
|
setup(y) {
|
|
1561
|
-
const { t: o } = W(), e = X(y, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage:
|
|
1561
|
+
const { t: o } = W(), e = X(y, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage: S } = Fe(), { restaurants: h } = ue(), r = E(
|
|
1562
1562
|
() => h.map((l) => ({ label: l.name, value: l.id }))
|
|
1563
1563
|
);
|
|
1564
1564
|
async function p() {
|
|
1565
|
-
await
|
|
1565
|
+
await S({
|
|
1566
1566
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
1567
1567
|
title: o("report.common.delete")
|
|
1568
1568
|
}) && await _(async () => {
|
|
@@ -1585,7 +1585,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1585
1585
|
function v(l, a) {
|
|
1586
1586
|
var u, s;
|
|
1587
1587
|
(s = (u = e.value.platform) == null ? void 0 : u.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
|
|
1588
|
-
(
|
|
1588
|
+
(M, N) => N !== a
|
|
1589
1589
|
));
|
|
1590
1590
|
}
|
|
1591
1591
|
function g(l) {
|
|
@@ -1629,7 +1629,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1629
1629
|
account: { placeholder: l, editable: !0 }
|
|
1630
1630
|
};
|
|
1631
1631
|
}
|
|
1632
|
-
async function
|
|
1632
|
+
async function C() {
|
|
1633
1633
|
await _(async () => {
|
|
1634
1634
|
try {
|
|
1635
1635
|
await Se(e.value._id), await w.getSettings();
|
|
@@ -1640,7 +1640,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1640
1640
|
}
|
|
1641
1641
|
return (l, a) => {
|
|
1642
1642
|
var Y, J, O, j, z, Z, ee, te, oe, ae, le, ne, se, ie;
|
|
1643
|
-
const u =
|
|
1643
|
+
const u = V("FmIcon"), s = V("FmButton"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmSelect");
|
|
1644
1644
|
return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (d(), D("div", Lo, [
|
|
1645
1645
|
t("div", zo, [
|
|
1646
1646
|
t("div", Eo, [
|
|
@@ -1650,7 +1650,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1650
1650
|
i(u, {
|
|
1651
1651
|
name: "refresh",
|
|
1652
1652
|
class: "p-2 bg-gray-100 rounded-full",
|
|
1653
|
-
onClick:
|
|
1653
|
+
onClick: C
|
|
1654
1654
|
}),
|
|
1655
1655
|
t("span", Ho, T(f(o)("report.integration.autoCount.repopulate")), 1)
|
|
1656
1656
|
]),
|
|
@@ -1667,7 +1667,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1667
1667
|
])
|
|
1668
1668
|
])
|
|
1669
1669
|
]),
|
|
1670
|
-
i(
|
|
1670
|
+
i(M, { style: { margin: 0 } }),
|
|
1671
1671
|
t("div", Qo, [
|
|
1672
1672
|
t("div", Xo, [
|
|
1673
1673
|
t("div", Go, T(f(o)("report.integration.autocount.general")), 1),
|
|
@@ -1706,17 +1706,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1706
1706
|
]),
|
|
1707
1707
|
t("div", la, [
|
|
1708
1708
|
t("div", na, [
|
|
1709
|
-
i(
|
|
1709
|
+
i(P, {
|
|
1710
1710
|
"model-value": { key: "Project", account: e.value.platform.mappings.project },
|
|
1711
1711
|
options: b("Project"),
|
|
1712
1712
|
"onUpdate:modelValue": a[3] || (a[3] = (U) => m({ key: "project", value: U.account }))
|
|
1713
1713
|
}, null, 8, ["model-value", "options"]),
|
|
1714
|
-
i(
|
|
1714
|
+
i(P, {
|
|
1715
1715
|
"model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
|
|
1716
1716
|
options: b("Debtor"),
|
|
1717
1717
|
"onUpdate:modelValue": a[4] || (a[4] = (U) => m({ key: "debtor", value: U.account }))
|
|
1718
1718
|
}, null, 8, ["model-value", "options"]),
|
|
1719
|
-
i(
|
|
1719
|
+
i(P, {
|
|
1720
1720
|
"model-value": {
|
|
1721
1721
|
key: "Invoice no",
|
|
1722
1722
|
account: e.value.platform.mappings.invoiceDocNo
|
|
@@ -1724,7 +1724,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1724
1724
|
options: b("Invoice no"),
|
|
1725
1725
|
"onUpdate:modelValue": a[5] || (a[5] = (U) => m({ key: "invoiceDocNo", value: U.account }))
|
|
1726
1726
|
}, null, 8, ["model-value", "options"]),
|
|
1727
|
-
i(
|
|
1727
|
+
i(P, {
|
|
1728
1728
|
"model-value": {
|
|
1729
1729
|
key: "Credit note no",
|
|
1730
1730
|
account: e.value.platform.mappings.creditNoteDocNo
|
|
@@ -1732,7 +1732,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1732
1732
|
options: b("Credit note no"),
|
|
1733
1733
|
"onUpdate:modelValue": a[6] || (a[6] = (U) => m({ key: "creditNoteDocNo", value: U.account }))
|
|
1734
1734
|
}, null, 8, ["model-value", "options"]),
|
|
1735
|
-
i(
|
|
1735
|
+
i(P, {
|
|
1736
1736
|
"model-value": {
|
|
1737
1737
|
key: "Payment no",
|
|
1738
1738
|
account: e.value.platform.mappings.paymentDocNo
|
|
@@ -1740,7 +1740,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1740
1740
|
options: b("Payment no"),
|
|
1741
1741
|
"onUpdate:modelValue": a[7] || (a[7] = (U) => m({ key: "paymentDocNo", value: U.account }))
|
|
1742
1742
|
}, null, 8, ["model-value", "options"]),
|
|
1743
|
-
i(
|
|
1743
|
+
i(P, {
|
|
1744
1744
|
"model-value": {
|
|
1745
1745
|
key: "Refund no",
|
|
1746
1746
|
account: e.value.platform.mappings.refundDocNo
|
|
@@ -1748,21 +1748,21 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1748
1748
|
options: b("Refund no"),
|
|
1749
1749
|
"onUpdate:modelValue": a[8] || (a[8] = (U) => m({ key: "refundDocNo", value: U.account }))
|
|
1750
1750
|
}, null, 8, ["model-value", "options"]),
|
|
1751
|
-
i(
|
|
1751
|
+
i(P, {
|
|
1752
1752
|
"model-value": {
|
|
1753
1753
|
key: "Rounding",
|
|
1754
1754
|
account: e.value.platform.mappings.rounding.account
|
|
1755
1755
|
},
|
|
1756
1756
|
options: b("Rounding"),
|
|
1757
1757
|
"onUpdate:modelValue": a[9] || (a[9] = (U) => {
|
|
1758
|
-
var
|
|
1759
|
-
(
|
|
1758
|
+
var $, F, K;
|
|
1759
|
+
(K = (F = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : F.mappings) != null && K.rounding && (e.value.platform.mappings.rounding.account = U.account);
|
|
1760
1760
|
})
|
|
1761
1761
|
}, null, 8, ["model-value", "options"]),
|
|
1762
|
-
(d(!0), D(L, null, Q((z = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : z.charges, (U,
|
|
1763
|
-
key: `charge-${
|
|
1764
|
-
modelValue: e.value.platform.mappings.charges[
|
|
1765
|
-
"onUpdate:modelValue": (F) => e.value.platform.mappings.charges[
|
|
1762
|
+
(d(!0), D(L, null, Q((z = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : z.charges, (U, $) => (d(), A(P, {
|
|
1763
|
+
key: `charge-${$}`,
|
|
1764
|
+
modelValue: e.value.platform.mappings.charges[$],
|
|
1765
|
+
"onUpdate:modelValue": (F) => e.value.platform.mappings.charges[$] = F,
|
|
1766
1766
|
options: {
|
|
1767
1767
|
key: { placeholder: "Key", editable: !1 },
|
|
1768
1768
|
account: { placeholder: "Account code", editable: !0 }
|
|
@@ -1784,16 +1784,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1784
1784
|
})
|
|
1785
1785
|
]),
|
|
1786
1786
|
t("div", ra, [
|
|
1787
|
-
(d(!0), D(L, null, Q((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U,
|
|
1788
|
-
key: `item-${
|
|
1789
|
-
modelValue: e.value.platform.mappings.items[
|
|
1790
|
-
"onUpdate:modelValue": (F) => e.value.platform.mappings.items[
|
|
1787
|
+
(d(!0), D(L, null, Q((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U, $) => (d(), A(P, {
|
|
1788
|
+
key: `item-${$}`,
|
|
1789
|
+
modelValue: e.value.platform.mappings.items[$],
|
|
1790
|
+
"onUpdate:modelValue": (F) => e.value.platform.mappings.items[$] = F,
|
|
1791
1791
|
options: {
|
|
1792
1792
|
key: { placeholder: "Key", editable: !0 },
|
|
1793
1793
|
account: { placeholder: "Account code", editable: !0 }
|
|
1794
1794
|
},
|
|
1795
1795
|
removable: !0,
|
|
1796
|
-
onRemove: () => v("items",
|
|
1796
|
+
onRemove: () => v("items", $)
|
|
1797
1797
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1798
1798
|
]),
|
|
1799
1799
|
t("div", ma, [
|
|
@@ -1805,16 +1805,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1805
1805
|
})
|
|
1806
1806
|
]),
|
|
1807
1807
|
t("div", da, [
|
|
1808
|
-
(d(!0), D(L, null, Q((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U,
|
|
1809
|
-
key: `tax-${
|
|
1810
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
1811
|
-
"onUpdate:modelValue": (F) => e.value.platform.mappings.taxes[
|
|
1808
|
+
(d(!0), D(L, null, Q((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U, $) => (d(), A(P, {
|
|
1809
|
+
key: `tax-${$}`,
|
|
1810
|
+
modelValue: e.value.platform.mappings.taxes[$],
|
|
1811
|
+
"onUpdate:modelValue": (F) => e.value.platform.mappings.taxes[$] = F,
|
|
1812
1812
|
options: {
|
|
1813
1813
|
key: { placeholder: "Key", editable: !0 },
|
|
1814
1814
|
account: { placeholder: "Account code", editable: !0 }
|
|
1815
1815
|
},
|
|
1816
1816
|
removable: !0,
|
|
1817
|
-
onRemove: () => v("taxes",
|
|
1817
|
+
onRemove: () => v("taxes", $)
|
|
1818
1818
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1819
1819
|
]),
|
|
1820
1820
|
t("div", pa, [
|
|
@@ -1826,16 +1826,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1826
1826
|
})
|
|
1827
1827
|
]),
|
|
1828
1828
|
t("div", fa, [
|
|
1829
|
-
(d(!0), D(L, null, Q((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U,
|
|
1830
|
-
key: `payment-${
|
|
1831
|
-
modelValue: e.value.platform.mappings.payments[
|
|
1832
|
-
"onUpdate:modelValue": (F) => e.value.platform.mappings.payments[
|
|
1829
|
+
(d(!0), D(L, null, Q((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U, $) => (d(), A(P, {
|
|
1830
|
+
key: `payment-${$}`,
|
|
1831
|
+
modelValue: e.value.platform.mappings.payments[$],
|
|
1832
|
+
"onUpdate:modelValue": (F) => e.value.platform.mappings.payments[$] = F,
|
|
1833
1833
|
options: {
|
|
1834
1834
|
key: { placeholder: "Key", editable: !0 },
|
|
1835
1835
|
account: { placeholder: "Payment name", editable: !0 }
|
|
1836
1836
|
},
|
|
1837
1837
|
removable: !0,
|
|
1838
|
-
onRemove: () => v("payments",
|
|
1838
|
+
onRemove: () => v("payments", $)
|
|
1839
1839
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
1840
1840
|
])
|
|
1841
1841
|
])
|
|
@@ -1953,9 +1953,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1953
1953
|
header: "Payment Amount",
|
|
1954
1954
|
enableSorting: !1
|
|
1955
1955
|
}
|
|
1956
|
-
], w = X(y, "modelValue"), x = B(!1), _ = fe(), { dateRange:
|
|
1956
|
+
], w = X(y, "modelValue"), x = B(!1), _ = fe(), { dateRange: S } = De(ue());
|
|
1957
1957
|
ge(
|
|
1958
|
-
() =>
|
|
1958
|
+
() => S.value,
|
|
1959
1959
|
async () => {
|
|
1960
1960
|
if (w.value._id)
|
|
1961
1961
|
try {
|
|
@@ -1980,12 +1980,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1980
1980
|
}
|
|
1981
1981
|
}
|
|
1982
1982
|
return (r, p) => {
|
|
1983
|
-
const k =
|
|
1983
|
+
const k = V("FmButton"), v = V("FmCircularProgress"), g = V("FmTable");
|
|
1984
1984
|
return d(), D("div", ga, [
|
|
1985
1985
|
t("div", ya, [
|
|
1986
1986
|
i(Ue, {
|
|
1987
|
-
"date-range": f(
|
|
1988
|
-
"onUpdate:dateRange": p[0] || (p[0] = (c) => he(
|
|
1987
|
+
"date-range": f(S),
|
|
1988
|
+
"onUpdate:dateRange": p[0] || (p[0] = (c) => he(S) ? S.value = c : null),
|
|
1989
1989
|
compare: !1
|
|
1990
1990
|
}, null, 8, ["date-range"]),
|
|
1991
1991
|
i(k, {
|
|
@@ -1998,7 +1998,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1998
1998
|
x.value ? (d(), D("div", xa, [
|
|
1999
1999
|
i(v, { size: "xl" }),
|
|
2000
2000
|
t("span", _a, T(r.t("report.common.loading")), 1)
|
|
2001
|
-
])) : e.value.length > 0 ? (d(),
|
|
2001
|
+
])) : e.value.length > 0 ? (d(), A(g, {
|
|
2002
2002
|
key: 1,
|
|
2003
2003
|
class: "flex overflow-scroll",
|
|
2004
2004
|
"row-data": e.value,
|
|
@@ -2036,9 +2036,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2036
2036
|
return null;
|
|
2037
2037
|
}
|
|
2038
2038
|
});
|
|
2039
|
-
return (
|
|
2039
|
+
return (S, h) => {
|
|
2040
2040
|
var k;
|
|
2041
|
-
const r =
|
|
2041
|
+
const r = V("FmPageHead"), p = V("FmTabs");
|
|
2042
2042
|
return d(), D("div", wa, [
|
|
2043
2043
|
i(r, {
|
|
2044
2044
|
title: ((k = e.value) == null ? void 0 : k.name) || "AutoCount",
|
|
@@ -2057,7 +2057,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2057
2057
|
items: w
|
|
2058
2058
|
}, null, 8, ["model-value"]),
|
|
2059
2059
|
t("div", ha, [
|
|
2060
|
-
(d(),
|
|
2060
|
+
(d(), A(be(_.value), {
|
|
2061
2061
|
modelValue: e.value,
|
|
2062
2062
|
"onUpdate:modelValue": h[1] || (h[1] = (v) => e.value = v)
|
|
2063
2063
|
}, null, 8, ["modelValue"]))
|
|
@@ -2076,11 +2076,11 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2076
2076
|
},
|
|
2077
2077
|
emits: ["update:modelValue"],
|
|
2078
2078
|
setup(y) {
|
|
2079
|
-
const { t: o } = W(), e = X(y, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage:
|
|
2079
|
+
const { t: o } = W(), e = X(y, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage: S } = Fe(), { restaurants: h } = ue(), r = E(
|
|
2080
2080
|
() => h.map((l) => ({ label: l.name, value: l.id }))
|
|
2081
2081
|
);
|
|
2082
2082
|
async function p() {
|
|
2083
|
-
await
|
|
2083
|
+
await S({
|
|
2084
2084
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
2085
2085
|
title: o("report.common.delete")
|
|
2086
2086
|
}) && await _(async () => {
|
|
@@ -2103,7 +2103,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2103
2103
|
function v(l, a) {
|
|
2104
2104
|
var u, s;
|
|
2105
2105
|
(s = (u = e.value.platform) == null ? void 0 : u.mappings) != null && s[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
|
|
2106
|
-
(
|
|
2106
|
+
(M, N) => N !== a
|
|
2107
2107
|
));
|
|
2108
2108
|
}
|
|
2109
2109
|
function g(l) {
|
|
@@ -2148,7 +2148,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2148
2148
|
account: { placeholder: l, editable: !0 }
|
|
2149
2149
|
};
|
|
2150
2150
|
}
|
|
2151
|
-
async function
|
|
2151
|
+
async function C() {
|
|
2152
2152
|
await _(async () => {
|
|
2153
2153
|
try {
|
|
2154
2154
|
await Se(e.value._id), await w.getSettings();
|
|
@@ -2159,7 +2159,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2159
2159
|
}
|
|
2160
2160
|
return (l, a) => {
|
|
2161
2161
|
var Y, J, O, j, z, Z, ee, te, oe, ae, le, ne, se, ie;
|
|
2162
|
-
const u =
|
|
2162
|
+
const u = V("FmIcon"), s = V("FmButton"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmSelect");
|
|
2163
2163
|
return (J = (Y = e.value) == null ? void 0 : Y.platform) != null && J.mappings ? (d(), D("div", Va, [
|
|
2164
2164
|
t("div", $a, [
|
|
2165
2165
|
t("div", Sa, [
|
|
@@ -2169,7 +2169,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2169
2169
|
i(u, {
|
|
2170
2170
|
name: "refresh",
|
|
2171
2171
|
class: "p-2 bg-gray-100 rounded-full",
|
|
2172
|
-
onClick:
|
|
2172
|
+
onClick: C
|
|
2173
2173
|
}),
|
|
2174
2174
|
t("span", Da, T(f(o)("report.integration.sql.refreshTooltip")), 1)
|
|
2175
2175
|
]),
|
|
@@ -2186,7 +2186,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2186
2186
|
])
|
|
2187
2187
|
])
|
|
2188
2188
|
]),
|
|
2189
|
-
i(
|
|
2189
|
+
i(M, { style: { margin: 0 } }),
|
|
2190
2190
|
t("div", Ua, [
|
|
2191
2191
|
t("div", Ta, [
|
|
2192
2192
|
t("div", Ia, T(f(o)("report.integration.sql.general")), 1),
|
|
@@ -2225,12 +2225,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2225
2225
|
]),
|
|
2226
2226
|
t("div", Ba, [
|
|
2227
2227
|
t("div", ja, [
|
|
2228
|
-
i(
|
|
2228
|
+
i(P, {
|
|
2229
2229
|
"model-value": { key: "Debtor", account: e.value.platform.mappings.debtor },
|
|
2230
2230
|
options: b("Debtor"),
|
|
2231
2231
|
"onUpdate:modelValue": a[3] || (a[3] = (U) => m({ key: "debtor", value: U.account }))
|
|
2232
2232
|
}, null, 8, ["model-value", "options"]),
|
|
2233
|
-
i(
|
|
2233
|
+
i(P, {
|
|
2234
2234
|
"model-value": {
|
|
2235
2235
|
key: "Invoice no",
|
|
2236
2236
|
account: e.value.platform.mappings.invoiceDocNo
|
|
@@ -2238,7 +2238,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2238
2238
|
options: b("Invoice no"),
|
|
2239
2239
|
"onUpdate:modelValue": a[4] || (a[4] = (U) => m({ key: "invoiceDocNo", value: U.account }))
|
|
2240
2240
|
}, null, 8, ["model-value", "options"]),
|
|
2241
|
-
i(
|
|
2241
|
+
i(P, {
|
|
2242
2242
|
"model-value": {
|
|
2243
2243
|
key: "Credit note no",
|
|
2244
2244
|
account: e.value.platform.mappings.creditNoteDocNo
|
|
@@ -2246,7 +2246,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2246
2246
|
options: b("Credit note no"),
|
|
2247
2247
|
"onUpdate:modelValue": a[5] || (a[5] = (U) => m({ key: "creditNoteDocNo", value: U.account }))
|
|
2248
2248
|
}, null, 8, ["model-value", "options"]),
|
|
2249
|
-
i(
|
|
2249
|
+
i(P, {
|
|
2250
2250
|
"model-value": {
|
|
2251
2251
|
key: "Payment no",
|
|
2252
2252
|
account: e.value.platform.mappings.paymentDocNo
|
|
@@ -2254,7 +2254,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2254
2254
|
options: b("Payment no"),
|
|
2255
2255
|
"onUpdate:modelValue": a[6] || (a[6] = (U) => m({ key: "paymentDocNo", value: U.account }))
|
|
2256
2256
|
}, null, 8, ["model-value", "options"]),
|
|
2257
|
-
i(
|
|
2257
|
+
i(P, {
|
|
2258
2258
|
"model-value": {
|
|
2259
2259
|
key: "Refund no",
|
|
2260
2260
|
account: e.value.platform.mappings.refundDocNo
|
|
@@ -2262,7 +2262,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2262
2262
|
options: b("Refund no"),
|
|
2263
2263
|
"onUpdate:modelValue": a[7] || (a[7] = (U) => m({ key: "refundDocNo", value: U.account }))
|
|
2264
2264
|
}, null, 8, ["model-value", "options"]),
|
|
2265
|
-
i(
|
|
2265
|
+
i(P, {
|
|
2266
2266
|
"model-value": {
|
|
2267
2267
|
key: "Project header",
|
|
2268
2268
|
account: e.value.platform.mappings.projectHeader
|
|
@@ -2270,7 +2270,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2270
2270
|
options: b("Project header"),
|
|
2271
2271
|
"onUpdate:modelValue": a[8] || (a[8] = (U) => m({ key: "projectHeader", value: U.account }))
|
|
2272
2272
|
}, null, 8, ["model-value", "options"]),
|
|
2273
|
-
i(
|
|
2273
|
+
i(P, {
|
|
2274
2274
|
"model-value": {
|
|
2275
2275
|
key: "Project detail",
|
|
2276
2276
|
account: e.value.platform.mappings.projectDetail
|
|
@@ -2280,7 +2280,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2280
2280
|
}, null, 8, ["model-value", "options"])
|
|
2281
2281
|
]),
|
|
2282
2282
|
t("div", La, [
|
|
2283
|
-
i(
|
|
2283
|
+
i(P, {
|
|
2284
2284
|
"model-value": {
|
|
2285
2285
|
key: "Rounding",
|
|
2286
2286
|
account: e.value.platform.mappings.rounding.account,
|
|
@@ -2292,14 +2292,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2292
2292
|
code: { placeholder: "Item code", editable: !0 }
|
|
2293
2293
|
},
|
|
2294
2294
|
"onUpdate:modelValue": a[10] || (a[10] = (U) => {
|
|
2295
|
-
var
|
|
2296
|
-
(
|
|
2295
|
+
var $, F, K;
|
|
2296
|
+
(K = (F = ($ = e.value) == null ? void 0 : $.platform) == null ? void 0 : F.mappings) != null && K.rounding && (e.value.platform.mappings.rounding.account = U.account, e.value.platform.mappings.rounding.code = U.code);
|
|
2297
2297
|
})
|
|
2298
2298
|
}, null, 8, ["model-value"]),
|
|
2299
|
-
(d(!0), D(L, null, Q((z = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : z.charges, (U,
|
|
2300
|
-
key: `charge-${
|
|
2301
|
-
modelValue: e.value.platform.mappings.charges[
|
|
2302
|
-
"onUpdate:modelValue": (F) => e.value.platform.mappings.charges[
|
|
2299
|
+
(d(!0), D(L, null, Q((z = (j = (O = e.value) == null ? void 0 : O.platform) == null ? void 0 : j.mappings) == null ? void 0 : z.charges, (U, $) => (d(), A(P, {
|
|
2300
|
+
key: `charge-${$}`,
|
|
2301
|
+
modelValue: e.value.platform.mappings.charges[$],
|
|
2302
|
+
"onUpdate:modelValue": (F) => e.value.platform.mappings.charges[$] = F,
|
|
2303
2303
|
options: {
|
|
2304
2304
|
key: { placeholder: "Key", editable: !1 },
|
|
2305
2305
|
account: { placeholder: "Account code", editable: !0 },
|
|
@@ -2322,17 +2322,17 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2322
2322
|
}, null, 8, ["label"])
|
|
2323
2323
|
]),
|
|
2324
2324
|
t("div", Ya, [
|
|
2325
|
-
(d(!0), D(L, null, Q((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U,
|
|
2326
|
-
key: `item-${
|
|
2327
|
-
modelValue: e.value.platform.mappings.items[
|
|
2328
|
-
"onUpdate:modelValue": (F) => e.value.platform.mappings.items[
|
|
2325
|
+
(d(!0), D(L, null, Q((te = (ee = (Z = e.value) == null ? void 0 : Z.platform) == null ? void 0 : ee.mappings) == null ? void 0 : te.items, (U, $) => (d(), A(P, {
|
|
2326
|
+
key: `item-${$}`,
|
|
2327
|
+
modelValue: e.value.platform.mappings.items[$],
|
|
2328
|
+
"onUpdate:modelValue": (F) => e.value.platform.mappings.items[$] = F,
|
|
2329
2329
|
options: {
|
|
2330
2330
|
key: { placeholder: "Key", editable: !0 },
|
|
2331
2331
|
account: { placeholder: "Account code", editable: !0 },
|
|
2332
2332
|
code: { placeholder: "Item code", editable: !0 }
|
|
2333
2333
|
},
|
|
2334
2334
|
removable: !0,
|
|
2335
|
-
onRemove: () => v("items",
|
|
2335
|
+
onRemove: () => v("items", $)
|
|
2336
2336
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2337
2337
|
]),
|
|
2338
2338
|
t("div", qa, [
|
|
@@ -2344,16 +2344,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2344
2344
|
})
|
|
2345
2345
|
]),
|
|
2346
2346
|
t("div", Qa, [
|
|
2347
|
-
(d(!0), D(L, null, Q((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U,
|
|
2348
|
-
key: `tax-${
|
|
2349
|
-
modelValue: e.value.platform.mappings.taxes[
|
|
2350
|
-
"onUpdate:modelValue": (F) => e.value.platform.mappings.taxes[
|
|
2347
|
+
(d(!0), D(L, null, Q((le = (ae = (oe = e.value) == null ? void 0 : oe.platform) == null ? void 0 : ae.mappings) == null ? void 0 : le.taxes, (U, $) => (d(), A(P, {
|
|
2348
|
+
key: `tax-${$}`,
|
|
2349
|
+
modelValue: e.value.platform.mappings.taxes[$],
|
|
2350
|
+
"onUpdate:modelValue": (F) => e.value.platform.mappings.taxes[$] = F,
|
|
2351
2351
|
options: {
|
|
2352
2352
|
key: { placeholder: "Key", editable: !0 },
|
|
2353
2353
|
account: { placeholder: "Account code", editable: !0 }
|
|
2354
2354
|
},
|
|
2355
2355
|
removable: !0,
|
|
2356
|
-
onRemove: () => v("taxes",
|
|
2356
|
+
onRemove: () => v("taxes", $)
|
|
2357
2357
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2358
2358
|
]),
|
|
2359
2359
|
t("div", Xa, [
|
|
@@ -2365,16 +2365,16 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2365
2365
|
})
|
|
2366
2366
|
]),
|
|
2367
2367
|
t("div", Ja, [
|
|
2368
|
-
(d(!0), D(L, null, Q((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U,
|
|
2369
|
-
key: `payment-${
|
|
2370
|
-
modelValue: e.value.platform.mappings.payments[
|
|
2371
|
-
"onUpdate:modelValue": (F) => e.value.platform.mappings.payments[
|
|
2368
|
+
(d(!0), D(L, null, Q((ie = (se = (ne = e.value) == null ? void 0 : ne.platform) == null ? void 0 : se.mappings) == null ? void 0 : ie.payments, (U, $) => (d(), A(P, {
|
|
2369
|
+
key: `payment-${$}`,
|
|
2370
|
+
modelValue: e.value.platform.mappings.payments[$],
|
|
2371
|
+
"onUpdate:modelValue": (F) => e.value.platform.mappings.payments[$] = F,
|
|
2372
2372
|
options: {
|
|
2373
2373
|
key: { placeholder: "Key", editable: !0 },
|
|
2374
2374
|
account: { placeholder: "Method", editable: !0 }
|
|
2375
2375
|
},
|
|
2376
2376
|
removable: !0,
|
|
2377
|
-
onRemove: () => v("payments",
|
|
2377
|
+
onRemove: () => v("payments", $)
|
|
2378
2378
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onRemove"]))), 128))
|
|
2379
2379
|
])
|
|
2380
2380
|
])
|
|
@@ -2487,7 +2487,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2487
2487
|
header: "Payment Amount",
|
|
2488
2488
|
enableSorting: !1
|
|
2489
2489
|
}
|
|
2490
|
-
], x = X(y, "modelValue"), _ = B(!1),
|
|
2490
|
+
], x = X(y, "modelValue"), _ = B(!1), S = fe(), { dateRange: h } = De(ue());
|
|
2491
2491
|
ge(
|
|
2492
2492
|
() => h.value,
|
|
2493
2493
|
async () => {
|
|
@@ -2495,7 +2495,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2495
2495
|
try {
|
|
2496
2496
|
_.value = !0, e.value = await Ce(x.value._id);
|
|
2497
2497
|
} catch (p) {
|
|
2498
|
-
|
|
2498
|
+
S.open({ message: p.message, type: "error" });
|
|
2499
2499
|
} finally {
|
|
2500
2500
|
_.value = !1;
|
|
2501
2501
|
}
|
|
@@ -2506,15 +2506,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2506
2506
|
);
|
|
2507
2507
|
async function r() {
|
|
2508
2508
|
try {
|
|
2509
|
-
x.value._id ? (_.value = !0, await Pe(x.value._id)) :
|
|
2509
|
+
x.value._id ? (_.value = !0, await Pe(x.value._id)) : S.open({ message: "Invalid accounting setting", type: "error" });
|
|
2510
2510
|
} catch (p) {
|
|
2511
|
-
|
|
2511
|
+
S.open({ message: p.message, type: "error" });
|
|
2512
2512
|
} finally {
|
|
2513
2513
|
_.value = !1;
|
|
2514
2514
|
}
|
|
2515
2515
|
}
|
|
2516
2516
|
return (p, k) => {
|
|
2517
|
-
const v =
|
|
2517
|
+
const v = V("FmButton"), g = V("FmCircularProgress"), c = V("FmTable");
|
|
2518
2518
|
return d(), D("div", Za, [
|
|
2519
2519
|
t("div", el, [
|
|
2520
2520
|
i(Ue, {
|
|
@@ -2532,7 +2532,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2532
2532
|
_.value ? (d(), D("div", tl, [
|
|
2533
2533
|
i(g, { size: "xl" }),
|
|
2534
2534
|
t("span", ol, T(f(o)("report.common.loading")), 1)
|
|
2535
|
-
])) : n.value.length > 0 ? (d(),
|
|
2535
|
+
])) : n.value.length > 0 ? (d(), A(c, {
|
|
2536
2536
|
key: 1,
|
|
2537
2537
|
class: "flex overflow-scroll",
|
|
2538
2538
|
"row-data": n.value,
|
|
@@ -2570,9 +2570,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2570
2570
|
return null;
|
|
2571
2571
|
}
|
|
2572
2572
|
});
|
|
2573
|
-
return (
|
|
2573
|
+
return (S, h) => {
|
|
2574
2574
|
var k;
|
|
2575
|
-
const r =
|
|
2575
|
+
const r = V("FmPageHead"), p = V("FmTabs");
|
|
2576
2576
|
return d(), D("div", ll, [
|
|
2577
2577
|
i(r, {
|
|
2578
2578
|
title: ((k = e.value) == null ? void 0 : k.name) || "SQL",
|
|
@@ -2591,7 +2591,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2591
2591
|
items: w
|
|
2592
2592
|
}, null, 8, ["model-value"]),
|
|
2593
2593
|
t("div", nl, [
|
|
2594
|
-
(d(),
|
|
2594
|
+
(d(), A(be(_.value), {
|
|
2595
2595
|
modelValue: e.value,
|
|
2596
2596
|
"onUpdate:modelValue": h[1] || (h[1] = (v) => e.value = v)
|
|
2597
2597
|
}, null, 8, ["modelValue"]))
|
|
@@ -2634,18 +2634,18 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2634
2634
|
}),
|
|
2635
2635
|
emits: ["update:modelValue"],
|
|
2636
2636
|
setup(y) {
|
|
2637
|
-
const { t: o } = W(), e = X(y, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage:
|
|
2638
|
-
() => h.map((
|
|
2637
|
+
const { t: o } = W(), e = X(y, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage: S } = Fe(), { restaurants: h } = ue(), r = E(
|
|
2638
|
+
() => h.map((C) => ({ label: C.name, value: C.id }))
|
|
2639
2639
|
);
|
|
2640
|
-
function p(
|
|
2640
|
+
function p(C) {
|
|
2641
2641
|
var l;
|
|
2642
|
-
!((l = y.retrievedMethods) != null && l.data) || !Array.isArray(y.retrievedMethods.data) ||
|
|
2642
|
+
!((l = y.retrievedMethods) != null && l.data) || !Array.isArray(y.retrievedMethods.data) || C.forEach((a) => {
|
|
2643
2643
|
const u = y.retrievedMethods.data.find((s) => s.value == a.id);
|
|
2644
2644
|
u && (a.cnId = u.cnId);
|
|
2645
2645
|
});
|
|
2646
2646
|
}
|
|
2647
2647
|
async function k() {
|
|
2648
|
-
await
|
|
2648
|
+
await S({
|
|
2649
2649
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
2650
2650
|
title: o("report.common.delete")
|
|
2651
2651
|
}) && await _(async () => {
|
|
@@ -2658,29 +2658,29 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2658
2658
|
}
|
|
2659
2659
|
async function v() {
|
|
2660
2660
|
await _(async () => {
|
|
2661
|
-
var
|
|
2661
|
+
var C, l, a;
|
|
2662
2662
|
try {
|
|
2663
|
-
(a = (l = (
|
|
2663
|
+
(a = (l = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : l.mappings) != null && a.paymentMethods && p(e.value.platform.mappings.paymentMethods), await $e(e.value._id, e.value), await w.getSettings();
|
|
2664
2664
|
} catch (u) {
|
|
2665
2665
|
n.open({ type: "error", message: u.message });
|
|
2666
2666
|
}
|
|
2667
2667
|
});
|
|
2668
2668
|
}
|
|
2669
|
-
function g(
|
|
2669
|
+
function g(C, l) {
|
|
2670
2670
|
var a, u;
|
|
2671
|
-
(u = (a = e.value.platform) == null ? void 0 : a.mappings) != null && u[
|
|
2672
|
-
(s,
|
|
2671
|
+
(u = (a = e.value.platform) == null ? void 0 : a.mappings) != null && u[C] && (e.value.platform.mappings[C] = e.value.platform.mappings[C].filter(
|
|
2672
|
+
(s, M) => M !== l
|
|
2673
2673
|
));
|
|
2674
2674
|
}
|
|
2675
|
-
function c(
|
|
2675
|
+
function c(C) {
|
|
2676
2676
|
var l, a;
|
|
2677
|
-
(a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[
|
|
2678
|
-
...e.value.platform.mappings[
|
|
2679
|
-
|
|
2677
|
+
(a = (l = e.value.platform) == null ? void 0 : l.mappings) != null && a[C] && (e.value.platform.mappings[C] = [
|
|
2678
|
+
...e.value.platform.mappings[C],
|
|
2679
|
+
C === "items" ? {
|
|
2680
2680
|
key: "",
|
|
2681
2681
|
account: "",
|
|
2682
2682
|
description: ""
|
|
2683
|
-
} :
|
|
2683
|
+
} : C === "taxes" ? {
|
|
2684
2684
|
key: "",
|
|
2685
2685
|
account: "SST-"
|
|
2686
2686
|
} : {
|
|
@@ -2697,12 +2697,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2697
2697
|
];
|
|
2698
2698
|
ge(
|
|
2699
2699
|
() => {
|
|
2700
|
-
var
|
|
2701
|
-
return (a = (l = (
|
|
2700
|
+
var C, l, a;
|
|
2701
|
+
return (a = (l = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.taxes;
|
|
2702
2702
|
},
|
|
2703
|
-
(
|
|
2704
|
-
|
|
2705
|
-
var
|
|
2703
|
+
(C) => {
|
|
2704
|
+
C && C.forEach((l, a) => {
|
|
2705
|
+
var M;
|
|
2706
2706
|
const u = l.key || "";
|
|
2707
2707
|
let s = l.account;
|
|
2708
2708
|
if (!s && u) {
|
|
@@ -2717,7 +2717,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2717
2717
|
s = "SST-0";
|
|
2718
2718
|
break;
|
|
2719
2719
|
}
|
|
2720
|
-
(
|
|
2720
|
+
(M = e.value.platform) != null && M.mappings && (e.value.platform.mappings.taxes[a] = {
|
|
2721
2721
|
...l,
|
|
2722
2722
|
account: s
|
|
2723
2723
|
});
|
|
@@ -2727,12 +2727,12 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2727
2727
|
{ immediate: !0, deep: !0 }
|
|
2728
2728
|
), ge(
|
|
2729
2729
|
() => {
|
|
2730
|
-
var
|
|
2731
|
-
return (a = (l = (
|
|
2730
|
+
var C, l, a;
|
|
2731
|
+
return (a = (l = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.version;
|
|
2732
2732
|
},
|
|
2733
|
-
(
|
|
2734
|
-
var l, a, u, s,
|
|
2735
|
-
|
|
2733
|
+
(C) => {
|
|
2734
|
+
var l, a, u, s, M;
|
|
2735
|
+
C === "v1" && !((u = (a = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : a.mappings) != null && u.payee) && (M = (s = e.value) == null ? void 0 : s.platform) != null && M.mappings && (e.value.platform.mappings.payee = {
|
|
2736
2736
|
id: 1,
|
|
2737
2737
|
name: ""
|
|
2738
2738
|
});
|
|
@@ -2743,14 +2743,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2743
2743
|
await _(async () => {
|
|
2744
2744
|
try {
|
|
2745
2745
|
await Se(e.value._id), await w.getSettings();
|
|
2746
|
-
} catch (
|
|
2747
|
-
n.open({ type: "error", message:
|
|
2746
|
+
} catch (C) {
|
|
2747
|
+
n.open({ type: "error", message: C.message });
|
|
2748
2748
|
}
|
|
2749
2749
|
});
|
|
2750
2750
|
}
|
|
2751
|
-
return (
|
|
2751
|
+
return (C, l) => {
|
|
2752
2752
|
var J, O, j, z, Z, ee, te, oe, ae, le, ne, se, ie, U;
|
|
2753
|
-
const a =
|
|
2753
|
+
const a = V("FmIcon"), u = V("FmButton"), s = V("FmSelect"), M = V("FmMenuDivider"), N = V("FmTextField"), G = V("FmCircularProgress"), Y = V("FmCheckbox");
|
|
2754
2754
|
return (O = (J = e.value) == null ? void 0 : J.platform) != null && O.mappings ? (d(), D("div", il, [
|
|
2755
2755
|
t("div", rl, [
|
|
2756
2756
|
t("div", ml, [
|
|
@@ -2786,7 +2786,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2786
2786
|
t("div", _l, [
|
|
2787
2787
|
i(s, {
|
|
2788
2788
|
modelValue: e.value.platform.mappings.version,
|
|
2789
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
2789
|
+
"onUpdate:modelValue": l[0] || (l[0] = ($) => e.value.platform.mappings.version = $),
|
|
2790
2790
|
items: [
|
|
2791
2791
|
{ label: "v1", value: "v1" },
|
|
2792
2792
|
{ label: "v2", value: "v2" }
|
|
@@ -2795,14 +2795,14 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2795
2795
|
}, null, 8, ["modelValue"])
|
|
2796
2796
|
])
|
|
2797
2797
|
]),
|
|
2798
|
-
i(
|
|
2798
|
+
i(M, { style: { margin: 0 } }),
|
|
2799
2799
|
t("div", bl, [
|
|
2800
2800
|
t("div", wl, [
|
|
2801
2801
|
t("div", hl, T(f(o)("report.integration.biztory.subdomain")), 1),
|
|
2802
2802
|
t("div", kl, [
|
|
2803
2803
|
i(N, {
|
|
2804
2804
|
modelValue: e.value.platform.subdomain,
|
|
2805
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
2805
|
+
"onUpdate:modelValue": l[1] || (l[1] = ($) => e.value.platform.subdomain = $),
|
|
2806
2806
|
placeholder: "Subdomain"
|
|
2807
2807
|
}, null, 8, ["modelValue"])
|
|
2808
2808
|
])
|
|
@@ -2812,7 +2812,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2812
2812
|
t("div", Sl, [
|
|
2813
2813
|
i(N, {
|
|
2814
2814
|
modelValue: e.value.platform.api_key,
|
|
2815
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
2815
|
+
"onUpdate:modelValue": l[2] || (l[2] = ($) => e.value.platform.api_key = $),
|
|
2816
2816
|
placeholder: "API Key"
|
|
2817
2817
|
}, null, 8, ["modelValue"])
|
|
2818
2818
|
])
|
|
@@ -2824,7 +2824,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2824
2824
|
t("div", Tl, [
|
|
2825
2825
|
i(N, {
|
|
2826
2826
|
modelValue: e.value.name,
|
|
2827
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
2827
|
+
"onUpdate:modelValue": l[3] || (l[3] = ($) => e.value.name = $)
|
|
2828
2828
|
}, null, 8, ["modelValue"])
|
|
2829
2829
|
])
|
|
2830
2830
|
]),
|
|
@@ -2832,7 +2832,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2832
2832
|
t("div", Ml, T(f(o)("report.integration.location")), 1),
|
|
2833
2833
|
i(s, {
|
|
2834
2834
|
modelValue: e.value.platform.locationIds,
|
|
2835
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
2835
|
+
"onUpdate:modelValue": l[4] || (l[4] = ($) => e.value.platform.locationIds = $),
|
|
2836
2836
|
multiselect: !0,
|
|
2837
2837
|
items: r.value,
|
|
2838
2838
|
placeholder: f(o)("report.integration.biztory.location"),
|
|
@@ -2843,7 +2843,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2843
2843
|
t("div", Al, T(f(o)("report.integration.biztory.grouping")), 1),
|
|
2844
2844
|
i(s, {
|
|
2845
2845
|
modelValue: e.value.platform.grouping,
|
|
2846
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
2846
|
+
"onUpdate:modelValue": l[5] || (l[5] = ($) => e.value.platform.grouping = $),
|
|
2847
2847
|
multiselect: !1,
|
|
2848
2848
|
items: m,
|
|
2849
2849
|
placeholder: f(o)("report.integration.biztory.grouping"),
|
|
@@ -2853,10 +2853,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2853
2853
|
]),
|
|
2854
2854
|
e.value.platform.mappings.version == "v1" ? (d(), D("div", Pl, [
|
|
2855
2855
|
l[13] || (l[13] = t("div", { class: "w-[33%]" }, "Payee ID", -1)),
|
|
2856
|
-
e.value.platform.mappings.version == "v1" ? (d(),
|
|
2856
|
+
e.value.platform.mappings.version == "v1" ? (d(), A(P, {
|
|
2857
2857
|
key: 0,
|
|
2858
2858
|
modelValue: e.value.platform.mappings.payee,
|
|
2859
|
-
"onUpdate:modelValue": l[6] || (l[6] = (
|
|
2859
|
+
"onUpdate:modelValue": l[6] || (l[6] = ($) => e.value.platform.mappings.payee = $),
|
|
2860
2860
|
options: {
|
|
2861
2861
|
id: { placeholder: "ID", editable: !0 }
|
|
2862
2862
|
},
|
|
@@ -2866,15 +2866,15 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2866
2866
|
]),
|
|
2867
2867
|
t("div", Nl, [
|
|
2868
2868
|
t("div", Rl, [
|
|
2869
|
-
y.retrievedCustomers.isLoaded
|
|
2869
|
+
!y.retrievedCustomers.isLoaded && e.value.platform.mappings.version == "v2" ? (d(), A(G, {
|
|
2870
2870
|
key: 0,
|
|
2871
2871
|
size: "xl"
|
|
2872
|
-
})),
|
|
2872
|
+
})) : R("", !0),
|
|
2873
2873
|
y.retrievedCustomers.isLoaded && y.retrievedCustomers.data && ((j = y.retrievedCustomers.data) == null ? void 0 : j.length) != 0 ? (d(), D("div", Ol, [
|
|
2874
|
-
e.value.platform.mappings.version == "v2" ? (d(),
|
|
2874
|
+
e.value.platform.mappings.version == "v2" ? (d(), A(Me, {
|
|
2875
2875
|
key: 0,
|
|
2876
2876
|
modelValue: e.value.platform.mappings.payeeId,
|
|
2877
|
-
"onUpdate:modelValue": l[7] || (l[7] = (
|
|
2877
|
+
"onUpdate:modelValue": l[7] || (l[7] = ($) => e.value.platform.mappings.payeeId = $),
|
|
2878
2878
|
options: {
|
|
2879
2879
|
key: { placeholder: "Payee", editable: !1 },
|
|
2880
2880
|
customer: {
|
|
@@ -2891,7 +2891,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2891
2891
|
]),
|
|
2892
2892
|
i(Te, {
|
|
2893
2893
|
modelValue: e.value.platform,
|
|
2894
|
-
"onUpdate:modelValue": l[8] || (l[8] = (
|
|
2894
|
+
"onUpdate:modelValue": l[8] || (l[8] = ($) => e.value.platform = $),
|
|
2895
2895
|
label: "upload",
|
|
2896
2896
|
"last-upload-date": (Z = e.value.platform) == null ? void 0 : Z.lastUploadDate
|
|
2897
2897
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
@@ -2904,10 +2904,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2904
2904
|
})
|
|
2905
2905
|
]),
|
|
2906
2906
|
t("div", Ll, [
|
|
2907
|
-
(d(!0), D(L, null, Q((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, (
|
|
2907
|
+
(d(!0), D(L, null, Q((oe = (te = (ee = e.value) == null ? void 0 : ee.platform) == null ? void 0 : te.mappings) == null ? void 0 : oe.items, ($, F) => (d(), A(P, {
|
|
2908
2908
|
key: `item-${F}`,
|
|
2909
2909
|
modelValue: e.value.platform.mappings.items[F],
|
|
2910
|
-
"onUpdate:modelValue": (
|
|
2910
|
+
"onUpdate:modelValue": (K) => e.value.platform.mappings.items[F] = K,
|
|
2911
2911
|
options: {
|
|
2912
2912
|
key: { placeholder: "Key", editable: !0 },
|
|
2913
2913
|
code: { placeholder: "Account code", editable: !0 }
|
|
@@ -2925,10 +2925,10 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2925
2925
|
})
|
|
2926
2926
|
]),
|
|
2927
2927
|
t("div", Yl, [
|
|
2928
|
-
(d(!0), D(L, null, Q((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, (
|
|
2928
|
+
(d(!0), D(L, null, Q((ne = (le = (ae = e.value) == null ? void 0 : ae.platform) == null ? void 0 : le.mappings) == null ? void 0 : ne.taxes, ($, F) => (d(), A(P, {
|
|
2929
2929
|
key: `tax-${F}`,
|
|
2930
2930
|
modelValue: e.value.platform.mappings.taxes[F],
|
|
2931
|
-
"onUpdate:modelValue": (
|
|
2931
|
+
"onUpdate:modelValue": (K) => e.value.platform.mappings.taxes[F] = K,
|
|
2932
2932
|
options: {
|
|
2933
2933
|
key: { placeholder: "Key", editable: !0 },
|
|
2934
2934
|
account: { placeholder: "Account code", editable: !0 }
|
|
@@ -2948,9 +2948,9 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2948
2948
|
t("div", Ql, [
|
|
2949
2949
|
l[14] || (l[14] = t("div", { class: "w-[25%]" }, "Payment Term", -1)),
|
|
2950
2950
|
t("div", Xl, [
|
|
2951
|
-
i(
|
|
2951
|
+
i(P, {
|
|
2952
2952
|
modelValue: e.value.platform.mappings.paymentTerm,
|
|
2953
|
-
"onUpdate:modelValue": l[12] || (l[12] = (
|
|
2953
|
+
"onUpdate:modelValue": l[12] || (l[12] = ($) => e.value.platform.mappings.paymentTerm = $),
|
|
2954
2954
|
options: {
|
|
2955
2955
|
id: { placeholder: "ID", editable: !0 },
|
|
2956
2956
|
name: { placeholder: "Name", editable: !0 }
|
|
@@ -2961,18 +2961,18 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2961
2961
|
]),
|
|
2962
2962
|
y.retrievedMethods.isError ? R("", !0) : (d(), D("div", Gl, T(f(o)("report.integration.biztory.paymentTerm")), 1)),
|
|
2963
2963
|
y.retrievedMethods.isLoaded && y.retrievedMethods.data && y.retrievedMethods.data.length == 0 && !y.retrievedMethods.isError ? (d(), D("span", Jl, T(f(o)("report.integration.biztory.noPaymentMethods")), 1)) : R("", !0),
|
|
2964
|
-
y.retrievedMethods.isLoaded ? R("", !0) : (d(),
|
|
2964
|
+
y.retrievedMethods.isLoaded ? R("", !0) : (d(), A(G, {
|
|
2965
2965
|
key: 2,
|
|
2966
2966
|
size: "xl"
|
|
2967
2967
|
})),
|
|
2968
2968
|
y.retrievedMethods.isError ? (d(), D("span", Wl, T(f(o)("report.integration.biztory.error")), 1)) : R("", !0),
|
|
2969
|
-
(d(!0), D(L, null, Q((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.paymentMethods, (
|
|
2970
|
-
var
|
|
2969
|
+
(d(!0), D(L, null, Q((U = (ie = (se = e.value) == null ? void 0 : se.platform) == null ? void 0 : ie.mappings) == null ? void 0 : U.paymentMethods, ($, F) => {
|
|
2970
|
+
var K;
|
|
2971
2971
|
return d(), D("div", {
|
|
2972
2972
|
key: `payment-${F}`,
|
|
2973
2973
|
class: "grid-cols-1 grid gap-x-16"
|
|
2974
2974
|
}, [
|
|
2975
|
-
y.retrievedMethods.isLoaded && y.retrievedMethods.data && ((
|
|
2975
|
+
y.retrievedMethods.isLoaded && y.retrievedMethods.data && ((K = y.retrievedMethods.data) == null ? void 0 : K.length) != 0 ? (d(), D("div", Zl, [
|
|
2976
2976
|
i(Y, {
|
|
2977
2977
|
"model-value": !e.value.platform.mappings.paymentMethods[F].skip,
|
|
2978
2978
|
value: "",
|
|
@@ -3009,7 +3009,7 @@ const Ze = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3009
3009
|
});
|
|
3010
3010
|
function tn(y) {
|
|
3011
3011
|
return y.reduce((o, e) => {
|
|
3012
|
-
var x, _,
|
|
3012
|
+
var x, _, S, h, r, p, k, v, g, c, m, b, C, l, a, u, s, M, N, G, Y, J;
|
|
3013
3013
|
const { invoice: n } = e, w = o.length;
|
|
3014
3014
|
o[w] = {
|
|
3015
3015
|
invoice_date: n.invoice_date,
|
|
@@ -3020,7 +3020,7 @@ function tn(y) {
|
|
|
3020
3020
|
// service_charge: invoice.service_charge.total,
|
|
3021
3021
|
item_code: (x = n.items[0]) == null ? void 0 : x.code,
|
|
3022
3022
|
item_desc: (_ = n.items[0]) == null ? void 0 : _.description,
|
|
3023
|
-
item_price: (
|
|
3023
|
+
item_price: (S = n.items[0]) == null ? void 0 : S.price,
|
|
3024
3024
|
item_tax: (h = n.items[0]) == null ? void 0 : h.total_tax,
|
|
3025
3025
|
item_tax_label: ((r = n.items[0]) == null ? void 0 : r.tax_label) || "-",
|
|
3026
3026
|
payment_amount: ((k = (p = n.transactions) == null ? void 0 : p[0]) == null ? void 0 : k.amount) || void 0,
|
|
@@ -3038,11 +3038,11 @@ function tn(y) {
|
|
|
3038
3038
|
item_price: z.price,
|
|
3039
3039
|
item_tax: z.total_tax,
|
|
3040
3040
|
item_tax_label: z.tax_label || "-",
|
|
3041
|
-
payment_amount: ((l = (
|
|
3041
|
+
payment_amount: ((l = (C = n.transactions) == null ? void 0 : C[O]) == null ? void 0 : l.amount) || void 0,
|
|
3042
3042
|
payment_method: ((u = (a = n.transactions) == null ? void 0 : a[O]) == null ? void 0 : u.payment_method) || "-",
|
|
3043
3043
|
payment_term: ((s = n == null ? void 0 : n.payment_term) == null ? void 0 : s.name) || ""
|
|
3044
3044
|
} : o[j] = {
|
|
3045
|
-
payment_amount: ((N = (
|
|
3045
|
+
payment_amount: ((N = (M = n.transactions) == null ? void 0 : M[O]) == null ? void 0 : N.amount) || void 0,
|
|
3046
3046
|
payment_method: ((Y = (G = n.transactions) == null ? void 0 : G[O]) == null ? void 0 : Y.payment_method) || "-",
|
|
3047
3047
|
payment_term: ((J = n == null ? void 0 : n.payment_term) == null ? void 0 : J.name) || ""
|
|
3048
3048
|
};
|
|
@@ -3124,46 +3124,46 @@ const on = [
|
|
|
3124
3124
|
];
|
|
3125
3125
|
function an(y) {
|
|
3126
3126
|
return y.reduce((o, e) => {
|
|
3127
|
-
var
|
|
3127
|
+
var S, h, r, p, k, v, g, c, m, b, C;
|
|
3128
3128
|
const { invoice: n, payments: w } = e, x = o.length;
|
|
3129
3129
|
o[x] = {
|
|
3130
3130
|
invoice_date: n.invoice_date,
|
|
3131
3131
|
ref_num: n.ref_num,
|
|
3132
3132
|
total: n.total,
|
|
3133
|
-
item_code: (
|
|
3133
|
+
item_code: (S = n.items[0]) == null ? void 0 : S.code,
|
|
3134
3134
|
item_description: (h = n.items[0]) == null ? void 0 : h.description,
|
|
3135
3135
|
item_price: (r = n.items[0]) == null ? void 0 : r.price,
|
|
3136
|
-
item_tax_label: ((p = n.items[0]) == null ? void 0 : p.tax_label) ?? "",
|
|
3137
|
-
item_tax_amount: ((
|
|
3138
|
-
service_charge_amount: ((
|
|
3136
|
+
item_tax_label: ((p = n.items[0]) == null ? void 0 : p.tax_label) == "?" ? "" : ((k = n.items[0]) == null ? void 0 : k.tax_label) ?? "",
|
|
3137
|
+
item_tax_amount: ((v = n.items[0]) == null ? void 0 : v.total_tax) ?? "",
|
|
3138
|
+
service_charge_amount: ((g = n.service_charges[0]) == null ? void 0 : g.total) ?? "",
|
|
3139
3139
|
rounding: n.rounding ?? 0,
|
|
3140
3140
|
payment_term_id: n.payment_term.name ?? "",
|
|
3141
|
-
payment_term_amount: ((
|
|
3142
|
-
payment_method: ((
|
|
3141
|
+
payment_term_amount: ((c = n.terms[x]) == null ? void 0 : c.amount) ?? "",
|
|
3142
|
+
payment_method: ((m = w[0]) == null ? void 0 : m.payment_method_name) || ""
|
|
3143
3143
|
};
|
|
3144
3144
|
const _ = Math.max(
|
|
3145
|
-
((
|
|
3146
|
-
((
|
|
3145
|
+
((b = n.items) == null ? void 0 : b.length) || 0,
|
|
3146
|
+
((C = n.terms) == null ? void 0 : C.length) || 0,
|
|
3147
3147
|
(w == null ? void 0 : w.length) || 0
|
|
3148
3148
|
);
|
|
3149
|
-
for (let
|
|
3150
|
-
const
|
|
3151
|
-
o[
|
|
3152
|
-
const
|
|
3153
|
-
|
|
3154
|
-
...o[
|
|
3155
|
-
item_code:
|
|
3156
|
-
item_description:
|
|
3157
|
-
item_price:
|
|
3158
|
-
item_tax_label:
|
|
3159
|
-
item_tax_amount:
|
|
3149
|
+
for (let l = 1; l < _; l++) {
|
|
3150
|
+
const a = x + l;
|
|
3151
|
+
o[a] || (o[a] = {});
|
|
3152
|
+
const u = n.items[l], s = n.terms[l], M = w[l];
|
|
3153
|
+
u ? o[a] = {
|
|
3154
|
+
...o[a],
|
|
3155
|
+
item_code: u.code,
|
|
3156
|
+
item_description: u.description,
|
|
3157
|
+
item_price: u.total,
|
|
3158
|
+
item_tax_label: u.tax_label == "?" ? "" : u.tax_label ?? "",
|
|
3159
|
+
item_tax_amount: u.total_tax ?? "",
|
|
3160
3160
|
payment_term_id: n.payment_term.name ?? "",
|
|
3161
|
-
payment_term_amount: (
|
|
3162
|
-
payment_method: (
|
|
3163
|
-
} : o[
|
|
3161
|
+
payment_term_amount: (s == null ? void 0 : s.amount) ?? "",
|
|
3162
|
+
payment_method: (M == null ? void 0 : M.payment_method_name) || ""
|
|
3163
|
+
} : o[a] = {
|
|
3164
3164
|
payment_term_id: n.payment_term.name ?? "",
|
|
3165
|
-
payment_term_amount: (
|
|
3166
|
-
payment_method: (
|
|
3165
|
+
payment_term_amount: (s == null ? void 0 : s.amount) ?? "",
|
|
3166
|
+
payment_method: (M == null ? void 0 : M.payment_method_name) || ""
|
|
3167
3167
|
};
|
|
3168
3168
|
}
|
|
3169
3169
|
return o;
|
|
@@ -3271,7 +3271,7 @@ const ln = [
|
|
|
3271
3271
|
return an(x.value);
|
|
3272
3272
|
}
|
|
3273
3273
|
return [];
|
|
3274
|
-
}),
|
|
3274
|
+
}), S = E(() => {
|
|
3275
3275
|
switch (o.value.platform.mappings.version) {
|
|
3276
3276
|
case "v1":
|
|
3277
3277
|
return on;
|
|
@@ -3290,7 +3290,7 @@ const ln = [
|
|
|
3290
3290
|
}
|
|
3291
3291
|
}
|
|
3292
3292
|
return (r, p) => {
|
|
3293
|
-
const k =
|
|
3293
|
+
const k = V("FmButton"), v = V("FmCircularProgress"), g = V("FmTable");
|
|
3294
3294
|
return d(), D("div", nn, [
|
|
3295
3295
|
t("div", sn, [
|
|
3296
3296
|
i(Ue, {
|
|
@@ -3308,11 +3308,11 @@ const ln = [
|
|
|
3308
3308
|
e.value ? (d(), D("div", rn, [
|
|
3309
3309
|
i(v, { size: "xl" }),
|
|
3310
3310
|
p[1] || (p[1] = t("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
|
|
3311
|
-
])) : (d(),
|
|
3311
|
+
])) : (d(), A(g, {
|
|
3312
3312
|
key: 1,
|
|
3313
3313
|
class: "flex overflow-scroll",
|
|
3314
3314
|
"row-data": _.value,
|
|
3315
|
-
"column-defs":
|
|
3315
|
+
"column-defs": S.value
|
|
3316
3316
|
}, null, 8, ["row-data", "column-defs"]))
|
|
3317
3317
|
]);
|
|
3318
3318
|
};
|
|
@@ -3346,23 +3346,23 @@ const ln = [
|
|
|
3346
3346
|
return {
|
|
3347
3347
|
component: en,
|
|
3348
3348
|
props: {
|
|
3349
|
-
retrievedMethods:
|
|
3349
|
+
retrievedMethods: S.value,
|
|
3350
3350
|
retrievedCustomers: h.value
|
|
3351
3351
|
}
|
|
3352
3352
|
};
|
|
3353
3353
|
default:
|
|
3354
3354
|
return null;
|
|
3355
3355
|
}
|
|
3356
|
-
}),
|
|
3356
|
+
}), S = B({}), h = B({}), r = (c, m) => c.map((b) => ({
|
|
3357
3357
|
label: m.length > 2 ? `ID:${b[m[2]]} [${b[m[0]]}] ${b[m[1]]}` : `[${b[m[0]]}] ${b[m[1]]}`,
|
|
3358
3358
|
value: b.id,
|
|
3359
3359
|
cnId: b.cnId ? b.cnId : null
|
|
3360
|
-
})), p = (c) => r(c, ["wallet", "name"]), k = (c) => r(c, ["id", "name"]), v = async (c, m, b,
|
|
3360
|
+
})), p = (c) => r(c, ["wallet", "name"]), k = (c) => r(c, ["id", "name"]), v = async (c, m, b, C) => {
|
|
3361
3361
|
try {
|
|
3362
3362
|
const l = await c(e.value._id);
|
|
3363
3363
|
b.value.data = m(l);
|
|
3364
3364
|
} catch (l) {
|
|
3365
|
-
console.error(
|
|
3365
|
+
console.error(C, l), b.value.isError = !0;
|
|
3366
3366
|
} finally {
|
|
3367
3367
|
b.value.isLoaded = !0;
|
|
3368
3368
|
}
|
|
@@ -3371,21 +3371,21 @@ const ln = [
|
|
|
3371
3371
|
(c = e.value.platform.mappings) != null && c.version && await v(
|
|
3372
3372
|
Ge,
|
|
3373
3373
|
p,
|
|
3374
|
-
|
|
3374
|
+
S,
|
|
3375
3375
|
"Failed to fetch payment methods:"
|
|
3376
3376
|
), ((m = e.value.platform.mappings) == null ? void 0 : m.version) == "v2" && await v(
|
|
3377
3377
|
Je,
|
|
3378
3378
|
k,
|
|
3379
3379
|
h,
|
|
3380
3380
|
"Failed to fetch customers:"
|
|
3381
|
-
),
|
|
3381
|
+
), S.value.isLoaded = !0, h.value.isLoaded = !0;
|
|
3382
3382
|
};
|
|
3383
3383
|
return ze(g), ge(() => {
|
|
3384
3384
|
var c;
|
|
3385
3385
|
return (c = e.value.platform.mappings) == null ? void 0 : c.version;
|
|
3386
3386
|
}, g), (c, m) => {
|
|
3387
3387
|
var l, a, u;
|
|
3388
|
-
const b =
|
|
3388
|
+
const b = V("FmPageHead"), C = V("FmTabs");
|
|
3389
3389
|
return d(), D("div", cn, [
|
|
3390
3390
|
i(b, {
|
|
3391
3391
|
title: ((l = e.value) == null ? void 0 : l.name) || "Biztory",
|
|
@@ -3398,13 +3398,13 @@ const ln = [
|
|
|
3398
3398
|
])),
|
|
3399
3399
|
_: 1
|
|
3400
3400
|
}, 8, ["title", "onClick:back"]),
|
|
3401
|
-
i(
|
|
3401
|
+
i(C, {
|
|
3402
3402
|
"model-value": n.value,
|
|
3403
3403
|
"onUpdate:modelValue": m[0] || (m[0] = (s) => n.value = s),
|
|
3404
3404
|
items: w
|
|
3405
3405
|
}, null, 8, ["model-value"]),
|
|
3406
3406
|
t("div", dn, [
|
|
3407
|
-
(d(),
|
|
3407
|
+
(d(), A(be((a = _.value) == null ? void 0 : a.component), Le({
|
|
3408
3408
|
modelValue: e.value,
|
|
3409
3409
|
"onUpdate:modelValue": m[1] || (m[1] = (s) => e.value = s)
|
|
3410
3410
|
}, (u = _.value) == null ? void 0 : u.props), null, 16, ["modelValue"]))
|
|
@@ -3423,11 +3423,11 @@ const ln = [
|
|
|
3423
3423
|
},
|
|
3424
3424
|
emits: ["update:modelValue"],
|
|
3425
3425
|
setup(y) {
|
|
3426
|
-
const { t: o } = W(), e = X(y, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage:
|
|
3426
|
+
const { t: o } = W(), e = X(y, "modelValue"), n = fe(), w = we(), x = pe(), { promptLoader: _ } = ke(), { promptMessage: S } = Fe(), { restaurants: h } = ue(), r = E(
|
|
3427
3427
|
() => h.map((m) => ({ label: m.name, value: m.id }))
|
|
3428
3428
|
);
|
|
3429
3429
|
async function p() {
|
|
3430
|
-
await
|
|
3430
|
+
await S({
|
|
3431
3431
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
3432
3432
|
title: o("report.common.delete")
|
|
3433
3433
|
}) && await _(async () => {
|
|
@@ -3448,14 +3448,14 @@ const ln = [
|
|
|
3448
3448
|
});
|
|
3449
3449
|
}
|
|
3450
3450
|
function v(m, b) {
|
|
3451
|
-
var
|
|
3452
|
-
(l = (
|
|
3451
|
+
var C, l;
|
|
3452
|
+
(l = (C = e.value.platform) == null ? void 0 : C.mappings) != null && l[m] && (e.value.platform.mappings[m] = e.value.platform.mappings[m].filter(
|
|
3453
3453
|
(a, u) => u !== b
|
|
3454
3454
|
));
|
|
3455
3455
|
}
|
|
3456
3456
|
function g(m) {
|
|
3457
|
-
var b,
|
|
3458
|
-
(
|
|
3457
|
+
var b, C;
|
|
3458
|
+
(C = (b = e.value.platform) == null ? void 0 : b.mappings) != null && C[m] && (e.value.platform.mappings[m] = [
|
|
3459
3459
|
...e.value.platform.mappings[m],
|
|
3460
3460
|
{
|
|
3461
3461
|
key: "",
|
|
@@ -3475,15 +3475,15 @@ const ln = [
|
|
|
3475
3475
|
});
|
|
3476
3476
|
}
|
|
3477
3477
|
return (m, b) => {
|
|
3478
|
-
var
|
|
3479
|
-
const
|
|
3480
|
-
return (N = (
|
|
3478
|
+
var M, N, G, Y, J;
|
|
3479
|
+
const C = V("FmIcon"), l = V("FmButton"), a = V("FmMenuDivider"), u = V("FmTextField"), s = V("FmSelect");
|
|
3480
|
+
return (N = (M = e.value) == null ? void 0 : M.platform) != null && N.mappings ? (d(), D("div", un, [
|
|
3481
3481
|
t("div", fn, [
|
|
3482
3482
|
t("div", vn, [
|
|
3483
3483
|
b[4] || (b[4] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
3484
3484
|
t("div", gn, [
|
|
3485
3485
|
t("div", yn, [
|
|
3486
|
-
i(
|
|
3486
|
+
i(C, {
|
|
3487
3487
|
name: "refresh",
|
|
3488
3488
|
class: "p-2 bg-gray-100 rounded-full",
|
|
3489
3489
|
onClick: c
|
|
@@ -3542,7 +3542,7 @@ const ln = [
|
|
|
3542
3542
|
})
|
|
3543
3543
|
]),
|
|
3544
3544
|
t("div", Dn, [
|
|
3545
|
-
(d(!0), D(L, null, Q((J = (Y = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : Y.mappings) == null ? void 0 : J.employees, (O, j) => (d(),
|
|
3545
|
+
(d(!0), D(L, null, Q((J = (Y = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : Y.mappings) == null ? void 0 : J.employees, (O, j) => (d(), A(P, {
|
|
3546
3546
|
key: `employee-${j}`,
|
|
3547
3547
|
modelValue: e.value.platform.mappings.employees[j],
|
|
3548
3548
|
"onUpdate:modelValue": (z) => e.value.platform.mappings.employees[j] = z,
|
|
@@ -3596,9 +3596,9 @@ const ln = [
|
|
|
3596
3596
|
header: () => I("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
|
|
3597
3597
|
enableSorting: !1
|
|
3598
3598
|
}
|
|
3599
|
-
], w = X(y, "modelValue"), x = B(!1), _ = fe(), { dateRange:
|
|
3599
|
+
], w = X(y, "modelValue"), x = B(!1), _ = fe(), { dateRange: S } = De(ue());
|
|
3600
3600
|
ge(
|
|
3601
|
-
() =>
|
|
3601
|
+
() => S.value,
|
|
3602
3602
|
async () => {
|
|
3603
3603
|
if (w.value._id)
|
|
3604
3604
|
try {
|
|
@@ -3623,12 +3623,12 @@ const ln = [
|
|
|
3623
3623
|
}
|
|
3624
3624
|
}
|
|
3625
3625
|
return (r, p) => {
|
|
3626
|
-
const k =
|
|
3626
|
+
const k = V("FmButton"), v = V("FmCircularProgress"), g = V("FmTable");
|
|
3627
3627
|
return d(), D("div", Tn, [
|
|
3628
3628
|
t("div", In, [
|
|
3629
3629
|
i(Ue, {
|
|
3630
|
-
"date-range": f(
|
|
3631
|
-
"onUpdate:dateRange": p[0] || (p[0] = (c) => he(
|
|
3630
|
+
"date-range": f(S),
|
|
3631
|
+
"onUpdate:dateRange": p[0] || (p[0] = (c) => he(S) ? S.value = c : null),
|
|
3632
3632
|
compare: !1
|
|
3633
3633
|
}, null, 8, ["date-range"]),
|
|
3634
3634
|
i(k, {
|
|
@@ -3641,7 +3641,7 @@ const ln = [
|
|
|
3641
3641
|
x.value ? (d(), D("div", Mn, [
|
|
3642
3642
|
i(v, { size: "xl" }),
|
|
3643
3643
|
t("span", Kn, T(f(o)("report.common.loading")), 1)
|
|
3644
|
-
])) : e.value.length > 0 ? (d(),
|
|
3644
|
+
])) : e.value.length > 0 ? (d(), A(g, {
|
|
3645
3645
|
key: 1,
|
|
3646
3646
|
class: "flex overflow-scroll",
|
|
3647
3647
|
"row-data": e.value,
|
|
@@ -3679,9 +3679,9 @@ const ln = [
|
|
|
3679
3679
|
return null;
|
|
3680
3680
|
}
|
|
3681
3681
|
});
|
|
3682
|
-
return (
|
|
3682
|
+
return (S, h) => {
|
|
3683
3683
|
var k;
|
|
3684
|
-
const r =
|
|
3684
|
+
const r = V("FmPageHead"), p = V("FmTabs");
|
|
3685
3685
|
return d(), D("div", Pn, [
|
|
3686
3686
|
i(r, {
|
|
3687
3687
|
title: ((k = e.value) == null ? void 0 : k.name) || "AutoCount",
|
|
@@ -3700,7 +3700,7 @@ const ln = [
|
|
|
3700
3700
|
items: w
|
|
3701
3701
|
}, null, 8, ["model-value"]),
|
|
3702
3702
|
t("div", Nn, [
|
|
3703
|
-
(d(),
|
|
3703
|
+
(d(), A(be(_.value), {
|
|
3704
3704
|
modelValue: e.value,
|
|
3705
3705
|
"onUpdate:modelValue": h[1] || (h[1] = (v) => e.value = v)
|
|
3706
3706
|
}, null, 8, ["modelValue"]))
|
|
@@ -3718,8 +3718,8 @@ const ln = [
|
|
|
3718
3718
|
() => n.settings,
|
|
3719
3719
|
(_) => {
|
|
3720
3720
|
var h;
|
|
3721
|
-
const
|
|
3722
|
-
|
|
3721
|
+
const S = _.find((r) => r._id === e.id);
|
|
3722
|
+
S && (w.value = S, o.value = (h = w.value.platform) == null ? void 0 : h.name);
|
|
3723
3723
|
},
|
|
3724
3724
|
{ immediate: !0 }
|
|
3725
3725
|
);
|
|
@@ -3741,10 +3741,10 @@ const ln = [
|
|
|
3741
3741
|
return null;
|
|
3742
3742
|
}
|
|
3743
3743
|
});
|
|
3744
|
-
return (_,
|
|
3745
|
-
(d(),
|
|
3744
|
+
return (_, S) => (d(), D("div", On, [
|
|
3745
|
+
(d(), A(be(x.value), {
|
|
3746
3746
|
modelValue: w.value,
|
|
3747
|
-
"onUpdate:modelValue":
|
|
3747
|
+
"onUpdate:modelValue": S[0] || (S[0] = (h) => w.value = h)
|
|
3748
3748
|
}, null, 8, ["modelValue"]))
|
|
3749
3749
|
]));
|
|
3750
3750
|
}
|