@opengis/admin 0.1.81 → 0.1.83
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-D5JGurpf.js → IconChevronDown-B7bJL5rk.js} +1 -1
- package/dist/{add-page-DjmhHq_I.js → add-page-D5TrUydC.js} +1 -1
- package/dist/{admin-interface-CIA9Y-Dz.js → admin-interface-Cv1M1Cmt.js} +370 -352
- package/dist/{admin-view-DABvcRfg.js → admin-view-vVXbKHih.js} +45 -45
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +63 -61
- package/dist/assets/logo.svg +41 -41
- package/dist/{card-page-B_Vr2qvx.js → card-page-BbP6doYG.js} +146 -126
- package/dist/{card-view-XmNFtrP8.js → card-view-C2YWCaFs.js} +1 -1
- package/dist/{edit-page-ELlQWVFa.js → edit-page-BRKTh4MZ.js} +1 -1
- package/dist/{import-file-CsnR0UjH.js → import-file-DA-DiiaH.js} +6024 -5941
- 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 +17 -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 +153 -153
- 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_mentioned.sql +1 -1
- package/module/settings/select/core.user_uid.sql +1 -1
- package/module/settings/table/admin.access.table.json +83 -83
- package/module/settings/table/admin.custom_column.table.json +99 -99
- package/module/settings/table/admin.properties.table.json +39 -39
- package/module/settings/table/admin.roles.table.json +64 -64
- package/module/settings/table/admin.routes.table.json +68 -68
- package/module/settings/table/admin.user_properties.table.json +34 -34
- package/module/settings/table/admin.user_roles.table.json +72 -72
- package/module/settings/table/admin.users.table.json +121 -121
- package/package.json +81 -81
- package/plugin.js +29 -27
- 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/token.js +15 -15
- package/server/helpers/controllers/vue.js +2 -2
- package/server/helpers/index.mjs +17 -17
- package/server/plugins/access/funcs/getAdminAccess.js +15 -0
- package/server/plugins/access/index.mjs +6 -0
- package/server/plugins/adminHook.js +93 -93
- package/server/plugins/cron.js +10 -10
- package/server/plugins/docs.js +28 -28
- package/server/plugins/hook.js +223 -223
- package/server/plugins/vite.js +71 -71
- package/server/routes/access/controllers/access.group.js +30 -0
- package/server/routes/access/controllers/access.group.post.js +44 -0
- package/server/routes/access/index.mjs +63 -0
- package/server/routes/calendar/controllers/calendar.data.js +87 -87
- package/server/routes/calendar/index.mjs +7 -7
- package/server/routes/calendar/schema.js +21 -21
- package/server/routes/data/controllers/cardData.js +81 -79
- 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 +20 -20
- package/server/routes/data/controllers/tableDataId.js +27 -27
- package/server/routes/data/controllers/tableFilter.js +63 -63
- package/server/routes/data/controllers/tokenInfo.js +10 -0
- 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 +17 -15
- package/server/routes/data/schema.js +54 -54
- package/server/routes/menu/controllers/getMenu.js +67 -67
- package/server/routes/menu/index.mjs +5 -5
- package/server/routes/notifications/controllers/readNotifications.js +27 -27
- package/server/routes/notifications/controllers/testEmail.js +35 -35
- package/server/routes/notifications/controllers/userNotifications.js +53 -53
- package/server/routes/notifications/funcs/addNotification.js +21 -21
- package/server/routes/notifications/funcs/sendNotification.js +105 -105
- package/server/routes/notifications/hook/onWidgetSet.js +57 -57
- package/server/routes/notifications/index.mjs +27 -27
- package/server/routes/notifications/schema.js +16 -16
- package/server/routes/properties/controllers/admin.properties.get.js +29 -29
- package/server/routes/properties/controllers/user.properties.get.js +30 -30
- 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 -14
- package/server/routes/properties/schema.js +10 -10
- package/server/routes/root.mjs +3 -3
- package/server/routes/templates/controllers/getTemplate.js +26 -26
- package/server/routes/templates/index.mjs +16 -16
- package/server/routes/templates/schema.js +8 -8
- package/server/routes/user/controllers/user.cls.id.js +14 -14
- package/server/routes/user/controllers/user.cls.js +71 -71
- package/server/routes/user/controllers/user.cls.post.js +52 -52
- package/server/routes/user/controllers/user.info.js +17 -17
- package/server/routes/user/schema.js +14 -14
- package/server/routes/widget/controllers/utils/historyFormat.js +75 -75
- package/server/routes/widget/controllers/utils/obj2db.js +13 -13
- package/server/routes/widget/controllers/widget.del.js +41 -41
- package/server/routes/widget/controllers/widget.get.js +96 -96
- package/server/routes/widget/controllers/widget.set.js +76 -76
- package/server/routes/widget/index.mjs +11 -11
- package/server/routes/widget/schema.js +12 -12
- 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 +29 -26
@@ -1,6 +1,6 @@
|
|
1
|
-
import { _ as k, b as Te, a as
|
2
|
-
import { openBlock as r, createElementBlock as a, createTextVNode as
|
3
|
-
import { I as Ue } from "./IconChevronDown-
|
1
|
+
import { _ as k, b as Te, a as F, c as Ve, d as De, e as Fe, f as Me, I as je, u as ye, s as qe } from "./import-file-DA-DiiaH.js";
|
2
|
+
import { openBlock as r, createElementBlock as a, createTextVNode as M, toDisplayString as I, createCommentVNode as w, createStaticVNode as B, Fragment as A, createElementVNode as l, resolveComponent as p, createVNode as x, withCtx as $, createBlock as _, renderList as D, withModifiers as Be, normalizeClass as V, withDirectives as L, vModelCheckbox as ze, resolveDynamicComponent as z, Transition as P, renderSlot as Le, vShow as ve, getCurrentInstance as Pe, ref as _e, normalizeStyle as ke } from "vue";
|
3
|
+
import { I as Ue } from "./IconChevronDown-B7bJL5rk.js";
|
4
4
|
const Oe = {
|
5
5
|
data() {
|
6
6
|
return {
|
@@ -91,15 +91,15 @@ function Ge(t, e, s, i, n, o) {
|
|
91
91
|
class: "text-sm text-stone-500 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",
|
92
92
|
onClick: e[0] || (e[0] = (u) => o.handleClickSortBtn(n.currentSort))
|
93
93
|
}, [
|
94
|
-
|
94
|
+
M(I(o.label) + " ", 1),
|
95
95
|
(r(), a("svg", Ne, [
|
96
96
|
n.currentSort === "asc" || n.currentSort === "" ? (r(), a("path", He)) : w("", !0),
|
97
97
|
n.currentSort === "desc" || n.currentSort === "" ? (r(), a("path", Re)) : w("", !0)
|
98
98
|
]))
|
99
|
-
])) : (r(), a("p", We,
|
99
|
+
])) : (r(), a("p", We, I(o.label), 1))
|
100
100
|
]);
|
101
101
|
}
|
102
|
-
const Ze = /* @__PURE__ */ k(Oe, [["render", Ge]]), Je = {},
|
102
|
+
const Ze = /* @__PURE__ */ k(Oe, [["render", Ge]]), Je = {}, Ye = {
|
103
103
|
class: "flex-shrink-0 size-3.5",
|
104
104
|
xmlns: "http://www.w3.org/2000/svg",
|
105
105
|
viewBox: "0 0 24 24",
|
@@ -109,12 +109,12 @@ const Ze = /* @__PURE__ */ k(Oe, [["render", Ge]]), Je = {}, Ke = {
|
|
109
109
|
"stroke-linecap": "round",
|
110
110
|
"stroke-linejoin": "round"
|
111
111
|
};
|
112
|
-
function
|
113
|
-
return r(), a("svg",
|
114
|
-
|
112
|
+
function Ke(t, e, s, i, n, o) {
|
113
|
+
return r(), a("svg", Ye, e[0] || (e[0] = [
|
114
|
+
B('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>', 5)
|
115
115
|
]));
|
116
116
|
}
|
117
|
-
const
|
117
|
+
const Qe = /* @__PURE__ */ k(Je, [["render", Ke]]), Xe = {
|
118
118
|
props: {
|
119
119
|
height: { type: String, default: "16" },
|
120
120
|
width: { type: String, default: "12" },
|
@@ -122,7 +122,7 @@ const Xe = /* @__PURE__ */ k(Je, [["render", Qe]]), Ye = {
|
|
122
122
|
}
|
123
123
|
}, et = { style: { display: "none" } }, tt = ["height", "width", "fill"];
|
124
124
|
function nt(t, e, s, i, n, o) {
|
125
|
-
return r(), a(
|
125
|
+
return r(), a(A, null, [
|
126
126
|
(r(), a("svg", et, e[0] || (e[0] = [
|
127
127
|
l("symbol", {
|
128
128
|
id: "icon-pencil",
|
@@ -140,10 +140,10 @@ function nt(t, e, s, i, n, o) {
|
|
140
140
|
]), 8, tt))
|
141
141
|
], 64);
|
142
142
|
}
|
143
|
-
const st = /* @__PURE__ */ k(
|
143
|
+
const st = /* @__PURE__ */ k(Xe, [["render", nt]]), lt = {
|
144
144
|
components: {
|
145
145
|
IconMore: Te,
|
146
|
-
IconDelete:
|
146
|
+
IconDelete: Qe,
|
147
147
|
IconEdit: st
|
148
148
|
},
|
149
149
|
emits: ["updateTable"],
|
@@ -163,6 +163,11 @@ const st = /* @__PURE__ */ k(Ye, [["render", nt]]), lt = {
|
|
163
163
|
left: 0
|
164
164
|
};
|
165
165
|
},
|
166
|
+
computed: {
|
167
|
+
getCustomActions() {
|
168
|
+
return this.actions.filter((t) => typeof t == "object");
|
169
|
+
}
|
170
|
+
},
|
166
171
|
methods: {
|
167
172
|
openConfirm() {
|
168
173
|
this.isDeleteConfirm = !0, document.querySelector("body").click();
|
@@ -170,7 +175,7 @@ const st = /* @__PURE__ */ k(Ye, [["render", nt]]), lt = {
|
|
170
175
|
async getData() {
|
171
176
|
var t;
|
172
177
|
try {
|
173
|
-
const { data: e } = await
|
178
|
+
const { data: e } = await F.get(
|
174
179
|
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
175
180
|
);
|
176
181
|
this.formValue = e;
|
@@ -184,10 +189,10 @@ const st = /* @__PURE__ */ k(Ye, [["render", nt]]), lt = {
|
|
184
189
|
async deleteElement() {
|
185
190
|
var t;
|
186
191
|
try {
|
187
|
-
const { data: e } = await
|
192
|
+
const { data: e } = await F.get(
|
188
193
|
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
189
194
|
);
|
190
|
-
await
|
195
|
+
await F.delete(`/api/table/${e == null ? void 0 : e.token}`), await this.$notify({
|
191
196
|
title: "Успішно!",
|
192
197
|
message: "Об`єкт успішно видалeно",
|
193
198
|
type: "success"
|
@@ -201,21 +206,26 @@ const st = /* @__PURE__ */ k(Ye, [["render", nt]]), lt = {
|
|
201
206
|
} finally {
|
202
207
|
this.isDeleteConfirm = !1;
|
203
208
|
}
|
209
|
+
},
|
210
|
+
async customButtonAction(t) {
|
211
|
+
t != null && t.form && await this.$v3plugin.$form({
|
212
|
+
token: "wJbtW5SHZvFeaD_hNn9vn5t0jUY"
|
213
|
+
});
|
204
214
|
}
|
205
215
|
}
|
206
|
-
}, rt = { class: "hs-dropdown [--placement:bottom-right] inline-flex" }, ot = { 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" }, at = { class: "flex flex-col items-start" }, it = {
|
216
|
+
}, rt = { class: "hs-dropdown [--placement:bottom-right] inline-flex" }, ot = { 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" }, at = { class: "flex flex-col items-start" }, it = ["onClick"], ct = { class: "text-gray-800" }, ut = {
|
207
217
|
key: 1,
|
208
218
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
209
|
-
},
|
210
|
-
function
|
211
|
-
const u =
|
212
|
-
return r(), a(
|
219
|
+
}, dt = { class: "p-4" }, ht = { class: "flex justify-end mt-4 gap-x-3" };
|
220
|
+
function pt(t, e, s, i, n, o) {
|
221
|
+
const u = p("IconMore"), b = p("IconEdit"), f = p("router-link"), m = p("IconDelete"), v = p("VsPopover"), c = p("VsDialog");
|
222
|
+
return r(), a(A, null, [
|
213
223
|
l("div", rt, [
|
214
224
|
x(v, {
|
215
225
|
trigger: "click",
|
216
226
|
placement: "bottom-left"
|
217
227
|
}, {
|
218
|
-
reference:
|
228
|
+
reference: $(() => [
|
219
229
|
l("button", ot, [
|
220
230
|
x(u, {
|
221
231
|
height: "16",
|
@@ -223,28 +233,36 @@ function dt(t, e, s, i, n, o) {
|
|
223
233
|
})
|
224
234
|
])
|
225
235
|
]),
|
226
|
-
default:
|
227
|
-
var
|
236
|
+
default: $(() => {
|
237
|
+
var g, d, C, y, S;
|
228
238
|
return [
|
229
239
|
l("div", at, [
|
230
|
-
(
|
240
|
+
(g = s.actions) != null && g.includes("edit") && s.isForm ? (r(), _(f, {
|
231
241
|
key: 0,
|
232
|
-
to: `/edit?table=${(
|
242
|
+
to: `/edit?table=${(C = (d = t.$route) == null ? void 0 : d.params) == null ? void 0 : C.catchAll}&id=${(y = s.item) == null ? void 0 : y.id}`,
|
233
243
|
class: "w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"
|
234
244
|
}, {
|
235
|
-
default:
|
245
|
+
default: $(() => [
|
236
246
|
x(b, { color: "#000" }),
|
237
|
-
e[4] || (e[4] =
|
247
|
+
e[4] || (e[4] = M(" Редагувати "))
|
238
248
|
]),
|
239
249
|
_: 1
|
240
250
|
}, 8, ["to"])) : w("", !0),
|
241
|
-
|
242
|
-
|
251
|
+
(r(!0), a(A, null, D(o.getCustomActions, (T, j) => (r(), a("button", {
|
252
|
+
key: j,
|
253
|
+
onClick: (U) => o.customButtonAction(T),
|
254
|
+
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"
|
255
|
+
}, [
|
256
|
+
x(m, { class: "opacity-0" }),
|
257
|
+
l("span", ct, I(T == null ? void 0 : T.label), 1)
|
258
|
+
], 8, it))), 128)),
|
259
|
+
s.isForm ? (r(), a("div", ut)) : w("", !0),
|
260
|
+
(S = s.actions) != null && S.includes("del") ? (r(), a("button", {
|
243
261
|
key: 2,
|
244
|
-
onClick: e[0] || (e[0] = Be((...
|
262
|
+
onClick: e[0] || (e[0] = Be((...T) => o.openConfirm && o.openConfirm(...T), ["stop"])),
|
245
263
|
class: "w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"
|
246
264
|
}, [
|
247
|
-
x(
|
265
|
+
x(m),
|
248
266
|
e[5] || (e[5] = l("span", { class: "text-gray-800" }, "Видалити", -1))
|
249
267
|
])) : w("", !0)
|
250
268
|
])
|
@@ -255,23 +273,23 @@ function dt(t, e, s, i, n, o) {
|
|
255
273
|
]),
|
256
274
|
x(c, {
|
257
275
|
visible: n.isDeleteConfirm,
|
258
|
-
"onUpdate:visible": e[3] || (e[3] = (
|
276
|
+
"onUpdate:visible": e[3] || (e[3] = (g) => n.isDeleteConfirm = g),
|
259
277
|
size: "small",
|
260
278
|
title: "Ви впевнені?"
|
261
279
|
}, {
|
262
|
-
default:
|
263
|
-
l("div",
|
280
|
+
default: $(() => [
|
281
|
+
l("div", dt, [
|
264
282
|
e[6] || (e[6] = l("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
265
|
-
l("div",
|
283
|
+
l("div", ht, [
|
266
284
|
l("button", {
|
267
285
|
type: "button",
|
268
286
|
class: "inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
269
|
-
onClick: e[1] || (e[1] = (
|
287
|
+
onClick: e[1] || (e[1] = (g) => n.isDeleteConfirm = !1)
|
270
288
|
}, " Скасувати "),
|
271
289
|
l("button", {
|
272
290
|
type: "button",
|
273
291
|
class: "inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",
|
274
|
-
onClick: e[2] || (e[2] = (...
|
292
|
+
onClick: e[2] || (e[2] = (...g) => o.deleteElement && o.deleteElement(...g))
|
275
293
|
}, " Так, я впевнена/ий ")
|
276
294
|
])
|
277
295
|
])
|
@@ -280,7 +298,7 @@ function dt(t, e, s, i, n, o) {
|
|
280
298
|
}, 8, ["visible"])
|
281
299
|
], 64);
|
282
300
|
}
|
283
|
-
const
|
301
|
+
const ft = /* @__PURE__ */ k(lt, [["render", pt]]), bt = {}, mt = {
|
284
302
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
285
303
|
xmlns: "http://www.w3.org/2000/svg",
|
286
304
|
viewBox: "0 0 24 24",
|
@@ -290,15 +308,15 @@ const ht = /* @__PURE__ */ k(lt, [["render", dt]]), pt = {}, ft = {
|
|
290
308
|
"stroke-linecap": "round",
|
291
309
|
"stroke-linejoin": "round"
|
292
310
|
};
|
293
|
-
function
|
294
|
-
return r(), a("svg",
|
311
|
+
function gt(t, e, s, i, n, o) {
|
312
|
+
return r(), a("svg", mt, e[0] || (e[0] = [
|
295
313
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
296
314
|
l("path", { d: "M7 20V4" }, null, -1),
|
297
315
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
298
316
|
l("path", { d: "M17 4v16" }, null, -1)
|
299
317
|
]));
|
300
318
|
}
|
301
|
-
const
|
319
|
+
const xt = /* @__PURE__ */ k(bt, [["render", gt]]), yt = {}, _t = {
|
302
320
|
xmlns: "http://www.w3.org/2000/svg",
|
303
321
|
width: "24",
|
304
322
|
height: "24",
|
@@ -310,8 +328,8 @@ const mt = /* @__PURE__ */ k(pt, [["render", bt]]), gt = {}, xt = {
|
|
310
328
|
"stroke-linejoin": "round",
|
311
329
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-rosette-discount-check"
|
312
330
|
};
|
313
|
-
function
|
314
|
-
return r(), a("svg",
|
331
|
+
function kt(t, e, s, i, n, o) {
|
332
|
+
return r(), a("svg", _t, e[0] || (e[0] = [
|
315
333
|
l("path", {
|
316
334
|
stroke: "none",
|
317
335
|
d: "M0 0h24v24H0z",
|
@@ -321,8 +339,8 @@ function yt(t, e, s, i, n, o) {
|
|
321
339
|
l("path", { d: "M9 12l2 2l4 -4" }, null, -1)
|
322
340
|
]));
|
323
341
|
}
|
324
|
-
const
|
325
|
-
components: { IconExport:
|
342
|
+
const vt = /* @__PURE__ */ k(yt, [["render", kt]]), wt = {
|
343
|
+
components: { IconExport: xt, IconChevronDown: Ue, IconSuccess: vt },
|
326
344
|
props: {
|
327
345
|
table: String,
|
328
346
|
columns: Array,
|
@@ -375,7 +393,7 @@ const _t = /* @__PURE__ */ k(gt, [["render", yt]]), kt = {
|
|
375
393
|
return;
|
376
394
|
}
|
377
395
|
try {
|
378
|
-
const e = await
|
396
|
+
const e = await F.get("/api/export", {
|
379
397
|
params: {
|
380
398
|
table: this.table,
|
381
399
|
format: this.format,
|
@@ -420,25 +438,25 @@ const _t = /* @__PURE__ */ k(gt, [["render", yt]]), kt = {
|
|
420
438
|
this.cols = (e = (t = this.columns) == null ? void 0 : t.filter((s) => (s == null ? void 0 : s.hidden) !== !0)) == null ? void 0 : e.map((s) => s == null ? void 0 : s.name), this.activeAction = "choceVisible";
|
421
439
|
}
|
422
440
|
}
|
423
|
-
},
|
441
|
+
}, Ct = {
|
424
442
|
key: 0,
|
425
443
|
class: "flex flex-col items-center"
|
426
|
-
},
|
444
|
+
}, $t = {
|
427
445
|
key: 1,
|
428
446
|
class: "p-4"
|
429
|
-
},
|
447
|
+
}, St = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, At = { class: "flex items-center" }, It = { class: "flex items-center gap-[10px] ml-auto" }, Tt = ["onClick"], Vt = {
|
430
448
|
key: 0,
|
431
449
|
class: "block h-[8px] w-[8px] rounded-full bg-blue-500"
|
432
|
-
},
|
450
|
+
}, Dt = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, Ft = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Mt = { class: "mt-2 space-y-2" }, jt = ["id", "onChange"], qt = ["for"], Bt = {
|
433
451
|
key: 0,
|
434
452
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
435
|
-
},
|
453
|
+
}, zt = {
|
436
454
|
key: 1,
|
437
455
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
438
456
|
};
|
439
|
-
function
|
440
|
-
const u =
|
441
|
-
return r(), a(
|
457
|
+
function Lt(t, e, s, i, n, o) {
|
458
|
+
const u = p("IconExport"), b = p("IconChevronDown"), f = p("IconSuccess"), m = p("VsCheckbox"), v = p("VsDialog");
|
459
|
+
return r(), a(A, null, [
|
442
460
|
l("button", {
|
443
461
|
onClick: e[0] || (e[0] = (c) => n.isOpen = !0),
|
444
462
|
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"
|
@@ -447,7 +465,7 @@ function Bt(t, e, s, i, n, o) {
|
|
447
465
|
height: "16",
|
448
466
|
width: "16"
|
449
467
|
}),
|
450
|
-
e[7] || (e[7] =
|
468
|
+
e[7] || (e[7] = M(" Експорт ")),
|
451
469
|
x(b, {
|
452
470
|
height: "12",
|
453
471
|
width: "16"
|
@@ -460,8 +478,8 @@ function Bt(t, e, s, i, n, o) {
|
|
460
478
|
size: "small",
|
461
479
|
closeClickBack: !0
|
462
480
|
}, {
|
463
|
-
footer:
|
464
|
-
n.isSuccessTemplate ? (r(), a("div",
|
481
|
+
footer: $(() => [
|
482
|
+
n.isSuccessTemplate ? (r(), a("div", Bt, [
|
465
483
|
l("button", {
|
466
484
|
type: "button",
|
467
485
|
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",
|
@@ -472,7 +490,7 @@ function Bt(t, e, s, i, n, o) {
|
|
472
490
|
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",
|
473
491
|
onClick: e[3] || (e[3] = (c) => n.isSuccessTemplate = !1)
|
474
492
|
}, " Вигрузити ще ")
|
475
|
-
])) : (r(), a("div",
|
493
|
+
])) : (r(), a("div", zt, [
|
476
494
|
l("button", {
|
477
495
|
type: "button",
|
478
496
|
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",
|
@@ -485,67 +503,67 @@ function Bt(t, e, s, i, n, o) {
|
|
485
503
|
}, " Завантажити таблицю ")
|
486
504
|
]))
|
487
505
|
]),
|
488
|
-
default:
|
489
|
-
n.isSuccessTemplate ? (r(), a("div",
|
506
|
+
default: $(() => [
|
507
|
+
n.isSuccessTemplate ? (r(), a("div", Ct, [
|
490
508
|
x(f, {
|
491
509
|
height: "100",
|
492
510
|
width: "100",
|
493
511
|
class: "text-green-200 mb-[20px]"
|
494
512
|
}),
|
495
513
|
e[8] || (e[8] = l("h2", null, "Звіт сформовано і збережено", -1))
|
496
|
-
])) : (r(), a("div",
|
497
|
-
l("div",
|
498
|
-
l("div",
|
514
|
+
])) : (r(), a("div", $t, [
|
515
|
+
l("div", St, [
|
516
|
+
l("div", At, [
|
499
517
|
e[9] || (e[9] = l("h2", { class: "text-sm text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
500
|
-
l("div",
|
501
|
-
(r(!0), a(
|
518
|
+
l("div", It, [
|
519
|
+
(r(!0), a(A, null, D(n.actions, (c) => (r(), a("button", {
|
502
520
|
key: c == null ? void 0 : c.name,
|
503
521
|
onClick: c == null ? void 0 : c.function,
|
504
522
|
class: "inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"
|
505
523
|
}, [
|
506
524
|
l("span", {
|
507
|
-
class:
|
525
|
+
class: V(["h-[14px] w-[14px] border rounded-full flex items-center justify-center", { "border-blue-500": (c == null ? void 0 : c.name) === n.activeAction }])
|
508
526
|
}, [
|
509
|
-
(c == null ? void 0 : c.name) === n.activeAction ? (r(), a("span",
|
527
|
+
(c == null ? void 0 : c.name) === n.activeAction ? (r(), a("span", Vt)) : w("", !0)
|
510
528
|
], 2),
|
511
|
-
|
512
|
-
], 8,
|
529
|
+
M(" " + I(c == null ? void 0 : c.label), 1)
|
530
|
+
], 8, Tt))), 128))
|
513
531
|
])
|
514
532
|
]),
|
515
|
-
l("div",
|
516
|
-
(r(!0), a(
|
533
|
+
l("div", Dt, [
|
534
|
+
(r(!0), a(A, null, D(s.columns, (c, g) => (r(), a("div", {
|
517
535
|
class: "flex items-center",
|
518
|
-
key:
|
536
|
+
key: g,
|
519
537
|
style: { width: "calc((100% - 10px) / 2)" }
|
520
538
|
}, [
|
521
|
-
x(
|
539
|
+
x(m, {
|
522
540
|
class: "[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",
|
523
541
|
modelValue: n.cols,
|
524
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
542
|
+
"onUpdate:modelValue": e[1] || (e[1] = (d) => n.cols = d),
|
525
543
|
value: c == null ? void 0 : c.name,
|
526
544
|
label: c == null ? void 0 : c.ua
|
527
545
|
}, null, 8, ["modelValue", "value", "label"])
|
528
546
|
]))), 128))
|
529
547
|
])
|
530
548
|
]),
|
531
|
-
l("div",
|
549
|
+
l("div", Ft, [
|
532
550
|
e[10] || (e[10] = l("h2", { class: "text-sm text-gray-500" }, "Виберіть формат таблиці:", -1)),
|
533
|
-
l("div",
|
534
|
-
(r(!0), a(
|
551
|
+
l("div", Mt, [
|
552
|
+
(r(!0), a(A, null, D(n.tableFormats, (c, g) => (r(), a("div", {
|
535
553
|
class: "flex items-center",
|
536
|
-
key:
|
554
|
+
key: g
|
537
555
|
}, [
|
538
556
|
l("input", {
|
539
557
|
type: "radio",
|
540
558
|
name: "hs-pro-duecmfm",
|
541
559
|
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",
|
542
560
|
id: c,
|
543
|
-
onChange: (
|
544
|
-
}, null, 40,
|
561
|
+
onChange: (d) => o.selectFormat(c)
|
562
|
+
}, null, 40, jt),
|
545
563
|
l("label", {
|
546
564
|
for: c,
|
547
565
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
548
|
-
}, " Формат " +
|
566
|
+
}, " Формат " + I(c), 9, qt)
|
549
567
|
]))), 128))
|
550
568
|
])
|
551
569
|
])
|
@@ -555,7 +573,7 @@ function Bt(t, e, s, i, n, o) {
|
|
555
573
|
}, 8, ["visible"])
|
556
574
|
], 64);
|
557
575
|
}
|
558
|
-
const
|
576
|
+
const Pt = /* @__PURE__ */ k(wt, [["render", Lt]]), Ut = {}, Ot = {
|
559
577
|
xmlns: "http://www.w3.org/2000/svg",
|
560
578
|
viewBox: "0 0 24 24",
|
561
579
|
fill: "none",
|
@@ -565,12 +583,12 @@ const zt = /* @__PURE__ */ k(kt, [["render", Bt]]), Pt = {}, Lt = {
|
|
565
583
|
"stroke-linejoin": "round",
|
566
584
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
567
585
|
};
|
568
|
-
function
|
569
|
-
return r(), a("svg",
|
570
|
-
|
586
|
+
function Et(t, e, s, i, n, o) {
|
587
|
+
return r(), a("svg", Ot, e[0] || (e[0] = [
|
588
|
+
B('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path>', 9)
|
571
589
|
]));
|
572
590
|
}
|
573
|
-
const
|
591
|
+
const Nt = /* @__PURE__ */ k(Ut, [["render", Et]]), Ht = {
|
574
592
|
props: { column: Object },
|
575
593
|
emits: ["update-column"],
|
576
594
|
data() {
|
@@ -587,21 +605,21 @@ const Ot = /* @__PURE__ */ k(Pt, [["render", Ut]]), Et = {
|
|
587
605
|
var t;
|
588
606
|
((t = this.column) == null ? void 0 : t.hidden) !== !0 && (this.value = !0);
|
589
607
|
}
|
590
|
-
},
|
591
|
-
function
|
608
|
+
}, Rt = { class: "flex w-full gap-[8px] items-centr" };
|
609
|
+
function Wt(t, e, s, i, n, o) {
|
592
610
|
var u, b;
|
593
|
-
return r(), a("label",
|
594
|
-
|
611
|
+
return r(), a("label", Rt, [
|
612
|
+
L(l("input", {
|
595
613
|
"onUpdate:modelValue": e[0] || (e[0] = (f) => n.value = f),
|
596
614
|
type: "checkbox"
|
597
615
|
}, null, 512), [
|
598
616
|
[ze, n.value]
|
599
617
|
]),
|
600
|
-
|
618
|
+
M(" " + I(((u = s.column) == null ? void 0 : u.ua) || ((b = s.column) == null ? void 0 : b.title)), 1)
|
601
619
|
]);
|
602
620
|
}
|
603
|
-
const
|
604
|
-
components: { IconColumns:
|
621
|
+
const Gt = /* @__PURE__ */ k(Ht, [["render", Wt]]), Zt = {
|
622
|
+
components: { IconColumns: Nt, AdminTableColumnsHiddenItem: Gt },
|
605
623
|
emits: ["update-columns"],
|
606
624
|
props: { columns: Array },
|
607
625
|
methods: {
|
@@ -610,28 +628,28 @@ const Rt = /* @__PURE__ */ k(Et, [["render", Ht]]), Wt = {
|
|
610
628
|
s[e] = t, this.$emit("update-columns", [...s]);
|
611
629
|
}
|
612
630
|
}
|
613
|
-
},
|
614
|
-
function
|
615
|
-
const u =
|
631
|
+
}, Jt = { 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" }, Yt = { class: "py-[10px] px-[10px] w-[260px]" }, Kt = { 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" };
|
632
|
+
function Qt(t, e, s, i, n, o) {
|
633
|
+
const u = p("IconColumns"), b = p("AdminTableColumnsHiddenItem"), f = p("VsPopover");
|
616
634
|
return r(), _(f, {
|
617
635
|
trigger: "click",
|
618
636
|
placement: "bottom"
|
619
637
|
}, {
|
620
|
-
reference:
|
621
|
-
l("button",
|
638
|
+
reference: $(() => [
|
639
|
+
l("button", Jt, [
|
622
640
|
x(u, {
|
623
641
|
height: "20",
|
624
642
|
width: "16"
|
625
643
|
})
|
626
644
|
])
|
627
645
|
]),
|
628
|
-
default:
|
629
|
-
l("div",
|
646
|
+
default: $(() => [
|
647
|
+
l("div", Yt, [
|
630
648
|
e[0] || (e[0] = l("h2", { class: "text-sm mb-[8px]" }, "Оберіть колонки, щоб приховати", -1)),
|
631
|
-
l("ul",
|
632
|
-
(r(!0), a(
|
649
|
+
l("ul", Kt, [
|
650
|
+
(r(!0), a(A, null, D(s.columns, (m, v) => (r(), a("li", { key: v }, [
|
633
651
|
x(b, {
|
634
|
-
column:
|
652
|
+
column: m,
|
635
653
|
onUpdateColumn: o.updateColumn
|
636
654
|
}, null, 8, ["column", "onUpdateColumn"])
|
637
655
|
]))), 128))
|
@@ -641,14 +659,14 @@ function Kt(t, e, s, i, n, o) {
|
|
641
659
|
_: 1
|
642
660
|
});
|
643
661
|
}
|
644
|
-
const
|
662
|
+
const Xt = /* @__PURE__ */ k(Zt, [["render", Qt]]), en = {}, tn = {
|
645
663
|
class: "hidden sm:block shrink-0 size-3",
|
646
664
|
xmlns: "http://www.w3.org/2000/svg",
|
647
665
|
fill: "currentColor",
|
648
666
|
viewBox: "0 0 16 16"
|
649
667
|
};
|
650
|
-
function
|
651
|
-
return r(), a("svg",
|
668
|
+
function nn(t, e, s, i, n, o) {
|
669
|
+
return r(), a("svg", tn, e[0] || (e[0] = [
|
652
670
|
l("path", {
|
653
671
|
"fill-rule": "evenodd",
|
654
672
|
"clip-rule": "evenodd",
|
@@ -656,30 +674,30 @@ function en(t, e, s, i, n, o) {
|
|
656
674
|
}, null, -1)
|
657
675
|
]));
|
658
676
|
}
|
659
|
-
const
|
660
|
-
function
|
661
|
-
return r(), a("div",
|
662
|
-
|
677
|
+
const we = /* @__PURE__ */ k(en, [["render", nn]]), sn = {}, ln = { class: "vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden" };
|
678
|
+
function rn(t, e, s, i, n, o) {
|
679
|
+
return r(), a("div", ln, e[0] || (e[0] = [
|
680
|
+
B('<div><div class="p-5 min-h-[500px] flex flex-col justify-center items-center text-center"><svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg><div class="max-w-sm mx-auto mt-6"><p class="font-medium text-gray-800 dark:text-neutral-200"> Дані для відображення відсутні </p><p class="mt-2 text-sm text-gray-500 dark:text-neutral-500"> Змініть параметри пошуку або спробуйте пізніше </p></div></div></div>', 1)
|
663
681
|
]));
|
664
682
|
}
|
665
|
-
const
|
683
|
+
const on = /* @__PURE__ */ k(sn, [["render", rn]]), an = {
|
666
684
|
props: { row: Object, column: Object, table: String }
|
667
685
|
};
|
668
|
-
function
|
669
|
-
var u, b, f,
|
670
|
-
return r(), _(
|
671
|
-
((u = s.column) == null ? void 0 : u.format) === "custom" ? (b = s.column) == null ? void 0 : b.component : `table-format-${((
|
686
|
+
function cn(t, e, s, i, n, o) {
|
687
|
+
var u, b, f, m, v, c, g, d;
|
688
|
+
return r(), _(z(
|
689
|
+
((u = s.column) == null ? void 0 : u.format) === "custom" ? (b = s.column) == null ? void 0 : b.component : `table-format-${((m = (f = s.column) == null ? void 0 : f.format) == null ? void 0 : m.toLowerCase()) || "text"}`
|
672
690
|
), {
|
673
|
-
onUpdateTable: e[0] || (e[0] = (
|
691
|
+
onUpdateTable: e[0] || (e[0] = (C) => t.$emit("update-table")),
|
674
692
|
name: (v = s.column) == null ? void 0 : v.name,
|
675
693
|
data: s.row,
|
676
|
-
value: (
|
694
|
+
value: (g = s.row) == null ? void 0 : g[(c = s.column) == null ? void 0 : c.name],
|
677
695
|
table: s.table,
|
678
696
|
column: s.column,
|
679
|
-
edit: (
|
697
|
+
edit: (d = s.column) == null ? void 0 : d.edit
|
680
698
|
}, null, 40, ["name", "data", "value", "table", "column", "edit"]);
|
681
699
|
}
|
682
|
-
const
|
700
|
+
const Ce = /* @__PURE__ */ k(an, [["render", cn]]), un = {}, dn = {
|
683
701
|
xmlns: "http://www.w3.org/2000/svg",
|
684
702
|
viewBox: "0 0 24 24",
|
685
703
|
fill: "none",
|
@@ -689,8 +707,8 @@ const we = /* @__PURE__ */ k(rn, [["render", on]]), an = {}, cn = {
|
|
689
707
|
"stroke-linejoin": "round",
|
690
708
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-minus"
|
691
709
|
};
|
692
|
-
function
|
693
|
-
return r(), a("svg",
|
710
|
+
function hn(t, e, s, i, n, o) {
|
711
|
+
return r(), a("svg", dn, e[0] || (e[0] = [
|
694
712
|
l("path", {
|
695
713
|
stroke: "none",
|
696
714
|
d: "M0 0h24v24H0z",
|
@@ -699,8 +717,8 @@ function un(t, e, s, i, n, o) {
|
|
699
717
|
l("path", { d: "M5 12l14 0" }, null, -1)
|
700
718
|
]));
|
701
719
|
}
|
702
|
-
const
|
703
|
-
components: { IconPlus:
|
720
|
+
const pn = /* @__PURE__ */ k(un, [["render", hn]]), fn = {
|
721
|
+
components: { IconPlus: we, IconMinus: pn },
|
704
722
|
props: {
|
705
723
|
title: String,
|
706
724
|
defaultValue: { type: Boolean, default: () => !1 }
|
@@ -708,18 +726,18 @@ const dn = /* @__PURE__ */ k(an, [["render", un]]), hn = {
|
|
708
726
|
data() {
|
709
727
|
return { expanded: this.defaultValue };
|
710
728
|
}
|
711
|
-
},
|
712
|
-
function
|
713
|
-
const u =
|
729
|
+
}, bn = { class: "hs-accordion" }, mn = { class: "py-0.5 flex items-center gap-x-0.5 w-full" }, gn = { class: "text-sm font-medium" }, xn = { class: "relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b" };
|
730
|
+
function yn(t, e, s, i, n, o) {
|
731
|
+
const u = p("IconPlus"), b = p("IconMinus");
|
714
732
|
return r(), a("div", null, [
|
715
733
|
l("div", null, [
|
716
|
-
l("div",
|
717
|
-
l("div",
|
734
|
+
l("div", bn, [
|
735
|
+
l("div", mn, [
|
718
736
|
l("div", {
|
719
737
|
onClick: e[0] || (e[0] = (f) => n.expanded = !n.expanded),
|
720
738
|
class: "rounded-md cursor-pointer grow"
|
721
739
|
}, [
|
722
|
-
l("span",
|
740
|
+
l("span", gn, I(s.title), 1)
|
723
741
|
]),
|
724
742
|
l("button", {
|
725
743
|
class: "flex items-center justify-center rounded-md size-6 hover:bg-gray-100",
|
@@ -732,11 +750,11 @@ function gn(t, e, s, i, n, o) {
|
|
732
750
|
])
|
733
751
|
]),
|
734
752
|
x(P, { name: "fade" }, {
|
735
|
-
default:
|
736
|
-
|
737
|
-
|
753
|
+
default: $(() => [
|
754
|
+
L(l("div", xn, [
|
755
|
+
Le(t.$slots, "default", {}, void 0, !0)
|
738
756
|
], 512), [
|
739
|
-
[
|
757
|
+
[ve, n.expanded]
|
740
758
|
])
|
741
759
|
]),
|
742
760
|
_: 3
|
@@ -745,45 +763,45 @@ function gn(t, e, s, i, n, o) {
|
|
745
763
|
])
|
746
764
|
]);
|
747
765
|
}
|
748
|
-
const
|
766
|
+
const _n = /* @__PURE__ */ k(fn, [["render", yn], ["__scopeId", "data-v-e1f274c9"]]), kn = {
|
749
767
|
components: {
|
750
|
-
AdminComponentIs:
|
751
|
-
AdminTree:
|
768
|
+
AdminComponentIs: Ce,
|
769
|
+
AdminTree: _n,
|
752
770
|
VsNoData: Ve,
|
753
771
|
VsWidgetComments: De,
|
754
772
|
VsWidgetMap: Fe,
|
755
773
|
VsWidgetFileList: Me
|
756
774
|
},
|
757
775
|
props: { table: String, columns: Array, row: Object }
|
758
|
-
},
|
776
|
+
}, vn = {
|
759
777
|
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",
|
760
778
|
style: { height: "calc(100vh - 310px)" }
|
761
|
-
},
|
779
|
+
}, wn = {
|
762
780
|
class: "border-l",
|
763
781
|
style: { height: "calc(100vh - 360px)" }
|
764
|
-
},
|
765
|
-
function
|
766
|
-
var
|
767
|
-
const u =
|
768
|
-
return r(), a("div",
|
782
|
+
}, Cn = { class: "flex items-center justify-between py-1 gap-x-4" }, $n = { class: "col-span-1" }, Sn = { class: "inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500" }, An = { class: "col-span-2" }, In = { class: "font-medium text-[13px] text-gray-800 dark:text-neutral-200" }, Tn = { class: "table-info-card" }, Vn = { class: "table-info-card" };
|
783
|
+
function Dn(t, e, s, i, n, o) {
|
784
|
+
var g, d, C;
|
785
|
+
const u = p("AdminComponentIs"), b = p("AdminTree"), f = p("VsWidgetMap"), m = p("VsNoData"), v = p("VsWidgetComments"), c = p("VsWidgetFileList");
|
786
|
+
return r(), a("div", vn, [
|
769
787
|
e[0] || (e[0] = l("div", { class: "p-[10px] pl-[18px] pb-[18px] border-b" }, [
|
770
788
|
l("h2", { class: "text-sm font-medium" }, "Інформація про об'єкт")
|
771
789
|
], -1)),
|
772
|
-
l("div",
|
773
|
-
(
|
790
|
+
l("div", wn, [
|
791
|
+
(d = (g = t.$route) == null ? void 0 : g.query) != null && d.card ? (r(), a(A, { key: 0 }, [
|
774
792
|
s.row ? (r(), _(b, {
|
775
793
|
key: 0,
|
776
794
|
defaultValue: !0,
|
777
795
|
title: "Основна інформація",
|
778
796
|
class: "border-b p-[10px] py-[16px]"
|
779
797
|
}, {
|
780
|
-
default:
|
781
|
-
(r(!0), a(
|
782
|
-
l("dt",
|
783
|
-
l("p",
|
798
|
+
default: $(() => [
|
799
|
+
(r(!0), a(A, null, D(s.columns, (y) => (r(), a("dl", Cn, [
|
800
|
+
l("dt", $n, [
|
801
|
+
l("p", Sn, I((y == null ? void 0 : y.ua) || (y == null ? void 0 : y.title)) + ": ", 1)
|
784
802
|
]),
|
785
|
-
l("dd",
|
786
|
-
l("p",
|
803
|
+
l("dd", An, [
|
804
|
+
l("p", In, [
|
787
805
|
x(u, {
|
788
806
|
row: s.row,
|
789
807
|
column: y,
|
@@ -795,19 +813,19 @@ function Tn(t, e, s, i, n, o) {
|
|
795
813
|
]),
|
796
814
|
_: 1
|
797
815
|
})) : w("", !0),
|
798
|
-
(
|
816
|
+
(C = s.row) != null && C.geom ? (r(), _(b, {
|
799
817
|
key: 1,
|
800
818
|
title: "Карта",
|
801
819
|
class: "border-b p-[10px] py-[16px]"
|
802
820
|
}, {
|
803
|
-
default:
|
804
|
-
var y,
|
821
|
+
default: $(() => {
|
822
|
+
var y, S;
|
805
823
|
return [
|
806
824
|
(y = s.row) != null && y.geom ? (r(), _(f, {
|
807
825
|
key: 0,
|
808
|
-
geometry: (
|
826
|
+
geometry: (S = s.row) == null ? void 0 : S.geom,
|
809
827
|
zoom: 14
|
810
|
-
}, null, 8, ["geometry"])) : (r(), _(
|
828
|
+
}, null, 8, ["geometry"])) : (r(), _(m, {
|
811
829
|
key: 1,
|
812
830
|
title: "У об'єкта відсутня геометрія",
|
813
831
|
text: "",
|
@@ -821,10 +839,10 @@ function Tn(t, e, s, i, n, o) {
|
|
821
839
|
title: "Коментарі",
|
822
840
|
class: "border-b p-[10px] py-[16px]"
|
823
841
|
}, {
|
824
|
-
default:
|
842
|
+
default: $(() => {
|
825
843
|
var y;
|
826
844
|
return [
|
827
|
-
l("div",
|
845
|
+
l("div", Tn, [
|
828
846
|
x(v, {
|
829
847
|
id: (y = s.row) == null ? void 0 : y.id
|
830
848
|
}, null, 8, ["id"])
|
@@ -837,10 +855,10 @@ function Tn(t, e, s, i, n, o) {
|
|
837
855
|
title: "Файли",
|
838
856
|
class: "border-b p-[10px] py-[16px]"
|
839
857
|
}, {
|
840
|
-
default:
|
858
|
+
default: $(() => {
|
841
859
|
var y;
|
842
860
|
return [
|
843
|
-
l("div",
|
861
|
+
l("div", Vn, [
|
844
862
|
x(c, {
|
845
863
|
id: (y = s.row) == null ? void 0 : y.id
|
846
864
|
}, null, 8, ["id"])
|
@@ -849,14 +867,14 @@ function Tn(t, e, s, i, n, o) {
|
|
849
867
|
}),
|
850
868
|
_: 1
|
851
869
|
})
|
852
|
-
], 64)) : (r(), _(
|
870
|
+
], 64)) : (r(), _(m, {
|
853
871
|
key: 1,
|
854
872
|
text: "Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"
|
855
873
|
}))
|
856
874
|
])
|
857
875
|
]);
|
858
876
|
}
|
859
|
-
const
|
877
|
+
const Fn = /* @__PURE__ */ k(kn, [["render", Dn]]), Mn = {}, jn = {
|
860
878
|
class: "hidden xl:block shrink-0 size-4",
|
861
879
|
xmlns: "http://www.w3.org/2000/svg",
|
862
880
|
viewBox: "0 0 24 24",
|
@@ -866,8 +884,8 @@ const Vn = /* @__PURE__ */ k(yn, [["render", Tn]]), Dn = {}, Fn = {
|
|
866
884
|
"stroke-linecap": "round",
|
867
885
|
"stroke-linejoin": "round"
|
868
886
|
};
|
869
|
-
function
|
870
|
-
return r(), a("svg",
|
887
|
+
function qn(t, e, s, i, n, o) {
|
888
|
+
return r(), a("svg", jn, e[0] || (e[0] = [
|
871
889
|
l("rect", {
|
872
890
|
width: "18",
|
873
891
|
height: "18",
|
@@ -879,7 +897,7 @@ function Mn(t, e, s, i, n, o) {
|
|
879
897
|
l("path", { d: "m8 9 3 3-3 3" }, null, -1)
|
880
898
|
]));
|
881
899
|
}
|
882
|
-
const
|
900
|
+
const Bn = /* @__PURE__ */ k(Mn, [["render", qn]]), zn = {}, Ln = {
|
883
901
|
class: "h21yx vs0hq",
|
884
902
|
xmlns: "http://www.w3.org/2000/svg",
|
885
903
|
width: "24",
|
@@ -891,15 +909,15 @@ const jn = /* @__PURE__ */ k(Dn, [["render", Mn]]), qn = {}, Bn = {
|
|
891
909
|
"stroke-linecap": "round",
|
892
910
|
"stroke-linejoin": "round"
|
893
911
|
};
|
894
|
-
function
|
895
|
-
return r(), a("svg",
|
896
|
-
|
912
|
+
function Pn(t, e, s, i, n, o) {
|
913
|
+
return r(), a("svg", Ln, e[0] || (e[0] = [
|
914
|
+
B('<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)
|
897
915
|
]));
|
898
916
|
}
|
899
|
-
const
|
917
|
+
const Un = /* @__PURE__ */ k(zn, [["render", Pn]]), On = {
|
900
918
|
emits: ["filterChange"],
|
901
919
|
props: { scheme: { type: Object }, onFilters: { type: Number } },
|
902
|
-
components: { IconFilter:
|
920
|
+
components: { IconFilter: Un },
|
903
921
|
data() {
|
904
922
|
return {
|
905
923
|
isFilters: !1
|
@@ -910,13 +928,13 @@ const Pn = /* @__PURE__ */ k(qn, [["render", zn]]), Ln = {
|
|
910
928
|
this.isFilters && t.classList.contains("filter-container") && (this.isFilters = !1);
|
911
929
|
}
|
912
930
|
}
|
913
|
-
},
|
931
|
+
}, En = {
|
914
932
|
key: 0,
|
915
933
|
class: "font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"
|
916
|
-
},
|
917
|
-
function
|
918
|
-
const u =
|
919
|
-
return r(), a(
|
934
|
+
}, Nn = { 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" };
|
935
|
+
function Hn(t, e, s, i, n, o) {
|
936
|
+
const u = p("IconFilter"), b = p("VsFilter");
|
937
|
+
return r(), a(A, null, [
|
920
938
|
l("button", {
|
921
939
|
onClick: e[0] || (e[0] = (f) => n.isFilters = !n.isFilters),
|
922
940
|
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"
|
@@ -925,19 +943,19 @@ function En(t, e, s, i, n, o) {
|
|
925
943
|
height: "16",
|
926
944
|
width: "16"
|
927
945
|
}),
|
928
|
-
e[4] || (e[4] =
|
929
|
-
s.onFilters ? (r(), a("span",
|
946
|
+
e[4] || (e[4] = M(" Фільтри ")),
|
947
|
+
s.onFilters ? (r(), a("span", En, I(s.onFilters), 1)) : w("", !0)
|
930
948
|
]),
|
931
949
|
x(P, { name: "fade" }, {
|
932
|
-
default:
|
950
|
+
default: $(() => {
|
933
951
|
var f;
|
934
952
|
return [
|
935
|
-
|
936
|
-
onClick: e[3] || (e[3] = (...
|
953
|
+
L(l("div", {
|
954
|
+
onClick: e[3] || (e[3] = (...m) => o.closeFilter && o.closeFilter(...m)),
|
937
955
|
style: { height: "100vh" },
|
938
956
|
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)]"
|
939
957
|
}, [
|
940
|
-
l("div",
|
958
|
+
l("div", Nn, [
|
941
959
|
(f = s.scheme) != null && f.length ? (r(), _(b, {
|
942
960
|
key: 0,
|
943
961
|
ref: "filter",
|
@@ -946,13 +964,13 @@ function En(t, e, s, i, n, o) {
|
|
946
964
|
"apply-vue-router": "",
|
947
965
|
history: "",
|
948
966
|
name: "filter",
|
949
|
-
onFilterChange: e[1] || (e[1] = (
|
967
|
+
onFilterChange: e[1] || (e[1] = (m) => t.$emit("filterChange", m)),
|
950
968
|
closeFilterBtn: !0,
|
951
|
-
onFilterClose: e[2] || (e[2] = (
|
969
|
+
onFilterClose: e[2] || (e[2] = (m) => n.isFilters = !1)
|
952
970
|
}, null, 8, ["scheme"])) : w("", !0)
|
953
971
|
])
|
954
972
|
], 512), [
|
955
|
-
[
|
973
|
+
[ve, n.isFilters]
|
956
974
|
])
|
957
975
|
];
|
958
976
|
}),
|
@@ -960,25 +978,25 @@ function En(t, e, s, i, n, o) {
|
|
960
978
|
})
|
961
979
|
], 64);
|
962
980
|
}
|
963
|
-
const
|
981
|
+
const Rn = /* @__PURE__ */ k(On, [["render", Hn]]), Wn = {
|
964
982
|
props: { tabsList: { type: Array, default: () => [] }, filterState: String }
|
965
|
-
},
|
983
|
+
}, Gn = {
|
966
984
|
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",
|
967
985
|
"aria-label": "Tabs",
|
968
986
|
role: "tablist",
|
969
987
|
"aria-orientation": "horizontal"
|
970
|
-
},
|
971
|
-
function
|
972
|
-
return r(), a("nav",
|
973
|
-
(r(!0), a(
|
988
|
+
}, Zn = ["onClick"];
|
989
|
+
function Jn(t, e, s, i, n, o) {
|
990
|
+
return r(), a("nav", Gn, [
|
991
|
+
(r(!0), a(A, null, D(s.tabsList, (u) => (r(), a("button", {
|
974
992
|
onClick: (b) => t.$emit("update:filterState", u == null ? void 0 : u.name),
|
975
|
-
class:
|
993
|
+
class: V(["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", {
|
976
994
|
" 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) === s.filterState
|
977
995
|
}])
|
978
|
-
},
|
996
|
+
}, I(u == null ? void 0 : u.label), 11, Zn))), 256))
|
979
997
|
]);
|
980
998
|
}
|
981
|
-
const
|
999
|
+
const Yn = /* @__PURE__ */ k(Wn, [["render", Jn]]), Kn = {}, Qn = {
|
982
1000
|
xmlns: "http://www.w3.org/2000/svg",
|
983
1001
|
viewBox: "0 0 24 24",
|
984
1002
|
fill: "none",
|
@@ -988,8 +1006,8 @@ const Zn = /* @__PURE__ */ k(Hn, [["render", Gn]]), Jn = {}, Kn = {
|
|
988
1006
|
"stroke-linejoin": "round",
|
989
1007
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-filter"
|
990
1008
|
};
|
991
|
-
function
|
992
|
-
return r(), a("svg",
|
1009
|
+
function Xn(t, e, s, i, n, o) {
|
1010
|
+
return r(), a("svg", Qn, e[0] || (e[0] = [
|
993
1011
|
l("path", {
|
994
1012
|
stroke: "none",
|
995
1013
|
d: "M0 0h24v24H0z",
|
@@ -998,39 +1016,39 @@ function Qn(t, e, s, i, n, o) {
|
|
998
1016
|
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)
|
999
1017
|
]));
|
1000
1018
|
}
|
1001
|
-
const
|
1002
|
-
components: { IconFilter2:
|
1019
|
+
const es = /* @__PURE__ */ k(Kn, [["render", Xn]]), ts = {
|
1020
|
+
components: { IconFilter2: es },
|
1003
1021
|
props: { filterCustom: String, customList: Array }
|
1004
|
-
},
|
1005
|
-
function
|
1006
|
-
const u =
|
1022
|
+
}, ns = { 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" }, ss = { class: "flex flex-col gap-[4px]" }, ls = ["onClick"];
|
1023
|
+
function rs(t, e, s, i, n, o) {
|
1024
|
+
const u = p("IconFilter2"), b = p("VsPopover");
|
1007
1025
|
return r(), _(b, {
|
1008
1026
|
ref: "popover",
|
1009
1027
|
placement: "bottom"
|
1010
1028
|
}, {
|
1011
|
-
reference:
|
1012
|
-
l("button",
|
1029
|
+
reference: $(() => [
|
1030
|
+
l("button", ns, [
|
1013
1031
|
x(u, {
|
1014
1032
|
height: "20",
|
1015
1033
|
width: "20"
|
1016
1034
|
})
|
1017
1035
|
])
|
1018
1036
|
]),
|
1019
|
-
default:
|
1020
|
-
l("div",
|
1021
|
-
(r(!0), a(
|
1037
|
+
default: $(() => [
|
1038
|
+
l("div", ss, [
|
1039
|
+
(r(!0), a(A, null, D(s.customList, (f, m) => (r(), a("button", {
|
1022
1040
|
onClick: (v) => {
|
1023
1041
|
var c;
|
1024
1042
|
t.$emit("update:filterCustom", f == null ? void 0 : f.name), (c = t.$refs) == null || c.popover.togglePopover();
|
1025
1043
|
},
|
1026
|
-
key:
|
1027
|
-
class:
|
1028
|
-
},
|
1044
|
+
key: m,
|
1045
|
+
class: V(["p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300", { "bg-gray-100": s.filterCustom === (f == null ? void 0 : f.name) }])
|
1046
|
+
}, I(f == null ? void 0 : f.label), 11, ls))), 128)),
|
1029
1047
|
l("button", {
|
1030
1048
|
class: "p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300",
|
1031
1049
|
onClick: e[0] || (e[0] = (f) => {
|
1032
|
-
var
|
1033
|
-
t.$emit("update:filterCustom", void 0), (
|
1050
|
+
var m;
|
1051
|
+
t.$emit("update:filterCustom", void 0), (m = t.$refs) == null || m.popover.togglePopover();
|
1034
1052
|
})
|
1035
1053
|
}, " Скинути фільтри ")
|
1036
1054
|
])
|
@@ -1038,61 +1056,61 @@ function ss(t, e, s, i, n, o) {
|
|
1038
1056
|
_: 1
|
1039
1057
|
}, 512);
|
1040
1058
|
}
|
1041
|
-
const
|
1059
|
+
const os = /* @__PURE__ */ k(ts, [["render", rs]]), as = { class: "flex items-center gap-x-2" }, is = {
|
1042
1060
|
__name: "admin-table-custom-buttons",
|
1043
1061
|
props: {
|
1044
1062
|
slots: Object
|
1045
1063
|
},
|
1046
1064
|
setup(t) {
|
1047
|
-
var b, f,
|
1048
|
-
const { asyncTemplateSlot: e } = (c = (v = (
|
1049
|
-
var
|
1050
|
-
if (n.slots.panelLeft.includes("<")) {
|
1051
|
-
const
|
1065
|
+
var b, f, m, v, c;
|
1066
|
+
const { asyncTemplateSlot: e } = (c = (v = (m = (f = (b = Pe()) == null ? void 0 : b.appContext) == null ? void 0 : f.app) == null ? void 0 : m.config) == null ? void 0 : v.globalProperties) == null ? void 0 : c.utils, s = _e(""), i = _e(""), n = t, o = () => {
|
1067
|
+
var g, d, C, y, S;
|
1068
|
+
if ((g = n.slots) != null && g.panelLeft || (i.value = "div"), (C = (d = n.slots) == null ? void 0 : d.panelLeft) != null && C.includes("<")) {
|
1069
|
+
const T = e("PanelLeft", (y = n.slots) == null ? void 0 : y.panelLeft, [
|
1052
1070
|
"name"
|
1053
1071
|
]);
|
1054
|
-
i.value =
|
1072
|
+
i.value = T;
|
1055
1073
|
} else
|
1056
|
-
i.value = n.slots.panelLeft;
|
1074
|
+
i.value = (S = n.slots) == null ? void 0 : S.panelLeft;
|
1057
1075
|
}, u = () => {
|
1058
|
-
var
|
1059
|
-
if (n.slots.panelRight.includes("<")) {
|
1060
|
-
const
|
1076
|
+
var g, d, C, y, S;
|
1077
|
+
if ((g = n.slots) != null && g.panelRight || (s.value = "div"), (C = (d = n.slots) == null ? void 0 : d.panelRight) != null && C.includes("<")) {
|
1078
|
+
const T = e("PanelRight", (y = n.slots) == null ? void 0 : y.panelRight, [
|
1061
1079
|
"name"
|
1062
1080
|
]);
|
1063
|
-
s.value =
|
1081
|
+
s.value = T;
|
1064
1082
|
} else
|
1065
|
-
s.value = n.slots.panelRight;
|
1083
|
+
s.value = (S = n.slots) == null ? void 0 : S.panelRight;
|
1066
1084
|
};
|
1067
|
-
return o(), u(), (
|
1068
|
-
(r(), _(
|
1069
|
-
(r(), _(
|
1085
|
+
return o(), u(), (g, d) => (r(), a("div", as, [
|
1086
|
+
(r(), _(z(i.value))),
|
1087
|
+
(r(), _(z(s.value)))
|
1070
1088
|
]));
|
1071
1089
|
}
|
1072
|
-
},
|
1090
|
+
}, cs = (t, e = 300) => {
|
1073
1091
|
let s;
|
1074
1092
|
return function(...i) {
|
1075
1093
|
clearTimeout(s), s = setTimeout(() => {
|
1076
1094
|
t.apply(this, i);
|
1077
1095
|
}, e);
|
1078
1096
|
};
|
1079
|
-
},
|
1097
|
+
}, us = {
|
1080
1098
|
props: { table: String, title: String },
|
1081
1099
|
components: {
|
1082
|
-
AdminTableControl:
|
1083
|
-
AdminTableExport:
|
1084
|
-
AdminTableColumnsHidden:
|
1100
|
+
AdminTableControl: ft,
|
1101
|
+
AdminTableExport: Pt,
|
1102
|
+
AdminTableColumnsHidden: Xt,
|
1085
1103
|
AdminTableColumn: Ze,
|
1086
|
-
AdminNodata:
|
1087
|
-
IconPlus:
|
1104
|
+
AdminNodata: on,
|
1105
|
+
IconPlus: we,
|
1088
1106
|
IconSearch: je,
|
1089
|
-
AdminTableCardInfo:
|
1090
|
-
IconOpenCard:
|
1091
|
-
AdminComponentIs:
|
1092
|
-
AdminTableFilters:
|
1093
|
-
AdminTableTabs:
|
1094
|
-
AdminTableCustomFilters:
|
1095
|
-
AdminTableCustomButtons:
|
1107
|
+
AdminTableCardInfo: Fn,
|
1108
|
+
IconOpenCard: Bn,
|
1109
|
+
AdminComponentIs: Ce,
|
1110
|
+
AdminTableFilters: Rn,
|
1111
|
+
AdminTableTabs: Yn,
|
1112
|
+
AdminTableCustomFilters: os,
|
1113
|
+
AdminTableCustomButtons: is
|
1096
1114
|
},
|
1097
1115
|
data() {
|
1098
1116
|
return {
|
@@ -1148,7 +1166,7 @@ const ls = /* @__PURE__ */ k(Yn, [["render", ss]]), rs = { class: "flex items-ce
|
|
1148
1166
|
this.tableData = null, await this.getTableData();
|
1149
1167
|
},
|
1150
1168
|
searchValue: {
|
1151
|
-
handler:
|
1169
|
+
handler: cs(async function(t) {
|
1152
1170
|
var e;
|
1153
1171
|
await this.getTableData(), this.$router.push({
|
1154
1172
|
...this.$route,
|
@@ -1194,8 +1212,8 @@ const ls = /* @__PURE__ */ k(Yn, [["render", ss]]), rs = { class: "flex items-ce
|
|
1194
1212
|
},
|
1195
1213
|
methods: {
|
1196
1214
|
async checkUrlMounted() {
|
1197
|
-
var t, e, s, i, n, o, u, b, f,
|
1198
|
-
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((i = (s = this.$route) == null ? void 0 : s.query) == null ? void 0 : i.limit) || 20, this.filters = ((u = decodeURI((o = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : o.filter)) == null ? void 0 : u.replaceAll("+", " ")) || null, this.filterState = ((f = (b = this.$route) == null ? void 0 : b.query) == null ? void 0 : f.filterState) || null, this.filterCustom = ((v = (
|
1215
|
+
var t, e, s, i, n, o, u, b, f, m, v, c, g, d, C, y, S;
|
1216
|
+
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((i = (s = this.$route) == null ? void 0 : s.query) == null ? void 0 : i.limit) || 20, this.filters = ((u = decodeURI((o = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : o.filter)) == null ? void 0 : u.replaceAll("+", " ")) || null, this.filterState = ((f = (b = this.$route) == null ? void 0 : b.query) == null ? void 0 : f.filterState) || null, this.filterCustom = ((v = (m = this.$route) == null ? void 0 : m.query) == null ? void 0 : v.custom) || null, this.searchValue = ((g = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : g.search) || "", this.visibleColumns = ((y = (C = (d = this.$route) == null ? void 0 : d.query) == null ? void 0 : C.columns) == null ? void 0 : y.split(",")) || [], (S = this.$route) != null && S.query.card && (this.isVisibleCardInfo = !0);
|
1199
1217
|
},
|
1200
1218
|
rowWidth(t) {
|
1201
1219
|
var s, i;
|
@@ -1209,9 +1227,9 @@ const ls = /* @__PURE__ */ k(Yn, [["render", ss]]), rs = { class: "flex items-ce
|
|
1209
1227
|
this.page = 1, this.visibleColumns = [], this.filterCustom = null, this.filterState = null, this.isVisibleCardInfo = !1, this.filterScheme = null, this.filters = null, this.onFilters = 0, this.searchValue = "";
|
1210
1228
|
},
|
1211
1229
|
async getTableData() {
|
1212
|
-
var t, e, s, i, n, o, u, b, f,
|
1230
|
+
var t, e, s, i, n, o, u, b, f, m, v;
|
1213
1231
|
try {
|
1214
|
-
const { data: c } = await
|
1232
|
+
const { data: c } = await F.get(`/api/template/table/${this.table}`), g = await F.get(`/api/table-data/${this.table}`, {
|
1215
1233
|
params: {
|
1216
1234
|
page: this.page,
|
1217
1235
|
search: this.searchValue || null,
|
@@ -1224,18 +1242,18 @@ const ls = /* @__PURE__ */ k(Yn, [["render", ss]]), rs = { class: "flex items-ce
|
|
1224
1242
|
});
|
1225
1243
|
this.tableData = {
|
1226
1244
|
...c,
|
1227
|
-
...(
|
1228
|
-
}, this.initialHiddenColumns = (o = (n = (i = (s = this.tableData) == null ? void 0 : s.columns) == null ? void 0 : i.filter((
|
1229
|
-
var
|
1230
|
-
(
|
1231
|
-
}) : this.visibleColumns = (v = (
|
1245
|
+
...(g == null ? void 0 : g.data) || {}
|
1246
|
+
}, this.initialHiddenColumns = (o = (n = (i = (s = this.tableData) == null ? void 0 : s.columns) == null ? void 0 : i.filter((d) => (d == null ? void 0 : d.hidden) !== !0)) == null ? void 0 : n.map((d) => d == null ? void 0 : d.name)) == null ? void 0 : o.join(","), (u = this.visibleColumns) != null && u.length ? (b = this.tableData) == null || b.columns.forEach((d) => {
|
1247
|
+
var C;
|
1248
|
+
(C = this.visibleColumns) != null && C.includes(d == null ? void 0 : d.name) ? d.hidden = !1 : d.hidden = !0;
|
1249
|
+
}) : this.visibleColumns = (v = (m = (f = this.tableData) == null ? void 0 : f.columns) == null ? void 0 : m.filter((d) => (d == null ? void 0 : d.hidden) !== !0)) == null ? void 0 : v.map((d) => d == null ? void 0 : d.name);
|
1232
1250
|
} catch {
|
1233
1251
|
}
|
1234
1252
|
},
|
1235
1253
|
async getFilters() {
|
1236
1254
|
var t;
|
1237
1255
|
try {
|
1238
|
-
const { data: e } = await
|
1256
|
+
const { data: e } = await F.get(`/api/table-filter/${this.table}`);
|
1239
1257
|
this.filterScheme = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map((s) => ({
|
1240
1258
|
...s,
|
1241
1259
|
label: (s == null ? void 0 : s.label) || (s == null ? void 0 : s.ua)
|
@@ -1276,83 +1294,83 @@ const ls = /* @__PURE__ */ k(Yn, [["render", ss]]), rs = { class: "flex items-ce
|
|
1276
1294
|
});
|
1277
1295
|
}
|
1278
1296
|
}
|
1279
|
-
},
|
1297
|
+
}, ds = { class: "w-[calc(100vw - 320px)] bg-gray-50" }, hs = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, ps = { class: "text-xl font-medium" }, fs = {
|
1280
1298
|
style: { height: "calc(100vh - 155px)", width: "calc(100vw - 260px)" },
|
1281
1299
|
class: "bg-gray-50 p-[20px] flex pt-[10px]"
|
1282
|
-
},
|
1300
|
+
}, bs = { class: "bg-white w-full rounded-xl border p-[20px] pr-0" }, ms = { class: "flex" }, gs = { class: "flex gap-[6px] ml-auto" }, xs = { class: "inline-block w-full align-middle" }, ys = {
|
1283
1301
|
key: 0,
|
1284
1302
|
class: "relative min-w-full divide-y divide-gray-200 table-fixed dark:divide-neutral-700"
|
1285
|
-
},
|
1303
|
+
}, _s = { class: "sticky top-[-1px] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, ks = { class: "right-0 border-t border-stone-200" }, vs = {
|
1286
1304
|
key: 0,
|
1287
1305
|
class: "w-[70px] sticky right-0 top-0"
|
1288
|
-
},
|
1306
|
+
}, ws = { class: "divide-y divide-gray-200" }, Cs = { class: "px-4 py-3 text-sm text-gray-600" }, $s = ["onClick"], Ss = ["onClick"], As = { class: "p-[20px] flex justify-start items-center w-full" }, Is = { class: "w-[200px]" }, Ts = { class: "text-sm text-gray-600 dark:text-neutral-400" }, Vs = { class: "font-semibold text-gray-800 dark:text-neutral-200" }, Ds = { key: 0 }, Fs = {
|
1289
1307
|
key: 0,
|
1290
1308
|
class: "font-semibold text-gray-800 dark:text-neutral-200"
|
1291
1309
|
};
|
1292
|
-
function
|
1293
|
-
var
|
1294
|
-
const u =
|
1295
|
-
return r(), a("div",
|
1296
|
-
l("div",
|
1297
|
-
l("h2",
|
1310
|
+
function Ms(t, e, s, i, n, o) {
|
1311
|
+
var O, E, N, H, R, W, G, Z, J, Y, K, Q, X, ee, te, ne, se, le, re, oe, ae, ie;
|
1312
|
+
const u = p("IconPlus"), b = p("router-link"), f = p("AdminTableTabs"), m = p("IconSearch"), v = p("VsText"), c = p("AdminTableCustomButtons"), g = p("AdminTableCustomFilters"), d = p("AdminTableColumnsHidden"), C = p("AdminTableExport"), y = p("AdminTableFilters"), S = p("IconOpenCard"), T = p("AdminTableColumn"), j = p("AdminComponentIs"), U = p("AdminTableControl"), $e = p("AdminNodata"), Se = p("VsPagination"), Ae = p("AdminTableCardInfo");
|
1313
|
+
return r(), a("div", ds, [
|
1314
|
+
l("div", hs, [
|
1315
|
+
l("h2", ps, I(s.title), 1),
|
1298
1316
|
o.isForm ? (r(), _(b, {
|
1299
1317
|
key: 0,
|
1300
|
-
to: `/add?table=${(
|
1318
|
+
to: `/add?table=${(E = (O = t.$route) == null ? void 0 : O.params) == null ? void 0 : E.catchAll}`,
|
1301
1319
|
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"
|
1302
1320
|
}, {
|
1303
|
-
default:
|
1321
|
+
default: $(() => [
|
1304
1322
|
x(u, {
|
1305
1323
|
height: "16",
|
1306
1324
|
width: "16"
|
1307
1325
|
}),
|
1308
|
-
e[5] || (e[5] =
|
1326
|
+
e[5] || (e[5] = M(" Додати "))
|
1309
1327
|
]),
|
1310
1328
|
_: 1
|
1311
1329
|
}, 8, ["to"])) : w("", !0)
|
1312
1330
|
]),
|
1313
|
-
l("div",
|
1314
|
-
l("div",
|
1315
|
-
(
|
1331
|
+
l("div", fs, [
|
1332
|
+
l("div", bs, [
|
1333
|
+
(H = (N = n.tableData) == null ? void 0 : N.filterState) != null && H.length ? (r(), _(f, {
|
1316
1334
|
key: 0,
|
1317
|
-
tabsList: (
|
1335
|
+
tabsList: (R = n.tableData) == null ? void 0 : R.filterState,
|
1318
1336
|
filterState: n.filterState,
|
1319
|
-
"onUpdate:filterState": e[0] || (e[0] = (
|
1337
|
+
"onUpdate:filterState": e[0] || (e[0] = (h) => n.filterState = h)
|
1320
1338
|
}, null, 8, ["tabsList", "filterState"])) : w("", !0),
|
1321
|
-
l("div",
|
1339
|
+
l("div", ms, [
|
1322
1340
|
l("div", {
|
1323
|
-
class:
|
1341
|
+
class: V([n.isVisibleCardInfo ? "w-[calc(100%-360px)]" : "w-full"])
|
1324
1342
|
}, [
|
1325
1343
|
l("div", {
|
1326
|
-
class:
|
1344
|
+
class: V(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative", { "pr-[20px]": !n.isVisibleCardInfo }])
|
1327
1345
|
}, [
|
1328
|
-
x(
|
1346
|
+
x(m, {
|
1329
1347
|
height: "14",
|
1330
1348
|
width: "14",
|
1331
1349
|
class: "absolute top-[10px] left-[14px] text-gray-500 z-[1]"
|
1332
1350
|
}),
|
1333
1351
|
x(v, {
|
1334
1352
|
modelValue: n.searchValue,
|
1335
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
1353
|
+
"onUpdate:modelValue": e[1] || (e[1] = (h) => n.searchValue = h),
|
1336
1354
|
placeholder: "Пошук...",
|
1337
1355
|
clearable: !0,
|
1338
1356
|
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"
|
1339
1357
|
}, null, 8, ["modelValue"]),
|
1340
|
-
l("div",
|
1341
|
-
(
|
1358
|
+
l("div", gs, [
|
1359
|
+
(W = n.tableData) != null && W.slots ? (r(), _(c, {
|
1342
1360
|
key: 0,
|
1343
|
-
slots: (
|
1361
|
+
slots: (G = n.tableData) == null ? void 0 : G.slots
|
1344
1362
|
}, null, 8, ["slots"])) : w("", !0),
|
1345
|
-
(
|
1363
|
+
(J = (Z = n.tableData) == null ? void 0 : Z.filterCustom) != null && J.length ? (r(), _(g, {
|
1346
1364
|
key: 1,
|
1347
|
-
customList: (
|
1365
|
+
customList: (Y = n.tableData) == null ? void 0 : Y.filterCustom,
|
1348
1366
|
filterCustom: n.filterCustom,
|
1349
|
-
"onUpdate:filterCustom": e[2] || (e[2] = (
|
1367
|
+
"onUpdate:filterCustom": e[2] || (e[2] = (h) => n.filterCustom = h)
|
1350
1368
|
}, null, 8, ["customList", "filterCustom"])) : w("", !0),
|
1351
|
-
x(
|
1369
|
+
x(d, {
|
1352
1370
|
columns: (K = n.tableData) == null ? void 0 : K.columns,
|
1353
|
-
onUpdateColumns: e[3] || (e[3] = (
|
1371
|
+
onUpdateColumns: e[3] || (e[3] = (h) => n.tableData.columns = h)
|
1354
1372
|
}, null, 8, ["columns"]),
|
1355
|
-
x(
|
1373
|
+
x(C, {
|
1356
1374
|
table: s.table,
|
1357
1375
|
columns: (Q = n.tableData) == null ? void 0 : Q.columns,
|
1358
1376
|
page: n.page,
|
@@ -1367,89 +1385,89 @@ function Ds(t, e, s, i, n, o) {
|
|
1367
1385
|
onFilterChange: o.filterChange
|
1368
1386
|
}, null, 8, ["scheme", "onFilters", "onFilterChange"])) : w("", !0),
|
1369
1387
|
l("button", {
|
1370
|
-
onClick: e[4] || (e[4] = (...
|
1388
|
+
onClick: e[4] || (e[4] = (...h) => o.toggleCardInfo && o.toggleCardInfo(...h)),
|
1371
1389
|
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"
|
1372
1390
|
}, [
|
1373
|
-
x(
|
1374
|
-
class:
|
1391
|
+
x(S, {
|
1392
|
+
class: V({ "rotate-180 duration-300": !n.isVisibleCardInfo })
|
1375
1393
|
}, null, 8, ["class"])
|
1376
1394
|
])
|
1377
1395
|
])
|
1378
1396
|
], 2),
|
1379
1397
|
l("div", {
|
1380
|
-
class:
|
1398
|
+
class: V(["flex items-start justify-start w-full space-y-5", { "pr-[20px]": !n.isVisibleCardInfo }])
|
1381
1399
|
}, [
|
1382
1400
|
l("div", {
|
1383
|
-
style:
|
1384
|
-
height: (
|
1401
|
+
style: ke({
|
1402
|
+
height: (te = (ee = n.tableData) == null ? void 0 : ee.filterState) != null && te.length ? "calc(100vh - 370px)" : "calc(100vh - 330px)"
|
1385
1403
|
}),
|
1386
1404
|
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"
|
1387
1405
|
}, [
|
1388
|
-
l("div",
|
1389
|
-
o.isNoData ? (r(), _($e, { key: 1 })) : (r(), a("table",
|
1390
|
-
l("thead",
|
1391
|
-
l("tr",
|
1392
|
-
(r(!0), a(
|
1393
|
-
key:
|
1394
|
-
style:
|
1395
|
-
width: o.rowWidth(
|
1396
|
-
textAlign:
|
1397
|
-
wordBreak:
|
1406
|
+
l("div", xs, [
|
1407
|
+
o.isNoData ? (r(), _($e, { key: 1 })) : (r(), a("table", ys, [
|
1408
|
+
l("thead", _s, [
|
1409
|
+
l("tr", ks, [
|
1410
|
+
(r(!0), a(A, null, D(o.columns, (h) => (r(), _(T, {
|
1411
|
+
key: h.name,
|
1412
|
+
style: ke({
|
1413
|
+
width: o.rowWidth(h == null ? void 0 : h.name),
|
1414
|
+
textAlign: h == null ? void 0 : h.align,
|
1415
|
+
wordBreak: h == null ? void 0 : h.wrap
|
1398
1416
|
}),
|
1399
|
-
data:
|
1417
|
+
data: h,
|
1400
1418
|
activeColumn: n.activeColumn,
|
1401
1419
|
onChangeActive: o.changeActiveColumn
|
1402
1420
|
}, null, 8, ["style", "data", "activeColumn", "onChangeActive"]))), 128)),
|
1403
|
-
(
|
1421
|
+
(se = (ne = o.getActions) == null ? void 0 : ne.filter((h) => h !== "add")) != null && se.length ? (r(), a("th", vs)) : w("", !0)
|
1404
1422
|
])
|
1405
1423
|
]),
|
1406
|
-
l("tbody",
|
1407
|
-
(r(!0), a(
|
1408
|
-
var
|
1424
|
+
l("tbody", ws, [
|
1425
|
+
(r(!0), a(A, null, D((le = n.tableData) == null ? void 0 : le.rows, (h, Ie) => {
|
1426
|
+
var ce, ue, de, he, pe, fe, be, me, ge, xe;
|
1409
1427
|
return r(), a("tr", {
|
1410
1428
|
key: Ie,
|
1411
|
-
class:
|
1412
|
-
"bg-gray-50": ((
|
1429
|
+
class: V({
|
1430
|
+
"bg-gray-50": ((ue = (ce = t.$route) == null ? void 0 : ce.query) == null ? void 0 : ue.card) === (h == null ? void 0 : h.id)
|
1413
1431
|
})
|
1414
1432
|
}, [
|
1415
|
-
l("td",
|
1433
|
+
l("td", Cs, [
|
1416
1434
|
l("button", {
|
1417
|
-
onClick: () => o.pushToCard(
|
1418
|
-
class:
|
1419
|
-
((
|
1435
|
+
onClick: () => o.pushToCard(h == null ? void 0 : h.id),
|
1436
|
+
class: V(["text-sm font-medium", [
|
1437
|
+
((de = n.tableData) == null ? void 0 : de.card) === !1 ? "" : "text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"
|
1420
1438
|
]])
|
1421
1439
|
}, [
|
1422
|
-
x(
|
1423
|
-
row:
|
1440
|
+
x(j, {
|
1441
|
+
row: h,
|
1424
1442
|
column: o.columns[0],
|
1425
1443
|
table: s.table,
|
1426
1444
|
onUpdateTable: o.getTableData
|
1427
1445
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1428
|
-
], 10,
|
1446
|
+
], 10, $s)
|
1429
1447
|
]),
|
1430
|
-
(r(!0), a(
|
1431
|
-
onClick: (
|
1432
|
-
class:
|
1433
|
-
key:
|
1448
|
+
(r(!0), a(A, null, D((he = o.columns) == null ? void 0 : he.slice(1), (q) => (r(), a("td", {
|
1449
|
+
onClick: (Ls) => o.changeActiveCardInfo(h == null ? void 0 : h.id),
|
1450
|
+
class: V(["px-3 py-3 text-sm text-gray-600 text-start whitespace-nowrap", { "cursor-pointer": n.isVisibleCardInfo }]),
|
1451
|
+
key: q.name
|
1434
1452
|
}, [
|
1435
|
-
x(
|
1436
|
-
row:
|
1437
|
-
column:
|
1453
|
+
x(j, {
|
1454
|
+
row: h,
|
1455
|
+
column: q,
|
1438
1456
|
table: s.table,
|
1439
1457
|
onUpdateTable: o.getTableData
|
1440
1458
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1441
|
-
], 10,
|
1442
|
-
(
|
1459
|
+
], 10, Ss))), 128)),
|
1460
|
+
(fe = (pe = o.getActions) == null ? void 0 : pe.filter((q) => q !== "add")) != null && fe.length ? (r(), a("td", {
|
1443
1461
|
key: 0,
|
1444
|
-
class:
|
1445
|
-
"bg-gray-50": ((
|
1446
|
-
"bg-white": ((
|
1462
|
+
class: V(["text-center sticky right-0 w-[80px] px-[10px]", {
|
1463
|
+
"bg-gray-50": ((me = (be = t.$route) == null ? void 0 : be.query) == null ? void 0 : me.card) === (h == null ? void 0 : h.id),
|
1464
|
+
"bg-white": ((xe = (ge = t.$route) == null ? void 0 : ge.query) == null ? void 0 : xe.card) !== (h == null ? void 0 : h.id)
|
1447
1465
|
}])
|
1448
1466
|
}, [
|
1449
|
-
x(
|
1467
|
+
x(U, {
|
1450
1468
|
actions: o.getActions,
|
1451
1469
|
isForm: o.isForm,
|
1452
|
-
item:
|
1470
|
+
item: h,
|
1453
1471
|
table: s.table,
|
1454
1472
|
onUpdateTable: o.getTableData
|
1455
1473
|
}, null, 8, ["actions", "isForm", "item", "table", "onUpdateTable"])
|
@@ -1461,38 +1479,38 @@ function Ds(t, e, s, i, n, o) {
|
|
1461
1479
|
])
|
1462
1480
|
], 4)
|
1463
1481
|
], 2),
|
1464
|
-
l("div",
|
1465
|
-
l("div",
|
1466
|
-
l("p",
|
1467
|
-
l("span",
|
1468
|
-
|
1469
|
-
n.filters || n.searchValue ? (r(), a("span",
|
1482
|
+
l("div", As, [
|
1483
|
+
l("div", Is, [
|
1484
|
+
l("p", Ts, [
|
1485
|
+
l("span", Vs, [
|
1486
|
+
M(I(n.filters || n.searchValue ? "Знайдено" : "Об'єктів") + " " + I(((re = n.tableData) == null ? void 0 : re.count) || "0 ") + " ", 1),
|
1487
|
+
n.filters || n.searchValue ? (r(), a("span", Ds, " з")) : w("", !0)
|
1470
1488
|
]),
|
1471
|
-
n.filters || n.searchValue ? (r(), a("span",
|
1489
|
+
n.filters || n.searchValue ? (r(), a("span", Fs, I(" " + ((oe = n.tableData) == null ? void 0 : oe.filtered) || 0), 1)) : w("", !0)
|
1472
1490
|
])
|
1473
1491
|
]),
|
1474
|
-
Math.ceil(((
|
1492
|
+
Math.ceil(((ae = n.tableData) == null ? void 0 : ae.filtered) / n.limit) > 1 ? (r(), _(Se, {
|
1475
1493
|
key: 0,
|
1476
1494
|
goTo: !1,
|
1477
1495
|
class: "justify-end",
|
1478
1496
|
"default-page": parseInt(o.defaultPage),
|
1479
|
-
total: ((
|
1497
|
+
total: ((ie = n.tableData) == null ? void 0 : ie.filtered) || 0,
|
1480
1498
|
pageSize: parseInt(n.limit),
|
1481
1499
|
onPageChange: o.handlePageChange,
|
1482
1500
|
pageSizes: [10, 16, 20],
|
1483
1501
|
onPageSizeChange: o.changeLimit,
|
1484
|
-
backgroundColor: "#
|
1502
|
+
backgroundColor: "#F3F4F6"
|
1485
1503
|
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])) : w("", !0)
|
1486
1504
|
])
|
1487
1505
|
], 2),
|
1488
1506
|
x(P, { name: "slide-fade" }, {
|
1489
|
-
default:
|
1490
|
-
var
|
1507
|
+
default: $(() => {
|
1508
|
+
var h;
|
1491
1509
|
return [
|
1492
1510
|
n.isVisibleCardInfo ? (r(), _(Ae, {
|
1493
1511
|
key: 0,
|
1494
1512
|
table: s.table,
|
1495
|
-
columns: (
|
1513
|
+
columns: (h = n.tableData) == null ? void 0 : h.columns,
|
1496
1514
|
row: o.activeCardRow
|
1497
1515
|
}, null, 8, ["table", "columns", "row"])) : w("", !0)
|
1498
1516
|
];
|
@@ -1504,8 +1522,8 @@ function Ds(t, e, s, i, n, o) {
|
|
1504
1522
|
])
|
1505
1523
|
]);
|
1506
1524
|
}
|
1507
|
-
const
|
1508
|
-
components: { AdminTable:
|
1525
|
+
const js = /* @__PURE__ */ k(us, [["render", Ms], ["__scopeId", "data-v-c62adcdb"]]), qs = {
|
1526
|
+
components: { AdminTable: js },
|
1509
1527
|
data() {
|
1510
1528
|
return {
|
1511
1529
|
table: !1,
|
@@ -1517,7 +1535,7 @@ const Fs = /* @__PURE__ */ k(is, [["render", Ds], ["__scopeId", "data-v-e274f71c
|
|
1517
1535
|
$route: {
|
1518
1536
|
async handler() {
|
1519
1537
|
var t;
|
1520
|
-
(t =
|
1538
|
+
(t = ye) != null && t.value || await this.getMenu(), await this.checkPageType();
|
1521
1539
|
},
|
1522
1540
|
deep: !0
|
1523
1541
|
},
|
@@ -1538,7 +1556,7 @@ const Fs = /* @__PURE__ */ k(is, [["render", Ds], ["__scopeId", "data-v-e274f71c
|
|
1538
1556
|
},
|
1539
1557
|
async checkPageType() {
|
1540
1558
|
var i, n;
|
1541
|
-
const t = this.flattenMenu(
|
1559
|
+
const t = this.flattenMenu(ye.value);
|
1542
1560
|
t != null && t.length || this.$router.replace("/404");
|
1543
1561
|
const e = t == null ? void 0 : t.find((o) => {
|
1544
1562
|
var u, b;
|
@@ -1551,7 +1569,7 @@ const Fs = /* @__PURE__ */ k(is, [["render", Ds], ["__scopeId", "data-v-e274f71c
|
|
1551
1569
|
async getInterface() {
|
1552
1570
|
var t, e;
|
1553
1571
|
try {
|
1554
|
-
const { data: s } = await
|
1572
|
+
const { data: s } = await F.get(
|
1555
1573
|
`/api/template/interface/${((e = (t = this.$route) == null ? void 0 : t.params) == null ? void 0 : e.catchAll) || ""}`
|
1556
1574
|
);
|
1557
1575
|
this.interface = s || "";
|
@@ -1560,9 +1578,9 @@ const Fs = /* @__PURE__ */ k(is, [["render", Ds], ["__scopeId", "data-v-e274f71c
|
|
1560
1578
|
}
|
1561
1579
|
}
|
1562
1580
|
}
|
1563
|
-
},
|
1564
|
-
function
|
1565
|
-
const u =
|
1581
|
+
}, Bs = ["innerHTML"];
|
1582
|
+
function zs(t, e, s, i, n, o) {
|
1583
|
+
const u = p("AdminTable");
|
1566
1584
|
return n.table ? (r(), _(u, {
|
1567
1585
|
key: 0,
|
1568
1586
|
table: n.table,
|
@@ -1572,9 +1590,9 @@ function qs(t, e, s, i, n, o) {
|
|
1572
1590
|
class: "w-full bg-gray-50",
|
1573
1591
|
style: { height: "calc(100vh - 120px)" },
|
1574
1592
|
innerHTML: n.interface
|
1575
|
-
}, null, 8,
|
1593
|
+
}, null, 8, Bs));
|
1576
1594
|
}
|
1577
|
-
const
|
1595
|
+
const Es = /* @__PURE__ */ k(qs, [["render", zs]]);
|
1578
1596
|
export {
|
1579
|
-
|
1597
|
+
Es as default
|
1580
1598
|
};
|