@opengis/admin 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{IconSearch-BFXUWqxN.js → IconSearch-DOCujn58.js} +1 -1
- package/dist/{add-page-QXFDP0nU.js → add-page-YE2OHATZ.js} +1 -1
- package/dist/{admin-interface-1RkLvsRa.js → admin-interface-DhsF_Hxe.js} +214 -213
- package/dist/{admin-view-CPrnjZDu.js → admin-view-QFp8Pseb.js} +152 -143
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +31 -31
- package/dist/{card-page-BX2dmCcY.js → card-page-D5KxxQww.js} +1 -1
- package/dist/{card-view-CnB3fm_K.js → card-view-C3M-hYVC.js} +1 -1
- package/dist/{edit-page-BolMZCpj.js → edit-page-C9nSZC01.js} +1 -1
- package/dist/{import-file-Cmff8ZAR.js → import-file-DFHqs_6d.js} +7 -7
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { u as
|
|
3
|
-
import { openBlock as o, createElementBlock as i, createStaticVNode as
|
|
4
|
-
import { I as
|
|
5
|
-
const
|
|
1
|
+
import { _ as b, a as v } from "./import-file-DFHqs_6d.js";
|
|
2
|
+
import { u as B } from "./userMenu-CT1xO2Pt.js";
|
|
3
|
+
import { openBlock as o, createElementBlock as i, createStaticVNode as A, createTextVNode as $, toDisplayString as S, createCommentVNode as w, createElementVNode as l, Fragment as x, resolveComponent as u, createVNode as h, withCtx as _, createBlock as y, withModifiers as ee, renderList as C, withDirectives as Q, vModelCheckbox as te, normalizeClass as re, resolveDynamicComponent as K, Transition as le, vShow as ne } from "vue";
|
|
4
|
+
import { I as se } from "./IconSearch-DOCujn58.js";
|
|
5
|
+
const oe = {}, ae = {
|
|
6
6
|
class: "h21yx vs0hq",
|
|
7
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8
8
|
width: "24",
|
|
@@ -14,12 +14,12 @@ const re = {}, le = {
|
|
|
14
14
|
"stroke-linecap": "round",
|
|
15
15
|
"stroke-linejoin": "round"
|
|
16
16
|
};
|
|
17
|
-
function
|
|
18
|
-
return o(), i("svg",
|
|
19
|
-
|
|
17
|
+
function ie(t, e, r, a, n, s) {
|
|
18
|
+
return o(), i("svg", ae, e[0] || (e[0] = [
|
|
19
|
+
A('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>', 9)
|
|
20
20
|
]));
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const ue = /* @__PURE__ */ b(oe, [["render", ie]]), ce = {
|
|
23
23
|
data() {
|
|
24
24
|
return {
|
|
25
25
|
currentSort: ""
|
|
@@ -77,10 +77,10 @@ const se = /* @__PURE__ */ m(re, [["render", ne]]), oe = {
|
|
|
77
77
|
return `${this.data.name}-${t}` === this.selectedSortParam;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
},
|
|
80
|
+
}, de = {
|
|
81
81
|
scope: "col",
|
|
82
82
|
class: "min-w-[200px] max-w-[300px] text-start"
|
|
83
|
-
},
|
|
83
|
+
}, he = {
|
|
84
84
|
class: "flex-shrink-0 size-3.5",
|
|
85
85
|
xmlns: "http://www.w3.org/2000/svg",
|
|
86
86
|
width: "24",
|
|
@@ -91,33 +91,33 @@ const se = /* @__PURE__ */ m(re, [["render", ne]]), oe = {
|
|
|
91
91
|
"stroke-width": "2",
|
|
92
92
|
"stroke-linecap": "round",
|
|
93
93
|
"stroke-linejoin": "round"
|
|
94
|
-
},
|
|
94
|
+
}, pe = {
|
|
95
95
|
key: 0,
|
|
96
96
|
d: "m7 15 5 5 5-5"
|
|
97
|
-
},
|
|
97
|
+
}, be = {
|
|
98
98
|
key: 1,
|
|
99
99
|
d: "m7 9 5-5 5 5"
|
|
100
|
-
},
|
|
100
|
+
}, me = {
|
|
101
101
|
key: 1,
|
|
102
102
|
class: "text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500"
|
|
103
103
|
};
|
|
104
|
-
function
|
|
105
|
-
return o(), i("th",
|
|
104
|
+
function fe(t, e, r, a, n, s) {
|
|
105
|
+
return o(), i("th", de, [
|
|
106
106
|
s.getVisibleIcon ? (o(), i("button", {
|
|
107
107
|
key: 0,
|
|
108
108
|
type: "button",
|
|
109
109
|
class: "text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",
|
|
110
|
-
onClick: e[0] || (e[0] = (
|
|
110
|
+
onClick: e[0] || (e[0] = (m) => s.handleClickSortBtn(n.currentSort))
|
|
111
111
|
}, [
|
|
112
112
|
$(S(s.label) + " ", 1),
|
|
113
|
-
(o(), i("svg",
|
|
114
|
-
n.currentSort === "asc" || n.currentSort === "" ? (o(), i("path",
|
|
115
|
-
n.currentSort === "desc" || n.currentSort === "" ? (o(), i("path",
|
|
113
|
+
(o(), i("svg", he, [
|
|
114
|
+
n.currentSort === "asc" || n.currentSort === "" ? (o(), i("path", pe)) : w("", !0),
|
|
115
|
+
n.currentSort === "desc" || n.currentSort === "" ? (o(), i("path", be)) : w("", !0)
|
|
116
116
|
]))
|
|
117
|
-
])) : (o(), i("p",
|
|
117
|
+
])) : (o(), i("p", me, S(s.label), 1))
|
|
118
118
|
]);
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const ge = /* @__PURE__ */ b(ce, [["render", fe]]), xe = {}, ye = {
|
|
121
121
|
xmlns: "http://www.w3.org/2000/svg",
|
|
122
122
|
viewBox: "0 0 24 24",
|
|
123
123
|
fill: "none",
|
|
@@ -127,8 +127,8 @@ const pe = /* @__PURE__ */ m(oe, [["render", he]]), me = {}, be = {
|
|
|
127
127
|
"stroke-linejoin": "round",
|
|
128
128
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"
|
|
129
129
|
};
|
|
130
|
-
function
|
|
131
|
-
return o(), i("svg",
|
|
130
|
+
function ke(t, e, r, a, n, s) {
|
|
131
|
+
return o(), i("svg", ye, e[0] || (e[0] = [
|
|
132
132
|
l("path", {
|
|
133
133
|
stroke: "none",
|
|
134
134
|
d: "M0 0h24v24H0z",
|
|
@@ -139,7 +139,7 @@ function fe(t, e, r, a, n, s) {
|
|
|
139
139
|
l("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
|
|
140
140
|
]));
|
|
141
141
|
}
|
|
142
|
-
const
|
|
142
|
+
const _e = /* @__PURE__ */ b(xe, [["render", ke]]), we = {}, ve = {
|
|
143
143
|
class: "flex-shrink-0 size-3.5",
|
|
144
144
|
xmlns: "http://www.w3.org/2000/svg",
|
|
145
145
|
viewBox: "0 0 24 24",
|
|
@@ -149,21 +149,21 @@ const ge = /* @__PURE__ */ m(me, [["render", fe]]), xe = {}, ye = {
|
|
|
149
149
|
"stroke-linecap": "round",
|
|
150
150
|
"stroke-linejoin": "round"
|
|
151
151
|
};
|
|
152
|
-
function
|
|
153
|
-
return o(), i("svg",
|
|
154
|
-
|
|
152
|
+
function Ce(t, e, r, a, n, s) {
|
|
153
|
+
return o(), i("svg", ve, e[0] || (e[0] = [
|
|
154
|
+
A('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>', 5)
|
|
155
155
|
]));
|
|
156
156
|
}
|
|
157
|
-
const
|
|
157
|
+
const $e = /* @__PURE__ */ b(we, [["render", Ce]]), Se = {
|
|
158
158
|
props: {
|
|
159
159
|
height: { type: String, default: "16" },
|
|
160
160
|
width: { type: String, default: "12" },
|
|
161
161
|
color: { type: String, default: "black" }
|
|
162
162
|
}
|
|
163
|
-
},
|
|
164
|
-
function
|
|
163
|
+
}, Fe = { style: { display: "none" } }, Te = ["height", "width", "fill"];
|
|
164
|
+
function Ve(t, e, r, a, n, s) {
|
|
165
165
|
return o(), i(x, null, [
|
|
166
|
-
(o(), i("svg",
|
|
166
|
+
(o(), i("svg", Fe, e[0] || (e[0] = [
|
|
167
167
|
l("symbol", {
|
|
168
168
|
id: "icon-pencil",
|
|
169
169
|
viewBox: "0 0 32 32"
|
|
@@ -177,14 +177,14 @@ function $e(t, e, r, a, n, s) {
|
|
|
177
177
|
fill: r.color
|
|
178
178
|
}, e[1] || (e[1] = [
|
|
179
179
|
l("use", { "xlink:href": "#icon-pencil" }, null, -1)
|
|
180
|
-
]), 8,
|
|
180
|
+
]), 8, Te))
|
|
181
181
|
], 64);
|
|
182
182
|
}
|
|
183
|
-
const
|
|
183
|
+
const De = /* @__PURE__ */ b(Se, [["render", Ve]]), Ae = {
|
|
184
184
|
components: {
|
|
185
|
-
IconMore:
|
|
186
|
-
IconDelete:
|
|
187
|
-
IconEdit:
|
|
185
|
+
IconMore: _e,
|
|
186
|
+
IconDelete: $e,
|
|
187
|
+
IconEdit: De
|
|
188
188
|
},
|
|
189
189
|
emits: ["updateTable"],
|
|
190
190
|
props: { item: Object, table: String, isForm: null },
|
|
@@ -204,7 +204,7 @@ const Se = /* @__PURE__ */ m(we, [["render", $e]]), Fe = {
|
|
|
204
204
|
async getData() {
|
|
205
205
|
var t;
|
|
206
206
|
try {
|
|
207
|
-
const { data: e } = await
|
|
207
|
+
const { data: e } = await v.get(
|
|
208
208
|
`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`
|
|
209
209
|
);
|
|
210
210
|
this.formValue = e;
|
|
@@ -218,7 +218,7 @@ const Se = /* @__PURE__ */ m(we, [["render", $e]]), Fe = {
|
|
|
218
218
|
async deleteElement() {
|
|
219
219
|
var t;
|
|
220
220
|
try {
|
|
221
|
-
|
|
221
|
+
v.delete(`/api/table/${this.table}/${(t = this.item) == null ? void 0 : t.id}`), this.$notify({
|
|
222
222
|
title: "Успішно!",
|
|
223
223
|
message: "Об`єкт успішно видалeно",
|
|
224
224
|
type: "success"
|
|
@@ -232,44 +232,44 @@ const Se = /* @__PURE__ */ m(we, [["render", $e]]), Fe = {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
},
|
|
235
|
+
}, Me = { class: "hs-dropdown [--placement:bottom-right] inline-flex" }, Ie = { class: "gap-x-2 p-[4px] rounded-lg shadow-sm hover:border-transparent border focus:outline-none text-black hover:bg-gray-50" }, Be = { class: "flex flex-col items-start" }, Ee = {
|
|
236
236
|
key: 1,
|
|
237
237
|
class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"
|
|
238
|
-
},
|
|
239
|
-
function
|
|
240
|
-
const
|
|
238
|
+
}, je = { class: "p-4" }, Pe = { class: "mt-4 flex justify-end gap-x-3" };
|
|
239
|
+
function ze(t, e, r, a, n, s) {
|
|
240
|
+
const m = u("IconMore"), c = u("IconEdit"), f = u("router-link"), g = u("IconDelete"), F = u("VsPopover"), M = u("VsDialog");
|
|
241
241
|
return o(), i(x, null, [
|
|
242
|
-
l("div",
|
|
242
|
+
l("div", Me, [
|
|
243
243
|
h(F, {
|
|
244
244
|
trigger: "click",
|
|
245
245
|
placement: "bottom-left"
|
|
246
246
|
}, {
|
|
247
|
-
reference:
|
|
248
|
-
l("button",
|
|
249
|
-
h(
|
|
247
|
+
reference: _(() => [
|
|
248
|
+
l("button", Ie, [
|
|
249
|
+
h(m, {
|
|
250
250
|
height: "16",
|
|
251
251
|
width: "16"
|
|
252
252
|
})
|
|
253
253
|
])
|
|
254
254
|
]),
|
|
255
|
-
default:
|
|
256
|
-
var k,
|
|
255
|
+
default: _(() => {
|
|
256
|
+
var k, T, V;
|
|
257
257
|
return [
|
|
258
|
-
l("div",
|
|
259
|
-
r.isForm ? (o(),
|
|
258
|
+
l("div", Be, [
|
|
259
|
+
r.isForm ? (o(), y(f, {
|
|
260
260
|
key: 0,
|
|
261
|
-
to: `/edit?table=${(
|
|
261
|
+
to: `/edit?table=${(T = (k = t.$route) == null ? void 0 : k.params) == null ? void 0 : T.catchAll}&id=${(V = r.item) == null ? void 0 : V.id}`,
|
|
262
262
|
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"
|
|
263
263
|
}, {
|
|
264
|
-
default:
|
|
264
|
+
default: _(() => [
|
|
265
265
|
h(c, { color: "#000" }),
|
|
266
266
|
e[4] || (e[4] = $(" Редагувати "))
|
|
267
267
|
]),
|
|
268
268
|
_: 1
|
|
269
|
-
}, 8, ["to"])) :
|
|
270
|
-
r.isForm ? (o(), i("div",
|
|
269
|
+
}, 8, ["to"])) : w("", !0),
|
|
270
|
+
r.isForm ? (o(), i("div", Ee)) : w("", !0),
|
|
271
271
|
l("button", {
|
|
272
|
-
onClick: e[0] || (e[0] =
|
|
272
|
+
onClick: e[0] || (e[0] = ee((...I) => s.openConfirm && s.openConfirm(...I), ["stop"])),
|
|
273
273
|
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"
|
|
274
274
|
}, [
|
|
275
275
|
h(g),
|
|
@@ -281,15 +281,15 @@ function Be(t, e, r, a, n, s) {
|
|
|
281
281
|
_: 1
|
|
282
282
|
})
|
|
283
283
|
]),
|
|
284
|
-
h(
|
|
284
|
+
h(M, {
|
|
285
285
|
visible: n.isDeleteConfirm,
|
|
286
286
|
"onUpdate:visible": e[3] || (e[3] = (k) => n.isDeleteConfirm = k),
|
|
287
287
|
title: "Ви впевнені?"
|
|
288
288
|
}, {
|
|
289
|
-
default:
|
|
290
|
-
l("div",
|
|
289
|
+
default: _(() => [
|
|
290
|
+
l("div", je, [
|
|
291
291
|
e[6] || (e[6] = l("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)),
|
|
292
|
-
l("div",
|
|
292
|
+
l("div", Pe, [
|
|
293
293
|
l("button", {
|
|
294
294
|
type: "button",
|
|
295
295
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm 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",
|
|
@@ -307,7 +307,7 @@ function Be(t, e, r, a, n, s) {
|
|
|
307
307
|
}, 8, ["visible"])
|
|
308
308
|
], 64);
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const Le = /* @__PURE__ */ b(Ae, [["render", ze]]), Ue = {}, qe = {
|
|
311
311
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
|
312
312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
313
313
|
viewBox: "0 0 24 24",
|
|
@@ -317,15 +317,15 @@ const Ee = /* @__PURE__ */ m(Fe, [["render", Be]]), je = {}, Pe = {
|
|
|
317
317
|
"stroke-linecap": "round",
|
|
318
318
|
"stroke-linejoin": "round"
|
|
319
319
|
};
|
|
320
|
-
function
|
|
321
|
-
return o(), i("svg",
|
|
320
|
+
function Oe(t, e, r, a, n, s) {
|
|
321
|
+
return o(), i("svg", qe, e[0] || (e[0] = [
|
|
322
322
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
323
323
|
l("path", { d: "M7 20V4" }, null, -1),
|
|
324
324
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
|
325
325
|
l("path", { d: "M17 4v16" }, null, -1)
|
|
326
326
|
]));
|
|
327
327
|
}
|
|
328
|
-
const
|
|
328
|
+
const He = /* @__PURE__ */ b(Ue, [["render", Oe]]), Ne = {
|
|
329
329
|
props: {
|
|
330
330
|
columns: { type: Object, default: () => {
|
|
331
331
|
} },
|
|
@@ -341,7 +341,7 @@ const Le = /* @__PURE__ */ m(je, [["render", ze]]), Ue = {
|
|
|
341
341
|
methods: {
|
|
342
342
|
async exportTable() {
|
|
343
343
|
try {
|
|
344
|
-
const t = await
|
|
344
|
+
const t = await v.get("/api/export", {
|
|
345
345
|
params: {
|
|
346
346
|
table: this.table,
|
|
347
347
|
format: this.format,
|
|
@@ -371,21 +371,21 @@ const Le = /* @__PURE__ */ m(je, [["render", ze]]), Ue = {
|
|
|
371
371
|
this.format = t;
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
|
-
},
|
|
375
|
-
function
|
|
376
|
-
const
|
|
374
|
+
}, Re = { class: "p-4" }, Ge = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, We = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, Ze = { class: "pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, Je = { class: "mt-2 space-y-2" }, Ke = ["id", "onChange"], Qe = ["for"], Xe = { class: "pb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700" }, Ye = { class: "text-center" };
|
|
375
|
+
function et(t, e, r, a, n, s) {
|
|
376
|
+
const m = u("VsCheckbox");
|
|
377
377
|
return o(), i(x, null, [
|
|
378
378
|
e[4] || (e[4] = l("div", { class: "dark:border-neutral-700" }, null, -1)),
|
|
379
|
-
l("div",
|
|
380
|
-
l("div",
|
|
379
|
+
l("div", Re, [
|
|
380
|
+
l("div", Ge, [
|
|
381
381
|
e[2] || (e[2] = l("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть стовпці таблиці для експорту: ", -1)),
|
|
382
|
-
l("div",
|
|
382
|
+
l("div", We, [
|
|
383
383
|
(o(!0), i(x, null, C(r.columns, (c, f) => (o(), i("div", {
|
|
384
384
|
class: "flex items-center",
|
|
385
385
|
key: f,
|
|
386
386
|
style: { width: "calc((100% - 10px) / 2)" }
|
|
387
387
|
}, [
|
|
388
|
-
h(
|
|
388
|
+
h(m, {
|
|
389
389
|
class: "py-0 shrink-0 border-gray-300 rounded text-blue-600 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",
|
|
390
390
|
modelValue: n.cols,
|
|
391
391
|
"onUpdate:modelValue": e[0] || (e[0] = (g) => n.cols = g),
|
|
@@ -395,9 +395,9 @@ function Ke(t, e, r, a, n, s) {
|
|
|
395
395
|
]))), 128))
|
|
396
396
|
])
|
|
397
397
|
]),
|
|
398
|
-
l("div",
|
|
398
|
+
l("div", Ze, [
|
|
399
399
|
e[3] || (e[3] = l("label", { class: "text-sm text-gray-500 dark:text-neutral-500" }, " Виберіть формат таблиці: ", -1)),
|
|
400
|
-
l("div",
|
|
400
|
+
l("div", Je, [
|
|
401
401
|
(o(!0), i(x, null, C(n.tableFormats, (c, f) => (o(), i("div", {
|
|
402
402
|
class: "flex items-center",
|
|
403
403
|
key: f
|
|
@@ -408,16 +408,16 @@ function Ke(t, e, r, a, n, s) {
|
|
|
408
408
|
class: "shrink-0 border-gray-300 rounded-full text-blue-600 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",
|
|
409
409
|
id: c,
|
|
410
410
|
onChange: (g) => s.selectFormat(c)
|
|
411
|
-
}, null, 40,
|
|
411
|
+
}, null, 40, Ke),
|
|
412
412
|
l("label", {
|
|
413
413
|
for: c,
|
|
414
414
|
class: "text-sm text-gray-800 ms-3 dark:text-neutral-400"
|
|
415
|
-
}, " Формат " + S(c), 9,
|
|
415
|
+
}, " Формат " + S(c), 9, Qe)
|
|
416
416
|
]))), 128))
|
|
417
417
|
])
|
|
418
418
|
]),
|
|
419
|
-
l("div",
|
|
420
|
-
l("div",
|
|
419
|
+
l("div", Xe, [
|
|
420
|
+
l("div", Ye, [
|
|
421
421
|
l("button", {
|
|
422
422
|
type: "button",
|
|
423
423
|
class: "p-2 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500",
|
|
@@ -428,8 +428,8 @@ function Ke(t, e, r, a, n, s) {
|
|
|
428
428
|
])
|
|
429
429
|
], 64);
|
|
430
430
|
}
|
|
431
|
-
const
|
|
432
|
-
components: { IconExport:
|
|
431
|
+
const tt = /* @__PURE__ */ b(Ne, [["render", et]]), rt = {
|
|
432
|
+
components: { IconExport: He, AdminTableExportForm: tt },
|
|
433
433
|
props: { table: String, columns: Array },
|
|
434
434
|
data() {
|
|
435
435
|
return {
|
|
@@ -437,14 +437,14 @@ const Qe = /* @__PURE__ */ m(Ue, [["render", Ke]]), Xe = {
|
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
439
|
};
|
|
440
|
-
function
|
|
441
|
-
const
|
|
440
|
+
function lt(t, e, r, a, n, s) {
|
|
441
|
+
const m = u("IconExport"), c = u("AdminTableExportForm"), f = u("VsDialog");
|
|
442
442
|
return o(), i(x, null, [
|
|
443
443
|
l("button", {
|
|
444
444
|
onClick: e[0] || (e[0] = (g) => n.isOpen = !0),
|
|
445
445
|
class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"
|
|
446
446
|
}, [
|
|
447
|
-
h(
|
|
447
|
+
h(m, {
|
|
448
448
|
height: "16",
|
|
449
449
|
width: "16"
|
|
450
450
|
}),
|
|
@@ -469,7 +469,7 @@ function Ye(t, e, r, a, n, s) {
|
|
|
469
469
|
"onUpdate:visible": e[1] || (e[1] = (g) => n.isOpen = g),
|
|
470
470
|
title: "Експорт таблиці"
|
|
471
471
|
}, {
|
|
472
|
-
default:
|
|
472
|
+
default: _(() => [
|
|
473
473
|
h(c, {
|
|
474
474
|
table: r.table,
|
|
475
475
|
columns: r.columns
|
|
@@ -479,7 +479,7 @@ function Ye(t, e, r, a, n, s) {
|
|
|
479
479
|
}, 8, ["visible"])
|
|
480
480
|
], 64);
|
|
481
481
|
}
|
|
482
|
-
const
|
|
482
|
+
const nt = /* @__PURE__ */ b(rt, [["render", lt]]), st = {}, ot = {
|
|
483
483
|
xmlns: "http://www.w3.org/2000/svg",
|
|
484
484
|
viewBox: "0 0 24 24",
|
|
485
485
|
fill: "none",
|
|
@@ -489,12 +489,12 @@ const et = /* @__PURE__ */ m(Xe, [["render", Ye]]), tt = {}, rt = {
|
|
|
489
489
|
"stroke-linejoin": "round",
|
|
490
490
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-columns"
|
|
491
491
|
};
|
|
492
|
-
function
|
|
493
|
-
return o(), i("svg",
|
|
494
|
-
|
|
492
|
+
function at(t, e, r, a, n, s) {
|
|
493
|
+
return o(), i("svg", ot, e[0] || (e[0] = [
|
|
494
|
+
A('<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)
|
|
495
495
|
]));
|
|
496
496
|
}
|
|
497
|
-
const
|
|
497
|
+
const it = /* @__PURE__ */ b(st, [["render", at]]), ut = {
|
|
498
498
|
props: { column: Object },
|
|
499
499
|
emits: ["update-column"],
|
|
500
500
|
data() {
|
|
@@ -511,21 +511,21 @@ const nt = /* @__PURE__ */ m(tt, [["render", lt]]), st = {
|
|
|
511
511
|
var t;
|
|
512
512
|
((t = this.column) == null ? void 0 : t.hidden) !== !0 && (this.value = !0);
|
|
513
513
|
}
|
|
514
|
-
},
|
|
515
|
-
function
|
|
516
|
-
var
|
|
517
|
-
return o(), i("label",
|
|
518
|
-
|
|
514
|
+
}, ct = { class: "flex w-full gap-[8px] items-centr" };
|
|
515
|
+
function dt(t, e, r, a, n, s) {
|
|
516
|
+
var m, c;
|
|
517
|
+
return o(), i("label", ct, [
|
|
518
|
+
Q(l("input", {
|
|
519
519
|
"onUpdate:modelValue": e[0] || (e[0] = (f) => n.value = f),
|
|
520
520
|
type: "checkbox"
|
|
521
521
|
}, null, 512), [
|
|
522
|
-
[
|
|
522
|
+
[te, n.value]
|
|
523
523
|
]),
|
|
524
|
-
$(" " + S(((
|
|
524
|
+
$(" " + S(((m = r.column) == null ? void 0 : m.ua) || ((c = r.column) == null ? void 0 : c.title)), 1)
|
|
525
525
|
]);
|
|
526
526
|
}
|
|
527
|
-
const
|
|
528
|
-
components: { IconColumns:
|
|
527
|
+
const ht = /* @__PURE__ */ b(ut, [["render", dt]]), pt = {
|
|
528
|
+
components: { IconColumns: it, AdminTableColumnsHiddenItem: ht },
|
|
529
529
|
emits: ["update-columns"],
|
|
530
530
|
props: { columns: Array },
|
|
531
531
|
methods: {
|
|
@@ -534,25 +534,25 @@ const it = /* @__PURE__ */ m(st, [["render", at]]), ut = {
|
|
|
534
534
|
r[e] = t, this.$emit("update-columns", [...r]);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
},
|
|
538
|
-
function
|
|
539
|
-
const
|
|
540
|
-
return o(),
|
|
537
|
+
}, bt = { class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, mt = { class: "flex flex-col gap-[3px] h-[400px] w-[300px] 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" };
|
|
538
|
+
function ft(t, e, r, a, n, s) {
|
|
539
|
+
const m = u("IconColumns"), c = u("AdminTableColumnsHiddenItem"), f = u("VsPopover");
|
|
540
|
+
return o(), y(f, {
|
|
541
541
|
trigger: "click",
|
|
542
542
|
placement: "bottom"
|
|
543
543
|
}, {
|
|
544
|
-
reference:
|
|
545
|
-
l("button",
|
|
546
|
-
h(
|
|
544
|
+
reference: _(() => [
|
|
545
|
+
l("button", bt, [
|
|
546
|
+
h(m, {
|
|
547
547
|
height: "20",
|
|
548
548
|
width: "16"
|
|
549
549
|
})
|
|
550
550
|
])
|
|
551
551
|
]),
|
|
552
|
-
default:
|
|
552
|
+
default: _(() => [
|
|
553
553
|
l("div", null, [
|
|
554
554
|
e[0] || (e[0] = l("h2", { class: "text-sm mb-[8px]" }, "Оберіть колонки, щоб приховати", -1)),
|
|
555
|
-
l("ul",
|
|
555
|
+
l("ul", mt, [
|
|
556
556
|
(o(!0), i(x, null, C(r.columns, (g, F) => (o(), i("li", { key: F }, [
|
|
557
557
|
h(c, {
|
|
558
558
|
column: g,
|
|
@@ -565,14 +565,14 @@ function ht(t, e, r, a, n, s) {
|
|
|
565
565
|
_: 1
|
|
566
566
|
});
|
|
567
567
|
}
|
|
568
|
-
const
|
|
568
|
+
const gt = /* @__PURE__ */ b(pt, [["render", ft]]), xt = {}, yt = {
|
|
569
569
|
class: "hidden sm:block shrink-0 size-3",
|
|
570
570
|
xmlns: "http://www.w3.org/2000/svg",
|
|
571
571
|
fill: "currentColor",
|
|
572
572
|
viewBox: "0 0 16 16"
|
|
573
573
|
};
|
|
574
|
-
function
|
|
575
|
-
return o(), i("svg",
|
|
574
|
+
function kt(t, e, r, a, n, s) {
|
|
575
|
+
return o(), i("svg", yt, e[0] || (e[0] = [
|
|
576
576
|
l("path", {
|
|
577
577
|
"fill-rule": "evenodd",
|
|
578
578
|
"clip-rule": "evenodd",
|
|
@@ -580,23 +580,23 @@ function ft(t, e, r, a, n, s) {
|
|
|
580
580
|
}, null, -1)
|
|
581
581
|
]));
|
|
582
582
|
}
|
|
583
|
-
const
|
|
584
|
-
function
|
|
585
|
-
return o(), i("div",
|
|
586
|
-
|
|
583
|
+
const _t = /* @__PURE__ */ b(xt, [["render", kt]]), wt = {}, vt = { class: "vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden" };
|
|
584
|
+
function Ct(t, e, r, a, n, s) {
|
|
585
|
+
return o(), i("div", vt, e[0] || (e[0] = [
|
|
586
|
+
A('<div><div class="p-5 min-h-[500px] flex flex-col justify-center items-center text-center"><svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg><div class="max-w-sm mx-auto mt-6"><p class="font-medium text-gray-800 dark:text-neutral-200"> Дані для відображення відсутні </p><p class="mt-2 text-sm text-gray-500 dark:text-neutral-500"> Змініть параметри пошуку або спробуйте пізніше </p></div></div></div>', 1)
|
|
587
587
|
]));
|
|
588
588
|
}
|
|
589
|
-
const
|
|
589
|
+
const $t = /* @__PURE__ */ b(wt, [["render", Ct]]), St = {
|
|
590
590
|
props: { table: String, title: String },
|
|
591
591
|
components: {
|
|
592
|
-
IconFilter:
|
|
593
|
-
AdminTableControl:
|
|
594
|
-
AdminTableExport:
|
|
595
|
-
AdminTableColumnsHidden:
|
|
596
|
-
AdminTableColumn:
|
|
597
|
-
AdminNodata:
|
|
598
|
-
IconPlus:
|
|
599
|
-
IconSearch:
|
|
592
|
+
IconFilter: ue,
|
|
593
|
+
AdminTableControl: Le,
|
|
594
|
+
AdminTableExport: nt,
|
|
595
|
+
AdminTableColumnsHidden: gt,
|
|
596
|
+
AdminTableColumn: ge,
|
|
597
|
+
AdminNodata: $t,
|
|
598
|
+
IconPlus: _t,
|
|
599
|
+
IconSearch: se
|
|
600
600
|
},
|
|
601
601
|
data() {
|
|
602
602
|
return {
|
|
@@ -605,7 +605,7 @@ const _t = /* @__PURE__ */ m(xt, [["render", kt]]), wt = {
|
|
|
605
605
|
filterScheme: [],
|
|
606
606
|
page: 1,
|
|
607
607
|
searchValue: "",
|
|
608
|
-
limit:
|
|
608
|
+
limit: 0,
|
|
609
609
|
filters: null,
|
|
610
610
|
activeColumn: "",
|
|
611
611
|
onFilters: 0
|
|
@@ -639,7 +639,7 @@ const _t = /* @__PURE__ */ m(xt, [["render", kt]]), wt = {
|
|
|
639
639
|
},
|
|
640
640
|
watch: {
|
|
641
641
|
async table() {
|
|
642
|
-
await this.getTableData();
|
|
642
|
+
this.tableData = null, await this.getTableData();
|
|
643
643
|
},
|
|
644
644
|
searchValue() {
|
|
645
645
|
this.getTableData();
|
|
@@ -647,7 +647,7 @@ const _t = /* @__PURE__ */ m(xt, [["render", kt]]), wt = {
|
|
|
647
647
|
$route: {
|
|
648
648
|
handler(t, e) {
|
|
649
649
|
var r, a;
|
|
650
|
-
((r = t == null ? void 0 : t.params) == null ? void 0 : r.catchAll) !== ((a = e == null ? void 0 : e.params) == null ? void 0 : a.catchAll) && (this.filterScheme = null, this.getFilters());
|
|
650
|
+
((r = t == null ? void 0 : t.params) == null ? void 0 : r.catchAll) !== ((a = e == null ? void 0 : e.params) == null ? void 0 : a.catchAll) && (this.filterScheme = null, this.filters = null, this.onFilters = 0, this.getFilters());
|
|
651
651
|
},
|
|
652
652
|
deep: !0
|
|
653
653
|
},
|
|
@@ -660,7 +660,7 @@ const _t = /* @__PURE__ */ m(xt, [["render", kt]]), wt = {
|
|
|
660
660
|
async getTableData() {
|
|
661
661
|
var t, e;
|
|
662
662
|
try {
|
|
663
|
-
const { data: r } = await
|
|
663
|
+
const { data: r } = await v.get(`/api/template/table/${this.table}`), a = await v.get(`/api/table-data/${this.table}`, {
|
|
664
664
|
params: {
|
|
665
665
|
page: this.page,
|
|
666
666
|
search: this.searchValue || null,
|
|
@@ -679,7 +679,7 @@ const _t = /* @__PURE__ */ m(xt, [["render", kt]]), wt = {
|
|
|
679
679
|
async getFilters() {
|
|
680
680
|
var t;
|
|
681
681
|
try {
|
|
682
|
-
const { data: e } = await
|
|
682
|
+
const { data: e } = await v.get(`/api/table-filter/${this.table}`);
|
|
683
683
|
this.filterScheme = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map((r) => ({
|
|
684
684
|
...r,
|
|
685
685
|
label: (r == null ? void 0 : r.label) || (r == null ? void 0 : r.ua)
|
|
@@ -699,50 +699,54 @@ const _t = /* @__PURE__ */ m(xt, [["render", kt]]), wt = {
|
|
|
699
699
|
},
|
|
700
700
|
async filterChange({ url: t, state: e }) {
|
|
701
701
|
var r;
|
|
702
|
-
this.filters = t, this.onFilters = (r = Object.entries(e)) == null ? void 0 : r.length, this.page = 1, await this.getTableData();
|
|
702
|
+
this.filters = t !== "no-url" ? t : null, this.onFilters = (r = Object.entries(e)) == null ? void 0 : r.length, this.page = 1, await this.getTableData();
|
|
703
703
|
},
|
|
704
704
|
changeActiveColumn(t) {
|
|
705
705
|
this.activeColumn = t, this.getTableData();
|
|
706
|
+
},
|
|
707
|
+
pushToCard(t) {
|
|
708
|
+
var e;
|
|
709
|
+
((e = this.tableData) == null ? void 0 : e.card) === !1 || this.$router.push(`/card/${this.table}/${t}`);
|
|
706
710
|
}
|
|
707
711
|
}
|
|
708
|
-
},
|
|
712
|
+
}, Ft = { class: "w-[calc(100vw - 320px)]" }, Tt = { class: "h-[76px] bg-gray-50 flex items-center justify-between px-[30px]" }, Vt = { class: "text-xl font-medium h-[20px]" }, Dt = {
|
|
709
713
|
style: { height: "calc(100vh - 140px)", width: "calc(100vw - 260px)" },
|
|
710
714
|
class: "bg-gray-50 p-[20px] flex pt-[10px]"
|
|
711
|
-
},
|
|
715
|
+
}, At = { class: "bg-white w-full rounded-xl border p-[20px]" }, Mt = { class: "flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative" }, It = { class: "flex gap-[6px] ml-auto" }, Bt = {
|
|
712
716
|
key: 0,
|
|
713
717
|
class: "font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"
|
|
714
|
-
},
|
|
718
|
+
}, Et = { class: "space-y-5 flex items-start w-full justify-start" }, jt = {
|
|
715
719
|
style: { height: "calc(100vh - 310px)" },
|
|
716
720
|
class: "overflow-x-auto w-full border-t [&::-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"
|
|
717
|
-
},
|
|
721
|
+
}, Pt = { class: "inline-block w-full align-middle" }, zt = {
|
|
718
722
|
key: 0,
|
|
719
723
|
class: "divide-y divide-gray-200 min-w-full dark:divide-neutral-700 relative table-fixed"
|
|
720
|
-
},
|
|
721
|
-
function
|
|
722
|
-
var j, P, z, L, U
|
|
723
|
-
const
|
|
724
|
+
}, Lt = { class: "sticky top-0 bg-white w-full relative after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, Ut = { class: "border-stone-200 right-0 z-[1]" }, qt = { class: "divide-y divide-gray-200" }, Ot = { class: "min-w-[200px] text-start pe-4 py-3 text-sm text-gray-600" }, Ht = ["onClick"], Nt = { class: "text-center sticky right-0 bg-white w-[80px] px-[10px]" }, Rt = { class: "p-[20px] flex justify-end w-full" }, Gt = { class: "filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-white [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
|
|
725
|
+
function Wt(t, e, r, a, n, s) {
|
|
726
|
+
var E, j, P, z, L, U;
|
|
727
|
+
const m = u("IconPlus"), c = u("router-link"), f = u("IconSearch"), g = u("VsText"), F = u("AdminTableColumnsHidden"), M = u("AdminTableExport"), k = u("IconFilter"), T = u("AdminTableColumn"), V = u("AdminTableControl"), I = u("AdminNodata"), X = u("VsPagination"), Y = u("VsFilter");
|
|
724
728
|
return o(), i(x, null, [
|
|
725
|
-
l("div",
|
|
726
|
-
l("div",
|
|
727
|
-
l("h2",
|
|
728
|
-
s.isForm ? (o(),
|
|
729
|
+
l("div", Ft, [
|
|
730
|
+
l("div", Tt, [
|
|
731
|
+
l("h2", Vt, S(r.title), 1),
|
|
732
|
+
s.isForm ? (o(), y(c, {
|
|
729
733
|
key: 0,
|
|
730
|
-
to: `/add?table=${(
|
|
734
|
+
to: `/add?table=${(j = (E = t.$route) == null ? void 0 : E.params) == null ? void 0 : j.catchAll}`,
|
|
731
735
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"
|
|
732
736
|
}, {
|
|
733
|
-
default:
|
|
734
|
-
h(
|
|
737
|
+
default: _(() => [
|
|
738
|
+
h(m, {
|
|
735
739
|
height: "16",
|
|
736
740
|
width: "16"
|
|
737
741
|
}),
|
|
738
742
|
e[5] || (e[5] = $(" Додати "))
|
|
739
743
|
]),
|
|
740
744
|
_: 1
|
|
741
|
-
}, 8, ["to"])) :
|
|
745
|
+
}, 8, ["to"])) : w("", !0)
|
|
742
746
|
]),
|
|
743
|
-
l("div",
|
|
744
|
-
l("div",
|
|
745
|
-
l("div",
|
|
747
|
+
l("div", Dt, [
|
|
748
|
+
l("div", At, [
|
|
749
|
+
l("div", Mt, [
|
|
746
750
|
h(f, {
|
|
747
751
|
height: "14",
|
|
748
752
|
width: "14",
|
|
@@ -755,14 +759,14 @@ function Ot(t, e, r, a, n, s) {
|
|
|
755
759
|
clearable: !0,
|
|
756
760
|
class: "[&>input]:py-[7px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600"
|
|
757
761
|
}, null, 8, ["modelValue"]),
|
|
758
|
-
l("div",
|
|
762
|
+
l("div", It, [
|
|
759
763
|
h(F, {
|
|
760
|
-
columns: (
|
|
764
|
+
columns: (P = n.tableData) == null ? void 0 : P.columns,
|
|
761
765
|
onUpdateColumns: e[1] || (e[1] = (d) => n.tableData.columns = d)
|
|
762
766
|
}, null, 8, ["columns"]),
|
|
763
|
-
h(
|
|
767
|
+
h(M, {
|
|
764
768
|
table: r.table,
|
|
765
|
-
columns: (
|
|
769
|
+
columns: (z = n.tableData) == null ? void 0 : z.columns
|
|
766
770
|
}, null, 8, ["table", "columns"]),
|
|
767
771
|
l("button", {
|
|
768
772
|
onClick: e[2] || (e[2] = (d) => n.isFilters = !n.isFilters),
|
|
@@ -773,17 +777,17 @@ function Ot(t, e, r, a, n, s) {
|
|
|
773
777
|
width: "16"
|
|
774
778
|
}),
|
|
775
779
|
e[6] || (e[6] = $(" Фільтри ")),
|
|
776
|
-
n.onFilters ? (o(), i("span",
|
|
780
|
+
n.onFilters ? (o(), i("span", Bt, S(n.onFilters), 1)) : w("", !0)
|
|
777
781
|
])
|
|
778
782
|
])
|
|
779
783
|
]),
|
|
780
|
-
l("div",
|
|
781
|
-
l("div",
|
|
782
|
-
l("div",
|
|
783
|
-
s.isNoData ? (o(),
|
|
784
|
-
l("thead",
|
|
785
|
-
l("tr",
|
|
786
|
-
(o(!0), i(x, null, C(s.columns, (d) => (o(),
|
|
784
|
+
l("div", Et, [
|
|
785
|
+
l("div", jt, [
|
|
786
|
+
l("div", Pt, [
|
|
787
|
+
s.isNoData ? (o(), y(I, { key: 1 })) : (o(), i("table", zt, [
|
|
788
|
+
l("thead", Lt, [
|
|
789
|
+
l("tr", Ut, [
|
|
790
|
+
(o(!0), i(x, null, C(s.columns, (d) => (o(), y(T, {
|
|
787
791
|
key: d.name,
|
|
788
792
|
data: d,
|
|
789
793
|
activeColumn: n.activeColumn,
|
|
@@ -792,38 +796,34 @@ function Ot(t, e, r, a, n, s) {
|
|
|
792
796
|
e[7] || (e[7] = l("th", { class: "w-[70px] sticky right-0 top-0 bg-white" }, null, -1))
|
|
793
797
|
])
|
|
794
798
|
]),
|
|
795
|
-
l("tbody",
|
|
796
|
-
(o(!0), i(x, null, C((
|
|
797
|
-
var O;
|
|
799
|
+
l("tbody", qt, [
|
|
800
|
+
(o(!0), i(x, null, C((L = n.tableData) == null ? void 0 : L.rows, (d, D) => {
|
|
801
|
+
var q, O, H, N, R, G, W, Z;
|
|
798
802
|
return o(), i("tr", { key: D }, [
|
|
799
|
-
l("td",
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
class: "text-sm
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
];
|
|
815
|
-
}),
|
|
816
|
-
_: 2
|
|
817
|
-
}, 1032, ["to"])
|
|
803
|
+
l("td", Ot, [
|
|
804
|
+
l("button", {
|
|
805
|
+
onClick: () => s.pushToCard(d == null ? void 0 : d.id),
|
|
806
|
+
class: re(["text-sm font-medium", [
|
|
807
|
+
((q = n.tableData) == null ? void 0 : q.card) === !1 ? "" : "text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"
|
|
808
|
+
]])
|
|
809
|
+
}, [
|
|
810
|
+
(o(), y(K(
|
|
811
|
+
((O = s.columns[0]) == null ? void 0 : O.format) === "custom" ? (H = s.columns[0]) == null ? void 0 : H.component : t.$componentsConfig[`table-format-${((R = (N = s.columns[0]) == null ? void 0 : N.format) == null ? void 0 : R.toLowerCase()) || "text"}`]
|
|
812
|
+
), {
|
|
813
|
+
name: (G = s.columns[0]) == null ? void 0 : G.name,
|
|
814
|
+
data: d,
|
|
815
|
+
value: d == null ? void 0 : d[(W = s.columns[0]) == null ? void 0 : W.name]
|
|
816
|
+
}, null, 8, ["name", "data", "value"]))
|
|
817
|
+
], 10, Ht)
|
|
818
818
|
]),
|
|
819
|
-
(o(!0), i(x, null, C((
|
|
820
|
-
var
|
|
819
|
+
(o(!0), i(x, null, C((Z = s.columns) == null ? void 0 : Z.slice(1), (p) => {
|
|
820
|
+
var J;
|
|
821
821
|
return o(), i("td", {
|
|
822
822
|
class: "min-w-[300px] w-full text-start px-[4px] py-3 text-sm text-gray-600",
|
|
823
823
|
key: p.name
|
|
824
824
|
}, [
|
|
825
|
-
(o(),
|
|
826
|
-
(p == null ? void 0 : p.format) === "custom" ? p == null ? void 0 : p.component : t.$componentsConfig[`table-format-${((
|
|
825
|
+
(o(), y(K(
|
|
826
|
+
(p == null ? void 0 : p.format) === "custom" ? p == null ? void 0 : p.component : t.$componentsConfig[`table-format-${((J = p == null ? void 0 : p.format) == null ? void 0 : J.toLowerCase()) || "text"}`]
|
|
827
827
|
), {
|
|
828
828
|
name: p == null ? void 0 : p.name,
|
|
829
829
|
data: d,
|
|
@@ -831,8 +831,8 @@ function Ot(t, e, r, a, n, s) {
|
|
|
831
831
|
}, null, 8, ["name", "data", "value"]))
|
|
832
832
|
]);
|
|
833
833
|
}), 128)),
|
|
834
|
-
l("td",
|
|
835
|
-
h(
|
|
834
|
+
l("td", Nt, [
|
|
835
|
+
h(V, {
|
|
836
836
|
isForm: s.isForm,
|
|
837
837
|
item: d,
|
|
838
838
|
table: r.table,
|
|
@@ -846,32 +846,33 @@ function Ot(t, e, r, a, n, s) {
|
|
|
846
846
|
])
|
|
847
847
|
])
|
|
848
848
|
]),
|
|
849
|
-
l("div",
|
|
850
|
-
|
|
849
|
+
l("div", Rt, [
|
|
850
|
+
n.limit ? (o(), y(X, {
|
|
851
|
+
key: 0,
|
|
851
852
|
goTo: !1,
|
|
852
853
|
class: "justify-end",
|
|
853
854
|
"default-page": s.defaultPage,
|
|
854
|
-
total: ((
|
|
855
|
+
total: ((U = n.tableData) == null ? void 0 : U.total) || 0,
|
|
855
856
|
pageSize: n.limit,
|
|
856
857
|
onPageChange: s.handlePageChange,
|
|
857
858
|
pageSizes: [10, 16, 20],
|
|
858
859
|
onPageSizeChange: s.changeLimit
|
|
859
|
-
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])
|
|
860
|
+
}, null, 8, ["default-page", "total", "pageSize", "onPageChange", "onPageSizeChange"])) : w("", !0)
|
|
860
861
|
])
|
|
861
862
|
])
|
|
862
863
|
])
|
|
863
864
|
]),
|
|
864
|
-
h(
|
|
865
|
-
default:
|
|
865
|
+
h(le, { name: "fade" }, {
|
|
866
|
+
default: _(() => {
|
|
866
867
|
var d;
|
|
867
868
|
return [
|
|
868
|
-
|
|
869
|
+
Q(l("div", {
|
|
869
870
|
onClick: e[4] || (e[4] = (...D) => s.closeFilter && s.closeFilter(...D)),
|
|
870
871
|
style: { height: "100vh" },
|
|
871
872
|
class: "fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.5)]"
|
|
872
873
|
}, [
|
|
873
|
-
l("div",
|
|
874
|
-
(d = n.filterScheme) != null && d.length ? (o(),
|
|
874
|
+
l("div", Gt, [
|
|
875
|
+
(d = n.filterScheme) != null && d.length ? (o(), y(Y, {
|
|
875
876
|
key: 0,
|
|
876
877
|
ref: "filter",
|
|
877
878
|
scheme: n.filterScheme,
|
|
@@ -882,10 +883,10 @@ function Ot(t, e, r, a, n, s) {
|
|
|
882
883
|
onFilterChange: s.filterChange,
|
|
883
884
|
closeFilterBtn: !0,
|
|
884
885
|
onFilterClose: e[3] || (e[3] = (D) => n.isFilters = !1)
|
|
885
|
-
}, null, 8, ["scheme", "onFilterChange"])) :
|
|
886
|
+
}, null, 8, ["scheme", "onFilterChange"])) : w("", !0)
|
|
886
887
|
])
|
|
887
888
|
], 512), [
|
|
888
|
-
[
|
|
889
|
+
[ne, n.isFilters]
|
|
889
890
|
])
|
|
890
891
|
];
|
|
891
892
|
}),
|
|
@@ -893,8 +894,8 @@ function Ot(t, e, r, a, n, s) {
|
|
|
893
894
|
})
|
|
894
895
|
], 64);
|
|
895
896
|
}
|
|
896
|
-
const
|
|
897
|
-
components: { AdminTable:
|
|
897
|
+
const Zt = /* @__PURE__ */ b(St, [["render", Wt]]), Jt = {
|
|
898
|
+
components: { AdminTable: Zt },
|
|
898
899
|
data() {
|
|
899
900
|
return {
|
|
900
901
|
table: !1,
|
|
@@ -906,7 +907,7 @@ const Ht = /* @__PURE__ */ m(wt, [["render", Ot]]), Nt = {
|
|
|
906
907
|
$route: {
|
|
907
908
|
async handler() {
|
|
908
909
|
var t;
|
|
909
|
-
(t =
|
|
910
|
+
(t = B) != null && t.value || await this.getMenu(), await this.checkPageType();
|
|
910
911
|
},
|
|
911
912
|
deep: !0
|
|
912
913
|
},
|
|
@@ -926,13 +927,13 @@ const Ht = /* @__PURE__ */ m(wt, [["render", Ot]]), Nt = {
|
|
|
926
927
|
},
|
|
927
928
|
async getMenu() {
|
|
928
929
|
try {
|
|
929
|
-
const { data: t } = await
|
|
930
|
-
|
|
930
|
+
const { data: t } = await v.get("/api/user-menu");
|
|
931
|
+
B.value = t;
|
|
931
932
|
} catch {
|
|
932
933
|
}
|
|
933
934
|
},
|
|
934
935
|
async checkPageType() {
|
|
935
|
-
const t = this.flattenMenu(
|
|
936
|
+
const t = this.flattenMenu(B.value);
|
|
936
937
|
t != null && t.length || this.$router.replace("/404");
|
|
937
938
|
const e = t == null ? void 0 : t.find((a) => {
|
|
938
939
|
var n, s;
|
|
@@ -945,7 +946,7 @@ const Ht = /* @__PURE__ */ m(wt, [["render", Ot]]), Nt = {
|
|
|
945
946
|
async getInterface() {
|
|
946
947
|
var t, e;
|
|
947
948
|
try {
|
|
948
|
-
const { data: r } = await
|
|
949
|
+
const { data: r } = await v.get(
|
|
949
950
|
`/api/template/interface/${((e = (t = this.$route) == null ? void 0 : t.params) == null ? void 0 : e.catchAll) || ""}`
|
|
950
951
|
);
|
|
951
952
|
this.interface = r || "";
|
|
@@ -954,10 +955,10 @@ const Ht = /* @__PURE__ */ m(wt, [["render", Ot]]), Nt = {
|
|
|
954
955
|
}
|
|
955
956
|
}
|
|
956
957
|
}
|
|
957
|
-
},
|
|
958
|
-
function
|
|
959
|
-
const
|
|
960
|
-
return n.table ? (o(),
|
|
958
|
+
}, Kt = ["innerHTML"];
|
|
959
|
+
function Qt(t, e, r, a, n, s) {
|
|
960
|
+
const m = u("AdminTable");
|
|
961
|
+
return n.table ? (o(), y(m, {
|
|
961
962
|
key: 0,
|
|
962
963
|
table: n.table,
|
|
963
964
|
title: n.title
|
|
@@ -966,9 +967,9 @@ function Gt(t, e, r, a, n, s) {
|
|
|
966
967
|
class: "w-full bg-gray-50",
|
|
967
968
|
style: { height: "calc(100vh - 120px)" },
|
|
968
969
|
innerHTML: n.interface
|
|
969
|
-
}, null, 8,
|
|
970
|
+
}, null, 8, Kt));
|
|
970
971
|
}
|
|
971
|
-
const
|
|
972
|
+
const rr = /* @__PURE__ */ b(Jt, [["render", Qt]]);
|
|
972
973
|
export {
|
|
973
|
-
|
|
974
|
+
rr as default
|
|
974
975
|
};
|