@opengis/admin 0.4.40 → 0.4.42
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/{add-page-D9YJ_59A.js → add-page-Hjrie81q.js} +1 -1
- package/dist/{admin-interface-CWubzRXu.js → admin-interface-FL4kR5LT.js} +1 -1
- package/dist/{admin-view-sijvfL-u.js → admin-view-BGZFxX9d.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +30 -30
- package/dist/{card-view-DGOoNFbq.js → card-view-CUEzdvrO.js} +1 -1
- package/dist/{edit-page-DQa7-Of0.js → edit-page-C_BUGbHd.js} +29 -29
- package/dist/{import-file-Co2iKD-h.js → import-file-BJjaVke8.js} +7 -7
- package/dist/{profile-page-ZRapafOD.js → profile-page-Dt-P9hyg.js} +1 -1
- package/package.json +2 -2
- package/plugin.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as $, f as d, u as k, s as V } from "./import-file-
|
|
1
|
+
import { _ as $, f as d, u as k, s as V } from "./import-file-BJjaVke8.js";
|
|
2
2
|
import { resolveComponent as j, createElementBlock as g, openBlock as p, createElementVNode as m, createCommentVNode as b, normalizeClass as x, normalizeStyle as y, createBlock as E } from "vue";
|
|
3
3
|
const O = {
|
|
4
4
|
data() {
|
|
@@ -26,12 +26,12 @@ const O = {
|
|
|
26
26
|
}), e;
|
|
27
27
|
},
|
|
28
28
|
async getFormScheme() {
|
|
29
|
-
var
|
|
29
|
+
var a, o;
|
|
30
30
|
const t = this.flattenMenu(k.value);
|
|
31
31
|
t != null && t.length || this.$router.replace("/404");
|
|
32
32
|
const e = t == null ? void 0 : t.find((s) => {
|
|
33
|
-
var
|
|
34
|
-
return (s == null ? void 0 : s.path) == ((
|
|
33
|
+
var i, r;
|
|
34
|
+
return (s == null ? void 0 : s.path) == ((r = (i = this.$route) == null ? void 0 : i.query) == null ? void 0 : r.table);
|
|
35
35
|
});
|
|
36
36
|
e || this.$router.replace("/404");
|
|
37
37
|
const n = e == null ? void 0 : e.table;
|
|
@@ -39,17 +39,17 @@ const O = {
|
|
|
39
39
|
try {
|
|
40
40
|
const {
|
|
41
41
|
data: { form: s }
|
|
42
|
-
} = await d.get(`/api/template/table/${n}`), { data:
|
|
43
|
-
`/api/table/${this.table}/${(
|
|
42
|
+
} = await d.get(`/api/template/table/${n}`), { data: i } = await d.get(
|
|
43
|
+
`/api/table/${this.table}/${(o = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : o.id}`
|
|
44
44
|
);
|
|
45
|
-
this.
|
|
46
|
-
const { data:
|
|
47
|
-
this.scheme = (
|
|
45
|
+
this.formValues = i || {};
|
|
46
|
+
const { data: r } = await d.get(`/api/form/${s}`);
|
|
47
|
+
this.scheme = (r == null ? void 0 : r.schema) || r, this.style = (r == null ? void 0 : r.style) || null, this.token = (r == null ? void 0 : r.token) || "";
|
|
48
48
|
} catch {
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
async onlyEditObject() {
|
|
52
|
-
var e, n,
|
|
52
|
+
var e, n, a, o, s, i, r, u, l, c, f;
|
|
53
53
|
const t = (n = (e = this.$refs.form) == null ? void 0 : e.$refs) == null ? void 0 : n.form;
|
|
54
54
|
try {
|
|
55
55
|
await t.doValidation(), await d.put(`/api/table/${this.token}`, this.formValues), await this.$notify({
|
|
@@ -58,8 +58,8 @@ const O = {
|
|
|
58
58
|
type: "success"
|
|
59
59
|
});
|
|
60
60
|
} catch (h) {
|
|
61
|
-
const w = ((
|
|
62
|
-
let v = ((
|
|
61
|
+
const w = ((a = h == null ? void 0 : h.response) == null ? void 0 : a.data) || "";
|
|
62
|
+
let v = ((r = (i = (s = (o = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : o[0]) == null ? void 0 : s[1]) == null ? void 0 : i[0]) == null ? void 0 : r.message) === "Це поле обов'язкове" ? "Заповніть обов'язкові поля" : (f = (c = (l = (u = Object.entries(t == null ? void 0 : t.formErrors)) == null ? void 0 : u[0]) == null ? void 0 : l[1]) == null ? void 0 : c[0]) == null ? void 0 : f.message;
|
|
63
63
|
this.$notify({
|
|
64
64
|
title: "Помилка!",
|
|
65
65
|
message: w || v || "Сталася помилка валідаціі",
|
|
@@ -70,18 +70,18 @@ const O = {
|
|
|
70
70
|
getGroupedErrorNotification(t, e) {
|
|
71
71
|
if (!t || !e) return "";
|
|
72
72
|
const n = {};
|
|
73
|
-
return Object.entries(t).forEach(([
|
|
74
|
-
var
|
|
75
|
-
const
|
|
73
|
+
return Object.entries(t).forEach(([o, s]) => {
|
|
74
|
+
var r;
|
|
75
|
+
const i = ((r = e[o]) == null ? void 0 : r.ua) || o;
|
|
76
76
|
s.forEach((u) => {
|
|
77
77
|
const l = u.message;
|
|
78
|
-
n[l] || (n[l] = []), n[l].push(`"${
|
|
78
|
+
n[l] || (n[l] = []), n[l].push(`"${i}"`);
|
|
79
79
|
});
|
|
80
|
-
}), Object.entries(n).map(([
|
|
80
|
+
}), Object.entries(n).map(([o, s]) => `<b>${o}:</b> ${s.join(", ")}`).join("<br>") || "Сталася помилка валідації";
|
|
81
81
|
},
|
|
82
82
|
async editObjectAndRedirect(t = !0) {
|
|
83
|
-
var n,
|
|
84
|
-
const e = (
|
|
83
|
+
var n, a;
|
|
84
|
+
const e = (a = (n = this.$refs.form) == null ? void 0 : n.$refs) == null ? void 0 : a.form;
|
|
85
85
|
try {
|
|
86
86
|
t && await e.doValidation(), await d.put(
|
|
87
87
|
`/api/table/${this.token}${t ? "" : "?draft=1"}`,
|
|
@@ -105,9 +105,9 @@ const O = {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}, C = { class: "bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw]" }, M = { class: "h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl" }, _ = { class: "flex items-center gap-[6px]" }, N = { class: "bg-white w-full rounded-xl" };
|
|
108
|
-
function A(t, e, n,
|
|
109
|
-
var
|
|
110
|
-
const
|
|
108
|
+
function A(t, e, n, a, o, s) {
|
|
109
|
+
var r, u, l;
|
|
110
|
+
const i = j("VsFormWithNavigation");
|
|
111
111
|
return p(), g("div", C, [
|
|
112
112
|
m("div", M, [
|
|
113
113
|
e[4] || (e[4] = m("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
|
|
@@ -116,7 +116,7 @@ function A(t, e, n, i, r, s) {
|
|
|
116
116
|
onClick: e[0] || (e[0] = (c) => t.$router.back()),
|
|
117
117
|
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"
|
|
118
118
|
}, " Скасувати "),
|
|
119
|
-
(
|
|
119
|
+
(r = o.style) != null && r.draft ? (p(), g("button", {
|
|
120
120
|
key: 0,
|
|
121
121
|
onClick: e[1] || (e[1] = (c) => s.editObjectAndRedirect(!1)),
|
|
122
122
|
class: x(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${s.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${s.color}-800 hover:text-white`)
|
|
@@ -134,14 +134,14 @@ function A(t, e, n, i, r, s) {
|
|
|
134
134
|
class: "bg-gray-100 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw] overflow-hidden"
|
|
135
135
|
}, [
|
|
136
136
|
m("div", N, [
|
|
137
|
-
|
|
137
|
+
o.scheme ? (p(), E(i, {
|
|
138
138
|
key: 0,
|
|
139
139
|
ref: "form",
|
|
140
|
-
scheme:
|
|
141
|
-
columns: (l =
|
|
142
|
-
style: y(
|
|
143
|
-
modelValue:
|
|
144
|
-
"onUpdate:modelValue": e[3] || (e[3] = (c) =>
|
|
140
|
+
scheme: o.scheme,
|
|
141
|
+
columns: (l = o.style) == null ? void 0 : l.columns,
|
|
142
|
+
style: y(o.style),
|
|
143
|
+
modelValue: o.formValues,
|
|
144
|
+
"onUpdate:modelValue": e[3] || (e[3] = (c) => o.formValues = c),
|
|
145
145
|
class: "p-[20px] h-full"
|
|
146
146
|
}, null, 8, ["scheme", "columns", "style", "modelValue"])) : b("", !0)
|
|
147
147
|
])
|
|
@@ -3540,27 +3540,27 @@ const cM = [
|
|
|
3540
3540
|
{
|
|
3541
3541
|
name: "edit",
|
|
3542
3542
|
path: "/edit",
|
|
3543
|
-
component: () => import("./edit-page-
|
|
3543
|
+
component: () => import("./edit-page-C_BUGbHd.js")
|
|
3544
3544
|
},
|
|
3545
3545
|
{
|
|
3546
3546
|
name: "add",
|
|
3547
3547
|
path: "/add",
|
|
3548
|
-
component: () => import("./add-page-
|
|
3548
|
+
component: () => import("./add-page-Hjrie81q.js")
|
|
3549
3549
|
},
|
|
3550
3550
|
{
|
|
3551
3551
|
path: "/profile",
|
|
3552
3552
|
name: "profile",
|
|
3553
|
-
component: () => import("./profile-page-
|
|
3553
|
+
component: () => import("./profile-page-Dt-P9hyg.js")
|
|
3554
3554
|
},
|
|
3555
3555
|
{
|
|
3556
3556
|
name: "card-view",
|
|
3557
3557
|
path: "/card",
|
|
3558
|
-
component: () => import("./card-view-
|
|
3558
|
+
component: () => import("./card-view-CUEzdvrO.js"),
|
|
3559
3559
|
children: [
|
|
3560
3560
|
{
|
|
3561
3561
|
name: "table",
|
|
3562
3562
|
path: ":table",
|
|
3563
|
-
component: () => import("./card-view-
|
|
3563
|
+
component: () => import("./card-view-CUEzdvrO.js"),
|
|
3564
3564
|
children: [
|
|
3565
3565
|
{
|
|
3566
3566
|
name: "card",
|
|
@@ -3621,14 +3621,14 @@ const pM = /* @__PURE__ */ gt(uM, [["render", fM]]), mM = (t) => {
|
|
|
3621
3621
|
{
|
|
3622
3622
|
path: "/",
|
|
3623
3623
|
name: "home",
|
|
3624
|
-
component: () => import("./admin-view-
|
|
3624
|
+
component: () => import("./admin-view-BGZFxX9d.js"),
|
|
3625
3625
|
children: [
|
|
3626
3626
|
...t,
|
|
3627
3627
|
...e,
|
|
3628
3628
|
// { path: '/', redirect: '/home' },
|
|
3629
3629
|
{
|
|
3630
3630
|
path: "/:catchAll(.*)",
|
|
3631
|
-
component: () => import("./admin-interface-
|
|
3631
|
+
component: () => import("./admin-interface-FL4kR5LT.js")
|
|
3632
3632
|
}
|
|
3633
3633
|
]
|
|
3634
3634
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as u, f as a } from "./import-file-
|
|
1
|
+
import { _ as u, f as a } from "./import-file-BJjaVke8.js";
|
|
2
2
|
import "./user-DCzCj0wb.js";
|
|
3
3
|
import { resolveComponent as m, createElementBlock as p, openBlock as c, createElementVNode as r, createTextVNode as d, toDisplayString as b, createBlock as h, createCommentVNode as f } from "vue";
|
|
4
4
|
const g = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengis/admin",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.42",
|
|
4
4
|
"description": "This project Softpro Admin",
|
|
5
5
|
"main": "dist/admin.js",
|
|
6
6
|
"type": "module",
|
|
@@ -79,4 +79,4 @@
|
|
|
79
79
|
"eslint-plugin-vue": "^9.33.0",
|
|
80
80
|
"sass-embedded": "1.89.2"
|
|
81
81
|
}
|
|
82
|
-
}
|
|
82
|
+
}
|
package/plugin.js
CHANGED
|
@@ -21,7 +21,7 @@ async function plugin(fastify, opts = config) {
|
|
|
21
21
|
// fastify.register(import('./server/routes/templates/index.mjs'), opts);
|
|
22
22
|
// fastify.register(import('./server/routes/menu/index.mjs'), opts);
|
|
23
23
|
// fastify.register(import('./server/routes/data/index.mjs'), opts);
|
|
24
|
-
fastify.register(import('./server/routes/user/index.mjs'), opts);
|
|
24
|
+
// fastify.register(import('./server/routes/user/index.mjs'), opts);
|
|
25
25
|
// fastify.register(import('./server/routes/widget/index.mjs'), opts); // moved to core
|
|
26
26
|
// fastify.register(import('./server/routes/access/index.mjs'), opts); // moved to core
|
|
27
27
|
// fastify.register(import('./server/routes/report/index.mjs'), opts);
|