@opengis/admin 0.1.92 → 0.1.94
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.
- package/dist/{IconChevronDown-KI0JSsHM.js → IconChevronDown-Ckqp2kHy.js} +1 -1
- package/dist/{add-page-BCXXk3_G.js → add-page-CA861uWt.js} +32 -31
- package/dist/{admin-interface-DeVqzwQ5.js → admin-interface-CwikaMBm.js} +369 -375
- package/dist/{admin-view-ueou40jT.js → admin-view-DqduP4RF.js} +2 -2
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +43 -43
- package/dist/{card-view-Ct56P9CD.js → card-view-DZF9Tt0-.js} +1 -1
- package/dist/{edit-page-WUjuzYcQ.js → edit-page-WEzJslvP.js} +1 -1
- package/dist/{import-file-Cobra4kl.js → import-file-BW7hdzkG.js} +17704 -17307
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/card-page-Cs-WOWvI.js +0 -364
@@ -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-BW7hdzkG.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 g, u as f, c as u } from "./import-file-BW7hdzkG.js";
|
2
|
+
import { resolveComponent as x, openBlock as b, createElementBlock as w, createElementVNode as n, createBlock as k, createCommentVNode as y } from "vue";
|
3
|
+
const v = {
|
4
4
|
data() {
|
5
5
|
return {
|
6
6
|
formValues: {},
|
@@ -15,61 +15,62 @@ const w = {
|
|
15
15
|
methods: {
|
16
16
|
flattenMenu(t) {
|
17
17
|
const e = [];
|
18
|
-
return t.forEach((
|
19
|
-
|
18
|
+
return t.forEach((o) => {
|
19
|
+
o.menu ? e.push(...this.flattenMenu(o.menu)) : e.push(o);
|
20
20
|
}), e;
|
21
21
|
},
|
22
22
|
async getFormScheme() {
|
23
23
|
var c, a;
|
24
|
-
const t = this.flattenMenu(
|
24
|
+
const t = this.flattenMenu(f.value);
|
25
25
|
t != null && t.length || this.$router.replace("/404");
|
26
26
|
const e = t == null ? void 0 : t.find((r) => {
|
27
|
-
var
|
28
|
-
return (r == null ? void 0 : r.path) == ((l = (
|
27
|
+
var s, l;
|
28
|
+
return (r == null ? void 0 : r.path) == ((l = (s = this.$route) == null ? void 0 : s.query) == null ? void 0 : l.table);
|
29
29
|
});
|
30
30
|
e || this.$router.replace("/404");
|
31
|
-
const
|
32
|
-
this.table =
|
31
|
+
const o = e == null ? void 0 : e.table;
|
32
|
+
this.table = o;
|
33
33
|
try {
|
34
|
-
const r = await
|
34
|
+
const r = await u.get(`/api/table-data/${o}`), { data: s } = await u.get(
|
35
35
|
`/api/template/form/${(c = r == null ? void 0 : r.data) == null ? void 0 : c.form}`
|
36
36
|
);
|
37
|
-
this.scheme = (
|
37
|
+
this.scheme = (s == null ? void 0 : s.schema) || s, 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,
|
42
|
+
var e, o, c, a, r, s, l, m, d;
|
43
43
|
const t = this.$refs.form;
|
44
44
|
try {
|
45
|
-
await t.doValidation(), await
|
45
|
+
await t.doValidation(), await u.post(`/api/table/${this.token}`, this.formValues), await this.$router.back(), await this.$notify({
|
46
46
|
title: "Успішно!",
|
47
47
|
message: "Об'єкт успішно створено",
|
48
48
|
type: "success"
|
49
49
|
});
|
50
|
-
} catch {
|
51
|
-
|
50
|
+
} catch (i) {
|
51
|
+
const h = ((e = i == null ? void 0 : i.response) == null ? void 0 : e.data) || "";
|
52
|
+
let p = ((r = (a = (c = (o = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : o[0]) == null ? void 0 : c[1]) == null ? void 0 : a[0]) == null ? void 0 : r.message) === "Це поле обов'язкове" ? "Заповніть обов'язкові поля" : (d = (m = (l = (s = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : s[0]) == null ? void 0 : l[1]) == null ? void 0 : m[0]) == null ? void 0 : d.message;
|
52
53
|
this.$notify({
|
53
54
|
title: "Помилка!",
|
54
|
-
message:
|
55
|
+
message: h || p || "Сталася помилка валідаціі",
|
55
56
|
type: "error"
|
56
57
|
});
|
57
58
|
}
|
58
59
|
}
|
59
60
|
}
|
60
|
-
},
|
61
|
+
}, V = {
|
61
62
|
style: { width: "calc(100vw - 260px)" },
|
62
63
|
class: "bg-gray-50"
|
63
|
-
},
|
64
|
+
}, _ = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl" }, $ = { class: "flex items-center gap-[6px]" }, j = {
|
64
65
|
style: { height: "calc(100vh - 165px)", width: "calc(100vw - 260px)" },
|
65
66
|
class: "bg-gray-50 p-[20px] flex"
|
66
|
-
},
|
67
|
-
function
|
68
|
-
const
|
69
|
-
return
|
70
|
-
n("div",
|
67
|
+
}, E = { 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" };
|
68
|
+
function O(t, e, o, c, a, r) {
|
69
|
+
const s = x("VsForm");
|
70
|
+
return b(), w("div", V, [
|
71
|
+
n("div", _, [
|
71
72
|
e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Створити", -1)),
|
72
|
-
n("div",
|
73
|
+
n("div", $, [
|
73
74
|
n("button", {
|
74
75
|
onClick: e[0] || (e[0] = (l) => t.$router.back()),
|
75
76
|
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"
|
@@ -80,21 +81,21 @@ function $(t, e, s, c, a, r) {
|
|
80
81
|
}, " Зберегти ")
|
81
82
|
])
|
82
83
|
]),
|
83
|
-
n("div",
|
84
|
-
n("div",
|
85
|
-
a.scheme ? (
|
84
|
+
n("div", j, [
|
85
|
+
n("div", E, [
|
86
|
+
a.scheme ? (b(), k(s, {
|
86
87
|
key: 0,
|
87
88
|
ref: "form",
|
88
89
|
scheme: a.scheme,
|
89
90
|
modelValue: a.formValues,
|
90
91
|
"onUpdate:modelValue": e[2] || (e[2] = (l) => a.formValues = l),
|
91
92
|
class: "p-0 mt-[20px]"
|
92
|
-
}, null, 8, ["scheme", "modelValue"])) :
|
93
|
+
}, null, 8, ["scheme", "modelValue"])) : y("", !0)
|
93
94
|
])
|
94
95
|
])
|
95
96
|
]);
|
96
97
|
}
|
97
|
-
const
|
98
|
+
const M = /* @__PURE__ */ g(v, [["render", O]]);
|
98
99
|
export {
|
99
|
-
|
100
|
+
M as default
|
100
101
|
};
|