@opengis/admin 0.3.16 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -97
- package/config.js +4 -4
- package/dist/{add-page-CaFWkAA9.js → add-page-VARqOmxg.js} +1 -1
- package/dist/{admin-interface-CvdAsxcu.js → admin-interface-DLLDfAIS.js} +560 -536
- package/dist/{admin-view-C6jSOf1a.js → admin-view-UIpQtpxJ.js} +2 -2
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +51 -51
- package/dist/assets/logo.svg +41 -41
- package/dist/{card-view-ROrvgB5F.js → card-view-BDpODP0R.js} +1 -1
- package/dist/{edit-page-DhPJ-naP.js → edit-page-Dc-2Lht-.js} +1 -1
- package/dist/{import-file-CB_7gtrh.js → import-file-DXd0t8So.js} +4573 -4554
- package/dist/{profile-page-CsyukNZX.js → profile-page-BEwTY8Qv.js} +1 -1
- package/dist/style.css +1 -1
- package/module/settings/card/admin.accounts.table/index.yml +7 -7
- package/module/settings/card/admin.accounts.table/rules.hbs +18 -18
- package/module/settings/card/admin.accounts.table/users.hbs +13 -13
- package/module/settings/card/admin.routes.table/groups.hbs +11 -11
- package/module/settings/card/admin.routes.table/users.hbs +16 -16
- package/module/settings/cls/core.actions.json +17 -17
- 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/cls/yes_no.json +11 -11
- package/module/settings/form/admin.accounts.form.json +13 -13
- package/module/settings/form/admin.properties.form.json +15 -15
- package/module/settings/form/admin.roles.form.json +21 -21
- package/module/settings/form/admin.user_properties.form.json +15 -15
- package/module/settings/form/admin.user_roles_card.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/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.properties.table.json +39 -39
- package/module/settings/table/admin.user_properties.table.json +34 -34
- package/package.json +3 -3
- package/server/helpers/core/badge.js +16 -16
- package/server/helpers/core/buttonHelper.js +21 -21
- package/server/helpers/core/coalesce.js +7 -7
- package/server/helpers/core/select.js +48 -48
- package/server/helpers/core/token.js +18 -18
- package/server/helpers/list/buttonHelper.js +21 -21
- package/server/helpers/list/utils/button.js +5 -5
- package/server/helpers/temp/contentList.js +58 -58
- package/server/helpers/temp/ifCond.js +101 -101
- package/server/helpers/utils/button.js +5 -5
- package/server/helpers/utils/mdToHTML.js +17 -17
- package/server/plugins/access/index.mjs +6 -6
- package/server/plugins/adminHook.js +81 -81
- package/server/plugins/cron.js +10 -10
- package/server/plugins/docs.js +28 -28
- package/server/routes/access/controllers/access.group.js +29 -29
- package/server/routes/access/controllers/access.group.post.js +54 -54
- package/server/routes/access/index.mjs +11 -11
- package/server/routes/access/schema.mjs +67 -67
- package/server/routes/calendar/controllers/calendar.data.js +125 -125
- package/server/routes/calendar/index.mjs +7 -7
- package/server/routes/calendar/schema.js +21 -21
- 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 +31 -31
- package/server/routes/data/controllers/tableDataId.js +27 -27
- package/server/routes/data/controllers/tokenInfo.js +9 -9
- package/server/routes/data/controllers/utils/assignTokens.js +30 -30
- package/server/routes/data/controllers/utils/conditions.js +20 -20
- package/server/routes/data/controllers/utils/getColumns.js +8 -8
- package/server/routes/data/index.mjs +20 -20
- package/server/routes/data/schema.js +54 -54
- 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 +92 -92
- package/server/routes/notifications/hook/onWidgetSet.js +56 -56
- package/server/routes/notifications/index.mjs +26 -26
- package/server/routes/notifications/schema.js +16 -16
- package/server/routes/print/controllers/cardPrint.js +135 -135
- package/server/routes/properties/schema.js +10 -10
- package/server/routes/report/controllers/data.js +76 -76
- package/server/routes/report/controllers/list.js +18 -18
- package/server/routes/report/index.mjs +7 -7
- package/server/routes/report/utils/formatValue.js +179 -179
- package/server/routes/root.mjs +3 -3
- package/server/routes/templates/controllers/getTemplate.js +44 -44
- 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 +72 -72
- package/server/routes/user/controllers/user.info.js +17 -17
- package/server/routes/user/schema.js +14 -14
- package/server/routes/util/controllers/code.generator.js +89 -89
- package/server/routes/widget/controllers/widget.del.js +47 -47
- package/server/routes/widget/controllers/widget.set.js +84 -84
- package/server/routes/widget/hook/onWidgetSet.js +12 -12
- package/server/routes/widget/index.mjs +16 -16
- 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/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
@@ -1,6 +1,6 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { openBlock as r, createElementBlock as i, createTextVNode as
|
3
|
-
const
|
1
|
+
import { _ as T, g as Oe, h as Ne, i as Ee, f as M, I as Ue, j as Le, k as J, A as G, V as We, l as Re, m as He, n as Ke, o as Je, p as Ge, q as Qe, a as Xe, r as Ye, t as Ze, u as Fe, s as et } from "./import-file-DXd0t8So.js";
|
2
|
+
import { openBlock as r, createElementBlock as i, createTextVNode as L, toDisplayString as S, createElementVNode as l, normalizeClass as D, createCommentVNode as v, resolveComponent as h, Fragment as $, createVNode as y, withCtx as I, createBlock as k, renderList as V, withModifiers as tt, createStaticVNode as st, withDirectives as N, vModelCheckbox as nt, Transition as R, vModelText as lt, renderSlot as at, vShow as Q, Teleport as rt, getCurrentInstance as Me, ref as H, resolveDynamicComponent as K, defineComponent as ot, withKeys as it, normalizeStyle as je } from "vue";
|
3
|
+
const dt = {
|
4
4
|
data() {
|
5
5
|
return {
|
6
6
|
currentSort: ""
|
@@ -13,6 +13,9 @@ const it = {
|
|
13
13
|
},
|
14
14
|
activeColumn: { type: String }
|
15
15
|
},
|
16
|
+
mounted() {
|
17
|
+
this.$emit("update-ref", this.$refs.column);
|
18
|
+
},
|
16
19
|
computed: {
|
17
20
|
label() {
|
18
21
|
var t, e;
|
@@ -46,11 +49,11 @@ const it = {
|
|
46
49
|
},
|
47
50
|
handleClickSortBtn(t) {
|
48
51
|
this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(t);
|
49
|
-
const e = this.$route.query, { sort:
|
52
|
+
const e = this.$route.query, { sort: n, ...o } = e, s = this.currentSort ? `${this.data.name}-${this.currentSort}` : "";
|
50
53
|
this.$router.replace({
|
51
54
|
query: {
|
52
55
|
...o,
|
53
|
-
...
|
56
|
+
...s && { sort: s }
|
54
57
|
}
|
55
58
|
});
|
56
59
|
},
|
@@ -58,26 +61,27 @@ const it = {
|
|
58
61
|
return `${this.data.name}-${t}` === this.selectedSortParam;
|
59
62
|
}
|
60
63
|
}
|
61
|
-
},
|
64
|
+
}, ut = {
|
62
65
|
scope: "col",
|
63
|
-
class: "pe-2
|
64
|
-
|
66
|
+
class: "py-1 pe-2 text-start",
|
67
|
+
ref: "column"
|
68
|
+
}, ct = { class: "w-[24px]" }, pt = {
|
65
69
|
key: 1,
|
66
70
|
class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200"
|
67
71
|
};
|
68
|
-
function
|
69
|
-
return r(), i("th",
|
72
|
+
function ht(t, e, n, o, s, a) {
|
73
|
+
return r(), i("th", ut, [
|
70
74
|
a.getVisibleIcon ? (r(), i("button", {
|
71
75
|
key: 0,
|
72
76
|
type: "button",
|
73
77
|
class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200",
|
74
|
-
onClick: e[0] || (e[0] = (
|
78
|
+
onClick: e[0] || (e[0] = (c) => a.handleClickSortBtn(s.currentSort))
|
75
79
|
}, [
|
76
|
-
|
77
|
-
l("span",
|
78
|
-
|
80
|
+
L(S(a.label) + " ", 1),
|
81
|
+
l("span", ct, [
|
82
|
+
s.currentSort ? (r(), i("svg", {
|
79
83
|
key: 0,
|
80
|
-
class:
|
84
|
+
class: D(["shrink-0 size-3.5", { "rotate-180": s.currentSort === "asc" }]),
|
81
85
|
xmlns: "http://www.w3.org/2000/svg",
|
82
86
|
width: "24",
|
83
87
|
height: "24",
|
@@ -92,14 +96,14 @@ function pt(t, e, s, o, n, a) {
|
|
92
96
|
l("path", { d: "M12 19V5" }, null, -1)
|
93
97
|
]), 2)) : v("", !0)
|
94
98
|
])
|
95
|
-
])) : (r(), i("p",
|
96
|
-
]);
|
99
|
+
])) : (r(), i("p", pt, S(a.label), 1))
|
100
|
+
], 512);
|
97
101
|
}
|
98
|
-
const
|
102
|
+
const bt = /* @__PURE__ */ T(dt, [["render", ht]]), ft = {
|
99
103
|
components: {
|
100
|
-
IconMore:
|
104
|
+
IconMore: Oe,
|
101
105
|
IconDelete: Ne,
|
102
|
-
IconEdit:
|
106
|
+
IconEdit: Ee
|
103
107
|
},
|
104
108
|
emits: ["updateTable"],
|
105
109
|
props: {
|
@@ -130,7 +134,7 @@ const ht = /* @__PURE__ */ A(it, [["render", pt]]), bt = {
|
|
130
134
|
async getData() {
|
131
135
|
var t;
|
132
136
|
try {
|
133
|
-
const { data: e } = await
|
137
|
+
const { data: e } = await M.get(
|
134
138
|
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
135
139
|
);
|
136
140
|
this.formValue = e;
|
@@ -144,18 +148,18 @@ const ht = /* @__PURE__ */ A(it, [["render", pt]]), bt = {
|
|
144
148
|
async deleteElement() {
|
145
149
|
var t, e;
|
146
150
|
try {
|
147
|
-
const { data:
|
151
|
+
const { data: n } = await M.get(
|
148
152
|
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
149
153
|
);
|
150
|
-
await
|
154
|
+
await M.delete(`/api/table/${n == null ? void 0 : n.token}`), await this.$notify({
|
151
155
|
title: "Успішно!",
|
152
156
|
message: "Об`єкт успішно видалeно",
|
153
157
|
type: "success"
|
154
158
|
}), await this.$emit("update-table");
|
155
|
-
} catch (
|
159
|
+
} catch (n) {
|
156
160
|
this.$notify({
|
157
161
|
title: "Помилка!",
|
158
|
-
message: (e =
|
162
|
+
message: (e = n == null ? void 0 : n.response) == null ? void 0 : e.data,
|
159
163
|
type: "error"
|
160
164
|
});
|
161
165
|
} finally {
|
@@ -163,7 +167,7 @@ const ht = /* @__PURE__ */ A(it, [["render", pt]]), bt = {
|
|
163
167
|
}
|
164
168
|
},
|
165
169
|
async customButtonAction(t) {
|
166
|
-
var e,
|
170
|
+
var e, n;
|
167
171
|
document.querySelector("body").click(), t != null && t.form ? (await this.$v3plugin.$form({
|
168
172
|
form: t == null ? void 0 : t.form,
|
169
173
|
id: (e = this.item) == null ? void 0 : e.id,
|
@@ -173,61 +177,61 @@ const ht = /* @__PURE__ */ A(it, [["render", pt]]), bt = {
|
|
173
177
|
confirm: t == null ? void 0 : t.confirm,
|
174
178
|
api: t == null ? void 0 : t.api,
|
175
179
|
method: t == null ? void 0 : t.method,
|
176
|
-
id: (
|
180
|
+
id: (n = this.item) == null ? void 0 : n.id,
|
177
181
|
isId: (t == null ? void 0 : t.isId) || !1
|
178
182
|
}), await this.$emit("update-table"));
|
179
183
|
}
|
180
184
|
}
|
181
|
-
},
|
185
|
+
}, gt = { class: "inline-flex" }, mt = { 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" }, xt = { class: "flex flex-col items-start" }, yt = ["onClick"], kt = { class: "text-gray-800" }, vt = {
|
182
186
|
key: 1,
|
183
187
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
184
|
-
},
|
185
|
-
function
|
186
|
-
const
|
188
|
+
}, _t = { class: "flex justify-end p-[16px] pr-0 gap-x-3" };
|
189
|
+
function Ct(t, e, n, o, s, a) {
|
190
|
+
const c = h("IconMore"), g = h("IconEdit"), p = h("router-link"), b = h("IconDelete"), d = h("VsPopover"), _ = h("VsConfirm");
|
187
191
|
return r(), i($, null, [
|
188
|
-
l("div",
|
189
|
-
|
192
|
+
l("div", gt, [
|
193
|
+
y(d, {
|
190
194
|
trigger: "click",
|
191
195
|
placement: "bottom-left"
|
192
196
|
}, {
|
193
|
-
reference:
|
194
|
-
l("button",
|
195
|
-
|
197
|
+
reference: I(() => [
|
198
|
+
l("button", mt, [
|
199
|
+
y(c, {
|
196
200
|
height: "16",
|
197
201
|
width: "16"
|
198
202
|
})
|
199
203
|
])
|
200
204
|
]),
|
201
|
-
default:
|
202
|
-
var
|
205
|
+
default: I(() => {
|
206
|
+
var x, f, C, m, w;
|
203
207
|
return [
|
204
|
-
l("div",
|
205
|
-
(
|
208
|
+
l("div", xt, [
|
209
|
+
(x = n.actions) != null && x.includes("edit") && n.isForm ? (r(), k(p, {
|
206
210
|
key: 0,
|
207
|
-
to: `/edit?table=${(C = (
|
211
|
+
to: `/edit?table=${(C = (f = t.$route) == null ? void 0 : f.params) == null ? void 0 : C.catchAll}&id=${(m = n.item) == null ? void 0 : m.id}`,
|
208
212
|
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"
|
209
213
|
}, {
|
210
|
-
default:
|
211
|
-
|
212
|
-
e[4] || (e[4] =
|
214
|
+
default: I(() => [
|
215
|
+
y(g, { color: "#000" }),
|
216
|
+
e[4] || (e[4] = L(" Редагувати "))
|
213
217
|
]),
|
214
218
|
_: 1
|
215
219
|
}, 8, ["to"])) : v("", !0),
|
216
|
-
(r(!0), i($, null, V(a.getCustomActions, (
|
217
|
-
key:
|
218
|
-
onClick: (
|
220
|
+
(r(!0), i($, null, V(a.getCustomActions, (A, P) => (r(), i("button", {
|
221
|
+
key: P,
|
222
|
+
onClick: (F) => a.customButtonAction(A),
|
219
223
|
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"
|
220
224
|
}, [
|
221
|
-
|
222
|
-
l("span",
|
223
|
-
], 8,
|
224
|
-
|
225
|
-
(w =
|
225
|
+
y(b, { class: "opacity-0" }),
|
226
|
+
l("span", kt, S(A == null ? void 0 : A.label), 1)
|
227
|
+
], 8, yt))), 128)),
|
228
|
+
n.isForm ? (r(), i("div", vt)) : v("", !0),
|
229
|
+
(w = n.actions) != null && w.includes("del") ? (r(), i("button", {
|
226
230
|
key: 2,
|
227
|
-
onClick: e[0] || (e[0] = tt((...
|
231
|
+
onClick: e[0] || (e[0] = tt((...A) => a.openConfirm && a.openConfirm(...A), ["stop"])),
|
228
232
|
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"
|
229
233
|
}, [
|
230
|
-
|
234
|
+
y(b),
|
231
235
|
e[5] || (e[5] = l("span", { class: "text-gray-800" }, "Видалити", -1))
|
232
236
|
])) : v("", !0)
|
233
237
|
])
|
@@ -236,24 +240,24 @@ function _t(t, e, s, o, n, a) {
|
|
236
240
|
_: 1
|
237
241
|
})
|
238
242
|
]),
|
239
|
-
|
240
|
-
visible:
|
241
|
-
"onUpdate:visible": e[3] || (e[3] = (
|
243
|
+
y(_, {
|
244
|
+
visible: s.isDeleteConfirm,
|
245
|
+
"onUpdate:visible": e[3] || (e[3] = (x) => s.isDeleteConfirm = x),
|
242
246
|
size: "small",
|
243
247
|
title: "Ви впевнені?"
|
244
248
|
}, {
|
245
|
-
default:
|
249
|
+
default: I(() => [
|
246
250
|
e[6] || (e[6] = l("p", { class: "mt-1 text-sm text-gray-600 dark:text-neutral-400" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
247
|
-
l("div",
|
251
|
+
l("div", _t, [
|
248
252
|
l("button", {
|
249
253
|
type: "button",
|
250
254
|
class: "inline-flex items-center px-3 py-2 text-xs font-medium duration-300 border rounded-lg shadow-sm hover:bg-gray-100 gap-x-2 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",
|
251
|
-
onClick: e[1] || (e[1] = (
|
255
|
+
onClick: e[1] || (e[1] = (x) => s.isDeleteConfirm = !1)
|
252
256
|
}, " Скасувати "),
|
253
257
|
l("button", {
|
254
258
|
type: "button",
|
255
259
|
class: "inline-flex items-center px-3 py-2 text-xs font-medium text-white duration-300 bg-red-500 rounded-lg gap-x-2 hover:bg-red-700 disabled:opacity-50 disabled:pointer-events-none",
|
256
|
-
onClick: e[2] || (e[2] = (...
|
260
|
+
onClick: e[2] || (e[2] = (...x) => a.deleteElement && a.deleteElement(...x))
|
257
261
|
}, " Так, я впевнена(ий) ")
|
258
262
|
])
|
259
263
|
]),
|
@@ -261,7 +265,7 @@ function _t(t, e, s, o, n, a) {
|
|
261
265
|
}, 8, ["visible"])
|
262
266
|
], 64);
|
263
267
|
}
|
264
|
-
const
|
268
|
+
const wt = /* @__PURE__ */ T(ft, [["render", Ct]]), $t = {}, Tt = {
|
265
269
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
266
270
|
xmlns: "http://www.w3.org/2000/svg",
|
267
271
|
viewBox: "0 0 24 24",
|
@@ -271,15 +275,15 @@ const Ct = /* @__PURE__ */ A(bt, [["render", _t]]), wt = {}, $t = {
|
|
271
275
|
"stroke-linecap": "round",
|
272
276
|
"stroke-linejoin": "round"
|
273
277
|
};
|
274
|
-
function At(t, e,
|
275
|
-
return r(), i("svg",
|
278
|
+
function At(t, e, n, o, s, a) {
|
279
|
+
return r(), i("svg", Tt, e[0] || (e[0] = [
|
276
280
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
277
281
|
l("path", { d: "M7 20V4" }, null, -1),
|
278
282
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
279
283
|
l("path", { d: "M17 4v16" }, null, -1)
|
280
284
|
]));
|
281
285
|
}
|
282
|
-
const
|
286
|
+
const St = /* @__PURE__ */ T($t, [["render", At]]), It = {}, Dt = {
|
283
287
|
xmlns: "http://www.w3.org/2000/svg",
|
284
288
|
width: "24",
|
285
289
|
height: "24",
|
@@ -291,8 +295,8 @@ const Tt = /* @__PURE__ */ A(wt, [["render", At]]), St = {}, It = {
|
|
291
295
|
"stroke-linejoin": "round",
|
292
296
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-rosette-discount-check"
|
293
297
|
};
|
294
|
-
function
|
295
|
-
return r(), i("svg",
|
298
|
+
function Vt(t, e, n, o, s, a) {
|
299
|
+
return r(), i("svg", Dt, e[0] || (e[0] = [
|
296
300
|
l("path", {
|
297
301
|
stroke: "none",
|
298
302
|
d: "M0 0h24v24H0z",
|
@@ -302,8 +306,8 @@ function Dt(t, e, s, o, n, a) {
|
|
302
306
|
l("path", { d: "M9 12l2 2l4 -4" }, null, -1)
|
303
307
|
]));
|
304
308
|
}
|
305
|
-
const
|
306
|
-
components: { IconExport:
|
309
|
+
const Pt = /* @__PURE__ */ T(It, [["render", Vt]]), Ft = {
|
310
|
+
components: { IconExport: St, IconChevronDown: Ue, IconSuccess: Pt },
|
307
311
|
props: {
|
308
312
|
table: String,
|
309
313
|
columns: Array,
|
@@ -356,7 +360,7 @@ const Vt = /* @__PURE__ */ A(St, [["render", Dt]]), Pt = {
|
|
356
360
|
return;
|
357
361
|
}
|
358
362
|
try {
|
359
|
-
const e = await
|
363
|
+
const e = await M.get("/api/export", {
|
360
364
|
params: {
|
361
365
|
table: this.table,
|
362
366
|
format: this.format,
|
@@ -367,17 +371,17 @@ const Vt = /* @__PURE__ */ A(St, [["render", Dt]]), Pt = {
|
|
367
371
|
custom: this.filterCustom || null
|
368
372
|
},
|
369
373
|
responseType: "blob"
|
370
|
-
}),
|
374
|
+
}), n = await e.data.text(), o = n != null && n.includes(";") ? null : JSON == null ? void 0 : JSON.parse(n), s = new Blob([e.data], {
|
371
375
|
type: "application/octet-stream"
|
372
|
-
}), a = window.URL.createObjectURL(
|
373
|
-
if (
|
376
|
+
}), a = window.URL.createObjectURL(s), c = document.createElement("a");
|
377
|
+
if (c.href = a, c.setAttribute(
|
374
378
|
"download",
|
375
379
|
`${this.table.split(".")[0]}.${this.format}`
|
376
|
-
), document.body.appendChild(
|
380
|
+
), document.body.appendChild(c), typeof o == "string") {
|
377
381
|
this.exportTable();
|
378
382
|
return;
|
379
383
|
}
|
380
|
-
|
384
|
+
c.click(), document.body.removeChild(c), window.URL.revokeObjectURL(a), this.$notify({
|
381
385
|
type: "success",
|
382
386
|
title: "Експорт",
|
383
387
|
message: "Файл успішно експортовано!"
|
@@ -402,62 +406,62 @@ const Vt = /* @__PURE__ */ A(St, [["render", Dt]]), Pt = {
|
|
402
406
|
},
|
403
407
|
choceVisible() {
|
404
408
|
var t, e;
|
405
|
-
this.cols = (e = (t = this.columns) == null ? void 0 : t.filter((
|
409
|
+
this.cols = (e = (t = this.columns) == null ? void 0 : t.filter((n) => (n == null ? void 0 : n.hidden) !== !0)) == null ? void 0 : e.map((n) => n == null ? void 0 : n.name), this.activeAction = "choceVisible";
|
406
410
|
}
|
407
411
|
}
|
408
|
-
},
|
412
|
+
}, jt = {
|
409
413
|
key: 0,
|
410
414
|
class: "flex flex-col items-center"
|
411
|
-
},
|
415
|
+
}, Lt = {
|
412
416
|
key: 1,
|
413
417
|
class: "p-4"
|
414
|
-
},
|
418
|
+
}, Mt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, zt = { class: "flex items-center gap-[10px] -ml-[10px] my-[10px]" }, qt = ["onClick"], Bt = {
|
415
419
|
key: 0,
|
416
420
|
class: "block h-[8px] w-[8px] rounded-full bg-blue-500"
|
417
|
-
}, Ot = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" },
|
421
|
+
}, Ot = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, Nt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Et = { class: "mt-2 space-y-2" }, Ut = ["id", "onChange"], Wt = ["for"], Rt = {
|
418
422
|
key: 0,
|
419
423
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
420
|
-
},
|
424
|
+
}, Ht = {
|
421
425
|
key: 1,
|
422
426
|
class: "flex w-full justify-end p-[20px] gap-[6px] border-t"
|
423
427
|
};
|
424
|
-
function
|
425
|
-
const
|
428
|
+
function Kt(t, e, n, o, s, a) {
|
429
|
+
const c = h("IconExport"), g = h("IconSuccess"), p = h("VsCheckbox"), b = h("VsDialog");
|
426
430
|
return r(), i($, null, [
|
427
431
|
l("button", {
|
428
|
-
onClick: e[0] || (e[0] = (d) =>
|
432
|
+
onClick: e[0] || (e[0] = (d) => s.isOpen = !0),
|
429
433
|
class: "py-2 max-h-[34px] px-2.5 md:inline-flex hidden 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"
|
430
434
|
}, [
|
431
|
-
|
435
|
+
y(c, {
|
432
436
|
height: "16",
|
433
437
|
width: "16"
|
434
438
|
}),
|
435
|
-
e[7] || (e[7] =
|
439
|
+
e[7] || (e[7] = L(" Експорт "))
|
436
440
|
]),
|
437
|
-
|
438
|
-
visible:
|
439
|
-
"onUpdate:visible": e[6] || (e[6] = (d) =>
|
441
|
+
y(b, {
|
442
|
+
visible: s.isOpen,
|
443
|
+
"onUpdate:visible": e[6] || (e[6] = (d) => s.isOpen = d),
|
440
444
|
title: "Експорт таблиці",
|
441
445
|
size: "small",
|
442
446
|
closeClickBack: !0
|
443
447
|
}, {
|
444
|
-
footer:
|
445
|
-
|
448
|
+
footer: I(() => [
|
449
|
+
s.isSuccessTemplate ? (r(), i("div", Rt, [
|
446
450
|
l("button", {
|
447
451
|
type: "button",
|
448
452
|
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",
|
449
|
-
onClick: e[2] || (e[2] = (d) =>
|
453
|
+
onClick: e[2] || (e[2] = (d) => s.isOpen = !1)
|
450
454
|
}, " Закрити "),
|
451
455
|
l("button", {
|
452
456
|
type: "button",
|
453
457
|
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",
|
454
|
-
onClick: e[3] || (e[3] = (d) =>
|
458
|
+
onClick: e[3] || (e[3] = (d) => s.isSuccessTemplate = !1)
|
455
459
|
}, " Вигрузити ще ")
|
456
|
-
])) : (r(), i("div",
|
460
|
+
])) : (r(), i("div", Ht, [
|
457
461
|
l("button", {
|
458
462
|
type: "button",
|
459
463
|
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",
|
460
|
-
onClick: e[4] || (e[4] = (d) =>
|
464
|
+
onClick: e[4] || (e[4] = (d) => s.isOpen = !1)
|
461
465
|
}, " Скасувати "),
|
462
466
|
l("button", {
|
463
467
|
type: "button",
|
@@ -466,51 +470,51 @@ function Wt(t, e, s, o, n, a) {
|
|
466
470
|
}, " Завантажити таблицю ")
|
467
471
|
]))
|
468
472
|
]),
|
469
|
-
default:
|
470
|
-
|
471
|
-
|
473
|
+
default: I(() => [
|
474
|
+
s.isSuccessTemplate ? (r(), i("div", jt, [
|
475
|
+
y(g, {
|
472
476
|
height: "100",
|
473
477
|
width: "100",
|
474
478
|
class: "text-green-200 mb-[20px]"
|
475
479
|
}),
|
476
480
|
e[8] || (e[8] = l("h2", null, "Звіт сформовано і збережено", -1))
|
477
|
-
])) : (r(), i("div",
|
478
|
-
l("div",
|
481
|
+
])) : (r(), i("div", Lt, [
|
482
|
+
l("div", Mt, [
|
479
483
|
e[9] || (e[9] = l("h2", { class: "text-sm font-[600] text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
480
|
-
l("div",
|
481
|
-
(r(!0), i($, null, V(
|
484
|
+
l("div", zt, [
|
485
|
+
(r(!0), i($, null, V(s.actions, (d) => (r(), i("button", {
|
482
486
|
key: d == null ? void 0 : d.name,
|
483
487
|
onClick: d == null ? void 0 : d.function,
|
484
488
|
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"
|
485
489
|
}, [
|
486
490
|
l("span", {
|
487
|
-
class:
|
491
|
+
class: D(["h-[14px] w-[14px] border rounded-full flex items-center justify-center", { "border-blue-500": (d == null ? void 0 : d.name) === s.activeAction }])
|
488
492
|
}, [
|
489
|
-
(d == null ? void 0 : d.name) ===
|
493
|
+
(d == null ? void 0 : d.name) === s.activeAction ? (r(), i("span", Bt)) : v("", !0)
|
490
494
|
], 2),
|
491
|
-
|
492
|
-
], 8,
|
495
|
+
L(" " + S(d == null ? void 0 : d.label), 1)
|
496
|
+
], 8, qt))), 128))
|
493
497
|
]),
|
494
498
|
l("div", Ot, [
|
495
|
-
(r(!0), i($, null, V(
|
499
|
+
(r(!0), i($, null, V(n.columns, (d, _) => (r(), i("div", {
|
496
500
|
class: "flex items-center",
|
497
501
|
key: _,
|
498
502
|
style: { width: "calc((100% - 10px) / 2)" }
|
499
503
|
}, [
|
500
|
-
|
504
|
+
y(p, {
|
501
505
|
class: "[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",
|
502
|
-
modelValue:
|
503
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
506
|
+
modelValue: s.cols,
|
507
|
+
"onUpdate:modelValue": e[1] || (e[1] = (x) => s.cols = x),
|
504
508
|
value: d == null ? void 0 : d.name,
|
505
509
|
label: d == null ? void 0 : d.ua
|
506
510
|
}, null, 8, ["modelValue", "value", "label"])
|
507
511
|
]))), 128))
|
508
512
|
])
|
509
513
|
]),
|
510
|
-
l("div",
|
514
|
+
l("div", Nt, [
|
511
515
|
e[10] || (e[10] = l("h2", { class: "text-sm font-[600] text-gray-500" }, "Виберіть формат таблиці:", -1)),
|
512
|
-
l("div",
|
513
|
-
(r(!0), i($, null, V(
|
516
|
+
l("div", Et, [
|
517
|
+
(r(!0), i($, null, V(s.tableFormats, (d, _) => (r(), i("div", {
|
514
518
|
class: "flex items-center",
|
515
519
|
key: _
|
516
520
|
}, [
|
@@ -519,12 +523,12 @@ function Wt(t, e, s, o, n, a) {
|
|
519
523
|
name: "hs-pro-duecmfm",
|
520
524
|
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",
|
521
525
|
id: d,
|
522
|
-
onChange: (
|
526
|
+
onChange: (x) => a.selectFormat(d)
|
523
527
|
}, null, 40, Ut),
|
524
528
|
l("label", {
|
525
529
|
for: d,
|
526
530
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
527
|
-
}, " Формат " +
|
531
|
+
}, " Формат " + S(d), 9, Wt)
|
528
532
|
]))), 128))
|
529
533
|
])
|
530
534
|
])
|
@@ -534,7 +538,7 @@ function Wt(t, e, s, o, n, a) {
|
|
534
538
|
}, 8, ["visible"])
|
535
539
|
], 64);
|
536
540
|
}
|
537
|
-
const Jt = /* @__PURE__ */
|
541
|
+
const Jt = /* @__PURE__ */ T(Ft, [["render", Kt]]), Gt = {}, Qt = {
|
538
542
|
xmlns: "http://www.w3.org/2000/svg",
|
539
543
|
viewBox: "0 0 24 24",
|
540
544
|
fill: "none",
|
@@ -544,16 +548,16 @@ const Jt = /* @__PURE__ */ A(Pt, [["render", Wt]]), Gt = {}, Kt = {
|
|
544
548
|
"stroke-linejoin": "round",
|
545
549
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
546
550
|
};
|
547
|
-
function
|
548
|
-
return r(), i("svg",
|
551
|
+
function Xt(t, e, n, o, s, a) {
|
552
|
+
return r(), i("svg", Qt, e[0] || (e[0] = [
|
549
553
|
st('<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)
|
550
554
|
]));
|
551
555
|
}
|
552
|
-
const
|
556
|
+
const Yt = /* @__PURE__ */ T(Gt, [["render", Xt]]), Zt = {
|
553
557
|
props: { column: Object },
|
554
558
|
emits: ["update-column"],
|
555
559
|
components: {
|
556
|
-
IconCheck2:
|
560
|
+
IconCheck2: Le
|
557
561
|
},
|
558
562
|
data() {
|
559
563
|
return {
|
@@ -569,24 +573,24 @@ const Xt = /* @__PURE__ */ A(Gt, [["render", Qt]]), Yt = {
|
|
569
573
|
var t;
|
570
574
|
((t = this.column) == null ? void 0 : t.hidden) !== !0 && (this.value = !0);
|
571
575
|
}
|
572
|
-
},
|
573
|
-
function
|
574
|
-
var
|
575
|
-
const
|
576
|
-
return r(), i("div",
|
577
|
-
l("label",
|
578
|
-
|
579
|
-
|
576
|
+
}, es = { class: "flex justify-between items-center py-1.5 px-3 cursor-pointer rounded-lg hover:bg-gray-100 has-[:disabled]:opacity-50 has-[:disabled]:pointer-events-none dark:hover:bg-neutral-800" }, ts = { class: "flex justify-between flex-1 items-center gap-x-2.5 cursor-pointer text-[13px] text-gray-800 dark:text-neutral-300" };
|
577
|
+
function ss(t, e, n, o, s, a) {
|
578
|
+
var g, p;
|
579
|
+
const c = h("IconCheck2");
|
580
|
+
return r(), i("div", es, [
|
581
|
+
l("label", ts, [
|
582
|
+
L(S(((g = n.column) == null ? void 0 : g.ua) || ((p = n.column) == null ? void 0 : p.title)) + " ", 1),
|
583
|
+
N(l("input", {
|
580
584
|
type: "checkbox",
|
581
|
-
"onUpdate:modelValue": e[0] || (e[0] = (b) =>
|
585
|
+
"onUpdate:modelValue": e[0] || (e[0] = (b) => s.value = b),
|
582
586
|
class: "hidden"
|
583
587
|
}, null, 512), [
|
584
|
-
[nt,
|
588
|
+
[nt, s.value]
|
585
589
|
]),
|
586
590
|
l("span", {
|
587
|
-
class:
|
591
|
+
class: D(["flex items-center justify-center text-white border border-gray-300 rounded shrink-0 size-4 focus:ring-blue-500", [s.value ? "bg-blue-600 border-0" : "bg-white"]])
|
588
592
|
}, [
|
589
|
-
|
593
|
+
y(c, {
|
590
594
|
height: "12",
|
591
595
|
width: "12"
|
592
596
|
})
|
@@ -594,8 +598,8 @@ function ts(t, e, s, o, n, a) {
|
|
594
598
|
])
|
595
599
|
]);
|
596
600
|
}
|
597
|
-
const
|
598
|
-
components: { IconColumns:
|
601
|
+
const ns = /* @__PURE__ */ T(Zt, [["render", ss]]), ls = {
|
602
|
+
components: { IconColumns: Yt, AdminTableColumnsHiddenItem: ns },
|
599
603
|
emits: ["update-columns"],
|
600
604
|
props: { columns: Array },
|
601
605
|
data() {
|
@@ -609,8 +613,8 @@ const ss = /* @__PURE__ */ A(Yt, [["render", ts]]), ns = {
|
|
609
613
|
var t;
|
610
614
|
return (t = this.columns) == null ? void 0 : t.filter(
|
611
615
|
(e) => {
|
612
|
-
var
|
613
|
-
return ((
|
616
|
+
var n, o, s, a, c, g;
|
617
|
+
return ((s = (n = e == null ? void 0 : e.ua) == null ? void 0 : n.toLowerCase()) == null ? void 0 : s.includes((o = this.searchValue) == null ? void 0 : o.toLowerCase())) || ((g = (a = e == null ? void 0 : e.title) == null ? void 0 : a.toLowerCase()) == null ? void 0 : g.includes((c = this.searchValue) == null ? void 0 : c.toLowerCase()));
|
614
618
|
}
|
615
619
|
);
|
616
620
|
}
|
@@ -624,63 +628,63 @@ const ss = /* @__PURE__ */ A(Yt, [["render", ts]]), ns = {
|
|
624
628
|
e && !e.contains(t.target) && (this.visible = !1, document.removeEventListener("click", this.handleClickOutside));
|
625
629
|
},
|
626
630
|
updateColumn(t) {
|
627
|
-
const e = this.columns.findIndex((o) => (o == null ? void 0 : o.name) === (t == null ? void 0 : t.name)),
|
628
|
-
|
631
|
+
const e = this.columns.findIndex((o) => (o == null ? void 0 : o.name) === (t == null ? void 0 : t.name)), n = this.columns;
|
632
|
+
n[e] = t, this.$emit("update-columns", [...n]);
|
629
633
|
}
|
630
634
|
},
|
631
635
|
beforeUnmount() {
|
632
636
|
document.removeEventListener("click", this.handleClickOutside);
|
633
637
|
}
|
634
|
-
},
|
638
|
+
}, as = {
|
635
639
|
class: "relative",
|
636
640
|
ref: "wrapper"
|
637
|
-
},
|
641
|
+
}, rs = {
|
638
642
|
key: 0,
|
639
643
|
class: "absolute left-[50%] top-[110%] translate-x-[-50%] z-10 w-64 transition-[opacity,margin] duration bg-white rounded-xl shadow-lg dark:bg-neutral-900"
|
640
|
-
},
|
644
|
+
}, os = { class: "relative p-1 border-gray-200 border-y dark:border-neutral-800" }, is = { class: "p-1 pt-3 max-h-80 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-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" }, ds = {
|
641
645
|
key: 0,
|
642
646
|
class: "block px-3 mb-2 text-xs text-gray-500 dark:text-neutral-500"
|
643
|
-
},
|
647
|
+
}, us = { class: "space-y-1" }, cs = {
|
644
648
|
key: 1,
|
645
649
|
class: "flex items-center px-3 text-[13px] py-1.5 px-3 rounded-md cursor-pointer group"
|
646
650
|
};
|
647
|
-
function
|
648
|
-
const
|
649
|
-
return r(), i("div",
|
651
|
+
function ps(t, e, n, o, s, a) {
|
652
|
+
const c = h("IconColumns"), g = h("AdminTableColumnsHiddenItem");
|
653
|
+
return r(), i("div", as, [
|
650
654
|
l("button", {
|
651
|
-
onClick: e[0] || (e[0] = (...
|
655
|
+
onClick: e[0] || (e[0] = (...p) => a.toggleVisible && a.toggleVisible(...p)),
|
652
656
|
class: "py-2 max-h-[34px] px-2.5 md:inline-flex hidden 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"
|
653
657
|
}, [
|
654
|
-
|
658
|
+
y(c, {
|
655
659
|
height: "20",
|
656
660
|
width: "16"
|
657
661
|
})
|
658
662
|
]),
|
659
|
-
|
660
|
-
default:
|
661
|
-
var
|
663
|
+
y(R, { name: "fade" }, {
|
664
|
+
default: I(() => {
|
665
|
+
var p, b;
|
662
666
|
return [
|
663
|
-
|
667
|
+
s.visible ? (r(), i("div", rs, [
|
664
668
|
e[2] || (e[2] = l("div", { class: "flex items-center justify-between h-[48px] px-4 py-2 gap-x-2 text-sm font-medium text-gray-800" }, " Колонки ", -1)),
|
665
|
-
l("div",
|
666
|
-
|
667
|
-
"onUpdate:modelValue": e[1] || (e[1] = (d) =>
|
669
|
+
l("div", os, [
|
670
|
+
N(l("input", {
|
671
|
+
"onUpdate:modelValue": e[1] || (e[1] = (d) => s.searchValue = d),
|
668
672
|
type: "text",
|
669
673
|
class: "py-1.5 px-3 block w-full border-transparent rounded-lg sm:text-sm text-base placeholder:text-gray-500 hover:bg-gray-100 focus:outline-none focus:border-transparent focus:ring-0 focus:bg-gray-100 disabled:opacity-100 disabled:pointer-events-none dark:bg-transparent dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:ring-neutral-600 dark:focus:bg-neutral-800",
|
670
674
|
placeholder: "Пошук",
|
671
675
|
autofocus: ""
|
672
676
|
}, null, 512), [
|
673
|
-
[lt,
|
677
|
+
[lt, s.searchValue]
|
674
678
|
])
|
675
679
|
]),
|
676
|
-
l("div",
|
677
|
-
(
|
678
|
-
l("div",
|
679
|
-
(b = a.filteredColumn) != null && b.length ? (r(!0), i($, { key: 0 }, V(a.filteredColumn, (d, _) => (r(), k(
|
680
|
+
l("div", is, [
|
681
|
+
(p = a.filteredColumn) != null && p.length ? (r(), i("span", ds, " Оберіть колонки для відображення ")) : v("", !0),
|
682
|
+
l("div", us, [
|
683
|
+
(b = a.filteredColumn) != null && b.length ? (r(!0), i($, { key: 0 }, V(a.filteredColumn, (d, _) => (r(), k(g, {
|
680
684
|
key: _,
|
681
685
|
column: d,
|
682
686
|
onUpdateColumn: a.updateColumn
|
683
|
-
}, null, 8, ["column", "onUpdateColumn"]))), 128)) : (r(), i("div",
|
687
|
+
}, null, 8, ["column", "onUpdateColumn"]))), 128)) : (r(), i("div", cs, " Нічого не знайдено "))
|
684
688
|
])
|
685
689
|
])
|
686
690
|
])) : v("", !0)
|
@@ -690,7 +694,7 @@ function cs(t, e, s, o, n, a) {
|
|
690
694
|
})
|
691
695
|
], 512);
|
692
696
|
}
|
693
|
-
const
|
697
|
+
const hs = /* @__PURE__ */ T(ls, [["render", ps]]), bs = {}, fs = {
|
694
698
|
xmlns: "http://www.w3.org/2000/svg",
|
695
699
|
viewBox: "0 0 24 24",
|
696
700
|
fill: "none",
|
@@ -700,8 +704,8 @@ const ps = /* @__PURE__ */ A(ns, [["render", cs]]), hs = {}, bs = {
|
|
700
704
|
"stroke-linejoin": "round",
|
701
705
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-minus"
|
702
706
|
};
|
703
|
-
function
|
704
|
-
return r(), i("svg",
|
707
|
+
function gs(t, e, n, o, s, a) {
|
708
|
+
return r(), i("svg", fs, e[0] || (e[0] = [
|
705
709
|
l("path", {
|
706
710
|
stroke: "none",
|
707
711
|
d: "M0 0h24v24H0z",
|
@@ -710,8 +714,8 @@ function fs(t, e, s, o, n, a) {
|
|
710
714
|
l("path", { d: "M5 12l14 0" }, null, -1)
|
711
715
|
]));
|
712
716
|
}
|
713
|
-
const
|
714
|
-
components: { IconPlus:
|
717
|
+
const ms = /* @__PURE__ */ T(bs, [["render", gs]]), xs = {
|
718
|
+
components: { IconPlus: J, IconMinus: ms },
|
715
719
|
props: {
|
716
720
|
title: String,
|
717
721
|
defaultValue: { type: Boolean, default: () => !1 }
|
@@ -719,35 +723,35 @@ const gs = /* @__PURE__ */ A(hs, [["render", fs]]), ms = {
|
|
719
723
|
data() {
|
720
724
|
return { expanded: this.defaultValue };
|
721
725
|
}
|
722
|
-
},
|
723
|
-
function
|
724
|
-
const
|
726
|
+
}, ys = { class: "hs-accordion" }, ks = { class: "py-0.5 flex items-center gap-x-0.5 w-full" }, vs = { class: "text-sm font-medium" }, _s = { class: "relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b" };
|
727
|
+
function Cs(t, e, n, o, s, a) {
|
728
|
+
const c = h("IconPlus"), g = h("IconMinus");
|
725
729
|
return r(), i("div", null, [
|
726
730
|
l("div", null, [
|
727
|
-
l("div",
|
728
|
-
l("div",
|
731
|
+
l("div", ys, [
|
732
|
+
l("div", ks, [
|
729
733
|
l("div", {
|
730
|
-
onClick: e[0] || (e[0] = (
|
734
|
+
onClick: e[0] || (e[0] = (p) => s.expanded = !s.expanded),
|
731
735
|
class: "rounded-md cursor-pointer grow"
|
732
736
|
}, [
|
733
|
-
l("span",
|
737
|
+
l("span", vs, S(n.title), 1)
|
734
738
|
]),
|
735
739
|
l("button", {
|
736
740
|
class: "flex items-center justify-center rounded-md size-6 hover:bg-gray-100",
|
737
|
-
onClick: e[1] || (e[1] = (
|
741
|
+
onClick: e[1] || (e[1] = (p) => s.expanded = !s.expanded)
|
738
742
|
}, [
|
739
|
-
|
743
|
+
s.expanded ? (r(), k(g, {
|
740
744
|
key: 1,
|
741
745
|
width: "14"
|
742
|
-
})) : (r(), k(
|
746
|
+
})) : (r(), k(c, { key: 0 }))
|
743
747
|
])
|
744
748
|
]),
|
745
|
-
|
746
|
-
default:
|
747
|
-
|
749
|
+
y(R, { name: "fade" }, {
|
750
|
+
default: I(() => [
|
751
|
+
N(l("div", _s, [
|
748
752
|
at(t.$slots, "default", {}, void 0, !0)
|
749
753
|
], 512), [
|
750
|
-
[
|
754
|
+
[Q, s.expanded]
|
751
755
|
])
|
752
756
|
]),
|
753
757
|
_: 3
|
@@ -756,48 +760,48 @@ function _s(t, e, s, o, n, a) {
|
|
756
760
|
])
|
757
761
|
]);
|
758
762
|
}
|
759
|
-
const
|
763
|
+
const ws = /* @__PURE__ */ T(xs, [["render", Cs], ["__scopeId", "data-v-c6318482"]]), $s = {
|
760
764
|
components: {
|
761
|
-
AdminComponentIs:
|
762
|
-
AdminTree:
|
763
|
-
VsNoData:
|
765
|
+
AdminComponentIs: G,
|
766
|
+
AdminTree: ws,
|
767
|
+
VsNoData: We,
|
764
768
|
VsWidgetComments: Re,
|
765
|
-
VsWidgetMap:
|
766
|
-
VsWidgetFileList:
|
769
|
+
VsWidgetMap: He,
|
770
|
+
VsWidgetFileList: Ke
|
767
771
|
},
|
768
772
|
props: { table: String, columns: Array, row: Object }
|
769
|
-
},
|
773
|
+
}, Ts = {
|
770
774
|
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",
|
771
775
|
style: { height: "calc(100vh - 310px)" }
|
772
776
|
}, As = {
|
773
777
|
class: "border-l",
|
774
778
|
style: { height: "calc(100vh - 360px)" }
|
775
|
-
},
|
776
|
-
function
|
777
|
-
var
|
778
|
-
const
|
779
|
-
return r(), i("div",
|
779
|
+
}, Ss = { class: "flow-root mt-[10px]" }, Is = { class: "-my-3 text-sm divide-y divide-gray-100" }, Ds = { class: "flex py-3 sm:grid-cols-3 sm:gap-4" }, Vs = { class: "font-medium text-black w-[50%]" }, Ps = { class: "text-gray-700 sm:col-span-2 w-[50%]" }, Fs = { class: "table-info-card" }, js = { class: "table-info-card" };
|
780
|
+
function Ls(t, e, n, o, s, a) {
|
781
|
+
var x, f, C;
|
782
|
+
const c = h("AdminComponentIs"), g = h("AdminTree"), p = h("VsWidgetMap"), b = h("VsNoData"), d = h("VsWidgetComments"), _ = h("VsWidgetFileList");
|
783
|
+
return r(), i("div", Ts, [
|
780
784
|
e[0] || (e[0] = l("div", { class: "p-[10px] pl-[18px] pb-[18px] border-b" }, [
|
781
785
|
l("h2", { class: "text-sm font-medium" }, "Інформація про об'єкт")
|
782
786
|
], -1)),
|
783
787
|
l("div", As, [
|
784
|
-
(
|
785
|
-
|
788
|
+
(f = (x = t.$route) == null ? void 0 : x.query) != null && f.card ? (r(), i($, { key: 0 }, [
|
789
|
+
n.row ? (r(), k(g, {
|
786
790
|
key: 0,
|
787
791
|
defaultValue: !0,
|
788
792
|
title: "Основна інформація",
|
789
793
|
class: "border-b p-[10px] py-[16px]"
|
790
794
|
}, {
|
791
|
-
default:
|
792
|
-
l("div",
|
793
|
-
l("dl",
|
794
|
-
(r(!0), i($, null, V(
|
795
|
-
l("dt",
|
796
|
-
l("dd",
|
797
|
-
|
798
|
-
row:
|
799
|
-
column:
|
800
|
-
table:
|
795
|
+
default: I(() => [
|
796
|
+
l("div", Ss, [
|
797
|
+
l("dl", Is, [
|
798
|
+
(r(!0), i($, null, V(n.columns, (m) => (r(), i("div", Ds, [
|
799
|
+
l("dt", Vs, S((m == null ? void 0 : m.ua) || (m == null ? void 0 : m.title)), 1),
|
800
|
+
l("dd", Ps, [
|
801
|
+
y(c, {
|
802
|
+
row: n.row,
|
803
|
+
column: m,
|
804
|
+
table: n.table
|
801
805
|
}, null, 8, ["row", "column", "table"])
|
802
806
|
])
|
803
807
|
]))), 256))
|
@@ -806,17 +810,17 @@ function js(t, e, s, o, n, a) {
|
|
806
810
|
]),
|
807
811
|
_: 1
|
808
812
|
})) : v("", !0),
|
809
|
-
(C =
|
813
|
+
(C = n.row) != null && C.geom ? (r(), k(g, {
|
810
814
|
key: 1,
|
811
815
|
title: "Карта",
|
812
816
|
class: "border-b p-[10px] py-[16px]"
|
813
817
|
}, {
|
814
|
-
default:
|
815
|
-
var
|
818
|
+
default: I(() => {
|
819
|
+
var m, w;
|
816
820
|
return [
|
817
|
-
(
|
821
|
+
(m = n.row) != null && m.geom ? (r(), k(p, {
|
818
822
|
key: 0,
|
819
|
-
geometry: (w =
|
823
|
+
geometry: (w = n.row) == null ? void 0 : w.geom,
|
820
824
|
zoom: 14
|
821
825
|
}, null, 8, ["geometry"])) : (r(), k(b, {
|
822
826
|
key: 1,
|
@@ -828,33 +832,33 @@ function js(t, e, s, o, n, a) {
|
|
828
832
|
}),
|
829
833
|
_: 1
|
830
834
|
})) : v("", !0),
|
831
|
-
|
835
|
+
y(g, {
|
832
836
|
title: "Коментарі",
|
833
837
|
class: "border-b p-[10px] py-[16px]"
|
834
838
|
}, {
|
835
|
-
default:
|
836
|
-
var
|
839
|
+
default: I(() => {
|
840
|
+
var m;
|
837
841
|
return [
|
838
|
-
l("div",
|
839
|
-
|
840
|
-
id: (
|
842
|
+
l("div", Fs, [
|
843
|
+
y(d, {
|
844
|
+
id: (m = n.row) == null ? void 0 : m.id
|
841
845
|
}, null, 8, ["id"])
|
842
846
|
])
|
843
847
|
];
|
844
848
|
}),
|
845
849
|
_: 1
|
846
850
|
}),
|
847
|
-
|
851
|
+
y(g, {
|
848
852
|
title: "Файли",
|
849
853
|
class: "border-b p-[10px] py-[16px]"
|
850
854
|
}, {
|
851
|
-
default:
|
852
|
-
var
|
855
|
+
default: I(() => {
|
856
|
+
var m, w;
|
853
857
|
return [
|
854
|
-
l("div",
|
858
|
+
l("div", js, [
|
855
859
|
(r(), k(_, {
|
856
|
-
key: (
|
857
|
-
id: (w =
|
860
|
+
key: (m = n.row) == null ? void 0 : m.id,
|
861
|
+
id: (w = n.row) == null ? void 0 : w.id
|
858
862
|
}, null, 8, ["id"]))
|
859
863
|
])
|
860
864
|
];
|
@@ -868,14 +872,14 @@ function js(t, e, s, o, n, a) {
|
|
868
872
|
])
|
869
873
|
]);
|
870
874
|
}
|
871
|
-
const
|
875
|
+
const Ms = /* @__PURE__ */ T($s, [["render", Ls]]), zs = {
|
872
876
|
emits: ["filterChange"],
|
873
877
|
props: {
|
874
878
|
scheme: { type: Object },
|
875
879
|
onFilters: { type: Number },
|
876
880
|
table: { type: String }
|
877
881
|
},
|
878
|
-
components: { IconFilter:
|
882
|
+
components: { IconFilter: Je },
|
879
883
|
data() {
|
880
884
|
return {
|
881
885
|
isFilters: !1
|
@@ -886,53 +890,53 @@ const Ls = /* @__PURE__ */ A(ws, [["render", js]]), Ms = {
|
|
886
890
|
this.isFilters && t.classList.contains("filter-container") && (this.isFilters = !1);
|
887
891
|
}
|
888
892
|
}
|
889
|
-
},
|
893
|
+
}, qs = {
|
890
894
|
key: 0,
|
891
895
|
class: "px-[7px] text-[10px] py-[1px] font-[700] text-white bg-blue-500 rounded-full"
|
892
|
-
},
|
893
|
-
function Os(t, e,
|
894
|
-
const
|
896
|
+
}, Bs = { class: "filter-content h-screen bg-white w-[400px] overflow-x-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" };
|
897
|
+
function Os(t, e, n, o, s, a) {
|
898
|
+
const c = h("IconFilter"), g = h("VsFilter");
|
895
899
|
return r(), i($, null, [
|
896
900
|
l("button", {
|
897
|
-
onClick: e[0] || (e[0] = (
|
901
|
+
onClick: e[0] || (e[0] = (p) => s.isFilters = !s.isFilters),
|
898
902
|
class: "py-2 px-2.5 max-h-[34px] 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"
|
899
903
|
}, [
|
900
|
-
|
904
|
+
y(c, {
|
901
905
|
height: "16",
|
902
906
|
width: "16"
|
903
907
|
}),
|
904
|
-
e[4] || (e[4] =
|
905
|
-
|
908
|
+
e[4] || (e[4] = L(" Фільтри ")),
|
909
|
+
n.onFilters ? (r(), i("span", qs, S(n.onFilters), 1)) : v("", !0)
|
906
910
|
]),
|
907
|
-
|
908
|
-
default:
|
909
|
-
var
|
911
|
+
y(R, { name: "fade" }, {
|
912
|
+
default: I(() => {
|
913
|
+
var p;
|
910
914
|
return [
|
911
915
|
(r(), k(rt, { to: "#modal" }, [
|
912
|
-
|
916
|
+
N(l("div", {
|
913
917
|
onClick: e[3] || (e[3] = (...b) => a.closeFilter && a.closeFilter(...b)),
|
914
918
|
style: { height: "100vh" },
|
915
919
|
class: "fixed filter-container top-0 flex justify-end items-center z-[12] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.2)]"
|
916
920
|
}, [
|
917
|
-
l("div",
|
918
|
-
(
|
921
|
+
l("div", Bs, [
|
922
|
+
(p = n.scheme) != null && p.length ? (r(), k(g, {
|
919
923
|
key: 0,
|
920
924
|
ref: "filter",
|
921
|
-
scheme:
|
925
|
+
scheme: n.scheme,
|
922
926
|
layout: "default",
|
923
927
|
"apply-vue-router": "",
|
924
928
|
history: "",
|
925
|
-
token:
|
929
|
+
token: n.table,
|
926
930
|
name: "filter",
|
927
931
|
footer: !0,
|
928
932
|
background: !0,
|
929
933
|
onFilterChange: e[1] || (e[1] = (b) => t.$emit("filterChange", b)),
|
930
934
|
closeFilterBtn: !0,
|
931
|
-
onFilterClose: e[2] || (e[2] = (b) =>
|
935
|
+
onFilterClose: e[2] || (e[2] = (b) => s.isFilters = !1)
|
932
936
|
}, null, 8, ["scheme", "token"])) : v("", !0)
|
933
937
|
])
|
934
938
|
], 512), [
|
935
|
-
[
|
939
|
+
[Q, s.isFilters]
|
936
940
|
])
|
937
941
|
]))
|
938
942
|
];
|
@@ -941,25 +945,25 @@ function Os(t, e, s, o, n, a) {
|
|
941
945
|
})
|
942
946
|
], 64);
|
943
947
|
}
|
944
|
-
const
|
948
|
+
const Ns = /* @__PURE__ */ T(zs, [["render", Os]]), Es = {
|
945
949
|
props: { tabsList: { type: Array, default: () => [] }, filterState: String }
|
946
950
|
}, Us = {
|
947
951
|
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",
|
948
952
|
"aria-label": "Tabs",
|
949
953
|
role: "tablist",
|
950
954
|
"aria-orientation": "horizontal"
|
951
|
-
},
|
952
|
-
function
|
955
|
+
}, Ws = ["onClick"];
|
956
|
+
function Rs(t, e, n, o, s, a) {
|
953
957
|
return r(), i("nav", Us, [
|
954
|
-
(r(!0), i($, null, V(
|
955
|
-
onClick: (
|
956
|
-
class:
|
957
|
-
" font-semibold after:absolute after:bottom-[-8px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800": (
|
958
|
+
(r(!0), i($, null, V(n.tabsList, (c) => (r(), i("button", {
|
959
|
+
onClick: (g) => t.$emit("update:filterState", c == null ? void 0 : c.name),
|
960
|
+
class: D(["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", {
|
961
|
+
" 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": (c == null ? void 0 : c.name) === n.filterState
|
958
962
|
}])
|
959
|
-
},
|
963
|
+
}, S(c == null ? void 0 : c.label), 11, Ws))), 256))
|
960
964
|
]);
|
961
965
|
}
|
962
|
-
const
|
966
|
+
const Hs = /* @__PURE__ */ T(Es, [["render", Rs]]), Ks = {}, Js = {
|
963
967
|
xmlns: "http://www.w3.org/2000/svg",
|
964
968
|
viewBox: "0 0 24 24",
|
965
969
|
fill: "none",
|
@@ -969,7 +973,7 @@ const Rs = /* @__PURE__ */ A(Ns, [["render", Hs]]), Ws = {}, Js = {
|
|
969
973
|
"stroke-linejoin": "round",
|
970
974
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-filter"
|
971
975
|
};
|
972
|
-
function Gs(t, e,
|
976
|
+
function Gs(t, e, n, o, s, a) {
|
973
977
|
return r(), i("svg", Js, e[0] || (e[0] = [
|
974
978
|
l("path", {
|
975
979
|
stroke: "none",
|
@@ -979,40 +983,40 @@ function Gs(t, e, s, o, n, a) {
|
|
979
983
|
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)
|
980
984
|
]));
|
981
985
|
}
|
982
|
-
const
|
983
|
-
components: { IconFilter2:
|
986
|
+
const Qs = /* @__PURE__ */ T(Ks, [["render", Gs]]), Xs = {
|
987
|
+
components: { IconFilter2: Qs, IconCheck2: Le },
|
984
988
|
props: { filterCustom: String, customList: Array }
|
985
|
-
},
|
986
|
-
function
|
987
|
-
const
|
988
|
-
return r(), k(
|
989
|
+
}, Ys = { class: "py-2 max-h-[34px] 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" }, Zs = { class: "flex flex-col p-[2px] gap-[2px] w-[170px]" }, en = ["onClick"], tn = { class: "text-sm text-gray-800" };
|
990
|
+
function sn(t, e, n, o, s, a) {
|
991
|
+
const c = h("IconFilter2"), g = h("IconCheck2"), p = h("VsPopover");
|
992
|
+
return r(), k(p, {
|
989
993
|
ref: "popover",
|
990
994
|
placement: "bottom"
|
991
995
|
}, {
|
992
|
-
reference:
|
993
|
-
l("button",
|
994
|
-
|
996
|
+
reference: I(() => [
|
997
|
+
l("button", Ys, [
|
998
|
+
y(c, {
|
995
999
|
height: "20",
|
996
1000
|
width: "20"
|
997
1001
|
})
|
998
1002
|
])
|
999
1003
|
]),
|
1000
|
-
default:
|
1001
|
-
l("div",
|
1002
|
-
(r(!0), i($, null, V(
|
1004
|
+
default: I(() => [
|
1005
|
+
l("div", Zs, [
|
1006
|
+
(r(!0), i($, null, V(n.customList, (b, d) => (r(), i("button", {
|
1003
1007
|
onClick: (_) => {
|
1004
|
-
var
|
1005
|
-
t.$emit("update:filterCustom", b == null ? void 0 : b.name), (
|
1008
|
+
var x;
|
1009
|
+
t.$emit("update:filterCustom", b == null ? void 0 : b.name), (x = t.$refs) == null || x.popover.togglePopover();
|
1006
1010
|
},
|
1007
1011
|
key: d,
|
1008
|
-
class:
|
1012
|
+
class: D(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100", { "bg-gray-100": n.filterCustom === (b == null ? void 0 : b.name) }])
|
1009
1013
|
}, [
|
1010
|
-
l("span",
|
1011
|
-
|
1014
|
+
l("span", tn, S(b == null ? void 0 : b.label), 1),
|
1015
|
+
n.filterCustom === (b == null ? void 0 : b.name) ? (r(), k(g, {
|
1012
1016
|
key: 0,
|
1013
1017
|
class: "ml-auto size-3 shrink-0"
|
1014
1018
|
})) : v("", !0)
|
1015
|
-
], 10,
|
1019
|
+
], 10, en))), 128)),
|
1016
1020
|
l("button", {
|
1017
1021
|
class: "flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",
|
1018
1022
|
onClick: e[0] || (e[0] = (b) => {
|
@@ -1025,67 +1029,67 @@ function tn(t, e, s, o, n, a) {
|
|
1025
1029
|
_: 1
|
1026
1030
|
}, 512);
|
1027
1031
|
}
|
1028
|
-
const
|
1032
|
+
const nn = /* @__PURE__ */ T(Xs, [["render", sn]]), ln = { class: "flex items-center gap-x-2" }, an = {
|
1029
1033
|
__name: "admin-table-custom-buttons",
|
1030
1034
|
props: {
|
1031
1035
|
slots: Object,
|
1032
1036
|
data: Object
|
1033
1037
|
},
|
1034
1038
|
setup(t) {
|
1035
|
-
var
|
1036
|
-
const { asyncTemplateSlot: e } = (_ = (d = (b = (
|
1037
|
-
var
|
1038
|
-
if ((
|
1039
|
-
const
|
1039
|
+
var g, p, b, d, _;
|
1040
|
+
const { asyncTemplateSlot: e } = (_ = (d = (b = (p = (g = Me()) == null ? void 0 : g.appContext) == null ? void 0 : p.app) == null ? void 0 : b.config) == null ? void 0 : d.globalProperties) == null ? void 0 : _.utils, n = H(""), o = H(""), s = t, a = () => {
|
1041
|
+
var x, f, C, m, w;
|
1042
|
+
if ((x = s.slots) != null && x.panelLeft || (o.value = "div"), (C = (f = s.slots) == null ? void 0 : f.panelLeft) != null && C.includes("<")) {
|
1043
|
+
const A = e("PanelLeft", (m = s.slots) == null ? void 0 : m.panelLeft, [
|
1040
1044
|
"name"
|
1041
1045
|
]);
|
1042
|
-
o.value =
|
1046
|
+
o.value = A;
|
1043
1047
|
} else
|
1044
|
-
o.value = (w =
|
1045
|
-
},
|
1046
|
-
var
|
1047
|
-
if ((
|
1048
|
-
const
|
1048
|
+
o.value = (w = s.slots) == null ? void 0 : w.panelLeft;
|
1049
|
+
}, c = () => {
|
1050
|
+
var x, f, C, m, w;
|
1051
|
+
if ((x = s.slots) != null && x.panelRight || (n.value = "div"), (C = (f = s.slots) == null ? void 0 : f.panelRight) != null && C.includes("<")) {
|
1052
|
+
const A = e("PanelRight", (m = s.slots) == null ? void 0 : m.panelRight, [
|
1049
1053
|
"name"
|
1050
1054
|
]);
|
1051
|
-
|
1055
|
+
n.value = A;
|
1052
1056
|
} else
|
1053
|
-
|
1057
|
+
n.value = (w = s.slots) == null ? void 0 : w.panelRight;
|
1054
1058
|
};
|
1055
|
-
return a(),
|
1056
|
-
(r(), k(
|
1057
|
-
(r(), k(
|
1059
|
+
return a(), c(), (x, f) => (r(), i("div", ln, [
|
1060
|
+
(r(), k(K(o.value), { data: t.data }, null, 8, ["data"])),
|
1061
|
+
(r(), k(K(n.value), { data: t.data }, null, 8, ["data"]))
|
1058
1062
|
]));
|
1059
1063
|
}
|
1060
|
-
},
|
1064
|
+
}, rn = {
|
1061
1065
|
__name: "admin-custom-button-add",
|
1062
1066
|
props: {
|
1063
1067
|
slots: Object
|
1064
1068
|
},
|
1065
1069
|
setup(t) {
|
1066
|
-
var a,
|
1067
|
-
const { asyncTemplateSlot: e } = (b = (
|
1070
|
+
var a, c, g, p, b;
|
1071
|
+
const { asyncTemplateSlot: e } = (b = (p = (g = (c = (a = Me()) == null ? void 0 : a.appContext) == null ? void 0 : c.app) == null ? void 0 : g.config) == null ? void 0 : p.globalProperties) == null ? void 0 : b.utils, n = H(""), o = t;
|
1068
1072
|
return (() => {
|
1069
|
-
var d, _,
|
1070
|
-
if ((d = o.slots) != null && d.addButton || (
|
1071
|
-
const
|
1073
|
+
var d, _, x, f, C;
|
1074
|
+
if ((d = o.slots) != null && d.addButton || (n.value = "div"), (x = (_ = o.slots) == null ? void 0 : _.addButton) != null && x.includes("<")) {
|
1075
|
+
const m = e("addButton", (f = o.slots) == null ? void 0 : f.addButton, [
|
1072
1076
|
"IconPlus"
|
1073
1077
|
]);
|
1074
|
-
|
1078
|
+
n.value = m;
|
1075
1079
|
} else
|
1076
|
-
|
1077
|
-
})(), (d, _) =>
|
1080
|
+
n.value = (C = o.slots) == null ? void 0 : C.addButton;
|
1081
|
+
})(), (d, _) => n.value ? (r(), k(K(n.value), {
|
1078
1082
|
key: 0,
|
1079
|
-
IconPlus:
|
1083
|
+
IconPlus: J
|
1080
1084
|
})) : v("", !0);
|
1081
1085
|
}
|
1082
|
-
},
|
1086
|
+
}, on = {
|
1083
1087
|
key: 0,
|
1084
1088
|
class: "px-1 py-3 text-gray-800 font-[500]"
|
1085
|
-
},
|
1089
|
+
}, dn = {
|
1086
1090
|
key: 1,
|
1087
1091
|
class: "px-1 py-3 text-gray-800 font-[700]"
|
1088
|
-
},
|
1092
|
+
}, un = {
|
1089
1093
|
__name: "admin-table-totals-list",
|
1090
1094
|
props: {
|
1091
1095
|
columns: { type: Array, default: () => [] },
|
@@ -1093,23 +1097,23 @@ const sn = /* @__PURE__ */ A(Qs, [["render", tn]]), nn = { class: "flex items-ce
|
|
1093
1097
|
} }
|
1094
1098
|
},
|
1095
1099
|
setup(t) {
|
1096
|
-
return (e,
|
1100
|
+
return (e, n) => (r(), i("tr", null, [
|
1097
1101
|
(r(!0), i($, null, V(t.columns, (o) => {
|
1098
|
-
var
|
1102
|
+
var s;
|
1099
1103
|
return r(), i($, {
|
1100
1104
|
key: o == null ? void 0 : o.name
|
1101
1105
|
}, [
|
1102
|
-
(
|
1103
|
-
|
1106
|
+
(s = t.agg) != null && s[o == null ? void 0 : o.name] ? (r(), i("td", on, [
|
1107
|
+
y(G, {
|
1104
1108
|
column: o,
|
1105
1109
|
row: t.agg
|
1106
1110
|
}, null, 8, ["column", "row"])
|
1107
|
-
])) : (r(), i("td",
|
1111
|
+
])) : (r(), i("td", dn))
|
1108
1112
|
], 64);
|
1109
1113
|
}), 128))
|
1110
1114
|
]));
|
1111
1115
|
}
|
1112
|
-
},
|
1116
|
+
}, cn = {}, pn = {
|
1113
1117
|
xmlns: "http://www.w3.org/2000/svg",
|
1114
1118
|
viewBox: "0 0 24 24",
|
1115
1119
|
fill: "none",
|
@@ -1119,8 +1123,8 @@ const sn = /* @__PURE__ */ A(Qs, [["render", tn]]), nn = { class: "flex items-ce
|
|
1119
1123
|
"stroke-linejoin": "round",
|
1120
1124
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
1121
1125
|
};
|
1122
|
-
function
|
1123
|
-
return r(), i("svg",
|
1126
|
+
function hn(t, e, n, o, s, a) {
|
1127
|
+
return r(), i("svg", pn, e[0] || (e[0] = [
|
1124
1128
|
l("path", {
|
1125
1129
|
stroke: "none",
|
1126
1130
|
d: "M0 0h24v24H0z",
|
@@ -1129,8 +1133,8 @@ function pn(t, e, s, o, n, a) {
|
|
1129
1133
|
l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
1130
1134
|
]));
|
1131
1135
|
}
|
1132
|
-
const
|
1133
|
-
components: { IconChevronDown:
|
1136
|
+
const bn = /* @__PURE__ */ T(cn, [["render", hn]]), fn = ot({
|
1137
|
+
components: { IconChevronDown: Ge, IconCheck: bn },
|
1134
1138
|
props: {
|
1135
1139
|
total: { type: Number, default: () => 0 },
|
1136
1140
|
pageSize: { type: Number, default: () => 20 },
|
@@ -1196,10 +1200,10 @@ const hn = /* @__PURE__ */ A(un, [["render", pn]]), bn = ot({
|
|
1196
1200
|
},
|
1197
1201
|
updatePages(t) {
|
1198
1202
|
const e = Math.floor(this.maxPages / 2);
|
1199
|
-
let
|
1200
|
-
o > this.pagesCount && (o = this.pagesCount,
|
1201
|
-
{ length: o -
|
1202
|
-
(
|
1203
|
+
let n = Math.max(t - e, 1), o = n + this.maxPages - 1;
|
1204
|
+
o > this.pagesCount && (o = this.pagesCount, n = Math.max(o - this.maxPages + 1, 1)), this.pages = Array.from(
|
1205
|
+
{ length: o - n + 1 },
|
1206
|
+
(s, a) => n + a
|
1203
1207
|
);
|
1204
1208
|
},
|
1205
1209
|
handleClickPrev() {
|
@@ -1210,74 +1214,78 @@ const hn = /* @__PURE__ */ A(un, [["render", pn]]), bn = ot({
|
|
1210
1214
|
},
|
1211
1215
|
setCurrentPage(t) {
|
1212
1216
|
this.page = t, this.$emit("pageChange", this.page, this.pageSizeLocal), this.updatePages(t);
|
1217
|
+
},
|
1218
|
+
keydownEnter(t) {
|
1219
|
+
t.preventDefault(), t.target.blur();
|
1213
1220
|
}
|
1214
1221
|
}
|
1215
|
-
}),
|
1222
|
+
}), gn = { class: "flex items-center w-full" }, mn = { class: "flex items-center mx-[8px]" }, xn = { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, yn = {
|
1216
1223
|
key: 0,
|
1217
1224
|
class: "flex items-center justify-center ml-3 gap-x-5"
|
1218
|
-
},
|
1219
|
-
function
|
1220
|
-
const
|
1221
|
-
return r(), i("nav",
|
1225
|
+
}, kn = { class: "relative" }, vn = { class: "z-50 bg-white shadow-md rounded-lg p-1 space-y-0.5 dark:bg-neutral-800 dark:border dark:border-neutral-700 dark:divide-neutral-700 absolute bottom-[100%]" }, _n = ["onClick"];
|
1226
|
+
function Cn(t, e, n, o, s, a) {
|
1227
|
+
const c = h("IconChevronDown"), g = h("IconCheck");
|
1228
|
+
return r(), i("nav", gn, [
|
1222
1229
|
l("button", {
|
1223
1230
|
type: "button",
|
1224
|
-
onClick: e[0] || (e[0] = (...
|
1225
|
-
class:
|
1231
|
+
onClick: e[0] || (e[0] = (...p) => t.handleClickPrev && t.handleClickPrev(...p)),
|
1232
|
+
class: D(["min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100", { "opacity-50 pointer-events-none": t.disablePrevClick }])
|
1226
1233
|
}, [
|
1227
|
-
|
1234
|
+
y(c, {
|
1228
1235
|
height: "16",
|
1229
1236
|
width: "16",
|
1230
1237
|
class: "rotate-90"
|
1231
1238
|
})
|
1232
1239
|
], 2),
|
1233
|
-
l("div",
|
1240
|
+
l("div", mn, [
|
1234
1241
|
l("span", {
|
1235
1242
|
ref: "currentPage",
|
1236
1243
|
contenteditable: "true",
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
l("span",
|
1244
|
+
onKeydown: e[1] || (e[1] = it((...p) => t.keydownEnter && t.keydownEnter(...p), ["enter"])),
|
1245
|
+
onBlur: e[2] || (e[2] = (p) => t.handleSetPage(p.target.innerText)),
|
1246
|
+
class: "min-h-[38px] max-h-[38px] overflow-hidden min-w-[38px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 outline-blue-600 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:text-white"
|
1247
|
+
}, S(t.page), 545),
|
1248
|
+
e[5] || (e[5] = l("span", { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, "з", -1)),
|
1249
|
+
l("span", xn, S(t.pagesCount), 1)
|
1242
1250
|
]),
|
1243
1251
|
l("button", {
|
1244
1252
|
type: "button",
|
1245
|
-
onClick: e[
|
1246
|
-
class:
|
1253
|
+
onClick: e[3] || (e[3] = (...p) => t.handleClickNext && t.handleClickNext(...p)),
|
1254
|
+
class: D([{ "opacity-50 pointer-events-none": t.disableNextClick }, "min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])
|
1247
1255
|
}, [
|
1248
|
-
|
1256
|
+
y(c, {
|
1249
1257
|
height: "16",
|
1250
1258
|
width: "16",
|
1251
1259
|
class: "-rotate-90"
|
1252
1260
|
})
|
1253
1261
|
], 2),
|
1254
|
-
t.pageSizes.length ? (r(), i("div",
|
1255
|
-
l("div",
|
1256
|
-
|
1257
|
-
(r(!0), i($, null, V(t.pageSizes, (
|
1262
|
+
t.pageSizes.length ? (r(), i("div", yn, [
|
1263
|
+
l("div", kn, [
|
1264
|
+
N(l("div", vn, [
|
1265
|
+
(r(!0), i($, null, V(t.pageSizes, (p) => (r(), i("button", {
|
1258
1266
|
type: "button",
|
1259
1267
|
class: "w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm",
|
1260
|
-
onClick: (b) => t.pageSizeLocal =
|
1268
|
+
onClick: (b) => t.pageSizeLocal = p
|
1261
1269
|
}, [
|
1262
|
-
|
1263
|
-
|
1270
|
+
L(S(p) + " ", 1),
|
1271
|
+
p === t.pageSizeLocal ? (r(), k(g, {
|
1264
1272
|
key: 0,
|
1265
1273
|
width: "14",
|
1266
1274
|
height: "14",
|
1267
1275
|
class: "text-blue-600"
|
1268
1276
|
})) : v("", !0)
|
1269
|
-
], 8,
|
1277
|
+
], 8, _n))), 256))
|
1270
1278
|
], 512), [
|
1271
|
-
[
|
1279
|
+
[Q, t.isDropdownOpen]
|
1272
1280
|
]),
|
1273
1281
|
t.pageSizes.length ? (r(), i("button", {
|
1274
1282
|
key: 0,
|
1275
1283
|
type: "button",
|
1276
1284
|
class: "text-sm h-[32px] min-w-8 py-3 px-3.5 inline-flex items-center gap-x-1 rounded-lg border border-gray-200 text-gray-800 shadow-sm hover:bg-gray-50 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
1277
|
-
onClick: e[
|
1285
|
+
onClick: e[4] || (e[4] = (p) => t.isDropdownOpen = !t.isDropdownOpen)
|
1278
1286
|
}, [
|
1279
|
-
|
1280
|
-
|
1287
|
+
L(S(t.pageSizeLocal) + " ", 1),
|
1288
|
+
y(c, {
|
1281
1289
|
height: "16",
|
1282
1290
|
width: "16"
|
1283
1291
|
})
|
@@ -1286,27 +1294,27 @@ function _n(t, e, s, o, n, a) {
|
|
1286
1294
|
])) : v("", !0)
|
1287
1295
|
]);
|
1288
1296
|
}
|
1289
|
-
const
|
1297
|
+
const wn = /* @__PURE__ */ T(fn, [["render", Cn]]), $n = {
|
1290
1298
|
props: { table: String, title: String, search: String },
|
1291
1299
|
components: {
|
1292
|
-
AdminTableControl:
|
1300
|
+
AdminTableControl: wt,
|
1293
1301
|
AdminTableExport: Jt,
|
1294
1302
|
// AdminTablePrint,
|
1295
|
-
AdminTableColumnsHidden:
|
1296
|
-
AdminTableColumn:
|
1303
|
+
AdminTableColumnsHidden: hs,
|
1304
|
+
AdminTableColumn: bt,
|
1297
1305
|
AdminNodata: Qe,
|
1298
|
-
IconPlus:
|
1306
|
+
IconPlus: J,
|
1299
1307
|
IconSearch: Xe,
|
1300
|
-
AdminTableCardInfo:
|
1308
|
+
AdminTableCardInfo: Ms,
|
1301
1309
|
IconOpenCard: Ye,
|
1302
|
-
AdminComponentIs:
|
1303
|
-
AdminTableFilters:
|
1304
|
-
AdminTableTabs:
|
1305
|
-
AdminTableCustomFilters:
|
1306
|
-
AdminTableCustomButtons:
|
1307
|
-
AdminCustomButtonAdd:
|
1308
|
-
AdminTableTotalsList:
|
1309
|
-
AdminTablePagination:
|
1310
|
+
AdminComponentIs: G,
|
1311
|
+
AdminTableFilters: Ns,
|
1312
|
+
AdminTableTabs: Hs,
|
1313
|
+
AdminTableCustomFilters: nn,
|
1314
|
+
AdminTableCustomButtons: an,
|
1315
|
+
AdminCustomButtonAdd: rn,
|
1316
|
+
AdminTableTotalsList: un,
|
1317
|
+
AdminTablePagination: wn
|
1310
1318
|
},
|
1311
1319
|
data() {
|
1312
1320
|
return {
|
@@ -1322,7 +1330,8 @@ const Cn = /* @__PURE__ */ A(bn, [["render", _n]]), wn = {
|
|
1322
1330
|
filterState: null,
|
1323
1331
|
filterCustom: null,
|
1324
1332
|
visibleColumns: [],
|
1325
|
-
initialHiddenColumns: ""
|
1333
|
+
initialHiddenColumns: "",
|
1334
|
+
columnsWidth: {}
|
1326
1335
|
};
|
1327
1336
|
},
|
1328
1337
|
async mounted() {
|
@@ -1338,11 +1347,11 @@ const Cn = /* @__PURE__ */ A(bn, [["render", _n]]), wn = {
|
|
1338
1347
|
},
|
1339
1348
|
columns() {
|
1340
1349
|
var t, e;
|
1341
|
-
return (e = (t = this.tableData) == null ? void 0 : t.columns) == null ? void 0 : e.filter((
|
1350
|
+
return (e = (t = this.tableData) == null ? void 0 : t.columns) == null ? void 0 : e.filter((n) => (n == null ? void 0 : n.hidden) !== !0);
|
1342
1351
|
},
|
1343
1352
|
isForm() {
|
1344
|
-
var t, e,
|
1345
|
-
return ((t = this.tableData) == null ? void 0 : t.form) && (((
|
1353
|
+
var t, e, n, o, s;
|
1354
|
+
return ((t = this.tableData) == null ? void 0 : t.form) && (((n = (e = this.tableData) == null ? void 0 : e.actions) == null ? void 0 : n.includes("add")) || ((s = (o = this.tableData) == null ? void 0 : o.actions) == null ? void 0 : s.includes("edit")));
|
1346
1355
|
},
|
1347
1356
|
isNoData() {
|
1348
1357
|
var t, e;
|
@@ -1350,9 +1359,9 @@ const Cn = /* @__PURE__ */ A(bn, [["render", _n]]), wn = {
|
|
1350
1359
|
},
|
1351
1360
|
activeCardRow() {
|
1352
1361
|
var t, e;
|
1353
|
-
return ((e = (t = this.tableData) == null ? void 0 : t.rows) == null ? void 0 : e.find((
|
1354
|
-
var o,
|
1355
|
-
return (
|
1362
|
+
return ((e = (t = this.tableData) == null ? void 0 : t.rows) == null ? void 0 : e.find((n) => {
|
1363
|
+
var o, s;
|
1364
|
+
return (n == null ? void 0 : n.id) === ((s = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : s.card);
|
1356
1365
|
})) || {};
|
1357
1366
|
},
|
1358
1367
|
getActions() {
|
@@ -1362,7 +1371,7 @@ const Cn = /* @__PURE__ */ A(bn, [["render", _n]]), wn = {
|
|
1362
1371
|
},
|
1363
1372
|
watch: {
|
1364
1373
|
async table() {
|
1365
|
-
this.tableData = null, await this.getTableData();
|
1374
|
+
this.tableData = null, this.columnsWidth = {}, await this.getTableData();
|
1366
1375
|
},
|
1367
1376
|
searchValue: {
|
1368
1377
|
handler: Ze(async function(t) {
|
@@ -1379,8 +1388,8 @@ const Cn = /* @__PURE__ */ A(bn, [["render", _n]]), wn = {
|
|
1379
1388
|
},
|
1380
1389
|
$route: {
|
1381
1390
|
handler(t, e) {
|
1382
|
-
var
|
1383
|
-
((
|
1391
|
+
var n, o;
|
1392
|
+
((n = t == null ? void 0 : t.params) == null ? void 0 : n.catchAll) !== ((o = e == null ? void 0 : e.params) == null ? void 0 : o.catchAll) && (this.visibleColumns = [], this.unmountedData(), this.getFilters());
|
1384
1393
|
},
|
1385
1394
|
deep: !0
|
1386
1395
|
},
|
@@ -1406,36 +1415,36 @@ const Cn = /* @__PURE__ */ A(bn, [["render", _n]]), wn = {
|
|
1406
1415
|
}), this.getTableData();
|
1407
1416
|
},
|
1408
1417
|
columns(t) {
|
1409
|
-
var e,
|
1418
|
+
var e, n, o, s;
|
1410
1419
|
this.visibleColumns = t == null ? void 0 : t.map((a) => a == null ? void 0 : a.name), this.initialHiddenColumns === ((e = this.visibleColumns) == null ? void 0 : e.join(",")) && (this.visibleColumns = []), this.$router.replace({
|
1411
1420
|
...this.$route,
|
1412
1421
|
query: {
|
1413
|
-
...(
|
1414
|
-
columns: (o = this.visibleColumns) != null && o.length ? (
|
1422
|
+
...(n = this.$route) == null ? void 0 : n.query,
|
1423
|
+
columns: (o = this.visibleColumns) != null && o.length ? (s = this.visibleColumns) == null ? void 0 : s.join(",") : void 0
|
1415
1424
|
}
|
1416
1425
|
});
|
1417
1426
|
}
|
1418
1427
|
},
|
1419
1428
|
methods: {
|
1420
1429
|
async checkUrlMounted() {
|
1421
|
-
var t, e,
|
1422
|
-
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((o = (
|
1430
|
+
var t, e, n, o, s, a, c, g, p, b, d, _, x, f, C, m, w, A, P, F, z;
|
1431
|
+
this.page = ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.page) || 1, this.limit = ((o = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : o.limit) || 20, (a = (s = this.$route) == null ? void 0 : s.query) != null && a.filter && (this.filters = ((p = decodeURI((g = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : g.filter)) == null ? void 0 : p.replaceAll("+", " ")) || null), this.filters && (this.onFilters = ((d = (b = this.filters) == null ? void 0 : b.split("=")) == null ? void 0 : d.length) - 1), this.filterState = ((x = (_ = this.$route) == null ? void 0 : _.query) == null ? void 0 : x.state) || null, this.filterCustom = ((C = (f = this.$route) == null ? void 0 : f.query) == null ? void 0 : C.custom) || null, this.searchValue = ((w = (m = this.$route) == null ? void 0 : m.query) == null ? void 0 : w.search) || "", this.visibleColumns = ((F = (P = (A = this.$route) == null ? void 0 : A.query) == null ? void 0 : P.columns) == null ? void 0 : F.split(",")) || [], (z = this.$route) != null && z.query.card && (this.isVisibleCardInfo = !0);
|
1423
1432
|
},
|
1424
1433
|
rowWidth(t) {
|
1425
|
-
var
|
1426
|
-
const e = (o = (
|
1434
|
+
var n, o;
|
1435
|
+
const e = (o = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : o.find((s) => s.name === t);
|
1427
1436
|
if (e) {
|
1428
|
-
const
|
1429
|
-
return typeof
|
1437
|
+
const s = e == null ? void 0 : e.width;
|
1438
|
+
return typeof s == "number" ? `${s}px` : s != null && s.includes("px") ? s : `${s}px`;
|
1430
1439
|
}
|
1431
1440
|
},
|
1432
1441
|
unmountedData() {
|
1433
1442
|
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 = "";
|
1434
1443
|
},
|
1435
1444
|
async getTableData() {
|
1436
|
-
var t, e,
|
1445
|
+
var t, e, n, o, s, a, c, g, p, b, d;
|
1437
1446
|
try {
|
1438
|
-
const { data: _ } = await
|
1447
|
+
const { data: _ } = await M.get(`/api/template/table/${this.table}`), x = await M.get(`/api/table-data/${this.table}`, {
|
1439
1448
|
params: {
|
1440
1449
|
page: this.page,
|
1441
1450
|
search: this.searchValue || null,
|
@@ -1448,32 +1457,40 @@ const Cn = /* @__PURE__ */ A(bn, [["render", _n]]), wn = {
|
|
1448
1457
|
});
|
1449
1458
|
this.tableData = {
|
1450
1459
|
..._,
|
1451
|
-
...(
|
1452
|
-
}, this.initialHiddenColumns = (a = (
|
1460
|
+
...(x == null ? void 0 : x.data) || {}
|
1461
|
+
}, this.initialHiddenColumns = (a = (s = (o = (n = this.tableData) == null ? void 0 : n.columns) == null ? void 0 : o.filter((f) => (f == null ? void 0 : f.hidden) !== !0)) == null ? void 0 : s.map((f) => f == null ? void 0 : f.name)) == null ? void 0 : a.join(","), (c = this.visibleColumns) != null && c.length ? (g = this.tableData) == null || g.columns.forEach((f) => {
|
1453
1462
|
var C;
|
1454
|
-
(C = this.visibleColumns) != null && C.includes(
|
1455
|
-
}) : this.visibleColumns = (d = (b = (
|
1463
|
+
(C = this.visibleColumns) != null && C.includes(f == null ? void 0 : f.name) ? f.hidden = !1 : f.hidden = !0;
|
1464
|
+
}) : this.visibleColumns = (d = (b = (p = this.tableData) == null ? void 0 : p.columns) == null ? void 0 : b.filter((f) => (f == null ? void 0 : f.hidden) !== !0)) == null ? void 0 : d.map((f) => f == null ? void 0 : f.name), setTimeout(() => {
|
1465
|
+
var f, C;
|
1466
|
+
(C = (f = this.tableData) == null ? void 0 : f.columns) == null || C.forEach(({ name: m }) => {
|
1467
|
+
var w, A, P, F, z, E;
|
1468
|
+
(A = (w = this.columnsWidth) == null ? void 0 : w[m]) != null && A.ref && (this.columnsWidth[m].width = parseInt(
|
1469
|
+
(E = (z = (F = (P = this.columnsWidth) == null ? void 0 : P[m]) == null ? void 0 : F.ref) == null ? void 0 : z.getBoundingClientRect()) == null ? void 0 : E.width
|
1470
|
+
) + "px");
|
1471
|
+
});
|
1472
|
+
});
|
1456
1473
|
} catch {
|
1457
1474
|
}
|
1458
1475
|
},
|
1459
1476
|
async getFilters() {
|
1460
1477
|
var t;
|
1461
1478
|
try {
|
1462
|
-
const { data: e } = await
|
1463
|
-
this.filterScheme = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map((
|
1464
|
-
...
|
1465
|
-
label: (
|
1479
|
+
const { data: e } = await M.get(`/api/table-filter/${this.table}`);
|
1480
|
+
this.filterScheme = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map((n) => ({
|
1481
|
+
...n,
|
1482
|
+
label: (n == null ? void 0 : n.label) || (n == null ? void 0 : n.ua)
|
1466
1483
|
}));
|
1467
1484
|
} catch {
|
1468
1485
|
}
|
1469
1486
|
},
|
1470
1487
|
async handlePageChange(t, e) {
|
1471
|
-
const
|
1472
|
-
this.page = t, this.limit = e, await this.$router.replace({ query: { ...
|
1488
|
+
const n = this.$route.query;
|
1489
|
+
this.page = t, this.limit = e, await this.$router.replace({ query: { ...n, page: t, limit: e } }), await this.getTableData();
|
1473
1490
|
},
|
1474
1491
|
async filterChange({ url: t, state: e }) {
|
1475
|
-
var
|
1476
|
-
this.filters = t !== "no-url" ? t : null, this.onFilters = (
|
1492
|
+
var n;
|
1493
|
+
this.filters = t !== "no-url" ? t : null, this.onFilters = (n = Object.entries(e)) == null ? void 0 : n.length, this.page = 1, await this.getTableData();
|
1477
1494
|
},
|
1478
1495
|
changeActiveColumn(t) {
|
1479
1496
|
this.activeColumn = t, this.getTableData();
|
@@ -1507,239 +1524,246 @@ const Cn = /* @__PURE__ */ A(bn, [["render", _n]]), wn = {
|
|
1507
1524
|
];
|
1508
1525
|
}
|
1509
1526
|
}
|
1510
|
-
},
|
1527
|
+
}, Tn = { class: "w-[calc(100vw - 320px)] bg-gray-50" }, An = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, Sn = { class: "text-lg font-semibold text-gray-800 dark:text-neutral-200" }, In = {
|
1511
1528
|
style: { height: "calc(100vh - 155px)" },
|
1512
1529
|
class: "bg-gray-50 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"
|
1513
|
-
},
|
1530
|
+
}, Dn = { class: "bg-white w-full rounded-xl border p-[20px] pr-0" }, Vn = { class: "flex" }, Pn = { class: "flex gap-[6px] ml-auto" }, Fn = { class: "inline-block w-full align-middle" }, jn = {
|
1514
1531
|
key: 0,
|
1515
1532
|
class: "relative min-w-full text-[13px] divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"
|
1516
|
-
},
|
1533
|
+
}, Ln = { class: "sticky top-[-1px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, Mn = { class: "right-0" }, zn = {
|
1517
1534
|
key: 0,
|
1518
1535
|
class: "w-[70px] sticky right-0 top-0"
|
1519
|
-
},
|
1520
|
-
function
|
1521
|
-
var
|
1522
|
-
const
|
1523
|
-
return r(), i("div",
|
1536
|
+
}, qn = { class: "divide-y divide-gray-200 z-[1] relative" }, Bn = ["onClick"], On = ["onClick"], Nn = ["onClick"], En = { class: "p-[10px] flex justify-start items-end w-full" }, Un = { class: "w-[200px] md:inline-flex hidden" }, Wn = { class: "text-sm text-gray-600 dark:text-neutral-400" }, Rn = { class: "font-semibold text-gray-800 dark:text-neutral-200" };
|
1537
|
+
function Hn(t, e, n, o, s, a) {
|
1538
|
+
var X, Y, Z, ee, te, se, ne, le, ae, re, oe, ie, de, ue, ce, pe, he, be, fe, ge, me, xe, ye, ke, ve, _e, Ce, we;
|
1539
|
+
const c = h("AdminCustomButtonAdd"), g = h("IconPlus"), p = h("router-link"), b = h("AdminTableTabs"), d = h("IconSearch"), _ = h("VsText"), x = h("AdminTableCustomButtons"), f = h("AdminTableCustomFilters"), C = h("AdminTableColumnsHidden"), m = h("AdminTableExport"), w = h("AdminTableFilters"), A = h("IconOpenCard"), P = h("AdminTableColumn"), F = h("AdminComponentIs"), z = h("AdminTableControl"), E = h("AdminTableTotalsList"), ze = h("AdminNodata"), qe = h("AdminTablePagination"), Be = h("AdminTableCardInfo");
|
1540
|
+
return r(), i("div", Tn, [
|
1524
1541
|
l("div", An, [
|
1525
|
-
l("h2",
|
1542
|
+
l("h2", Sn, S(n.title), 1),
|
1526
1543
|
a.isForm ? (r(), i($, { key: 0 }, [
|
1527
|
-
(
|
1544
|
+
(Y = (X = s.tableData) == null ? void 0 : X.slots) != null && Y.addButton ? (r(), k(c, {
|
1528
1545
|
key: 0,
|
1529
|
-
slots: (
|
1530
|
-
}, null, 8, ["slots"])) : (r(), k(
|
1546
|
+
slots: (Z = s.tableData) == null ? void 0 : Z.slots
|
1547
|
+
}, null, 8, ["slots"])) : (r(), k(p, {
|
1531
1548
|
key: 1,
|
1532
|
-
to: `/add?table=${(
|
1549
|
+
to: `/add?table=${(te = (ee = t.$route) == null ? void 0 : ee.params) == null ? void 0 : te.catchAll}`,
|
1533
1550
|
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"
|
1534
1551
|
}, {
|
1535
|
-
default:
|
1536
|
-
|
1552
|
+
default: I(() => [
|
1553
|
+
y(g, {
|
1537
1554
|
height: "16",
|
1538
1555
|
width: "16"
|
1539
1556
|
}),
|
1540
|
-
e[5] || (e[5] =
|
1557
|
+
e[5] || (e[5] = L(" Додати "))
|
1541
1558
|
]),
|
1542
1559
|
_: 1
|
1543
1560
|
}, 8, ["to"]))
|
1544
1561
|
], 64)) : v("", !0)
|
1545
1562
|
]),
|
1546
|
-
l("div",
|
1547
|
-
l("div",
|
1548
|
-
(
|
1563
|
+
l("div", In, [
|
1564
|
+
l("div", Dn, [
|
1565
|
+
(ne = (se = s.tableData) == null ? void 0 : se.filterState) != null && ne.length ? (r(), k(b, {
|
1549
1566
|
key: 0,
|
1550
|
-
tabsList: (
|
1551
|
-
filterState:
|
1552
|
-
"onUpdate:filterState": e[0] || (e[0] = (
|
1567
|
+
tabsList: (le = s.tableData) == null ? void 0 : le.filterState,
|
1568
|
+
filterState: s.filterState,
|
1569
|
+
"onUpdate:filterState": e[0] || (e[0] = (u) => s.filterState = u)
|
1553
1570
|
}, null, 8, ["tabsList", "filterState"])) : v("", !0),
|
1554
|
-
l("div",
|
1571
|
+
l("div", Vn, [
|
1555
1572
|
l("div", {
|
1556
|
-
class:
|
1573
|
+
class: D([s.isVisibleCardInfo ? "w-[calc(100%-360px)]" : "w-full"])
|
1557
1574
|
}, [
|
1558
1575
|
l("div", {
|
1559
|
-
class:
|
1576
|
+
class: D(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative", { "pr-[20px]": !s.isVisibleCardInfo }])
|
1560
1577
|
}, [
|
1561
|
-
|
1578
|
+
y(d, {
|
1562
1579
|
height: "14",
|
1563
1580
|
width: "14",
|
1564
1581
|
class: "absolute top-[10px] left-[14px] text-gray-500 z-[1]"
|
1565
1582
|
}),
|
1566
|
-
|
1567
|
-
modelValue:
|
1568
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
1569
|
-
placeholder:
|
1583
|
+
y(_, {
|
1584
|
+
modelValue: s.searchValue,
|
1585
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => s.searchValue = u),
|
1586
|
+
placeholder: n.search || "Пошук...",
|
1570
1587
|
clearable: !0,
|
1571
1588
|
class: "[&>input]:py-[7px] [&>input]:max-h-[36px] [&>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"
|
1572
1589
|
}, null, 8, ["modelValue", "placeholder"]),
|
1573
|
-
l("div",
|
1574
|
-
(
|
1590
|
+
l("div", Pn, [
|
1591
|
+
(ae = s.tableData) != null && ae.slots ? (r(), k(x, {
|
1575
1592
|
key: 0,
|
1576
|
-
data:
|
1577
|
-
slots: (
|
1593
|
+
data: s.tableData,
|
1594
|
+
slots: (re = s.tableData) == null ? void 0 : re.slots
|
1578
1595
|
}, null, 8, ["data", "slots"])) : v("", !0),
|
1579
|
-
(
|
1596
|
+
(ie = (oe = s.tableData) == null ? void 0 : oe.filterCustom) != null && ie.length ? (r(), k(f, {
|
1580
1597
|
key: 1,
|
1581
|
-
customList: (
|
1582
|
-
filterCustom:
|
1583
|
-
"onUpdate:filterCustom": e[2] || (e[2] = (
|
1598
|
+
customList: (de = s.tableData) == null ? void 0 : de.filterCustom,
|
1599
|
+
filterCustom: s.filterCustom,
|
1600
|
+
"onUpdate:filterCustom": e[2] || (e[2] = (u) => s.filterCustom = u)
|
1584
1601
|
}, null, 8, ["customList", "filterCustom"])) : v("", !0),
|
1585
|
-
|
1586
|
-
columns: (
|
1587
|
-
onUpdateColumns: e[3] || (e[3] = (
|
1602
|
+
y(C, {
|
1603
|
+
columns: (ue = s.tableData) == null ? void 0 : ue.columns,
|
1604
|
+
onUpdateColumns: e[3] || (e[3] = (u) => s.tableData.columns = u)
|
1588
1605
|
}, null, 8, ["columns"]),
|
1589
|
-
((
|
1606
|
+
((ce = s.tableData) == null ? void 0 : ce.export) !== !1 ? (r(), k(m, {
|
1590
1607
|
key: 2,
|
1591
|
-
table:
|
1592
|
-
columns: (
|
1593
|
-
page:
|
1594
|
-
"filter-state":
|
1595
|
-
"filter-custom":
|
1596
|
-
filters:
|
1608
|
+
table: n.table,
|
1609
|
+
columns: (pe = s.tableData) == null ? void 0 : pe.columns,
|
1610
|
+
page: s.page,
|
1611
|
+
"filter-state": s.filterState,
|
1612
|
+
"filter-custom": s.filterCustom,
|
1613
|
+
filters: s.filters
|
1597
1614
|
}, null, 8, ["table", "columns", "page", "filter-state", "filter-custom", "filters"])) : v("", !0),
|
1598
|
-
(
|
1615
|
+
(he = s.filterScheme) != null && he.length ? (r(), k(w, {
|
1599
1616
|
key: 3,
|
1600
|
-
scheme:
|
1601
|
-
onFilters:
|
1602
|
-
table:
|
1617
|
+
scheme: s.filterScheme,
|
1618
|
+
onFilters: s.onFilters,
|
1619
|
+
table: n.table,
|
1603
1620
|
onFilterChange: a.filterChange
|
1604
1621
|
}, null, 8, ["scheme", "onFilters", "table", "onFilterChange"])) : v("", !0),
|
1605
1622
|
l("button", {
|
1606
|
-
onClick: e[4] || (e[4] = (...
|
1623
|
+
onClick: e[4] || (e[4] = (...u) => a.toggleCardInfo && a.toggleCardInfo(...u)),
|
1607
1624
|
class: "py-2 px-2.5 max-h-[34px] md:inline-flex hidden 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"
|
1608
1625
|
}, [
|
1609
|
-
|
1610
|
-
class:
|
1626
|
+
y(A, {
|
1627
|
+
class: D({ "rotate-180 duration-300": !s.isVisibleCardInfo })
|
1611
1628
|
}, null, 8, ["class"])
|
1612
1629
|
])
|
1613
1630
|
])
|
1614
1631
|
], 2),
|
1615
1632
|
l("div", {
|
1616
|
-
class:
|
1633
|
+
class: D(["flex items-start justify-start w-full space-y-5", { "pr-[20px]": !s.isVisibleCardInfo }])
|
1617
1634
|
}, [
|
1618
1635
|
l("div", {
|
1619
|
-
style:
|
1620
|
-
height: (
|
1636
|
+
style: je({
|
1637
|
+
height: (fe = (be = s.tableData) == null ? void 0 : be.filterState) != null && fe.length ? "calc(100vh - 370px)" : "calc(100vh - 310px)"
|
1621
1638
|
}),
|
1622
1639
|
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"
|
1623
1640
|
}, [
|
1624
|
-
l("div",
|
1625
|
-
a.isNoData ? (r(), k(
|
1626
|
-
l("thead",
|
1627
|
-
l("tr",
|
1628
|
-
(r(!0), i($, null, V(a.columns, (
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1641
|
+
l("div", Fn, [
|
1642
|
+
a.isNoData ? (r(), k(ze, { key: 1 })) : (r(), i("table", jn, [
|
1643
|
+
l("thead", Ln, [
|
1644
|
+
l("tr", Mn, [
|
1645
|
+
(r(!0), i($, null, V(a.columns, (u) => {
|
1646
|
+
var U, q;
|
1647
|
+
return r(), k(P, {
|
1648
|
+
key: u.name,
|
1649
|
+
style: je({
|
1650
|
+
width: ((q = (U = s.columnsWidth) == null ? void 0 : U[u == null ? void 0 : u.name]) == null ? void 0 : q.width) || a.rowWidth(u == null ? void 0 : u.name),
|
1651
|
+
textAlign: u == null ? void 0 : u.align,
|
1652
|
+
wordBreak: u == null ? void 0 : u.wrap
|
1653
|
+
}),
|
1654
|
+
data: u,
|
1655
|
+
activeColumn: s.activeColumn,
|
1656
|
+
onUpdateRef: (W) => {
|
1657
|
+
var B, O;
|
1658
|
+
(O = (B = s.columnsWidth) == null ? void 0 : B[u == null ? void 0 : u.name]) != null && O.ref || (s.columnsWidth[u.name] = { ref: W });
|
1659
|
+
},
|
1660
|
+
onChangeActive: a.changeActiveColumn
|
1661
|
+
}, null, 8, ["style", "data", "activeColumn", "onUpdateRef", "onChangeActive"]);
|
1662
|
+
}), 128)),
|
1663
|
+
(me = (ge = a.getActions) == null ? void 0 : ge.filter(
|
1664
|
+
(u) => u !== "add" && u !== "view"
|
1665
|
+
)) != null && me.length ? (r(), i("th", zn)) : v("", !0)
|
1642
1666
|
])
|
1643
1667
|
]),
|
1644
|
-
l("tbody",
|
1645
|
-
(r(!0), i($, null, V((
|
1646
|
-
var
|
1668
|
+
l("tbody", qn, [
|
1669
|
+
(r(!0), i($, null, V((xe = s.tableData) == null ? void 0 : xe.rows, (u, U) => {
|
1670
|
+
var q, W, B, O, $e, Te, Ae, Se, Ie, De, Ve, Pe;
|
1647
1671
|
return r(), i("tr", {
|
1648
|
-
key: (
|
1649
|
-
class:
|
1650
|
-
"bg-gray-50": ((
|
1672
|
+
key: (u == null ? void 0 : u.id) || U,
|
1673
|
+
class: D({
|
1674
|
+
"bg-gray-50": ((W = (q = t.$route) == null ? void 0 : q.query) == null ? void 0 : W.card) === (u == null ? void 0 : u.id)
|
1651
1675
|
})
|
1652
1676
|
}, [
|
1653
1677
|
l("td", {
|
1654
|
-
class:
|
1655
|
-
(
|
1678
|
+
class: D(["px-1 py-3 text-gray-600 pe-4", [
|
1679
|
+
(B = a.columns[0]) != null && B.align ? `text-${((O = a.columns[0]) == null ? void 0 : O.align) || "left"}` : ""
|
1656
1680
|
]]),
|
1657
|
-
onClick: (
|
1681
|
+
onClick: (j) => a.changeActiveCardInfo(u == null ? void 0 : u.id)
|
1658
1682
|
}, [
|
1659
1683
|
l("button", {
|
1660
|
-
onClick: (
|
1661
|
-
a.pushToCard(
|
1684
|
+
onClick: (j) => {
|
1685
|
+
a.pushToCard(u == null ? void 0 : u.id), a.pushToLinkCard(a.columns[0], u);
|
1662
1686
|
},
|
1663
|
-
class:
|
1687
|
+
class: D(["font-medium text-start", [
|
1664
1688
|
...a.getCustomStyles(a.columns[0]),
|
1665
|
-
((
|
1689
|
+
(($e = this.tableData) == null ? void 0 : $e.card) === !1 ? "" : " text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"
|
1666
1690
|
]])
|
1667
1691
|
}, [
|
1668
|
-
|
1669
|
-
row:
|
1692
|
+
y(F, {
|
1693
|
+
row: u,
|
1670
1694
|
column: a.columns[0],
|
1671
|
-
table:
|
1695
|
+
table: n.table,
|
1672
1696
|
onUpdateTable: a.getTableData
|
1673
1697
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1674
1698
|
], 10, On)
|
1675
|
-
], 10,
|
1676
|
-
(r(!0), i($, null, V((
|
1677
|
-
onClick: (
|
1678
|
-
a.changeActiveCardInfo(
|
1699
|
+
], 10, Bn),
|
1700
|
+
(r(!0), i($, null, V((Te = a.columns) == null ? void 0 : Te.slice(1), (j) => (r(), i("td", {
|
1701
|
+
onClick: (Xn) => {
|
1702
|
+
a.changeActiveCardInfo(u == null ? void 0 : u.id), a.pushToLinkCard(j, u);
|
1679
1703
|
},
|
1680
|
-
class:
|
1681
|
-
key:
|
1704
|
+
class: D(["px-1 py-3 text-gray-600 pe-3", a.getCustomStyles(j)]),
|
1705
|
+
key: j.name
|
1682
1706
|
}, [
|
1683
|
-
|
1684
|
-
row:
|
1685
|
-
column:
|
1686
|
-
table:
|
1707
|
+
y(F, {
|
1708
|
+
row: u,
|
1709
|
+
column: j,
|
1710
|
+
table: n.table,
|
1687
1711
|
onUpdateTable: a.getTableData
|
1688
1712
|
}, null, 8, ["row", "column", "table", "onUpdateTable"])
|
1689
|
-
], 10,
|
1690
|
-
(
|
1691
|
-
(
|
1692
|
-
)) != null &&
|
1713
|
+
], 10, Nn))), 128)),
|
1714
|
+
(Se = (Ae = a.getActions) == null ? void 0 : Ae.filter(
|
1715
|
+
(j) => j !== "add" && j !== "view"
|
1716
|
+
)) != null && Se.length ? (r(), i("td", {
|
1693
1717
|
key: 0,
|
1694
|
-
class:
|
1695
|
-
"bg-gray-50": ((
|
1696
|
-
"bg-white": ((
|
1718
|
+
class: D(["text-center sticky right-0 w-[80px] px-[10px]", {
|
1719
|
+
"bg-gray-50": ((De = (Ie = t.$route) == null ? void 0 : Ie.query) == null ? void 0 : De.card) === (u == null ? void 0 : u.id),
|
1720
|
+
"bg-white": ((Pe = (Ve = t.$route) == null ? void 0 : Ve.query) == null ? void 0 : Pe.card) !== (u == null ? void 0 : u.id)
|
1697
1721
|
}])
|
1698
1722
|
}, [
|
1699
|
-
|
1723
|
+
y(z, {
|
1700
1724
|
actions: a.getActions,
|
1701
1725
|
isForm: a.isForm,
|
1702
|
-
item:
|
1703
|
-
table:
|
1726
|
+
item: u,
|
1727
|
+
table: n.table,
|
1704
1728
|
onUpdateTable: a.getTableData
|
1705
1729
|
}, null, 8, ["actions", "isForm", "item", "table", "onUpdateTable"])
|
1706
1730
|
], 2)) : v("", !0)
|
1707
1731
|
], 2);
|
1708
1732
|
}), 128))
|
1709
1733
|
]),
|
1710
|
-
|
1734
|
+
y(E, {
|
1711
1735
|
columns: a.columns,
|
1712
|
-
agg: (
|
1736
|
+
agg: (ye = s.tableData) == null ? void 0 : ye.agg
|
1713
1737
|
}, null, 8, ["columns", "agg"])
|
1714
1738
|
]))
|
1715
1739
|
])
|
1716
1740
|
], 4)
|
1717
1741
|
], 2),
|
1718
|
-
l("div",
|
1742
|
+
l("div", En, [
|
1719
1743
|
l("div", Un, [
|
1720
|
-
l("p",
|
1721
|
-
l("span",
|
1744
|
+
l("p", Wn, [
|
1745
|
+
l("span", Rn, " Об'єктів: " + S(s.limit < ((ke = s.tableData) == null ? void 0 : ke.filtered) ? s.limit : (ve = s.tableData) == null ? void 0 : ve.filtered) + " з " + S(((_e = s.tableData) == null ? void 0 : _e.filtered) || 0), 1)
|
1722
1746
|
])
|
1723
1747
|
]),
|
1724
|
-
Math.ceil((
|
1748
|
+
Math.ceil((Ce = s.tableData) == null ? void 0 : Ce.filtered) > 10 ? (r(), k(qe, {
|
1725
1749
|
key: 0,
|
1726
1750
|
class: "justify-end",
|
1727
1751
|
"default-page": parseInt(a.defaultPage),
|
1728
|
-
total: ((
|
1752
|
+
total: ((we = s.tableData) == null ? void 0 : we.filtered) || 0,
|
1729
1753
|
onPageChange: a.handlePageChange,
|
1730
|
-
pageSize: parseInt(
|
1754
|
+
pageSize: parseInt(s.limit),
|
1731
1755
|
pageSizes: [10, 20, 50, 100]
|
1732
1756
|
}, null, 8, ["default-page", "total", "onPageChange", "pageSize"])) : v("", !0)
|
1733
1757
|
])
|
1734
1758
|
], 2),
|
1735
|
-
|
1736
|
-
default:
|
1737
|
-
var
|
1759
|
+
y(R, { name: "slide-fade" }, {
|
1760
|
+
default: I(() => {
|
1761
|
+
var u;
|
1738
1762
|
return [
|
1739
|
-
|
1763
|
+
s.isVisibleCardInfo ? (r(), k(Be, {
|
1740
1764
|
key: 0,
|
1741
|
-
table:
|
1742
|
-
columns: (
|
1765
|
+
table: n.table,
|
1766
|
+
columns: (u = s.tableData) == null ? void 0 : u.columns,
|
1743
1767
|
row: a.activeCardRow
|
1744
1768
|
}, null, 8, ["table", "columns", "row"])) : v("", !0)
|
1745
1769
|
];
|
@@ -1751,8 +1775,8 @@ function Rn(t, e, s, o, n, a) {
|
|
1751
1775
|
])
|
1752
1776
|
]);
|
1753
1777
|
}
|
1754
|
-
const
|
1755
|
-
components: { AdminTable:
|
1778
|
+
const Kn = /* @__PURE__ */ T($n, [["render", Hn], ["__scopeId", "data-v-a81a80f9"]]), Jn = {
|
1779
|
+
components: { AdminTable: Kn },
|
1756
1780
|
data() {
|
1757
1781
|
return {
|
1758
1782
|
table: !1,
|
@@ -1764,7 +1788,7 @@ const Wn = /* @__PURE__ */ A(wn, [["render", Rn], ["__scopeId", "data-v-5492963d
|
|
1764
1788
|
$route: {
|
1765
1789
|
async handler() {
|
1766
1790
|
var t;
|
1767
|
-
(t =
|
1791
|
+
(t = Fe) != null && t.value || await this.getMenu(), await this.checkPageType();
|
1768
1792
|
},
|
1769
1793
|
deep: !0
|
1770
1794
|
},
|
@@ -1779,50 +1803,50 @@ const Wn = /* @__PURE__ */ A(wn, [["render", Rn], ["__scopeId", "data-v-5492963d
|
|
1779
1803
|
methods: {
|
1780
1804
|
flattenMenu(t) {
|
1781
1805
|
const e = [];
|
1782
|
-
return t.forEach((
|
1783
|
-
|
1806
|
+
return t.forEach((n) => {
|
1807
|
+
n.menu ? e.push(...this.flattenMenu(n.menu)) : e.push(n);
|
1784
1808
|
}), e;
|
1785
1809
|
},
|
1786
1810
|
async checkPageType() {
|
1787
|
-
var o,
|
1788
|
-
const t = this.flattenMenu(
|
1811
|
+
var o, s;
|
1812
|
+
const t = this.flattenMenu(Fe.value);
|
1789
1813
|
t != null && t.length || this.$router.replace("/404");
|
1790
1814
|
const e = t == null ? void 0 : t.find((a) => {
|
1791
|
-
var
|
1792
|
-
return (a == null ? void 0 : a.path) == ((
|
1815
|
+
var c, g;
|
1816
|
+
return (a == null ? void 0 : a.path) == ((g = (c = this.$route) == null ? void 0 : c.params) == null ? void 0 : g.catchAll);
|
1793
1817
|
});
|
1794
|
-
this.title = e == null ? void 0 : e.ua, e || this.$router.replace("/404"), e != null && e.component && this.$router.replace((
|
1795
|
-
const
|
1796
|
-
this.table =
|
1818
|
+
this.title = e == null ? void 0 : e.ua, e || this.$router.replace("/404"), e != null && e.component && this.$router.replace((s = (o = this.$route) == null ? void 0 : o.params) == null ? void 0 : s.catchAll);
|
1819
|
+
const n = e == null ? void 0 : e.table;
|
1820
|
+
this.table = n || !1, this.search = (e == null ? void 0 : e.search) || "", !n && this.getInterface();
|
1797
1821
|
},
|
1798
1822
|
async getInterface() {
|
1799
1823
|
var t, e;
|
1800
1824
|
try {
|
1801
|
-
const { data:
|
1825
|
+
const { data: n } = await M.get(
|
1802
1826
|
`/api/template/interface/${((e = (t = this.$route) == null ? void 0 : t.params) == null ? void 0 : e.catchAll) || ""}`
|
1803
1827
|
);
|
1804
|
-
this.interface =
|
1828
|
+
this.interface = n || "";
|
1805
1829
|
} catch {
|
1806
1830
|
this.interface = "";
|
1807
1831
|
}
|
1808
1832
|
}
|
1809
1833
|
}
|
1810
1834
|
}, Gn = ["innerHTML"];
|
1811
|
-
function
|
1812
|
-
const
|
1813
|
-
return
|
1835
|
+
function Qn(t, e, n, o, s, a) {
|
1836
|
+
const c = h("AdminTable");
|
1837
|
+
return s.table ? (r(), k(c, {
|
1814
1838
|
key: 0,
|
1815
|
-
table:
|
1839
|
+
table: s.table,
|
1816
1840
|
title: t.title,
|
1817
|
-
search:
|
1841
|
+
search: s.search
|
1818
1842
|
}, null, 8, ["table", "title", "search"])) : (r(), i("div", {
|
1819
1843
|
key: 1,
|
1820
1844
|
class: "w-full bg-gray-50",
|
1821
1845
|
style: { height: "calc(100vh - 120px)" },
|
1822
|
-
innerHTML:
|
1846
|
+
innerHTML: s.interface
|
1823
1847
|
}, null, 8, Gn));
|
1824
1848
|
}
|
1825
|
-
const
|
1849
|
+
const el = /* @__PURE__ */ T(Jn, [["render", Qn]]);
|
1826
1850
|
export {
|
1827
|
-
|
1851
|
+
el as default
|
1828
1852
|
};
|