@opengis/admin 0.1.70 → 0.1.72
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/IconChevronDown-C5bX-n6U.js +26 -0
- package/dist/add-page-8jUr_Av6.js +97 -0
- package/dist/admin-interface-Cmyvtr-X.js +1517 -0
- package/dist/{admin-view-TeTAUVK1.js → admin-view-B0lU5eIG.js} +214 -223
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +84 -84
- package/dist/card-page-DMlxnOVF.js +275 -0
- package/dist/{card-view-CZjPaUKx.js → card-view-F0hQEiNz.js} +1 -1
- package/dist/edit-page-BJSs9RJU.js +120 -0
- package/dist/{import-file-DgJqxKyF.js → import-file-DsHdUJ7C.js} +6735 -6720
- package/dist/style.css +1 -1
- package/module/settings/select/core.roles.json +2 -2
- package/module/settings/table/admin.access.table.json +6 -0
- package/module/settings/table/admin.custom_column.table.json +6 -0
- 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/menu/controllers/getMenu.js +11 -1
- package/dist/add-page-Dl_bGhPC.js +0 -92
- package/dist/admin-interface-Dma-D4A9.js +0 -1351
- package/dist/card-page-D-3aubBo.js +0 -230
- package/dist/edit-page-RhKgRai9.js +0 -103
@@ -0,0 +1,26 @@
|
|
1
|
+
import { openBlock as e, createElementBlock as t, createElementVNode as n } from "vue";
|
2
|
+
import { _ as r } from "./import-file-DsHdUJ7C.js";
|
3
|
+
const l = {}, s = {
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
5
|
+
viewBox: "0 0 24 24",
|
6
|
+
fill: "none",
|
7
|
+
stroke: "currentColor",
|
8
|
+
"stroke-width": "2",
|
9
|
+
"stroke-linecap": "round",
|
10
|
+
"stroke-linejoin": "round",
|
11
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
|
12
|
+
};
|
13
|
+
function c(i, o, a, p, d, u) {
|
14
|
+
return e(), t("svg", s, o[0] || (o[0] = [
|
15
|
+
n("path", {
|
16
|
+
stroke: "none",
|
17
|
+
d: "M0 0h24v24H0z",
|
18
|
+
fill: "none"
|
19
|
+
}, null, -1),
|
20
|
+
n("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
21
|
+
]));
|
22
|
+
}
|
23
|
+
const m = /* @__PURE__ */ r(l, [["render", c]]);
|
24
|
+
export {
|
25
|
+
m as I
|
26
|
+
};
|
@@ -0,0 +1,97 @@
|
|
1
|
+
import { _ as m, u as d, a as i } from "./import-file-DsHdUJ7C.js";
|
2
|
+
import { resolveComponent as b, openBlock as u, createElementBlock as h, createElementVNode as n, createBlock as p, createCommentVNode as f } from "vue";
|
3
|
+
const x = {
|
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(r) {
|
17
|
+
const e = [];
|
18
|
+
return r.forEach((s) => {
|
19
|
+
s.menu ? e.push(...this.flattenMenu(s.menu)) : e.push(s);
|
20
|
+
}), e;
|
21
|
+
},
|
22
|
+
async getFormScheme() {
|
23
|
+
var c, a;
|
24
|
+
const r = this.flattenMenu(d.value);
|
25
|
+
r != null && r.length || this.$router.replace("/404");
|
26
|
+
const e = r == null ? void 0 : r.find((t) => {
|
27
|
+
var o, l;
|
28
|
+
return (t == null ? void 0 : t.path) == ((l = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : l.table);
|
29
|
+
});
|
30
|
+
e || this.$router.replace("/404");
|
31
|
+
const s = e == null ? void 0 : e.table;
|
32
|
+
this.table = s;
|
33
|
+
try {
|
34
|
+
const t = await i.get(`/api/table-data/${s}`), { data: o } = await i.get(
|
35
|
+
`/api/template/form/${(c = t == null ? void 0 : t.data) == null ? void 0 : c.form}`
|
36
|
+
);
|
37
|
+
this.scheme = (o == null ? void 0 : o.schema) || o, this.token = (a = t == null ? void 0 : t.data) == null ? void 0 : a.addToken;
|
38
|
+
} catch {
|
39
|
+
}
|
40
|
+
},
|
41
|
+
async createObject() {
|
42
|
+
try {
|
43
|
+
await this.$refs.form.doValidation(), await i.post(`/api/table/${this.token}`, this.formValues), await this.$router.back(), await this.$notify({
|
44
|
+
title: "Успішно!",
|
45
|
+
message: "Об'єкт успішно створено",
|
46
|
+
type: "success"
|
47
|
+
});
|
48
|
+
} catch {
|
49
|
+
this.$notify({
|
50
|
+
title: "Помилка!",
|
51
|
+
message: "Заповніть обов'язкові поля",
|
52
|
+
type: "error"
|
53
|
+
});
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}, g = {
|
58
|
+
style: { width: "calc(100vw - 260px)" },
|
59
|
+
class: "bg-gray-50"
|
60
|
+
}, w = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, k = { class: "flex items-center gap-[6px]" }, y = {
|
61
|
+
style: { height: "calc(100vh - 165px)", width: "calc(100vw - 260px)" },
|
62
|
+
class: "bg-gray-50 p-[20px] flex"
|
63
|
+
}, 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" };
|
64
|
+
function V(r, e, s, c, a, t) {
|
65
|
+
const o = b("VsForm");
|
66
|
+
return u(), h("div", g, [
|
67
|
+
n("div", w, [
|
68
|
+
e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Створити", -1)),
|
69
|
+
n("div", k, [
|
70
|
+
n("button", {
|
71
|
+
onClick: e[0] || (e[0] = (l) => r.$router.back()),
|
72
|
+
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"
|
73
|
+
}, " Скасувати "),
|
74
|
+
n("button", {
|
75
|
+
onClick: e[1] || (e[1] = (...l) => t.createObject && t.createObject(...l)),
|
76
|
+
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"
|
77
|
+
}, " Зберегти ")
|
78
|
+
])
|
79
|
+
]),
|
80
|
+
n("div", y, [
|
81
|
+
n("div", v, [
|
82
|
+
a.scheme ? (u(), p(o, {
|
83
|
+
key: 0,
|
84
|
+
ref: "form",
|
85
|
+
scheme: a.scheme,
|
86
|
+
modelValue: a.formValues,
|
87
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => a.formValues = l),
|
88
|
+
class: "p-0 mt-[20px]"
|
89
|
+
}, null, 8, ["scheme", "modelValue"])) : f("", !0)
|
90
|
+
])
|
91
|
+
])
|
92
|
+
]);
|
93
|
+
}
|
94
|
+
const j = /* @__PURE__ */ m(x, [["render", V]]);
|
95
|
+
export {
|
96
|
+
j as default
|
97
|
+
};
|