@opengis/admin 0.1.69 → 0.1.71
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{IconChevronDown-D29D5cN_.js → IconChevronDown-C5bX-n6U.js} +1 -1
- package/dist/{add-page-w-DxgCiS.js → add-page-8jUr_Av6.js} +2 -2
- package/dist/{admin-interface-DA_PeVj7.js → admin-interface-Cmyvtr-X.js} +369 -358
- package/dist/{admin-view-DrOVwYHu.js → admin-view-B0lU5eIG.js} +2 -2
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +49 -49
- package/dist/{card-page-Pw97vvNR.js → card-page-DMlxnOVF.js} +1 -1
- package/dist/{card-view-eMucbOjz.js → card-view-F0hQEiNz.js} +1 -1
- package/dist/{edit-page-DqEf35J2.js → edit-page-BJSs9RJU.js} +51 -32
- package/dist/{import-file-z-nSvLVJ.js → import-file-DsHdUJ7C.js} +4066 -4016
- package/dist/style.css +1 -1
- package/module/settings/table/admin.access.table.json +6 -0
- package/module/settings/table/admin.custom_column.table.json +6 -1
- package/module/settings/table/admin.properties.table.json +6 -0
- package/module/settings/table/admin.roles.table.json +6 -0
- package/module/settings/table/admin.routes.table.json +1 -0
- package/module/settings/table/admin.user_properties.table.json +6 -0
- package/module/settings/table/admin.user_roles.table.json +6 -0
- package/module/settings/table/admin.users.table.json +3 -1
- package/package.json +2 -2
- package/plugin.js +1 -1
- package/server/plugins/adminHook.js +1 -1
- package/server/plugins/vite.js +1 -4
- package/server/routes/data/controllers/cardData.js +5 -5
- package/server/routes/data/controllers/tableDataId.js +3 -5
- package/server/routes/menu/controllers/getMenu.js +11 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { g as V, h as z, _ as A, u as L, a as q } from "./import-file-
|
1
|
+
import { g as V, h as z, _ as A, u as L, a as q } from "./import-file-DsHdUJ7C.js";
|
2
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",
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { resolveComponent as
|
1
|
+
import { _ as d, u as m, a as n } from "./import-file-DsHdUJ7C.js";
|
2
|
+
import { resolveComponent as b, openBlock as u, createElementBlock as h, createElementVNode as a, createBlock as f, createCommentVNode as p } from "vue";
|
3
3
|
const g = {
|
4
4
|
data() {
|
5
5
|
return {
|
@@ -15,36 +15,51 @@ const g = {
|
|
15
15
|
methods: {
|
16
16
|
flattenMenu(t) {
|
17
17
|
const e = [];
|
18
|
-
return t.forEach((
|
19
|
-
|
18
|
+
return t.forEach((l) => {
|
19
|
+
l.menu ? e.push(...this.flattenMenu(l.menu)) : e.push(l);
|
20
20
|
}), e;
|
21
21
|
},
|
22
22
|
async getFormScheme() {
|
23
|
-
var c,
|
24
|
-
const t = this.flattenMenu(
|
23
|
+
var c, i;
|
24
|
+
const t = this.flattenMenu(m.value);
|
25
25
|
t != null && t.length || this.$router.replace("/404");
|
26
26
|
const e = t == null ? void 0 : t.find((o) => {
|
27
27
|
var s, r;
|
28
28
|
return (o == null ? void 0 : o.path) == ((r = (s = this.$route) == null ? void 0 : s.query) == null ? void 0 : r.table);
|
29
29
|
});
|
30
30
|
e || this.$router.replace("/404");
|
31
|
-
const
|
32
|
-
this.table =
|
31
|
+
const l = e == null ? void 0 : e.table;
|
32
|
+
this.table = l;
|
33
33
|
try {
|
34
34
|
const {
|
35
35
|
data: { form: o }
|
36
|
-
} = await
|
37
|
-
`/api/table/${this.table}/${(
|
36
|
+
} = await n.get(`/api/template/table/${l}`), { data: s } = await n.get(
|
37
|
+
`/api/table/${this.table}/${(i = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : i.id}`
|
38
38
|
);
|
39
39
|
this.token = (s == null ? void 0 : s.token) || "", this.formValues = s || {};
|
40
|
-
const { data: r } = await
|
40
|
+
const { data: r } = await n.get(`/api/template/form/${o}`);
|
41
41
|
this.scheme = (r == null ? void 0 : r.schema) || r;
|
42
42
|
} catch {
|
43
43
|
}
|
44
44
|
},
|
45
|
-
async
|
45
|
+
async onlyEditObject() {
|
46
46
|
try {
|
47
|
-
await this.$refs.form.doValidation(), await
|
47
|
+
await this.$refs.form.doValidation(), await n.put(`/api/table/${this.token}`, this.formValues), 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
|
+
async editObjectAndRedirect() {
|
61
|
+
try {
|
62
|
+
await this.$refs.form.doValidation(), await n.put(`/api/table/${this.token}`, this.formValues), await this.$router.back(), await this.$notify({
|
48
63
|
title: "Успішно!",
|
49
64
|
message: "Об'єкт успішно створено",
|
50
65
|
type: "success"
|
@@ -61,41 +76,45 @@ const g = {
|
|
61
76
|
}, x = {
|
62
77
|
style: { width: "calc(100vw - 260px)" },
|
63
78
|
class: "bg-gray-50"
|
64
|
-
},
|
79
|
+
}, y = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, w = { class: "flex items-center gap-[6px]" }, k = {
|
65
80
|
style: { height: "calc(100vh - 155px)", width: "calc(100vw - 260px)" },
|
66
81
|
class: "bg-gray-50 p-[20px] flex"
|
67
82
|
}, 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,
|
69
|
-
const s =
|
83
|
+
function V(t, e, l, c, i, o) {
|
84
|
+
const s = b("VsForm");
|
70
85
|
return u(), h("div", x, [
|
71
|
-
|
72
|
-
e[
|
73
|
-
|
74
|
-
|
86
|
+
a("div", y, [
|
87
|
+
e[4] || (e[4] = a("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
|
88
|
+
a("div", w, [
|
89
|
+
a("button", {
|
75
90
|
onClick: e[0] || (e[0] = (r) => t.$router.back()),
|
76
91
|
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
|
-
|
79
|
-
onClick: e[1] || (e[1] = (...r) => o.
|
92
|
+
}, " Повернутися "),
|
93
|
+
a("button", {
|
94
|
+
onClick: e[1] || (e[1] = (...r) => o.onlyEditObject && o.onlyEditObject(...r)),
|
95
|
+
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"
|
96
|
+
}, " Зберегти "),
|
97
|
+
a("button", {
|
98
|
+
onClick: e[2] || (e[2] = (...r) => o.editObjectAndRedirect && o.editObjectAndRedirect(...r)),
|
80
99
|
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
|
-
}, " Зберегти ")
|
100
|
+
}, " Зберегти і повернутися ")
|
82
101
|
])
|
83
102
|
]),
|
84
|
-
|
85
|
-
|
86
|
-
|
103
|
+
a("div", k, [
|
104
|
+
a("div", v, [
|
105
|
+
i.scheme ? (u(), f(s, {
|
87
106
|
key: 0,
|
88
107
|
ref: "form",
|
89
|
-
scheme:
|
90
|
-
modelValue:
|
91
|
-
"onUpdate:modelValue": e[
|
108
|
+
scheme: i.scheme,
|
109
|
+
modelValue: i.formValues,
|
110
|
+
"onUpdate:modelValue": e[3] || (e[3] = (r) => i.formValues = r),
|
92
111
|
class: "p-0 mt-[20px]"
|
93
|
-
}, null, 8, ["scheme", "modelValue"])) :
|
112
|
+
}, null, 8, ["scheme", "modelValue"])) : p("", !0)
|
94
113
|
])
|
95
114
|
])
|
96
115
|
]);
|
97
116
|
}
|
98
|
-
const j = /* @__PURE__ */
|
117
|
+
const j = /* @__PURE__ */ d(g, [["render", V]]);
|
99
118
|
export {
|
100
119
|
j as default
|
101
120
|
};
|