@opengis/admin 0.2.132 → 0.2.134
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/add-page-CF6kQ1bD.js +119 -0
- package/dist/{admin-interface-CgXFerXl.js → admin-interface-DOCGrahe.js} +323 -348
- package/dist/{admin-view-t-gzhVnl.js → admin-view-CRp2iOcb.js} +256 -211
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +80 -80
- package/dist/{card-view-Dtf6Ap9G.js → card-view-CfZD7mDF.js} +1 -1
- package/dist/edit-page-BK3XPdrO.js +138 -0
- package/dist/{import-file-CztGvKRc.js → import-file-Cb13QIWH.js} +26759 -25478
- package/dist/profile-page-D1GHnV0r.js +78 -0
- package/dist/style.css +1 -1
- package/dist/user-B_2kh6ic.js +5 -0
- package/package.json +1 -1
- package/server/routes/properties/controllers/admin.properties.get.js +6 -8
- package/server/routes/properties/controllers/admin.properties.post.js +28 -7
- package/server/routes/properties/controllers/user.properties.get.js +2 -13
- package/server/routes/properties/controllers/user.properties.post.js +2 -22
- package/server/routes/properties/index.mjs +4 -4
- package/utils.js +2 -5
- package/dist/add-page-DQ70Si9f.js +0 -104
- package/dist/edit-page-BWRXfML4.js +0 -125
- package/server/routes/properties/funcs/getSettings.js +0 -56
- package/server/routes/properties/funcs/setSettings.js +0 -44
@@ -0,0 +1,78 @@
|
|
1
|
+
import { _ as n, f as m } from "./import-file-Cb13QIWH.js";
|
2
|
+
import { u as p } from "./user-B_2kh6ic.js";
|
3
|
+
import { resolveComponent as d, openBlock as u, createElementBlock as f, createElementVNode as o, createBlock as h, createCommentVNode as b } from "vue";
|
4
|
+
const x = {
|
5
|
+
data() {
|
6
|
+
return {
|
7
|
+
formScheme: null,
|
8
|
+
formValues: {}
|
9
|
+
};
|
10
|
+
},
|
11
|
+
mounted() {
|
12
|
+
this.getFormScheme();
|
13
|
+
},
|
14
|
+
computed: {
|
15
|
+
userData() {
|
16
|
+
return p.value;
|
17
|
+
}
|
18
|
+
},
|
19
|
+
methods: {
|
20
|
+
async updateUser() {
|
21
|
+
var r;
|
22
|
+
try {
|
23
|
+
await m.put(`/user/${(r = this.userData.user) == null ? void 0 : r.uid}`, this.formValues), await this.$notify({
|
24
|
+
title: "Успішно!",
|
25
|
+
message: "Дані успішно оновлені",
|
26
|
+
type: "success"
|
27
|
+
});
|
28
|
+
} catch {
|
29
|
+
this.$notify({
|
30
|
+
title: "Помилка!",
|
31
|
+
message: "Сталася помилка",
|
32
|
+
type: "error"
|
33
|
+
});
|
34
|
+
}
|
35
|
+
},
|
36
|
+
async getFormScheme() {
|
37
|
+
var r, t, a, l;
|
38
|
+
try {
|
39
|
+
const { data: e } = await m.get(
|
40
|
+
"/api/template/form/admin.profile.form"
|
41
|
+
);
|
42
|
+
console.log(this.userData);
|
43
|
+
for (const s in e == null ? void 0 : e.schema)
|
44
|
+
(t = (r = this.userData) == null ? void 0 : r.user) != null && t[s] && (this.formValues[s] = (l = (a = this.userData) == null ? void 0 : a.user) == null ? void 0 : l[s]);
|
45
|
+
this.formScheme = e.schema;
|
46
|
+
} catch (e) {
|
47
|
+
console.error(e);
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}, g = { class: "flex justify-center pt-[20px] pb-[20px] pl-[20px] h-[calc(100vh-58px)]" }, k = { class: "bg-white rounded-xl border p-[20px]" }, y = { class: "flex-1 overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-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" }, w = { class: "flex" };
|
52
|
+
function _(r, t, a, l, e, s) {
|
53
|
+
const i = d("VsForm");
|
54
|
+
return u(), f("div", g, [
|
55
|
+
o("div", k, [
|
56
|
+
t[2] || (t[2] = o("h2", { class: "mb-[20px] text-center" }, "Профіль", -1)),
|
57
|
+
o("div", y, [
|
58
|
+
e.formScheme ? (u(), h(i, {
|
59
|
+
key: 0,
|
60
|
+
scheme: e.formScheme,
|
61
|
+
modelValue: e.formValues,
|
62
|
+
"onUpdate:modelValue": t[0] || (t[0] = (c) => e.formValues = c),
|
63
|
+
class: "pb-0"
|
64
|
+
}, null, 8, ["scheme", "modelValue"])) : b("", !0),
|
65
|
+
o("div", w, [
|
66
|
+
o("button", {
|
67
|
+
onClick: t[1] || (t[1] = (...c) => s.updateUser && s.updateUser(...c)),
|
68
|
+
class: "ml-auto text-[18px] bg-blue-500 text-white px-[8px] py-[4px] rounded hover:bg-blue-700 duration-300"
|
69
|
+
}, " Зберегти ")
|
70
|
+
])
|
71
|
+
])
|
72
|
+
])
|
73
|
+
]);
|
74
|
+
}
|
75
|
+
const D = /* @__PURE__ */ n(x, [["render", _]]);
|
76
|
+
export {
|
77
|
+
D as default
|
78
|
+
};
|