@opengis/admin 0.1.98 → 0.1.100

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. package/dist/add-page-Dl_bGhPC.js +92 -0
  2. package/dist/admin-interface-Dma-D4A9.js +1351 -0
  3. package/dist/admin-view-TeTAUVK1.js +640 -0
  4. package/dist/admin.js +1 -1
  5. package/dist/admin.umd.cjs +83 -128
  6. package/dist/card-page-D-3aubBo.js +230 -0
  7. package/dist/{card-view-BpcpqR_U.js → card-view-CZjPaUKx.js} +1 -1
  8. package/dist/edit-page-RhKgRai9.js +103 -0
  9. package/dist/{import-file-eH-_Imyb.js → import-file-DgJqxKyF.js} +18308 -19458
  10. package/dist/style.css +1 -1
  11. package/module/settings/card/admin.accounts.table/index.yml +8 -0
  12. package/module/settings/card/admin.accounts.table/rules.hbs +19 -0
  13. package/module/settings/card/admin.accounts.table/users.hbs +14 -0
  14. package/module/settings/card/admin.roles.table/access.hbs +3 -24
  15. package/module/settings/card/admin.roles.table/general_info.hbs +1 -17
  16. package/module/settings/card/admin.roles.table/index.yml +4 -1
  17. package/module/settings/card/admin.roles.table/users.hbs +6 -27
  18. package/module/settings/card/admin.routes.table/general_info.hbs +14 -41
  19. package/module/settings/card/admin.routes.table/groups.hbs +12 -0
  20. package/module/settings/card/admin.routes.table/index.yml +3 -0
  21. package/module/settings/card/admin.routes.table/users.hbs +16 -33
  22. package/module/settings/card/admin.users.table/context.hbs +15 -0
  23. package/module/settings/card/admin.users.table/general_info.hbs +13 -26
  24. package/module/settings/card/admin.users.table/index.yml +17 -7
  25. package/module/settings/card/admin.users.table/last_login.hbs +10 -0
  26. package/module/settings/card/admin.users.table/logs.hbs +11 -31
  27. package/module/settings/card/admin.users.table/routes.hbs +8 -0
  28. package/module/settings/card/admin.users.table/user_roles.hbs +13 -25
  29. package/module/settings/form/admin.accounts.form.json +13 -0
  30. package/module/settings/form/admin.rules.form.json +31 -0
  31. package/module/settings/form/admin.user_roles.form.json +0 -8
  32. package/module/settings/form/admin.user_roles_card.form.json +14 -0
  33. package/module/settings/form/admin.users.form.json +2 -2
  34. package/module/settings/form/context.account_grants.form.json +24 -0
  35. package/module/settings/form/context.account_users.form.json +12 -0
  36. package/module/settings/menu.json +24 -0
  37. package/module/settings/select/core.accounts.sql +1 -0
  38. package/module/settings/select/core.roles.sql +1 -1
  39. package/module/settings/select/core.rules.sql +1 -0
  40. package/module/settings/select/core.user_uid.sql +0 -1
  41. package/module/settings/table/admin.accounts.table.json +42 -0
  42. package/module/settings/table/admin.roles.table.json +1 -1
  43. package/module/settings/table/admin.routes.table.json +9 -4
  44. package/module/settings/table/admin.rules.table.json +77 -0
  45. package/module/settings/table/admin.users.table.json +17 -6
  46. package/module/settings/table/context.account_grants.table.json +68 -0
  47. package/module/settings/table/context.account_users.table.json +38 -0
  48. package/package.json +3 -2
  49. package/server/helpers/core/select.js +4 -6
  50. package/server/helpers/list/tableList.js +9 -6
  51. package/server/routes/access/controllers/access.group.js +1 -1
  52. package/server/routes/access/controllers/access.group.post.js +4 -4
  53. package/server/routes/data/controllers/cardData.js +11 -0
  54. package/server/routes/data/controllers/tableData.js +13 -4
  55. package/server/routes/menu/controllers/getMenu.js +12 -25
  56. package/dist/IconChevronDown-irxwDmQp.js +0 -26
  57. package/dist/add-page-UtwEANeW.js +0 -105
  58. package/dist/admin-interface-PJfd31TQ.js +0 -1600
  59. package/dist/admin-view-BuVQ8ziq.js +0 -383
  60. package/dist/assets/favicon.svg +0 -1
  61. package/dist/assets/logo.svg +0 -42
  62. package/dist/edit-page-Bd6VW9hb.js +0 -120
  63. package/module/settings/select/core.roles.json +0 -3
@@ -0,0 +1,92 @@
1
+ import { _ as m, u as b, a as c } from "./import-file-DgJqxKyF.js";
2
+ import { resolveComponent as h, openBlock as i, createElementBlock as d, createElementVNode as a, createBlock as p, createCommentVNode as f } from "vue";
3
+ const g = {
4
+ data() {
5
+ return {
6
+ formValues: {},
7
+ scheme: null,
8
+ table: ""
9
+ };
10
+ },
11
+ mounted() {
12
+ this.getFormScheme();
13
+ },
14
+ methods: {
15
+ flattenMenu(t) {
16
+ const e = [];
17
+ return t.forEach((o) => {
18
+ o.menu ? e.push(...this.flattenMenu(o.menu)) : e.push(o);
19
+ }), e;
20
+ },
21
+ async getFormScheme() {
22
+ const t = this.flattenMenu(b.value);
23
+ t != null && t.length || this.$router.replace("/404");
24
+ const e = t == null ? void 0 : t.find((s) => {
25
+ var r, l;
26
+ return (s == null ? void 0 : s.path) == ((l = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : l.table);
27
+ });
28
+ e || this.$router.replace("/404");
29
+ const o = e == null ? void 0 : e.table;
30
+ this.table = o;
31
+ try {
32
+ const {
33
+ data: { form: s }
34
+ } = await c.get(`/api/template/table/${o}`), { data: r } = await c.get(`/api/template/form/${s}`);
35
+ this.scheme = (r == null ? void 0 : r.schema) || r;
36
+ } catch {
37
+ }
38
+ },
39
+ async createObject() {
40
+ try {
41
+ await this.$refs.form.doValidation(), await c.post(`/api/table/${this.table}`, this.formValues), await this.$router.back(), await this.$notify({
42
+ title: "Успішно!",
43
+ message: "Об'єкт успішно створено",
44
+ type: "success"
45
+ });
46
+ } catch {
47
+ this.$notify({
48
+ title: "Помилка!",
49
+ message: "Сталася помилка",
50
+ type: "error"
51
+ });
52
+ }
53
+ }
54
+ }
55
+ }, x = { style: { width: "calc(100vw - 260px)" } }, w = { class: "h-[76px] bg-gray-50 flex items-center justify-between px-[30px]" }, y = { class: "flex items-center gap-[6px]" }, k = {
56
+ style: { height: "calc(100vh - 150px)", width: "calc(100vw - 260px)" },
57
+ class: "bg-gray-50 p-[20px] flex"
58
+ }, 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" };
59
+ function V(t, e, o, s, r, l) {
60
+ const u = h("VsForm");
61
+ return i(), d("div", x, [
62
+ a("div", w, [
63
+ e[3] || (e[3] = a("h2", { class: "text-xl font-medium" }, "Створити", -1)),
64
+ a("div", y, [
65
+ a("button", {
66
+ onClick: e[0] || (e[0] = (n) => t.$router.back()),
67
+ class: "py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"
68
+ }, " Скасувати "),
69
+ a("button", {
70
+ onClick: e[1] || (e[1] = (...n) => l.createObject && l.createObject(...n)),
71
+ class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"
72
+ }, " Зберегти ")
73
+ ])
74
+ ]),
75
+ a("div", k, [
76
+ a("div", v, [
77
+ r.scheme ? (i(), p(u, {
78
+ key: 0,
79
+ ref: "form",
80
+ scheme: r.scheme,
81
+ modelValue: r.formValues,
82
+ "onUpdate:modelValue": e[2] || (e[2] = (n) => r.formValues = n),
83
+ class: "p-0 mt-[20px]"
84
+ }, null, 8, ["scheme", "modelValue"])) : f("", !0)
85
+ ])
86
+ ])
87
+ ]);
88
+ }
89
+ const j = /* @__PURE__ */ m(g, [["render", V]]);
90
+ export {
91
+ j as default
92
+ };