@opengis/admin 0.2.54 → 0.2.56

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.
Files changed (48) hide show
  1. package/dist/{add-page-CUWnbURQ.js → add-page-CHR8tS95.js} +1 -1
  2. package/dist/{admin-interface-DyFTC9Ft.js → admin-interface-DT_Yba4D.js} +349 -362
  3. package/dist/{admin-view-DD7XR43g.js → admin-view-BCkzzh3f.js} +68 -71
  4. package/dist/admin.js +1 -1
  5. package/dist/admin.umd.cjs +49 -67
  6. package/dist/assets/fonts/Inter-Bold.woff2 +0 -0
  7. package/dist/assets/fonts/Inter-Italic.woff2 +0 -0
  8. package/dist/assets/fonts/Inter-Light.woff2 +0 -0
  9. package/dist/assets/fonts/Inter-Medium.woff2 +0 -0
  10. package/dist/assets/fonts/Inter-MediumItalic.woff2 +0 -0
  11. package/dist/assets/fonts/Inter-Regular.woff2 +0 -0
  12. package/dist/{card-view-4ESqtPE2.js → card-view-CrgOTzfS.js} +1 -1
  13. package/dist/{edit-page-DGfSfOyG.js → edit-page-CUM5w200.js} +1 -1
  14. package/dist/{import-file-DP7DSpqz.js → import-file-BaBa8JJ6.js} +9255 -9178
  15. package/dist/style.css +1 -1
  16. package/module/settings/card/admin.roles.table/access.hbs +11 -3
  17. package/module/settings/card/admin.roles.table/general_info.hbs +10 -1
  18. package/module/settings/card/admin.roles.table/index.yml +10 -11
  19. package/module/settings/card/admin.roles.table/users.hbs +11 -5
  20. package/module/settings/card/admin.routes.table/general_info.hbs +1 -1
  21. package/module/settings/card/admin.users.table/context.hbs +8 -3
  22. package/module/settings/card/admin.users.table/general_info.hbs +7 -1
  23. package/module/settings/card/admin.users.table/index.yml +4 -7
  24. package/module/settings/card/admin.users.table/last_login.hbs +7 -1
  25. package/module/settings/card/admin.users.table/logs.hbs +7 -1
  26. package/module/settings/card/admin.users.table/routes.hbs +7 -1
  27. package/module/settings/card/admin.users.table/user_roles.hbs +7 -2
  28. package/module/settings/cls/core.column_type.json +14 -0
  29. package/module/settings/form/admin.custom_column.form.json +9 -25
  30. package/module/settings/form/admin.routes.form.json +2 -2
  31. package/module/settings/form/admin.rules.form.json +1 -1
  32. package/module/settings/form/admin.user_roles.form.json +11 -0
  33. package/module/settings/form/context.account_grants.form.json +7 -6
  34. package/module/settings/form/context.account_users.form.json +4 -4
  35. package/module/settings/form/user.user_roles.form.json +1 -1
  36. package/module/settings/table/admin.accounts.table.json +7 -0
  37. package/module/settings/table/admin.custom_column.table.json +5 -4
  38. package/module/settings/table/admin.roles.table.json +14 -1
  39. package/module/settings/table/admin.routes.table.json +2 -2
  40. package/module/settings/table/admin.rules.table.json +7 -6
  41. package/module/settings/table/admin.user_roles.table.json +5 -0
  42. package/module/settings/table/admin.users.table.json +7 -7
  43. package/module/settings/table/context.account_grants.table.json +34 -13
  44. package/module/settings/table/context.account_users.table.json +21 -5
  45. package/package.json +2 -2
  46. package/server/helpers/list/descriptionList.js +4 -4
  47. package/server/helpers/list/tableList.js +6 -8
  48. package/server/plugins/hook.js +1 -1
@@ -1,24 +1,25 @@
1
1
  {
2
2
  "rule_id": {
3
3
  "ua": "id Правила",
4
- "type": "Select",
4
+ "type": "Autocomplete",
5
5
  "data": "core.rules"
6
6
  },
7
7
  "rule_values": {
8
8
  "ua": "Значення",
9
- "type": "text"
9
+ "type": "Text"
10
10
  },
11
11
  "expire_date": {
12
12
  "ua": "Дата закінчення дії дозволу",
13
- "type": "Datepicker"
13
+ "type": "DatePicker"
14
14
  },
15
15
  "actions": {
16
16
  "ua": "Дії",
17
- "type": "checkbox",
17
+ "type": "Checkbox",
18
18
  "options": [
19
+ "view",
20
+ "add",
19
21
  "edit",
20
- "edit",
21
- "add"
22
+ "del"
22
23
  ]
23
24
  }
24
25
  }
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "account_id": {
3
- "ua": "id Організації",
4
- "type": "Select",
3
+ "ua": "Організація",
4
+ "type": "Autocomplete",
5
5
  "data": "core.accounts"
6
6
  },
7
- "user_id": {
8
- "ua": "id Користувача",
7
+ "user_uid": {
8
+ "ua": "Користувач",
9
9
  "type": "Autocomplete",
10
10
  "data": "core.user_uid"
11
11
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "role_id": {
3
3
  "ua": "Група",
4
- "type": "Select",
4
+ "type": "Autocomplete",
5
5
  "data": "core.roles",
6
6
  "validators": [
7
7
  "required"
@@ -37,6 +37,13 @@
37
37
  "ua": "Назва",
38
38
  "name": "account_name",
39
39
  "type": "text"
40
+ },
41
+ {
42
+ "ua": "Хто створив",
43
+ "name": "uid",
44
+ "type": "Autocomplete",
45
+ "apiPrefix": "api",
46
+ "data": "core.user_uid"
40
47
  }
41
48
  ]
42
49
  }
@@ -43,12 +43,12 @@
43
43
  {
44
44
  "name": "filter",
45
45
  "title": "Фільтр по колонці",
46
- "format": "yes_no"
46
+ "format": "check"
47
47
  },
48
48
  {
49
49
  "name": "_table",
50
50
  "title": "Відображати в таблиці",
51
- "format": "yes_no"
51
+ "format": "check"
52
52
  },
53
53
  {
54
54
  "name": "uid",
@@ -92,9 +92,10 @@
92
92
  },
93
93
  {
94
94
  "name": "uid",
95
- "title": "Користувач",
95
+ "ua": "Користувач",
96
96
  "data": "core.user_uid",
97
- "type": "Text"
97
+ "apiPrefix": "api",
98
+ "type": "Autocomplete"
98
99
  }
99
100
  ]
100
101
  }
@@ -47,7 +47,7 @@
47
47
  },
48
48
  {
49
49
  "name": "enabled",
50
- "format": "switcher",
50
+ "format": "check",
51
51
  "title": "On / Off"
52
52
  }
53
53
  ],
@@ -60,6 +60,19 @@
60
60
  "ua": "Назва",
61
61
  "name": "name",
62
62
  "type": "text"
63
+ },
64
+ {
65
+ "ua": "Хто створив",
66
+ "name": "uid",
67
+ "type": "Autocomplete",
68
+ "apiPrefix": "api",
69
+ "data": "core.user_uid"
70
+ },
71
+ {
72
+ "name": "enabled",
73
+ "type": "Check",
74
+ "data": "yes_no",
75
+ "ua": "On / Off"
63
76
  }
64
77
  ]
65
78
  }
@@ -51,7 +51,7 @@
51
51
  ],
52
52
  "meta": {
53
53
  "title": "cdate",
54
- "search": "alias,title"
54
+ "search": "title"
55
55
  },
56
56
  "filters": [
57
57
  {
@@ -60,7 +60,7 @@
60
60
  "type": "text"
61
61
  },
62
62
  {
63
- "ua": "Title",
63
+ "ua": "Назва інтерфейсу українською",
64
64
  "name": "title",
65
65
  "type": "text"
66
66
  },
@@ -31,17 +31,17 @@
31
31
  },
32
32
  {
33
33
  "name": "rule_query",
34
- "format": "Text",
34
+ "format": "text",
35
35
  "ua": "Запит"
36
36
  },
37
37
  {
38
38
  "name": "CLS",
39
- "format": "Text",
39
+ "format": "text",
40
40
  "ua": "CLS"
41
41
  },
42
42
  {
43
43
  "name": "routes",
44
- "format": "Text",
44
+ "format": "text",
45
45
  "ua": "Роути"
46
46
  },
47
47
  {
@@ -60,17 +60,18 @@
60
60
  {
61
61
  "ua": "Назва",
62
62
  "name": "name",
63
- "type": "text"
63
+ "type": "Text"
64
64
  },
65
65
  {
66
66
  "ua": "Тип повноваження",
67
67
  "name": "type",
68
- "type": "text"
68
+ "type": "Text"
69
69
  },
70
70
  {
71
71
  "ua": "Хто створив",
72
72
  "name": "uid",
73
- "type": "select",
73
+ "type": "Autocomplete",
74
+ "apiPrefix": "api",
74
75
  "data": "core.user_uid"
75
76
  }
76
77
  ]
@@ -15,6 +15,11 @@
15
15
  "title": "Закінчення терміну дії доступу до групи",
16
16
  "format": "date"
17
17
  },
18
+ {
19
+ "name": "actions",
20
+ "title": "Доступ",
21
+ "format": "text"
22
+ },
18
23
  {
19
24
  "name": "access_granted",
20
25
  "data": "core.user_uid",
@@ -43,7 +43,8 @@
43
43
  {
44
44
  "ua": "Права",
45
45
  "name": "user_type",
46
- "format": "text"
46
+ "data": "users.user_type",
47
+ "format": "select"
47
48
  },
48
49
  {
49
50
  "ua": "Email",
@@ -85,9 +86,9 @@
85
86
  },
86
87
  {
87
88
  "name": "enabled",
88
- "ua": "Вимикач",
89
+ "ua": "On / Off",
89
90
  "data": "yes_no",
90
- "format": "select"
91
+ "format": "check"
91
92
  }
92
93
  ],
93
94
  "filter_list": [
@@ -113,11 +114,10 @@
113
114
  "type": "Text"
114
115
  },
115
116
  {
116
- "en": "On/Off",
117
- "ua": "On/Off",
118
- "data": "enabled",
119
117
  "name": "enabled",
120
- "type": "Check"
118
+ "type": "Check",
119
+ "data": "yes_no",
120
+ "ua": "On / Off"
121
121
  },
122
122
  {
123
123
  "ua": "Дата створення",
@@ -13,35 +13,33 @@
13
13
  "columns": [
14
14
  {
15
15
  "name": "account_id",
16
- "ua": "id Організації",
17
- "format": "Select",
16
+ "ua": "Організація",
17
+ "format": "select",
18
18
  "data": "core.accounts"
19
19
  },
20
20
  {
21
21
  "name": "rule_id",
22
- "ua": "id Правила",
22
+ "ua": "Правило",
23
23
  "data": "core.rules",
24
24
  "format": "Select"
25
25
  },
26
26
  {
27
27
  "name": "routes",
28
28
  "ua": "Роути",
29
- "format": "Text"
30
- },
31
- {
32
- "name": "values",
33
- "ua": "Значення",
34
- "format": "Text"
29
+ "format": "Text",
30
+ "hidden": true
35
31
  },
36
32
  {
37
33
  "name": "grants_doc_id",
38
- "ua": "id Документу",
39
- "format": "Text"
34
+ "ua": "Документ",
35
+ "format": "Text",
36
+ "hidden": true
40
37
  },
41
38
  {
42
39
  "name": "grant_scan",
43
- "ua": "id Скану",
44
- "format": "Text"
40
+ "ua": "Скан",
41
+ "format": "Text",
42
+ "hidden": true
45
43
  },
46
44
  {
47
45
  "name": "expire_date",
@@ -64,5 +62,28 @@
64
62
  "ua": "Дата створення",
65
63
  "format": "Dat"
66
64
  }
65
+ ],
66
+ "filterList":[
67
+ {
68
+ "ua": "Організація",
69
+ "name": "account_id",
70
+ "type": "Autocomplete",
71
+ "apiPrefix": "api",
72
+ "data": "core.accounts"
73
+ },
74
+ {
75
+ "ua": "Правило",
76
+ "name": "rule_id",
77
+ "type": "Autocomplete",
78
+ "apiPrefix": "api",
79
+ "data": "core.rules"
80
+ },
81
+ {
82
+ "ua": "Хто створив",
83
+ "name": "uid",
84
+ "type": "Autocomplete",
85
+ "apiPrefix": "api",
86
+ "data": "core.user_uid"
87
+ }
67
88
  ]
68
89
  }
@@ -13,15 +13,15 @@
13
13
  "columns": [
14
14
  {
15
15
  "name": "account_id",
16
- "format": "Select",
16
+ "format": "select",
17
17
  "data": "core.accounts",
18
- "ua": "id Організації"
18
+ "ua": "Організація"
19
19
  },
20
20
  {
21
- "name": "user_id",
22
- "format": "Select",
21
+ "name": "user_uid",
22
+ "format": "select",
23
23
  "data": "core.user_uid",
24
- "ua": "id Користувача"
24
+ "ua": "Користувач"
25
25
  },
26
26
  {
27
27
  "name": "uid",
@@ -34,5 +34,21 @@
34
34
  "format": "date",
35
35
  "ua": "Дата створення"
36
36
  }
37
+ ],
38
+ "filterList": [
39
+ {
40
+ "ua": "Організація",
41
+ "name": "account_id",
42
+ "type": "Autocomplete",
43
+ "apiPrefix": "api",
44
+ "data": "core.accounts"
45
+ },
46
+ {
47
+ "ua": "Контакт",
48
+ "name": "user_uid",
49
+ "type": "Autocomplete",
50
+ "apiPrefix": "api",
51
+ "data": "core.user_uid"
52
+ }
37
53
  ]
38
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/admin",
3
- "version": "0.2.54",
3
+ "version": "0.2.56",
4
4
  "description": "This project Softpro Admin",
5
5
  "main": "dist/admin.js",
6
6
  "type": "module",
@@ -44,7 +44,7 @@
44
44
  "@opengis/fastify-auth": "^1.0.60",
45
45
  "@opengis/fastify-file": "^1.0.30",
46
46
  "@opengis/fastify-table": "^1.1.134",
47
- "@opengis/v3-core": "^0.3.20",
47
+ "@opengis/v3-core": "^0.3.29",
48
48
  "@opengis/v3-filter": "^0.0.41",
49
49
  "@tiptap/core": "^2.8.0",
50
50
  "@tiptap/extension-color": "^2.8.0",
@@ -33,12 +33,12 @@ export default async function descriptionList(data, opt) {
33
33
  const key = keys[i + 1];
34
34
  const d1 = ['{{format', '{{select', '{{badge', '{{ifCond', '{{json'].filter(el => key.includes(el)).length ? await handlebars.compile(key)(data) || '-' : null
35
35
 
36
- result.push(`<div class="flex py-[16px] text-[14px] border-b border-[#E5E7EB">
37
- <div class="text-[#6B7280] font-[400] w-[50%]">${nameHBS || name}</div>
38
- <div class="font-[600] text-black w-[50%]">${d1 || format(data[key], key, data)}</div>
36
+ result.push(`<div class="grid grid-cols-1 gap-1 py-3 sm:grid-cols-3 sm:gap-4">
37
+ <dt class="font-medium text-gray-900">${nameHBS || name}</dt>
38
+ <dd class="text-gray-700 sm:col-span-2">${d1 || format(data[key], key, data)}</dd>
39
39
  </div>
40
40
  `);
41
41
 
42
42
  }
43
- return '<div class="w-full">' + result.join('') + '</div>';
43
+ return '<dl class=" divide-y divide-gray-100 text-sm">' + result.join('') + '</dl>';
44
44
  }
@@ -28,7 +28,7 @@ export default async function tableList(data, opt) {
28
28
  const keys = hash.columns.split(hash.divider || ',').map(el => hash.comma ? el.trim().replace(new RegExp(hash.comma, 'g'), ',') : el.trim()).concat(hash.uid && hash.table && hash.id && !hash.noactions ? ['Дії', 'actions'] : []);
29
29
 
30
30
  const result = [];
31
- result.push('<thead> <tr>');
31
+ result.push('<thead class="text-left"> <tr>');
32
32
 
33
33
  // thead
34
34
  const skip = {}
@@ -44,10 +44,8 @@ export default async function tableList(data, opt) {
44
44
  skip[name] = name.includes('{{') && !nameHBS;
45
45
  if (skip[name]) continue;
46
46
 
47
- result.push(`<th scope="col">
48
- <div class="px-[20px] py-[12px] text-start text-nowrap font-medium text-[14px] text-[#6B7280] ">
47
+ result.push(`<th class="whitespace-nowrap px-4 py-2 font-medium text-gray-900">
49
48
  ${nameHBS || name}
50
- </div>
51
49
  </th>`)
52
50
  }
53
51
  result.push('</tr></thead>');
@@ -55,7 +53,7 @@ export default async function tableList(data, opt) {
55
53
  // body
56
54
  for (let k = 0; k < data.length; k += 1) {
57
55
  const row = data[k];
58
- result.push('<tbody><tr class="border-t border-gray-200">');
56
+ result.push('<tbody class="divide-y divide-gray-200"><tr>');
59
57
  const obj = { form: hash.form, table: hash.table, id: row[hash.id] }
60
58
  const token = hash.table ? setToken({ ids: [JSON.stringify(obj)], uid: hash.uid, array: 1 })[0] : null;
61
59
  for (let i = 0; i < keys.length; i += 2) {
@@ -67,8 +65,8 @@ export default async function tableList(data, opt) {
67
65
 
68
66
  const tokenData = key == 'actions' ? token : null;
69
67
  const d1 = ['{{format', '{{select', '{{badge', '{{#ifCond'].filter(el => key.includes(el)).length ? await handlebars.compile(key)({ ...row, token, hash }) || '-' : null
70
- result.push(`<td >
71
- <div class="px-[20px] py-[12px] text-start font-medium text-[14px] text-black">${d1 || format(tokenData || row[key], key, row, hash)}</div>
68
+ result.push(`<td class="whitespace-nowrap px-4 py-2 text-gray-700">
69
+ ${d1 || format(tokenData || row[key], key, row, hash)}
72
70
  </td>`);
73
71
 
74
72
  }
@@ -78,5 +76,5 @@ export default async function tableList(data, opt) {
78
76
  }
79
77
 
80
78
 
81
- return '<table class="min-w-full divide-y divide-gray-200"> ' + result.join('') + '</table>';
79
+ return '<div class="overflow-x-auto"><table class="min-w-full divide-y-2 divide-gray-200 bg-white text-sm"> ' + result.join('') + '</table></div>';
82
80
  }
@@ -47,7 +47,7 @@ export default async function plugin(fastify) {
47
47
  access: loadTable?.access,
48
48
  });
49
49
  }));
50
- console.log(values)
50
+ // console.log(values)
51
51
  const q1 = `insert into admin.routes(route_id, alias, title, menu_id, table_name, actions, access, query)
52
52
  values ${values.filter((el) => el?.path).map((el) => `('${el.path}', ${el.table ? `'${el.table}'` : null},
53
53
  ${(el.title || el.ua) ? `'${(el.title || el.ua).replace(/'/g, "''")}'` : null},