@opengis/admin 0.2.87 → 0.2.88
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-DQ70Si9f.js → add-page-2HtfoXYW.js} +1 -1
- package/dist/{admin-interface-CgXFerXl.js → admin-interface-BPr6jXSM.js} +714 -570
- package/dist/{admin-view-t-gzhVnl.js → admin-view-CQ3W9LX4.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +53 -53
- package/dist/{card-view-Dtf6Ap9G.js → card-view-zTn40qzk.js} +1 -1
- package/dist/{edit-page-BWRXfML4.js → edit-page-Bd3RRgti.js} +1 -1
- package/dist/{import-file-CztGvKRc.js → import-file-BRBKwVL4.js} +5271 -5250
- package/dist/style.css +1 -1
- package/module/settings/menu.json +5 -0
- package/package.json +1 -1
- package/server/helpers/list/utils/button.js +5 -5
- package/server/routes/data/controllers/utils/conditions.js +20 -20
@@ -1,6 +1,6 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { openBlock as
|
3
|
-
const
|
1
|
+
import { _ as $, f as Re, g as Je, h as Ge, e as F, I as Me, i as Le, j as B, A as N, V as Ke, k as Qe, l as Xe, m as Ye, n as Ze, o as et, a as tt, p as st, u as je, s as nt } from "./import-file-BRBKwVL4.js";
|
2
|
+
import { openBlock as o, createElementBlock as i, createTextVNode as P, toDisplayString as T, createElementVNode as r, normalizeClass as S, createCommentVNode as v, resolveComponent as b, Fragment as C, createVNode as g, withCtx as I, createBlock as k, renderList as V, withModifiers as rt, withDirectives as L, vModelRadio as lt, createStaticVNode as ot, vModelCheckbox as at, Transition as z, vModelText as it, renderSlot as dt, vShow as U, Teleport as ut, getCurrentInstance as ze, ref as q, resolveDynamicComponent as O, defineComponent as ct, normalizeStyle as Fe } from "vue";
|
3
|
+
const pt = {
|
4
4
|
data() {
|
5
5
|
return {
|
6
6
|
currentSort: ""
|
@@ -58,26 +58,26 @@ const rt = {
|
|
58
58
|
return `${this.data.name}-${t}` === this.selectedSortParam;
|
59
59
|
}
|
60
60
|
}
|
61
|
-
},
|
61
|
+
}, bt = {
|
62
62
|
scope: "col",
|
63
63
|
class: "pe-2 py-1 text-start"
|
64
|
-
},
|
64
|
+
}, ht = { class: "w-[24px]" }, ft = {
|
65
65
|
key: 1,
|
66
66
|
class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200"
|
67
67
|
};
|
68
|
-
function
|
69
|
-
return
|
70
|
-
|
68
|
+
function mt(t, e, n, a, s, l) {
|
69
|
+
return o(), i("th", bt, [
|
70
|
+
l.getVisibleIcon ? (o(), i("button", {
|
71
71
|
key: 0,
|
72
72
|
type: "button",
|
73
73
|
class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200",
|
74
|
-
onClick: e[0] || (e[0] = (
|
74
|
+
onClick: e[0] || (e[0] = (c) => l.handleClickSortBtn(s.currentSort))
|
75
75
|
}, [
|
76
|
-
P(T(
|
77
|
-
|
78
|
-
s.currentSort ? (
|
76
|
+
P(T(l.label) + " ", 1),
|
77
|
+
r("span", ht, [
|
78
|
+
s.currentSort ? (o(), i("svg", {
|
79
79
|
key: 0,
|
80
|
-
class:
|
80
|
+
class: S(["shrink-0 size-3.5", { "rotate-180": s.currentSort === "asc" }]),
|
81
81
|
xmlns: "http://www.w3.org/2000/svg",
|
82
82
|
width: "24",
|
83
83
|
height: "24",
|
@@ -88,18 +88,18 @@ function dt(t, e, n, a, s, o) {
|
|
88
88
|
"stroke-linecap": "round",
|
89
89
|
"stroke-linejoin": "round"
|
90
90
|
}, e[1] || (e[1] = [
|
91
|
-
|
92
|
-
|
91
|
+
r("path", { d: "m5 12 7-7 7 7" }, null, -1),
|
92
|
+
r("path", { d: "M12 19V5" }, null, -1)
|
93
93
|
]), 2)) : v("", !0)
|
94
94
|
])
|
95
|
-
])) : (
|
95
|
+
])) : (o(), i("p", ft, T(l.label), 1))
|
96
96
|
]);
|
97
97
|
}
|
98
|
-
const
|
98
|
+
const gt = /* @__PURE__ */ $(pt, [["render", mt]]), xt = {
|
99
99
|
components: {
|
100
|
-
IconMore:
|
101
|
-
IconDelete:
|
102
|
-
IconEdit:
|
100
|
+
IconMore: Re,
|
101
|
+
IconDelete: Je,
|
102
|
+
IconEdit: Ge
|
103
103
|
},
|
104
104
|
emits: ["updateTable"],
|
105
105
|
props: {
|
@@ -130,7 +130,7 @@ const ut = /* @__PURE__ */ w(rt, [["render", dt]]), ct = {
|
|
130
130
|
async getData() {
|
131
131
|
var t;
|
132
132
|
try {
|
133
|
-
const { data: e } = await
|
133
|
+
const { data: e } = await F.get(
|
134
134
|
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
135
135
|
);
|
136
136
|
this.formValue = e;
|
@@ -144,10 +144,10 @@ const ut = /* @__PURE__ */ w(rt, [["render", dt]]), ct = {
|
|
144
144
|
async deleteElement() {
|
145
145
|
var t, e;
|
146
146
|
try {
|
147
|
-
const { data: n } = await
|
147
|
+
const { data: n } = await F.get(
|
148
148
|
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
149
149
|
);
|
150
|
-
await
|
150
|
+
await F.delete(`/api/table/${n == null ? void 0 : n.token}`), await this.$notify({
|
151
151
|
title: "Успішно!",
|
152
152
|
message: "Об`єкт успішно видалeно",
|
153
153
|
type: "success"
|
@@ -178,57 +178,57 @@ const ut = /* @__PURE__ */ w(rt, [["render", dt]]), ct = {
|
|
178
178
|
});
|
179
179
|
}
|
180
180
|
}
|
181
|
-
},
|
181
|
+
}, yt = { class: "inline-flex" }, kt = { 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" }, vt = { class: "flex flex-col items-start" }, _t = ["onClick"], wt = { class: "text-gray-800" }, Ct = {
|
182
182
|
key: 1,
|
183
183
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
184
|
-
},
|
185
|
-
function
|
186
|
-
const
|
187
|
-
return
|
188
|
-
|
189
|
-
|
184
|
+
}, $t = { class: "flex justify-end p-[16px] pr-0 gap-x-3" };
|
185
|
+
function Tt(t, e, n, a, s, l) {
|
186
|
+
const c = b("IconMore"), f = b("IconEdit"), d = b("router-link"), h = b("IconDelete"), u = b("VsPopover"), _ = b("VsConfirm");
|
187
|
+
return o(), i(C, null, [
|
188
|
+
r("div", yt, [
|
189
|
+
g(u, {
|
190
190
|
trigger: "click",
|
191
191
|
placement: "bottom-left"
|
192
192
|
}, {
|
193
|
-
reference:
|
194
|
-
|
195
|
-
|
193
|
+
reference: I(() => [
|
194
|
+
r("button", kt, [
|
195
|
+
g(c, {
|
196
196
|
height: "16",
|
197
197
|
width: "16"
|
198
198
|
})
|
199
199
|
])
|
200
200
|
]),
|
201
|
-
default:
|
202
|
-
var
|
201
|
+
default: I(() => {
|
202
|
+
var x, m, w, y, A;
|
203
203
|
return [
|
204
|
-
|
205
|
-
(
|
204
|
+
r("div", vt, [
|
205
|
+
(x = n.actions) != null && x.includes("edit") && n.isForm ? (o(), k(d, {
|
206
206
|
key: 0,
|
207
|
-
to: `/edit?table=${(
|
207
|
+
to: `/edit?table=${(w = (m = t.$route) == null ? void 0 : m.params) == null ? void 0 : w.catchAll}&id=${(y = n.item) == null ? void 0 : y.id}`,
|
208
208
|
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"
|
209
209
|
}, {
|
210
|
-
default:
|
211
|
-
|
210
|
+
default: I(() => [
|
211
|
+
g(f, { color: "#000" }),
|
212
212
|
e[4] || (e[4] = P(" Редагувати "))
|
213
213
|
]),
|
214
214
|
_: 1
|
215
215
|
}, 8, ["to"])) : v("", !0),
|
216
|
-
(
|
217
|
-
key:
|
218
|
-
onClick: (
|
216
|
+
(o(!0), i(C, null, V(l.getCustomActions, (D, M) => (o(), i("button", {
|
217
|
+
key: M,
|
218
|
+
onClick: (E) => l.customButtonAction(D),
|
219
219
|
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"
|
220
220
|
}, [
|
221
|
-
|
222
|
-
|
223
|
-
], 8,
|
224
|
-
n.isForm ? (
|
225
|
-
(
|
221
|
+
g(h, { class: "opacity-0" }),
|
222
|
+
r("span", wt, T(D == null ? void 0 : D.label), 1)
|
223
|
+
], 8, _t))), 128)),
|
224
|
+
n.isForm ? (o(), i("div", Ct)) : v("", !0),
|
225
|
+
(A = n.actions) != null && A.includes("del") ? (o(), i("button", {
|
226
226
|
key: 2,
|
227
|
-
onClick: e[0] || (e[0] =
|
227
|
+
onClick: e[0] || (e[0] = rt((...D) => l.openConfirm && l.openConfirm(...D), ["stop"])),
|
228
228
|
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"
|
229
229
|
}, [
|
230
|
-
|
231
|
-
e[5] || (e[5] =
|
230
|
+
g(h),
|
231
|
+
e[5] || (e[5] = r("span", { class: "text-gray-800" }, "Видалити", -1))
|
232
232
|
])) : v("", !0)
|
233
233
|
])
|
234
234
|
];
|
@@ -236,24 +236,24 @@ function yt(t, e, n, a, s, o) {
|
|
236
236
|
_: 1
|
237
237
|
})
|
238
238
|
]),
|
239
|
-
|
239
|
+
g(_, {
|
240
240
|
visible: s.isDeleteConfirm,
|
241
|
-
"onUpdate:visible": e[3] || (e[3] = (
|
241
|
+
"onUpdate:visible": e[3] || (e[3] = (x) => s.isDeleteConfirm = x),
|
242
242
|
size: "small",
|
243
243
|
title: "Ви впевнені?"
|
244
244
|
}, {
|
245
|
-
default:
|
246
|
-
e[6] || (e[6] =
|
247
|
-
|
248
|
-
|
245
|
+
default: I(() => [
|
246
|
+
e[6] || (e[6] = r("p", { class: "mt-1 text-sm text-gray-600 dark:text-neutral-400" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
247
|
+
r("div", $t, [
|
248
|
+
r("button", {
|
249
249
|
type: "button",
|
250
250
|
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",
|
251
|
-
onClick: e[1] || (e[1] = (
|
251
|
+
onClick: e[1] || (e[1] = (x) => s.isDeleteConfirm = !1)
|
252
252
|
}, " Скасувати "),
|
253
|
-
|
253
|
+
r("button", {
|
254
254
|
type: "button",
|
255
255
|
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",
|
256
|
-
onClick: e[2] || (e[2] = (...
|
256
|
+
onClick: e[2] || (e[2] = (...x) => l.deleteElement && l.deleteElement(...x))
|
257
257
|
}, " Так, я впевнена(ий) ")
|
258
258
|
])
|
259
259
|
]),
|
@@ -261,7 +261,7 @@ function yt(t, e, n, a, s, o) {
|
|
261
261
|
}, 8, ["visible"])
|
262
262
|
], 64);
|
263
263
|
}
|
264
|
-
const
|
264
|
+
const At = /* @__PURE__ */ $(xt, [["render", Tt]]), St = {}, It = {
|
265
265
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
266
266
|
xmlns: "http://www.w3.org/2000/svg",
|
267
267
|
viewBox: "0 0 24 24",
|
@@ -271,15 +271,15 @@ const kt = /* @__PURE__ */ w(ct, [["render", yt]]), vt = {}, _t = {
|
|
271
271
|
"stroke-linecap": "round",
|
272
272
|
"stroke-linejoin": "round"
|
273
273
|
};
|
274
|
-
function
|
275
|
-
return
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
274
|
+
function Dt(t, e, n, a, s, l) {
|
275
|
+
return o(), i("svg", It, e[0] || (e[0] = [
|
276
|
+
r("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
277
|
+
r("path", { d: "M7 20V4" }, null, -1),
|
278
|
+
r("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
279
|
+
r("path", { d: "M17 4v16" }, null, -1)
|
280
280
|
]));
|
281
281
|
}
|
282
|
-
const
|
282
|
+
const qe = /* @__PURE__ */ $(St, [["render", Dt]]), Vt = {}, Pt = {
|
283
283
|
xmlns: "http://www.w3.org/2000/svg",
|
284
284
|
width: "24",
|
285
285
|
height: "24",
|
@@ -291,19 +291,19 @@ const wt = /* @__PURE__ */ w(vt, [["render", Ct]]), $t = {}, Tt = {
|
|
291
291
|
"stroke-linejoin": "round",
|
292
292
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-rosette-discount-check"
|
293
293
|
};
|
294
|
-
function
|
295
|
-
return
|
296
|
-
|
294
|
+
function jt(t, e, n, a, s, l) {
|
295
|
+
return o(), i("svg", Pt, e[0] || (e[0] = [
|
296
|
+
r("path", {
|
297
297
|
stroke: "none",
|
298
298
|
d: "M0 0h24v24H0z",
|
299
299
|
fill: "none"
|
300
300
|
}, null, -1),
|
301
|
-
|
302
|
-
|
301
|
+
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),
|
302
|
+
r("path", { d: "M9 12l2 2l4 -4" }, null, -1)
|
303
303
|
]));
|
304
304
|
}
|
305
|
-
const
|
306
|
-
components: { IconExport:
|
305
|
+
const Oe = /* @__PURE__ */ $(Vt, [["render", jt]]), Ft = {
|
306
|
+
components: { IconExport: qe, IconChevronDown: Me, IconSuccess: Oe },
|
307
307
|
props: {
|
308
308
|
table: String,
|
309
309
|
columns: Array,
|
@@ -356,7 +356,7 @@ const St = /* @__PURE__ */ w($t, [["render", At]]), It = {
|
|
356
356
|
return;
|
357
357
|
}
|
358
358
|
try {
|
359
|
-
const e = await
|
359
|
+
const e = await F.get("/api/export", {
|
360
360
|
params: {
|
361
361
|
table: this.table,
|
362
362
|
format: this.format,
|
@@ -369,15 +369,15 @@ const St = /* @__PURE__ */ w($t, [["render", At]]), It = {
|
|
369
369
|
responseType: "blob"
|
370
370
|
}), n = await e.data.text(), a = n != null && n.includes(";") ? null : JSON == null ? void 0 : JSON.parse(n), s = new Blob([e.data], {
|
371
371
|
type: "application/octet-stream"
|
372
|
-
}),
|
373
|
-
if (
|
372
|
+
}), l = window.URL.createObjectURL(s), c = document.createElement("a");
|
373
|
+
if (c.href = l, c.setAttribute(
|
374
374
|
"download",
|
375
375
|
`${this.table.split(".")[0]}.${this.format}`
|
376
|
-
), document.body.appendChild(
|
376
|
+
), document.body.appendChild(c), typeof a == "string") {
|
377
377
|
this.exportTable();
|
378
378
|
return;
|
379
379
|
}
|
380
|
-
|
380
|
+
c.click(), document.body.removeChild(c), window.URL.revokeObjectURL(l), this.$notify({
|
381
381
|
type: "success",
|
382
382
|
title: "Експорт",
|
383
383
|
message: "Файл успішно експортовано!"
|
@@ -405,126 +405,126 @@ const St = /* @__PURE__ */ w($t, [["render", At]]), It = {
|
|
405
405
|
this.cols = (e = (t = this.columns) == null ? void 0 : t.filter((n) => (n == null ? void 0 : n.hidden) !== !0)) == null ? void 0 : e.map((n) => n == null ? void 0 : n.name), this.activeAction = "choceVisible";
|
406
406
|
}
|
407
407
|
}
|
408
|
-
},
|
408
|
+
}, Mt = {
|
409
409
|
key: 0,
|
410
410
|
class: "flex flex-col items-center"
|
411
|
-
},
|
411
|
+
}, Lt = {
|
412
412
|
key: 1,
|
413
413
|
class: "p-4"
|
414
|
-
},
|
414
|
+
}, zt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, qt = { class: "flex items-center gap-[10px] -ml-[10px] my-[10px]" }, Ot = ["onClick"], Bt = {
|
415
415
|
key: 0,
|
416
416
|
class: "block h-[8px] w-[8px] rounded-full bg-blue-500"
|
417
|
-
},
|
417
|
+
}, Nt = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, Ut = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Et = { class: "mt-2 space-y-2" }, Ht = ["id", "onChange"], Wt = ["for"], Rt = {
|
418
418
|
key: 0,
|
419
419
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
420
|
-
},
|
420
|
+
}, Jt = {
|
421
421
|
key: 1,
|
422
422
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
423
423
|
};
|
424
|
-
function
|
425
|
-
const
|
426
|
-
return
|
427
|
-
|
428
|
-
onClick: e[0] || (e[0] = (
|
424
|
+
function Gt(t, e, n, a, s, l) {
|
425
|
+
const c = b("IconExport"), f = b("IconSuccess"), d = b("VsCheckbox"), h = b("VsDialog");
|
426
|
+
return o(), i(C, null, [
|
427
|
+
r("button", {
|
428
|
+
onClick: e[0] || (e[0] = (u) => s.isOpen = !0),
|
429
429
|
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"
|
430
430
|
}, [
|
431
|
-
|
431
|
+
g(c, {
|
432
432
|
height: "16",
|
433
433
|
width: "16"
|
434
434
|
}),
|
435
435
|
e[7] || (e[7] = P(" Експорт "))
|
436
436
|
]),
|
437
|
-
|
437
|
+
g(h, {
|
438
438
|
visible: s.isOpen,
|
439
|
-
"onUpdate:visible": e[6] || (e[6] = (
|
439
|
+
"onUpdate:visible": e[6] || (e[6] = (u) => s.isOpen = u),
|
440
440
|
title: "Експорт таблиці",
|
441
441
|
size: "small",
|
442
442
|
closeClickBack: !0
|
443
443
|
}, {
|
444
|
-
footer:
|
445
|
-
s.isSuccessTemplate ? (
|
446
|
-
|
444
|
+
footer: I(() => [
|
445
|
+
s.isSuccessTemplate ? (o(), i("div", Rt, [
|
446
|
+
r("button", {
|
447
447
|
type: "button",
|
448
448
|
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",
|
449
|
-
onClick: e[2] || (e[2] = (
|
449
|
+
onClick: e[2] || (e[2] = (u) => s.isOpen = !1)
|
450
450
|
}, " Закрити "),
|
451
|
-
|
451
|
+
r("button", {
|
452
452
|
type: "button",
|
453
453
|
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",
|
454
|
-
onClick: e[3] || (e[3] = (
|
454
|
+
onClick: e[3] || (e[3] = (u) => s.isSuccessTemplate = !1)
|
455
455
|
}, " Вигрузити ще ")
|
456
|
-
])) : (
|
457
|
-
|
456
|
+
])) : (o(), i("div", Jt, [
|
457
|
+
r("button", {
|
458
458
|
type: "button",
|
459
459
|
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",
|
460
|
-
onClick: e[4] || (e[4] = (
|
460
|
+
onClick: e[4] || (e[4] = (u) => s.isOpen = !1)
|
461
461
|
}, " Скасувати "),
|
462
|
-
|
462
|
+
r("button", {
|
463
463
|
type: "button",
|
464
464
|
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",
|
465
|
-
onClick: e[5] || (e[5] = (...
|
465
|
+
onClick: e[5] || (e[5] = (...u) => l.exportTable && l.exportTable(...u))
|
466
466
|
}, " Завантажити таблицю ")
|
467
467
|
]))
|
468
468
|
]),
|
469
|
-
default:
|
470
|
-
s.isSuccessTemplate ? (
|
471
|
-
|
469
|
+
default: I(() => [
|
470
|
+
s.isSuccessTemplate ? (o(), i("div", Mt, [
|
471
|
+
g(f, {
|
472
472
|
height: "100",
|
473
473
|
width: "100",
|
474
474
|
class: "text-green-200 mb-[20px]"
|
475
475
|
}),
|
476
|
-
e[8] || (e[8] =
|
477
|
-
])) : (
|
478
|
-
|
479
|
-
e[9] || (e[9] =
|
480
|
-
|
481
|
-
(
|
482
|
-
key:
|
483
|
-
onClick:
|
476
|
+
e[8] || (e[8] = r("h2", null, "Звіт сформовано і збережено", -1))
|
477
|
+
])) : (o(), i("div", Lt, [
|
478
|
+
r("div", zt, [
|
479
|
+
e[9] || (e[9] = r("h2", { class: "text-sm font-[600] text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
480
|
+
r("div", qt, [
|
481
|
+
(o(!0), i(C, null, V(s.actions, (u) => (o(), i("button", {
|
482
|
+
key: u == null ? void 0 : u.name,
|
483
|
+
onClick: u == null ? void 0 : u.function,
|
484
484
|
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"
|
485
485
|
}, [
|
486
|
-
|
487
|
-
class:
|
486
|
+
r("span", {
|
487
|
+
class: S(["h-[14px] w-[14px] border rounded-full flex items-center justify-center", { "border-blue-500": (u == null ? void 0 : u.name) === s.activeAction }])
|
488
488
|
}, [
|
489
|
-
(
|
489
|
+
(u == null ? void 0 : u.name) === s.activeAction ? (o(), i("span", Bt)) : v("", !0)
|
490
490
|
], 2),
|
491
|
-
P(" " + T(
|
492
|
-
], 8,
|
491
|
+
P(" " + T(u == null ? void 0 : u.label), 1)
|
492
|
+
], 8, Ot))), 128))
|
493
493
|
]),
|
494
|
-
|
495
|
-
(
|
494
|
+
r("div", Nt, [
|
495
|
+
(o(!0), i(C, null, V(n.columns, (u, _) => (o(), i("div", {
|
496
496
|
class: "flex items-center",
|
497
497
|
key: _,
|
498
498
|
style: { width: "calc((100% - 10px) / 2)" }
|
499
499
|
}, [
|
500
|
-
|
500
|
+
g(d, {
|
501
501
|
class: "[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",
|
502
502
|
modelValue: s.cols,
|
503
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
504
|
-
value:
|
505
|
-
label:
|
503
|
+
"onUpdate:modelValue": e[1] || (e[1] = (x) => s.cols = x),
|
504
|
+
value: u == null ? void 0 : u.name,
|
505
|
+
label: u == null ? void 0 : u.ua
|
506
506
|
}, null, 8, ["modelValue", "value", "label"])
|
507
507
|
]))), 128))
|
508
508
|
])
|
509
509
|
]),
|
510
|
-
|
511
|
-
e[10] || (e[10] =
|
512
|
-
|
513
|
-
(
|
510
|
+
r("div", Ut, [
|
511
|
+
e[10] || (e[10] = r("h2", { class: "text-sm font-[600] text-gray-500" }, "Виберіть формат таблиці:", -1)),
|
512
|
+
r("div", Et, [
|
513
|
+
(o(!0), i(C, null, V(s.tableFormats, (u, _) => (o(), i("div", {
|
514
514
|
class: "flex items-center",
|
515
515
|
key: _
|
516
516
|
}, [
|
517
|
-
|
517
|
+
r("input", {
|
518
518
|
type: "radio",
|
519
519
|
name: "hs-pro-duecmfm",
|
520
520
|
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",
|
521
|
-
id:
|
522
|
-
onChange: (
|
523
|
-
}, null, 40,
|
524
|
-
|
525
|
-
for:
|
521
|
+
id: u,
|
522
|
+
onChange: (x) => l.selectFormat(u)
|
523
|
+
}, null, 40, Ht),
|
524
|
+
r("label", {
|
525
|
+
for: u,
|
526
526
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
527
|
-
}, " Формат " + T(
|
527
|
+
}, " Формат " + T(u), 9, Wt)
|
528
528
|
]))), 128))
|
529
529
|
])
|
530
530
|
])
|
@@ -534,7 +534,146 @@ function Et(t, e, n, a, s, o) {
|
|
534
534
|
}, 8, ["visible"])
|
535
535
|
], 64);
|
536
536
|
}
|
537
|
-
const
|
537
|
+
const Kt = /* @__PURE__ */ $(Ft, [["render", Gt]]), Qt = {
|
538
|
+
components: { IconExport: qe, IconChevronDown: Me, IconSuccess: Oe },
|
539
|
+
props: {
|
540
|
+
data: Object,
|
541
|
+
rows: Array,
|
542
|
+
titleCol: String
|
543
|
+
},
|
544
|
+
data() {
|
545
|
+
return {
|
546
|
+
isOpen: !1,
|
547
|
+
selectedTemplate: null,
|
548
|
+
mode: "base"
|
549
|
+
};
|
550
|
+
},
|
551
|
+
methods: {
|
552
|
+
resetSelections(t) {
|
553
|
+
t || (this.selectedTemplate = null, this.mode = "base");
|
554
|
+
},
|
555
|
+
getTemplateUrl() {
|
556
|
+
return `/api/print-template/crm.accounts.doc/${this.selectedTemplate}?${this.mode}=1&format=pdf`;
|
557
|
+
},
|
558
|
+
downloadPdf() {
|
559
|
+
if (!this.selectedTemplate) return;
|
560
|
+
const t = document.createElement("a");
|
561
|
+
t.href = `/api/print-template/crm.accounts.doc/${this.selectedTemplate}?format=pdf`, t.download = `document_${this.selectedTemplate}.pdf`, t.click();
|
562
|
+
},
|
563
|
+
downloadWord() {
|
564
|
+
if (!this.selectedTemplate) return;
|
565
|
+
const t = document.createElement("a");
|
566
|
+
t.href = `/api/print-template/crm.accounts.doc/${this.selectedTemplate}?format=word`, t.download = `document_${this.selectedTemplate}.docx`, t.click();
|
567
|
+
}
|
568
|
+
},
|
569
|
+
mounted() {
|
570
|
+
console.log("rows", this.rows);
|
571
|
+
}
|
572
|
+
}, Xt = { class: "p-4 flex flex-col" }, Yt = { class: "flex mb-4 gap-2 border rounded overflow-hidden" }, Zt = { class: "flex" }, es = { class: "overflow-y-auto h-[400px] w-1/2 space-y-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, ts = ["id", "value"], ss = ["for"], ns = {
|
573
|
+
key: 0,
|
574
|
+
class: "w-[400px] h-[400px] border ml-4 flex items-center justify-center text-gray-600 text-lg font-medium"
|
575
|
+
}, rs = ["src"], ls = { class: "flex w-full justify-end p-[20px] gap-[6px] border-t" };
|
576
|
+
function os(t, e, n, a, s, l) {
|
577
|
+
const c = b("IconExport"), f = b("VsDialog");
|
578
|
+
return o(), i(C, null, [
|
579
|
+
r("button", {
|
580
|
+
onClick: e[0] || (e[0] = (d) => s.isOpen = !0),
|
581
|
+
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"
|
582
|
+
}, [
|
583
|
+
g(c, {
|
584
|
+
height: "16",
|
585
|
+
width: "16"
|
586
|
+
}),
|
587
|
+
e[9] || (e[9] = P(" Друк "))
|
588
|
+
]),
|
589
|
+
g(f, {
|
590
|
+
visible: s.isOpen,
|
591
|
+
"onUpdate:visible": [
|
592
|
+
e[8] || (e[8] = (d) => s.isOpen = d),
|
593
|
+
l.resetSelections
|
594
|
+
],
|
595
|
+
title: "Друк",
|
596
|
+
size: "small",
|
597
|
+
closeClickBack: !0
|
598
|
+
}, {
|
599
|
+
footer: I(() => [
|
600
|
+
r("div", ls, [
|
601
|
+
r("button", {
|
602
|
+
type: "button",
|
603
|
+
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",
|
604
|
+
onClick: e[5] || (e[5] = (d) => s.isOpen = !1)
|
605
|
+
}, " Скасувати "),
|
606
|
+
r("button", {
|
607
|
+
type: "button",
|
608
|
+
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",
|
609
|
+
onClick: e[6] || (e[6] = (...d) => l.downloadPdf && l.downloadPdf(...d))
|
610
|
+
}, " Завантажити PDF "),
|
611
|
+
r("button", {
|
612
|
+
type: "button",
|
613
|
+
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",
|
614
|
+
onClick: e[7] || (e[7] = (...d) => l.downloadWord && l.downloadWord(...d))
|
615
|
+
}, " Завантажити Word ")
|
616
|
+
])
|
617
|
+
]),
|
618
|
+
default: I(() => [
|
619
|
+
r("div", Xt, [
|
620
|
+
r("div", Yt, [
|
621
|
+
r("button", {
|
622
|
+
class: S([{
|
623
|
+
"bg-gray-200": s.mode === "base",
|
624
|
+
"bg-white": s.mode !== "base"
|
625
|
+
}, "px-4 py-2 border-r text-black w-full"]),
|
626
|
+
onClick: e[1] || (e[1] = (d) => s.mode = "base")
|
627
|
+
}, " Базовий ", 2),
|
628
|
+
r("button", {
|
629
|
+
class: S([{
|
630
|
+
"bg-gray-200": s.mode === "demo",
|
631
|
+
"bg-white": s.mode !== "demo"
|
632
|
+
}, "px-4 py-2 border-r text-black w-full"]),
|
633
|
+
onClick: e[2] || (e[2] = (d) => s.mode = "demo")
|
634
|
+
}, " Демо ", 2),
|
635
|
+
r("button", {
|
636
|
+
class: S([{
|
637
|
+
"bg-gray-200": s.mode === "preview",
|
638
|
+
"bg-white": s.mode !== "preview"
|
639
|
+
}, "px-4 py-2 text-black w-full"]),
|
640
|
+
onClick: e[3] || (e[3] = (d) => s.mode = "preview")
|
641
|
+
}, " Перегляд шаблону ", 2)
|
642
|
+
]),
|
643
|
+
r("div", Zt, [
|
644
|
+
r("div", es, [
|
645
|
+
(o(!0), i(C, null, V(n.rows, (d) => (o(), i("div", {
|
646
|
+
key: d.id,
|
647
|
+
class: "flex items-center gap-2"
|
648
|
+
}, [
|
649
|
+
L(r("input", {
|
650
|
+
type: "radio",
|
651
|
+
id: d.id,
|
652
|
+
value: d.id,
|
653
|
+
"onUpdate:modelValue": e[4] || (e[4] = (h) => s.selectedTemplate = h),
|
654
|
+
class: "cursor-pointer h-5"
|
655
|
+
}, null, 8, ts), [
|
656
|
+
[lt, s.selectedTemplate]
|
657
|
+
]),
|
658
|
+
r("label", {
|
659
|
+
for: d.id,
|
660
|
+
class: "cursor-pointer"
|
661
|
+
}, T(d[n.titleCol]), 9, ss)
|
662
|
+
]))), 128))
|
663
|
+
]),
|
664
|
+
s.selectedTemplate ? (o(), i("iframe", {
|
665
|
+
key: 1,
|
666
|
+
class: "w-[400px] h-[400px] border ml-4",
|
667
|
+
src: l.getTemplateUrl()
|
668
|
+
}, null, 8, rs)) : (o(), i("div", ns, " Оберіть для друку та прев'ю "))
|
669
|
+
])
|
670
|
+
])
|
671
|
+
]),
|
672
|
+
_: 1
|
673
|
+
}, 8, ["visible", "onUpdate:visible"])
|
674
|
+
], 64);
|
675
|
+
}
|
676
|
+
const as = /* @__PURE__ */ $(Qt, [["render", os]]), is = {}, ds = {
|
538
677
|
xmlns: "http://www.w3.org/2000/svg",
|
539
678
|
viewBox: "0 0 24 24",
|
540
679
|
fill: "none",
|
@@ -544,16 +683,16 @@ const Ht = /* @__PURE__ */ w(It, [["render", Et]]), Rt = {}, Wt = {
|
|
544
683
|
"stroke-linejoin": "round",
|
545
684
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
546
685
|
};
|
547
|
-
function
|
548
|
-
return
|
549
|
-
|
686
|
+
function us(t, e, n, a, s, l) {
|
687
|
+
return o(), i("svg", ds, e[0] || (e[0] = [
|
688
|
+
ot('<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)
|
550
689
|
]));
|
551
690
|
}
|
552
|
-
const
|
691
|
+
const cs = /* @__PURE__ */ $(is, [["render", us]]), ps = {
|
553
692
|
props: { column: Object },
|
554
693
|
emits: ["update-column"],
|
555
694
|
components: {
|
556
|
-
IconCheck2:
|
695
|
+
IconCheck2: Le
|
557
696
|
},
|
558
697
|
data() {
|
559
698
|
return {
|
@@ -569,24 +708,24 @@ const Gt = /* @__PURE__ */ w(Rt, [["render", Jt]]), Kt = {
|
|
569
708
|
var t;
|
570
709
|
((t = this.column) == null ? void 0 : t.hidden) !== !0 && (this.value = !0);
|
571
710
|
}
|
572
|
-
},
|
573
|
-
function
|
574
|
-
var f,
|
575
|
-
const
|
576
|
-
return
|
577
|
-
|
578
|
-
P(T(((f = n.column) == null ? void 0 : f.ua) || ((
|
579
|
-
|
711
|
+
}, bs = { 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" };
|
712
|
+
function fs(t, e, n, a, s, l) {
|
713
|
+
var f, d;
|
714
|
+
const c = b("IconCheck2");
|
715
|
+
return o(), i("div", bs, [
|
716
|
+
r("label", hs, [
|
717
|
+
P(T(((f = n.column) == null ? void 0 : f.ua) || ((d = n.column) == null ? void 0 : d.title)) + " ", 1),
|
718
|
+
L(r("input", {
|
580
719
|
type: "checkbox",
|
581
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
720
|
+
"onUpdate:modelValue": e[0] || (e[0] = (h) => s.value = h),
|
582
721
|
class: "hidden"
|
583
722
|
}, null, 512), [
|
584
|
-
[
|
723
|
+
[at, s.value]
|
585
724
|
]),
|
586
|
-
|
587
|
-
class:
|
725
|
+
r("span", {
|
726
|
+
class: S(["flex items-center justify-center text-white border border-gray-300 rounded shrink-0 size-4 focus:ring-blue-500", [s.value ? "bg-blue-600 border-0" : "bg-white"]])
|
588
727
|
}, [
|
589
|
-
|
728
|
+
g(c, {
|
590
729
|
height: "12",
|
591
730
|
width: "12"
|
592
731
|
})
|
@@ -594,8 +733,8 @@ function Yt(t, e, n, a, s, o) {
|
|
594
733
|
])
|
595
734
|
]);
|
596
735
|
}
|
597
|
-
const
|
598
|
-
components: { IconColumns:
|
736
|
+
const ms = /* @__PURE__ */ $(ps, [["render", fs]]), gs = {
|
737
|
+
components: { IconColumns: cs, AdminTableColumnsHiddenItem: ms },
|
599
738
|
emits: ["update-columns"],
|
600
739
|
props: { columns: Array },
|
601
740
|
data() {
|
@@ -609,8 +748,8 @@ const Zt = /* @__PURE__ */ w(Kt, [["render", Yt]]), es = {
|
|
609
748
|
var t;
|
610
749
|
return (t = this.columns) == null ? void 0 : t.filter(
|
611
750
|
(e) => {
|
612
|
-
var n, a, s,
|
613
|
-
return ((s = (n = e == null ? void 0 : e.ua) == null ? void 0 : n.toLowerCase()) == null ? void 0 : s.includes((a = this.searchValue) == null ? void 0 : a.toLowerCase())) || ((f = (
|
751
|
+
var n, a, s, l, c, f;
|
752
|
+
return ((s = (n = e == null ? void 0 : e.ua) == null ? void 0 : n.toLowerCase()) == null ? void 0 : s.includes((a = this.searchValue) == null ? void 0 : a.toLowerCase())) || ((f = (l = e == null ? void 0 : e.title) == null ? void 0 : l.toLowerCase()) == null ? void 0 : f.includes((c = this.searchValue) == null ? void 0 : c.toLowerCase()));
|
614
753
|
}
|
615
754
|
);
|
616
755
|
}
|
@@ -631,56 +770,56 @@ const Zt = /* @__PURE__ */ w(Kt, [["render", Yt]]), es = {
|
|
631
770
|
beforeUnmount() {
|
632
771
|
document.removeEventListener("click", this.handleClickOutside);
|
633
772
|
}
|
634
|
-
},
|
773
|
+
}, xs = {
|
635
774
|
class: "relative",
|
636
775
|
ref: "wrapper"
|
637
|
-
},
|
776
|
+
}, ys = {
|
638
777
|
key: 0,
|
639
778
|
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"
|
640
|
-
},
|
779
|
+
}, ks = { class: "relative p-1 border-gray-200 border-y dark:border-neutral-800" }, vs = { 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" }, _s = {
|
641
780
|
key: 0,
|
642
781
|
class: "block px-3 mb-2 text-xs text-gray-500 dark:text-neutral-500"
|
643
|
-
},
|
782
|
+
}, ws = { class: "space-y-1" }, Cs = {
|
644
783
|
key: 1,
|
645
784
|
class: "flex items-center px-3 text-[13px] py-1.5 px-3 rounded-md cursor-pointer group"
|
646
785
|
};
|
647
|
-
function
|
648
|
-
const
|
649
|
-
return
|
650
|
-
|
651
|
-
onClick: e[0] || (e[0] = (...
|
786
|
+
function $s(t, e, n, a, s, l) {
|
787
|
+
const c = b("IconColumns"), f = b("AdminTableColumnsHiddenItem");
|
788
|
+
return o(), i("div", xs, [
|
789
|
+
r("button", {
|
790
|
+
onClick: e[0] || (e[0] = (...d) => l.toggleVisible && l.toggleVisible(...d)),
|
652
791
|
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"
|
653
792
|
}, [
|
654
|
-
|
793
|
+
g(c, {
|
655
794
|
height: "20",
|
656
795
|
width: "16"
|
657
796
|
})
|
658
797
|
]),
|
659
|
-
|
660
|
-
default:
|
661
|
-
var
|
798
|
+
g(z, { name: "fade" }, {
|
799
|
+
default: I(() => {
|
800
|
+
var d, h;
|
662
801
|
return [
|
663
|
-
s.visible ? (
|
664
|
-
e[2] || (e[2] =
|
665
|
-
|
666
|
-
|
667
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
802
|
+
s.visible ? (o(), i("div", ys, [
|
803
|
+
e[2] || (e[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)),
|
804
|
+
r("div", ks, [
|
805
|
+
L(r("input", {
|
806
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => s.searchValue = u),
|
668
807
|
type: "text",
|
669
808
|
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",
|
670
809
|
placeholder: "Search",
|
671
810
|
autofocus: ""
|
672
811
|
}, null, 512), [
|
673
|
-
[
|
812
|
+
[it, s.searchValue]
|
674
813
|
])
|
675
814
|
]),
|
676
|
-
|
677
|
-
(
|
678
|
-
|
679
|
-
(
|
815
|
+
r("div", vs, [
|
816
|
+
(d = l.filteredColumn) != null && d.length ? (o(), i("span", _s, " Оберіть колонки для відображення ")) : v("", !0),
|
817
|
+
r("div", ws, [
|
818
|
+
(h = l.filteredColumn) != null && h.length ? (o(!0), i(C, { key: 0 }, V(l.filteredColumn, (u, _) => (o(), k(f, {
|
680
819
|
key: _,
|
681
|
-
column:
|
682
|
-
onUpdateColumn:
|
683
|
-
}, null, 8, ["column", "onUpdateColumn"]))), 128)) : (
|
820
|
+
column: u,
|
821
|
+
onUpdateColumn: l.updateColumn
|
822
|
+
}, null, 8, ["column", "onUpdateColumn"]))), 128)) : (o(), i("div", Cs, " Нічого не знайдено "))
|
684
823
|
])
|
685
824
|
])
|
686
825
|
])) : v("", !0)
|
@@ -690,7 +829,7 @@ function is(t, e, n, a, s, o) {
|
|
690
829
|
})
|
691
830
|
], 512);
|
692
831
|
}
|
693
|
-
const
|
832
|
+
const Ts = /* @__PURE__ */ $(gs, [["render", $s]]), As = {}, Ss = {
|
694
833
|
xmlns: "http://www.w3.org/2000/svg",
|
695
834
|
viewBox: "0 0 24 24",
|
696
835
|
fill: "none",
|
@@ -700,18 +839,18 @@ const ds = /* @__PURE__ */ w(es, [["render", is]]), us = {}, cs = {
|
|
700
839
|
"stroke-linejoin": "round",
|
701
840
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-minus"
|
702
841
|
};
|
703
|
-
function
|
704
|
-
return
|
705
|
-
|
842
|
+
function Is(t, e, n, a, s, l) {
|
843
|
+
return o(), i("svg", Ss, e[0] || (e[0] = [
|
844
|
+
r("path", {
|
706
845
|
stroke: "none",
|
707
846
|
d: "M0 0h24v24H0z",
|
708
847
|
fill: "none"
|
709
848
|
}, null, -1),
|
710
|
-
|
849
|
+
r("path", { d: "M5 12l14 0" }, null, -1)
|
711
850
|
]));
|
712
851
|
}
|
713
|
-
const
|
714
|
-
components: { IconPlus:
|
852
|
+
const Ds = /* @__PURE__ */ $(As, [["render", Is]]), Vs = {
|
853
|
+
components: { IconPlus: B, IconMinus: Ds },
|
715
854
|
props: {
|
716
855
|
title: String,
|
717
856
|
defaultValue: { type: Boolean, default: () => !1 }
|
@@ -719,35 +858,35 @@ const hs = /* @__PURE__ */ w(us, [["render", ps]]), bs = {
|
|
719
858
|
data() {
|
720
859
|
return { expanded: this.defaultValue };
|
721
860
|
}
|
722
|
-
},
|
723
|
-
function
|
724
|
-
const
|
725
|
-
return
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
onClick: e[0] || (e[0] = (
|
861
|
+
}, Ps = { class: "hs-accordion" }, js = { class: "py-0.5 flex items-center gap-x-0.5 w-full" }, Fs = { class: "text-sm font-medium" }, Ms = { class: "relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b" };
|
862
|
+
function Ls(t, e, n, a, s, l) {
|
863
|
+
const c = b("IconPlus"), f = b("IconMinus");
|
864
|
+
return o(), i("div", null, [
|
865
|
+
r("div", null, [
|
866
|
+
r("div", Ps, [
|
867
|
+
r("div", js, [
|
868
|
+
r("div", {
|
869
|
+
onClick: e[0] || (e[0] = (d) => s.expanded = !s.expanded),
|
731
870
|
class: "rounded-md cursor-pointer grow"
|
732
871
|
}, [
|
733
|
-
|
872
|
+
r("span", Fs, T(n.title), 1)
|
734
873
|
]),
|
735
|
-
|
874
|
+
r("button", {
|
736
875
|
class: "flex items-center justify-center rounded-md size-6 hover:bg-gray-100",
|
737
|
-
onClick: e[1] || (e[1] = (
|
876
|
+
onClick: e[1] || (e[1] = (d) => s.expanded = !s.expanded)
|
738
877
|
}, [
|
739
|
-
s.expanded ? (
|
878
|
+
s.expanded ? (o(), k(f, {
|
740
879
|
key: 1,
|
741
880
|
width: "14"
|
742
|
-
})) : (
|
881
|
+
})) : (o(), k(c, { key: 0 }))
|
743
882
|
])
|
744
883
|
]),
|
745
|
-
|
746
|
-
default:
|
747
|
-
|
748
|
-
|
884
|
+
g(z, { name: "fade" }, {
|
885
|
+
default: I(() => [
|
886
|
+
L(r("div", Ms, [
|
887
|
+
dt(t.$slots, "default", {}, void 0, !0)
|
749
888
|
], 512), [
|
750
|
-
[
|
889
|
+
[U, s.expanded]
|
751
890
|
])
|
752
891
|
]),
|
753
892
|
_: 3
|
@@ -756,45 +895,45 @@ function ys(t, e, n, a, s, o) {
|
|
756
895
|
])
|
757
896
|
]);
|
758
897
|
}
|
759
|
-
const
|
898
|
+
const zs = /* @__PURE__ */ $(Vs, [["render", Ls], ["__scopeId", "data-v-c6318482"]]), qs = {
|
760
899
|
components: {
|
761
|
-
AdminComponentIs:
|
762
|
-
AdminTree:
|
763
|
-
VsNoData:
|
764
|
-
VsWidgetComments:
|
765
|
-
VsWidgetMap:
|
766
|
-
VsWidgetFileList:
|
900
|
+
AdminComponentIs: N,
|
901
|
+
AdminTree: zs,
|
902
|
+
VsNoData: Ke,
|
903
|
+
VsWidgetComments: Qe,
|
904
|
+
VsWidgetMap: Xe,
|
905
|
+
VsWidgetFileList: Ye
|
767
906
|
},
|
768
907
|
props: { table: String, columns: Array, row: Object }
|
769
|
-
},
|
908
|
+
}, Os = {
|
770
909
|
class: "hs-accordion border-gray-100 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",
|
771
910
|
style: { height: "calc(100vh - 310px)" }
|
772
|
-
},
|
911
|
+
}, Bs = {
|
773
912
|
class: "border-l",
|
774
913
|
style: { height: "calc(100vh - 360px)" }
|
775
|
-
},
|
776
|
-
function
|
777
|
-
var
|
778
|
-
const
|
779
|
-
return
|
780
|
-
e[0] || (e[0] =
|
781
|
-
|
914
|
+
}, Ns = { class: "flow-root mt-[10px]" }, Us = { class: "-my-3 text-sm divide-y divide-gray-100" }, Es = { class: "flex py-3 sm:grid-cols-3 sm:gap-4" }, Hs = { class: "font-medium text-black w-[50%]" }, Ws = { class: "text-gray-700 sm:col-span-2 w-[50%]" }, Rs = { class: "table-info-card" }, Js = { class: "table-info-card" };
|
915
|
+
function Gs(t, e, n, a, s, l) {
|
916
|
+
var x, m, w;
|
917
|
+
const c = b("AdminComponentIs"), f = b("AdminTree"), d = b("VsWidgetMap"), h = b("VsNoData"), u = b("VsWidgetComments"), _ = b("VsWidgetFileList");
|
918
|
+
return o(), i("div", Os, [
|
919
|
+
e[0] || (e[0] = r("div", { class: "p-[10px] pl-[18px] pb-[18px] border-b" }, [
|
920
|
+
r("h2", { class: "text-sm font-medium" }, "Інформація про об'єкт")
|
782
921
|
], -1)),
|
783
|
-
|
784
|
-
(
|
785
|
-
n.row ? (
|
922
|
+
r("div", Bs, [
|
923
|
+
(m = (x = t.$route) == null ? void 0 : x.query) != null && m.card ? (o(), i(C, { key: 0 }, [
|
924
|
+
n.row ? (o(), k(f, {
|
786
925
|
key: 0,
|
787
926
|
defaultValue: !0,
|
788
927
|
title: "Основна інформація",
|
789
928
|
class: "border-b p-[10px] py-[16px]"
|
790
929
|
}, {
|
791
|
-
default:
|
792
|
-
|
793
|
-
|
794
|
-
(
|
795
|
-
|
796
|
-
|
797
|
-
|
930
|
+
default: I(() => [
|
931
|
+
r("div", Ns, [
|
932
|
+
r("dl", Us, [
|
933
|
+
(o(!0), i(C, null, V(n.columns, (y) => (o(), i("div", Es, [
|
934
|
+
r("dt", Hs, T((y == null ? void 0 : y.ua) || (y == null ? void 0 : y.title)), 1),
|
935
|
+
r("dd", Ws, [
|
936
|
+
g(c, {
|
798
937
|
row: n.row,
|
799
938
|
column: y,
|
800
939
|
table: n.table
|
@@ -806,19 +945,19 @@ function Ds(t, e, n, a, s, o) {
|
|
806
945
|
]),
|
807
946
|
_: 1
|
808
947
|
})) : v("", !0),
|
809
|
-
(
|
948
|
+
(w = n.row) != null && w.geom ? (o(), k(f, {
|
810
949
|
key: 1,
|
811
950
|
title: "Карта",
|
812
951
|
class: "border-b p-[10px] py-[16px]"
|
813
952
|
}, {
|
814
|
-
default:
|
815
|
-
var y,
|
953
|
+
default: I(() => {
|
954
|
+
var y, A;
|
816
955
|
return [
|
817
|
-
(y = n.row) != null && y.geom ? (
|
956
|
+
(y = n.row) != null && y.geom ? (o(), k(d, {
|
818
957
|
key: 0,
|
819
|
-
geometry: (
|
958
|
+
geometry: (A = n.row) == null ? void 0 : A.geom,
|
820
959
|
zoom: 14
|
821
|
-
}, null, 8, ["geometry"])) : (
|
960
|
+
}, null, 8, ["geometry"])) : (o(), k(h, {
|
822
961
|
key: 1,
|
823
962
|
title: "У об'єкта відсутня геометрія",
|
824
963
|
text: "",
|
@@ -828,15 +967,15 @@ function Ds(t, e, n, a, s, o) {
|
|
828
967
|
}),
|
829
968
|
_: 1
|
830
969
|
})) : v("", !0),
|
831
|
-
|
970
|
+
g(f, {
|
832
971
|
title: "Коментарі",
|
833
972
|
class: "border-b p-[10px] py-[16px]"
|
834
973
|
}, {
|
835
|
-
default:
|
974
|
+
default: I(() => {
|
836
975
|
var y;
|
837
976
|
return [
|
838
|
-
|
839
|
-
|
977
|
+
r("div", Rs, [
|
978
|
+
g(u, {
|
840
979
|
id: (y = n.row) == null ? void 0 : y.id
|
841
980
|
}, null, 8, ["id"])
|
842
981
|
])
|
@@ -844,38 +983,38 @@ function Ds(t, e, n, a, s, o) {
|
|
844
983
|
}),
|
845
984
|
_: 1
|
846
985
|
}),
|
847
|
-
|
986
|
+
g(f, {
|
848
987
|
title: "Файли",
|
849
988
|
class: "border-b p-[10px] py-[16px]"
|
850
989
|
}, {
|
851
|
-
default:
|
852
|
-
var y,
|
990
|
+
default: I(() => {
|
991
|
+
var y, A;
|
853
992
|
return [
|
854
|
-
|
855
|
-
(
|
993
|
+
r("div", Js, [
|
994
|
+
(o(), k(_, {
|
856
995
|
key: (y = n.row) == null ? void 0 : y.id,
|
857
|
-
id: (
|
996
|
+
id: (A = n.row) == null ? void 0 : A.id
|
858
997
|
}, null, 8, ["id"]))
|
859
998
|
])
|
860
999
|
];
|
861
1000
|
}),
|
862
1001
|
_: 1
|
863
1002
|
})
|
864
|
-
], 64)) : (
|
1003
|
+
], 64)) : (o(), k(h, {
|
865
1004
|
key: 1,
|
866
1005
|
text: "Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"
|
867
1006
|
}))
|
868
1007
|
])
|
869
1008
|
]);
|
870
1009
|
}
|
871
|
-
const
|
1010
|
+
const Ks = /* @__PURE__ */ $(qs, [["render", Gs]]), Qs = {
|
872
1011
|
emits: ["filterChange"],
|
873
1012
|
props: {
|
874
1013
|
scheme: { type: Object },
|
875
1014
|
onFilters: { type: Number },
|
876
1015
|
table: { type: String }
|
877
1016
|
},
|
878
|
-
components: { IconFilter:
|
1017
|
+
components: { IconFilter: Ze },
|
879
1018
|
data() {
|
880
1019
|
return {
|
881
1020
|
isFilters: !1
|
@@ -886,36 +1025,36 @@ const Ps = /* @__PURE__ */ w(vs, [["render", Ds]]), Fs = {
|
|
886
1025
|
this.isFilters && t.classList.contains("filter-container") && (this.isFilters = !1);
|
887
1026
|
}
|
888
1027
|
}
|
889
|
-
},
|
1028
|
+
}, Xs = {
|
890
1029
|
key: 0,
|
891
1030
|
class: "px-[7px] text-[10px] py-[1px] font-[700] text-white bg-blue-500 rounded-full"
|
892
|
-
},
|
893
|
-
function
|
894
|
-
const
|
895
|
-
return
|
896
|
-
|
897
|
-
onClick: e[0] || (e[0] = (
|
1031
|
+
}, Ys = { 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" };
|
1032
|
+
function Zs(t, e, n, a, s, l) {
|
1033
|
+
const c = b("IconFilter"), f = b("VsFilter");
|
1034
|
+
return o(), i(C, null, [
|
1035
|
+
r("button", {
|
1036
|
+
onClick: e[0] || (e[0] = (d) => s.isFilters = !s.isFilters),
|
898
1037
|
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"
|
899
1038
|
}, [
|
900
|
-
|
1039
|
+
g(c, {
|
901
1040
|
height: "16",
|
902
1041
|
width: "16"
|
903
1042
|
}),
|
904
1043
|
e[4] || (e[4] = P(" Фільтри ")),
|
905
|
-
n.onFilters ? (
|
1044
|
+
n.onFilters ? (o(), i("span", Xs, T(n.onFilters), 1)) : v("", !0)
|
906
1045
|
]),
|
907
|
-
|
908
|
-
default:
|
909
|
-
var
|
1046
|
+
g(z, { name: "fade" }, {
|
1047
|
+
default: I(() => {
|
1048
|
+
var d;
|
910
1049
|
return [
|
911
|
-
(
|
912
|
-
|
913
|
-
onClick: e[3] || (e[3] = (...
|
1050
|
+
(o(), k(ut, { to: "#modal" }, [
|
1051
|
+
L(r("div", {
|
1052
|
+
onClick: e[3] || (e[3] = (...h) => l.closeFilter && l.closeFilter(...h)),
|
914
1053
|
style: { height: "100vh" },
|
915
1054
|
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)]"
|
916
1055
|
}, [
|
917
|
-
|
918
|
-
(
|
1056
|
+
r("div", Ys, [
|
1057
|
+
(d = n.scheme) != null && d.length ? (o(), k(f, {
|
919
1058
|
key: 0,
|
920
1059
|
ref: "filter",
|
921
1060
|
scheme: n.scheme,
|
@@ -926,13 +1065,13 @@ function Ms(t, e, n, a, s, o) {
|
|
926
1065
|
name: "filter",
|
927
1066
|
footer: !0,
|
928
1067
|
background: !0,
|
929
|
-
onFilterChange: e[1] || (e[1] = (
|
1068
|
+
onFilterChange: e[1] || (e[1] = (h) => t.$emit("filterChange", h)),
|
930
1069
|
closeFilterBtn: !0,
|
931
|
-
onFilterClose: e[2] || (e[2] = (
|
1070
|
+
onFilterClose: e[2] || (e[2] = (h) => s.isFilters = !1)
|
932
1071
|
}, null, 8, ["scheme", "token"])) : v("", !0)
|
933
1072
|
])
|
934
1073
|
], 512), [
|
935
|
-
[
|
1074
|
+
[U, s.isFilters]
|
936
1075
|
])
|
937
1076
|
]))
|
938
1077
|
];
|
@@ -941,25 +1080,25 @@ function Ms(t, e, n, a, s, o) {
|
|
941
1080
|
})
|
942
1081
|
], 64);
|
943
1082
|
}
|
944
|
-
const
|
1083
|
+
const en = /* @__PURE__ */ $(Qs, [["render", Zs]]), tn = {
|
945
1084
|
props: { tabsList: { type: Array, default: () => [] }, filterState: String }
|
946
|
-
},
|
1085
|
+
}, sn = {
|
947
1086
|
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",
|
948
1087
|
"aria-label": "Tabs",
|
949
1088
|
role: "tablist",
|
950
1089
|
"aria-orientation": "horizontal"
|
951
|
-
},
|
952
|
-
function
|
953
|
-
return
|
954
|
-
(
|
955
|
-
onClick: (f) => t.$emit("update:filterState",
|
956
|
-
class:
|
957
|
-
" 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": (
|
1090
|
+
}, nn = ["onClick"];
|
1091
|
+
function rn(t, e, n, a, s, l) {
|
1092
|
+
return o(), i("nav", sn, [
|
1093
|
+
(o(!0), i(C, null, V(n.tabsList, (c) => (o(), i("button", {
|
1094
|
+
onClick: (f) => t.$emit("update:filterState", c == null ? void 0 : c.name),
|
1095
|
+
class: S(["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", {
|
1096
|
+
" 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
|
958
1097
|
}])
|
959
|
-
}, T(
|
1098
|
+
}, T(c == null ? void 0 : c.label), 11, nn))), 256))
|
960
1099
|
]);
|
961
1100
|
}
|
962
|
-
const
|
1101
|
+
const ln = /* @__PURE__ */ $(tn, [["render", rn]]), on = {}, an = {
|
963
1102
|
xmlns: "http://www.w3.org/2000/svg",
|
964
1103
|
viewBox: "0 0 24 24",
|
965
1104
|
fill: "none",
|
@@ -969,55 +1108,55 @@ const Us = /* @__PURE__ */ w(qs, [["render", Ns]]), Es = {}, Hs = {
|
|
969
1108
|
"stroke-linejoin": "round",
|
970
1109
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-filter"
|
971
1110
|
};
|
972
|
-
function
|
973
|
-
return
|
974
|
-
|
1111
|
+
function dn(t, e, n, a, s, l) {
|
1112
|
+
return o(), i("svg", an, e[0] || (e[0] = [
|
1113
|
+
r("path", {
|
975
1114
|
stroke: "none",
|
976
1115
|
d: "M0 0h24v24H0z",
|
977
1116
|
fill: "none"
|
978
1117
|
}, null, -1),
|
979
|
-
|
1118
|
+
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)
|
980
1119
|
]));
|
981
1120
|
}
|
982
|
-
const
|
983
|
-
components: { IconFilter2:
|
1121
|
+
const un = /* @__PURE__ */ $(on, [["render", dn]]), cn = {
|
1122
|
+
components: { IconFilter2: un, IconCheck2: Le },
|
984
1123
|
props: { filterCustom: String, customList: Array }
|
985
|
-
},
|
986
|
-
function
|
987
|
-
const
|
988
|
-
return
|
1124
|
+
}, pn = { 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" }, bn = { class: "flex flex-col p-[2px] gap-[2px] w-[170px]" }, hn = ["onClick"], fn = { class: "text-sm text-gray-800" };
|
1125
|
+
function mn(t, e, n, a, s, l) {
|
1126
|
+
const c = b("IconFilter2"), f = b("IconCheck2"), d = b("VsPopover");
|
1127
|
+
return o(), k(d, {
|
989
1128
|
ref: "popover",
|
990
1129
|
placement: "bottom"
|
991
1130
|
}, {
|
992
|
-
reference:
|
993
|
-
|
994
|
-
|
1131
|
+
reference: I(() => [
|
1132
|
+
r("button", pn, [
|
1133
|
+
g(c, {
|
995
1134
|
height: "20",
|
996
1135
|
width: "20"
|
997
1136
|
})
|
998
1137
|
])
|
999
1138
|
]),
|
1000
|
-
default:
|
1001
|
-
|
1002
|
-
(
|
1139
|
+
default: I(() => [
|
1140
|
+
r("div", bn, [
|
1141
|
+
(o(!0), i(C, null, V(n.customList, (h, u) => (o(), i("button", {
|
1003
1142
|
onClick: (_) => {
|
1004
|
-
var
|
1005
|
-
t.$emit("update:filterCustom",
|
1143
|
+
var x;
|
1144
|
+
t.$emit("update:filterCustom", h == null ? void 0 : h.name), (x = t.$refs) == null || x.popover.togglePopover();
|
1006
1145
|
},
|
1007
|
-
key:
|
1008
|
-
class:
|
1146
|
+
key: u,
|
1147
|
+
class: S(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100", { "bg-gray-100": n.filterCustom === (h == null ? void 0 : h.name) }])
|
1009
1148
|
}, [
|
1010
|
-
|
1011
|
-
n.filterCustom === (
|
1149
|
+
r("span", fn, T(h == null ? void 0 : h.label), 1),
|
1150
|
+
n.filterCustom === (h == null ? void 0 : h.name) ? (o(), k(f, {
|
1012
1151
|
key: 0,
|
1013
1152
|
class: "ml-auto size-3 shrink-0"
|
1014
1153
|
})) : v("", !0)
|
1015
|
-
], 10,
|
1016
|
-
|
1154
|
+
], 10, hn))), 128)),
|
1155
|
+
r("button", {
|
1017
1156
|
class: "flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",
|
1018
|
-
onClick: e[0] || (e[0] = (
|
1019
|
-
var
|
1020
|
-
t.$emit("update:filterCustom", void 0), (
|
1157
|
+
onClick: e[0] || (e[0] = (h) => {
|
1158
|
+
var u;
|
1159
|
+
t.$emit("update:filterCustom", void 0), (u = t.$refs) == null || u.popover.togglePopover();
|
1021
1160
|
})
|
1022
1161
|
}, " Скинути фільтри ")
|
1023
1162
|
])
|
@@ -1025,73 +1164,73 @@ function Ys(t, e, n, a, s, o) {
|
|
1025
1164
|
_: 1
|
1026
1165
|
}, 512);
|
1027
1166
|
}
|
1028
|
-
const
|
1167
|
+
const gn = /* @__PURE__ */ $(cn, [["render", mn]]), xn = { class: "flex items-center gap-x-2" }, yn = {
|
1029
1168
|
__name: "admin-table-custom-buttons",
|
1030
1169
|
props: {
|
1031
1170
|
slots: Object
|
1032
1171
|
},
|
1033
1172
|
setup(t) {
|
1034
|
-
var f,
|
1035
|
-
const { asyncTemplateSlot: e } = (_ = (
|
1036
|
-
var
|
1037
|
-
if ((
|
1038
|
-
const
|
1173
|
+
var f, d, h, u, _;
|
1174
|
+
const { asyncTemplateSlot: e } = (_ = (u = (h = (d = (f = ze()) == null ? void 0 : f.appContext) == null ? void 0 : d.app) == null ? void 0 : h.config) == null ? void 0 : u.globalProperties) == null ? void 0 : _.utils, n = q(""), a = q(""), s = t, l = () => {
|
1175
|
+
var x, m, w, y, A;
|
1176
|
+
if ((x = s.slots) != null && x.panelLeft || (a.value = "div"), (w = (m = s.slots) == null ? void 0 : m.panelLeft) != null && w.includes("<")) {
|
1177
|
+
const D = e("PanelLeft", (y = s.slots) == null ? void 0 : y.panelLeft, [
|
1039
1178
|
"name"
|
1040
1179
|
]);
|
1041
|
-
a.value =
|
1180
|
+
a.value = D;
|
1042
1181
|
} else
|
1043
|
-
a.value = (
|
1044
|
-
},
|
1045
|
-
var
|
1046
|
-
if ((
|
1047
|
-
const
|
1182
|
+
a.value = (A = s.slots) == null ? void 0 : A.panelLeft;
|
1183
|
+
}, c = () => {
|
1184
|
+
var x, m, w, y, A;
|
1185
|
+
if ((x = s.slots) != null && x.panelRight || (n.value = "div"), (w = (m = s.slots) == null ? void 0 : m.panelRight) != null && w.includes("<")) {
|
1186
|
+
const D = e("PanelRight", (y = s.slots) == null ? void 0 : y.panelRight, [
|
1048
1187
|
"name"
|
1049
1188
|
]);
|
1050
|
-
n.value =
|
1189
|
+
n.value = D;
|
1051
1190
|
} else
|
1052
|
-
n.value = (
|
1191
|
+
n.value = (A = s.slots) == null ? void 0 : A.panelRight;
|
1053
1192
|
};
|
1054
|
-
return
|
1055
|
-
(
|
1056
|
-
(
|
1193
|
+
return l(), c(), (x, m) => (o(), i("div", xn, [
|
1194
|
+
(o(), k(O(a.value))),
|
1195
|
+
(o(), k(O(n.value)))
|
1057
1196
|
]));
|
1058
1197
|
}
|
1059
|
-
},
|
1198
|
+
}, kn = (t, e = 300) => {
|
1060
1199
|
let n;
|
1061
1200
|
return function(...a) {
|
1062
1201
|
clearTimeout(n), n = setTimeout(() => {
|
1063
1202
|
t.apply(this, a);
|
1064
1203
|
}, e);
|
1065
1204
|
};
|
1066
|
-
},
|
1205
|
+
}, vn = {
|
1067
1206
|
__name: "admin-custom-button-add",
|
1068
1207
|
props: {
|
1069
1208
|
slots: Object
|
1070
1209
|
},
|
1071
1210
|
setup(t) {
|
1072
|
-
var
|
1073
|
-
const { asyncTemplateSlot: e } = (
|
1211
|
+
var l, c, f, d, h;
|
1212
|
+
const { asyncTemplateSlot: e } = (h = (d = (f = (c = (l = ze()) == null ? void 0 : l.appContext) == null ? void 0 : c.app) == null ? void 0 : f.config) == null ? void 0 : d.globalProperties) == null ? void 0 : h.utils, n = q(""), a = t;
|
1074
1213
|
return (() => {
|
1075
|
-
var
|
1076
|
-
if ((
|
1077
|
-
const y = e("addButton", (
|
1214
|
+
var u, _, x, m, w;
|
1215
|
+
if ((u = a.slots) != null && u.addButton || (n.value = "div"), (x = (_ = a.slots) == null ? void 0 : _.addButton) != null && x.includes("<")) {
|
1216
|
+
const y = e("addButton", (m = a.slots) == null ? void 0 : m.addButton, [
|
1078
1217
|
"IconPlus"
|
1079
1218
|
]);
|
1080
1219
|
n.value = y;
|
1081
1220
|
} else
|
1082
|
-
n.value = (
|
1083
|
-
})(), (
|
1221
|
+
n.value = (w = a.slots) == null ? void 0 : w.addButton;
|
1222
|
+
})(), (u, _) => n.value ? (o(), k(O(n.value), {
|
1084
1223
|
key: 0,
|
1085
|
-
IconPlus:
|
1224
|
+
IconPlus: B
|
1086
1225
|
})) : v("", !0);
|
1087
1226
|
}
|
1088
|
-
},
|
1227
|
+
}, _n = {
|
1089
1228
|
key: 0,
|
1090
1229
|
class: "px-1 py-3 text-gray-800 font-[500]"
|
1091
|
-
},
|
1230
|
+
}, wn = {
|
1092
1231
|
key: 1,
|
1093
1232
|
class: "px-1 py-3 text-gray-800 font-[700]"
|
1094
|
-
},
|
1233
|
+
}, Cn = {
|
1095
1234
|
__name: "admin-table-totals-list",
|
1096
1235
|
props: {
|
1097
1236
|
columns: { type: Array, default: () => [] },
|
@@ -1099,23 +1238,23 @@ const Zs = /* @__PURE__ */ w(Js, [["render", Ys]]), en = { class: "flex items-ce
|
|
1099
1238
|
} }
|
1100
1239
|
},
|
1101
1240
|
setup(t) {
|
1102
|
-
return (e, n) => (
|
1103
|
-
(
|
1241
|
+
return (e, n) => (o(), i("tr", null, [
|
1242
|
+
(o(!0), i(C, null, V(t.columns, (a) => {
|
1104
1243
|
var s;
|
1105
|
-
return
|
1244
|
+
return o(), i(C, {
|
1106
1245
|
key: a == null ? void 0 : a.name
|
1107
1246
|
}, [
|
1108
|
-
(s = t.agg) != null && s[a == null ? void 0 : a.name] ? (
|
1109
|
-
|
1247
|
+
(s = t.agg) != null && s[a == null ? void 0 : a.name] ? (o(), i("td", _n, [
|
1248
|
+
g(N, {
|
1110
1249
|
column: a,
|
1111
1250
|
row: t.agg
|
1112
1251
|
}, null, 8, ["column", "row"])
|
1113
|
-
])) : (
|
1252
|
+
])) : (o(), i("td", wn))
|
1114
1253
|
], 64);
|
1115
1254
|
}), 128))
|
1116
1255
|
]));
|
1117
1256
|
}
|
1118
|
-
},
|
1257
|
+
}, $n = {}, Tn = {
|
1119
1258
|
xmlns: "http://www.w3.org/2000/svg",
|
1120
1259
|
viewBox: "0 0 24 24",
|
1121
1260
|
fill: "none",
|
@@ -1125,17 +1264,17 @@ const Zs = /* @__PURE__ */ w(Js, [["render", Ys]]), en = { class: "flex items-ce
|
|
1125
1264
|
"stroke-linejoin": "round",
|
1126
1265
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
|
1127
1266
|
};
|
1128
|
-
function
|
1129
|
-
return
|
1130
|
-
|
1267
|
+
function An(t, e, n, a, s, l) {
|
1268
|
+
return o(), i("svg", Tn, e[0] || (e[0] = [
|
1269
|
+
r("path", {
|
1131
1270
|
stroke: "none",
|
1132
1271
|
d: "M0 0h24v24H0z",
|
1133
1272
|
fill: "none"
|
1134
1273
|
}, null, -1),
|
1135
|
-
|
1274
|
+
r("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
1136
1275
|
]));
|
1137
1276
|
}
|
1138
|
-
const
|
1277
|
+
const Sn = /* @__PURE__ */ $($n, [["render", An]]), In = {}, Dn = {
|
1139
1278
|
xmlns: "http://www.w3.org/2000/svg",
|
1140
1279
|
viewBox: "0 0 24 24",
|
1141
1280
|
fill: "none",
|
@@ -1145,18 +1284,18 @@ const cn = /* @__PURE__ */ w(an, [["render", un]]), pn = {}, hn = {
|
|
1145
1284
|
"stroke-linejoin": "round",
|
1146
1285
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
1147
1286
|
};
|
1148
|
-
function
|
1149
|
-
return
|
1150
|
-
|
1287
|
+
function Vn(t, e, n, a, s, l) {
|
1288
|
+
return o(), i("svg", Dn, e[0] || (e[0] = [
|
1289
|
+
r("path", {
|
1151
1290
|
stroke: "none",
|
1152
1291
|
d: "M0 0h24v24H0z",
|
1153
1292
|
fill: "none"
|
1154
1293
|
}, null, -1),
|
1155
|
-
|
1294
|
+
r("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
1156
1295
|
]));
|
1157
1296
|
}
|
1158
|
-
const
|
1159
|
-
components: { IconChevronDown:
|
1297
|
+
const Pn = /* @__PURE__ */ $(In, [["render", Vn]]), jn = ct({
|
1298
|
+
components: { IconChevronDown: Sn, IconCheck: Pn },
|
1160
1299
|
props: {
|
1161
1300
|
total: { type: Number, default: () => 0 },
|
1162
1301
|
pageSize: { type: Number, default: () => 20 },
|
@@ -1225,7 +1364,7 @@ const fn = /* @__PURE__ */ w(pn, [["render", bn]]), gn = lt({
|
|
1225
1364
|
let n = Math.max(t - e, 1), a = n + this.maxPages - 1;
|
1226
1365
|
a > this.pagesCount && (a = this.pagesCount, n = Math.max(a - this.maxPages + 1, 1)), this.pages = Array.from(
|
1227
1366
|
{ length: a - n + 1 },
|
1228
|
-
(s,
|
1367
|
+
(s, l) => n + l
|
1229
1368
|
);
|
1230
1369
|
},
|
1231
1370
|
handleClickPrev() {
|
@@ -1238,72 +1377,72 @@ const fn = /* @__PURE__ */ w(pn, [["render", bn]]), gn = lt({
|
|
1238
1377
|
t < 1 || t > this.pagesCount || this.page === t || (this.page = t, this.$emit("pageChange", this.page, this.pageSizeLocal), this.updatePages(t));
|
1239
1378
|
}
|
1240
1379
|
}
|
1241
|
-
}),
|
1380
|
+
}), Fn = { class: "flex items-center w-full" }, Mn = { class: "flex items-center mx-[8px]" }, Ln = { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, zn = {
|
1242
1381
|
key: 0,
|
1243
1382
|
class: "flex items-center justify-center ml-3 gap-x-5"
|
1244
|
-
},
|
1245
|
-
function
|
1246
|
-
const
|
1247
|
-
return
|
1248
|
-
|
1383
|
+
}, qn = { class: "relative" }, On = { 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%]" }, Bn = ["onClick"];
|
1384
|
+
function Nn(t, e, n, a, s, l) {
|
1385
|
+
const c = b("IconChevronDown"), f = b("IconCheck");
|
1386
|
+
return o(), i("nav", Fn, [
|
1387
|
+
r("button", {
|
1249
1388
|
type: "button",
|
1250
|
-
onClick: e[0] || (e[0] = (...
|
1251
|
-
class:
|
1389
|
+
onClick: e[0] || (e[0] = (...d) => t.handleClickPrev && t.handleClickPrev(...d)),
|
1390
|
+
class: S(["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": t.disablePrevClick }])
|
1252
1391
|
}, [
|
1253
|
-
|
1392
|
+
g(c, {
|
1254
1393
|
height: "16",
|
1255
1394
|
width: "16",
|
1256
1395
|
class: "rotate-90"
|
1257
1396
|
})
|
1258
1397
|
], 2),
|
1259
|
-
|
1260
|
-
|
1398
|
+
r("div", Mn, [
|
1399
|
+
r("span", {
|
1261
1400
|
ref: "currentPage",
|
1262
1401
|
contenteditable: "true",
|
1263
|
-
onBlur: e[1] || (e[1] = (
|
1402
|
+
onBlur: e[1] || (e[1] = (d) => t.handleSetPage(d.target.innerText)),
|
1264
1403
|
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 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:text-white"
|
1265
1404
|
}, T(t.page), 545),
|
1266
|
-
e[4] || (e[4] =
|
1267
|
-
|
1405
|
+
e[4] || (e[4] = r("span", { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, "з", -1)),
|
1406
|
+
r("span", Ln, T(t.pagesCount), 1)
|
1268
1407
|
]),
|
1269
|
-
|
1408
|
+
r("button", {
|
1270
1409
|
type: "button",
|
1271
|
-
onClick: e[2] || (e[2] = (...
|
1272
|
-
class:
|
1410
|
+
onClick: e[2] || (e[2] = (...d) => t.handleClickNext && t.handleClickNext(...d)),
|
1411
|
+
class: S([{ "opacity-50 pointer-events-none": t.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"])
|
1273
1412
|
}, [
|
1274
|
-
|
1413
|
+
g(c, {
|
1275
1414
|
height: "16",
|
1276
1415
|
width: "16",
|
1277
1416
|
class: "-rotate-90"
|
1278
1417
|
})
|
1279
1418
|
], 2),
|
1280
|
-
t.pageSizes.length ? (
|
1281
|
-
|
1282
|
-
|
1283
|
-
(
|
1419
|
+
t.pageSizes.length ? (o(), i("div", zn, [
|
1420
|
+
r("div", qn, [
|
1421
|
+
L(r("div", On, [
|
1422
|
+
(o(!0), i(C, null, V(t.pageSizes, (d) => (o(), i("button", {
|
1284
1423
|
type: "button",
|
1285
1424
|
class: "w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm",
|
1286
|
-
onClick: (
|
1425
|
+
onClick: (h) => t.pageSizeLocal = d
|
1287
1426
|
}, [
|
1288
|
-
P(T(
|
1289
|
-
|
1427
|
+
P(T(d) + " ", 1),
|
1428
|
+
d === t.pageSizeLocal ? (o(), k(f, {
|
1290
1429
|
key: 0,
|
1291
1430
|
width: "14",
|
1292
1431
|
height: "14",
|
1293
1432
|
class: "text-blue-600"
|
1294
1433
|
})) : v("", !0)
|
1295
|
-
], 8,
|
1434
|
+
], 8, Bn))), 256))
|
1296
1435
|
], 512), [
|
1297
|
-
[
|
1436
|
+
[U, t.isDropdownOpen]
|
1298
1437
|
]),
|
1299
|
-
t.pageSizes.length ? (
|
1438
|
+
t.pageSizes.length ? (o(), i("button", {
|
1300
1439
|
key: 0,
|
1301
1440
|
type: "button",
|
1302
1441
|
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",
|
1303
|
-
onClick: e[3] || (e[3] = (
|
1442
|
+
onClick: e[3] || (e[3] = (d) => t.isDropdownOpen = !t.isDropdownOpen)
|
1304
1443
|
}, [
|
1305
1444
|
P(T(t.pageSizeLocal) + " ", 1),
|
1306
|
-
|
1445
|
+
g(c, {
|
1307
1446
|
height: "16",
|
1308
1447
|
width: "16"
|
1309
1448
|
})
|
@@ -1312,26 +1451,27 @@ function wn(t, e, n, a, s, o) {
|
|
1312
1451
|
])) : v("", !0)
|
1313
1452
|
]);
|
1314
1453
|
}
|
1315
|
-
const
|
1454
|
+
const Un = /* @__PURE__ */ $(jn, [["render", Nn]]), En = {
|
1316
1455
|
props: { table: String, title: String },
|
1317
1456
|
components: {
|
1318
|
-
AdminTableControl:
|
1319
|
-
AdminTableExport:
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1457
|
+
AdminTableControl: At,
|
1458
|
+
AdminTableExport: Kt,
|
1459
|
+
AdminTablePrint: as,
|
1460
|
+
AdminTableColumnsHidden: Ts,
|
1461
|
+
AdminTableColumn: gt,
|
1462
|
+
AdminNodata: et,
|
1463
|
+
IconPlus: B,
|
1464
|
+
IconSearch: tt,
|
1465
|
+
AdminTableCardInfo: Ks,
|
1466
|
+
IconOpenCard: st,
|
1467
|
+
AdminComponentIs: N,
|
1468
|
+
AdminTableFilters: en,
|
1469
|
+
AdminTableTabs: ln,
|
1470
|
+
AdminTableCustomFilters: gn,
|
1471
|
+
AdminTableCustomButtons: yn,
|
1472
|
+
AdminCustomButtonAdd: vn,
|
1473
|
+
AdminTableTotalsList: Cn,
|
1474
|
+
AdminTablePagination: Un
|
1335
1475
|
},
|
1336
1476
|
data() {
|
1337
1477
|
return {
|
@@ -1390,7 +1530,7 @@ const $n = /* @__PURE__ */ w(gn, [["render", wn]]), Tn = {
|
|
1390
1530
|
this.tableData = null, await this.getTableData();
|
1391
1531
|
},
|
1392
1532
|
searchValue: {
|
1393
|
-
handler:
|
1533
|
+
handler: kn(async function(t) {
|
1394
1534
|
var e;
|
1395
1535
|
await this.getTableData(), this.$router.push({
|
1396
1536
|
...this.$route,
|
@@ -1428,7 +1568,7 @@ const $n = /* @__PURE__ */ w(gn, [["render", wn]]), Tn = {
|
|
1428
1568
|
},
|
1429
1569
|
columns(t) {
|
1430
1570
|
var e, n, a, s;
|
1431
|
-
this.visibleColumns = t == null ? void 0 : t.map((
|
1571
|
+
this.visibleColumns = t == null ? void 0 : t.map((l) => l == null ? void 0 : l.name), this.initialHiddenColumns === ((e = this.visibleColumns) == null ? void 0 : e.join(",")) && (this.visibleColumns = []), this.$router.replace({
|
1432
1572
|
...this.$route,
|
1433
1573
|
query: {
|
1434
1574
|
...(n = this.$route) == null ? void 0 : n.query,
|
@@ -1439,8 +1579,8 @@ const $n = /* @__PURE__ */ w(gn, [["render", wn]]), Tn = {
|
|
1439
1579
|
},
|
1440
1580
|
methods: {
|
1441
1581
|
async checkUrlMounted() {
|
1442
|
-
var t, e, n, a, s,
|
1443
|
-
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((a = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : a.limit) || 20, this.filters = ((
|
1582
|
+
var t, e, n, a, s, l, c, f, d, h, u, _, x, m, w, y, A, D, M;
|
1583
|
+
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((a = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : a.limit) || 20, this.filters = ((c = decodeURI((l = (s = this.$route) == null ? void 0 : s.query) == null ? void 0 : l.filter)) == null ? void 0 : c.replaceAll("+", " ")) || null, this.filters && (this.onFilters = ((d = (f = this.filters) == null ? void 0 : f.split("=")) == null ? void 0 : d.length) - 1), this.filterState = ((u = (h = this.$route) == null ? void 0 : h.query) == null ? void 0 : u.filterState) || null, this.filterCustom = ((x = (_ = this.$route) == null ? void 0 : _.query) == null ? void 0 : x.custom) || null, this.searchValue = ((w = (m = this.$route) == null ? void 0 : m.query) == null ? void 0 : w.search) || "", this.visibleColumns = ((D = (A = (y = this.$route) == null ? void 0 : y.query) == null ? void 0 : A.columns) == null ? void 0 : D.split(",")) || [], (M = this.$route) != null && M.query.card && (this.isVisibleCardInfo = !0);
|
1444
1584
|
},
|
1445
1585
|
rowWidth(t) {
|
1446
1586
|
var n, a;
|
@@ -1454,9 +1594,9 @@ const $n = /* @__PURE__ */ w(gn, [["render", wn]]), Tn = {
|
|
1454
1594
|
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 = "";
|
1455
1595
|
},
|
1456
1596
|
async getTableData() {
|
1457
|
-
var t, e, n, a, s,
|
1597
|
+
var t, e, n, a, s, l, c, f, d, h, u;
|
1458
1598
|
try {
|
1459
|
-
const { data: _ } = await
|
1599
|
+
const { data: _ } = await F.get(`/api/template/table/${this.table}`), x = await F.get(`/api/table-data/${this.table}`, {
|
1460
1600
|
params: {
|
1461
1601
|
page: this.page,
|
1462
1602
|
search: this.searchValue || null,
|
@@ -1469,18 +1609,18 @@ const $n = /* @__PURE__ */ w(gn, [["render", wn]]), Tn = {
|
|
1469
1609
|
});
|
1470
1610
|
this.tableData = {
|
1471
1611
|
..._,
|
1472
|
-
...(
|
1473
|
-
}, this.initialHiddenColumns = (
|
1474
|
-
var
|
1475
|
-
(
|
1476
|
-
}) : this.visibleColumns = (
|
1612
|
+
...(x == null ? void 0 : x.data) || {}
|
1613
|
+
}, this.initialHiddenColumns = (l = (s = (a = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : a.filter((m) => (m == null ? void 0 : m.hidden) !== !0)) == null ? void 0 : s.map((m) => m == null ? void 0 : m.name)) == null ? void 0 : l.join(","), (c = this.visibleColumns) != null && c.length ? (f = this.tableData) == null || f.columns.forEach((m) => {
|
1614
|
+
var w;
|
1615
|
+
(w = this.visibleColumns) != null && w.includes(m == null ? void 0 : m.name) ? m.hidden = !1 : m.hidden = !0;
|
1616
|
+
}) : this.visibleColumns = (u = (h = (d = this.tableData) == null ? void 0 : d.columns) == null ? void 0 : h.filter((m) => (m == null ? void 0 : m.hidden) !== !0)) == null ? void 0 : u.map((m) => m == null ? void 0 : m.name);
|
1477
1617
|
} catch {
|
1478
1618
|
}
|
1479
1619
|
},
|
1480
1620
|
async getFilters() {
|
1481
1621
|
var t;
|
1482
1622
|
try {
|
1483
|
-
const { data: e } = await
|
1623
|
+
const { data: e } = await F.get(`/api/table-filter/${this.table}`);
|
1484
1624
|
this.filterScheme = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map((n) => ({
|
1485
1625
|
...n,
|
1486
1626
|
label: (n == null ? void 0 : n.label) || (n == null ? void 0 : n.ua)
|
@@ -1528,36 +1668,36 @@ const $n = /* @__PURE__ */ w(gn, [["render", wn]]), Tn = {
|
|
1528
1668
|
];
|
1529
1669
|
}
|
1530
1670
|
}
|
1531
|
-
},
|
1671
|
+
}, Hn = { class: "w-[calc(100vw - 320px)] bg-gray-50" }, Wn = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, Rn = { class: "text-lg font-semibold text-gray-800 dark:text-neutral-200" }, Jn = {
|
1532
1672
|
style: { height: "calc(100vh - 155px)" },
|
1533
1673
|
class: "bg-gray-50 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"
|
1534
|
-
},
|
1674
|
+
}, Gn = { class: "bg-white w-full rounded-xl border p-[20px] pr-0" }, Kn = { class: "flex" }, Qn = { class: "flex gap-[6px] ml-auto" }, Xn = { class: "inline-block w-full align-middle" }, Yn = {
|
1535
1675
|
key: 0,
|
1536
1676
|
class: "relative min-w-full text-[13px] divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"
|
1537
|
-
},
|
1677
|
+
}, Zn = { 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" }, er = { class: "right-0" }, tr = {
|
1538
1678
|
key: 0,
|
1539
1679
|
class: "w-[70px] sticky right-0 top-0"
|
1540
|
-
},
|
1680
|
+
}, sr = { class: "divide-y divide-gray-200 z-[1] relative" }, nr = ["onClick"], rr = ["onClick"], lr = { class: "p-[10px] flex justify-start items-center w-full" }, or = { class: "w-[200px] md:inline-flex hidden" }, ar = { class: "text-sm text-gray-600 dark:text-neutral-400" }, ir = { class: "font-semibold text-gray-800 dark:text-neutral-200" }, dr = { key: 0 }, ur = {
|
1541
1681
|
key: 0,
|
1542
1682
|
class: "font-semibold text-gray-800 dark:text-neutral-200"
|
1543
1683
|
};
|
1544
|
-
function
|
1545
|
-
var
|
1546
|
-
const
|
1547
|
-
return
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
(R = (
|
1684
|
+
function cr(t, e, n, a, s, l) {
|
1685
|
+
var W, R, J, G, K, Q, X, Y, Z, ee, te, se, ne, re, le, oe, ae, ie, de, ue, ce, pe, be, he, fe, me, ge, xe, ye, ke;
|
1686
|
+
const c = b("AdminCustomButtonAdd"), f = b("IconPlus"), d = b("router-link"), h = b("AdminTableTabs"), u = b("IconSearch"), _ = b("VsText"), x = b("AdminTableCustomButtons"), m = b("AdminTableCustomFilters"), w = b("AdminTableColumnsHidden"), y = b("AdminTablePrint"), A = b("AdminTableExport"), D = b("AdminTableFilters"), M = b("IconOpenCard"), E = b("AdminTableColumn"), H = b("AdminComponentIs"), Be = b("AdminTableControl"), Ne = b("AdminTableTotalsList"), Ue = b("AdminNodata"), Ee = b("AdminTablePagination"), He = b("AdminTableCardInfo");
|
1687
|
+
return o(), i("div", Hn, [
|
1688
|
+
r("div", Wn, [
|
1689
|
+
r("h2", Rn, T(n.title), 1),
|
1690
|
+
l.isForm ? (o(), i(C, { key: 0 }, [
|
1691
|
+
(R = (W = s.tableData) == null ? void 0 : W.slots) != null && R.addButton ? (o(), k(c, {
|
1552
1692
|
key: 0,
|
1553
|
-
slots: (
|
1554
|
-
}, null, 8, ["slots"])) : (
|
1693
|
+
slots: (J = s.tableData) == null ? void 0 : J.slots
|
1694
|
+
}, null, 8, ["slots"])) : (o(), k(d, {
|
1555
1695
|
key: 1,
|
1556
|
-
to: `/add?table=${(
|
1696
|
+
to: `/add?table=${(K = (G = t.$route) == null ? void 0 : G.params) == null ? void 0 : K.catchAll}`,
|
1557
1697
|
class: "inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"
|
1558
1698
|
}, {
|
1559
|
-
default:
|
1560
|
-
|
1699
|
+
default: I(() => [
|
1700
|
+
g(f, {
|
1561
1701
|
height: "16",
|
1562
1702
|
width: "16"
|
1563
1703
|
}),
|
@@ -1567,206 +1707,210 @@ function Gn(t, e, n, a, s, o) {
|
|
1567
1707
|
}, 8, ["to"]))
|
1568
1708
|
], 64)) : v("", !0)
|
1569
1709
|
]),
|
1570
|
-
|
1571
|
-
|
1572
|
-
(
|
1710
|
+
r("div", Jn, [
|
1711
|
+
r("div", Gn, [
|
1712
|
+
(X = (Q = s.tableData) == null ? void 0 : Q.filterState) != null && X.length ? (o(), k(h, {
|
1573
1713
|
key: 0,
|
1574
|
-
tabsList: (
|
1714
|
+
tabsList: (Y = s.tableData) == null ? void 0 : Y.filterState,
|
1575
1715
|
filterState: s.filterState,
|
1576
|
-
"onUpdate:filterState": e[0] || (e[0] = (
|
1716
|
+
"onUpdate:filterState": e[0] || (e[0] = (p) => s.filterState = p)
|
1577
1717
|
}, null, 8, ["tabsList", "filterState"])) : v("", !0),
|
1578
|
-
|
1579
|
-
|
1580
|
-
class:
|
1718
|
+
r("div", Kn, [
|
1719
|
+
r("div", {
|
1720
|
+
class: S([s.isVisibleCardInfo ? "w-[calc(100%-360px)]" : "w-full"])
|
1581
1721
|
}, [
|
1582
|
-
|
1583
|
-
class:
|
1722
|
+
r("div", {
|
1723
|
+
class: S(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative", { "pr-[20px]": !s.isVisibleCardInfo }])
|
1584
1724
|
}, [
|
1585
|
-
|
1725
|
+
g(u, {
|
1586
1726
|
height: "14",
|
1587
1727
|
width: "14",
|
1588
1728
|
class: "absolute top-[10px] left-[14px] text-gray-500 z-[1]"
|
1589
1729
|
}),
|
1590
|
-
|
1730
|
+
g(_, {
|
1591
1731
|
modelValue: s.searchValue,
|
1592
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
1732
|
+
"onUpdate:modelValue": e[1] || (e[1] = (p) => s.searchValue = p),
|
1593
1733
|
placeholder: "Пошук...",
|
1594
1734
|
clearable: !0,
|
1595
1735
|
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"
|
1596
1736
|
}, null, 8, ["modelValue"]),
|
1597
|
-
|
1598
|
-
(
|
1737
|
+
r("div", Qn, [
|
1738
|
+
(Z = s.tableData) != null && Z.slots ? (o(), k(x, {
|
1599
1739
|
key: 0,
|
1600
|
-
slots: (
|
1740
|
+
slots: (ee = s.tableData) == null ? void 0 : ee.slots
|
1601
1741
|
}, null, 8, ["slots"])) : v("", !0),
|
1602
|
-
(
|
1742
|
+
(se = (te = s.tableData) == null ? void 0 : te.filterCustom) != null && se.length ? (o(), k(m, {
|
1603
1743
|
key: 1,
|
1604
|
-
customList: (
|
1744
|
+
customList: (ne = s.tableData) == null ? void 0 : ne.filterCustom,
|
1605
1745
|
filterCustom: s.filterCustom,
|
1606
|
-
"onUpdate:filterCustom": e[2] || (e[2] = (
|
1746
|
+
"onUpdate:filterCustom": e[2] || (e[2] = (p) => s.filterCustom = p)
|
1607
1747
|
}, null, 8, ["customList", "filterCustom"])) : v("", !0),
|
1608
|
-
|
1609
|
-
columns: (
|
1610
|
-
onUpdateColumns: e[3] || (e[3] = (
|
1748
|
+
g(w, {
|
1749
|
+
columns: (re = s.tableData) == null ? void 0 : re.columns,
|
1750
|
+
onUpdateColumns: e[3] || (e[3] = (p) => s.tableData.columns = p)
|
1611
1751
|
}, null, 8, ["columns"]),
|
1612
|
-
(
|
1752
|
+
g(y, {
|
1753
|
+
rows: (le = s.tableData) == null ? void 0 : le.rows,
|
1754
|
+
titleCol: (ae = (oe = l.columns) == null ? void 0 : oe[0]) == null ? void 0 : ae.name
|
1755
|
+
}, null, 8, ["rows", "titleCol"]),
|
1756
|
+
((ie = s.tableData) == null ? void 0 : ie.export) !== !1 ? (o(), k(A, {
|
1613
1757
|
key: 2,
|
1614
1758
|
table: n.table,
|
1615
|
-
columns: (
|
1759
|
+
columns: (de = s.tableData) == null ? void 0 : de.columns,
|
1616
1760
|
page: s.page,
|
1617
1761
|
"filter-state": s.filterState,
|
1618
1762
|
"filter-custom": s.filterCustom,
|
1619
1763
|
filters: s.filters
|
1620
1764
|
}, null, 8, ["table", "columns", "page", "filter-state", "filter-custom", "filters"])) : v("", !0),
|
1621
|
-
(
|
1765
|
+
(ue = s.filterScheme) != null && ue.length ? (o(), k(D, {
|
1622
1766
|
key: 3,
|
1623
1767
|
scheme: s.filterScheme,
|
1624
1768
|
onFilters: s.onFilters,
|
1625
1769
|
table: n.table,
|
1626
|
-
onFilterChange:
|
1770
|
+
onFilterChange: l.filterChange
|
1627
1771
|
}, null, 8, ["scheme", "onFilters", "table", "onFilterChange"])) : v("", !0),
|
1628
|
-
|
1629
|
-
onClick: e[4] || (e[4] = (...
|
1772
|
+
r("button", {
|
1773
|
+
onClick: e[4] || (e[4] = (...p) => l.toggleCardInfo && l.toggleCardInfo(...p)),
|
1630
1774
|
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"
|
1631
1775
|
}, [
|
1632
|
-
|
1633
|
-
class:
|
1776
|
+
g(M, {
|
1777
|
+
class: S({ "rotate-180 duration-300": !s.isVisibleCardInfo })
|
1634
1778
|
}, null, 8, ["class"])
|
1635
1779
|
])
|
1636
1780
|
])
|
1637
1781
|
], 2),
|
1638
|
-
|
1639
|
-
class:
|
1782
|
+
r("div", {
|
1783
|
+
class: S(["flex items-start justify-start w-full space-y-5", { "pr-[20px]": !s.isVisibleCardInfo }])
|
1640
1784
|
}, [
|
1641
|
-
|
1642
|
-
style:
|
1643
|
-
height: (
|
1785
|
+
r("div", {
|
1786
|
+
style: Fe({
|
1787
|
+
height: (pe = (ce = s.tableData) == null ? void 0 : ce.filterState) != null && pe.length ? "calc(100vh - 370px)" : "calc(100vh - 330px)"
|
1644
1788
|
}),
|
1645
1789
|
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"
|
1646
1790
|
}, [
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
(
|
1652
|
-
key:
|
1653
|
-
style:
|
1654
|
-
width:
|
1655
|
-
textAlign:
|
1656
|
-
wordBreak:
|
1791
|
+
r("div", Xn, [
|
1792
|
+
l.isNoData ? (o(), k(Ue, { key: 1 })) : (o(), i("table", Yn, [
|
1793
|
+
r("thead", Zn, [
|
1794
|
+
r("tr", er, [
|
1795
|
+
(o(!0), i(C, null, V(l.columns, (p) => (o(), k(E, {
|
1796
|
+
key: p.name,
|
1797
|
+
style: Fe({
|
1798
|
+
width: l.rowWidth(p == null ? void 0 : p.name),
|
1799
|
+
textAlign: p == null ? void 0 : p.align,
|
1800
|
+
wordBreak: p == null ? void 0 : p.wrap
|
1657
1801
|
}),
|
1658
|
-
data:
|
1802
|
+
data: p,
|
1659
1803
|
activeColumn: s.activeColumn,
|
1660
|
-
onChangeActive:
|
1804
|
+
onChangeActive: l.changeActiveColumn
|
1661
1805
|
}, null, 8, ["style", "data", "activeColumn", "onChangeActive"]))), 128)),
|
1662
|
-
(
|
1663
|
-
(
|
1664
|
-
)) != null &&
|
1806
|
+
(he = (be = l.getActions) == null ? void 0 : be.filter(
|
1807
|
+
(p) => p !== "add" && p !== "view"
|
1808
|
+
)) != null && he.length ? (o(), i("th", tr)) : v("", !0)
|
1665
1809
|
])
|
1666
1810
|
]),
|
1667
|
-
|
1668
|
-
(
|
1669
|
-
var
|
1670
|
-
return
|
1671
|
-
key: (
|
1672
|
-
class:
|
1673
|
-
"bg-gray-50": ((
|
1811
|
+
r("tbody", sr, [
|
1812
|
+
(o(!0), i(C, null, V((fe = s.tableData) == null ? void 0 : fe.rows, (p, We) => {
|
1813
|
+
var ve, _e, we, Ce, $e, Te, Ae, Se, Ie, De, Ve, Pe;
|
1814
|
+
return o(), i("tr", {
|
1815
|
+
key: (p == null ? void 0 : p.id) || We,
|
1816
|
+
class: S({
|
1817
|
+
"bg-gray-50": ((_e = (ve = t.$route) == null ? void 0 : ve.query) == null ? void 0 : _e.card) === (p == null ? void 0 : p.id)
|
1674
1818
|
})
|
1675
1819
|
}, [
|
1676
|
-
|
1677
|
-
class:
|
1678
|
-
(
|
1820
|
+
r("td", {
|
1821
|
+
class: S(["px-1 py-3 text-gray-600 pe-4", [
|
1822
|
+
(we = l.columns[0]) != null && we.align ? `text-${((Ce = l.columns[0]) == null ? void 0 : Ce.align) || "left"}` : ""
|
1679
1823
|
]])
|
1680
1824
|
}, [
|
1681
|
-
|
1682
|
-
onClick: (
|
1683
|
-
|
1825
|
+
r("button", {
|
1826
|
+
onClick: (j) => {
|
1827
|
+
l.pushToCard(p == null ? void 0 : p.id), l.pushToLinkCard(l.columns[0], p);
|
1684
1828
|
},
|
1685
|
-
class:
|
1686
|
-
...
|
1687
|
-
((
|
1829
|
+
class: S(["font-medium", [
|
1830
|
+
...l.getCustomStyles(l.columns[0]),
|
1831
|
+
(($e = this.tableData) == null ? void 0 : $e.card) === !1 ? "" : " text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"
|
1688
1832
|
]])
|
1689
1833
|
}, [
|
1690
|
-
|
1691
|
-
row:
|
1692
|
-
column:
|
1834
|
+
g(H, {
|
1835
|
+
row: p,
|
1836
|
+
column: l.columns[0],
|
1693
1837
|
table: n.table,
|
1694
|
-
onUpdateTable:
|
1838
|
+
onUpdateTable: l.getTableData
|
1695
1839
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1696
|
-
], 10,
|
1840
|
+
], 10, nr)
|
1697
1841
|
], 2),
|
1698
|
-
(
|
1699
|
-
onClick: (
|
1700
|
-
|
1842
|
+
(o(!0), i(C, null, V((Te = l.columns) == null ? void 0 : Te.slice(1), (j) => (o(), i("td", {
|
1843
|
+
onClick: (mr) => {
|
1844
|
+
l.changeActiveCardInfo(p == null ? void 0 : p.id), l.pushToLinkCard(j, p);
|
1701
1845
|
},
|
1702
|
-
class:
|
1703
|
-
key:
|
1846
|
+
class: S(["px-1 py-3 text-gray-600 pe-3", l.getCustomStyles(j)]),
|
1847
|
+
key: j.name
|
1704
1848
|
}, [
|
1705
|
-
|
1706
|
-
row:
|
1707
|
-
column:
|
1849
|
+
g(H, {
|
1850
|
+
row: p,
|
1851
|
+
column: j,
|
1708
1852
|
table: n.table,
|
1709
|
-
onUpdateTable:
|
1853
|
+
onUpdateTable: l.getTableData
|
1710
1854
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1711
|
-
], 10,
|
1712
|
-
(
|
1713
|
-
(
|
1714
|
-
)) != null &&
|
1855
|
+
], 10, rr))), 128)),
|
1856
|
+
(Se = (Ae = l.getActions) == null ? void 0 : Ae.filter(
|
1857
|
+
(j) => j !== "add" && j !== "view"
|
1858
|
+
)) != null && Se.length ? (o(), i("td", {
|
1715
1859
|
key: 0,
|
1716
|
-
class:
|
1717
|
-
"bg-gray-50": ((
|
1718
|
-
"bg-white": ((
|
1860
|
+
class: S(["text-center sticky right-0 w-[80px] px-[10px]", {
|
1861
|
+
"bg-gray-50": ((De = (Ie = t.$route) == null ? void 0 : Ie.query) == null ? void 0 : De.card) === (p == null ? void 0 : p.id),
|
1862
|
+
"bg-white": ((Pe = (Ve = t.$route) == null ? void 0 : Ve.query) == null ? void 0 : Pe.card) !== (p == null ? void 0 : p.id)
|
1719
1863
|
}])
|
1720
1864
|
}, [
|
1721
|
-
|
1722
|
-
actions:
|
1723
|
-
isForm:
|
1724
|
-
item:
|
1865
|
+
g(Be, {
|
1866
|
+
actions: l.getActions,
|
1867
|
+
isForm: l.isForm,
|
1868
|
+
item: p,
|
1725
1869
|
table: n.table,
|
1726
|
-
onUpdateTable:
|
1870
|
+
onUpdateTable: l.getTableData
|
1727
1871
|
}, null, 8, ["actions", "isForm", "item", "table", "onUpdateTable"])
|
1728
1872
|
], 2)) : v("", !0)
|
1729
1873
|
], 2);
|
1730
1874
|
}), 128))
|
1731
1875
|
]),
|
1732
|
-
|
1733
|
-
columns:
|
1734
|
-
agg: (
|
1876
|
+
g(Ne, {
|
1877
|
+
columns: l.columns,
|
1878
|
+
agg: (me = s.tableData) == null ? void 0 : me.agg
|
1735
1879
|
}, null, 8, ["columns", "agg"])
|
1736
1880
|
]))
|
1737
1881
|
])
|
1738
1882
|
], 4)
|
1739
1883
|
], 2),
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
P(T(s.filters || s.searchValue ? "Відображено" : "Об'єктів") + " " + T(((
|
1745
|
-
s.filters || s.searchValue ? (
|
1884
|
+
r("div", lr, [
|
1885
|
+
r("div", or, [
|
1886
|
+
r("p", ar, [
|
1887
|
+
r("span", ir, [
|
1888
|
+
P(T(s.filters || s.searchValue ? "Відображено" : "Об'єктів") + " " + T(((ge = s.tableData) == null ? void 0 : ge.count) || "0 ") + " ", 1),
|
1889
|
+
s.filters || s.searchValue ? (o(), i("span", dr, " з")) : v("", !0)
|
1746
1890
|
]),
|
1747
|
-
s.filters || s.searchValue ? (
|
1891
|
+
s.filters || s.searchValue ? (o(), i("span", ur, T(" " + ((xe = s.tableData) == null ? void 0 : xe.filtered) || 0), 1)) : v("", !0)
|
1748
1892
|
])
|
1749
1893
|
]),
|
1750
|
-
Math.ceil(((
|
1894
|
+
Math.ceil(((ye = s.tableData) == null ? void 0 : ye.filtered) / s.limit) > 1 ? (o(), k(Ee, {
|
1751
1895
|
key: 0,
|
1752
1896
|
class: "justify-end",
|
1753
|
-
"default-page": parseInt(
|
1754
|
-
total: ((
|
1755
|
-
onPageChange:
|
1897
|
+
"default-page": parseInt(l.defaultPage),
|
1898
|
+
total: ((ke = s.tableData) == null ? void 0 : ke.filtered) || 0,
|
1899
|
+
onPageChange: l.handlePageChange,
|
1756
1900
|
pageSize: parseInt(s.limit),
|
1757
1901
|
pageSizes: [10, 20, 50, 100]
|
1758
1902
|
}, null, 8, ["default-page", "total", "onPageChange", "pageSize"])) : v("", !0)
|
1759
1903
|
])
|
1760
1904
|
], 2),
|
1761
|
-
|
1762
|
-
default:
|
1763
|
-
var
|
1905
|
+
g(z, { name: "slide-fade" }, {
|
1906
|
+
default: I(() => {
|
1907
|
+
var p;
|
1764
1908
|
return [
|
1765
|
-
s.isVisibleCardInfo ? (
|
1909
|
+
s.isVisibleCardInfo ? (o(), k(He, {
|
1766
1910
|
key: 0,
|
1767
1911
|
table: n.table,
|
1768
|
-
columns: (
|
1769
|
-
row:
|
1912
|
+
columns: (p = s.tableData) == null ? void 0 : p.columns,
|
1913
|
+
row: l.activeCardRow
|
1770
1914
|
}, null, 8, ["table", "columns", "row"])) : v("", !0)
|
1771
1915
|
];
|
1772
1916
|
}),
|
@@ -1777,8 +1921,8 @@ function Gn(t, e, n, a, s, o) {
|
|
1777
1921
|
])
|
1778
1922
|
]);
|
1779
1923
|
}
|
1780
|
-
const
|
1781
|
-
components: { AdminTable:
|
1924
|
+
const pr = /* @__PURE__ */ $(En, [["render", cr], ["__scopeId", "data-v-87a0d788"]]), br = {
|
1925
|
+
components: { AdminTable: pr },
|
1782
1926
|
data() {
|
1783
1927
|
return {
|
1784
1928
|
table: !1,
|
@@ -1790,13 +1934,13 @@ const Kn = /* @__PURE__ */ w(Tn, [["render", Gn], ["__scopeId", "data-v-5afc3bf5
|
|
1790
1934
|
$route: {
|
1791
1935
|
async handler() {
|
1792
1936
|
var t;
|
1793
|
-
(t =
|
1937
|
+
(t = je) != null && t.value || await this.getMenu(), await this.checkPageType();
|
1794
1938
|
},
|
1795
1939
|
deep: !0
|
1796
1940
|
},
|
1797
1941
|
title(t) {
|
1798
1942
|
var e;
|
1799
|
-
t && (document.title = (((e =
|
1943
|
+
t && (document.title = (((e = nt.value) == null ? void 0 : e.titlePrefix) || "") + t);
|
1800
1944
|
}
|
1801
1945
|
},
|
1802
1946
|
async mounted() {
|
@@ -1811,11 +1955,11 @@ const Kn = /* @__PURE__ */ w(Tn, [["render", Gn], ["__scopeId", "data-v-5afc3bf5
|
|
1811
1955
|
},
|
1812
1956
|
async checkPageType() {
|
1813
1957
|
var a, s;
|
1814
|
-
const t = this.flattenMenu(
|
1958
|
+
const t = this.flattenMenu(je.value);
|
1815
1959
|
t != null && t.length || this.$router.replace("/404");
|
1816
|
-
const e = t == null ? void 0 : t.find((
|
1817
|
-
var
|
1818
|
-
return (
|
1960
|
+
const e = t == null ? void 0 : t.find((l) => {
|
1961
|
+
var c, f;
|
1962
|
+
return (l == null ? void 0 : l.path) == ((f = (c = this.$route) == null ? void 0 : c.params) == null ? void 0 : f.catchAll);
|
1819
1963
|
});
|
1820
1964
|
this.title = e == null ? void 0 : e.ua, e || this.$router.replace("/404"), e != null && e.component && this.$router.replace((s = (a = this.$route) == null ? void 0 : a.params) == null ? void 0 : s.catchAll);
|
1821
1965
|
const n = e == null ? void 0 : e.table;
|
@@ -1824,7 +1968,7 @@ const Kn = /* @__PURE__ */ w(Tn, [["render", Gn], ["__scopeId", "data-v-5afc3bf5
|
|
1824
1968
|
async getInterface() {
|
1825
1969
|
var t, e;
|
1826
1970
|
try {
|
1827
|
-
const { data: n } = await
|
1971
|
+
const { data: n } = await F.get(
|
1828
1972
|
`/api/template/interface/${((e = (t = this.$route) == null ? void 0 : t.params) == null ? void 0 : e.catchAll) || ""}`
|
1829
1973
|
);
|
1830
1974
|
this.interface = n || "";
|
@@ -1833,21 +1977,21 @@ const Kn = /* @__PURE__ */ w(Tn, [["render", Gn], ["__scopeId", "data-v-5afc3bf5
|
|
1833
1977
|
}
|
1834
1978
|
}
|
1835
1979
|
}
|
1836
|
-
},
|
1837
|
-
function
|
1838
|
-
const
|
1839
|
-
return s.table ? (
|
1980
|
+
}, hr = ["innerHTML"];
|
1981
|
+
function fr(t, e, n, a, s, l) {
|
1982
|
+
const c = b("AdminTable");
|
1983
|
+
return s.table ? (o(), k(c, {
|
1840
1984
|
key: 0,
|
1841
1985
|
table: s.table,
|
1842
1986
|
title: s.title
|
1843
|
-
}, null, 8, ["table", "title"])) : (
|
1987
|
+
}, null, 8, ["table", "title"])) : (o(), i("div", {
|
1844
1988
|
key: 1,
|
1845
1989
|
class: "w-full bg-gray-50",
|
1846
1990
|
style: { height: "calc(100vh - 120px)" },
|
1847
1991
|
innerHTML: s.interface
|
1848
|
-
}, null, 8,
|
1992
|
+
}, null, 8, hr));
|
1849
1993
|
}
|
1850
|
-
const
|
1994
|
+
const yr = /* @__PURE__ */ $(br, [["render", fr]]);
|
1851
1995
|
export {
|
1852
|
-
|
1996
|
+
yr as default
|
1853
1997
|
};
|