@opengis/admin 0.1.56 → 0.1.58
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +29 -29
- package/config.js +4 -4
- package/dist/{add-page-B8kJBazL.js → add-page-d6TCPawD.js} +1 -1
- package/dist/{admin-interface-DWshL-SZ.js → admin-interface-w6YuIWM3.js} +8 -8
- package/dist/{admin-view-DdkTlobT.js → admin-view-3Sz3UF_y.js} +32 -44
- package/dist/admin.js +2 -2
- package/dist/admin.umd.cjs +47 -47
- package/dist/card-page-BsQts5XS.js +230 -0
- package/dist/{card-view-BO_4pVnc.js → card-view-UYkkl_Pu.js} +1 -1
- package/dist/{edit-page-CO36ZCNA.js → edit-page-CtKHElG1.js} +1 -1
- package/dist/{import-file-qXjEXyOF.js → import-file-CsCQ5xvs.js} +2432 -2417
- package/dist/style.css +1 -1
- package/module/settings/card/admin.roles.table/access.hbs +27 -27
- package/module/settings/card/admin.roles.table/general_info.hbs +16 -16
- package/module/settings/card/admin.roles.table/index.yml +14 -14
- package/module/settings/card/admin.roles.table/users.hbs +27 -27
- package/module/settings/card/admin.routes.table/general_info.hbs +40 -40
- package/module/settings/card/admin.routes.table/index.yml +8 -8
- package/module/settings/card/admin.routes.table/users.hbs +33 -33
- package/module/settings/card/admin.users.table/general_info.hbs +25 -25
- package/module/settings/card/admin.users.table/index.yml +12 -12
- package/module/settings/card/admin.users.table/logs.hbs +30 -30
- package/module/settings/card/admin.users.table/user_roles.hbs +24 -24
- package/module/settings/cls/core.actions.json +13 -13
- package/module/settings/cls/core.scope.json +13 -13
- package/module/settings/cls/properties.site_status.json +13 -13
- package/module/settings/cls/properties.widget_status.json +13 -13
- package/module/settings/cls/users.user_type.json +13 -13
- package/module/settings/form/admin.access.form.json +36 -36
- package/module/settings/form/admin.custom_column.form.json +71 -71
- package/module/settings/form/admin.properties.form.json +15 -15
- package/module/settings/form/admin.roles.form.json +19 -19
- package/module/settings/form/admin.routes.form.json +25 -25
- package/module/settings/form/admin.user_properties.form.json +15 -15
- package/module/settings/form/admin.user_roles.form.json +21 -21
- package/module/settings/form/admin.users.form.json +150 -150
- package/module/settings/form/user.user_roles.form.json +13 -13
- package/module/settings/interface/admin.properties.json +4 -4
- package/module/settings/interface/admin.roles.json +4 -4
- package/module/settings/interface/admin.routes.json +4 -4
- package/module/settings/interface/admin.users.json +4 -4
- package/module/settings/menu.json +50 -50
- package/module/settings/select/core.roles.json +2 -2
- package/module/settings/select/core.routes.sql +1 -1
- package/module/settings/select/core.user_uid.sql +1 -1
- package/module/settings/table/admin.access.table.json +77 -77
- package/module/settings/table/admin.custom_column.table.json +94 -94
- package/module/settings/table/admin.properties.table.json +33 -33
- package/module/settings/table/admin.roles.table.json +58 -58
- package/module/settings/table/admin.routes.table.json +67 -67
- package/module/settings/table/admin.user_properties.table.json +28 -28
- package/module/settings/table/admin.user_roles.table.json +66 -66
- package/module/settings/table/admin.users.table.json +119 -119
- package/package.json +81 -81
- package/plugin.js +162 -162
- package/server/helpers/controllers/badge.js +11 -11
- package/server/helpers/controllers/hb.js +2 -2
- package/server/helpers/controllers/map.js +2 -2
- package/server/helpers/controllers/mls.js +2 -2
- package/server/helpers/controllers/vue.js +2 -2
- package/server/helpers/index.mjs +13 -13
- package/server/plugins/docs.js +28 -28
- package/server/plugins/hook.js +228 -229
- package/server/plugins/vite.js +69 -69
- package/server/routes/calendar/controllers/calendar.data.js +88 -88
- package/server/routes/calendar/index.mjs +17 -17
- package/server/routes/data/controllers/cardData.js +56 -56
- package/server/routes/data/controllers/cardTabData.js +49 -49
- package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
- package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
- package/server/routes/data/controllers/tableData.js +145 -145
- package/server/routes/data/controllers/tableDataId.js +27 -27
- package/server/routes/data/controllers/tableFilter.js +63 -63
- package/server/routes/data/controllers/utils/assignTokens.js +30 -30
- package/server/routes/data/controllers/utils/getColumns.js +21 -21
- package/server/routes/data/index.mjs +15 -15
- package/server/routes/data/schema.js +7 -7
- package/server/routes/menu/controllers/getMenu.js +34 -34
- package/server/routes/menu/index.mjs +5 -5
- package/server/routes/notifications/controllers/readNotifications.js +30 -30
- package/server/routes/notifications/controllers/userNotifications.js +64 -64
- package/server/routes/notifications/hook/onWidgetSet.js +63 -63
- package/server/routes/notifications/index.mjs +40 -40
- package/server/routes/properties/controllers/admin.properties.get.js +29 -29
- package/server/routes/properties/controllers/user.properties.get.js +34 -34
- package/server/routes/properties/controllers/user.properties.post.js +30 -30
- package/server/routes/properties/funcs/getSettings.js +56 -56
- package/server/routes/properties/funcs/setSettings.js +44 -44
- package/server/routes/properties/funcs/utils/dataInsert.js +26 -26
- package/server/routes/properties/index.mjs +26 -26
- package/server/routes/root.mjs +3 -3
- package/server/routes/templates/controllers/getTemplate.js +16 -16
- package/server/routes/templates/index.mjs +14 -14
- package/server/templates/cls/itree.recrzone_category.json +73 -73
- package/server/templates/cls/test.json +9 -9
- package/server/templates/form/admin.user_cls.data.form.json +49 -49
- package/server/templates/form/admin.user_group_rel.form.json +21 -21
- package/server/templates/form/cp_building.form.json +32 -32
- package/server/templates/form/form-user-pass.json +10 -10
- package/server/templates/form/form-user_group.json +39 -39
- package/server/templates/form/form-users.json +156 -156
- package/server/templates/form/user_group_access.form.json +22 -22
- package/server/templates/select/account_id.json +2 -2
- package/server/templates/table/gis.dataset.table.json +43 -43
- package/server/templates/table/management.user_group.table.json +112 -112
- package/server/templates/table/management.users.table.json +126 -126
- package/utils.js +21 -21
- package/dist/card-page-Cqy3g7da.js +0 -200
package/README.md
CHANGED
@@ -1,29 +1,29 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
[![NPM version](https://img.shields.io/npm/v/@opengis/admin)](https://www.npmjs.com/package/@opengis/admin)
|
4
|
-
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
|
5
|
-
|
6
|
-
It standardizes the entire
|
7
|
-
|
8
|
-
## Install
|
9
|
-
|
10
|
-
```bash
|
11
|
-
npm i @opengis/admin
|
12
|
-
```
|
13
|
-
|
14
|
-
## Publish
|
15
|
-
|
16
|
-
```bash
|
17
|
-
npm run build
|
18
|
-
npm publish
|
19
|
-
```
|
20
|
-
|
21
|
-
## Usage
|
22
|
-
|
23
|
-
```js
|
24
|
-
fastify.register(import('@opengis/admin'), config);
|
25
|
-
```
|
26
|
-
|
27
|
-
## Documenation
|
28
|
-
|
29
|
-
For a detailed understanding of `admin`, its features, and how to use them, refer to our [Documentation](https://apidocs.softpro.ua/opengis/plugin/).
|
1
|
+
# admin
|
2
|
+
|
3
|
+
[![NPM version](https://img.shields.io/npm/v/@opengis/admin)](https://www.npmjs.com/package/@opengis/admin)
|
4
|
+
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
|
5
|
+
|
6
|
+
It standardizes the entire web-site administration
|
7
|
+
|
8
|
+
## Install
|
9
|
+
|
10
|
+
```bash
|
11
|
+
npm i @opengis/admin
|
12
|
+
```
|
13
|
+
|
14
|
+
## Publish
|
15
|
+
|
16
|
+
```bash
|
17
|
+
npm run build
|
18
|
+
npm publish
|
19
|
+
```
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
```js
|
24
|
+
fastify.register(import('@opengis/admin'), config);
|
25
|
+
```
|
26
|
+
|
27
|
+
## Documenation
|
28
|
+
|
29
|
+
For a detailed understanding of `admin`, its features, and how to use them, refer to our [Documentation](https://apidocs.softpro.ua/opengis/plugin/).
|
package/config.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { readFile } from 'fs/promises';
|
2
|
-
import fs from 'fs';
|
3
|
-
const config = fs.existsSync('config.json') ? JSON.parse(await readFile('config.json')) : {};
|
4
|
-
|
1
|
+
import { readFile } from 'fs/promises';
|
2
|
+
import fs from 'fs';
|
3
|
+
const config = fs.existsSync('config.json') ? JSON.parse(await readFile('config.json')) : {};
|
4
|
+
|
5
5
|
export default config;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as m, u as b, a as c } from "./import-file-
|
1
|
+
import { _ as m, u as b, a as c } from "./import-file-CsCQ5xvs.js";
|
2
2
|
import { resolveComponent as h, openBlock as i, createElementBlock as d, createElementVNode as a, createBlock as p, createCommentVNode as f } from "vue";
|
3
3
|
const g = {
|
4
4
|
data() {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as f, b as de, a as A, V as ue, c as he, d as pe, e as be, I as fe, u as te } from "./import-file-
|
1
|
+
import { _ as f, b as de, a as A, V as ue, c as he, d as pe, e as be, I as fe, u as te } from "./import-file-CsCQ5xvs.js";
|
2
2
|
import { openBlock as o, createElementBlock as i, createTextVNode as F, toDisplayString as I, createCommentVNode as v, createStaticVNode as j, Fragment as C, createElementVNode as l, resolveComponent as c, createVNode as b, withCtx as y, createBlock as x, withModifiers as me, renderList as T, withDirectives as z, vModelCheckbox as ge, resolveDynamicComponent as xe, Transition as P, renderSlot as ye, vShow as re, normalizeClass as V, normalizeStyle as _e } from "vue";
|
3
3
|
const ke = {
|
4
4
|
data() {
|
@@ -617,7 +617,7 @@ function Ut(t, e, r, a, n, s) {
|
|
617
617
|
])
|
618
618
|
]);
|
619
619
|
}
|
620
|
-
const Ot = /* @__PURE__ */ f(zt, [["render", Ut], ["__scopeId", "data-v-
|
620
|
+
const Ot = /* @__PURE__ */ f(zt, [["render", Ut], ["__scopeId", "data-v-f5ecdb9a"]]), Et = {
|
621
621
|
components: {
|
622
622
|
AdminComponentIs: le,
|
623
623
|
AdminTree: Ot,
|
@@ -633,7 +633,7 @@ const Ot = /* @__PURE__ */ f(zt, [["render", Ut], ["__scopeId", "data-v-4139bc00
|
|
633
633
|
}, Ht = {
|
634
634
|
class: "border-l",
|
635
635
|
style: { height: "calc(100vh - 360px)" }
|
636
|
-
}, Wt = { class: "
|
636
|
+
}, Wt = { class: "flex items-center justify-between py-1 gap-x-4" }, Rt = { class: "col-span-1" }, Gt = { class: "inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500" }, Zt = { class: "col-span-2" }, Jt = { class: "font-medium text-[13px] text-gray-800 dark:text-neutral-200" }, Kt = { class: "table-info-card" }, Qt = { class: "table-info-card" };
|
637
637
|
function Xt(t, e, r, a, n, s) {
|
638
638
|
var k, $;
|
639
639
|
const d = c("AdminComponentIs"), p = c("AdminTree"), h = c("VsWidgetMap"), u = c("VsNoData"), _ = c("VsWidgetComments"), w = c("VsWidgetFileList");
|
@@ -646,7 +646,7 @@ function Xt(t, e, r, a, n, s) {
|
|
646
646
|
r.row ? (o(), x(p, {
|
647
647
|
key: 0,
|
648
648
|
title: "Основна інформація",
|
649
|
-
class: "border-b p-[10px] py-[16px]
|
649
|
+
class: "border-b p-[10px] py-[16px]"
|
650
650
|
}, {
|
651
651
|
default: y(() => [
|
652
652
|
(o(!0), i(C, null, T(r.columns, (m) => (o(), i("dl", Wt, [
|
@@ -668,7 +668,7 @@ function Xt(t, e, r, a, n, s) {
|
|
668
668
|
})) : v("", !0),
|
669
669
|
b(p, {
|
670
670
|
title: "Карта",
|
671
|
-
class: "border-b p-[10px] py-[16px]
|
671
|
+
class: "border-b p-[10px] py-[16px]"
|
672
672
|
}, {
|
673
673
|
default: y(() => {
|
674
674
|
var m, S;
|
@@ -689,7 +689,7 @@ function Xt(t, e, r, a, n, s) {
|
|
689
689
|
}),
|
690
690
|
b(p, {
|
691
691
|
title: "Коментарі",
|
692
|
-
class: "border-b p-[10px] py-[16px]
|
692
|
+
class: "border-b p-[10px] py-[16px]"
|
693
693
|
}, {
|
694
694
|
default: y(() => {
|
695
695
|
var m;
|
@@ -705,7 +705,7 @@ function Xt(t, e, r, a, n, s) {
|
|
705
705
|
}),
|
706
706
|
b(p, {
|
707
707
|
title: "Файли",
|
708
|
-
class: "border-b p-[10px] py-[16px]
|
708
|
+
class: "border-b p-[10px] py-[16px]"
|
709
709
|
}, {
|
710
710
|
default: y(() => {
|
711
711
|
var m;
|
@@ -1268,7 +1268,7 @@ function Rr(t, e, r, a, n, s) {
|
|
1268
1268
|
])
|
1269
1269
|
]);
|
1270
1270
|
}
|
1271
|
-
const Gr = /* @__PURE__ */ f(Vr, [["render", Rr], ["__scopeId", "data-v-
|
1271
|
+
const Gr = /* @__PURE__ */ f(Vr, [["render", Rr], ["__scopeId", "data-v-f40661d7"]]), Zr = {
|
1272
1272
|
components: { AdminTable: Gr },
|
1273
1273
|
data() {
|
1274
1274
|
return {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { _ as h, I as T, u as E, a as
|
2
|
-
import { openBlock as r, createElementBlock as l, createElementVNode as o, createStaticVNode as A, resolveComponent as p, normalizeClass as z, createTextVNode as Z, toDisplayString as I, createVNode as u, Transition as Q, withCtx as D, withDirectives as F, Fragment as
|
1
|
+
import { _ as h, I as T, u as E, a as S } from "./import-file-CsCQ5xvs.js";
|
2
|
+
import { openBlock as r, createElementBlock as l, createElementVNode as o, createStaticVNode as A, resolveComponent as p, normalizeClass as z, createTextVNode as Z, toDisplayString as I, createVNode as u, Transition as Q, withCtx as D, withDirectives as F, Fragment as O, renderList as U, vShow as q, createCommentVNode as j, withModifiers as G } from "vue";
|
3
3
|
const J = {}, K = {
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
5
5
|
viewBox: "0 0 24 24",
|
@@ -74,8 +74,8 @@ const s1 = /* @__PURE__ */ h(t1, [["render", n1]]), r1 = {
|
|
74
74
|
class: ""
|
75
75
|
}, a1 = { class: "ml-[30px] py-[6px] before:block before:absolute relative w-[196px] flex flex-col gap-[6px] inline-block before:w-[2px] before:h-[100%] before:bg-gray-100 before:left-[-14px] cursor-pointer" }, i1 = { key: 1 };
|
76
76
|
function c1(t, e, n, a, s, i) {
|
77
|
-
var x, v, _,
|
78
|
-
const f = p("IconChevronDown"),
|
77
|
+
var x, v, _, C, b, w, m, y, k, $, V, M, H;
|
78
|
+
const f = p("IconChevronDown"), g = p("router-link");
|
79
79
|
return (x = n.route) != null && x.menu ? (r(), l("div", l1, [
|
80
80
|
o("button", {
|
81
81
|
onClick: e[0] || (e[0] = (d) => s.isOpen = !s.isOpen),
|
@@ -88,7 +88,7 @@ function c1(t, e, n, a, s, i) {
|
|
88
88
|
)) && "bg-gray-100"
|
89
89
|
]])
|
90
90
|
}, [
|
91
|
-
Z(I((
|
91
|
+
Z(I((C = n.route) == null ? void 0 : C.ua) + " ", 1),
|
92
92
|
u(f, {
|
93
93
|
class: z([[s.isOpen && "-rotate-180"], "ml-auto duration-300"]),
|
94
94
|
width: "14",
|
@@ -100,16 +100,16 @@ function c1(t, e, n, a, s, i) {
|
|
100
100
|
var d;
|
101
101
|
return [
|
102
102
|
F(o("ul", a1, [
|
103
|
-
(r(!0), l(
|
104
|
-
var
|
103
|
+
(r(!0), l(O, null, U((d = n.route) == null ? void 0 : d.menu, (c, L) => {
|
104
|
+
var N, B;
|
105
105
|
return r(), l("li", {
|
106
106
|
key: L,
|
107
107
|
class: "w-full"
|
108
108
|
}, [
|
109
|
-
u(
|
109
|
+
u(g, {
|
110
110
|
to: "/" + (c == null ? void 0 : c.path),
|
111
111
|
class: z([[
|
112
|
-
((c == null ? void 0 : c.path) === t.$route.path.replace("/", "") || ((
|
112
|
+
((c == null ? void 0 : c.path) === t.$route.path.replace("/", "") || ((B = (N = t.$route) == null ? void 0 : N.params) == null ? void 0 : B.table) === (c == null ? void 0 : c.table) && (c == null ? void 0 : c.table)) && "bg-gray-100"
|
113
113
|
], "flex gap-x-4 py-2 px-3 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100"])
|
114
114
|
}, {
|
115
115
|
default: D(() => [
|
@@ -127,7 +127,7 @@ function c1(t, e, n, a, s, i) {
|
|
127
127
|
_: 1
|
128
128
|
})
|
129
129
|
])) : (r(), l("div", i1, [
|
130
|
-
u(
|
130
|
+
u(g, {
|
131
131
|
to: ((w = (b = n.route) == null ? void 0 : b.path) == null ? void 0 : w[0]) === "/" ? (m = n.route) == null ? void 0 : m.path : "/" + ((y = n.route) == null ? void 0 : y.path),
|
132
132
|
class: z([[
|
133
133
|
(((k = n.route) == null ? void 0 : k.path.replace("/", "")) === t.$route.path.replace("/", "") || ((V = ($ = t.$route) == null ? void 0 : $.params) == null ? void 0 : V.table) === ((M = n.route) == null ? void 0 : M.table) && ((H = n.route) == null ? void 0 : H.table)) && "bg-gray-100"
|
@@ -171,16 +171,16 @@ const u1 = /* @__PURE__ */ h(r1, [["render", c1]]), d1 = {
|
|
171
171
|
}), e;
|
172
172
|
}
|
173
173
|
}
|
174
|
-
}, p1 = { class: "flex flex-col h-[100vh] border-r w-[260px] shrink-0" }, h1 = { class: "relative" }, f1 = { class: "p-[16px] overflow-y-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" }, x1 = { class: "pb-3 w-full flex flex-col flex-wrap" },
|
174
|
+
}, p1 = { class: "flex flex-col h-[100vh] border-r w-[260px] shrink-0" }, h1 = { class: "relative" }, f1 = { class: "p-[16px] overflow-y-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" }, x1 = { class: "pb-3 w-full flex flex-col flex-wrap" }, C1 = {
|
175
175
|
key: 0,
|
176
176
|
class: "flex flex-col gap-[6px]"
|
177
|
-
},
|
177
|
+
}, g1 = {
|
178
178
|
key: 1,
|
179
179
|
class: "text-gray-800 text-lg mt-[20px]"
|
180
180
|
};
|
181
181
|
function _1(t, e, n, a, s, i) {
|
182
182
|
var _;
|
183
|
-
const f = p("IconLogo"),
|
183
|
+
const f = p("IconLogo"), g = p("IconSearch"), x = p("VsText"), v = p("NavbarItem");
|
184
184
|
return r(), l("div", p1, [
|
185
185
|
u(f, {
|
186
186
|
height: "40",
|
@@ -188,7 +188,7 @@ function _1(t, e, n, a, s, i) {
|
|
188
188
|
class: "my-[20px] ml-[20px]"
|
189
189
|
}),
|
190
190
|
o("div", h1, [
|
191
|
-
u(
|
191
|
+
u(g, {
|
192
192
|
height: "16",
|
193
193
|
width: "16",
|
194
194
|
class: "absolute top-[12px] left-[30px] text-gray-500 z-[1]"
|
@@ -196,7 +196,7 @@ function _1(t, e, n, a, s, i) {
|
|
196
196
|
u(x, {
|
197
197
|
type: "text",
|
198
198
|
modelValue: s.searchValue,
|
199
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
199
|
+
"onUpdate:modelValue": e[0] || (e[0] = (C) => s.searchValue = C),
|
200
200
|
clearable: !0,
|
201
201
|
placeholder: "Пошук по меню",
|
202
202
|
class: "[&>input]:h-[40px] [&>input]:block [&>input]:rounded-none [&>input]:border-x-0 [&>input]:pl-[60px] [&>input:focus]:outline-none [&>input:focus]:focus:ring-0 [&>input:focus]:border-y-gray-200 [&>input:focus]:border-y-1 [&>input:focus]:border-x-0"
|
@@ -204,14 +204,14 @@ function _1(t, e, n, a, s, i) {
|
|
204
204
|
]),
|
205
205
|
o("div", f1, [
|
206
206
|
o("nav", x1, [
|
207
|
-
(_ = i.data) != null && _.length ? (r(), l("ul",
|
208
|
-
(r(!0), l(
|
207
|
+
(_ = i.data) != null && _.length ? (r(), l("ul", C1, [
|
208
|
+
(r(!0), l(O, null, U(i.data, (C, b) => (r(), l("li", {
|
209
209
|
key: b,
|
210
210
|
class: "flex flex-col gap-[6px]"
|
211
211
|
}, [
|
212
|
-
u(v, { route:
|
212
|
+
u(v, { route: C }, null, 8, ["route"])
|
213
213
|
]))), 128))
|
214
|
-
])) : (r(), l("div",
|
214
|
+
])) : (r(), l("div", g1, "Не знайдено"))
|
215
215
|
])
|
216
216
|
])
|
217
217
|
]);
|
@@ -266,7 +266,7 @@ function I1(t, e, n, a, s, i) {
|
|
266
266
|
s.count ? (r(), l("span", M1, [
|
267
267
|
e[0] || (e[0] = o("span", { class: "absolute inline-flex bg-red-400 rounded-full opacity-75 animate-ping size-full dark:bg-red-600" }, null, -1)),
|
268
268
|
o("span", H1, I(s.count), 1)
|
269
|
-
])) :
|
269
|
+
])) : j("", !0)
|
270
270
|
]),
|
271
271
|
e[1] || (e[1] = o("span", {
|
272
272
|
class: "hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg dark:bg-neutral-700 hidden",
|
@@ -338,14 +338,14 @@ const B1 = /* @__PURE__ */ h(O1, [["render", N1]]), S1 = {
|
|
338
338
|
methods: {
|
339
339
|
async getUserData() {
|
340
340
|
try {
|
341
|
-
const { data: t } = await
|
341
|
+
const { data: t } = await S.get("/user");
|
342
342
|
this.userData = t;
|
343
343
|
} catch {
|
344
344
|
}
|
345
345
|
},
|
346
346
|
async logout() {
|
347
347
|
try {
|
348
|
-
await
|
348
|
+
await S.get("/logout"), await window.history.pushState({}, "", "/login"), await location.reload(), localStorage.removeItem("user");
|
349
349
|
} catch {
|
350
350
|
}
|
351
351
|
},
|
@@ -370,8 +370,8 @@ const B1 = /* @__PURE__ */ h(O1, [["render", N1]]), S1 = {
|
|
370
370
|
class: "size-[40px] rounded-full bg-gray-200 flex items-center justify-center"
|
371
371
|
}, P1 = { class: "text-[14px] mr-[10px] text-gray-500" }, R1 = { class: "flex flex-col p-[4px]" };
|
372
372
|
function W1(t, e, n, a, s, i) {
|
373
|
-
var _,
|
374
|
-
const f = p("IconQuestion"),
|
373
|
+
var _, C, b, w, m, y, k, $, V, M;
|
374
|
+
const f = p("IconQuestion"), g = p("AdminNotifucation"), x = p("IconUser"), v = p("router-link");
|
375
375
|
return r(), l("div", U1, [
|
376
376
|
o("div", T1, [
|
377
377
|
o("a", A1, [
|
@@ -380,14 +380,14 @@ function W1(t, e, n, a, s, i) {
|
|
380
380
|
width: "24"
|
381
381
|
})
|
382
382
|
]),
|
383
|
-
u(
|
383
|
+
u(g),
|
384
384
|
e[4] || (e[4] = o("div", { class: "h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]" }, null, -1)),
|
385
385
|
o("div", Q1, [
|
386
386
|
o("div", {
|
387
387
|
onClick: e[0] || (e[0] = (H) => s.isVisible = !0),
|
388
388
|
class: "cursor-pointer"
|
389
389
|
}, [
|
390
|
-
(
|
390
|
+
(C = (_ = s.userData) == null ? void 0 : _.user) != null && C.avatar ? (r(), l("img", {
|
391
391
|
key: 0,
|
392
392
|
class: "flex-shrink-0 size-[30px] rounded-full",
|
393
393
|
src: (w = (b = s.userData) == null ? void 0 : b.user) == null ? void 0 : w.avatar,
|
@@ -430,44 +430,32 @@ function W1(t, e, n, a, s, i) {
|
|
430
430
|
class: "p-[8px] block rounded-lg w-full text-start hover:bg-gray-100 !duration-300"
|
431
431
|
}, " Вийти ")
|
432
432
|
])
|
433
|
-
])) :
|
433
|
+
])) : j("", !0)
|
434
434
|
])
|
435
435
|
])
|
436
436
|
]);
|
437
437
|
}
|
438
438
|
const X1 = /* @__PURE__ */ h(S1, [["render", W1]]), Y1 = {
|
439
439
|
components: { navbar: b1, AdminHeader: X1 },
|
440
|
-
mounted() {
|
441
|
-
this.getMenu();
|
442
|
-
},
|
443
440
|
computed: {
|
444
441
|
isMenu() {
|
445
442
|
return E.value;
|
446
443
|
}
|
447
|
-
},
|
448
|
-
methods: {
|
449
|
-
async getMenu() {
|
450
|
-
try {
|
451
|
-
const { data: t } = await O.get("/api/user-menu");
|
452
|
-
t.filter((e) => e.path === "/"), E.value = t;
|
453
|
-
} catch {
|
454
|
-
}
|
455
|
-
}
|
456
444
|
}
|
457
445
|
}, ee = { class: "admin-wrapper" }, te = { class: "flex flex-col" };
|
458
446
|
function oe(t, e, n, a, s, i) {
|
459
|
-
const f = p("navbar"),
|
447
|
+
const f = p("navbar"), g = p("admin-header"), x = p("router-view");
|
460
448
|
return r(), l("div", ee, [
|
461
449
|
u(f),
|
462
450
|
o("div", te, [
|
463
|
-
i.isMenu ? (r(), l(
|
464
|
-
u(
|
451
|
+
i.isMenu ? (r(), l(O, { key: 0 }, [
|
452
|
+
u(g),
|
465
453
|
u(x)
|
466
|
-
], 64)) :
|
454
|
+
], 64)) : j("", !0)
|
467
455
|
])
|
468
456
|
]);
|
469
457
|
}
|
470
|
-
const re = /* @__PURE__ */ h(Y1, [["render", oe], ["__scopeId", "data-v-
|
458
|
+
const re = /* @__PURE__ */ h(Y1, [["render", oe], ["__scopeId", "data-v-59305fb1"]]);
|
471
459
|
export {
|
472
460
|
re as default
|
473
461
|
};
|
package/dist/admin.js
CHANGED