@opengis/admin 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-page-DSsxW2Zj.js → add-page-PUKoIJEK.js} +1 -1
- package/dist/{admin-interface-CVcIjH78.js → admin-interface-DOooQPLl.js} +295 -276
- package/dist/{admin-view-aj21FGX2.js → admin-view-pMbPvuzO.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +53 -53
- package/dist/card-page-DTM6Da4H.js +192 -0
- package/dist/{card-view-CHgjpGG_.js → card-view-liYS8py5.js} +1 -1
- package/dist/{edit-page-C-8Qf7kV.js → edit-page-DDAyXMg3.js} +1 -1
- package/dist/{import-file-NwcjXxtk.js → import-file-Vd0__RP7.js} +2147 -2144
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/card-page-BBOaJHmJ.js +0 -187
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { u as
|
|
3
|
-
import { openBlock as a, createElementBlock as i, createStaticVNode as
|
|
4
|
-
const
|
|
1
|
+
import { _ as b, a as k } from "./import-file-Vd0__RP7.js";
|
|
2
|
+
import { u as B } from "./userMenu-CT1xO2Pt.js";
|
|
3
|
+
import { openBlock as a, createElementBlock as i, createStaticVNode as V, createTextVNode as v, toDisplayString as $, createCommentVNode as F, createElementVNode as l, Fragment as x, resolveComponent as u, createVNode as p, withCtx as y, withModifiers as N, renderList as C, withDirectives as E, vModelCheckbox as R, createBlock as w, vModelText as G, resolveDynamicComponent as W, Transition as J, vShow as K } from "vue";
|
|
4
|
+
const Q = {}, X = {
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
7
7
|
fill: "none",
|
|
@@ -11,12 +11,12 @@ const K = {}, Q = {
|
|
|
11
11
|
"stroke-linejoin": "round",
|
|
12
12
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-adjustments-horizontal"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
return a(), i("svg",
|
|
16
|
-
|
|
14
|
+
function Y(e, t, r, o, n, s) {
|
|
15
|
+
return a(), i("svg", X, t[0] || (t[0] = [
|
|
16
|
+
V('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 6l8 0"></path><path d="M16 6l4 0"></path><path d="M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 12l2 0"></path><path d="M10 12l10 0"></path><path d="M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 18l11 0"></path><path d="M19 18l1 0"></path>', 10)
|
|
17
17
|
]));
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const Z = /* @__PURE__ */ b(Q, [["render", Y]]), tt = {
|
|
20
20
|
data() {
|
|
21
21
|
return {
|
|
22
22
|
currentSort: ""
|
|
@@ -62,11 +62,11 @@ const Y = /* @__PURE__ */ m(K, [["render", X]]), Z = {
|
|
|
62
62
|
},
|
|
63
63
|
handleClickSortBtn(e) {
|
|
64
64
|
this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(e);
|
|
65
|
-
const t = this.$route.query, { sort:
|
|
65
|
+
const t = this.$route.query, { sort: r, ...o } = t, n = this.currentSort ? `${this.data.name}-${this.currentSort}` : "";
|
|
66
66
|
this.$router.replace({
|
|
67
67
|
query: {
|
|
68
68
|
...o,
|
|
69
|
-
...
|
|
69
|
+
...n && { sort: n }
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
},
|
|
@@ -74,10 +74,10 @@ const Y = /* @__PURE__ */ m(K, [["render", X]]), Z = {
|
|
|
74
74
|
return `${this.data.name}-${e}` === this.selectedSortParam;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
},
|
|
77
|
+
}, et = {
|
|
78
78
|
scope: "col",
|
|
79
79
|
class: "min-w-[200px] max-w-[300px] text-start"
|
|
80
|
-
},
|
|
80
|
+
}, rt = {
|
|
81
81
|
class: "flex-shrink-0 size-3.5",
|
|
82
82
|
xmlns: "http://www.w3.org/2000/svg",
|
|
83
83
|
width: "24",
|
|
@@ -88,7 +88,7 @@ const Y = /* @__PURE__ */ m(K, [["render", X]]), Z = {
|
|
|
88
88
|
"stroke-width": "2",
|
|
89
89
|
"stroke-linecap": "round",
|
|
90
90
|
"stroke-linejoin": "round"
|
|
91
|
-
},
|
|
91
|
+
}, lt = {
|
|
92
92
|
key: 0,
|
|
93
93
|
d: "m7 15 5 5 5-5"
|
|
94
94
|
}, nt = {
|
|
@@ -98,23 +98,23 @@ const Y = /* @__PURE__ */ m(K, [["render", X]]), Z = {
|
|
|
98
98
|
key: 1,
|
|
99
99
|
class: "text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500"
|
|
100
100
|
};
|
|
101
|
-
function
|
|
102
|
-
return a(), i("th",
|
|
103
|
-
|
|
101
|
+
function at(e, t, r, o, n, s) {
|
|
102
|
+
return a(), i("th", et, [
|
|
103
|
+
s.getVisibleIcon ? (a(), i("button", {
|
|
104
104
|
key: 0,
|
|
105
105
|
type: "button",
|
|
106
106
|
class: "text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",
|
|
107
|
-
onClick: t[0] || (t[0] = (
|
|
107
|
+
onClick: t[0] || (t[0] = (m) => s.handleClickSortBtn(n.currentSort))
|
|
108
108
|
}, [
|
|
109
|
-
|
|
110
|
-
(a(), i("svg",
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
v($(s.label) + " ", 1),
|
|
110
|
+
(a(), i("svg", rt, [
|
|
111
|
+
n.currentSort === "asc" || n.currentSort === "" ? (a(), i("path", lt)) : F("", !0),
|
|
112
|
+
n.currentSort === "desc" || n.currentSort === "" ? (a(), i("path", nt)) : F("", !0)
|
|
113
113
|
]))
|
|
114
|
-
])) : (a(), i("p", st, $(
|
|
114
|
+
])) : (a(), i("p", st, $(s.label), 1))
|
|
115
115
|
]);
|
|
116
116
|
}
|
|
117
|
-
const ot = /* @__PURE__ */
|
|
117
|
+
const ot = /* @__PURE__ */ b(tt, [["render", at]]), it = {}, ct = {
|
|
118
118
|
xmlns: "http://www.w3.org/2000/svg",
|
|
119
119
|
viewBox: "0 0 24 24",
|
|
120
120
|
fill: "none",
|
|
@@ -124,19 +124,19 @@ const ot = /* @__PURE__ */ m(Z, [["render", lt]]), at = {}, it = {
|
|
|
124
124
|
"stroke-linejoin": "round",
|
|
125
125
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"
|
|
126
126
|
};
|
|
127
|
-
function ut(e, t,
|
|
128
|
-
return a(), i("svg",
|
|
129
|
-
|
|
127
|
+
function ut(e, t, r, o, n, s) {
|
|
128
|
+
return a(), i("svg", ct, t[0] || (t[0] = [
|
|
129
|
+
l("path", {
|
|
130
130
|
stroke: "none",
|
|
131
131
|
d: "M0 0h24v24H0z",
|
|
132
132
|
fill: "none"
|
|
133
133
|
}, null, -1),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
l("path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
|
|
135
|
+
l("path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
|
|
136
|
+
l("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
|
|
137
137
|
]));
|
|
138
138
|
}
|
|
139
|
-
const
|
|
139
|
+
const dt = /* @__PURE__ */ b(it, [["render", ut]]), ht = {}, pt = {
|
|
140
140
|
class: "flex-shrink-0 size-3.5",
|
|
141
141
|
xmlns: "http://www.w3.org/2000/svg",
|
|
142
142
|
viewBox: "0 0 24 24",
|
|
@@ -146,42 +146,42 @@ const ct = /* @__PURE__ */ m(at, [["render", ut]]), dt = {}, pt = {
|
|
|
146
146
|
"stroke-linecap": "round",
|
|
147
147
|
"stroke-linejoin": "round"
|
|
148
148
|
};
|
|
149
|
-
function
|
|
149
|
+
function mt(e, t, r, o, n, s) {
|
|
150
150
|
return a(), i("svg", pt, t[0] || (t[0] = [
|
|
151
|
-
|
|
151
|
+
V('<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)
|
|
152
152
|
]));
|
|
153
153
|
}
|
|
154
|
-
const bt = /* @__PURE__ */
|
|
154
|
+
const bt = /* @__PURE__ */ b(ht, [["render", mt]]), ft = {
|
|
155
155
|
props: {
|
|
156
156
|
height: { type: String, default: "16" },
|
|
157
157
|
width: { type: String, default: "12" },
|
|
158
158
|
color: { type: String, default: "black" }
|
|
159
159
|
}
|
|
160
|
-
}, gt = { style: { display: "none" } },
|
|
161
|
-
function
|
|
160
|
+
}, gt = { style: { display: "none" } }, xt = ["height", "width", "fill"];
|
|
161
|
+
function yt(e, t, r, o, n, s) {
|
|
162
162
|
return a(), i(x, null, [
|
|
163
163
|
(a(), i("svg", gt, t[0] || (t[0] = [
|
|
164
|
-
|
|
164
|
+
l("symbol", {
|
|
165
165
|
id: "icon-pencil",
|
|
166
166
|
viewBox: "0 0 32 32"
|
|
167
167
|
}, [
|
|
168
|
-
|
|
168
|
+
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" })
|
|
169
169
|
], -1)
|
|
170
170
|
]))),
|
|
171
171
|
(a(), i("svg", {
|
|
172
|
-
height:
|
|
173
|
-
width:
|
|
174
|
-
fill:
|
|
172
|
+
height: r.height,
|
|
173
|
+
width: r.width,
|
|
174
|
+
fill: r.color
|
|
175
175
|
}, t[1] || (t[1] = [
|
|
176
|
-
|
|
177
|
-
]), 8,
|
|
176
|
+
l("use", { "xlink:href": "#icon-pencil" }, null, -1)
|
|
177
|
+
]), 8, xt))
|
|
178
178
|
], 64);
|
|
179
179
|
}
|
|
180
|
-
const
|
|
180
|
+
const _t = /* @__PURE__ */ b(ft, [["render", yt]]), kt = {
|
|
181
181
|
components: {
|
|
182
|
-
IconMore:
|
|
182
|
+
IconMore: dt,
|
|
183
183
|
IconDelete: bt,
|
|
184
|
-
IconEdit:
|
|
184
|
+
IconEdit: _t
|
|
185
185
|
},
|
|
186
186
|
emits: ["updateTable"],
|
|
187
187
|
props: { item: Object, table: String },
|
|
@@ -201,7 +201,7 @@ const yt = /* @__PURE__ */ m(mt, [["render", xt]]), _t = {
|
|
|
201
201
|
async getData() {
|
|
202
202
|
var e;
|
|
203
203
|
try {
|
|
204
|
-
const { data: t } = await
|
|
204
|
+
const { data: t } = await k.get(
|
|
205
205
|
`/api/table/${this.table}/${(e = this.item) == null ? void 0 : e.id}`
|
|
206
206
|
);
|
|
207
207
|
this.formValue = t;
|
|
@@ -215,7 +215,7 @@ const yt = /* @__PURE__ */ m(mt, [["render", xt]]), _t = {
|
|
|
215
215
|
async deleteElement() {
|
|
216
216
|
var e;
|
|
217
217
|
try {
|
|
218
|
-
|
|
218
|
+
k.delete(`/api/table/${this.table}/${(e = this.item) == null ? void 0 : e.id}`), this.$notify({
|
|
219
219
|
title: "Успішно!",
|
|
220
220
|
message: "Об`єкт успішно видалeно",
|
|
221
221
|
type: "success"
|
|
@@ -229,22 +229,22 @@ const yt = /* @__PURE__ */ m(mt, [["render", xt]]), _t = {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
},
|
|
232
|
+
}, wt = { class: "hs-dropdown [--placement:bottom-right] inline-flex" }, vt = {
|
|
233
233
|
id: "hs-pro-dupc1",
|
|
234
234
|
type: "button",
|
|
235
235
|
class: "gap-x-2 p-2 rounded-lg hover:border-transparent focus:outline-none text-black hover:bg-gray-50"
|
|
236
|
-
},
|
|
237
|
-
function
|
|
238
|
-
const
|
|
236
|
+
}, Ct = { class: "pt-[7px] pb-[7px] flex flex-col items-start" }, $t = { class: "p-4" }, Mt = { class: "mt-4 flex justify-end gap-x-3" };
|
|
237
|
+
function St(e, t, r, o, n, s) {
|
|
238
|
+
const m = u("IconMore"), c = u("IconEdit"), f = u("router-link"), g = u("IconDelete"), M = u("VsPopover"), I = u("VsDialog");
|
|
239
239
|
return a(), i(x, null, [
|
|
240
|
-
|
|
241
|
-
p(
|
|
240
|
+
l("div", wt, [
|
|
241
|
+
p(M, {
|
|
242
242
|
trigger: "click",
|
|
243
243
|
placement: "left"
|
|
244
244
|
}, {
|
|
245
245
|
reference: y(() => [
|
|
246
|
-
|
|
247
|
-
p(
|
|
246
|
+
l("button", vt, [
|
|
247
|
+
p(m, {
|
|
248
248
|
height: "16",
|
|
249
249
|
width: "16"
|
|
250
250
|
})
|
|
@@ -253,25 +253,25 @@ function Tt(e, t, n, o, s, l) {
|
|
|
253
253
|
default: y(() => {
|
|
254
254
|
var _, S, T;
|
|
255
255
|
return [
|
|
256
|
-
|
|
257
|
-
p(
|
|
258
|
-
to: `/edit?table=${(S = (_ = e.$route) == null ? void 0 : _.params) == null ? void 0 : S.catchAll}&id=${(T =
|
|
256
|
+
l("div", Ct, [
|
|
257
|
+
p(f, {
|
|
258
|
+
to: `/edit?table=${(S = (_ = e.$route) == null ? void 0 : _.params) == null ? void 0 : S.catchAll}&id=${(T = r.item) == null ? void 0 : T.id}`,
|
|
259
259
|
class: "w-[100px] ml-[2px] flex items-center justify-center gap-x-3 rounded-lg text-[13px] text-gray-800"
|
|
260
260
|
}, {
|
|
261
261
|
default: y(() => [
|
|
262
|
-
p(
|
|
263
|
-
t[4] || (t[4] =
|
|
262
|
+
p(c, { color: "#000" }),
|
|
263
|
+
t[4] || (t[4] = v(" Редагувати "))
|
|
264
264
|
]),
|
|
265
265
|
_: 1
|
|
266
266
|
}, 8, ["to"]),
|
|
267
|
-
t[6] || (t[6] =
|
|
268
|
-
|
|
269
|
-
onClick: t[0] || (t[0] =
|
|
267
|
+
t[6] || (t[6] = l("div", { class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto mt-[10px] mb-[10px]" }, null, -1)),
|
|
268
|
+
l("button", {
|
|
269
|
+
onClick: t[0] || (t[0] = N((...D) => s.openConfirm && s.openConfirm(...D), ["stop"])),
|
|
270
270
|
type: "button",
|
|
271
271
|
class: "w-[100px] flex items-center justify-center gap-x-3 rounded-lg text-[14px] text-red-500"
|
|
272
272
|
}, [
|
|
273
|
-
p(
|
|
274
|
-
t[5] || (t[5] =
|
|
273
|
+
p(g),
|
|
274
|
+
t[5] || (t[5] = l("span", { class: "text-gray-800" }, "Видалити", -1))
|
|
275
275
|
])
|
|
276
276
|
])
|
|
277
277
|
];
|
|
@@ -279,24 +279,24 @@ function Tt(e, t, n, o, s, l) {
|
|
|
279
279
|
_: 1
|
|
280
280
|
})
|
|
281
281
|
]),
|
|
282
|
-
p(
|
|
283
|
-
visible:
|
|
284
|
-
"onUpdate:visible": t[3] || (t[3] = (_) =>
|
|
282
|
+
p(I, {
|
|
283
|
+
visible: n.isDeleteConfirm,
|
|
284
|
+
"onUpdate:visible": t[3] || (t[3] = (_) => n.isDeleteConfirm = _),
|
|
285
285
|
title: "Ви впевнені?"
|
|
286
286
|
}, {
|
|
287
287
|
default: y(() => [
|
|
288
|
-
|
|
289
|
-
t[7] || (t[7] =
|
|
290
|
-
|
|
291
|
-
|
|
288
|
+
l("div", $t, [
|
|
289
|
+
t[7] || (t[7] = l("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
|
290
|
+
l("div", Mt, [
|
|
291
|
+
l("button", {
|
|
292
292
|
type: "button",
|
|
293
293
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm 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",
|
|
294
|
-
onClick: t[1] || (t[1] = (_) =>
|
|
294
|
+
onClick: t[1] || (t[1] = (_) => n.isDeleteConfirm = !1)
|
|
295
295
|
}, " Скасувати "),
|
|
296
|
-
|
|
296
|
+
l("button", {
|
|
297
297
|
type: "button",
|
|
298
298
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",
|
|
299
|
-
onClick: t[2] || (t[2] = (..._) =>
|
|
299
|
+
onClick: t[2] || (t[2] = (..._) => s.deleteElement && s.deleteElement(..._))
|
|
300
300
|
}, " Так, я впевнена/ий ")
|
|
301
301
|
])
|
|
302
302
|
])
|
|
@@ -305,7 +305,7 @@ function Tt(e, t, n, o, s, l) {
|
|
|
305
305
|
}, 8, ["visible"])
|
|
306
306
|
], 64);
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const Tt = /* @__PURE__ */ b(kt, [["render", St]]), Dt = {}, At = {
|
|
309
309
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
|
310
310
|
xmlns: "http://www.w3.org/2000/svg",
|
|
311
311
|
viewBox: "0 0 24 24",
|
|
@@ -315,15 +315,15 @@ const Mt = /* @__PURE__ */ m(_t, [["render", Tt]]), St = {}, Vt = {
|
|
|
315
315
|
"stroke-linecap": "round",
|
|
316
316
|
"stroke-linejoin": "round"
|
|
317
317
|
};
|
|
318
|
-
function
|
|
319
|
-
return a(), i("svg",
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
318
|
+
function Ft(e, t, r, o, n, s) {
|
|
319
|
+
return a(), i("svg", At, t[0] || (t[0] = [
|
|
320
|
+
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
321
|
+
l("path", { d: "M7 20V4" }, null, -1),
|
|
322
|
+
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
|
323
|
+
l("path", { d: "M17 4v16" }, null, -1)
|
|
324
324
|
]));
|
|
325
325
|
}
|
|
326
|
-
const
|
|
326
|
+
const Vt = /* @__PURE__ */ b(Dt, [["render", Ft]]), It = {
|
|
327
327
|
props: {
|
|
328
328
|
columns: { type: Object, default: () => {
|
|
329
329
|
} },
|
|
@@ -339,7 +339,7 @@ const At = /* @__PURE__ */ m(St, [["render", Dt]]), Ft = {
|
|
|
339
339
|
methods: {
|
|
340
340
|
async exportTable() {
|
|
341
341
|
try {
|
|
342
|
-
const e = await
|
|
342
|
+
const e = await k.get("/api/export", {
|
|
343
343
|
params: {
|
|
344
344
|
table: this.table,
|
|
345
345
|
format: this.format,
|
|
@@ -348,11 +348,11 @@ const At = /* @__PURE__ */ m(St, [["render", Dt]]), Ft = {
|
|
|
348
348
|
responseType: "blob"
|
|
349
349
|
}), t = new Blob([e.data], {
|
|
350
350
|
type: "application/octet-stream"
|
|
351
|
-
}),
|
|
352
|
-
o.href =
|
|
351
|
+
}), r = window.URL.createObjectURL(t), o = document.createElement("a");
|
|
352
|
+
o.href = r, o.setAttribute(
|
|
353
353
|
"download",
|
|
354
354
|
`${this.table.split(".")[0]}.${this.format}`
|
|
355
|
-
), document.body.appendChild(o), o.click(), document.body.removeChild(o), window.URL.revokeObjectURL(
|
|
355
|
+
), document.body.appendChild(o), o.click(), document.body.removeChild(o), window.URL.revokeObjectURL(r), this.$notify({
|
|
356
356
|
type: "success",
|
|
357
357
|
title: "Експорт",
|
|
358
358
|
message: "Файл успішно експортовано!"
|
|
@@ -369,65 +369,65 @@ const At = /* @__PURE__ */ m(St, [["render", Dt]]), Ft = {
|
|
|
369
369
|
this.format = e;
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
},
|
|
373
|
-
function Lt(e, t,
|
|
374
|
-
const
|
|
372
|
+
}, Bt = { class: "p-4" }, Et = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, jt = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, zt = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, Pt = { class: "mt-2 space-y-2" }, Ut = ["id", "onChange"], Ot = ["for"], Ht = { class: "pb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, qt = { class: "text-center" };
|
|
373
|
+
function Lt(e, t, r, o, n, s) {
|
|
374
|
+
const m = u("VsCheckbox");
|
|
375
375
|
return a(), i(x, null, [
|
|
376
|
-
t[4] || (t[4] =
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
t[2] || (t[2] =
|
|
380
|
-
|
|
381
|
-
(a(!0), i(x, null,
|
|
376
|
+
t[4] || (t[4] = l("div", { class: "dark:border-neutral-700" }, null, -1)),
|
|
377
|
+
l("div", Bt, [
|
|
378
|
+
l("div", Et, [
|
|
379
|
+
t[2] || (t[2] = l("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
|
380
|
+
l("div", jt, [
|
|
381
|
+
(a(!0), i(x, null, C(r.columns, (c, f) => (a(), i("div", {
|
|
382
382
|
class: "flex items-center",
|
|
383
|
-
key:
|
|
383
|
+
key: f,
|
|
384
384
|
style: { width: "calc((100% - 10px) / 2)" }
|
|
385
385
|
}, [
|
|
386
|
-
p(
|
|
386
|
+
p(m, {
|
|
387
387
|
class: "py-0 shrink-0 border-gray-300 rounded 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",
|
|
388
|
-
modelValue:
|
|
389
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
390
|
-
value:
|
|
391
|
-
label:
|
|
388
|
+
modelValue: n.cols,
|
|
389
|
+
"onUpdate:modelValue": t[0] || (t[0] = (g) => n.cols = g),
|
|
390
|
+
value: c == null ? void 0 : c.name,
|
|
391
|
+
label: c == null ? void 0 : c.ua
|
|
392
392
|
}, null, 8, ["modelValue", "value", "label"])
|
|
393
393
|
]))), 128))
|
|
394
394
|
])
|
|
395
395
|
]),
|
|
396
|
-
|
|
397
|
-
t[3] || (t[3] =
|
|
398
|
-
|
|
399
|
-
(a(!0), i(x, null,
|
|
396
|
+
l("div", zt, [
|
|
397
|
+
t[3] || (t[3] = l("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть формат таблиці: ", -1)),
|
|
398
|
+
l("div", Pt, [
|
|
399
|
+
(a(!0), i(x, null, C(n.tableFormats, (c, f) => (a(), i("div", {
|
|
400
400
|
class: "flex items-center",
|
|
401
|
-
key:
|
|
401
|
+
key: f
|
|
402
402
|
}, [
|
|
403
|
-
|
|
403
|
+
l("input", {
|
|
404
404
|
type: "radio",
|
|
405
405
|
name: "hs-pro-duecmfm",
|
|
406
406
|
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",
|
|
407
|
-
id:
|
|
408
|
-
onChange: (
|
|
409
|
-
}, null, 40,
|
|
410
|
-
|
|
411
|
-
for:
|
|
407
|
+
id: c,
|
|
408
|
+
onChange: (g) => s.selectFormat(c)
|
|
409
|
+
}, null, 40, Ut),
|
|
410
|
+
l("label", {
|
|
411
|
+
for: c,
|
|
412
412
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
|
413
|
-
}, " Формат " + $(
|
|
413
|
+
}, " Формат " + $(c), 9, Ot)
|
|
414
414
|
]))), 128))
|
|
415
415
|
])
|
|
416
416
|
]),
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
417
|
+
l("div", Ht, [
|
|
418
|
+
l("div", qt, [
|
|
419
|
+
l("button", {
|
|
420
420
|
type: "button",
|
|
421
421
|
class: "p-2 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500",
|
|
422
|
-
onClick: t[1] || (t[1] = (...
|
|
422
|
+
onClick: t[1] || (t[1] = (...c) => s.exportTable && s.exportTable(...c))
|
|
423
423
|
}, " Завантажити таблицю ")
|
|
424
424
|
])
|
|
425
425
|
])
|
|
426
426
|
])
|
|
427
427
|
], 64);
|
|
428
428
|
}
|
|
429
|
-
const
|
|
430
|
-
components: { IconExport:
|
|
429
|
+
const Nt = /* @__PURE__ */ b(It, [["render", Lt]]), Rt = {
|
|
430
|
+
components: { IconExport: Vt, AdminTableExportForm: Nt },
|
|
431
431
|
props: { table: String, columns: Array },
|
|
432
432
|
data() {
|
|
433
433
|
return {
|
|
@@ -435,35 +435,35 @@ const Ot = /* @__PURE__ */ m(Ft, [["render", Lt]]), Nt = {
|
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
|
-
function
|
|
439
|
-
const
|
|
438
|
+
function Gt(e, t, r, o, n, s) {
|
|
439
|
+
const m = u("IconExport"), c = u("AdminTableExportForm"), f = u("VsDialog");
|
|
440
440
|
return a(), i(x, null, [
|
|
441
|
-
|
|
442
|
-
onClick: t[0] || (t[0] = (
|
|
441
|
+
l("button", {
|
|
442
|
+
onClick: t[0] || (t[0] = (g) => n.isOpen = !0),
|
|
443
443
|
class: "py-2 px-3 relative flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300"
|
|
444
444
|
}, [
|
|
445
|
-
p(
|
|
445
|
+
p(m, {
|
|
446
446
|
height: "16",
|
|
447
447
|
width: "16"
|
|
448
448
|
}),
|
|
449
|
-
t[2] || (t[2] =
|
|
449
|
+
t[2] || (t[2] = v(" Експорт "))
|
|
450
450
|
]),
|
|
451
|
-
p(
|
|
452
|
-
visible:
|
|
453
|
-
"onUpdate:visible": t[1] || (t[1] = (
|
|
451
|
+
p(f, {
|
|
452
|
+
visible: n.isOpen,
|
|
453
|
+
"onUpdate:visible": t[1] || (t[1] = (g) => n.isOpen = g),
|
|
454
454
|
title: "Експорт таблиці"
|
|
455
455
|
}, {
|
|
456
456
|
default: y(() => [
|
|
457
|
-
p(
|
|
458
|
-
table:
|
|
459
|
-
columns:
|
|
457
|
+
p(c, {
|
|
458
|
+
table: r.table,
|
|
459
|
+
columns: r.columns
|
|
460
460
|
}, null, 8, ["table", "columns"])
|
|
461
461
|
]),
|
|
462
462
|
_: 1
|
|
463
463
|
}, 8, ["visible"])
|
|
464
464
|
], 64);
|
|
465
465
|
}
|
|
466
|
-
const Wt = /* @__PURE__ */
|
|
466
|
+
const Wt = /* @__PURE__ */ b(Rt, [["render", Gt]]), Jt = {}, Kt = {
|
|
467
467
|
xmlns: "http://www.w3.org/2000/svg",
|
|
468
468
|
viewBox: "0 0 24 24",
|
|
469
469
|
fill: "none",
|
|
@@ -473,12 +473,12 @@ const Wt = /* @__PURE__ */ m(Nt, [["render", Rt]]), Gt = {}, Jt = {
|
|
|
473
473
|
"stroke-linejoin": "round",
|
|
474
474
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
|
475
475
|
};
|
|
476
|
-
function
|
|
477
|
-
return a(), i("svg",
|
|
478
|
-
|
|
476
|
+
function Qt(e, t, r, o, n, s) {
|
|
477
|
+
return a(), i("svg", Kt, t[0] || (t[0] = [
|
|
478
|
+
V('<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)
|
|
479
479
|
]));
|
|
480
480
|
}
|
|
481
|
-
const
|
|
481
|
+
const Xt = /* @__PURE__ */ b(Jt, [["render", Qt]]), Yt = {
|
|
482
482
|
props: { column: Object },
|
|
483
483
|
emits: ["update-column"],
|
|
484
484
|
data() {
|
|
@@ -495,52 +495,52 @@ const Qt = /* @__PURE__ */ m(Gt, [["render", Kt]]), Xt = {
|
|
|
495
495
|
var e;
|
|
496
496
|
((e = this.column) == null ? void 0 : e.hidden) !== !0 && (this.value = !0);
|
|
497
497
|
}
|
|
498
|
-
},
|
|
499
|
-
function
|
|
500
|
-
var
|
|
501
|
-
return a(), i("label",
|
|
502
|
-
E(
|
|
503
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
498
|
+
}, Zt = { class: "flex w-full gap-[8px] items-centr" };
|
|
499
|
+
function te(e, t, r, o, n, s) {
|
|
500
|
+
var m, c;
|
|
501
|
+
return a(), i("label", Zt, [
|
|
502
|
+
E(l("input", {
|
|
503
|
+
"onUpdate:modelValue": t[0] || (t[0] = (f) => n.value = f),
|
|
504
504
|
type: "checkbox"
|
|
505
505
|
}, null, 512), [
|
|
506
|
-
[
|
|
506
|
+
[R, n.value]
|
|
507
507
|
]),
|
|
508
|
-
|
|
508
|
+
v(" " + $(((m = r.column) == null ? void 0 : m.ua) || ((c = r.column) == null ? void 0 : c.title)), 1)
|
|
509
509
|
]);
|
|
510
510
|
}
|
|
511
|
-
const
|
|
512
|
-
components: { IconColumns:
|
|
511
|
+
const ee = /* @__PURE__ */ b(Yt, [["render", te]]), re = {
|
|
512
|
+
components: { IconColumns: Xt, AdminTableColumnsHiddenItem: ee },
|
|
513
513
|
emits: ["update-columns"],
|
|
514
514
|
props: { columns: Array },
|
|
515
515
|
methods: {
|
|
516
516
|
updateColumn(e) {
|
|
517
|
-
const t = this.columns.findIndex((o) => (o == null ? void 0 : o.name) === (e == null ? void 0 : e.name)),
|
|
518
|
-
|
|
517
|
+
const t = this.columns.findIndex((o) => (o == null ? void 0 : o.name) === (e == null ? void 0 : e.name)), r = this.columns;
|
|
518
|
+
r[t] = e, this.$emit("update-columns", [...r]);
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
},
|
|
522
|
-
function se(e, t,
|
|
523
|
-
const
|
|
524
|
-
return a(),
|
|
521
|
+
}, le = { class: "py-2 px-3 flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300" }, ne = { class: "flex flex-col gap-[3px] h-[400px] w-[300px] 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" };
|
|
522
|
+
function se(e, t, r, o, n, s) {
|
|
523
|
+
const m = u("IconColumns"), c = u("AdminTableColumnsHiddenItem"), f = u("VsPopover");
|
|
524
|
+
return a(), w(f, {
|
|
525
525
|
trigger: "click",
|
|
526
526
|
placement: "bottom"
|
|
527
527
|
}, {
|
|
528
528
|
reference: y(() => [
|
|
529
|
-
|
|
530
|
-
p(
|
|
529
|
+
l("button", le, [
|
|
530
|
+
p(m, {
|
|
531
531
|
height: "20",
|
|
532
532
|
width: "16"
|
|
533
533
|
})
|
|
534
534
|
])
|
|
535
535
|
]),
|
|
536
536
|
default: y(() => [
|
|
537
|
-
|
|
538
|
-
t[0] || (t[0] =
|
|
539
|
-
|
|
540
|
-
(a(!0), i(x, null,
|
|
541
|
-
p(
|
|
542
|
-
column:
|
|
543
|
-
onUpdateColumn:
|
|
537
|
+
l("div", null, [
|
|
538
|
+
t[0] || (t[0] = l("h2", { class: "text-sm mb-[8px]" }, "Оберіть колонки, щоб приховати", -1)),
|
|
539
|
+
l("ul", ne, [
|
|
540
|
+
(a(!0), i(x, null, C(r.columns, (g, M) => (a(), i("li", { key: M }, [
|
|
541
|
+
p(c, {
|
|
542
|
+
column: g,
|
|
543
|
+
onUpdateColumn: s.updateColumn
|
|
544
544
|
}, null, 8, ["column", "onUpdateColumn"])
|
|
545
545
|
]))), 128))
|
|
546
546
|
])
|
|
@@ -549,14 +549,21 @@ function se(e, t, n, o, s, l) {
|
|
|
549
549
|
_: 1
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
|
-
const
|
|
552
|
+
const ae = /* @__PURE__ */ b(re, [["render", se]]), oe = {}, ie = { class: "vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden" };
|
|
553
|
+
function ce(e, t, r, o, n, s) {
|
|
554
|
+
return a(), i("div", ie, t[0] || (t[0] = [
|
|
555
|
+
V('<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)
|
|
556
|
+
]));
|
|
557
|
+
}
|
|
558
|
+
const ue = /* @__PURE__ */ b(oe, [["render", ce]]), de = {
|
|
553
559
|
props: { table: String },
|
|
554
560
|
components: {
|
|
555
|
-
IconFilter:
|
|
556
|
-
AdminTableControl:
|
|
561
|
+
IconFilter: Z,
|
|
562
|
+
AdminTableControl: Tt,
|
|
557
563
|
AdminTableExport: Wt,
|
|
558
|
-
AdminTableColumnsHidden:
|
|
559
|
-
AdminTableColumn: ot
|
|
564
|
+
AdminTableColumnsHidden: ae,
|
|
565
|
+
AdminTableColumn: ot,
|
|
566
|
+
AdminNodata: ue
|
|
560
567
|
},
|
|
561
568
|
data() {
|
|
562
569
|
return {
|
|
@@ -585,7 +592,15 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
|
|
|
585
592
|
},
|
|
586
593
|
columns() {
|
|
587
594
|
var e, t;
|
|
588
|
-
return (t = (e = this.tableData) == null ? void 0 : e.columns) == null ? void 0 : t.filter((
|
|
595
|
+
return (t = (e = this.tableData) == null ? void 0 : e.columns) == null ? void 0 : t.filter((r) => (r == null ? void 0 : r.hidden) !== !0);
|
|
596
|
+
},
|
|
597
|
+
isForm() {
|
|
598
|
+
var e;
|
|
599
|
+
return (e = this.tableData) == null ? void 0 : e.form;
|
|
600
|
+
},
|
|
601
|
+
isNoData() {
|
|
602
|
+
var e, t;
|
|
603
|
+
return !((e = this.tableData) != null && e.rows) || !((t = this.columns) != null && t.length);
|
|
589
604
|
}
|
|
590
605
|
},
|
|
591
606
|
watch: {
|
|
@@ -597,8 +612,8 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
|
|
|
597
612
|
},
|
|
598
613
|
$route: {
|
|
599
614
|
handler(e, t) {
|
|
600
|
-
var
|
|
601
|
-
((
|
|
615
|
+
var r, o;
|
|
616
|
+
((r = e == null ? void 0 : e.params) == null ? void 0 : r.catchAll) !== ((o = t == null ? void 0 : t.params) == null ? void 0 : o.catchAll) && (this.filterScheme = null, this.getFilters());
|
|
602
617
|
},
|
|
603
618
|
deep: !0
|
|
604
619
|
}
|
|
@@ -607,7 +622,7 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
|
|
|
607
622
|
async getTableData() {
|
|
608
623
|
var e, t;
|
|
609
624
|
try {
|
|
610
|
-
const { data:
|
|
625
|
+
const { data: r } = await k.get(`/api/template/table/${this.table}`), o = await k.get(`/api/table-data/${this.table}`, {
|
|
611
626
|
params: {
|
|
612
627
|
page: this.page,
|
|
613
628
|
search: this.searchValue || null,
|
|
@@ -618,7 +633,7 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
|
|
|
618
633
|
});
|
|
619
634
|
this.tableData = {
|
|
620
635
|
...this.tableData,
|
|
621
|
-
...
|
|
636
|
+
...r,
|
|
622
637
|
...(o == null ? void 0 : o.data) || {}
|
|
623
638
|
};
|
|
624
639
|
} catch {
|
|
@@ -627,10 +642,10 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
|
|
|
627
642
|
async getFilters() {
|
|
628
643
|
var e;
|
|
629
644
|
try {
|
|
630
|
-
const { data: t } = await
|
|
631
|
-
this.filterScheme = (e = t == null ? void 0 : t.list) == null ? void 0 : e.map((
|
|
632
|
-
...
|
|
633
|
-
label: (
|
|
645
|
+
const { data: t } = await k.get(`/api/table-filter/${this.table}`);
|
|
646
|
+
this.filterScheme = (e = t == null ? void 0 : t.list) == null ? void 0 : e.map((r) => ({
|
|
647
|
+
...r,
|
|
648
|
+
label: (r == null ? void 0 : r.label) || (r == null ? void 0 : r.ua)
|
|
634
649
|
}));
|
|
635
650
|
} catch {
|
|
636
651
|
}
|
|
@@ -652,163 +667,167 @@ const le = /* @__PURE__ */ m(ee, [["render", se]]), oe = {
|
|
|
652
667
|
this.activeColumn = e, this.getTableData();
|
|
653
668
|
}
|
|
654
669
|
}
|
|
655
|
-
},
|
|
670
|
+
}, he = { class: "w-[calc(100vw - 320px)]" }, pe = { class: "h-[58px] bg-gray-50 flex items-center justify-between px-[30px]" }, me = { class: "text-xl font-medium" }, be = {
|
|
656
671
|
style: { height: "calc(100vh - 120px)", width: "calc(100vw - 260px)" },
|
|
657
672
|
class: "bg-gray-50 p-[20px] flex pt-[10px]"
|
|
658
|
-
},
|
|
673
|
+
}, fe = { class: "bg-white w-full rounded-xl border p-[20px]" }, ge = { class: "flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px]" }, xe = { class: "flex gap-[6px] ml-auto" }, ye = { class: "space-y-5 flex items-start w-full justify-start" }, _e = {
|
|
659
674
|
style: { height: "calc(100vh - 310px)" },
|
|
660
675
|
class: "overflow-x-auto w-full border-t [&::-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"
|
|
661
|
-
},
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
676
|
+
}, ke = { class: "inline-block w-full align-middle" }, we = {
|
|
677
|
+
key: 0,
|
|
678
|
+
class: "divide-y divide-gray-200 min-w-full dark:divide-neutral-700 relative table-fixed"
|
|
679
|
+
}, ve = { class: "sticky top-0 bg-white w-full relative after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, Ce = { class: "border-stone-200 right-0 z-[1]" }, $e = { class: "divide-y divide-gray-200" }, Me = { class: "min-w-[200px] text-start pe-4 py-3 text-sm text-gray-600" }, Se = { class: "text-center sticky right-0 bg-white w-[80px] px-[10px]" }, Te = { class: "p-[20px] flex justify-end w-full" }, De = { class: "filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-[rgba(0,0,0,0.5)] [&::-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" };
|
|
680
|
+
function Ae(e, t, r, o, n, s) {
|
|
681
|
+
var D, j, z, P, U, O, H;
|
|
682
|
+
const m = u("router-link"), c = u("AdminTableColumnsHidden"), f = u("AdminTableExport"), g = u("IconFilter"), M = u("AdminTableColumn"), I = u("AdminTableControl"), _ = u("AdminNodata"), S = u("VsPagination"), T = u("VsFilter");
|
|
665
683
|
return a(), i(x, null, [
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
684
|
+
l("div", he, [
|
|
685
|
+
l("div", pe, [
|
|
686
|
+
l("h2", me, $((D = n.tableData) == null ? void 0 : D.title), 1),
|
|
687
|
+
s.isForm ? (a(), w(m, {
|
|
688
|
+
key: 0,
|
|
689
|
+
to: `/add?table=${(z = (j = e.$route) == null ? void 0 : j.params) == null ? void 0 : z.catchAll}`,
|
|
671
690
|
class: "py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg bg-blue-500 text-gray-800 shadow-sm hover:bg-blue-700 hover:text-white duration-300"
|
|
672
691
|
}, {
|
|
673
692
|
default: y(() => t[5] || (t[5] = [
|
|
674
|
-
|
|
693
|
+
v(" Додати ")
|
|
675
694
|
])),
|
|
676
695
|
_: 1
|
|
677
|
-
}, 8, ["to"])
|
|
696
|
+
}, 8, ["to"])) : F("", !0)
|
|
678
697
|
]),
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
E(
|
|
683
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
698
|
+
l("div", be, [
|
|
699
|
+
l("div", fe, [
|
|
700
|
+
l("div", ge, [
|
|
701
|
+
E(l("input", {
|
|
702
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => n.searchValue = d),
|
|
684
703
|
class: "py-2 pl-[15px] h-[38px] w-[400px] block w-full border rounded-lg text-sm focus:border-blue-600 focus:border-[2px] outline-none",
|
|
685
704
|
placeholder: "Пошук..."
|
|
686
705
|
}, null, 512), [
|
|
687
|
-
[
|
|
706
|
+
[G, n.searchValue]
|
|
688
707
|
]),
|
|
689
|
-
|
|
690
|
-
p(
|
|
691
|
-
columns: (P =
|
|
692
|
-
onUpdateColumns: t[1] || (t[1] = (
|
|
708
|
+
l("div", xe, [
|
|
709
|
+
p(c, {
|
|
710
|
+
columns: (P = n.tableData) == null ? void 0 : P.columns,
|
|
711
|
+
onUpdateColumns: t[1] || (t[1] = (d) => n.tableData.columns = d)
|
|
693
712
|
}, null, 8, ["columns"]),
|
|
694
|
-
p(
|
|
695
|
-
table:
|
|
696
|
-
columns: (
|
|
713
|
+
p(f, {
|
|
714
|
+
table: r.table,
|
|
715
|
+
columns: (U = n.tableData) == null ? void 0 : U.columns
|
|
697
716
|
}, null, 8, ["table", "columns"]),
|
|
698
|
-
|
|
699
|
-
onClick: t[2] || (t[2] = (
|
|
717
|
+
l("button", {
|
|
718
|
+
onClick: t[2] || (t[2] = (d) => n.isFilters = !n.isFilters),
|
|
700
719
|
class: "py-2 px-3 flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300"
|
|
701
720
|
}, [
|
|
702
|
-
p(
|
|
721
|
+
p(g, {
|
|
703
722
|
height: "16",
|
|
704
723
|
width: "16"
|
|
705
724
|
}),
|
|
706
|
-
t[6] || (t[6] =
|
|
725
|
+
t[6] || (t[6] = v(" Фільтри "))
|
|
707
726
|
])
|
|
708
727
|
])
|
|
709
728
|
]),
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
(a(!0), i(x, null,
|
|
717
|
-
key:
|
|
718
|
-
data:
|
|
719
|
-
activeColumn:
|
|
720
|
-
onChangeActive:
|
|
729
|
+
l("div", ye, [
|
|
730
|
+
l("div", _e, [
|
|
731
|
+
l("div", ke, [
|
|
732
|
+
s.isNoData ? (a(), w(_, { key: 1 })) : (a(), i("table", we, [
|
|
733
|
+
l("thead", ve, [
|
|
734
|
+
l("tr", Ce, [
|
|
735
|
+
(a(!0), i(x, null, C(s.columns, (d) => (a(), w(M, {
|
|
736
|
+
key: d.name,
|
|
737
|
+
data: d,
|
|
738
|
+
activeColumn: n.activeColumn,
|
|
739
|
+
onChangeActive: s.changeActiveColumn
|
|
721
740
|
}, null, 8, ["data", "activeColumn", "onChangeActive"]))), 128)),
|
|
722
|
-
t[7] || (t[7] =
|
|
741
|
+
t[7] || (t[7] = l("th", { class: "w-[70px] sticky right-0 top-0 bg-white" }, null, -1))
|
|
723
742
|
])
|
|
724
743
|
]),
|
|
725
|
-
|
|
726
|
-
(a(!0), i(x, null,
|
|
744
|
+
l("tbody", $e, [
|
|
745
|
+
(a(!0), i(x, null, C((O = n.tableData) == null ? void 0 : O.rows, (d, A) => {
|
|
727
746
|
var q;
|
|
728
|
-
return a(), i("tr", { key:
|
|
729
|
-
|
|
730
|
-
p(
|
|
731
|
-
to: `/card/${
|
|
747
|
+
return a(), i("tr", { key: A }, [
|
|
748
|
+
l("td", Me, [
|
|
749
|
+
p(m, {
|
|
750
|
+
to: `/card/${r.table}/${d == null ? void 0 : d.id}`,
|
|
732
751
|
class: "text-sm text-green-600 decoration-2 hover:underline font-medium focus:outline-none focus:underline hover:text-green-600"
|
|
733
752
|
}, {
|
|
734
753
|
default: y(() => {
|
|
735
754
|
var h;
|
|
736
755
|
return [
|
|
737
|
-
|
|
756
|
+
v($(d == null ? void 0 : d[(h = s.columns[0]) == null ? void 0 : h.name]), 1)
|
|
738
757
|
];
|
|
739
758
|
}),
|
|
740
759
|
_: 2
|
|
741
760
|
}, 1032, ["to"])
|
|
742
761
|
]),
|
|
743
|
-
(a(!0), i(x, null,
|
|
762
|
+
(a(!0), i(x, null, C((q = s.columns) == null ? void 0 : q.slice(1), (h) => {
|
|
744
763
|
var L;
|
|
745
764
|
return a(), i("td", {
|
|
746
765
|
class: "min-w-[300px] w-full text-start px-[4px] py-3 text-sm text-gray-600",
|
|
747
766
|
key: h.name
|
|
748
767
|
}, [
|
|
749
|
-
(a(),
|
|
768
|
+
(a(), w(W(
|
|
750
769
|
(h == null ? void 0 : h.format) === "custom" ? h == null ? void 0 : h.component : e.$componentsConfig[`table-format-${((L = h == null ? void 0 : h.format) == null ? void 0 : L.toLowerCase()) || e.text}`]
|
|
751
770
|
), {
|
|
752
771
|
name: h == null ? void 0 : h.name,
|
|
753
|
-
data:
|
|
754
|
-
value:
|
|
772
|
+
data: d,
|
|
773
|
+
value: d == null ? void 0 : d[h == null ? void 0 : h.name]
|
|
755
774
|
}, null, 8, ["name", "data", "value"]))
|
|
756
775
|
]);
|
|
757
776
|
}), 128)),
|
|
758
|
-
|
|
759
|
-
p(
|
|
760
|
-
item:
|
|
761
|
-
table:
|
|
762
|
-
onUpdateTable:
|
|
777
|
+
l("td", Se, [
|
|
778
|
+
p(I, {
|
|
779
|
+
item: d,
|
|
780
|
+
table: r.table,
|
|
781
|
+
onUpdateTable: s.getTableData
|
|
763
782
|
}, null, 8, ["item", "table", "onUpdateTable"])
|
|
764
783
|
])
|
|
765
784
|
]);
|
|
766
785
|
}), 128))
|
|
767
786
|
])
|
|
768
|
-
])
|
|
787
|
+
]))
|
|
769
788
|
])
|
|
770
789
|
])
|
|
771
790
|
]),
|
|
772
|
-
|
|
773
|
-
p(
|
|
791
|
+
l("div", Te, [
|
|
792
|
+
p(S, {
|
|
774
793
|
goTo: !1,
|
|
775
794
|
class: "justify-end",
|
|
776
|
-
"default-page":
|
|
777
|
-
total: ((H =
|
|
778
|
-
pageSize:
|
|
779
|
-
onPageChange:
|
|
795
|
+
"default-page": s.defaultPage,
|
|
796
|
+
total: ((H = n.tableData) == null ? void 0 : H.total) || 0,
|
|
797
|
+
pageSize: n.limit,
|
|
798
|
+
onPageChange: s.handlePageChange,
|
|
780
799
|
pageSizes: [10, 16, 20],
|
|
781
|
-
onPageSizeChange:
|
|
800
|
+
onPageSizeChange: s.changeLimit
|
|
782
801
|
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])
|
|
783
802
|
])
|
|
784
803
|
])
|
|
785
804
|
])
|
|
786
805
|
]),
|
|
787
|
-
p(
|
|
806
|
+
p(J, { name: "fade" }, {
|
|
788
807
|
default: y(() => {
|
|
789
|
-
var
|
|
808
|
+
var d;
|
|
790
809
|
return [
|
|
791
|
-
E(
|
|
792
|
-
onClick: t[4] || (t[4] = (...
|
|
810
|
+
E(l("div", {
|
|
811
|
+
onClick: t[4] || (t[4] = (...A) => s.closeFilter && s.closeFilter(...A)),
|
|
793
812
|
style: { height: "100vh" },
|
|
794
813
|
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)]"
|
|
795
814
|
}, [
|
|
796
|
-
|
|
797
|
-
(
|
|
815
|
+
l("div", De, [
|
|
816
|
+
(d = n.filterScheme) != null && d.length ? (a(), w(T, {
|
|
798
817
|
key: 0,
|
|
799
818
|
ref: "filter",
|
|
800
|
-
scheme:
|
|
819
|
+
scheme: n.filterScheme,
|
|
801
820
|
layout: "default",
|
|
802
821
|
"apply-vue-router": "",
|
|
803
822
|
history: "",
|
|
804
823
|
name: "filter",
|
|
805
|
-
onFilterChange:
|
|
824
|
+
onFilterChange: s.filterChange,
|
|
806
825
|
closeFilterBtn: !0,
|
|
807
|
-
onFilterClose: t[3] || (t[3] = (
|
|
808
|
-
}, null, 8, ["scheme", "onFilterChange"])) :
|
|
826
|
+
onFilterClose: t[3] || (t[3] = (A) => n.isFilters = !1)
|
|
827
|
+
}, null, 8, ["scheme", "onFilterChange"])) : F("", !0)
|
|
809
828
|
])
|
|
810
829
|
], 512), [
|
|
811
|
-
[
|
|
830
|
+
[K, n.isFilters]
|
|
812
831
|
])
|
|
813
832
|
];
|
|
814
833
|
}),
|
|
@@ -816,8 +835,8 @@ function Ce(e, t, n, o, s, l) {
|
|
|
816
835
|
})
|
|
817
836
|
], 64);
|
|
818
837
|
}
|
|
819
|
-
const
|
|
820
|
-
components: { AdminTable:
|
|
838
|
+
const Fe = /* @__PURE__ */ b(de, [["render", Ae]]), Ve = {
|
|
839
|
+
components: { AdminTable: Fe },
|
|
821
840
|
data() {
|
|
822
841
|
return {
|
|
823
842
|
table: !1,
|
|
@@ -829,7 +848,7 @@ const Te = /* @__PURE__ */ m(oe, [["render", Ce]]), Me = {
|
|
|
829
848
|
$route: {
|
|
830
849
|
async handler() {
|
|
831
850
|
var e;
|
|
832
|
-
(e =
|
|
851
|
+
(e = B) != null && e.value || await this.getMenu(), await this.checkPageType();
|
|
833
852
|
},
|
|
834
853
|
deep: !0
|
|
835
854
|
},
|
|
@@ -843,54 +862,54 @@ const Te = /* @__PURE__ */ m(oe, [["render", Ce]]), Me = {
|
|
|
843
862
|
methods: {
|
|
844
863
|
flattenMenu(e) {
|
|
845
864
|
const t = [];
|
|
846
|
-
return e.forEach((
|
|
847
|
-
|
|
865
|
+
return e.forEach((r) => {
|
|
866
|
+
r.menu ? t.push(...this.flattenMenu(r.menu)) : t.push(r);
|
|
848
867
|
}), t;
|
|
849
868
|
},
|
|
850
869
|
async getMenu() {
|
|
851
870
|
try {
|
|
852
|
-
const { data: e } = await
|
|
853
|
-
|
|
871
|
+
const { data: e } = await k.get("/api/user-menu");
|
|
872
|
+
B.value = e;
|
|
854
873
|
} catch {
|
|
855
874
|
}
|
|
856
875
|
},
|
|
857
876
|
async checkPageType() {
|
|
858
|
-
const e = this.flattenMenu(
|
|
877
|
+
const e = this.flattenMenu(B.value);
|
|
859
878
|
e != null && e.length || this.$router.replace("/404");
|
|
860
879
|
const t = e == null ? void 0 : e.find((o) => {
|
|
861
|
-
var
|
|
862
|
-
return (o == null ? void 0 : o.path) == ((
|
|
880
|
+
var n, s;
|
|
881
|
+
return (o == null ? void 0 : o.path) == ((s = (n = this.$route) == null ? void 0 : n.params) == null ? void 0 : s.catchAll);
|
|
863
882
|
});
|
|
864
883
|
this.title = t == null ? void 0 : t.ua, t || this.$router.replace("/404");
|
|
865
|
-
const
|
|
866
|
-
this.table =
|
|
884
|
+
const r = t == null ? void 0 : t.table;
|
|
885
|
+
this.table = r || !1, !r && this.getInterface();
|
|
867
886
|
},
|
|
868
887
|
async getInterface() {
|
|
869
888
|
var e, t;
|
|
870
889
|
try {
|
|
871
|
-
const { data:
|
|
890
|
+
const { data: r } = await k.get(
|
|
872
891
|
`/api/template/interface/${((t = (e = this.$route) == null ? void 0 : e.params) == null ? void 0 : t.catchAll) || ""}`
|
|
873
892
|
);
|
|
874
|
-
this.interface =
|
|
893
|
+
this.interface = r || "";
|
|
875
894
|
} catch {
|
|
876
895
|
this.interface = "";
|
|
877
896
|
}
|
|
878
897
|
}
|
|
879
898
|
}
|
|
880
|
-
},
|
|
881
|
-
function
|
|
882
|
-
const
|
|
883
|
-
return
|
|
899
|
+
}, Ie = ["innerHTML"];
|
|
900
|
+
function Be(e, t, r, o, n, s) {
|
|
901
|
+
const m = u("AdminTable");
|
|
902
|
+
return n.table ? (a(), w(m, {
|
|
884
903
|
key: 0,
|
|
885
|
-
table:
|
|
904
|
+
table: n.table
|
|
886
905
|
}, null, 8, ["table"])) : (a(), i("div", {
|
|
887
906
|
key: 1,
|
|
888
907
|
class: "w-full bg-gray-50",
|
|
889
908
|
style: { height: "calc(100vh - 120px)" },
|
|
890
|
-
innerHTML:
|
|
891
|
-
}, null, 8,
|
|
909
|
+
innerHTML: n.interface
|
|
910
|
+
}, null, 8, Ie));
|
|
892
911
|
}
|
|
893
|
-
const
|
|
912
|
+
const Pe = /* @__PURE__ */ b(Ve, [["render", Be]]);
|
|
894
913
|
export {
|
|
895
|
-
|
|
914
|
+
Pe as default
|
|
896
915
|
};
|