@opengis/admin 0.1.21 → 0.1.23

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.
@@ -1,4 +1,4 @@
1
- {{#contentList table="admin.access" query="role_id='{{role_id}}'" order="cdate desc" sql1=1}}
1
+ {{#contentList table="admin.access" query="role_id='{{id}}'" order="cdate desc" sql1=1}}
2
2
  <table class="min-w-full divide-y divide-gray-200">
3
3
  <thead class="bg-gray-50">
4
4
  <tr>
@@ -16,9 +16,11 @@
16
16
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">
17
17
  {{route_id}}</td>
18
18
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">
19
- {{select route_id data="core.routes"}}</td>
19
+ {{!-- {{route_id}} --}}
20
+ </td>
20
21
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">
21
- {{select actions data="core.actions"}}</td>
22
+ {{actions}}
23
+ </td>
22
24
  </tr>
23
25
  {{/each}}
24
26
  </tbody>
@@ -7,6 +7,6 @@ panels:
7
7
  title: Користувачі
8
8
  col: 8
9
9
  items:
10
- - name: logs
10
+ - name: access
11
11
  title: Права до інтерфейсів
12
12
  col: 4
@@ -1,4 +1,4 @@
1
- {{#contentList table="admin.user_roles" query="user_uid='{{id}}'" order="cdate desc" limit="50" sql1=1}}
1
+ {{#contentList table="admin.user_roles" query="role_id='{{id}}'" order="cdate desc" limit="50" sql1=1}}
2
2
  <table class="min-w-full divide-y divide-gray-200">
3
3
  <thead class="bg-gray-50">
4
4
  <tr>
@@ -17,13 +17,10 @@
17
17
  <tbody class="bg-white divide-y divide-gray-200">
18
18
  {{#each rows}}
19
19
  <tr>
20
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">
21
- {{select user_uid data="core.user_uid"}}</td>
22
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">
23
- {{formatDate expiration}}</td>
20
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">{{user_uid}}</td>
21
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">{{formatDate expiration}}</td>
24
22
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">{{formatDate access_granted_time}}</td>
25
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">{{select name="access_granted"
26
- data="core.user_uid"}}</td>
23
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">{{access_granted}}</td>
27
24
  </tr>
28
25
  {{/each}}
29
26
  </tbody>
@@ -1,4 +1,4 @@
1
- {{#contentList table="admin.access" query="user_uid='{{id}}'" order="cdate desc" limit="50" sql1=1}}
1
+ {{#contentList table="admin.access" query="route_id='{{id}}'" order="cdate desc" limit="50" sql1=1}}
2
2
  <table class="min-w-full divide-y divide-gray-200">
3
3
  <thead class="bg-gray-50">
4
4
  <tr>
@@ -16,11 +16,17 @@
16
16
  {{#each rows}}
17
17
  <tr>
18
18
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">
19
- {{select user_uid data="core.user_uid"}}</td>
19
+ {{!-- {{select user_uid data="core.user_uid"}} --}}
20
+ {{user_uid}}
21
+ </td>
20
22
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">
21
- {{select actions data="core.actions"}}</td>
23
+ {{!-- {{select actions data="core.actions"}} --}}
24
+ {{actions}}
25
+ </td>
22
26
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-F500">
23
- {{select access_granted data="core.user_uid"}}</td>
27
+ {{!-- {{select access_granted data="core.user_uid"}} --}}
28
+ {{access_granted}}
29
+ </td>
24
30
  </tr>
25
31
  {{/each}}
26
32
  </tbody>
@@ -5,7 +5,7 @@
5
5
  "order": "cdate desc",
6
6
  "sql": [
7
7
  {
8
- "sql": "select count(user_uid) as user_count from admin.access where route_id=t.route_id",
8
+ "sql1": "select count(user_uid) as user_count from admin.access where route_id=t.route_id",
9
9
  "name": "user_count"
10
10
  },
11
11
  {
@@ -24,17 +24,19 @@
24
24
  "format": "text",
25
25
  "title": "Назва інтерфейсу українською"
26
26
  },
27
- {
28
- "name": "user_count",
29
- "format": "text",
30
- "title": "Кількість користувачів"
31
- },
32
27
  {
33
28
  "name": "roles_count",
34
29
  "format": "text",
35
30
  "title": "Кількість груп"
36
31
  }
37
32
  ],
33
+ "columns1": [
34
+ {
35
+ "name1": "user_count",
36
+ "format1": "text",
37
+ "title1": "Кількість користувачів"
38
+ }
39
+ ],
38
40
  "meta": {
39
41
  "title": "cdate",
40
42
  "search": "alias,title"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/admin",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "This project Softpro Admin",
5
5
  "main": "dist/admin.js",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  "author": "Softpro",
33
33
  "license": "ISC",
34
34
  "dependencies": {
35
- "@opengis/fastify-auth": "^1.0.20",
35
+ "@opengis/fastify-auth": "^1.0.33",
36
36
  "@opengis/fastify-file": "^1.0.17",
37
37
  "@opengis/fastify-table": "^1.1.16",
38
38
  "@opengis/v3-core": "^0.1.92",
@@ -21,7 +21,7 @@ export default async function tableFilter(req) {
21
21
 
22
22
  const filters = loadTable?.filter_list || loadTable?.filters || loadTable?.filterList || [];
23
23
  filters.forEach(el => {
24
- Object.assign(el, { id: el.name });
24
+ Object.assign(el, { id: el.name || el.id, name: el.name || el.id });
25
25
  })
26
26
 
27
27
  await Promise.all(filters.filter((el) => el.data).map(async (el) => {
@@ -29,6 +29,7 @@ export default async function tableFilter(req) {
29
29
  const cls = await getTemplate(['cls', 'select'], el.data)
30
30
  const name = el.name || el.id
31
31
 
32
+
32
33
  if (!cls?.length || !Array.isArray(cls) || !loadTable.table || !name) return;
33
34
  const { dataTypeID } = columns.find((item) => item.name === name) || {};
34
35
  if (!dataTypeID) return;