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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/lesli_audit/application.js +1092 -263
  3. data/app/assets/stylesheets/lesli_audit/application.css +35 -0
  4. data/app/controllers/lesli_audit/users_controller.rb +35 -0
  5. data/app/services/lesli_audit/account/activity_services.rb +2 -2
  6. data/app/services/lesli_audit/analytics/trend_services.rb +2 -2
  7. data/app/services/lesli_audit/user_service.rb +63 -0
  8. data/app/services/lesli_audit/users/activity_services.rb +2 -2
  9. data/app/services/lesli_audit/users/log_services.rb +2 -2
  10. data/app/services/lesli_audit/users/registration_services.rb +2 -2
  11. data/app/services/lesli_audit/users/role_services.rb +2 -2
  12. data/app/services/lesli_audit/users/working_hour_services.rb +2 -2
  13. data/app/views/lesli_audit/partials/_engine-navigation.html.erb +4 -4
  14. data/config/locales/translations.en.yml +1 -0
  15. data/config/locales/translations.es.yml +1 -0
  16. data/config/locales/translations.fr.yml +21 -0
  17. data/config/locales/translations.it.yml +21 -0
  18. data/config/locales/translations.pt.yml +21 -0
  19. data/config/routes.rb +4 -2
  20. data/lib/lesli_audit/version.rb +2 -2
  21. data/{app/assets/stylesheets/lesli_audit → lib/scss}/application.scss +0 -4
  22. data/lib/vue/application.js +14 -14
  23. data/lib/vue/apps/analytics/index.vue +1 -1
  24. data/lib/vue/apps/analytics/trends.vue +2 -3
  25. data/lib/vue/apps/dashboards/components/roles.vue +3 -3
  26. data/lib/vue/apps/dashboards/components/users.vue +3 -3
  27. data/lib/vue/apps/dashboards/show.vue +1 -1
  28. data/lib/vue/apps/requests/index.vue +1 -1
  29. data/lib/vue/apps/users/index.vue +80 -22
  30. data/lib/vue/apps/users/registrations.vue +21 -44
  31. data/lib/vue/components/requests.vue +1 -1
  32. data/lib/vue/components/visitors.vue +4 -4
  33. data/lib/vue/stores/analytics.js +24 -9
  34. data/lib/vue/stores/translations.json +104 -0
  35. data/lib/vue/stores/users.js +56 -0
  36. metadata +9 -5
  37. data/app/assets/stylesheets/lesli_audit/dashboard.scss +0 -0
  38. 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 CloudAudit
34
- class Analytics::ActivityServices < ApplicationLesliServices
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 CloudAudit
34
- class Analytics::TrendServices < ApplicationLesliServices
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 CloudAudit
34
- class Users::ActivityServices < ApplicationLesliServices
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 CloudAudit
34
- class Users::LogServices < ApplicationLesliServices
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 CloudAudit
34
- class Users::RegistrationServices < ApplicationLesliServices
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 CloudAudit
34
- class Users::RoleServices < ApplicationLesliServices
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 CloudAudit
34
- class Users::WorkingHourServices < ApplicationLesliServices
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 development platform.
21
+ Lesli · Ruby on Rails SaaS Development Framework.
22
22
 
23
- Made with ♥ by https://www.lesli.tech
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
- <%= navigation_item(lesli_audit.dashboard_path, "Dashboard", "ri-dashboard-3-line"); %>
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
- <%= navigation_item(lesli_audit.dashboard_path, "Account", "ri-briefcase-line"); %>
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"); %>
@@ -15,6 +15,7 @@
15
15
  view_status_inactive: Inactive
16
16
  button_settings: Settings
17
17
  button_show: Show
18
+ toolbar_search: Search...
18
19
  application:
19
20
  navigation_logout: Logout
20
21
  navigation_my_profile: My profile
@@ -15,6 +15,7 @@
15
15
  view_status_inactive: Inactivo
16
16
  button_settings: Configuración
17
17
  button_show: Ver
18
+ toolbar_search: Buscar...
18
19
  application:
19
20
  navigation_logout: Cerrar sesión
20
21
  navigation_my_profile: Mi perfil
@@ -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 Development Framework.
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
 
@@ -1,4 +1,4 @@
1
1
  module LesliAudit
2
- VERSION = "0.5.0"
3
- BUILD = "1697000148"
2
+ VERSION = "0.6.0"
3
+ BUILD = "1713121383"
4
4
  end
@@ -29,7 +29,3 @@ Building a better future, one line of code at a time.
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
30
  // ·
31
31
  */
32
-
33
-
34
- // // ·
35
- body.cloud_audit-dashboard { @import "lesli/templates/dashboards"; }
@@ -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
 
@@ -5,7 +5,7 @@ import { ref, reactive, onMounted, watch, computed } from "vue"
5
5
 
6
6
 
7
7
  // · import stores
8
- import { useAnalytics } from "LesliAudit/stores/analytics"
8
+ import { useAnalytics } from "LesliAudit/vue/stores/analytics"
9
9
 
10
10
 
11
11
  // · implement stores
@@ -22,12 +22,11 @@ import { ref, reactive, onMounted, watch, computed } from "vue"
22
22
 
23
23
 
24
24
  // . import Lesli components
25
- import chartBar from "Lesli/components/charts/bar.vue"
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 "CloudAudit/stores/analytics"
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 "Lesli/stores/users"
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 "Lesli/stores/users"
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
+
65
65
  </lesli-card>
66
66
  </template>
67
67
  <style scoped>
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
 
3
- import LesliDashboard from "Lesli/shared/dashboards/apps/show.vue"
3
+ import LesliDashboard from "Lesli/vue/shared/dashboards/apps/show.vue"
4
4
 
5
5
  </script>
6
6
  <template>
@@ -37,7 +37,7 @@ import { ref, reactive, onMounted, watch, computed } from "vue"
37
37
 
38
38
 
39
39
  // · import lesli stores
40
- import { useRequests } from "LesliAudit/stores/request"
40
+ import { useRequests } from "LesliAudit/vue/stores/request"
41
41
 
42
42
 
43
43
  // · implement stores
@@ -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-columns>
7
- <lesli-column>
8
- <lesli-card title="Users registered">
9
- <p class="number">160</p>
10
- </lesli-card>
11
- </lesli-column>
12
- <lesli-column>
13
- <lesli-card title="Active roles">
14
- <p class="number">12</p>
15
- </lesli-card>
16
- </lesli-column>
17
- <lesli-column>
18
- <lesli-card title="Active descriptors">
19
- <p class="number">70</p>
20
- </lesli-card>
21
- </lesli-column>
22
- </lesli-columns>
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>