@opengis/admin 0.1.67 → 0.1.69
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{IconChevronDown-DN0s3TF_.js → IconChevronDown-D29D5cN_.js} +1 -1
- package/dist/add-page-w-DxgCiS.js +97 -0
- package/dist/{admin-interface-DUuz9KgB.js → admin-interface-DA_PeVj7.js} +265 -240
- package/dist/{admin-view-MSa57inW.js → admin-view-DrOVwYHu.js} +198 -188
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +48 -48
- package/dist/{card-page-B1zuuqAR.js → card-page-Pw97vvNR.js} +19 -19
- package/dist/{card-view-Bzt2AvI2.js → card-view-eMucbOjz.js} +1 -1
- package/dist/edit-page-DqEf35J2.js +101 -0
- package/dist/{import-file-B80Ws8by.js → import-file-z-nSvLVJ.js} +255 -244
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/server/plugins/hook.js +11 -44
- package/server/routes/calendar/index.mjs +2 -12
- package/server/routes/calendar/schema.js +22 -0
- package/server/routes/data/controllers/tableData.js +5 -107
- package/server/routes/data/index.mjs +4 -4
- package/server/routes/data/schema.js +49 -2
- package/server/routes/menu/controllers/getMenu.js +3 -1
- package/server/routes/menu/schema.js +0 -0
- package/server/routes/notifications/controllers/readNotifications.js +7 -14
- package/server/routes/notifications/controllers/userNotifications.js +15 -22
- package/server/routes/notifications/index.mjs +5 -30
- package/server/routes/notifications/schema.js +11 -0
- package/server/routes/properties/index.mjs +6 -18
- package/server/routes/properties/schema.js +11 -0
- package/server/routes/templates/scheme.js +9 -0
- package/dist/add-page-Cm4aSGoA.js +0 -92
- package/dist/edit-page-DoY4S7v6.js +0 -103
@@ -1,5 +1,5 @@
|
|
1
|
-
import { g as V, h as z, _ as A, u as L, a as q } from "./import-file-
|
2
|
-
import { computed as B, resolveComponent as R, openBlock as r, createElementBlock as s, createElementVNode as u, toDisplayString as
|
1
|
+
import { g as V, h as z, _ as A, u as L, a as q } from "./import-file-z-nSvLVJ.js";
|
2
|
+
import { computed as B, resolveComponent as R, openBlock as r, createElementBlock as s, createElementVNode as u, toDisplayString as M, createVNode as N, withCtx as E, createTextVNode as S, createBlock as H, createCommentVNode as b, normalizeClass as j, Fragment as w, renderList as C, resolveDynamicComponent as T } from "vue";
|
3
3
|
const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justify-between px-[20px] mb-[16px]" }, O = { class: "text-lg font-semibold md:text-xl text-stone-800 dark:text-neutral-200" }, F = { class: "flex items-center gap-[6px]" }, I = {
|
4
4
|
__name: "admin-card-header",
|
5
5
|
props: {
|
@@ -28,7 +28,7 @@ const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justif
|
|
28
28
|
onClick: t,
|
29
29
|
class: "text-sm h-[20px] text-blue-600 font-medium hover:border-b-2 hover:border-b-blue-500"
|
30
30
|
}, " До таблиці "),
|
31
|
-
u("h2", O,
|
31
|
+
u("h2", O, M(n.title), 1)
|
32
32
|
]),
|
33
33
|
u("div", F, [
|
34
34
|
N(v, {
|
@@ -125,7 +125,7 @@ const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justif
|
|
125
125
|
}, J = {
|
126
126
|
key: 0,
|
127
127
|
class: "bg-white border rounded-xl"
|
128
|
-
}, K = { class: "p-[10px] pl-[20px] text-
|
128
|
+
}, K = { class: "p-[10px] pl-[20px] text-md font-[500]" }, Q = ["innerHTML"], U = { key: 1 }, W = { class: "p-[10px] pl-[20px] text-md font-[500]" }, X = {
|
129
129
|
key: 0,
|
130
130
|
class: "p-[20px] border-t"
|
131
131
|
}, Y = {
|
@@ -157,22 +157,22 @@ function xo(n, c, a, l, t, d) {
|
|
157
157
|
var g, v;
|
158
158
|
const x = R("AdminCardHeader");
|
159
159
|
return r(), s("div", $, [
|
160
|
-
((g = t.objectData) == null ? void 0 : g.isHeader) !== !1 ? (r(),
|
160
|
+
((g = t.objectData) == null ? void 0 : g.isHeader) !== !1 ? (r(), H(x, {
|
161
161
|
key: 0,
|
162
162
|
title: d.getTitle,
|
163
163
|
"get-route": d.getRoute
|
164
164
|
}, null, 8, ["title", "get-route"])) : b("", !0),
|
165
165
|
u("div", {
|
166
|
-
class:
|
166
|
+
class: j(["grid gap-[20px]", d.getGridClass()])
|
167
167
|
}, [
|
168
168
|
(r(!0), s(w, null, C((v = t.objectData) == null ? void 0 : v.panels, (e, i) => {
|
169
169
|
var D;
|
170
170
|
return r(), s("div", {
|
171
171
|
key: i,
|
172
|
-
class:
|
172
|
+
class: j(d.getColClass(e.col))
|
173
173
|
}, [
|
174
174
|
e != null && e.name ? (r(), s("div", J, [
|
175
|
-
u("h2", K,
|
175
|
+
u("h2", K, M((e == null ? void 0 : e.title) || "Панель"), 1),
|
176
176
|
u("div", {
|
177
177
|
class: "p-[20px] border-t",
|
178
178
|
innerHTML: (D = t.objectData) == null ? void 0 : D.data[e == null ? void 0 : e.name]
|
@@ -182,11 +182,11 @@ function xo(n, c, a, l, t, d) {
|
|
182
182
|
var _, p, h, f, y;
|
183
183
|
return r(), s("div", {
|
184
184
|
key: k,
|
185
|
-
class: "border rounded-xl bg-white
|
185
|
+
class: j([{ "mb-[20px]": e.items.length > 1 }, "border rounded-xl bg-white"])
|
186
186
|
}, [
|
187
|
-
u("h2", W,
|
187
|
+
u("h2", W, M((o == null ? void 0 : o.title) || "Панель"), 1),
|
188
188
|
o != null && o.component ? (r(), s("div", X, [
|
189
|
-
(r(),
|
189
|
+
(r(), H(T(o.component), {
|
190
190
|
geometry: (p = (_ = t.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : p.geom,
|
191
191
|
zoom: 16,
|
192
192
|
id: (f = (h = n.$route) == null ? void 0 : h.params) == null ? void 0 : f.id
|
@@ -197,7 +197,7 @@ function xo(n, c, a, l, t, d) {
|
|
197
197
|
innerHTML: (y = t.objectData) == null ? void 0 : y.data[o == null ? void 0 : o.name]
|
198
198
|
}, null, 8, Z)
|
199
199
|
])) : b("", !0)
|
200
|
-
]);
|
200
|
+
], 2);
|
201
201
|
}), 128))
|
202
202
|
])) : b("", !0),
|
203
203
|
(e == null ? void 0 : e.type) === "tabs" ? (r(), s(w, { key: 2 }, [
|
@@ -205,18 +205,18 @@ function xo(n, c, a, l, t, d) {
|
|
205
205
|
(r(!0), s(w, null, C(e == null ? void 0 : e.items, (o) => (r(), s("button", {
|
206
206
|
key: (o == null ? void 0 : o.name) || (o == null ? void 0 : o.component),
|
207
207
|
onClick: (k) => t.component = (o == null ? void 0 : o.component) || (o == null ? void 0 : o.name),
|
208
|
-
class:
|
208
|
+
class: j(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none", {
|
209
209
|
" font-semibold after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800": t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name),
|
210
210
|
"": t.component !== (o == null ? void 0 : o.component) && t.component !== (o == null ? void 0 : o.name)
|
211
211
|
}])
|
212
|
-
},
|
212
|
+
}, M(o == null ? void 0 : o.title), 11, oo))), 128))
|
213
213
|
]),
|
214
214
|
(r(!0), s(w, null, C(e.items, (o, k) => {
|
215
215
|
var _, p, h, f, y;
|
216
216
|
return r(), s(w, { key: k }, [
|
217
217
|
t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name) ? (r(), s("div", eo, [
|
218
218
|
o != null && o.component ? (r(), s("div", to, [
|
219
|
-
(r(),
|
219
|
+
(r(), H(T(o.component), {
|
220
220
|
geometry: (p = (_ = t.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : p.geom,
|
221
221
|
zoom: 16,
|
222
222
|
id: (f = (h = n.$route) == null ? void 0 : h.params) == null ? void 0 : f.id
|
@@ -236,11 +236,11 @@ function xo(n, c, a, l, t, d) {
|
|
236
236
|
(r(!0), s(w, null, C(e == null ? void 0 : e.items, (o) => (r(), s("button", {
|
237
237
|
key: (o == null ? void 0 : o.name) || (o == null ? void 0 : o.component),
|
238
238
|
onClick: (k) => t.component = (o == null ? void 0 : o.component) || (o == null ? void 0 : o.name),
|
239
|
-
class:
|
239
|
+
class: j(["relative inline-flex items-center w-full py-1 text-sm border-transparent pe-4 gap-x-2 border-e-2 whitespace-nowrap hover:text-blue-600 focus:outline-none focus:text-blue-600", {
|
240
240
|
"font-semibold after:absolute after:top-[0] after:right-[-1px] after:h-full text-blue-600 after:w-[2px] after:bg-blue-600 ": t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name),
|
241
241
|
"text-gray-500": t.component !== (o == null ? void 0 : o.component) && t.component !== (o == null ? void 0 : o.name)
|
242
242
|
}])
|
243
|
-
},
|
243
|
+
}, M(o == null ? void 0 : o.title), 11, ao))), 128))
|
244
244
|
]),
|
245
245
|
u("div", lo, [
|
246
246
|
(r(!0), s(w, null, C(e.items, (o, k) => {
|
@@ -248,7 +248,7 @@ function xo(n, c, a, l, t, d) {
|
|
248
248
|
return r(), s(w, { key: k }, [
|
249
249
|
t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name) ? (r(), s("div", uo, [
|
250
250
|
o != null && o.component ? (r(), s("div", po, [
|
251
|
-
(r(),
|
251
|
+
(r(), H(T(o.component), {
|
252
252
|
geometry: (p = (_ = t.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : p.geom,
|
253
253
|
zoom: 16,
|
254
254
|
id: (f = (h = n.$route) == null ? void 0 : h.params) == null ? void 0 : f.id
|
@@ -269,7 +269,7 @@ function xo(n, c, a, l, t, d) {
|
|
269
269
|
], 2)
|
270
270
|
]);
|
271
271
|
}
|
272
|
-
const fo = /* @__PURE__ */ A(P, [["render", xo], ["__scopeId", "data-v-
|
272
|
+
const fo = /* @__PURE__ */ A(P, [["render", xo], ["__scopeId", "data-v-611b5b18"]]);
|
273
273
|
export {
|
274
274
|
fo as default
|
275
275
|
};
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import { _ as m, u as b, a as i } from "./import-file-z-nSvLVJ.js";
|
2
|
+
import { resolveComponent as d, openBlock as u, createElementBlock as h, createElementVNode as n, createBlock as p, createCommentVNode as f } from "vue";
|
3
|
+
const g = {
|
4
|
+
data() {
|
5
|
+
return {
|
6
|
+
formValues: {},
|
7
|
+
scheme: null,
|
8
|
+
table: "",
|
9
|
+
token: ""
|
10
|
+
};
|
11
|
+
},
|
12
|
+
mounted() {
|
13
|
+
this.getFormScheme();
|
14
|
+
},
|
15
|
+
methods: {
|
16
|
+
flattenMenu(t) {
|
17
|
+
const e = [];
|
18
|
+
return t.forEach((a) => {
|
19
|
+
a.menu ? e.push(...this.flattenMenu(a.menu)) : e.push(a);
|
20
|
+
}), e;
|
21
|
+
},
|
22
|
+
async getFormScheme() {
|
23
|
+
var c, l;
|
24
|
+
const t = this.flattenMenu(b.value);
|
25
|
+
t != null && t.length || this.$router.replace("/404");
|
26
|
+
const e = t == null ? void 0 : t.find((o) => {
|
27
|
+
var s, r;
|
28
|
+
return (o == null ? void 0 : o.path) == ((r = (s = this.$route) == null ? void 0 : s.query) == null ? void 0 : r.table);
|
29
|
+
});
|
30
|
+
e || this.$router.replace("/404");
|
31
|
+
const a = e == null ? void 0 : e.table;
|
32
|
+
this.table = a;
|
33
|
+
try {
|
34
|
+
const {
|
35
|
+
data: { form: o }
|
36
|
+
} = await i.get(`/api/template/table/${a}`), { data: s } = await i.get(
|
37
|
+
`/api/table/${this.table}/${(l = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : l.id}`
|
38
|
+
);
|
39
|
+
this.token = (s == null ? void 0 : s.token) || "", this.formValues = s || {};
|
40
|
+
const { data: r } = await i.get(`/api/template/form/${o}`);
|
41
|
+
this.scheme = (r == null ? void 0 : r.schema) || r;
|
42
|
+
} catch {
|
43
|
+
}
|
44
|
+
},
|
45
|
+
async editObject() {
|
46
|
+
try {
|
47
|
+
await this.$refs.form.doValidation(), await i.put(`/api/table/${this.token}`, this.formValues), await this.$router.back(), await this.$notify({
|
48
|
+
title: "Успішно!",
|
49
|
+
message: "Об'єкт успішно створено",
|
50
|
+
type: "success"
|
51
|
+
});
|
52
|
+
} catch {
|
53
|
+
this.$notify({
|
54
|
+
title: "Помилка!",
|
55
|
+
message: "Сталася помилка",
|
56
|
+
type: "error"
|
57
|
+
});
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}, x = {
|
62
|
+
style: { width: "calc(100vw - 260px)" },
|
63
|
+
class: "bg-gray-50"
|
64
|
+
}, w = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, y = { class: "flex items-center gap-[6px]" }, k = {
|
65
|
+
style: { height: "calc(100vh - 155px)", width: "calc(100vw - 260px)" },
|
66
|
+
class: "bg-gray-50 p-[20px] flex"
|
67
|
+
}, v = { class: "bg-white w-full rounded-xl border p-[20px] 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" };
|
68
|
+
function V(t, e, a, c, l, o) {
|
69
|
+
const s = d("VsForm");
|
70
|
+
return u(), h("div", x, [
|
71
|
+
n("div", w, [
|
72
|
+
e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
|
73
|
+
n("div", y, [
|
74
|
+
n("button", {
|
75
|
+
onClick: e[0] || (e[0] = (r) => t.$router.back()),
|
76
|
+
class: "flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100"
|
77
|
+
}, " Скасувати "),
|
78
|
+
n("button", {
|
79
|
+
onClick: e[1] || (e[1] = (...r) => o.editObject && o.editObject(...r)),
|
80
|
+
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"
|
81
|
+
}, " Зберегти ")
|
82
|
+
])
|
83
|
+
]),
|
84
|
+
n("div", k, [
|
85
|
+
n("div", v, [
|
86
|
+
l.scheme ? (u(), p(s, {
|
87
|
+
key: 0,
|
88
|
+
ref: "form",
|
89
|
+
scheme: l.scheme,
|
90
|
+
modelValue: l.formValues,
|
91
|
+
"onUpdate:modelValue": e[2] || (e[2] = (r) => l.formValues = r),
|
92
|
+
class: "p-0 mt-[20px]"
|
93
|
+
}, null, 8, ["scheme", "modelValue"])) : f("", !0)
|
94
|
+
])
|
95
|
+
])
|
96
|
+
]);
|
97
|
+
}
|
98
|
+
const j = /* @__PURE__ */ m(g, [["render", V]]);
|
99
|
+
export {
|
100
|
+
j as default
|
101
|
+
};
|