lesli_audit 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +5 -0
  3. data/app/assets/config/lesli_audit_manifest.js +38 -0
  4. data/app/assets/images/lesli_audit/audit-logo.svg +72 -0
  5. data/app/assets/javascripts/lesli_audit/application.js +3592 -0
  6. data/app/assets/stylesheets/lesli_audit/application.scss +35 -0
  7. data/app/assets/stylesheets/lesli_audit/dashboard.scss +0 -0
  8. data/app/controllers/lesli_audit/analytics_controller.rb +36 -0
  9. data/app/controllers/lesli_audit/application_controller.rb +4 -0
  10. data/app/controllers/lesli_audit/dashboards_controller.rb +59 -0
  11. data/app/helpers/lesli_audit/analytics_helper.rb +4 -0
  12. data/app/helpers/lesli_audit/application_helper.rb +4 -0
  13. data/app/helpers/lesli_audit/dashboards_helper.rb +4 -0
  14. data/app/jobs/lesli_audit/application_job.rb +4 -0
  15. data/app/mailers/lesli_audit/application_mailer.rb +6 -0
  16. data/app/models/lesli_audit/analytic.rb +4 -0
  17. data/app/models/lesli_audit/application_record.rb +5 -0
  18. data/app/models/lesli_audit/dashboard.rb +4 -0
  19. data/app/services/lesli_audit/account/activity_services.rb +69 -0
  20. data/app/services/lesli_audit/analytic_service.rb +151 -0
  21. data/app/services/lesli_audit/analytics/trend_services.rb +84 -0
  22. data/app/services/lesli_audit/analytics/visitor_service.rb +166 -0
  23. data/app/services/lesli_audit/request_services.rb +71 -0
  24. data/app/services/lesli_audit/users/activity_services.rb +61 -0
  25. data/app/services/lesli_audit/users/log_services.rb +62 -0
  26. data/app/services/lesli_audit/users/registration_services.rb +62 -0
  27. data/app/services/lesli_audit/users/role_services.rb +61 -0
  28. data/app/services/lesli_audit/users/working_hour_services.rb +78 -0
  29. data/app/views/lesli_audit/analytics/_analytic.html.erb +2 -0
  30. data/app/views/lesli_audit/analytics/_form.html.erb +17 -0
  31. data/app/views/lesli_audit/analytics/edit.html.erb +10 -0
  32. data/app/views/lesli_audit/analytics/index.html.erb +1 -0
  33. data/app/views/lesli_audit/analytics/new.html.erb +9 -0
  34. data/app/views/lesli_audit/analytics/show.html.erb +10 -0
  35. data/app/views/lesli_audit/dashboards/_dashboard.html.erb +2 -0
  36. data/app/views/lesli_audit/dashboards/_form.html.erb +17 -0
  37. data/app/views/lesli_audit/dashboards/edit.html.erb +10 -0
  38. data/app/views/lesli_audit/dashboards/index.html.erb +14 -0
  39. data/app/views/lesli_audit/dashboards/new.html.erb +9 -0
  40. data/app/views/lesli_audit/dashboards/show.html.erb +1 -0
  41. data/app/views/lesli_audit/partials/_engine-navigation.html.erb +39 -0
  42. data/config/routes.rb +45 -0
  43. data/db/migrate/v1.0/0803000110_create_lesli_audit_accounts.rb +42 -0
  44. data/db/migrate/v1.0/0803050110_create_lesli_audit_dashboards.rb +51 -0
  45. data/db/migrate/v1.0/0803050210_create_lesli_audit_dashboard_components.rb +53 -0
  46. data/lib/lesli_audit/engine.rb +18 -0
  47. data/lib/lesli_audit/version.rb +3 -0
  48. data/lib/lesli_audit.rb +6 -0
  49. data/lib/tasks/lesli_audit_tasks.rake +4 -0
  50. data/lib/vue/application.js +102 -0
  51. data/lib/vue/apps/accounts/activities.vue +48 -0
  52. data/lib/vue/apps/analytics/index.vue +18 -0
  53. data/lib/vue/apps/analytics/requests.vue +67 -0
  54. data/lib/vue/apps/analytics/trends.vue +149 -0
  55. data/lib/vue/apps/analytics/visitors.vue +91 -0
  56. data/lib/vue/apps/requests/index.vue +123 -0
  57. data/lib/vue/apps/security/passwords.vue +52 -0
  58. data/lib/vue/apps/security/sessions.vue +63 -0
  59. data/lib/vue/apps/users/activities.vue +49 -0
  60. data/lib/vue/apps/users/logs.vue +49 -0
  61. data/lib/vue/apps/users/registrations.vue +98 -0
  62. data/lib/vue/apps/users/roles.vue +70 -0
  63. data/lib/vue/apps/users/workingHours.vue +52 -0
  64. data/lib/vue/stores/accounts/activities.js +87 -0
  65. data/lib/vue/stores/analytics/visitors.js +130 -0
  66. data/lib/vue/stores/request.js +70 -0
  67. data/lib/vue/stores/security/password.js +75 -0
  68. data/lib/vue/stores/security/session.js +78 -0
  69. data/lib/vue/stores/users/activities.js +76 -0
  70. data/lib/vue/stores/users/logs.js +74 -0
  71. data/lib/vue/stores/users/registrations.js +61 -0
  72. data/lib/vue/stores/users/roles.js +52 -0
  73. data/lib/vue/stores/users/working_hours.js +92 -0
  74. data/license +674 -0
  75. data/readme.md +120 -0
  76. metadata +134 -0
@@ -0,0 +1,92 @@
1
+ /*
2
+ Copyright (c) 2022, all rights reserved.
3
+
4
+ All the information provided by this platform is protected by international laws related to
5
+ industrial property, intellectual property, copyright and relative international laws.
6
+ All intellectual or industrial property rights of the code, texts, trade mark, design,
7
+ pictures and any other information belongs to the owner of this platform.
8
+
9
+ Without the written permission of the owner, any replication, modification,
10
+ transmission, publication is strictly forbidden.
11
+
12
+ For more information read the license file including with this software.
13
+
14
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
15
+ // ·
16
+ */
17
+
18
+
19
+ // ·
20
+ import { defineStore } from "pinia"
21
+
22
+
23
+ // ·
24
+ export const useUsersWorkingHours = defineStore("userWorkingHours", {
25
+ state: () => {
26
+ return {
27
+ loading: false,
28
+ pagination: {},
29
+ records: [],
30
+ columns: [{
31
+ field: "id",
32
+ label: "ID"
33
+ },{
34
+ field: "email",
35
+ label: "Email"
36
+
37
+ },{
38
+ field: "name",
39
+ label: "Role"
40
+
41
+ },
42
+ {
43
+ field: "date",
44
+ label: "Date",
45
+ sort: true
46
+ },{
47
+ field: "first_activity",
48
+ label: "First activity at",
49
+ sort: true
50
+ },{
51
+ field: "last_activity",
52
+ label: "Last activity at",
53
+ sort: true
54
+ }]
55
+ }
56
+ },
57
+ actions: {
58
+
59
+ fetchIfEmpty() {
60
+ if (this.records.length <= 0) {
61
+ this.fetch()
62
+ }
63
+ },
64
+ search(string) {
65
+ this.fetch(this.url.audit("users/working_hours").search(string))
66
+ },
67
+
68
+ sort(column, direction){
69
+ this.fetch(this.url.audit("users/working_hours").order(column, direction), false)
70
+ },
71
+
72
+ fetch(url=this.url.audit("users/working_hours")) {
73
+ this.$reset()
74
+ this.loading = true
75
+ this.http.get(url).then(result => {
76
+ this.records = result.map(({date, first_activity, last_activity, ...activity}) =>
77
+ ({
78
+ ...activity,
79
+ date: this.date.date(date),
80
+ first_activity: this.date.time(first_activity),
81
+ last_activity: this.date.time(last_activity)
82
+ })
83
+ )
84
+ }).catch(error => {
85
+ this.msg.danger("Error while trying to fetch data")
86
+ }).finally(() => {
87
+ this.loading = false
88
+ })
89
+ }
90
+
91
+ }
92
+ })