@opengis/admin 0.1.73 → 0.1.75
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{IconChevronDown-Bo0VyMHX.js → IconChevronDown-DpFXvgwL.js} +1 -1
- package/dist/{add-page-CyIBxGV_.js → add-page-B34T9kD5.js} +33 -30
- package/dist/{admin-interface-Dwr6luwW.js → admin-interface-B7RH9jC0.js} +320 -314
- package/dist/{admin-view-CFzoulzN.js → admin-view-CB6GnWqy.js} +2 -2
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +14 -14
- package/dist/{card-page-GyqV7foK.js → card-page-B2ZFa7Pi.js} +65 -65
- package/dist/{card-view-DLrRTkKE.js → card-view-BRWlfh-Z.js} +1 -1
- package/dist/{edit-page-DUBOxKSi.js → edit-page-BUhpjmtA.js} +1 -1
- package/dist/{import-file-BvAgSmhY.js → import-file-C08TESFR.js} +1828 -1837
- package/dist/style.css +1 -1
- package/module/settings/form/admin.users.form.json +4 -1
- package/package.json +2 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
import { openBlock as e, createElementBlock as t, createElementVNode as n } from "vue";
|
2
|
-
import { _ as r } from "./import-file-
|
2
|
+
import { _ as r } from "./import-file-C08TESFR.js";
|
3
3
|
const l = {}, s = {
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
5
5
|
viewBox: "0 0 24 24",
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { resolveComponent as
|
3
|
-
const
|
1
|
+
import { _ as d, u as h, a as i } from "./import-file-C08TESFR.js";
|
2
|
+
import { resolveComponent as p, openBlock as m, createElementBlock as g, createElementVNode as n, createBlock as f, createCommentVNode as x } from "vue";
|
3
|
+
const w = {
|
4
4
|
data() {
|
5
5
|
return {
|
6
6
|
formValues: {},
|
@@ -13,85 +13,88 @@ const x = {
|
|
13
13
|
this.getFormScheme();
|
14
14
|
},
|
15
15
|
methods: {
|
16
|
-
flattenMenu(
|
16
|
+
flattenMenu(t) {
|
17
17
|
const e = [];
|
18
|
-
return
|
18
|
+
return t.forEach((s) => {
|
19
19
|
s.menu ? e.push(...this.flattenMenu(s.menu)) : e.push(s);
|
20
20
|
}), e;
|
21
21
|
},
|
22
22
|
async getFormScheme() {
|
23
23
|
var c, a;
|
24
|
-
const
|
25
|
-
|
26
|
-
const e =
|
24
|
+
const t = this.flattenMenu(h.value);
|
25
|
+
t != null && t.length || this.$router.replace("/404");
|
26
|
+
const e = t == null ? void 0 : t.find((r) => {
|
27
27
|
var o, l;
|
28
|
-
return (
|
28
|
+
return (r == null ? void 0 : r.path) == ((l = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : l.table);
|
29
29
|
});
|
30
30
|
e || this.$router.replace("/404");
|
31
31
|
const s = e == null ? void 0 : e.table;
|
32
32
|
this.table = s;
|
33
33
|
try {
|
34
|
-
const
|
35
|
-
`/api/template/form/${(c =
|
34
|
+
const r = await i.get(`/api/table-data/${s}`), { data: o } = await i.get(
|
35
|
+
`/api/template/form/${(c = r == null ? void 0 : r.data) == null ? void 0 : c.form}`
|
36
36
|
);
|
37
|
-
this.scheme = (o == null ? void 0 : o.schema) || o, this.token = (a =
|
37
|
+
this.scheme = (o == null ? void 0 : o.schema) || o, this.token = (a = r == null ? void 0 : r.data) == null ? void 0 : a.addToken;
|
38
38
|
} catch {
|
39
39
|
}
|
40
40
|
},
|
41
41
|
async createObject() {
|
42
|
+
var e, s, c, a, r, o, l, u;
|
43
|
+
const t = this.$refs.form;
|
42
44
|
try {
|
43
|
-
await
|
45
|
+
await t.doValidation(), await i.post(`/api/table/${this.token}`, this.formValues), await this.$router.back(), await this.$notify({
|
44
46
|
title: "Успішно!",
|
45
47
|
message: "Об'єкт успішно створено",
|
46
48
|
type: "success"
|
47
49
|
});
|
48
50
|
} catch {
|
51
|
+
let b = ((a = (c = (s = (e = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : e[0]) == null ? void 0 : s[1]) == null ? void 0 : c[0]) == null ? void 0 : a.message) === "Це поле обов'язкове" ? "Заповніть обов'язкові поля" : (u = (l = (o = (r = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : r[0]) == null ? void 0 : o[1]) == null ? void 0 : l[0]) == null ? void 0 : u.message;
|
49
52
|
this.$notify({
|
50
53
|
title: "Помилка!",
|
51
|
-
message: "
|
54
|
+
message: b || "Сталася помилка валідаціі",
|
52
55
|
type: "error"
|
53
56
|
});
|
54
57
|
}
|
55
58
|
}
|
56
59
|
}
|
57
|
-
},
|
60
|
+
}, k = {
|
58
61
|
style: { width: "calc(100vw - 260px)" },
|
59
62
|
class: "bg-gray-50"
|
60
|
-
},
|
63
|
+
}, y = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, v = { class: "flex items-center gap-[6px]" }, V = {
|
61
64
|
style: { height: "calc(100vh - 165px)", width: "calc(100vw - 260px)" },
|
62
65
|
class: "bg-gray-50 p-[20px] flex"
|
63
|
-
},
|
64
|
-
function
|
65
|
-
const o =
|
66
|
-
return
|
67
|
-
n("div",
|
66
|
+
}, _ = { 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" };
|
67
|
+
function $(t, e, s, c, a, r) {
|
68
|
+
const o = p("VsForm");
|
69
|
+
return m(), g("div", k, [
|
70
|
+
n("div", y, [
|
68
71
|
e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Створити", -1)),
|
69
|
-
n("div",
|
72
|
+
n("div", v, [
|
70
73
|
n("button", {
|
71
|
-
onClick: e[0] || (e[0] = (l) =>
|
74
|
+
onClick: e[0] || (e[0] = (l) => t.$router.back()),
|
72
75
|
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
76
|
}, " Скасувати "),
|
74
77
|
n("button", {
|
75
|
-
onClick: e[1] || (e[1] = (...l) =>
|
78
|
+
onClick: e[1] || (e[1] = (...l) => r.createObject && r.createObject(...l)),
|
76
79
|
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
80
|
}, " Зберегти ")
|
78
81
|
])
|
79
82
|
]),
|
80
|
-
n("div",
|
81
|
-
n("div",
|
82
|
-
a.scheme ? (
|
83
|
+
n("div", V, [
|
84
|
+
n("div", _, [
|
85
|
+
a.scheme ? (m(), f(o, {
|
83
86
|
key: 0,
|
84
87
|
ref: "form",
|
85
88
|
scheme: a.scheme,
|
86
89
|
modelValue: a.formValues,
|
87
90
|
"onUpdate:modelValue": e[2] || (e[2] = (l) => a.formValues = l),
|
88
91
|
class: "p-0 mt-[20px]"
|
89
|
-
}, null, 8, ["scheme", "modelValue"])) :
|
92
|
+
}, null, 8, ["scheme", "modelValue"])) : x("", !0)
|
90
93
|
])
|
91
94
|
])
|
92
95
|
]);
|
93
96
|
}
|
94
|
-
const
|
97
|
+
const C = /* @__PURE__ */ d(w, [["render", $]]);
|
95
98
|
export {
|
96
|
-
|
99
|
+
C as default
|
97
100
|
};
|