@opengis/admin 0.1.66 → 0.1.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +29 -29
  2. package/config.js +4 -4
  3. package/dist/IconChevronDown-Co0qOLyQ.js +26 -0
  4. package/dist/{add-page-YonHQsF2.js → add-page-Bv-BNhYQ.js} +11 -8
  5. package/dist/{admin-interface-DSR1im5I.js → admin-interface-j3f16Iy8.js} +593 -446
  6. package/dist/{admin-view-WZhYBXYw.js → admin-view-DykzQo5I.js} +214 -223
  7. package/dist/admin.js +1 -1
  8. package/dist/admin.umd.cjs +83 -83
  9. package/dist/card-page-DtXydAxe.js +275 -0
  10. package/dist/{card-view-DYhMgpIH.js → card-view-MpG-dhK0.js} +1 -1
  11. package/dist/{edit-page-D8fMSwEp.js → edit-page-DkD5JFQv.js} +13 -12
  12. package/dist/{import-file-Do-GQQHc.js → import-file-DGI0k9si.js} +6797 -6814
  13. package/dist/style.css +1 -1
  14. package/module/settings/card/admin.roles.table/access.hbs +27 -27
  15. package/module/settings/card/admin.roles.table/general_info.hbs +16 -16
  16. package/module/settings/card/admin.roles.table/index.yml +14 -14
  17. package/module/settings/card/admin.roles.table/users.hbs +27 -27
  18. package/module/settings/card/admin.routes.table/general_info.hbs +40 -40
  19. package/module/settings/card/admin.routes.table/index.yml +8 -8
  20. package/module/settings/card/admin.routes.table/users.hbs +33 -33
  21. package/module/settings/card/admin.users.table/general_info.hbs +25 -25
  22. package/module/settings/card/admin.users.table/index.yml +12 -12
  23. package/module/settings/card/admin.users.table/logs.hbs +30 -30
  24. package/module/settings/card/admin.users.table/user_roles.hbs +24 -24
  25. package/module/settings/cls/core.actions.json +13 -13
  26. package/module/settings/cls/core.scope.json +13 -13
  27. package/module/settings/cls/properties.site_status.json +13 -13
  28. package/module/settings/cls/properties.widget_status.json +13 -13
  29. package/module/settings/cls/users.user_type.json +13 -13
  30. package/module/settings/form/admin.access.form.json +36 -36
  31. package/module/settings/form/admin.custom_column.form.json +71 -71
  32. package/module/settings/form/admin.properties.form.json +15 -15
  33. package/module/settings/form/admin.roles.form.json +19 -19
  34. package/module/settings/form/admin.routes.form.json +25 -25
  35. package/module/settings/form/admin.user_properties.form.json +15 -15
  36. package/module/settings/form/admin.user_roles.form.json +21 -21
  37. package/module/settings/form/admin.users.form.json +150 -150
  38. package/module/settings/form/user.user_roles.form.json +13 -13
  39. package/module/settings/interface/admin.properties.json +4 -4
  40. package/module/settings/interface/admin.roles.json +4 -4
  41. package/module/settings/interface/admin.routes.json +4 -4
  42. package/module/settings/interface/admin.users.json +4 -4
  43. package/module/settings/menu.json +50 -50
  44. package/module/settings/select/core.roles.json +2 -2
  45. package/module/settings/select/core.routes.sql +1 -1
  46. package/module/settings/select/core.user_uid.sql +1 -1
  47. package/module/settings/table/admin.access.table.json +77 -77
  48. package/module/settings/table/admin.custom_column.table.json +94 -94
  49. package/module/settings/table/admin.properties.table.json +33 -33
  50. package/module/settings/table/admin.roles.table.json +58 -58
  51. package/module/settings/table/admin.routes.table.json +67 -67
  52. package/module/settings/table/admin.user_properties.table.json +28 -28
  53. package/module/settings/table/admin.user_roles.table.json +66 -66
  54. package/module/settings/table/admin.users.table.json +119 -119
  55. package/package.json +81 -80
  56. package/plugin.js +100 -100
  57. package/server/helpers/controllers/badge.js +11 -11
  58. package/server/helpers/controllers/hb.js +2 -2
  59. package/server/helpers/controllers/map.js +2 -2
  60. package/server/helpers/controllers/mls.js +2 -2
  61. package/server/helpers/controllers/vue.js +2 -2
  62. package/server/helpers/index.mjs +13 -13
  63. package/server/plugins/adminHook.js +165 -165
  64. package/server/plugins/cron.js +10 -10
  65. package/server/plugins/docs.js +28 -28
  66. package/server/plugins/hook.js +152 -185
  67. package/server/plugins/vite.js +74 -69
  68. package/server/routes/calendar/controllers/calendar.data.js +88 -88
  69. package/server/routes/calendar/index.mjs +7 -17
  70. package/server/routes/calendar/schema.js +22 -0
  71. package/server/routes/data/controllers/cardData.js +57 -57
  72. package/server/routes/data/controllers/cardTabData.js +49 -49
  73. package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
  74. package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
  75. package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
  76. package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
  77. package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
  78. package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
  79. package/server/routes/data/controllers/tableData.js +112 -112
  80. package/server/routes/data/controllers/tableDataId.js +27 -27
  81. package/server/routes/data/controllers/tableFilter.js +63 -63
  82. package/server/routes/data/controllers/utils/assignTokens.js +30 -30
  83. package/server/routes/data/controllers/utils/getColumns.js +8 -8
  84. package/server/routes/data/index.mjs +15 -15
  85. package/server/routes/data/schema.js +54 -7
  86. package/server/routes/menu/controllers/getMenu.js +51 -51
  87. package/server/routes/menu/index.mjs +5 -5
  88. package/server/routes/menu/schema.js +0 -0
  89. package/server/routes/notifications/controllers/readNotifications.js +30 -30
  90. package/server/routes/notifications/controllers/userNotifications.js +64 -64
  91. package/server/routes/notifications/hook/onWidgetSet.js +57 -57
  92. package/server/routes/notifications/index.mjs +15 -40
  93. package/server/routes/notifications/schema.js +11 -0
  94. package/server/routes/properties/controllers/admin.properties.get.js +29 -29
  95. package/server/routes/properties/controllers/user.properties.get.js +34 -34
  96. package/server/routes/properties/controllers/user.properties.post.js +30 -30
  97. package/server/routes/properties/funcs/getSettings.js +56 -56
  98. package/server/routes/properties/funcs/setSettings.js +44 -44
  99. package/server/routes/properties/funcs/utils/dataInsert.js +26 -26
  100. package/server/routes/properties/index.mjs +14 -26
  101. package/server/routes/properties/schema.js +11 -0
  102. package/server/routes/root.mjs +3 -3
  103. package/server/routes/templates/controllers/getTemplate.js +22 -22
  104. package/server/routes/templates/index.mjs +14 -14
  105. package/server/routes/templates/scheme.js +9 -0
  106. package/server/templates/cls/itree.recrzone_category.json +73 -73
  107. package/server/templates/cls/test.json +9 -9
  108. package/server/templates/form/admin.user_cls.data.form.json +49 -49
  109. package/server/templates/form/admin.user_group_rel.form.json +21 -21
  110. package/server/templates/form/cp_building.form.json +32 -32
  111. package/server/templates/form/form-user-pass.json +10 -10
  112. package/server/templates/form/form-user_group.json +39 -39
  113. package/server/templates/form/form-users.json +156 -156
  114. package/server/templates/form/user_group_access.form.json +22 -22
  115. package/server/templates/select/account_id.json +2 -2
  116. package/server/templates/table/gis.dataset.table.json +43 -43
  117. package/server/templates/table/management.user_group.table.json +112 -112
  118. package/server/templates/table/management.users.table.json +126 -126
  119. package/utils.js +21 -21
  120. package/dist/card-page-BH8lGOKk.js +0 -230
@@ -0,0 +1,275 @@
1
+ import { g as V, h as z, _ as A, u as L, a as q } from "./import-file-DGI0k9si.js";
2
+ import { computed as B, resolveComponent as R, openBlock as r, createElementBlock as s, createElementVNode as u, toDisplayString as M, createVNode as N, withCtx as E, createTextVNode as S, createBlock as H, createCommentVNode as b, normalizeClass as j, Fragment as w, renderList as C, resolveDynamicComponent as T } from "vue";
3
+ const G = { class: "h-[76px] bg-white border rounded-xl flex items-center justify-between px-[20px] mb-[16px]" }, O = { class: "text-lg font-semibold md:text-xl text-stone-800 dark:text-neutral-200" }, F = { class: "flex items-center gap-[6px]" }, I = {
4
+ __name: "admin-card-header",
5
+ props: {
6
+ title: {
7
+ type: String
8
+ },
9
+ getRoute: {
10
+ type: String,
11
+ required: !0
12
+ }
13
+ },
14
+ setup(n) {
15
+ const c = n, a = V(), l = z(), t = () => {
16
+ a.back();
17
+ }, d = B(
18
+ () => {
19
+ var x;
20
+ return `/edit?table=${c.getRoute}&id=${(x = l == null ? void 0 : l.params) == null ? void 0 : x.id}`;
21
+ }
22
+ );
23
+ return (x, g) => {
24
+ const v = R("router-link");
25
+ return r(), s("div", G, [
26
+ u("div", null, [
27
+ u("button", {
28
+ onClick: t,
29
+ class: "text-sm h-[20px] text-blue-600 font-medium hover:border-b-2 hover:border-b-blue-500"
30
+ }, " До таблиці "),
31
+ u("h2", O, M(n.title), 1)
32
+ ]),
33
+ u("div", F, [
34
+ N(v, {
35
+ to: d.value,
36
+ 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"
37
+ }, {
38
+ default: E(() => g[0] || (g[0] = [
39
+ S(" Редагувати ")
40
+ ])),
41
+ _: 1
42
+ }, 8, ["to"])
43
+ ])
44
+ ]);
45
+ };
46
+ }
47
+ }, P = {
48
+ components: { AdminCardHeader: I },
49
+ data() {
50
+ return {
51
+ objectData: null,
52
+ component: ""
53
+ };
54
+ },
55
+ computed: {
56
+ getRoute() {
57
+ const n = this.flattenMenu(L.value);
58
+ n != null && n.length || this.$router.replace("/404");
59
+ const c = n == null ? void 0 : n.find((a) => {
60
+ var l, t;
61
+ return (a == null ? void 0 : a.table) == ((t = (l = this.$route) == null ? void 0 : l.params) == null ? void 0 : t.table);
62
+ });
63
+ return c || this.$router.replace("/404"), c == null ? void 0 : c.path;
64
+ },
65
+ getTitle() {
66
+ var n, c, a, l, t, d, x, g, v, e, i, D, o, k, _;
67
+ if ((a = (c = (n = this.objectData) == null ? void 0 : n.rows) == null ? void 0 : c[0]) != null && a.name)
68
+ return ((x = (d = (t = (l = this.objectData) == null ? void 0 : l.rows) == null ? void 0 : t[0]) == null ? void 0 : d.name) == null ? void 0 : x.length) < 35 ? (e = (v = (g = this.objectData) == null ? void 0 : g.rows) == null ? void 0 : v[0]) == null ? void 0 : e.name : ((k = (o = (D = (i = this.objectData) == null ? void 0 : i.rows) == null ? void 0 : D[0]) == null ? void 0 : o.name) == null ? void 0 : k.slice(0, 35)) + " ...";
69
+ {
70
+ const p = (_ = this.flattenMenu(L.value)) == null ? void 0 : _.find(
71
+ (h) => {
72
+ var f, y;
73
+ return (h == null ? void 0 : h.table) === ((y = (f = this.$route) == null ? void 0 : f.params) == null ? void 0 : y.table);
74
+ }
75
+ );
76
+ return p == null ? void 0 : p.ua;
77
+ }
78
+ }
79
+ },
80
+ async mounted() {
81
+ await this.getObjectData(), await this.checkActiveComponent();
82
+ },
83
+ watch: {
84
+ component(n) {
85
+ this.$router.replace({ ...this.$route, query: { tab: n } });
86
+ }
87
+ },
88
+ methods: {
89
+ async getObjectData() {
90
+ var a;
91
+ const { table: n, id: c } = (a = this.$route) == null ? void 0 : a.params;
92
+ (!n || !c) && this.$router.replace("/404");
93
+ try {
94
+ const { data: l } = await q.get(`/api/table-data/${n}/${c}`);
95
+ this.objectData = l;
96
+ } catch (l) {
97
+ console.error(l);
98
+ }
99
+ },
100
+ getColClass(n) {
101
+ return `col-span-${n || 12}`;
102
+ },
103
+ getGridClass() {
104
+ return "grid-cols-12";
105
+ },
106
+ checkActiveComponent() {
107
+ var n, c, a, l, t, d, x, g, v;
108
+ if ((c = (n = this.$route) == null ? void 0 : n.query) != null && c.tab)
109
+ this.component = (l = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : l.tab;
110
+ else {
111
+ const e = (d = (t = this.objectData) == null ? void 0 : t.panels) == null ? void 0 : d.find((i) => (i == null ? void 0 : i.type) === "tabs");
112
+ (x = e == null ? void 0 : e.items) != null && x.length && (this.component = ((g = e.items[0]) == null ? void 0 : g.component) || ((v = e.items[0]) == null ? void 0 : v.name));
113
+ }
114
+ },
115
+ flattenMenu(n) {
116
+ const c = [];
117
+ return n.forEach((a) => {
118
+ a.menu ? c.push(...this.flattenMenu(a.menu)) : c.push(a);
119
+ }), c;
120
+ }
121
+ }
122
+ }, $ = {
123
+ style: { width: "calc(100vw - 260px)", height: "calc(100vh - 60px)" },
124
+ class: "p-4 overflow-y-auto bg-gray-50"
125
+ }, J = {
126
+ key: 0,
127
+ class: "bg-white border rounded-xl"
128
+ }, K = { class: "p-[10px] pl-[20px] text-md font-[500]" }, Q = ["innerHTML"], U = { key: 1 }, W = { class: "p-[10px] pl-[20px] text-md font-[500]" }, X = {
129
+ key: 0,
130
+ class: "p-[20px] border-t"
131
+ }, Y = {
132
+ key: 1,
133
+ class: "p-[20px] border-t"
134
+ }, Z = ["innerHTML"], m = { class: "flex space-x-1 w-full bg-white border border-b-0 rounded-tr-xl rounded-tl-xl h-[60px] items-center pl-[20px]" }, oo = ["onClick"], eo = {
135
+ key: 0,
136
+ class: "bg-white border border-t-0 rounded-bl-xl rounded-br-xl"
137
+ }, to = {
138
+ key: 0,
139
+ class: "p-[20px] border-t"
140
+ }, ro = {
141
+ key: 1,
142
+ class: "p-[20px] border-t"
143
+ }, no = ["innerHTML"], so = {
144
+ key: 3,
145
+ class: "flex"
146
+ }, co = { class: "flex flex-col space-y-2 w-[200px] border rounded-xl mr-4 h-auto items-start pl-[10px] bg-white py-[20px]" }, ao = ["onClick"], lo = { class: "flex-grow" }, uo = {
147
+ key: 0,
148
+ class: "h-full bg-white border rounded-xl"
149
+ }, po = {
150
+ key: 0,
151
+ class: "p-[20px]"
152
+ }, ho = {
153
+ key: 1,
154
+ class: "p-[20px] border-t"
155
+ }, bo = ["innerHTML"];
156
+ function xo(n, c, a, l, t, d) {
157
+ var g, v;
158
+ const x = R("AdminCardHeader");
159
+ return r(), s("div", $, [
160
+ ((g = t.objectData) == null ? void 0 : g.isHeader) !== !1 ? (r(), H(x, {
161
+ key: 0,
162
+ title: d.getTitle,
163
+ "get-route": d.getRoute
164
+ }, null, 8, ["title", "get-route"])) : b("", !0),
165
+ u("div", {
166
+ class: j(["grid gap-[20px]", d.getGridClass()])
167
+ }, [
168
+ (r(!0), s(w, null, C((v = t.objectData) == null ? void 0 : v.panels, (e, i) => {
169
+ var D;
170
+ return r(), s("div", {
171
+ key: i,
172
+ class: j(d.getColClass(e.col))
173
+ }, [
174
+ e != null && e.name ? (r(), s("div", J, [
175
+ u("h2", K, M((e == null ? void 0 : e.title) || "Панель"), 1),
176
+ u("div", {
177
+ class: "p-[20px] border-t",
178
+ innerHTML: (D = t.objectData) == null ? void 0 : D.data[e == null ? void 0 : e.name]
179
+ }, null, 8, Q)
180
+ ])) : e.type === "container" ? (r(), s("div", U, [
181
+ (r(!0), s(w, null, C(e.items, (o, k) => {
182
+ var _, p, h, f, y;
183
+ return r(), s("div", {
184
+ key: k,
185
+ class: j([{ "mb-[20px]": e.items.length > 1 }, "border rounded-xl bg-white"])
186
+ }, [
187
+ u("h2", W, M((o == null ? void 0 : o.title) || "Панель"), 1),
188
+ o != null && o.component ? (r(), s("div", X, [
189
+ (r(), H(T(o.component), {
190
+ geometry: (p = (_ = t.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : p.geom,
191
+ zoom: 16,
192
+ id: (f = (h = n.$route) == null ? void 0 : h.params) == null ? void 0 : f.id
193
+ }, null, 8, ["geometry", "id"]))
194
+ ])) : b("", !0),
195
+ o != null && o.name ? (r(), s("div", Y, [
196
+ u("div", {
197
+ innerHTML: (y = t.objectData) == null ? void 0 : y.data[o == null ? void 0 : o.name]
198
+ }, null, 8, Z)
199
+ ])) : b("", !0)
200
+ ], 2);
201
+ }), 128))
202
+ ])) : b("", !0),
203
+ (e == null ? void 0 : e.type) === "tabs" ? (r(), s(w, { key: 2 }, [
204
+ u("nav", m, [
205
+ (r(!0), s(w, null, C(e == null ? void 0 : e.items, (o) => (r(), s("button", {
206
+ key: (o == null ? void 0 : o.name) || (o == null ? void 0 : o.component),
207
+ onClick: (k) => t.component = (o == null ? void 0 : o.component) || (o == null ? void 0 : o.name),
208
+ class: j(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none", {
209
+ " font-semibold after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800": t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name),
210
+ "": t.component !== (o == null ? void 0 : o.component) && t.component !== (o == null ? void 0 : o.name)
211
+ }])
212
+ }, M(o == null ? void 0 : o.title), 11, oo))), 128))
213
+ ]),
214
+ (r(!0), s(w, null, C(e.items, (o, k) => {
215
+ var _, p, h, f, y;
216
+ return r(), s(w, { key: k }, [
217
+ t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name) ? (r(), s("div", eo, [
218
+ o != null && o.component ? (r(), s("div", to, [
219
+ (r(), H(T(o.component), {
220
+ geometry: (p = (_ = t.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : p.geom,
221
+ zoom: 16,
222
+ id: (f = (h = n.$route) == null ? void 0 : h.params) == null ? void 0 : f.id
223
+ }, null, 8, ["geometry", "id"]))
224
+ ])) : b("", !0),
225
+ o != null && o.name ? (r(), s("div", ro, [
226
+ u("div", {
227
+ innerHTML: (y = t.objectData) == null ? void 0 : y.data[o == null ? void 0 : o.name]
228
+ }, null, 8, no)
229
+ ])) : b("", !0)
230
+ ])) : b("", !0)
231
+ ], 64);
232
+ }), 128))
233
+ ], 64)) : b("", !0),
234
+ (e == null ? void 0 : e.type) === "vertical_tabs" ? (r(), s("div", so, [
235
+ u("nav", co, [
236
+ (r(!0), s(w, null, C(e == null ? void 0 : e.items, (o) => (r(), s("button", {
237
+ key: (o == null ? void 0 : o.name) || (o == null ? void 0 : o.component),
238
+ onClick: (k) => t.component = (o == null ? void 0 : o.component) || (o == null ? void 0 : o.name),
239
+ class: j(["relative inline-flex items-center w-full py-1 text-sm border-transparent pe-4 gap-x-2 border-e-2 whitespace-nowrap hover:text-blue-600 focus:outline-none focus:text-blue-600", {
240
+ "font-semibold after:absolute after:top-[0] after:right-[-1px] after:h-full text-blue-600 after:w-[2px] after:bg-blue-600 ": t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name),
241
+ "text-gray-500": t.component !== (o == null ? void 0 : o.component) && t.component !== (o == null ? void 0 : o.name)
242
+ }])
243
+ }, M(o == null ? void 0 : o.title), 11, ao))), 128))
244
+ ]),
245
+ u("div", lo, [
246
+ (r(!0), s(w, null, C(e.items, (o, k) => {
247
+ var _, p, h, f, y;
248
+ return r(), s(w, { key: k }, [
249
+ t.component === (o == null ? void 0 : o.component) || t.component === (o == null ? void 0 : o.name) ? (r(), s("div", uo, [
250
+ o != null && o.component ? (r(), s("div", po, [
251
+ (r(), H(T(o.component), {
252
+ geometry: (p = (_ = t.objectData) == null ? void 0 : _.rows[0]) == null ? void 0 : p.geom,
253
+ zoom: 16,
254
+ id: (f = (h = n.$route) == null ? void 0 : h.params) == null ? void 0 : f.id
255
+ }, null, 8, ["geometry", "id"]))
256
+ ])) : b("", !0),
257
+ o != null && o.name ? (r(), s("div", ho, [
258
+ u("div", {
259
+ innerHTML: (y = t.objectData) == null ? void 0 : y.data[o == null ? void 0 : o.name]
260
+ }, null, 8, bo)
261
+ ])) : b("", !0)
262
+ ])) : b("", !0)
263
+ ], 64);
264
+ }), 128))
265
+ ])
266
+ ])) : b("", !0)
267
+ ], 2);
268
+ }), 128))
269
+ ], 2)
270
+ ]);
271
+ }
272
+ const fo = /* @__PURE__ */ A(P, [["render", xo], ["__scopeId", "data-v-611b5b18"]]);
273
+ export {
274
+ fo as default
275
+ };
@@ -1,5 +1,5 @@
1
1
  import { resolveComponent as e, openBlock as r, createBlock as t } from "vue";
2
- import { _ as c } from "./import-file-Do-GQQHc.js";
2
+ import { _ as c } from "./import-file-DGI0k9si.js";
3
3
  const n = {};
4
4
  function s(_, p, a, i, f, m) {
5
5
  const o = e("router-view");
@@ -1,5 +1,5 @@
1
- import { _ as b, u as h, a as c } from "./import-file-Do-GQQHc.js";
2
- import { resolveComponent as d, openBlock as m, createElementBlock as p, createElementVNode as l, createBlock as f, createCommentVNode as g } from "vue";
1
+ import { _ as b, u as d, a as c } from "./import-file-DGI0k9si.js";
2
+ import { resolveComponent as h, openBlock as m, createElementBlock as p, createElementVNode as l, createBlock as f, createCommentVNode as g } from "vue";
3
3
  const x = {
4
4
  data() {
5
5
  return {
@@ -20,7 +20,7 @@ const x = {
20
20
  },
21
21
  async getFormScheme() {
22
22
  var u, a;
23
- const t = this.flattenMenu(h.value);
23
+ const t = this.flattenMenu(d.value);
24
24
  t != null && t.length || this.$router.replace("/404");
25
25
  const e = t == null ? void 0 : t.find((o) => {
26
26
  var n, s;
@@ -32,12 +32,10 @@ const x = {
32
32
  try {
33
33
  const {
34
34
  data: { token: o, form: n }
35
- } = await c.get(`/api/template/table/${r}`), {
36
- data: s
37
- } = await c.get(
35
+ } = await c.get(`/api/template/table/${r}`), { data: s } = await c.get(
38
36
  `/api/table/${this.table}/${(a = (u = this.$route) == null ? void 0 : u.query) == null ? void 0 : a.id}`
39
37
  );
40
- this.formValues = s;
38
+ this.formValues = s || {};
41
39
  const { data: i } = await c.get(`/api/template/form/${o || n}`);
42
40
  this.scheme = (i == null ? void 0 : i.schema) || i;
43
41
  } catch {
@@ -63,23 +61,26 @@ const x = {
63
61
  }
64
62
  }
65
63
  }
66
- }, w = { style: { width: "calc(100vw - 260px)" } }, y = { class: "h-[76px] bg-gray-50 flex items-center justify-between px-[30px]" }, k = { class: "flex items-center gap-[6px]" }, v = {
67
- style: { height: "calc(100vh - 140px)", width: "calc(100vw - 260px)" },
64
+ }, w = {
65
+ style: { width: "calc(100vw - 260px)" },
66
+ class: "bg-gray-50"
67
+ }, y = { 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]" }, v = {
68
+ style: { height: "calc(100vh - 155px)", width: "calc(100vw - 260px)" },
68
69
  class: "bg-gray-50 p-[20px] flex"
69
70
  }, $ = { 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" };
70
71
  function V(t, e, r, u, a, o) {
71
- const n = d("VsForm");
72
+ const n = h("VsForm");
72
73
  return m(), p("div", w, [
73
74
  l("div", y, [
74
75
  e[3] || (e[3] = l("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
75
76
  l("div", k, [
76
77
  l("button", {
77
78
  onClick: e[0] || (e[0] = (s) => t.$router.back()),
78
- 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"
79
+ 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"
79
80
  }, " Скасувати "),
80
81
  l("button", {
81
82
  onClick: e[1] || (e[1] = (...s) => o.editObject && o.editObject(...s)),
82
- 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"
83
+ 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"
83
84
  }, " Зберегти ")
84
85
  ])
85
86
  ]),