lesli_dashboard 1.1.3 → 1.1.4

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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/lesli_dashboard/application.css +18 -0
  3. data/app/controllers/lesli_dashboard/components_controller.rb +71 -49
  4. data/app/controllers/lesli_dashboard/dashboards_controller.rb +88 -3
  5. data/app/controllers/lesli_dashboard/shared/dashboards_controller.rb +11 -11
  6. data/app/helpers/lesli_dashboard/components_helper.rb +2 -2
  7. data/app/models/lesli_dashboard/account.rb +10 -9
  8. data/app/models/lesli_dashboard/component.rb +15 -2
  9. data/app/models/lesli_dashboard/dashboard.rb +5 -1
  10. data/app/models/lesli_dashboard/shared/dashboard.rb +6 -50
  11. data/app/operators/lesli_dashboard/dashboard_registration_operator.rb +32 -0
  12. data/app/presenters/lesli_dashboard/dashboard_presenter.rb +31 -0
  13. data/app/services/lesli_dashboard/component_service.rb +123 -0
  14. data/app/services/lesli_dashboard/dashboard_service.rb +124 -30
  15. data/app/views/lesli_dashboard/components/_component.html.erb +48 -2
  16. data/app/views/lesli_dashboard/components/_form.html.erb +13 -16
  17. data/app/views/lesli_dashboard/components/_list.html.erb +9 -0
  18. data/app/views/lesli_dashboard/components/index.html.erb +7 -16
  19. data/app/views/lesli_dashboard/dashboards/_actions.html.erb +19 -0
  20. data/app/views/lesli_dashboard/dashboards/_component-calendar.html.erb +1 -1
  21. data/app/views/lesli_dashboard/dashboards/_form.html.erb +29 -0
  22. data/app/views/lesli_dashboard/dashboards/edit.html.erb +8 -32
  23. data/app/views/lesli_dashboard/dashboards/index.html.erb +21 -32
  24. data/app/views/lesli_dashboard/dashboards/new.html.erb +4 -32
  25. data/app/views/lesli_dashboard/dashboards/shared/_header.html.erb +13 -2
  26. data/app/views/lesli_dashboard/dashboards/shared/_navigation.html.erb +20 -0
  27. data/app/views/lesli_dashboard/dashboards/shared/show.html.erb +24 -31
  28. data/app/views/lesli_dashboard/dashboards/show.html.erb +7 -2
  29. data/config/locales/translations.en.yml +55 -3
  30. data/config/locales/translations.es.yml +59 -3
  31. data/config/locales/translations.fr.yml +55 -3
  32. data/config/locales/translations.it.yml +55 -3
  33. data/config/locales/translations.pt.yml +55 -3
  34. data/config/routes.rb +6 -0
  35. data/db/migrate/0306050110_create_lesli_dashboard_dashboards.rb +8 -4
  36. data/db/migrate/20260118063343_create_lesli_dashboard_components.rb +5 -4
  37. data/lib/lesli_dashboard/version.rb +2 -2
  38. data/lib/lesli_dashboard/widget_catalog.rb +43 -0
  39. data/lib/lesli_dashboard.rb +1 -0
  40. data/lib/tasks/lesli_dashboard_tasks.rake +11 -11
  41. data/readme.md +15 -8
  42. metadata +10 -8
  43. data/app/controllers/lesli_dashboard/dashboard/components_controller.rb +0 -60
  44. data/app/models/lesli_dashboard/dashboard/component.rb +0 -50
  45. data/app/views/lesli_dashboard/components/edit.html.erb +0 -12
  46. data/app/views/lesli_dashboard/components/new.html.erb +0 -11
  47. data/app/views/lesli_dashboard/components/show.html.erb +0 -10
  48. data/app/views/lesli_dashboard/dashboards/shared/edit.html.erb +0 -0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli_dashboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
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: 2026-10-23 00:00:00.000000000 Z
11
+ date: 2026-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lesli
@@ -40,7 +40,6 @@ files:
40
40
  - app/assets/stylesheets/lesli_dashboard/application.css
41
41
  - app/controllers/lesli_dashboard/application_controller.rb
42
42
  - app/controllers/lesli_dashboard/components_controller.rb
43
- - app/controllers/lesli_dashboard/dashboard/components_controller.rb
44
43
  - app/controllers/lesli_dashboard/dashboards_controller.rb
45
44
  - app/controllers/lesli_dashboard/shared/dashboards_controller.rb
46
45
  - app/helpers/lesli_dashboard/application_helper.rb
@@ -51,27 +50,29 @@ files:
51
50
  - app/models/lesli_dashboard/application_record.rb
52
51
  - app/models/lesli_dashboard/component.rb
53
52
  - app/models/lesli_dashboard/dashboard.rb
54
- - app/models/lesli_dashboard/dashboard/component.rb
55
53
  - app/models/lesli_dashboard/shared/dashboard.rb
54
+ - app/operators/lesli_dashboard/dashboard_registration_operator.rb
55
+ - app/presenters/lesli_dashboard/dashboard_presenter.rb
56
+ - app/services/lesli_dashboard/component_service.rb
56
57
  - app/services/lesli_dashboard/dashboard_service.rb
57
58
  - app/views/layouts/lesli_dashboard/application.html.erb
58
59
  - app/views/lesli_dashboard/components/_component.html.erb
59
60
  - app/views/lesli_dashboard/components/_form.html.erb
60
- - app/views/lesli_dashboard/components/edit.html.erb
61
+ - app/views/lesli_dashboard/components/_list.html.erb
61
62
  - app/views/lesli_dashboard/components/index.html.erb
62
- - app/views/lesli_dashboard/components/new.html.erb
63
- - app/views/lesli_dashboard/components/show.html.erb
63
+ - app/views/lesli_dashboard/dashboards/_actions.html.erb
64
64
  - app/views/lesli_dashboard/dashboards/_component-calendar.html.erb
65
65
  - app/views/lesli_dashboard/dashboards/_component-chart-bar.html.erb
66
66
  - app/views/lesli_dashboard/dashboards/_component-chart-line.html.erb
67
67
  - app/views/lesli_dashboard/dashboards/_component-count.html.erb
68
68
  - app/views/lesli_dashboard/dashboards/_component-date.html.erb
69
69
  - app/views/lesli_dashboard/dashboards/_component-weather.html.erb
70
+ - app/views/lesli_dashboard/dashboards/_form.html.erb
70
71
  - app/views/lesli_dashboard/dashboards/edit.html.erb
71
72
  - app/views/lesli_dashboard/dashboards/index.html.erb
72
73
  - app/views/lesli_dashboard/dashboards/new.html.erb
73
74
  - app/views/lesli_dashboard/dashboards/shared/_header.html.erb
74
- - app/views/lesli_dashboard/dashboards/shared/edit.html.erb
75
+ - app/views/lesli_dashboard/dashboards/shared/_navigation.html.erb
75
76
  - app/views/lesli_dashboard/dashboards/shared/show.html.erb
76
77
  - app/views/lesli_dashboard/dashboards/show.html.erb
77
78
  - config/locales/translations.en.yml
@@ -90,6 +91,7 @@ files:
90
91
  - lib/lesli_dashboard.rb
91
92
  - lib/lesli_dashboard/engine.rb
92
93
  - lib/lesli_dashboard/version.rb
94
+ - lib/lesli_dashboard/widget_catalog.rb
93
95
  - lib/tasks/lesli_dashboard_tasks.rake
94
96
  - license
95
97
  - readme.md
@@ -1,60 +0,0 @@
1
- module LesliDashboard
2
- class Dashboard::ComponentsController < ApplicationController
3
- before_action :set_dashboard_component, only: %i[ show edit update destroy ]
4
-
5
- # GET /dashboard/components
6
- def index
7
- @dashboard_components = Dashboard::Component.all
8
- end
9
-
10
- # GET /dashboard/components/1
11
- def show
12
- end
13
-
14
- # GET /dashboard/components/new
15
- def new
16
- @dashboard_component = Dashboard::Component.new
17
- end
18
-
19
- # GET /dashboard/components/1/edit
20
- def edit
21
- end
22
-
23
- # POST /dashboard/components
24
- def create
25
- @dashboard_component = Dashboard::Component.new(dashboard_component_params)
26
-
27
- if @dashboard_component.save
28
- redirect_to @dashboard_component, notice: "Component was successfully created."
29
- else
30
- render :new, status: :unprocessable_entity
31
- end
32
- end
33
-
34
- # PATCH/PUT /dashboard/components/1
35
- def update
36
- if @dashboard_component.update(dashboard_component_params)
37
- redirect_to @dashboard_component, notice: "Component was successfully updated.", status: :see_other
38
- else
39
- render :edit, status: :unprocessable_entity
40
- end
41
- end
42
-
43
- # DELETE /dashboard/components/1
44
- def destroy
45
- @dashboard_component.destroy
46
- redirect_to dashboard_components_url, notice: "Component was successfully destroyed.", status: :see_other
47
- end
48
-
49
- private
50
- # Use callbacks to share common setup or constraints between actions.
51
- def set_dashboard_component
52
- @dashboard_component = Dashboard::Component.find(params[:id])
53
- end
54
-
55
- # Only allow a list of trusted parameters through.
56
- def dashboard_component_params
57
- params.fetch(:dashboard_component, {})
58
- end
59
- end
60
- end
@@ -1,50 +0,0 @@
1
- =begin
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
- =end
32
-
33
- module LesliDashboard
34
- class Dashboard::Component < ApplicationRecord
35
-
36
- belongs_to :dashboard, inverse_of: :components
37
-
38
- def self.component_ids
39
- ["version"]
40
- end
41
- # components_ids: {
42
- # list_new_tickets: "list_new_tickets",
43
- # list_my_tickets: "list_my_tickets",
44
- # list_unassigned_tickets: "list_unassigned_tickets",
45
- # chart_tickets_by_type: "chart_tickets_by_type",
46
- # chart_tickets_by_category: "chart_tickets_by_category",
47
- # hours_worked: "hours_worked"
48
- # }
49
- end
50
- end
@@ -1,12 +0,0 @@
1
- <% content_for :title, "Editing component" %>
2
-
3
- <h1>Editing component</h1>
4
-
5
- <%= render "form", component: @component %>
6
-
7
- <br>
8
-
9
- <div>
10
- <%= link_to "Show this component", @component %> |
11
- <%= link_to "Back to components", components_path %>
12
- </div>
@@ -1,11 +0,0 @@
1
- <% content_for :title, "New component" %>
2
-
3
- <h1>New component</h1>
4
-
5
- <%= render "form", component: @component %>
6
-
7
- <br>
8
-
9
- <div>
10
- <%= link_to "Back to components", components_path %>
11
- </div>
@@ -1,10 +0,0 @@
1
- <p style="color: green"><%= notice %></p>
2
-
3
- <%= render @component %>
4
-
5
- <div>
6
- <%= link_to "Edit this component", edit_component_path(@component) %> |
7
- <%= link_to "Back to components", components_path %>
8
-
9
- <%= button_to "Destroy this component", @component, method: :delete %>
10
- </div>