@opengis/admin 0.2.121 → 0.2.122
Sign up to get free protection for your applications and to get access to all the features.
- package/module/settings/card/admin.roles.table/index.yml +3 -0
- package/module/settings/card/admin.routes.table/index.yml +15 -11
- package/module/settings/card/admin.users.table/index.yml +3 -0
- package/{server/templates → module/settings}/setting/test.json +5 -5
- package/package.json +3 -3
- package/server/routes/data/controllers/tableFilter.js +8 -1
- package/server/routes/properties/controllers/admin.properties.get.js +4 -3
@@ -1,11 +1,15 @@
|
|
1
|
-
component: default
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
component: default
|
2
|
+
meta: {
|
3
|
+
title: title
|
4
|
+
}
|
5
|
+
|
6
|
+
panels:
|
7
|
+
- name: general_info
|
8
|
+
title: Загальна інформація
|
9
|
+
col: 4
|
10
|
+
- name: users
|
11
|
+
title: Користувачі
|
12
|
+
col: 8
|
13
|
+
- name: groups
|
14
|
+
title: Групи
|
15
|
+
col: 4
|
@@ -1,6 +1,6 @@
|
|
1
|
-
{
|
2
|
-
"admin.title": {
|
3
|
-
"type": "Text",
|
4
|
-
"ua": "Назва"
|
5
|
-
}
|
1
|
+
{
|
2
|
+
"admin.title": {
|
3
|
+
"type": "Text",
|
4
|
+
"ua": "Назва"
|
5
|
+
}
|
6
6
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@opengis/admin",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.122",
|
4
4
|
"description": "This project Softpro Admin",
|
5
5
|
"main": "dist/admin.js",
|
6
6
|
"type": "module",
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"@fullcalendar/vue3": "^6.1.15",
|
49
49
|
"@opengis/fastify-auth": "^1.0.70",
|
50
50
|
"@opengis/fastify-file": "^1.0.42",
|
51
|
-
"@opengis/fastify-table": "^1.2.
|
51
|
+
"@opengis/fastify-table": "^1.2.10",
|
52
52
|
"@opengis/v3-core": "^0.3.45",
|
53
53
|
"@opengis/v3-filter": "^0.0.68",
|
54
54
|
"@tabler/icons-vue": "^3.28.1",
|
@@ -94,6 +94,6 @@
|
|
94
94
|
"vitepress": "^1.1.3",
|
95
95
|
"vitepress-plugin-mermaid": "^2.0.16",
|
96
96
|
"vitepress-plugin-tabs": "^0.5.0",
|
97
|
-
"vitepress-sidebar": "
|
97
|
+
"vitepress-sidebar": "1.30.2"
|
98
98
|
}
|
99
99
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { getTemplate, getMeta, handlebarsSync } from "@opengis/fastify-table/utils.js";
|
1
|
+
import { getTemplate, getMeta, handlebarsSync, autoIndex, logger } from "@opengis/fastify-table/utils.js";
|
2
2
|
|
3
3
|
export default async function tableFilter(req) {
|
4
4
|
const time = Date.now();
|
@@ -31,6 +31,13 @@ export default async function tableFilter(req) {
|
|
31
31
|
const { rows: properties = [] } = await pg.query(`select column_id, name, title, format, data from admin.custom_column where entity=$1 and uid=$2 and filter`, [params.name, uid]);
|
32
32
|
properties.forEach((row) => filters.push({ id: row.name, name: row.name, ua: row.title, type: row.format, data: row.data }));
|
33
33
|
|
34
|
+
|
35
|
+
autoIndex({ table: loadTable.table, columns: filters.filter((el) => columns?.find?.((item) => item?.name === el.name)) })
|
36
|
+
.catch(err => {
|
37
|
+
logger.file('autoindex/error', { name: params?.name, error: err.toString(), stack: err.stack });
|
38
|
+
});
|
39
|
+
|
40
|
+
|
34
41
|
await Promise.all(filters.filter((el) => el.data).map(async (el) => {
|
35
42
|
|
36
43
|
const cls = await getTemplate(['cls', 'select'], el.data);
|
@@ -9,16 +9,17 @@ const redis = getRedis();
|
|
9
9
|
export default async function getSettingsApp({
|
10
10
|
pg = pgClients.client, params = {}, query = {},
|
11
11
|
}) {
|
12
|
+
const time = Date.now();
|
12
13
|
if (!pg.pk?.[table]) {
|
13
14
|
return { message: 'table not found', status: 404 };
|
14
15
|
}
|
15
16
|
|
16
|
-
const keyCache = `${pg.options?.database}:settings:${params?.key || 'all'}:${query?.json ? 'json' : 'plain'}:${table}`;
|
17
|
+
/*const keyCache = `${pg.options?.database}:settings:${params?.key || 'all'}:${query?.json ? 'json' : 'plain'}:${table}`;
|
17
18
|
const cache = await redis.get(keyCache);
|
18
19
|
|
19
20
|
if (cache && !config?.local) {
|
20
21
|
return JSON.parse(cache);
|
21
|
-
}
|
22
|
+
}*/
|
22
23
|
|
23
24
|
const settings = await getSettings({
|
24
25
|
pg, key: params.key, json: query.json, redis, table,
|
@@ -28,5 +29,5 @@ export default async function getSettingsApp({
|
|
28
29
|
.map(async (el) => ({ name: el[0], body: await getTemplate('setting', el[0]) }))
|
29
30
|
);
|
30
31
|
|
31
|
-
return { message: { forms, settings }, status: 200 };
|
32
|
+
return { message: { time: Date.now() - time, forms, settings }, status: 200 };
|
32
33
|
}
|