lesli 5.0.4 → 5.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/icons/lesli/cloud-letter.svg +1 -0
- data/app/assets/icons/readme.md +1 -1
- data/app/assets/images/lesli/brand/app-logo2.svg +52 -0
- data/app/assets/javascripts/lesli/users/passwords.js +85 -119
- data/app/assets/javascripts/lesli/users/registrations.js +85 -119
- data/app/assets/javascripts/lesli/users/sessions.js +76 -130
- data/app/controllers/lesli/application_controller.rb +3 -3
- data/app/controllers/lesli/application_lesli_controller.rb +2 -2
- data/app/controllers/lesli/interfaces/application/authorization.rb +1 -1
- data/app/controllers/lesli/interfaces/application/requester.rb +1 -1
- data/app/controllers/lesli/shared/dashboards_controller.rb +308 -0
- data/app/controllers/lesli/system_controllers_controller.rb +63 -0
- data/app/controllers/users/confirmations_controller.rb +1 -1
- data/app/controllers/users/passwords_controller.rb +7 -10
- data/app/controllers/users/sessions_controller.rb +2 -1
- data/app/helpers/lesli/general_helper.rb +1 -1
- data/app/helpers/lesli/navigation_helper.rb +23 -22
- data/app/lib/lesli/system.rb +3 -1
- data/app/mailers/lesli/devise_mailer.rb +1 -1
- data/app/models/concerns/account_initializer.rb +31 -4
- data/app/models/concerns/user_extensions.rb +8 -6
- data/app/models/concerns/user_security.rb +1 -1
- data/app/models/lesli/account.rb +4 -1
- data/app/models/lesli/application_lesli_record.rb +1 -1
- data/app/models/lesli/descriptor/privilege.rb +1 -0
- data/app/models/lesli/descriptor.rb +1 -4
- data/app/models/lesli/role/power.rb +3 -3
- data/app/models/lesli/shared/dashboard.rb +162 -0
- data/app/models/lesli/system_controller.rb +1 -0
- data/app/models/lesli/user/session.rb +4 -27
- data/app/models/lesli/user.rb +2 -3
- data/app/operators/lesli/controller_operator.rb +148 -0
- data/app/operators/lesli/descriptor_privilege_operator.rb +1 -1
- data/app/operators/lesli/{role_power_operator.rb → role_descriptor_operator.rb} +24 -7
- data/app/views/devise/passwords/new.html.erb +1 -1
- data/app/views/lesli/partials/_application-data.html.erb +7 -0
- data/app/views/lesli/partials/_application-lesli-engines.html.erb +3 -3
- data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -1
- data/config/initializers/lesli.rb +2 -0
- data/config/locales/translations.en.yml +24 -0
- data/config/locales/translations.es.yml +24 -0
- data/config/routes.rb +6 -2
- data/db/migrate/v1.0/0010005010_create_lesli_descriptors.rb +1 -1
- data/db/migrate/v1.0/0010005510_create_lesli_role_powers.rb +7 -0
- data/db/seed/development/users.rb +0 -1
- data/db/seeds.rb +16 -29
- data/lib/lesli/version.rb +1 -1
- data/lib/mailer_previews/devise_mailer_preview.rb +7 -0
- data/lib/sass/lesli/components/editor-richtext.scss +10 -0
- data/lib/sass/lesli/layouts/application-navbar.scss +1 -1
- data/lib/sass/lesli/templates/application.scss +4 -0
- data/lib/{tasks/lesli/role.rake → sass/lesli/templates/component.scss} +6 -21
- data/lib/tasks/lesli/controllers.rake +1 -91
- data/lib/tasks/lesli/db.rake +37 -6
- data/lib/tasks/lesli/dev.rake +66 -0
- data/lib/tasks/lesli/engine.rake +59 -0
- data/lib/tasks/lesli_tasks.rake +13 -0
- data/lib/vue/application.js +64 -61
- data/lib/vue/devise/passwords.js +8 -8
- data/lib/vue/devise/registrations.js +2 -2
- data/lib/vue/devise/sessions.js +11 -6
- data/lib/vue/layouts/application-header.vue +12 -8
- data/lib/vue/public.js +2 -5
- data/lib/vue/shared/dashboards/apps/edit.vue +215 -0
- data/lib/vue/{apps → shared}/dashboards/apps/index.vue +3 -5
- data/lib/vue/{apps → shared}/dashboards/apps/show.vue +26 -16
- data/lib/vue/{apps → shared}/dashboards/components/form.vue +31 -43
- data/lib/vue/shared/stores/dashboard.js +251 -0
- data/lib/vue/shared/stores/systemController.js +67 -0
- data/lib/vue/stores/translations.json +48 -74
- data/lib/vue/stores/{user.js → users.js} +3 -7
- data/lib/webpack/base.js +4 -2
- data/lib/webpack/core.js +1 -1
- data/readme.md +1 -1
- metadata +51 -40
- data/lib/vue/apps/dashboards/apps/edit.vue +0 -105
- data/lib/vue/apps/dashboards/components/preview.vue +0 -172
- /data/app/assets/icons/lesli/{cloud-vault.svg → cloud-guard.svg} +0 -0
- /data/app/assets/icons/lesli/{cloud-help.svg → cloud-support.svg} +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/action.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/discussion/content.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/discussion/element.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/discussion/filters.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/discussion/new.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/discussion.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/file/grid.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/file/list.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/file.vue +0 -0
- /data/lib/vue/{apps → shared}/dashboards/apps/new.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/chatroom-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/cloud-object-clone-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/cloud-object-file-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/email-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/notification-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/send-cloud-object-file.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/task-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/index.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/checks/form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/checks/index.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/index.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/new.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/show.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/components/associations.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/components/chart.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/components/workflow-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/components/workflow-status-dropdown.vue +0 -0
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lesli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Lesli Development Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -213,10 +213,11 @@ files:
|
|
213
213
|
- app/assets/icons/lesli/cloud-dispatcher.svg
|
214
214
|
- app/assets/icons/lesli/cloud-driver.svg
|
215
215
|
- app/assets/icons/lesli/cloud-focus.svg
|
216
|
-
- app/assets/icons/lesli/cloud-
|
216
|
+
- app/assets/icons/lesli/cloud-guard.svg
|
217
217
|
- app/assets/icons/lesli/cloud-kb.svg
|
218
218
|
- app/assets/icons/lesli/cloud-leaf.svg
|
219
219
|
- app/assets/icons/lesli/cloud-lesli.svg
|
220
|
+
- app/assets/icons/lesli/cloud-letter.svg
|
220
221
|
- app/assets/icons/lesli/cloud-mailer.svg
|
221
222
|
- app/assets/icons/lesli/cloud-one.svg
|
222
223
|
- app/assets/icons/lesli/cloud-profile.svg
|
@@ -224,10 +225,10 @@ files:
|
|
224
225
|
- app/assets/icons/lesli/cloud-scraper.svg
|
225
226
|
- app/assets/icons/lesli/cloud-shared.svg
|
226
227
|
- app/assets/icons/lesli/cloud-storage.svg
|
228
|
+
- app/assets/icons/lesli/cloud-support.svg
|
227
229
|
- app/assets/icons/lesli/cloud-talk.svg
|
228
230
|
- app/assets/icons/lesli/cloud-team.svg
|
229
231
|
- app/assets/icons/lesli/cloud-time.svg
|
230
|
-
- app/assets/icons/lesli/cloud-vault.svg
|
231
232
|
- app/assets/icons/lesli/cloud-word.svg
|
232
233
|
- app/assets/icons/lesli/icon-module.svg
|
233
234
|
- app/assets/icons/lesli/logo-android.svg
|
@@ -247,6 +248,7 @@ files:
|
|
247
248
|
- app/assets/images/lesli/brand/app-auth.svg
|
248
249
|
- app/assets/images/lesli/brand/app-icon.svg
|
249
250
|
- app/assets/images/lesli/brand/app-logo.svg
|
251
|
+
- app/assets/images/lesli/brand/app-logo2.svg
|
250
252
|
- app/assets/images/lesli/brand/favicon.png
|
251
253
|
- app/assets/images/lesli/brand/favicon.svg
|
252
254
|
- app/assets/images/lesli/brand/login-background.jpg
|
@@ -269,6 +271,8 @@ files:
|
|
269
271
|
- app/controllers/lesli/interfaces/application/requester.rb
|
270
272
|
- app/controllers/lesli/interfaces/application/responder.rb
|
271
273
|
- app/controllers/lesli/roles_controller.rb
|
274
|
+
- app/controllers/lesli/shared/dashboards_controller.rb
|
275
|
+
- app/controllers/lesli/system_controllers_controller.rb
|
272
276
|
- app/controllers/lesli/users_controller.rb
|
273
277
|
- app/controllers/users/confirmations_controller.rb
|
274
278
|
- app/controllers/users/omniauth_callbacks_controller.rb
|
@@ -299,6 +303,7 @@ files:
|
|
299
303
|
- app/models/lesli/role.rb
|
300
304
|
- app/models/lesli/role/power.rb
|
301
305
|
- app/models/lesli/role/privilege.rb
|
306
|
+
- app/models/lesli/shared/dashboard.rb
|
302
307
|
- app/models/lesli/system_controller.rb
|
303
308
|
- app/models/lesli/system_controller/action.rb
|
304
309
|
- app/models/lesli/user.rb
|
@@ -309,8 +314,9 @@ files:
|
|
309
314
|
- app/models/lesli/user/request.rb
|
310
315
|
- app/models/lesli/user/session.rb
|
311
316
|
- app/models/lesli/user/setting.rb
|
317
|
+
- app/operators/lesli/controller_operator.rb
|
312
318
|
- app/operators/lesli/descriptor_privilege_operator.rb
|
313
|
-
- app/operators/lesli/
|
319
|
+
- app/operators/lesli/role_descriptor_operator.rb
|
314
320
|
- app/operators/lesli/user_registration_operator.rb
|
315
321
|
- app/services/lesli/application_lesli_service.rb
|
316
322
|
- app/services/lesli/user_service.rb
|
@@ -363,6 +369,8 @@ files:
|
|
363
369
|
- config/initializers/devise.rb
|
364
370
|
- config/initializers/lesli.rb
|
365
371
|
- config/locales/devise.en.yml
|
372
|
+
- config/locales/translations.en.yml
|
373
|
+
- config/locales/translations.es.yml
|
366
374
|
- config/routes.rb
|
367
375
|
- db/migrate/v1.0/0010000110_create_lesli_accounts.rb
|
368
376
|
- db/migrate/v1.0/0010000210_create_lesli_roles.rb
|
@@ -476,49 +484,18 @@ files:
|
|
476
484
|
- lib/sass/lesli/settings/variables.scss
|
477
485
|
- lib/sass/lesli/shared/workflow-status-progress.scss
|
478
486
|
- lib/sass/lesli/templates/application.scss
|
487
|
+
- lib/sass/lesli/templates/component.scss
|
479
488
|
- lib/sass/lesli/templates/dashboards.scss
|
480
489
|
- lib/sass/lesli/templates/empty.scss
|
481
490
|
- lib/sass/lesli/templates/pdf.scss
|
482
491
|
- lib/sass/lesli/templates/public.scss
|
483
492
|
- lib/tasks/lesli/controllers.rake
|
484
493
|
- lib/tasks/lesli/db.rake
|
494
|
+
- lib/tasks/lesli/dev.rake
|
495
|
+
- lib/tasks/lesli/engine.rake
|
485
496
|
- lib/tasks/lesli/git.rake
|
486
|
-
- lib/tasks/lesli/role.rake
|
487
497
|
- lib/tasks/lesli_tasks.rake
|
488
498
|
- lib/vue/application.js
|
489
|
-
- lib/vue/apps/cloudobjects/action.vue
|
490
|
-
- lib/vue/apps/cloudobjects/discussion.vue
|
491
|
-
- lib/vue/apps/cloudobjects/discussion/content.vue
|
492
|
-
- lib/vue/apps/cloudobjects/discussion/element.vue
|
493
|
-
- lib/vue/apps/cloudobjects/discussion/filters.vue
|
494
|
-
- lib/vue/apps/cloudobjects/discussion/new.vue
|
495
|
-
- lib/vue/apps/cloudobjects/file.vue
|
496
|
-
- lib/vue/apps/cloudobjects/file/grid.vue
|
497
|
-
- lib/vue/apps/cloudobjects/file/list.vue
|
498
|
-
- lib/vue/apps/dashboards/apps/edit.vue
|
499
|
-
- lib/vue/apps/dashboards/apps/index.vue
|
500
|
-
- lib/vue/apps/dashboards/apps/new.vue
|
501
|
-
- lib/vue/apps/dashboards/apps/show.vue
|
502
|
-
- lib/vue/apps/dashboards/components/form.vue
|
503
|
-
- lib/vue/apps/dashboards/components/preview.vue
|
504
|
-
- lib/vue/apps/workflows2/apps/actions/form.vue
|
505
|
-
- lib/vue/apps/workflows2/apps/actions/forms/chatroom-form.vue
|
506
|
-
- lib/vue/apps/workflows2/apps/actions/forms/cloud-object-clone-form.vue
|
507
|
-
- lib/vue/apps/workflows2/apps/actions/forms/cloud-object-file-form.vue
|
508
|
-
- lib/vue/apps/workflows2/apps/actions/forms/email-form.vue
|
509
|
-
- lib/vue/apps/workflows2/apps/actions/forms/notification-form.vue
|
510
|
-
- lib/vue/apps/workflows2/apps/actions/forms/send-cloud-object-file.vue
|
511
|
-
- lib/vue/apps/workflows2/apps/actions/forms/task-form.vue
|
512
|
-
- lib/vue/apps/workflows2/apps/actions/index.vue
|
513
|
-
- lib/vue/apps/workflows2/apps/checks/form.vue
|
514
|
-
- lib/vue/apps/workflows2/apps/checks/index.vue
|
515
|
-
- lib/vue/apps/workflows2/apps/index.vue
|
516
|
-
- lib/vue/apps/workflows2/apps/new.vue
|
517
|
-
- lib/vue/apps/workflows2/apps/show.vue
|
518
|
-
- lib/vue/apps/workflows2/components/associations.vue
|
519
|
-
- lib/vue/apps/workflows2/components/chart.vue
|
520
|
-
- lib/vue/apps/workflows2/components/workflow-form.vue
|
521
|
-
- lib/vue/apps/workflows2/components/workflow-status-dropdown.vue
|
522
499
|
- lib/vue/devise/confirmations.js
|
523
500
|
- lib/vue/devise/passwords.js
|
524
501
|
- lib/vue/devise/registrations.js
|
@@ -556,6 +533,40 @@ files:
|
|
556
533
|
- lib/vue/panels/panel-tasks.vue
|
557
534
|
- lib/vue/panels/panel-tickets.vue
|
558
535
|
- lib/vue/public.js
|
536
|
+
- lib/vue/shared/cloudobjects/action.vue
|
537
|
+
- lib/vue/shared/cloudobjects/discussion.vue
|
538
|
+
- lib/vue/shared/cloudobjects/discussion/content.vue
|
539
|
+
- lib/vue/shared/cloudobjects/discussion/element.vue
|
540
|
+
- lib/vue/shared/cloudobjects/discussion/filters.vue
|
541
|
+
- lib/vue/shared/cloudobjects/discussion/new.vue
|
542
|
+
- lib/vue/shared/cloudobjects/file.vue
|
543
|
+
- lib/vue/shared/cloudobjects/file/grid.vue
|
544
|
+
- lib/vue/shared/cloudobjects/file/list.vue
|
545
|
+
- lib/vue/shared/dashboards/apps/edit.vue
|
546
|
+
- lib/vue/shared/dashboards/apps/index.vue
|
547
|
+
- lib/vue/shared/dashboards/apps/new.vue
|
548
|
+
- lib/vue/shared/dashboards/apps/show.vue
|
549
|
+
- lib/vue/shared/dashboards/components/form.vue
|
550
|
+
- lib/vue/shared/stores/dashboard.js
|
551
|
+
- lib/vue/shared/stores/systemController.js
|
552
|
+
- lib/vue/shared/workflows2/apps/actions/form.vue
|
553
|
+
- lib/vue/shared/workflows2/apps/actions/forms/chatroom-form.vue
|
554
|
+
- lib/vue/shared/workflows2/apps/actions/forms/cloud-object-clone-form.vue
|
555
|
+
- lib/vue/shared/workflows2/apps/actions/forms/cloud-object-file-form.vue
|
556
|
+
- lib/vue/shared/workflows2/apps/actions/forms/email-form.vue
|
557
|
+
- lib/vue/shared/workflows2/apps/actions/forms/notification-form.vue
|
558
|
+
- lib/vue/shared/workflows2/apps/actions/forms/send-cloud-object-file.vue
|
559
|
+
- lib/vue/shared/workflows2/apps/actions/forms/task-form.vue
|
560
|
+
- lib/vue/shared/workflows2/apps/actions/index.vue
|
561
|
+
- lib/vue/shared/workflows2/apps/checks/form.vue
|
562
|
+
- lib/vue/shared/workflows2/apps/checks/index.vue
|
563
|
+
- lib/vue/shared/workflows2/apps/index.vue
|
564
|
+
- lib/vue/shared/workflows2/apps/new.vue
|
565
|
+
- lib/vue/shared/workflows2/apps/show.vue
|
566
|
+
- lib/vue/shared/workflows2/components/associations.vue
|
567
|
+
- lib/vue/shared/workflows2/components/chart.vue
|
568
|
+
- lib/vue/shared/workflows2/components/workflow-form.vue
|
569
|
+
- lib/vue/shared/workflows2/components/workflow-status-dropdown.vue
|
559
570
|
- lib/vue/stores/account.js
|
560
571
|
- lib/vue/stores/cloudobjects/action.js
|
561
572
|
- lib/vue/stores/cloudobjects/discussion.js
|
@@ -573,7 +584,7 @@ files:
|
|
573
584
|
- lib/vue/stores/services/firebase.js
|
574
585
|
- lib/vue/stores/services/translator.js
|
575
586
|
- lib/vue/stores/translations.json
|
576
|
-
- lib/vue/stores/
|
587
|
+
- lib/vue/stores/users.js
|
577
588
|
- lib/vue/translation.js
|
578
589
|
- lib/webpack/base.js
|
579
590
|
- lib/webpack/core.js
|
@@ -1,105 +0,0 @@
|
|
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 · Your Smart Business Assistant.
|
22
|
-
|
23
|
-
Made with ♥ by https://www.lesli.tech
|
24
|
-
Building a better future, one line of code at a time.
|
25
|
-
|
26
|
-
@contact hello@lesli.tech
|
27
|
-
@website https://lesli.tech
|
28
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
29
|
-
|
30
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
31
|
-
// ·
|
32
|
-
|
33
|
-
*/
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
// · import vue tools
|
38
|
-
import { onMounted, inject } from "vue"
|
39
|
-
import { useRouter, useRoute } from "vue-router"
|
40
|
-
|
41
|
-
|
42
|
-
// · import stores
|
43
|
-
import { useDashboard } from "Lesli/shared/stores/dashboard"
|
44
|
-
|
45
|
-
|
46
|
-
// · import components
|
47
|
-
import dashboardForm from "../components/form.vue"
|
48
|
-
import dashboardPreview from "../components/preview.vue"
|
49
|
-
|
50
|
-
|
51
|
-
// ·
|
52
|
-
const router = useRouter()
|
53
|
-
const url = inject("url")
|
54
|
-
|
55
|
-
|
56
|
-
// · defining props
|
57
|
-
const props = defineProps({
|
58
|
-
engine: {
|
59
|
-
type: String,
|
60
|
-
required: true,
|
61
|
-
},
|
62
|
-
components: {
|
63
|
-
type: Object,
|
64
|
-
required: true,
|
65
|
-
}
|
66
|
-
})
|
67
|
-
|
68
|
-
|
69
|
-
// · implement stores
|
70
|
-
const storeDashboard = useDashboard()
|
71
|
-
|
72
|
-
|
73
|
-
// · translations
|
74
|
-
const translations = {
|
75
|
-
main: I18n.t(`${props.engine}.dashboards`),
|
76
|
-
dashboards: I18n.t('core.dashboards'),
|
77
|
-
core: I18n.t('core.shared')
|
78
|
-
}
|
79
|
-
|
80
|
-
|
81
|
-
const onDeleteDashboard = () => {
|
82
|
-
storeDashboard.deleteDashboard().then(()=> {
|
83
|
-
router.push(url[props.engine]('dashboards').s)
|
84
|
-
})
|
85
|
-
}
|
86
|
-
|
87
|
-
|
88
|
-
onMounted(() => {
|
89
|
-
storeDashboard.engine = props.engine
|
90
|
-
storeDashboard.getDashboardOptions()
|
91
|
-
})
|
92
|
-
|
93
|
-
</script>
|
94
|
-
<template>
|
95
|
-
<section class="application-component">
|
96
|
-
<lesli-header :title="storeDashboard.dashboard.name">
|
97
|
-
<lesli-button icon="list" :to="url[props.engine]('dashboards')">
|
98
|
-
{{ translations.core.view_btn_list }}
|
99
|
-
</lesli-button>
|
100
|
-
</lesli-header>
|
101
|
-
|
102
|
-
<dashboard-form :engine="props.engine" is-editable></dashboard-form>
|
103
|
-
<dashboard-preview :engine="props.engine" :components="props.components"></dashboard-preview>
|
104
|
-
</section>
|
105
|
-
</template>
|
@@ -1,172 +0,0 @@
|
|
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 · Your Smart Business Assistant.
|
22
|
-
|
23
|
-
Made with ♥ by https://www.lesli.tech
|
24
|
-
Building a better future, one line of code at a time.
|
25
|
-
|
26
|
-
@contact hello@lesli.tech
|
27
|
-
@website https://lesli.tech
|
28
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
29
|
-
|
30
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
31
|
-
// ·
|
32
|
-
|
33
|
-
*/
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
// · import vue tools
|
38
|
-
import { onMounted, computed } from "vue"
|
39
|
-
|
40
|
-
|
41
|
-
// · import lesli stores
|
42
|
-
import { useDashboard } from "Lesli/shared/stores/dashboard"
|
43
|
-
|
44
|
-
|
45
|
-
// · implement stores
|
46
|
-
const storeDashboard = useDashboard()
|
47
|
-
|
48
|
-
|
49
|
-
// ·
|
50
|
-
const props = defineProps({
|
51
|
-
engine: {
|
52
|
-
type: String,
|
53
|
-
require: true
|
54
|
-
},
|
55
|
-
components: {
|
56
|
-
type: Object,
|
57
|
-
require: true
|
58
|
-
}
|
59
|
-
})
|
60
|
-
|
61
|
-
|
62
|
-
// ·
|
63
|
-
function sizeIncrease(component) {
|
64
|
-
if (component.layout >= 12) {
|
65
|
-
return
|
66
|
-
}
|
67
|
-
component.layout++
|
68
|
-
}
|
69
|
-
|
70
|
-
|
71
|
-
// ·
|
72
|
-
function sizeDecrease(component) {
|
73
|
-
if (component.layout <= 3) {
|
74
|
-
return
|
75
|
-
}
|
76
|
-
component.layout--
|
77
|
-
}
|
78
|
-
|
79
|
-
|
80
|
-
// ·
|
81
|
-
function remove(component) {
|
82
|
-
|
83
|
-
component._destroy = true
|
84
|
-
}
|
85
|
-
|
86
|
-
</script>
|
87
|
-
<template>
|
88
|
-
<div class="columns is-multiline is-variable is-4 dashboard-components">
|
89
|
-
<template v-for="(component, index) in storeDashboard.dashboard.components" :key="index">
|
90
|
-
<div :class="['column', 'is-' + component?.layout]" v-if="!component._destroy">
|
91
|
-
|
92
|
-
<!-- Dashboard widget component when in edition mode -->
|
93
|
-
<div class="edit">
|
94
|
-
|
95
|
-
|
96
|
-
<!-- Dashboard widget preview -->
|
97
|
-
<component :component.sync="component" :is="props.components[component.component_id]">
|
98
|
-
</component>
|
99
|
-
|
100
|
-
|
101
|
-
<!-- Edition controls -->
|
102
|
-
<div class="mt-4 mb-2">
|
103
|
-
<div class="field has-addons is-justify-content-center">
|
104
|
-
<p class="control">
|
105
|
-
<button class="button is-small" @click="sizeDecrease(component)">
|
106
|
-
<span class="icon is-small">
|
107
|
-
<span class="material-icons">
|
108
|
-
remove
|
109
|
-
</span>
|
110
|
-
</span>
|
111
|
-
</button>
|
112
|
-
</p>
|
113
|
-
<p class="control control-label has-text-centered">
|
114
|
-
size
|
115
|
-
</p>
|
116
|
-
<p class="control">
|
117
|
-
<button class="button is-small" @click="sizeIncrease(component)">
|
118
|
-
<span class="icon is-small">
|
119
|
-
<span class="material-icons">
|
120
|
-
add
|
121
|
-
</span>
|
122
|
-
</span>
|
123
|
-
</button>
|
124
|
-
</p>
|
125
|
-
</div>
|
126
|
-
|
127
|
-
<div class="field has-addons is-justify-content-center">
|
128
|
-
<p class="control">
|
129
|
-
<button class="button is-small" @click="sizeDecrease(component)">
|
130
|
-
<span class="icon is-small">
|
131
|
-
<span class="material-icons">
|
132
|
-
chevron_left
|
133
|
-
</span>
|
134
|
-
</span>
|
135
|
-
</button>
|
136
|
-
</p>
|
137
|
-
<p class="control control-label has-text-centered px-4">
|
138
|
-
position
|
139
|
-
</p>
|
140
|
-
<p class="control">
|
141
|
-
<button class="button is-small" @click="sizeIncrease(component)">
|
142
|
-
<span class="icon is-small">
|
143
|
-
<span class="material-icons">
|
144
|
-
chevron_right
|
145
|
-
</span>
|
146
|
-
</span>
|
147
|
-
</button>
|
148
|
-
</p>
|
149
|
-
</div>
|
150
|
-
|
151
|
-
<div class="has-text-centered">
|
152
|
-
<lesli-button small danger icon="delete" @click="remove(component)">
|
153
|
-
remove
|
154
|
-
</lesli-button>
|
155
|
-
</div>
|
156
|
-
</div>
|
157
|
-
</div>
|
158
|
-
</div>
|
159
|
-
</template>
|
160
|
-
</div>
|
161
|
-
</template>
|
162
|
-
<style>
|
163
|
-
.dashboard-components .edit {
|
164
|
-
border-radius: 6px;
|
165
|
-
padding: 1.2rem 1.4rem;
|
166
|
-
border: 1px solid #CCC;
|
167
|
-
background-color: #FFF8F8;
|
168
|
-
}
|
169
|
-
.dashboard-components .edit .control-label {
|
170
|
-
width: 100px;
|
171
|
-
}
|
172
|
-
</style>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|