@opengis/admin 0.1.66 → 0.1.68
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-Co0qOLyQ.js +26 -0
- package/dist/{add-page-YonHQsF2.js → add-page-Bv-BNhYQ.js} +11 -8
- package/dist/{admin-interface-DSR1im5I.js → admin-interface-j3f16Iy8.js} +593 -446
- package/dist/{admin-view-WZhYBXYw.js → admin-view-DykzQo5I.js} +214 -223
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +83 -83
- package/dist/card-page-DtXydAxe.js +275 -0
- package/dist/{card-view-DYhMgpIH.js → card-view-MpG-dhK0.js} +1 -1
- package/dist/{edit-page-D8fMSwEp.js → edit-page-DkD5JFQv.js} +13 -12
- package/dist/{import-file-Do-GQQHc.js → import-file-DGI0k9si.js} +6797 -6814
- 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 +81 -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 +152 -185
- package/server/plugins/vite.js +74 -69
- package/server/routes/calendar/controllers/calendar.data.js +88 -88
- package/server/routes/calendar/index.mjs +7 -17
- package/server/routes/calendar/schema.js +22 -0
- 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 +54 -7
- package/server/routes/menu/controllers/getMenu.js +51 -51
- package/server/routes/menu/index.mjs +5 -5
- package/server/routes/menu/schema.js +0 -0
- 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 +15 -40
- package/server/routes/notifications/schema.js +11 -0
- 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 +14 -26
- package/server/routes/properties/schema.js +11 -0
- 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/routes/templates/scheme.js +9 -0
- 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-DGI0k9si.js";
|
2
|
+
import { openBlock as s, createElementBlock as a, createTextVNode as D, toDisplayString as $, createCommentVNode as w, createStaticVNode as j, Fragment as C, createElementVNode as l, resolveComponent as d, createVNode as f, withCtx as v, createBlock as k, withModifiers as ye, renderList as I, normalizeClass as A, withDirectives as q, vModelCheckbox as _e, resolveDynamicComponent as ke, Transition as z, renderSlot as ve, vShow as se, normalizeStyle as le } from "vue";
|
3
|
+
import { I as we } from "./IconChevronDown-Co0qOLyQ.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
|
+
}, Ie = {
|
76
77
|
key: 0,
|
77
78
|
d: "m7 15 5 5 5-5"
|
78
|
-
},
|
79
|
+
}, Ae = {
|
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($(o.label) + " ", 1),
|
95
|
+
(s(), a("svg", Se, [
|
96
|
+
n.currentSort === "asc" || n.currentSort === "" ? (s(), a("path", Ie)) : w("", !0),
|
97
|
+
n.currentSort === "desc" || n.currentSort === "" ? (s(), a("path", Ae)) : w("", !0)
|
97
98
|
]))
|
98
|
-
])) : (s(),
|
99
|
+
])) : (s(), a("p", Te, $(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 qe = /* @__PURE__ */ g(Fe, [["render", je]]), ze = {
|
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(ze, [["render", Le]]), Oe = {
|
143
144
|
components: {
|
144
|
-
IconMore:
|
145
|
-
IconDelete:
|
146
|
-
IconEdit:
|
145
|
+
IconMore: pe,
|
146
|
+
IconDelete: qe,
|
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,74 +198,74 @@ 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"), p = d("router-link"), h = d("IconDelete"), _ = d("VsPopover"), c = d("VsDialog");
|
207
|
+
return s(), a(C, null, [
|
208
|
+
l("div", Ee, [
|
209
|
+
f(_, {
|
209
210
|
trigger: "click",
|
210
211
|
placement: "bottom-left"
|
211
212
|
}, {
|
212
|
-
reference:
|
213
|
-
l("button",
|
214
|
-
|
213
|
+
reference: v(() => [
|
214
|
+
l("button", Ne, [
|
215
|
+
f(u, {
|
215
216
|
height: "16",
|
216
217
|
width: "16"
|
217
218
|
})
|
218
219
|
])
|
219
220
|
]),
|
220
|
-
default:
|
221
|
-
var
|
221
|
+
default: v(() => {
|
222
|
+
var x, S, y, T, F;
|
222
223
|
return [
|
223
|
-
l("div",
|
224
|
-
(
|
224
|
+
l("div", He, [
|
225
|
+
(x = r.actions) != null && x.includes("edit") && r.isForm ? (s(), k(p, {
|
225
226
|
key: 0,
|
226
|
-
to: `/edit?table=${(
|
227
|
+
to: `/edit?table=${(y = (S = t.$route) == null ? void 0 : S.params) == null ? void 0 : y.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: v(() => [
|
231
|
+
f(b, { color: "#000" }),
|
232
|
+
e[4] || (e[4] = D(" Редагувати "))
|
232
233
|
]),
|
233
234
|
_: 1
|
234
|
-
}, 8, ["to"])) :
|
235
|
-
r.isForm ? (s(),
|
236
|
-
(
|
235
|
+
}, 8, ["to"])) : w("", !0),
|
236
|
+
r.isForm ? (s(), a("div", We)) : w("", !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
|
+
f(h),
|
242
243
|
e[5] || (e[5] = l("span", { class: "text-gray-800" }, "Видалити", -1))
|
243
|
-
])) :
|
244
|
+
])) : w("", !0)
|
244
245
|
])
|
245
246
|
];
|
246
247
|
}),
|
247
248
|
_: 1
|
248
249
|
})
|
249
250
|
]),
|
250
|
-
|
251
|
+
f(c, {
|
251
252
|
visible: n.isDeleteConfirm,
|
252
|
-
"onUpdate:visible": e[3] || (e[3] = (
|
253
|
+
"onUpdate:visible": e[3] || (e[3] = (x) => n.isDeleteConfirm = x),
|
253
254
|
title: "Ви впевнені?"
|
254
255
|
}, {
|
255
|
-
default:
|
256
|
-
l("div",
|
256
|
+
default: v(() => [
|
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] = (x) => 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] = (...x) => o.deleteElement && o.deleteElement(...x))
|
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: we, 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" }, ut = ["onClick"], dt = {
|
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"), p = d("IconSuccess"), h = d("VsCheckbox"), _ = 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
|
+
f(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
|
+
f(b, {
|
446
|
+
height: "12",
|
447
|
+
width: "16"
|
448
|
+
})
|
365
449
|
]),
|
366
|
-
|
450
|
+
f(_, {
|
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: v(() => [
|
458
|
+
n.isSuccessTemplate ? (s(), a("div", gt, [
|
459
|
+
l("button", {
|
375
460
|
type: "button",
|
376
|
-
class: "
|
377
|
-
|
378
|
-
}, "
|
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
|
+
}, " Закрити "),
|
379
464
|
l("button", {
|
380
465
|
type: "button",
|
381
|
-
class: "
|
382
|
-
onClick: e[
|
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, [
|
470
|
+
l("button", {
|
471
|
+
type: "button",
|
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: v(() => [
|
483
|
+
n.isSuccessTemplate ? (s(), a("div", st, [
|
484
|
+
f(p, {
|
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, I(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: A(["h-[14px] w-[14px] border rounded-full flex items-center justify-center", { "border-blue-500": (c == null ? void 0 : c.name) === n.activeAction }])
|
502
|
+
}, [
|
503
|
+
(c == null ? void 0 : c.name) === n.activeAction ? (s(), a("span", dt)) : w("", !0)
|
504
|
+
], 2),
|
505
|
+
D(" " + $(c == null ? void 0 : c.label), 1)
|
506
|
+
], 8, ut))), 128))
|
507
|
+
])
|
508
|
+
]),
|
509
|
+
l("div", ht, [
|
510
|
+
(s(!0), a(C, null, I(r.columns, (c, x) => (s(), a("div", {
|
393
511
|
class: "flex items-center",
|
394
|
-
key:
|
512
|
+
key: x,
|
395
513
|
style: { width: "calc((100% - 10px) / 2)" }
|
396
514
|
}, [
|
397
|
-
|
515
|
+
f(h, {
|
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] = (S) => n.cols = S),
|
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, I(n.tableFormats, (c, x) => (s(), a("div", {
|
411
529
|
class: "flex items-center",
|
412
|
-
key:
|
530
|
+
key: x
|
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: (S) => 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
|
+
}, " Формат " + $(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 = {}, vt = {
|
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 wt(t, e, r, i, n, o) {
|
563
|
+
return s(), a("svg", vt, 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", wt]]), $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(),
|
470
|
-
|
471
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
584
|
+
}, St = { class: "flex w-full gap-[8px] items-centr" };
|
585
|
+
function It(t, e, r, i, n, o) {
|
586
|
+
var u, b;
|
587
|
+
return s(), a("label", St, [
|
588
|
+
q(l("input", {
|
589
|
+
"onUpdate:modelValue": e[0] || (e[0] = (p) => n.value = p),
|
472
590
|
type: "checkbox"
|
473
591
|
}, null, 512), [
|
474
|
-
[
|
592
|
+
[_e, n.value]
|
475
593
|
]),
|
476
|
-
|
594
|
+
D(" " + $(((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 At = /* @__PURE__ */ g($t, [["render", It]]), Tt = {
|
598
|
+
components: { IconColumns: Ct, AdminTableColumnsHiddenItem: At },
|
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"), p = d("VsPopover");
|
610
|
+
return s(), k(p, {
|
493
611
|
trigger: "click",
|
494
612
|
placement: "bottom"
|
495
613
|
}, {
|
496
|
-
reference:
|
497
|
-
l("button",
|
498
|
-
|
614
|
+
reference: v(() => [
|
615
|
+
l("button", Vt, [
|
616
|
+
f(u, {
|
499
617
|
height: "20",
|
500
618
|
width: "16"
|
501
619
|
})
|
502
620
|
])
|
503
621
|
]),
|
504
|
-
default:
|
505
|
-
l("div",
|
622
|
+
default: v(() => [
|
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, I(r.columns, (h, _) => (s(), a("li", { key: _ }, [
|
627
|
+
f(b, {
|
628
|
+
column: h,
|
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]]), qt = {}, zt = {
|
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", zt, 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(qt, [["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, p, h, _, c, x, S;
|
664
|
+
return s(), k(ke(
|
665
|
+
((u = r.column) == null ? void 0 : u.format) === "custom" ? (b = r.column) == null ? void 0 : b.component : t.$componentsConfig[`table-format-${((h = (p = r.column) == null ? void 0 : p.format) == null ? void 0 : h.toLowerCase()) || "text"}`]
|
548
666
|
), {
|
549
|
-
onUpdateTable: e[0] || (e[0] = (
|
667
|
+
onUpdateTable: e[0] || (e[0] = (y) => t.$emit("update-table")),
|
550
668
|
name: (_ = r.column) == null ? void 0 : _.name,
|
551
669
|
data: r.row,
|
552
|
-
value: (
|
670
|
+
value: (x = r.row) == null ? void 0 : x[(c = r.column) == null ? void 0 : c.name],
|
553
671
|
table: r.table,
|
554
672
|
column: r.column,
|
555
|
-
edit: (
|
673
|
+
edit: (S = r.column) == null ? void 0 : S.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
|
-
onClick: e[0] || (e[0] = (
|
710
|
+
onClick: e[0] || (e[0] = (p) => n.expanded = !n.expanded),
|
593
711
|
class: "grow rounded-md cursor-pointer"
|
594
712
|
}, [
|
595
|
-
l("span",
|
713
|
+
l("span", Qt, $(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
|
-
onClick: e[1] || (e[1] = (
|
717
|
+
onClick: e[1] || (e[1] = (p) => n.expanded = !n.expanded)
|
600
718
|
}, [
|
601
|
-
n.expanded ? (s(),
|
719
|
+
n.expanded ? (s(), k(b, {
|
602
720
|
key: 1,
|
603
721
|
width: "14"
|
604
|
-
})) : (s(),
|
722
|
+
})) : (s(), k(u, { key: 0 }))
|
605
723
|
])
|
606
724
|
]),
|
607
|
-
|
608
|
-
default:
|
609
|
-
|
610
|
-
|
725
|
+
f(z, { name: "fade" }, {
|
726
|
+
default: v(() => [
|
727
|
+
q(l("div", Xt, [
|
728
|
+
ve(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" }, ur = { class: "table-info-card" };
|
756
|
+
function dr(t, e, r, i, n, o) {
|
757
|
+
var x, S;
|
758
|
+
const u = d("AdminComponentIs"), b = d("AdminTree"), p = d("VsWidgetMap"), h = d("VsNoData"), _ = 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
|
+
(S = (x = t.$route) == null ? void 0 : x.query) != null && S.card ? (s(), a(C, { key: 0 }, [
|
765
|
+
r.row ? (s(), k(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: v(() => [
|
771
|
+
(s(!0), a(C, null, I(r.columns, (y) => (s(), a("dl", lr, [
|
772
|
+
l("dt", sr, [
|
773
|
+
l("p", or, $((y == null ? void 0 : y.ua) || (y == null ? void 0 : y.title)) + ": ", 1)
|
656
774
|
]),
|
657
|
-
l("dd",
|
658
|
-
l("p",
|
659
|
-
|
775
|
+
l("dd", ar, [
|
776
|
+
l("p", ir, [
|
777
|
+
f(u, {
|
660
778
|
row: r.row,
|
661
|
-
column:
|
779
|
+
column: y,
|
662
780
|
table: r.table
|
663
781
|
}, null, 8, ["row", "column", "table"])
|
664
782
|
])
|
@@ -666,19 +784,19 @@ function Xt(t, e, r, a, n, o) {
|
|
666
784
|
]))), 256))
|
667
785
|
]),
|
668
786
|
_: 1
|
669
|
-
})) :
|
670
|
-
b
|
787
|
+
})) : w("", !0),
|
788
|
+
f(b, {
|
671
789
|
title: "Карта",
|
672
790
|
class: "border-b p-[10px] py-[16px]"
|
673
791
|
}, {
|
674
|
-
default:
|
675
|
-
var
|
792
|
+
default: v(() => {
|
793
|
+
var y, T;
|
676
794
|
return [
|
677
|
-
(
|
795
|
+
(y = r.row) != null && y.geom ? (s(), k(p, {
|
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(), k(h, {
|
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
|
+
f(b, {
|
692
810
|
title: "Коментарі",
|
693
811
|
class: "border-b p-[10px] py-[16px]"
|
694
812
|
}, {
|
695
|
-
default:
|
696
|
-
var
|
813
|
+
default: v(() => {
|
814
|
+
var y;
|
697
815
|
return [
|
698
|
-
l("div",
|
699
|
-
|
700
|
-
id: (
|
816
|
+
l("div", cr, [
|
817
|
+
f(_, {
|
818
|
+
id: (y = r.row) == null ? void 0 : y.id
|
701
819
|
}, null, 8, ["id"])
|
702
820
|
])
|
703
821
|
];
|
704
822
|
}),
|
705
823
|
_: 1
|
706
824
|
}),
|
707
|
-
b
|
825
|
+
f(b, {
|
708
826
|
title: "Файли",
|
709
827
|
class: "border-b p-[10px] py-[16px]"
|
710
828
|
}, {
|
711
|
-
default:
|
712
|
-
var
|
829
|
+
default: v(() => {
|
830
|
+
var y;
|
713
831
|
return [
|
714
|
-
l("div",
|
715
|
-
|
716
|
-
id: (
|
832
|
+
l("div", ur, [
|
833
|
+
f(c, {
|
834
|
+
id: (y = r.row) == null ? void 0 : y.id
|
717
835
|
}, null, 8, ["id"])
|
718
836
|
])
|
719
837
|
];
|
720
838
|
}),
|
721
839
|
_: 1
|
722
840
|
})
|
723
|
-
], 64)) : (s(),
|
841
|
+
], 64)) : (s(), k(h, {
|
724
842
|
key: 1,
|
725
843
|
text: "Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"
|
726
844
|
}))
|
727
845
|
])
|
728
846
|
]);
|
729
847
|
}
|
730
|
-
const
|
848
|
+
const hr = /* @__PURE__ */ g(tr, [["render", dr]]), 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,15 @@ 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 = {
|
889
|
+
emits: ["filterChange"],
|
771
890
|
props: { scheme: { type: Object }, onFilters: { type: Number } },
|
772
|
-
components: { IconFilter:
|
891
|
+
components: { IconFilter: _r },
|
773
892
|
data() {
|
774
893
|
return {
|
775
894
|
isFilters: !1
|
@@ -780,35 +899,35 @@ const ar = /* @__PURE__ */ m(lr, [["render", or]]), ir = {
|
|
780
899
|
this.isFilters && t.classList.contains("filter-container") && (this.isFilters = !1);
|
781
900
|
}
|
782
901
|
}
|
783
|
-
},
|
902
|
+
}, vr = {
|
784
903
|
key: 0,
|
785
904
|
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(),
|
905
|
+
}, wr = { class: "filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-white [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
|
906
|
+
function Cr(t, e, r, i, n, o) {
|
907
|
+
const u = d("IconFilter"), b = d("VsFilter");
|
908
|
+
return s(), a(C, null, [
|
790
909
|
l("button", {
|
791
|
-
onClick: e[0] || (e[0] = (
|
910
|
+
onClick: e[0] || (e[0] = (p) => n.isFilters = !n.isFilters),
|
792
911
|
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
912
|
}, [
|
794
|
-
|
913
|
+
f(u, {
|
795
914
|
height: "16",
|
796
915
|
width: "16"
|
797
916
|
}),
|
798
|
-
e[4] || (e[4] =
|
799
|
-
r.onFilters ? (s(),
|
917
|
+
e[4] || (e[4] = D(" Фільтри ")),
|
918
|
+
r.onFilters ? (s(), a("span", vr, $(r.onFilters), 1)) : w("", !0)
|
800
919
|
]),
|
801
|
-
|
802
|
-
default:
|
803
|
-
var
|
920
|
+
f(z, { name: "fade" }, {
|
921
|
+
default: v(() => {
|
922
|
+
var p;
|
804
923
|
return [
|
805
|
-
|
806
|
-
onClick: e[3] || (e[3] = (...
|
924
|
+
q(l("div", {
|
925
|
+
onClick: e[3] || (e[3] = (...h) => o.closeFilter && o.closeFilter(...h)),
|
807
926
|
style: { height: "100vh" },
|
808
927
|
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
928
|
}, [
|
810
|
-
l("div",
|
811
|
-
(
|
929
|
+
l("div", wr, [
|
930
|
+
(p = r.scheme) != null && p.length ? (s(), k(b, {
|
812
931
|
key: 0,
|
813
932
|
ref: "filter",
|
814
933
|
scheme: r.scheme,
|
@@ -816,13 +935,13 @@ function ur(t, e, r, a, n, o) {
|
|
816
935
|
"apply-vue-router": "",
|
817
936
|
history: "",
|
818
937
|
name: "filter",
|
819
|
-
onFilterChange: e[1] || (e[1] = (
|
938
|
+
onFilterChange: e[1] || (e[1] = (h) => t.$emit("filterChange", h)),
|
820
939
|
closeFilterBtn: !0,
|
821
|
-
onFilterClose: e[2] || (e[2] = (
|
822
|
-
}, null, 8, ["scheme"])) :
|
940
|
+
onFilterClose: e[2] || (e[2] = (h) => n.isFilters = !1)
|
941
|
+
}, null, 8, ["scheme"])) : w("", !0)
|
823
942
|
])
|
824
943
|
], 512), [
|
825
|
-
[
|
944
|
+
[se, n.isFilters]
|
826
945
|
])
|
827
946
|
];
|
828
947
|
}),
|
@@ -830,25 +949,25 @@ function ur(t, e, r, a, n, o) {
|
|
830
949
|
})
|
831
950
|
], 64);
|
832
951
|
}
|
833
|
-
const
|
952
|
+
const $r = /* @__PURE__ */ g(kr, [["render", Cr]]), Sr = {
|
834
953
|
props: { tabsList: { type: Array, default: () => [] }, filterState: String }
|
835
|
-
},
|
954
|
+
}, Ir = {
|
836
955
|
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
956
|
"aria-label": "Tabs",
|
838
957
|
role: "tablist",
|
839
958
|
"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": (
|
959
|
+
}, Ar = ["onClick"];
|
960
|
+
function Tr(t, e, r, i, n, o) {
|
961
|
+
return s(), a("nav", Ir, [
|
962
|
+
(s(!0), a(C, null, I(r.tabsList, (u) => (s(), a("button", {
|
963
|
+
onClick: (b) => t.$emit("update:filterState", u == null ? void 0 : u.name),
|
964
|
+
class: A(["hs-tab-active:after:bg-gray-800 hs-tab-active:text-gray-800 px-2.5 py-1.5 mb-2 relative inline-flex justify-center items-center gap-x-2 hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 after:absolute after:-bottom-2 after:inset-x-0 after:z-10 after:h-0.5 after:pointer-events-none dark:hs-tab-active:text-neutral-200 dark:hs-tab-active:after:bg-neutral-400 dark:text-neutral-500 dark:hover:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 active", {
|
965
|
+
" 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
966
|
}])
|
848
|
-
},
|
967
|
+
}, $(u == null ? void 0 : u.label), 11, Ar))), 256))
|
849
968
|
]);
|
850
969
|
}
|
851
|
-
const
|
970
|
+
const Vr = /* @__PURE__ */ g(Sr, [["render", Tr]]), Dr = {}, Fr = {
|
852
971
|
xmlns: "http://www.w3.org/2000/svg",
|
853
972
|
viewBox: "0 0 24 24",
|
854
973
|
fill: "none",
|
@@ -858,8 +977,8 @@ const gr = /* @__PURE__ */ m(pr, [["render", mr]]), xr = {}, yr = {
|
|
858
977
|
"stroke-linejoin": "round",
|
859
978
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-filter"
|
860
979
|
};
|
861
|
-
function
|
862
|
-
return s(),
|
980
|
+
function Mr(t, e, r, i, n, o) {
|
981
|
+
return s(), a("svg", Fr, e[0] || (e[0] = [
|
863
982
|
l("path", {
|
864
983
|
stroke: "none",
|
865
984
|
d: "M0 0h24v24H0z",
|
@@ -868,39 +987,39 @@ function _r(t, e, r, a, n, o) {
|
|
868
987
|
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
988
|
]));
|
870
989
|
}
|
871
|
-
const
|
872
|
-
components: { IconFilter2:
|
990
|
+
const jr = /* @__PURE__ */ g(Dr, [["render", Mr]]), qr = {
|
991
|
+
components: { IconFilter2: jr },
|
873
992
|
props: { filterCustom: String, customList: Array }
|
874
|
-
},
|
875
|
-
function
|
876
|
-
const
|
877
|
-
return s(),
|
993
|
+
}, zr = { class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, Br = { class: "flex flex-col gap-[4px]" }, Pr = ["onClick"];
|
994
|
+
function Lr(t, e, r, i, n, o) {
|
995
|
+
const u = d("IconFilter2"), b = d("VsPopover");
|
996
|
+
return s(), k(b, {
|
878
997
|
ref: "popover",
|
879
998
|
placement: "bottom"
|
880
999
|
}, {
|
881
|
-
reference:
|
882
|
-
l("button",
|
883
|
-
|
1000
|
+
reference: v(() => [
|
1001
|
+
l("button", zr, [
|
1002
|
+
f(u, {
|
884
1003
|
height: "20",
|
885
1004
|
width: "20"
|
886
1005
|
})
|
887
1006
|
])
|
888
1007
|
]),
|
889
|
-
default:
|
890
|
-
l("div",
|
891
|
-
(s(!0),
|
1008
|
+
default: v(() => [
|
1009
|
+
l("div", Br, [
|
1010
|
+
(s(!0), a(C, null, I(r.customList, (p, h) => (s(), a("button", {
|
892
1011
|
onClick: (_) => {
|
893
|
-
var
|
894
|
-
t.$emit("update:filterCustom",
|
1012
|
+
var c;
|
1013
|
+
t.$emit("update:filterCustom", p == null ? void 0 : p.name), (c = t.$refs) == null || c.popover.togglePopover();
|
895
1014
|
},
|
896
|
-
key:
|
897
|
-
class:
|
898
|
-
},
|
1015
|
+
key: h,
|
1016
|
+
class: A(["p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300", { "bg-gray-100": r.filterCustom === (p == null ? void 0 : p.name) }])
|
1017
|
+
}, $(p == null ? void 0 : p.label), 11, Pr))), 128)),
|
899
1018
|
l("button", {
|
900
1019
|
class: "p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300",
|
901
|
-
onClick: e[0] || (e[0] = (
|
902
|
-
var
|
903
|
-
t.$emit("update:filterCustom", void 0), (
|
1020
|
+
onClick: e[0] || (e[0] = (p) => {
|
1021
|
+
var h;
|
1022
|
+
t.$emit("update:filterCustom", void 0), (h = t.$refs) == null || h.popover.togglePopover();
|
904
1023
|
})
|
905
1024
|
}, " Скинути фільтри ")
|
906
1025
|
])
|
@@ -908,22 +1027,22 @@ function Ir(t, e, r, a, n, o) {
|
|
908
1027
|
_: 1
|
909
1028
|
}, 512);
|
910
1029
|
}
|
911
|
-
const
|
1030
|
+
const Ur = /* @__PURE__ */ g(qr, [["render", Lr]]), Or = {
|
912
1031
|
props: { table: String, title: String },
|
913
1032
|
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:
|
1033
|
+
AdminTableControl: Je,
|
1034
|
+
AdminTableExport: _t,
|
1035
|
+
AdminTableColumnsHidden: jt,
|
1036
|
+
AdminTableColumn: De,
|
1037
|
+
AdminNodata: Ot,
|
1038
|
+
IconPlus: oe,
|
1039
|
+
IconSearch: xe,
|
1040
|
+
AdminTableCardInfo: hr,
|
1041
|
+
IconOpenCard: mr,
|
1042
|
+
AdminComponentIs: ae,
|
1043
|
+
AdminTableFilters: $r,
|
1044
|
+
AdminTableTabs: Vr,
|
1045
|
+
AdminTableCustomFilters: Ur
|
927
1046
|
},
|
928
1047
|
data() {
|
929
1048
|
return {
|
@@ -937,7 +1056,8 @@ const Tr = /* @__PURE__ */ m(wr, [["render", Ir]]), Sr = {
|
|
937
1056
|
isVisibleCardInfo: !1,
|
938
1057
|
onFilters: 0,
|
939
1058
|
filterState: null,
|
940
|
-
filterCustom: null
|
1059
|
+
filterCustom: null,
|
1060
|
+
visibleColumns: []
|
941
1061
|
};
|
942
1062
|
},
|
943
1063
|
async mounted() {
|
@@ -963,8 +1083,8 @@ const Tr = /* @__PURE__ */ m(wr, [["render", Ir]]), Sr = {
|
|
963
1083
|
activeCardRow() {
|
964
1084
|
var t, e;
|
965
1085
|
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 = (
|
1086
|
+
var i, n;
|
1087
|
+
return (r == null ? void 0 : r.id) === ((n = (i = this.$route) == null ? void 0 : i.query) == null ? void 0 : n.card);
|
968
1088
|
})) || {};
|
969
1089
|
},
|
970
1090
|
getActions() {
|
@@ -976,13 +1096,17 @@ const Tr = /* @__PURE__ */ m(wr, [["render", Ir]]), Sr = {
|
|
976
1096
|
async table() {
|
977
1097
|
this.tableData = null, await this.getTableData();
|
978
1098
|
},
|
979
|
-
searchValue() {
|
980
|
-
|
1099
|
+
searchValue(t) {
|
1100
|
+
var e;
|
1101
|
+
this.getTableData(), this.$router.push({
|
1102
|
+
...this.$route,
|
1103
|
+
query: { ...(e = this.$route) == null ? void 0 : e.query, search: t || void 0 }
|
1104
|
+
});
|
981
1105
|
},
|
982
1106
|
$route: {
|
983
1107
|
handler(t, e) {
|
984
|
-
var r,
|
985
|
-
((r = t == null ? void 0 : t.params) == null ? void 0 : r.catchAll) !== ((
|
1108
|
+
var r, i;
|
1109
|
+
((r = t == null ? void 0 : t.params) == null ? void 0 : r.catchAll) !== ((i = e == null ? void 0 : e.params) == null ? void 0 : i.catchAll) && (this.visibleColumns = [], this.unmountedData(), this.getFilters());
|
986
1110
|
},
|
987
1111
|
deep: !0
|
988
1112
|
},
|
@@ -999,32 +1123,42 @@ const Tr = /* @__PURE__ */ m(wr, [["render", Ir]]), Sr = {
|
|
999
1123
|
},
|
1000
1124
|
filterCustom(t) {
|
1001
1125
|
var e;
|
1002
|
-
this.$router.
|
1126
|
+
this.$router.replace({
|
1003
1127
|
...this.$route,
|
1004
1128
|
query: { ...(e = this.$route) == null ? void 0 : e.query, filterCustom: t }
|
1005
1129
|
}), this.getTableData();
|
1130
|
+
},
|
1131
|
+
columns(t) {
|
1132
|
+
var e, r;
|
1133
|
+
this.visibleColumns = t == null ? void 0 : t.map((i) => i == null ? void 0 : i.name), this.$router.replace({
|
1134
|
+
...this.$route,
|
1135
|
+
query: {
|
1136
|
+
...(e = this.$route) == null ? void 0 : e.query,
|
1137
|
+
columns: (r = this.visibleColumns) != null && r.length ? this.visibleColumns : void 0
|
1138
|
+
}
|
1139
|
+
});
|
1006
1140
|
}
|
1007
1141
|
},
|
1008
1142
|
methods: {
|
1009
1143
|
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 = ((
|
1144
|
+
var t, e, r, i, n, o, u, b, p, h, _, c, x;
|
1145
|
+
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((i = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : i.limit) || 20, this.filterState = ((o = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : o.filterState) || null, this.filterCustom = ((b = (u = this.$route) == null ? void 0 : u.query) == null ? void 0 : b.filterCustom) || null, this.searchValue = ((h = (p = this.$route) == null ? void 0 : p.query) == null ? void 0 : h.search) || null, this.visibleColumns = ((c = (_ = this.$route) == null ? void 0 : _.query) == null ? void 0 : c.columns) || [], (x = this.$route) != null && x.query.card && (this.isVisibleCardInfo = !0);
|
1012
1146
|
},
|
1013
1147
|
rowWidth(t) {
|
1014
|
-
var r,
|
1015
|
-
const e = (
|
1148
|
+
var r, i;
|
1149
|
+
const e = (i = (r = this.tableData) == null ? void 0 : r.columns) == null ? void 0 : i.find((n) => n.name === t);
|
1016
1150
|
if (e) {
|
1017
1151
|
const n = e == null ? void 0 : e.width;
|
1018
1152
|
return n != null && n.includes("px") ? n : `${n}px`;
|
1019
1153
|
}
|
1020
1154
|
},
|
1021
1155
|
unmountedData() {
|
1022
|
-
this.page = 1, this.filterCustom = null, this.filterState = null, this.isVisibleCardInfo = !1, this.filterScheme = null, this.filters = null, this.onFilters = 0;
|
1156
|
+
this.page = 1, this.visibleColumns = [], this.filterCustom = null, this.filterState = null, this.isVisibleCardInfo = !1, this.filterScheme = null, this.filters = null, this.onFilters = 0;
|
1023
1157
|
},
|
1024
1158
|
async getTableData() {
|
1025
|
-
var t, e;
|
1159
|
+
var t, e, r, i, n, o, u;
|
1026
1160
|
try {
|
1027
|
-
const { data:
|
1161
|
+
const { data: b } = await V.get(`/api/template/table/${this.table}`), p = await V.get(`/api/table-data/${this.table}`, {
|
1028
1162
|
params: {
|
1029
1163
|
page: this.page,
|
1030
1164
|
search: this.searchValue || null,
|
@@ -1036,16 +1170,19 @@ const Tr = /* @__PURE__ */ m(wr, [["render", Ir]]), Sr = {
|
|
1036
1170
|
}
|
1037
1171
|
});
|
1038
1172
|
this.tableData = {
|
1039
|
-
...
|
1040
|
-
...(
|
1041
|
-
}
|
1173
|
+
...b,
|
1174
|
+
...(p == null ? void 0 : p.data) || {}
|
1175
|
+
}, (r = this.visibleColumns) != null && r.length ? (i = this.tableData) == null || i.columns.forEach((h) => {
|
1176
|
+
var _;
|
1177
|
+
(_ = this.visibleColumns) != null && _.includes(h == null ? void 0 : h.name) ? h.hidden = !1 : h.hidden = !0;
|
1178
|
+
}) : this.visibleColumns = (u = (o = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : o.filter((h) => (h == null ? void 0 : h.hidden) !== !0)) == null ? void 0 : u.map((h) => h == null ? void 0 : h.name);
|
1042
1179
|
} catch {
|
1043
1180
|
}
|
1044
1181
|
},
|
1045
1182
|
async getFilters() {
|
1046
1183
|
var t;
|
1047
1184
|
try {
|
1048
|
-
const { data: e } = await
|
1185
|
+
const { data: e } = await V.get(`/api/table-filter/${this.table}`);
|
1049
1186
|
this.filterScheme = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map((r) => ({
|
1050
1187
|
...r,
|
1051
1188
|
label: (r == null ? void 0 : r.label) || (r == null ? void 0 : r.ua)
|
@@ -1086,161 +1223,165 @@ const Tr = /* @__PURE__ */ m(wr, [["render", Ir]]), Sr = {
|
|
1086
1223
|
});
|
1087
1224
|
}
|
1088
1225
|
}
|
1089
|
-
},
|
1090
|
-
style: { height: "calc(100vh -
|
1226
|
+
}, Er = { class: "w-[calc(100vw - 320px)] bg-gray-50" }, Nr = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, Hr = { class: "text-xl font-medium" }, Wr = {
|
1227
|
+
style: { height: "calc(100vh - 155px)", width: "calc(100vw - 260px)" },
|
1091
1228
|
class: "bg-gray-50 p-[20px] flex pt-[10px]"
|
1092
|
-
},
|
1229
|
+
}, 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
1230
|
key: 0,
|
1094
1231
|
class: "relative min-w-full divide-y divide-gray-200 table-fixed dark:divide-neutral-700"
|
1095
|
-
},
|
1232
|
+
}, Qr = { class: "sticky top-[-1px] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, Xr = { class: "right-0 border-t border-stone-200" }, Yr = { class: "divide-y divide-gray-200" }, en = { class: "px-4 py-3 text-sm text-gray-600" }, tn = ["onClick"], rn = ["onClick"], nn = {
|
1096
1233
|
key: 0,
|
1097
1234
|
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(),
|
1235
|
+
}, ln = { class: "p-[20px] flex justify-start items-center w-full" }, sn = { class: "w-[200px]" }, on = { class: "text-sm text-gray-600 dark:text-neutral-400" }, an = { class: "font-semibold text-gray-800 dark:text-neutral-200" }, cn = { class: "font-semibold text-gray-800 dark:text-neutral-200" };
|
1236
|
+
function un(t, e, r, i, n, o) {
|
1237
|
+
var B, P, L, U, O, E, N, H, W, R, G, Z, J, K, Q, X;
|
1238
|
+
const u = d("IconPlus"), b = d("router-link"), p = d("AdminTableTabs"), h = d("IconSearch"), _ = d("VsText"), c = d("AdminTableCustomFilters"), x = d("AdminTableColumnsHidden"), S = d("AdminTableExport"), y = d("AdminTableFilters"), T = d("IconOpenCard"), F = d("AdminTableColumn"), M = d("AdminComponentIs"), ie = d("AdminTableControl"), ce = d("AdminNodata"), ue = d("VsPagination"), de = d("AdminTableCardInfo");
|
1239
|
+
return s(), a("div", Er, [
|
1240
|
+
l("div", Nr, [
|
1241
|
+
l("h2", Hr, $(r.title), 1),
|
1242
|
+
o.isForm ? (s(), k(b, {
|
1106
1243
|
key: 0,
|
1107
|
-
to: `/add?table=${(
|
1244
|
+
to: `/add?table=${(P = (B = t.$route) == null ? void 0 : B.params) == null ? void 0 : P.catchAll}`,
|
1108
1245
|
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
1246
|
}, {
|
1110
|
-
default:
|
1111
|
-
|
1247
|
+
default: v(() => [
|
1248
|
+
f(u, {
|
1112
1249
|
height: "16",
|
1113
1250
|
width: "16"
|
1114
1251
|
}),
|
1115
|
-
e[5] || (e[5] =
|
1252
|
+
e[5] || (e[5] = D(" Додати "))
|
1116
1253
|
]),
|
1117
1254
|
_: 1
|
1118
|
-
}, 8, ["to"])) :
|
1255
|
+
}, 8, ["to"])) : w("", !0)
|
1119
1256
|
]),
|
1120
|
-
l("div",
|
1121
|
-
l("div",
|
1122
|
-
(U = (L = n.tableData) == null ? void 0 : L.filterState) != null && U.length ? (s(),
|
1257
|
+
l("div", Wr, [
|
1258
|
+
l("div", Rr, [
|
1259
|
+
(U = (L = n.tableData) == null ? void 0 : L.filterState) != null && U.length ? (s(), k(p, {
|
1123
1260
|
key: 0,
|
1124
1261
|
tabsList: (O = n.tableData) == null ? void 0 : O.filterState,
|
1125
1262
|
filterState: n.filterState,
|
1126
|
-
"onUpdate:filterState": e[0] || (e[0] = (
|
1127
|
-
}, null, 8, ["tabsList", "filterState"])) :
|
1128
|
-
l("div",
|
1263
|
+
"onUpdate:filterState": e[0] || (e[0] = (m) => n.filterState = m)
|
1264
|
+
}, null, 8, ["tabsList", "filterState"])) : w("", !0),
|
1265
|
+
l("div", Gr, [
|
1129
1266
|
l("div", {
|
1130
|
-
class:
|
1267
|
+
class: A([n.isVisibleCardInfo ? "w-[calc(100%-360px)]" : "w-full"])
|
1131
1268
|
}, [
|
1132
1269
|
l("div", {
|
1133
|
-
class:
|
1270
|
+
class: A(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative", { "pr-[20px]": !n.isVisibleCardInfo }])
|
1134
1271
|
}, [
|
1135
|
-
|
1272
|
+
f(h, {
|
1136
1273
|
height: "14",
|
1137
1274
|
width: "14",
|
1138
1275
|
class: "absolute top-[10px] left-[14px] text-gray-500 z-[1]"
|
1139
1276
|
}),
|
1140
|
-
|
1277
|
+
f(_, {
|
1141
1278
|
modelValue: n.searchValue,
|
1142
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
1279
|
+
"onUpdate:modelValue": e[1] || (e[1] = (m) => n.searchValue = m),
|
1143
1280
|
placeholder: "Пошук...",
|
1144
1281
|
clearable: !0,
|
1145
1282
|
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
1283
|
}, null, 8, ["modelValue"]),
|
1147
|
-
l("div",
|
1148
|
-
(N = (E = n.tableData) == null ? void 0 : E.filterCustom) != null && N.length ? (s(),
|
1284
|
+
l("div", Zr, [
|
1285
|
+
(N = (E = n.tableData) == null ? void 0 : E.filterCustom) != null && N.length ? (s(), k(c, {
|
1149
1286
|
key: 0,
|
1150
1287
|
customList: (H = n.tableData) == null ? void 0 : H.filterCustom,
|
1151
1288
|
filterCustom: n.filterCustom,
|
1152
|
-
"onUpdate:filterCustom": e[2] || (e[2] = (
|
1153
|
-
}, null, 8, ["customList", "filterCustom"])) :
|
1154
|
-
|
1289
|
+
"onUpdate:filterCustom": e[2] || (e[2] = (m) => n.filterCustom = m)
|
1290
|
+
}, null, 8, ["customList", "filterCustom"])) : w("", !0),
|
1291
|
+
f(x, {
|
1155
1292
|
columns: (W = n.tableData) == null ? void 0 : W.columns,
|
1156
|
-
onUpdateColumns: e[3] || (e[3] = (
|
1293
|
+
onUpdateColumns: e[3] || (e[3] = (m) => n.tableData.columns = m)
|
1157
1294
|
}, null, 8, ["columns"]),
|
1158
|
-
|
1295
|
+
f(S, {
|
1159
1296
|
table: r.table,
|
1160
|
-
columns: (R = n.tableData) == null ? void 0 : R.columns
|
1161
|
-
|
1162
|
-
|
1297
|
+
columns: (R = n.tableData) == null ? void 0 : R.columns,
|
1298
|
+
page: n.page,
|
1299
|
+
"filter-state": n.filterState,
|
1300
|
+
"filter-custom": n.filterCustom,
|
1301
|
+
filters: n.filters
|
1302
|
+
}, null, 8, ["table", "columns", "page", "filter-state", "filter-custom", "filters"]),
|
1303
|
+
f(y, {
|
1163
1304
|
scheme: n.filterScheme,
|
1164
1305
|
onFilters: n.onFilters,
|
1165
1306
|
onFilterChange: o.filterChange
|
1166
1307
|
}, null, 8, ["scheme", "onFilters", "onFilterChange"]),
|
1167
1308
|
l("button", {
|
1168
|
-
onClick: e[4] || (e[4] = (...
|
1309
|
+
onClick: e[4] || (e[4] = (...m) => o.toggleCardInfo && o.toggleCardInfo(...m)),
|
1169
1310
|
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
1311
|
}, [
|
1171
|
-
|
1172
|
-
class:
|
1312
|
+
f(T, {
|
1313
|
+
class: A({ "rotate-180 duration-300": !n.isVisibleCardInfo })
|
1173
1314
|
}, null, 8, ["class"])
|
1174
1315
|
])
|
1175
1316
|
])
|
1176
1317
|
], 2),
|
1177
1318
|
l("div", {
|
1178
|
-
class:
|
1319
|
+
class: A(["flex items-start justify-start w-full space-y-5", { "pr-[20px]": !n.isVisibleCardInfo }])
|
1179
1320
|
}, [
|
1180
1321
|
l("div", {
|
1181
|
-
style:
|
1182
|
-
height: (Z = (G = n.tableData) == null ? void 0 : G.filterState) != null && Z.length ? "calc(100vh - 370px)" : "calc(100vh -
|
1322
|
+
style: le({
|
1323
|
+
height: (Z = (G = n.tableData) == null ? void 0 : G.filterState) != null && Z.length ? "calc(100vh - 370px)" : "calc(100vh - 330px)"
|
1183
1324
|
}),
|
1184
1325
|
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
1326
|
}, [
|
1186
|
-
l("div",
|
1187
|
-
o.isNoData ? (s(),
|
1188
|
-
l("thead",
|
1189
|
-
l("tr",
|
1190
|
-
(s(!0),
|
1191
|
-
key:
|
1192
|
-
style:
|
1193
|
-
width: o.rowWidth(
|
1194
|
-
textAlign:
|
1195
|
-
wordBreak:
|
1327
|
+
l("div", Jr, [
|
1328
|
+
o.isNoData ? (s(), k(ce, { key: 1 })) : (s(), a("table", Kr, [
|
1329
|
+
l("thead", Qr, [
|
1330
|
+
l("tr", Xr, [
|
1331
|
+
(s(!0), a(C, null, I(o.columns, (m) => (s(), k(F, {
|
1332
|
+
key: m.name,
|
1333
|
+
style: le({
|
1334
|
+
width: o.rowWidth(m == null ? void 0 : m.name),
|
1335
|
+
textAlign: m == null ? void 0 : m.align,
|
1336
|
+
wordBreak: m.wrap
|
1196
1337
|
}),
|
1197
|
-
data:
|
1338
|
+
data: m,
|
1198
1339
|
activeColumn: n.activeColumn,
|
1199
1340
|
onChangeActive: o.changeActiveColumn
|
1200
1341
|
}, null, 8, ["style", "data", "activeColumn", "onChangeActive"]))), 128)),
|
1201
|
-
e[6] || (e[6] = l("th", { class: "w-[70px] sticky right-0 top-0
|
1342
|
+
e[6] || (e[6] = l("th", { class: "w-[70px] sticky right-0 top-0" }, null, -1))
|
1202
1343
|
])
|
1203
1344
|
]),
|
1204
|
-
l("tbody",
|
1205
|
-
(s(!0),
|
1206
|
-
var
|
1207
|
-
return s(),
|
1208
|
-
l("td",
|
1345
|
+
l("tbody", Yr, [
|
1346
|
+
(s(!0), a(C, null, I((J = n.tableData) == null ? void 0 : J.rows, (m, he) => {
|
1347
|
+
var Y, ee, te;
|
1348
|
+
return s(), a("tr", { key: he }, [
|
1349
|
+
l("td", en, [
|
1209
1350
|
l("button", {
|
1210
|
-
onClick: () => o.pushToCard(
|
1211
|
-
class:
|
1212
|
-
((
|
1351
|
+
onClick: () => o.pushToCard(m == null ? void 0 : m.id),
|
1352
|
+
class: A(["text-sm font-medium", [
|
1353
|
+
((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
1354
|
]])
|
1214
1355
|
}, [
|
1215
|
-
|
1216
|
-
row:
|
1356
|
+
f(M, {
|
1357
|
+
row: m,
|
1217
1358
|
column: o.columns[0],
|
1218
1359
|
table: r.table,
|
1219
1360
|
onUpdateTable: o.getTableData
|
1220
1361
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1221
|
-
], 10,
|
1362
|
+
], 10, tn)
|
1222
1363
|
]),
|
1223
|
-
(s(!0),
|
1224
|
-
onClick: (
|
1225
|
-
class:
|
1226
|
-
key:
|
1364
|
+
(s(!0), a(C, null, I((ee = o.columns) == null ? void 0 : ee.slice(1), (re) => (s(), a("td", {
|
1365
|
+
onClick: (fn) => o.changeActiveCardInfo(m == null ? void 0 : m.id),
|
1366
|
+
class: A(["px-3 py-3 text-sm text-gray-600 text-start whitespace-nowrap", { "cursor-pointer": n.isVisibleCardInfo }]),
|
1367
|
+
key: re.name
|
1227
1368
|
}, [
|
1228
|
-
|
1229
|
-
row:
|
1230
|
-
column:
|
1369
|
+
f(M, {
|
1370
|
+
row: m,
|
1371
|
+
column: re,
|
1231
1372
|
table: r.table,
|
1232
1373
|
onUpdateTable: o.getTableData
|
1233
1374
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1234
|
-
], 10,
|
1235
|
-
(
|
1236
|
-
|
1375
|
+
], 10, rn))), 128)),
|
1376
|
+
(te = o.getActions) != null && te.length ? (s(), a("td", nn, [
|
1377
|
+
f(ie, {
|
1237
1378
|
actions: o.getActions,
|
1238
1379
|
isForm: o.isForm,
|
1239
|
-
item:
|
1380
|
+
item: m,
|
1240
1381
|
table: r.table,
|
1241
1382
|
onUpdateTable: o.getTableData
|
1242
1383
|
}, null, 8, ["actions", "isForm", "item", "table", "onUpdateTable"])
|
1243
|
-
])) :
|
1384
|
+
])) : w("", !0)
|
1244
1385
|
]);
|
1245
1386
|
}), 128))
|
1246
1387
|
])
|
@@ -1248,28 +1389,34 @@ function Rr(t, e, r, a, n, o) {
|
|
1248
1389
|
])
|
1249
1390
|
], 4)
|
1250
1391
|
], 2),
|
1251
|
-
l("div",
|
1252
|
-
|
1392
|
+
l("div", ln, [
|
1393
|
+
l("div", sn, [
|
1394
|
+
l("p", on, [
|
1395
|
+
l("span", an, $(n.filters || n.searchValue ? "Знайдено" : "Об'єктів") + " " + $(((K = n.tableData) == null ? void 0 : K.count) || 0) + " з ", 1),
|
1396
|
+
l("span", cn, $(((Q = n.tableData) == null ? void 0 : Q.total) || 0), 1)
|
1397
|
+
])
|
1398
|
+
]),
|
1399
|
+
n.limit ? (s(), k(ue, {
|
1253
1400
|
key: 0,
|
1254
1401
|
goTo: !1,
|
1255
1402
|
class: "justify-end",
|
1256
|
-
"default-page": o.defaultPage,
|
1257
|
-
total: ((
|
1403
|
+
"default-page": parseInt(o.defaultPage),
|
1404
|
+
total: ((X = n.tableData) == null ? void 0 : X.total) || 0,
|
1258
1405
|
pageSize: parseInt(n.limit),
|
1259
1406
|
onPageChange: o.handlePageChange,
|
1260
1407
|
pageSizes: [10, 16, 20],
|
1261
1408
|
onPageSizeChange: o.changeLimit
|
1262
|
-
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])) :
|
1409
|
+
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])) : w("", !0)
|
1263
1410
|
])
|
1264
1411
|
], 2),
|
1265
|
-
|
1266
|
-
default:
|
1267
|
-
n.isVisibleCardInfo ? (s(),
|
1412
|
+
f(z, { name: "slide-fade" }, {
|
1413
|
+
default: v(() => [
|
1414
|
+
n.isVisibleCardInfo ? (s(), k(de, {
|
1268
1415
|
key: 0,
|
1269
1416
|
table: r.table,
|
1270
1417
|
columns: o.columns,
|
1271
1418
|
row: o.activeCardRow
|
1272
|
-
}, null, 8, ["table", "columns", "row"])) :
|
1419
|
+
}, null, 8, ["table", "columns", "row"])) : w("", !0)
|
1273
1420
|
]),
|
1274
1421
|
_: 1
|
1275
1422
|
})
|
@@ -1278,8 +1425,8 @@ function Rr(t, e, r, a, n, o) {
|
|
1278
1425
|
])
|
1279
1426
|
]);
|
1280
1427
|
}
|
1281
|
-
const
|
1282
|
-
components: { AdminTable:
|
1428
|
+
const dn = /* @__PURE__ */ g(Or, [["render", un], ["__scopeId", "data-v-58248090"]]), hn = {
|
1429
|
+
components: { AdminTable: dn },
|
1283
1430
|
data() {
|
1284
1431
|
return {
|
1285
1432
|
table: !1,
|
@@ -1291,7 +1438,7 @@ const Gr = /* @__PURE__ */ m(Sr, [["render", Rr], ["__scopeId", "data-v-09c7ed19
|
|
1291
1438
|
$route: {
|
1292
1439
|
async handler() {
|
1293
1440
|
var t;
|
1294
|
-
(t =
|
1441
|
+
(t = ne) != null && t.value || await this.getMenu(), await this.checkPageType();
|
1295
1442
|
},
|
1296
1443
|
deep: !0
|
1297
1444
|
},
|
@@ -1310,21 +1457,21 @@ const Gr = /* @__PURE__ */ m(Sr, [["render", Rr], ["__scopeId", "data-v-09c7ed19
|
|
1310
1457
|
}), e;
|
1311
1458
|
},
|
1312
1459
|
async checkPageType() {
|
1313
|
-
var
|
1314
|
-
const t = this.flattenMenu(
|
1460
|
+
var i, n;
|
1461
|
+
const t = this.flattenMenu(ne.value);
|
1315
1462
|
t != null && t.length || this.$router.replace("/404");
|
1316
1463
|
const e = t == null ? void 0 : t.find((o) => {
|
1317
|
-
var
|
1318
|
-
return (o == null ? void 0 : o.path) == ((
|
1464
|
+
var u, b;
|
1465
|
+
return (o == null ? void 0 : o.path) == ((b = (u = this.$route) == null ? void 0 : u.params) == null ? void 0 : b.catchAll);
|
1319
1466
|
});
|
1320
|
-
this.title = e == null ? void 0 : e.ua, e || this.$router.replace("/404"), e != null && e.component && this.$router.replace((n = (
|
1467
|
+
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
1468
|
const r = e == null ? void 0 : e.table;
|
1322
1469
|
this.table = r || !1, !r && this.getInterface();
|
1323
1470
|
},
|
1324
1471
|
async getInterface() {
|
1325
1472
|
var t, e;
|
1326
1473
|
try {
|
1327
|
-
const { data: r } = await
|
1474
|
+
const { data: r } = await V.get(
|
1328
1475
|
`/api/template/interface/${((e = (t = this.$route) == null ? void 0 : t.params) == null ? void 0 : e.catchAll) || ""}`
|
1329
1476
|
);
|
1330
1477
|
this.interface = r || "";
|
@@ -1333,21 +1480,21 @@ const Gr = /* @__PURE__ */ m(Sr, [["render", Rr], ["__scopeId", "data-v-09c7ed19
|
|
1333
1480
|
}
|
1334
1481
|
}
|
1335
1482
|
}
|
1336
|
-
},
|
1337
|
-
function
|
1338
|
-
const
|
1339
|
-
return n.table ? (s(),
|
1483
|
+
}, pn = ["innerHTML"];
|
1484
|
+
function bn(t, e, r, i, n, o) {
|
1485
|
+
const u = d("AdminTable");
|
1486
|
+
return n.table ? (s(), k(u, {
|
1340
1487
|
key: 0,
|
1341
1488
|
table: n.table,
|
1342
1489
|
title: n.title
|
1343
|
-
}, null, 8, ["table", "title"])) : (s(),
|
1490
|
+
}, null, 8, ["table", "title"])) : (s(), a("div", {
|
1344
1491
|
key: 1,
|
1345
1492
|
class: "w-full bg-gray-50",
|
1346
1493
|
style: { height: "calc(100vh - 120px)" },
|
1347
1494
|
innerHTML: n.interface
|
1348
|
-
}, null, 8,
|
1495
|
+
}, null, 8, pn));
|
1349
1496
|
}
|
1350
|
-
const
|
1497
|
+
const yn = /* @__PURE__ */ g(hn, [["render", bn]]);
|
1351
1498
|
export {
|
1352
|
-
|
1499
|
+
yn as default
|
1353
1500
|
};
|