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
@@ -65,9 +65,12 @@ import {
65
65
  lesliElementAutocomplete,
66
66
  lesliElementAvatar,
67
67
  lesliElementButton,
68
+ lesliElementButtonLink,
68
69
  lesliElementCalendar,
69
70
  lesliElementCard,
70
71
  lesliElementCollapse,
72
+ lesliElementColumn,
73
+ lesliElementColumns,
71
74
  lesliElementControl,
72
75
  lesliElementDropdown,
73
76
  lesliElementEmpty,
@@ -202,7 +205,6 @@ export default (engine, routes=[]) => {
202
205
  application.provide('url', useLesliUrl())
203
206
  application.provide('http', useLesliHttp())
204
207
  application.provide('date', useLesliDate())
205
- application.provide('date', useLesliDate())
206
208
  application.provide('utils', useLesliUtils())
207
209
  application.provide('dialog', useLesliDialog())
208
210
 
@@ -226,10 +228,15 @@ export default (engine, routes=[]) => {
226
228
  application.component("lesli-loading", lesliElementLoading)
227
229
  application.component("lesli-table", lesliElementTable)
228
230
  application.component("lesli-collapse", lesliElementCollapse)
231
+ application.component("lesli-column", lesliElementColumn)
232
+ application.component("lesli-columns", lesliElementColumns)
233
+ application.component("lesli-card", lesliElementCard)
234
+ application.component("lesli-control", lesliElementControl)
229
235
  application.component("lesli-tab-item", lesliElementTabItem)
230
236
  application.component("lesli-tabs", lesliElementTabs)
231
237
  application.component("lesli-panel", lesliElementPanel)
232
238
  application.component("lesli-button", lesliElementButton)
239
+ application.component("lesli-button-link", lesliElementButtonLink)
233
240
  application.component("lesli-calendar", lesliElementCalendar)
234
241
  application.component("lesli-input-tag", lesliElementInputTag)
235
242
  application.component("lesli-file-uploader", lesliElementFileUploader)
@@ -243,8 +250,9 @@ export default (engine, routes=[]) => {
243
250
  application.component("lesli-pagination", lesliElementPagination)
244
251
  application.component("lesli-form", lesliElementForm)
245
252
  application.component("lesli-input", lesliElementInput)
246
- application.component("lesli-control", lesliElementControl)
247
- application.component("lesli-card", lesliElementCard)
253
+ application.component("lesli-link", lesliElementLink)
254
+
255
+
248
256
 
249
257
 
250
258
  // · Mount app once DOM is ready
@@ -16,16 +16,16 @@ GNU General Public License for more details.
16
16
  You should have received a copy of the GNU General Public License
17
17
  along with this program. If not, see http://www.gnu.org/licenses/.
18
18
 
19
- Lesli · Your Smart Business Assistant.
19
+ Lesli · Ruby on Rails SaaS Development Framework.
20
20
 
21
21
  Made with ♥ by https://www.lesli.tech
22
22
  Building a better future, one line of code at a time.
23
23
 
24
24
  @contact hello@lesli.tech
25
- @website https://lesli.tech
25
+ @website https://www.lesli.tech
26
26
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
27
 
28
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
28
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
29
  // ·
30
30
  */
31
31
 
@@ -57,7 +57,7 @@ application({
57
57
  notification: {
58
58
  message: "",
59
59
  show: false,
60
- type: "danger"
60
+ type: ""
61
61
  }
62
62
  }
63
63
  },
@@ -79,7 +79,7 @@ application({
79
79
  };
80
80
 
81
81
  this.http.post("/password", data).then(response => {
82
- this.showNotification(this.translations.main.notification_reset_password_instructions_sent, "success")
82
+ this.showNotification("this.translations.main.notification_reset_password_instructions_sent", "success")
83
83
  }).catch(error => {
84
84
  this.showNotification(error.message)
85
85
  }).finally(() => {
@@ -117,7 +117,7 @@ application({
117
117
  }
118
118
  }).then(response => {
119
119
  this.showNotification(this.translations.main.notification_password_updated, "success")
120
- setTimeout(() => { this.url.go("/login") }, 2000)
120
+ //setTimeout(() => { this.url.go("/login") }, 2000)
121
121
  }).catch(error => {
122
122
  this.showNotification(error.message, "danger")
123
123
  }).finally(() => {
@@ -128,7 +128,7 @@ application({
128
128
 
129
129
  showNotification(message, type="danger"){
130
130
  this.notification.message = message;
131
- this.notification.type = type;
131
+ this.notification.type = "is-"+type;
132
132
  this.notification.show = true;
133
133
  }
134
134
 
@@ -47,8 +47,8 @@ application({
47
47
  telephone_code: "+49",
48
48
  telephone_codes: null,
49
49
  sign_up: {
50
- email: "test@lesli.tech",
51
- password: 'Tardis2023$',
50
+ email: "",
51
+ password: "",
52
52
  password_confirmation: '',
53
53
  // first_name: null,
54
54
  // last_name: null,
@@ -16,16 +16,16 @@ GNU General Public License for more details.
16
16
  You should have received a copy of the GNU General Public License
17
17
  along with this program. If not, see http://www.gnu.org/licenses/.
18
18
 
19
- Lesli · Your Smart Business Assistant.
19
+ Lesli · Ruby on Rails SaaS Development Framework.
20
20
 
21
21
  Made with ♥ by https://www.lesli.tech
22
22
  Building a better future, one line of code at a time.
23
23
 
24
24
  @contact hello@lesli.tech
25
- @website https://lesli.tech
25
+ @website https://www.lesli.tech
26
26
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
27
 
28
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
28
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
29
  // ·
30
30
  */
31
31
 
@@ -41,19 +41,24 @@ application({
41
41
  return {
42
42
  loading: false,
43
43
  sign_in: {
44
- email: "hello@lesli.tech",
45
- password: "tardis2023$"
44
+ email: "",
45
+ password: ""
46
46
  },
47
47
  notification: {
48
48
  message: "",
49
49
  show: false,
50
50
  type: "default"
51
51
  },
52
- errors: ["holi"]
52
+ errors: []
53
53
  }
54
54
  },
55
55
  mounted() {
56
56
  this.$refs?.email?.focus()
57
+
58
+ if (lesli_application_development) {
59
+ this.sign_in.email = "hello@lesli.tech"
60
+ this.sign_in.password = "tardis2023$"
61
+ }
57
62
  },
58
63
  methods: {
59
64
 
@@ -77,6 +77,11 @@ const props = defineProps({
77
77
  type: Boolean,
78
78
  default: false,
79
79
  required: false
80
+ },
81
+ enginePath: {
82
+ type: String,
83
+ default: "/",
84
+ required: false
80
85
  }
81
86
  })
82
87
 
@@ -110,13 +115,20 @@ function toggleEngines() {
110
115
  document.addEventListener('keydown', onEscape)
111
116
  }
112
117
 
118
+ // ·
119
+ function safeEngineUrl() {
120
+ return encodeURI(props.enginePath);
121
+ }
122
+
113
123
  </script>
114
124
  <template>
115
125
  <header ref="lesliApplicationHeader" class="lesli-application-header">
116
126
  <div class="lesli-application-header-container container">
117
- <figure class="image lesli-brand">
118
- <img alt="App logo" class="is-hidden-touch" src="/assets/lesli/brand/app-logo.svg">
119
- </figure>
127
+ <a :href="safeEngineUrl()">
128
+ <figure class="image lesli-brand">
129
+ <img alt="App logo" class="is-hidden-touch" src="/assets/lesli/brand/app-logo.svg">
130
+ </figure>
131
+ </a>
120
132
  <div class="lesli-application-header-left">
121
133
  <div class="control is-medium has-icons-left has-text-grey">
122
134
  <span class="icon is-left has-text-gray">
@@ -0,0 +1,215 @@
1
+ <script setup>
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 Framework.
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
+ */
32
+
33
+
34
+ // · import vue tools
35
+ import { onMounted, inject } from "vue"
36
+ import { useRouter, useRoute } from "vue-router"
37
+
38
+
39
+ // · import stores
40
+ import { useDashboard } from "Lesli/shared/stores/dashboard"
41
+
42
+
43
+ // · import components
44
+ import dashboardForm from "../components/form.vue"
45
+
46
+
47
+ // ·
48
+ const route = useRoute()
49
+ const router = useRouter()
50
+ const url = inject("url")
51
+
52
+
53
+ // · implement stores
54
+ const storeDashboard = useDashboard()
55
+
56
+
57
+ // · defining props
58
+ const props = defineProps({
59
+ components: {
60
+ type: Object,
61
+ require: false,
62
+ default: {}
63
+ }
64
+ })
65
+
66
+
67
+ // · translations
68
+ const translations = {
69
+ main: I18n.t(`${props.engine}.dashboards`),
70
+ dashboards: I18n.t('core.dashboards'),
71
+ core: I18n.t('core.shared')
72
+ }
73
+
74
+
75
+ // ·
76
+ const onDeleteDashboard = () => {
77
+ storeDashboard.deleteDashboard().then(()=> {
78
+ router.push(url[props.engine]('dashboards').s)
79
+ })
80
+ }
81
+
82
+
83
+ // ·
84
+ function sizeIncrease(component) {
85
+ if (component.layout >= 12) {
86
+ return
87
+ }
88
+ component.layout++
89
+ }
90
+
91
+
92
+ // ·
93
+ function sizeDecrease(component) {
94
+ if (component.layout <= 3) {
95
+ return
96
+ }
97
+ component.layout--
98
+ }
99
+
100
+
101
+ // ·
102
+ function remove(component) {
103
+ component._destroy = true
104
+ }
105
+
106
+
107
+ // ·
108
+ onMounted(() => {
109
+ storeDashboard.setEngine(lesli.engine)
110
+ storeDashboard.getDashboard(route.params.id)
111
+ storeDashboard.getDashboardOptions()
112
+ })
113
+
114
+ </script>
115
+ <template>
116
+ <lesli-application-container>
117
+ <lesli-header :title="storeDashboard.dashboard.name">
118
+ <lesli-button icon="list">
119
+ {{ translations.core.view_btn_list }}
120
+ </lesli-button>
121
+ </lesli-header>
122
+
123
+ <!-- Dashboard general configuration -->
124
+ <dashboard-form is-editable></dashboard-form>
125
+
126
+ <!-- Dashboard components -->
127
+ <template v-if="storeDashboard.dashboard.components">
128
+ <div class="columns is-multiline is-variable is-4 dashboard-components">
129
+ <template v-for="(component, index) in storeDashboard.dashboard.components" :key="index">
130
+ <div :class="['column', 'is-' + component?.layout]">
131
+
132
+ <!-- Dashboard widget component when in edition mode -->
133
+ <div class="edit">
134
+
135
+ <!-- Dashboard widget preview -->
136
+ <component
137
+ :component.sync="component"
138
+ :is="props.components[component.component_id]">
139
+ </component>
140
+
141
+ <!-- Edition controls -->
142
+ <div class="mt-4 mb-2">
143
+ <div class="field has-addons is-justify-content-center">
144
+ <p class="control">
145
+ <button class="button is-small" @click="sizeDecrease(component)">
146
+ <span class="icon is-small">
147
+ <span class="material-icons">
148
+ remove
149
+ </span>
150
+ </span>
151
+ </button>
152
+ </p>
153
+ <p class="control control-label has-text-centered">
154
+ size
155
+ </p>
156
+ <p class="control">
157
+ <button class="button is-small" @click="sizeIncrease(component)">
158
+ <span class="icon is-small">
159
+ <span class="material-icons">
160
+ add
161
+ </span>
162
+ </span>
163
+ </button>
164
+ </p>
165
+ </div>
166
+
167
+ <div class="field has-addons is-justify-content-center">
168
+ <p class="control">
169
+ <button class="button is-small" @click="sizeDecrease(component)">
170
+ <span class="icon is-small">
171
+ <span class="material-icons">
172
+ chevron_left
173
+ </span>
174
+ </span>
175
+ </button>
176
+ </p>
177
+ <p class="control control-label has-text-centered px-4">
178
+ position
179
+ </p>
180
+ <p class="control">
181
+ <button class="button is-small" @click="sizeIncrease(component)">
182
+ <span class="icon is-small">
183
+ <span class="material-icons">
184
+ chevron_right
185
+ </span>
186
+ </span>
187
+ </button>
188
+ </p>
189
+ </div>
190
+
191
+ <div class="has-text-centered">
192
+ <lesli-button small danger icon="delete" @click="remove(component)">
193
+ remove
194
+ </lesli-button>
195
+ </div>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </template>
200
+ </div>
201
+ </template>
202
+
203
+ </lesli-application-container>
204
+ </template>
205
+ <style>
206
+ .dashboard-components .edit {
207
+ border-radius: 6px;
208
+ padding: 1.2rem 1.4rem;
209
+ border: 1px solid #CCC;
210
+ background-color: #FFF8F8;
211
+ }
212
+ .dashboard-components .edit .control-label {
213
+ width: 100px;
214
+ }
215
+ </style>
@@ -1,6 +1,5 @@
1
1
  <script setup>
2
2
  /*
3
-
4
3
  Lesli
5
4
 
6
5
  Copyright (c) 2023, Lesli Technologies, S. A.
@@ -18,18 +17,17 @@ GNU General Public License for more details.
18
17
  You should have received a copy of the GNU General Public License
19
18
  along with this program. If not, see http://www.gnu.org/licenses/.
20
19
 
21
- Lesli · Your Smart Business Assistant.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
22
21
 
23
22
  Made with ♥ by https://www.lesli.tech
24
23
  Building a better future, one line of code at a time.
25
24
 
26
25
  @contact hello@lesli.tech
27
- @website https://lesli.tech
26
+ @website https://www.lesli.tech
28
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
29
28
 
30
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
31
30
  // ·
32
-
33
31
  */
34
32
 
35
33
 
@@ -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 platform.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
@@ -45,32 +45,42 @@ const storeDashboard = useDashboard()
45
45
 
46
46
  // ·
47
47
  const props = defineProps({
48
- engine: {
49
- type: String,
50
- require: true
51
- },
52
48
  components: {
53
49
  type: Object,
54
- require: true
50
+ require: false,
51
+ default: {}
55
52
  }
56
53
  })
57
54
 
58
55
 
59
56
  // ·
60
57
  onMounted(() => {
61
- storeDashboard.engine = props.engine
62
- storeDashboard.getDashboard(props.engine)
58
+ storeDashboard.setEngine(lesli.engine)
59
+ storeDashboard.getDashboard()
63
60
  })
64
61
 
65
62
  </script>
66
63
  <template>
67
- <application-component>
68
- <div class="columns is-multiline is-variable is-4 dashboard-components">
69
- <div
70
- v-for="(component, index) in storeDashboard.dashboard.components" :key="index"
71
- :class="['column', 'is-' + component?.layout]">
72
- <component :component.sync="component" :is="components[component.component_id]"></component>
64
+ <lesli-application-container>
65
+
66
+ <lesli-header :title="storeDashboard.dashboard.name"></lesli-header>
67
+
68
+ <template v-if="storeDashboard.dashboard.components">
69
+ <div class="columns is-multiline is-variable is-4 dashboard-components">
70
+ <template v-for="(component, index) in storeDashboard.dashboard.components" :key="index">
71
+ <div :class="['column', 'is-' + component?.layout]">
72
+ <component
73
+ :component.sync="component"
74
+ :is="props.components[component.component_id]">
75
+ </component>
76
+ </div>
77
+ </template>
73
78
  </div>
74
- </div>
75
- </application-component>
79
+ </template>
80
+
81
+ <lesli-empty
82
+ v-if="!storeDashboard.dashboard.components || storeDashboard.dashboard.components.length <= 0"
83
+ text="Empty dashboard">
84
+ </lesli-empty>
85
+ </lesli-application-container>
76
86
  </template>