@opengis/admin 0.1.97 → 0.1.99

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. package/README.md +29 -29
  2. package/config.js +4 -4
  3. package/dist/{IconChevronDown-C6C2qgO7.js → IconChevronDown-CHEXfG3v.js} +1 -1
  4. package/dist/{add-page-Bz9AriTG.js → add-page-DGnHyxhv.js} +18 -14
  5. package/dist/{admin-interface-QcGlLoY3.js → admin-interface-D2IezdVx.js} +6 -5
  6. package/dist/{admin-view-AjnQFK-4.js → admin-view-CtPrS-pT.js} +153 -148
  7. package/dist/admin.js +1 -1
  8. package/dist/admin.umd.cjs +59 -59
  9. package/dist/assets/logo.svg +41 -41
  10. package/dist/{card-view-BFYrLzFg.js → card-view-WP8gH2Ul.js} +1 -1
  11. package/dist/{edit-page-BlHpTvcw.js → edit-page-0YrQy_VE.js} +1 -1
  12. package/dist/{import-file-2vpw3792.js → import-file-DoWm0VXP.js} +8889 -8813
  13. package/dist/style.css +1 -1
  14. package/module/settings/card/admin.accounts.table/index.yml +8 -0
  15. package/module/settings/card/admin.accounts.table/rules.hbs +19 -0
  16. package/module/settings/card/admin.accounts.table/users.hbs +14 -0
  17. package/module/settings/card/admin.roles.table/access.hbs +3 -27
  18. package/module/settings/card/admin.roles.table/general_info.hbs +1 -17
  19. package/module/settings/card/admin.roles.table/index.yml +21 -14
  20. package/module/settings/card/admin.roles.table/users.hbs +6 -27
  21. package/module/settings/card/admin.routes.table/general_info.hbs +14 -41
  22. package/module/settings/card/admin.routes.table/groups.hbs +12 -0
  23. package/module/settings/card/admin.routes.table/index.yml +11 -8
  24. package/module/settings/card/admin.routes.table/users.hbs +16 -33
  25. package/module/settings/card/admin.users.table/context.hbs +15 -0
  26. package/module/settings/card/admin.users.table/general_info.hbs +13 -26
  27. package/module/settings/card/admin.users.table/index.yml +22 -12
  28. package/module/settings/card/admin.users.table/last_login.hbs +10 -0
  29. package/module/settings/card/admin.users.table/logs.hbs +11 -31
  30. package/module/settings/card/admin.users.table/routes.hbs +8 -0
  31. package/module/settings/card/admin.users.table/user_roles.hbs +13 -25
  32. package/module/settings/cls/core.actions.json +17 -17
  33. package/module/settings/cls/core.scope.json +13 -13
  34. package/module/settings/cls/properties.site_status.json +13 -13
  35. package/module/settings/cls/properties.widget_status.json +13 -13
  36. package/module/settings/cls/users.user_type.json +13 -13
  37. package/module/settings/form/admin.access.form.json +36 -36
  38. package/module/settings/form/admin.accounts.form.json +13 -0
  39. package/module/settings/form/admin.custom_column.form.json +71 -71
  40. package/module/settings/form/admin.properties.form.json +15 -15
  41. package/module/settings/form/admin.roles.form.json +21 -19
  42. package/module/settings/form/admin.routes.form.json +25 -25
  43. package/module/settings/form/admin.rules.form.json +31 -0
  44. package/module/settings/form/admin.user_properties.form.json +15 -15
  45. package/module/settings/form/admin.user_roles.form.json +13 -21
  46. package/module/settings/form/admin.user_roles_card.form.json +14 -0
  47. package/module/settings/form/admin.users.form.json +153 -153
  48. package/module/settings/form/context.account_grants.form.json +24 -0
  49. package/module/settings/form/context.account_users.form.json +12 -0
  50. package/module/settings/form/user.user_roles.form.json +13 -13
  51. package/module/settings/interface/admin.properties.json +4 -4
  52. package/module/settings/interface/admin.roles.json +4 -4
  53. package/module/settings/interface/admin.routes.json +4 -4
  54. package/module/settings/interface/admin.users.json +4 -4
  55. package/module/settings/menu.json +84 -50
  56. package/module/settings/select/core.accounts.sql +1 -0
  57. package/module/settings/select/core.roles.sql +1 -1
  58. package/module/settings/select/core.routes.sql +1 -1
  59. package/module/settings/select/core.rules.sql +1 -0
  60. package/module/settings/select/core.user_mentioned.sql +1 -1
  61. package/module/settings/select/core.user_uid.sql +1 -2
  62. package/module/settings/table/admin.access.table.json +83 -83
  63. package/module/settings/table/admin.accounts.table.json +42 -0
  64. package/module/settings/table/admin.custom_column.table.json +99 -99
  65. package/module/settings/table/admin.properties.table.json +39 -39
  66. package/module/settings/table/admin.roles.table.json +64 -64
  67. package/module/settings/table/admin.routes.table.json +73 -68
  68. package/module/settings/table/admin.rules.table.json +77 -0
  69. package/module/settings/table/admin.user_properties.table.json +34 -34
  70. package/module/settings/table/admin.user_roles.table.json +72 -72
  71. package/module/settings/table/admin.users.table.json +132 -121
  72. package/module/settings/table/context.account_grants.table.json +68 -0
  73. package/module/settings/table/context.account_users.table.json +38 -0
  74. package/package.json +83 -82
  75. package/plugin.js +29 -29
  76. package/server/helpers/core/badge.js +16 -0
  77. package/server/helpers/core/buttonHelper.js +14 -0
  78. package/server/helpers/core/select.js +48 -0
  79. package/server/helpers/{controllers → core}/token.js +16 -16
  80. package/server/helpers/index.js +28 -0
  81. package/server/helpers/list/buttonHelper.js +10 -10
  82. package/server/helpers/list/descriptionList.js +43 -34
  83. package/server/helpers/list/tableList.js +81 -65
  84. package/server/helpers/list/utils/button.js +5 -5
  85. package/server/helpers/temp/contentList.js +58 -0
  86. package/server/helpers/temp/ifCond.js +101 -0
  87. package/server/helpers/utils/button.js +6 -0
  88. package/server/helpers/utils/buttonDel.js +6 -0
  89. package/server/plugins/access/funcs/getAdminAccess.js +12 -14
  90. package/server/plugins/access/index.mjs +6 -6
  91. package/server/plugins/adminHook.js +81 -81
  92. package/server/plugins/cron.js +10 -10
  93. package/server/plugins/docs.js +28 -28
  94. package/server/plugins/hook.js +226 -226
  95. package/server/plugins/vite.js +71 -71
  96. package/server/routes/access/controllers/access.group.js +29 -29
  97. package/server/routes/access/controllers/access.group.post.js +48 -43
  98. package/server/routes/access/index.mjs +8 -63
  99. package/server/routes/access/schema.mjs +58 -0
  100. package/server/routes/calendar/controllers/calendar.data.js +87 -87
  101. package/server/routes/calendar/index.mjs +7 -7
  102. package/server/routes/calendar/schema.js +21 -21
  103. package/server/routes/data/controllers/cardData.js +100 -89
  104. package/server/routes/data/controllers/cardTabData.js +49 -49
  105. package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
  106. package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
  107. package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
  108. package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
  109. package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
  110. package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
  111. package/server/routes/data/controllers/tableData.js +29 -20
  112. package/server/routes/data/controllers/tableDataId.js +27 -27
  113. package/server/routes/data/controllers/tableFilter.js +67 -67
  114. package/server/routes/data/controllers/tokenInfo.js +9 -9
  115. package/server/routes/data/controllers/utils/assignTokens.js +30 -30
  116. package/server/routes/data/controllers/utils/conditions.js +20 -20
  117. package/server/routes/data/controllers/utils/getColumns.js +8 -8
  118. package/server/routes/data/index.mjs +17 -17
  119. package/server/routes/data/schema.js +54 -54
  120. package/server/routes/menu/controllers/getMenu.js +54 -67
  121. package/server/routes/menu/index.mjs +5 -5
  122. package/server/routes/notifications/controllers/readNotifications.js +27 -27
  123. package/server/routes/notifications/controllers/testEmail.js +35 -35
  124. package/server/routes/notifications/controllers/userNotifications.js +53 -53
  125. package/server/routes/notifications/funcs/addNotification.js +21 -21
  126. package/server/routes/notifications/funcs/sendNotification.js +92 -92
  127. package/server/routes/notifications/hook/onWidgetSet.js +57 -57
  128. package/server/routes/notifications/index.mjs +27 -27
  129. package/server/routes/notifications/schema.js +16 -16
  130. package/server/routes/properties/controllers/admin.properties.get.js +29 -29
  131. package/server/routes/properties/controllers/user.properties.get.js +30 -30
  132. package/server/routes/properties/controllers/user.properties.post.js +30 -30
  133. package/server/routes/properties/funcs/getSettings.js +56 -56
  134. package/server/routes/properties/funcs/setSettings.js +44 -44
  135. package/server/routes/properties/funcs/utils/dataInsert.js +26 -26
  136. package/server/routes/properties/index.mjs +14 -14
  137. package/server/routes/properties/schema.js +10 -10
  138. package/server/routes/root.mjs +3 -3
  139. package/server/routes/templates/controllers/getTemplate.js +26 -26
  140. package/server/routes/templates/index.mjs +16 -16
  141. package/server/routes/templates/schema.js +8 -8
  142. package/server/routes/user/controllers/user.cls.id.js +14 -14
  143. package/server/routes/user/controllers/user.cls.js +71 -71
  144. package/server/routes/user/controllers/user.cls.post.js +52 -52
  145. package/server/routes/user/controllers/user.info.js +17 -17
  146. package/server/routes/user/schema.js +14 -14
  147. package/server/routes/widget/controllers/utils/historyFormat.js +75 -75
  148. package/server/routes/widget/controllers/utils/obj2db.js +13 -13
  149. package/server/routes/widget/controllers/widget.del.js +41 -41
  150. package/server/routes/widget/controllers/widget.get.js +96 -96
  151. package/server/routes/widget/controllers/widget.set.js +76 -76
  152. package/server/routes/widget/index.mjs +11 -11
  153. package/server/routes/widget/schema.js +12 -12
  154. package/server/templates/cls/itree.recrzone_category.json +73 -73
  155. package/server/templates/cls/test.json +9 -9
  156. package/server/templates/form/admin.user_cls.data.form.json +49 -49
  157. package/server/templates/form/admin.user_group_rel.form.json +21 -21
  158. package/server/templates/form/cp_building.form.json +32 -32
  159. package/server/templates/form/form-user-pass.json +10 -10
  160. package/server/templates/form/form-user_group.json +39 -39
  161. package/server/templates/form/form-users.json +156 -156
  162. package/server/templates/form/user_group_access.form.json +22 -22
  163. package/server/templates/select/account_id.json +2 -2
  164. package/server/templates/table/gis.dataset.table.json +43 -43
  165. package/server/templates/table/management.user_group.table.json +112 -112
  166. package/server/templates/table/management.users.table.json +126 -126
  167. package/utils.js +29 -29
  168. package/module/settings/select/core.roles.json +0 -3
  169. package/server/helpers/controllers/badge.js +0 -12
  170. package/server/helpers/controllers/hb.js +0 -3
  171. package/server/helpers/controllers/map.js +0 -3
  172. package/server/helpers/controllers/mls.js +0 -3
  173. package/server/helpers/controllers/vue.js +0 -3
  174. package/server/helpers/index.mjs +0 -29
@@ -1,122 +1,133 @@
1
- {
2
- "key": "uid",
3
- "ua": "Користувачі",
4
- "table": "admin.users",
5
- "form": "admin.users.form",
6
- "order": "cdate desc",
7
- "access": "admin",
8
- "actions": [
9
- "add",
10
- "edit",
11
- "del"
12
- ],
13
- "meta": {
14
- "title": "user_name",
15
- "search": "sur_name,user_name,uid,father_name,email,phone,login"
16
- },
17
- "sql": [
18
- {
19
- "sql": "select count(*) as group_count from admin.user_roles where user_uid=t.uid and (case when expiration is not null then expiration > CURRENT_DATE else 1=1 end)",
20
- "name": "group_count_sql"
21
- },
22
- {
23
- "sql": "select concat(user_name, ' ', sur_name, ' ', father_name, ' ') as full_name",
24
- "name": "full_name_sql"
25
- },
26
- {
27
- "sql": "select string_agg(name,',') as groups from admin.roles where role_id in (select role_id from admin.user_roles where user_uid=t.uid)",
28
- "name": "group_list_sql"
29
- }
30
- ],
31
- "columns": [
32
- {
33
- "ua": "ПІБ",
34
- "name": "full_name",
35
- "format": "text"
36
- },
37
- {
38
- "ua": "Логін",
39
- "name": "login",
40
- "format": "text"
41
- },
42
- {
43
- "ua": "Email",
44
- "name": "email",
45
- "hidden": true,
46
- "format": "text"
47
- },
48
- {
49
- "ua": "РНОКПП",
50
- "name": "user_rnokpp",
51
- "hidden": true,
52
- "format": "text"
53
- },
54
- {
55
- "name": "group_count",
56
- "ua": "Кількість груп",
57
- "format": "text"
58
- },
59
- {
60
- "name": "groups",
61
- "ua": "Групи",
62
- "hidden": true,
63
- "format": "text"
64
- },
65
- {
66
- "name": "cdate",
67
- "ua": "Створено",
68
- "format": "date"
69
- },
70
- {
71
- "name": "editor_date",
72
- "ua": "Дата останньої активності",
73
- "format": "date"
74
- },
75
- {
76
- "name": "enabled",
77
- "ua": "Вимикач",
78
- "data": "yes_no",
79
- "format": "select"
80
- }
81
- ],
82
- "filter_list": [
83
- {
84
- "ua": "РНОКПП",
85
- "name": "user_rnokpp",
86
- "type": "Text"
87
- },
88
- {
89
- "ua": "Код ЄДРПОУ",
90
- "name": "organ_edrpou",
91
- "type": "Text"
92
- },
93
- {
94
- "ua": "Email",
95
- "name": "email",
96
- "type": "Text"
97
- },
98
- {
99
- "en": "Group",
100
- "ua": "Група",
101
- "name": "groups",
102
- "type": "Text"
103
- },
104
- {
105
- "en": "On/Off",
106
- "ua": "On/Off",
107
- "data": "enabled",
108
- "name": "enabled",
109
- "type": "Check"
110
- },
111
- {
112
- "ua": "Дата створення",
113
- "name": "cdate",
114
- "type": "Date"
115
- },
116
- {
117
- "name": "editor_date",
118
- "type": "Date",
119
- "ua": "Дата останньої активності"
120
- }
121
- ]
1
+ {
2
+ "key": "uid",
3
+ "ua": "Користувачі",
4
+ "table": "admin.users",
5
+ "form": "admin.users.form",
6
+ "order": "cdate desc",
7
+ "access": "admin",
8
+ "actions": [
9
+ "add",
10
+ "edit",
11
+ "del"
12
+ ],
13
+ "meta": {
14
+ "title": "user_name",
15
+ "search": "sur_name,user_name,uid,father_name,email,phone,login"
16
+ },
17
+ "sql": [
18
+ {
19
+ "sql": "select concat(user_name, ' ', sur_name, ' ', father_name, ' ') as full_name",
20
+ "name": "full_name_sql"
21
+ },
22
+ {
23
+ "sql": "select string_agg(name,',') as groups,count(*) as group_count, array_agg(role_id) as role_ids from admin.roles r where role_id in (select role_id from admin.user_roles where user_uid=t.uid)",
24
+ "name": "gr"
25
+ },
26
+ {
27
+ "sql": "select count(*) as route_count from admin.role_access r where role_id = any(gr.role_ids)",
28
+ "name": "routes"
29
+ }
30
+ ],
31
+ "columns": [
32
+ {
33
+ "ua": "ПІБ",
34
+ "name": "full_name",
35
+ "format": "text"
36
+ },
37
+ {
38
+ "ua": "Логін",
39
+ "name": "login",
40
+ "hidden": true,
41
+ "format": "text"
42
+ },
43
+ {
44
+ "ua": "Права",
45
+ "name": "user_type",
46
+ "format": "text"
47
+ },
48
+ {
49
+ "ua": "Email",
50
+ "name": "email",
51
+ "hidden": true,
52
+ "format": "text"
53
+ },
54
+ {
55
+ "ua": "РНОКПП",
56
+ "name": "user_rnokpp",
57
+ "hidden": true,
58
+ "format": "text"
59
+ },
60
+ {
61
+ "name": "group_count",
62
+ "ua": "Кількість груп",
63
+ "format": "text"
64
+ },
65
+ {
66
+ "name": "route_count",
67
+ "ua": "Кількість Інтерфейсів",
68
+ "format": "text"
69
+ },
70
+ {
71
+ "name": "groups",
72
+ "ua": "Групи",
73
+ "hidden": true,
74
+ "format": "text"
75
+ },
76
+ {
77
+ "name": "cdate",
78
+ "ua": "Створено",
79
+ "format": "date"
80
+ },
81
+ {
82
+ "name": "editor_date",
83
+ "ua": "Дата останньої активності",
84
+ "format": "date"
85
+ },
86
+ {
87
+ "name": "enabled",
88
+ "ua": "Вимикач",
89
+ "data": "yes_no",
90
+ "format": "select"
91
+ }
92
+ ],
93
+ "filter_list": [
94
+ {
95
+ "ua": "РНОКПП",
96
+ "name": "user_rnokpp",
97
+ "type": "Text"
98
+ },
99
+ {
100
+ "ua": "Код ЄДРПОУ",
101
+ "name": "organ_edrpou",
102
+ "type": "Text"
103
+ },
104
+ {
105
+ "ua": "Email",
106
+ "name": "email",
107
+ "type": "Text"
108
+ },
109
+ {
110
+ "en": "Group",
111
+ "ua": "Група",
112
+ "name": "groups",
113
+ "type": "Text"
114
+ },
115
+ {
116
+ "en": "On/Off",
117
+ "ua": "On/Off",
118
+ "data": "enabled",
119
+ "name": "enabled",
120
+ "type": "Check"
121
+ },
122
+ {
123
+ "ua": "Дата створення",
124
+ "name": "cdate",
125
+ "type": "Date"
126
+ },
127
+ {
128
+ "name": "editor_date",
129
+ "type": "Date",
130
+ "ua": "Дата останньої активності"
131
+ }
132
+ ]
122
133
  }
@@ -0,0 +1,68 @@
1
+ {
2
+ "key": "ag_id",
3
+ "ua": "Організації/Права",
4
+ "table": "admin.account_grants",
5
+ "form": "context.account_grants.form",
6
+ "order": "cdate desc",
7
+ "access": "admin",
8
+ "actions": [
9
+ "add",
10
+ "edit",
11
+ "del"
12
+ ],
13
+ "columns": [
14
+ {
15
+ "name": "account_id",
16
+ "ua": "id Організації",
17
+ "format": "Select",
18
+ "data": "core.accounts"
19
+ },
20
+ {
21
+ "name": "rule_id",
22
+ "ua": "id Правила",
23
+ "data": "core.rules",
24
+ "format": "Select"
25
+ },
26
+ {
27
+ "name": "routes",
28
+ "ua": "Роути",
29
+ "format": "Text"
30
+ },
31
+ {
32
+ "name": "values",
33
+ "ua": "Значення",
34
+ "format": "Text"
35
+ },
36
+ {
37
+ "name": "grants_doc_id",
38
+ "ua": "id Документу",
39
+ "format": "Text"
40
+ },
41
+ {
42
+ "name": "grant_scan",
43
+ "ua": "id Скану",
44
+ "format": "Text"
45
+ },
46
+ {
47
+ "name": "expire_date",
48
+ "ua": "Дата закінчення дії дозволу",
49
+ "format": "Date"
50
+ },
51
+ {
52
+ "name": "actions",
53
+ "ua": "Дії",
54
+ "format": "Text"
55
+ },
56
+ {
57
+ "name": "uid",
58
+ "format": "Select",
59
+ "data": "core.user_uid",
60
+ "ua": "Хто створив"
61
+ },
62
+ {
63
+ "name": "cdate",
64
+ "ua": "Дата створення",
65
+ "format": "Dat"
66
+ }
67
+ ]
68
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "key": "au_id",
3
+ "ua": "Користувачі/Організації",
4
+ "table": "admin.account_users",
5
+ "form": "context.account_users.form",
6
+ "order": "cdate desc",
7
+ "access": "admin",
8
+ "actions": [
9
+ "add",
10
+ "edit",
11
+ "del"
12
+ ],
13
+ "columns": [
14
+ {
15
+ "name": "account_id",
16
+ "format": "Select",
17
+ "data": "core.accounts",
18
+ "ua": "id Організації"
19
+ },
20
+ {
21
+ "name": "user_id",
22
+ "format": "Select",
23
+ "data": "core.user_uid",
24
+ "ua": "id Користувача"
25
+ },
26
+ {
27
+ "name": "uid",
28
+ "format": "Select",
29
+ "data": "core.user_uid",
30
+ "ua": "Хто створив"
31
+ },
32
+ {
33
+ "name": "cdate",
34
+ "format": "date",
35
+ "ua": "Дата створення"
36
+ }
37
+ ]
38
+ }
package/package.json CHANGED
@@ -1,82 +1,83 @@
1
- {
2
- "name": "@opengis/admin",
3
- "version": "0.1.97",
4
- "description": "This project Softpro Admin",
5
- "main": "dist/admin.js",
6
- "type": "module",
7
- "directories": {
8
- "test": "test"
9
- },
10
- "files": [
11
- "dist/*",
12
- "module/*",
13
- "server/*",
14
- "plugin.js",
15
- "utils.js",
16
- "config.js"
17
- ],
18
- "scripts": {
19
- "test": "node --test test/**/*.test.js",
20
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
21
- "build": "vite build",
22
- "build-app": "cross-env APP=true vite build",
23
- "admin": "cross-env NODE_ENV=admin npm run start",
24
- "prod": "cross-env NODE_ENV=production npm run start",
25
- "start": "node --watch-path=server server vite ",
26
- "docs:dev": "vitepress dev docs",
27
- "docs:build": "vitepress build docs",
28
- "docs:preview": "vitepress preview docs"
29
- },
30
- "keywords": [],
31
- "author": "Softpro",
32
- "license": "ISC",
33
- "dependencies": {
34
- "@fancyapps/ui": "^5.0.36",
35
- "@opengis/admin": "^0.1.69",
36
- "@opengis/fastify-auth": "^1.0.47",
37
- "@opengis/fastify-file": "^1.0.27",
38
- "@opengis/fastify-table": "^1.1.71",
39
- "@opengis/v3-core": "^0.2.41",
40
- "@opengis/v3-filter": "^0.0.40",
41
- "@tiptap/core": "^2.8.0",
42
- "@tiptap/extension-color": "^2.8.0",
43
- "@tiptap/extension-mention": "^2.8.0",
44
- "@tiptap/extension-placeholder": "^2.8.0",
45
- "@tiptap/extension-text": "^2.8.0",
46
- "@tiptap/extension-text-style": "^2.8.0",
47
- "@tiptap/extension-underline": "^2.8.0",
48
- "@tiptap/pm": "^2.8.0",
49
- "@tiptap/starter-kit": "^2.8.0",
50
- "@tiptap/suggestion": "^2.8.0",
51
- "@tiptap/vue-3": "^2.8.0",
52
- "@turf/turf": "^7.1.0",
53
- "@vitejs/plugin-vue": "^5.0.4",
54
- "close-with-grace": "^1.3.0",
55
- "cross-env": "^7.0.3",
56
- "fastify": "^4.26.1",
57
- "fastify-plugin": "^4.0.0",
58
- "maplibre-gl": "^4.7.0",
59
- "moment": "^2.30.1",
60
- "vite": "^5.1.4",
61
- "vue": "^3.4.21",
62
- "vue-router": "^4.3.0"
63
- },
64
- "devDependencies": {
65
- "@panzoom/panzoom": "^4.5.1",
66
- "@vue/eslint-config-typescript": "^12.0.0",
67
- "autoprefixer": "^10.4.20",
68
- "eslint": "^8.49.0",
69
- "eslint-config-airbnb": "^19.0.4",
70
- "eslint-plugin-import": "^2.25.3",
71
- "eslint-plugin-vue": "^9.17.0",
72
- "markdown-it-abbr": "^2.0.0",
73
- "mermaid": "^10.9.0",
74
- "postcss": "^8.4.47",
75
- "sass-embedded": "^1.79.1",
76
- "tailwindcss": "^3.4.13",
77
- "vitepress": "^1.1.3",
78
- "vitepress-plugin-mermaid": "^2.0.16",
79
- "vitepress-plugin-tabs": "^0.5.0",
80
- "vitepress-sidebar": "^1.22.0"
81
- }
82
- }
1
+ {
2
+ "name": "@opengis/admin",
3
+ "version": "0.1.99",
4
+ "description": "This project Softpro Admin",
5
+ "main": "dist/admin.js",
6
+ "type": "module",
7
+ "directories": {
8
+ "test": "test"
9
+ },
10
+ "files": [
11
+ "dist/*",
12
+ "module/*",
13
+ "server/*",
14
+ "plugin.js",
15
+ "utils.js",
16
+ "config.js"
17
+ ],
18
+ "scripts": {
19
+ "test": "node --test test/**/*.test.js",
20
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
21
+ "build": "vite build",
22
+ "build-app": "cross-env APP=true vite build",
23
+ "admin": "cross-env NODE_ENV=admin npm run start",
24
+ "prod": "cross-env NODE_ENV=production npm run start",
25
+ "debug": "node --watch-path=server server",
26
+ "start": "node server",
27
+ "docs:dev": "vitepress dev docs",
28
+ "docs:build": "vitepress build docs",
29
+ "docs:preview": "vitepress preview docs"
30
+ },
31
+ "keywords": [],
32
+ "author": "Softpro",
33
+ "license": "ISC",
34
+ "dependencies": {
35
+ "@fancyapps/ui": "^5.0.36",
36
+ "@opengis/admin": "^0.1.69",
37
+ "@opengis/fastify-auth": "^1.0.47",
38
+ "@opengis/fastify-file": "^1.0.27",
39
+ "@opengis/fastify-table": "^1.1.71",
40
+ "@opengis/v3-core": "^0.2.41",
41
+ "@opengis/v3-filter": "^0.0.41",
42
+ "@tiptap/core": "^2.8.0",
43
+ "@tiptap/extension-color": "^2.8.0",
44
+ "@tiptap/extension-mention": "^2.8.0",
45
+ "@tiptap/extension-placeholder": "^2.8.0",
46
+ "@tiptap/extension-text": "^2.8.0",
47
+ "@tiptap/extension-text-style": "^2.8.0",
48
+ "@tiptap/extension-underline": "^2.8.0",
49
+ "@tiptap/pm": "^2.8.0",
50
+ "@tiptap/starter-kit": "^2.8.0",
51
+ "@tiptap/suggestion": "^2.8.0",
52
+ "@tiptap/vue-3": "^2.8.0",
53
+ "@turf/turf": "^7.1.0",
54
+ "@vitejs/plugin-vue": "^5.0.4",
55
+ "close-with-grace": "^1.3.0",
56
+ "cross-env": "^7.0.3",
57
+ "fastify": "^4.26.1",
58
+ "fastify-plugin": "^4.0.0",
59
+ "maplibre-gl": "^4.7.0",
60
+ "moment": "^2.30.1",
61
+ "vite": "^5.1.4",
62
+ "vue": "^3.4.21",
63
+ "vue-router": "^4.3.0"
64
+ },
65
+ "devDependencies": {
66
+ "@panzoom/panzoom": "^4.5.1",
67
+ "@vue/eslint-config-typescript": "^12.0.0",
68
+ "autoprefixer": "^10.4.20",
69
+ "eslint": "^8.49.0",
70
+ "eslint-config-airbnb": "^19.0.4",
71
+ "eslint-plugin-import": "^2.25.3",
72
+ "eslint-plugin-vue": "^9.17.0",
73
+ "markdown-it-abbr": "^2.0.0",
74
+ "mermaid": "^10.9.0",
75
+ "postcss": "^8.4.47",
76
+ "sass-embedded": "^1.79.1",
77
+ "tailwindcss": "^3.4.13",
78
+ "vitepress": "^1.1.3",
79
+ "vitepress-plugin-mermaid": "^2.0.16",
80
+ "vitepress-plugin-tabs": "^0.5.0",
81
+ "vitepress-sidebar": "^1.22.0"
82
+ }
83
+ }
package/plugin.js CHANGED
@@ -1,30 +1,30 @@
1
- import fp from 'fastify-plugin';
2
-
3
- import config from './config.js';
4
-
5
- config.prefix = config.prefix || '/api';
6
-
7
- async function plugin(fastify, opts = config) {
8
- // const prefix = config.prefix || '/api';
9
-
10
- fastify.register(import('./server/helpers/index.mjs'), opts);
11
- // fastify.register(import('@opengis/fastify-auth'), config);
12
-
13
- fastify.register(import('./server/plugins/cron.js'), opts); // cron / scheduler
14
- fastify.register(import('./server/plugins/hook.js'), opts); // data / template hooks
15
- fastify.register(import('./server/plugins/access/index.mjs'), opts); // check access / analogue of policy
16
-
17
- // API
18
- fastify.register(import('./server/routes/properties/index.mjs'), opts);
19
- fastify.register(import('./server/routes/calendar/index.mjs'), opts);
20
- fastify.register(import('./server/routes/notifications/index.mjs'), opts);
21
- fastify.register(import('./server/routes/templates/index.mjs'), opts);
22
- fastify.register(import('./server/routes/menu/index.mjs'), opts);
23
- fastify.register(import('./server/routes/data/index.mjs'), opts);
24
-
25
- fastify.register(import('./server/routes/user/index.mjs'), opts);
26
- fastify.register(import('./server/routes/widget/index.mjs'), opts);
27
-
28
- fastify.register(import('./server/routes/access/index.mjs'), opts);
29
- }
1
+ import fp from 'fastify-plugin';
2
+
3
+ import config from './config.js';
4
+
5
+ config.prefix = config.prefix || '/api';
6
+
7
+ async function plugin(fastify, opts = config) {
8
+ // const prefix = config.prefix || '/api';
9
+
10
+ fastify.register(import('./server/helpers/index.js'), opts);
11
+ // fastify.register(import('@opengis/fastify-auth'), config);
12
+
13
+ fastify.register(import('./server/plugins/cron.js'), opts); // cron / scheduler
14
+ fastify.register(import('./server/plugins/hook.js'), opts); // data / template hooks
15
+ fastify.register(import('./server/plugins/access/index.mjs'), opts); // check access / analogue of policy
16
+
17
+ // API
18
+ fastify.register(import('./server/routes/properties/index.mjs'), opts);
19
+ fastify.register(import('./server/routes/calendar/index.mjs'), opts);
20
+ fastify.register(import('./server/routes/notifications/index.mjs'), opts);
21
+ fastify.register(import('./server/routes/templates/index.mjs'), opts);
22
+ fastify.register(import('./server/routes/menu/index.mjs'), opts);
23
+ fastify.register(import('./server/routes/data/index.mjs'), opts);
24
+
25
+ fastify.register(import('./server/routes/user/index.mjs'), opts);
26
+ fastify.register(import('./server/routes/widget/index.mjs'), opts);
27
+
28
+ fastify.register(import('./server/routes/access/index.mjs'), opts);
29
+ }
30
30
  export default fp(plugin)
@@ -0,0 +1,16 @@
1
+ import { getSelect } from "@opengis/fastify-table/utils.js";
2
+
3
+
4
+
5
+ export default async function badge(id, options) {
6
+ if (!id) return '-';
7
+ const data = options.hash?.data;
8
+ if (!data) return id;
9
+ const classifier = await getSelect(data);
10
+ if (!classifier?.arr) return id;
11
+
12
+ const item = classifier?.arr.find(el => el.id == id);
13
+ if (!item) return id;
14
+ return `<span style='color:${item.color || '#14b8a6'};border-color:${item.color || '#14b8a6'};' class="inline-flex items-center gap-x-1.5 py-1.5 px-3 rounded-full text-xs font-medium border border-teal-500 text-teal-500">${item.text}</span>`
15
+
16
+ }
@@ -0,0 +1,14 @@
1
+
2
+ import button from '../utils/button.js';
3
+ import buttonDel from '../utils/buttonDel.js';
4
+ export default function buttonHelper(data, opt) {
5
+ const { hash } = opt;
6
+
7
+ // console.log(params)
8
+
9
+ if (!hash.token) return 'token empty';
10
+ if (hash.del) {
11
+ return buttonDel(hash.token, hash.title)
12
+ }
13
+ return button(hash.token, hash.title);
14
+ }