alytus-ff 0.1.38 → 0.1.39
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/alytus-ff.js +733 -546
- package/dist/alytus-ff.umd.cjs +1 -1
- package/dist/bundle-stats.html +1 -1
- package/dist/components/DataTable/filters/SearchFilter.vue.d.ts +29 -0
- package/dist/components/Dialog/ConfirmPopup.vue.d.ts +39 -0
- package/dist/components/Form/FieldLabel.vue.d.ts +9 -0
- package/dist/components/Workspace/UserStatusChip.vue.d.ts +19 -0
- package/dist/index.d.ts +9 -3
- package/dist/style.css +1 -1
- package/dist/types/Api.d.ts +7 -0
- package/dist/types/DataTable.d.ts +1 -1
- package/dist/types/PermissionSet.d.ts +6 -0
- package/dist/types/User.d.ts +11 -0
- package/dist/types/WorkspaceMember.d.ts +20 -0
- package/package.json +1 -1
- package/src/components/DataTable/filters/SearchFilter.vue +47 -0
- package/src/components/Dialog/ConfirmPopup.vue +40 -0
- package/src/components/Form/FieldLabel.vue +5 -1
- package/src/components/Workspace/UserStatusChip.vue +40 -0
package/dist/alytus-ff.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { defineStore as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { ref as S, defineComponent as
|
|
4
|
-
import { useRouter as
|
|
5
|
-
const
|
|
6
|
-
const { t: e } =
|
|
1
|
+
import { defineStore as Q } from "pinia";
|
|
2
|
+
import { useI18n as I } from "vue-i18n";
|
|
3
|
+
import { ref as S, defineComponent as k, createElementBlock as g, openBlock as c, createElementVNode as $, createCommentVNode as L, toDisplayString as y, renderSlot as T, normalizeClass as E, resolveComponent as s, createBlock as h, withCtx as o, Fragment as P, renderList as U, createVNode as u, createTextVNode as C, computed as V, normalizeProps as x, guardReactiveProps as ee, mergeProps as D, resolveDynamicComponent as F, normalizeStyle as te, watch as ne, inject as oe, unref as re } from "vue";
|
|
4
|
+
import { useRouter as le, useRoute as se } from "vue-router";
|
|
5
|
+
const ae = Q("page", () => {
|
|
6
|
+
const { t: e } = I();
|
|
7
7
|
function t(d) {
|
|
8
8
|
return d;
|
|
9
9
|
}
|
|
10
|
-
const n = S(!1),
|
|
11
|
-
function
|
|
12
|
-
|
|
10
|
+
const n = S(!1), r = S(null), a = S(null), m = S(null);
|
|
11
|
+
function l(d, b, v) {
|
|
12
|
+
r.value = d, m.value = b, a.value = v, n.value = !0;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function p(d) {
|
|
15
15
|
if (d instanceof XMLHttpRequest)
|
|
16
|
-
|
|
16
|
+
l(null, d.statusText, d.status);
|
|
17
17
|
else if (d.response !== void 0)
|
|
18
18
|
switch (d.response.status) {
|
|
19
19
|
case 500:
|
|
20
|
-
|
|
20
|
+
l(null, e("ErrTitle__An error has occurred."), 500);
|
|
21
21
|
break;
|
|
22
22
|
case 504:
|
|
23
|
-
|
|
23
|
+
l(null, "Network timeout, please try again.", 504);
|
|
24
24
|
break;
|
|
25
25
|
case 403:
|
|
26
|
-
|
|
26
|
+
l(null, "Insufficient permissions to perform this action.", 503);
|
|
27
27
|
break;
|
|
28
28
|
case 404:
|
|
29
|
-
|
|
29
|
+
l(null, e("Not found."), 404);
|
|
30
30
|
break;
|
|
31
31
|
case 409:
|
|
32
|
-
|
|
32
|
+
l(null, "Concurrency error. Please reload page and make your changes again.", 409);
|
|
33
33
|
break;
|
|
34
34
|
case 417:
|
|
35
|
-
|
|
35
|
+
l(null, "Product version mismatch.", 417);
|
|
36
36
|
break;
|
|
37
37
|
default:
|
|
38
|
-
d.response.data && Array.isArray(d.response.data) && d.response.data.length === 1 ?
|
|
38
|
+
d.response.data && Array.isArray(d.response.data) && d.response.data.length === 1 ? l(null, d.response.data[0], null) : l(null, d.response.statusText, d.status);
|
|
39
39
|
break;
|
|
40
40
|
}
|
|
41
|
-
else d.name && d.name === "AxiosError" ?
|
|
41
|
+
else d.name && d.name === "AxiosError" ? l(null, d.message, null) : typeof d == "string" ? l(null, d, null) : l(d.title, d.details, d.code);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
43
|
+
function _(d) {
|
|
44
|
+
p(d);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function i() {
|
|
47
47
|
n.value = !1, setTimeout(() => {
|
|
48
|
-
|
|
48
|
+
r.value = null, a.value = null, m.value = null;
|
|
49
49
|
}, 250);
|
|
50
50
|
}
|
|
51
|
-
return { errorDialog: n, errorTitle:
|
|
52
|
-
}),
|
|
51
|
+
return { errorDialog: n, errorTitle: r, errorDetails: m, errorCode: a, showError: _, closeError: i };
|
|
52
|
+
}), ie = k({
|
|
53
53
|
name: "PageTitle",
|
|
54
54
|
props: {
|
|
55
55
|
title: {
|
|
@@ -63,25 +63,25 @@ const le = X("page", () => {
|
|
|
63
63
|
}
|
|
64
64
|
}), A = (e, t) => {
|
|
65
65
|
const n = e.__vccOpts || e;
|
|
66
|
-
for (const [
|
|
67
|
-
n[
|
|
66
|
+
for (const [r, a] of t)
|
|
67
|
+
n[r] = a;
|
|
68
68
|
return n;
|
|
69
|
-
},
|
|
69
|
+
}, ue = { class: "mt-6 mb-3 ff-page-title" }, ce = { class: "text-h5 ff-title" }, de = {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: "text-body-2 ff-description"
|
|
72
72
|
};
|
|
73
|
-
function
|
|
74
|
-
return
|
|
73
|
+
function me(e, t, n, r, a, m) {
|
|
74
|
+
return c(), g("div", ue, [
|
|
75
75
|
$("div", null, [
|
|
76
|
-
$("span",
|
|
77
|
-
e.description ? (
|
|
76
|
+
$("span", ce, y(e.title), 1),
|
|
77
|
+
e.description ? (c(), g("div", de, y(e.description), 1)) : L("", !0)
|
|
78
78
|
]),
|
|
79
79
|
$("div", null, [
|
|
80
80
|
T(e.$slots, "buttons")
|
|
81
81
|
])
|
|
82
82
|
]);
|
|
83
83
|
}
|
|
84
|
-
const
|
|
84
|
+
const Hn = /* @__PURE__ */ A(ie, [["render", me]]), pe = k({
|
|
85
85
|
name: "PageSubtitle",
|
|
86
86
|
props: {
|
|
87
87
|
subtitle: {
|
|
@@ -93,18 +93,18 @@ const hn = /* @__PURE__ */ A(se, [["render", ce]]), de = M({
|
|
|
93
93
|
default: !1
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
}),
|
|
97
|
-
function
|
|
98
|
-
return
|
|
96
|
+
}), fe = { class: "text-h6 font-weight-bold" };
|
|
97
|
+
function ve(e, t, n, r, a, m) {
|
|
98
|
+
return c(), g("div", {
|
|
99
99
|
class: E([e.firstPosition ? "mt-0" : "", "ff-page-subtitle"])
|
|
100
100
|
}, [
|
|
101
|
-
$("div",
|
|
101
|
+
$("div", fe, y(e.subtitle), 1),
|
|
102
102
|
$("div", null, [
|
|
103
103
|
T(e.$slots, "buttons")
|
|
104
104
|
])
|
|
105
105
|
], 2);
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const Sn = /* @__PURE__ */ A(pe, [["render", ve]]), _e = k({
|
|
108
108
|
name: "InnerLeftMenu",
|
|
109
109
|
components: {},
|
|
110
110
|
props: {
|
|
@@ -114,22 +114,22 @@ const bn = /* @__PURE__ */ A(de, [["render", pe]]), fe = M({
|
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
setup() {
|
|
117
|
-
const e =
|
|
118
|
-
return { goTo: (
|
|
117
|
+
const e = le(), t = se();
|
|
118
|
+
return { goTo: (a) => e.push(a), isActive: (a) => t.fullPath.startsWith(a) };
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
function
|
|
122
|
-
const
|
|
123
|
-
return
|
|
121
|
+
function ge(e, t, n, r, a, m) {
|
|
122
|
+
const l = s("v-list-item-title"), p = s("v-list-item"), _ = s("v-list");
|
|
123
|
+
return c(), h(_, { class: "inner-left-menu mobile-horizontal" }, {
|
|
124
124
|
default: o(() => [
|
|
125
|
-
(
|
|
126
|
-
active: e.isActive(
|
|
127
|
-
onClick: (d) => e.goTo(
|
|
125
|
+
(c(!0), g(P, null, U(e.items, (i) => (c(), h(p, {
|
|
126
|
+
active: e.isActive(i.link),
|
|
127
|
+
onClick: (d) => e.goTo(i.link)
|
|
128
128
|
}, {
|
|
129
129
|
default: o(() => [
|
|
130
|
-
|
|
130
|
+
u(l, null, {
|
|
131
131
|
default: o(() => [
|
|
132
|
-
|
|
132
|
+
C(y(i.text), 1)
|
|
133
133
|
]),
|
|
134
134
|
_: 2
|
|
135
135
|
}, 1024)
|
|
@@ -140,13 +140,13 @@ function ve(e, t, n, a, l, m) {
|
|
|
140
140
|
_: 1
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
const
|
|
144
|
-
var
|
|
145
|
-
const
|
|
143
|
+
const Pn = /* @__PURE__ */ A(_e, [["render", ge]]);
|
|
144
|
+
var ye = "M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z", Z = "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z", $e = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z", he = "M9,3H11V5H9V3M13,3H15V5H13V3M9,7H11V9H9V7M13,7H15V9H13V7M9,11H11V13H9V11M13,11H15V13H13V11M9,15H11V17H9V15M13,15H15V17H13V15M9,19H11V21H9V19M13,19H15V21H13V19Z", be = "M22,18V22H18V19H15V16H12L9.74,13.74C9.19,13.91 8.61,14 8,14A6,6 0 0,1 2,8A6,6 0 0,1 8,2A6,6 0 0,1 14,8C14,8.61 13.91,9.19 13.74,9.74L22,18M7,5A2,2 0 0,0 5,7A2,2 0 0,0 7,9A2,2 0 0,0 9,7A2,2 0 0,0 7,5Z", ke = "M17 7L15.59 8.41L18.17 11H8V13H18.17L15.59 15.58L17 17L22 12M4 5H12V3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H12V19H4V5Z", W = "M7,10L12,15L17,10H7Z", Ae = "M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z", Ce = "M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z", Me = "M16,5V18H21V5M4,18H9V5H4M10,18H15V5H10V18Z";
|
|
145
|
+
const Ve = k({
|
|
146
146
|
name: "CustomDialog",
|
|
147
147
|
methods: {
|
|
148
148
|
mdiClose() {
|
|
149
|
-
return
|
|
149
|
+
return $e;
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
props: {
|
|
@@ -175,10 +175,10 @@ const Ae = M({
|
|
|
175
175
|
default: !1
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
}),
|
|
179
|
-
function
|
|
180
|
-
const
|
|
181
|
-
return
|
|
178
|
+
}), Le = { class: "close-btn" };
|
|
179
|
+
function we(e, t, n, r, a, m) {
|
|
180
|
+
const l = s("v-btn"), p = s("v-card-text"), _ = s("v-spacer"), i = s("v-card-actions"), d = s("v-card"), b = s("v-dialog");
|
|
181
|
+
return c(), h(b, {
|
|
182
182
|
"model-value": e.value,
|
|
183
183
|
"max-width": "960",
|
|
184
184
|
persistent: e.persistent,
|
|
@@ -189,13 +189,13 @@ function Ve(e, t, n, a, l, m) {
|
|
|
189
189
|
}, {
|
|
190
190
|
default: o(() => [
|
|
191
191
|
T(e.$slots, "card", {}, () => [
|
|
192
|
-
|
|
192
|
+
u(d, {
|
|
193
193
|
title: e.title,
|
|
194
194
|
class: E(e.fullHeight ? "ff-full-height" : "")
|
|
195
195
|
}, {
|
|
196
196
|
append: o(() => [
|
|
197
|
-
$("div",
|
|
198
|
-
|
|
197
|
+
$("div", Le, [
|
|
198
|
+
u(l, {
|
|
199
199
|
variant: "text",
|
|
200
200
|
icon: e.mdiClose(),
|
|
201
201
|
onClick: t[0] || (t[0] = (v) => e.$emit("close"))
|
|
@@ -203,16 +203,16 @@ function Ve(e, t, n, a, l, m) {
|
|
|
203
203
|
])
|
|
204
204
|
]),
|
|
205
205
|
default: o(() => [
|
|
206
|
-
|
|
206
|
+
u(p, null, {
|
|
207
207
|
default: o(() => [
|
|
208
208
|
T(e.$slots, "default")
|
|
209
209
|
]),
|
|
210
210
|
_: 3
|
|
211
211
|
}),
|
|
212
|
-
e.noFooter ?
|
|
212
|
+
e.noFooter ? L("", !0) : (c(), h(i, { key: 0 }, {
|
|
213
213
|
default: o(() => [
|
|
214
214
|
T(e.$slots, "left-footer"),
|
|
215
|
-
|
|
215
|
+
u(_),
|
|
216
216
|
T(e.$slots, "footer")
|
|
217
217
|
]),
|
|
218
218
|
_: 3
|
|
@@ -225,7 +225,7 @@ function Ve(e, t, n, a, l, m) {
|
|
|
225
225
|
_: 3
|
|
226
226
|
}, 8, ["model-value", "persistent", "fullscreen", "class", "content-class"]);
|
|
227
227
|
}
|
|
228
|
-
const
|
|
228
|
+
const He = /* @__PURE__ */ A(Ve, [["render", we]]), Se = k({
|
|
229
229
|
name: "AccountAvatar",
|
|
230
230
|
props: {
|
|
231
231
|
item: {
|
|
@@ -238,19 +238,19 @@ const Le = /* @__PURE__ */ A(Ae, [["render", Ve]]), He = M({
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
});
|
|
241
|
-
function
|
|
242
|
-
const
|
|
243
|
-
return
|
|
241
|
+
function Pe(e, t, n, r, a, m) {
|
|
242
|
+
const l = s("v-avatar");
|
|
243
|
+
return c(), h(l, {
|
|
244
244
|
class: E(`ff-avatar avatar-${e.size}-${e.item.initials.length >= 3 ? "l" : "s"}`),
|
|
245
245
|
size: e.size
|
|
246
246
|
}, {
|
|
247
247
|
default: o(() => [
|
|
248
|
-
|
|
248
|
+
C(y(e.item.initials), 1)
|
|
249
249
|
]),
|
|
250
250
|
_: 1
|
|
251
251
|
}, 8, ["class", "size"]);
|
|
252
252
|
}
|
|
253
|
-
const
|
|
253
|
+
const K = /* @__PURE__ */ A(Se, [["render", Pe]]), z = (e) => e.surname ? `${e.name} ${e.surname}` : e.name, Un = (e) => e == null ? "" : e.name ? e.surname ? `${e.name.trim().substring(0, 1).toUpperCase()}${e.surname.trim().substring(0, 1).toUpperCase()}` : e.name.trim().substring(0, 1).toUpperCase() : e.surname ? e.surname.trim().substring(0, 1).toUpperCase() : "", Ue = k({
|
|
254
254
|
name: "UserAvatar",
|
|
255
255
|
props: {
|
|
256
256
|
user: {
|
|
@@ -267,43 +267,43 @@ const G = /* @__PURE__ */ A(He, [["render", we]]), I = (e) => e.surname ? `${e.n
|
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
269
|
setup(e) {
|
|
270
|
-
return { fullName: V(() =>
|
|
270
|
+
return { fullName: V(() => z(e.user)) };
|
|
271
271
|
}
|
|
272
|
-
}),
|
|
273
|
-
function
|
|
274
|
-
const
|
|
275
|
-
return
|
|
272
|
+
}), De = { key: 1 };
|
|
273
|
+
function Ee(e, t, n, r, a, m) {
|
|
274
|
+
const l = s("v-img"), p = s("v-avatar");
|
|
275
|
+
return c(), h(p, {
|
|
276
276
|
color: e.user.avatar_thumb ? "light_grey_bg" : e.user.color ?? "primary",
|
|
277
277
|
class: E(`avatar-${e.size}-${e.user.initials.length >= 3 ? "l" : "s"}`),
|
|
278
278
|
size: e.size
|
|
279
279
|
}, {
|
|
280
280
|
default: o(() => [
|
|
281
|
-
e.user.avatar_thumb ? (
|
|
281
|
+
e.user.avatar_thumb ? (c(), h(l, {
|
|
282
282
|
key: 0,
|
|
283
283
|
alt: e.fullName,
|
|
284
284
|
src: `${e.baseUrl}/${e.user.avatar_thumb}`
|
|
285
|
-
}, null, 8, ["alt", "src"])) : (
|
|
285
|
+
}, null, 8, ["alt", "src"])) : (c(), g("span", De, y(e.user.initials), 1))
|
|
286
286
|
]),
|
|
287
287
|
_: 1
|
|
288
288
|
}, 8, ["color", "class", "size"]);
|
|
289
289
|
}
|
|
290
|
-
const B = /* @__PURE__ */ A(
|
|
290
|
+
const B = /* @__PURE__ */ A(Ue, [["render", Ee]]), Te = k({
|
|
291
291
|
name: "UserMenu",
|
|
292
|
-
components: { AccountAvatar:
|
|
292
|
+
components: { AccountAvatar: K, UserAvatar: B },
|
|
293
293
|
methods: {
|
|
294
294
|
mdiLogout() {
|
|
295
|
-
return
|
|
295
|
+
return ke;
|
|
296
296
|
},
|
|
297
297
|
mdiAccount() {
|
|
298
|
-
return
|
|
298
|
+
return ye;
|
|
299
299
|
},
|
|
300
300
|
mdiMenuDown() {
|
|
301
|
-
return
|
|
301
|
+
return W;
|
|
302
302
|
},
|
|
303
303
|
mdiCheck() {
|
|
304
304
|
return Z;
|
|
305
305
|
},
|
|
306
|
-
formatFullName:
|
|
306
|
+
formatFullName: z
|
|
307
307
|
},
|
|
308
308
|
props: {
|
|
309
309
|
currentUser: {
|
|
@@ -343,60 +343,60 @@ const B = /* @__PURE__ */ A(Se, [["render", Ue]]), De = M({
|
|
|
343
343
|
"log-out"
|
|
344
344
|
],
|
|
345
345
|
setup(e, { emit: t }) {
|
|
346
|
-
const { t: n } =
|
|
347
|
-
return { isOpen:
|
|
348
|
-
e.multipleAccounts ? t(
|
|
346
|
+
const { t: n } = I(), r = S(!1), a = S(!1), m = V(() => e.currentUser != null ? z(e.currentUser) : "-"), l = V(() => e.currentAccounts.map((v) => v.id)), p = V(() => e.currentAccounts.length === 1 ? z(e.currentAccounts[0]) : `${e.currentAccounts.length} ${n("aff.workspaces")}`);
|
|
347
|
+
return { isOpen: r, userName: m, langMenu: a, accountIds: l, accountTitle: p, selectAccount: (v) => {
|
|
348
|
+
e.multipleAccounts ? t(l.value.indexOf(v.id) >= 0 ? "unselect-account" : "select-account", v) : t("select-account", v);
|
|
349
349
|
}, openProfile: () => {
|
|
350
|
-
t("open-profile"),
|
|
350
|
+
t("open-profile"), r.value = !1;
|
|
351
351
|
}, switchLang: (v) => {
|
|
352
|
-
t("switch-lang", v),
|
|
352
|
+
t("switch-lang", v), a.value = !1;
|
|
353
353
|
}, logOut: () => {
|
|
354
|
-
t("log-out"),
|
|
354
|
+
t("log-out"), r.value = !1;
|
|
355
355
|
} };
|
|
356
356
|
}
|
|
357
|
-
}),
|
|
358
|
-
function
|
|
359
|
-
const
|
|
360
|
-
return
|
|
357
|
+
}), Ie = { class: "ff-user-btn-text" }, Oe = { class: "name" }, qe = { class: "comp" }, Ne = { class: "as-avatar" }, Fe = ["src"], ze = ["src"], Be = { class: "as-avatar" }, Re = { class: "as-avatar" };
|
|
358
|
+
function je(e, t, n, r, a, m) {
|
|
359
|
+
const l = s("UserAvatar"), p = s("v-btn"), _ = s("v-list-subheader"), i = s("v-list-item"), d = s("AccountAvatar"), b = s("v-list-item-title"), v = s("v-icon"), f = s("v-list"), H = s("v-menu"), O = s("v-card-text"), R = s("v-card");
|
|
360
|
+
return c(), h(H, {
|
|
361
361
|
modelValue: e.isOpen,
|
|
362
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
362
|
+
"onUpdate:modelValue": t[2] || (t[2] = (M) => e.isOpen = M),
|
|
363
363
|
"close-on-content-click": !1
|
|
364
364
|
}, {
|
|
365
|
-
activator: o(({ props:
|
|
366
|
-
|
|
365
|
+
activator: o(({ props: M }) => [
|
|
366
|
+
u(p, D(M, { class: "ff-user-btn" }), {
|
|
367
367
|
default: o(() => [
|
|
368
|
-
|
|
368
|
+
u(l, {
|
|
369
369
|
size: 32,
|
|
370
370
|
user: e.currentUser,
|
|
371
371
|
"base-url": e.baseUrl + "/avatars"
|
|
372
372
|
}, null, 8, ["user", "base-url"]),
|
|
373
|
-
$("div",
|
|
374
|
-
$("div",
|
|
375
|
-
$("div",
|
|
373
|
+
$("div", Ie, [
|
|
374
|
+
$("div", Oe, y(e.userName), 1),
|
|
375
|
+
$("div", qe, y(e.accountTitle), 1)
|
|
376
376
|
])
|
|
377
377
|
]),
|
|
378
378
|
_: 1
|
|
379
379
|
}, 16)
|
|
380
380
|
]),
|
|
381
381
|
default: o(() => [
|
|
382
|
-
|
|
382
|
+
u(R, { class: "ff-user-manu-card" }, {
|
|
383
383
|
default: o(() => [
|
|
384
|
-
|
|
384
|
+
u(O, { class: "pa-0" }, {
|
|
385
385
|
default: o(() => [
|
|
386
|
-
|
|
386
|
+
u(f, null, {
|
|
387
387
|
default: o(() => [
|
|
388
|
-
|
|
388
|
+
u(_, null, {
|
|
389
389
|
default: o(() => [
|
|
390
|
-
|
|
390
|
+
C(y(e.$t("aff.Logged in as")) + ":", 1)
|
|
391
391
|
]),
|
|
392
392
|
_: 1
|
|
393
393
|
}),
|
|
394
|
-
|
|
394
|
+
u(i, {
|
|
395
395
|
title: e.userName,
|
|
396
396
|
subtitle: e.currentUser?.email ?? ""
|
|
397
397
|
}, {
|
|
398
398
|
prepend: o(() => [
|
|
399
|
-
|
|
399
|
+
u(l, {
|
|
400
400
|
size: 32,
|
|
401
401
|
user: e.currentUser,
|
|
402
402
|
"base-url": e.baseUrl + "/avatars"
|
|
@@ -404,48 +404,48 @@ function Ne(e, t, n, a, l, m) {
|
|
|
404
404
|
]),
|
|
405
405
|
_: 1
|
|
406
406
|
}, 8, ["title", "subtitle"]),
|
|
407
|
-
|
|
407
|
+
u(_, null, {
|
|
408
408
|
default: o(() => [
|
|
409
|
-
|
|
409
|
+
C(y(e.$t("aff.Choose active company")) + ":", 1)
|
|
410
410
|
]),
|
|
411
411
|
_: 1
|
|
412
412
|
}),
|
|
413
|
-
(
|
|
414
|
-
key:
|
|
415
|
-
onClick: (
|
|
413
|
+
(c(!0), g(P, null, U(e.accounts, (M) => (c(), h(i, {
|
|
414
|
+
key: M.id,
|
|
415
|
+
onClick: (j) => e.selectAccount(M)
|
|
416
416
|
}, {
|
|
417
417
|
prepend: o(() => [
|
|
418
|
-
|
|
418
|
+
u(d, { item: M }, null, 8, ["item"])
|
|
419
419
|
]),
|
|
420
420
|
append: o(() => [
|
|
421
|
-
|
|
422
|
-
color: e.accountIds.indexOf(
|
|
421
|
+
u(v, {
|
|
422
|
+
color: e.accountIds.indexOf(M.id) >= 0 ? "primary" : "white",
|
|
423
423
|
icon: e.mdiCheck()
|
|
424
424
|
}, null, 8, ["color", "icon"])
|
|
425
425
|
]),
|
|
426
426
|
default: o(() => [
|
|
427
|
-
|
|
427
|
+
u(b, null, {
|
|
428
428
|
default: o(() => [
|
|
429
|
-
|
|
429
|
+
C(y(e.formatFullName(M)), 1)
|
|
430
430
|
]),
|
|
431
431
|
_: 2
|
|
432
432
|
}, 1024)
|
|
433
433
|
]),
|
|
434
434
|
_: 2
|
|
435
435
|
}, 1032, ["onClick"]))), 128)),
|
|
436
|
-
|
|
436
|
+
u(_, null, {
|
|
437
437
|
default: o(() => [
|
|
438
|
-
|
|
438
|
+
C(y(e.$t("aff.Actions")) + ":", 1)
|
|
439
439
|
]),
|
|
440
440
|
_: 1
|
|
441
441
|
}),
|
|
442
|
-
e.langs.length > 1 ? (
|
|
442
|
+
e.langs.length > 1 ? (c(), h(i, {
|
|
443
443
|
key: 0,
|
|
444
444
|
"append-icon": e.mdiMenuDown(),
|
|
445
|
-
onClick: t[1] || (t[1] = (
|
|
445
|
+
onClick: t[1] || (t[1] = (M) => e.langMenu = !0)
|
|
446
446
|
}, {
|
|
447
447
|
prepend: o(() => [
|
|
448
|
-
$("div",
|
|
448
|
+
$("div", Ne, [
|
|
449
449
|
$("img", {
|
|
450
450
|
src: e.currentLang.icon,
|
|
451
451
|
height: "15",
|
|
@@ -455,27 +455,27 @@ function Ne(e, t, n, a, l, m) {
|
|
|
455
455
|
])
|
|
456
456
|
]),
|
|
457
457
|
default: o(() => [
|
|
458
|
-
|
|
458
|
+
u(b, null, {
|
|
459
459
|
default: o(() => [
|
|
460
|
-
|
|
460
|
+
u(H, {
|
|
461
461
|
modelValue: e.langMenu,
|
|
462
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
462
|
+
"onUpdate:modelValue": t[0] || (t[0] = (M) => e.langMenu = M),
|
|
463
463
|
"close-on-content-click": !1
|
|
464
464
|
}, {
|
|
465
|
-
activator: o(({ props:
|
|
466
|
-
$("span",
|
|
465
|
+
activator: o(({ props: M }) => [
|
|
466
|
+
$("span", x(ee(M)), y(e.currentLang.title), 17)
|
|
467
467
|
]),
|
|
468
468
|
default: o(() => [
|
|
469
|
-
|
|
469
|
+
u(f, null, {
|
|
470
470
|
default: o(() => [
|
|
471
|
-
(
|
|
472
|
-
key:
|
|
473
|
-
title:
|
|
474
|
-
onClick: (
|
|
471
|
+
(c(!0), g(P, null, U(e.langs, (M) => (c(), h(i, {
|
|
472
|
+
key: M.value,
|
|
473
|
+
title: M.title,
|
|
474
|
+
onClick: (j) => e.switchLang(M)
|
|
475
475
|
}, {
|
|
476
476
|
prepend: o(() => [
|
|
477
477
|
$("img", {
|
|
478
|
-
src:
|
|
478
|
+
src: M.icon,
|
|
479
479
|
height: "18",
|
|
480
480
|
width: "24",
|
|
481
481
|
alt: "",
|
|
@@ -495,27 +495,27 @@ function Ne(e, t, n, a, l, m) {
|
|
|
495
495
|
})
|
|
496
496
|
]),
|
|
497
497
|
_: 1
|
|
498
|
-
}, 8, ["append-icon"])) :
|
|
499
|
-
|
|
498
|
+
}, 8, ["append-icon"])) : L("", !0),
|
|
499
|
+
u(i, {
|
|
500
500
|
title: e.$t("aff.Profile settings"),
|
|
501
501
|
onClick: e.openProfile
|
|
502
502
|
}, {
|
|
503
503
|
prepend: o(() => [
|
|
504
|
-
$("div",
|
|
505
|
-
|
|
504
|
+
$("div", Be, [
|
|
505
|
+
u(v, {
|
|
506
506
|
icon: e.mdiAccount()
|
|
507
507
|
}, null, 8, ["icon"])
|
|
508
508
|
])
|
|
509
509
|
]),
|
|
510
510
|
_: 1
|
|
511
511
|
}, 8, ["title", "onClick"]),
|
|
512
|
-
|
|
512
|
+
u(i, {
|
|
513
513
|
title: e.$t("aff.Log out"),
|
|
514
514
|
onClick: e.logOut
|
|
515
515
|
}, {
|
|
516
516
|
prepend: o(() => [
|
|
517
|
-
$("div",
|
|
518
|
-
|
|
517
|
+
$("div", Re, [
|
|
518
|
+
u(v, {
|
|
519
519
|
icon: e.mdiLogout()
|
|
520
520
|
}, null, 8, ["icon"])
|
|
521
521
|
])
|
|
@@ -535,7 +535,7 @@ function Ne(e, t, n, a, l, m) {
|
|
|
535
535
|
_: 1
|
|
536
536
|
}, 8, ["modelValue"]);
|
|
537
537
|
}
|
|
538
|
-
const
|
|
538
|
+
const Dn = /* @__PURE__ */ A(Te, [["render", je]]), Ge = k({
|
|
539
539
|
name: "ErrorDialog",
|
|
540
540
|
props: {
|
|
541
541
|
show: {
|
|
@@ -557,38 +557,38 @@ const An = /* @__PURE__ */ A(De, [["render", Ne]]), Re = M({
|
|
|
557
557
|
},
|
|
558
558
|
emits: ["close"],
|
|
559
559
|
setup(e) {
|
|
560
|
-
const { t } =
|
|
560
|
+
const { t } = I();
|
|
561
561
|
return { title: V(() => e.errorTitle ?? t("aff.Error occurred")) };
|
|
562
562
|
}
|
|
563
|
-
}),
|
|
564
|
-
function
|
|
565
|
-
const
|
|
566
|
-
return
|
|
563
|
+
}), Ze = ["innerHTML"], Ke = { key: 1 };
|
|
564
|
+
function Ye(e, t, n, r, a, m) {
|
|
565
|
+
const l = s("v-card-text"), p = s("v-spacer"), _ = s("v-btn"), i = s("v-card-actions"), d = s("v-card"), b = s("v-dialog");
|
|
566
|
+
return c(), h(b, {
|
|
567
567
|
"max-width": "500",
|
|
568
568
|
"model-value": e.show,
|
|
569
569
|
onClose: t[1] || (t[1] = (v) => e.$emit("close"))
|
|
570
570
|
}, {
|
|
571
571
|
default: o(() => [
|
|
572
|
-
|
|
572
|
+
u(d, {
|
|
573
573
|
title: e.title,
|
|
574
574
|
theme: "dark"
|
|
575
575
|
}, {
|
|
576
576
|
default: o(() => [
|
|
577
|
-
|
|
577
|
+
u(l, null, {
|
|
578
578
|
default: o(() => [
|
|
579
|
-
e.errorDetails ? (
|
|
579
|
+
e.errorDetails ? (c(), g("span", {
|
|
580
580
|
key: 0,
|
|
581
581
|
innerHTML: e.errorDetails
|
|
582
|
-
}, null, 8,
|
|
583
|
-
t[2] || (t[2] =
|
|
584
|
-
e.errorCode ? (
|
|
582
|
+
}, null, 8, Ze)) : L("", !0),
|
|
583
|
+
t[2] || (t[2] = C()),
|
|
584
|
+
e.errorCode ? (c(), g("span", Ke, "(" + y(e.$t("aff.Code")) + ": " + y(e.errorCode) + ")", 1)) : L("", !0)
|
|
585
585
|
]),
|
|
586
586
|
_: 1
|
|
587
587
|
}),
|
|
588
|
-
|
|
588
|
+
u(i, null, {
|
|
589
589
|
default: o(() => [
|
|
590
|
-
|
|
591
|
-
|
|
590
|
+
u(p),
|
|
591
|
+
u(_, {
|
|
592
592
|
text: e.$t("aff.Close"),
|
|
593
593
|
color: "primary",
|
|
594
594
|
variant: "flat",
|
|
@@ -604,7 +604,7 @@ function Ge(e, t, n, a, l, m) {
|
|
|
604
604
|
_: 1
|
|
605
605
|
}, 8, ["model-value"]);
|
|
606
606
|
}
|
|
607
|
-
const
|
|
607
|
+
const En = /* @__PURE__ */ A(Ge, [["render", Ye]]), Je = k({
|
|
608
608
|
name: "FieldRow",
|
|
609
609
|
props: {
|
|
610
610
|
label: {
|
|
@@ -623,61 +623,61 @@ const Cn = /* @__PURE__ */ A(Re, [["render", Ge]]), Ye = M({
|
|
|
623
623
|
setup() {
|
|
624
624
|
return {};
|
|
625
625
|
}
|
|
626
|
-
}),
|
|
627
|
-
function
|
|
628
|
-
return
|
|
626
|
+
}), We = { class: "lbl-col text-body-2" }, Xe = { class: "lbl" }, Qe = ["innerHTML"], xe = { class: "inp-col" }, et = ["innerHTML"];
|
|
627
|
+
function tt(e, t, n, r, a, m) {
|
|
628
|
+
return c(), g("div", {
|
|
629
629
|
class: E(["fld-row mobile-margin", e.errorMessage ? "fld-err" : ""])
|
|
630
630
|
}, [
|
|
631
|
-
$("div",
|
|
632
|
-
$("div",
|
|
633
|
-
e.description ? (
|
|
631
|
+
$("div", We, [
|
|
632
|
+
$("div", Xe, y(e.label), 1),
|
|
633
|
+
e.description ? (c(), g("div", {
|
|
634
634
|
key: 0,
|
|
635
635
|
class: "descr",
|
|
636
636
|
innerHTML: e.description
|
|
637
|
-
}, null, 8,
|
|
637
|
+
}, null, 8, Qe)) : L("", !0)
|
|
638
638
|
]),
|
|
639
|
-
$("div",
|
|
639
|
+
$("div", xe, [
|
|
640
640
|
T(e.$slots, "default", {
|
|
641
641
|
hideDetails: !e.errorMessage,
|
|
642
642
|
errorMessages: e.errorMessage
|
|
643
643
|
})
|
|
644
644
|
]),
|
|
645
|
-
e.description ? (
|
|
645
|
+
e.description ? (c(), g("div", {
|
|
646
646
|
key: 0,
|
|
647
647
|
class: "descr-col text-body-2",
|
|
648
648
|
innerHTML: e.description
|
|
649
|
-
}, null, 8,
|
|
649
|
+
}, null, 8, et)) : L("", !0)
|
|
650
650
|
], 2);
|
|
651
651
|
}
|
|
652
|
-
const
|
|
652
|
+
const Tn = /* @__PURE__ */ A(Je, [["render", tt]]), nt = k({
|
|
653
653
|
name: "ColorPicker",
|
|
654
|
-
components: { UserAvatar: B, AccountAvatar:
|
|
654
|
+
components: { UserAvatar: B, AccountAvatar: K },
|
|
655
655
|
setup() {
|
|
656
656
|
const e = S(null), t = (() => {
|
|
657
657
|
const n = [];
|
|
658
|
-
for (let
|
|
659
|
-
n.push(`color-${
|
|
658
|
+
for (let r = 1; r <= 48; r++)
|
|
659
|
+
n.push(`color-${r}`);
|
|
660
660
|
return n;
|
|
661
661
|
})();
|
|
662
662
|
return { val: e, colors: t };
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
|
-
function
|
|
666
|
-
const
|
|
667
|
-
return
|
|
665
|
+
function ot(e, t, n, r, a, m) {
|
|
666
|
+
const l = s("v-avatar"), p = s("v-list-item-title"), _ = s("v-list-item"), i = s("v-list"), d = s("v-card-text"), b = s("v-card");
|
|
667
|
+
return c(), h(b, { class: "ff-col-pckr" }, {
|
|
668
668
|
default: o(() => [
|
|
669
|
-
|
|
669
|
+
u(d, { style: { width: "305px", padding: "0 8px" } }, {
|
|
670
670
|
default: o(() => [
|
|
671
|
-
|
|
671
|
+
u(i, { style: { width: "289px" } }, {
|
|
672
672
|
default: o(() => [
|
|
673
|
-
(
|
|
673
|
+
(c(!0), g(P, null, U(e.colors, (v) => (c(), h(_, {
|
|
674
674
|
key: v,
|
|
675
|
-
onClick: (
|
|
675
|
+
onClick: (f) => e.$emit("change", v)
|
|
676
676
|
}, {
|
|
677
677
|
default: o(() => [
|
|
678
|
-
|
|
678
|
+
u(p, null, {
|
|
679
679
|
default: o(() => [
|
|
680
|
-
|
|
680
|
+
u(l, {
|
|
681
681
|
color: v,
|
|
682
682
|
size: "32"
|
|
683
683
|
}, null, 8, ["color"])
|
|
@@ -697,7 +697,7 @@ function tt(e, t, n, a, l, m) {
|
|
|
697
697
|
_: 1
|
|
698
698
|
});
|
|
699
699
|
}
|
|
700
|
-
const
|
|
700
|
+
const rt = /* @__PURE__ */ A(nt, [["render", ot]]), lt = k({
|
|
701
701
|
name: "FieldLabel",
|
|
702
702
|
props: {
|
|
703
703
|
label: {
|
|
@@ -715,12 +715,16 @@ const nt = /* @__PURE__ */ A(et, [["render", tt]]), ot = M({
|
|
|
715
715
|
sm: {
|
|
716
716
|
type: Number,
|
|
717
717
|
default: 12
|
|
718
|
+
},
|
|
719
|
+
disabled: {
|
|
720
|
+
type: Boolean,
|
|
721
|
+
default: !1
|
|
718
722
|
}
|
|
719
723
|
}
|
|
720
724
|
});
|
|
721
|
-
function
|
|
722
|
-
const
|
|
723
|
-
return
|
|
725
|
+
function st(e, t, n, r, a, m) {
|
|
726
|
+
const l = s("v-col");
|
|
727
|
+
return c(), h(l, {
|
|
724
728
|
cols: e.cols,
|
|
725
729
|
sm: e.sm,
|
|
726
730
|
class: "fld"
|
|
@@ -731,21 +735,22 @@ function rt(e, t, n, a, l, m) {
|
|
|
731
735
|
}, y(e.label), 3),
|
|
732
736
|
T(e.$slots, "default", {
|
|
733
737
|
hideDetails: !e.errorMessages,
|
|
734
|
-
errorMessages: e.errorMessages
|
|
738
|
+
errorMessages: e.errorMessages,
|
|
739
|
+
disabled: e.disabled
|
|
735
740
|
})
|
|
736
741
|
]),
|
|
737
742
|
_: 3
|
|
738
743
|
}, 8, ["cols", "sm"]);
|
|
739
744
|
}
|
|
740
|
-
const
|
|
745
|
+
const at = /* @__PURE__ */ A(lt, [["render", st]]), it = (e, t, n) => (Object.defineProperty(e, t, {
|
|
741
746
|
value: n,
|
|
742
747
|
writable: !1,
|
|
743
748
|
configurable: !1,
|
|
744
749
|
enumerable: !1
|
|
745
|
-
}), n),
|
|
746
|
-
const m =
|
|
747
|
-
return
|
|
748
|
-
}, {}),
|
|
750
|
+
}), n), ut = (e, t, n) => e.reduce((r, a) => {
|
|
751
|
+
const m = a[t];
|
|
752
|
+
return r[m] = a[n], r;
|
|
753
|
+
}, {}), X = [
|
|
749
754
|
{ title: "lng.sv-se", value: "sv_SE" },
|
|
750
755
|
// $t("lng.sv-se")
|
|
751
756
|
{ title: "lng.sl-si", value: "sl_SI" },
|
|
@@ -806,7 +811,7 @@ const lt = /* @__PURE__ */ A(ot, [["render", rt]]), st = (e, t, n) => (Object.de
|
|
|
806
811
|
// $t("lng.ro-ro")
|
|
807
812
|
{ title: "lng.pt-pt", value: "pt_PT" }
|
|
808
813
|
// $t("lng.pt-pt")
|
|
809
|
-
],
|
|
814
|
+
], In = [
|
|
810
815
|
{ title: "lngin.et-ee", value: "et_EE" },
|
|
811
816
|
// $t("lngin.et-ee")
|
|
812
817
|
{ title: "lngin.lv-lv", value: "lv_LV" },
|
|
@@ -825,9 +830,9 @@ const lt = /* @__PURE__ */ A(ot, [["render", rt]]), st = (e, t, n) => (Object.de
|
|
|
825
830
|
// $t("lngin.it-it")
|
|
826
831
|
{ title: "lngin.de-de", value: "de_DE" }
|
|
827
832
|
// $t("lngin.de-de")
|
|
828
|
-
],
|
|
833
|
+
], G = {
|
|
829
834
|
get LangsEnum() {
|
|
830
|
-
return
|
|
835
|
+
return it(this, "LangsEnum", ut(X, "value", "title"));
|
|
831
836
|
},
|
|
832
837
|
FrmLang(e) {
|
|
833
838
|
return this.LangsEnum[e] ?? e;
|
|
@@ -846,13 +851,13 @@ const lt = /* @__PURE__ */ A(ot, [["render", rt]]), st = (e, t, n) => (Object.de
|
|
|
846
851
|
return e.replace("-", "_");
|
|
847
852
|
}
|
|
848
853
|
}
|
|
849
|
-
},
|
|
854
|
+
}, ct = k({
|
|
850
855
|
methods: {
|
|
851
856
|
mdiPencil() {
|
|
852
|
-
return
|
|
857
|
+
return Ce;
|
|
853
858
|
},
|
|
854
859
|
mdiKeyVariant() {
|
|
855
|
-
return
|
|
860
|
+
return be;
|
|
856
861
|
}
|
|
857
862
|
},
|
|
858
863
|
components: { UserAvatar: B },
|
|
@@ -868,73 +873,73 @@ const lt = /* @__PURE__ */ A(ot, [["render", rt]]), st = (e, t, n) => (Object.de
|
|
|
868
873
|
},
|
|
869
874
|
emits: ["edit-profile", "change-password"],
|
|
870
875
|
setup(e) {
|
|
871
|
-
const { t } =
|
|
872
|
-
return { langauge: n, fullName:
|
|
876
|
+
const { t } = I(), n = V(() => e.currentUser?.locale ? t(G.FrmLang(G.ToLongFormat(e.currentUser.locale))) : ""), r = V(() => e.currentUser ? z(e.currentUser) : "");
|
|
877
|
+
return { langauge: n, fullName: r };
|
|
873
878
|
}
|
|
874
|
-
}),
|
|
879
|
+
}), dt = { class: "avatar" }, mt = { class: "details" }, pt = { class: "name" }, ft = {
|
|
875
880
|
key: 0,
|
|
876
881
|
class: "email"
|
|
877
|
-
},
|
|
878
|
-
function
|
|
879
|
-
const
|
|
880
|
-
return e.currentUser ? (
|
|
882
|
+
}, vt = { class: "email" };
|
|
883
|
+
function _t(e, t, n, r, a, m) {
|
|
884
|
+
const l = s("UserAvatar"), p = s("v-col"), _ = s("v-icon"), i = s("v-btn"), d = s("v-row");
|
|
885
|
+
return e.currentUser ? (c(), h(d, {
|
|
881
886
|
key: 0,
|
|
882
887
|
class: "mt-6 prof-hor"
|
|
883
888
|
}, {
|
|
884
889
|
default: o(() => [
|
|
885
|
-
|
|
890
|
+
u(p, {
|
|
886
891
|
cols: "12",
|
|
887
892
|
sm: "7",
|
|
888
893
|
class: "profile"
|
|
889
894
|
}, {
|
|
890
895
|
default: o(() => [
|
|
891
|
-
$("div",
|
|
892
|
-
|
|
896
|
+
$("div", dt, [
|
|
897
|
+
u(l, {
|
|
893
898
|
size: 96,
|
|
894
899
|
user: e.currentUser,
|
|
895
900
|
"base-url": e.baseUrl + "/avatars"
|
|
896
901
|
}, null, 8, ["user", "base-url"])
|
|
897
902
|
]),
|
|
898
|
-
$("div",
|
|
899
|
-
$("div",
|
|
900
|
-
e.currentUser.email ? (
|
|
901
|
-
$("div",
|
|
903
|
+
$("div", mt, [
|
|
904
|
+
$("div", pt, y(e.fullName), 1),
|
|
905
|
+
e.currentUser.email ? (c(), g("div", ft, y(e.currentUser.email), 1)) : L("", !0),
|
|
906
|
+
$("div", vt, y(e.$t("Language")) + ": " + y(e.langauge), 1)
|
|
902
907
|
])
|
|
903
908
|
]),
|
|
904
909
|
_: 1
|
|
905
910
|
}),
|
|
906
|
-
|
|
911
|
+
u(p, {
|
|
907
912
|
cols: "12",
|
|
908
913
|
sm: "5",
|
|
909
914
|
class: "buttons"
|
|
910
915
|
}, {
|
|
911
916
|
default: o(() => [
|
|
912
917
|
$("div", null, [
|
|
913
|
-
|
|
918
|
+
u(i, {
|
|
914
919
|
variant: "text",
|
|
915
920
|
color: "primary",
|
|
916
921
|
onClick: t[0] || (t[0] = (b) => e.$emit("edit-profile"))
|
|
917
922
|
}, {
|
|
918
923
|
default: o(() => [
|
|
919
|
-
|
|
924
|
+
u(_, {
|
|
920
925
|
icon: e.mdiPencil(),
|
|
921
926
|
class: "mr-1"
|
|
922
927
|
}, null, 8, ["icon"]),
|
|
923
|
-
|
|
928
|
+
C(" " + y(e.$t("Edit info")), 1)
|
|
924
929
|
]),
|
|
925
930
|
_: 1
|
|
926
931
|
}),
|
|
927
|
-
|
|
932
|
+
u(i, {
|
|
928
933
|
variant: "text",
|
|
929
934
|
color: "primary",
|
|
930
935
|
onClick: t[1] || (t[1] = (b) => e.$emit("change-password"))
|
|
931
936
|
}, {
|
|
932
937
|
default: o(() => [
|
|
933
|
-
|
|
938
|
+
u(_, {
|
|
934
939
|
icon: e.mdiKeyVariant(),
|
|
935
940
|
class: "mr-1"
|
|
936
941
|
}, null, 8, ["icon"]),
|
|
937
|
-
|
|
942
|
+
C(" " + y(e.$t("Change password")), 1)
|
|
938
943
|
]),
|
|
939
944
|
_: 1
|
|
940
945
|
})
|
|
@@ -944,32 +949,32 @@ function ft(e, t, n, a, l, m) {
|
|
|
944
949
|
})
|
|
945
950
|
]),
|
|
946
951
|
_: 1
|
|
947
|
-
})) :
|
|
952
|
+
})) : L("", !0);
|
|
948
953
|
}
|
|
949
|
-
const
|
|
954
|
+
const On = /* @__PURE__ */ A(ct, [["render", _t]]), qn = (e) => {
|
|
950
955
|
for (const t in e)
|
|
951
956
|
Object.prototype.hasOwnProperty.call(e, t) && (e[t] = null);
|
|
952
|
-
},
|
|
957
|
+
}, gt = (e, t, n, r, a, m = null) => {
|
|
953
958
|
if (typeof e == "string") {
|
|
954
|
-
|
|
959
|
+
r(e);
|
|
955
960
|
return;
|
|
956
961
|
}
|
|
957
962
|
if (e.response && e.response.status) {
|
|
958
963
|
if (e.response.status === 400 && e.response.data) {
|
|
959
|
-
|
|
964
|
+
$t(e, t, n, r, a, m);
|
|
960
965
|
return;
|
|
961
966
|
}
|
|
962
967
|
if (e.response.status === 409 && e.response.data) {
|
|
963
|
-
|
|
968
|
+
ht(e, r, a);
|
|
964
969
|
return;
|
|
965
970
|
}
|
|
966
971
|
if (e.response.status === 417 && e.response.data) {
|
|
967
|
-
|
|
972
|
+
bt(r, a);
|
|
968
973
|
return;
|
|
969
974
|
}
|
|
970
975
|
}
|
|
971
|
-
|
|
972
|
-
},
|
|
976
|
+
r(e);
|
|
977
|
+
}, yt = () => {
|
|
973
978
|
setTimeout(() => {
|
|
974
979
|
const e = document.querySelector(".v-input--error, .ec-input.local-err");
|
|
975
980
|
if (e == null)
|
|
@@ -977,65 +982,65 @@ const Hn = /* @__PURE__ */ A(it, [["render", ft]]), wn = (e) => {
|
|
|
977
982
|
const t = e.querySelector("input, textarea, .ec-inp-ctrl");
|
|
978
983
|
t?.focus();
|
|
979
984
|
}, 200);
|
|
980
|
-
},
|
|
981
|
-
const
|
|
982
|
-
let
|
|
985
|
+
}, $t = (e, t, n, r, a, m = null) => {
|
|
986
|
+
const l = [];
|
|
987
|
+
let p = !1, _ = {};
|
|
983
988
|
if (Array.isArray(e.response.data))
|
|
984
|
-
for (let
|
|
985
|
-
|
|
989
|
+
for (let i = 0; i < e.response.data.length; i++)
|
|
990
|
+
l.push(e.response.data[i]);
|
|
986
991
|
else
|
|
987
|
-
for (const
|
|
988
|
-
if (Object.prototype.hasOwnProperty.call(e.response.data,
|
|
989
|
-
const d = e.response.data[
|
|
990
|
-
if (
|
|
991
|
-
|
|
992
|
+
for (const i in e.response.data)
|
|
993
|
+
if (Object.prototype.hasOwnProperty.call(e.response.data, i)) {
|
|
994
|
+
const d = e.response.data[i];
|
|
995
|
+
if (kt(_, t, i, d[0]))
|
|
996
|
+
p = !0;
|
|
992
997
|
else {
|
|
993
|
-
const v = m && m[
|
|
994
|
-
|
|
998
|
+
const v = m && m[i] ? m[i] : i;
|
|
999
|
+
l.push({ error_message: `${v}: ${d}` });
|
|
995
1000
|
}
|
|
996
1001
|
}
|
|
997
|
-
|
|
998
|
-
message:
|
|
999
|
-
details: "<ul><li>" +
|
|
1000
|
-
})),
|
|
1001
|
-
},
|
|
1002
|
-
let
|
|
1003
|
-
typeof e.response.data == "string" ?
|
|
1002
|
+
l.length > 0 && (l.length === 1 ? r(l[0]) : r({
|
|
1003
|
+
message: a("Some errors occured:"),
|
|
1004
|
+
details: "<ul><li>" + l.map((i) => i.error_message).join("</li><li>") + "</li></ul>"
|
|
1005
|
+
})), p && (n != null && (n.value = { ...n.value, ..._ }), yt());
|
|
1006
|
+
}, ht = (e, t, n) => {
|
|
1007
|
+
let r = [];
|
|
1008
|
+
typeof e.response.data == "string" ? r.push(e.response.data) : e.response.data.errors && (r = e.response.data.errors.map((a) => a.error_message)), t({
|
|
1004
1009
|
title: n("Concurrency error"),
|
|
1005
|
-
details:
|
|
1010
|
+
details: r.length === 1 ? r[0] : "<ul><li>" + r.join("</li><li>") + "</li></ul>",
|
|
1006
1011
|
code: 409
|
|
1007
1012
|
});
|
|
1008
|
-
},
|
|
1013
|
+
}, bt = (e, t) => {
|
|
1009
1014
|
e({
|
|
1010
1015
|
title: t("Product version mismatch."),
|
|
1011
1016
|
details: t("Please reload the page."),
|
|
1012
1017
|
code: 417
|
|
1013
1018
|
});
|
|
1014
|
-
},
|
|
1015
|
-
const
|
|
1016
|
-
let m = t,
|
|
1017
|
-
for (;
|
|
1018
|
-
const
|
|
1019
|
-
if (
|
|
1020
|
-
if (
|
|
1021
|
-
return /^\d+$/.test(
|
|
1022
|
-
if (/^\d+$/.test(
|
|
1023
|
-
m = m[parseInt(
|
|
1024
|
-
else if (Object.prototype.hasOwnProperty.call(m,
|
|
1025
|
-
m = m[
|
|
1019
|
+
}, kt = (e, t, n, r) => {
|
|
1020
|
+
const a = n.split(".");
|
|
1021
|
+
let m = t, l = e;
|
|
1022
|
+
for (; a.length > 0; ) {
|
|
1023
|
+
const p = a.shift();
|
|
1024
|
+
if (p) {
|
|
1025
|
+
if (a.length === 0)
|
|
1026
|
+
return /^\d+$/.test(p) ? !1 : Object.prototype.hasOwnProperty.call(m, p) ? (l[p] = r, !0) : !1;
|
|
1027
|
+
if (/^\d+$/.test(p))
|
|
1028
|
+
m = m[parseInt(p)], l[m.tmp_id] || (l[m.tmp_id] = {}), l = l[m.tmp_id];
|
|
1029
|
+
else if (Object.prototype.hasOwnProperty.call(m, p))
|
|
1030
|
+
m = m[p], l[p] || (l[p] = {}), l = l[p];
|
|
1026
1031
|
else
|
|
1027
1032
|
return !1;
|
|
1028
1033
|
}
|
|
1029
1034
|
}
|
|
1030
1035
|
return !1;
|
|
1031
|
-
},
|
|
1036
|
+
}, At = k({
|
|
1032
1037
|
name: "ProfileEditDialog",
|
|
1033
1038
|
methods: {
|
|
1034
1039
|
mdiPalette() {
|
|
1035
|
-
return
|
|
1040
|
+
return Ae;
|
|
1036
1041
|
}
|
|
1037
1042
|
},
|
|
1038
|
-
components: { ColorPicker:
|
|
1043
|
+
components: { ColorPicker: rt, UserAvatar: B, AccountAvatar: K, FieldLabel: at, CustomDialog: He },
|
|
1039
1044
|
props: {
|
|
1040
1045
|
showDialog: {
|
|
1041
1046
|
type: Boolean,
|
|
@@ -1060,64 +1065,64 @@ const Hn = /* @__PURE__ */ A(it, [["render", ft]]), wn = (e) => {
|
|
|
1060
1065
|
},
|
|
1061
1066
|
emits: ["close"],
|
|
1062
1067
|
setup(e, { emit: t }) {
|
|
1063
|
-
const { t: n } =
|
|
1068
|
+
const { t: n } = I(), { showError: r } = ae(), a = S({ ...e.currentUser }), m = S({}), l = S(G.ToLongFormat(e.currentUser.locale ?? e.fallbackLocale)), p = S(e.currentUser?.avatar_thumb ? "photo" : "color"), _ = S(!1), i = V(() => [
|
|
1064
1069
|
{ value: "photo", text: n("Photo") },
|
|
1065
1070
|
{ value: "color", text: n("Color") }
|
|
1066
|
-
]), d = V(() =>
|
|
1067
|
-
return { formData:
|
|
1068
|
-
|
|
1069
|
-
const v = { ...
|
|
1070
|
-
|
|
1071
|
+
]), d = V(() => X.filter((v) => e.systemLanguages.indexOf(v.value) >= 0).map((v) => ({ title: n(v.title), value: v.value })));
|
|
1072
|
+
return { formData: a, localErrors: m, languages: d, lang: l, identity: p, identities: i, loading: _, saveClick: () => {
|
|
1073
|
+
_.value = !0;
|
|
1074
|
+
const v = { ...a.value };
|
|
1075
|
+
p.value == "color" && (v.avatar_thumb = null), v.locale = l.value, e.updateProfileFx(v).then(() => t("close")).catch((f) => gt(f, a.value, m, r, n)).finally(() => _.value = !1);
|
|
1071
1076
|
} };
|
|
1072
1077
|
}
|
|
1073
|
-
}),
|
|
1078
|
+
}), Ct = {
|
|
1074
1079
|
key: 0,
|
|
1075
1080
|
class: "ff-simple-form"
|
|
1076
|
-
}, Mt = { class: "avatar-edit" },
|
|
1081
|
+
}, Mt = { class: "avatar-edit" }, Vt = { class: "avatar" }, Lt = { class: "options" }, wt = {
|
|
1077
1082
|
key: 0,
|
|
1078
1083
|
class: "sel-ident"
|
|
1079
1084
|
};
|
|
1080
|
-
function
|
|
1081
|
-
const
|
|
1082
|
-
return
|
|
1085
|
+
function Ht(e, t, n, r, a, m) {
|
|
1086
|
+
const l = s("v-avatar"), p = s("v-radio"), _ = s("v-radio-group"), i = s("v-icon"), d = s("v-btn"), b = s("ColorPicker"), v = s("v-menu"), f = s("v-col"), H = s("v-text-field"), O = s("FieldLabel"), R = s("v-select"), M = s("v-row"), j = s("CustomDialog");
|
|
1087
|
+
return c(), h(j, {
|
|
1083
1088
|
value: e.showDialog,
|
|
1084
1089
|
title: e.$t("Your profile"),
|
|
1085
1090
|
persistent: "",
|
|
1086
1091
|
class: "prof-dlg",
|
|
1087
|
-
onClose: t[7] || (t[7] = (
|
|
1092
|
+
onClose: t[7] || (t[7] = (w) => e.$emit("close", null))
|
|
1088
1093
|
}, {
|
|
1089
1094
|
footer: o(() => [
|
|
1090
|
-
|
|
1095
|
+
u(d, {
|
|
1091
1096
|
variant: "flat",
|
|
1092
1097
|
color: "secondary",
|
|
1093
|
-
onClick: t[6] || (t[6] = (
|
|
1098
|
+
onClick: t[6] || (t[6] = (w) => e.$emit("close", null))
|
|
1094
1099
|
}, {
|
|
1095
1100
|
default: o(() => [
|
|
1096
|
-
|
|
1101
|
+
C(y(e.$t("Close")), 1)
|
|
1097
1102
|
]),
|
|
1098
1103
|
_: 1
|
|
1099
1104
|
}),
|
|
1100
|
-
|
|
1105
|
+
u(d, {
|
|
1101
1106
|
variant: "flat",
|
|
1102
1107
|
color: "primary",
|
|
1103
1108
|
loading: e.loading,
|
|
1104
1109
|
onClick: e.saveClick
|
|
1105
1110
|
}, {
|
|
1106
1111
|
default: o(() => [
|
|
1107
|
-
|
|
1112
|
+
C(y(e.$t("Save")), 1)
|
|
1108
1113
|
]),
|
|
1109
1114
|
_: 1
|
|
1110
1115
|
}, 8, ["loading", "onClick"])
|
|
1111
1116
|
]),
|
|
1112
1117
|
default: o(() => [
|
|
1113
|
-
e.formData ? (
|
|
1114
|
-
|
|
1118
|
+
e.formData ? (c(), g("form", Ct, [
|
|
1119
|
+
u(M, null, {
|
|
1115
1120
|
default: o(() => [
|
|
1116
|
-
|
|
1121
|
+
u(f, { cols: "12" }, {
|
|
1117
1122
|
default: o(() => [
|
|
1118
1123
|
$("div", Mt, [
|
|
1119
|
-
$("div",
|
|
1120
|
-
|
|
1124
|
+
$("div", Vt, [
|
|
1125
|
+
u(l, {
|
|
1121
1126
|
color: e.formData.color ?? "primary",
|
|
1122
1127
|
class: E(`avatar-96-${e.formData.initials.length >= 3 ? "l" : "s"}`),
|
|
1123
1128
|
size: 96
|
|
@@ -1128,21 +1133,21 @@ function Lt(e, t, n, a, l, m) {
|
|
|
1128
1133
|
_: 1
|
|
1129
1134
|
}, 8, ["color", "class"])
|
|
1130
1135
|
]),
|
|
1131
|
-
$("div",
|
|
1136
|
+
$("div", Lt, [
|
|
1132
1137
|
$("div", null, [
|
|
1133
|
-
|
|
1138
|
+
u(_, {
|
|
1134
1139
|
modelValue: e.identity,
|
|
1135
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1140
|
+
"onUpdate:modelValue": t[0] || (t[0] = (w) => e.identity = w),
|
|
1136
1141
|
"true-icon": e.$vuetify.icons.aliases?.success,
|
|
1137
1142
|
color: "primary",
|
|
1138
1143
|
"hide-details": "",
|
|
1139
1144
|
"error-messages": e.localErrors.other_vehicle_involved?.toString() ?? void 0
|
|
1140
1145
|
}, {
|
|
1141
1146
|
default: o(() => [
|
|
1142
|
-
(
|
|
1143
|
-
key:
|
|
1144
|
-
label:
|
|
1145
|
-
value:
|
|
1147
|
+
(c(!0), g(P, null, U(e.identities, (w) => (c(), h(p, {
|
|
1148
|
+
key: w.value.toString(),
|
|
1149
|
+
label: w.text,
|
|
1150
|
+
value: w.value,
|
|
1146
1151
|
"base-color": e.localErrors.other_vehicle_involved ? "error" : ""
|
|
1147
1152
|
}, null, 8, ["label", "value", "base-color"]))), 128))
|
|
1148
1153
|
]),
|
|
@@ -1150,112 +1155,112 @@ function Lt(e, t, n, a, l, m) {
|
|
|
1150
1155
|
}, 8, ["modelValue", "true-icon", "error-messages"])
|
|
1151
1156
|
]),
|
|
1152
1157
|
$("div", null, [
|
|
1153
|
-
e.identity === "color" ? (
|
|
1158
|
+
e.identity === "color" ? (c(), g("div", wt, [
|
|
1154
1159
|
$("div", null, [
|
|
1155
|
-
|
|
1156
|
-
activator: o(({ props:
|
|
1157
|
-
|
|
1160
|
+
u(v, null, {
|
|
1161
|
+
activator: o(({ props: w }) => [
|
|
1162
|
+
u(d, D({
|
|
1158
1163
|
variant: "text",
|
|
1159
1164
|
color: "primary",
|
|
1160
1165
|
class: "ff-btn"
|
|
1161
|
-
},
|
|
1166
|
+
}, w), {
|
|
1162
1167
|
default: o(() => [
|
|
1163
|
-
|
|
1168
|
+
u(i, {
|
|
1164
1169
|
icon: e.mdiPalette()
|
|
1165
1170
|
}, null, 8, ["icon"]),
|
|
1166
|
-
|
|
1171
|
+
C(" " + y(e.$vuetify.display.smAndUp ? e.$t("Choose color") : e.$t("Color")), 1)
|
|
1167
1172
|
]),
|
|
1168
1173
|
_: 1
|
|
1169
1174
|
}, 16)
|
|
1170
1175
|
]),
|
|
1171
1176
|
default: o(() => [
|
|
1172
|
-
|
|
1173
|
-
onChange: t[1] || (t[1] = (
|
|
1177
|
+
u(b, {
|
|
1178
|
+
onChange: t[1] || (t[1] = (w) => e.formData.color = w)
|
|
1174
1179
|
})
|
|
1175
1180
|
]),
|
|
1176
1181
|
_: 1
|
|
1177
1182
|
})
|
|
1178
1183
|
])
|
|
1179
|
-
])) :
|
|
1184
|
+
])) : L("", !0)
|
|
1180
1185
|
])
|
|
1181
1186
|
])
|
|
1182
1187
|
])
|
|
1183
1188
|
]),
|
|
1184
1189
|
_: 1
|
|
1185
1190
|
}),
|
|
1186
|
-
|
|
1191
|
+
u(O, {
|
|
1187
1192
|
label: e.$t("Name"),
|
|
1188
1193
|
cols: 12,
|
|
1189
1194
|
sm: 6,
|
|
1190
1195
|
"error-messages": e.localErrors.name?.toString() ?? void 0
|
|
1191
1196
|
}, {
|
|
1192
|
-
default: o((
|
|
1193
|
-
|
|
1197
|
+
default: o((w) => [
|
|
1198
|
+
u(H, D({
|
|
1194
1199
|
modelValue: e.formData.name,
|
|
1195
1200
|
"onUpdate:modelValue": t[2] || (t[2] = (q) => e.formData.name = q),
|
|
1196
1201
|
variant: "outlined"
|
|
1197
|
-
},
|
|
1202
|
+
}, w), null, 16, ["modelValue"])
|
|
1198
1203
|
]),
|
|
1199
1204
|
_: 1
|
|
1200
1205
|
}, 8, ["label", "error-messages"]),
|
|
1201
|
-
|
|
1206
|
+
u(O, {
|
|
1202
1207
|
label: e.$t("Surname"),
|
|
1203
1208
|
cols: 12,
|
|
1204
1209
|
sm: 6,
|
|
1205
1210
|
"error-messages": e.localErrors.surname?.toString() ?? void 0
|
|
1206
1211
|
}, {
|
|
1207
|
-
default: o((
|
|
1208
|
-
|
|
1212
|
+
default: o((w) => [
|
|
1213
|
+
u(H, D({
|
|
1209
1214
|
modelValue: e.formData.surname,
|
|
1210
1215
|
"onUpdate:modelValue": t[3] || (t[3] = (q) => e.formData.surname = q),
|
|
1211
1216
|
variant: "outlined"
|
|
1212
|
-
},
|
|
1217
|
+
}, w), null, 16, ["modelValue"])
|
|
1213
1218
|
]),
|
|
1214
1219
|
_: 1
|
|
1215
1220
|
}, 8, ["label", "error-messages"]),
|
|
1216
|
-
|
|
1221
|
+
u(O, {
|
|
1217
1222
|
label: e.$t("E-mail"),
|
|
1218
1223
|
cols: 12,
|
|
1219
1224
|
sm: 6,
|
|
1220
1225
|
"error-messages": e.localErrors.email?.toString() ?? void 0
|
|
1221
1226
|
}, {
|
|
1222
|
-
default: o((
|
|
1223
|
-
|
|
1227
|
+
default: o((w) => [
|
|
1228
|
+
u(H, D({
|
|
1224
1229
|
modelValue: e.formData.email,
|
|
1225
1230
|
"onUpdate:modelValue": t[4] || (t[4] = (q) => e.formData.email = q),
|
|
1226
1231
|
variant: "outlined",
|
|
1227
1232
|
disabled: ""
|
|
1228
|
-
},
|
|
1233
|
+
}, w), null, 16, ["modelValue"])
|
|
1229
1234
|
]),
|
|
1230
1235
|
_: 1
|
|
1231
1236
|
}, 8, ["label", "error-messages"]),
|
|
1232
|
-
|
|
1237
|
+
u(O, {
|
|
1233
1238
|
label: e.$t("Language"),
|
|
1234
1239
|
cols: 12,
|
|
1235
1240
|
sm: 6,
|
|
1236
1241
|
"error-messages": e.localErrors.locale?.toString() ?? void 0
|
|
1237
1242
|
}, {
|
|
1238
|
-
default: o((
|
|
1239
|
-
|
|
1243
|
+
default: o((w) => [
|
|
1244
|
+
u(R, D({
|
|
1240
1245
|
modelValue: e.lang,
|
|
1241
1246
|
"onUpdate:modelValue": t[5] || (t[5] = (q) => e.lang = q),
|
|
1242
1247
|
variant: "outlined",
|
|
1243
1248
|
items: e.languages,
|
|
1244
1249
|
"item-text": "title",
|
|
1245
1250
|
"item-value": "value"
|
|
1246
|
-
},
|
|
1251
|
+
}, w, { dense: "" }), null, 16, ["modelValue", "items"])
|
|
1247
1252
|
]),
|
|
1248
1253
|
_: 1
|
|
1249
1254
|
}, 8, ["label", "error-messages"])
|
|
1250
1255
|
]),
|
|
1251
1256
|
_: 1
|
|
1252
1257
|
})
|
|
1253
|
-
])) :
|
|
1258
|
+
])) : L("", !0)
|
|
1254
1259
|
]),
|
|
1255
1260
|
_: 1
|
|
1256
1261
|
}, 8, ["value", "title"]);
|
|
1257
1262
|
}
|
|
1258
|
-
const
|
|
1263
|
+
const Nn = /* @__PURE__ */ A(At, [["render", Ht]]), St = k({
|
|
1259
1264
|
name: "RowActionsButton",
|
|
1260
1265
|
props: {
|
|
1261
1266
|
rowActions: {
|
|
@@ -1271,32 +1276,32 @@ const Sn = /* @__PURE__ */ A(bt, [["render", Lt]]), Ht = M({
|
|
|
1271
1276
|
return { actions: V(() => e.rowActions.actions.filter((n) => n.visible === void 0 || n.visible(e.item))) };
|
|
1272
1277
|
}
|
|
1273
1278
|
});
|
|
1274
|
-
function
|
|
1275
|
-
const
|
|
1276
|
-
return e.actions.length > 0 ? (
|
|
1279
|
+
function Pt(e, t, n, r, a, m) {
|
|
1280
|
+
const l = s("v-btn"), p = s("v-icon"), _ = s("v-list-item-title"), i = s("v-list-item"), d = s("v-list"), b = s("v-menu");
|
|
1281
|
+
return e.actions.length > 0 ? (c(), h(b, { key: 0 }, {
|
|
1277
1282
|
activator: o(({ props: v }) => [
|
|
1278
|
-
|
|
1283
|
+
u(l, D({
|
|
1279
1284
|
variant: "text",
|
|
1280
1285
|
size: "small",
|
|
1281
1286
|
icon: e.rowActions.icon
|
|
1282
1287
|
}, v), null, 16, ["icon"])
|
|
1283
1288
|
]),
|
|
1284
1289
|
default: o(() => [
|
|
1285
|
-
|
|
1290
|
+
u(d, { density: "compact" }, {
|
|
1286
1291
|
default: o(() => [
|
|
1287
|
-
(
|
|
1292
|
+
(c(!0), g(P, null, U(e.actions, (v) => (c(), h(i, {
|
|
1288
1293
|
key: v.action,
|
|
1289
|
-
onClick: (
|
|
1294
|
+
onClick: (f) => e.$emit("row-action", { action: v.action, item: e.item })
|
|
1290
1295
|
}, {
|
|
1291
1296
|
prepend: o(() => [
|
|
1292
|
-
|
|
1297
|
+
u(p, {
|
|
1293
1298
|
icon: v.icon
|
|
1294
1299
|
}, null, 8, ["icon"])
|
|
1295
1300
|
]),
|
|
1296
1301
|
default: o(() => [
|
|
1297
|
-
|
|
1302
|
+
u(_, null, {
|
|
1298
1303
|
default: o(() => [
|
|
1299
|
-
|
|
1304
|
+
C(y(v.title), 1)
|
|
1300
1305
|
]),
|
|
1301
1306
|
_: 2
|
|
1302
1307
|
}, 1024)
|
|
@@ -1308,13 +1313,13 @@ function wt(e, t, n, a, l, m) {
|
|
|
1308
1313
|
})
|
|
1309
1314
|
]),
|
|
1310
1315
|
_: 1
|
|
1311
|
-
})) :
|
|
1316
|
+
})) : L("", !0);
|
|
1312
1317
|
}
|
|
1313
|
-
const Y = /* @__PURE__ */ A(
|
|
1318
|
+
const Y = /* @__PURE__ */ A(St, [["render", Pt]]), Ut = k({
|
|
1314
1319
|
name: "MobileLayoutItem",
|
|
1315
1320
|
methods: {
|
|
1316
1321
|
mdiDragVertical() {
|
|
1317
|
-
return
|
|
1322
|
+
return he;
|
|
1318
1323
|
}
|
|
1319
1324
|
},
|
|
1320
1325
|
components: { RowActionsButton: Y },
|
|
@@ -1354,98 +1359,98 @@ const Y = /* @__PURE__ */ A(Ht, [["render", wt]]), St = M({
|
|
|
1354
1359
|
},
|
|
1355
1360
|
emits: ["rowClick", "rowAction"],
|
|
1356
1361
|
setup() {
|
|
1357
|
-
const e = (n,
|
|
1358
|
-
return { formatValueList: (n,
|
|
1362
|
+
const e = (n, r) => r === null ? null : n.mobileLabel ? `${n.title}: ${r}` : r;
|
|
1363
|
+
return { formatValueList: (n, r, a) => n.map((m) => m.format ? e(m, m.format(m, r)) : e(m, r[m.value] ?? null)).filter((m) => m !== null).join(a) };
|
|
1359
1364
|
}
|
|
1360
|
-
}),
|
|
1365
|
+
}), Dt = { style: { display: "flex", "align-items": "center", gap: "8px" } }, Et = { key: 1 }, Tt = { key: 2 }, It = { key: 1 }, Ot = { key: 2 }, qt = {
|
|
1361
1366
|
key: 0,
|
|
1362
1367
|
class: "mini-table"
|
|
1363
|
-
},
|
|
1368
|
+
}, Nt = { key: 0 }, Ft = { key: 1 }, zt = { style: { "margin-top": "-11px", "margin-bottom": "-11px" } }, Bt = {
|
|
1364
1369
|
key: 0,
|
|
1365
1370
|
class: "item-drag-handle"
|
|
1366
1371
|
};
|
|
1367
|
-
function
|
|
1368
|
-
const
|
|
1369
|
-
return
|
|
1372
|
+
function Rt(e, t, n, r, a, m) {
|
|
1373
|
+
const l = s("v-col"), p = s("v-row"), _ = s("v-icon"), i = s("v-chip"), d = s("RowActionsButton"), b = s("v-card-text"), v = s("v-card");
|
|
1374
|
+
return c(), h(v, {
|
|
1370
1375
|
variant: "outlined",
|
|
1371
1376
|
title: e.formatValueList(e.titleHeaders, e.item, " - "),
|
|
1372
1377
|
subtitle: e.formatValueList(e.subTitleHeaders, e.item, "; "),
|
|
1373
|
-
onClick: t[1] || (t[1] = (
|
|
1378
|
+
onClick: t[1] || (t[1] = (f) => e.$emit("rowClick", e.item))
|
|
1374
1379
|
}, {
|
|
1375
1380
|
title: o(() => [
|
|
1376
|
-
$("div",
|
|
1377
|
-
(
|
|
1378
|
-
|
|
1381
|
+
$("div", Dt, [
|
|
1382
|
+
(c(!0), g(P, null, U(e.titleHeaders, (f, H) => (c(), g("span", { key: H }, [
|
|
1383
|
+
f.component ? (c(), h(F(f.component), D({
|
|
1379
1384
|
key: 0,
|
|
1380
1385
|
class: "mr-1"
|
|
1381
|
-
}, { ref_for: !0 },
|
|
1386
|
+
}, { ref_for: !0 }, f.getProps ? f.getProps(f, e.item) : {}), null, 16)) : f.format ? (c(), g("span", Et, y(f.format(f, e.item)), 1)) : (c(), g("span", Tt, y(e.item[f.value]), 1))
|
|
1382
1387
|
]))), 128))
|
|
1383
1388
|
])
|
|
1384
1389
|
]),
|
|
1385
1390
|
default: o(() => [
|
|
1386
|
-
|
|
1391
|
+
u(b, null, {
|
|
1387
1392
|
default: o(() => [
|
|
1388
|
-
(
|
|
1389
|
-
key:
|
|
1393
|
+
(c(!0), g(P, null, U(e.otherHeaders, (f, H) => (c(), h(p, {
|
|
1394
|
+
key: f.value,
|
|
1390
1395
|
"no-gutters": "",
|
|
1391
1396
|
class: E(`mt-${H === 0 ? 0 : 3}`)
|
|
1392
1397
|
}, {
|
|
1393
1398
|
default: o(() => [
|
|
1394
|
-
|
|
1399
|
+
u(l, {
|
|
1395
1400
|
cols: "4",
|
|
1396
1401
|
sm: "2"
|
|
1397
1402
|
}, {
|
|
1398
1403
|
default: o(() => [
|
|
1399
|
-
|
|
1404
|
+
C(y(f.title) + ":", 1)
|
|
1400
1405
|
]),
|
|
1401
1406
|
_: 2
|
|
1402
1407
|
}, 1024),
|
|
1403
|
-
|
|
1408
|
+
u(l, {
|
|
1404
1409
|
cols: "8",
|
|
1405
1410
|
sm: "10"
|
|
1406
1411
|
}, {
|
|
1407
1412
|
default: o(() => [
|
|
1408
|
-
|
|
1413
|
+
f.component ? (c(), h(F(f.component), D({
|
|
1409
1414
|
key: 0,
|
|
1410
1415
|
ref_for: !0
|
|
1411
|
-
},
|
|
1416
|
+
}, f.getProps ? f.getProps(f, e.item) : {}), null, 16)) : f.format ? (c(), g("span", It, y(f.format(f, e.item)), 1)) : (c(), g("span", Ot, y(e.item[f.value]), 1))
|
|
1412
1417
|
]),
|
|
1413
1418
|
_: 2
|
|
1414
1419
|
}, 1024)
|
|
1415
1420
|
]),
|
|
1416
1421
|
_: 2
|
|
1417
1422
|
}, 1032, ["class"]))), 128)),
|
|
1418
|
-
e.miniTblHeaders.length > 0 ? (
|
|
1423
|
+
e.miniTblHeaders.length > 0 ? (c(), g("table", qt, [
|
|
1419
1424
|
$("tr", null, [
|
|
1420
|
-
(
|
|
1421
|
-
key: `h${
|
|
1422
|
-
style:
|
|
1423
|
-
}, y(
|
|
1425
|
+
(c(!0), g(P, null, U(e.miniTblHeaders, (f) => (c(), g("th", {
|
|
1426
|
+
key: `h${f.value}`,
|
|
1427
|
+
style: te({ width: `${100 / e.miniTblHeaders.length}%` })
|
|
1428
|
+
}, y(f.title), 5))), 128))
|
|
1424
1429
|
]),
|
|
1425
1430
|
$("tr", null, [
|
|
1426
|
-
(
|
|
1427
|
-
key: `h${
|
|
1431
|
+
(c(!0), g(P, null, U(e.miniTblHeaders, (f) => (c(), g("td", {
|
|
1432
|
+
key: `h${f.value}`
|
|
1428
1433
|
}, [
|
|
1429
|
-
|
|
1434
|
+
f.format ? (c(), g("span", Nt, y(f.format(f, e.item)), 1)) : (c(), g("span", Ft, y(e.item[f.value]), 1))
|
|
1430
1435
|
]))), 128))
|
|
1431
1436
|
])
|
|
1432
|
-
])) :
|
|
1433
|
-
|
|
1437
|
+
])) : L("", !0),
|
|
1438
|
+
u(p, {
|
|
1434
1439
|
"no-gutters": "",
|
|
1435
1440
|
class: "mt-3"
|
|
1436
1441
|
}, {
|
|
1437
1442
|
default: o(() => [
|
|
1438
|
-
|
|
1443
|
+
u(l, {
|
|
1439
1444
|
cols: e.rowActions ? 10 : 12
|
|
1440
1445
|
}, {
|
|
1441
1446
|
default: o(() => [
|
|
1442
|
-
(
|
|
1443
|
-
key:
|
|
1447
|
+
(c(!0), g(P, null, U(e.tagHeaders, (f) => (c(), g("span", {
|
|
1448
|
+
key: f.value
|
|
1444
1449
|
}, [
|
|
1445
|
-
|
|
1450
|
+
f.component ? (c(), h(F(f.component), D({
|
|
1446
1451
|
key: 0,
|
|
1447
1452
|
class: "mr-1"
|
|
1448
|
-
}, { ref_for: !0 },
|
|
1453
|
+
}, { ref_for: !0 }, f.getProps ? f.getProps(f, e.item) : {}), null, 16)) : f.format ? (c(), h(i, {
|
|
1449
1454
|
key: 1,
|
|
1450
1455
|
label: "",
|
|
1451
1456
|
size: "small",
|
|
@@ -1454,15 +1459,15 @@ function Bt(e, t, n, a, l, m) {
|
|
|
1454
1459
|
class: "mr-1"
|
|
1455
1460
|
}, {
|
|
1456
1461
|
default: o(() => [
|
|
1457
|
-
|
|
1462
|
+
f.mobileIcon ? (c(), h(_, {
|
|
1458
1463
|
key: 0,
|
|
1459
|
-
icon:
|
|
1464
|
+
icon: f.mobileIcon,
|
|
1460
1465
|
class: "mr-1"
|
|
1461
|
-
}, null, 8, ["icon"])) :
|
|
1462
|
-
|
|
1466
|
+
}, null, 8, ["icon"])) : L("", !0),
|
|
1467
|
+
C(y(f.format(f, e.item)), 1)
|
|
1463
1468
|
]),
|
|
1464
1469
|
_: 2
|
|
1465
|
-
}, 1024)) : (
|
|
1470
|
+
}, 1024)) : (c(), h(i, {
|
|
1466
1471
|
key: 2,
|
|
1467
1472
|
label: "",
|
|
1468
1473
|
size: "small",
|
|
@@ -1471,11 +1476,11 @@ function Bt(e, t, n, a, l, m) {
|
|
|
1471
1476
|
class: "mr-1"
|
|
1472
1477
|
}, {
|
|
1473
1478
|
default: o(() => [
|
|
1474
|
-
|
|
1479
|
+
f.mobileIcon ? (c(), h(_, {
|
|
1475
1480
|
key: 0,
|
|
1476
|
-
icon:
|
|
1477
|
-
}, null, 8, ["icon"])) :
|
|
1478
|
-
|
|
1481
|
+
icon: f.mobileIcon
|
|
1482
|
+
}, null, 8, ["icon"])) : L("", !0),
|
|
1483
|
+
C(y(e.item[f.value]), 1)
|
|
1479
1484
|
]),
|
|
1480
1485
|
_: 2
|
|
1481
1486
|
}, 1024))
|
|
@@ -1483,40 +1488,40 @@ function Bt(e, t, n, a, l, m) {
|
|
|
1483
1488
|
]),
|
|
1484
1489
|
_: 1
|
|
1485
1490
|
}, 8, ["cols"]),
|
|
1486
|
-
e.rowActions ? (
|
|
1491
|
+
e.rowActions ? (c(), h(l, {
|
|
1487
1492
|
key: 0,
|
|
1488
1493
|
cols: "2",
|
|
1489
1494
|
class: "text-right"
|
|
1490
1495
|
}, {
|
|
1491
1496
|
default: o(() => [
|
|
1492
1497
|
$("div", zt, [
|
|
1493
|
-
|
|
1498
|
+
u(d, {
|
|
1494
1499
|
item: e.item,
|
|
1495
1500
|
"row-actions": e.rowActions,
|
|
1496
|
-
onRowAction: t[0] || (t[0] = (
|
|
1501
|
+
onRowAction: t[0] || (t[0] = (f) => e.$emit("rowAction", f))
|
|
1497
1502
|
}, null, 8, ["item", "row-actions"])
|
|
1498
1503
|
])
|
|
1499
1504
|
]),
|
|
1500
1505
|
_: 1
|
|
1501
|
-
})) :
|
|
1506
|
+
})) : L("", !0)
|
|
1502
1507
|
]),
|
|
1503
1508
|
_: 1
|
|
1504
1509
|
})
|
|
1505
1510
|
]),
|
|
1506
1511
|
_: 1
|
|
1507
1512
|
}),
|
|
1508
|
-
e.draggable ? (
|
|
1509
|
-
|
|
1513
|
+
e.draggable ? (c(), g("div", Bt, [
|
|
1514
|
+
u(_, {
|
|
1510
1515
|
icon: e.mdiDragVertical()
|
|
1511
1516
|
}, null, 8, ["icon"])
|
|
1512
|
-
])) :
|
|
1517
|
+
])) : L("", !0)
|
|
1513
1518
|
]),
|
|
1514
1519
|
_: 1
|
|
1515
1520
|
}, 8, ["title", "subtitle"]);
|
|
1516
1521
|
}
|
|
1517
|
-
const
|
|
1522
|
+
const jt = /* @__PURE__ */ A(Ut, [["render", Rt]]), Gt = k({
|
|
1518
1523
|
name: "MobileLayout",
|
|
1519
|
-
components: { MobileLayoutItem:
|
|
1524
|
+
components: { MobileLayoutItem: jt, RowActionsButton: Y },
|
|
1520
1525
|
props: {
|
|
1521
1526
|
items: {
|
|
1522
1527
|
type: Array,
|
|
@@ -1544,25 +1549,25 @@ const Nt = /* @__PURE__ */ A(St, [["render", Bt]]), Rt = M({
|
|
|
1544
1549
|
}
|
|
1545
1550
|
},
|
|
1546
1551
|
setup(e, t) {
|
|
1547
|
-
const n = S(e.options.page),
|
|
1548
|
-
return { titleHeaders:
|
|
1552
|
+
const n = S(e.options.page), r = e.options.pageSize, a = V(() => e.headers.filter((d) => d.mobilePlacement === "title")), m = V(() => e.headers.filter((d) => d.mobilePlacement === "subtitle")), l = V(() => e.headers.filter((d) => d.mobilePlacement === "tag")), p = V(() => e.headers.filter((d) => d.mobilePlacement === "mini_table")), _ = V(() => e.headers.filter((d) => d.mobilePlacement !== "title" && d.mobilePlacement !== "subtitle" && d.mobilePlacement !== "tag" && d.mobilePlacement !== "mini_table"));
|
|
1553
|
+
return { titleHeaders: a, subTitleHeaders: m, tagHeaders: l, miniTblHeaders: p, otherHeaders: _, pageVal: n, pageSize: r, changePage: (d) => {
|
|
1549
1554
|
t.emit("options-update", { ...e.options, page: d });
|
|
1550
1555
|
} };
|
|
1551
1556
|
}
|
|
1552
|
-
}),
|
|
1557
|
+
}), Zt = { class: "mobile-margin2 data-table-layout" }, Kt = {
|
|
1553
1558
|
key: 1,
|
|
1554
1559
|
class: "mt-3"
|
|
1555
1560
|
};
|
|
1556
|
-
function
|
|
1557
|
-
const
|
|
1558
|
-
return
|
|
1559
|
-
e.loading ? (
|
|
1561
|
+
function Yt(e, t, n, r, a, m) {
|
|
1562
|
+
const l = s("v-progress-linear"), p = s("MobileLayoutItem"), _ = s("v-pagination");
|
|
1563
|
+
return c(), g("div", Zt, [
|
|
1564
|
+
e.loading ? (c(), h(l, {
|
|
1560
1565
|
key: 0,
|
|
1561
1566
|
indeterminate: ""
|
|
1562
|
-
})) :
|
|
1563
|
-
(
|
|
1564
|
-
key:
|
|
1565
|
-
item:
|
|
1567
|
+
})) : L("", !0),
|
|
1568
|
+
(c(!0), g(P, null, U(e.items, (i) => (c(), h(p, {
|
|
1569
|
+
key: i.id,
|
|
1570
|
+
item: i,
|
|
1566
1571
|
"title-headers": e.titleHeaders,
|
|
1567
1572
|
"mini-tbl-headers": e.miniTblHeaders,
|
|
1568
1573
|
"sub-title-headers": e.subTitleHeaders,
|
|
@@ -1572,21 +1577,21 @@ function Gt(e, t, n, a, l, m) {
|
|
|
1572
1577
|
onRowClick: t[0] || (t[0] = (d) => e.$emit("row-click", d)),
|
|
1573
1578
|
onRowAction: t[1] || (t[1] = (d) => e.$emit("row-action", d))
|
|
1574
1579
|
}, null, 8, ["item", "title-headers", "mini-tbl-headers", "sub-title-headers", "tag-headers", "other-headers", "row-actions"]))), 128)),
|
|
1575
|
-
e.totalItems > e.pageSize ? (
|
|
1576
|
-
|
|
1580
|
+
e.totalItems > e.pageSize ? (c(), g("div", Kt, [
|
|
1581
|
+
u(_, {
|
|
1577
1582
|
modelValue: e.pageVal,
|
|
1578
1583
|
"onUpdate:modelValue": [
|
|
1579
|
-
t[2] || (t[2] = (
|
|
1584
|
+
t[2] || (t[2] = (i) => e.pageVal = i),
|
|
1580
1585
|
e.changePage
|
|
1581
1586
|
],
|
|
1582
1587
|
length: Math.ceil(e.totalItems / e.options.pageSize),
|
|
1583
1588
|
rounded: "circle",
|
|
1584
1589
|
density: "comfortable"
|
|
1585
1590
|
}, null, 8, ["modelValue", "length", "onUpdate:modelValue"])
|
|
1586
|
-
])) :
|
|
1591
|
+
])) : L("", !0)
|
|
1587
1592
|
]);
|
|
1588
1593
|
}
|
|
1589
|
-
const
|
|
1594
|
+
const Fn = /* @__PURE__ */ A(Gt, [["render", Yt]]), Jt = k({
|
|
1590
1595
|
name: "DesktopLayout",
|
|
1591
1596
|
components: { RowActionsButton: Y },
|
|
1592
1597
|
props: {
|
|
@@ -1616,34 +1621,34 @@ const Pn = /* @__PURE__ */ A(Rt, [["render", Gt]]), Yt = M({
|
|
|
1616
1621
|
}
|
|
1617
1622
|
},
|
|
1618
1623
|
setup(e, t) {
|
|
1619
|
-
const { t: n } =
|
|
1620
|
-
const d =
|
|
1624
|
+
const { t: n } = I(), r = e.options.page, a = e.options.pageSize, m = e.options.sortField ? [{ key: e.options.sortField, order: e.options.sortDir }] : [], l = (i) => {
|
|
1625
|
+
const d = i.sortBy && i.sortBy.length > 0 ? i.sortBy[0] : null;
|
|
1621
1626
|
t.emit("options-update", {
|
|
1622
|
-
page:
|
|
1623
|
-
pageSize:
|
|
1627
|
+
page: i.page,
|
|
1628
|
+
pageSize: i.itemsPerPage,
|
|
1624
1629
|
sortField: d?.key ?? null,
|
|
1625
1630
|
sortDir: d?.order ?? "asc"
|
|
1626
1631
|
});
|
|
1627
|
-
},
|
|
1632
|
+
}, p = V(() => [
|
|
1628
1633
|
{ value: 5, title: "5" },
|
|
1629
1634
|
{ value: 10, title: "10" },
|
|
1630
1635
|
{ value: 25, title: "25" },
|
|
1631
1636
|
{ value: 50, title: "50" },
|
|
1632
1637
|
{ value: -1, title: n("All") }
|
|
1633
|
-
]),
|
|
1634
|
-
const
|
|
1635
|
-
return
|
|
1638
|
+
]), _ = V(() => {
|
|
1639
|
+
const i = n("{0}-{1} of {2}", ["{0}", "{1}", "{2}"]), d = (e.options.page - 1) * e.options.pageSize + 1, b = Math.min(e.options.page * e.options.pageSize, e.totalItems);
|
|
1640
|
+
return i.replace("{0}", d.toString()).replace("{1}", b.toString()).replace("{2}", e.totalItems.toString());
|
|
1636
1641
|
});
|
|
1637
|
-
return { page:
|
|
1642
|
+
return { page: r, pageSize: a, sortBy: m, pageOptions: p, optionsUpdate: l, getPageText: _ };
|
|
1638
1643
|
}
|
|
1639
|
-
}),
|
|
1644
|
+
}), Wt = { class: "data-table-layout" }, Xt = ["onClick"], Qt = { key: 1 }, xt = { key: 2 }, en = {
|
|
1640
1645
|
key: 0,
|
|
1641
1646
|
class: "text-right"
|
|
1642
1647
|
};
|
|
1643
|
-
function
|
|
1644
|
-
const
|
|
1645
|
-
return
|
|
1646
|
-
|
|
1648
|
+
function tn(e, t, n, r, a, m) {
|
|
1649
|
+
const l = s("RowActionsButton"), p = s("v-data-table-server");
|
|
1650
|
+
return c(), g("div", Wt, [
|
|
1651
|
+
u(p, {
|
|
1647
1652
|
items: e.items,
|
|
1648
1653
|
"items-length": e.totalItems,
|
|
1649
1654
|
headers: e.headers,
|
|
@@ -1656,34 +1661,34 @@ function xt(e, t, n, a, l, m) {
|
|
|
1656
1661
|
"items-per-page-options": e.pageOptions,
|
|
1657
1662
|
"onUpdate:options": e.optionsUpdate
|
|
1658
1663
|
}, {
|
|
1659
|
-
item: o(({ item:
|
|
1664
|
+
item: o(({ item: _ }) => [
|
|
1660
1665
|
$("tr", {
|
|
1661
|
-
onClick: (
|
|
1666
|
+
onClick: (i) => e.$emit("row-click", _),
|
|
1662
1667
|
style: { cursor: "pointer" }
|
|
1663
1668
|
}, [
|
|
1664
|
-
(
|
|
1665
|
-
key:
|
|
1666
|
-
class: E(["v-data-table__td", `v-data-table-column--align-${
|
|
1669
|
+
(c(!0), g(P, null, U(e.headers, (i) => (c(), g("td", {
|
|
1670
|
+
key: i.value,
|
|
1671
|
+
class: E(["v-data-table__td", `v-data-table-column--align-${i.align ?? "start"}`, i.mainField ? "ff-col-main" : ""])
|
|
1667
1672
|
}, [
|
|
1668
|
-
|
|
1673
|
+
i.component ? (c(), h(F(i.component), D({
|
|
1669
1674
|
key: 0,
|
|
1670
1675
|
ref_for: !0
|
|
1671
|
-
},
|
|
1676
|
+
}, i.getProps ? i.getProps(i, _) : {}), null, 16)) : i.format ? (c(), g("span", Qt, y(i.format(i, _)), 1)) : (c(), g("span", xt, y(_[i.value]), 1))
|
|
1672
1677
|
], 2))), 128)),
|
|
1673
|
-
e.rowActions ? (
|
|
1674
|
-
|
|
1675
|
-
item:
|
|
1678
|
+
e.rowActions ? (c(), g("td", en, [
|
|
1679
|
+
u(l, {
|
|
1680
|
+
item: _,
|
|
1676
1681
|
"row-actions": e.rowActions,
|
|
1677
|
-
onRowAction: t[0] || (t[0] = (
|
|
1682
|
+
onRowAction: t[0] || (t[0] = (i) => e.$emit("row-action", i))
|
|
1678
1683
|
}, null, 8, ["item", "row-actions"])
|
|
1679
|
-
])) :
|
|
1680
|
-
], 8,
|
|
1684
|
+
])) : L("", !0)
|
|
1685
|
+
], 8, Xt)
|
|
1681
1686
|
]),
|
|
1682
1687
|
_: 1
|
|
1683
1688
|
}, 8, ["items", "items-length", "headers", "loading", "page", "items-per-page", "sort-by", "hide-default-footer", "items-per-page-options", "onUpdate:options"])
|
|
1684
1689
|
]);
|
|
1685
1690
|
}
|
|
1686
|
-
const
|
|
1691
|
+
const zn = /* @__PURE__ */ A(Jt, [["render", tn]]), nn = k({
|
|
1687
1692
|
name: "ColumnSelector",
|
|
1688
1693
|
props: {
|
|
1689
1694
|
columns: {
|
|
@@ -1705,38 +1710,38 @@ const Un = /* @__PURE__ */ A(Yt, [["render", xt]]), en = M({
|
|
|
1705
1710
|
}
|
|
1706
1711
|
},
|
|
1707
1712
|
setup(e, { emit: t }) {
|
|
1708
|
-
return { toggleColumn: (
|
|
1709
|
-
const
|
|
1710
|
-
|
|
1713
|
+
return { toggleColumn: (r) => {
|
|
1714
|
+
const a = [...e.currentColumns];
|
|
1715
|
+
a.indexOf(r) >= 0 ? a.splice(a.indexOf(r), 1) : a.push(r), t("changeCurrentColumns", a);
|
|
1711
1716
|
} };
|
|
1712
1717
|
}
|
|
1713
1718
|
});
|
|
1714
|
-
function
|
|
1715
|
-
const
|
|
1716
|
-
return
|
|
1719
|
+
function on(e, t, n, r, a, m) {
|
|
1720
|
+
const l = s("v-btn"), p = s("v-list-item-title"), _ = s("v-icon"), i = s("v-list-item"), d = s("v-list"), b = s("v-menu");
|
|
1721
|
+
return c(), h(b, null, {
|
|
1717
1722
|
activator: o(({ props: v }) => [
|
|
1718
|
-
|
|
1723
|
+
u(l, D({
|
|
1719
1724
|
variant: "text",
|
|
1720
1725
|
icon: e.mdiViewColumn()
|
|
1721
1726
|
}, v), null, 16, ["icon"])
|
|
1722
1727
|
]),
|
|
1723
1728
|
default: o(() => [
|
|
1724
|
-
|
|
1729
|
+
u(d, { density: "compact" }, {
|
|
1725
1730
|
default: o(() => [
|
|
1726
|
-
(
|
|
1727
|
-
key:
|
|
1731
|
+
(c(!0), g(P, null, U(e.columns, (v, f) => (c(), h(i, {
|
|
1732
|
+
key: f,
|
|
1728
1733
|
onClick: (H) => e.toggleColumn(v.value)
|
|
1729
1734
|
}, {
|
|
1730
1735
|
append: o(() => [
|
|
1731
|
-
|
|
1736
|
+
u(_, {
|
|
1732
1737
|
icon: e.mdiCheck(),
|
|
1733
1738
|
color: e.currentColumns.indexOf(v.value) >= 0 ? "primary" : "white"
|
|
1734
1739
|
}, null, 8, ["icon", "color"])
|
|
1735
1740
|
]),
|
|
1736
1741
|
default: o(() => [
|
|
1737
|
-
|
|
1742
|
+
u(p, null, {
|
|
1738
1743
|
default: o(() => [
|
|
1739
|
-
|
|
1744
|
+
C(y(v.title), 1)
|
|
1740
1745
|
]),
|
|
1741
1746
|
_: 2
|
|
1742
1747
|
}, 1024)
|
|
@@ -1750,7 +1755,7 @@ function tn(e, t, n, a, l, m) {
|
|
|
1750
1755
|
_: 1
|
|
1751
1756
|
});
|
|
1752
1757
|
}
|
|
1753
|
-
const
|
|
1758
|
+
const Bn = /* @__PURE__ */ A(nn, [["render", on]]), rn = k({
|
|
1754
1759
|
name: "EmptyFilter",
|
|
1755
1760
|
props: {
|
|
1756
1761
|
modelValue: {
|
|
@@ -1766,12 +1771,12 @@ const Dn = /* @__PURE__ */ A(en, [["render", tn]]), nn = M({
|
|
|
1766
1771
|
required: !0
|
|
1767
1772
|
}
|
|
1768
1773
|
}
|
|
1769
|
-
}),
|
|
1770
|
-
function
|
|
1771
|
-
const
|
|
1772
|
-
return
|
|
1773
|
-
$("div",
|
|
1774
|
-
|
|
1774
|
+
}), ln = { class: "f-lbl" };
|
|
1775
|
+
function sn(e, t, n, r, a, m) {
|
|
1776
|
+
const l = s("v-btn");
|
|
1777
|
+
return c(), g("div", null, [
|
|
1778
|
+
$("div", ln, y(e.$t(e.filter.title)), 1),
|
|
1779
|
+
u(l, {
|
|
1775
1780
|
variant: "flat",
|
|
1776
1781
|
color: "grey-lighten-2"
|
|
1777
1782
|
}, {
|
|
@@ -1782,7 +1787,7 @@ function rn(e, t, n, a, l, m) {
|
|
|
1782
1787
|
})
|
|
1783
1788
|
]);
|
|
1784
1789
|
}
|
|
1785
|
-
const
|
|
1790
|
+
const Rn = /* @__PURE__ */ A(rn, [["render", sn]]), an = k({
|
|
1786
1791
|
name: "SelectFilter",
|
|
1787
1792
|
props: {
|
|
1788
1793
|
modelValue: {
|
|
@@ -1804,27 +1809,27 @@ const En = /* @__PURE__ */ A(nn, [["render", rn]]), ln = M({
|
|
|
1804
1809
|
return Z;
|
|
1805
1810
|
},
|
|
1806
1811
|
mdiMenuDown() {
|
|
1807
|
-
return
|
|
1812
|
+
return W;
|
|
1808
1813
|
}
|
|
1809
1814
|
},
|
|
1810
1815
|
setup(e, { emit: t }) {
|
|
1811
|
-
const { t: n } =
|
|
1816
|
+
const { t: n } = I(), r = Math.ceil(Math.random() * 1e5), a = S(!1), m = S(e.modelValue === null ? [] : (Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue]).map((i) => typeof i == "string" ? parseInt(i) : i)), l = V(() => {
|
|
1812
1817
|
if (!e.modelValue)
|
|
1813
1818
|
return n("All");
|
|
1814
|
-
const
|
|
1815
|
-
return
|
|
1819
|
+
const i = (Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue]).map((d) => typeof d == "string" ? parseInt(d) : d);
|
|
1820
|
+
return i.length >= 3 ? `${i.length} ${n("items")}` : i.map((d) => e.items.find((b) => b.id === d)?.name).join(", ");
|
|
1816
1821
|
});
|
|
1817
|
-
return { ctrlId:
|
|
1818
|
-
}, selVal: (
|
|
1819
|
-
e.filter.multiple ? m.value.indexOf(
|
|
1820
|
-
}, disp:
|
|
1822
|
+
return { ctrlId: r, open: a, selected: m, openMenu: () => {
|
|
1823
|
+
}, selVal: (i) => {
|
|
1824
|
+
e.filter.multiple ? m.value.indexOf(i) >= 0 ? m.value.splice(m.value.indexOf(i), 1) : m.value.push(i) : m.value = [i], t("change", m);
|
|
1825
|
+
}, disp: l };
|
|
1821
1826
|
}
|
|
1822
|
-
}),
|
|
1823
|
-
function
|
|
1824
|
-
const
|
|
1825
|
-
return
|
|
1826
|
-
$("div",
|
|
1827
|
-
|
|
1827
|
+
}), un = { class: "f-lbl" };
|
|
1828
|
+
function cn(e, t, n, r, a, m) {
|
|
1829
|
+
const l = s("v-icon"), p = s("v-btn"), _ = s("v-list-item-title"), i = s("v-list-item"), d = s("v-list"), b = s("v-card-text"), v = s("v-card"), f = s("v-menu");
|
|
1830
|
+
return c(), g("div", null, [
|
|
1831
|
+
$("div", un, y(e.$t(e.filter.title)), 1),
|
|
1832
|
+
u(p, {
|
|
1828
1833
|
id: `menu-activator${e.ctrlId}`,
|
|
1829
1834
|
variant: "flat",
|
|
1830
1835
|
class: E(["like-select", e.modelValue === null ? "empty" : ""]),
|
|
@@ -1832,7 +1837,7 @@ function an(e, t, n, a, l, m) {
|
|
|
1832
1837
|
onClick: e.openMenu
|
|
1833
1838
|
}, {
|
|
1834
1839
|
append: o(() => [
|
|
1835
|
-
|
|
1840
|
+
u(l, {
|
|
1836
1841
|
size: 24,
|
|
1837
1842
|
icon: e.mdiMenuDown()
|
|
1838
1843
|
}, null, 8, ["icon"])
|
|
@@ -1842,33 +1847,33 @@ function an(e, t, n, a, l, m) {
|
|
|
1842
1847
|
]),
|
|
1843
1848
|
_: 1
|
|
1844
1849
|
}, 8, ["id", "class", "onClick"]),
|
|
1845
|
-
|
|
1850
|
+
u(f, {
|
|
1846
1851
|
modelValue: e.open,
|
|
1847
1852
|
"onUpdate:modelValue": t[0] || (t[0] = (H) => e.open = H),
|
|
1848
1853
|
activator: `#menu-activator${e.ctrlId}`,
|
|
1849
1854
|
"close-on-content-click": !0
|
|
1850
1855
|
}, {
|
|
1851
1856
|
default: o(() => [
|
|
1852
|
-
|
|
1857
|
+
u(v, null, {
|
|
1853
1858
|
default: o(() => [
|
|
1854
|
-
|
|
1859
|
+
u(b, { class: "pa-0" }, {
|
|
1855
1860
|
default: o(() => [
|
|
1856
|
-
|
|
1861
|
+
u(d, null, {
|
|
1857
1862
|
default: o(() => [
|
|
1858
|
-
(
|
|
1863
|
+
(c(!0), g(P, null, U(e.items, (H) => (c(), h(i, {
|
|
1859
1864
|
key: H.id,
|
|
1860
1865
|
onClick: (O) => e.selVal(H.id)
|
|
1861
1866
|
}, {
|
|
1862
1867
|
append: o(() => [
|
|
1863
|
-
|
|
1868
|
+
u(l, {
|
|
1864
1869
|
color: e.selected.indexOf(H.id) >= 0 ? "primary" : "white",
|
|
1865
1870
|
icon: e.mdiCheck()
|
|
1866
1871
|
}, null, 8, ["color", "icon"])
|
|
1867
1872
|
]),
|
|
1868
1873
|
default: o(() => [
|
|
1869
|
-
|
|
1874
|
+
u(_, null, {
|
|
1870
1875
|
default: o(() => [
|
|
1871
|
-
|
|
1876
|
+
C(y(H.name), 1)
|
|
1872
1877
|
]),
|
|
1873
1878
|
_: 2
|
|
1874
1879
|
}, 1024)
|
|
@@ -1889,7 +1894,7 @@ function an(e, t, n, a, l, m) {
|
|
|
1889
1894
|
}, 8, ["modelValue", "activator"])
|
|
1890
1895
|
]);
|
|
1891
1896
|
}
|
|
1892
|
-
const
|
|
1897
|
+
const jn = /* @__PURE__ */ A(an, [["render", cn]]), dn = k({
|
|
1893
1898
|
name: "DataTableFilters",
|
|
1894
1899
|
props: {
|
|
1895
1900
|
filters: {
|
|
@@ -1908,28 +1913,205 @@ const Tn = /* @__PURE__ */ A(ln, [["render", an]]), un = M({
|
|
|
1908
1913
|
setup(e) {
|
|
1909
1914
|
return { filters: S(e.filters.map((n) => ({ ...n, component: e.getFilterComponent(n), value: n.default }))) };
|
|
1910
1915
|
}
|
|
1911
|
-
}),
|
|
1912
|
-
function
|
|
1913
|
-
return
|
|
1914
|
-
(
|
|
1915
|
-
key:
|
|
1916
|
+
}), mn = { class: "dt-filters" };
|
|
1917
|
+
function pn(e, t, n, r, a, m) {
|
|
1918
|
+
return c(), g("div", mn, [
|
|
1919
|
+
(c(!0), g(P, null, U(e.filters, (l) => (c(), g("div", {
|
|
1920
|
+
key: l.name
|
|
1916
1921
|
}, [
|
|
1917
|
-
(
|
|
1918
|
-
modelValue: e.filterValues[
|
|
1919
|
-
"onUpdate:modelValue": (
|
|
1920
|
-
filter:
|
|
1921
|
-
onChange: (
|
|
1922
|
+
(c(), h(F(l.component), {
|
|
1923
|
+
modelValue: e.filterValues[l.name],
|
|
1924
|
+
"onUpdate:modelValue": (p) => e.filterValues[l.name] = p,
|
|
1925
|
+
filter: l,
|
|
1926
|
+
onChange: (p) => e.$emit("change", { name: l.name, value: p })
|
|
1922
1927
|
}, null, 40, ["modelValue", "onUpdate:modelValue", "filter", "onChange"]))
|
|
1923
1928
|
]))), 128))
|
|
1924
1929
|
]);
|
|
1925
1930
|
}
|
|
1926
|
-
const
|
|
1931
|
+
const Gn = /* @__PURE__ */ A(dn, [["render", pn]]), N = {
|
|
1932
|
+
PENDING: "pending",
|
|
1933
|
+
ACTIVE: "active",
|
|
1934
|
+
INACTIVE: "inactive",
|
|
1935
|
+
PENDING_INACTIVE: "pending_inactive",
|
|
1936
|
+
format(e, t) {
|
|
1937
|
+
switch (e) {
|
|
1938
|
+
case this.PENDING:
|
|
1939
|
+
return t("User status__Pending");
|
|
1940
|
+
case this.ACTIVE:
|
|
1941
|
+
return t("User status__Active");
|
|
1942
|
+
case this.INACTIVE:
|
|
1943
|
+
case this.PENDING_INACTIVE:
|
|
1944
|
+
return t("User status__Inactive");
|
|
1945
|
+
default:
|
|
1946
|
+
return e;
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
}, fn = k({
|
|
1950
|
+
name: "UserStatusChip",
|
|
1951
|
+
props: {
|
|
1952
|
+
item: {
|
|
1953
|
+
type: Object,
|
|
1954
|
+
required: !0
|
|
1955
|
+
}
|
|
1956
|
+
},
|
|
1957
|
+
setup(e) {
|
|
1958
|
+
const { t } = I();
|
|
1959
|
+
return { chipProps: V(() => {
|
|
1960
|
+
const r = N.format(e.item.status, t);
|
|
1961
|
+
switch (e.item.status) {
|
|
1962
|
+
case N.ACTIVE:
|
|
1963
|
+
return { text: r, color: "primary" };
|
|
1964
|
+
case N.PENDING:
|
|
1965
|
+
return { text: r, color: "deep-orange" };
|
|
1966
|
+
case N.INACTIVE:
|
|
1967
|
+
return { text: r, color: "grey-darken-1" };
|
|
1968
|
+
case N.PENDING_INACTIVE:
|
|
1969
|
+
return { text: r, color: "grey-darken-1" };
|
|
1970
|
+
default:
|
|
1971
|
+
return { text: r, color: "grey-darken-1" };
|
|
1972
|
+
}
|
|
1973
|
+
}) };
|
|
1974
|
+
}
|
|
1975
|
+
});
|
|
1976
|
+
function vn(e, t, n, r, a, m) {
|
|
1977
|
+
const l = s("v-chip");
|
|
1978
|
+
return c(), h(l, {
|
|
1979
|
+
label: "",
|
|
1980
|
+
color: e.chipProps.color
|
|
1981
|
+
}, {
|
|
1982
|
+
default: o(() => [
|
|
1983
|
+
C(y(e.chipProps.text), 1)
|
|
1984
|
+
]),
|
|
1985
|
+
_: 1
|
|
1986
|
+
}, 8, ["color"]);
|
|
1987
|
+
}
|
|
1988
|
+
const Zn = /* @__PURE__ */ A(fn, [["render", vn]]), _n = k({
|
|
1989
|
+
name: "ConfirmPopup",
|
|
1990
|
+
props: {
|
|
1991
|
+
show: {
|
|
1992
|
+
type: Boolean,
|
|
1993
|
+
required: !0
|
|
1994
|
+
},
|
|
1995
|
+
message: {
|
|
1996
|
+
type: String,
|
|
1997
|
+
required: !0
|
|
1998
|
+
},
|
|
1999
|
+
okText: {
|
|
2000
|
+
type: String,
|
|
2001
|
+
default: null
|
|
2002
|
+
},
|
|
2003
|
+
okLoading: {
|
|
2004
|
+
type: Boolean,
|
|
2005
|
+
default: !1
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
});
|
|
2009
|
+
function gn(e, t, n, r, a, m) {
|
|
2010
|
+
const l = s("v-card-text"), p = s("v-spacer"), _ = s("v-btn"), i = s("v-card-actions"), d = s("v-card"), b = s("v-dialog");
|
|
2011
|
+
return c(), h(b, {
|
|
2012
|
+
modelValue: e.show,
|
|
2013
|
+
"onUpdate:modelValue": [
|
|
2014
|
+
t[2] || (t[2] = (v) => e.show = v),
|
|
2015
|
+
t[3] || (t[3] = (v) => e.$emit("close"))
|
|
2016
|
+
],
|
|
2017
|
+
width: "608px"
|
|
2018
|
+
}, {
|
|
2019
|
+
default: o(() => [
|
|
2020
|
+
u(d, {
|
|
2021
|
+
dark: "",
|
|
2022
|
+
class: "confirm-dialog",
|
|
2023
|
+
theme: "dark"
|
|
2024
|
+
}, {
|
|
2025
|
+
default: o(() => [
|
|
2026
|
+
u(l, { class: "text-subtitle-1" }, {
|
|
2027
|
+
default: o(() => [
|
|
2028
|
+
C(y(e.message), 1)
|
|
2029
|
+
]),
|
|
2030
|
+
_: 1
|
|
2031
|
+
}),
|
|
2032
|
+
u(i, { class: "dialog-actions-bar" }, {
|
|
2033
|
+
default: o(() => [
|
|
2034
|
+
T(e.$slots, "buttons", {}, () => [
|
|
2035
|
+
u(p),
|
|
2036
|
+
u(_, {
|
|
2037
|
+
onClick: t[0] || (t[0] = (v) => e.$emit("close")),
|
|
2038
|
+
flat: ""
|
|
2039
|
+
}, {
|
|
2040
|
+
default: o(() => [
|
|
2041
|
+
C(y(e.$t("Cancel")), 1)
|
|
2042
|
+
]),
|
|
2043
|
+
_: 1
|
|
2044
|
+
}),
|
|
2045
|
+
u(_, {
|
|
2046
|
+
variant: "flat",
|
|
2047
|
+
loading: e.okLoading,
|
|
2048
|
+
onClick: t[1] || (t[1] = (v) => e.$emit("ok")),
|
|
2049
|
+
color: "primary"
|
|
2050
|
+
}, {
|
|
2051
|
+
default: o(() => [
|
|
2052
|
+
C(y(e.okText ?? e.$t("OK")), 1)
|
|
2053
|
+
]),
|
|
2054
|
+
_: 1
|
|
2055
|
+
}, 8, ["loading"])
|
|
2056
|
+
])
|
|
2057
|
+
]),
|
|
2058
|
+
_: 3
|
|
2059
|
+
})
|
|
2060
|
+
]),
|
|
2061
|
+
_: 3
|
|
2062
|
+
})
|
|
2063
|
+
]),
|
|
2064
|
+
_: 3
|
|
2065
|
+
}, 8, ["modelValue"]);
|
|
2066
|
+
}
|
|
2067
|
+
const Kn = /* @__PURE__ */ A(_n, [["render", gn]]), yn = k({
|
|
2068
|
+
name: "SearchFilter",
|
|
2069
|
+
props: {
|
|
2070
|
+
modelValue: {
|
|
2071
|
+
type: String,
|
|
2072
|
+
default: null
|
|
2073
|
+
},
|
|
2074
|
+
filter: {
|
|
2075
|
+
type: Object,
|
|
2076
|
+
required: !0
|
|
2077
|
+
}
|
|
2078
|
+
},
|
|
2079
|
+
emits: ["change"],
|
|
2080
|
+
setup(e) {
|
|
2081
|
+
const t = S(e.modelValue), n = () => {
|
|
2082
|
+
let r;
|
|
2083
|
+
return (a, m, l = 500) => {
|
|
2084
|
+
clearTimeout(r), r = window.setTimeout(() => m(a), l);
|
|
2085
|
+
};
|
|
2086
|
+
};
|
|
2087
|
+
return ne(() => e.modelValue, (r) => {
|
|
2088
|
+
r !== t.value && (t.value = r);
|
|
2089
|
+
}), { val: t, debounce: n() };
|
|
2090
|
+
}
|
|
2091
|
+
}), $n = { class: "f-lbl" };
|
|
2092
|
+
function hn(e, t, n, r, a, m) {
|
|
2093
|
+
const l = s("v-text-field");
|
|
2094
|
+
return c(), g("div", null, [
|
|
2095
|
+
$("div", $n, y(e.$t(e.filter.title)), 1),
|
|
2096
|
+
u(l, {
|
|
2097
|
+
modelValue: e.val,
|
|
2098
|
+
"onUpdate:modelValue": [
|
|
2099
|
+
t[0] || (t[0] = (p) => e.val = p),
|
|
2100
|
+
t[1] || (t[1] = (p) => e.debounce(p, (_) => e.$emit("change", _)))
|
|
2101
|
+
],
|
|
2102
|
+
variant: "outlined",
|
|
2103
|
+
"hide-details": !0,
|
|
2104
|
+
density: "compact"
|
|
2105
|
+
}, null, 8, ["modelValue"])
|
|
2106
|
+
]);
|
|
2107
|
+
}
|
|
2108
|
+
const Yn = /* @__PURE__ */ A(yn, [["render", hn]]), Jn = (e) => e ? e.replace(/(?:\r\n|\r|\n)/g, "<br>") : "", Wn = (e) => JSON.parse(JSON.stringify(e)), Xn = (e) => {
|
|
1927
2109
|
let t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
1928
2110
|
return t ? decodeURIComponent(t[3]) : null;
|
|
1929
|
-
},
|
|
1930
|
-
let
|
|
1931
|
-
return
|
|
1932
|
-
},
|
|
2111
|
+
}, Qn = (e, t, n, r = null) => {
|
|
2112
|
+
let a, m;
|
|
2113
|
+
return r == null && (r = "/"), m = "", n && (a = /* @__PURE__ */ new Date(), a.setTime(a.getTime() + n * 24 * 60 * 60 * 1e3), m = "; expires=" + a.toUTCString()), document.cookie = encodeURIComponent(e) + "=" + encodeURIComponent(t) + m + "; path=" + r, !0;
|
|
2114
|
+
}, xn = (e, t) => {
|
|
1933
2115
|
for (const n of t) {
|
|
1934
2116
|
if (n === "/")
|
|
1935
2117
|
return e === "/";
|
|
@@ -1937,41 +2119,41 @@ const On = /* @__PURE__ */ A(un, [["render", dn]]), qn = (e) => e ? e.replace(/(
|
|
|
1937
2119
|
return !0;
|
|
1938
2120
|
}
|
|
1939
2121
|
return !1;
|
|
1940
|
-
},
|
|
2122
|
+
}, eo = (e) => {
|
|
1941
2123
|
const t = {};
|
|
1942
2124
|
for (const n of ["p", "l", "s", "d"])
|
|
1943
2125
|
e[n] !== void 0 && (t[n] = e[n]);
|
|
1944
2126
|
return t;
|
|
1945
|
-
},
|
|
2127
|
+
}, bn = {
|
|
1946
2128
|
et_EE: { culture: "et-EE", datetime_format: "d.MM.yyyy H:mm", date_format_no_year: "d.MM", month_format: "MM.yyyy", decimal_symbol: ",", list_separator: ";", time_format: "H:mm", date_format_friendly_no_year: "d. MMM", date_format: "d.MM.yyyy", thousands_symbol: " ", datetime_pos_format: "{1} {0}", money_format: "{1} {0}" },
|
|
1947
2129
|
et: { culture: "et", datetime_format: "d.MM.yyyy H:mm", date_format_no_year: "d.MM", month_format: "MM.yyyy", decimal_symbol: ",", list_separator: ";", time_format: "H:mm", date_format_friendly_no_year: "d. MMM", date_format: "d.MM.yyyy", thousands_symbol: " ", datetime_pos_format: "{1} {0}", money_format: "{1} {0}" },
|
|
1948
2130
|
en_GB: { culture: "en-GB", datetime_format: "dd/MM/yyyy, HH:mm", date_format_no_year: "dd/MM", month_format: "MM/yyyy", decimal_symbol: ".", list_separator: ",", time_format: "HH:mm", date_format_friendly_no_year: "D MMM", date_format: "dd/MM/yyyy", thousands_symbol: ",", datetime_pos_format: "{1}, {0}", money_format: "{1} {0}" },
|
|
1949
2131
|
en: { culture: "en", datetime_format: "dd/MM/yyyy, HH:mm", date_format_no_year: "dd/MM", month_format: "MM/yyyy", decimal_symbol: ".", list_separator: ",", time_format: "HH:mm", date_format_friendly_no_year: "D MMM", date_format: "dd/MM/yyyy", thousands_symbol: ",", datetime_pos_format: "{1}, {0}", money_format: "{1} {0}" }
|
|
1950
|
-
},
|
|
2132
|
+
}, to = {
|
|
1951
2133
|
EUR: "€",
|
|
1952
2134
|
USD: "$"
|
|
1953
2135
|
};
|
|
1954
|
-
function
|
|
1955
|
-
const e =
|
|
1956
|
-
return V(() =>
|
|
2136
|
+
function kn() {
|
|
2137
|
+
const e = oe("i18nLocale", V(() => "en_GB"));
|
|
2138
|
+
return V(() => re(e));
|
|
1957
2139
|
}
|
|
1958
|
-
const
|
|
2140
|
+
const J = kn(), An = (e, t, n, r, a) => (typeof e == "string" && (e = parseFloat(e)), e.toLocaleString("en-GB", { minimumFractionDigits: t, maximumFractionDigits: n }).replace(/\.|,/gi, (m) => m === "." ? r : a)), no = (e, t) => e == null ? "" : e.replace(new RegExp(t, "g"), "").replace(new RegExp(" ", "g"), "").replace(",", "."), Cn = /(dddd|dd|d|hh|h|HH|H|mm|m|MMMM|MMM|MM|M|ss|s|tt|yyyy|yy|zzz)/g, oo = (e, t) => {
|
|
1959
2141
|
if (!e) return "";
|
|
1960
2142
|
const n = typeof e == "string" ? new Date(e) : e;
|
|
1961
|
-
return t.replace(
|
|
1962
|
-
switch (
|
|
2143
|
+
return t.replace(Cn, (r) => {
|
|
2144
|
+
switch (r) {
|
|
1963
2145
|
case "d":
|
|
1964
2146
|
return n.getDate().toString();
|
|
1965
2147
|
case "dd":
|
|
1966
2148
|
case "DD":
|
|
1967
2149
|
return ("0" + n.getDate()).slice(-2);
|
|
1968
2150
|
case "h": {
|
|
1969
|
-
const
|
|
1970
|
-
return (
|
|
2151
|
+
const a = n.getHours();
|
|
2152
|
+
return (a === 0 ? 12 : a > 12 ? a - 12 : a).toString();
|
|
1971
2153
|
}
|
|
1972
2154
|
case "hh": {
|
|
1973
|
-
const
|
|
1974
|
-
return ("0" + (
|
|
2155
|
+
const a = n.getHours();
|
|
2156
|
+
return ("0" + (a === 0 ? 12 : a > 12 ? a - 12 : a)).slice(-2);
|
|
1975
2157
|
}
|
|
1976
2158
|
case "H":
|
|
1977
2159
|
return n.getHours().toString();
|
|
@@ -2003,60 +2185,65 @@ const K = pn(), fn = (e, t, n, a, l) => (typeof e == "string" && (e = parseFloat
|
|
|
2003
2185
|
case "YYYY":
|
|
2004
2186
|
return n.getFullYear().toString();
|
|
2005
2187
|
case "zzz": {
|
|
2006
|
-
const
|
|
2007
|
-
return `${
|
|
2188
|
+
const a = n.getTimezoneOffset(), m = Math.abs(a) % 60;
|
|
2189
|
+
return `${a <= 0 ? "+" : "-"}${("0" + (Math.abs(a) - m) / 60).slice(-2)}:${("0" + m).slice(-2)}`;
|
|
2008
2190
|
}
|
|
2009
2191
|
default:
|
|
2010
|
-
return
|
|
2192
|
+
return r;
|
|
2011
2193
|
}
|
|
2012
2194
|
});
|
|
2013
|
-
},
|
|
2195
|
+
}, ro = (e, t = void 0, n = void 0) => {
|
|
2014
2196
|
if (t === void 0 && (t = 0), n === void 0 && (n = 4), e == null) return "";
|
|
2015
|
-
typeof e == "string" && (e = parseFloat(e)), console.log("AAAAAAA",
|
|
2016
|
-
const { decimal_symbol:
|
|
2017
|
-
return
|
|
2197
|
+
typeof e == "string" && (e = parseFloat(e)), console.log("AAAAAAA", J.value);
|
|
2198
|
+
const { decimal_symbol: r, thousands_symbol: a } = bn[J.value] ?? { decimal_symbol: ".", thousands_symbol: "," };
|
|
2199
|
+
return An(e, t, n, r, a);
|
|
2018
2200
|
};
|
|
2019
2201
|
export {
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
Sn as
|
|
2041
|
-
Hn as
|
|
2202
|
+
K as AccountAvatar,
|
|
2203
|
+
rt as ColorPicker,
|
|
2204
|
+
Bn as ColumnSelector,
|
|
2205
|
+
Kn as ConfirmPopup,
|
|
2206
|
+
bn as CultureInfos,
|
|
2207
|
+
to as CurrencySymbols,
|
|
2208
|
+
He as CustomDialog,
|
|
2209
|
+
Gn as DataTableFilters,
|
|
2210
|
+
zn as DesktopLayout,
|
|
2211
|
+
Rn as EmptyFilter,
|
|
2212
|
+
En as ErrorDialog,
|
|
2213
|
+
at as FieldLabel,
|
|
2214
|
+
Tn as FieldRow,
|
|
2215
|
+
In as InLanguages,
|
|
2216
|
+
Pn as InnerLeftMenu,
|
|
2217
|
+
G as LangUtil,
|
|
2218
|
+
X as Languages,
|
|
2219
|
+
it as LazyLoadingProp,
|
|
2220
|
+
Fn as MobileLayout,
|
|
2221
|
+
jt as MobileLayoutItem,
|
|
2222
|
+
Sn as PageSubtitle,
|
|
2223
|
+
Hn as PageTitle,
|
|
2224
|
+
Nn as ProfileEditDialog,
|
|
2225
|
+
On as ProfileInfo,
|
|
2042
2226
|
Y as RowActionsButton,
|
|
2043
|
-
|
|
2227
|
+
Yn as SearchFilter,
|
|
2228
|
+
jn as SelectFilter,
|
|
2044
2229
|
B as UserAvatar,
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2230
|
+
Dn as UserMenu,
|
|
2231
|
+
N as UserStatus,
|
|
2232
|
+
Zn as UserStatusChip,
|
|
2233
|
+
qn as clearLocalErrors,
|
|
2234
|
+
no as clnNumbCust,
|
|
2235
|
+
eo as clonePagingAndSort,
|
|
2236
|
+
Wn as deepClone,
|
|
2237
|
+
z as formatFullName,
|
|
2238
|
+
Un as formatInitials,
|
|
2239
|
+
oo as frmDateCust,
|
|
2240
|
+
ro as frmNum,
|
|
2241
|
+
An as frmNumCust,
|
|
2242
|
+
Xn as getCookie,
|
|
2243
|
+
gt as handleErrorResponse,
|
|
2244
|
+
xn as isActive,
|
|
2245
|
+
ut as mapArrayToEnum,
|
|
2246
|
+
Jn as nl2br,
|
|
2247
|
+
Qn as setCookie,
|
|
2248
|
+
ae as usePageStore
|
|
2062
2249
|
};
|