@opengis/admin 0.1.69 → 0.1.70
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/add-page-Dl_bGhPC.js +92 -0
- package/dist/{admin-interface-DA_PeVj7.js → admin-interface-Dma-D4A9.js} +444 -599
- package/dist/{admin-view-DrOVwYHu.js → admin-view-TeTAUVK1.js} +223 -214
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +78 -78
- package/dist/card-page-D-3aubBo.js +230 -0
- package/dist/{card-view-eMucbOjz.js → card-view-CZjPaUKx.js} +1 -1
- package/dist/edit-page-RhKgRai9.js +103 -0
- package/dist/{import-file-z-nSvLVJ.js → import-file-DgJqxKyF.js} +7332 -7297
- package/dist/style.css +1 -1
- package/module/settings/select/core.roles.json +2 -2
- package/module/settings/table/admin.custom_column.table.json +0 -1
- package/package.json +1 -1
- package/server/routes/data/controllers/cardData.js +5 -5
- package/server/routes/data/controllers/tableDataId.js +3 -5
- package/dist/IconChevronDown-D29D5cN_.js +0 -26
- package/dist/add-page-w-DxgCiS.js +0 -97
- package/dist/card-page-Pw97vvNR.js +0 -275
- package/dist/edit-page-DqEf35J2.js +0 -101
@@ -1,7 +1,6 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { openBlock as s, createElementBlock as
|
3
|
-
|
4
|
-
const Ce = {
|
1
|
+
import { _ as m, b as ue, a as A, c as he, d as pe, e as be, f as fe, I as me, u as te } from "./import-file-DgJqxKyF.js";
|
2
|
+
import { openBlock as s, createElementBlock as i, createTextVNode as F, toDisplayString as I, createCommentVNode as v, createStaticVNode as j, Fragment as C, createElementVNode as l, resolveComponent as c, createVNode as b, withCtx as y, createBlock as x, withModifiers as ge, renderList as T, withDirectives as z, vModelCheckbox as xe, resolveDynamicComponent as ye, Transition as P, renderSlot as _e, vShow as ne, normalizeClass as S, normalizeStyle as re } from "vue";
|
3
|
+
const ke = {
|
5
4
|
data() {
|
6
5
|
return {
|
7
6
|
currentSort: ""
|
@@ -47,10 +46,10 @@ const Ce = {
|
|
47
46
|
},
|
48
47
|
handleClickSortBtn(t) {
|
49
48
|
this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(t);
|
50
|
-
const e = this.$route.query, { sort: r, ...
|
49
|
+
const e = this.$route.query, { sort: r, ...a } = e, n = this.currentSort ? `${this.data.name}-${this.currentSort}` : "";
|
51
50
|
this.$router.replace({
|
52
51
|
query: {
|
53
|
-
...
|
52
|
+
...a,
|
54
53
|
...n && { sort: n }
|
55
54
|
}
|
56
55
|
});
|
@@ -59,10 +58,10 @@ const Ce = {
|
|
59
58
|
return `${this.data.name}-${t}` === this.selectedSortParam;
|
60
59
|
}
|
61
60
|
}
|
62
|
-
},
|
61
|
+
}, we = {
|
63
62
|
scope: "col",
|
64
63
|
class: "text-start px-2 py-1"
|
65
|
-
},
|
64
|
+
}, ve = {
|
66
65
|
class: "flex-shrink-0 size-3.5",
|
67
66
|
xmlns: "http://www.w3.org/2000/svg",
|
68
67
|
width: "24",
|
@@ -73,33 +72,33 @@ const Ce = {
|
|
73
72
|
"stroke-width": "2",
|
74
73
|
"stroke-linecap": "round",
|
75
74
|
"stroke-linejoin": "round"
|
76
|
-
},
|
75
|
+
}, Ce = {
|
77
76
|
key: 0,
|
78
77
|
d: "m7 15 5 5 5-5"
|
79
|
-
},
|
78
|
+
}, $e = {
|
80
79
|
key: 1,
|
81
80
|
d: "m7 9 5-5 5 5"
|
82
|
-
},
|
81
|
+
}, Ie = {
|
83
82
|
key: 1,
|
84
83
|
class: "text-sm text-stone-500 px-[4px] py-2.5 text-start font-normal text-gray-500"
|
85
84
|
};
|
86
|
-
function
|
87
|
-
return s(),
|
88
|
-
o.getVisibleIcon ? (s(),
|
85
|
+
function Te(t, e, r, a, n, o) {
|
86
|
+
return s(), i("th", we, [
|
87
|
+
o.getVisibleIcon ? (s(), i("button", {
|
89
88
|
key: 0,
|
90
89
|
type: "button",
|
91
90
|
class: "text-sm text-stone-500 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",
|
92
|
-
onClick: e[0] || (e[0] = (
|
91
|
+
onClick: e[0] || (e[0] = (d) => o.handleClickSortBtn(n.currentSort))
|
93
92
|
}, [
|
94
|
-
|
95
|
-
(s(),
|
96
|
-
n.currentSort === "asc" || n.currentSort === "" ? (s(),
|
97
|
-
n.currentSort === "desc" || n.currentSort === "" ? (s(),
|
93
|
+
F(I(o.label) + " ", 1),
|
94
|
+
(s(), i("svg", ve, [
|
95
|
+
n.currentSort === "asc" || n.currentSort === "" ? (s(), i("path", Ce)) : v("", !0),
|
96
|
+
n.currentSort === "desc" || n.currentSort === "" ? (s(), i("path", $e)) : v("", !0)
|
98
97
|
]))
|
99
|
-
])) : (s(),
|
98
|
+
])) : (s(), i("p", Ie, I(o.label), 1))
|
100
99
|
]);
|
101
100
|
}
|
102
|
-
const
|
101
|
+
const Se = /* @__PURE__ */ m(ke, [["render", Te]]), Ve = {}, Ae = {
|
103
102
|
class: "flex-shrink-0 size-3.5",
|
104
103
|
xmlns: "http://www.w3.org/2000/svg",
|
105
104
|
viewBox: "0 0 24 24",
|
@@ -109,21 +108,21 @@ const De = /* @__PURE__ */ g(Ce, [["render", Ve]]), Fe = {}, Me = {
|
|
109
108
|
"stroke-linecap": "round",
|
110
109
|
"stroke-linejoin": "round"
|
111
110
|
};
|
112
|
-
function
|
113
|
-
return s(),
|
111
|
+
function Fe(t, e, r, a, n, o) {
|
112
|
+
return s(), i("svg", Ae, e[0] || (e[0] = [
|
114
113
|
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
114
|
]));
|
116
115
|
}
|
117
|
-
const
|
116
|
+
const De = /* @__PURE__ */ m(Ve, [["render", Fe]]), Me = {
|
118
117
|
props: {
|
119
118
|
height: { type: String, default: "16" },
|
120
119
|
width: { type: String, default: "12" },
|
121
120
|
color: { type: String, default: "black" }
|
122
121
|
}
|
123
|
-
},
|
124
|
-
function
|
125
|
-
return s(),
|
126
|
-
(s(),
|
122
|
+
}, je = { style: { display: "none" } }, ze = ["height", "width", "fill"];
|
123
|
+
function Pe(t, e, r, a, n, o) {
|
124
|
+
return s(), i(C, null, [
|
125
|
+
(s(), i("svg", je, e[0] || (e[0] = [
|
127
126
|
l("symbol", {
|
128
127
|
id: "icon-pencil",
|
129
128
|
viewBox: "0 0 32 32"
|
@@ -131,20 +130,20 @@ function Le(t, e, r, i, n, o) {
|
|
131
130
|
l("path", { d: "M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z" })
|
132
131
|
], -1)
|
133
132
|
]))),
|
134
|
-
(s(),
|
133
|
+
(s(), i("svg", {
|
135
134
|
height: r.height,
|
136
135
|
width: r.width,
|
137
136
|
fill: r.color
|
138
137
|
}, e[1] || (e[1] = [
|
139
138
|
l("use", { "xlink:href": "#icon-pencil" }, null, -1)
|
140
|
-
]), 8,
|
139
|
+
]), 8, ze))
|
141
140
|
], 64);
|
142
141
|
}
|
143
|
-
const
|
142
|
+
const qe = /* @__PURE__ */ m(Me, [["render", Pe]]), Be = {
|
144
143
|
components: {
|
145
|
-
IconMore:
|
146
|
-
IconDelete:
|
147
|
-
IconEdit:
|
144
|
+
IconMore: ue,
|
145
|
+
IconDelete: De,
|
146
|
+
IconEdit: qe
|
148
147
|
},
|
149
148
|
emits: ["updateTable"],
|
150
149
|
props: {
|
@@ -170,7 +169,7 @@ const Ue = /* @__PURE__ */ g(ze, [["render", Le]]), Oe = {
|
|
170
169
|
async getData() {
|
171
170
|
var t;
|
172
171
|
try {
|
173
|
-
const { data: e } = await
|
172
|
+
const { data: e } = await A.get(
|
174
173
|
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
175
174
|
);
|
176
175
|
this.formValue = e;
|
@@ -184,94 +183,88 @@ const Ue = /* @__PURE__ */ g(ze, [["render", Le]]), Oe = {
|
|
184
183
|
async deleteElement() {
|
185
184
|
var t;
|
186
185
|
try {
|
187
|
-
|
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({
|
186
|
+
A.delete(`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`), this.$notify({
|
191
187
|
title: "Успішно!",
|
192
188
|
message: "Об`єкт успішно видалeно",
|
193
189
|
type: "success"
|
194
|
-
}), await this.$emit("update-table");
|
190
|
+
}), await this.$emit("update-table"), this.isDeleteConfirm = !1;
|
195
191
|
} catch {
|
196
192
|
this.$notify({
|
197
193
|
title: "Помилка!",
|
198
194
|
message: "Сталася помилка",
|
199
195
|
type: "error"
|
200
196
|
});
|
201
|
-
} finally {
|
202
|
-
this.isDeleteConfirm = !1;
|
203
197
|
}
|
204
198
|
}
|
205
199
|
}
|
206
|
-
},
|
200
|
+
}, Le = { class: "hs-dropdown [--placement:bottom-right] inline-flex" }, Ue = { 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" }, Oe = { class: "flex flex-col items-start" }, Ee = {
|
207
201
|
key: 1,
|
208
202
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
209
|
-
},
|
210
|
-
function
|
211
|
-
const
|
212
|
-
return s(),
|
213
|
-
l("div",
|
214
|
-
|
203
|
+
}, Ne = { class: "p-4" }, He = { class: "flex justify-end mt-4 gap-x-3" };
|
204
|
+
function We(t, e, r, a, n, o) {
|
205
|
+
const d = c("IconMore"), p = c("IconEdit"), h = c("router-link"), u = c("IconDelete"), _ = c("VsPopover"), w = c("VsDialog");
|
206
|
+
return s(), i(C, null, [
|
207
|
+
l("div", Le, [
|
208
|
+
b(_, {
|
215
209
|
trigger: "click",
|
216
210
|
placement: "bottom-left"
|
217
211
|
}, {
|
218
|
-
reference:
|
219
|
-
l("button",
|
220
|
-
|
212
|
+
reference: y(() => [
|
213
|
+
l("button", Ue, [
|
214
|
+
b(d, {
|
221
215
|
height: "16",
|
222
216
|
width: "16"
|
223
217
|
})
|
224
218
|
])
|
225
219
|
]),
|
226
|
-
default:
|
227
|
-
var
|
220
|
+
default: y(() => {
|
221
|
+
var k, $, g, V, D;
|
228
222
|
return [
|
229
|
-
l("div",
|
230
|
-
(
|
223
|
+
l("div", Oe, [
|
224
|
+
(k = r.actions) != null && k.includes("edit") && r.isForm ? (s(), x(h, {
|
231
225
|
key: 0,
|
232
|
-
to: `/edit?table=${(
|
226
|
+
to: `/edit?table=${(g = ($ = t.$route) == null ? void 0 : $.params) == null ? void 0 : g.catchAll}&id=${(V = r.item) == null ? void 0 : V.id}`,
|
233
227
|
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"
|
234
228
|
}, {
|
235
|
-
default:
|
236
|
-
|
237
|
-
e[4] || (e[4] =
|
229
|
+
default: y(() => [
|
230
|
+
b(p, { color: "#000" }),
|
231
|
+
e[4] || (e[4] = F(" Редагувати "))
|
238
232
|
]),
|
239
233
|
_: 1
|
240
|
-
}, 8, ["to"])) :
|
241
|
-
r.isForm ? (s(),
|
242
|
-
(
|
234
|
+
}, 8, ["to"])) : v("", !0),
|
235
|
+
r.isForm ? (s(), i("div", Ee)) : v("", !0),
|
236
|
+
(D = r.actions) != null && D.includes("del") ? (s(), i("button", {
|
243
237
|
key: 2,
|
244
|
-
onClick: e[0] || (e[0] =
|
238
|
+
onClick: e[0] || (e[0] = ge((...M) => o.openConfirm && o.openConfirm(...M), ["stop"])),
|
245
239
|
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"
|
246
240
|
}, [
|
247
|
-
|
241
|
+
b(u),
|
248
242
|
e[5] || (e[5] = l("span", { class: "text-gray-800" }, "Видалити", -1))
|
249
|
-
])) :
|
243
|
+
])) : v("", !0)
|
250
244
|
])
|
251
245
|
];
|
252
246
|
}),
|
253
247
|
_: 1
|
254
248
|
})
|
255
249
|
]),
|
256
|
-
|
250
|
+
b(w, {
|
257
251
|
visible: n.isDeleteConfirm,
|
258
|
-
"onUpdate:visible": e[3] || (e[3] = (
|
259
|
-
size: "small",
|
252
|
+
"onUpdate:visible": e[3] || (e[3] = (k) => n.isDeleteConfirm = k),
|
260
253
|
title: "Ви впевнені?"
|
261
254
|
}, {
|
262
|
-
default:
|
263
|
-
l("div",
|
255
|
+
default: y(() => [
|
256
|
+
l("div", Ne, [
|
264
257
|
e[6] || (e[6] = l("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
265
|
-
l("div",
|
258
|
+
l("div", He, [
|
266
259
|
l("button", {
|
267
260
|
type: "button",
|
268
261
|
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",
|
269
|
-
onClick: e[1] || (e[1] = (
|
262
|
+
onClick: e[1] || (e[1] = (k) => n.isDeleteConfirm = !1)
|
270
263
|
}, " Скасувати "),
|
271
264
|
l("button", {
|
272
265
|
type: "button",
|
273
266
|
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",
|
274
|
-
onClick: e[2] || (e[2] = (...
|
267
|
+
onClick: e[2] || (e[2] = (...k) => o.deleteElement && o.deleteElement(...k))
|
275
268
|
}, " Так, я впевнена/ий ")
|
276
269
|
])
|
277
270
|
])
|
@@ -280,7 +273,7 @@ function Ze(t, e, r, i, n, o) {
|
|
280
273
|
}, 8, ["visible"])
|
281
274
|
], 64);
|
282
275
|
}
|
283
|
-
const
|
276
|
+
const Re = /* @__PURE__ */ m(Be, [["render", We]]), Ge = {}, Ze = {
|
284
277
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
285
278
|
xmlns: "http://www.w3.org/2000/svg",
|
286
279
|
viewBox: "0 0 24 24",
|
@@ -290,115 +283,48 @@ const Je = /* @__PURE__ */ g(Oe, [["render", Ze]]), Ke = {}, Qe = {
|
|
290
283
|
"stroke-linecap": "round",
|
291
284
|
"stroke-linejoin": "round"
|
292
285
|
};
|
293
|
-
function
|
294
|
-
return s(),
|
286
|
+
function Je(t, e, r, a, n, o) {
|
287
|
+
return s(), i("svg", Ze, e[0] || (e[0] = [
|
295
288
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
296
289
|
l("path", { d: "M7 20V4" }, null, -1),
|
297
290
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
298
291
|
l("path", { d: "M17 4v16" }, null, -1)
|
299
292
|
]));
|
300
293
|
}
|
301
|
-
const
|
302
|
-
|
303
|
-
|
304
|
-
height: "24",
|
305
|
-
viewBox: "0 0 24 24",
|
306
|
-
fill: "none",
|
307
|
-
stroke: "currentColor",
|
308
|
-
"stroke-width": "2",
|
309
|
-
"stroke-linecap": "round",
|
310
|
-
"stroke-linejoin": "round",
|
311
|
-
class: "icon icon-tabler icons-tabler-outline icon-tabler-rosette-discount-check"
|
312
|
-
};
|
313
|
-
function rt(t, e, r, i, n, o) {
|
314
|
-
return s(), a("svg", tt, e[0] || (e[0] = [
|
315
|
-
l("path", {
|
316
|
-
stroke: "none",
|
317
|
-
d: "M0 0h24v24H0z",
|
318
|
-
fill: "none"
|
319
|
-
}, null, -1),
|
320
|
-
l("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),
|
321
|
-
l("path", { d: "M9 12l2 2l4 -4" }, null, -1)
|
322
|
-
]));
|
323
|
-
}
|
324
|
-
const nt = /* @__PURE__ */ g(et, [["render", rt]]), lt = {
|
325
|
-
components: { IconExport: Ye, IconChevronDown: we, IconSuccess: nt },
|
326
|
-
props: {
|
327
|
-
table: String,
|
328
|
-
columns: Array,
|
329
|
-
page: [String, Number],
|
330
|
-
filterCustom: String,
|
331
|
-
filterState: String,
|
332
|
-
filters: String
|
333
|
-
},
|
294
|
+
const Ke = /* @__PURE__ */ m(Ge, [["render", Je]]), Qe = {
|
295
|
+
components: { IconExport: Ke },
|
296
|
+
props: { table: String, columns: Array },
|
334
297
|
data() {
|
335
298
|
return {
|
336
299
|
isOpen: !1,
|
337
300
|
tableFormats: ["json", "csv", "xlsx"],
|
338
301
|
format: "",
|
339
|
-
cols: []
|
340
|
-
activeAction: "",
|
341
|
-
isSuccessTemplate: !1,
|
342
|
-
actions: [
|
343
|
-
{ name: "choceAll", function: this.choceAll, label: "Вибрати усі" },
|
344
|
-
{
|
345
|
-
name: "choceVisible",
|
346
|
-
function: this.choceVisible,
|
347
|
-
label: "Вибрати поточні"
|
348
|
-
},
|
349
|
-
{ name: "clearAll", function: this.clearAll, label: "Жодного" }
|
350
|
-
]
|
302
|
+
cols: []
|
351
303
|
};
|
352
304
|
},
|
353
|
-
watch: {
|
354
|
-
isOpen(t) {
|
355
|
-
t || (this.format = "", this.cols = [], this.activeAction = "", this.isSuccessTemplate = !1);
|
356
|
-
}
|
357
|
-
},
|
358
305
|
methods: {
|
359
306
|
async exportTable() {
|
360
|
-
var t;
|
361
|
-
if (!((t = this.cols) != null && t.length)) {
|
362
|
-
this.$notify({
|
363
|
-
type: "error",
|
364
|
-
title: "Помилка",
|
365
|
-
message: "Оберіть колонки для експорту!"
|
366
|
-
});
|
367
|
-
return;
|
368
|
-
}
|
369
|
-
if (!this.format) {
|
370
|
-
this.$notify({
|
371
|
-
type: "error",
|
372
|
-
title: "Помилка",
|
373
|
-
message: "Оберіть формат!"
|
374
|
-
});
|
375
|
-
return;
|
376
|
-
}
|
377
307
|
try {
|
378
|
-
const
|
308
|
+
const t = await A.get("/api/export", {
|
379
309
|
params: {
|
380
310
|
table: this.table,
|
381
311
|
format: this.format,
|
382
|
-
cols: this.cols.join(",")
|
383
|
-
page: this.page,
|
384
|
-
filter: this.filters || null,
|
385
|
-
state: this.filterState || null,
|
386
|
-
custom: this.filterCustom || null
|
312
|
+
cols: this.cols.join(",")
|
387
313
|
},
|
388
314
|
responseType: "blob"
|
389
|
-
}),
|
315
|
+
}), e = new Blob([t.data], {
|
390
316
|
type: "application/octet-stream"
|
391
|
-
}),
|
392
|
-
|
317
|
+
}), r = window.URL.createObjectURL(e), a = document.createElement("a");
|
318
|
+
a.href = r, a.setAttribute(
|
393
319
|
"download",
|
394
320
|
`${this.table.split(".")[0]}.${this.format}`
|
395
|
-
), document.body.appendChild(
|
321
|
+
), document.body.appendChild(a), a.click(), document.body.removeChild(a), window.URL.revokeObjectURL(r), this.$notify({
|
396
322
|
type: "success",
|
397
323
|
title: "Експорт",
|
398
324
|
message: "Файл успішно експортовано!"
|
399
|
-
})
|
400
|
-
} catch (
|
401
|
-
console.error("Ошибка при экспорте файла:",
|
325
|
+
});
|
326
|
+
} catch (t) {
|
327
|
+
console.error("Ошибка при экспорте файла:", t), this.$notify({
|
402
328
|
type: "error",
|
403
329
|
title: "Помилка",
|
404
330
|
message: "Не вдалося експортувати файл."
|
@@ -407,155 +333,105 @@ const nt = /* @__PURE__ */ g(et, [["render", rt]]), lt = {
|
|
407
333
|
},
|
408
334
|
selectFormat(t) {
|
409
335
|
this.format = t;
|
410
|
-
},
|
411
|
-
choceAll() {
|
412
|
-
var t;
|
413
|
-
this.cols = (t = this.columns) == null ? void 0 : t.map((e) => e == null ? void 0 : e.name), this.activeAction = "choceAll";
|
414
|
-
},
|
415
|
-
clearAll() {
|
416
|
-
this.cols = [], this.activeAction = "clearAll";
|
417
|
-
},
|
418
|
-
choceVisible() {
|
419
|
-
var t, e;
|
420
|
-
this.cols = (e = (t = this.columns) == null ? void 0 : t.filter((r) => (r == null ? void 0 : r.hidden) !== !0)) == null ? void 0 : e.map((r) => r == null ? void 0 : r.name), this.activeAction = "choceVisible";
|
421
336
|
}
|
422
337
|
}
|
423
|
-
}, st = {
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
key: 1,
|
428
|
-
class: "p-4"
|
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 = {
|
430
|
-
key: 0,
|
431
|
-
class: "block h-[8px] w-[8px] rounded-full bg-blue-500"
|
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 = {
|
433
|
-
key: 0,
|
434
|
-
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
435
|
-
}, xt = {
|
436
|
-
key: 1,
|
437
|
-
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
438
|
-
};
|
439
|
-
function yt(t, e, r, i, n, o) {
|
440
|
-
const u = d("IconExport"), b = d("IconChevronDown"), p = d("IconSuccess"), h = d("VsCheckbox"), _ = d("VsDialog");
|
441
|
-
return s(), a(C, null, [
|
338
|
+
}, Xe = { class: "p-4" }, Ye = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, et = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, tt = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, rt = { class: "mt-2 space-y-2" }, nt = ["id", "onChange"], lt = ["for"], st = { class: "flex w-full justify-end p-[20px] gap-[6px] border-t" };
|
339
|
+
function ot(t, e, r, a, n, o) {
|
340
|
+
const d = c("IconExport"), p = c("VsCheckbox"), h = c("VsDialog");
|
341
|
+
return s(), i(C, null, [
|
442
342
|
l("button", {
|
443
|
-
onClick: e[0] || (e[0] = (
|
343
|
+
onClick: e[0] || (e[0] = (u) => n.isOpen = !0),
|
444
344
|
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"
|
445
345
|
}, [
|
446
|
-
|
346
|
+
b(d, {
|
447
347
|
height: "16",
|
448
348
|
width: "16"
|
449
349
|
}),
|
450
|
-
e[
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
350
|
+
e[4] || (e[4] = F(" Експорт ")),
|
351
|
+
e[5] || (e[5] = l("svg", {
|
352
|
+
class: "shrink-0 size-3.5",
|
353
|
+
xmlns: "http://www.w3.org/2000/svg",
|
354
|
+
width: "24",
|
355
|
+
height: "24",
|
356
|
+
viewBox: "0 0 24 24",
|
357
|
+
fill: "none",
|
358
|
+
stroke: "currentColor",
|
359
|
+
"stroke-width": "2",
|
360
|
+
"stroke-linecap": "round",
|
361
|
+
"stroke-linejoin": "round"
|
362
|
+
}, [
|
363
|
+
l("path", { d: "m6 9 6 6 6-6" })
|
364
|
+
], -1))
|
455
365
|
]),
|
456
|
-
|
366
|
+
b(h, {
|
457
367
|
visible: n.isOpen,
|
458
|
-
"onUpdate:visible": e[
|
368
|
+
"onUpdate:visible": e[3] || (e[3] = (u) => n.isOpen = u),
|
459
369
|
title: "Експорт таблиці",
|
460
|
-
size: "small"
|
461
|
-
closeClickBack: !0
|
370
|
+
size: "small"
|
462
371
|
}, {
|
463
|
-
footer:
|
464
|
-
|
465
|
-
l("button", {
|
466
|
-
type: "button",
|
467
|
-
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",
|
468
|
-
onClick: e[2] || (e[2] = (c) => n.isOpen = !1)
|
469
|
-
}, " Закрити "),
|
470
|
-
l("button", {
|
372
|
+
footer: y(() => [
|
373
|
+
l("div", st, [
|
374
|
+
e[8] || (e[8] = l("button", {
|
471
375
|
type: "button",
|
472
|
-
class: "
|
473
|
-
|
474
|
-
}, "
|
475
|
-
])) : (s(), a("div", xt, [
|
376
|
+
class: "py-2 px-3 text-nowrap inline-flex justify-center items-center text-start bg-white border border-gray-200 text-gray-800 text-sm font-medium rounded-lg shadow-sm align-middle 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",
|
377
|
+
"data-hs-overlay": "#hs-pro-decm"
|
378
|
+
}, " Скасувати ", -1)),
|
476
379
|
l("button", {
|
477
380
|
type: "button",
|
478
|
-
class: "inline-flex
|
479
|
-
onClick: e[
|
480
|
-
}, " Скасувати "),
|
481
|
-
l("button", {
|
482
|
-
type: "button",
|
483
|
-
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",
|
484
|
-
onClick: e[5] || (e[5] = (...c) => o.exportTable && o.exportTable(...c))
|
381
|
+
class: "py-2 px-3 text-nowrap inline-flex justify-center items-center gap-x-2 text-start bg-blue-600 border border-blue-600 text-white text-sm font-medium rounded-lg shadow-sm align-middle 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",
|
382
|
+
onClick: e[2] || (e[2] = (...u) => o.exportTable && o.exportTable(...u))
|
485
383
|
}, " Завантажити таблицю ")
|
486
|
-
])
|
384
|
+
])
|
487
385
|
]),
|
488
|
-
default:
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
e[8] || (e[8] = l("h2", null, "Звіт сформовано і збережено", -1))
|
496
|
-
])) : (s(), a("div", ot, [
|
497
|
-
l("div", at, [
|
498
|
-
l("div", it, [
|
499
|
-
e[9] || (e[9] = l("h2", { class: "text-sm text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
500
|
-
l("div", ct, [
|
501
|
-
(s(!0), a(C, null, I(n.actions, (c) => (s(), a("button", {
|
502
|
-
key: c == null ? void 0 : c.name,
|
503
|
-
onClick: c == null ? void 0 : c.function,
|
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"
|
505
|
-
}, [
|
506
|
-
l("span", {
|
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 }])
|
508
|
-
}, [
|
509
|
-
(c == null ? void 0 : c.name) === n.activeAction ? (s(), a("span", dt)) : w("", !0)
|
510
|
-
], 2),
|
511
|
-
D(" " + $(c == null ? void 0 : c.label), 1)
|
512
|
-
], 8, ut))), 128))
|
513
|
-
])
|
514
|
-
]),
|
515
|
-
l("div", ht, [
|
516
|
-
(s(!0), a(C, null, I(r.columns, (c, x) => (s(), a("div", {
|
386
|
+
default: y(() => [
|
387
|
+
e[9] || (e[9] = l("div", { class: "dark:border-neutral-700" }, null, -1)),
|
388
|
+
l("div", Xe, [
|
389
|
+
l("div", Ye, [
|
390
|
+
e[6] || (e[6] = l("h2", { class: "text-sm text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
391
|
+
l("div", et, [
|
392
|
+
(s(!0), i(C, null, T(r.columns, (u, _) => (s(), i("div", {
|
517
393
|
class: "flex items-center",
|
518
|
-
key:
|
394
|
+
key: _,
|
519
395
|
style: { width: "calc((100% - 10px) / 2)" }
|
520
396
|
}, [
|
521
|
-
|
397
|
+
b(p, {
|
522
398
|
class: "[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",
|
523
399
|
modelValue: n.cols,
|
524
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
525
|
-
value:
|
526
|
-
label:
|
400
|
+
"onUpdate:modelValue": e[1] || (e[1] = (w) => n.cols = w),
|
401
|
+
value: u == null ? void 0 : u.name,
|
402
|
+
label: u == null ? void 0 : u.ua
|
527
403
|
}, null, 8, ["modelValue", "value", "label"])
|
528
404
|
]))), 128))
|
529
405
|
])
|
530
406
|
]),
|
531
|
-
l("div",
|
532
|
-
e[
|
533
|
-
l("div",
|
534
|
-
(s(!0),
|
407
|
+
l("div", tt, [
|
408
|
+
e[7] || (e[7] = l("h2", { class: "text-sm text-gray-500" }, "Виберіть формат таблиці:", -1)),
|
409
|
+
l("div", rt, [
|
410
|
+
(s(!0), i(C, null, T(n.tableFormats, (u, _) => (s(), i("div", {
|
535
411
|
class: "flex items-center",
|
536
|
-
key:
|
412
|
+
key: _
|
537
413
|
}, [
|
538
414
|
l("input", {
|
539
415
|
type: "radio",
|
540
416
|
name: "hs-pro-duecmfm",
|
541
|
-
class: "
|
542
|
-
id:
|
543
|
-
onChange: (
|
544
|
-
}, null, 40,
|
417
|
+
class: "shrink-0 border-gray-300 rounded-full text-blue-600 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",
|
418
|
+
id: u,
|
419
|
+
onChange: (w) => o.selectFormat(u)
|
420
|
+
}, null, 40, nt),
|
545
421
|
l("label", {
|
546
|
-
for:
|
422
|
+
for: u,
|
547
423
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
548
|
-
}, " Формат " +
|
424
|
+
}, " Формат " + I(u), 9, lt)
|
549
425
|
]))), 128))
|
550
426
|
])
|
551
427
|
])
|
552
|
-
])
|
428
|
+
])
|
553
429
|
]),
|
554
430
|
_: 1
|
555
431
|
}, 8, ["visible"])
|
556
432
|
], 64);
|
557
433
|
}
|
558
|
-
const
|
434
|
+
const at = /* @__PURE__ */ m(Qe, [["render", ot]]), it = {}, ct = {
|
559
435
|
xmlns: "http://www.w3.org/2000/svg",
|
560
436
|
viewBox: "0 0 24 24",
|
561
437
|
fill: "none",
|
@@ -565,12 +441,12 @@ const _t = /* @__PURE__ */ g(lt, [["render", yt]]), kt = {}, vt = {
|
|
565
441
|
"stroke-linejoin": "round",
|
566
442
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
567
443
|
};
|
568
|
-
function
|
569
|
-
return s(),
|
444
|
+
function dt(t, e, r, a, n, o) {
|
445
|
+
return s(), i("svg", ct, e[0] || (e[0] = [
|
570
446
|
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)
|
571
447
|
]));
|
572
448
|
}
|
573
|
-
const
|
449
|
+
const ut = /* @__PURE__ */ m(it, [["render", dt]]), ht = {
|
574
450
|
props: { column: Object },
|
575
451
|
emits: ["update-column"],
|
576
452
|
data() {
|
@@ -587,51 +463,51 @@ const Ct = /* @__PURE__ */ g(kt, [["render", wt]]), $t = {
|
|
587
463
|
var t;
|
588
464
|
((t = this.column) == null ? void 0 : t.hidden) !== !0 && (this.value = !0);
|
589
465
|
}
|
590
|
-
},
|
591
|
-
function
|
592
|
-
var
|
593
|
-
return s(),
|
594
|
-
|
595
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
466
|
+
}, pt = { class: "flex w-full gap-[8px] items-centr" };
|
467
|
+
function bt(t, e, r, a, n, o) {
|
468
|
+
var d, p;
|
469
|
+
return s(), i("label", pt, [
|
470
|
+
z(l("input", {
|
471
|
+
"onUpdate:modelValue": e[0] || (e[0] = (h) => n.value = h),
|
596
472
|
type: "checkbox"
|
597
473
|
}, null, 512), [
|
598
|
-
[
|
474
|
+
[xe, n.value]
|
599
475
|
]),
|
600
|
-
|
476
|
+
F(" " + I(((d = r.column) == null ? void 0 : d.ua) || ((p = r.column) == null ? void 0 : p.title)), 1)
|
601
477
|
]);
|
602
478
|
}
|
603
|
-
const
|
604
|
-
components: { IconColumns:
|
479
|
+
const ft = /* @__PURE__ */ m(ht, [["render", bt]]), mt = {
|
480
|
+
components: { IconColumns: ut, AdminTableColumnsHiddenItem: ft },
|
605
481
|
emits: ["update-columns"],
|
606
482
|
props: { columns: Array },
|
607
483
|
methods: {
|
608
484
|
updateColumn(t) {
|
609
|
-
const e = this.columns.findIndex((
|
485
|
+
const e = this.columns.findIndex((a) => (a == null ? void 0 : a.name) === (t == null ? void 0 : t.name)), r = this.columns;
|
610
486
|
r[e] = t, this.$emit("update-columns", [...r]);
|
611
487
|
}
|
612
488
|
}
|
613
|
-
},
|
614
|
-
function
|
615
|
-
const
|
616
|
-
return s(),
|
489
|
+
}, gt = { 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" }, xt = { class: "py-[10px] px-[10px] w-[260px]" }, yt = { 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" };
|
490
|
+
function _t(t, e, r, a, n, o) {
|
491
|
+
const d = c("IconColumns"), p = c("AdminTableColumnsHiddenItem"), h = c("VsPopover");
|
492
|
+
return s(), x(h, {
|
617
493
|
trigger: "click",
|
618
494
|
placement: "bottom"
|
619
495
|
}, {
|
620
|
-
reference:
|
621
|
-
l("button",
|
622
|
-
|
496
|
+
reference: y(() => [
|
497
|
+
l("button", gt, [
|
498
|
+
b(d, {
|
623
499
|
height: "20",
|
624
500
|
width: "16"
|
625
501
|
})
|
626
502
|
])
|
627
503
|
]),
|
628
|
-
default:
|
629
|
-
l("div",
|
504
|
+
default: y(() => [
|
505
|
+
l("div", xt, [
|
630
506
|
e[0] || (e[0] = l("h2", { class: "text-sm mb-[8px]" }, "Оберіть колонки, щоб приховати", -1)),
|
631
|
-
l("ul",
|
632
|
-
(s(!0),
|
633
|
-
|
634
|
-
column:
|
507
|
+
l("ul", yt, [
|
508
|
+
(s(!0), i(C, null, T(r.columns, (u, _) => (s(), i("li", { key: _ }, [
|
509
|
+
b(p, {
|
510
|
+
column: u,
|
635
511
|
onUpdateColumn: o.updateColumn
|
636
512
|
}, null, 8, ["column", "onUpdateColumn"])
|
637
513
|
]))), 128))
|
@@ -641,14 +517,14 @@ function Mt(t, e, r, i, n, o) {
|
|
641
517
|
_: 1
|
642
518
|
});
|
643
519
|
}
|
644
|
-
const
|
520
|
+
const kt = /* @__PURE__ */ m(mt, [["render", _t]]), wt = {}, vt = {
|
645
521
|
class: "hidden sm:block shrink-0 size-3",
|
646
522
|
xmlns: "http://www.w3.org/2000/svg",
|
647
523
|
fill: "currentColor",
|
648
524
|
viewBox: "0 0 16 16"
|
649
525
|
};
|
650
|
-
function
|
651
|
-
return s(),
|
526
|
+
function Ct(t, e, r, a, n, o) {
|
527
|
+
return s(), i("svg", vt, e[0] || (e[0] = [
|
652
528
|
l("path", {
|
653
529
|
"fill-rule": "evenodd",
|
654
530
|
"clip-rule": "evenodd",
|
@@ -656,30 +532,30 @@ function Bt(t, e, r, i, n, o) {
|
|
656
532
|
}, null, -1)
|
657
533
|
]));
|
658
534
|
}
|
659
|
-
const
|
660
|
-
function
|
661
|
-
return s(),
|
535
|
+
const le = /* @__PURE__ */ m(wt, [["render", Ct]]), $t = {}, It = { class: "vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden" };
|
536
|
+
function Tt(t, e, r, a, n, o) {
|
537
|
+
return s(), i("div", It, e[0] || (e[0] = [
|
662
538
|
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)
|
663
539
|
]));
|
664
540
|
}
|
665
|
-
const
|
541
|
+
const St = /* @__PURE__ */ m($t, [["render", Tt]]), Vt = {
|
666
542
|
props: { row: Object, column: Object, table: String }
|
667
543
|
};
|
668
|
-
function
|
669
|
-
var
|
670
|
-
return s(),
|
671
|
-
((
|
544
|
+
function At(t, e, r, a, n, o) {
|
545
|
+
var d, p, h, u, _, w, k, $;
|
546
|
+
return s(), x(ye(
|
547
|
+
((d = r.column) == null ? void 0 : d.format) === "custom" ? (p = r.column) == null ? void 0 : p.component : t.$componentsConfig[`table-format-${((u = (h = r.column) == null ? void 0 : h.format) == null ? void 0 : u.toLowerCase()) || "text"}`]
|
672
548
|
), {
|
673
|
-
onUpdateTable: e[0] || (e[0] = (
|
549
|
+
onUpdateTable: e[0] || (e[0] = (g) => t.$emit("update-table")),
|
674
550
|
name: (_ = r.column) == null ? void 0 : _.name,
|
675
551
|
data: r.row,
|
676
|
-
value: (
|
552
|
+
value: (k = r.row) == null ? void 0 : k[(w = r.column) == null ? void 0 : w.name],
|
677
553
|
table: r.table,
|
678
554
|
column: r.column,
|
679
|
-
edit: (
|
555
|
+
edit: ($ = r.column) == null ? void 0 : $.edit
|
680
556
|
}, null, 40, ["name", "data", "value", "table", "column", "edit"]);
|
681
557
|
}
|
682
|
-
const
|
558
|
+
const se = /* @__PURE__ */ m(Vt, [["render", At]]), Ft = {}, Dt = {
|
683
559
|
xmlns: "http://www.w3.org/2000/svg",
|
684
560
|
viewBox: "0 0 24 24",
|
685
561
|
fill: "none",
|
@@ -689,8 +565,8 @@ const ae = /* @__PURE__ */ g(Et, [["render", Nt]]), Ht = {}, Wt = {
|
|
689
565
|
"stroke-linejoin": "round",
|
690
566
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-minus"
|
691
567
|
};
|
692
|
-
function
|
693
|
-
return s(),
|
568
|
+
function Mt(t, e, r, a, n, o) {
|
569
|
+
return s(), i("svg", Dt, e[0] || (e[0] = [
|
694
570
|
l("path", {
|
695
571
|
stroke: "none",
|
696
572
|
d: "M0 0h24v24H0z",
|
@@ -699,41 +575,41 @@ function Rt(t, e, r, i, n, o) {
|
|
699
575
|
l("path", { d: "M5 12l14 0" }, null, -1)
|
700
576
|
]));
|
701
577
|
}
|
702
|
-
const
|
703
|
-
components: { IconPlus:
|
578
|
+
const jt = /* @__PURE__ */ m(Ft, [["render", Mt]]), zt = {
|
579
|
+
components: { IconPlus: le, IconMinus: jt },
|
704
580
|
props: { title: String },
|
705
581
|
data() {
|
706
582
|
return { expanded: !1 };
|
707
583
|
}
|
708
|
-
},
|
709
|
-
function
|
710
|
-
const
|
711
|
-
return s(),
|
584
|
+
}, Pt = { class: "hs-accordion" }, qt = { class: "py-0.5 flex items-center gap-x-0.5 w-full" }, Bt = { class: "text-sm font-medium" }, Lt = { class: "w-full duration-150 before:block before:absolute relative inline-block b cursor-pointer" };
|
585
|
+
function Ut(t, e, r, a, n, o) {
|
586
|
+
const d = c("IconPlus"), p = c("IconMinus");
|
587
|
+
return s(), i("div", null, [
|
712
588
|
l("div", null, [
|
713
|
-
l("div",
|
714
|
-
l("div",
|
589
|
+
l("div", Pt, [
|
590
|
+
l("div", qt, [
|
715
591
|
l("div", {
|
716
|
-
onClick: e[0] || (e[0] = (
|
592
|
+
onClick: e[0] || (e[0] = (h) => n.expanded = !n.expanded),
|
717
593
|
class: "grow rounded-md cursor-pointer"
|
718
594
|
}, [
|
719
|
-
l("span",
|
595
|
+
l("span", Bt, I(r.title), 1)
|
720
596
|
]),
|
721
597
|
l("button", {
|
722
598
|
class: "size-6 flex justify-center items-center hover:bg-gray-100 rounded-md",
|
723
|
-
onClick: e[1] || (e[1] = (
|
599
|
+
onClick: e[1] || (e[1] = (h) => n.expanded = !n.expanded)
|
724
600
|
}, [
|
725
|
-
n.expanded ? (s(),
|
601
|
+
n.expanded ? (s(), x(p, {
|
726
602
|
key: 1,
|
727
603
|
width: "14"
|
728
|
-
})) : (s(),
|
604
|
+
})) : (s(), x(d, { key: 0 }))
|
729
605
|
])
|
730
606
|
]),
|
731
|
-
|
732
|
-
default:
|
733
|
-
|
734
|
-
|
607
|
+
b(P, { name: "fade" }, {
|
608
|
+
default: y(() => [
|
609
|
+
z(l("div", Lt, [
|
610
|
+
_e(t.$slots, "default", {}, void 0, !0)
|
735
611
|
], 512), [
|
736
|
-
[
|
612
|
+
[ne, n.expanded]
|
737
613
|
])
|
738
614
|
]),
|
739
615
|
_: 3
|
@@ -742,47 +618,47 @@ function Yt(t, e, r, i, n, o) {
|
|
742
618
|
])
|
743
619
|
]);
|
744
620
|
}
|
745
|
-
const
|
621
|
+
const Ot = /* @__PURE__ */ m(zt, [["render", Ut], ["__scopeId", "data-v-4139bc00"]]), Et = {
|
746
622
|
components: {
|
747
|
-
AdminComponentIs:
|
748
|
-
AdminTree:
|
749
|
-
VsNoData:
|
750
|
-
VsWidgetComments:
|
751
|
-
VsWidgetMap:
|
752
|
-
VsWidgetFileList:
|
623
|
+
AdminComponentIs: se,
|
624
|
+
AdminTree: Ot,
|
625
|
+
VsNoData: he,
|
626
|
+
VsWidgetComments: pe,
|
627
|
+
VsWidgetMap: be,
|
628
|
+
VsWidgetFileList: fe
|
753
629
|
},
|
754
630
|
props: { table: String, columns: Array, row: Object }
|
755
|
-
},
|
631
|
+
}, Nt = {
|
756
632
|
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",
|
757
633
|
style: { height: "calc(100vh - 310px)" }
|
758
|
-
},
|
634
|
+
}, Ht = {
|
759
635
|
class: "border-l",
|
760
636
|
style: { height: "calc(100vh - 360px)" }
|
761
|
-
},
|
762
|
-
function
|
763
|
-
var
|
764
|
-
const
|
765
|
-
return s(),
|
637
|
+
}, Wt = { class: "flex items-center justify-between py-1 gap-x-4" }, Rt = { class: "col-span-1" }, Gt = { class: "inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500" }, Zt = { class: "col-span-2" }, Jt = { class: "font-medium text-[13px] text-gray-800 dark:text-neutral-200" }, Kt = { class: "table-info-card" }, Qt = { class: "table-info-card" };
|
638
|
+
function Xt(t, e, r, a, n, o) {
|
639
|
+
var k, $;
|
640
|
+
const d = c("AdminComponentIs"), p = c("AdminTree"), h = c("VsWidgetMap"), u = c("VsNoData"), _ = c("VsWidgetComments"), w = c("VsWidgetFileList");
|
641
|
+
return s(), i("div", Nt, [
|
766
642
|
e[0] || (e[0] = l("div", { class: "p-[10px] pl-[18px] pb-[18px] border-b" }, [
|
767
643
|
l("h2", { class: "text-sm font-medium" }, "Інформація про об'єкт")
|
768
644
|
], -1)),
|
769
|
-
l("div",
|
770
|
-
(
|
771
|
-
r.row ? (s(),
|
645
|
+
l("div", Ht, [
|
646
|
+
($ = (k = t.$route) == null ? void 0 : k.query) != null && $.card ? (s(), i(C, { key: 0 }, [
|
647
|
+
r.row ? (s(), x(p, {
|
772
648
|
key: 0,
|
773
649
|
title: "Основна інформація",
|
774
650
|
class: "border-b p-[10px] py-[16px]"
|
775
651
|
}, {
|
776
|
-
default:
|
777
|
-
(s(!0),
|
778
|
-
l("dt",
|
779
|
-
l("p",
|
652
|
+
default: y(() => [
|
653
|
+
(s(!0), i(C, null, T(r.columns, (g) => (s(), i("dl", Wt, [
|
654
|
+
l("dt", Rt, [
|
655
|
+
l("p", Gt, I((g == null ? void 0 : g.ua) || (g == null ? void 0 : g.title)) + ": ", 1)
|
780
656
|
]),
|
781
|
-
l("dd",
|
782
|
-
l("p",
|
783
|
-
|
657
|
+
l("dd", Zt, [
|
658
|
+
l("p", Jt, [
|
659
|
+
b(d, {
|
784
660
|
row: r.row,
|
785
|
-
column:
|
661
|
+
column: g,
|
786
662
|
table: r.table
|
787
663
|
}, null, 8, ["row", "column", "table"])
|
788
664
|
])
|
@@ -790,19 +666,19 @@ function dr(t, e, r, i, n, o) {
|
|
790
666
|
]))), 256))
|
791
667
|
]),
|
792
668
|
_: 1
|
793
|
-
})) :
|
794
|
-
|
669
|
+
})) : v("", !0),
|
670
|
+
b(p, {
|
795
671
|
title: "Карта",
|
796
672
|
class: "border-b p-[10px] py-[16px]"
|
797
673
|
}, {
|
798
|
-
default:
|
799
|
-
var
|
674
|
+
default: y(() => {
|
675
|
+
var g, V;
|
800
676
|
return [
|
801
|
-
(
|
677
|
+
(g = r.row) != null && g.geom ? (s(), x(h, {
|
802
678
|
key: 0,
|
803
679
|
geometry: (V = r.row) == null ? void 0 : V.geom,
|
804
680
|
zoom: 14
|
805
|
-
}, null, 8, ["geometry"])) : (s(),
|
681
|
+
}, null, 8, ["geometry"])) : (s(), x(u, {
|
806
682
|
key: 1,
|
807
683
|
title: "У об'єкта відсутня геометрія",
|
808
684
|
text: "",
|
@@ -812,46 +688,46 @@ function dr(t, e, r, i, n, o) {
|
|
812
688
|
}),
|
813
689
|
_: 1
|
814
690
|
}),
|
815
|
-
|
691
|
+
b(p, {
|
816
692
|
title: "Коментарі",
|
817
693
|
class: "border-b p-[10px] py-[16px]"
|
818
694
|
}, {
|
819
|
-
default:
|
820
|
-
var
|
695
|
+
default: y(() => {
|
696
|
+
var g;
|
821
697
|
return [
|
822
|
-
l("div",
|
823
|
-
|
824
|
-
id: (
|
698
|
+
l("div", Kt, [
|
699
|
+
b(_, {
|
700
|
+
id: (g = r.row) == null ? void 0 : g.id
|
825
701
|
}, null, 8, ["id"])
|
826
702
|
])
|
827
703
|
];
|
828
704
|
}),
|
829
705
|
_: 1
|
830
706
|
}),
|
831
|
-
|
707
|
+
b(p, {
|
832
708
|
title: "Файли",
|
833
709
|
class: "border-b p-[10px] py-[16px]"
|
834
710
|
}, {
|
835
|
-
default:
|
836
|
-
var
|
711
|
+
default: y(() => {
|
712
|
+
var g;
|
837
713
|
return [
|
838
|
-
l("div",
|
839
|
-
|
840
|
-
id: (
|
714
|
+
l("div", Qt, [
|
715
|
+
b(w, {
|
716
|
+
id: (g = r.row) == null ? void 0 : g.id
|
841
717
|
}, null, 8, ["id"])
|
842
718
|
])
|
843
719
|
];
|
844
720
|
}),
|
845
721
|
_: 1
|
846
722
|
})
|
847
|
-
], 64)) : (s(),
|
723
|
+
], 64)) : (s(), x(u, {
|
848
724
|
key: 1,
|
849
725
|
text: "Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"
|
850
726
|
}))
|
851
727
|
])
|
852
728
|
]);
|
853
729
|
}
|
854
|
-
const
|
730
|
+
const Yt = /* @__PURE__ */ m(Et, [["render", Xt]]), er = {}, tr = {
|
855
731
|
class: "hidden xl:block shrink-0 size-4",
|
856
732
|
xmlns: "http://www.w3.org/2000/svg",
|
857
733
|
viewBox: "0 0 24 24",
|
@@ -861,8 +737,8 @@ const hr = /* @__PURE__ */ g(tr, [["render", dr]]), pr = {}, br = {
|
|
861
737
|
"stroke-linecap": "round",
|
862
738
|
"stroke-linejoin": "round"
|
863
739
|
};
|
864
|
-
function
|
865
|
-
return s(),
|
740
|
+
function rr(t, e, r, a, n, o) {
|
741
|
+
return s(), i("svg", tr, e[0] || (e[0] = [
|
866
742
|
l("rect", {
|
867
743
|
width: "18",
|
868
744
|
height: "18",
|
@@ -874,7 +750,7 @@ function fr(t, e, r, i, n, o) {
|
|
874
750
|
l("path", { d: "m8 9 3 3-3 3" }, null, -1)
|
875
751
|
]));
|
876
752
|
}
|
877
|
-
const
|
753
|
+
const nr = /* @__PURE__ */ m(er, [["render", rr]]), lr = {}, sr = {
|
878
754
|
class: "h21yx vs0hq",
|
879
755
|
xmlns: "http://www.w3.org/2000/svg",
|
880
756
|
width: "24",
|
@@ -886,15 +762,14 @@ const mr = /* @__PURE__ */ g(pr, [["render", fr]]), gr = {}, xr = {
|
|
886
762
|
"stroke-linecap": "round",
|
887
763
|
"stroke-linejoin": "round"
|
888
764
|
};
|
889
|
-
function
|
890
|
-
return s(),
|
765
|
+
function or(t, e, r, a, n, o) {
|
766
|
+
return s(), i("svg", sr, e[0] || (e[0] = [
|
891
767
|
j('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>', 9)
|
892
768
|
]));
|
893
769
|
}
|
894
|
-
const
|
895
|
-
emits: ["filterChange"],
|
770
|
+
const ar = /* @__PURE__ */ m(lr, [["render", or]]), ir = {
|
896
771
|
props: { scheme: { type: Object }, onFilters: { type: Number } },
|
897
|
-
components: { IconFilter:
|
772
|
+
components: { IconFilter: ar },
|
898
773
|
data() {
|
899
774
|
return {
|
900
775
|
isFilters: !1
|
@@ -905,35 +780,35 @@ const _r = /* @__PURE__ */ g(gr, [["render", yr]]), kr = {
|
|
905
780
|
this.isFilters && t.classList.contains("filter-container") && (this.isFilters = !1);
|
906
781
|
}
|
907
782
|
}
|
908
|
-
},
|
783
|
+
}, cr = {
|
909
784
|
key: 0,
|
910
785
|
class: "font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"
|
911
|
-
},
|
912
|
-
function
|
913
|
-
const
|
914
|
-
return s(),
|
786
|
+
}, dr = { 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" };
|
787
|
+
function ur(t, e, r, a, n, o) {
|
788
|
+
const d = c("IconFilter"), p = c("VsFilter");
|
789
|
+
return s(), i(C, null, [
|
915
790
|
l("button", {
|
916
|
-
onClick: e[0] || (e[0] = (
|
791
|
+
onClick: e[0] || (e[0] = (h) => n.isFilters = !n.isFilters),
|
917
792
|
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"
|
918
793
|
}, [
|
919
|
-
|
794
|
+
b(d, {
|
920
795
|
height: "16",
|
921
796
|
width: "16"
|
922
797
|
}),
|
923
|
-
e[4] || (e[4] =
|
924
|
-
r.onFilters ? (s(),
|
798
|
+
e[4] || (e[4] = F(" Фільтри ")),
|
799
|
+
r.onFilters ? (s(), i("span", cr, I(r.onFilters), 1)) : v("", !0)
|
925
800
|
]),
|
926
|
-
|
927
|
-
default:
|
928
|
-
var
|
801
|
+
b(P, { name: "fade" }, {
|
802
|
+
default: y(() => {
|
803
|
+
var h;
|
929
804
|
return [
|
930
|
-
|
931
|
-
onClick: e[3] || (e[3] = (...
|
805
|
+
z(l("div", {
|
806
|
+
onClick: e[3] || (e[3] = (...u) => o.closeFilter && o.closeFilter(...u)),
|
932
807
|
style: { height: "100vh" },
|
933
808
|
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)]"
|
934
809
|
}, [
|
935
|
-
l("div",
|
936
|
-
(
|
810
|
+
l("div", dr, [
|
811
|
+
(h = r.scheme) != null && h.length ? (s(), x(p, {
|
937
812
|
key: 0,
|
938
813
|
ref: "filter",
|
939
814
|
scheme: r.scheme,
|
@@ -941,13 +816,13 @@ function Cr(t, e, r, i, n, o) {
|
|
941
816
|
"apply-vue-router": "",
|
942
817
|
history: "",
|
943
818
|
name: "filter",
|
944
|
-
onFilterChange: e[1] || (e[1] = (
|
819
|
+
onFilterChange: e[1] || (e[1] = (u) => t.$emit("filterChange", u)),
|
945
820
|
closeFilterBtn: !0,
|
946
|
-
onFilterClose: e[2] || (e[2] = (
|
947
|
-
}, null, 8, ["scheme"])) :
|
821
|
+
onFilterClose: e[2] || (e[2] = (u) => n.isFilters = !1)
|
822
|
+
}, null, 8, ["scheme"])) : v("", !0)
|
948
823
|
])
|
949
824
|
], 512), [
|
950
|
-
[
|
825
|
+
[ne, n.isFilters]
|
951
826
|
])
|
952
827
|
];
|
953
828
|
}),
|
@@ -955,25 +830,25 @@ function Cr(t, e, r, i, n, o) {
|
|
955
830
|
})
|
956
831
|
], 64);
|
957
832
|
}
|
958
|
-
const
|
833
|
+
const hr = /* @__PURE__ */ m(ir, [["render", ur]]), pr = {
|
959
834
|
props: { tabsList: { type: Array, default: () => [] }, filterState: String }
|
960
|
-
},
|
835
|
+
}, br = {
|
961
836
|
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",
|
962
837
|
"aria-label": "Tabs",
|
963
838
|
role: "tablist",
|
964
839
|
"aria-orientation": "horizontal"
|
965
|
-
},
|
966
|
-
function
|
967
|
-
return s(),
|
968
|
-
(s(!0),
|
969
|
-
onClick: (
|
970
|
-
class:
|
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": (
|
840
|
+
}, fr = ["onClick"];
|
841
|
+
function mr(t, e, r, a, n, o) {
|
842
|
+
return s(), i("nav", br, [
|
843
|
+
(s(!0), i(C, null, T(r.tabsList, (d) => (s(), i("button", {
|
844
|
+
onClick: (p) => t.$emit("update:filterState", d == null ? void 0 : d.name),
|
845
|
+
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", {
|
846
|
+
" 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": (d == null ? void 0 : d.name) === r.filterState
|
972
847
|
}])
|
973
|
-
},
|
848
|
+
}, I(d == null ? void 0 : d.label), 11, fr))), 256))
|
974
849
|
]);
|
975
850
|
}
|
976
|
-
const
|
851
|
+
const gr = /* @__PURE__ */ m(pr, [["render", mr]]), xr = {}, yr = {
|
977
852
|
xmlns: "http://www.w3.org/2000/svg",
|
978
853
|
viewBox: "0 0 24 24",
|
979
854
|
fill: "none",
|
@@ -983,8 +858,8 @@ const Vr = /* @__PURE__ */ g(Sr, [["render", Tr]]), Dr = {}, Fr = {
|
|
983
858
|
"stroke-linejoin": "round",
|
984
859
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-filter"
|
985
860
|
};
|
986
|
-
function
|
987
|
-
return s(),
|
861
|
+
function _r(t, e, r, a, n, o) {
|
862
|
+
return s(), i("svg", yr, e[0] || (e[0] = [
|
988
863
|
l("path", {
|
989
864
|
stroke: "none",
|
990
865
|
d: "M0 0h24v24H0z",
|
@@ -993,39 +868,39 @@ function Mr(t, e, r, i, n, o) {
|
|
993
868
|
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)
|
994
869
|
]));
|
995
870
|
}
|
996
|
-
const
|
997
|
-
components: { IconFilter2:
|
871
|
+
const kr = /* @__PURE__ */ m(xr, [["render", _r]]), wr = {
|
872
|
+
components: { IconFilter2: kr },
|
998
873
|
props: { filterCustom: String, customList: Array }
|
999
|
-
},
|
1000
|
-
function
|
1001
|
-
const
|
1002
|
-
return s(),
|
874
|
+
}, vr = { 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" }, Cr = { class: "flex flex-col gap-[4px]" }, $r = ["onClick"];
|
875
|
+
function Ir(t, e, r, a, n, o) {
|
876
|
+
const d = c("IconFilter2"), p = c("VsPopover");
|
877
|
+
return s(), x(p, {
|
1003
878
|
ref: "popover",
|
1004
879
|
placement: "bottom"
|
1005
880
|
}, {
|
1006
|
-
reference:
|
1007
|
-
l("button",
|
1008
|
-
|
881
|
+
reference: y(() => [
|
882
|
+
l("button", vr, [
|
883
|
+
b(d, {
|
1009
884
|
height: "20",
|
1010
885
|
width: "20"
|
1011
886
|
})
|
1012
887
|
])
|
1013
888
|
]),
|
1014
|
-
default:
|
1015
|
-
l("div",
|
1016
|
-
(s(!0),
|
889
|
+
default: y(() => [
|
890
|
+
l("div", Cr, [
|
891
|
+
(s(!0), i(C, null, T(r.customList, (h, u) => (s(), i("button", {
|
1017
892
|
onClick: (_) => {
|
1018
|
-
var
|
1019
|
-
t.$emit("update:filterCustom",
|
893
|
+
var w;
|
894
|
+
t.$emit("update:filterCustom", h == null ? void 0 : h.name), (w = t.$refs) == null || w.popover.togglePopover();
|
1020
895
|
},
|
1021
|
-
key:
|
1022
|
-
class:
|
1023
|
-
},
|
896
|
+
key: u,
|
897
|
+
class: S(["p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300", { "bg-gray-100": r.filterCustom === (h == null ? void 0 : h.name) }])
|
898
|
+
}, I(h == null ? void 0 : h.label), 11, $r))), 128)),
|
1024
899
|
l("button", {
|
1025
900
|
class: "p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300",
|
1026
|
-
onClick: e[0] || (e[0] = (
|
1027
|
-
var
|
1028
|
-
t.$emit("update:filterCustom", void 0), (
|
901
|
+
onClick: e[0] || (e[0] = (h) => {
|
902
|
+
var u;
|
903
|
+
t.$emit("update:filterCustom", void 0), (u = t.$refs) == null || u.popover.togglePopover();
|
1029
904
|
})
|
1030
905
|
}, " Скинути фільтри ")
|
1031
906
|
])
|
@@ -1033,22 +908,22 @@ function Lr(t, e, r, i, n, o) {
|
|
1033
908
|
_: 1
|
1034
909
|
}, 512);
|
1035
910
|
}
|
1036
|
-
const
|
911
|
+
const Tr = /* @__PURE__ */ m(wr, [["render", Ir]]), Sr = {
|
1037
912
|
props: { table: String, title: String },
|
1038
913
|
components: {
|
1039
|
-
AdminTableControl:
|
1040
|
-
AdminTableExport:
|
1041
|
-
AdminTableColumnsHidden:
|
1042
|
-
AdminTableColumn:
|
1043
|
-
AdminNodata:
|
1044
|
-
IconPlus:
|
1045
|
-
IconSearch:
|
1046
|
-
AdminTableCardInfo:
|
1047
|
-
IconOpenCard:
|
1048
|
-
AdminComponentIs:
|
1049
|
-
AdminTableFilters:
|
1050
|
-
AdminTableTabs:
|
1051
|
-
AdminTableCustomFilters:
|
914
|
+
AdminTableControl: Re,
|
915
|
+
AdminTableExport: at,
|
916
|
+
AdminTableColumnsHidden: kt,
|
917
|
+
AdminTableColumn: Se,
|
918
|
+
AdminNodata: St,
|
919
|
+
IconPlus: le,
|
920
|
+
IconSearch: me,
|
921
|
+
AdminTableCardInfo: Yt,
|
922
|
+
IconOpenCard: nr,
|
923
|
+
AdminComponentIs: se,
|
924
|
+
AdminTableFilters: hr,
|
925
|
+
AdminTableTabs: gr,
|
926
|
+
AdminTableCustomFilters: Tr
|
1052
927
|
},
|
1053
928
|
data() {
|
1054
929
|
return {
|
@@ -1062,8 +937,7 @@ const Ur = /* @__PURE__ */ g(qr, [["render", Lr]]), Or = {
|
|
1062
937
|
isVisibleCardInfo: !1,
|
1063
938
|
onFilters: 0,
|
1064
939
|
filterState: null,
|
1065
|
-
filterCustom: null
|
1066
|
-
visibleColumns: []
|
940
|
+
filterCustom: null
|
1067
941
|
};
|
1068
942
|
},
|
1069
943
|
async mounted() {
|
@@ -1089,8 +963,8 @@ const Ur = /* @__PURE__ */ g(qr, [["render", Lr]]), Or = {
|
|
1089
963
|
activeCardRow() {
|
1090
964
|
var t, e;
|
1091
965
|
return ((e = (t = this.tableData) == null ? void 0 : t.rows) == null ? void 0 : e.find((r) => {
|
1092
|
-
var
|
1093
|
-
return (r == null ? void 0 : r.id) === ((n = (
|
966
|
+
var a, n;
|
967
|
+
return (r == null ? void 0 : r.id) === ((n = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : n.card);
|
1094
968
|
})) || {};
|
1095
969
|
},
|
1096
970
|
getActions() {
|
@@ -1102,17 +976,13 @@ const Ur = /* @__PURE__ */ g(qr, [["render", Lr]]), Or = {
|
|
1102
976
|
async table() {
|
1103
977
|
this.tableData = null, await this.getTableData();
|
1104
978
|
},
|
1105
|
-
searchValue(
|
1106
|
-
|
1107
|
-
this.getTableData(), this.$router.push({
|
1108
|
-
...this.$route,
|
1109
|
-
query: { ...(e = this.$route) == null ? void 0 : e.query, search: t || void 0 }
|
1110
|
-
});
|
979
|
+
searchValue() {
|
980
|
+
this.getTableData();
|
1111
981
|
},
|
1112
982
|
$route: {
|
1113
983
|
handler(t, e) {
|
1114
|
-
var r,
|
1115
|
-
((r = t == null ? void 0 : t.params) == null ? void 0 : r.catchAll) !== ((
|
984
|
+
var r, a;
|
985
|
+
((r = t == null ? void 0 : t.params) == null ? void 0 : r.catchAll) !== ((a = e == null ? void 0 : e.params) == null ? void 0 : a.catchAll) && (this.unmountedData(), this.getFilters());
|
1116
986
|
},
|
1117
987
|
deep: !0
|
1118
988
|
},
|
@@ -1129,42 +999,32 @@ const Ur = /* @__PURE__ */ g(qr, [["render", Lr]]), Or = {
|
|
1129
999
|
},
|
1130
1000
|
filterCustom(t) {
|
1131
1001
|
var e;
|
1132
|
-
this.$router.
|
1002
|
+
this.$router.push({
|
1133
1003
|
...this.$route,
|
1134
1004
|
query: { ...(e = this.$route) == null ? void 0 : e.query, filterCustom: t }
|
1135
1005
|
}), 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
|
-
});
|
1146
1006
|
}
|
1147
1007
|
},
|
1148
1008
|
methods: {
|
1149
1009
|
async checkUrlMounted() {
|
1150
|
-
var t, e, r,
|
1151
|
-
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((
|
1010
|
+
var t, e, r, a, n, o, d, p, h;
|
1011
|
+
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((a = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : a.limit) || 20, this.filterState = ((o = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : o.filterState) || null, this.filterCustom = ((p = (d = this.$route) == null ? void 0 : d.query) == null ? void 0 : p.filterCustom) || null, (h = this.$route) != null && h.query.card && (this.isVisibleCardInfo = !0);
|
1152
1012
|
},
|
1153
1013
|
rowWidth(t) {
|
1154
|
-
var r,
|
1155
|
-
const e = (
|
1014
|
+
var r, a;
|
1015
|
+
const e = (a = (r = this.tableData) == null ? void 0 : r.columns) == null ? void 0 : a.find((n) => n.name === t);
|
1156
1016
|
if (e) {
|
1157
1017
|
const n = e == null ? void 0 : e.width;
|
1158
1018
|
return n != null && n.includes("px") ? n : `${n}px`;
|
1159
1019
|
}
|
1160
1020
|
},
|
1161
1021
|
unmountedData() {
|
1162
|
-
this.page = 1, this.
|
1022
|
+
this.page = 1, this.filterCustom = null, this.filterState = null, this.isVisibleCardInfo = !1, this.filterScheme = null, this.filters = null, this.onFilters = 0;
|
1163
1023
|
},
|
1164
1024
|
async getTableData() {
|
1165
|
-
var t, e
|
1025
|
+
var t, e;
|
1166
1026
|
try {
|
1167
|
-
const { data:
|
1027
|
+
const { data: r } = await A.get(`/api/template/table/${this.table}`), a = await A.get(`/api/table-data/${this.table}`, {
|
1168
1028
|
params: {
|
1169
1029
|
page: this.page,
|
1170
1030
|
search: this.searchValue || null,
|
@@ -1176,19 +1036,16 @@ const Ur = /* @__PURE__ */ g(qr, [["render", Lr]]), Or = {
|
|
1176
1036
|
}
|
1177
1037
|
});
|
1178
1038
|
this.tableData = {
|
1179
|
-
...
|
1180
|
-
...(
|
1181
|
-
}
|
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);
|
1039
|
+
...r,
|
1040
|
+
...(a == null ? void 0 : a.data) || {}
|
1041
|
+
};
|
1185
1042
|
} catch {
|
1186
1043
|
}
|
1187
1044
|
},
|
1188
1045
|
async getFilters() {
|
1189
1046
|
var t;
|
1190
1047
|
try {
|
1191
|
-
const { data: e } = await
|
1048
|
+
const { data: e } = await A.get(`/api/table-filter/${this.table}`);
|
1192
1049
|
this.filterScheme = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map((r) => ({
|
1193
1050
|
...r,
|
1194
1051
|
label: (r == null ? void 0 : r.label) || (r == null ? void 0 : r.ua)
|
@@ -1229,165 +1086,159 @@ const Ur = /* @__PURE__ */ g(qr, [["render", Lr]]), Or = {
|
|
1229
1086
|
});
|
1230
1087
|
}
|
1231
1088
|
}
|
1232
|
-
},
|
1233
|
-
style: { height: "calc(100vh -
|
1089
|
+
}, Vr = { class: "w-[calc(100vw - 320px)]" }, Ar = { class: "h-[76px] bg-gray-50 flex items-center justify-between px-[30px]" }, Fr = { class: "text-xl font-medium h-[20px]" }, Dr = {
|
1090
|
+
style: { height: "calc(100vh - 140px)", width: "calc(100vw - 260px)" },
|
1234
1091
|
class: "bg-gray-50 p-[20px] flex pt-[10px]"
|
1235
|
-
},
|
1092
|
+
}, Mr = { class: "bg-white w-full rounded-xl border p-[20px] pr-0" }, jr = { class: "flex" }, zr = { class: "flex gap-[6px] ml-auto" }, Pr = { class: "inline-block w-full align-middle" }, qr = {
|
1236
1093
|
key: 0,
|
1237
1094
|
class: "relative min-w-full divide-y divide-gray-200 table-fixed dark:divide-neutral-700"
|
1238
|
-
},
|
1095
|
+
}, Br = { class: "sticky top-0 bg-white w-full after:absolute after:content-[''] z-[1] after:block after:w-full after:h-px after:bg-stone-200" }, Lr = { class: "right-0 border-t border-stone-200" }, Ur = { class: "divide-y divide-gray-200" }, Or = { class: "text-sm text-gray-600 px-4 py-3" }, Er = ["onClick"], Nr = ["onClick"], Hr = {
|
1239
1096
|
key: 0,
|
1240
1097
|
class: "text-center sticky right-0 bg-white w-[80px] px-[10px]"
|
1241
|
-
},
|
1242
|
-
function
|
1243
|
-
var
|
1244
|
-
const
|
1245
|
-
return s(),
|
1246
|
-
l("div",
|
1247
|
-
l("h2",
|
1248
|
-
o.isForm ? (s(),
|
1098
|
+
}, Wr = { class: "p-[20px] flex justify-end w-full" };
|
1099
|
+
function Rr(t, e, r, a, n, o) {
|
1100
|
+
var q, B, L, U, O, E, N, H, W, R, G, Z, J, K;
|
1101
|
+
const d = c("IconPlus"), p = c("router-link"), h = c("AdminTableTabs"), u = c("IconSearch"), _ = c("VsText"), w = c("AdminTableCustomFilters"), k = c("AdminTableColumnsHidden"), $ = c("AdminTableExport"), g = c("AdminTableFilters"), V = c("IconOpenCard"), D = c("AdminTableColumn"), M = c("AdminComponentIs"), oe = c("AdminTableControl"), ae = c("AdminNodata"), ie = c("VsPagination"), ce = c("AdminTableCardInfo");
|
1102
|
+
return s(), i("div", Vr, [
|
1103
|
+
l("div", Ar, [
|
1104
|
+
l("h2", Fr, I(r.title), 1),
|
1105
|
+
o.isForm ? (s(), x(p, {
|
1249
1106
|
key: 0,
|
1250
|
-
to: `/add?table=${(
|
1107
|
+
to: `/add?table=${(B = (q = t.$route) == null ? void 0 : q.params) == null ? void 0 : B.catchAll}`,
|
1251
1108
|
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"
|
1252
1109
|
}, {
|
1253
|
-
default:
|
1254
|
-
|
1110
|
+
default: y(() => [
|
1111
|
+
b(d, {
|
1255
1112
|
height: "16",
|
1256
1113
|
width: "16"
|
1257
1114
|
}),
|
1258
|
-
e[5] || (e[5] =
|
1115
|
+
e[5] || (e[5] = F(" Додати "))
|
1259
1116
|
]),
|
1260
1117
|
_: 1
|
1261
|
-
}, 8, ["to"])) :
|
1118
|
+
}, 8, ["to"])) : v("", !0)
|
1262
1119
|
]),
|
1263
|
-
l("div",
|
1264
|
-
l("div",
|
1265
|
-
(U = (L = n.tableData) == null ? void 0 : L.filterState) != null && U.length ? (s(),
|
1120
|
+
l("div", Dr, [
|
1121
|
+
l("div", Mr, [
|
1122
|
+
(U = (L = n.tableData) == null ? void 0 : L.filterState) != null && U.length ? (s(), x(h, {
|
1266
1123
|
key: 0,
|
1267
1124
|
tabsList: (O = n.tableData) == null ? void 0 : O.filterState,
|
1268
1125
|
filterState: n.filterState,
|
1269
|
-
"onUpdate:filterState": e[0] || (e[0] = (
|
1270
|
-
}, null, 8, ["tabsList", "filterState"])) :
|
1271
|
-
l("div",
|
1126
|
+
"onUpdate:filterState": e[0] || (e[0] = (f) => n.filterState = f)
|
1127
|
+
}, null, 8, ["tabsList", "filterState"])) : v("", !0),
|
1128
|
+
l("div", jr, [
|
1272
1129
|
l("div", {
|
1273
|
-
class:
|
1130
|
+
class: S([n.isVisibleCardInfo ? "w-[calc(100%-360px)]" : "w-full"])
|
1274
1131
|
}, [
|
1275
1132
|
l("div", {
|
1276
|
-
class:
|
1133
|
+
class: S(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative", { "pr-[20px]": !n.isVisibleCardInfo }])
|
1277
1134
|
}, [
|
1278
|
-
|
1135
|
+
b(u, {
|
1279
1136
|
height: "14",
|
1280
1137
|
width: "14",
|
1281
1138
|
class: "absolute top-[10px] left-[14px] text-gray-500 z-[1]"
|
1282
1139
|
}),
|
1283
|
-
|
1140
|
+
b(_, {
|
1284
1141
|
modelValue: n.searchValue,
|
1285
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
1142
|
+
"onUpdate:modelValue": e[1] || (e[1] = (f) => n.searchValue = f),
|
1286
1143
|
placeholder: "Пошук...",
|
1287
1144
|
clearable: !0,
|
1288
1145
|
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"
|
1289
1146
|
}, null, 8, ["modelValue"]),
|
1290
|
-
l("div",
|
1291
|
-
(N = (E = n.tableData) == null ? void 0 : E.filterCustom) != null && N.length ? (s(),
|
1147
|
+
l("div", zr, [
|
1148
|
+
(N = (E = n.tableData) == null ? void 0 : E.filterCustom) != null && N.length ? (s(), x(w, {
|
1292
1149
|
key: 0,
|
1293
1150
|
customList: (H = n.tableData) == null ? void 0 : H.filterCustom,
|
1294
1151
|
filterCustom: n.filterCustom,
|
1295
|
-
"onUpdate:filterCustom": e[2] || (e[2] = (
|
1296
|
-
}, null, 8, ["customList", "filterCustom"])) :
|
1297
|
-
|
1152
|
+
"onUpdate:filterCustom": e[2] || (e[2] = (f) => n.filterCustom = f)
|
1153
|
+
}, null, 8, ["customList", "filterCustom"])) : v("", !0),
|
1154
|
+
b(k, {
|
1298
1155
|
columns: (W = n.tableData) == null ? void 0 : W.columns,
|
1299
|
-
onUpdateColumns: e[3] || (e[3] = (
|
1156
|
+
onUpdateColumns: e[3] || (e[3] = (f) => n.tableData.columns = f)
|
1300
1157
|
}, null, 8, ["columns"]),
|
1301
|
-
|
1158
|
+
b($, {
|
1302
1159
|
table: r.table,
|
1303
|
-
columns: (R = n.tableData) == null ? void 0 : R.columns
|
1304
|
-
|
1305
|
-
|
1306
|
-
"filter-custom": n.filterCustom,
|
1307
|
-
filters: n.filters
|
1308
|
-
}, null, 8, ["table", "columns", "page", "filter-state", "filter-custom", "filters"]),
|
1309
|
-
f(y, {
|
1160
|
+
columns: (R = n.tableData) == null ? void 0 : R.columns
|
1161
|
+
}, null, 8, ["table", "columns"]),
|
1162
|
+
b(g, {
|
1310
1163
|
scheme: n.filterScheme,
|
1311
1164
|
onFilters: n.onFilters,
|
1312
1165
|
onFilterChange: o.filterChange
|
1313
1166
|
}, null, 8, ["scheme", "onFilters", "onFilterChange"]),
|
1314
1167
|
l("button", {
|
1315
|
-
onClick: e[4] || (e[4] = (...
|
1168
|
+
onClick: e[4] || (e[4] = (...f) => o.toggleCardInfo && o.toggleCardInfo(...f)),
|
1316
1169
|
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"
|
1317
1170
|
}, [
|
1318
|
-
|
1319
|
-
class:
|
1171
|
+
b(V, {
|
1172
|
+
class: S({ "rotate-180 duration-300": !n.isVisibleCardInfo })
|
1320
1173
|
}, null, 8, ["class"])
|
1321
1174
|
])
|
1322
1175
|
])
|
1323
1176
|
], 2),
|
1324
1177
|
l("div", {
|
1325
|
-
class:
|
1178
|
+
class: S(["flex items-start justify-start w-full space-y-5", { "pr-[20px]": !n.isVisibleCardInfo }])
|
1326
1179
|
}, [
|
1327
1180
|
l("div", {
|
1328
|
-
style:
|
1329
|
-
height: (Z = (G = n.tableData) == null ? void 0 : G.filterState) != null && Z.length ? "calc(100vh - 370px)" : "calc(100vh -
|
1181
|
+
style: re({
|
1182
|
+
height: (Z = (G = n.tableData) == null ? void 0 : G.filterState) != null && Z.length ? "calc(100vh - 370px)" : "calc(100vh - 315px)"
|
1330
1183
|
}),
|
1331
1184
|
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"
|
1332
1185
|
}, [
|
1333
|
-
l("div",
|
1334
|
-
o.isNoData ? (s(),
|
1335
|
-
l("thead",
|
1336
|
-
l("tr",
|
1337
|
-
(s(!0),
|
1338
|
-
key:
|
1339
|
-
style:
|
1340
|
-
width: o.rowWidth(
|
1341
|
-
textAlign: m == null ? void 0 : m.align,
|
1342
|
-
wordBreak: m.wrap
|
1186
|
+
l("div", Pr, [
|
1187
|
+
o.isNoData ? (s(), x(ae, { key: 1 })) : (s(), i("table", qr, [
|
1188
|
+
l("thead", Br, [
|
1189
|
+
l("tr", Lr, [
|
1190
|
+
(s(!0), i(C, null, T(o.columns, (f) => (s(), x(D, {
|
1191
|
+
key: f.name,
|
1192
|
+
style: re({
|
1193
|
+
width: o.rowWidth(f == null ? void 0 : f.name)
|
1343
1194
|
}),
|
1344
|
-
data:
|
1195
|
+
data: f,
|
1345
1196
|
activeColumn: n.activeColumn,
|
1346
1197
|
onChangeActive: o.changeActiveColumn
|
1347
1198
|
}, null, 8, ["style", "data", "activeColumn", "onChangeActive"]))), 128)),
|
1348
|
-
e[6] || (e[6] = l("th", { class: "w-[70px] sticky right-0 top-0" }, null, -1))
|
1199
|
+
e[6] || (e[6] = l("th", { class: "w-[70px] sticky right-0 top-0 bg-white" }, null, -1))
|
1349
1200
|
])
|
1350
1201
|
]),
|
1351
|
-
l("tbody",
|
1352
|
-
(s(!0),
|
1353
|
-
var
|
1354
|
-
return s(),
|
1355
|
-
l("td",
|
1202
|
+
l("tbody", Ur, [
|
1203
|
+
(s(!0), i(C, null, T((J = n.tableData) == null ? void 0 : J.rows, (f, de) => {
|
1204
|
+
var Q, X, Y;
|
1205
|
+
return s(), i("tr", { key: de }, [
|
1206
|
+
l("td", Or, [
|
1356
1207
|
l("button", {
|
1357
|
-
onClick: () => o.pushToCard(
|
1358
|
-
class:
|
1359
|
-
((
|
1208
|
+
onClick: () => o.pushToCard(f == null ? void 0 : f.id),
|
1209
|
+
class: S(["text-sm font-medium", [
|
1210
|
+
((Q = n.tableData) == null ? void 0 : Q.card) === !1 ? "" : "text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"
|
1360
1211
|
]])
|
1361
1212
|
}, [
|
1362
|
-
|
1363
|
-
row:
|
1213
|
+
b(M, {
|
1214
|
+
row: f,
|
1364
1215
|
column: o.columns[0],
|
1365
1216
|
table: r.table,
|
1366
1217
|
onUpdateTable: o.getTableData
|
1367
1218
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1368
|
-
], 10,
|
1219
|
+
], 10, Er)
|
1369
1220
|
]),
|
1370
|
-
(s(!0),
|
1371
|
-
onClick: (
|
1372
|
-
class:
|
1373
|
-
key:
|
1221
|
+
(s(!0), i(C, null, T((X = o.columns) == null ? void 0 : X.slice(1), (ee) => (s(), i("td", {
|
1222
|
+
onClick: (Qr) => o.changeActiveCardInfo(f == null ? void 0 : f.id),
|
1223
|
+
class: S(["text-start px-3 py-3 text-sm text-gray-600 whitespace-nowrap", { "cursor-pointer": n.isVisibleCardInfo }]),
|
1224
|
+
key: ee.name
|
1374
1225
|
}, [
|
1375
|
-
|
1376
|
-
row:
|
1377
|
-
column:
|
1226
|
+
b(M, {
|
1227
|
+
row: f,
|
1228
|
+
column: ee,
|
1378
1229
|
table: r.table,
|
1379
1230
|
onUpdateTable: o.getTableData
|
1380
1231
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1381
|
-
], 10,
|
1382
|
-
(
|
1383
|
-
|
1232
|
+
], 10, Nr))), 128)),
|
1233
|
+
(Y = o.getActions) != null && Y.length ? (s(), i("td", Hr, [
|
1234
|
+
b(oe, {
|
1384
1235
|
actions: o.getActions,
|
1385
1236
|
isForm: o.isForm,
|
1386
|
-
item:
|
1237
|
+
item: f,
|
1387
1238
|
table: r.table,
|
1388
1239
|
onUpdateTable: o.getTableData
|
1389
1240
|
}, null, 8, ["actions", "isForm", "item", "table", "onUpdateTable"])
|
1390
|
-
])) :
|
1241
|
+
])) : v("", !0)
|
1391
1242
|
]);
|
1392
1243
|
}), 128))
|
1393
1244
|
])
|
@@ -1395,34 +1246,28 @@ function un(t, e, r, i, n, o) {
|
|
1395
1246
|
])
|
1396
1247
|
], 4)
|
1397
1248
|
], 2),
|
1398
|
-
l("div",
|
1399
|
-
|
1400
|
-
l("p", on, [
|
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)
|
1403
|
-
])
|
1404
|
-
]),
|
1405
|
-
n.limit ? (s(), k(ue, {
|
1249
|
+
l("div", Wr, [
|
1250
|
+
n.limit ? (s(), x(ie, {
|
1406
1251
|
key: 0,
|
1407
1252
|
goTo: !1,
|
1408
1253
|
class: "justify-end",
|
1409
|
-
"default-page":
|
1410
|
-
total: ((
|
1254
|
+
"default-page": o.defaultPage,
|
1255
|
+
total: ((K = n.tableData) == null ? void 0 : K.total) || 0,
|
1411
1256
|
pageSize: parseInt(n.limit),
|
1412
1257
|
onPageChange: o.handlePageChange,
|
1413
1258
|
pageSizes: [10, 16, 20],
|
1414
1259
|
onPageSizeChange: o.changeLimit
|
1415
|
-
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])) :
|
1260
|
+
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])) : v("", !0)
|
1416
1261
|
])
|
1417
1262
|
], 2),
|
1418
|
-
|
1419
|
-
default:
|
1420
|
-
n.isVisibleCardInfo ? (s(),
|
1263
|
+
b(P, { name: "slide-fade" }, {
|
1264
|
+
default: y(() => [
|
1265
|
+
n.isVisibleCardInfo ? (s(), x(ce, {
|
1421
1266
|
key: 0,
|
1422
1267
|
table: r.table,
|
1423
1268
|
columns: o.columns,
|
1424
1269
|
row: o.activeCardRow
|
1425
|
-
}, null, 8, ["table", "columns", "row"])) :
|
1270
|
+
}, null, 8, ["table", "columns", "row"])) : v("", !0)
|
1426
1271
|
]),
|
1427
1272
|
_: 1
|
1428
1273
|
})
|
@@ -1431,8 +1276,8 @@ function un(t, e, r, i, n, o) {
|
|
1431
1276
|
])
|
1432
1277
|
]);
|
1433
1278
|
}
|
1434
|
-
const
|
1435
|
-
components: { AdminTable:
|
1279
|
+
const Gr = /* @__PURE__ */ m(Sr, [["render", Rr], ["__scopeId", "data-v-9b255a47"]]), Zr = {
|
1280
|
+
components: { AdminTable: Gr },
|
1436
1281
|
data() {
|
1437
1282
|
return {
|
1438
1283
|
table: !1,
|
@@ -1444,7 +1289,7 @@ const dn = /* @__PURE__ */ g(Or, [["render", un], ["__scopeId", "data-v-0f46a883
|
|
1444
1289
|
$route: {
|
1445
1290
|
async handler() {
|
1446
1291
|
var t;
|
1447
|
-
(t =
|
1292
|
+
(t = te) != null && t.value || await this.getMenu(), await this.checkPageType();
|
1448
1293
|
},
|
1449
1294
|
deep: !0
|
1450
1295
|
},
|
@@ -1463,21 +1308,21 @@ const dn = /* @__PURE__ */ g(Or, [["render", un], ["__scopeId", "data-v-0f46a883
|
|
1463
1308
|
}), e;
|
1464
1309
|
},
|
1465
1310
|
async checkPageType() {
|
1466
|
-
var
|
1467
|
-
const t = this.flattenMenu(
|
1311
|
+
var a, n;
|
1312
|
+
const t = this.flattenMenu(te.value);
|
1468
1313
|
t != null && t.length || this.$router.replace("/404");
|
1469
1314
|
const e = t == null ? void 0 : t.find((o) => {
|
1470
|
-
var
|
1471
|
-
return (o == null ? void 0 : o.path) == ((
|
1315
|
+
var d, p;
|
1316
|
+
return (o == null ? void 0 : o.path) == ((p = (d = this.$route) == null ? void 0 : d.params) == null ? void 0 : p.catchAll);
|
1472
1317
|
});
|
1473
|
-
this.title = e == null ? void 0 : e.ua, e || this.$router.replace("/404"), e != null && e.component && this.$router.replace((n = (
|
1318
|
+
this.title = e == null ? void 0 : e.ua, e || this.$router.replace("/404"), e != null && e.component && this.$router.replace((n = (a = this.$route) == null ? void 0 : a.params) == null ? void 0 : n.catchAll);
|
1474
1319
|
const r = e == null ? void 0 : e.table;
|
1475
1320
|
this.table = r || !1, !r && this.getInterface();
|
1476
1321
|
},
|
1477
1322
|
async getInterface() {
|
1478
1323
|
var t, e;
|
1479
1324
|
try {
|
1480
|
-
const { data: r } = await
|
1325
|
+
const { data: r } = await A.get(
|
1481
1326
|
`/api/template/interface/${((e = (t = this.$route) == null ? void 0 : t.params) == null ? void 0 : e.catchAll) || ""}`
|
1482
1327
|
);
|
1483
1328
|
this.interface = r || "";
|
@@ -1486,21 +1331,21 @@ const dn = /* @__PURE__ */ g(Or, [["render", un], ["__scopeId", "data-v-0f46a883
|
|
1486
1331
|
}
|
1487
1332
|
}
|
1488
1333
|
}
|
1489
|
-
},
|
1490
|
-
function
|
1491
|
-
const
|
1492
|
-
return n.table ? (s(),
|
1334
|
+
}, Jr = ["innerHTML"];
|
1335
|
+
function Kr(t, e, r, a, n, o) {
|
1336
|
+
const d = c("AdminTable");
|
1337
|
+
return n.table ? (s(), x(d, {
|
1493
1338
|
key: 0,
|
1494
1339
|
table: n.table,
|
1495
1340
|
title: n.title
|
1496
|
-
}, null, 8, ["table", "title"])) : (s(),
|
1341
|
+
}, null, 8, ["table", "title"])) : (s(), i("div", {
|
1497
1342
|
key: 1,
|
1498
1343
|
class: "w-full bg-gray-50",
|
1499
1344
|
style: { height: "calc(100vh - 120px)" },
|
1500
1345
|
innerHTML: n.interface
|
1501
|
-
}, null, 8,
|
1346
|
+
}, null, 8, Jr));
|
1502
1347
|
}
|
1503
|
-
const
|
1348
|
+
const en = /* @__PURE__ */ m(Zr, [["render", Kr]]);
|
1504
1349
|
export {
|
1505
|
-
|
1350
|
+
en as default
|
1506
1351
|
};
|