lesli_audit 0.5.0 → 0.6.0
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/lesli_audit/application.js +1092 -263
- data/app/assets/stylesheets/lesli_audit/application.css +35 -0
- data/app/controllers/lesli_audit/users_controller.rb +35 -0
- data/app/services/lesli_audit/account/activity_services.rb +2 -2
- data/app/services/lesli_audit/analytics/trend_services.rb +2 -2
- data/app/services/lesli_audit/user_service.rb +63 -0
- data/app/services/lesli_audit/users/activity_services.rb +2 -2
- data/app/services/lesli_audit/users/log_services.rb +2 -2
- data/app/services/lesli_audit/users/registration_services.rb +2 -2
- data/app/services/lesli_audit/users/role_services.rb +2 -2
- data/app/services/lesli_audit/users/working_hour_services.rb +2 -2
- data/app/views/lesli_audit/partials/_engine-navigation.html.erb +4 -4
- data/config/locales/translations.en.yml +1 -0
- data/config/locales/translations.es.yml +1 -0
- data/config/locales/translations.fr.yml +21 -0
- data/config/locales/translations.it.yml +21 -0
- data/config/locales/translations.pt.yml +21 -0
- data/config/routes.rb +4 -2
- data/lib/lesli_audit/version.rb +2 -2
- data/{app/assets/stylesheets/lesli_audit → lib/scss}/application.scss +0 -4
- data/lib/vue/application.js +14 -14
- data/lib/vue/apps/analytics/index.vue +1 -1
- data/lib/vue/apps/analytics/trends.vue +2 -3
- data/lib/vue/apps/dashboards/components/roles.vue +3 -3
- data/lib/vue/apps/dashboards/components/users.vue +3 -3
- data/lib/vue/apps/dashboards/show.vue +1 -1
- data/lib/vue/apps/requests/index.vue +1 -1
- data/lib/vue/apps/users/index.vue +80 -22
- data/lib/vue/apps/users/registrations.vue +21 -44
- data/lib/vue/components/requests.vue +1 -1
- data/lib/vue/components/visitors.vue +4 -4
- data/lib/vue/stores/analytics.js +24 -9
- data/lib/vue/stores/translations.json +104 -0
- data/lib/vue/stores/users.js +56 -0
- metadata +9 -5
- data/app/assets/stylesheets/lesli_audit/dashboard.scss +0 -0
- data/app/controllers/lesli_audit/dashboard/components_controller.rb +0 -60
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*!*********************************************************************************************************************************************************!*\
|
|
2
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/sass-loader/dist/cjs.js!../LesliAudit/lib/scss/application.scss ***!
|
|
3
|
+
\*********************************************************************************************************************************************************/
|
|
4
|
+
@charset "UTF-8";
|
|
5
|
+
/*
|
|
6
|
+
|
|
7
|
+
Lesli
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
10
|
+
|
|
11
|
+
This program is free software: you can redistribute it and/or modify
|
|
12
|
+
it under the terms of the GNU General Public License as published by
|
|
13
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
(at your option) any later version.
|
|
15
|
+
|
|
16
|
+
This program is distributed in the hope that it will be useful,
|
|
17
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
GNU General Public License for more details.
|
|
20
|
+
|
|
21
|
+
You should have received a copy of the GNU General Public License
|
|
22
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
23
|
+
|
|
24
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
25
|
+
|
|
26
|
+
Made with ♥ by https://www.lesli.tech
|
|
27
|
+
Building a better future, one line of code at a time.
|
|
28
|
+
|
|
29
|
+
@contact hello@lesli.tech
|
|
30
|
+
@website https://www.lesli.tech
|
|
31
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
32
|
+
|
|
33
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
34
|
+
// ·
|
|
35
|
+
*/
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
|
|
3
|
+
Lesli
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
6
|
+
|
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
|
8
|
+
it under the terms of the GNU General Public License as published by
|
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
(at your option) any later version.
|
|
11
|
+
|
|
12
|
+
This program is distributed in the hope that it will be useful,
|
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
GNU General Public License for more details.
|
|
16
|
+
|
|
17
|
+
You should have received a copy of the GNU General Public License
|
|
18
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
|
+
|
|
20
|
+
Lesli · Ruby on Rails SaaS development platform.
|
|
21
|
+
|
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
|
23
|
+
Building a better future, one line of code at a time.
|
|
24
|
+
|
|
25
|
+
@contact hello@lesli.tech
|
|
26
|
+
@website https://www.lesli.tech
|
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
28
|
+
|
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
30
|
+
// ·
|
|
31
|
+
=end
|
|
1
32
|
module LesliAudit
|
|
2
33
|
class UsersController < ApplicationController
|
|
3
34
|
|
|
@@ -5,6 +36,10 @@ module LesliAudit
|
|
|
5
36
|
def index
|
|
6
37
|
end
|
|
7
38
|
|
|
39
|
+
def registrations
|
|
40
|
+
respond_with_successful(UserService.new(current_user, query).registrations)
|
|
41
|
+
end
|
|
42
|
+
|
|
8
43
|
|
|
9
44
|
private
|
|
10
45
|
|
|
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
|
|
|
30
30
|
// ·
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
|
-
module
|
|
34
|
-
class
|
|
33
|
+
module LesliAudit
|
|
34
|
+
class Account::ActivityServices < Lesli::ApplicationLesliService
|
|
35
35
|
|
|
36
36
|
def index
|
|
37
37
|
search_string = nil # query[:search].downcase.gsub(" ","%") unless query[:search].blank?
|
|
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
|
|
|
30
30
|
// ·
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
|
-
module
|
|
34
|
-
class Analytics::TrendServices <
|
|
33
|
+
module LesliAudit
|
|
34
|
+
class Analytics::TrendServices < Lesli::ApplicationLesliService
|
|
35
35
|
|
|
36
36
|
def index
|
|
37
37
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
|
|
3
|
+
Lesli
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
6
|
+
|
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
|
8
|
+
it under the terms of the GNU General Public License as published by
|
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
(at your option) any later version.
|
|
11
|
+
|
|
12
|
+
This program is distributed in the hope that it will be useful,
|
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
GNU General Public License for more details.
|
|
16
|
+
|
|
17
|
+
You should have received a copy of the GNU General Public License
|
|
18
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
|
+
|
|
20
|
+
Lesli · Ruby on Rails SaaS development platform.
|
|
21
|
+
|
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
|
23
|
+
Building a better future, one line of code at a time.
|
|
24
|
+
|
|
25
|
+
@contact hello@lesli.tech
|
|
26
|
+
@website https://www.lesli.tech
|
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
28
|
+
|
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
30
|
+
// ·
|
|
31
|
+
=end
|
|
32
|
+
|
|
33
|
+
module LesliAudit
|
|
34
|
+
class UserService < Lesli::ApplicationLesliService
|
|
35
|
+
|
|
36
|
+
def registrations
|
|
37
|
+
|
|
38
|
+
period = "month"
|
|
39
|
+
|
|
40
|
+
#Get filters from the request
|
|
41
|
+
group = query[:group]
|
|
42
|
+
|
|
43
|
+
#Get period only if the request have filters
|
|
44
|
+
period = group unless group.blank?
|
|
45
|
+
|
|
46
|
+
registrations = []
|
|
47
|
+
|
|
48
|
+
if ["day", "week", "month", "year"].include?(period)
|
|
49
|
+
registrations = current_user.account.users
|
|
50
|
+
.group("DATE_TRUNC('#{period}', created_at)")
|
|
51
|
+
.count
|
|
52
|
+
.map do |request|
|
|
53
|
+
{
|
|
54
|
+
:date => Date2.new(request[0]).date.to_s,
|
|
55
|
+
:count => request[1]
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
registrations
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
|
|
|
30
30
|
// ·
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
|
-
module
|
|
34
|
-
class Users::ActivityServices <
|
|
33
|
+
module LesliAudit
|
|
34
|
+
class Users::ActivityServices < Lesli::ApplicationLesliService
|
|
35
35
|
|
|
36
36
|
# @overwrite
|
|
37
37
|
# @return {Hash} Paginated list of the records
|
|
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
|
|
|
30
30
|
// ·
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
|
-
module
|
|
34
|
-
class Users::LogServices <
|
|
33
|
+
module LesliAudit
|
|
34
|
+
class Users::LogServices < Lesli::ApplicationLesliService
|
|
35
35
|
|
|
36
36
|
# @overwrite
|
|
37
37
|
# @return {Hash} Paginated list of the records
|
|
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
|
|
|
30
30
|
// ·
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
|
-
module
|
|
34
|
-
class Users::RegistrationServices <
|
|
33
|
+
module LesliAudit
|
|
34
|
+
class Users::RegistrationServices < Lesli::ApplicationLesliService
|
|
35
35
|
|
|
36
36
|
# @overwrite
|
|
37
37
|
# @return {Hash} Paginated list of the records
|
|
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
|
|
|
30
30
|
// ·
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
|
-
module
|
|
34
|
-
class Users::RoleServices <
|
|
33
|
+
module LesliAudit
|
|
34
|
+
class Users::RoleServices < Lesli::ApplicationLesliService
|
|
35
35
|
|
|
36
36
|
# @overwrite
|
|
37
37
|
# @return {Hash} Paginated list of the records
|
|
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
|
|
|
30
30
|
// ·
|
|
31
31
|
=end
|
|
32
32
|
|
|
33
|
-
module
|
|
34
|
-
class Users::WorkingHourServices <
|
|
33
|
+
module LesliAudit
|
|
34
|
+
class Users::WorkingHourServices < Lesli::ApplicationLesliService
|
|
35
35
|
|
|
36
36
|
# @overwrite
|
|
37
37
|
# @return {Hash} Paginated list of the records
|
|
@@ -18,9 +18,9 @@ GNU General Public License for more details.
|
|
|
18
18
|
You should have received a copy of the GNU General Public License
|
|
19
19
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
20
|
|
|
21
|
-
Lesli · Ruby on Rails SaaS
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
22
|
|
|
23
|
-
Made with ♥ by
|
|
23
|
+
Made with ♥ by LesliTech
|
|
24
24
|
Building a better future, one line of code at a time.
|
|
25
25
|
|
|
26
26
|
@contact hello@lesli.tech
|
|
@@ -32,8 +32,8 @@ Building a better future, one line of code at a time.
|
|
|
32
32
|
=end
|
|
33
33
|
%>
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
<%#= navigation_item(lesli_audit.dashboard_path, "Dashboard", "ri-dashboard-3-line"); %>
|
|
36
36
|
<%= navigation_item(lesli_audit.users_path, "Users", "ri-team-line"); %>
|
|
37
37
|
<%= navigation_item(lesli_audit.analytics_path, "Analytics", "ri-pie-chart-line"); %>
|
|
38
|
-
|
|
38
|
+
<%#= navigation_item(lesli_audit.dashboard_path, "Account", "ri-briefcase-line"); %>
|
|
39
39
|
<%= navigation_item(lesli_audit.requests_path, "Requests", "ri-arrow-left-right-fill"); %>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
:fr:
|
|
3
|
+
lesli:
|
|
4
|
+
shared:
|
|
5
|
+
view_discussions: ":lesli.shared.view_discussions:"
|
|
6
|
+
button_add_new: ":lesli.shared.button_add_new:"
|
|
7
|
+
button_reload: ":lesli.shared.button_reload:"
|
|
8
|
+
view_files: ":lesli.shared.view_files:"
|
|
9
|
+
view_quick_actions: ":lesli.shared.view_quick_actions:"
|
|
10
|
+
button_list: ":lesli.shared.button_list:"
|
|
11
|
+
button_save: ":lesli.shared.button_save:"
|
|
12
|
+
button_delete: ":lesli.shared.button_delete:"
|
|
13
|
+
button_edit: ":lesli.shared.button_edit:"
|
|
14
|
+
view_status_active: ":lesli.shared.view_status_active:"
|
|
15
|
+
view_status_inactive: ":lesli.shared.view_status_inactive:"
|
|
16
|
+
button_settings: ":lesli.shared.button_settings:"
|
|
17
|
+
button_show: ":lesli.shared.button_show:"
|
|
18
|
+
toolbar_search: ":lesli.shared.toolbar_search:"
|
|
19
|
+
application:
|
|
20
|
+
navigation_logout: ":lesli.application.navigation_logout:"
|
|
21
|
+
navigation_my_profile: ":lesli.application.navigation_my_profile:"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
:it:
|
|
3
|
+
lesli:
|
|
4
|
+
shared:
|
|
5
|
+
view_discussions: ":lesli.shared.view_discussions:"
|
|
6
|
+
button_add_new: ":lesli.shared.button_add_new:"
|
|
7
|
+
button_reload: ":lesli.shared.button_reload:"
|
|
8
|
+
view_files: ":lesli.shared.view_files:"
|
|
9
|
+
view_quick_actions: ":lesli.shared.view_quick_actions:"
|
|
10
|
+
button_list: ":lesli.shared.button_list:"
|
|
11
|
+
button_save: ":lesli.shared.button_save:"
|
|
12
|
+
button_delete: ":lesli.shared.button_delete:"
|
|
13
|
+
button_edit: ":lesli.shared.button_edit:"
|
|
14
|
+
view_status_active: ":lesli.shared.view_status_active:"
|
|
15
|
+
view_status_inactive: ":lesli.shared.view_status_inactive:"
|
|
16
|
+
button_settings: ":lesli.shared.button_settings:"
|
|
17
|
+
button_show: ":lesli.shared.button_show:"
|
|
18
|
+
toolbar_search: ":lesli.shared.toolbar_search:"
|
|
19
|
+
application:
|
|
20
|
+
navigation_logout: ":lesli.application.navigation_logout:"
|
|
21
|
+
navigation_my_profile: ":lesli.application.navigation_my_profile:"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
:pt:
|
|
3
|
+
lesli:
|
|
4
|
+
shared:
|
|
5
|
+
view_discussions: ":lesli.shared.view_discussions:"
|
|
6
|
+
button_add_new: ":lesli.shared.button_add_new:"
|
|
7
|
+
button_reload: ":lesli.shared.button_reload:"
|
|
8
|
+
view_files: ":lesli.shared.view_files:"
|
|
9
|
+
view_quick_actions: ":lesli.shared.view_quick_actions:"
|
|
10
|
+
button_list: ":lesli.shared.button_list:"
|
|
11
|
+
button_save: ":lesli.shared.button_save:"
|
|
12
|
+
button_delete: ":lesli.shared.button_delete:"
|
|
13
|
+
button_edit: ":lesli.shared.button_edit:"
|
|
14
|
+
view_status_active: ":lesli.shared.view_status_active:"
|
|
15
|
+
view_status_inactive: ":lesli.shared.view_status_inactive:"
|
|
16
|
+
button_settings: ":lesli.shared.button_settings:"
|
|
17
|
+
button_show: ":lesli.shared.button_show:"
|
|
18
|
+
toolbar_search: ":lesli.shared.toolbar_search:"
|
|
19
|
+
application:
|
|
20
|
+
navigation_logout: ":lesli.application.navigation_logout:"
|
|
21
|
+
navigation_my_profile: ":lesli.application.navigation_my_profile:"
|
data/config/routes.rb
CHANGED
|
@@ -17,7 +17,7 @@ GNU General Public License for more details.
|
|
|
17
17
|
You should have received a copy of the GNU General Public License
|
|
18
18
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
19
|
|
|
20
|
-
Lesli · Ruby on Rails SaaS
|
|
20
|
+
Lesli · Ruby on Rails SaaS development platform.
|
|
21
21
|
|
|
22
22
|
Made with ♥ by https://www.lesli.tech
|
|
23
23
|
Building a better future, one line of code at a time.
|
|
@@ -60,7 +60,9 @@ LesliAudit::Engine.routes.draw do
|
|
|
60
60
|
# Roles total users by role
|
|
61
61
|
# Logs relevant actions of users
|
|
62
62
|
resources :users, only: [:index] do
|
|
63
|
-
|
|
63
|
+
collection do
|
|
64
|
+
get :registrations
|
|
65
|
+
end
|
|
64
66
|
end
|
|
65
67
|
|
|
66
68
|
|
data/lib/lesli_audit/version.rb
CHANGED
data/lib/vue/application.js
CHANGED
|
@@ -31,26 +31,26 @@ Building a better future, one line of code at a time.
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
// · Import Lesli builders
|
|
34
|
-
import application from "Lesli/application"
|
|
35
|
-
import translation from "Lesli/translation"
|
|
34
|
+
import application from "Lesli/vue/application"
|
|
35
|
+
import translation from "Lesli/vue/translation"
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
// · Import engine translations
|
|
39
|
-
import translations from "LesliAudit/stores/translations.json"
|
|
39
|
+
import translations from "LesliAudit/vue/stores/translations.json"
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
// ·
|
|
43
|
-
import appAnalytics from "LesliAudit/apps/analytics/index.vue"
|
|
44
|
-
import appRequests from "LesliAudit/apps/requests/index.vue"
|
|
45
|
-
import appUsers from "LesliAudit/apps/users/index.vue"
|
|
43
|
+
import appAnalytics from "LesliAudit/vue/apps/analytics/index.vue"
|
|
44
|
+
import appRequests from "LesliAudit/vue/apps/requests/index.vue"
|
|
45
|
+
import appUsers from "LesliAudit/vue/apps/users/index.vue"
|
|
46
46
|
|
|
47
|
-
//import appDashboardShow from "LesliAudit/apps/dashboards/show.vue"
|
|
48
|
-
import appDashboardShow from "Lesli/shared/dashboards/apps/show.vue"
|
|
49
|
-
import appDashboardEdit from "Lesli/shared/dashboards/apps/edit.vue"
|
|
47
|
+
//import appDashboardShow from "LesliAudit/vue/apps/dashboards/show.vue"
|
|
48
|
+
import appDashboardShow from "Lesli/vue/shared/dashboards/apps/show.vue"
|
|
49
|
+
import appDashboardEdit from "Lesli/vue/shared/dashboards/apps/edit.vue"
|
|
50
50
|
|
|
51
51
|
// ·
|
|
52
52
|
/*
|
|
53
|
-
import dashboard from "Lesli/shared/dashboards/apps/show.vue"
|
|
53
|
+
import dashboard from "Lesli/vue/shared/dashboards/apps/show.vue"
|
|
54
54
|
import appUsersRegistrations from "CloudAudit/apps/users/registrations.vue"
|
|
55
55
|
import appUsersWorkingHours from "CloudAudit/apps/users/workingHours.vue"
|
|
56
56
|
import appUsersActivities from "CloudAudit/apps/users/activities.vue"
|
|
@@ -68,15 +68,15 @@ import appSecurityPasswords from "CloudAudit/apps/security/passwords.vue"
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
// ·
|
|
71
|
-
import componentDashboardUsers from "LesliAudit/apps/dashboards/components/users.vue"
|
|
72
|
-
import componentDashboardRoles from "LesliAudit/apps/dashboards/components/roles.vue"
|
|
71
|
+
import componentDashboardUsers from "LesliAudit/vue/apps/dashboards/components/users.vue"
|
|
72
|
+
import componentDashboardRoles from "LesliAudit/vue/apps/dashboards/components/roles.vue"
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
// ·
|
|
76
76
|
const dashboardProps = {
|
|
77
77
|
components: {
|
|
78
|
-
"audit-users": componentDashboardUsers,
|
|
79
|
-
"audit-roles": componentDashboardRoles
|
|
78
|
+
// "audit-users": componentDashboardUsers,
|
|
79
|
+
// "audit-roles": componentDashboardRoles
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -22,12 +22,11 @@ import { ref, reactive, onMounted, watch, computed } from "vue"
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
// . import Lesli components
|
|
25
|
-
import
|
|
26
|
-
import chartLine from "Lesli/components/charts/line.vue"
|
|
25
|
+
import { lesliChartBar, lesliChartLine } from "lesli-vue/components"
|
|
27
26
|
|
|
28
27
|
|
|
29
28
|
// · import lesli stores
|
|
30
|
-
import { useAnalytics } from "
|
|
29
|
+
import { useAnalytics } from "LesliAudit/vue/stores/analytics"
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
// · implement stores
|
|
@@ -36,7 +36,7 @@ import { onMounted } from "vue"
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
// ·
|
|
39
|
-
import { useUsers } from "
|
|
39
|
+
import { useUsers } from "LesliSecurity/vue/stores/users"
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
// ·
|
|
@@ -54,14 +54,14 @@ const props = defineProps({
|
|
|
54
54
|
|
|
55
55
|
// ·
|
|
56
56
|
onMounted(() => {
|
|
57
|
-
storeUsers.getUsersList()
|
|
57
|
+
//storeUsers.getUsersList()
|
|
58
58
|
})
|
|
59
59
|
|
|
60
60
|
</script>
|
|
61
61
|
<template>
|
|
62
62
|
<lesli-card>
|
|
63
63
|
<h6 class="title is-6 mb-4">{{ props.component.name }}</h6>
|
|
64
|
-
<p>{{ storeUsers.list.length }}</p>
|
|
64
|
+
<p>{ { storeUsers.list.length } }</p>
|
|
65
65
|
</lesli-card>
|
|
66
66
|
</template>
|
|
67
67
|
<style scoped>
|
|
@@ -36,7 +36,7 @@ import { onMounted } from "vue"
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
// ·
|
|
39
|
-
import { useUsers } from "
|
|
39
|
+
import { useUsers } from "LesliSecurity/vue/stores/users"
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
// ·
|
|
@@ -54,14 +54,14 @@ const props = defineProps({
|
|
|
54
54
|
|
|
55
55
|
// ·
|
|
56
56
|
onMounted(() => {
|
|
57
|
-
storeUsers.getUsersList()
|
|
57
|
+
//storeUsers.getUsersList()
|
|
58
58
|
})
|
|
59
59
|
|
|
60
60
|
</script>
|
|
61
61
|
<template>
|
|
62
62
|
<lesli-card>
|
|
63
63
|
<h6 class="title is-6 mb-4">{{ props.component.name }}</h6>
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
</lesli-card>
|
|
66
66
|
</template>
|
|
67
67
|
<style scoped>
|
|
@@ -1,31 +1,89 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
/*
|
|
3
|
+
|
|
4
|
+
Lesli
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
7
|
+
|
|
8
|
+
This program is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
(at your option) any later version.
|
|
12
|
+
|
|
13
|
+
This program is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
|
+
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
|
+
|
|
23
|
+
Made with ♥ by LesliTech
|
|
24
|
+
Building a better future, one line of code at a time.
|
|
25
|
+
|
|
26
|
+
@contact hello@lesli.tech
|
|
27
|
+
@website https://www.lesli.tech
|
|
28
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
|
+
|
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
31
|
+
// ·
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// · import vue tools
|
|
36
|
+
import { onMounted, ref } from "vue"
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
// · import stores
|
|
40
|
+
import componentRegistrations from "./registrations.vue"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// · import stores
|
|
44
|
+
import { useUsers } from "LesliAudit/vue/stores/users"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
// · implement stores
|
|
48
|
+
const storeUsers = useUsers()
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
// ·
|
|
52
|
+
var selectedPeriod = ref("month");
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
// ·
|
|
56
|
+
function updateDate(){
|
|
57
|
+
// filterPeriod = selectedPeriod.value;
|
|
58
|
+
// storeUsersRegistrations.fetch(filterPeriod)
|
|
59
|
+
}
|
|
2
60
|
|
|
3
61
|
</script>
|
|
4
62
|
<template>
|
|
5
63
|
<lesli-application-container>
|
|
6
|
-
<lesli-
|
|
7
|
-
<lesli-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
64
|
+
<lesli-header title="Users">
|
|
65
|
+
<lesli-select
|
|
66
|
+
id = "selectPeriod"
|
|
67
|
+
@change="updateDate"
|
|
68
|
+
v-model = "selectedPeriod"
|
|
69
|
+
:options="[{
|
|
70
|
+
label: 'Year',
|
|
71
|
+
value: 'year'
|
|
72
|
+
}, {
|
|
73
|
+
label: 'Month',
|
|
74
|
+
value: 'month'
|
|
75
|
+
}, {
|
|
76
|
+
label: 'Week',
|
|
77
|
+
value: 'week'
|
|
78
|
+
}, {
|
|
79
|
+
label: 'Day',
|
|
80
|
+
value: 'day'
|
|
81
|
+
}]">
|
|
82
|
+
</lesli-select>
|
|
83
|
+
</lesli-header>
|
|
84
|
+
<component-registrations>
|
|
85
|
+
</component-registrations>
|
|
23
86
|
</lesli-application-container>
|
|
24
87
|
</template>
|
|
25
88
|
<style>
|
|
26
|
-
.number {
|
|
27
|
-
padding: 1rem;
|
|
28
|
-
font-size: 3rem;
|
|
29
|
-
text-align: center;
|
|
30
|
-
}
|
|
31
89
|
</style>
|