lesli_audit 0.1.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 +7 -0
- data/Rakefile +5 -0
- data/app/assets/config/lesli_audit_manifest.js +38 -0
- data/app/assets/images/lesli_audit/audit-logo.svg +72 -0
- data/app/assets/javascripts/lesli_audit/application.js +3592 -0
- data/app/assets/stylesheets/lesli_audit/application.scss +35 -0
- data/app/assets/stylesheets/lesli_audit/dashboard.scss +0 -0
- data/app/controllers/lesli_audit/analytics_controller.rb +36 -0
- data/app/controllers/lesli_audit/application_controller.rb +4 -0
- data/app/controllers/lesli_audit/dashboards_controller.rb +59 -0
- data/app/helpers/lesli_audit/analytics_helper.rb +4 -0
- data/app/helpers/lesli_audit/application_helper.rb +4 -0
- data/app/helpers/lesli_audit/dashboards_helper.rb +4 -0
- data/app/jobs/lesli_audit/application_job.rb +4 -0
- data/app/mailers/lesli_audit/application_mailer.rb +6 -0
- data/app/models/lesli_audit/analytic.rb +4 -0
- data/app/models/lesli_audit/application_record.rb +5 -0
- data/app/models/lesli_audit/dashboard.rb +4 -0
- data/app/services/lesli_audit/account/activity_services.rb +69 -0
- data/app/services/lesli_audit/analytic_service.rb +151 -0
- data/app/services/lesli_audit/analytics/trend_services.rb +84 -0
- data/app/services/lesli_audit/analytics/visitor_service.rb +166 -0
- data/app/services/lesli_audit/request_services.rb +71 -0
- data/app/services/lesli_audit/users/activity_services.rb +61 -0
- data/app/services/lesli_audit/users/log_services.rb +62 -0
- data/app/services/lesli_audit/users/registration_services.rb +62 -0
- data/app/services/lesli_audit/users/role_services.rb +61 -0
- data/app/services/lesli_audit/users/working_hour_services.rb +78 -0
- data/app/views/lesli_audit/analytics/_analytic.html.erb +2 -0
- data/app/views/lesli_audit/analytics/_form.html.erb +17 -0
- data/app/views/lesli_audit/analytics/edit.html.erb +10 -0
- data/app/views/lesli_audit/analytics/index.html.erb +1 -0
- data/app/views/lesli_audit/analytics/new.html.erb +9 -0
- data/app/views/lesli_audit/analytics/show.html.erb +10 -0
- data/app/views/lesli_audit/dashboards/_dashboard.html.erb +2 -0
- data/app/views/lesli_audit/dashboards/_form.html.erb +17 -0
- data/app/views/lesli_audit/dashboards/edit.html.erb +10 -0
- data/app/views/lesli_audit/dashboards/index.html.erb +14 -0
- data/app/views/lesli_audit/dashboards/new.html.erb +9 -0
- data/app/views/lesli_audit/dashboards/show.html.erb +1 -0
- data/app/views/lesli_audit/partials/_engine-navigation.html.erb +39 -0
- data/config/routes.rb +45 -0
- data/db/migrate/v1.0/0803000110_create_lesli_audit_accounts.rb +42 -0
- data/db/migrate/v1.0/0803050110_create_lesli_audit_dashboards.rb +51 -0
- data/db/migrate/v1.0/0803050210_create_lesli_audit_dashboard_components.rb +53 -0
- data/lib/lesli_audit/engine.rb +18 -0
- data/lib/lesli_audit/version.rb +3 -0
- data/lib/lesli_audit.rb +6 -0
- data/lib/tasks/lesli_audit_tasks.rake +4 -0
- data/lib/vue/application.js +102 -0
- data/lib/vue/apps/accounts/activities.vue +48 -0
- data/lib/vue/apps/analytics/index.vue +18 -0
- data/lib/vue/apps/analytics/requests.vue +67 -0
- data/lib/vue/apps/analytics/trends.vue +149 -0
- data/lib/vue/apps/analytics/visitors.vue +91 -0
- data/lib/vue/apps/requests/index.vue +123 -0
- data/lib/vue/apps/security/passwords.vue +52 -0
- data/lib/vue/apps/security/sessions.vue +63 -0
- data/lib/vue/apps/users/activities.vue +49 -0
- data/lib/vue/apps/users/logs.vue +49 -0
- data/lib/vue/apps/users/registrations.vue +98 -0
- data/lib/vue/apps/users/roles.vue +70 -0
- data/lib/vue/apps/users/workingHours.vue +52 -0
- data/lib/vue/stores/accounts/activities.js +87 -0
- data/lib/vue/stores/analytics/visitors.js +130 -0
- data/lib/vue/stores/request.js +70 -0
- data/lib/vue/stores/security/password.js +75 -0
- data/lib/vue/stores/security/session.js +78 -0
- data/lib/vue/stores/users/activities.js +76 -0
- data/lib/vue/stores/users/logs.js +74 -0
- data/lib/vue/stores/users/registrations.js +61 -0
- data/lib/vue/stores/users/roles.js +52 -0
- data/lib/vue/stores/users/working_hours.js +92 -0
- data/license +674 -0
- data/readme.md +120 -0
- 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
|
+
})
|