lesli 5.0.3 → 5.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/lesli_manifest.js +2 -1
  3. data/app/assets/images/lesli/brand/app-logo2.svg +52 -0
  4. data/app/assets/javascripts/lesli/users/confirmations.js +32 -0
  5. data/app/assets/javascripts/lesli/users/passwords.js +3 -3
  6. data/app/assets/javascripts/lesli/users/registrations.js +3 -3
  7. data/app/assets/javascripts/lesli/users/sessions.js +3 -3
  8. data/app/assets/stylesheets/lesli/users/confirmations.scss +28 -6
  9. data/app/controllers/lesli/application_controller.rb +3 -3
  10. data/app/controllers/lesli/application_lesli_controller.rb +2 -2
  11. data/app/controllers/lesli/interfaces/application/authorization.rb +2 -2
  12. data/app/controllers/lesli/interfaces/application/logger.rb +14 -38
  13. data/app/controllers/lesli/interfaces/application/requester.rb +1 -1
  14. data/app/controllers/lesli/roles_controller.rb +3 -1
  15. data/app/controllers/lesli/shared/dashboards_controller.rb +308 -0
  16. data/app/controllers/users/confirmations_controller.rb +63 -27
  17. data/app/controllers/users/passwords_controller.rb +67 -30
  18. data/app/controllers/users/sessions_controller.rb +2 -4
  19. data/app/helpers/lesli/general_helper.rb +1 -1
  20. data/app/helpers/lesli/navigation_helper.rb +17 -16
  21. data/app/lib/lesli/system.rb +14 -5
  22. data/app/mailers/lesli/application_lesli_mailer.rb +8 -19
  23. data/app/mailers/lesli/devise_mailer.rb +29 -3
  24. data/app/models/concerns/account_initializer.rb +100 -0
  25. data/app/models/concerns/{user_guard.rb → user_security.rb} +7 -8
  26. data/app/models/lesli/account.rb +9 -26
  27. data/app/models/lesli/application_lesli_record.rb +2 -1
  28. data/app/models/lesli/descriptor/privilege.rb +38 -0
  29. data/app/models/lesli/descriptor.rb +18 -1
  30. data/app/models/lesli/role/power.rb +70 -0
  31. data/app/models/lesli/role/privilege.rb +38 -0
  32. data/app/models/lesli/role.rb +20 -15
  33. data/app/models/lesli/shared/dashboard.rb +162 -0
  34. data/app/models/lesli/system_controller.rb +1 -0
  35. data/app/models/lesli/user/{role.rb → power.rb} +1 -1
  36. data/app/{services/lesli/role_service.rb → models/lesli/user/setting.rb} +10 -9
  37. data/app/models/lesli/user.rb +11 -20
  38. data/app/operators/lesli/controller_operator.rb +148 -0
  39. data/app/operators/lesli/descriptor_privilege_operator.rb +75 -0
  40. data/app/operators/lesli/role_power_operator.rb +108 -0
  41. data/app/operators/lesli/user_registration_operator.rb +121 -0
  42. data/app/services/lesli/user_service.rb +2 -4
  43. data/app/services/lesli/{user/session_service.rb → user_session_service.rb} +11 -4
  44. data/app/views/devise/confirmations/new.html.erb +0 -14
  45. data/app/views/devise/confirmations/show.html.erb +63 -0
  46. data/app/views/devise/passwords/edit.html.erb +78 -24
  47. data/app/views/devise/passwords/new.html.erb +2 -3
  48. data/app/views/lesli/emails/devise_mailer/confirmation_instructions.html.erb +1 -1
  49. data/app/views/lesli/emails/devise_mailer/reset_password_instructions.html.erb +23 -0
  50. data/app/views/lesli/partials/_application-lesli-engines.html.erb +1 -1
  51. data/app/views/lesli/partials/_application-lesli-header.html.erb +3 -1
  52. data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -1
  53. data/config/initializers/devise.rb +2 -0
  54. data/config/locales/translations.en.yml +13 -3
  55. data/config/locales/translations.es.yml +13 -3
  56. data/config/routes.rb +4 -2
  57. data/db/migrate/v1.0/0010000110_create_lesli_accounts.rb +2 -0
  58. data/db/{tables/0010001010_create_account_settings.rb → migrate/v1.0/0010001010_create_lesli_account_settings.rb} +5 -5
  59. data/db/{tables/0010003110_create_user_settings.rb → migrate/v1.0/0010003110_create_lesli_user_settings.rb} +4 -4
  60. data/db/migrate/v1.0/0010003210_create_lesli_user_sessions.rb +6 -2
  61. data/db/migrate/v1.0/{0010003410_create_lesli_user_roles.rb → 0010003410_create_lesli_user_powers.rb} +4 -4
  62. data/db/migrate/v1.0/0010005010_create_lesli_descriptors.rb +1 -1
  63. data/db/migrate/v1.0/{0010003910_create_lesli_user_agents.rb → 0010005510_create_lesli_role_powers.rb} +7 -9
  64. data/db/{tables/0010005710_create_role_privileges.rb → migrate/v1.0/0010005710_create_lesli_role_privileges.rb} +6 -6
  65. data/db/seed/development/users.rb +3 -4
  66. data/db/seed/tools.rb +4 -4
  67. data/db/seeds.rb +16 -29
  68. data/lib/lesli/engine.rb +33 -10
  69. data/lib/lesli/version.rb +1 -1
  70. data/lib/mailer_previews/devise_mailer_preview.rb +7 -0
  71. data/lib/sass/lesli/bulma/loader.scss +3 -0
  72. data/lib/sass/lesli/layouts/application-navbar.scss +1 -1
  73. data/lib/sass/lesli/pages/devise-simple.scss +2 -1
  74. data/lib/tasks/lesli/controllers.rake +1 -94
  75. data/lib/tasks/lesli/db.rake +43 -3
  76. data/lib/tasks/lesli/dev.rake +66 -0
  77. data/lib/tasks/lesli/engine.rake +59 -0
  78. data/lib/tasks/lesli/privileges.rake +54 -0
  79. data/lib/tasks/lesli_tasks.rake +5 -0
  80. data/lib/vue/application.js +11 -3
  81. data/lib/vue/devise/passwords.js +7 -7
  82. data/lib/vue/devise/registrations.js +2 -2
  83. data/lib/vue/devise/sessions.js +11 -6
  84. data/lib/vue/layouts/application-header.vue +15 -3
  85. data/lib/vue/shared/dashboards/apps/edit.vue +215 -0
  86. data/lib/vue/{apps → shared}/dashboards/apps/index.vue +3 -5
  87. data/lib/vue/{apps → shared}/dashboards/apps/show.vue +26 -16
  88. data/lib/vue/{apps → shared}/dashboards/components/form.vue +31 -43
  89. data/lib/vue/shared/stores/dashboard.js +251 -0
  90. data/lib/vue/stores/translations.json +24 -72
  91. data/lib/vue/stores/{user.js → users.js} +1 -1
  92. data/lib/webpack/base.js +3 -2
  93. data/lib/webpack/core.js +2 -1
  94. data/readme.md +23 -7
  95. metadata +63 -65
  96. data/app/models/concerns/account_engines.rb +0 -249
  97. data/app/models/concerns/user_polyfill.rb +0 -134
  98. data/db/migrate/v1.0/0010001510_create_lesli_account_requests.rb +0 -45
  99. data/db/migrate/v1.0/0010003810_create_lesli_user_requests.rb +0 -44
  100. data/db/tables/0010005510_create_role_descriptors.rb +0 -44
  101. data/lib/vue/apps/dashboards/apps/edit.vue +0 -105
  102. data/lib/vue/apps/dashboards/components/preview.vue +0 -172
  103. /data/app/assets/icons/lesli/{cloud-vault.svg → cloud-guard.svg} +0 -0
  104. /data/lib/vue/{apps → shared}/cloudobjects/action.vue +0 -0
  105. /data/lib/vue/{apps → shared}/cloudobjects/discussion/content.vue +0 -0
  106. /data/lib/vue/{apps → shared}/cloudobjects/discussion/element.vue +0 -0
  107. /data/lib/vue/{apps → shared}/cloudobjects/discussion/filters.vue +0 -0
  108. /data/lib/vue/{apps → shared}/cloudobjects/discussion/new.vue +0 -0
  109. /data/lib/vue/{apps → shared}/cloudobjects/discussion.vue +0 -0
  110. /data/lib/vue/{apps → shared}/cloudobjects/file/grid.vue +0 -0
  111. /data/lib/vue/{apps → shared}/cloudobjects/file/list.vue +0 -0
  112. /data/lib/vue/{apps → shared}/cloudobjects/file.vue +0 -0
  113. /data/lib/vue/{apps → shared}/dashboards/apps/new.vue +0 -0
  114. /data/lib/vue/{apps → shared}/workflows2/apps/actions/form.vue +0 -0
  115. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/chatroom-form.vue +0 -0
  116. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/cloud-object-clone-form.vue +0 -0
  117. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/cloud-object-file-form.vue +0 -0
  118. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/email-form.vue +0 -0
  119. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/notification-form.vue +0 -0
  120. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/send-cloud-object-file.vue +0 -0
  121. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/task-form.vue +0 -0
  122. /data/lib/vue/{apps → shared}/workflows2/apps/actions/index.vue +0 -0
  123. /data/lib/vue/{apps → shared}/workflows2/apps/checks/form.vue +0 -0
  124. /data/lib/vue/{apps → shared}/workflows2/apps/checks/index.vue +0 -0
  125. /data/lib/vue/{apps → shared}/workflows2/apps/index.vue +0 -0
  126. /data/lib/vue/{apps → shared}/workflows2/apps/new.vue +0 -0
  127. /data/lib/vue/{apps → shared}/workflows2/apps/show.vue +0 -0
  128. /data/lib/vue/{apps → shared}/workflows2/components/associations.vue +0 -0
  129. /data/lib/vue/{apps → shared}/workflows2/components/chart.vue +0 -0
  130. /data/lib/vue/{apps → shared}/workflows2/components/workflow-form.vue +0 -0
  131. /data/lib/vue/{apps → shared}/workflows2/components/workflow-status-dropdown.vue +0 -0
@@ -56,17 +56,12 @@ const msg = inject("msg")
56
56
  const route = useRoute()
57
57
 
58
58
 
59
- // · defining props
59
+ // ·
60
60
  const props = defineProps({
61
61
  isEditable: {
62
62
  type: Boolean,
63
- required: false,
64
- default: false,
65
- },
66
- engine: {
67
- type: String,
68
- required: true,
69
- },
63
+ require: false
64
+ }
70
65
  })
71
66
 
72
67
 
@@ -81,6 +76,7 @@ const translations = {
81
76
  }
82
77
 
83
78
 
79
+ // ·
84
80
  const default_options = {
85
81
  yes: {
86
82
  label: translations.core.view_text_yes,
@@ -93,6 +89,7 @@ const default_options = {
93
89
  }
94
90
 
95
91
 
92
+ // ·
96
93
  const layout_options = [{
97
94
  label: '25%',
98
95
  value: 3
@@ -114,27 +111,21 @@ const layout_options = [{
114
111
  }]
115
112
 
116
113
 
117
- /**
118
- * @description This function is used to update the workflow information
119
- */
114
+ // ·
120
115
  const onUpdate = () => {
121
116
  storeDashboard.updateDashboard()
122
117
  }
123
118
 
124
119
 
125
- /**
126
- * @description This function is used to create a new workflow
127
- */
120
+ // ·
128
121
  const onCreate = () => {
129
122
  storeDashboard.postDashboard().then(()=> {
130
- router.push(url[props.engine]('dashboards').s)
123
+ router.push(url[storeDashboard.engine]('dashboards').s)
131
124
  })
132
125
  }
133
126
 
134
127
 
135
- /**
136
- * @description This function is used to add a new component to dashboard
137
- */
128
+ // ·
138
129
  function addComponent(){
139
130
  msg.warning(translations.dashboards.messages_warning_save_changes_reminder)
140
131
  let new_component = {
@@ -155,9 +146,7 @@ function addComponent(){
155
146
  }
156
147
 
157
148
 
158
- /**
159
- * @description This function is used to select a component
160
- */
149
+ // ·
161
150
  function selectDashboardComponent(selected_component){
162
151
  if(storeDashboard.dashboard.components.find( component => component.id == selected_component.id)){
163
152
  storeDashboard.selected_dashboard_component = selected_component
@@ -165,9 +154,7 @@ function selectDashboardComponent(selected_component){
165
154
  }
166
155
 
167
156
 
168
- /**
169
- * @description This function is used to remove a component from the dashboard
170
- */
157
+ // ·
171
158
  function removeComponent(deleted_component){
172
159
  msg.warning(translations.dashboards.messages_warning_save_changes_reminder)
173
160
  storeDashboard.dashboard.components = storeDashboard.dashboard.components.filter((component)=> {
@@ -182,32 +169,30 @@ function removeComponent(deleted_component){
182
169
  }
183
170
 
184
171
 
185
- onMounted(() => {
186
- storeDashboard.engine = props.engine
187
- if (!props.isEditable){
188
- storeDashboard.resetDashboard()
189
- } else {
190
- storeDashboard.fetchDashboard(route.params?.id)
191
- }
192
- })
193
-
194
- // This function is used to delete a dashboard
172
+ // ·
195
173
  function onDeleteDashboard() {
196
174
  storeDashboard.deleteDashboard().then(()=> {
197
175
  router.push(url[props.engine]('dashboards').s)
198
176
  })
199
177
  }
200
178
 
179
+
180
+ // ·
181
+ onMounted(() => {
182
+ if (!props.isEditable){
183
+ storeDashboard.resetDashboard()
184
+ }
185
+ })
201
186
  </script>
202
187
  <template>
203
188
  <lesli-form class="mb-6" @submit="isEditable ? onUpdate() : onCreate()">
204
189
  <div class="columns">
190
+
191
+ <!-- Name -->
205
192
  <div class="column is-4">
206
- <!-- Name -->
207
193
  <div class="field">
208
194
  <label class="label">
209
- {{translations.dashboards.column_name}}
210
- <sup class="has-text-danger">*</sup>
195
+ {{ "translations.dashboards.column_name" }}
211
196
  </label>
212
197
  <div class="control">
213
198
  <input class="input" type="text" v-model="storeDashboard.dashboard.name" required>
@@ -215,10 +200,10 @@ function onDeleteDashboard() {
215
200
  </div>
216
201
  </div>
217
202
 
203
+ <!-- Role -->
218
204
  <div class="column is-4">
219
- <!-- Role -->
220
205
  <div class="field">
221
- <label class="label">{{ translations.dashboards.column_roles_id }}</label>
206
+ <label class="label">{{ "translations.dashboards.column_roles_id" }}</label>
222
207
  <div class="control">
223
208
  <lesli-select
224
209
  v-model="storeDashboard.dashboard.roles_id"
@@ -228,10 +213,10 @@ function onDeleteDashboard() {
228
213
  </div>
229
214
  </div>
230
215
 
216
+ <!-- Default -->
231
217
  <div class="column is-4">
232
- <!-- Default -->
233
218
  <div class="field">
234
- <label class="label">{{ translations.dashboards.column_default }}</label>
219
+ <label class="label">{{ "translations.dashboards.column_default" }}</label>
235
220
  <lesli-select
236
221
  v-model="storeDashboard.dashboard.default"
237
222
  :options="default_options">
@@ -240,11 +225,12 @@ function onDeleteDashboard() {
240
225
  </div>
241
226
  </div>
242
227
 
243
- <!-- Save button -->
244
228
  <div class="is-flex is-justify-content-space-between">
229
+
230
+ <!-- Components -->
245
231
  <div class="field">
246
232
  <label class="label">
247
- {{ translations.dashboards.view_title_add_component }}
233
+ {{ "translations.dashboards.view_title_add_component" }}
248
234
  </label>
249
235
  <div class="control">
250
236
  <lesli-select
@@ -254,6 +240,8 @@ function onDeleteDashboard() {
254
240
  </lesli-select>
255
241
  </div>
256
242
  </div>
243
+
244
+ <!-- Save button -->
257
245
  <div class="buttons">
258
246
  <lesli-button icon="save" :loading="storeDashboard.loading">
259
247
  {{ translations.dashboards.view_btn_save_dashboard }}
@@ -0,0 +1,251 @@
1
+ /*
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 · Your Smart Business Assistant.
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://lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+
32
+ */
33
+
34
+
35
+ // ·
36
+ import { defineStore } from "pinia"
37
+
38
+
39
+ // ·
40
+ export const useDashboard = defineStore("shared.dashboard", {
41
+ state: () => {
42
+ return {
43
+
44
+ engine: null,
45
+ loading: false,
46
+
47
+ dashboards: [],
48
+
49
+ dashboard: {
50
+ components: []
51
+ },
52
+
53
+ options: {
54
+ component_ids: []
55
+ },
56
+
57
+ selected_dashboard_component: {},
58
+ deleted_components: [],
59
+ default_component_configuration:{
60
+ index: 1,
61
+ layout: 4
62
+ },
63
+ new_component_id: ""
64
+ }
65
+ },
66
+ actions: {
67
+
68
+ setEngine(engine) {
69
+ this.engine = engine.replace("lesli_", "")
70
+ },
71
+
72
+ getDashboard(id="default") {
73
+ this.http.get(this.url[this.engine]("dashboards/:id", id)).then(result => {
74
+ let components = result.components
75
+ this.dashboard = result
76
+ this.dashboard.components = []
77
+
78
+ // Parse components so they can be rendered
79
+ components.forEach((component) => {
80
+ component.component_id = component.component_id.replaceAll('_','-')
81
+ this.dashboard.components.push(component)
82
+ })
83
+ })
84
+ },
85
+
86
+ getDashboardOptions(){
87
+
88
+ const url = this.url[this.engine]('dashboards/options')
89
+
90
+ this.http.get(url).then(result => {
91
+ result["component_ids"].forEach((component)=>{
92
+ this.options["component_ids"].push({
93
+ label: component.text.replaceAll('_','-'),
94
+ value: component.value
95
+ })
96
+ })
97
+ }).catch(error => {
98
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
99
+ })
100
+ },
101
+
102
+
103
+
104
+
105
+
106
+
107
+ /**
108
+ * @description This action is used to fetch the list of dashboards
109
+ */
110
+ fetchDashboards(url) {
111
+ this.loading = true
112
+
113
+ if (!url) url = this.url[this.engine]('dashboards')
114
+
115
+ this.http.get(url).then(result => {
116
+ this.loading = false
117
+ this.dashboards = result.dashboards.map(dashboard => {
118
+ dashboard.created_at = this.date2(dashboard.created_at).dateTime().toString()
119
+ dashboard.updated_at = this.date2(dashboard.updated_at).dateTime().toString()
120
+ return dashboard
121
+ })
122
+ }).catch(error => {
123
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
124
+ })
125
+ },
126
+ /**
127
+ * @param {string} search_string String to search for
128
+ * @description This action is used to search for a string in the dashboards
129
+ */
130
+ searchDashboards(search_string){
131
+ const url = this.url[this.engine]('dashboards').search(search_string)
132
+ this.fetchDashboards(url)
133
+ },
134
+ /**
135
+ * @description This action is used to reset the dashboard
136
+ */
137
+ resetDashboard(){
138
+ this.dashboard = {
139
+ components: []
140
+ }
141
+ this.deleted_components = []
142
+ this.selected_dashboard_component = {}
143
+ this.new_component_id = ""
144
+ },
145
+ /**
146
+ * @description This action is used to update a dashboard
147
+ */
148
+ updateDashboard(){
149
+ this.loading = true
150
+ let data = {
151
+ dashboard: {
152
+ name: this.dashboard.name,
153
+ default: this.dashboard.default,
154
+ roles_id: this.dashboard.roles_id,
155
+ components_attributes: this.dashboard.components.map((component)=>{
156
+ let parsed_component = {...component}
157
+ // We check if the id is a valid integer or a placeholder. If it is a placeholder, we set it to null
158
+ if(isNaN(parsed_component.id)){
159
+ parsed_component.id = null
160
+ }
161
+
162
+ return parsed_component
163
+ })
164
+ }
165
+ }
166
+
167
+ data.dashboard.components_attributes = data.dashboard.components_attributes.concat(this.deleted_components)
168
+
169
+ const url = this.url[this.engine](`dashboards/${this.dashboard.id}`)
170
+
171
+ return this.http.put(url, data).then(result => {
172
+ this.msg.success(I18n.t("core.users.messages_success_operation"))
173
+ this.loading = false
174
+ }).catch(error => {
175
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
176
+ })
177
+ },
178
+ /**
179
+ * @description This action is used to post a dashboard
180
+ */
181
+ async postDashboard(){
182
+ this.loading = true
183
+ let data = {
184
+ dashboard: {
185
+ name: this.dashboard.name,
186
+ default: this.dashboard.default,
187
+ roles_id: this.dashboard.roles_id,
188
+ components_attributes: this.dashboard.components.map((component)=>{
189
+ let parsed_component = {...component}
190
+ parsed_component.id = null
191
+
192
+ return parsed_component
193
+ })
194
+ }
195
+ }
196
+
197
+ const url = this.url[this.engine]('dashboards')
198
+
199
+ return this.http.post(url, data).then(result => {
200
+ this.msg.success(I18n.t("core.users.messages_success_operation"))
201
+ this.loading = false
202
+ }).catch(error => {
203
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
204
+ })
205
+ },
206
+ /**
207
+ * @description This action is used to get dashboard options
208
+ */
209
+
210
+ /**
211
+ * @description This action is used to get the information for a dashboard
212
+ */
213
+ fetchDashboard(dashboard_id){
214
+
215
+ this.loading = true
216
+
217
+ const url = this.url[this.engine]('dashboards/:dashboardId', { dashboardId: dashboard_id })
218
+
219
+ return this.http.get(url).then(result => {
220
+
221
+ let components = result.components
222
+ this.dashboard = result
223
+ this.dashboard.components = []
224
+
225
+ // Parse components so they can be rendered
226
+ components.forEach((component) => {
227
+ component.component_id = component.component_id.replaceAll('_','-')
228
+ this.dashboard.components.push(component)
229
+ })
230
+
231
+ this.loading = false
232
+ }).catch(error => {
233
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
234
+ })
235
+ },
236
+ /**
237
+ * @description This action is used to delete a dashboard
238
+ */
239
+ async deleteDashboard(){
240
+ this.loading = true
241
+ const url = this.url[this.engine]('dashboards/:dashboardId', { dashboardId: this.dashboard.id })
242
+
243
+ return this.http.delete(url).then(result => {
244
+ this.msg.success(I18n.t("core.users.messages_success_operation"))
245
+ this.loading = false
246
+ }).catch(error => {
247
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
248
+ })
249
+ }
250
+ }
251
+ })
@@ -2,84 +2,36 @@
2
2
  "en": {
3
3
  "lesli": {
4
4
  "shared": {
5
- "title_lesli": ":lesli.shared.title_lesli:"
6
- },
7
- "users": {
8
- "title_users": "Users"
9
- }
10
- },
11
- "lesli_admin": {
12
- "shared": {
13
- "title_lesli": ":lesli.shared.title_lesli:"
14
- },
15
- "users": {
16
- "title_users": "Users"
17
- }
18
- },
19
- "lesli_audit": {
20
- "shared": {
21
- "title_lesli": ":lesli.shared.title_lesli:"
22
- },
23
- "users": {
24
- "title_users": "Users"
25
- }
26
- },
27
- "lesli_babel": {
28
- "shared": {
29
- "title_lesli": ":lesli.shared.title_lesli:"
30
- },
31
- "users": {
32
- "title_users": "Users"
33
- }
34
- },
35
- "lesli_driver": {
36
- "shared": {
37
- "title_lesli": ":lesli.shared.title_lesli:"
38
- },
39
- "users": {
40
- "title_users": "Users"
5
+ "button_add_new": "Add new",
6
+ "button_delete": "Delete",
7
+ "button_edit": "Edit",
8
+ "button_list": "List",
9
+ "button_reload": "Reload",
10
+ "button_save": "Save",
11
+ "view_discussions": "Discussions",
12
+ "view_files": "Files",
13
+ "view_quick_actions": "Quick actions"
14
+ },
15
+ "users/sessions": {
16
+ "view_username": "Username"
41
17
  }
42
18
  }
43
19
  },
44
20
  "es": {
45
21
  "lesli": {
46
22
  "shared": {
47
- "title_lesli": "Lesli en español "
48
- },
49
- "users": {
50
- "title_users": "Usuarios"
51
- }
52
- },
53
- "lesli_admin": {
54
- "shared": {
55
- "title_lesli": "Lesli en español "
56
- },
57
- "users": {
58
- "title_users": "Usuarios"
59
- }
60
- },
61
- "lesli_audit": {
62
- "shared": {
63
- "title_lesli": "Lesli en español "
64
- },
65
- "users": {
66
- "title_users": "Usuarios"
67
- }
68
- },
69
- "lesli_babel": {
70
- "shared": {
71
- "title_lesli": "Lesli en español "
72
- },
73
- "users": {
74
- "title_users": "Usuarios"
75
- }
76
- },
77
- "lesli_driver": {
78
- "shared": {
79
- "title_lesli": "Lesli en español "
80
- },
81
- "users": {
82
- "title_users": "Usuarios"
23
+ "button_add_new": "Agregar nuevo",
24
+ "button_delete": "Eliminar",
25
+ "button_edit": "Editar",
26
+ "button_list": "Lista",
27
+ "button_reload": "Recargar",
28
+ "button_save": "Guardar",
29
+ "view_discussions": "Discusiones",
30
+ "view_files": "Archivos",
31
+ "view_quick_actions": "Acciones rapidas"
32
+ },
33
+ "users/sessions": {
34
+ "view_username": "Usuario"
83
35
  }
84
36
  }
85
37
  }
@@ -35,7 +35,7 @@ import { defineStore } from "pinia"
35
35
 
36
36
 
37
37
  // ·
38
- export const useUser = defineStore("lesli.user", {
38
+ export const useUsers = defineStore("lesli.users", {
39
39
  state: () => {
40
40
  return {
41
41
 
data/lib/webpack/base.js CHANGED
@@ -113,18 +113,19 @@ module.exports = env => {
113
113
  // Set aliases as shortcuts to import modules
114
114
  Lesli: path.resolve("lib", "vue"),
115
115
  LesliBell: path.resolve("../", "LesliBell", "lib", "vue"),
116
+ LesliHelp: path.resolve("../", "Leslihelp", "lib", "vue"),
116
117
  LesliAdmin: path.resolve("../", "LesliAdmin", "lib", "vue"),
117
118
  LesliAudit: path.resolve("../", "LesliAudit", "lib", "vue"),
118
119
  LesliBabel: path.resolve("../", "LesliBabel", "lib", "vue"),
119
- LesliVault: path.resolve("../", "LesliVault", "lib", "vue"),
120
+ LesliGuard: path.resolve("../", "LesliGuard", "lib", "vue"),
120
121
  LesliDriver: path.resolve("../", "LesliDriver", "lib", "vue"),
122
+
121
123
 
122
124
 
123
125
  CloudAdmin: path.resolve("app", "vue", "admin"),
124
126
  CloudTalk: path.resolve("engines", "cloud_talk", "lib", "vue"),
125
127
  CloudTeam: path.resolve("engines", "cloud_team", "lib", "vue"),
126
128
  CloudTime: path.resolve("engines", "cloud_time", "lib", "vue"),
127
- CloudHelp: path.resolve("engines", "cloud_help", "lib", "vue"),
128
129
  CloudWork: path.resolve("engines", "cloud_work", "lib", "vue"),
129
130
  CloudBabel: path.resolve("engines", "cloud_babel", "lib", "vue"),
130
131
  CloudFocus: path.resolve("engines", "cloud_focus", "lib", "vue"),
data/lib/webpack/core.js CHANGED
@@ -46,7 +46,7 @@ module.exports = (env, requestedEngines) => {
46
46
  "users/sessions": "LesliApp/users/sessions.js",
47
47
  "users/passwords": "LesliApp/users/passwords.js",
48
48
  "users/registrations": "LesliApp/users/registrations.js",
49
- "users/confirmations": "LesliApp/users/confirmations.js",
49
+
50
50
 
51
51
 
52
52
  // alternative logins
@@ -64,6 +64,7 @@ module.exports = (env, requestedEngines) => {
64
64
  },
65
65
  entry: {
66
66
  "lesli/users/registrations": "Lesli/devise/registrations.js",
67
+ "lesli/users/confirmations": "Lesli/devise/confirmations.js",
67
68
  "lesli/users/passwords": "Lesli/devise/passwords.js",
68
69
  "lesli/users/sessions": "Lesli/devise/sessions.js"
69
70
  },
data/readme.md CHANGED
@@ -7,10 +7,13 @@
7
7
  <hr/>
8
8
  <p align="center">
9
9
  <a target="blank" href="https://rubygems.org/gems/lesli">
10
- <img src="https://badge.fury.io/rb/lesli.svg" alt="Gem Version" height="20">
10
+ <img height="22" alt="Gem Version" src="https://badge.fury.io/rb/lesli.svg"/>
11
11
  </a>
12
12
  <a href="https://codecov.io/github/LesliTech/Lesli">
13
- <img src="https://codecov.io/github/LesliTech/Lesli/graph/badge.svg?token=2O12NENK5Y"/>
13
+ <img height="22" src="https://codecov.io/github/LesliTech/Lesli/graph/badge.svg?token=2O12NENK5Y"/>
14
+ </a>
15
+ <a href="https://codecov.io/github/LesliTech/Lesli">
16
+ <img height="22" src="https://sonarcloud.io/api/project_badges/measure?project=LesliTech_Lesli&metric=sqale_rating"/>
14
17
  </a>
15
18
  </p>
16
19
  <hr/>
@@ -18,7 +21,11 @@
18
21
 
19
22
  <br />
20
23
 
21
- <img style="width:100%; border-radius: 6px;" alt="Lesli logo" src="./docs/screenshot.png" />
24
+ <div align="center">
25
+ <img
26
+ style="width:100%;max-width:800px;border-radius:6px;"
27
+ alt="Lesli logo" src="./docs/screenshot.png" />
28
+ </div>
22
29
 
23
30
  ### Introduction
24
31
 
@@ -39,17 +46,26 @@ Lesli is completely open source and comes with features and tools that can save
39
46
 
40
47
  <br />
41
48
 
42
- Lesli is officially released and supported as of version 5
49
+ Lesli is officially released and will be supported as of version 5.1
43
50
 
44
51
  > Lesli goes beyond being just a starter-kit, template, admin panel or dashboard. Lesli is a Ruby on Rails gem that you can use to build modules (a.k.a. engines) and standard Rails applications leveraging its robust set of built-in features, generators, components, and industry standards. With Lesli, you have the flexibility to extend existing functionalities or develop fully customized software tailored to your specific needs.
45
52
 
46
53
 
54
+ <br />
55
+
56
+ ### Demo
57
+
58
+ * online demo (soon)
59
+ * [docker demo](https://github.com/LesliTech/lesli-docker-demo)
60
+
61
+
47
62
  <br />
48
63
 
49
64
  ### Documentation
65
+ * [Website](https://www.lesli.dev/lesli/)
50
66
  * [Roadmap](./docs/roadmap.md)
51
- * [Core database](./docs/database.md)
52
- * [Main documentation](https://www.lesli.dev/documentation/)
67
+ * [Database](./docs/database.md)
68
+ * [Documentation](https://www.lesli.dev/documentation/)
53
69
 
54
70
 
55
71
  <br />
@@ -110,7 +126,7 @@ RAILS_SERVE_STATIC_FILES=true rails s --environment=production
110
126
 
111
127
  <br />
112
128
 
113
- ### Get in touch
129
+ ### Get in touch with Lesli
114
130
 
115
131
  * [Website: https://www.lesli.tech](https://www.lesli.tech)
116
132
  * [Email: hello@lesli.tech](hello@lesli.tech)