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