@opengis/admin 0.1.67 → 0.1.69
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{IconChevronDown-DN0s3TF_.js → IconChevronDown-D29D5cN_.js} +1 -1
- package/dist/add-page-w-DxgCiS.js +97 -0
- package/dist/{admin-interface-DUuz9KgB.js → admin-interface-DA_PeVj7.js} +265 -240
- package/dist/{admin-view-MSa57inW.js → admin-view-DrOVwYHu.js} +198 -188
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +48 -48
- package/dist/{card-page-B1zuuqAR.js → card-page-Pw97vvNR.js} +19 -19
- package/dist/{card-view-Bzt2AvI2.js → card-view-eMucbOjz.js} +1 -1
- package/dist/edit-page-DqEf35J2.js +101 -0
- package/dist/{import-file-B80Ws8by.js → import-file-z-nSvLVJ.js} +255 -244
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/server/plugins/hook.js +11 -44
- package/server/routes/calendar/index.mjs +2 -12
- package/server/routes/calendar/schema.js +22 -0
- package/server/routes/data/controllers/tableData.js +5 -107
- package/server/routes/data/index.mjs +4 -4
- package/server/routes/data/schema.js +49 -2
- package/server/routes/menu/controllers/getMenu.js +3 -1
- package/server/routes/menu/schema.js +0 -0
- package/server/routes/notifications/controllers/readNotifications.js +7 -14
- package/server/routes/notifications/controllers/userNotifications.js +15 -22
- package/server/routes/notifications/index.mjs +5 -30
- package/server/routes/notifications/schema.js +11 -0
- package/server/routes/properties/index.mjs +6 -18
- package/server/routes/properties/schema.js +11 -0
- package/server/routes/templates/scheme.js +9 -0
- package/dist/add-page-Cm4aSGoA.js +0 -92
- package/dist/edit-page-DoY4S7v6.js +0 -103
@@ -1,6 +1,6 @@
|
|
1
|
-
import { _ as g, b as pe, a as
|
2
|
-
import { openBlock as s, createElementBlock as a, createTextVNode as D, toDisplayString as
|
3
|
-
import { I as
|
1
|
+
import { _ as g, b as pe, a as T, c as be, d as fe, e as me, f as ge, I as xe, u as ne } from "./import-file-z-nSvLVJ.js";
|
2
|
+
import { openBlock as s, createElementBlock as a, createTextVNode as D, toDisplayString as $, createCommentVNode as w, createStaticVNode as j, Fragment as C, createElementVNode as l, resolveComponent as d, createVNode as f, withCtx as v, createBlock as k, withModifiers as ye, renderList as I, normalizeClass as A, withDirectives as q, vModelCheckbox as _e, resolveDynamicComponent as ke, Transition as z, renderSlot as ve, vShow as se, normalizeStyle as le } from "vue";
|
3
|
+
import { I as we } from "./IconChevronDown-D29D5cN_.js";
|
4
4
|
const Ce = {
|
5
5
|
data() {
|
6
6
|
return {
|
@@ -73,10 +73,10 @@ const Ce = {
|
|
73
73
|
"stroke-width": "2",
|
74
74
|
"stroke-linecap": "round",
|
75
75
|
"stroke-linejoin": "round"
|
76
|
-
},
|
76
|
+
}, Ie = {
|
77
77
|
key: 0,
|
78
78
|
d: "m7 15 5 5 5-5"
|
79
|
-
},
|
79
|
+
}, Ae = {
|
80
80
|
key: 1,
|
81
81
|
d: "m7 9 5-5 5 5"
|
82
82
|
}, Te = {
|
@@ -91,12 +91,12 @@ function Ve(t, e, r, i, n, o) {
|
|
91
91
|
class: "text-sm text-stone-500 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",
|
92
92
|
onClick: e[0] || (e[0] = (u) => o.handleClickSortBtn(n.currentSort))
|
93
93
|
}, [
|
94
|
-
D(
|
94
|
+
D($(o.label) + " ", 1),
|
95
95
|
(s(), a("svg", Se, [
|
96
|
-
n.currentSort === "asc" || n.currentSort === "" ? (s(), a("path",
|
97
|
-
n.currentSort === "desc" || n.currentSort === "" ? (s(), a("path",
|
96
|
+
n.currentSort === "asc" || n.currentSort === "" ? (s(), a("path", Ie)) : w("", !0),
|
97
|
+
n.currentSort === "desc" || n.currentSort === "" ? (s(), a("path", Ae)) : w("", !0)
|
98
98
|
]))
|
99
|
-
])) : (s(), a("p", Te,
|
99
|
+
])) : (s(), a("p", Te, $(o.label), 1))
|
100
100
|
]);
|
101
101
|
}
|
102
102
|
const De = /* @__PURE__ */ g(Ce, [["render", Ve]]), Fe = {}, Me = {
|
@@ -114,7 +114,7 @@ function je(t, e, r, i, n, o) {
|
|
114
114
|
j('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>', 5)
|
115
115
|
]));
|
116
116
|
}
|
117
|
-
const
|
117
|
+
const qe = /* @__PURE__ */ g(Fe, [["render", je]]), ze = {
|
118
118
|
props: {
|
119
119
|
height: { type: String, default: "16" },
|
120
120
|
width: { type: String, default: "12" },
|
@@ -140,10 +140,10 @@ function Le(t, e, r, i, n, o) {
|
|
140
140
|
]), 8, Pe))
|
141
141
|
], 64);
|
142
142
|
}
|
143
|
-
const Ue = /* @__PURE__ */ g(
|
143
|
+
const Ue = /* @__PURE__ */ g(ze, [["render", Le]]), Oe = {
|
144
144
|
components: {
|
145
145
|
IconMore: pe,
|
146
|
-
IconDelete:
|
146
|
+
IconDelete: qe,
|
147
147
|
IconEdit: Ue
|
148
148
|
},
|
149
149
|
emits: ["updateTable"],
|
@@ -170,7 +170,7 @@ const Ue = /* @__PURE__ */ g(qe, [["render", Le]]), Oe = {
|
|
170
170
|
async getData() {
|
171
171
|
var t;
|
172
172
|
try {
|
173
|
-
const { data: e } = await
|
173
|
+
const { data: e } = await T.get(
|
174
174
|
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
175
175
|
);
|
176
176
|
this.formValue = e;
|
@@ -184,17 +184,22 @@ const Ue = /* @__PURE__ */ g(qe, [["render", Le]]), Oe = {
|
|
184
184
|
async deleteElement() {
|
185
185
|
var t;
|
186
186
|
try {
|
187
|
-
|
187
|
+
const { data: e } = await T.get(
|
188
|
+
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
189
|
+
);
|
190
|
+
await T.delete(`/api/table/${e == null ? void 0 : e.token}`), await this.$notify({
|
188
191
|
title: "Успішно!",
|
189
192
|
message: "Об`єкт успішно видалeно",
|
190
193
|
type: "success"
|
191
|
-
}), await this.$emit("update-table")
|
194
|
+
}), await this.$emit("update-table");
|
192
195
|
} catch {
|
193
196
|
this.$notify({
|
194
197
|
title: "Помилка!",
|
195
198
|
message: "Сталася помилка",
|
196
199
|
type: "error"
|
197
200
|
});
|
201
|
+
} finally {
|
202
|
+
this.isDeleteConfirm = !1;
|
198
203
|
}
|
199
204
|
}
|
200
205
|
}
|
@@ -203,69 +208,70 @@ const Ue = /* @__PURE__ */ g(qe, [["render", Le]]), Oe = {
|
|
203
208
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
204
209
|
}, Re = { class: "p-4" }, Ge = { class: "flex justify-end mt-4 gap-x-3" };
|
205
210
|
function Ze(t, e, r, i, n, o) {
|
206
|
-
const u = d("IconMore"), b = d("IconEdit"),
|
211
|
+
const u = d("IconMore"), b = d("IconEdit"), p = d("router-link"), h = d("IconDelete"), _ = d("VsPopover"), c = d("VsDialog");
|
207
212
|
return s(), a(C, null, [
|
208
213
|
l("div", Ee, [
|
209
|
-
|
214
|
+
f(_, {
|
210
215
|
trigger: "click",
|
211
216
|
placement: "bottom-left"
|
212
217
|
}, {
|
213
|
-
reference:
|
218
|
+
reference: v(() => [
|
214
219
|
l("button", Ne, [
|
215
|
-
|
220
|
+
f(u, {
|
216
221
|
height: "16",
|
217
222
|
width: "16"
|
218
223
|
})
|
219
224
|
])
|
220
225
|
]),
|
221
|
-
default:
|
222
|
-
var
|
226
|
+
default: v(() => {
|
227
|
+
var x, S, y, V, F;
|
223
228
|
return [
|
224
229
|
l("div", He, [
|
225
|
-
(
|
230
|
+
(x = r.actions) != null && x.includes("edit") && r.isForm ? (s(), k(p, {
|
226
231
|
key: 0,
|
227
|
-
to: `/edit?table=${(
|
232
|
+
to: `/edit?table=${(y = (S = t.$route) == null ? void 0 : S.params) == null ? void 0 : y.catchAll}&id=${(V = r.item) == null ? void 0 : V.id}`,
|
228
233
|
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
234
|
}, {
|
230
|
-
default:
|
231
|
-
|
235
|
+
default: v(() => [
|
236
|
+
f(b, { color: "#000" }),
|
232
237
|
e[4] || (e[4] = D(" Редагувати "))
|
233
238
|
]),
|
234
239
|
_: 1
|
235
|
-
}, 8, ["to"])) :
|
236
|
-
r.isForm ? (s(), a("div", We)) :
|
240
|
+
}, 8, ["to"])) : w("", !0),
|
241
|
+
r.isForm ? (s(), a("div", We)) : w("", !0),
|
237
242
|
(F = r.actions) != null && F.includes("del") ? (s(), a("button", {
|
238
243
|
key: 2,
|
239
244
|
onClick: e[0] || (e[0] = ye((...M) => o.openConfirm && o.openConfirm(...M), ["stop"])),
|
240
245
|
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"
|
241
246
|
}, [
|
242
|
-
|
247
|
+
f(h),
|
243
248
|
e[5] || (e[5] = l("span", { class: "text-gray-800" }, "Видалити", -1))
|
244
|
-
])) :
|
249
|
+
])) : w("", !0)
|
245
250
|
])
|
246
251
|
];
|
247
252
|
}),
|
248
253
|
_: 1
|
249
254
|
})
|
250
255
|
]),
|
251
|
-
|
256
|
+
f(c, {
|
252
257
|
visible: n.isDeleteConfirm,
|
253
|
-
"onUpdate:visible": e[3] || (e[3] = (
|
258
|
+
"onUpdate:visible": e[3] || (e[3] = (x) => n.isDeleteConfirm = x),
|
259
|
+
size: "small",
|
254
260
|
title: "Ви впевнені?"
|
255
261
|
}, {
|
256
|
-
default:
|
262
|
+
default: v(() => [
|
257
263
|
l("div", Re, [
|
258
264
|
e[6] || (e[6] = l("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
259
265
|
l("div", Ge, [
|
260
266
|
l("button", {
|
261
267
|
type: "button",
|
262
268
|
class: "inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 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",
|
263
|
-
onClick: e[1] || (e[1] = (
|
269
|
+
onClick: e[1] || (e[1] = (x) => n.isDeleteConfirm = !1)
|
264
270
|
}, " Скасувати "),
|
265
271
|
l("button", {
|
266
272
|
type: "button",
|
267
273
|
class: "inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",
|
268
|
-
onClick: e[2] || (e[2] = (...
|
274
|
+
onClick: e[2] || (e[2] = (...x) => o.deleteElement && o.deleteElement(...x))
|
269
275
|
}, " Так, я впевнена/ий ")
|
270
276
|
])
|
271
277
|
])
|
@@ -316,7 +322,7 @@ function rt(t, e, r, i, n, o) {
|
|
316
322
|
]));
|
317
323
|
}
|
318
324
|
const nt = /* @__PURE__ */ g(et, [["render", rt]]), lt = {
|
319
|
-
components: { IconExport: Ye, IconChevronDown:
|
325
|
+
components: { IconExport: Ye, IconChevronDown: we, IconSuccess: nt },
|
320
326
|
props: {
|
321
327
|
table: String,
|
322
328
|
columns: Array,
|
@@ -369,7 +375,7 @@ const nt = /* @__PURE__ */ g(et, [["render", rt]]), lt = {
|
|
369
375
|
return;
|
370
376
|
}
|
371
377
|
try {
|
372
|
-
const e = await
|
378
|
+
const e = await T.get("/api/export", {
|
373
379
|
params: {
|
374
380
|
table: this.table,
|
375
381
|
format: this.format,
|
@@ -420,7 +426,7 @@ const nt = /* @__PURE__ */ g(et, [["render", rt]]), lt = {
|
|
420
426
|
}, ot = {
|
421
427
|
key: 1,
|
422
428
|
class: "p-4"
|
423
|
-
}, at = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, it = { class: "flex items-center" }, ct = { class: "flex items-center gap-[10px] ml-auto" },
|
429
|
+
}, at = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, it = { class: "flex items-center" }, ct = { class: "flex items-center gap-[10px] ml-auto" }, ut = ["onClick"], dt = {
|
424
430
|
key: 0,
|
425
431
|
class: "block h-[8px] w-[8px] rounded-full bg-blue-500"
|
426
432
|
}, ht = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, pt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, bt = { class: "mt-2 space-y-2" }, ft = ["id", "onChange"], mt = ["for"], gt = {
|
@@ -431,30 +437,30 @@ const nt = /* @__PURE__ */ g(et, [["render", rt]]), lt = {
|
|
431
437
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
432
438
|
};
|
433
439
|
function yt(t, e, r, i, n, o) {
|
434
|
-
const u = d("IconExport"), b = d("IconChevronDown"),
|
440
|
+
const u = d("IconExport"), b = d("IconChevronDown"), p = d("IconSuccess"), h = d("VsCheckbox"), _ = d("VsDialog");
|
435
441
|
return s(), a(C, null, [
|
436
442
|
l("button", {
|
437
443
|
onClick: e[0] || (e[0] = (c) => n.isOpen = !0),
|
438
444
|
class: "py-2 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"
|
439
445
|
}, [
|
440
|
-
|
446
|
+
f(u, {
|
441
447
|
height: "16",
|
442
448
|
width: "16"
|
443
449
|
}),
|
444
450
|
e[7] || (e[7] = D(" Експорт ")),
|
445
|
-
|
451
|
+
f(b, {
|
446
452
|
height: "12",
|
447
453
|
width: "16"
|
448
454
|
})
|
449
455
|
]),
|
450
|
-
|
456
|
+
f(_, {
|
451
457
|
visible: n.isOpen,
|
452
458
|
"onUpdate:visible": e[6] || (e[6] = (c) => n.isOpen = c),
|
453
459
|
title: "Експорт таблиці",
|
454
460
|
size: "small",
|
455
461
|
closeClickBack: !0
|
456
462
|
}, {
|
457
|
-
footer:
|
463
|
+
footer: v(() => [
|
458
464
|
n.isSuccessTemplate ? (s(), a("div", gt, [
|
459
465
|
l("button", {
|
460
466
|
type: "button",
|
@@ -479,9 +485,9 @@ function yt(t, e, r, i, n, o) {
|
|
479
485
|
}, " Завантажити таблицю ")
|
480
486
|
]))
|
481
487
|
]),
|
482
|
-
default:
|
488
|
+
default: v(() => [
|
483
489
|
n.isSuccessTemplate ? (s(), a("div", st, [
|
484
|
-
p
|
490
|
+
f(p, {
|
485
491
|
height: "100",
|
486
492
|
width: "100",
|
487
493
|
class: "text-green-200 mb-[20px]"
|
@@ -492,30 +498,30 @@ function yt(t, e, r, i, n, o) {
|
|
492
498
|
l("div", it, [
|
493
499
|
e[9] || (e[9] = l("h2", { class: "text-sm text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
494
500
|
l("div", ct, [
|
495
|
-
(s(!0), a(C, null,
|
501
|
+
(s(!0), a(C, null, I(n.actions, (c) => (s(), a("button", {
|
496
502
|
key: c == null ? void 0 : c.name,
|
497
503
|
onClick: c == null ? void 0 : c.function,
|
498
504
|
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"
|
499
505
|
}, [
|
500
506
|
l("span", {
|
501
|
-
class:
|
507
|
+
class: A(["h-[14px] w-[14px] border rounded-full flex items-center justify-center", { "border-blue-500": (c == null ? void 0 : c.name) === n.activeAction }])
|
502
508
|
}, [
|
503
|
-
(c == null ? void 0 : c.name) === n.activeAction ? (s(), a("span",
|
509
|
+
(c == null ? void 0 : c.name) === n.activeAction ? (s(), a("span", dt)) : w("", !0)
|
504
510
|
], 2),
|
505
|
-
D(" " +
|
506
|
-
], 8,
|
511
|
+
D(" " + $(c == null ? void 0 : c.label), 1)
|
512
|
+
], 8, ut))), 128))
|
507
513
|
])
|
508
514
|
]),
|
509
515
|
l("div", ht, [
|
510
|
-
(s(!0), a(C, null,
|
516
|
+
(s(!0), a(C, null, I(r.columns, (c, x) => (s(), a("div", {
|
511
517
|
class: "flex items-center",
|
512
|
-
key:
|
518
|
+
key: x,
|
513
519
|
style: { width: "calc((100% - 10px) / 2)" }
|
514
520
|
}, [
|
515
|
-
|
521
|
+
f(h, {
|
516
522
|
class: "[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",
|
517
523
|
modelValue: n.cols,
|
518
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
524
|
+
"onUpdate:modelValue": e[1] || (e[1] = (S) => n.cols = S),
|
519
525
|
value: c == null ? void 0 : c.name,
|
520
526
|
label: c == null ? void 0 : c.ua
|
521
527
|
}, null, 8, ["modelValue", "value", "label"])
|
@@ -525,21 +531,21 @@ function yt(t, e, r, i, n, o) {
|
|
525
531
|
l("div", pt, [
|
526
532
|
e[10] || (e[10] = l("h2", { class: "text-sm text-gray-500" }, "Виберіть формат таблиці:", -1)),
|
527
533
|
l("div", bt, [
|
528
|
-
(s(!0), a(C, null,
|
534
|
+
(s(!0), a(C, null, I(n.tableFormats, (c, x) => (s(), a("div", {
|
529
535
|
class: "flex items-center",
|
530
|
-
key:
|
536
|
+
key: x
|
531
537
|
}, [
|
532
538
|
l("input", {
|
533
539
|
type: "radio",
|
534
540
|
name: "hs-pro-duecmfm",
|
535
541
|
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",
|
536
542
|
id: c,
|
537
|
-
onChange: (
|
543
|
+
onChange: (S) => o.selectFormat(c)
|
538
544
|
}, null, 40, ft),
|
539
545
|
l("label", {
|
540
546
|
for: c,
|
541
547
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
542
|
-
}, " Формат " +
|
548
|
+
}, " Формат " + $(c), 9, mt)
|
543
549
|
]))), 128))
|
544
550
|
])
|
545
551
|
])
|
@@ -549,7 +555,7 @@ function yt(t, e, r, i, n, o) {
|
|
549
555
|
}, 8, ["visible"])
|
550
556
|
], 64);
|
551
557
|
}
|
552
|
-
const _t = /* @__PURE__ */ g(lt, [["render", yt]]), kt = {},
|
558
|
+
const _t = /* @__PURE__ */ g(lt, [["render", yt]]), kt = {}, vt = {
|
553
559
|
xmlns: "http://www.w3.org/2000/svg",
|
554
560
|
viewBox: "0 0 24 24",
|
555
561
|
fill: "none",
|
@@ -559,12 +565,12 @@ const _t = /* @__PURE__ */ g(lt, [["render", yt]]), kt = {}, wt = {
|
|
559
565
|
"stroke-linejoin": "round",
|
560
566
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
561
567
|
};
|
562
|
-
function
|
563
|
-
return s(), a("svg",
|
568
|
+
function wt(t, e, r, i, n, o) {
|
569
|
+
return s(), a("svg", vt, e[0] || (e[0] = [
|
564
570
|
j('<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)
|
565
571
|
]));
|
566
572
|
}
|
567
|
-
const Ct = /* @__PURE__ */ g(kt, [["render",
|
573
|
+
const Ct = /* @__PURE__ */ g(kt, [["render", wt]]), $t = {
|
568
574
|
props: { column: Object },
|
569
575
|
emits: ["update-column"],
|
570
576
|
data() {
|
@@ -582,20 +588,20 @@ const Ct = /* @__PURE__ */ g(kt, [["render", vt]]), $t = {
|
|
582
588
|
((t = this.column) == null ? void 0 : t.hidden) !== !0 && (this.value = !0);
|
583
589
|
}
|
584
590
|
}, St = { class: "flex w-full gap-[8px] items-centr" };
|
585
|
-
function
|
591
|
+
function It(t, e, r, i, n, o) {
|
586
592
|
var u, b;
|
587
593
|
return s(), a("label", St, [
|
588
|
-
|
589
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
594
|
+
q(l("input", {
|
595
|
+
"onUpdate:modelValue": e[0] || (e[0] = (p) => n.value = p),
|
590
596
|
type: "checkbox"
|
591
597
|
}, null, 512), [
|
592
598
|
[_e, n.value]
|
593
599
|
]),
|
594
|
-
D(" " +
|
600
|
+
D(" " + $(((u = r.column) == null ? void 0 : u.ua) || ((b = r.column) == null ? void 0 : b.title)), 1)
|
595
601
|
]);
|
596
602
|
}
|
597
|
-
const
|
598
|
-
components: { IconColumns: Ct, AdminTableColumnsHiddenItem:
|
603
|
+
const At = /* @__PURE__ */ g($t, [["render", It]]), Tt = {
|
604
|
+
components: { IconColumns: Ct, AdminTableColumnsHiddenItem: At },
|
599
605
|
emits: ["update-columns"],
|
600
606
|
props: { columns: Array },
|
601
607
|
methods: {
|
@@ -606,26 +612,26 @@ const It = /* @__PURE__ */ g($t, [["render", At]]), Tt = {
|
|
606
612
|
}
|
607
613
|
}, Vt = { class: "py-2 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" }, Dt = { class: "py-[10px] px-[10px] w-[260px]" }, Ft = { class: "flex flex-col gap-[3px] max-h-[400px] w-full 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" };
|
608
614
|
function Mt(t, e, r, i, n, o) {
|
609
|
-
const u = d("IconColumns"), b = d("AdminTableColumnsHiddenItem"),
|
610
|
-
return s(),
|
615
|
+
const u = d("IconColumns"), b = d("AdminTableColumnsHiddenItem"), p = d("VsPopover");
|
616
|
+
return s(), k(p, {
|
611
617
|
trigger: "click",
|
612
618
|
placement: "bottom"
|
613
619
|
}, {
|
614
|
-
reference:
|
620
|
+
reference: v(() => [
|
615
621
|
l("button", Vt, [
|
616
|
-
|
622
|
+
f(u, {
|
617
623
|
height: "20",
|
618
624
|
width: "16"
|
619
625
|
})
|
620
626
|
])
|
621
627
|
]),
|
622
|
-
default:
|
628
|
+
default: v(() => [
|
623
629
|
l("div", Dt, [
|
624
630
|
e[0] || (e[0] = l("h2", { class: "text-sm mb-[8px]" }, "Оберіть колонки, щоб приховати", -1)),
|
625
631
|
l("ul", Ft, [
|
626
|
-
(s(!0), a(C, null,
|
627
|
-
|
628
|
-
column:
|
632
|
+
(s(!0), a(C, null, I(r.columns, (h, _) => (s(), a("li", { key: _ }, [
|
633
|
+
f(b, {
|
634
|
+
column: h,
|
629
635
|
onUpdateColumn: o.updateColumn
|
630
636
|
}, null, 8, ["column", "onUpdateColumn"])
|
631
637
|
]))), 128))
|
@@ -635,14 +641,14 @@ function Mt(t, e, r, i, n, o) {
|
|
635
641
|
_: 1
|
636
642
|
});
|
637
643
|
}
|
638
|
-
const jt = /* @__PURE__ */ g(Tt, [["render", Mt]]),
|
644
|
+
const jt = /* @__PURE__ */ g(Tt, [["render", Mt]]), qt = {}, zt = {
|
639
645
|
class: "hidden sm:block shrink-0 size-3",
|
640
646
|
xmlns: "http://www.w3.org/2000/svg",
|
641
647
|
fill: "currentColor",
|
642
648
|
viewBox: "0 0 16 16"
|
643
649
|
};
|
644
650
|
function Bt(t, e, r, i, n, o) {
|
645
|
-
return s(), a("svg",
|
651
|
+
return s(), a("svg", zt, e[0] || (e[0] = [
|
646
652
|
l("path", {
|
647
653
|
"fill-rule": "evenodd",
|
648
654
|
"clip-rule": "evenodd",
|
@@ -650,7 +656,7 @@ function Bt(t, e, r, i, n, o) {
|
|
650
656
|
}, null, -1)
|
651
657
|
]));
|
652
658
|
}
|
653
|
-
const oe = /* @__PURE__ */ g(
|
659
|
+
const oe = /* @__PURE__ */ g(qt, [["render", Bt]]), Pt = {}, Lt = { class: "vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden" };
|
654
660
|
function Ut(t, e, r, i, n, o) {
|
655
661
|
return s(), a("div", Lt, e[0] || (e[0] = [
|
656
662
|
j('<div><div class="p-5 min-h-[500px] flex flex-col justify-center items-center text-center"><svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg><div class="max-w-sm mx-auto mt-6"><p class="font-medium text-gray-800 dark:text-neutral-200"> Дані для відображення відсутні </p><p class="mt-2 text-sm text-gray-500 dark:text-neutral-500"> Змініть параметри пошуку або спробуйте пізніше </p></div></div></div>', 1)
|
@@ -660,17 +666,17 @@ const Ot = /* @__PURE__ */ g(Pt, [["render", Ut]]), Et = {
|
|
660
666
|
props: { row: Object, column: Object, table: String }
|
661
667
|
};
|
662
668
|
function Nt(t, e, r, i, n, o) {
|
663
|
-
var u, b,
|
664
|
-
return s(),
|
665
|
-
((u = r.column) == null ? void 0 : u.format) === "custom" ? (b = r.column) == null ? void 0 : b.component : t.$componentsConfig[`table-format-${((
|
669
|
+
var u, b, p, h, _, c, x, S;
|
670
|
+
return s(), k(ke(
|
671
|
+
((u = r.column) == null ? void 0 : u.format) === "custom" ? (b = r.column) == null ? void 0 : b.component : t.$componentsConfig[`table-format-${((h = (p = r.column) == null ? void 0 : p.format) == null ? void 0 : h.toLowerCase()) || "text"}`]
|
666
672
|
), {
|
667
|
-
onUpdateTable: e[0] || (e[0] = (
|
668
|
-
name: (
|
673
|
+
onUpdateTable: e[0] || (e[0] = (y) => t.$emit("update-table")),
|
674
|
+
name: (_ = r.column) == null ? void 0 : _.name,
|
669
675
|
data: r.row,
|
670
|
-
value: (
|
676
|
+
value: (x = r.row) == null ? void 0 : x[(c = r.column) == null ? void 0 : c.name],
|
671
677
|
table: r.table,
|
672
678
|
column: r.column,
|
673
|
-
edit: (
|
679
|
+
edit: (S = r.column) == null ? void 0 : S.edit
|
674
680
|
}, null, 40, ["name", "data", "value", "table", "column", "edit"]);
|
675
681
|
}
|
676
682
|
const ae = /* @__PURE__ */ g(Et, [["render", Nt]]), Ht = {}, Wt = {
|
@@ -707,25 +713,25 @@ function Yt(t, e, r, i, n, o) {
|
|
707
713
|
l("div", Jt, [
|
708
714
|
l("div", Kt, [
|
709
715
|
l("div", {
|
710
|
-
onClick: e[0] || (e[0] = (
|
716
|
+
onClick: e[0] || (e[0] = (p) => n.expanded = !n.expanded),
|
711
717
|
class: "grow rounded-md cursor-pointer"
|
712
718
|
}, [
|
713
|
-
l("span", Qt,
|
719
|
+
l("span", Qt, $(r.title), 1)
|
714
720
|
]),
|
715
721
|
l("button", {
|
716
722
|
class: "size-6 flex justify-center items-center hover:bg-gray-100 rounded-md",
|
717
|
-
onClick: e[1] || (e[1] = (
|
723
|
+
onClick: e[1] || (e[1] = (p) => n.expanded = !n.expanded)
|
718
724
|
}, [
|
719
|
-
n.expanded ? (s(),
|
725
|
+
n.expanded ? (s(), k(b, {
|
720
726
|
key: 1,
|
721
727
|
width: "14"
|
722
|
-
})) : (s(),
|
728
|
+
})) : (s(), k(u, { key: 0 }))
|
723
729
|
])
|
724
730
|
]),
|
725
|
-
|
726
|
-
default:
|
727
|
-
|
728
|
-
|
731
|
+
f(z, { name: "fade" }, {
|
732
|
+
default: v(() => [
|
733
|
+
q(l("div", Xt, [
|
734
|
+
ve(t.$slots, "default", {}, void 0, !0)
|
729
735
|
], 512), [
|
730
736
|
[se, n.expanded]
|
731
737
|
])
|
@@ -752,31 +758,31 @@ const er = /* @__PURE__ */ g(Zt, [["render", Yt], ["__scopeId", "data-v-4139bc00
|
|
752
758
|
}, nr = {
|
753
759
|
class: "border-l",
|
754
760
|
style: { height: "calc(100vh - 360px)" }
|
755
|
-
}, lr = { class: "flex items-center justify-between py-1 gap-x-4" }, sr = { class: "col-span-1" }, or = { class: "inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500" }, ar = { class: "col-span-2" }, ir = { class: "font-medium text-[13px] text-gray-800 dark:text-neutral-200" }, cr = { class: "table-info-card" },
|
756
|
-
function
|
757
|
-
var
|
758
|
-
const u = d("AdminComponentIs"), b = d("AdminTree"),
|
761
|
+
}, lr = { class: "flex items-center justify-between py-1 gap-x-4" }, sr = { class: "col-span-1" }, or = { class: "inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500" }, ar = { class: "col-span-2" }, ir = { class: "font-medium text-[13px] text-gray-800 dark:text-neutral-200" }, cr = { class: "table-info-card" }, ur = { class: "table-info-card" };
|
762
|
+
function dr(t, e, r, i, n, o) {
|
763
|
+
var x, S;
|
764
|
+
const u = d("AdminComponentIs"), b = d("AdminTree"), p = d("VsWidgetMap"), h = d("VsNoData"), _ = d("VsWidgetComments"), c = d("VsWidgetFileList");
|
759
765
|
return s(), a("div", rr, [
|
760
766
|
e[0] || (e[0] = l("div", { class: "p-[10px] pl-[18px] pb-[18px] border-b" }, [
|
761
767
|
l("h2", { class: "text-sm font-medium" }, "Інформація про об'єкт")
|
762
768
|
], -1)),
|
763
769
|
l("div", nr, [
|
764
|
-
(
|
765
|
-
r.row ? (s(),
|
770
|
+
(S = (x = t.$route) == null ? void 0 : x.query) != null && S.card ? (s(), a(C, { key: 0 }, [
|
771
|
+
r.row ? (s(), k(b, {
|
766
772
|
key: 0,
|
767
773
|
title: "Основна інформація",
|
768
774
|
class: "border-b p-[10px] py-[16px]"
|
769
775
|
}, {
|
770
|
-
default:
|
771
|
-
(s(!0), a(C, null,
|
776
|
+
default: v(() => [
|
777
|
+
(s(!0), a(C, null, I(r.columns, (y) => (s(), a("dl", lr, [
|
772
778
|
l("dt", sr, [
|
773
|
-
l("p", or,
|
779
|
+
l("p", or, $((y == null ? void 0 : y.ua) || (y == null ? void 0 : y.title)) + ": ", 1)
|
774
780
|
]),
|
775
781
|
l("dd", ar, [
|
776
782
|
l("p", ir, [
|
777
|
-
|
783
|
+
f(u, {
|
778
784
|
row: r.row,
|
779
|
-
column:
|
785
|
+
column: y,
|
780
786
|
table: r.table
|
781
787
|
}, null, 8, ["row", "column", "table"])
|
782
788
|
])
|
@@ -784,19 +790,19 @@ function ur(t, e, r, i, n, o) {
|
|
784
790
|
]))), 256))
|
785
791
|
]),
|
786
792
|
_: 1
|
787
|
-
})) :
|
788
|
-
|
793
|
+
})) : w("", !0),
|
794
|
+
f(b, {
|
789
795
|
title: "Карта",
|
790
796
|
class: "border-b p-[10px] py-[16px]"
|
791
797
|
}, {
|
792
|
-
default:
|
793
|
-
var
|
798
|
+
default: v(() => {
|
799
|
+
var y, V;
|
794
800
|
return [
|
795
|
-
(
|
801
|
+
(y = r.row) != null && y.geom ? (s(), k(p, {
|
796
802
|
key: 0,
|
797
|
-
geometry: (
|
803
|
+
geometry: (V = r.row) == null ? void 0 : V.geom,
|
798
804
|
zoom: 14
|
799
|
-
}, null, 8, ["geometry"])) : (s(),
|
805
|
+
}, null, 8, ["geometry"])) : (s(), k(h, {
|
800
806
|
key: 1,
|
801
807
|
title: "У об'єкта відсутня геометрія",
|
802
808
|
text: "",
|
@@ -806,46 +812,46 @@ function ur(t, e, r, i, n, o) {
|
|
806
812
|
}),
|
807
813
|
_: 1
|
808
814
|
}),
|
809
|
-
|
815
|
+
f(b, {
|
810
816
|
title: "Коментарі",
|
811
817
|
class: "border-b p-[10px] py-[16px]"
|
812
818
|
}, {
|
813
|
-
default:
|
814
|
-
var
|
819
|
+
default: v(() => {
|
820
|
+
var y;
|
815
821
|
return [
|
816
822
|
l("div", cr, [
|
817
|
-
|
818
|
-
id: (
|
823
|
+
f(_, {
|
824
|
+
id: (y = r.row) == null ? void 0 : y.id
|
819
825
|
}, null, 8, ["id"])
|
820
826
|
])
|
821
827
|
];
|
822
828
|
}),
|
823
829
|
_: 1
|
824
830
|
}),
|
825
|
-
|
831
|
+
f(b, {
|
826
832
|
title: "Файли",
|
827
833
|
class: "border-b p-[10px] py-[16px]"
|
828
834
|
}, {
|
829
|
-
default:
|
830
|
-
var
|
835
|
+
default: v(() => {
|
836
|
+
var y;
|
831
837
|
return [
|
832
|
-
l("div",
|
833
|
-
|
834
|
-
id: (
|
838
|
+
l("div", ur, [
|
839
|
+
f(c, {
|
840
|
+
id: (y = r.row) == null ? void 0 : y.id
|
835
841
|
}, null, 8, ["id"])
|
836
842
|
])
|
837
843
|
];
|
838
844
|
}),
|
839
845
|
_: 1
|
840
846
|
})
|
841
|
-
], 64)) : (s(),
|
847
|
+
], 64)) : (s(), k(h, {
|
842
848
|
key: 1,
|
843
849
|
text: "Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"
|
844
850
|
}))
|
845
851
|
])
|
846
852
|
]);
|
847
853
|
}
|
848
|
-
const hr = /* @__PURE__ */ g(tr, [["render",
|
854
|
+
const hr = /* @__PURE__ */ g(tr, [["render", dr]]), pr = {}, br = {
|
849
855
|
class: "hidden xl:block shrink-0 size-4",
|
850
856
|
xmlns: "http://www.w3.org/2000/svg",
|
851
857
|
viewBox: "0 0 24 24",
|
@@ -886,6 +892,7 @@ function yr(t, e, r, i, n, o) {
|
|
886
892
|
]));
|
887
893
|
}
|
888
894
|
const _r = /* @__PURE__ */ g(gr, [["render", yr]]), kr = {
|
895
|
+
emits: ["filterChange"],
|
889
896
|
props: { scheme: { type: Object }, onFilters: { type: Number } },
|
890
897
|
components: { IconFilter: _r },
|
891
898
|
data() {
|
@@ -898,35 +905,35 @@ const _r = /* @__PURE__ */ g(gr, [["render", yr]]), kr = {
|
|
898
905
|
this.isFilters && t.classList.contains("filter-container") && (this.isFilters = !1);
|
899
906
|
}
|
900
907
|
}
|
901
|
-
},
|
908
|
+
}, vr = {
|
902
909
|
key: 0,
|
903
910
|
class: "font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"
|
904
|
-
},
|
911
|
+
}, wr = { class: "filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-white [&::-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" };
|
905
912
|
function Cr(t, e, r, i, n, o) {
|
906
913
|
const u = d("IconFilter"), b = d("VsFilter");
|
907
914
|
return s(), a(C, null, [
|
908
915
|
l("button", {
|
909
|
-
onClick: e[0] || (e[0] = (
|
916
|
+
onClick: e[0] || (e[0] = (p) => n.isFilters = !n.isFilters),
|
910
917
|
class: "py-2 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"
|
911
918
|
}, [
|
912
|
-
|
919
|
+
f(u, {
|
913
920
|
height: "16",
|
914
921
|
width: "16"
|
915
922
|
}),
|
916
923
|
e[4] || (e[4] = D(" Фільтри ")),
|
917
|
-
r.onFilters ? (s(), a("span",
|
924
|
+
r.onFilters ? (s(), a("span", vr, $(r.onFilters), 1)) : w("", !0)
|
918
925
|
]),
|
919
|
-
|
920
|
-
default:
|
921
|
-
var
|
926
|
+
f(z, { name: "fade" }, {
|
927
|
+
default: v(() => {
|
928
|
+
var p;
|
922
929
|
return [
|
923
|
-
|
924
|
-
onClick: e[3] || (e[3] = (...
|
930
|
+
q(l("div", {
|
931
|
+
onClick: e[3] || (e[3] = (...h) => o.closeFilter && o.closeFilter(...h)),
|
925
932
|
style: { height: "100vh" },
|
926
933
|
class: "fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.5)]"
|
927
934
|
}, [
|
928
|
-
l("div",
|
929
|
-
(
|
935
|
+
l("div", wr, [
|
936
|
+
(p = r.scheme) != null && p.length ? (s(), k(b, {
|
930
937
|
key: 0,
|
931
938
|
ref: "filter",
|
932
939
|
scheme: r.scheme,
|
@@ -934,10 +941,10 @@ function Cr(t, e, r, i, n, o) {
|
|
934
941
|
"apply-vue-router": "",
|
935
942
|
history: "",
|
936
943
|
name: "filter",
|
937
|
-
onFilterChange: e[1] || (e[1] = (
|
944
|
+
onFilterChange: e[1] || (e[1] = (h) => t.$emit("filterChange", h)),
|
938
945
|
closeFilterBtn: !0,
|
939
|
-
onFilterClose: e[2] || (e[2] = (
|
940
|
-
}, null, 8, ["scheme"])) :
|
946
|
+
onFilterClose: e[2] || (e[2] = (h) => n.isFilters = !1)
|
947
|
+
}, null, 8, ["scheme"])) : w("", !0)
|
941
948
|
])
|
942
949
|
], 512), [
|
943
950
|
[se, n.isFilters]
|
@@ -950,20 +957,20 @@ function Cr(t, e, r, i, n, o) {
|
|
950
957
|
}
|
951
958
|
const $r = /* @__PURE__ */ g(kr, [["render", Cr]]), Sr = {
|
952
959
|
props: { tabsList: { type: Array, default: () => [] }, filterState: String }
|
953
|
-
},
|
960
|
+
}, Ir = {
|
954
961
|
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",
|
955
962
|
"aria-label": "Tabs",
|
956
963
|
role: "tablist",
|
957
964
|
"aria-orientation": "horizontal"
|
958
|
-
},
|
965
|
+
}, Ar = ["onClick"];
|
959
966
|
function Tr(t, e, r, i, n, o) {
|
960
|
-
return s(), a("nav",
|
961
|
-
(s(!0), a(C, null,
|
967
|
+
return s(), a("nav", Ir, [
|
968
|
+
(s(!0), a(C, null, I(r.tabsList, (u) => (s(), a("button", {
|
962
969
|
onClick: (b) => t.$emit("update:filterState", u == null ? void 0 : u.name),
|
963
|
-
class:
|
970
|
+
class: A(["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", {
|
964
971
|
" 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": (u == null ? void 0 : u.name) === r.filterState
|
965
972
|
}])
|
966
|
-
},
|
973
|
+
}, $(u == null ? void 0 : u.label), 11, Ar))), 256))
|
967
974
|
]);
|
968
975
|
}
|
969
976
|
const Vr = /* @__PURE__ */ g(Sr, [["render", Tr]]), Dr = {}, Fr = {
|
@@ -986,39 +993,39 @@ function Mr(t, e, r, i, n, o) {
|
|
986
993
|
l("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)
|
987
994
|
]));
|
988
995
|
}
|
989
|
-
const jr = /* @__PURE__ */ g(Dr, [["render", Mr]]),
|
996
|
+
const jr = /* @__PURE__ */ g(Dr, [["render", Mr]]), qr = {
|
990
997
|
components: { IconFilter2: jr },
|
991
998
|
props: { filterCustom: String, customList: Array }
|
992
|
-
},
|
999
|
+
}, zr = { class: "py-2 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" }, Br = { class: "flex flex-col gap-[4px]" }, Pr = ["onClick"];
|
993
1000
|
function Lr(t, e, r, i, n, o) {
|
994
1001
|
const u = d("IconFilter2"), b = d("VsPopover");
|
995
|
-
return s(),
|
1002
|
+
return s(), k(b, {
|
996
1003
|
ref: "popover",
|
997
1004
|
placement: "bottom"
|
998
1005
|
}, {
|
999
|
-
reference:
|
1000
|
-
l("button",
|
1001
|
-
|
1006
|
+
reference: v(() => [
|
1007
|
+
l("button", zr, [
|
1008
|
+
f(u, {
|
1002
1009
|
height: "20",
|
1003
1010
|
width: "20"
|
1004
1011
|
})
|
1005
1012
|
])
|
1006
1013
|
]),
|
1007
|
-
default:
|
1014
|
+
default: v(() => [
|
1008
1015
|
l("div", Br, [
|
1009
|
-
(s(!0), a(C, null,
|
1010
|
-
onClick: (
|
1016
|
+
(s(!0), a(C, null, I(r.customList, (p, h) => (s(), a("button", {
|
1017
|
+
onClick: (_) => {
|
1011
1018
|
var c;
|
1012
|
-
t.$emit("update:filterCustom",
|
1019
|
+
t.$emit("update:filterCustom", p == null ? void 0 : p.name), (c = t.$refs) == null || c.popover.togglePopover();
|
1013
1020
|
},
|
1014
|
-
key:
|
1015
|
-
class:
|
1016
|
-
},
|
1021
|
+
key: h,
|
1022
|
+
class: A(["p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300", { "bg-gray-100": r.filterCustom === (p == null ? void 0 : p.name) }])
|
1023
|
+
}, $(p == null ? void 0 : p.label), 11, Pr))), 128)),
|
1017
1024
|
l("button", {
|
1018
1025
|
class: "p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300",
|
1019
|
-
onClick: e[0] || (e[0] = (
|
1020
|
-
var
|
1021
|
-
t.$emit("update:filterCustom", void 0), (
|
1026
|
+
onClick: e[0] || (e[0] = (p) => {
|
1027
|
+
var h;
|
1028
|
+
t.$emit("update:filterCustom", void 0), (h = t.$refs) == null || h.popover.togglePopover();
|
1022
1029
|
})
|
1023
1030
|
}, " Скинути фільтри ")
|
1024
1031
|
])
|
@@ -1026,7 +1033,7 @@ function Lr(t, e, r, i, n, o) {
|
|
1026
1033
|
_: 1
|
1027
1034
|
}, 512);
|
1028
1035
|
}
|
1029
|
-
const Ur = /* @__PURE__ */ g(
|
1036
|
+
const Ur = /* @__PURE__ */ g(qr, [["render", Lr]]), Or = {
|
1030
1037
|
props: { table: String, title: String },
|
1031
1038
|
components: {
|
1032
1039
|
AdminTableControl: Je,
|
@@ -1055,7 +1062,8 @@ const Ur = /* @__PURE__ */ g(zr, [["render", Lr]]), Or = {
|
|
1055
1062
|
isVisibleCardInfo: !1,
|
1056
1063
|
onFilters: 0,
|
1057
1064
|
filterState: null,
|
1058
|
-
filterCustom: null
|
1065
|
+
filterCustom: null,
|
1066
|
+
visibleColumns: []
|
1059
1067
|
};
|
1060
1068
|
},
|
1061
1069
|
async mounted() {
|
@@ -1104,7 +1112,7 @@ const Ur = /* @__PURE__ */ g(zr, [["render", Lr]]), Or = {
|
|
1104
1112
|
$route: {
|
1105
1113
|
handler(t, e) {
|
1106
1114
|
var r, i;
|
1107
|
-
((r = t == null ? void 0 : t.params) == null ? void 0 : r.catchAll) !== ((i = e == null ? void 0 : e.params) == null ? void 0 : i.catchAll) && (this.unmountedData(), this.getFilters());
|
1115
|
+
((r = t == null ? void 0 : t.params) == null ? void 0 : r.catchAll) !== ((i = e == null ? void 0 : e.params) == null ? void 0 : i.catchAll) && (this.visibleColumns = [], this.unmountedData(), this.getFilters());
|
1108
1116
|
},
|
1109
1117
|
deep: !0
|
1110
1118
|
},
|
@@ -1121,16 +1129,26 @@ const Ur = /* @__PURE__ */ g(zr, [["render", Lr]]), Or = {
|
|
1121
1129
|
},
|
1122
1130
|
filterCustom(t) {
|
1123
1131
|
var e;
|
1124
|
-
this.$router.
|
1132
|
+
this.$router.replace({
|
1125
1133
|
...this.$route,
|
1126
1134
|
query: { ...(e = this.$route) == null ? void 0 : e.query, filterCustom: t }
|
1127
1135
|
}), this.getTableData();
|
1136
|
+
},
|
1137
|
+
columns(t) {
|
1138
|
+
var e, r;
|
1139
|
+
this.visibleColumns = t == null ? void 0 : t.map((i) => i == null ? void 0 : i.name), this.$router.replace({
|
1140
|
+
...this.$route,
|
1141
|
+
query: {
|
1142
|
+
...(e = this.$route) == null ? void 0 : e.query,
|
1143
|
+
columns: (r = this.visibleColumns) != null && r.length ? this.visibleColumns : void 0
|
1144
|
+
}
|
1145
|
+
});
|
1128
1146
|
}
|
1129
1147
|
},
|
1130
1148
|
methods: {
|
1131
1149
|
async checkUrlMounted() {
|
1132
|
-
var t, e, r, i, n, o, u, b, h,
|
1133
|
-
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((i = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : i.limit) || 20, this.filterState = ((o = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : o.filterState) || null, this.filterCustom = ((b = (u = this.$route) == null ? void 0 : u.query) == null ? void 0 : b.filterCustom) || null, this.searchValue = ((
|
1150
|
+
var t, e, r, i, n, o, u, b, p, h, _, c, x;
|
1151
|
+
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((i = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : i.limit) || 20, this.filterState = ((o = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : o.filterState) || null, this.filterCustom = ((b = (u = this.$route) == null ? void 0 : u.query) == null ? void 0 : b.filterCustom) || null, this.searchValue = ((h = (p = this.$route) == null ? void 0 : p.query) == null ? void 0 : h.search) || null, this.visibleColumns = ((c = (_ = this.$route) == null ? void 0 : _.query) == null ? void 0 : c.columns) || [], (x = this.$route) != null && x.query.card && (this.isVisibleCardInfo = !0);
|
1134
1152
|
},
|
1135
1153
|
rowWidth(t) {
|
1136
1154
|
var r, i;
|
@@ -1141,12 +1159,12 @@ const Ur = /* @__PURE__ */ g(zr, [["render", Lr]]), Or = {
|
|
1141
1159
|
}
|
1142
1160
|
},
|
1143
1161
|
unmountedData() {
|
1144
|
-
this.page = 1, this.filterCustom = null, this.filterState = null, this.isVisibleCardInfo = !1, this.filterScheme = null, this.filters = null, this.onFilters = 0;
|
1162
|
+
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 = "";
|
1145
1163
|
},
|
1146
1164
|
async getTableData() {
|
1147
|
-
var t, e;
|
1165
|
+
var t, e, r, i, n, o, u;
|
1148
1166
|
try {
|
1149
|
-
const { data:
|
1167
|
+
const { data: b } = await T.get(`/api/template/table/${this.table}`), p = await T.get(`/api/table-data/${this.table}`, {
|
1150
1168
|
params: {
|
1151
1169
|
page: this.page,
|
1152
1170
|
search: this.searchValue || null,
|
@@ -1158,16 +1176,19 @@ const Ur = /* @__PURE__ */ g(zr, [["render", Lr]]), Or = {
|
|
1158
1176
|
}
|
1159
1177
|
});
|
1160
1178
|
this.tableData = {
|
1161
|
-
...
|
1162
|
-
...(
|
1163
|
-
}
|
1179
|
+
...b,
|
1180
|
+
...(p == null ? void 0 : p.data) || {}
|
1181
|
+
}, (r = this.visibleColumns) != null && r.length ? (i = this.tableData) == null || i.columns.forEach((h) => {
|
1182
|
+
var _;
|
1183
|
+
(_ = this.visibleColumns) != null && _.includes(h == null ? void 0 : h.name) ? h.hidden = !1 : h.hidden = !0;
|
1184
|
+
}) : this.visibleColumns = (u = (o = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : o.filter((h) => (h == null ? void 0 : h.hidden) !== !0)) == null ? void 0 : u.map((h) => h == null ? void 0 : h.name);
|
1164
1185
|
} catch {
|
1165
1186
|
}
|
1166
1187
|
},
|
1167
1188
|
async getFilters() {
|
1168
1189
|
var t;
|
1169
1190
|
try {
|
1170
|
-
const { data: e } = await
|
1191
|
+
const { data: e } = await T.get(`/api/table-filter/${this.table}`);
|
1171
1192
|
this.filterScheme = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map((r) => ({
|
1172
1193
|
...r,
|
1173
1194
|
label: (r == null ? void 0 : r.label) || (r == null ? void 0 : r.ua)
|
@@ -1208,96 +1229,100 @@ const Ur = /* @__PURE__ */ g(zr, [["render", Lr]]), Or = {
|
|
1208
1229
|
});
|
1209
1230
|
}
|
1210
1231
|
}
|
1211
|
-
}, Er = { class: "w-[calc(100vw - 320px)] bg-gray-50" }, Nr = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, Hr = { class: "text-xl font-medium
|
1232
|
+
}, Er = { class: "w-[calc(100vw - 320px)] bg-gray-50" }, Nr = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, Hr = { class: "text-xl font-medium" }, Wr = {
|
1212
1233
|
style: { height: "calc(100vh - 155px)", width: "calc(100vw - 260px)" },
|
1213
1234
|
class: "bg-gray-50 p-[20px] flex pt-[10px]"
|
1214
1235
|
}, Rr = { class: "bg-white w-full rounded-xl border p-[20px] pr-0" }, Gr = { class: "flex" }, Zr = { class: "flex gap-[6px] ml-auto" }, Jr = { class: "inline-block w-full align-middle" }, Kr = {
|
1215
1236
|
key: 0,
|
1216
1237
|
class: "relative min-w-full divide-y divide-gray-200 table-fixed dark:divide-neutral-700"
|
1217
|
-
}, Qr = { class: "sticky top-
|
1238
|
+
}, Qr = { class: "sticky top-[-1px] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, Xr = { class: "right-0 border-t border-stone-200" }, Yr = { class: "divide-y divide-gray-200" }, en = { class: "px-4 py-3 text-sm text-gray-600" }, tn = ["onClick"], rn = ["onClick"], nn = {
|
1218
1239
|
key: 0,
|
1219
1240
|
class: "text-center sticky right-0 bg-white w-[80px] px-[10px]"
|
1220
|
-
}, ln = { class: "p-[20px] flex justify-
|
1221
|
-
function
|
1241
|
+
}, ln = { class: "p-[20px] flex justify-start items-center w-full" }, sn = { class: "w-[200px]" }, on = { class: "text-sm text-gray-600 dark:text-neutral-400" }, an = { class: "font-semibold text-gray-800 dark:text-neutral-200" }, cn = { class: "font-semibold text-gray-800 dark:text-neutral-200" };
|
1242
|
+
function un(t, e, r, i, n, o) {
|
1222
1243
|
var B, P, L, U, O, E, N, H, W, R, G, Z, J, K, Q, X;
|
1223
|
-
const u = d("IconPlus"), b = d("router-link"),
|
1244
|
+
const u = d("IconPlus"), b = d("router-link"), p = d("AdminTableTabs"), h = d("IconSearch"), _ = d("VsText"), c = d("AdminTableCustomFilters"), x = d("AdminTableColumnsHidden"), S = d("AdminTableExport"), y = d("AdminTableFilters"), V = d("IconOpenCard"), F = d("AdminTableColumn"), M = d("AdminComponentIs"), ie = d("AdminTableControl"), ce = d("AdminNodata"), ue = d("VsPagination"), de = d("AdminTableCardInfo");
|
1224
1245
|
return s(), a("div", Er, [
|
1225
1246
|
l("div", Nr, [
|
1226
|
-
l("h2", Hr,
|
1227
|
-
o.isForm ? (s(),
|
1247
|
+
l("h2", Hr, $(r.title), 1),
|
1248
|
+
o.isForm ? (s(), k(b, {
|
1228
1249
|
key: 0,
|
1229
1250
|
to: `/add?table=${(P = (B = t.$route) == null ? void 0 : B.params) == null ? void 0 : P.catchAll}`,
|
1230
1251
|
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"
|
1231
1252
|
}, {
|
1232
|
-
default:
|
1233
|
-
|
1253
|
+
default: v(() => [
|
1254
|
+
f(u, {
|
1234
1255
|
height: "16",
|
1235
1256
|
width: "16"
|
1236
1257
|
}),
|
1237
1258
|
e[5] || (e[5] = D(" Додати "))
|
1238
1259
|
]),
|
1239
1260
|
_: 1
|
1240
|
-
}, 8, ["to"])) :
|
1261
|
+
}, 8, ["to"])) : w("", !0)
|
1241
1262
|
]),
|
1242
1263
|
l("div", Wr, [
|
1243
1264
|
l("div", Rr, [
|
1244
|
-
(U = (L = n.tableData) == null ? void 0 : L.filterState) != null && U.length ? (s(),
|
1265
|
+
(U = (L = n.tableData) == null ? void 0 : L.filterState) != null && U.length ? (s(), k(p, {
|
1245
1266
|
key: 0,
|
1246
1267
|
tabsList: (O = n.tableData) == null ? void 0 : O.filterState,
|
1247
1268
|
filterState: n.filterState,
|
1248
|
-
"onUpdate:filterState": e[0] || (e[0] = (
|
1249
|
-
}, null, 8, ["tabsList", "filterState"])) :
|
1269
|
+
"onUpdate:filterState": e[0] || (e[0] = (m) => n.filterState = m)
|
1270
|
+
}, null, 8, ["tabsList", "filterState"])) : w("", !0),
|
1250
1271
|
l("div", Gr, [
|
1251
1272
|
l("div", {
|
1252
|
-
class:
|
1273
|
+
class: A([n.isVisibleCardInfo ? "w-[calc(100%-360px)]" : "w-full"])
|
1253
1274
|
}, [
|
1254
1275
|
l("div", {
|
1255
|
-
class:
|
1276
|
+
class: A(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative", { "pr-[20px]": !n.isVisibleCardInfo }])
|
1256
1277
|
}, [
|
1257
|
-
|
1278
|
+
f(h, {
|
1258
1279
|
height: "14",
|
1259
1280
|
width: "14",
|
1260
1281
|
class: "absolute top-[10px] left-[14px] text-gray-500 z-[1]"
|
1261
1282
|
}),
|
1262
|
-
|
1283
|
+
f(_, {
|
1263
1284
|
modelValue: n.searchValue,
|
1264
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
1285
|
+
"onUpdate:modelValue": e[1] || (e[1] = (m) => n.searchValue = m),
|
1265
1286
|
placeholder: "Пошук...",
|
1266
1287
|
clearable: !0,
|
1267
1288
|
class: "[&>input]:py-[7px] [&>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"
|
1268
1289
|
}, null, 8, ["modelValue"]),
|
1269
1290
|
l("div", Zr, [
|
1270
|
-
(N = (E = n.tableData) == null ? void 0 : E.filterCustom) != null && N.length ? (s(),
|
1291
|
+
(N = (E = n.tableData) == null ? void 0 : E.filterCustom) != null && N.length ? (s(), k(c, {
|
1271
1292
|
key: 0,
|
1272
1293
|
customList: (H = n.tableData) == null ? void 0 : H.filterCustom,
|
1273
1294
|
filterCustom: n.filterCustom,
|
1274
|
-
"onUpdate:filterCustom": e[2] || (e[2] = (
|
1275
|
-
}, null, 8, ["customList", "filterCustom"])) :
|
1276
|
-
|
1295
|
+
"onUpdate:filterCustom": e[2] || (e[2] = (m) => n.filterCustom = m)
|
1296
|
+
}, null, 8, ["customList", "filterCustom"])) : w("", !0),
|
1297
|
+
f(x, {
|
1277
1298
|
columns: (W = n.tableData) == null ? void 0 : W.columns,
|
1278
|
-
onUpdateColumns: e[3] || (e[3] = (
|
1299
|
+
onUpdateColumns: e[3] || (e[3] = (m) => n.tableData.columns = m)
|
1279
1300
|
}, null, 8, ["columns"]),
|
1280
|
-
|
1301
|
+
f(S, {
|
1281
1302
|
table: r.table,
|
1282
|
-
columns: (R = n.tableData) == null ? void 0 : R.columns
|
1283
|
-
|
1284
|
-
|
1303
|
+
columns: (R = n.tableData) == null ? void 0 : R.columns,
|
1304
|
+
page: n.page,
|
1305
|
+
"filter-state": n.filterState,
|
1306
|
+
"filter-custom": n.filterCustom,
|
1307
|
+
filters: n.filters
|
1308
|
+
}, null, 8, ["table", "columns", "page", "filter-state", "filter-custom", "filters"]),
|
1309
|
+
f(y, {
|
1285
1310
|
scheme: n.filterScheme,
|
1286
1311
|
onFilters: n.onFilters,
|
1287
1312
|
onFilterChange: o.filterChange
|
1288
1313
|
}, null, 8, ["scheme", "onFilters", "onFilterChange"]),
|
1289
1314
|
l("button", {
|
1290
|
-
onClick: e[4] || (e[4] = (...
|
1315
|
+
onClick: e[4] || (e[4] = (...m) => o.toggleCardInfo && o.toggleCardInfo(...m)),
|
1291
1316
|
class: "py-2 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"
|
1292
1317
|
}, [
|
1293
|
-
|
1294
|
-
class:
|
1318
|
+
f(V, {
|
1319
|
+
class: A({ "rotate-180 duration-300": !n.isVisibleCardInfo })
|
1295
1320
|
}, null, 8, ["class"])
|
1296
1321
|
])
|
1297
1322
|
])
|
1298
1323
|
], 2),
|
1299
1324
|
l("div", {
|
1300
|
-
class:
|
1325
|
+
class: A(["flex items-start justify-start w-full space-y-5", { "pr-[20px]": !n.isVisibleCardInfo }])
|
1301
1326
|
}, [
|
1302
1327
|
l("div", {
|
1303
1328
|
style: le({
|
@@ -1306,63 +1331,63 @@ function dn(t, e, r, i, n, o) {
|
|
1306
1331
|
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"
|
1307
1332
|
}, [
|
1308
1333
|
l("div", Jr, [
|
1309
|
-
o.isNoData ? (s(),
|
1334
|
+
o.isNoData ? (s(), k(ce, { key: 1 })) : (s(), a("table", Kr, [
|
1310
1335
|
l("thead", Qr, [
|
1311
1336
|
l("tr", Xr, [
|
1312
|
-
(s(!0), a(C, null,
|
1313
|
-
key:
|
1337
|
+
(s(!0), a(C, null, I(o.columns, (m) => (s(), k(F, {
|
1338
|
+
key: m.name,
|
1314
1339
|
style: le({
|
1315
|
-
width: o.rowWidth(
|
1316
|
-
textAlign:
|
1317
|
-
wordBreak:
|
1340
|
+
width: o.rowWidth(m == null ? void 0 : m.name),
|
1341
|
+
textAlign: m == null ? void 0 : m.align,
|
1342
|
+
wordBreak: m.wrap
|
1318
1343
|
}),
|
1319
|
-
data:
|
1344
|
+
data: m,
|
1320
1345
|
activeColumn: n.activeColumn,
|
1321
1346
|
onChangeActive: o.changeActiveColumn
|
1322
1347
|
}, null, 8, ["style", "data", "activeColumn", "onChangeActive"]))), 128)),
|
1323
|
-
e[6] || (e[6] = l("th", { class: "w-[70px] sticky right-0 top-0
|
1348
|
+
e[6] || (e[6] = l("th", { class: "w-[70px] sticky right-0 top-0" }, null, -1))
|
1324
1349
|
])
|
1325
1350
|
]),
|
1326
1351
|
l("tbody", Yr, [
|
1327
|
-
(s(!0), a(C, null,
|
1352
|
+
(s(!0), a(C, null, I((J = n.tableData) == null ? void 0 : J.rows, (m, he) => {
|
1328
1353
|
var Y, ee, te;
|
1329
1354
|
return s(), a("tr", { key: he }, [
|
1330
1355
|
l("td", en, [
|
1331
1356
|
l("button", {
|
1332
|
-
onClick: () => o.pushToCard(
|
1333
|
-
class:
|
1357
|
+
onClick: () => o.pushToCard(m == null ? void 0 : m.id),
|
1358
|
+
class: A(["text-sm font-medium", [
|
1334
1359
|
((Y = n.tableData) == null ? void 0 : Y.card) === !1 ? "" : "text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"
|
1335
1360
|
]])
|
1336
1361
|
}, [
|
1337
|
-
|
1338
|
-
row:
|
1362
|
+
f(M, {
|
1363
|
+
row: m,
|
1339
1364
|
column: o.columns[0],
|
1340
1365
|
table: r.table,
|
1341
1366
|
onUpdateTable: o.getTableData
|
1342
1367
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1343
1368
|
], 10, tn)
|
1344
1369
|
]),
|
1345
|
-
(s(!0), a(C, null,
|
1346
|
-
onClick: (fn) => o.changeActiveCardInfo(
|
1347
|
-
class:
|
1370
|
+
(s(!0), a(C, null, I((ee = o.columns) == null ? void 0 : ee.slice(1), (re) => (s(), a("td", {
|
1371
|
+
onClick: (fn) => o.changeActiveCardInfo(m == null ? void 0 : m.id),
|
1372
|
+
class: A(["px-3 py-3 text-sm text-gray-600 text-start whitespace-nowrap", { "cursor-pointer": n.isVisibleCardInfo }]),
|
1348
1373
|
key: re.name
|
1349
1374
|
}, [
|
1350
|
-
|
1351
|
-
row:
|
1375
|
+
f(M, {
|
1376
|
+
row: m,
|
1352
1377
|
column: re,
|
1353
1378
|
table: r.table,
|
1354
1379
|
onUpdateTable: o.getTableData
|
1355
1380
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1356
1381
|
], 10, rn))), 128)),
|
1357
1382
|
(te = o.getActions) != null && te.length ? (s(), a("td", nn, [
|
1358
|
-
|
1383
|
+
f(ie, {
|
1359
1384
|
actions: o.getActions,
|
1360
1385
|
isForm: o.isForm,
|
1361
|
-
item:
|
1386
|
+
item: m,
|
1362
1387
|
table: r.table,
|
1363
1388
|
onUpdateTable: o.getTableData
|
1364
1389
|
}, null, 8, ["actions", "isForm", "item", "table", "onUpdateTable"])
|
1365
|
-
])) :
|
1390
|
+
])) : w("", !0)
|
1366
1391
|
]);
|
1367
1392
|
}), 128))
|
1368
1393
|
])
|
@@ -1373,31 +1398,31 @@ function dn(t, e, r, i, n, o) {
|
|
1373
1398
|
l("div", ln, [
|
1374
1399
|
l("div", sn, [
|
1375
1400
|
l("p", on, [
|
1376
|
-
l("span", an, "Знайдено " +
|
1377
|
-
l("span", cn,
|
1401
|
+
l("span", an, $(n.filters || n.searchValue ? "Знайдено" : "Об'єктів") + " " + $(((K = n.tableData) == null ? void 0 : K.count) || 0) + " з ", 1),
|
1402
|
+
l("span", cn, $(((Q = n.tableData) == null ? void 0 : Q.total) || 0), 1)
|
1378
1403
|
])
|
1379
1404
|
]),
|
1380
|
-
n.limit ? (s(),
|
1405
|
+
n.limit ? (s(), k(ue, {
|
1381
1406
|
key: 0,
|
1382
1407
|
goTo: !1,
|
1383
1408
|
class: "justify-end",
|
1384
|
-
"default-page": o.defaultPage,
|
1409
|
+
"default-page": parseInt(o.defaultPage),
|
1385
1410
|
total: ((X = n.tableData) == null ? void 0 : X.total) || 0,
|
1386
1411
|
pageSize: parseInt(n.limit),
|
1387
1412
|
onPageChange: o.handlePageChange,
|
1388
1413
|
pageSizes: [10, 16, 20],
|
1389
1414
|
onPageSizeChange: o.changeLimit
|
1390
|
-
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])) :
|
1415
|
+
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])) : w("", !0)
|
1391
1416
|
])
|
1392
1417
|
], 2),
|
1393
|
-
|
1394
|
-
default:
|
1395
|
-
n.isVisibleCardInfo ? (s(),
|
1418
|
+
f(z, { name: "slide-fade" }, {
|
1419
|
+
default: v(() => [
|
1420
|
+
n.isVisibleCardInfo ? (s(), k(de, {
|
1396
1421
|
key: 0,
|
1397
1422
|
table: r.table,
|
1398
1423
|
columns: o.columns,
|
1399
1424
|
row: o.activeCardRow
|
1400
|
-
}, null, 8, ["table", "columns", "row"])) :
|
1425
|
+
}, null, 8, ["table", "columns", "row"])) : w("", !0)
|
1401
1426
|
]),
|
1402
1427
|
_: 1
|
1403
1428
|
})
|
@@ -1406,8 +1431,8 @@ function dn(t, e, r, i, n, o) {
|
|
1406
1431
|
])
|
1407
1432
|
]);
|
1408
1433
|
}
|
1409
|
-
const
|
1410
|
-
components: { AdminTable:
|
1434
|
+
const dn = /* @__PURE__ */ g(Or, [["render", un], ["__scopeId", "data-v-0f46a883"]]), hn = {
|
1435
|
+
components: { AdminTable: dn },
|
1411
1436
|
data() {
|
1412
1437
|
return {
|
1413
1438
|
table: !1,
|
@@ -1452,7 +1477,7 @@ const un = /* @__PURE__ */ g(Or, [["render", dn], ["__scopeId", "data-v-30411599
|
|
1452
1477
|
async getInterface() {
|
1453
1478
|
var t, e;
|
1454
1479
|
try {
|
1455
|
-
const { data: r } = await
|
1480
|
+
const { data: r } = await T.get(
|
1456
1481
|
`/api/template/interface/${((e = (t = this.$route) == null ? void 0 : t.params) == null ? void 0 : e.catchAll) || ""}`
|
1457
1482
|
);
|
1458
1483
|
this.interface = r || "";
|
@@ -1464,7 +1489,7 @@ const un = /* @__PURE__ */ g(Or, [["render", dn], ["__scopeId", "data-v-30411599
|
|
1464
1489
|
}, pn = ["innerHTML"];
|
1465
1490
|
function bn(t, e, r, i, n, o) {
|
1466
1491
|
const u = d("AdminTable");
|
1467
|
-
return n.table ? (s(),
|
1492
|
+
return n.table ? (s(), k(u, {
|
1468
1493
|
key: 0,
|
1469
1494
|
table: n.table,
|
1470
1495
|
title: n.title
|