@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.
Files changed (49) hide show
  1. package/dist/{IconChevronDown-B65ioxEK.js → IconChevronDown-BMnTiJIv.js} +1 -1
  2. package/dist/{add-page-Dva8zP3n.js → add-page-BxK4iJe4.js} +33 -30
  3. package/dist/{admin-interface-BfAJWo-U.js → admin-interface-D9vWpTqM.js} +598 -535
  4. package/dist/{admin-view-DW5O-fWK.js → admin-view-DPtlpZue.js} +144 -139
  5. package/dist/admin.js +1 -1
  6. package/dist/admin.umd.cjs +51 -51
  7. package/dist/assets/favicon.svg +1 -0
  8. package/dist/assets/logo.svg +42 -0
  9. package/dist/{card-page-TcYbRehu.js → card-page-KnsaeAPW.js} +3 -3
  10. package/dist/{card-view-CRIWNsOX.js → card-view-BAC53pSQ.js} +1 -1
  11. package/dist/{edit-page-Cx50IR_w.js → edit-page-D2KM1hue.js} +1 -1
  12. package/dist/{import-file-CFLFN46x.js → import-file-C3Slz6rJ.js} +4655 -4648
  13. package/dist/style.css +1 -1
  14. package/module/settings/form/admin.users.form.json +4 -1
  15. package/module/settings/select/core.user_mentioned.sql +2 -0
  16. package/package.json +5 -5
  17. package/plugin.js +3 -0
  18. package/server/helpers/index.mjs +7 -5
  19. package/server/routes/calendar/controllers/calendar.data.js +3 -3
  20. package/server/routes/data/controllers/cardData.js +5 -5
  21. package/server/routes/data/controllers/cardTabData.js +5 -5
  22. package/server/routes/data/controllers/funcs/getFilterSQL/index.js +3 -3
  23. package/server/routes/data/controllers/tableData.js +4 -3
  24. package/server/routes/data/controllers/tableDataId.js +3 -1
  25. package/server/routes/data/controllers/tableFilter.js +3 -3
  26. package/server/routes/data/controllers/utils/assignTokens.js +6 -6
  27. package/server/routes/notifications/controllers/readNotifications.js +9 -5
  28. package/server/routes/notifications/controllers/testEmail.js +35 -0
  29. package/server/routes/notifications/controllers/userNotifications.js +1 -1
  30. package/server/routes/notifications/funcs/addNotification.js +21 -0
  31. package/server/routes/notifications/funcs/sendNotification.js +105 -0
  32. package/server/routes/notifications/funcs/utils/sendEmail.js +39 -0
  33. package/server/routes/notifications/hook/onWidgetSet.js +4 -4
  34. package/server/routes/notifications/index.mjs +14 -2
  35. package/server/routes/notifications/schema.js +7 -1
  36. package/server/routes/properties/controllers/admin.properties.get.js +2 -2
  37. package/server/routes/user/controllers/user.cls.id.js +14 -0
  38. package/server/routes/user/controllers/user.cls.js +71 -0
  39. package/server/routes/user/controllers/user.cls.post.js +52 -0
  40. package/server/routes/user/controllers/user.info.js +17 -0
  41. package/server/routes/user/index.mjs +15 -0
  42. package/server/routes/user/schema.js +14 -0
  43. package/server/routes/widget/controllers/utils/historyFormat.js +75 -0
  44. package/server/routes/widget/controllers/utils/obj2db.js +13 -0
  45. package/server/routes/widget/controllers/widget.del.js +41 -0
  46. package/server/routes/widget/controllers/widget.get.js +96 -0
  47. package/server/routes/widget/controllers/widget.set.js +76 -0
  48. package/server/routes/widget/index.mjs +39 -0
  49. 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-CFLFN46x.js";
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 m, u as d, a as i } from "./import-file-CFLFN46x.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 = {
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(r) {
16
+ flattenMenu(t) {
17
17
  const e = [];
18
- return r.forEach((s) => {
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 r = this.flattenMenu(d.value);
25
- r != null && r.length || this.$router.replace("/404");
26
- const e = r == null ? void 0 : r.find((t) => {
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 (t == null ? void 0 : t.path) == ((l = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : l.table);
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 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}`
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 = t == null ? void 0 : t.data) == null ? void 0 : a.addToken;
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 this.$refs.form.doValidation(), await i.post(`/api/table/${this.token}`, this.formValues), await this.$router.back(), await this.$notify({
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
- }, g = {
60
+ }, k = {
58
61
  style: { width: "calc(100vw - 260px)" },
59
62
  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 = {
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
- }, 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, [
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", k, [
72
+ n("div", v, [
70
73
  n("button", {
71
- onClick: e[0] || (e[0] = (l) => r.$router.back()),
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) => t.createObject && t.createObject(...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", y, [
81
- n("div", v, [
82
- a.scheme ? (u(), p(o, {
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"])) : f("", !0)
92
+ }, null, 8, ["scheme", "modelValue"])) : x("", !0)
90
93
  ])
91
94
  ])
92
95
  ]);
93
96
  }
94
- const j = /* @__PURE__ */ m(x, [["render", V]]);
97
+ const C = /* @__PURE__ */ d(w, [["render", $]]);
95
98
  export {
96
- j as default
99
+ C as default
97
100
  };