@opengis/admin 0.1.74 → 0.1.76
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{IconChevronDown-B65ioxEK.js → IconChevronDown-BMnTiJIv.js} +1 -1
- package/dist/{add-page-Dva8zP3n.js → add-page-BxK4iJe4.js} +33 -30
- package/dist/{admin-interface-BfAJWo-U.js → admin-interface-D9vWpTqM.js} +598 -535
- package/dist/{admin-view-DW5O-fWK.js → admin-view-DPtlpZue.js} +144 -139
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +51 -51
- package/dist/assets/favicon.svg +1 -0
- package/dist/assets/logo.svg +42 -0
- package/dist/{card-page-TcYbRehu.js → card-page-KnsaeAPW.js} +3 -3
- package/dist/{card-view-CRIWNsOX.js → card-view-BAC53pSQ.js} +1 -1
- package/dist/{edit-page-Cx50IR_w.js → edit-page-D2KM1hue.js} +1 -1
- package/dist/{import-file-CFLFN46x.js → import-file-C3Slz6rJ.js} +4655 -4648
- package/dist/style.css +1 -1
- package/module/settings/form/admin.users.form.json +4 -1
- package/module/settings/select/core.user_mentioned.sql +2 -0
- package/package.json +5 -5
- package/plugin.js +3 -0
- package/server/helpers/index.mjs +7 -5
- package/server/routes/calendar/controllers/calendar.data.js +3 -3
- package/server/routes/data/controllers/cardData.js +5 -5
- package/server/routes/data/controllers/cardTabData.js +5 -5
- package/server/routes/data/controllers/funcs/getFilterSQL/index.js +3 -3
- package/server/routes/data/controllers/tableData.js +4 -3
- package/server/routes/data/controllers/tableDataId.js +3 -1
- package/server/routes/data/controllers/tableFilter.js +3 -3
- package/server/routes/data/controllers/utils/assignTokens.js +6 -6
- package/server/routes/notifications/controllers/readNotifications.js +9 -5
- package/server/routes/notifications/controllers/testEmail.js +35 -0
- package/server/routes/notifications/controllers/userNotifications.js +1 -1
- package/server/routes/notifications/funcs/addNotification.js +21 -0
- package/server/routes/notifications/funcs/sendNotification.js +105 -0
- package/server/routes/notifications/funcs/utils/sendEmail.js +39 -0
- package/server/routes/notifications/hook/onWidgetSet.js +4 -4
- package/server/routes/notifications/index.mjs +14 -2
- package/server/routes/notifications/schema.js +7 -1
- package/server/routes/properties/controllers/admin.properties.get.js +2 -2
- package/server/routes/user/controllers/user.cls.id.js +14 -0
- package/server/routes/user/controllers/user.cls.js +71 -0
- package/server/routes/user/controllers/user.cls.post.js +52 -0
- package/server/routes/user/controllers/user.info.js +17 -0
- package/server/routes/user/index.mjs +15 -0
- package/server/routes/user/schema.js +14 -0
- package/server/routes/widget/controllers/utils/historyFormat.js +75 -0
- package/server/routes/widget/controllers/utils/obj2db.js +13 -0
- package/server/routes/widget/controllers/widget.del.js +41 -0
- package/server/routes/widget/controllers/widget.get.js +96 -0
- package/server/routes/widget/controllers/widget.set.js +76 -0
- package/server/routes/widget/index.mjs +39 -0
- package/utils.js +5 -0
@@ -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-C3Slz6rJ.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-C3Slz6rJ.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
|
};
|