@opengis/admin 0.3.99 → 0.3.101
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/{add-page-Dqhn198n.js → add-page-BtME1JJf.js} +1 -1
- package/dist/{admin-interface-d347ItOq.js → admin-interface-mIo1_gE2.js} +679 -651
- package/dist/{admin-view-Bde8C2zb.js → admin-view-URsx4MBX.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +33 -33
- package/dist/{card-view-BWLrtFEA.js → card-view-BPUveYDd.js} +1 -1
- package/dist/{edit-page-DeVqk6QY.js → edit-page-DVyHgdP0.js} +1 -1
- package/dist/{import-file-5z6J6maH.js → import-file-Bs86FUW3.js} +7 -7
- package/dist/{profile-page-BICBVBpI.js → profile-page-DHRxyJA_.js} +1 -1
- package/package.json +1 -1
- package/server/routes/report/controllers/data.js +106 -31
- package/server/routes/report/controllers/list.js +9 -6
@@ -1,5 +1,5 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { openBlock as
|
1
|
+
import { _ as C, h as Je, i as Ge, j as Qe, g as z, I as Xe, s as E, k as Ue, l as Q, A as X, V as Ye, m as Ze, n as et, o as tt, p as st, b as nt, q as lt, a as rt, r as at, t as ot, u as Ee } from "./import-file-Bs86FUW3.js";
|
2
|
+
import { openBlock as a, createElementBlock as i, createTextVNode as j, toDisplayString as T, createElementVNode as r, normalizeClass as $, createCommentVNode as v, resolveComponent as b, Fragment as S, createVNode as m, withCtx as V, createBlock as y, renderList as P, withModifiers as it, createStaticVNode as dt, withDirectives as U, vModelCheckbox as ut, Transition as W, vModelText as ct, renderSlot as ht, vShow as Y, Teleport as pt, getCurrentInstance as He, ref as J, resolveDynamicComponent as G, defineComponent as bt, withKeys as ft, normalizeStyle as K } from "vue";
|
3
3
|
const gt = {
|
4
4
|
data() {
|
5
5
|
return {
|
@@ -18,25 +18,25 @@ const gt = {
|
|
18
18
|
},
|
19
19
|
computed: {
|
20
20
|
label() {
|
21
|
-
var
|
22
|
-
return ((
|
21
|
+
var e, t;
|
22
|
+
return ((e = this.data) == null ? void 0 : e.ua) || ((t = this.data) == null ? void 0 : t.label) || this.data.title || "null";
|
23
23
|
},
|
24
24
|
selectedSortParam() {
|
25
|
-
var
|
26
|
-
return (
|
25
|
+
var e, t;
|
26
|
+
return (t = (e = this.$route) == null ? void 0 : e.query) == null ? void 0 : t.sort;
|
27
27
|
},
|
28
28
|
getVisibleIcon() {
|
29
29
|
return this.data.format !== "image" && this.data.format !== "verify";
|
30
30
|
}
|
31
31
|
},
|
32
32
|
watch: {
|
33
|
-
activeColumn(
|
34
|
-
|
33
|
+
activeColumn(e) {
|
34
|
+
e !== this.data.name && (this.currentSort = "");
|
35
35
|
}
|
36
36
|
},
|
37
37
|
methods: {
|
38
|
-
changeCurrentSort(
|
39
|
-
switch (
|
38
|
+
changeCurrentSort(e) {
|
39
|
+
switch (e) {
|
40
40
|
case "":
|
41
41
|
return "asc";
|
42
42
|
case "asc":
|
@@ -47,9 +47,9 @@ const gt = {
|
|
47
47
|
return "";
|
48
48
|
}
|
49
49
|
},
|
50
|
-
handleClickSortBtn(
|
51
|
-
this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(
|
52
|
-
const
|
50
|
+
handleClickSortBtn(e) {
|
51
|
+
this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(e);
|
52
|
+
const t = this.$route.query, { sort: n, ...o } = t, s = this.currentSort ? `${this.data.name}-${this.currentSort}` : "";
|
53
53
|
this.$router.replace({
|
54
54
|
query: {
|
55
55
|
...o,
|
@@ -57,8 +57,8 @@ const gt = {
|
|
57
57
|
}
|
58
58
|
});
|
59
59
|
},
|
60
|
-
isValueEqualToSelected(
|
61
|
-
return `${this.data.name}-${
|
60
|
+
isValueEqualToSelected(e) {
|
61
|
+
return `${this.data.name}-${e}` === this.selectedSortParam;
|
62
62
|
}
|
63
63
|
}
|
64
64
|
}, mt = {
|
@@ -69,19 +69,19 @@ const gt = {
|
|
69
69
|
key: 1,
|
70
70
|
class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200"
|
71
71
|
};
|
72
|
-
function
|
73
|
-
return
|
74
|
-
l.getVisibleIcon ? (
|
72
|
+
function kt(e, t, n, o, s, l) {
|
73
|
+
return a(), i("th", mt, [
|
74
|
+
l.getVisibleIcon ? (a(), i("button", {
|
75
75
|
key: 0,
|
76
76
|
type: "button",
|
77
77
|
class: "flex items-center px-1 py-2 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200",
|
78
|
-
onClick:
|
78
|
+
onClick: t[0] || (t[0] = (c) => l.handleClickSortBtn(s.currentSort))
|
79
79
|
}, [
|
80
|
-
|
81
|
-
|
82
|
-
s.currentSort ? (
|
80
|
+
j(T(l.label) + " ", 1),
|
81
|
+
r("span", xt, [
|
82
|
+
s.currentSort ? (a(), i("svg", {
|
83
83
|
key: 0,
|
84
|
-
class:
|
84
|
+
class: $(["shrink-0 size-3.5", { "rotate-180": s.currentSort === "asc" }]),
|
85
85
|
xmlns: "http://www.w3.org/2000/svg",
|
86
86
|
width: "24",
|
87
87
|
height: "24",
|
@@ -91,19 +91,44 @@ function vt(t, e, n, o, s, l) {
|
|
91
91
|
"stroke-width": "2",
|
92
92
|
"stroke-linecap": "round",
|
93
93
|
"stroke-linejoin": "round"
|
94
|
-
},
|
95
|
-
|
96
|
-
|
97
|
-
]), 2)) :
|
94
|
+
}, t[1] || (t[1] = [
|
95
|
+
r("path", { d: "m5 12 7-7 7 7" }, null, -1),
|
96
|
+
r("path", { d: "M12 19V5" }, null, -1)
|
97
|
+
]), 2)) : v("", !0)
|
98
98
|
])
|
99
|
-
])) : (
|
99
|
+
])) : (a(), i("p", yt, T(l.label), 1))
|
100
100
|
], 512);
|
101
101
|
}
|
102
|
-
const
|
102
|
+
const vt = /* @__PURE__ */ C(gt, [["render", kt]]), _t = {}, Ct = {
|
103
|
+
xmlns: "http://www.w3.org/2000/svg",
|
104
|
+
width: "24",
|
105
|
+
height: "24",
|
106
|
+
viewBox: "0 0 24 24",
|
107
|
+
fill: "none",
|
108
|
+
stroke: "currentColor",
|
109
|
+
"stroke-width": "2",
|
110
|
+
"stroke-linecap": "round",
|
111
|
+
"stroke-linejoin": "round",
|
112
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-link"
|
113
|
+
};
|
114
|
+
function wt(e, t) {
|
115
|
+
return a(), i("svg", Ct, t[0] || (t[0] = [
|
116
|
+
r("path", {
|
117
|
+
stroke: "none",
|
118
|
+
d: "M0 0h24v24H0z",
|
119
|
+
fill: "none"
|
120
|
+
}, null, -1),
|
121
|
+
r("path", { d: "M9 15l6 -6" }, null, -1),
|
122
|
+
r("path", { d: "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464" }, null, -1),
|
123
|
+
r("path", { d: "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" }, null, -1)
|
124
|
+
]));
|
125
|
+
}
|
126
|
+
const $t = /* @__PURE__ */ C(_t, [["render", wt]]), St = {
|
103
127
|
components: {
|
104
128
|
IconMore: Je,
|
105
129
|
IconDelete: Ge,
|
106
|
-
IconEdit: Qe
|
130
|
+
IconEdit: Qe,
|
131
|
+
IconLink: $t
|
107
132
|
},
|
108
133
|
emits: ["updateTable"],
|
109
134
|
props: {
|
@@ -124,7 +149,7 @@ const kt = /* @__PURE__ */ S(gt, [["render", vt]]), _t = {
|
|
124
149
|
},
|
125
150
|
computed: {
|
126
151
|
getCustomActions() {
|
127
|
-
return this.actions.filter((
|
152
|
+
return this.actions.filter((e) => typeof e == "object");
|
128
153
|
}
|
129
154
|
},
|
130
155
|
methods: {
|
@@ -132,26 +157,26 @@ const kt = /* @__PURE__ */ S(gt, [["render", vt]]), _t = {
|
|
132
157
|
this.isDeleteConfirm = !0, document.querySelector("body").click();
|
133
158
|
},
|
134
159
|
async getData() {
|
135
|
-
var
|
160
|
+
var e;
|
136
161
|
try {
|
137
|
-
const { data:
|
138
|
-
`/api/table/${this.table}/${(
|
162
|
+
const { data: t } = await z.get(
|
163
|
+
`/api/table/${this.table}/${(e = this.item) == null ? void 0 : e.id}`
|
139
164
|
);
|
140
|
-
this.formValue =
|
141
|
-
} catch (
|
142
|
-
console.error(
|
165
|
+
this.formValue = t;
|
166
|
+
} catch (t) {
|
167
|
+
console.error(t);
|
143
168
|
}
|
144
169
|
},
|
145
170
|
doSomethingOnCancel() {
|
146
171
|
this.formVisible = !1;
|
147
172
|
},
|
148
173
|
async deleteElement() {
|
149
|
-
var
|
174
|
+
var e, t;
|
150
175
|
try {
|
151
|
-
const { data: n } = await
|
152
|
-
`/api/table/${this.table}/${(
|
176
|
+
const { data: n } = await z.get(
|
177
|
+
`/api/table/${this.table}/${(e = this.item) == null ? void 0 : e.id}`
|
153
178
|
);
|
154
|
-
await
|
179
|
+
await z.delete(`/api/table/${n == null ? void 0 : n.token}`), await this.$notify({
|
155
180
|
title: "Успішно!",
|
156
181
|
message: "Об`єкт успішно видалeно",
|
157
182
|
type: "success"
|
@@ -159,105 +184,108 @@ const kt = /* @__PURE__ */ S(gt, [["render", vt]]), _t = {
|
|
159
184
|
} catch (n) {
|
160
185
|
this.$notify({
|
161
186
|
title: "Помилка!",
|
162
|
-
message: (
|
187
|
+
message: (t = n == null ? void 0 : n.response) == null ? void 0 : t.data,
|
163
188
|
type: "error"
|
164
189
|
});
|
165
190
|
} finally {
|
166
191
|
this.isDeleteConfirm = !1;
|
167
192
|
}
|
168
193
|
},
|
169
|
-
async customButtonAction(
|
170
|
-
var
|
171
|
-
document.querySelector("body").click(),
|
172
|
-
form:
|
173
|
-
id: (
|
174
|
-
api:
|
175
|
-
title:
|
176
|
-
}), await this.$emit("update-table")) : (await this.$v3plugin.$api({
|
177
|
-
confirm:
|
178
|
-
api:
|
179
|
-
method:
|
194
|
+
async customButtonAction(e) {
|
195
|
+
var t, n, o;
|
196
|
+
document.querySelector("body").click(), e != null && e.form ? (await this.$v3plugin.$form({
|
197
|
+
form: e == null ? void 0 : e.form,
|
198
|
+
id: (t = this.item) == null ? void 0 : t.id,
|
199
|
+
api: e == null ? void 0 : e.api,
|
200
|
+
title: e == null ? void 0 : e.title
|
201
|
+
}), await this.$emit("update-table")) : e != null && e.api ? (await this.$v3plugin.$api({
|
202
|
+
confirm: e == null ? void 0 : e.confirm,
|
203
|
+
api: e == null ? void 0 : e.api,
|
204
|
+
method: e == null ? void 0 : e.method,
|
180
205
|
id: (n = this.item) == null ? void 0 : n.id,
|
181
|
-
isId: (
|
182
|
-
}), await this.$emit("update-table"));
|
206
|
+
isId: (e == null ? void 0 : e.isId) || !1
|
207
|
+
}), await this.$emit("update-table")) : e != null && e.href && this.$router.push((e == null ? void 0 : e.href) + ((o = this.item) == null ? void 0 : o.id));
|
183
208
|
}
|
184
209
|
}
|
185
|
-
},
|
210
|
+
}, Tt = { class: "inline-flex" }, At = { class: "inline-flex items-center justify-center bg-white border rounded-lg shadow-sm size-7 gap-x-2 border-stone-200 text-stone-800 hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50" }, It = { class: "flex flex-col items-start" }, Dt = ["onClick"], Vt = { class: "text-gray-800" }, Pt = {
|
186
211
|
key: 1,
|
187
212
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
188
|
-
},
|
189
|
-
function
|
190
|
-
const c =
|
191
|
-
return
|
192
|
-
|
193
|
-
|
213
|
+
}, Ft = { class: "flex justify-end p-[16px] pr-0 gap-x-3" };
|
214
|
+
function jt(e, t, n, o, s, l) {
|
215
|
+
const c = b("IconMore"), g = b("IconEdit"), p = b("router-link"), f = b("IconLink"), d = b("IconDelete"), k = b("VsPopover"), x = b("VsConfirm");
|
216
|
+
return a(), i(S, null, [
|
217
|
+
r("div", Tt, [
|
218
|
+
m(k, {
|
194
219
|
trigger: "click",
|
195
220
|
placement: "bottom-left"
|
196
221
|
}, {
|
197
|
-
reference:
|
198
|
-
|
199
|
-
|
222
|
+
reference: V(() => [
|
223
|
+
r("button", At, [
|
224
|
+
m(c, {
|
200
225
|
height: "16",
|
201
226
|
width: "16"
|
202
227
|
})
|
203
228
|
])
|
204
229
|
]),
|
205
|
-
default:
|
206
|
-
var
|
230
|
+
default: V(() => {
|
231
|
+
var h, _, w, I, D;
|
207
232
|
return [
|
208
|
-
|
209
|
-
(
|
233
|
+
r("div", It, [
|
234
|
+
(h = n.actions) != null && h.includes("edit") && n.isForm ? (a(), y(p, {
|
210
235
|
key: 0,
|
211
|
-
to: `/edit?table=${(
|
236
|
+
to: `/edit?table=${(w = (_ = e.$route) == null ? void 0 : _.params) == null ? void 0 : w.catchAll}&id=${(I = n.item) == null ? void 0 : I.id}`,
|
212
237
|
class: "w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"
|
213
238
|
}, {
|
214
|
-
default:
|
215
|
-
|
216
|
-
|
239
|
+
default: V(() => [
|
240
|
+
m(g, { color: "#000" }),
|
241
|
+
t[4] || (t[4] = j(" Редагувати "))
|
217
242
|
]),
|
218
243
|
_: 1
|
219
|
-
}, 8, ["to"])) :
|
220
|
-
(
|
244
|
+
}, 8, ["to"])) : v("", !0),
|
245
|
+
(a(!0), i(S, null, P(l.getCustomActions, (A, F) => (a(), i("button", {
|
221
246
|
key: F,
|
222
|
-
onClick: (
|
247
|
+
onClick: (M) => l.customButtonAction(A),
|
223
248
|
class: "w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"
|
224
249
|
}, [
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
250
|
+
A != null && A.href ? (a(), y(f, {
|
251
|
+
key: 0,
|
252
|
+
class: "size-3.5"
|
253
|
+
})) : v("", !0),
|
254
|
+
r("span", Vt, T(A == null ? void 0 : A.label), 1)
|
255
|
+
], 8, Dt))), 128)),
|
256
|
+
n.isForm ? (a(), i("div", Pt)) : v("", !0),
|
257
|
+
(D = n.actions) != null && D.includes("del") ? (a(), i("button", {
|
230
258
|
key: 2,
|
231
|
-
onClick:
|
259
|
+
onClick: t[0] || (t[0] = it((...A) => l.openConfirm && l.openConfirm(...A), ["stop"])),
|
232
260
|
class: "w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"
|
233
261
|
}, [
|
234
|
-
|
235
|
-
|
236
|
-
])) :
|
262
|
+
m(d),
|
263
|
+
t[5] || (t[5] = r("span", { class: "text-gray-800" }, "Видалити", -1))
|
264
|
+
])) : v("", !0)
|
237
265
|
])
|
238
266
|
];
|
239
267
|
}),
|
240
268
|
_: 1
|
241
269
|
})
|
242
270
|
]),
|
243
|
-
x
|
271
|
+
m(x, {
|
244
272
|
visible: s.isDeleteConfirm,
|
245
|
-
"onUpdate:visible":
|
273
|
+
"onUpdate:visible": t[3] || (t[3] = (h) => s.isDeleteConfirm = h),
|
246
274
|
size: "small",
|
247
275
|
title: "Ви впевнені?"
|
248
276
|
}, {
|
249
|
-
default:
|
250
|
-
|
251
|
-
|
252
|
-
|
277
|
+
default: V(() => [
|
278
|
+
t[6] || (t[6] = r("p", { class: "mt-1 text-sm text-gray-600 dark:text-neutral-400" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
279
|
+
r("div", Ft, [
|
280
|
+
r("button", {
|
253
281
|
type: "button",
|
254
282
|
class: "inline-flex items-center px-3 py-2 text-xs font-medium duration-300 border rounded-lg shadow-sm hover:bg-gray-100 gap-x-2 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",
|
255
|
-
onClick:
|
283
|
+
onClick: t[1] || (t[1] = (h) => s.isDeleteConfirm = !1)
|
256
284
|
}, " Скасувати "),
|
257
|
-
|
285
|
+
r("button", {
|
258
286
|
type: "button",
|
259
287
|
class: "inline-flex items-center px-3 py-2 text-xs font-medium text-white duration-300 bg-red-500 rounded-lg gap-x-2 hover:bg-red-700 disabled:opacity-50 disabled:pointer-events-none",
|
260
|
-
onClick:
|
288
|
+
onClick: t[2] || (t[2] = (...h) => l.deleteElement && l.deleteElement(...h))
|
261
289
|
}, " Так, я впевнена(ий) ")
|
262
290
|
])
|
263
291
|
]),
|
@@ -265,7 +293,7 @@ function Dt(t, e, n, o, s, l) {
|
|
265
293
|
}, 8, ["visible"])
|
266
294
|
], 64);
|
267
295
|
}
|
268
|
-
const
|
296
|
+
const Lt = /* @__PURE__ */ C(St, [["render", jt]]), Mt = {}, zt = {
|
269
297
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
270
298
|
xmlns: "http://www.w3.org/2000/svg",
|
271
299
|
viewBox: "0 0 24 24",
|
@@ -275,15 +303,15 @@ const Vt = /* @__PURE__ */ S(_t, [["render", Dt]]), Pt = {}, Ft = {
|
|
275
303
|
"stroke-linecap": "round",
|
276
304
|
"stroke-linejoin": "round"
|
277
305
|
};
|
278
|
-
function
|
279
|
-
return
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
306
|
+
function qt(e, t, n, o, s, l) {
|
307
|
+
return a(), i("svg", zt, t[0] || (t[0] = [
|
308
|
+
r("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
309
|
+
r("path", { d: "M7 20V4" }, null, -1),
|
310
|
+
r("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
311
|
+
r("path", { d: "M17 4v16" }, null, -1)
|
284
312
|
]));
|
285
313
|
}
|
286
|
-
const
|
314
|
+
const Bt = /* @__PURE__ */ C(Mt, [["render", qt]]), Ot = {}, Nt = {
|
287
315
|
xmlns: "http://www.w3.org/2000/svg",
|
288
316
|
width: "24",
|
289
317
|
height: "24",
|
@@ -295,19 +323,19 @@ const Lt = /* @__PURE__ */ S(Pt, [["render", jt]]), Mt = {}, zt = {
|
|
295
323
|
"stroke-linejoin": "round",
|
296
324
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-rosette-discount-check"
|
297
325
|
};
|
298
|
-
function
|
299
|
-
return
|
300
|
-
|
326
|
+
function Et(e, t, n, o, s, l) {
|
327
|
+
return a(), i("svg", Nt, t[0] || (t[0] = [
|
328
|
+
r("path", {
|
301
329
|
stroke: "none",
|
302
330
|
d: "M0 0h24v24H0z",
|
303
331
|
fill: "none"
|
304
332
|
}, null, -1),
|
305
|
-
|
306
|
-
|
333
|
+
r("path", { d: "M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1" }, null, -1),
|
334
|
+
r("path", { d: "M9 12l2 2l4 -4" }, null, -1)
|
307
335
|
]));
|
308
336
|
}
|
309
|
-
const
|
310
|
-
components: { IconExport:
|
337
|
+
const Ut = /* @__PURE__ */ C(Ot, [["render", Et]]), Ht = {
|
338
|
+
components: { IconExport: Bt, IconChevronDown: Xe, IconSuccess: Ut },
|
311
339
|
props: {
|
312
340
|
table: String,
|
313
341
|
columns: Array,
|
@@ -336,8 +364,8 @@ const Bt = /* @__PURE__ */ S(Mt, [["render", qt]]), Ot = {
|
|
336
364
|
};
|
337
365
|
},
|
338
366
|
watch: {
|
339
|
-
isOpen(
|
340
|
-
|
367
|
+
isOpen(e) {
|
368
|
+
e || (this.format = "", this.cols = [], this.activeAction = "", this.isSuccessTemplate = !1);
|
341
369
|
}
|
342
370
|
},
|
343
371
|
computed: {
|
@@ -347,8 +375,8 @@ const Bt = /* @__PURE__ */ S(Mt, [["render", qt]]), Ot = {
|
|
347
375
|
},
|
348
376
|
methods: {
|
349
377
|
async exportTable() {
|
350
|
-
var
|
351
|
-
if (!((
|
378
|
+
var e;
|
379
|
+
if (!((e = this.cols) != null && e.length)) {
|
352
380
|
this.$notify({
|
353
381
|
type: "error",
|
354
382
|
title: "Помилка",
|
@@ -365,7 +393,7 @@ const Bt = /* @__PURE__ */ S(Mt, [["render", qt]]), Ot = {
|
|
365
393
|
return;
|
366
394
|
}
|
367
395
|
try {
|
368
|
-
const
|
396
|
+
const t = await z.get("/api/export", {
|
369
397
|
params: {
|
370
398
|
table: this.table,
|
371
399
|
format: this.format,
|
@@ -376,7 +404,7 @@ const Bt = /* @__PURE__ */ S(Mt, [["render", qt]]), Ot = {
|
|
376
404
|
custom: this.filterCustom || null
|
377
405
|
},
|
378
406
|
responseType: "blob"
|
379
|
-
}), n = await
|
407
|
+
}), n = await t.data.text(), o = n != null && n.includes(";") ? null : JSON == null ? void 0 : JSON.parse(n), s = new Blob([t.data], {
|
380
408
|
type: "application/octet-stream"
|
381
409
|
}), l = window.URL.createObjectURL(s), c = document.createElement("a");
|
382
410
|
if (c.href = l, c.setAttribute(
|
@@ -391,149 +419,149 @@ const Bt = /* @__PURE__ */ S(Mt, [["render", qt]]), Ot = {
|
|
391
419
|
title: "Експорт",
|
392
420
|
message: "Файл успішно експортовано!"
|
393
421
|
}), this.isSuccessTemplate = !0;
|
394
|
-
} catch (
|
395
|
-
console.log(
|
422
|
+
} catch (t) {
|
423
|
+
console.log(t), this.$notify({
|
396
424
|
type: "error",
|
397
425
|
title: "Помилка",
|
398
426
|
message: "Не вдалося експортувати файл."
|
399
427
|
});
|
400
428
|
}
|
401
429
|
},
|
402
|
-
selectFormat(
|
403
|
-
this.format =
|
430
|
+
selectFormat(e) {
|
431
|
+
this.format = e;
|
404
432
|
},
|
405
433
|
choceAll() {
|
406
|
-
var
|
407
|
-
this.cols = (
|
434
|
+
var e;
|
435
|
+
this.cols = (e = this.columns) == null ? void 0 : e.map((t) => t == null ? void 0 : t.name), this.activeAction = "choceAll";
|
408
436
|
},
|
409
437
|
clearAll() {
|
410
438
|
this.cols = [], this.activeAction = "clearAll";
|
411
439
|
},
|
412
440
|
choceVisible() {
|
413
|
-
var
|
414
|
-
this.cols = (
|
441
|
+
var e, t;
|
442
|
+
this.cols = (t = (e = this.columns) == null ? void 0 : e.filter((n) => (n == null ? void 0 : n.hidden) !== !0)) == null ? void 0 : t.map((n) => n == null ? void 0 : n.name), this.activeAction = "choceVisible";
|
415
443
|
}
|
416
444
|
}
|
417
|
-
},
|
445
|
+
}, Rt = {
|
418
446
|
key: 0,
|
419
447
|
class: "flex flex-col items-center"
|
420
|
-
},
|
448
|
+
}, Wt = {
|
421
449
|
key: 1,
|
422
450
|
class: "p-4"
|
423
|
-
},
|
451
|
+
}, Kt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Jt = { class: "flex items-center gap-[10px] -ml-[10px] my-[10px]" }, Gt = ["onClick"], Qt = {
|
424
452
|
key: 0,
|
425
453
|
class: "block h-[8px] w-[8px] rounded-full bg-blue-500"
|
426
|
-
},
|
454
|
+
}, Xt = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, Yt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Zt = { class: "mt-2 space-y-2" }, es = ["id", "onChange"], ts = ["for"], ss = {
|
427
455
|
key: 0,
|
428
456
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
429
|
-
},
|
457
|
+
}, ns = {
|
430
458
|
key: 1,
|
431
459
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
432
460
|
};
|
433
|
-
function
|
434
|
-
const c =
|
435
|
-
return
|
436
|
-
|
437
|
-
onClick:
|
461
|
+
function ls(e, t, n, o, s, l) {
|
462
|
+
const c = b("IconExport"), g = b("IconSuccess"), p = b("VsCheckbox"), f = b("VsDialog");
|
463
|
+
return a(), i(S, null, [
|
464
|
+
r("button", {
|
465
|
+
onClick: t[0] || (t[0] = (d) => s.isOpen = !0),
|
438
466
|
class: "py-2 max-h-[34px] px-2.5 md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"
|
439
467
|
}, [
|
440
|
-
|
468
|
+
m(c, {
|
441
469
|
height: "16",
|
442
470
|
width: "16"
|
443
471
|
}),
|
444
|
-
|
472
|
+
t[7] || (t[7] = j(" Експорт "))
|
445
473
|
]),
|
446
|
-
|
474
|
+
m(f, {
|
447
475
|
visible: s.isOpen,
|
448
|
-
"onUpdate:visible":
|
476
|
+
"onUpdate:visible": t[6] || (t[6] = (d) => s.isOpen = d),
|
449
477
|
title: "Експорт таблиці",
|
450
478
|
size: "small",
|
451
479
|
closeClickBack: !0
|
452
480
|
}, {
|
453
|
-
footer:
|
454
|
-
s.isSuccessTemplate ? (
|
455
|
-
|
481
|
+
footer: V(() => [
|
482
|
+
s.isSuccessTemplate ? (a(), i("div", ss, [
|
483
|
+
r("button", {
|
456
484
|
type: "button",
|
457
485
|
class: "inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-nowrap text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
458
|
-
onClick:
|
486
|
+
onClick: t[2] || (t[2] = (d) => s.isOpen = !1)
|
459
487
|
}, " Закрити "),
|
460
|
-
|
488
|
+
r("button", {
|
461
489
|
type: "button",
|
462
490
|
class: "inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-blue-600 border border-blue-600 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500",
|
463
|
-
onClick:
|
491
|
+
onClick: t[3] || (t[3] = (d) => s.isSuccessTemplate = !1)
|
464
492
|
}, " Вигрузити ще ")
|
465
|
-
])) : (
|
466
|
-
|
493
|
+
])) : (a(), i("div", ns, [
|
494
|
+
r("button", {
|
467
495
|
type: "button",
|
468
496
|
class: "inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-nowrap text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
469
|
-
onClick:
|
497
|
+
onClick: t[4] || (t[4] = (d) => s.isOpen = !1)
|
470
498
|
}, " Скасувати "),
|
471
|
-
|
499
|
+
r("button", {
|
472
500
|
type: "button",
|
473
|
-
class:
|
474
|
-
onClick:
|
501
|
+
class: $(`inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-${l.color}-700 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-${l.color}-800 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-${l.color}-300 dark:focus:ring-${l.color}-500`),
|
502
|
+
onClick: t[5] || (t[5] = (...d) => l.exportTable && l.exportTable(...d))
|
475
503
|
}, " Завантажити таблицю ", 2)
|
476
504
|
]))
|
477
505
|
]),
|
478
|
-
default:
|
479
|
-
s.isSuccessTemplate ? (
|
480
|
-
|
506
|
+
default: V(() => [
|
507
|
+
s.isSuccessTemplate ? (a(), i("div", Rt, [
|
508
|
+
m(g, {
|
481
509
|
height: "100",
|
482
510
|
width: "100",
|
483
511
|
class: "text-green-200 mb-[20px]"
|
484
512
|
}),
|
485
|
-
|
486
|
-
])) : (
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
(
|
513
|
+
t[8] || (t[8] = r("h2", null, "Звіт сформовано і збережено", -1))
|
514
|
+
])) : (a(), i("div", Wt, [
|
515
|
+
r("div", Kt, [
|
516
|
+
t[9] || (t[9] = r("h2", { class: "text-sm font-[600] text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
517
|
+
r("div", Jt, [
|
518
|
+
(a(!0), i(S, null, P(s.actions, (d) => (a(), i("button", {
|
491
519
|
key: d == null ? void 0 : d.name,
|
492
520
|
onClick: d == null ? void 0 : d.function,
|
493
521
|
class: "inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"
|
494
522
|
}, [
|
495
|
-
|
496
|
-
class:
|
523
|
+
r("span", {
|
524
|
+
class: $(["h-[14px] w-[14px] border rounded-full flex items-center justify-center", { "border-blue-500": (d == null ? void 0 : d.name) === s.activeAction }])
|
497
525
|
}, [
|
498
|
-
(d == null ? void 0 : d.name) === s.activeAction ? (
|
526
|
+
(d == null ? void 0 : d.name) === s.activeAction ? (a(), i("span", Qt)) : v("", !0)
|
499
527
|
], 2),
|
500
|
-
|
501
|
-
], 8,
|
528
|
+
j(" " + T(d == null ? void 0 : d.label), 1)
|
529
|
+
], 8, Gt))), 128))
|
502
530
|
]),
|
503
|
-
|
504
|
-
(
|
531
|
+
r("div", Xt, [
|
532
|
+
(a(!0), i(S, null, P(n.columns, (d, k) => (a(), i("div", {
|
505
533
|
class: "flex items-center",
|
506
|
-
key:
|
534
|
+
key: k,
|
507
535
|
style: { width: "calc((100% - 10px) / 2)" }
|
508
536
|
}, [
|
509
|
-
|
537
|
+
m(p, {
|
510
538
|
class: "[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",
|
511
539
|
modelValue: s.cols,
|
512
|
-
"onUpdate:modelValue":
|
540
|
+
"onUpdate:modelValue": t[1] || (t[1] = (x) => s.cols = x),
|
513
541
|
value: d == null ? void 0 : d.name,
|
514
542
|
label: d == null ? void 0 : d.ua
|
515
543
|
}, null, 8, ["modelValue", "value", "label"])
|
516
544
|
]))), 128))
|
517
545
|
])
|
518
546
|
]),
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
(
|
547
|
+
r("div", Yt, [
|
548
|
+
t[10] || (t[10] = r("h2", { class: "text-sm font-[600] text-gray-500" }, " Виберіть формат таблиці: ", -1)),
|
549
|
+
r("div", Zt, [
|
550
|
+
(a(!0), i(S, null, P(s.tableFormats, (d, k) => (a(), i("div", {
|
523
551
|
class: "flex items-center",
|
524
|
-
key:
|
552
|
+
key: k
|
525
553
|
}, [
|
526
|
-
|
554
|
+
r("input", {
|
527
555
|
type: "radio",
|
528
556
|
name: "hs-pro-duecmfm",
|
529
557
|
class: "text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",
|
530
558
|
id: d,
|
531
|
-
onChange: (
|
532
|
-
}, null, 40,
|
533
|
-
|
559
|
+
onChange: (x) => l.selectFormat(d)
|
560
|
+
}, null, 40, es),
|
561
|
+
r("label", {
|
534
562
|
for: d,
|
535
563
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
536
|
-
}, " Формат " +
|
564
|
+
}, " Формат " + T(d), 9, ts)
|
537
565
|
]))), 128))
|
538
566
|
])
|
539
567
|
])
|
@@ -543,7 +571,7 @@ function es(t, e, n, o, s, l) {
|
|
543
571
|
}, 8, ["visible"])
|
544
572
|
], 64);
|
545
573
|
}
|
546
|
-
const
|
574
|
+
const rs = /* @__PURE__ */ C(Ht, [["render", ls]]), as = {}, os = {
|
547
575
|
xmlns: "http://www.w3.org/2000/svg",
|
548
576
|
viewBox: "0 0 24 24",
|
549
577
|
fill: "none",
|
@@ -553,12 +581,12 @@ const ts = /* @__PURE__ */ S(Ot, [["render", es]]), ss = {}, ns = {
|
|
553
581
|
"stroke-linejoin": "round",
|
554
582
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
555
583
|
};
|
556
|
-
function
|
557
|
-
return
|
584
|
+
function is(e, t, n, o, s, l) {
|
585
|
+
return a(), i("svg", os, t[0] || (t[0] = [
|
558
586
|
dt('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path>', 9)
|
559
587
|
]));
|
560
588
|
}
|
561
|
-
const
|
589
|
+
const ds = /* @__PURE__ */ C(as, [["render", is]]), us = {
|
562
590
|
props: { column: Object },
|
563
591
|
emits: ["update-column"],
|
564
592
|
components: {
|
@@ -570,8 +598,8 @@ const as = /* @__PURE__ */ S(ss, [["render", ls]]), rs = {
|
|
570
598
|
};
|
571
599
|
},
|
572
600
|
watch: {
|
573
|
-
value(
|
574
|
-
this.$emit("update-column", { ...this.column, hidden: !
|
601
|
+
value(e) {
|
602
|
+
this.$emit("update-column", { ...this.column, hidden: !e });
|
575
603
|
}
|
576
604
|
},
|
577
605
|
computed: {
|
@@ -580,27 +608,27 @@ const as = /* @__PURE__ */ S(ss, [["render", ls]]), rs = {
|
|
580
608
|
}
|
581
609
|
},
|
582
610
|
mounted() {
|
583
|
-
var
|
584
|
-
((
|
611
|
+
var e;
|
612
|
+
((e = this.column) == null ? void 0 : e.hidden) !== !0 && (this.value = !0);
|
585
613
|
}
|
586
|
-
},
|
587
|
-
function
|
614
|
+
}, cs = { class: "flex justify-between items-center py-1.5 px-3 cursor-pointer rounded-lg hover:bg-gray-100 has-[:disabled]:opacity-50 has-[:disabled]:pointer-events-none dark:hover:bg-neutral-800" }, hs = { class: "flex justify-between flex-1 items-center gap-x-2.5 cursor-pointer text-[13px] text-gray-800 dark:text-neutral-300" };
|
615
|
+
function ps(e, t, n, o, s, l) {
|
588
616
|
var g, p;
|
589
|
-
const c =
|
590
|
-
return
|
591
|
-
|
592
|
-
|
593
|
-
U(
|
617
|
+
const c = b("IconCheck2");
|
618
|
+
return a(), i("div", cs, [
|
619
|
+
r("label", hs, [
|
620
|
+
j(T(((g = n.column) == null ? void 0 : g.ua) || ((p = n.column) == null ? void 0 : p.title)) + " ", 1),
|
621
|
+
U(r("input", {
|
594
622
|
type: "checkbox",
|
595
|
-
"onUpdate:modelValue":
|
623
|
+
"onUpdate:modelValue": t[0] || (t[0] = (f) => s.value = f),
|
596
624
|
class: "hidden"
|
597
625
|
}, null, 512), [
|
598
626
|
[ut, s.value]
|
599
627
|
]),
|
600
|
-
|
601
|
-
class:
|
628
|
+
r("span", {
|
629
|
+
class: $(["flex items-center justify-center text-white border border-gray-300 rounded shrink-0 size-4 focus:ring-blue-500", [s.value ? "bg-" + l.color + "-600 border-0" : "bg-white"]])
|
602
630
|
}, [
|
603
|
-
|
631
|
+
m(c, {
|
604
632
|
height: "12",
|
605
633
|
width: "12"
|
606
634
|
})
|
@@ -608,8 +636,8 @@ function ds(t, e, n, o, s, l) {
|
|
608
636
|
])
|
609
637
|
]);
|
610
638
|
}
|
611
|
-
const
|
612
|
-
components: { IconColumns:
|
639
|
+
const bs = /* @__PURE__ */ C(us, [["render", ps]]), fs = {
|
640
|
+
components: { IconColumns: ds, AdminTableColumnsHiddenItem: bs },
|
613
641
|
emits: ["update-columns"],
|
614
642
|
props: { columns: Array },
|
615
643
|
data() {
|
@@ -620,11 +648,11 @@ const us = /* @__PURE__ */ S(rs, [["render", ds]]), cs = {
|
|
620
648
|
},
|
621
649
|
computed: {
|
622
650
|
filteredColumn() {
|
623
|
-
var
|
624
|
-
return (
|
625
|
-
(
|
651
|
+
var e;
|
652
|
+
return (e = this.columns) == null ? void 0 : e.filter(
|
653
|
+
(t) => {
|
626
654
|
var n, o, s, l, c, g;
|
627
|
-
return ((s = (n =
|
655
|
+
return ((s = (n = t == null ? void 0 : t.ua) == null ? void 0 : n.toLowerCase()) == null ? void 0 : s.includes((o = this.searchValue) == null ? void 0 : o.toLowerCase())) || ((g = (l = t == null ? void 0 : t.title) == null ? void 0 : l.toLowerCase()) == null ? void 0 : g.includes((c = this.searchValue) == null ? void 0 : c.toLowerCase()));
|
628
656
|
}
|
629
657
|
);
|
630
658
|
}
|
@@ -633,52 +661,52 @@ const us = /* @__PURE__ */ S(rs, [["render", ds]]), cs = {
|
|
633
661
|
toggleVisible() {
|
634
662
|
this.visible = !this.visible, this.visible ? document.addEventListener("click", this.handleClickOutside) : document.removeEventListener("click", this.handleClickOutside);
|
635
663
|
},
|
636
|
-
handleClickOutside(
|
637
|
-
const
|
638
|
-
|
664
|
+
handleClickOutside(e) {
|
665
|
+
const t = this.$refs.wrapper;
|
666
|
+
t && !t.contains(e.target) && (this.visible = !1, document.removeEventListener("click", this.handleClickOutside));
|
639
667
|
},
|
640
|
-
updateColumn(
|
641
|
-
const
|
642
|
-
n[
|
668
|
+
updateColumn(e) {
|
669
|
+
const t = this.columns.findIndex((o) => (o == null ? void 0 : o.name) === (e == null ? void 0 : e.name)), n = this.columns;
|
670
|
+
n[t] = e, this.$emit("update-columns", [...n]);
|
643
671
|
}
|
644
672
|
},
|
645
673
|
beforeUnmount() {
|
646
674
|
document.removeEventListener("click", this.handleClickOutside);
|
647
675
|
}
|
648
|
-
},
|
676
|
+
}, gs = {
|
649
677
|
class: "relative",
|
650
678
|
ref: "wrapper"
|
651
|
-
},
|
679
|
+
}, ms = {
|
652
680
|
key: 0,
|
653
681
|
class: "absolute left-[50%] top-[110%] translate-x-[-50%] z-10 w-64 transition-[opacity,margin] duration bg-white rounded-xl shadow-lg dark:bg-neutral-900"
|
654
|
-
},
|
682
|
+
}, xs = { class: "relative p-1 border-gray-200 border-y dark:border-neutral-800" }, ys = { class: "p-1 pt-3 max-h-80 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" }, ks = {
|
655
683
|
key: 0,
|
656
684
|
class: "block px-3 mb-2 text-xs text-gray-500 dark:text-neutral-500"
|
657
|
-
},
|
685
|
+
}, vs = { class: "space-y-1" }, _s = {
|
658
686
|
key: 1,
|
659
687
|
class: "flex items-center px-3 text-[13px] py-1.5 px-3 rounded-md cursor-pointer group"
|
660
688
|
};
|
661
|
-
function
|
662
|
-
const c =
|
663
|
-
return
|
664
|
-
|
665
|
-
onClick:
|
689
|
+
function Cs(e, t, n, o, s, l) {
|
690
|
+
const c = b("IconColumns"), g = b("AdminTableColumnsHiddenItem");
|
691
|
+
return a(), i("div", gs, [
|
692
|
+
r("button", {
|
693
|
+
onClick: t[0] || (t[0] = (...p) => l.toggleVisible && l.toggleVisible(...p)),
|
666
694
|
class: "py-2 max-h-[34px] px-2.5 md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"
|
667
695
|
}, [
|
668
|
-
|
696
|
+
m(c, {
|
669
697
|
height: "20",
|
670
698
|
width: "16"
|
671
699
|
})
|
672
700
|
]),
|
673
|
-
|
674
|
-
default:
|
675
|
-
var p,
|
701
|
+
m(W, { name: "fade" }, {
|
702
|
+
default: V(() => {
|
703
|
+
var p, f;
|
676
704
|
return [
|
677
|
-
s.visible ? (
|
678
|
-
|
679
|
-
|
680
|
-
U(
|
681
|
-
"onUpdate:modelValue":
|
705
|
+
s.visible ? (a(), i("div", ms, [
|
706
|
+
t[2] || (t[2] = r("div", { class: "flex items-center justify-between h-[48px] px-4 py-2 gap-x-2 text-sm font-medium text-gray-800" }, " Колонки ", -1)),
|
707
|
+
r("div", xs, [
|
708
|
+
U(r("input", {
|
709
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => s.searchValue = d),
|
682
710
|
type: "text",
|
683
711
|
class: "py-1.5 px-3 block w-full border-transparent rounded-lg sm:text-sm text-base placeholder:text-gray-500 hover:bg-gray-100 focus:outline-none focus:border-transparent focus:ring-0 focus:bg-gray-100 disabled:opacity-100 disabled:pointer-events-none dark:bg-transparent dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:ring-neutral-600 dark:focus:bg-neutral-800",
|
684
712
|
placeholder: "Пошук",
|
@@ -687,24 +715,24 @@ function ys(t, e, n, o, s, l) {
|
|
687
715
|
[ct, s.searchValue]
|
688
716
|
])
|
689
717
|
]),
|
690
|
-
|
691
|
-
(p = l.filteredColumn) != null && p.length ? (
|
692
|
-
|
693
|
-
(
|
694
|
-
key:
|
718
|
+
r("div", ys, [
|
719
|
+
(p = l.filteredColumn) != null && p.length ? (a(), i("span", ks, " Оберіть колонки для відображення ")) : v("", !0),
|
720
|
+
r("div", vs, [
|
721
|
+
(f = l.filteredColumn) != null && f.length ? (a(!0), i(S, { key: 0 }, P(l.filteredColumn, (d, k) => (a(), y(g, {
|
722
|
+
key: k,
|
695
723
|
column: d,
|
696
724
|
onUpdateColumn: l.updateColumn
|
697
|
-
}, null, 8, ["column", "onUpdateColumn"]))), 128)) : (
|
725
|
+
}, null, 8, ["column", "onUpdateColumn"]))), 128)) : (a(), i("div", _s, " Нічого не знайдено "))
|
698
726
|
])
|
699
727
|
])
|
700
|
-
])) :
|
728
|
+
])) : v("", !0)
|
701
729
|
];
|
702
730
|
}),
|
703
731
|
_: 1
|
704
732
|
})
|
705
733
|
], 512);
|
706
734
|
}
|
707
|
-
const
|
735
|
+
const ws = /* @__PURE__ */ C(fs, [["render", Cs]]), $s = {}, Ss = {
|
708
736
|
xmlns: "http://www.w3.org/2000/svg",
|
709
737
|
viewBox: "0 0 24 24",
|
710
738
|
fill: "none",
|
@@ -714,18 +742,18 @@ const vs = /* @__PURE__ */ S(cs, [["render", ys]]), ks = {}, _s = {
|
|
714
742
|
"stroke-linejoin": "round",
|
715
743
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-minus"
|
716
744
|
};
|
717
|
-
function
|
718
|
-
return
|
719
|
-
|
745
|
+
function Ts(e, t, n, o, s, l) {
|
746
|
+
return a(), i("svg", Ss, t[0] || (t[0] = [
|
747
|
+
r("path", {
|
720
748
|
stroke: "none",
|
721
749
|
d: "M0 0h24v24H0z",
|
722
750
|
fill: "none"
|
723
751
|
}, null, -1),
|
724
|
-
|
752
|
+
r("path", { d: "M5 12l14 0" }, null, -1)
|
725
753
|
]));
|
726
754
|
}
|
727
|
-
const
|
728
|
-
components: { IconPlus: Q, IconMinus:
|
755
|
+
const As = /* @__PURE__ */ C($s, [["render", Ts]]), Is = {
|
756
|
+
components: { IconPlus: Q, IconMinus: As },
|
729
757
|
props: {
|
730
758
|
title: String,
|
731
759
|
defaultValue: { type: Boolean, default: () => !1 }
|
@@ -733,33 +761,33 @@ const ws = /* @__PURE__ */ S(ks, [["render", Cs]]), $s = {
|
|
733
761
|
data() {
|
734
762
|
return { expanded: this.defaultValue };
|
735
763
|
}
|
736
|
-
},
|
737
|
-
function
|
738
|
-
const c =
|
739
|
-
return
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
onClick:
|
764
|
+
}, Ds = { class: "hs-accordion" }, Vs = { class: "py-0.5 flex items-center gap-x-0.5 w-full" }, Ps = { class: "text-sm font-medium" }, Fs = { class: "relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b" };
|
765
|
+
function js(e, t, n, o, s, l) {
|
766
|
+
const c = b("IconPlus"), g = b("IconMinus");
|
767
|
+
return a(), i("div", null, [
|
768
|
+
r("div", null, [
|
769
|
+
r("div", Ds, [
|
770
|
+
r("div", Vs, [
|
771
|
+
r("div", {
|
772
|
+
onClick: t[0] || (t[0] = (p) => s.expanded = !s.expanded),
|
745
773
|
class: "rounded-md cursor-pointer grow"
|
746
774
|
}, [
|
747
|
-
|
775
|
+
r("span", Ps, T(n.title), 1)
|
748
776
|
]),
|
749
|
-
|
777
|
+
r("button", {
|
750
778
|
class: "flex items-center justify-center rounded-md size-6 hover:bg-gray-100",
|
751
|
-
onClick:
|
779
|
+
onClick: t[1] || (t[1] = (p) => s.expanded = !s.expanded)
|
752
780
|
}, [
|
753
|
-
s.expanded ? (
|
781
|
+
s.expanded ? (a(), y(g, {
|
754
782
|
key: 1,
|
755
783
|
width: "14"
|
756
|
-
})) : (
|
784
|
+
})) : (a(), y(c, { key: 0 }))
|
757
785
|
])
|
758
786
|
]),
|
759
|
-
|
760
|
-
default:
|
761
|
-
U(
|
762
|
-
ht(
|
787
|
+
m(W, { name: "fade" }, {
|
788
|
+
default: V(() => [
|
789
|
+
U(r("div", Fs, [
|
790
|
+
ht(e.$slots, "default", {}, void 0, !0)
|
763
791
|
], 512), [
|
764
792
|
[Y, s.expanded]
|
765
793
|
])
|
@@ -770,38 +798,38 @@ function Ds(t, e, n, o, s, l) {
|
|
770
798
|
])
|
771
799
|
]);
|
772
800
|
}
|
773
|
-
const
|
801
|
+
const Ls = /* @__PURE__ */ C(Is, [["render", js], ["__scopeId", "data-v-e1f274c9"]]), Ms = {
|
774
802
|
components: {
|
775
803
|
AdminComponentIs: X,
|
776
|
-
AdminTree:
|
804
|
+
AdminTree: Ls,
|
777
805
|
VsNoData: Ye,
|
778
806
|
VsWidgetComments: Ze,
|
779
807
|
VsWidgetMap: et,
|
780
808
|
VsWidgetFileList: tt
|
781
809
|
},
|
782
810
|
props: { table: String, columns: Array, row: Object }
|
783
|
-
},
|
811
|
+
}, zs = {
|
784
812
|
class: "pl-2 hs-accordion w-[360px] shrink-0 overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",
|
785
813
|
style: { height: "calc(100vh - 229px)" }
|
786
|
-
},
|
814
|
+
}, qs = {
|
787
815
|
style: { height: "calc(100vh - 360px)" },
|
788
816
|
class: "pl-2"
|
789
|
-
},
|
790
|
-
function
|
791
|
-
var
|
792
|
-
const c =
|
793
|
-
return
|
794
|
-
|
795
|
-
|
817
|
+
}, Bs = { class: "flow-root mt-[10px]" }, Os = { class: "divide-y divide-gray-100 text-[12px]" }, Ns = { class: "grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4" }, Es = { class: "font-medium text-gray-900" }, Us = { class: "text-gray-700 sm:col-span-2" };
|
818
|
+
function Hs(e, t, n, o, s, l) {
|
819
|
+
var f, d, k, x;
|
820
|
+
const c = b("AdminComponentIs"), g = b("VsWidgetFileList"), p = b("VsNoData");
|
821
|
+
return a(), i("div", zs, [
|
822
|
+
t[0] || (t[0] = r("div", { class: "pl-[10px] py-[9px]" }, [
|
823
|
+
r("h2", { class: "text-sm font-medium text-center" }, "Інформація про об'єкт")
|
796
824
|
], -1)),
|
797
|
-
|
798
|
-
(d = (
|
799
|
-
|
800
|
-
|
801
|
-
(
|
802
|
-
|
803
|
-
|
804
|
-
|
825
|
+
r("div", qs, [
|
826
|
+
(d = (f = e.$route) == null ? void 0 : f.query) != null && d.card ? (a(), i(S, { key: 0 }, [
|
827
|
+
r("div", Bs, [
|
828
|
+
r("dl", Os, [
|
829
|
+
(a(!0), i(S, null, P(n.columns, (h) => (a(), i("div", Ns, [
|
830
|
+
r("dt", Es, T((h == null ? void 0 : h.ua) || (h == null ? void 0 : h.title)), 1),
|
831
|
+
r("dd", Us, [
|
832
|
+
m(c, {
|
805
833
|
row: n.row,
|
806
834
|
column: h,
|
807
835
|
table: n.table
|
@@ -810,19 +838,19 @@ function Os(t, e, n, o, s, l) {
|
|
810
838
|
]))), 256))
|
811
839
|
])
|
812
840
|
]),
|
813
|
-
(
|
814
|
-
key: (
|
815
|
-
id: (
|
841
|
+
(a(), y(g, {
|
842
|
+
key: (k = n.row) == null ? void 0 : k.id,
|
843
|
+
id: (x = n.row) == null ? void 0 : x.id,
|
816
844
|
class: "mt-10"
|
817
845
|
}, null, 8, ["id"]))
|
818
|
-
], 64)) : (
|
846
|
+
], 64)) : (a(), y(p, {
|
819
847
|
key: 1,
|
820
848
|
text: "Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"
|
821
849
|
}))
|
822
850
|
])
|
823
851
|
]);
|
824
852
|
}
|
825
|
-
const
|
853
|
+
const Rs = /* @__PURE__ */ C(Ms, [["render", Hs]]), Ws = {
|
826
854
|
emits: ["filterChange"],
|
827
855
|
props: {
|
828
856
|
scheme: { type: Object },
|
@@ -836,40 +864,40 @@ const Ns = /* @__PURE__ */ S(Ps, [["render", Os]]), Es = {
|
|
836
864
|
};
|
837
865
|
},
|
838
866
|
methods: {
|
839
|
-
closeFilter({ target:
|
840
|
-
this.isFilters &&
|
867
|
+
closeFilter({ target: e }) {
|
868
|
+
this.isFilters && e.classList.contains("filter-container") && (this.isFilters = !1);
|
841
869
|
}
|
842
870
|
}
|
843
|
-
},
|
871
|
+
}, Ks = {
|
844
872
|
key: 0,
|
845
873
|
class: "px-[7px] text-[10px] py-[1px] font-[700] text-white bg-blue-500 rounded-full"
|
846
|
-
},
|
847
|
-
function
|
848
|
-
const c =
|
849
|
-
return
|
850
|
-
|
851
|
-
onClick:
|
874
|
+
}, Js = { class: "filter-content h-screen bg-white w-[400px] overflow-x-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
|
875
|
+
function Gs(e, t, n, o, s, l) {
|
876
|
+
const c = b("IconFilter"), g = b("VsFilter");
|
877
|
+
return a(), i(S, null, [
|
878
|
+
r("button", {
|
879
|
+
onClick: t[0] || (t[0] = (p) => s.isFilters = !s.isFilters),
|
852
880
|
class: "py-2 px-2.5 max-h-[34px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none"
|
853
881
|
}, [
|
854
|
-
|
882
|
+
m(c, {
|
855
883
|
height: "16",
|
856
884
|
width: "16"
|
857
885
|
}),
|
858
|
-
|
859
|
-
n.onFilters ? (
|
886
|
+
t[4] || (t[4] = j(" Фільтри ")),
|
887
|
+
n.onFilters ? (a(), i("span", Ks, T(n.onFilters), 1)) : v("", !0)
|
860
888
|
]),
|
861
|
-
|
862
|
-
default:
|
889
|
+
m(W, { name: "fade" }, {
|
890
|
+
default: V(() => {
|
863
891
|
var p;
|
864
892
|
return [
|
865
|
-
(
|
866
|
-
U(
|
867
|
-
onClick:
|
893
|
+
(a(), y(pt, { to: "#modal" }, [
|
894
|
+
U(r("div", {
|
895
|
+
onClick: t[3] || (t[3] = (...f) => l.closeFilter && l.closeFilter(...f)),
|
868
896
|
style: { height: "100vh" },
|
869
897
|
class: "fixed filter-container top-0 flex justify-end items-center z-[12] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.2)]"
|
870
898
|
}, [
|
871
|
-
|
872
|
-
(p = n.scheme) != null && p.length ? (
|
899
|
+
r("div", Js, [
|
900
|
+
(p = n.scheme) != null && p.length ? (a(), y(g, {
|
873
901
|
key: 0,
|
874
902
|
ref: "filter",
|
875
903
|
scheme: n.scheme,
|
@@ -880,10 +908,10 @@ function Hs(t, e, n, o, s, l) {
|
|
880
908
|
name: "filter",
|
881
909
|
footer: !0,
|
882
910
|
background: !0,
|
883
|
-
onFilterChange:
|
911
|
+
onFilterChange: t[1] || (t[1] = (f) => e.$emit("filterChange", f)),
|
884
912
|
closeFilterBtn: !0,
|
885
|
-
onFilterClose:
|
886
|
-
}, null, 8, ["scheme", "token"])) :
|
913
|
+
onFilterClose: t[2] || (t[2] = (f) => s.isFilters = !1)
|
914
|
+
}, null, 8, ["scheme", "token"])) : v("", !0)
|
887
915
|
])
|
888
916
|
], 512), [
|
889
917
|
[Y, s.isFilters]
|
@@ -895,25 +923,25 @@ function Hs(t, e, n, o, s, l) {
|
|
895
923
|
})
|
896
924
|
], 64);
|
897
925
|
}
|
898
|
-
const
|
926
|
+
const Qs = /* @__PURE__ */ C(Ws, [["render", Gs]]), Xs = {
|
899
927
|
props: { tabsList: { type: Array, default: () => [] }, filterState: String }
|
900
|
-
},
|
928
|
+
}, Ys = {
|
901
929
|
class: "relative flex space-x-1 mb-[20px] after:absolute after:w-[99%] after:bottom-0 after:inset-x-0 after:border-b-2 after:border-gray-200 dark:after:border-neutral-700",
|
902
930
|
"aria-label": "Tabs",
|
903
931
|
role: "tablist",
|
904
932
|
"aria-orientation": "horizontal"
|
905
|
-
},
|
906
|
-
function
|
907
|
-
return
|
908
|
-
(
|
909
|
-
onClick: (g) =>
|
910
|
-
class:
|
933
|
+
}, Zs = ["onClick"];
|
934
|
+
function en(e, t, n, o, s, l) {
|
935
|
+
return a(), i("nav", Ys, [
|
936
|
+
(a(!0), i(S, null, P(n.tabsList, (c) => (a(), i("button", {
|
937
|
+
onClick: (g) => e.$emit("update:filterState", c == null ? void 0 : c.name),
|
938
|
+
class: $(["hs-tab-active:after:bg-gray-800 hs-tab-active:text-gray-800 px-2.5 py-1.5 mb-2 relative inline-flex justify-center items-center gap-x-2 hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 after:absolute after:-bottom-2 after:inset-x-0 after:z-10 after:h-0.5 after:pointer-events-none dark:hs-tab-active:text-neutral-200 dark:hs-tab-active:after:bg-neutral-400 dark:text-neutral-500 dark:hover:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 active", {
|
911
939
|
" font-semibold after:absolute after:bottom-[-8px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800": (c == null ? void 0 : c.name) === n.filterState
|
912
940
|
}])
|
913
|
-
},
|
941
|
+
}, T(c == null ? void 0 : c.label), 11, Zs))), 256))
|
914
942
|
]);
|
915
943
|
}
|
916
|
-
const
|
944
|
+
const tn = /* @__PURE__ */ C(Xs, [["render", en]]), sn = {}, nn = {
|
917
945
|
xmlns: "http://www.w3.org/2000/svg",
|
918
946
|
viewBox: "0 0 24 24",
|
919
947
|
fill: "none",
|
@@ -923,55 +951,55 @@ const Xs = /* @__PURE__ */ S(Ks, [["render", Qs]]), Ys = {}, Zs = {
|
|
923
951
|
"stroke-linejoin": "round",
|
924
952
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-filter"
|
925
953
|
};
|
926
|
-
function
|
927
|
-
return
|
928
|
-
|
954
|
+
function ln(e, t, n, o, s, l) {
|
955
|
+
return a(), i("svg", nn, t[0] || (t[0] = [
|
956
|
+
r("path", {
|
929
957
|
stroke: "none",
|
930
958
|
d: "M0 0h24v24H0z",
|
931
959
|
fill: "none"
|
932
960
|
}, null, -1),
|
933
|
-
|
961
|
+
r("path", { d: "M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" }, null, -1)
|
934
962
|
]));
|
935
963
|
}
|
936
|
-
const
|
937
|
-
components: { IconFilter2:
|
964
|
+
const rn = /* @__PURE__ */ C(sn, [["render", ln]]), an = {
|
965
|
+
components: { IconFilter2: rn, IconCheck2: Ue },
|
938
966
|
props: { filterCustom: String, customList: Array }
|
939
|
-
},
|
940
|
-
function
|
941
|
-
const c =
|
942
|
-
return
|
967
|
+
}, on = { class: "py-2 max-h-[34px] px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, dn = { class: "flex flex-col p-[2px] gap-[2px] w-[170px]" }, un = ["onClick"], cn = { class: "text-sm text-gray-800" };
|
968
|
+
function hn(e, t, n, o, s, l) {
|
969
|
+
const c = b("IconFilter2"), g = b("IconCheck2"), p = b("VsPopover");
|
970
|
+
return a(), y(p, {
|
943
971
|
ref: "popover",
|
944
972
|
placement: "bottom"
|
945
973
|
}, {
|
946
|
-
reference:
|
947
|
-
|
948
|
-
|
974
|
+
reference: V(() => [
|
975
|
+
r("button", on, [
|
976
|
+
m(c, {
|
949
977
|
height: "20",
|
950
978
|
width: "20"
|
951
979
|
})
|
952
980
|
])
|
953
981
|
]),
|
954
|
-
default:
|
955
|
-
|
956
|
-
(
|
957
|
-
onClick: (
|
958
|
-
var
|
959
|
-
|
982
|
+
default: V(() => [
|
983
|
+
r("div", dn, [
|
984
|
+
(a(!0), i(S, null, P(n.customList, (f, d) => (a(), i("button", {
|
985
|
+
onClick: (k) => {
|
986
|
+
var x;
|
987
|
+
e.$emit("update:filterCustom", f == null ? void 0 : f.name), (x = e.$refs) == null || x.popover.togglePopover();
|
960
988
|
},
|
961
989
|
key: d,
|
962
|
-
class:
|
990
|
+
class: $(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100", { "bg-gray-100": n.filterCustom === (f == null ? void 0 : f.name) }])
|
963
991
|
}, [
|
964
|
-
|
965
|
-
n.filterCustom === (
|
992
|
+
r("span", cn, T(f == null ? void 0 : f.label), 1),
|
993
|
+
n.filterCustom === (f == null ? void 0 : f.name) ? (a(), y(g, {
|
966
994
|
key: 0,
|
967
995
|
class: "ml-auto size-3 shrink-0"
|
968
|
-
})) :
|
969
|
-
], 10,
|
970
|
-
|
996
|
+
})) : v("", !0)
|
997
|
+
], 10, un))), 128)),
|
998
|
+
r("button", {
|
971
999
|
class: "flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",
|
972
|
-
onClick:
|
1000
|
+
onClick: t[0] || (t[0] = (f) => {
|
973
1001
|
var d;
|
974
|
-
|
1002
|
+
e.$emit("update:filterCustom", void 0), (d = e.$refs) == null || d.popover.togglePopover();
|
975
1003
|
})
|
976
1004
|
}, " Скинути фільтри ")
|
977
1005
|
])
|
@@ -979,91 +1007,91 @@ function on(t, e, n, o, s, l) {
|
|
979
1007
|
_: 1
|
980
1008
|
}, 512);
|
981
1009
|
}
|
982
|
-
const
|
1010
|
+
const pn = /* @__PURE__ */ C(an, [["render", hn]]), bn = { class: "flex items-center gap-x-2" }, fn = {
|
983
1011
|
__name: "admin-table-custom-buttons",
|
984
1012
|
props: {
|
985
1013
|
slots: Object,
|
986
1014
|
data: Object
|
987
1015
|
},
|
988
|
-
setup(
|
989
|
-
var g, p,
|
990
|
-
const { asyncTemplateSlot:
|
991
|
-
var
|
992
|
-
if ((
|
993
|
-
const
|
1016
|
+
setup(e) {
|
1017
|
+
var g, p, f, d, k;
|
1018
|
+
const { asyncTemplateSlot: t } = (k = (d = (f = (p = (g = He()) == null ? void 0 : g.appContext) == null ? void 0 : p.app) == null ? void 0 : f.config) == null ? void 0 : d.globalProperties) == null ? void 0 : k.utils, n = J(""), o = J(""), s = e, l = () => {
|
1019
|
+
var x, h, _, w, I;
|
1020
|
+
if ((x = s.slots) != null && x.panelLeft || (o.value = "div"), (_ = (h = s.slots) == null ? void 0 : h.panelLeft) != null && _.includes("<")) {
|
1021
|
+
const D = t("PanelLeft", (w = s.slots) == null ? void 0 : w.panelLeft, [
|
994
1022
|
"name"
|
995
1023
|
]);
|
996
|
-
o.value =
|
1024
|
+
o.value = D;
|
997
1025
|
} else
|
998
1026
|
o.value = (I = s.slots) == null ? void 0 : I.panelLeft;
|
999
1027
|
}, c = () => {
|
1000
|
-
var
|
1001
|
-
if ((
|
1002
|
-
const
|
1028
|
+
var x, h, _, w, I;
|
1029
|
+
if ((x = s.slots) != null && x.panelRight || (n.value = "div"), (_ = (h = s.slots) == null ? void 0 : h.panelRight) != null && _.includes("<")) {
|
1030
|
+
const D = t("PanelRight", (w = s.slots) == null ? void 0 : w.panelRight, [
|
1003
1031
|
"name"
|
1004
1032
|
]);
|
1005
|
-
n.value =
|
1033
|
+
n.value = D;
|
1006
1034
|
} else
|
1007
1035
|
n.value = (I = s.slots) == null ? void 0 : I.panelRight;
|
1008
1036
|
};
|
1009
|
-
return l(), c(), (
|
1010
|
-
(
|
1011
|
-
(
|
1037
|
+
return l(), c(), (x, h) => (a(), i("div", bn, [
|
1038
|
+
(a(), y(G(o.value), { data: e.data }, null, 8, ["data"])),
|
1039
|
+
(a(), y(G(n.value), { data: e.data }, null, 8, ["data"]))
|
1012
1040
|
]));
|
1013
1041
|
}
|
1014
|
-
},
|
1042
|
+
}, gn = {
|
1015
1043
|
__name: "admin-custom-button-add",
|
1016
1044
|
props: {
|
1017
1045
|
slots: Object
|
1018
1046
|
},
|
1019
|
-
setup(
|
1020
|
-
var l, c, g, p,
|
1021
|
-
const { asyncTemplateSlot:
|
1047
|
+
setup(e) {
|
1048
|
+
var l, c, g, p, f;
|
1049
|
+
const { asyncTemplateSlot: t } = (f = (p = (g = (c = (l = He()) == null ? void 0 : l.appContext) == null ? void 0 : c.app) == null ? void 0 : g.config) == null ? void 0 : p.globalProperties) == null ? void 0 : f.utils, n = J(""), o = e;
|
1022
1050
|
return (() => {
|
1023
|
-
var d,
|
1024
|
-
if ((d = o.slots) != null && d.addButton || (n.value = "div"), (
|
1025
|
-
const
|
1051
|
+
var d, k, x, h, _;
|
1052
|
+
if ((d = o.slots) != null && d.addButton || (n.value = "div"), (x = (k = o.slots) == null ? void 0 : k.addButton) != null && x.includes("<")) {
|
1053
|
+
const w = t("addButton", (h = o.slots) == null ? void 0 : h.addButton, [
|
1026
1054
|
"IconPlus"
|
1027
1055
|
]);
|
1028
|
-
n.value =
|
1056
|
+
n.value = w;
|
1029
1057
|
} else
|
1030
1058
|
n.value = (_ = o.slots) == null ? void 0 : _.addButton;
|
1031
|
-
})(), (d,
|
1059
|
+
})(), (d, k) => n.value ? (a(), y(G(n.value), {
|
1032
1060
|
key: 0,
|
1033
1061
|
IconPlus: Q
|
1034
|
-
})) :
|
1062
|
+
})) : v("", !0);
|
1035
1063
|
}
|
1036
|
-
},
|
1064
|
+
}, mn = {
|
1037
1065
|
key: 0,
|
1038
1066
|
class: "px-1 py-3 text-gray-800 font-[500]"
|
1039
|
-
},
|
1067
|
+
}, xn = {
|
1040
1068
|
key: 1,
|
1041
1069
|
class: "px-1 py-3 text-gray-800 font-[700]"
|
1042
|
-
},
|
1070
|
+
}, yn = {
|
1043
1071
|
__name: "admin-table-totals-list",
|
1044
1072
|
props: {
|
1045
1073
|
columns: { type: Array, default: () => [] },
|
1046
1074
|
agg: { type: Object, default: () => {
|
1047
1075
|
} }
|
1048
1076
|
},
|
1049
|
-
setup(
|
1050
|
-
return (
|
1051
|
-
(
|
1077
|
+
setup(e) {
|
1078
|
+
return (t, n) => (a(), i("tr", null, [
|
1079
|
+
(a(!0), i(S, null, P(e.columns, (o) => {
|
1052
1080
|
var s;
|
1053
|
-
return
|
1081
|
+
return a(), i(S, {
|
1054
1082
|
key: o == null ? void 0 : o.name
|
1055
1083
|
}, [
|
1056
|
-
(s =
|
1057
|
-
|
1084
|
+
(s = e.agg) != null && s[o == null ? void 0 : o.name] ? (a(), i("td", mn, [
|
1085
|
+
m(X, {
|
1058
1086
|
column: o,
|
1059
|
-
row:
|
1087
|
+
row: e.agg
|
1060
1088
|
}, null, 8, ["column", "row"])
|
1061
|
-
])) : (
|
1089
|
+
])) : (a(), i("td", xn))
|
1062
1090
|
], 64);
|
1063
1091
|
}), 128))
|
1064
1092
|
]));
|
1065
1093
|
}
|
1066
|
-
},
|
1094
|
+
}, kn = {}, vn = {
|
1067
1095
|
xmlns: "http://www.w3.org/2000/svg",
|
1068
1096
|
viewBox: "0 0 24 24",
|
1069
1097
|
fill: "none",
|
@@ -1073,18 +1101,18 @@ const dn = /* @__PURE__ */ S(sn, [["render", on]]), un = { class: "flex items-ce
|
|
1073
1101
|
"stroke-linejoin": "round",
|
1074
1102
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
1075
1103
|
};
|
1076
|
-
function
|
1077
|
-
return
|
1078
|
-
|
1104
|
+
function _n(e, t, n, o, s, l) {
|
1105
|
+
return a(), i("svg", vn, t[0] || (t[0] = [
|
1106
|
+
r("path", {
|
1079
1107
|
stroke: "none",
|
1080
1108
|
d: "M0 0h24v24H0z",
|
1081
1109
|
fill: "none"
|
1082
1110
|
}, null, -1),
|
1083
|
-
|
1111
|
+
r("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
1084
1112
|
]));
|
1085
1113
|
}
|
1086
|
-
const
|
1087
|
-
components: { IconChevronDown: nt, IconCheck:
|
1114
|
+
const Cn = /* @__PURE__ */ C(kn, [["render", _n]]), wn = bt({
|
1115
|
+
components: { IconChevronDown: nt, IconCheck: Cn },
|
1088
1116
|
props: {
|
1089
1117
|
total: { type: Number, default: () => 0 },
|
1090
1118
|
pageSize: { type: Number, default: () => 20 },
|
@@ -1112,12 +1140,12 @@ const yn = /* @__PURE__ */ S(gn, [["render", xn]]), vn = bt({
|
|
1112
1140
|
},
|
1113
1141
|
defaultPage: {
|
1114
1142
|
immediate: !0,
|
1115
|
-
handler(
|
1116
|
-
this.page =
|
1143
|
+
handler(e) {
|
1144
|
+
this.page = e, this.updatePages(e);
|
1117
1145
|
}
|
1118
1146
|
},
|
1119
|
-
pageSizeLocal(
|
1120
|
-
|
1147
|
+
pageSizeLocal(e, t) {
|
1148
|
+
t && (this.isDropdownOpen = !1, this.setCurrentPage(1));
|
1121
1149
|
}
|
1122
1150
|
},
|
1123
1151
|
computed: {
|
@@ -1139,18 +1167,18 @@ const yn = /* @__PURE__ */ S(gn, [["render", xn]]), vn = bt({
|
|
1139
1167
|
}
|
1140
1168
|
this.updatePages(this.page);
|
1141
1169
|
},
|
1142
|
-
handleSetPage(
|
1143
|
-
const
|
1144
|
-
if (
|
1170
|
+
handleSetPage(e) {
|
1171
|
+
const t = e.replace(/\D/g, "");
|
1172
|
+
if (t > this.pagesCount) {
|
1145
1173
|
this.$refs.currentPage.innerText = this.page;
|
1146
1174
|
return;
|
1147
1175
|
} else
|
1148
|
-
this.$refs.currentPage.innerText =
|
1149
|
-
this.setCurrentPage(
|
1176
|
+
this.$refs.currentPage.innerText = t;
|
1177
|
+
this.setCurrentPage(t);
|
1150
1178
|
},
|
1151
|
-
updatePages(
|
1152
|
-
const
|
1153
|
-
let n = Math.max(
|
1179
|
+
updatePages(e) {
|
1180
|
+
const t = Math.floor(this.maxPages / 2);
|
1181
|
+
let n = Math.max(e - t, 1), o = n + this.maxPages - 1;
|
1154
1182
|
o > this.pagesCount && (o = this.pagesCount, n = Math.max(o - this.maxPages + 1, 1)), this.pages = Array.from(
|
1155
1183
|
{ length: o - n + 1 },
|
1156
1184
|
(s, l) => n + l
|
@@ -1162,109 +1190,109 @@ const yn = /* @__PURE__ */ S(gn, [["render", xn]]), vn = bt({
|
|
1162
1190
|
handleClickNext() {
|
1163
1191
|
this.disableNextClick || (this.setCurrentPage(parseInt(this.page) + 1), this.updatePages(this.page), this.$emit("nextClick"));
|
1164
1192
|
},
|
1165
|
-
setCurrentPage(
|
1166
|
-
this.page =
|
1193
|
+
setCurrentPage(e) {
|
1194
|
+
this.page = e, this.$emit("pageChange", this.page, this.pageSizeLocal), this.updatePages(e);
|
1167
1195
|
},
|
1168
|
-
keydownEnter(
|
1169
|
-
|
1196
|
+
keydownEnter(e) {
|
1197
|
+
e.preventDefault(), e.target.blur();
|
1170
1198
|
}
|
1171
1199
|
}
|
1172
|
-
}),
|
1200
|
+
}), $n = { class: "flex items-center w-full" }, Sn = { class: "flex items-center mx-[8px]" }, Tn = { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, An = {
|
1173
1201
|
key: 0,
|
1174
1202
|
class: "flex items-center justify-center ml-3 gap-x-5"
|
1175
|
-
},
|
1176
|
-
function
|
1177
|
-
const c =
|
1178
|
-
return
|
1179
|
-
|
1203
|
+
}, In = { class: "relative" }, Dn = { class: "z-50 bg-white shadow-md rounded-lg p-1 space-y-0.5 dark:bg-neutral-800 dark:border dark:border-neutral-700 dark:divide-neutral-700 absolute bottom-[100%]" }, Vn = ["onClick"];
|
1204
|
+
function Pn(e, t, n, o, s, l) {
|
1205
|
+
const c = b("IconChevronDown"), g = b("IconCheck");
|
1206
|
+
return a(), i("nav", $n, [
|
1207
|
+
r("button", {
|
1180
1208
|
type: "button",
|
1181
|
-
onClick:
|
1182
|
-
class:
|
1209
|
+
onClick: t[0] || (t[0] = (...p) => e.handleClickPrev && e.handleClickPrev(...p)),
|
1210
|
+
class: $(["min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100", { "opacity-50 pointer-events-none": e.disablePrevClick }])
|
1183
1211
|
}, [
|
1184
|
-
|
1212
|
+
m(c, {
|
1185
1213
|
height: "16",
|
1186
1214
|
width: "16",
|
1187
1215
|
class: "rotate-90"
|
1188
1216
|
})
|
1189
1217
|
], 2),
|
1190
|
-
|
1191
|
-
|
1218
|
+
r("div", Sn, [
|
1219
|
+
r("span", {
|
1192
1220
|
ref: "currentPage",
|
1193
1221
|
contenteditable: "true",
|
1194
|
-
onKeydown:
|
1195
|
-
onBlur:
|
1222
|
+
onKeydown: t[1] || (t[1] = ft((...p) => e.keydownEnter && e.keydownEnter(...p), ["enter"])),
|
1223
|
+
onBlur: t[2] || (t[2] = (p) => e.handleSetPage(p.target.innerText)),
|
1196
1224
|
class: "min-h-[38px] max-h-[38px] overflow-hidden min-w-[38px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 outline-blue-600 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:text-white"
|
1197
|
-
},
|
1198
|
-
|
1199
|
-
|
1225
|
+
}, T(e.page), 545),
|
1226
|
+
t[5] || (t[5] = r("span", { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, "з", -1)),
|
1227
|
+
r("span", Tn, T(e.pagesCount), 1)
|
1200
1228
|
]),
|
1201
|
-
|
1229
|
+
r("button", {
|
1202
1230
|
type: "button",
|
1203
|
-
onClick:
|
1204
|
-
class:
|
1231
|
+
onClick: t[3] || (t[3] = (...p) => e.handleClickNext && e.handleClickNext(...p)),
|
1232
|
+
class: $([{ "opacity-50 pointer-events-none": e.disableNextClick }, "min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])
|
1205
1233
|
}, [
|
1206
|
-
|
1234
|
+
m(c, {
|
1207
1235
|
height: "16",
|
1208
1236
|
width: "16",
|
1209
1237
|
class: "-rotate-90"
|
1210
1238
|
})
|
1211
1239
|
], 2),
|
1212
|
-
|
1213
|
-
|
1214
|
-
U(
|
1215
|
-
(
|
1240
|
+
e.pageSizes.length ? (a(), i("div", An, [
|
1241
|
+
r("div", In, [
|
1242
|
+
U(r("div", Dn, [
|
1243
|
+
(a(!0), i(S, null, P(e.pageSizes, (p) => (a(), i("button", {
|
1216
1244
|
type: "button",
|
1217
1245
|
class: "w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm",
|
1218
|
-
onClick: (
|
1246
|
+
onClick: (f) => e.pageSizeLocal = p
|
1219
1247
|
}, [
|
1220
|
-
|
1221
|
-
p ===
|
1248
|
+
j(T(p) + " ", 1),
|
1249
|
+
p === e.pageSizeLocal ? (a(), y(g, {
|
1222
1250
|
key: 0,
|
1223
1251
|
width: "14",
|
1224
1252
|
height: "14",
|
1225
1253
|
class: "text-blue-600"
|
1226
|
-
})) :
|
1227
|
-
], 8,
|
1254
|
+
})) : v("", !0)
|
1255
|
+
], 8, Vn))), 256))
|
1228
1256
|
], 512), [
|
1229
|
-
[Y,
|
1257
|
+
[Y, e.isDropdownOpen]
|
1230
1258
|
]),
|
1231
|
-
|
1259
|
+
e.pageSizes.length ? (a(), i("button", {
|
1232
1260
|
key: 0,
|
1233
1261
|
type: "button",
|
1234
1262
|
class: "text-sm h-[32px] min-w-8 py-3 px-3.5 inline-flex items-center gap-x-1 rounded-lg border border-gray-200 text-gray-800 shadow-sm hover:bg-gray-50 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
1235
|
-
onClick:
|
1263
|
+
onClick: t[4] || (t[4] = (p) => e.isDropdownOpen = !e.isDropdownOpen)
|
1236
1264
|
}, [
|
1237
|
-
|
1238
|
-
|
1265
|
+
j(T(e.pageSizeLocal) + " ", 1),
|
1266
|
+
m(c, {
|
1239
1267
|
height: "16",
|
1240
1268
|
width: "16"
|
1241
1269
|
})
|
1242
|
-
])) :
|
1270
|
+
])) : v("", !0)
|
1243
1271
|
])
|
1244
|
-
])) :
|
1272
|
+
])) : v("", !0)
|
1245
1273
|
]);
|
1246
1274
|
}
|
1247
|
-
const
|
1275
|
+
const Fn = /* @__PURE__ */ C(wn, [["render", Pn]]), jn = {
|
1248
1276
|
props: { table: String, title: String, search: String },
|
1249
1277
|
components: {
|
1250
|
-
AdminTableControl:
|
1251
|
-
AdminTableExport:
|
1278
|
+
AdminTableControl: Lt,
|
1279
|
+
AdminTableExport: rs,
|
1252
1280
|
// AdminTablePrint,
|
1253
|
-
AdminTableColumnsHidden:
|
1254
|
-
AdminTableColumn:
|
1281
|
+
AdminTableColumnsHidden: ws,
|
1282
|
+
AdminTableColumn: vt,
|
1255
1283
|
AdminNodata: lt,
|
1256
1284
|
IconPlus: Q,
|
1257
|
-
IconSearch:
|
1258
|
-
AdminTableCardInfo:
|
1259
|
-
IconOpenCard:
|
1285
|
+
IconSearch: rt,
|
1286
|
+
AdminTableCardInfo: Rs,
|
1287
|
+
IconOpenCard: at,
|
1260
1288
|
AdminComponentIs: X,
|
1261
|
-
AdminTableFilters:
|
1262
|
-
AdminTableTabs:
|
1263
|
-
AdminTableCustomFilters:
|
1264
|
-
AdminTableCustomButtons:
|
1265
|
-
AdminCustomButtonAdd:
|
1266
|
-
AdminTableTotalsList:
|
1267
|
-
AdminTablePagination:
|
1289
|
+
AdminTableFilters: Qs,
|
1290
|
+
AdminTableTabs: tn,
|
1291
|
+
AdminTableCustomFilters: pn,
|
1292
|
+
AdminTableCustomButtons: fn,
|
1293
|
+
AdminCustomButtonAdd: gn,
|
1294
|
+
AdminTableTotalsList: yn,
|
1295
|
+
AdminTablePagination: Fn
|
1268
1296
|
},
|
1269
1297
|
data() {
|
1270
1298
|
return {
|
@@ -1298,31 +1326,31 @@ const In = /* @__PURE__ */ S(vn, [["render", An]]), Dn = {
|
|
1298
1326
|
return `text-[${E.value.fontSize || 13}px]`;
|
1299
1327
|
},
|
1300
1328
|
defaultPage() {
|
1301
|
-
var
|
1302
|
-
return ((
|
1329
|
+
var e, t;
|
1330
|
+
return ((t = (e = this.$route) == null ? void 0 : e.query) == null ? void 0 : t.page) || 1;
|
1303
1331
|
},
|
1304
1332
|
columns() {
|
1305
|
-
var
|
1306
|
-
return (
|
1333
|
+
var e, t;
|
1334
|
+
return (t = (e = this.tableData) == null ? void 0 : e.columns) == null ? void 0 : t.filter((n) => (n == null ? void 0 : n.hidden) !== !0);
|
1307
1335
|
},
|
1308
1336
|
isForm() {
|
1309
|
-
var
|
1310
|
-
return ((
|
1337
|
+
var e, t, n, o, s;
|
1338
|
+
return ((e = this.tableData) == null ? void 0 : e.form) && (((n = (t = this.tableData) == null ? void 0 : t.actions) == null ? void 0 : n.includes("add")) || ((s = (o = this.tableData) == null ? void 0 : o.actions) == null ? void 0 : s.includes("edit")));
|
1311
1339
|
},
|
1312
1340
|
isNoData() {
|
1313
|
-
var
|
1314
|
-
return !((
|
1341
|
+
var e, t;
|
1342
|
+
return !((e = this.tableData) != null && e.rows) || !((t = this.columns) != null && t.length);
|
1315
1343
|
},
|
1316
1344
|
activeCardRow() {
|
1317
|
-
var
|
1318
|
-
return ((
|
1345
|
+
var e, t;
|
1346
|
+
return ((t = (e = this.tableData) == null ? void 0 : e.rows) == null ? void 0 : t.find((n) => {
|
1319
1347
|
var o, s;
|
1320
1348
|
return (n == null ? void 0 : n.id) === ((s = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : s.card);
|
1321
1349
|
})) || {};
|
1322
1350
|
},
|
1323
1351
|
getActions() {
|
1324
|
-
var
|
1325
|
-
return (
|
1352
|
+
var e;
|
1353
|
+
return (e = this.tableData) == null ? void 0 : e.actions;
|
1326
1354
|
}
|
1327
1355
|
},
|
1328
1356
|
watch: {
|
@@ -1332,49 +1360,49 @@ const In = /* @__PURE__ */ S(vn, [["render", An]]), Dn = {
|
|
1332
1360
|
// await this.getTableData();
|
1333
1361
|
// },
|
1334
1362
|
searchValue: {
|
1335
|
-
handler: ot(async function(
|
1336
|
-
var
|
1363
|
+
handler: ot(async function(e) {
|
1364
|
+
var t;
|
1337
1365
|
this.page = 1, await this.getTableData(), this.$router.push({
|
1338
1366
|
...this.$route,
|
1339
1367
|
query: {
|
1340
|
-
...(
|
1341
|
-
search:
|
1368
|
+
...(t = this.$route) == null ? void 0 : t.query,
|
1369
|
+
search: e || void 0,
|
1342
1370
|
page: 1
|
1343
1371
|
}
|
1344
1372
|
});
|
1345
1373
|
}, 500)
|
1346
1374
|
},
|
1347
1375
|
$route: {
|
1348
|
-
async handler(
|
1376
|
+
async handler(e, t) {
|
1349
1377
|
var n, o;
|
1350
|
-
((n =
|
1378
|
+
((n = e == null ? void 0 : e.params) == null ? void 0 : n.catchAll) !== ((o = t == null ? void 0 : t.params) == null ? void 0 : o.catchAll) && (this.visibleColumns = [], this.tableData = null, this.columnsWidth = {}, this.unmountedData(), this.getFilters(), await this.getTableData());
|
1351
1379
|
},
|
1352
1380
|
deep: !0
|
1353
1381
|
},
|
1354
|
-
limit(
|
1355
|
-
var
|
1382
|
+
limit(e) {
|
1383
|
+
var t;
|
1356
1384
|
this.$router.replace({
|
1357
1385
|
...this.$route,
|
1358
|
-
query: { ...(
|
1386
|
+
query: { ...(t = this.$route) == null ? void 0 : t.query, limit: e }
|
1359
1387
|
});
|
1360
1388
|
},
|
1361
|
-
filterState(
|
1362
|
-
var
|
1363
|
-
|
1389
|
+
filterState(e) {
|
1390
|
+
var t;
|
1391
|
+
e && (this.$router.replace({
|
1364
1392
|
...this.$route,
|
1365
|
-
query: { ...(
|
1393
|
+
query: { ...(t = this.$route) == null ? void 0 : t.query, state: e }
|
1366
1394
|
}), this.getTableData());
|
1367
1395
|
},
|
1368
|
-
filterCustom(
|
1369
|
-
var
|
1396
|
+
filterCustom(e) {
|
1397
|
+
var t;
|
1370
1398
|
this.$router.replace({
|
1371
1399
|
...this.$route,
|
1372
|
-
query: { ...(
|
1400
|
+
query: { ...(t = this.$route) == null ? void 0 : t.query, custom: e }
|
1373
1401
|
}), this.getTableData();
|
1374
1402
|
},
|
1375
|
-
columns(
|
1376
|
-
var
|
1377
|
-
this.visibleColumns =
|
1403
|
+
columns(e) {
|
1404
|
+
var t, n, o, s;
|
1405
|
+
this.visibleColumns = e == null ? void 0 : e.map((l) => l == null ? void 0 : l.name), this.initialHiddenColumns === ((t = this.visibleColumns) == null ? void 0 : t.join(",")) && (this.visibleColumns = []), this.$router.replace({
|
1378
1406
|
...this.$route,
|
1379
1407
|
query: {
|
1380
1408
|
...(n = this.$route) == null ? void 0 : n.query,
|
@@ -1385,14 +1413,14 @@ const In = /* @__PURE__ */ S(vn, [["render", An]]), Dn = {
|
|
1385
1413
|
},
|
1386
1414
|
methods: {
|
1387
1415
|
async checkUrlMounted() {
|
1388
|
-
var
|
1389
|
-
this.page = ((
|
1416
|
+
var e, t, n, o, s, l, c, g, p, f, d, k, x, h, _, w, I, D, A, F, M;
|
1417
|
+
this.page = ((t = (e = this.$route) == null ? void 0 : e.query) == null ? void 0 : t.page) || 1, this.limit = ((o = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : o.limit) || 20, (l = (s = this.$route) == null ? void 0 : s.query) != null && l.filter && (this.filters = ((p = decodeURI((g = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : g.filter)) == null ? void 0 : p.replaceAll("+", " ")) || null), this.filters && (this.onFilters = ((d = (f = this.filters) == null ? void 0 : f.split("=")) == null ? void 0 : d.length) - 1), this.filterState = ((x = (k = this.$route) == null ? void 0 : k.query) == null ? void 0 : x.state) || null, this.filterCustom = ((_ = (h = this.$route) == null ? void 0 : h.query) == null ? void 0 : _.custom) || null, this.searchValue = ((I = (w = this.$route) == null ? void 0 : w.query) == null ? void 0 : I.search) || "", this.visibleColumns = ((F = (A = (D = this.$route) == null ? void 0 : D.query) == null ? void 0 : A.columns) == null ? void 0 : F.split(",")) || [], (M = this.$route) != null && M.query.card && (this.isVisibleCardInfo = !0);
|
1390
1418
|
},
|
1391
|
-
rowWidth(
|
1419
|
+
rowWidth(e) {
|
1392
1420
|
var n, o;
|
1393
|
-
const
|
1394
|
-
if (
|
1395
|
-
const s =
|
1421
|
+
const t = (o = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : o.find((s) => s.name === e);
|
1422
|
+
if (t) {
|
1423
|
+
const s = t == null ? void 0 : t.width;
|
1396
1424
|
return typeof s == "number" ? `${s}px` : s != null && s.includes("px") ? s : `${s}px`;
|
1397
1425
|
}
|
1398
1426
|
},
|
@@ -1400,31 +1428,31 @@ const In = /* @__PURE__ */ S(vn, [["render", An]]), Dn = {
|
|
1400
1428
|
this.page = 1, this.visibleColumns = [], this.filterCustom = null, this.filterState = null, this.isVisibleCardInfo = !1, this.filterScheme = null, this.filters = null, this.onFilters = 0, this.searchValue = "";
|
1401
1429
|
},
|
1402
1430
|
async getTableData() {
|
1403
|
-
var
|
1431
|
+
var e, t, n, o, s, l, c, g, p, f, d;
|
1404
1432
|
try {
|
1405
|
-
const { data:
|
1433
|
+
const { data: k } = await z.get(`/api/template/table/${this.table}`), x = await z.get(`/api/table-data/${this.table}`, {
|
1406
1434
|
params: {
|
1407
1435
|
page: this.page,
|
1408
1436
|
search: this.searchValue || null,
|
1409
1437
|
limit: this.limit,
|
1410
1438
|
filter: this.filters || null,
|
1411
|
-
order: ((
|
1439
|
+
order: ((t = (e = this.$route) == null ? void 0 : e.query) == null ? void 0 : t.sort) || null,
|
1412
1440
|
state: this.filterState || null,
|
1413
1441
|
custom: this.filterCustom || null
|
1414
1442
|
}
|
1415
1443
|
});
|
1416
1444
|
this.tableData = {
|
1417
|
-
...
|
1418
|
-
...(
|
1445
|
+
...k,
|
1446
|
+
...(x == null ? void 0 : x.data) || {}
|
1419
1447
|
}, this.initialHiddenColumns = (l = (s = (o = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : o.filter((h) => (h == null ? void 0 : h.hidden) !== !0)) == null ? void 0 : s.map((h) => h == null ? void 0 : h.name)) == null ? void 0 : l.join(","), (c = this.visibleColumns) != null && c.length ? (g = this.tableData) == null || g.columns.forEach((h) => {
|
1420
1448
|
var _;
|
1421
1449
|
(_ = this.visibleColumns) != null && _.includes(h == null ? void 0 : h.name) ? h.hidden = !1 : h.hidden = !0;
|
1422
|
-
}) : this.visibleColumns = (d = (
|
1450
|
+
}) : this.visibleColumns = (d = (f = (p = this.tableData) == null ? void 0 : p.columns) == null ? void 0 : f.filter((h) => (h == null ? void 0 : h.hidden) !== !0)) == null ? void 0 : d.map((h) => h == null ? void 0 : h.name), setTimeout(() => {
|
1423
1451
|
var h, _;
|
1424
|
-
(_ = (h = this.tableData) == null ? void 0 : h.columns) == null || _.forEach(({ name:
|
1425
|
-
var I,
|
1426
|
-
(
|
1427
|
-
(
|
1452
|
+
(_ = (h = this.tableData) == null ? void 0 : h.columns) == null || _.forEach(({ name: w }) => {
|
1453
|
+
var I, D, A, F, M, H;
|
1454
|
+
(D = (I = this.columnsWidth) == null ? void 0 : I[w]) != null && D.ref && (this.columnsWidth[w].width = parseInt(
|
1455
|
+
(H = (M = (F = (A = this.columnsWidth) == null ? void 0 : A[w]) == null ? void 0 : F.ref) == null ? void 0 : M.getBoundingClientRect()) == null ? void 0 : H.width
|
1428
1456
|
) + "px");
|
1429
1457
|
});
|
1430
1458
|
});
|
@@ -1432,135 +1460,135 @@ const In = /* @__PURE__ */ S(vn, [["render", An]]), Dn = {
|
|
1432
1460
|
}
|
1433
1461
|
},
|
1434
1462
|
async getFilters() {
|
1435
|
-
var
|
1463
|
+
var e;
|
1436
1464
|
try {
|
1437
|
-
const { data:
|
1438
|
-
this.filterScheme = (
|
1465
|
+
const { data: t } = await z.get(`/api/table-filter/${this.table}`);
|
1466
|
+
this.filterScheme = (e = t == null ? void 0 : t.list) == null ? void 0 : e.map((n) => ({
|
1439
1467
|
...n,
|
1440
1468
|
label: (n == null ? void 0 : n.label) || (n == null ? void 0 : n.ua)
|
1441
1469
|
}));
|
1442
1470
|
} catch {
|
1443
1471
|
}
|
1444
1472
|
},
|
1445
|
-
async handlePageChange(
|
1473
|
+
async handlePageChange(e, t) {
|
1446
1474
|
const n = this.$route.query;
|
1447
|
-
this.page =
|
1475
|
+
this.page = e, this.limit = t, await this.$router.replace({ query: { ...n, page: e, limit: t } }), await this.getTableData();
|
1448
1476
|
},
|
1449
|
-
async filterChange({ url:
|
1477
|
+
async filterChange({ url: e, state: t }) {
|
1450
1478
|
var n;
|
1451
|
-
this.filters =
|
1479
|
+
this.filters = e !== "no-url" ? e : null, this.onFilters = (n = Object.entries(t)) == null ? void 0 : n.length, this.page = 1, await this.getTableData();
|
1452
1480
|
},
|
1453
|
-
changeActiveColumn(
|
1454
|
-
this.activeColumn =
|
1481
|
+
changeActiveColumn(e) {
|
1482
|
+
this.activeColumn = e, this.getTableData();
|
1455
1483
|
},
|
1456
|
-
pushToCard(
|
1457
|
-
var
|
1458
|
-
((
|
1484
|
+
pushToCard(e) {
|
1485
|
+
var t;
|
1486
|
+
((t = this.tableData) == null ? void 0 : t.card) === !1 || this.$router.push(`/card/${this.table}/${e}`);
|
1459
1487
|
},
|
1460
|
-
pushToLinkCard(
|
1461
|
-
|
1488
|
+
pushToLinkCard(e, t) {
|
1489
|
+
e != null && e.link && this.$router.push(`/card/${e == null ? void 0 : e.link}/${t == null ? void 0 : t[e == null ? void 0 : e.name]}`);
|
1462
1490
|
},
|
1463
|
-
changeActiveCardInfo(
|
1464
|
-
var
|
1491
|
+
changeActiveCardInfo(e) {
|
1492
|
+
var t;
|
1465
1493
|
this.isVisibleCardInfo && this.$router.push({
|
1466
1494
|
...this.$route,
|
1467
|
-
query: { ...(
|
1495
|
+
query: { ...(t = this.$route) == null ? void 0 : t.query, card: e }
|
1468
1496
|
});
|
1469
1497
|
},
|
1470
1498
|
toggleCardInfo() {
|
1471
|
-
var
|
1499
|
+
var e;
|
1472
1500
|
this.isVisibleCardInfo = !this.isVisibleCardInfo, this.isVisibleCardInfo || this.$router.push({
|
1473
1501
|
...this.$route,
|
1474
|
-
query: { ...(
|
1502
|
+
query: { ...(e = this.$route) == null ? void 0 : e.query, card: void 0 }
|
1475
1503
|
});
|
1476
1504
|
},
|
1477
|
-
getCustomStyles(
|
1505
|
+
getCustomStyles(e) {
|
1478
1506
|
return [
|
1479
|
-
|
1480
|
-
|
1481
|
-
`text-${(
|
1507
|
+
e != null && e.link ? " text-blue-800 hover:underline decoration-1" : "",
|
1508
|
+
e != null && e.align ? ` text-${(e == null ? void 0 : e.align) || "left"}` : "",
|
1509
|
+
`text-${(e == null ? void 0 : e.wrap) || "wrap"}`
|
1482
1510
|
];
|
1483
1511
|
}
|
1484
1512
|
}
|
1485
|
-
},
|
1513
|
+
}, Ln = { class: "w-[calc(100vw - 320px)] bg-gray-100" }, Mn = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl" }, zn = { class: "text-lg font-semibold text-gray-800 dark:text-neutral-200" }, qn = { class: "bg-white w-full rounded-xl p-[20px] pr-0" }, Bn = { class: "flex" }, On = { class: "flex gap-[6px] ml-auto" }, Nn = { class: "inline-block w-full align-middle" }, En = { class: "sticky top-[-1px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, Un = { class: "right-0" }, Hn = {
|
1486
1514
|
key: 0,
|
1487
1515
|
class: "w-[70px] sticky right-0 top-0"
|
1488
|
-
},
|
1489
|
-
function
|
1490
|
-
var Z, ee, te, se, ne, le,
|
1491
|
-
const c =
|
1492
|
-
return
|
1493
|
-
|
1494
|
-
|
1495
|
-
l.isForm ? (
|
1496
|
-
(ee = (Z = s.tableData) == null ? void 0 : Z.slots) != null && ee.addButton ? (
|
1516
|
+
}, Rn = { class: "divide-y divide-gray-200 z-[1] relative text-gray-600" }, Wn = ["onClick"], Kn = ["onClick"], Jn = ["onClick"], Gn = { class: "flex items-center justify-start w-full px-1 py-2" }, Qn = { class: "w-[200px] md:inline-flex hidden" }, Xn = { class: "text-sm text-gray-600 dark:text-neutral-400" }, Yn = { class: "font-semibold text-gray-800 dark:text-neutral-200" }, Zn = { key: 0 };
|
1517
|
+
function el(e, t, n, o, s, l) {
|
1518
|
+
var Z, ee, te, se, ne, le, re, ae, oe, ie, de, ue, ce, he, pe, be, fe, ge, me, xe, ye, ke, ve, _e, Ce, we, $e, Se, Te, Ae, Ie, De, Ve;
|
1519
|
+
const c = b("AdminCustomButtonAdd"), g = b("IconPlus"), p = b("router-link"), f = b("AdminTableTabs"), d = b("IconSearch"), k = b("VsText"), x = b("AdminTableCustomButtons"), h = b("AdminTableCustomFilters"), _ = b("AdminTableColumnsHidden"), w = b("AdminTableExport"), I = b("AdminTableFilters"), D = b("IconOpenCard"), A = b("AdminTableColumn"), F = b("AdminComponentIs"), M = b("AdminTableControl"), H = b("AdminTableTotalsList"), Re = b("AdminNodata"), We = b("AdminTablePagination"), Ke = b("AdminTableCardInfo");
|
1520
|
+
return a(), i("div", Ln, [
|
1521
|
+
r("div", Mn, [
|
1522
|
+
r("h2", zn, T(n.title), 1),
|
1523
|
+
l.isForm ? (a(), i(S, { key: 0 }, [
|
1524
|
+
(ee = (Z = s.tableData) == null ? void 0 : Z.slots) != null && ee.addButton ? (a(), y(c, {
|
1497
1525
|
key: 0,
|
1498
1526
|
slots: (te = s.tableData) == null ? void 0 : te.slots
|
1499
|
-
}, null, 8, ["slots"])) : (
|
1527
|
+
}, null, 8, ["slots"])) : (a(), y(p, {
|
1500
1528
|
key: 1,
|
1501
|
-
to: `/add?table=${(ne = (se =
|
1502
|
-
class:
|
1529
|
+
to: `/add?table=${(ne = (se = e.$route) == null ? void 0 : se.params) == null ? void 0 : ne.catchAll}`,
|
1530
|
+
class: $(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${l.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${l.color}-800 hover:text-white`)
|
1503
1531
|
}, {
|
1504
|
-
default:
|
1505
|
-
|
1532
|
+
default: V(() => [
|
1533
|
+
m(g, {
|
1506
1534
|
height: "16",
|
1507
1535
|
width: "16"
|
1508
1536
|
}),
|
1509
|
-
|
1537
|
+
t[5] || (t[5] = j(" Додати "))
|
1510
1538
|
]),
|
1511
1539
|
_: 1
|
1512
1540
|
}, 8, ["to", "class"]))
|
1513
|
-
], 64)) :
|
1541
|
+
], 64)) : v("", !0)
|
1514
1542
|
]),
|
1515
|
-
|
1543
|
+
r("div", {
|
1516
1544
|
style: K({
|
1517
|
-
height: ((le =
|
1545
|
+
height: ((le = e.$adminSettings) == null ? void 0 : le.header) === !1 ? "calc(100vh - 91px)" : "calc(100vh - 155px)"
|
1518
1546
|
}),
|
1519
1547
|
class: "bg-gray-100 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"
|
1520
1548
|
}, [
|
1521
|
-
|
1522
|
-
(
|
1549
|
+
r("div", qn, [
|
1550
|
+
(ae = (re = s.tableData) == null ? void 0 : re.filterState) != null && ae.length ? (a(), y(f, {
|
1523
1551
|
key: 0,
|
1524
1552
|
tabsList: (oe = s.tableData) == null ? void 0 : oe.filterState,
|
1525
1553
|
filterState: s.filterState,
|
1526
|
-
"onUpdate:filterState":
|
1527
|
-
}, null, 8, ["tabsList", "filterState"])) :
|
1528
|
-
|
1529
|
-
|
1530
|
-
class:
|
1554
|
+
"onUpdate:filterState": t[0] || (t[0] = (u) => s.filterState = u)
|
1555
|
+
}, null, 8, ["tabsList", "filterState"])) : v("", !0),
|
1556
|
+
r("div", Bn, [
|
1557
|
+
r("div", {
|
1558
|
+
class: $([s.isVisibleCardInfo ? "w-[calc(100%-360px)]" : "w-full"])
|
1531
1559
|
}, [
|
1532
|
-
|
1533
|
-
class:
|
1560
|
+
r("div", {
|
1561
|
+
class: $(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative", { "pr-[20px]": !s.isVisibleCardInfo }])
|
1534
1562
|
}, [
|
1535
|
-
|
1563
|
+
m(d, {
|
1536
1564
|
height: "14",
|
1537
1565
|
width: "14",
|
1538
1566
|
class: "absolute top-[10px] left-[14px] text-gray-500 z-[1]"
|
1539
1567
|
}),
|
1540
|
-
|
1568
|
+
m(k, {
|
1541
1569
|
modelValue: s.searchValue,
|
1542
|
-
"onUpdate:modelValue":
|
1570
|
+
"onUpdate:modelValue": t[1] || (t[1] = (u) => s.searchValue = u),
|
1543
1571
|
placeholder: n.search || "Пошук...",
|
1544
1572
|
clearable: !0,
|
1545
1573
|
class: "[&>input]:py-[7px] [&>input]:max-h-[36px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600"
|
1546
1574
|
}, null, 8, ["modelValue", "placeholder"]),
|
1547
|
-
|
1548
|
-
(ie = s.tableData) != null && ie.slots ? (
|
1575
|
+
r("div", On, [
|
1576
|
+
(ie = s.tableData) != null && ie.slots ? (a(), y(x, {
|
1549
1577
|
key: 0,
|
1550
1578
|
data: s.tableData,
|
1551
1579
|
slots: (de = s.tableData) == null ? void 0 : de.slots
|
1552
|
-
}, null, 8, ["data", "slots"])) :
|
1553
|
-
(ce = (ue = s.tableData) == null ? void 0 : ue.filterCustom) != null && ce.length ? (
|
1580
|
+
}, null, 8, ["data", "slots"])) : v("", !0),
|
1581
|
+
(ce = (ue = s.tableData) == null ? void 0 : ue.filterCustom) != null && ce.length ? (a(), y(h, {
|
1554
1582
|
key: 1,
|
1555
1583
|
customList: (he = s.tableData) == null ? void 0 : he.filterCustom,
|
1556
1584
|
filterCustom: s.filterCustom,
|
1557
|
-
"onUpdate:filterCustom":
|
1558
|
-
}, null, 8, ["customList", "filterCustom"])) :
|
1559
|
-
|
1585
|
+
"onUpdate:filterCustom": t[2] || (t[2] = (u) => s.filterCustom = u)
|
1586
|
+
}, null, 8, ["customList", "filterCustom"])) : v("", !0),
|
1587
|
+
m(_, {
|
1560
1588
|
columns: (pe = s.tableData) == null ? void 0 : pe.columns,
|
1561
|
-
onUpdateColumns:
|
1589
|
+
onUpdateColumns: t[3] || (t[3] = (u) => s.tableData.columns = u)
|
1562
1590
|
}, null, 8, ["columns"]),
|
1563
|
-
((be = s.tableData) == null ? void 0 : be.export) !== !1 ? (
|
1591
|
+
((be = s.tableData) == null ? void 0 : be.export) !== !1 ? (a(), y(w, {
|
1564
1592
|
key: 2,
|
1565
1593
|
table: n.table,
|
1566
1594
|
columns: (fe = s.tableData) == null ? void 0 : fe.columns,
|
@@ -1568,43 +1596,43 @@ function Qn(t, e, n, o, s, l) {
|
|
1568
1596
|
"filter-state": s.filterState,
|
1569
1597
|
"filter-custom": s.filterCustom,
|
1570
1598
|
filters: s.filters
|
1571
|
-
}, null, 8, ["table", "columns", "page", "filter-state", "filter-custom", "filters"])) :
|
1572
|
-
(ge = s.filterScheme) != null && ge.length ? (
|
1599
|
+
}, null, 8, ["table", "columns", "page", "filter-state", "filter-custom", "filters"])) : v("", !0),
|
1600
|
+
(ge = s.filterScheme) != null && ge.length ? (a(), y(I, {
|
1573
1601
|
key: 3,
|
1574
1602
|
scheme: s.filterScheme,
|
1575
1603
|
onFilters: s.onFilters,
|
1576
1604
|
table: n.table,
|
1577
1605
|
onFilterChange: l.filterChange
|
1578
|
-
}, null, 8, ["scheme", "onFilters", "table", "onFilterChange"])) :
|
1579
|
-
|
1580
|
-
onClick:
|
1606
|
+
}, null, 8, ["scheme", "onFilters", "table", "onFilterChange"])) : v("", !0),
|
1607
|
+
r("button", {
|
1608
|
+
onClick: t[4] || (t[4] = (...u) => l.toggleCardInfo && l.toggleCardInfo(...u)),
|
1581
1609
|
class: "py-2 px-2.5 max-h-[34px] md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"
|
1582
1610
|
}, [
|
1583
|
-
|
1584
|
-
class:
|
1611
|
+
m(D, {
|
1612
|
+
class: $({ "rotate-180 duration-300": !s.isVisibleCardInfo })
|
1585
1613
|
}, null, 8, ["class"])
|
1586
1614
|
])
|
1587
1615
|
])
|
1588
1616
|
], 2),
|
1589
|
-
|
1590
|
-
class:
|
1617
|
+
r("div", {
|
1618
|
+
class: $(["flex items-start justify-start w-full space-y-5", { "pr-[20px]": !s.isVisibleCardInfo }])
|
1591
1619
|
}, [
|
1592
|
-
|
1620
|
+
r("div", {
|
1593
1621
|
style: K({
|
1594
|
-
height: `calc(100vh - ${((me =
|
1622
|
+
height: `calc(100vh - ${((me = e.$adminSettings) == null ? void 0 : me.header) === !1 ? (ye = (xe = s.tableData) == null ? void 0 : xe.filterState) != null && ye.length ? 330 : 270 : (ve = (ke = s.tableData) == null ? void 0 : ke.filterState) != null && ve.length ? 380 : 320}px)`
|
1595
1623
|
}),
|
1596
1624
|
class: "overflow-x-auto w-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
|
1597
1625
|
}, [
|
1598
|
-
|
1599
|
-
l.isNoData ? (
|
1626
|
+
r("div", Nn, [
|
1627
|
+
l.isNoData ? (a(), y(Re, { key: 1 })) : (a(), i("table", {
|
1600
1628
|
key: 0,
|
1601
|
-
class:
|
1629
|
+
class: $([l.fontSize, "relative min-w-full my-2 divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"])
|
1602
1630
|
}, [
|
1603
|
-
|
1604
|
-
|
1605
|
-
(
|
1631
|
+
r("thead", En, [
|
1632
|
+
r("tr", Un, [
|
1633
|
+
(a(!0), i(S, null, P(l.columns, (u) => {
|
1606
1634
|
var q, B;
|
1607
|
-
return
|
1635
|
+
return a(), y(A, {
|
1608
1636
|
key: u.name,
|
1609
1637
|
style: K({
|
1610
1638
|
width: ((B = (q = s.columnsWidth) == null ? void 0 : q[u == null ? void 0 : u.name]) == null ? void 0 : B.width) || l.rowWidth(u == null ? void 0 : u.name),
|
@@ -1613,86 +1641,86 @@ function Qn(t, e, n, o, s, l) {
|
|
1613
1641
|
}),
|
1614
1642
|
data: u,
|
1615
1643
|
activeColumn: s.activeColumn,
|
1616
|
-
onUpdateRef: (
|
1644
|
+
onUpdateRef: (R) => {
|
1617
1645
|
var O, N;
|
1618
|
-
(N = (O = s.columnsWidth) == null ? void 0 : O[u == null ? void 0 : u.name]) != null && N.ref || (s.columnsWidth[u.name] = { ref:
|
1646
|
+
(N = (O = s.columnsWidth) == null ? void 0 : O[u == null ? void 0 : u.name]) != null && N.ref || (s.columnsWidth[u.name] = { ref: R });
|
1619
1647
|
},
|
1620
1648
|
onChangeActive: l.changeActiveColumn
|
1621
1649
|
}, null, 8, ["style", "data", "activeColumn", "onUpdateRef", "onChangeActive"]);
|
1622
1650
|
}), 128)),
|
1623
1651
|
(Ce = (_e = l.getActions) == null ? void 0 : _e.filter(
|
1624
1652
|
(u) => u !== "add" && u !== "view"
|
1625
|
-
)) != null && Ce.length ? (
|
1653
|
+
)) != null && Ce.length ? (a(), i("th", Hn)) : v("", !0)
|
1626
1654
|
])
|
1627
1655
|
]),
|
1628
|
-
|
1629
|
-
(
|
1630
|
-
var B,
|
1631
|
-
return
|
1656
|
+
r("tbody", Rn, [
|
1657
|
+
(a(!0), i(S, null, P((we = s.tableData) == null ? void 0 : we.rows, (u, q) => {
|
1658
|
+
var B, R, O, N, Pe, Fe, je, Le, Me, ze, qe, Be, Oe, Ne;
|
1659
|
+
return a(), i("tr", {
|
1632
1660
|
key: (u == null ? void 0 : u.id) || q,
|
1633
|
-
class:
|
1634
|
-
"bg-gray-100": ((
|
1635
|
-
"odd:bg-gray-50": ((N = (O =
|
1661
|
+
class: $({
|
1662
|
+
"bg-gray-100": ((R = (B = e.$route) == null ? void 0 : B.query) == null ? void 0 : R.card) === (u == null ? void 0 : u.id),
|
1663
|
+
"odd:bg-gray-50": ((N = (O = e.$route) == null ? void 0 : O.query) == null ? void 0 : N.card) !== (u == null ? void 0 : u.id)
|
1636
1664
|
})
|
1637
1665
|
}, [
|
1638
|
-
|
1639
|
-
class:
|
1666
|
+
r("td", {
|
1667
|
+
class: $(["px-1 py-2.5 pr-5", [
|
1640
1668
|
(Pe = l.columns[0]) != null && Pe.align ? `text-${((Fe = l.columns[0]) == null ? void 0 : Fe.align) || "left"}` : ""
|
1641
1669
|
]]),
|
1642
1670
|
onClick: (L) => l.changeActiveCardInfo(u == null ? void 0 : u.id)
|
1643
1671
|
}, [
|
1644
|
-
|
1672
|
+
r("button", {
|
1645
1673
|
onClick: (L) => {
|
1646
1674
|
l.pushToCard(u == null ? void 0 : u.id), l.pushToLinkCard(l.columns[0], u);
|
1647
1675
|
},
|
1648
|
-
class:
|
1676
|
+
class: $(["font-medium text-start", [
|
1649
1677
|
...l.getCustomStyles(l.columns[0]),
|
1650
1678
|
((je = this.tableData) == null ? void 0 : je.card) === !1 ? "" : ` text-${l.color}-800 decoration-2 focus:outline-none focus:underline hover:text-${l.color}-700 hover:underline`
|
1651
1679
|
]])
|
1652
1680
|
}, [
|
1653
|
-
|
1681
|
+
m(F, {
|
1654
1682
|
row: u,
|
1655
1683
|
column: l.columns[0],
|
1656
1684
|
table: n.table,
|
1657
1685
|
onUpdateTable: l.getTableData
|
1658
1686
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1659
|
-
], 10,
|
1660
|
-
], 10,
|
1661
|
-
(
|
1662
|
-
onClick: (
|
1687
|
+
], 10, Kn)
|
1688
|
+
], 10, Wn),
|
1689
|
+
(a(!0), i(S, null, P((Le = l.columns) == null ? void 0 : Le.slice(1), (L) => (a(), i("td", {
|
1690
|
+
onClick: (rl) => {
|
1663
1691
|
l.changeActiveCardInfo(u == null ? void 0 : u.id), l.pushToLinkCard(L, u);
|
1664
1692
|
},
|
1665
|
-
class:
|
1693
|
+
class: $(["px-1 py-2.5 pr-5", l.getCustomStyles(L)]),
|
1666
1694
|
key: L.name
|
1667
1695
|
}, [
|
1668
|
-
|
1696
|
+
m(F, {
|
1669
1697
|
row: u,
|
1670
1698
|
column: L,
|
1671
1699
|
table: n.table,
|
1672
1700
|
onUpdateTable: l.getTableData
|
1673
1701
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1674
|
-
], 10,
|
1702
|
+
], 10, Jn))), 128)),
|
1675
1703
|
(ze = (Me = l.getActions) == null ? void 0 : Me.filter(
|
1676
1704
|
(L) => L !== "add" && L !== "view"
|
1677
|
-
)) != null && ze.length ? (
|
1705
|
+
)) != null && ze.length ? (a(), i("td", {
|
1678
1706
|
key: 0,
|
1679
|
-
class:
|
1680
|
-
"bg-gray-50": ((Be = (qe =
|
1681
|
-
"bg-white": ((Ne = (Oe =
|
1707
|
+
class: $(["text-center sticky right-0 w-[80px] px-[10px]", {
|
1708
|
+
"bg-gray-50": ((Be = (qe = e.$route) == null ? void 0 : qe.query) == null ? void 0 : Be.card) === (u == null ? void 0 : u.id) || !(q % 2),
|
1709
|
+
"bg-white": ((Ne = (Oe = e.$route) == null ? void 0 : Oe.query) == null ? void 0 : Ne.card) !== (u == null ? void 0 : u.id) && q % 2
|
1682
1710
|
}])
|
1683
1711
|
}, [
|
1684
|
-
|
1712
|
+
m(M, {
|
1685
1713
|
actions: l.getActions,
|
1686
1714
|
isForm: l.isForm,
|
1687
1715
|
item: u,
|
1688
1716
|
table: n.table,
|
1689
1717
|
onUpdateTable: l.getTableData
|
1690
1718
|
}, null, 8, ["actions", "isForm", "item", "table", "onUpdateTable"])
|
1691
|
-
], 2)) :
|
1719
|
+
], 2)) : v("", !0)
|
1692
1720
|
], 2);
|
1693
1721
|
}), 128))
|
1694
1722
|
]),
|
1695
|
-
|
1723
|
+
m(H, {
|
1696
1724
|
columns: l.columns,
|
1697
1725
|
agg: ($e = s.tableData) == null ? void 0 : $e.agg
|
1698
1726
|
}, null, 8, ["columns", "agg"])
|
@@ -1700,18 +1728,18 @@ function Qn(t, e, n, o, s, l) {
|
|
1700
1728
|
])
|
1701
1729
|
], 4)
|
1702
1730
|
], 2),
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1731
|
+
r("div", Gn, [
|
1732
|
+
r("div", Qn, [
|
1733
|
+
r("p", Xn, [
|
1734
|
+
r("span", Yn, [
|
1735
|
+
j(" Об'єктів: " + T(Intl.NumberFormat("ua").format(
|
1708
1736
|
s.limit < ((Se = s.tableData) == null ? void 0 : Se.filtered) ? s.limit : (Te = s.tableData) == null ? void 0 : Te.filtered
|
1709
1737
|
)) + " ", 1),
|
1710
|
-
s.limit < ((Ae = s.tableData) == null ? void 0 : Ae.filtered) ? (
|
1738
|
+
s.limit < ((Ae = s.tableData) == null ? void 0 : Ae.filtered) ? (a(), i("span", Zn, " з " + T(Intl.NumberFormat("ua").format(((Ie = s.tableData) == null ? void 0 : Ie.filtered) || 0)), 1)) : v("", !0)
|
1711
1739
|
])
|
1712
1740
|
])
|
1713
1741
|
]),
|
1714
|
-
Math.ceil((De = s.tableData) == null ? void 0 : De.filtered) > 10 ? (
|
1742
|
+
Math.ceil((De = s.tableData) == null ? void 0 : De.filtered) > 10 ? (a(), y(We, {
|
1715
1743
|
key: 0,
|
1716
1744
|
class: "justify-end mr-10",
|
1717
1745
|
"default-page": parseInt(l.defaultPage),
|
@@ -1719,19 +1747,19 @@ function Qn(t, e, n, o, s, l) {
|
|
1719
1747
|
onPageChange: l.handlePageChange,
|
1720
1748
|
pageSize: parseInt(s.limit),
|
1721
1749
|
pageSizes: [10, 20, 50, 100]
|
1722
|
-
}, null, 8, ["default-page", "total", "onPageChange", "pageSize"])) :
|
1750
|
+
}, null, 8, ["default-page", "total", "onPageChange", "pageSize"])) : v("", !0)
|
1723
1751
|
])
|
1724
1752
|
], 2),
|
1725
|
-
|
1726
|
-
default:
|
1753
|
+
m(W, { name: "slide-fade" }, {
|
1754
|
+
default: V(() => {
|
1727
1755
|
var u;
|
1728
1756
|
return [
|
1729
|
-
s.isVisibleCardInfo ? (
|
1757
|
+
s.isVisibleCardInfo ? (a(), y(Ke, {
|
1730
1758
|
key: 0,
|
1731
1759
|
table: n.table,
|
1732
1760
|
columns: (u = s.tableData) == null ? void 0 : u.columns,
|
1733
1761
|
row: l.activeCardRow
|
1734
|
-
}, null, 8, ["table", "columns", "row"])) :
|
1762
|
+
}, null, 8, ["table", "columns", "row"])) : v("", !0)
|
1735
1763
|
];
|
1736
1764
|
}),
|
1737
1765
|
_: 1
|
@@ -1741,8 +1769,8 @@ function Qn(t, e, n, o, s, l) {
|
|
1741
1769
|
], 4)
|
1742
1770
|
]);
|
1743
1771
|
}
|
1744
|
-
const
|
1745
|
-
components: { AdminTable:
|
1772
|
+
const tl = /* @__PURE__ */ C(jn, [["render", el], ["__scopeId", "data-v-8574d37a"]]), sl = {
|
1773
|
+
components: { AdminTable: tl },
|
1746
1774
|
data() {
|
1747
1775
|
return {
|
1748
1776
|
table: !1,
|
@@ -1753,43 +1781,43 @@ const Xn = /* @__PURE__ */ S(Dn, [["render", Qn], ["__scopeId", "data-v-8574d37a
|
|
1753
1781
|
watch: {
|
1754
1782
|
$route: {
|
1755
1783
|
async handler() {
|
1756
|
-
var
|
1757
|
-
(
|
1784
|
+
var e;
|
1785
|
+
(e = Ee) != null && e.value || await this.getMenu(), await this.checkPageType();
|
1758
1786
|
},
|
1759
1787
|
deep: !0
|
1760
1788
|
},
|
1761
|
-
title(
|
1762
|
-
var
|
1763
|
-
|
1789
|
+
title(e) {
|
1790
|
+
var t;
|
1791
|
+
e && (document.title = (((t = E.value) == null ? void 0 : t.titlePrefix) || "") + e);
|
1764
1792
|
}
|
1765
1793
|
},
|
1766
1794
|
async mounted() {
|
1767
1795
|
await this.checkPageType();
|
1768
1796
|
},
|
1769
1797
|
methods: {
|
1770
|
-
flattenMenu(
|
1771
|
-
const
|
1772
|
-
return
|
1773
|
-
n.menu ?
|
1774
|
-
}),
|
1798
|
+
flattenMenu(e) {
|
1799
|
+
const t = [];
|
1800
|
+
return e.forEach((n) => {
|
1801
|
+
n.menu ? t.push(...this.flattenMenu(n.menu)) : t.push(n);
|
1802
|
+
}), t;
|
1775
1803
|
},
|
1776
1804
|
async checkPageType() {
|
1777
1805
|
var o, s;
|
1778
|
-
const
|
1779
|
-
|
1780
|
-
const
|
1806
|
+
const e = this.flattenMenu(Ee.value);
|
1807
|
+
e != null && e.length || this.$router.replace("/404");
|
1808
|
+
const t = e == null ? void 0 : e.find((l) => {
|
1781
1809
|
var c, g;
|
1782
1810
|
return (l == null ? void 0 : l.path) == ((g = (c = this.$route) == null ? void 0 : c.params) == null ? void 0 : g.catchAll);
|
1783
1811
|
});
|
1784
|
-
this.title =
|
1785
|
-
const n =
|
1786
|
-
this.table = n || !1, this.search = (
|
1812
|
+
this.title = t == null ? void 0 : t.ua, t || this.$router.replace("/404"), t != null && t.component && this.$router.replace((s = (o = this.$route) == null ? void 0 : o.params) == null ? void 0 : s.catchAll);
|
1813
|
+
const n = t == null ? void 0 : t.table;
|
1814
|
+
this.table = n || !1, this.search = (t == null ? void 0 : t.search) || "", !n && this.getInterface();
|
1787
1815
|
},
|
1788
1816
|
async getInterface() {
|
1789
|
-
var
|
1817
|
+
var e, t;
|
1790
1818
|
try {
|
1791
|
-
const { data: n } = await
|
1792
|
-
`/api/template/interface/${((
|
1819
|
+
const { data: n } = await z.get(
|
1820
|
+
`/api/template/interface/${((t = (e = this.$route) == null ? void 0 : e.params) == null ? void 0 : t.catchAll) || ""}`
|
1793
1821
|
);
|
1794
1822
|
this.interface = n || "";
|
1795
1823
|
} catch {
|
@@ -1797,22 +1825,22 @@ const Xn = /* @__PURE__ */ S(Dn, [["render", Qn], ["__scopeId", "data-v-8574d37a
|
|
1797
1825
|
}
|
1798
1826
|
}
|
1799
1827
|
}
|
1800
|
-
},
|
1801
|
-
function
|
1802
|
-
const c =
|
1803
|
-
return s.table ? (
|
1828
|
+
}, nl = ["innerHTML"];
|
1829
|
+
function ll(e, t, n, o, s, l) {
|
1830
|
+
const c = b("AdminTable");
|
1831
|
+
return s.table ? (a(), y(c, {
|
1804
1832
|
key: 0,
|
1805
1833
|
table: s.table,
|
1806
|
-
title:
|
1834
|
+
title: e.title,
|
1807
1835
|
search: s.search
|
1808
|
-
}, null, 8, ["table", "title", "search"])) : (
|
1836
|
+
}, null, 8, ["table", "title", "search"])) : (a(), i("div", {
|
1809
1837
|
key: 1,
|
1810
1838
|
class: "w-full bg-gray-50",
|
1811
1839
|
style: { height: "calc(100vh - 120px)" },
|
1812
1840
|
innerHTML: s.interface
|
1813
|
-
}, null, 8,
|
1841
|
+
}, null, 8, nl));
|
1814
1842
|
}
|
1815
|
-
const
|
1843
|
+
const il = /* @__PURE__ */ C(sl, [["render", ll]]);
|
1816
1844
|
export {
|
1817
|
-
|
1845
|
+
il as default
|
1818
1846
|
};
|