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