@feedmepos/mf-report 5.25.3 → 5.25.4
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-CnFZJmzp.js → App-zRHXHcPT.js} +4 -4
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-RUTqJF5H.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-BVdgmiki.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-CcMbnaoi.js → Default.vue_vue_type_script_setup_true_lang-By3S17dA.js} +1 -1
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-nqE6iEkZ.js +4939 -0
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BY_KN_C1.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CeERNo7f.js} +2 -2
- package/dist/{InsightView-DKrfAidQ.js → InsightView-BBhWazOR.js} +4 -4
- package/dist/{Integration-BNW5e7Qk.js → Integration-DwrH45Cv.js} +254 -254
- package/dist/{Integrations-DItxcgrC.js → Integrations-B2oXCMtI.js} +2 -2
- package/dist/{Layout-GLIcaoCe.js → Layout-8K-hl0GX.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-pOrfpYWl.js → MenuTab.vue_vue_type_script_setup_true_lang-Bk13wM8J.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CBAiRY5H.js → NavigationTab.vue_vue_type_script_setup_true_lang-DJQmFNyV.js} +6 -6
- package/dist/{OverviewView-V-17Kj3C.js → OverviewView-VK-QiYBv.js} +4 -4
- package/dist/{Report-Cawu6GrR.js → Report-DjEakQjd.js} +3 -3
- package/dist/{ReportEditor-ChZgxHxU.js → ReportEditor-DkDpoEA1.js} +3 -3
- package/dist/{ReportView-Dfb_owW8.js → ReportView-D7pPDt9i.js} +6 -6
- package/dist/{Setting-bPYUv_iE.js → Setting-Cj8FNkcg.js} +3 -3
- package/dist/{TileEditor-CZ_n5OKa.js → TileEditor-DiIeHLZ2.js} +1351 -1317
- package/dist/{TransitionFade-DCyLVIwo.js → TransitionFade-D3p2nUld.js} +4 -4
- package/dist/{app-AKUT_6m_.js → app-t7VSpu_w.js} +102 -54
- package/dist/app.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-251v8GZD.js → useRestaurantPermission-ClMBdaFt.js} +1 -1
- package/package.json +1 -1
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-COXEyuoF.js +0 -4689
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as oe, mergeModels as ue, useModel as se, computed as B, resolveComponent as F, createElementBlock as U, openBlock as b, createElementVNode as t, createCommentVNode as O, normalizeClass as Qe, Fragment as
|
|
1
|
+
import { defineComponent as oe, mergeModels as ue, useModel as se, computed as B, resolveComponent as F, createElementBlock as U, openBlock as b, createElementVNode as t, createCommentVNode as O, normalizeClass as Qe, Fragment as Ve, createBlock as E, withCtx as $e, toDisplayString as $, renderList as je, createVNode as l, unref as m, h as S, normalizeStyle as it, createTextVNode as dt, ref as X, onUnmounted as Ee, watch as Fe, isRef as Ne, resolveDynamicComponent as Pe, mergeProps as et, onMounted as lt } from "vue";
|
|
2
2
|
import { useRouter as ke, useRoute as mt } from "vue-router";
|
|
3
|
-
import {
|
|
3
|
+
import { A as he, y as Ze, d as Ie, z as ut, e as Te, a as Ae, B as _e, E as pt, k as ct, v as Z, x as Oe, G as Be, H as Ue, J as Ye, K as tt, L as ft, M as gt, N as vt, O as ot, b as nt, P as yt, Q as xt, l as bt, I as Re, R as wt, S as ht, T as _t } from "./app-t7VSpu_w.js";
|
|
4
4
|
import { u as re, a as qe } from "./vue-i18n-DVWuTfed.js";
|
|
5
5
|
import { u as ze } from "./message-dialog-UoMWOnil.js";
|
|
6
6
|
import { useSnackbar as Se } from "@feedmepos/ui-library";
|
|
7
|
-
import { s as st, _ as He } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as Le, h as Ce } from "./useRestaurantPermission-
|
|
7
|
+
import { s as st, _ as He } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BVdgmiki.js";
|
|
8
|
+
import { u as Le, h as Ce } from "./useRestaurantPermission-ClMBdaFt.js";
|
|
9
9
|
import { storeToRefs as Ge } from "pinia";
|
|
10
|
-
const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, kt = { class: "w-[100%]" }, $t = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, At = { class: "w-[100%] flex flex-row gap-[4px]" }, St = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" },
|
|
10
|
+
const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-between" }, kt = { class: "w-[100%]" }, $t = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, At = { class: "w-[100%] flex flex-row gap-[4px]" }, St = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, Dt = { class: "text-nowrap w-[100%] overflow-hidden text-ellipsis font-semibold" }, Vt = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "w-[24px] flex items-center"
|
|
13
13
|
}, Q = /* @__PURE__ */ oe({
|
|
@@ -41,30 +41,30 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
41
41
|
setup(f, { emit: a }) {
|
|
42
42
|
const e = se(f, "modelValue"), u = f, v = B(
|
|
43
43
|
() => Object.keys(u.options).map((I) => {
|
|
44
|
-
const
|
|
44
|
+
const D = u.options[I];
|
|
45
45
|
return {
|
|
46
|
-
placeholder:
|
|
46
|
+
placeholder: D.placeholder,
|
|
47
47
|
key: I,
|
|
48
|
-
editable:
|
|
48
|
+
editable: D.editable
|
|
49
49
|
};
|
|
50
50
|
})
|
|
51
51
|
);
|
|
52
|
-
function K(I,
|
|
53
|
-
let c =
|
|
54
|
-
u.type === "number" && (c = Number(
|
|
52
|
+
function K(I, D) {
|
|
53
|
+
let c = D;
|
|
54
|
+
u.type === "number" && (c = Number(D)), e.value = {
|
|
55
55
|
...e.value,
|
|
56
56
|
[I]: c
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
const
|
|
60
|
-
return (I,
|
|
59
|
+
const V = a;
|
|
60
|
+
return (I, D) => {
|
|
61
61
|
var R;
|
|
62
62
|
const c = F("FmTextField"), g = F("FmTooltip"), A = F("FmIcon");
|
|
63
63
|
return b(), U("div", Ct, [
|
|
64
64
|
t("div", {
|
|
65
65
|
class: Qe(`${f.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-col items-start gap-[4px]`)
|
|
66
66
|
}, [
|
|
67
|
-
v.value.length === 3 && !v.value.every((w) => w.editable) ? (b(), U(
|
|
67
|
+
v.value.length === 3 && !v.value.every((w) => w.editable) ? (b(), U(Ve, { key: 0 }, [
|
|
68
68
|
t("div", kt, [
|
|
69
69
|
v.value[0].editable ? (b(), E(c, {
|
|
70
70
|
key: 0,
|
|
@@ -72,7 +72,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
72
72
|
placeholder: v.value[0].placeholder,
|
|
73
73
|
type: f.type,
|
|
74
74
|
rules: f.rules,
|
|
75
|
-
"onUpdate:modelValue":
|
|
75
|
+
"onUpdate:modelValue": D[0] || (D[0] = (w) => K(v.value[0].key, w))
|
|
76
76
|
}, null, 8, ["model-value", "placeholder", "type", "rules"])) : (b(), E(g, {
|
|
77
77
|
key: 1,
|
|
78
78
|
content: (R = e.value[v.value[0].key]) == null ? void 0 : R.toString(),
|
|
@@ -85,7 +85,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
85
85
|
}, 8, ["content"]))
|
|
86
86
|
]),
|
|
87
87
|
t("div", At, [
|
|
88
|
-
(b(!0), U(
|
|
88
|
+
(b(!0), U(Ve, null, je(v.value.slice(1), (w) => {
|
|
89
89
|
var y;
|
|
90
90
|
return b(), U("div", {
|
|
91
91
|
key: w.key,
|
|
@@ -115,9 +115,9 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
115
115
|
key: 1,
|
|
116
116
|
class: Qe(`${f.removable || !f.isTakeWholeRow ? "flex-row" : "flex-col"} flex items-start gap-[4px] w-[100%]`)
|
|
117
117
|
}, [
|
|
118
|
-
(b(!0), U(
|
|
118
|
+
(b(!0), U(Ve, null, je(v.value, (w) => {
|
|
119
119
|
var y;
|
|
120
|
-
return b(), U(
|
|
120
|
+
return b(), U(Ve, {
|
|
121
121
|
key: w.key
|
|
122
122
|
}, [
|
|
123
123
|
w.editable ? (b(), U("div", {
|
|
@@ -137,7 +137,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
137
137
|
class: "w-[50%]"
|
|
138
138
|
}, {
|
|
139
139
|
default: $e(() => [
|
|
140
|
-
t("div",
|
|
140
|
+
t("div", Dt, $(e.value[w.key]), 1)
|
|
141
141
|
]),
|
|
142
142
|
_: 2
|
|
143
143
|
}, 1032, ["content"]))
|
|
@@ -145,12 +145,12 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
145
145
|
}), 128))
|
|
146
146
|
], 2))
|
|
147
147
|
], 2),
|
|
148
|
-
f.removable ? (b(), U("div",
|
|
148
|
+
f.removable ? (b(), U("div", Vt, [
|
|
149
149
|
l(A, {
|
|
150
150
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
151
151
|
name: "delete",
|
|
152
152
|
size: "md",
|
|
153
|
-
onClick:
|
|
153
|
+
onClick: D[1] || (D[1] = (w) => V("remove"))
|
|
154
154
|
})
|
|
155
155
|
])) : O("", !0)
|
|
156
156
|
]);
|
|
@@ -218,7 +218,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
218
218
|
{ label: a("report.integration.schedule.daily"), value: he.Day },
|
|
219
219
|
{ label: a("report.integration.schedule.weekly"), value: he.Week },
|
|
220
220
|
{ label: a("report.integration.schedule.monthly"), value: he.Month }
|
|
221
|
-
]),
|
|
221
|
+
]), V = B(() => [
|
|
222
222
|
{
|
|
223
223
|
label: a("report.integration.schedule.firstDayOfMonth"),
|
|
224
224
|
value: Ze.FirstDay
|
|
@@ -251,7 +251,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
251
251
|
type: he.Day
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
-
}),
|
|
254
|
+
}), D = B({
|
|
255
255
|
get: () => {
|
|
256
256
|
var d;
|
|
257
257
|
return ((d = e.value.autoEmailSchedule) == null ? void 0 : d.type) === he.Week ? e.value.autoEmailSchedule.days[0] ?? 1 : 1;
|
|
@@ -375,7 +375,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
375
375
|
return (d, s) => {
|
|
376
376
|
var L, W, te, ae;
|
|
377
377
|
const x = F("FmBadge"), n = F("FmTable"), o = F("FmSideSheet"), h = F("FmSwitch"), r = F("FmTextField"), p = F("FmTabs"), T = F("FmSelect"), M = F("FmTimePicker");
|
|
378
|
-
return b(), U(
|
|
378
|
+
return b(), U(Ve, null, [
|
|
379
379
|
t("div", Ft, [
|
|
380
380
|
t("div", Kt, $(m(a)("report.integration.auto", { label: f.label })), 1),
|
|
381
381
|
t("div", It, [
|
|
@@ -457,17 +457,17 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
457
457
|
I.value === m(he).Week ? (b(), U("div", Xt, [
|
|
458
458
|
t("div", Wt, $(m(a)("report.integration.schedule.weekday")), 1),
|
|
459
459
|
l(T, {
|
|
460
|
-
"model-value":
|
|
460
|
+
"model-value": D.value,
|
|
461
461
|
items: v.value,
|
|
462
462
|
multiselect: !1,
|
|
463
|
-
"onUpdate:modelValue": s[3] || (s[3] = (H) =>
|
|
463
|
+
"onUpdate:modelValue": s[3] || (s[3] = (H) => D.value = H)
|
|
464
464
|
}, null, 8, ["model-value", "items"])
|
|
465
465
|
])) : O("", !0),
|
|
466
466
|
I.value === m(he).Month ? (b(), U("div", Jt, [
|
|
467
467
|
t("div", Zt, $(m(a)("report.integration.schedule.monthlyOption")), 1),
|
|
468
468
|
l(T, {
|
|
469
469
|
"model-value": c.value,
|
|
470
|
-
items:
|
|
470
|
+
items: V.value,
|
|
471
471
|
multiselect: !1,
|
|
472
472
|
"onUpdate:modelValue": s[4] || (s[4] = (H) => c.value = H)
|
|
473
473
|
}, null, 8, ["model-value", "items"]),
|
|
@@ -584,10 +584,10 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
584
584
|
...e.value,
|
|
585
585
|
[g]: u.type === "number" ? Number(c) : c
|
|
586
586
|
});
|
|
587
|
-
},
|
|
587
|
+
}, V = (c) => {
|
|
588
588
|
var g;
|
|
589
589
|
return u.singleValueMode ? u.options.key.placeholder : (g = e.value[c.key]) == null ? void 0 : g.toString();
|
|
590
|
-
}, I = (c) => u.singleValueMode ? e.value : e.value[c.key],
|
|
590
|
+
}, I = (c) => u.singleValueMode ? e.value : e.value[c.key], D = a;
|
|
591
591
|
return (c, g) => {
|
|
592
592
|
const A = F("FmSelect"), R = F("FmTextField"), w = F("FmTooltip"), y = F("FmIcon");
|
|
593
593
|
return b(), U("div", mo, [
|
|
@@ -595,7 +595,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
595
595
|
class: Qe(`${f.removable ? "w-[calc(100%-24px)] flex-row" : "w-[100%] flex-col"} flex items-center gap-[4px]`),
|
|
596
596
|
style: { alignItems: "start" }
|
|
597
597
|
}, [
|
|
598
|
-
(b(!0), U(
|
|
598
|
+
(b(!0), U(Ve, null, je(v.value, (i) => (b(), U(Ve, {
|
|
599
599
|
key: i.key
|
|
600
600
|
}, [
|
|
601
601
|
i.editable ? (b(), U("div", {
|
|
@@ -621,11 +621,11 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
621
621
|
}, null, 8, ["model-value", "placeholder", "type", "rules", "onUpdate:modelValue"]))
|
|
622
622
|
], 2)) : (b(), E(w, {
|
|
623
623
|
key: 1,
|
|
624
|
-
content:
|
|
624
|
+
content: V(i),
|
|
625
625
|
class: "w-[50%]"
|
|
626
626
|
}, {
|
|
627
627
|
default: $e(() => [
|
|
628
|
-
t("div", uo, $(
|
|
628
|
+
t("div", uo, $(V(i)), 1)
|
|
629
629
|
]),
|
|
630
630
|
_: 2
|
|
631
631
|
}, 1032, ["content"]))
|
|
@@ -636,7 +636,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
636
636
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
637
637
|
name: "delete",
|
|
638
638
|
size: "md",
|
|
639
|
-
onClick: g[0] || (g[0] = (i) =>
|
|
639
|
+
onClick: g[0] || (g[0] = (i) => D("remove"))
|
|
640
640
|
})
|
|
641
641
|
])) : O("", !0)
|
|
642
642
|
]);
|
|
@@ -658,9 +658,9 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
658
658
|
emits: ["remove", "update:rows"],
|
|
659
659
|
setup(f, { emit: a }) {
|
|
660
660
|
const e = f, u = B(() => e.rows.length > 1 ? Math.min(e.rows.length, e.columnsPerRow) : 1), v = a;
|
|
661
|
-
return (K,
|
|
662
|
-
(b(!0), U(
|
|
663
|
-
key:
|
|
661
|
+
return (K, V) => (b(), U("div", co, [
|
|
662
|
+
(b(!0), U(Ve, null, je(e.rows, (I, D) => (b(), U("div", {
|
|
663
|
+
key: D,
|
|
664
664
|
class: "flex flex-col",
|
|
665
665
|
style: it(
|
|
666
666
|
e.columnsPerRow > 1 ? { width: `${99 / e.columnsPerRow}%` } : { width: "100%" }
|
|
@@ -668,41 +668,41 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
668
668
|
}, [
|
|
669
669
|
t("div", {
|
|
670
670
|
class: Qe([
|
|
671
|
-
|
|
671
|
+
D < u.value ? "p-3 bg-gray-100 border-b-4" : "",
|
|
672
672
|
"flex flex-row items-center w-full font-medium text-gray-600 mb-2"
|
|
673
673
|
])
|
|
674
674
|
}, [
|
|
675
|
-
(b(!0), U(
|
|
675
|
+
(b(!0), U(Ve, null, je(e.headerItems, (c, g) => (b(), U("div", {
|
|
676
676
|
key: `header-item-${g}`,
|
|
677
677
|
class: "w-[50%]"
|
|
678
678
|
}, [
|
|
679
|
-
|
|
679
|
+
D < u.value ? (b(), U(Ve, { key: 0 }, [
|
|
680
680
|
dt($(c), 1)
|
|
681
681
|
], 64)) : O("", !0)
|
|
682
682
|
]))), 128)),
|
|
683
683
|
K.removable ? (b(), U("div", fo)) : O("", !0)
|
|
684
684
|
], 2),
|
|
685
685
|
!e.fieldsOptions || !Object.values(e.fieldsOptions).some((c) => c.dropdownOptions) ? (b(), E(Q, {
|
|
686
|
-
key: `item-${
|
|
687
|
-
"model-value": e.rows[
|
|
686
|
+
key: `item-${D}`,
|
|
687
|
+
"model-value": e.rows[D],
|
|
688
688
|
options: e.fieldsOptions || {},
|
|
689
689
|
"is-take-whole-row": !1,
|
|
690
690
|
removable: e.removable,
|
|
691
691
|
"onUpdate:modelValue": (c) => {
|
|
692
692
|
const g = [...e.rows];
|
|
693
|
-
g[
|
|
693
|
+
g[D] = c, v("update:rows", g);
|
|
694
694
|
},
|
|
695
|
-
onRemove: () => v("remove", e.mappingType || "",
|
|
695
|
+
onRemove: () => v("remove", e.mappingType || "", D)
|
|
696
696
|
}, null, 8, ["model-value", "options", "removable", "onUpdate:modelValue", "onRemove"])) : (b(), E(rt, {
|
|
697
697
|
key: 1,
|
|
698
|
-
"model-value": e.rows[
|
|
698
|
+
"model-value": e.rows[D],
|
|
699
699
|
options: e.fieldsOptions || {},
|
|
700
700
|
removable: e.removable,
|
|
701
701
|
"onUpdate:modelValue": (c) => {
|
|
702
702
|
const g = [...e.rows];
|
|
703
|
-
g[
|
|
703
|
+
g[D] = c, v("update:rows", g);
|
|
704
704
|
},
|
|
705
|
-
onRemove: () => v("remove", e.mappingType || "",
|
|
705
|
+
onRemove: () => v("remove", e.mappingType || "", D)
|
|
706
706
|
}, null, 8, ["model-value", "options", "removable", "onUpdate:modelValue", "onRemove"]))
|
|
707
707
|
], 4))), 128))
|
|
708
708
|
]));
|
|
@@ -710,7 +710,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
710
710
|
}), go = {
|
|
711
711
|
key: 0,
|
|
712
712
|
class: "flex flex-col h-full"
|
|
713
|
-
}, vo = { class: "flex flex-col gap-[16px] pb-[24px]" }, yo = { class: "flex flex-row justify-between items-center gap-2" }, xo = { class: "flex flex-row gap-2 items-center" }, bo = { class: "relative group cursor-pointer" }, wo = { class: "flex flex-col gap-16 pt-[24px] overflow-scroll" }, ho = { class: "w-[90%] flex flex-col gap-24" }, _o = { class: "flex flex-row items-center justify-between gap-2" }, Co = { class: "w-[25%]" }, ko = { class: "flex flex-col gap-[16px]" }, $o = { class: "flex flex-col max-w-[100%] justify-between" }, Ao = { class: "flex-grow" }, So = { class: "flex flex-col max-w-[100%] justify-between" },
|
|
713
|
+
}, vo = { class: "flex flex-col gap-[16px] pb-[24px]" }, yo = { class: "flex flex-row justify-between items-center gap-2" }, xo = { class: "flex flex-row gap-2 items-center" }, bo = { class: "relative group cursor-pointer" }, wo = { class: "flex flex-col gap-16 pt-[24px] overflow-scroll" }, ho = { class: "w-[90%] flex flex-col gap-24" }, _o = { class: "flex flex-row items-center justify-between gap-2" }, Co = { class: "w-[25%]" }, ko = { class: "flex flex-col gap-[16px]" }, $o = { class: "flex flex-col max-w-[100%] justify-between" }, Ao = { class: "flex-grow" }, So = { class: "flex flex-col max-w-[100%] justify-between" }, Do = { class: "flex flex-col max-w-[100%] justify-between" }, Vo = { class: "w-[25%] font-semibold" }, Fo = { class: "flex flex-col gap-[16px]" }, Ko = { class: "flex flex-col max-w-[100%] justify-between" }, Io = { class: "flex-grow" }, Mo = { class: "flex flex-row items-center max-w-[100%] justify-between" }, To = { class: "flex-grow" }, Ro = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Uo = { class: "flex-grow" }, No = { class: "flex flex-col gap-[16px]" }, Po = { class: "flex flex-row items-center justify-between gap-x-16" }, Lo = {
|
|
714
714
|
key: 0,
|
|
715
715
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
716
716
|
}, jo = { class: "flex flex-row items-center justify-between gap-x-16" }, Eo = {
|
|
@@ -747,8 +747,8 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
747
747
|
}),
|
|
748
748
|
emits: ["update:modelValue"],
|
|
749
749
|
setup(f) {
|
|
750
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader:
|
|
751
|
-
() =>
|
|
750
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader: V } = qe(), { promptMessage: I } = ze(), { restaurants: D } = Ae(), { rules: c, notifyUnauthorized: g } = Le(), A = X(!1), R = B(
|
|
751
|
+
() => D.map((h) => ({ label: h.name, value: h.id }))
|
|
752
752
|
), w = B(() => {
|
|
753
753
|
var h, r;
|
|
754
754
|
return A.value ? "Connecting" : (r = (h = e.value) == null ? void 0 : h.platform) != null && r.accessToken ? "Disconnect" : "Connect";
|
|
@@ -796,7 +796,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
796
796
|
await I({
|
|
797
797
|
message: `Confirm delete ${e.value.name}?`,
|
|
798
798
|
title: "Delete"
|
|
799
|
-
}) && await
|
|
799
|
+
}) && await V(async () => {
|
|
800
800
|
try {
|
|
801
801
|
await Oe(e.value._id), await v.getSettings(), K.back();
|
|
802
802
|
} catch (M) {
|
|
@@ -815,7 +815,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
815
815
|
g(Z.update);
|
|
816
816
|
return;
|
|
817
817
|
}
|
|
818
|
-
await
|
|
818
|
+
await V(async () => {
|
|
819
819
|
try {
|
|
820
820
|
await Be(e.value._id, e.value), await v.getSettings();
|
|
821
821
|
} catch (T) {
|
|
@@ -851,7 +851,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
851
851
|
]);
|
|
852
852
|
}
|
|
853
853
|
async function n() {
|
|
854
|
-
await
|
|
854
|
+
await V(async () => {
|
|
855
855
|
try {
|
|
856
856
|
await Ue(e.value._id), await v.getSettings();
|
|
857
857
|
} catch (h) {
|
|
@@ -876,7 +876,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
876
876
|
return Ee(async () => {
|
|
877
877
|
await v.getSettings();
|
|
878
878
|
}), (h, r) => {
|
|
879
|
-
var H, de, pe, ce, fe, ge, ve, ye, xe, be, we, J, q, P, C, N, z, Ke, j, ie,
|
|
879
|
+
var H, de, pe, ce, fe, ge, ve, ye, xe, be, we, J, q, P, C, N, z, Ke, j, ie, De, We, Je, Y, G, le;
|
|
880
880
|
const p = F("FmIcon"), T = F("FmButton"), M = F("FmMenuDivider"), L = F("FmCircularProgress"), W = F("FmSelect"), te = F("FmTextField"), ae = F("FmSwitch");
|
|
881
881
|
return (de = (H = e.value) == null ? void 0 : H.platform) != null && de.mappings ? (b(), U("div", go, [
|
|
882
882
|
t("div", vo, [
|
|
@@ -953,8 +953,8 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
953
953
|
class: "flex-grow"
|
|
954
954
|
}, null, 8, ["modelValue", "items"])
|
|
955
955
|
]),
|
|
956
|
-
t("div",
|
|
957
|
-
t("div",
|
|
956
|
+
t("div", Do, [
|
|
957
|
+
t("div", Vo, $(m(a)("report.integration.grouping.title")), 1),
|
|
958
958
|
l(W, {
|
|
959
959
|
modelValue: e.value.platform.grouping,
|
|
960
960
|
"onUpdate:modelValue": r[2] || (r[2] = (ne) => e.value.platform.grouping = ne),
|
|
@@ -1104,7 +1104,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1104
1104
|
((Ke = f.accountCodeOptions.data) == null ? void 0 : Ke.length) > 0 ? (b(), E(ee, {
|
|
1105
1105
|
key: 8,
|
|
1106
1106
|
"header-items": ["FeedMe Key", "Account Code"],
|
|
1107
|
-
rows: ((
|
|
1107
|
+
rows: ((De = (ie = (j = e.value) == null ? void 0 : j.platform) == null ? void 0 : ie.mappings) == null ? void 0 : De.items) || [],
|
|
1108
1108
|
"columns-per-row": 2,
|
|
1109
1109
|
removable: !0,
|
|
1110
1110
|
"mapping-type": "items",
|
|
@@ -1282,17 +1282,17 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1282
1282
|
header: "Payment Amount",
|
|
1283
1283
|
enableSorting: !1
|
|
1284
1284
|
}
|
|
1285
|
-
], K = se(f, "modelValue"),
|
|
1285
|
+
], K = se(f, "modelValue"), V = X(!1), I = Se(), { dateRange: D } = Ge(Ae());
|
|
1286
1286
|
Fe(
|
|
1287
|
-
() =>
|
|
1287
|
+
() => D.value,
|
|
1288
1288
|
async () => {
|
|
1289
1289
|
if (K.value._id)
|
|
1290
1290
|
try {
|
|
1291
|
-
|
|
1291
|
+
V.value = !0, a.value = await Ye(K.value._id);
|
|
1292
1292
|
} catch (g) {
|
|
1293
1293
|
I.open({ message: g.message, type: "error" });
|
|
1294
1294
|
} finally {
|
|
1295
|
-
|
|
1295
|
+
V.value = !1;
|
|
1296
1296
|
}
|
|
1297
1297
|
},
|
|
1298
1298
|
{
|
|
@@ -1301,11 +1301,11 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1301
1301
|
);
|
|
1302
1302
|
async function c() {
|
|
1303
1303
|
try {
|
|
1304
|
-
K.value._id ? (
|
|
1304
|
+
K.value._id ? (V.value = !0, await tt(K.value._id), I.open({ message: "Upload successful", type: "success" })) : I.open({ message: "Invalid accounting setting", type: "error" });
|
|
1305
1305
|
} catch (g) {
|
|
1306
1306
|
g.message && I.open({ message: g.message, type: "error" }), Array.isArray(g.errors) ? g.errors.forEach((A) => I.open({ message: String(A), type: "error" })) : typeof g.errors == "string" && I.open({ message: g.errors, type: "error" });
|
|
1307
1307
|
} finally {
|
|
1308
|
-
|
|
1308
|
+
V.value = !1;
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
1311
|
return (g, A) => {
|
|
@@ -1313,18 +1313,18 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1313
1313
|
return b(), U("div", Ho, [
|
|
1314
1314
|
t("div", Go, [
|
|
1315
1315
|
l(He, {
|
|
1316
|
-
"date-range": m(
|
|
1317
|
-
"onUpdate:dateRange": A[0] || (A[0] = (i) => Ne(
|
|
1316
|
+
"date-range": m(D),
|
|
1317
|
+
"onUpdate:dateRange": A[0] || (A[0] = (i) => Ne(D) ? D.value = i : null),
|
|
1318
1318
|
compare: !1
|
|
1319
1319
|
}, null, 8, ["date-range"]),
|
|
1320
1320
|
l(R, {
|
|
1321
|
-
loading:
|
|
1321
|
+
loading: V.value,
|
|
1322
1322
|
variant: "primary",
|
|
1323
1323
|
label: "Upload",
|
|
1324
1324
|
onClick: c
|
|
1325
1325
|
}, null, 8, ["loading"])
|
|
1326
1326
|
]),
|
|
1327
|
-
|
|
1327
|
+
V.value ? (b(), U("div", Qo, [
|
|
1328
1328
|
l(w, { size: "xl" }),
|
|
1329
1329
|
t("span", Xo, $(m(e)("report.common.isLoading")), 1)
|
|
1330
1330
|
])) : u.value.length > 0 ? (b(), E(y, {
|
|
@@ -1346,7 +1346,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1346
1346
|
}),
|
|
1347
1347
|
emits: ["update:modelValue"],
|
|
1348
1348
|
setup(f) {
|
|
1349
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = f, v = X("setting"), K = X({}),
|
|
1349
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = f, v = X("setting"), K = X({}), V = X({}), I = X({}), D = [
|
|
1350
1350
|
{
|
|
1351
1351
|
label: a("report.integration.setting"),
|
|
1352
1352
|
value: "setting",
|
|
@@ -1366,7 +1366,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1366
1366
|
component: zo,
|
|
1367
1367
|
props: {
|
|
1368
1368
|
tenantOptions: K.value,
|
|
1369
|
-
taxOptions:
|
|
1369
|
+
taxOptions: V.value,
|
|
1370
1370
|
accountCodeOptions: I.value,
|
|
1371
1371
|
errorLogs: u.errorLogs
|
|
1372
1372
|
}
|
|
@@ -1393,14 +1393,14 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1393
1393
|
if (e.value._id)
|
|
1394
1394
|
try {
|
|
1395
1395
|
const y = await gt(e.value._id);
|
|
1396
|
-
|
|
1396
|
+
V.value.data = y.map((i) => ({
|
|
1397
1397
|
value: i.Name,
|
|
1398
1398
|
label: `${i.Name} - (${i.EffectiveRate}%)`
|
|
1399
1399
|
}));
|
|
1400
1400
|
} catch (y) {
|
|
1401
|
-
console.error("Failed to fetch taxes:", y),
|
|
1401
|
+
console.error("Failed to fetch taxes:", y), V.value.isError = !0;
|
|
1402
1402
|
} finally {
|
|
1403
|
-
|
|
1403
|
+
V.value.isLoaded = !0;
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
1406
|
async function w() {
|
|
@@ -1445,7 +1445,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1445
1445
|
l(k, {
|
|
1446
1446
|
"model-value": v.value,
|
|
1447
1447
|
"onUpdate:modelValue": i[1] || (i[1] = (n) => v.value = n),
|
|
1448
|
-
items:
|
|
1448
|
+
items: D
|
|
1449
1449
|
}, null, 8, ["model-value"]),
|
|
1450
1450
|
t("div", Zo, [
|
|
1451
1451
|
(b(), E(Pe((s = g.value) == null ? void 0 : s.component), et({
|
|
@@ -1531,14 +1531,14 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1531
1531
|
}
|
|
1532
1532
|
];
|
|
1533
1533
|
return (v, K) => {
|
|
1534
|
-
const
|
|
1535
|
-
return b(), E(
|
|
1534
|
+
const V = F("FmIcon"), I = F("FmTable"), D = F("FmSideSheet");
|
|
1535
|
+
return b(), E(D, {
|
|
1536
1536
|
header: m(a)("report.integration.refNumFormatInfo"),
|
|
1537
1537
|
"dismiss-away": "",
|
|
1538
1538
|
"max-width": 780
|
|
1539
1539
|
}, {
|
|
1540
1540
|
"side-sheet-button": $e(() => [
|
|
1541
|
-
l(
|
|
1541
|
+
l(V, {
|
|
1542
1542
|
name: "info",
|
|
1543
1543
|
color: "primary",
|
|
1544
1544
|
class: "cursor-pointer p-2"
|
|
@@ -1567,7 +1567,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1567
1567
|
}), aa = {
|
|
1568
1568
|
key: 0,
|
|
1569
1569
|
class: "flex flex-col h-full"
|
|
1570
|
-
}, la = { class: "flex flex-col gap-16 pb-[24px]" }, na = { class: "flex flex-row justify-between items-center gap-2" }, sa = { class: "fm-typo-en-title-sm-800" }, ra = { class: "flex flex-row gap-2 items-center" }, ia = { class: "relative group cursor-pointer" }, da = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, ma = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ua = { class: "w-[90%] flex flex-col gap-24" }, pa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ca = { class: "flex flex-col justify-between" }, fa = { class: "w-[25%] font-semibold" }, ga = { class: "flex-grow" }, va = { class: "flex flex-col justify-between" }, ya = { class: "w-[25%] font-semibold" }, xa = { class: "flex-grow" }, ba = { class: "flex flex-col gap-16" }, wa = { class: "fm-typo-en-title-sm-800" }, ha = { class: "flex flex-col max-w-[100%]" }, _a = { class: "w-[25%] font-semibold" }, Ca = { class: "flex-grow" }, ka = { class: "flex flex-col max-w-[100%]" }, $a = { class: "w-[25%] font-semibold" }, Aa = { class: "flex flex-col max-w-[100%]" }, Sa = { class: "w-[25%] font-semibold" },
|
|
1570
|
+
}, la = { class: "flex flex-col gap-16 pb-[24px]" }, na = { class: "flex flex-row justify-between items-center gap-2" }, sa = { class: "fm-typo-en-title-sm-800" }, ra = { class: "flex flex-row gap-2 items-center" }, ia = { class: "relative group cursor-pointer" }, da = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, ma = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, ua = { class: "w-[90%] flex flex-col gap-24" }, pa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ca = { class: "flex flex-col justify-between" }, fa = { class: "w-[25%] font-semibold" }, ga = { class: "flex-grow" }, va = { class: "flex flex-col justify-between" }, ya = { class: "w-[25%] font-semibold" }, xa = { class: "flex-grow" }, ba = { class: "flex flex-col gap-16" }, wa = { class: "fm-typo-en-title-sm-800" }, ha = { class: "flex flex-col max-w-[100%]" }, _a = { class: "w-[25%] font-semibold" }, Ca = { class: "flex-grow" }, ka = { class: "flex flex-col max-w-[100%]" }, $a = { class: "w-[25%] font-semibold" }, Aa = { class: "flex flex-col max-w-[100%]" }, Sa = { class: "w-[25%] font-semibold" }, Da = { class: "flex flex-col max-w-[100%]" }, Va = { class: "flex flex-col gap-16" }, Fa = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ka = { class: "flex flex-col gap-16 pt-3 pb-3" }, Ia = { class: "flex flex-row items-center gap-5" }, Ma = { class: "fm-typo-en-title-sm-800" }, Ta = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ra = { class: "flex flex-row items-center justify-between gap-x-16" }, Ua = { class: "fm-typo-en-title-sm-800" }, Na = { class: "flex flex-row items-center justify-between gap-x-16" }, Pa = { class: "fm-typo-en-title-sm-800" }, La = { class: "flex flex-row items-center justify-between gap-x-16" }, ja = { class: "fm-typo-en-title-sm-800" }, Ea = { class: "flex flex-row items-center justify-between gap-x-16" }, Oa = { class: "fm-typo-en-title-sm-800" }, Ba = /* @__PURE__ */ oe({
|
|
1571
1571
|
__name: "Setting",
|
|
1572
1572
|
props: /* @__PURE__ */ ue({
|
|
1573
1573
|
errorLogs: {}
|
|
@@ -1577,7 +1577,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1577
1577
|
}),
|
|
1578
1578
|
emits: ["update:modelValue"],
|
|
1579
1579
|
setup(f) {
|
|
1580
|
-
const a = se(f, "modelValue"), e = Se(), u = Te(), v = ke(), { promptLoader: K } = qe(), { promptMessage:
|
|
1580
|
+
const a = se(f, "modelValue"), e = Se(), u = Te(), v = ke(), { promptLoader: K } = qe(), { promptMessage: V } = ze(), { restaurants: I } = Ae(), D = B(
|
|
1581
1581
|
() => I.map((n) => ({ label: n.name, value: n.id }))
|
|
1582
1582
|
), { t: c } = re(), { rules: g, notifyUnauthorized: A } = Le();
|
|
1583
1583
|
async function R() {
|
|
@@ -1591,7 +1591,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1591
1591
|
A(Z.delete);
|
|
1592
1592
|
return;
|
|
1593
1593
|
}
|
|
1594
|
-
await
|
|
1594
|
+
await V({
|
|
1595
1595
|
message: c("report.messages.confirmDelete", { name: a.value.name }),
|
|
1596
1596
|
title: c("report.common.delete")
|
|
1597
1597
|
}) && await K(async () => {
|
|
@@ -1792,7 +1792,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1792
1792
|
modelValue: a.value.platform.locationIds,
|
|
1793
1793
|
"onUpdate:modelValue": o[3] || (o[3] = (C) => a.value.platform.locationIds = C),
|
|
1794
1794
|
multiselect: !0,
|
|
1795
|
-
items:
|
|
1795
|
+
items: D.value,
|
|
1796
1796
|
placeholder: "Select location",
|
|
1797
1797
|
class: "flex-grow"
|
|
1798
1798
|
}, null, 8, ["modelValue", "items"])
|
|
@@ -1808,7 +1808,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1808
1808
|
class: "flex-grow"
|
|
1809
1809
|
}, null, 8, ["modelValue"])
|
|
1810
1810
|
]),
|
|
1811
|
-
t("div",
|
|
1811
|
+
t("div", Da, [
|
|
1812
1812
|
o[25] || (o[25] = t("div", { class: "w-[25%] font-semibold" }, $("MyInvois Action"), -1)),
|
|
1813
1813
|
l(M, {
|
|
1814
1814
|
modelValue: a.value.platform.mappings.myinvoisAction,
|
|
@@ -1820,7 +1820,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1820
1820
|
}, null, 8, ["modelValue"])
|
|
1821
1821
|
])
|
|
1822
1822
|
]),
|
|
1823
|
-
t("div",
|
|
1823
|
+
t("div", Va, [
|
|
1824
1824
|
t("div", Fa, [
|
|
1825
1825
|
l(Q, {
|
|
1826
1826
|
"model-value": {
|
|
@@ -1853,7 +1853,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1853
1853
|
(Ke = (z = (N = a.value) == null ? void 0 : N.platform) == null ? void 0 : z.mappings) != null && Ke.rounding && (a.value.platform.mappings.rounding.account = C.account);
|
|
1854
1854
|
})
|
|
1855
1855
|
}, null, 8, ["model-value", "options"]),
|
|
1856
|
-
(b(!0), U(
|
|
1856
|
+
(b(!0), U(Ve, null, je((H = (ae = (te = a.value) == null ? void 0 : te.platform) == null ? void 0 : ae.mappings) == null ? void 0 : H.charges, (C, N) => (b(), E(Q, {
|
|
1857
1857
|
key: `charge-${N}`,
|
|
1858
1858
|
modelValue: a.value.platform.mappings.charges[N],
|
|
1859
1859
|
"onUpdate:modelValue": (z) => a.value.platform.mappings.charges[N] = z,
|
|
@@ -2181,15 +2181,15 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2181
2181
|
header: "Payment Amount",
|
|
2182
2182
|
enableSorting: !1
|
|
2183
2183
|
}
|
|
2184
|
-
],
|
|
2184
|
+
], V = se(f, "modelValue"), I = X(!1), D = Se(), { dateRange: c } = Ge(Ae());
|
|
2185
2185
|
Fe(
|
|
2186
2186
|
() => c.value,
|
|
2187
2187
|
async () => {
|
|
2188
|
-
if (
|
|
2188
|
+
if (V.value._id)
|
|
2189
2189
|
try {
|
|
2190
|
-
I.value = !0, a.value = await Ye(
|
|
2190
|
+
I.value = !0, a.value = await Ye(V.value._id);
|
|
2191
2191
|
} catch (A) {
|
|
2192
|
-
|
|
2192
|
+
D.open({ message: A.message, type: "error" });
|
|
2193
2193
|
} finally {
|
|
2194
2194
|
I.value = !1;
|
|
2195
2195
|
}
|
|
@@ -2200,9 +2200,9 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2200
2200
|
);
|
|
2201
2201
|
async function g() {
|
|
2202
2202
|
try {
|
|
2203
|
-
|
|
2203
|
+
V.value._id ? (I.value = !0, await tt(V.value._id), D.open({ message: v("report.integration.uploadSuccess"), type: "success" })) : D.open({ message: v("report.integration.error.invalid"), type: "error" });
|
|
2204
2204
|
} catch (A) {
|
|
2205
|
-
A.message &&
|
|
2205
|
+
A.message && D.open({ message: A.message, type: "error" }), Array.isArray(A.errors) ? A.errors.forEach((R) => D.open({ message: String(R), type: "error" })) : typeof A.errors == "string" && D.open({ message: A.errors, type: "error" });
|
|
2206
2206
|
} finally {
|
|
2207
2207
|
I.value = !1;
|
|
2208
2208
|
}
|
|
@@ -2250,7 +2250,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2250
2250
|
set: (c) => {
|
|
2251
2251
|
e.value = c;
|
|
2252
2252
|
}
|
|
2253
|
-
}), K = X("setting"),
|
|
2253
|
+
}), K = X("setting"), V = [
|
|
2254
2254
|
{
|
|
2255
2255
|
label: a("report.integration.setting"),
|
|
2256
2256
|
value: "setting",
|
|
@@ -2261,7 +2261,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2261
2261
|
value: "preview",
|
|
2262
2262
|
icon: "table"
|
|
2263
2263
|
}
|
|
2264
|
-
], I = ke(),
|
|
2264
|
+
], I = ke(), D = B(() => {
|
|
2265
2265
|
switch (K.value) {
|
|
2266
2266
|
case "preview":
|
|
2267
2267
|
return {
|
|
@@ -2296,13 +2296,13 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2296
2296
|
l(R, {
|
|
2297
2297
|
"model-value": K.value,
|
|
2298
2298
|
"onUpdate:modelValue": g[1] || (g[1] = (i) => K.value = i),
|
|
2299
|
-
items:
|
|
2299
|
+
items: V
|
|
2300
2300
|
}, null, 8, ["model-value"]),
|
|
2301
2301
|
t("div", Xa, [
|
|
2302
|
-
(b(), E(Pe((w =
|
|
2302
|
+
(b(), E(Pe((w = D.value) == null ? void 0 : w.component), et({
|
|
2303
2303
|
modelValue: v.value,
|
|
2304
2304
|
"onUpdate:modelValue": g[2] || (g[2] = (i) => v.value = i)
|
|
2305
|
-
}, (y =
|
|
2305
|
+
}, (y = D.value) == null ? void 0 : y.props), null, 16, ["modelValue"]))
|
|
2306
2306
|
])
|
|
2307
2307
|
]);
|
|
2308
2308
|
};
|
|
@@ -2310,7 +2310,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2310
2310
|
}), Ja = {
|
|
2311
2311
|
key: 0,
|
|
2312
2312
|
class: "flex flex-col h-full"
|
|
2313
|
-
}, Za = { class: "flex flex-col gap-16 pb-[24px]" }, el = { class: "flex flex-row justify-between items-center gap-2" }, tl = { class: "flex flex-row gap-2 items-center" }, ol = { class: "relative group cursor-pointer" }, al = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, ll = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, nl = { class: "w-[90%] flex flex-col gap-24" }, sl = { class: "flex flex-col gap-16" }, rl = { class: "fm-typo-en-title-sm-800" }, il = { class: "flex flex-col max-w-[100%]" }, dl = { class: "w-[25%] font-semibold" }, ml = { class: "flex-grow" }, ul = { class: "flex flex-col max-w-[100%]" }, pl = { class: "w-[25%] font-semibold" }, cl = { class: "flex flex-col max-w-[100%]" }, fl = { class: "w-[25%] font-semibold" }, gl = { class: "flex flex-col gap-16" }, vl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, yl = { class: "flex flex-col gap-16 pt-3 pb-3" }, xl = { class: "flex flex-row items-center gap-5" }, bl = { class: "fm-typo-en-title-sm-800" }, wl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, hl = { class: "flex flex-row items-center justify-between gap-x-16" }, _l = { class: "fm-typo-en-title-sm-800" }, Cl = { class: "flex flex-row items-center justify-between gap-x-16" }, kl = { class: "fm-typo-en-title-sm-800" }, $l = { class: "flex flex-row items-center justify-between gap-x-16" }, Al = { class: "fm-typo-en-title-sm-800" }, Sl = { class: "flex flex-row items-center justify-between gap-x-16" },
|
|
2313
|
+
}, Za = { class: "flex flex-col gap-16 pb-[24px]" }, el = { class: "flex flex-row justify-between items-center gap-2" }, tl = { class: "flex flex-row gap-2 items-center" }, ol = { class: "relative group cursor-pointer" }, al = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, ll = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, nl = { class: "w-[90%] flex flex-col gap-24" }, sl = { class: "flex flex-col gap-16" }, rl = { class: "fm-typo-en-title-sm-800" }, il = { class: "flex flex-col max-w-[100%]" }, dl = { class: "w-[25%] font-semibold" }, ml = { class: "flex-grow" }, ul = { class: "flex flex-col max-w-[100%]" }, pl = { class: "w-[25%] font-semibold" }, cl = { class: "flex flex-col max-w-[100%]" }, fl = { class: "w-[25%] font-semibold" }, gl = { class: "flex flex-col gap-16" }, vl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, yl = { class: "flex flex-col gap-16 pt-3 pb-3" }, xl = { class: "flex flex-row items-center gap-5" }, bl = { class: "fm-typo-en-title-sm-800" }, wl = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, hl = { class: "flex flex-row items-center justify-between gap-x-16" }, _l = { class: "fm-typo-en-title-sm-800" }, Cl = { class: "flex flex-row items-center justify-between gap-x-16" }, kl = { class: "fm-typo-en-title-sm-800" }, $l = { class: "flex flex-row items-center justify-between gap-x-16" }, Al = { class: "fm-typo-en-title-sm-800" }, Sl = { class: "flex flex-row items-center justify-between gap-x-16" }, Dl = { class: "fm-typo-en-title-sm-800" }, Vl = /* @__PURE__ */ oe({
|
|
2314
2314
|
__name: "Setting",
|
|
2315
2315
|
props: /* @__PURE__ */ ue({
|
|
2316
2316
|
errorLogs: {}
|
|
@@ -2320,8 +2320,8 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2320
2320
|
}),
|
|
2321
2321
|
emits: ["update:modelValue"],
|
|
2322
2322
|
setup(f) {
|
|
2323
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader:
|
|
2324
|
-
() =>
|
|
2323
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader: V } = qe(), { promptMessage: I } = ze(), { restaurants: D } = Ae(), { rules: c, notifyUnauthorized: g } = Le(), A = B(
|
|
2324
|
+
() => D.map((x) => ({ label: x.name, value: x.id }))
|
|
2325
2325
|
);
|
|
2326
2326
|
async function R() {
|
|
2327
2327
|
var h;
|
|
@@ -2337,7 +2337,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2337
2337
|
await I({
|
|
2338
2338
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
2339
2339
|
title: a("report.common.delete")
|
|
2340
|
-
}) && await
|
|
2340
|
+
}) && await V(async () => {
|
|
2341
2341
|
try {
|
|
2342
2342
|
await Oe(e.value._id), await v.getSettings(), K.back();
|
|
2343
2343
|
} catch (r) {
|
|
@@ -2356,7 +2356,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2356
2356
|
g(Z.update);
|
|
2357
2357
|
return;
|
|
2358
2358
|
}
|
|
2359
|
-
await
|
|
2359
|
+
await V(async () => {
|
|
2360
2360
|
try {
|
|
2361
2361
|
await Be(e.value._id, e.value), await v.getSettings();
|
|
2362
2362
|
} catch (h) {
|
|
@@ -2417,7 +2417,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2417
2417
|
};
|
|
2418
2418
|
}
|
|
2419
2419
|
async function s() {
|
|
2420
|
-
await
|
|
2420
|
+
await V(async () => {
|
|
2421
2421
|
try {
|
|
2422
2422
|
await Ue(e.value._id), await v.getSettings();
|
|
2423
2423
|
} catch (x) {
|
|
@@ -2518,7 +2518,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2518
2518
|
(z = (N = (C = e.value) == null ? void 0 : C.platform) == null ? void 0 : N.mappings) != null && z.rounding && (e.value.platform.mappings.rounding.account = P.account);
|
|
2519
2519
|
})
|
|
2520
2520
|
}, null, 8, ["model-value", "options"]),
|
|
2521
|
-
(b(!0), U(
|
|
2521
|
+
(b(!0), U(Ve, null, je((ae = (te = (W = e.value) == null ? void 0 : W.platform) == null ? void 0 : te.mappings) == null ? void 0 : ae.charges, (P, C) => (b(), E(Q, {
|
|
2522
2522
|
key: `charge-${C}`,
|
|
2523
2523
|
modelValue: e.value.platform.mappings.charges[C],
|
|
2524
2524
|
"onUpdate:modelValue": (N) => e.value.platform.mappings.charges[C] = N,
|
|
@@ -2660,7 +2660,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2660
2660
|
}, null, 8, ["rows"]),
|
|
2661
2661
|
l(r, { style: { margin: 0 } }),
|
|
2662
2662
|
t("div", Sl, [
|
|
2663
|
-
t("div",
|
|
2663
|
+
t("div", Dl, $(m(a)("report.integration.payments")), 1),
|
|
2664
2664
|
l(h, {
|
|
2665
2665
|
variant: "secondary",
|
|
2666
2666
|
"prepend-icon": "add",
|
|
@@ -2800,17 +2800,17 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2800
2800
|
header: "Payment Amount",
|
|
2801
2801
|
enableSorting: !1
|
|
2802
2802
|
}
|
|
2803
|
-
], K = se(f, "modelValue"),
|
|
2803
|
+
], K = se(f, "modelValue"), V = X(!1), I = Se(), { dateRange: D } = Ge(Ae());
|
|
2804
2804
|
Fe(
|
|
2805
|
-
() =>
|
|
2805
|
+
() => D.value,
|
|
2806
2806
|
async () => {
|
|
2807
2807
|
if (K.value._id)
|
|
2808
2808
|
try {
|
|
2809
|
-
|
|
2809
|
+
V.value = !0, e.value = await Ye(K.value._id);
|
|
2810
2810
|
} catch (g) {
|
|
2811
2811
|
I.open({ message: g.message, type: "error" });
|
|
2812
2812
|
} finally {
|
|
2813
|
-
|
|
2813
|
+
V.value = !1;
|
|
2814
2814
|
}
|
|
2815
2815
|
},
|
|
2816
2816
|
{
|
|
@@ -2819,11 +2819,11 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2819
2819
|
);
|
|
2820
2820
|
async function c() {
|
|
2821
2821
|
try {
|
|
2822
|
-
K.value._id ? (
|
|
2822
|
+
K.value._id ? (V.value = !0, await ot(K.value._id)) : I.open({ message: "Invalid accounting setting", type: "error" });
|
|
2823
2823
|
} catch (g) {
|
|
2824
2824
|
g.message && I.open({ message: g.message, type: "error" }), Array.isArray(g.errors) ? g.errors.forEach((A) => I.open({ message: String(A), type: "error" })) : typeof g.errors == "string" && I.open({ message: g.errors, type: "error" });
|
|
2825
2825
|
} finally {
|
|
2826
|
-
|
|
2826
|
+
V.value = !1;
|
|
2827
2827
|
}
|
|
2828
2828
|
}
|
|
2829
2829
|
return (g, A) => {
|
|
@@ -2831,18 +2831,18 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2831
2831
|
return b(), U("div", Fl, [
|
|
2832
2832
|
t("div", Kl, [
|
|
2833
2833
|
l(He, {
|
|
2834
|
-
"date-range": m(
|
|
2835
|
-
"onUpdate:dateRange": A[0] || (A[0] = (i) => Ne(
|
|
2834
|
+
"date-range": m(D),
|
|
2835
|
+
"onUpdate:dateRange": A[0] || (A[0] = (i) => Ne(D) ? D.value = i : null),
|
|
2836
2836
|
compare: !1
|
|
2837
2837
|
}, null, 8, ["date-range"]),
|
|
2838
2838
|
l(R, {
|
|
2839
|
-
loading:
|
|
2839
|
+
loading: V.value,
|
|
2840
2840
|
variant: "primary",
|
|
2841
2841
|
label: m(a)("report.common.download"),
|
|
2842
2842
|
onClick: c
|
|
2843
2843
|
}, null, 8, ["loading", "label"])
|
|
2844
2844
|
]),
|
|
2845
|
-
|
|
2845
|
+
V.value ? (b(), U("div", Il, [
|
|
2846
2846
|
l(w, { size: "xl" }),
|
|
2847
2847
|
t("span", Ml, $(m(a)("report.common.isLoading")), 1)
|
|
2848
2848
|
])) : u.value.length > 0 ? (b(), E(y, {
|
|
@@ -2875,17 +2875,17 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2875
2875
|
value: "preview",
|
|
2876
2876
|
icon: "table"
|
|
2877
2877
|
}
|
|
2878
|
-
],
|
|
2878
|
+
], V = ke(), I = B(() => {
|
|
2879
2879
|
switch (v.value) {
|
|
2880
2880
|
case "preview":
|
|
2881
2881
|
return Tl;
|
|
2882
2882
|
case "setting":
|
|
2883
|
-
return
|
|
2883
|
+
return Vl;
|
|
2884
2884
|
default:
|
|
2885
2885
|
return null;
|
|
2886
2886
|
}
|
|
2887
2887
|
});
|
|
2888
|
-
return (
|
|
2888
|
+
return (D, c) => {
|
|
2889
2889
|
var R;
|
|
2890
2890
|
const g = F("FmPageHead"), A = F("FmTabs");
|
|
2891
2891
|
return b(), U("div", Rl, [
|
|
@@ -2893,7 +2893,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2893
2893
|
title: ((R = e.value) == null ? void 0 : R.name) || "AutoCount",
|
|
2894
2894
|
"back-button": !0,
|
|
2895
2895
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
2896
|
-
"onClick:back": c[0] || (c[0] = (w) => m(
|
|
2896
|
+
"onClick:back": c[0] || (c[0] = (w) => m(V).push({ name: "integrations" }))
|
|
2897
2897
|
}, {
|
|
2898
2898
|
description: $e(() => c[3] || (c[3] = [
|
|
2899
2899
|
t("div", null, null, -1)
|
|
@@ -2928,8 +2928,8 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2928
2928
|
}),
|
|
2929
2929
|
emits: ["update:modelValue"],
|
|
2930
2930
|
setup(f) {
|
|
2931
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader:
|
|
2932
|
-
() =>
|
|
2931
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader: V } = qe(), { promptMessage: I } = ze(), { restaurants: D } = Ae(), { rules: c, notifyUnauthorized: g } = Le(), A = B(
|
|
2932
|
+
() => D.map((n) => ({ label: n.name, value: n.id }))
|
|
2933
2933
|
);
|
|
2934
2934
|
async function R() {
|
|
2935
2935
|
var r;
|
|
@@ -2945,7 +2945,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2945
2945
|
await I({
|
|
2946
2946
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
2947
2947
|
title: a("report.common.delete")
|
|
2948
|
-
}) && await
|
|
2948
|
+
}) && await V(async () => {
|
|
2949
2949
|
try {
|
|
2950
2950
|
await Oe(e.value._id), await v.getSettings(), K.back();
|
|
2951
2951
|
} catch (p) {
|
|
@@ -2964,7 +2964,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2964
2964
|
g(Z.update);
|
|
2965
2965
|
return;
|
|
2966
2966
|
}
|
|
2967
|
-
await
|
|
2967
|
+
await V(async () => {
|
|
2968
2968
|
try {
|
|
2969
2969
|
await Be(e.value._id, e.value), await Ue(e.value._id), await v.getSettings();
|
|
2970
2970
|
} catch (r) {
|
|
@@ -3019,7 +3019,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3019
3019
|
};
|
|
3020
3020
|
}
|
|
3021
3021
|
async function d() {
|
|
3022
|
-
await
|
|
3022
|
+
await V(async () => {
|
|
3023
3023
|
try {
|
|
3024
3024
|
await Ue(e.value._id), await v.getSettings();
|
|
3025
3025
|
} catch (n) {
|
|
@@ -3055,7 +3055,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3055
3055
|
return Ee(async () => {
|
|
3056
3056
|
await v.getSettings();
|
|
3057
3057
|
}), (n, o) => {
|
|
3058
|
-
var L, W, te, ae, H, de, pe, ce, fe, ge, ve, ye, xe, be, we, J, q, P, C, N, z, Ke, j, ie,
|
|
3058
|
+
var L, W, te, ae, H, de, pe, ce, fe, ge, ve, ye, xe, be, we, J, q, P, C, N, z, Ke, j, ie, De, We, Je;
|
|
3059
3059
|
const h = F("FmIcon"), r = F("FmButton"), p = F("FmMenuDivider"), T = F("FmTextField"), M = F("FmSelect");
|
|
3060
3060
|
return (W = (L = e.value) == null ? void 0 : L.platform) != null && W.mappings ? (b(), U("div", Pl, [
|
|
3061
3061
|
t("div", Ll, [
|
|
@@ -3171,7 +3171,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3171
3171
|
(ne = (le = (G = e.value) == null ? void 0 : G.platform) == null ? void 0 : le.mappings) != null && ne.rounding && (e.value.platform.mappings.rounding.account = Y.account, e.value.platform.mappings.rounding.code = Y.code);
|
|
3172
3172
|
})
|
|
3173
3173
|
}, null, 8, ["model-value"]),
|
|
3174
|
-
(b(!0), U(
|
|
3174
|
+
(b(!0), U(Ve, null, je((H = (ae = (te = e.value) == null ? void 0 : te.platform) == null ? void 0 : ae.mappings) == null ? void 0 : H.charges, (Y, G) => (b(), E(Q, {
|
|
3175
3175
|
key: `charge-${G}`,
|
|
3176
3176
|
modelValue: e.value.platform.mappings.charges[G],
|
|
3177
3177
|
"onUpdate:modelValue": (le) => e.value.platform.mappings.charges[G] = le,
|
|
@@ -3366,7 +3366,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3366
3366
|
})
|
|
3367
3367
|
}, null, 8, ["rows"]),
|
|
3368
3368
|
l(p, { style: { margin: 0 } }),
|
|
3369
|
-
s.value ? (b(), U(
|
|
3369
|
+
s.value ? (b(), U(Ve, { key: 0 }, [
|
|
3370
3370
|
t("div", bn, [
|
|
3371
3371
|
o[35] || (o[35] = t("div", { class: "fm-typo-en-title-sm-800" }, "Inventory Items", -1)),
|
|
3372
3372
|
l(r, {
|
|
@@ -3416,7 +3416,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3416
3416
|
]),
|
|
3417
3417
|
l(ee, {
|
|
3418
3418
|
"header-items": ["FeedMe Key", "Code", "Name"],
|
|
3419
|
-
rows: ((Je = (We = (
|
|
3419
|
+
rows: ((Je = (We = (De = e.value) == null ? void 0 : De.platform) == null ? void 0 : We.inventoryMappings) == null ? void 0 : Je.suppliers) || [],
|
|
3420
3420
|
"columns-per-row": 1,
|
|
3421
3421
|
removable: !0,
|
|
3422
3422
|
"mapping-type": "suppliers",
|
|
@@ -3577,7 +3577,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3577
3577
|
}
|
|
3578
3578
|
return i;
|
|
3579
3579
|
}, [])
|
|
3580
|
-
),
|
|
3580
|
+
), V = [
|
|
3581
3581
|
{
|
|
3582
3582
|
accessorKey: "date",
|
|
3583
3583
|
header: () => S("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -3633,17 +3633,17 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3633
3633
|
header: "Item Amount",
|
|
3634
3634
|
enableSorting: !1
|
|
3635
3635
|
}
|
|
3636
|
-
], I = se(f, "modelValue"),
|
|
3636
|
+
], I = se(f, "modelValue"), D = X(!1), c = Se(), { dateRange: g } = Ge(Ae());
|
|
3637
3637
|
Fe(
|
|
3638
3638
|
() => g.value,
|
|
3639
3639
|
async () => {
|
|
3640
3640
|
if (I.value._id)
|
|
3641
3641
|
try {
|
|
3642
|
-
|
|
3642
|
+
D.value = !0, e.value = await Ye(I.value._id);
|
|
3643
3643
|
} catch (i) {
|
|
3644
3644
|
c.open({ message: i.message, type: "error" });
|
|
3645
3645
|
} finally {
|
|
3646
|
-
|
|
3646
|
+
D.value = !1;
|
|
3647
3647
|
}
|
|
3648
3648
|
},
|
|
3649
3649
|
{
|
|
@@ -3656,11 +3656,11 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3656
3656
|
c.open({ message: "Invalid accounting setting", type: "error" });
|
|
3657
3657
|
return;
|
|
3658
3658
|
}
|
|
3659
|
-
|
|
3659
|
+
D.value = !0, await ot(I.value._id, [y.value]);
|
|
3660
3660
|
} catch (i) {
|
|
3661
3661
|
i.message && c.open({ message: i.message, type: "error" }), Array.isArray(i.errors) ? i.errors.forEach((_) => c.open({ message: String(_), type: "error" })) : typeof i.errors == "string" && c.open({ message: i.errors, type: "error" });
|
|
3662
3662
|
} finally {
|
|
3663
|
-
|
|
3663
|
+
D.value = !1;
|
|
3664
3664
|
}
|
|
3665
3665
|
}
|
|
3666
3666
|
const R = B(() => {
|
|
@@ -3692,13 +3692,13 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3692
3692
|
compare: !1
|
|
3693
3693
|
}, null, 8, ["date-range"]),
|
|
3694
3694
|
l(k, {
|
|
3695
|
-
loading:
|
|
3695
|
+
loading: D.value,
|
|
3696
3696
|
variant: "primary",
|
|
3697
3697
|
label: m(a)("report.common.download"),
|
|
3698
3698
|
onClick: A
|
|
3699
3699
|
}, null, 8, ["loading", "label"])
|
|
3700
3700
|
]),
|
|
3701
|
-
|
|
3701
|
+
D.value ? (b(), U("div", kn, [
|
|
3702
3702
|
l(d, { size: "xl" }),
|
|
3703
3703
|
t("span", $n, $(m(a)("report.common.isLoading")), 1)
|
|
3704
3704
|
])) : (b(), U("div", An, [
|
|
@@ -3717,13 +3717,13 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3717
3717
|
key: 1,
|
|
3718
3718
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
3719
3719
|
"row-data": K.value,
|
|
3720
|
-
"column-defs":
|
|
3720
|
+
"column-defs": V
|
|
3721
3721
|
}, null, 8, ["row-data"])) : O("", !0)
|
|
3722
3722
|
]))
|
|
3723
3723
|
]);
|
|
3724
3724
|
};
|
|
3725
3725
|
}
|
|
3726
|
-
}),
|
|
3726
|
+
}), Dn = { class: "h-full relative flex flex-col" }, Vn = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, Fn = /* @__PURE__ */ oe({
|
|
3727
3727
|
__name: "SQL",
|
|
3728
3728
|
props: /* @__PURE__ */ ue({
|
|
3729
3729
|
errorLogs: {}
|
|
@@ -3744,7 +3744,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3744
3744
|
value: "preview",
|
|
3745
3745
|
icon: "table"
|
|
3746
3746
|
}
|
|
3747
|
-
],
|
|
3747
|
+
], V = ke(), I = B(() => {
|
|
3748
3748
|
switch (v.value) {
|
|
3749
3749
|
case "preview":
|
|
3750
3750
|
return Sn;
|
|
@@ -3754,15 +3754,15 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3754
3754
|
return null;
|
|
3755
3755
|
}
|
|
3756
3756
|
});
|
|
3757
|
-
return (
|
|
3757
|
+
return (D, c) => {
|
|
3758
3758
|
var R;
|
|
3759
3759
|
const g = F("FmPageHead"), A = F("FmTabs");
|
|
3760
|
-
return b(), U("div",
|
|
3760
|
+
return b(), U("div", Dn, [
|
|
3761
3761
|
l(g, {
|
|
3762
3762
|
title: ((R = e.value) == null ? void 0 : R.name) || "SQL",
|
|
3763
3763
|
"back-button": !0,
|
|
3764
3764
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
3765
|
-
"onClick:back": c[0] || (c[0] = (w) => m(
|
|
3765
|
+
"onClick:back": c[0] || (c[0] = (w) => m(V).push({ name: "integrations" }))
|
|
3766
3766
|
}, {
|
|
3767
3767
|
description: $e(() => c[3] || (c[3] = [
|
|
3768
3768
|
t("div", null, null, -1)
|
|
@@ -3774,7 +3774,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3774
3774
|
"onUpdate:modelValue": c[1] || (c[1] = (w) => v.value = w),
|
|
3775
3775
|
items: K
|
|
3776
3776
|
}, null, 8, ["model-value"]),
|
|
3777
|
-
t("div",
|
|
3777
|
+
t("div", Vn, [
|
|
3778
3778
|
(b(), E(Pe(I.value), {
|
|
3779
3779
|
modelValue: e.value,
|
|
3780
3780
|
"onUpdate:modelValue": c[2] || (c[2] = (w) => e.value = w),
|
|
@@ -3799,7 +3799,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3799
3799
|
}, Ss = {
|
|
3800
3800
|
key: 3,
|
|
3801
3801
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
3802
|
-
},
|
|
3802
|
+
}, Ds = /* @__PURE__ */ oe({
|
|
3803
3803
|
__name: "Setting",
|
|
3804
3804
|
props: /* @__PURE__ */ ue({
|
|
3805
3805
|
retrievedMethods: {
|
|
@@ -3820,8 +3820,8 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3820
3820
|
}),
|
|
3821
3821
|
emits: ["update:modelValue"],
|
|
3822
3822
|
setup(f) {
|
|
3823
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader:
|
|
3824
|
-
() =>
|
|
3823
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader: V } = qe(), { promptMessage: I } = ze(), { restaurants: D } = Ae(), { rules: c, notifyUnauthorized: g } = Le(), A = B(
|
|
3824
|
+
() => D.map((n) => ({ label: n.name, value: n.id }))
|
|
3825
3825
|
);
|
|
3826
3826
|
function R(n) {
|
|
3827
3827
|
var o;
|
|
@@ -3844,7 +3844,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3844
3844
|
await I({
|
|
3845
3845
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
3846
3846
|
title: a("report.common.delete")
|
|
3847
|
-
}) && await
|
|
3847
|
+
}) && await V(async () => {
|
|
3848
3848
|
try {
|
|
3849
3849
|
await Oe(e.value._id), await v.getSettings(), K.back();
|
|
3850
3850
|
} catch (p) {
|
|
@@ -3863,7 +3863,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3863
3863
|
g(Z.update);
|
|
3864
3864
|
return;
|
|
3865
3865
|
}
|
|
3866
|
-
await
|
|
3866
|
+
await V(async () => {
|
|
3867
3867
|
var r, p, T;
|
|
3868
3868
|
try {
|
|
3869
3869
|
(T = (p = (r = e.value) == null ? void 0 : r.platform) == null ? void 0 : p.mappings) != null && T.paymentMethods && R(e.value.platform.mappings.paymentMethods), await Be(e.value._id, e.value), await v.getSettings();
|
|
@@ -3964,7 +3964,7 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3964
3964
|
{ immediate: !0 }
|
|
3965
3965
|
);
|
|
3966
3966
|
async function x() {
|
|
3967
|
-
await
|
|
3967
|
+
await V(async () => {
|
|
3968
3968
|
try {
|
|
3969
3969
|
await Ue(e.value._id), await v.getSettings();
|
|
3970
3970
|
} catch (n) {
|
|
@@ -4307,9 +4307,9 @@ const Ct = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
4307
4307
|
};
|
|
4308
4308
|
}
|
|
4309
4309
|
});
|
|
4310
|
-
function
|
|
4310
|
+
function Vs(f) {
|
|
4311
4311
|
return f.reduce((a, e) => {
|
|
4312
|
-
var K,
|
|
4312
|
+
var K, V, I, D, c, g, A, R, w, y, i, _, k, d, s, x, n, o, h, r, p, T;
|
|
4313
4313
|
const { invoice: u } = e, v = a.length;
|
|
4314
4314
|
a[v] = {
|
|
4315
4315
|
invoice_date: u.invoice_date,
|
|
@@ -4319,9 +4319,9 @@ function Ds(f) {
|
|
|
4319
4319
|
// tax: invoice.tax.reduce((sum, tax) => sum + tax.tax, 0),
|
|
4320
4320
|
// service_charge: invoice.service_charge.total,
|
|
4321
4321
|
item_code: (K = u.items[0]) == null ? void 0 : K.code,
|
|
4322
|
-
item_desc: (
|
|
4322
|
+
item_desc: (V = u.items[0]) == null ? void 0 : V.description,
|
|
4323
4323
|
item_price: (I = u.items[0]) == null ? void 0 : I.price,
|
|
4324
|
-
item_tax: (
|
|
4324
|
+
item_tax: (D = u.items[0]) == null ? void 0 : D.total_tax,
|
|
4325
4325
|
item_tax_label: ((c = u.items[0]) == null ? void 0 : c.tax_label) || "-",
|
|
4326
4326
|
payment_amount: ((A = (g = u.transactions) == null ? void 0 : g[0]) == null ? void 0 : A.amount) || void 0,
|
|
4327
4327
|
payment_method: ((w = (R = u.transactions) == null ? void 0 : R[0]) == null ? void 0 : w.payment_method) || "-",
|
|
@@ -4424,13 +4424,13 @@ const Fs = [
|
|
|
4424
4424
|
];
|
|
4425
4425
|
function Ks(f) {
|
|
4426
4426
|
return f.reduce((a, e) => {
|
|
4427
|
-
var I,
|
|
4427
|
+
var I, D, c, g, A, R, w, y, i, _, k, d, s, x;
|
|
4428
4428
|
const { invoice: u, payments: v } = e, K = a.length;
|
|
4429
4429
|
a[K] = {
|
|
4430
4430
|
invoice_date: u.invoice_date,
|
|
4431
4431
|
ref_num: e.isRefund && e.credit_notes && e.credit_notes.length > 0 ? ((I = e.credit_notes[0]) == null ? void 0 : I.ref_num) ?? u.ref_num : u.ref_num,
|
|
4432
4432
|
total: u.total,
|
|
4433
|
-
item_code: (
|
|
4433
|
+
item_code: (D = u.items[0]) == null ? void 0 : D.code,
|
|
4434
4434
|
item_description: (c = u.items[0]) == null ? void 0 : c.description,
|
|
4435
4435
|
item_price: (g = u.items[0]) == null ? void 0 : g.price,
|
|
4436
4436
|
item_tax_label: ((A = u.items[0]) == null ? void 0 : A.tax_label) ?? "",
|
|
@@ -4441,12 +4441,12 @@ function Ks(f) {
|
|
|
4441
4441
|
payment_term_amount: ((i = (y = v[0]) == null ? void 0 : y.ids[0]) == null ? void 0 : i.amount) ?? "",
|
|
4442
4442
|
payment_method: ((_ = v[0]) == null ? void 0 : _.payment_method_name) || ""
|
|
4443
4443
|
};
|
|
4444
|
-
const
|
|
4444
|
+
const V = Math.max(
|
|
4445
4445
|
((k = u.items) == null ? void 0 : k.length) || 0,
|
|
4446
4446
|
((d = u.terms) == null ? void 0 : d.length) || 0,
|
|
4447
4447
|
(v == null ? void 0 : v.length) || 0
|
|
4448
4448
|
);
|
|
4449
|
-
for (let n = 1; n <
|
|
4449
|
+
for (let n = 1; n < V; n++) {
|
|
4450
4450
|
const o = K + n;
|
|
4451
4451
|
a[o] || (a[o] = {});
|
|
4452
4452
|
const h = u.items[n], r = v[n];
|
|
@@ -4547,13 +4547,13 @@ const Is = [
|
|
|
4547
4547
|
},
|
|
4548
4548
|
emits: ["update:modelValue"],
|
|
4549
4549
|
setup(f) {
|
|
4550
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = X(!1), v = Se(), { dateRange: K } = Ge(Ae()),
|
|
4550
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = X(!1), v = Se(), { dateRange: K } = Ge(Ae()), V = X([]);
|
|
4551
4551
|
Fe(
|
|
4552
4552
|
() => K.value,
|
|
4553
4553
|
async () => {
|
|
4554
4554
|
if (e.value._id)
|
|
4555
4555
|
try {
|
|
4556
|
-
u.value = !0,
|
|
4556
|
+
u.value = !0, V.value = await Ye(e.value._id);
|
|
4557
4557
|
} catch (g) {
|
|
4558
4558
|
v.open({ message: g.message, type: "error" });
|
|
4559
4559
|
} finally {
|
|
@@ -4567,12 +4567,12 @@ const Is = [
|
|
|
4567
4567
|
const I = B(() => {
|
|
4568
4568
|
switch (e.value.platform.mappings.version) {
|
|
4569
4569
|
case "v1":
|
|
4570
|
-
return
|
|
4570
|
+
return Vs(V.value);
|
|
4571
4571
|
case "v2":
|
|
4572
|
-
return Ks(
|
|
4572
|
+
return Ks(V.value);
|
|
4573
4573
|
}
|
|
4574
4574
|
return [];
|
|
4575
|
-
}),
|
|
4575
|
+
}), D = B(() => {
|
|
4576
4576
|
switch (e.value.platform.mappings.version) {
|
|
4577
4577
|
case "v1":
|
|
4578
4578
|
return Fs;
|
|
@@ -4613,7 +4613,7 @@ const Is = [
|
|
|
4613
4613
|
key: 1,
|
|
4614
4614
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
4615
4615
|
"row-data": I.value,
|
|
4616
|
-
"column-defs":
|
|
4616
|
+
"column-defs": D.value
|
|
4617
4617
|
}, null, 8, ["row-data", "column-defs"]))
|
|
4618
4618
|
]);
|
|
4619
4619
|
};
|
|
@@ -4639,7 +4639,7 @@ const Is = [
|
|
|
4639
4639
|
value: "preview",
|
|
4640
4640
|
icon: "table"
|
|
4641
4641
|
}
|
|
4642
|
-
],
|
|
4642
|
+
], V = ke(), I = B(() => {
|
|
4643
4643
|
switch (v.value) {
|
|
4644
4644
|
case "preview":
|
|
4645
4645
|
return {
|
|
@@ -4647,9 +4647,9 @@ const Is = [
|
|
|
4647
4647
|
};
|
|
4648
4648
|
case "setting":
|
|
4649
4649
|
return {
|
|
4650
|
-
component:
|
|
4650
|
+
component: Ds,
|
|
4651
4651
|
props: {
|
|
4652
|
-
retrievedMethods:
|
|
4652
|
+
retrievedMethods: D.value,
|
|
4653
4653
|
retrievedCustomers: c.value,
|
|
4654
4654
|
errorLogs: u.errorLogs
|
|
4655
4655
|
}
|
|
@@ -4657,7 +4657,7 @@ const Is = [
|
|
|
4657
4657
|
default:
|
|
4658
4658
|
return null;
|
|
4659
4659
|
}
|
|
4660
|
-
}),
|
|
4660
|
+
}), D = X({}), c = X({}), g = (i, _) => i.map((k) => ({
|
|
4661
4661
|
label: _.length > 2 ? `ID:${k[_[2]]} [${k[_[0]]}] ${k[_[1]]}` : `[${k[_[0]]}] ${k[_[1]]}`,
|
|
4662
4662
|
value: k.id,
|
|
4663
4663
|
cnId: k.cnId ? k.cnId : null
|
|
@@ -4675,14 +4675,14 @@ const Is = [
|
|
|
4675
4675
|
(i = e.value.platform.mappings) != null && i.version && await w(
|
|
4676
4676
|
yt,
|
|
4677
4677
|
A,
|
|
4678
|
-
|
|
4678
|
+
D,
|
|
4679
4679
|
"Failed to fetch payment methods:"
|
|
4680
4680
|
), ((_ = e.value.platform.mappings) == null ? void 0 : _.version) == "v2" && await w(
|
|
4681
4681
|
xt,
|
|
4682
4682
|
R,
|
|
4683
4683
|
c,
|
|
4684
4684
|
"Failed to fetch customers:"
|
|
4685
|
-
),
|
|
4685
|
+
), D.value.isLoaded = !0, c.value.isLoaded = !0;
|
|
4686
4686
|
};
|
|
4687
4687
|
return lt(y), Fe(() => {
|
|
4688
4688
|
var i;
|
|
@@ -4695,7 +4695,7 @@ const Is = [
|
|
|
4695
4695
|
title: ((s = e.value) == null ? void 0 : s.name) || "Biztory",
|
|
4696
4696
|
"back-button": !0,
|
|
4697
4697
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
4698
|
-
"onClick:back": _[0] || (_[0] = (o) => m(
|
|
4698
|
+
"onClick:back": _[0] || (_[0] = (o) => m(V).push({ name: "integrations" }))
|
|
4699
4699
|
}, {
|
|
4700
4700
|
description: $e(() => _[3] || (_[3] = [
|
|
4701
4701
|
t("div", null, null, -1)
|
|
@@ -4729,8 +4729,8 @@ const Is = [
|
|
|
4729
4729
|
}),
|
|
4730
4730
|
emits: ["update:modelValue"],
|
|
4731
4731
|
setup(f) {
|
|
4732
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader:
|
|
4733
|
-
() =>
|
|
4732
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader: V } = qe(), { promptMessage: I } = ze(), { restaurants: D } = Ae(), { rules: c, notifyUnauthorized: g } = Le(), A = B(
|
|
4733
|
+
() => D.map((k) => ({ label: k.name, value: k.id }))
|
|
4734
4734
|
);
|
|
4735
4735
|
async function R() {
|
|
4736
4736
|
var x;
|
|
@@ -4746,7 +4746,7 @@ const Is = [
|
|
|
4746
4746
|
await I({
|
|
4747
4747
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
4748
4748
|
title: a("report.common.delete")
|
|
4749
|
-
}) && await
|
|
4749
|
+
}) && await V(async () => {
|
|
4750
4750
|
try {
|
|
4751
4751
|
await Oe(e.value._id), await v.getSettings(), K.back();
|
|
4752
4752
|
} catch (n) {
|
|
@@ -4765,7 +4765,7 @@ const Is = [
|
|
|
4765
4765
|
g(Z.update);
|
|
4766
4766
|
return;
|
|
4767
4767
|
}
|
|
4768
|
-
await
|
|
4768
|
+
await V(async () => {
|
|
4769
4769
|
try {
|
|
4770
4770
|
await Be(e.value._id, e.value), await v.getSettings();
|
|
4771
4771
|
} catch (x) {
|
|
@@ -4792,7 +4792,7 @@ const Is = [
|
|
|
4792
4792
|
]);
|
|
4793
4793
|
}
|
|
4794
4794
|
async function _() {
|
|
4795
|
-
await
|
|
4795
|
+
await V(async () => {
|
|
4796
4796
|
try {
|
|
4797
4797
|
await Ue(e.value._id), await v.getSettings();
|
|
4798
4798
|
} catch (k) {
|
|
@@ -4937,7 +4937,7 @@ const Is = [
|
|
|
4937
4937
|
header: () => S("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
|
|
4938
4938
|
enableSorting: !1
|
|
4939
4939
|
}
|
|
4940
|
-
], v = se(f, "modelValue"), K = X(!1),
|
|
4940
|
+
], v = se(f, "modelValue"), K = X(!1), V = Se(), { dateRange: I } = Ge(Ae());
|
|
4941
4941
|
Fe(
|
|
4942
4942
|
() => I.value,
|
|
4943
4943
|
async () => {
|
|
@@ -4945,7 +4945,7 @@ const Is = [
|
|
|
4945
4945
|
try {
|
|
4946
4946
|
K.value = !0, e.value = await Ye(v.value._id);
|
|
4947
4947
|
} catch (c) {
|
|
4948
|
-
|
|
4948
|
+
V.open({ message: c.message, type: "error" });
|
|
4949
4949
|
} finally {
|
|
4950
4950
|
K.value = !1;
|
|
4951
4951
|
}
|
|
@@ -4954,11 +4954,11 @@ const Is = [
|
|
|
4954
4954
|
immediate: !0
|
|
4955
4955
|
}
|
|
4956
4956
|
);
|
|
4957
|
-
async function
|
|
4957
|
+
async function D() {
|
|
4958
4958
|
try {
|
|
4959
|
-
v.value._id ? (K.value = !0, await ot(v.value._id)) :
|
|
4959
|
+
v.value._id ? (K.value = !0, await ot(v.value._id)) : V.open({ message: "Invalid setting", type: "error" });
|
|
4960
4960
|
} catch (c) {
|
|
4961
|
-
c.message &&
|
|
4961
|
+
c.message && V.open({ message: c.message, type: "error" }), Array.isArray(c.errors) ? c.errors.forEach((g) => V.open({ message: String(g), type: "error" })) : typeof c.errors == "string" && V.open({ message: c.errors, type: "error" });
|
|
4962
4962
|
} finally {
|
|
4963
4963
|
K.value = !1;
|
|
4964
4964
|
}
|
|
@@ -4976,7 +4976,7 @@ const Is = [
|
|
|
4976
4976
|
loading: K.value,
|
|
4977
4977
|
variant: "primary",
|
|
4978
4978
|
label: m(a)("report.common.download"),
|
|
4979
|
-
onClick:
|
|
4979
|
+
onClick: D
|
|
4980
4980
|
}, null, 8, ["loading", "label"])
|
|
4981
4981
|
]),
|
|
4982
4982
|
K.value ? (b(), U("div", rr, [
|
|
@@ -5012,7 +5012,7 @@ const Is = [
|
|
|
5012
5012
|
value: "preview",
|
|
5013
5013
|
icon: "table"
|
|
5014
5014
|
}
|
|
5015
|
-
],
|
|
5015
|
+
], V = ke(), I = B(() => {
|
|
5016
5016
|
switch (v.value) {
|
|
5017
5017
|
case "preview":
|
|
5018
5018
|
return dr;
|
|
@@ -5022,7 +5022,7 @@ const Is = [
|
|
|
5022
5022
|
return null;
|
|
5023
5023
|
}
|
|
5024
5024
|
});
|
|
5025
|
-
return (
|
|
5025
|
+
return (D, c) => {
|
|
5026
5026
|
var R;
|
|
5027
5027
|
const g = F("FmPageHead"), A = F("FmTabs");
|
|
5028
5028
|
return b(), U("div", mr, [
|
|
@@ -5030,7 +5030,7 @@ const Is = [
|
|
|
5030
5030
|
title: ((R = e.value) == null ? void 0 : R.name) || "AutoCount",
|
|
5031
5031
|
"back-button": !0,
|
|
5032
5032
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
5033
|
-
"onClick:back": c[0] || (c[0] = (w) => m(
|
|
5033
|
+
"onClick:back": c[0] || (c[0] = (w) => m(V).push({ name: "integrations" }))
|
|
5034
5034
|
}, {
|
|
5035
5035
|
description: $e(() => c[3] || (c[3] = [
|
|
5036
5036
|
t("div", null, null, -1)
|
|
@@ -5055,7 +5055,7 @@ const Is = [
|
|
|
5055
5055
|
}), cr = {
|
|
5056
5056
|
key: 0,
|
|
5057
5057
|
class: "flex flex-col h-full"
|
|
5058
|
-
}, fr = { class: "flex flex-col gap-16 pb-[24px]" }, gr = { class: "flex flex-row justify-between items-center gap-2" }, vr = { class: "fm-typo-en-title-sm-800" }, yr = { class: "flex flex-row gap-2 items-center" }, xr = { class: "flex flex-row gap-2 items-center" }, br = { class: "relative group cursor-pointer" }, wr = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, hr = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, _r = { class: "flex flex-col gap-24 w-[90%]" }, Cr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, kr = { class: "flex flex-col gap-24 overflow-y-auto overflow-x-hidden" }, $r = { class: "flex flex-col justify-between" }, Ar = { class: "w-[25%] font-semibold" }, Sr = { class: "flex-grow" },
|
|
5058
|
+
}, fr = { class: "flex flex-col gap-16 pb-[24px]" }, gr = { class: "flex flex-row justify-between items-center gap-2" }, vr = { class: "fm-typo-en-title-sm-800" }, yr = { class: "flex flex-row gap-2 items-center" }, xr = { class: "flex flex-row gap-2 items-center" }, br = { class: "relative group cursor-pointer" }, wr = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, hr = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, _r = { class: "flex flex-col gap-24 w-[90%]" }, Cr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, kr = { class: "flex flex-col gap-24 overflow-y-auto overflow-x-hidden" }, $r = { class: "flex flex-col justify-between" }, Ar = { class: "w-[25%] font-semibold" }, Sr = { class: "flex-grow" }, Dr = { class: "flex flex-col justify-between" }, Vr = { class: "w-[25%] font-semibold" }, Fr = { class: "flex-grow" }, Kr = { class: "flex flex-col justify-between" }, Ir = { class: "w-[25%] font-semibold" }, Mr = { class: "flex-grow" }, Tr = { class: "flex flex-col gap-16" }, Rr = { class: "flex flex-row items-center gap-5" }, Ur = { class: "fm-typo-en-title-sm-800" }, Nr = { class: "flex flex-col max-w-[100%]" }, Pr = { class: "w-[25%] font-semibold" }, Lr = { class: "flex-grow" }, jr = { class: "flex flex-col max-w-[100%]" }, Er = { class: "w-[25%] font-semibold" }, Or = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Br = { class: "flex-grow" }, Yr = { class: "flex flex-col max-w-[100%]" }, qr = { class: "w-[25%] font-semibold" }, zr = { class: "flex flex-col max-w-[100%]" }, Hr = { class: "w-[25%] font-semibold" }, Gr = {
|
|
5059
5059
|
key: 1,
|
|
5060
5060
|
class: "w-[100%] flex flex-col gap-2"
|
|
5061
5061
|
}, Qr = {
|
|
@@ -5088,8 +5088,8 @@ const Is = [
|
|
|
5088
5088
|
}),
|
|
5089
5089
|
emits: ["update:modelValue"],
|
|
5090
5090
|
setup(f) {
|
|
5091
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader:
|
|
5092
|
-
() =>
|
|
5091
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader: V } = qe(), { promptMessage: I } = ze(), { restaurants: D } = Ae(), { rules: c, notifyUnauthorized: g } = Le(), { flags: A } = nt(), R = B(
|
|
5092
|
+
() => D.map((r) => ({ label: r.name, value: r.id }))
|
|
5093
5093
|
), w = B(
|
|
5094
5094
|
() => !A.some(
|
|
5095
5095
|
(r) => r.key === bt.report_portal_integration_autocount_cloud_api && r.value === !0
|
|
@@ -5110,7 +5110,7 @@ const Is = [
|
|
|
5110
5110
|
await I({
|
|
5111
5111
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
5112
5112
|
title: a("report.common.delete")
|
|
5113
|
-
}) && await
|
|
5113
|
+
}) && await V(async () => {
|
|
5114
5114
|
try {
|
|
5115
5115
|
await Oe(e.value._id), await v.getSettings(), K.back();
|
|
5116
5116
|
} catch (L) {
|
|
@@ -5129,7 +5129,7 @@ const Is = [
|
|
|
5129
5129
|
g(Z.update);
|
|
5130
5130
|
return;
|
|
5131
5131
|
}
|
|
5132
|
-
await
|
|
5132
|
+
await V(async () => {
|
|
5133
5133
|
try {
|
|
5134
5134
|
await Be(e.value._id, e.value), await v.getSettings();
|
|
5135
5135
|
} catch (M) {
|
|
@@ -5175,7 +5175,7 @@ const Is = [
|
|
|
5175
5175
|
}
|
|
5176
5176
|
];
|
|
5177
5177
|
async function x() {
|
|
5178
|
-
await
|
|
5178
|
+
await V(async () => {
|
|
5179
5179
|
try {
|
|
5180
5180
|
await Ue(e.value._id), await v.getSettings();
|
|
5181
5181
|
} catch (r) {
|
|
@@ -5264,8 +5264,8 @@ const Is = [
|
|
|
5264
5264
|
}, null, 8, ["modelValue", "placeholder"])
|
|
5265
5265
|
])
|
|
5266
5266
|
]),
|
|
5267
|
-
t("div",
|
|
5268
|
-
t("div",
|
|
5267
|
+
t("div", Dr, [
|
|
5268
|
+
t("div", Vr, $(m(a)("report.integration.apiKey")), 1),
|
|
5269
5269
|
t("div", Fr, [
|
|
5270
5270
|
l(W, {
|
|
5271
5271
|
modelValue: e.value.platform.apiKey,
|
|
@@ -5486,8 +5486,8 @@ const Is = [
|
|
|
5486
5486
|
},
|
|
5487
5487
|
onRemove: p[18] || (p[18] = (j, ie) => k(j, ie)),
|
|
5488
5488
|
"onUpdate:rows": p[19] || (p[19] = (j) => {
|
|
5489
|
-
var ie,
|
|
5490
|
-
(
|
|
5489
|
+
var ie, De;
|
|
5490
|
+
(De = (ie = e.value) == null ? void 0 : ie.platform) != null && De.mappings && (e.value.platform.mappings.items = j);
|
|
5491
5491
|
})
|
|
5492
5492
|
}, null, 8, ["header-items", "rows", "fields-options"]),
|
|
5493
5493
|
l(L, { style: { margin: 0 } }),
|
|
@@ -5521,8 +5521,8 @@ const Is = [
|
|
|
5521
5521
|
},
|
|
5522
5522
|
onRemove: p[21] || (p[21] = (j, ie) => k(j, ie)),
|
|
5523
5523
|
"onUpdate:rows": p[22] || (p[22] = (j) => {
|
|
5524
|
-
var ie,
|
|
5525
|
-
(
|
|
5524
|
+
var ie, De;
|
|
5525
|
+
(De = (ie = e.value) == null ? void 0 : ie.platform) != null && De.mappings && (e.value.platform.mappings.taxes = j);
|
|
5526
5526
|
})
|
|
5527
5527
|
}, null, 8, ["header-items", "rows", "fields-options"]),
|
|
5528
5528
|
l(L, { style: { margin: 0 } }),
|
|
@@ -5556,8 +5556,8 @@ const Is = [
|
|
|
5556
5556
|
},
|
|
5557
5557
|
onRemove: p[24] || (p[24] = (j, ie) => k(j, ie)),
|
|
5558
5558
|
"onUpdate:rows": p[25] || (p[25] = (j) => {
|
|
5559
|
-
var ie,
|
|
5560
|
-
(
|
|
5559
|
+
var ie, De;
|
|
5560
|
+
(De = (ie = e.value) == null ? void 0 : ie.platform) != null && De.mappings && (e.value.platform.mappings.taxRoundingAdjustments = j);
|
|
5561
5561
|
})
|
|
5562
5562
|
}, null, 8, ["header-items", "rows", "fields-options"]),
|
|
5563
5563
|
l(L, { style: { margin: 0 } }),
|
|
@@ -5630,8 +5630,8 @@ const Is = [
|
|
|
5630
5630
|
},
|
|
5631
5631
|
onRemove: p[31] || (p[31] = (j, ie) => k(j, ie)),
|
|
5632
5632
|
"onUpdate:rows": p[32] || (p[32] = (j) => {
|
|
5633
|
-
var ie,
|
|
5634
|
-
(
|
|
5633
|
+
var ie, De;
|
|
5634
|
+
(De = (ie = e.value) == null ? void 0 : ie.platform) != null && De.mappings && (e.value.platform.mappings.payments = j);
|
|
5635
5635
|
})
|
|
5636
5636
|
}, null, 8, ["header-items", "rows", "fields-options"])
|
|
5637
5637
|
])
|
|
@@ -5643,14 +5643,14 @@ const Is = [
|
|
|
5643
5643
|
});
|
|
5644
5644
|
function _i(f) {
|
|
5645
5645
|
return f.reduce((a, e) => {
|
|
5646
|
-
var I,
|
|
5646
|
+
var I, D, c, g, A, R, w, y, i, _, k, d, s, x;
|
|
5647
5647
|
const { invoice: u, payments: v } = e, K = a.length;
|
|
5648
5648
|
a[K] = {
|
|
5649
5649
|
docNo: u.master.docNo,
|
|
5650
5650
|
debtorCode: u.master.debtorCode,
|
|
5651
5651
|
debtorName: u.master.debtorName,
|
|
5652
5652
|
itemProductCode: (I = u.details[0]) == null ? void 0 : I.productCode,
|
|
5653
|
-
description: (
|
|
5653
|
+
description: (D = u.details[0]) == null ? void 0 : D.description,
|
|
5654
5654
|
qty: (c = u.details[0]) == null ? void 0 : c.qty,
|
|
5655
5655
|
unitPrice: (g = u.details[0]) == null ? void 0 : g.unitPrice,
|
|
5656
5656
|
roundAdj: u.master.roundAdj,
|
|
@@ -5663,8 +5663,8 @@ function _i(f) {
|
|
|
5663
5663
|
currencyCode: (k = v[0]) == null ? void 0 : k.master.currencyCode,
|
|
5664
5664
|
journalType: (d = v[0]) == null ? void 0 : d.master.journalType
|
|
5665
5665
|
};
|
|
5666
|
-
const
|
|
5667
|
-
for (let n = 1; n <
|
|
5666
|
+
const V = Math.max(u.details.length, (v == null ? void 0 : v.length) || 0);
|
|
5667
|
+
for (let n = 1; n < V; n++) {
|
|
5668
5668
|
const o = K + n;
|
|
5669
5669
|
a[o] || (a[o] = {});
|
|
5670
5670
|
const h = u.details[n], r = v[n];
|
|
@@ -5773,7 +5773,7 @@ const Ci = [
|
|
|
5773
5773
|
], ki = { class: "h-full flex flex-col gap-16" }, $i = { class: "flex flex-row gap-2 justify-between items-center" }, Ai = { class: "flex flex-row gap-5" }, Si = {
|
|
5774
5774
|
key: 0,
|
|
5775
5775
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-y-auto"
|
|
5776
|
-
},
|
|
5776
|
+
}, Di = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vi = /* @__PURE__ */ oe({
|
|
5777
5777
|
__name: "Preview",
|
|
5778
5778
|
props: {
|
|
5779
5779
|
modelValue: { required: !0 },
|
|
@@ -5781,13 +5781,13 @@ const Ci = [
|
|
|
5781
5781
|
},
|
|
5782
5782
|
emits: ["update:modelValue"],
|
|
5783
5783
|
setup(f) {
|
|
5784
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = X(!1), v = Se(), { dateRange: K } = Ge(Ae()), { options:
|
|
5784
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = X(!1), v = Se(), { dateRange: K } = Ge(Ae()), { options: V, isFeatureAvailable: I } = Te(), D = X([]);
|
|
5785
5785
|
Fe(
|
|
5786
5786
|
() => K.value,
|
|
5787
5787
|
async () => {
|
|
5788
5788
|
if (e.value._id)
|
|
5789
5789
|
try {
|
|
5790
|
-
u.value = !0,
|
|
5790
|
+
u.value = !0, D.value = await Ye(e.value._id);
|
|
5791
5791
|
} catch (y) {
|
|
5792
5792
|
v.open({ message: y.message, type: "error" });
|
|
5793
5793
|
} finally {
|
|
@@ -5798,9 +5798,9 @@ const Ci = [
|
|
|
5798
5798
|
immediate: !0
|
|
5799
5799
|
}
|
|
5800
5800
|
);
|
|
5801
|
-
const c = B(() => _i(
|
|
5801
|
+
const c = B(() => _i(D.value)), g = B(() => Ci), A = B(() => {
|
|
5802
5802
|
var i;
|
|
5803
|
-
const y = (i =
|
|
5803
|
+
const y = (i = V.find(
|
|
5804
5804
|
(_) => _.platform === Re.AutoCountCloud
|
|
5805
5805
|
)) == null ? void 0 : i.flags;
|
|
5806
5806
|
return y ? I(y) : !1;
|
|
@@ -5850,7 +5850,7 @@ const Ci = [
|
|
|
5850
5850
|
]),
|
|
5851
5851
|
u.value ? (b(), U("div", Si, [
|
|
5852
5852
|
l(k, { size: "xl" }),
|
|
5853
|
-
t("span",
|
|
5853
|
+
t("span", Di, $(m(a)("report.common.isLoading")), 1)
|
|
5854
5854
|
])) : (b(), E(d, {
|
|
5855
5855
|
key: 1,
|
|
5856
5856
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
@@ -5881,17 +5881,17 @@ const Ci = [
|
|
|
5881
5881
|
value: "preview",
|
|
5882
5882
|
icon: "table"
|
|
5883
5883
|
}
|
|
5884
|
-
],
|
|
5884
|
+
], V = ke(), I = B(() => {
|
|
5885
5885
|
switch (v.value) {
|
|
5886
5886
|
case "preview":
|
|
5887
5887
|
return {
|
|
5888
|
-
component:
|
|
5888
|
+
component: Vi
|
|
5889
5889
|
};
|
|
5890
5890
|
case "setting":
|
|
5891
5891
|
return {
|
|
5892
5892
|
component: hi,
|
|
5893
5893
|
props: {
|
|
5894
|
-
retrievedLocations:
|
|
5894
|
+
retrievedLocations: D.value,
|
|
5895
5895
|
retrievedDebtors: c.value,
|
|
5896
5896
|
errorLogs: u.errorLogs
|
|
5897
5897
|
}
|
|
@@ -5899,7 +5899,7 @@ const Ci = [
|
|
|
5899
5899
|
default:
|
|
5900
5900
|
return null;
|
|
5901
5901
|
}
|
|
5902
|
-
}),
|
|
5902
|
+
}), D = X({}), c = X({}), g = (y) => y.data.map((i) => ({
|
|
5903
5903
|
label: i.location + " - " + i.description,
|
|
5904
5904
|
value: i.location
|
|
5905
5905
|
})), A = (y) => y.data.map((i) => ({
|
|
@@ -5925,12 +5925,12 @@ const Ci = [
|
|
|
5925
5925
|
), await R(
|
|
5926
5926
|
ht,
|
|
5927
5927
|
g,
|
|
5928
|
-
|
|
5928
|
+
D,
|
|
5929
5929
|
"Failed to fetch locations:"
|
|
5930
|
-
),
|
|
5930
|
+
), D.value.isLoaded = !0, c.value.isLoaded = !0;
|
|
5931
5931
|
};
|
|
5932
5932
|
return lt(() => {
|
|
5933
|
-
e.value.platform.apiKey && e.value.platform.accountBookId && e.value.platform.keyId ? w() : (
|
|
5933
|
+
e.value.platform.apiKey && e.value.platform.accountBookId && e.value.platform.keyId ? w() : (D.value.isLoaded = !0, c.value.isLoaded = !0, D.value.isError = !0, c.value.isError = !0);
|
|
5934
5934
|
}), (y, i) => {
|
|
5935
5935
|
var d, s, x;
|
|
5936
5936
|
const _ = F("FmPageHead"), k = F("FmTabs");
|
|
@@ -5939,7 +5939,7 @@ const Ci = [
|
|
|
5939
5939
|
title: ((d = e.value) == null ? void 0 : d.name) || "Autocount Cloud",
|
|
5940
5940
|
"back-button": !0,
|
|
5941
5941
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
5942
|
-
"onClick:back": i[0] || (i[0] = (n) => m(
|
|
5942
|
+
"onClick:back": i[0] || (i[0] = (n) => m(V).push({ name: "integrations" }))
|
|
5943
5943
|
}, {
|
|
5944
5944
|
description: $e(() => i[3] || (i[3] = [
|
|
5945
5945
|
t("div", null, null, -1)
|
|
@@ -5971,8 +5971,8 @@ const Ci = [
|
|
|
5971
5971
|
},
|
|
5972
5972
|
emits: ["update:modelValue"],
|
|
5973
5973
|
setup(f) {
|
|
5974
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader:
|
|
5975
|
-
() =>
|
|
5974
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader: V } = qe(), { promptMessage: I } = ze(), { restaurants: D } = Ae(), { rules: c, notifyUnauthorized: g } = Le(), A = B(
|
|
5975
|
+
() => D.map((k) => ({ label: k.name, value: k.id }))
|
|
5976
5976
|
);
|
|
5977
5977
|
async function R() {
|
|
5978
5978
|
var x;
|
|
@@ -5988,7 +5988,7 @@ const Ci = [
|
|
|
5988
5988
|
await I({
|
|
5989
5989
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
5990
5990
|
title: a("report.common.delete")
|
|
5991
|
-
}) && await
|
|
5991
|
+
}) && await V(async () => {
|
|
5992
5992
|
try {
|
|
5993
5993
|
await Oe(e.value._id), await v.getSettings(), K.back();
|
|
5994
5994
|
} catch (n) {
|
|
@@ -6007,7 +6007,7 @@ const Ci = [
|
|
|
6007
6007
|
g(Z.update);
|
|
6008
6008
|
return;
|
|
6009
6009
|
}
|
|
6010
|
-
await
|
|
6010
|
+
await V(async () => {
|
|
6011
6011
|
try {
|
|
6012
6012
|
await Be(e.value._id, e.value), await v.getSettings();
|
|
6013
6013
|
} catch (x) {
|
|
@@ -6032,7 +6032,7 @@ const Ci = [
|
|
|
6032
6032
|
];
|
|
6033
6033
|
}
|
|
6034
6034
|
async function _() {
|
|
6035
|
-
await
|
|
6035
|
+
await V(async () => {
|
|
6036
6036
|
try {
|
|
6037
6037
|
await Ue(e.value._id), await v.getSettings();
|
|
6038
6038
|
} catch (k) {
|
|
@@ -6135,7 +6135,7 @@ const Ci = [
|
|
|
6135
6135
|
(N = (C = (P = (q = e.value) == null ? void 0 : q.platform) == null ? void 0 : P.mappings) == null ? void 0 : C.invoice) != null && N.rounding && (e.value.platform.mappings.invoice.rounding.account = J.account, e.value.platform.mappings.invoice.rounding.code = J.code);
|
|
6136
6136
|
})
|
|
6137
6137
|
}, null, 8, ["model-value"]),
|
|
6138
|
-
(b(!0), U(
|
|
6138
|
+
(b(!0), U(Ve, null, je((te = (W = (L = e.value) == null ? void 0 : L.platform) == null ? void 0 : W.mappings) == null ? void 0 : te.invoice.charges, (J, q) => (b(), E(Q, {
|
|
6139
6139
|
key: `charge-${q}`,
|
|
6140
6140
|
modelValue: e.value.platform.mappings.invoice.charges[q],
|
|
6141
6141
|
"onUpdate:modelValue": (P) => e.value.platform.mappings.invoice.charges[q] = P,
|
|
@@ -6379,7 +6379,7 @@ const Ci = [
|
|
|
6379
6379
|
accountCode: o.accountCode
|
|
6380
6380
|
});
|
|
6381
6381
|
return x;
|
|
6382
|
-
}, [])),
|
|
6382
|
+
}, [])), V = B(() => e.value.purchaseOrders.reduce((x, n) => {
|
|
6383
6383
|
for (const o of n._skus)
|
|
6384
6384
|
x.push({
|
|
6385
6385
|
_date: Ie(n._date).format("D-MMM-YY"),
|
|
@@ -6413,7 +6413,7 @@ const Ci = [
|
|
|
6413
6413
|
netAmt: o.netAmt
|
|
6414
6414
|
});
|
|
6415
6415
|
return x;
|
|
6416
|
-
}, [])),
|
|
6416
|
+
}, [])), D = [
|
|
6417
6417
|
{ accessorKey: "locationCode", header: "Location Code", enableSorting: !1 },
|
|
6418
6418
|
{ accessorKey: "status", header: "Status", enableSorting: !1 },
|
|
6419
6419
|
{ accessorKey: "shiftDate", header: "Shift Date", enableSorting: !1 },
|
|
@@ -6736,14 +6736,14 @@ const Ci = [
|
|
|
6736
6736
|
}, null, 8, ["row-data"])) : s.value === "PURCHASE_ORDER" ? (b(), E(p, {
|
|
6737
6737
|
key: 3,
|
|
6738
6738
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
|
|
6739
|
-
"row-data":
|
|
6739
|
+
"row-data": V.value,
|
|
6740
6740
|
"column-defs": A
|
|
6741
6741
|
}, null, 8, ["row-data"])) : O("", !0),
|
|
6742
6742
|
s.value === "RAW_INVOICE" ? (b(), E(p, {
|
|
6743
6743
|
key: 4,
|
|
6744
6744
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
|
|
6745
6745
|
"row-data": v.value,
|
|
6746
|
-
"column-defs":
|
|
6746
|
+
"column-defs": D
|
|
6747
6747
|
}, null, 8, ["row-data"])) : O("", !0)
|
|
6748
6748
|
]))
|
|
6749
6749
|
]);
|
|
@@ -6768,7 +6768,7 @@ const Ci = [
|
|
|
6768
6768
|
value: "preview",
|
|
6769
6769
|
icon: "table"
|
|
6770
6770
|
}
|
|
6771
|
-
], K = ke(),
|
|
6771
|
+
], K = ke(), V = B(() => {
|
|
6772
6772
|
switch (u.value) {
|
|
6773
6773
|
case "preview":
|
|
6774
6774
|
return rd;
|
|
@@ -6778,7 +6778,7 @@ const Ci = [
|
|
|
6778
6778
|
return null;
|
|
6779
6779
|
}
|
|
6780
6780
|
});
|
|
6781
|
-
return (I,
|
|
6781
|
+
return (I, D) => {
|
|
6782
6782
|
var A;
|
|
6783
6783
|
const c = F("FmPageHead"), g = F("FmTabs");
|
|
6784
6784
|
return b(), U("div", id, [
|
|
@@ -6786,22 +6786,22 @@ const Ci = [
|
|
|
6786
6786
|
title: ((A = e.value) == null ? void 0 : A.name) || "Synergy",
|
|
6787
6787
|
"back-button": !0,
|
|
6788
6788
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
6789
|
-
"onClick:back":
|
|
6789
|
+
"onClick:back": D[0] || (D[0] = (R) => m(K).push({ name: "integrations" }))
|
|
6790
6790
|
}, {
|
|
6791
|
-
description: $e(() =>
|
|
6791
|
+
description: $e(() => D[3] || (D[3] = [
|
|
6792
6792
|
t("div", null, null, -1)
|
|
6793
6793
|
])),
|
|
6794
6794
|
_: 1
|
|
6795
6795
|
}, 8, ["title"]),
|
|
6796
6796
|
l(g, {
|
|
6797
6797
|
"model-value": u.value,
|
|
6798
|
-
"onUpdate:modelValue":
|
|
6798
|
+
"onUpdate:modelValue": D[1] || (D[1] = (R) => u.value = R),
|
|
6799
6799
|
items: v
|
|
6800
6800
|
}, null, 8, ["model-value"]),
|
|
6801
6801
|
t("div", dd, [
|
|
6802
|
-
(b(), E(Pe(
|
|
6802
|
+
(b(), E(Pe(V.value), {
|
|
6803
6803
|
modelValue: e.value,
|
|
6804
|
-
"onUpdate:modelValue":
|
|
6804
|
+
"onUpdate:modelValue": D[2] || (D[2] = (R) => e.value = R)
|
|
6805
6805
|
}, null, 8, ["modelValue"]))
|
|
6806
6806
|
])
|
|
6807
6807
|
]);
|
|
@@ -6810,7 +6810,7 @@ const Ci = [
|
|
|
6810
6810
|
}), ud = {
|
|
6811
6811
|
key: 0,
|
|
6812
6812
|
class: "flex flex-col h-full w-full"
|
|
6813
|
-
}, pd = { class: "flex flex-col gap-16 pb-[24px]" }, cd = { class: "flex flex-row justify-between items-center gap-2" }, fd = { class: "fm-typo-en-title-sm-800" }, gd = { class: "flex flex-row gap-2 items-center" }, vd = { class: "relative group cursor-pointer" }, yd = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, xd = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, bd = { class: "w-[90%] flex flex-col gap-24" }, wd = { class: "flex flex-col gap-16" }, hd = { class: "fm-typo-en-title-sm-800" }, _d = { class: "flex flex-col max-w-[100%]" }, Cd = { class: "w-[25%] font-semibold" }, kd = { class: "flex flex-col max-w-[100%]" }, $d = { class: "w-[25%] font-semibold" }, Ad = { class: "flex flex-col max-w-[100%]" }, Sd = { class: "w-[25%] font-semibold" },
|
|
6813
|
+
}, pd = { class: "flex flex-col gap-16 pb-[24px]" }, cd = { class: "flex flex-row justify-between items-center gap-2" }, fd = { class: "fm-typo-en-title-sm-800" }, gd = { class: "flex flex-row gap-2 items-center" }, vd = { class: "relative group cursor-pointer" }, yd = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, xd = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, bd = { class: "w-[90%] flex flex-col gap-24" }, wd = { class: "flex flex-col gap-16" }, hd = { class: "fm-typo-en-title-sm-800" }, _d = { class: "flex flex-col max-w-[100%]" }, Cd = { class: "w-[25%] font-semibold" }, kd = { class: "flex flex-col max-w-[100%]" }, $d = { class: "w-[25%] font-semibold" }, Ad = { class: "flex flex-col max-w-[100%]" }, Sd = { class: "w-[25%] font-semibold" }, Dd = { class: "grid-cols-2 grid gap-16" }, Vd = { class: "flex flex-col max-w-[100%]" }, Fd = { class: "flex flex-col max-w-[100%]" }, Kd = { class: "flex flex-col max-w-[100%]" }, Id = { class: "flex flex-col max-w-[100%]" }, Md = { class: "flex flex-row items-center justify-between gap-x-16" }, Td = { class: "flex flex-row items-center justify-between gap-x-16" }, Rd = { class: "flex flex-row items-center justify-between gap-x-16" }, Ud = { class: "flex flex-row items-center justify-between gap-x-16" }, Nd = /* @__PURE__ */ oe({
|
|
6814
6814
|
__name: "Setting",
|
|
6815
6815
|
props: /* @__PURE__ */ ue({
|
|
6816
6816
|
errorLogs: {
|
|
@@ -6823,8 +6823,8 @@ const Ci = [
|
|
|
6823
6823
|
}),
|
|
6824
6824
|
emits: ["update:modelValue"],
|
|
6825
6825
|
setup(f) {
|
|
6826
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader:
|
|
6827
|
-
() =>
|
|
6826
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = Se(), v = Te(), K = ke(), { promptLoader: V } = qe(), { promptMessage: I } = ze(), { restaurants: D } = Ae(), { rules: c, notifyUnauthorized: g } = Le(), A = B(
|
|
6827
|
+
() => D.map((d) => ({ label: d.name, value: d.id }))
|
|
6828
6828
|
), R = [
|
|
6829
6829
|
{
|
|
6830
6830
|
label: "By invoice",
|
|
@@ -6845,7 +6845,7 @@ const Ci = [
|
|
|
6845
6845
|
await I({
|
|
6846
6846
|
message: a("report.messages.confirmDelete", { name: e.value.name }),
|
|
6847
6847
|
title: a("report.common.delete")
|
|
6848
|
-
}) && await
|
|
6848
|
+
}) && await V(async () => {
|
|
6849
6849
|
try {
|
|
6850
6850
|
await Oe(e.value._id), await v.getSettings(), K.back();
|
|
6851
6851
|
} catch (o) {
|
|
@@ -6864,7 +6864,7 @@ const Ci = [
|
|
|
6864
6864
|
g(Z.update);
|
|
6865
6865
|
return;
|
|
6866
6866
|
}
|
|
6867
|
-
await
|
|
6867
|
+
await V(async () => {
|
|
6868
6868
|
try {
|
|
6869
6869
|
await Be(e.value._id, e.value), await v.getSettings();
|
|
6870
6870
|
} catch (n) {
|
|
@@ -6873,7 +6873,7 @@ const Ci = [
|
|
|
6873
6873
|
});
|
|
6874
6874
|
}
|
|
6875
6875
|
async function i() {
|
|
6876
|
-
await
|
|
6876
|
+
await V(async () => {
|
|
6877
6877
|
try {
|
|
6878
6878
|
await Ue(e.value._id), await v.getSettings();
|
|
6879
6879
|
} catch (d) {
|
|
@@ -6969,8 +6969,8 @@ const Ci = [
|
|
|
6969
6969
|
class: "flex-grow"
|
|
6970
6970
|
}, null, 8, ["modelValue", "placeholder"])
|
|
6971
6971
|
]),
|
|
6972
|
-
t("div",
|
|
6973
|
-
t("div",
|
|
6972
|
+
t("div", Dd, [
|
|
6973
|
+
t("div", Vd, [
|
|
6974
6974
|
s[20] || (s[20] = t("div", { class: "w-[25%] font-semibold" }, "Endpoint", -1)),
|
|
6975
6975
|
l(o, {
|
|
6976
6976
|
modelValue: e.value.platform.endpoint,
|
|
@@ -7135,9 +7135,9 @@ const Ci = [
|
|
|
7135
7135
|
},
|
|
7136
7136
|
emits: ["update:modelValue"],
|
|
7137
7137
|
setup(f) {
|
|
7138
|
-
const { t: a } = re(), e = se(f, "modelValue"), u = X(!1), v = Se(), K = X([]), { dateRange:
|
|
7138
|
+
const { t: a } = re(), e = se(f, "modelValue"), u = X(!1), v = Se(), K = X([]), { dateRange: V } = Ge(Ae());
|
|
7139
7139
|
Fe(
|
|
7140
|
-
() =>
|
|
7140
|
+
() => V.value,
|
|
7141
7141
|
async () => {
|
|
7142
7142
|
if (e.value._id)
|
|
7143
7143
|
try {
|
|
@@ -7182,7 +7182,7 @@ const Ci = [
|
|
|
7182
7182
|
});
|
|
7183
7183
|
}
|
|
7184
7184
|
return g;
|
|
7185
|
-
}, [])),
|
|
7185
|
+
}, [])), D = [
|
|
7186
7186
|
{ accessorKey: "invoiceNo", header: "Invoice No", enableSorting: !1 },
|
|
7187
7187
|
// { accessorKey: "refNo", header: "Ref No", enableSorting: false },
|
|
7188
7188
|
{ accessorKey: "status", header: "Status", enableSorting: !1 },
|
|
@@ -7220,8 +7220,8 @@ const Ci = [
|
|
|
7220
7220
|
return b(), U("div", Pd, [
|
|
7221
7221
|
t("div", Ld, [
|
|
7222
7222
|
l(He, {
|
|
7223
|
-
"date-range": m(
|
|
7224
|
-
"onUpdate:dateRange": A[0] || (A[0] = (i) => Ne(
|
|
7223
|
+
"date-range": m(V),
|
|
7224
|
+
"onUpdate:dateRange": A[0] || (A[0] = (i) => Ne(V) ? V.value = i : null),
|
|
7225
7225
|
compare: !1
|
|
7226
7226
|
}, null, 8, ["date-range"]),
|
|
7227
7227
|
l(R, {
|
|
@@ -7239,7 +7239,7 @@ const Ci = [
|
|
|
7239
7239
|
key: 1,
|
|
7240
7240
|
class: "flex p-5 border border-fm-color-border-secondary rounded-lg h-auto min-w-full",
|
|
7241
7241
|
"row-data": I.value,
|
|
7242
|
-
"column-defs":
|
|
7242
|
+
"column-defs": D
|
|
7243
7243
|
}, null, 8, ["row-data"]))
|
|
7244
7244
|
])
|
|
7245
7245
|
]);
|
|
@@ -7269,7 +7269,7 @@ const Ci = [
|
|
|
7269
7269
|
value: "preview",
|
|
7270
7270
|
icon: "table"
|
|
7271
7271
|
}
|
|
7272
|
-
],
|
|
7272
|
+
], V = ke(), I = B(() => {
|
|
7273
7273
|
switch (v.value) {
|
|
7274
7274
|
case "preview":
|
|
7275
7275
|
return {
|
|
@@ -7286,7 +7286,7 @@ const Ci = [
|
|
|
7286
7286
|
return null;
|
|
7287
7287
|
}
|
|
7288
7288
|
});
|
|
7289
|
-
return (
|
|
7289
|
+
return (D, c) => {
|
|
7290
7290
|
var R, w, y;
|
|
7291
7291
|
const g = F("FmPageHead"), A = F("FmTabs");
|
|
7292
7292
|
return b(), U("div", Yd, [
|
|
@@ -7294,7 +7294,7 @@ const Ci = [
|
|
|
7294
7294
|
title: ((R = u.value) == null ? void 0 : R.name) || "Codemax POS",
|
|
7295
7295
|
"back-button": !0,
|
|
7296
7296
|
style: { paddingLeft: "0px", paddingRight: "0px" },
|
|
7297
|
-
"onClick:back": c[0] || (c[0] = (i) => m(
|
|
7297
|
+
"onClick:back": c[0] || (c[0] = (i) => m(V).push({ name: "integrations" }))
|
|
7298
7298
|
}, {
|
|
7299
7299
|
description: $e(() => c[3] || (c[3] = [
|
|
7300
7300
|
t("div", null, null, -1)
|
|
@@ -7318,12 +7318,12 @@ const Ci = [
|
|
|
7318
7318
|
}), Hd = { class: "px-24 h-full relative" }, am = /* @__PURE__ */ oe({
|
|
7319
7319
|
__name: "Integration",
|
|
7320
7320
|
setup(f) {
|
|
7321
|
-
const a = X(void 0), e = mt(), u = ke(), v = Te(), K = X(),
|
|
7321
|
+
const a = X(void 0), e = mt(), u = ke(), v = Te(), K = X(), V = X([]), { rules: I, notifyUnauthorized: D } = Le(), c = X(!1), g = X(v.settings.length > 0);
|
|
7322
7322
|
lt(async () => {
|
|
7323
7323
|
try {
|
|
7324
7324
|
v.settings.length === 0 && await v.getSettings();
|
|
7325
7325
|
} catch {
|
|
7326
|
-
K.value = void 0, a.value = void 0,
|
|
7326
|
+
K.value = void 0, a.value = void 0, V.value = [], await u.replace({ name: "integrations", query: e.query });
|
|
7327
7327
|
} finally {
|
|
7328
7328
|
g.value = !0;
|
|
7329
7329
|
}
|
|
@@ -7334,7 +7334,7 @@ const Ci = [
|
|
|
7334
7334
|
if (!y) return;
|
|
7335
7335
|
const i = Array.isArray(w) ? w[0] : w, _ = R.find((s) => s._id === i);
|
|
7336
7336
|
if (!_) {
|
|
7337
|
-
K.value = void 0, a.value = void 0,
|
|
7337
|
+
K.value = void 0, a.value = void 0, V.value = [], await u.replace({ name: "integrations", query: e.query });
|
|
7338
7338
|
return;
|
|
7339
7339
|
}
|
|
7340
7340
|
if (_) {
|
|
@@ -7344,10 +7344,10 @@ const Ci = [
|
|
|
7344
7344
|
rules: I.value,
|
|
7345
7345
|
action: Z.read
|
|
7346
7346
|
}) && !c.value) {
|
|
7347
|
-
c.value = !0,
|
|
7347
|
+
c.value = !0, D(Z.read), u.replace({ name: "integrations", query: e.query });
|
|
7348
7348
|
return;
|
|
7349
7349
|
}
|
|
7350
|
-
K.value = _, a.value = (d = K.value.platform) == null ? void 0 : d.name, K.value._id && (
|
|
7350
|
+
K.value = _, a.value = (d = K.value.platform) == null ? void 0 : d.name, K.value._id && (V.value = await _t(K.value._id));
|
|
7351
7351
|
}
|
|
7352
7352
|
},
|
|
7353
7353
|
{ immediate: !0 }
|
|
@@ -7380,7 +7380,7 @@ const Ci = [
|
|
|
7380
7380
|
(b(), E(Pe(A.value), {
|
|
7381
7381
|
modelValue: K.value,
|
|
7382
7382
|
"onUpdate:modelValue": w[0] || (w[0] = (y) => K.value = y),
|
|
7383
|
-
"error-logs":
|
|
7383
|
+
"error-logs": V.value
|
|
7384
7384
|
}, null, 8, ["modelValue", "error-logs"]))
|
|
7385
7385
|
]));
|
|
7386
7386
|
}
|