lesli_admin 1.0.1 → 1.1.1

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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +3 -1
  3. data/app/assets/stylesheets/lesli_admin/application.tailwind.css +2 -0
  4. data/app/controllers/lesli_admin/account/currencies_controller.rb +60 -0
  5. data/app/controllers/lesli_admin/account/details_controller.rb +60 -0
  6. data/app/controllers/lesli_admin/account/locations_controller.rb +60 -0
  7. data/app/controllers/lesli_admin/account/settings_controller.rb +60 -0
  8. data/app/controllers/lesli_admin/accounts_controller.rb +5 -4
  9. data/app/helpers/lesli_admin/account/currencies_helper.rb +4 -0
  10. data/app/helpers/lesli_admin/account/details_helper.rb +4 -0
  11. data/app/helpers/lesli_admin/account/locations_helper.rb +4 -0
  12. data/app/helpers/lesli_admin/account/settings_helper.rb +4 -0
  13. data/app/models/lesli_admin/account/currency.rb +4 -0
  14. data/app/models/lesli_admin/account/detail.rb +4 -0
  15. data/app/models/lesli_admin/account/location.rb +4 -0
  16. data/app/models/lesli_admin/account/setting.rb +4 -0
  17. data/app/models/lesli_admin/account.rb +3 -4
  18. data/app/models/lesli_admin/dashboard.rb +0 -3
  19. data/app/services/lesli_admin/account_service.rb +6 -6
  20. data/app/views/lesli_admin/account/currencies/_currency.html.erb +2 -0
  21. data/app/views/lesli_admin/account/currencies/_form.html.erb +17 -0
  22. data/app/views/lesli_admin/account/currencies/edit.html.erb +12 -0
  23. data/app/views/lesli_admin/account/currencies/index.html.erb +16 -0
  24. data/app/views/lesli_admin/account/currencies/new.html.erb +11 -0
  25. data/app/views/lesli_admin/account/currencies/show.html.erb +10 -0
  26. data/app/views/lesli_admin/account/details/_detail.html.erb +2 -0
  27. data/app/views/lesli_admin/account/details/_form.html.erb +17 -0
  28. data/app/views/lesli_admin/account/details/edit.html.erb +12 -0
  29. data/app/views/lesli_admin/account/details/index.html.erb +16 -0
  30. data/app/views/lesli_admin/account/details/new.html.erb +11 -0
  31. data/app/views/lesli_admin/account/details/show.html.erb +10 -0
  32. data/app/views/lesli_admin/account/locations/_form.html.erb +17 -0
  33. data/app/views/lesli_admin/account/locations/_location.html.erb +2 -0
  34. data/app/views/lesli_admin/account/locations/edit.html.erb +12 -0
  35. data/app/views/lesli_admin/account/locations/index.html.erb +16 -0
  36. data/app/views/lesli_admin/account/locations/new.html.erb +11 -0
  37. data/app/views/lesli_admin/account/locations/show.html.erb +10 -0
  38. data/app/views/lesli_admin/account/settings/_form.html.erb +17 -0
  39. data/app/views/lesli_admin/account/settings/_setting.html.erb +2 -0
  40. data/app/views/lesli_admin/account/settings/edit.html.erb +12 -0
  41. data/app/views/lesli_admin/account/settings/index.html.erb +16 -0
  42. data/app/views/lesli_admin/account/settings/new.html.erb +11 -0
  43. data/app/views/lesli_admin/account/settings/show.html.erb +10 -0
  44. data/app/views/lesli_admin/accounts/show.html.erb +3 -3
  45. data/app/views/lesli_admin/dashboards/_component-installed-engines.html.erb +1 -5
  46. data/app/views/lesli_admin/partials/_navigation.html.erb +0 -1
  47. data/app/views/lesli_admin/settings/_defaults.html.erb +71 -0
  48. data/app/views/lesli_admin/settings/_modules.html.erb +57 -0
  49. data/app/views/lesli_admin/settings/show.html.erb +7 -1
  50. data/config/routes.rb +1 -3
  51. data/db/migrate/v1/0101000210_create_lesli_admin_account_details.rb +70 -0
  52. data/db/migrate/v1/{0101003010_create_lesli_admin_dashboards.rb → 0101000313_create_lesli_admin_account_settings.rb} +11 -4
  53. data/db/migrate/v1/0101000410_create_lesli_admin_account_locations.rb +63 -0
  54. data/{app/controllers/lesli_admin/abouts_controller.rb → db/migrate/v1/0101000510_create_lesli_admin_account_currencies.rb} +14 -14
  55. data/db/seeds.rb +1 -1
  56. data/lib/lesli_admin/version.rb +2 -2
  57. data/readme.md +146 -36
  58. metadata +50 -37
  59. data/app/controllers/lesli_admin/dashboard/components_controller.rb +0 -60
  60. data/app/controllers/lesli_admin/profiles_controller.rb +0 -48
  61. data/app/helpers/lesli_admin/profiles_helper.rb +0 -4
  62. data/app/models/lesli_admin/dashboard/component.rb +0 -49
  63. data/app/views/lesli_admin/abouts/show.html.erb +0 -73
  64. data/app/views/lesli_admin/accounts/_account.html.erb +0 -2
  65. data/app/views/lesli_admin/accounts/_form.html.erb +0 -17
  66. data/app/views/lesli_admin/accounts/edit.html.erb +0 -10
  67. data/app/views/lesli_admin/accounts/index.html.erb +0 -34
  68. data/app/views/lesli_admin/accounts/new.html.erb +0 -9
  69. data/app/views/lesli_admin/accounts/update.turbo_stream.erb +0 -3
  70. data/app/views/lesli_admin/profiles/show.html.erb +0 -1
  71. data/lib/scss/application.scss +0 -4
  72. data/lib/vue/application.js +0 -96
  73. data/lib/vue/apps/about/show.vue +0 -74
  74. data/lib/vue/apps/account/components/form-address.vue +0 -119
  75. data/lib/vue/apps/account/components/form-contact.vue +0 -122
  76. data/lib/vue/apps/account/components/form-information.vue +0 -89
  77. data/lib/vue/apps/account/show.vue +0 -87
  78. data/lib/vue/apps/dashboards/components/lesli-version.vue +0 -73
  79. data/lib/vue/apps/profile/show.vue +0 -129
  80. data/lib/vue/stores/account.js +0 -111
  81. data/lib/vue/stores/account_settings.js +0 -342
  82. data/lib/vue/stores/roles.js +0 -89
  83. data/lib/vue/stores/translations.json +0 -162
data/readme.md CHANGED
@@ -1,67 +1,173 @@
1
- <div align="center" class="documentation-header">
2
- <img width="100" alt="LesliAdmin logo" src="./app/assets/images/lesli_admin/admin-logo.svg" />
3
- <h3 align="center">Administration area for the Lesli Framework.</h3>
1
+ <div align="center">
2
+ <h1 align="center">
3
+ <img width="100" alt="LesliAdmin" src="./app/assets/images/lesli_admin/admin-logo.svg" />
4
+ </h1>
5
+ <h3 align="center">Account and application administration for the Lesli Framework.</h3>
4
6
  </div>
5
7
 
6
-
7
8
  <br />
8
- <hr/>
9
9
 
10
- <div align="center" class="documentation-statics">
11
- <a target="blank" href="https://rubygems.org/gems/lesli">
12
- <img height="22" alt="Gem Version" src="https://badge.fury.io/rb/lesli.svg"/>
10
+ <div align="center">
11
+ <a target="_blank" href="https://github.com/LesliTech/LesliAdmin/actions/workflows/lesli-ci.yaml">
12
+ <img alt="LesliAdmin test status" src="https://img.shields.io/github/actions/workflow/status/LesliTech/LesliAdmin/lesli-ci.yaml?branch=master&style=for-the-badge&logo=github&label=tests">
13
+ </a>
14
+ <a target="_blank" href="https://rubygems.org/gems/lesli_admin">
15
+ <img alt="Gem Version" src="https://img.shields.io/gem/v/lesli_admin?style=for-the-badge&logo=ruby">
13
16
  </a>
14
- <a class="mx-2" href="https://codecov.io/github/LesliTech/Lesli">
15
- <img height="22" src="https://codecov.io/github/LesliTech/Lesli/graph/badge.svg?token=2O12NENK5Y"/>
17
+ <a target="_blank" href="https://codecov.io/github/LesliTech/LesliAdmin">
18
+ <img alt="Codecov" src="https://img.shields.io/codecov/c/github/LesliTech/LesliAdmin?style=for-the-badge&logo=codecov">
16
19
  </a>
17
- <a href="https://codecov.io/github/LesliTech/LesliBabel">
18
- <img height="22" src="https://sonarcloud.io/api/project_badges/measure?project=LesliTech_LesliBabel&metric=sqale_rating"/>
20
+ <a target="_blank" href="https://sonarcloud.io/project/overview?id=LesliTech_LesliAdmin">
21
+ <img alt="Sonar Quality Gate" src="https://img.shields.io/sonar/quality_gate/LesliTech_LesliAdmin?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonarqubecloud&label=Quality">
19
22
  </a>
20
23
  </div>
21
24
 
22
- <hr/>
23
25
  <br />
24
26
 
27
+ <div align="center">
28
+ <img
29
+ style="width:100%;max-width:800px;border-radius:6px;"
30
+ alt="LesliAdmin account administration"
31
+ src="./docs/images/screenshot.png" />
32
+ </div>
33
+
34
+ ---
35
+
36
+ <br />
37
+
38
+ ## Introduction
39
+
40
+ LesliAdmin is the official account and application administration engine for the [Lesli Framework](https://github.com/LesliTech/Lesli).
41
+
42
+ It gives account owners and administrators a central interface for maintaining the core account identity, inspecting application configuration, and understanding the engines installed in a Lesli application.
43
+
44
+ <br />
45
+
46
+ ## Features
47
+
48
+ - Core account name and email management
49
+ - Framework configuration overview
50
+ - Installed-engine inventory and metadata
51
+ - Account-scoped data structures for details, locations, settings, and currencies
52
+ - Optional dashboard components through LesliDashboard
53
+
54
+ <br />
55
+
56
+ ## Try LesliAdmin
25
57
 
26
- ### Quick start
58
+ - [Try the online demo](https://demo.lesli.dev/)
59
+ - [Run the Docker demo](https://github.com/LesliTech/lesli-docker-demo)
60
+
61
+ <br />
62
+
63
+ ## Quick Start
64
+
65
+ ### Requirements
66
+
67
+ - A Rails application with [Lesli 5.1](https://rubygems.org/gems/lesli)
68
+ - SQLite by default, or PostgreSQL when preferred by the host application
69
+
70
+ ### Install LesliAdmin
71
+
72
+ Add the engine to the host Rails application and prepare its database:
27
73
 
28
74
  ```shell
29
- # Add LesliAdmin engine gem
30
75
  bundle add lesli_admin
76
+ bin/rails lesli:db:prepare
31
77
  ```
32
78
 
33
- ```shell
34
- # Setup & initialize the database
35
- rake lesli:db:setup
79
+ ### Mount the engine
80
+
81
+ Applications using Lesli's standard router mount LesliAdmin automatically at `/admin`:
82
+
83
+ ```ruby
84
+ # config/routes.rb
85
+ Rails.application.routes.draw do
86
+ Lesli::Router.mount(self)
87
+ end
36
88
  ```
37
89
 
90
+ If the application does not use the standard Lesli router, mount the engine directly:
91
+
38
92
  ```ruby
39
- # Load LesliAdmin engine
93
+ # config/routes.rb
40
94
  Rails.application.routes.draw do
41
95
  mount LesliAdmin::Engine => "/admin"
42
96
  end
43
97
  ```
44
98
 
99
+ Start Rails and visit [http://127.0.0.1:3000/admin](http://127.0.0.1:3000/admin):
45
100
 
46
- ### Documentation
47
- - [Account](https://www.lesli.dev/engines/admin/account)
101
+ ```shell
102
+ bin/rails routes -g admin
103
+ bin/rails server
104
+ ```
105
+
106
+ Install [LesliDashboard](https://rubygems.org/gems/lesli_dashboard) when the application should render LesliAdmin's shared dashboard and installed-engines component.
107
+
108
+ <br />
109
+
110
+ ## Development
111
+
112
+ Clone LesliAdmin into the host application's `engines` directory:
113
+
114
+ ```shell
115
+ cd RailsApp
116
+ mkdir -p engines
117
+ git clone https://github.com/LesliTech/LesliAdmin.git engines/LesliAdmin
118
+ ```
119
+
120
+ Reference the local engine from the host application's `Gemfile`:
121
+
122
+ ```ruby
123
+ gem "lesli_admin", path: "engines/LesliAdmin"
124
+ ```
125
+
126
+ Install dependencies, prepare the host database, and start Rails:
127
+
128
+ ```shell
129
+ bundle install
130
+ bin/rails lesli:db:prepare
131
+ bin/rails server
132
+ ```
133
+
134
+ ### Tests
135
+
136
+ From a complete Lesli development workspace, run the engine test suite from the LesliAdmin directory:
48
137
 
138
+ ```shell
139
+ cd engines/LesliAdmin
140
+ bin/rails test
141
+ ```
49
142
 
50
- ### Lesli Documentation
51
- * [website](https://www.lesli.dev/)
52
- * [documentation](https://www.lesli.dev/engines/admin/)
143
+ <br />
53
144
 
145
+ ## Documentation
54
146
 
55
- ### Get in touch with Lesli
147
+ - [Lesli website](https://www.lesli.dev/)
148
+ - [Documentation](https://www.lesli.dev/engines/admin)
149
+ - [Installation guide](https://www.lesli.dev/engines/admin/about/installation)
150
+ - [Account management](https://www.lesli.dev/engines/admin/account/)
151
+ - [Dashboard components](https://www.lesli.dev/engines/admin/about/dashboards)
152
+ - [Translations](https://www.lesli.dev/engines/admin/about/translations)
153
+ - [Database](https://www.lesli.dev/engines/admin/about/database)
154
+ - [Release notes](https://github.com/LesliTech/LesliAdmin/releases)
155
+ - [Issue tracker](https://github.com/LesliTech/LesliAdmin/issues)
156
+ - [Source code](https://github.com/LesliTech/LesliAdmin)
56
157
 
57
- * [Email: hello@lesli.tech](hello@lesli.tech)
58
- * [Website: https://www.lesli.tech](https://www.lesli.tech)
59
- * [Twitter: @LesliTech](https://twitter.com/LesliTech)
158
+ <br />
60
159
 
160
+ ## Community
61
161
 
62
- ### License
63
- -------
64
- Copyright (c) 2025, Lesli Technologies, S. A.
162
+ - [X: @LesliTech](https://x.com/LesliTech)
163
+ - [hello@lesli.tech](mailto:hello@lesli.tech)
164
+ - [https://www.lesli.tech](https://www.lesli.tech)
165
+
166
+ <br />
167
+
168
+ ## License
169
+
170
+ Copyright (c) 2026, Lesli Technologies, S. A.
65
171
 
66
172
  This program is free software: you can redistribute it and/or modify
67
173
  it under the terms of the GNU General Public License as published by
@@ -74,12 +180,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74
180
  GNU General Public License for more details.
75
181
 
76
182
  You should have received a copy of the GNU General Public License
77
- along with this program. If not, see http://www.gnu.org/licenses/.
183
+ along with this program. If not, see [https://www.gnu.org/licenses/](https://www.gnu.org/licenses/).
78
184
 
79
- <hr />
185
+ The complete license text is available in the [license file](./license).
186
+
187
+ ---
188
+
189
+ <br />
80
190
  <br />
81
191
 
82
- <div align="center" class="has-text-centered">
83
- <img width="200" alt="Lesli logo" src="https://cdn.lesli.tech/lesli/brand/app-logo.svg" />
84
- <h4 align="center" class="mt-0">Ruby on Rails SaaS Development Framework.</h4>
192
+ <div align="center">
193
+ <img width="80" alt="Lesli icon" src="https://cdn.lesli.tech/lesli/brand/app-icon.svg" />
194
+ <h3 align="center">The Open-Source SaaS Development Framework for Ruby on Rails.</h3>
85
195
  </div>
metadata CHANGED
@@ -1,29 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-07-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: lesli
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
16
+ - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '5.0'
18
+ version: 5.1.0
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - ">="
23
+ - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '5.0'
25
+ version: 5.1.0
27
26
  description: Administration area for the Lesli Framework
28
27
  email:
29
28
  - hello@lesli.tech
@@ -36,41 +35,67 @@ files:
36
35
  - app/assets/images/lesli_admin/admin-logo.svg
37
36
  - app/assets/javascripts/lesli_admin/application.js
38
37
  - app/assets/stylesheets/lesli_admin/application.css
39
- - app/controllers/lesli_admin/abouts_controller.rb
38
+ - app/assets/stylesheets/lesli_admin/application.tailwind.css
39
+ - app/controllers/lesli_admin/account/currencies_controller.rb
40
+ - app/controllers/lesli_admin/account/details_controller.rb
41
+ - app/controllers/lesli_admin/account/locations_controller.rb
42
+ - app/controllers/lesli_admin/account/settings_controller.rb
40
43
  - app/controllers/lesli_admin/accounts_controller.rb
41
44
  - app/controllers/lesli_admin/application_controller.rb
42
- - app/controllers/lesli_admin/dashboard/components_controller.rb
43
45
  - app/controllers/lesli_admin/dashboards_controller.rb
44
- - app/controllers/lesli_admin/profiles_controller.rb
45
46
  - app/controllers/lesli_admin/settings_controller.rb
47
+ - app/helpers/lesli_admin/account/currencies_helper.rb
48
+ - app/helpers/lesli_admin/account/details_helper.rb
49
+ - app/helpers/lesli_admin/account/locations_helper.rb
50
+ - app/helpers/lesli_admin/account/settings_helper.rb
46
51
  - app/helpers/lesli_admin/application_helper.rb
47
52
  - app/helpers/lesli_admin/dashboards_helper.rb
48
- - app/helpers/lesli_admin/profiles_helper.rb
49
53
  - app/helpers/lesli_admin/settings_helper.rb
50
54
  - app/jobs/lesli_admin/application_job.rb
51
55
  - app/mailers/lesli_admin/application_mailer.rb
52
56
  - app/models/lesli_admin/account.rb
57
+ - app/models/lesli_admin/account/currency.rb
58
+ - app/models/lesli_admin/account/detail.rb
59
+ - app/models/lesli_admin/account/location.rb
60
+ - app/models/lesli_admin/account/setting.rb
53
61
  - app/models/lesli_admin/application_record.rb
54
62
  - app/models/lesli_admin/dashboard.rb
55
- - app/models/lesli_admin/dashboard/component.rb
56
63
  - app/models/lesli_admin/setting.rb
57
64
  - app/services/lesli_admin/account_service.rb
58
- - app/views/lesli_admin/abouts/show.html.erb
59
- - app/views/lesli_admin/accounts/_account.html.erb
60
- - app/views/lesli_admin/accounts/_form.html.erb
61
- - app/views/lesli_admin/accounts/edit.html.erb
62
- - app/views/lesli_admin/accounts/index.html.erb
63
- - app/views/lesli_admin/accounts/new.html.erb
65
+ - app/views/lesli_admin/account/currencies/_currency.html.erb
66
+ - app/views/lesli_admin/account/currencies/_form.html.erb
67
+ - app/views/lesli_admin/account/currencies/edit.html.erb
68
+ - app/views/lesli_admin/account/currencies/index.html.erb
69
+ - app/views/lesli_admin/account/currencies/new.html.erb
70
+ - app/views/lesli_admin/account/currencies/show.html.erb
71
+ - app/views/lesli_admin/account/details/_detail.html.erb
72
+ - app/views/lesli_admin/account/details/_form.html.erb
73
+ - app/views/lesli_admin/account/details/edit.html.erb
74
+ - app/views/lesli_admin/account/details/index.html.erb
75
+ - app/views/lesli_admin/account/details/new.html.erb
76
+ - app/views/lesli_admin/account/details/show.html.erb
77
+ - app/views/lesli_admin/account/locations/_form.html.erb
78
+ - app/views/lesli_admin/account/locations/_location.html.erb
79
+ - app/views/lesli_admin/account/locations/edit.html.erb
80
+ - app/views/lesli_admin/account/locations/index.html.erb
81
+ - app/views/lesli_admin/account/locations/new.html.erb
82
+ - app/views/lesli_admin/account/locations/show.html.erb
83
+ - app/views/lesli_admin/account/settings/_form.html.erb
84
+ - app/views/lesli_admin/account/settings/_setting.html.erb
85
+ - app/views/lesli_admin/account/settings/edit.html.erb
86
+ - app/views/lesli_admin/account/settings/index.html.erb
87
+ - app/views/lesli_admin/account/settings/new.html.erb
88
+ - app/views/lesli_admin/account/settings/show.html.erb
64
89
  - app/views/lesli_admin/accounts/show.html.erb
65
- - app/views/lesli_admin/accounts/update.turbo_stream.erb
66
90
  - app/views/lesli_admin/dashboards/_component-installed-engines.html.erb
67
91
  - app/views/lesli_admin/dashboards/edit.html.erb
68
92
  - app/views/lesli_admin/dashboards/index.html.erb
69
93
  - app/views/lesli_admin/dashboards/new.html.erb
70
94
  - app/views/lesli_admin/dashboards/show.html.erb
71
95
  - app/views/lesli_admin/partials/_navigation.html.erb
72
- - app/views/lesli_admin/profiles/show.html.erb
96
+ - app/views/lesli_admin/settings/_defaults.html.erb
73
97
  - app/views/lesli_admin/settings/_form.html.erb
98
+ - app/views/lesli_admin/settings/_modules.html.erb
74
99
  - app/views/lesli_admin/settings/_setting.html.erb
75
100
  - app/views/lesli_admin/settings/edit.html.erb
76
101
  - app/views/lesli_admin/settings/index.html.erb
@@ -87,27 +112,17 @@ files:
87
112
  - config/locales/translations.pt.yml
88
113
  - config/routes.rb
89
114
  - db/migrate/v1/0101000110_create_lesli_admin_accounts.rb
90
- - db/migrate/v1/0101003010_create_lesli_admin_dashboards.rb
115
+ - db/migrate/v1/0101000210_create_lesli_admin_account_details.rb
116
+ - db/migrate/v1/0101000313_create_lesli_admin_account_settings.rb
117
+ - db/migrate/v1/0101000410_create_lesli_admin_account_locations.rb
118
+ - db/migrate/v1/0101000510_create_lesli_admin_account_currencies.rb
91
119
  - db/seed/development.rb
92
120
  - db/seed/production.rb
93
121
  - db/seeds.rb
94
122
  - lib/lesli_admin.rb
95
123
  - lib/lesli_admin/engine.rb
96
124
  - lib/lesli_admin/version.rb
97
- - lib/scss/application.scss
98
125
  - lib/tasks/lesli_admin_tasks.rake
99
- - lib/vue/application.js
100
- - lib/vue/apps/about/show.vue
101
- - lib/vue/apps/account/components/form-address.vue
102
- - lib/vue/apps/account/components/form-contact.vue
103
- - lib/vue/apps/account/components/form-information.vue
104
- - lib/vue/apps/account/show.vue
105
- - lib/vue/apps/dashboards/components/lesli-version.vue
106
- - lib/vue/apps/profile/show.vue
107
- - lib/vue/stores/account.js
108
- - lib/vue/stores/account_settings.js
109
- - lib/vue/stores/roles.js
110
- - lib/vue/stores/translations.json
111
126
  - license
112
127
  - readme.md
113
128
  homepage: https://www.lesli.dev/
@@ -119,7 +134,6 @@ metadata:
119
134
  source_code_uri: https://github.com/LesliTech/LesliAdmin
120
135
  bug_tracker_uri: https://github.com/LesliTech/LesliAdmin/issues
121
136
  documentation_uri: https://www.lesli.dev/engines/admin
122
- post_install_message:
123
137
  rdoc_options: []
124
138
  require_paths:
125
139
  - lib
@@ -134,8 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
148
  - !ruby/object:Gem::Version
135
149
  version: '0'
136
150
  requirements: []
137
- rubygems_version: 3.4.19
138
- signing_key:
151
+ rubygems_version: 3.7.1
139
152
  specification_version: 4
140
153
  summary: Administration area for the Lesli Framework
141
154
  test_files: []
@@ -1,60 +0,0 @@
1
- module LesliAdmin
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,48 +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 LesliAdmin
34
- class ProfilesController < ApplicationController
35
- before_action :set_account, only: %i[update]
36
-
37
- # GET /profile
38
- # GET /profile.json
39
- def show
40
- respond_to do |format|
41
- format.html {}
42
- format.json do
43
- respond_with_successful()
44
- end
45
- end
46
- end
47
- end
48
- end
@@ -1,4 +0,0 @@
1
- module LesliAdmin
2
- module ProfilesHelper
3
- end
4
- end
@@ -1,49 +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 LesliAdmin
34
- class Dashboard::Component < ApplicationRecord
35
- belongs_to :dashboard, inverse_of: :components
36
-
37
- # def self.component_ids
38
- # ["version"]
39
- # end
40
- # components_ids: {
41
- # list_new_tickets: "list_new_tickets",
42
- # list_my_tickets: "list_my_tickets",
43
- # list_unassigned_tickets: "list_unassigned_tickets",
44
- # chart_tickets_by_type: "chart_tickets_by_type",
45
- # chart_tickets_by_category: "chart_tickets_by_category",
46
- # hours_worked: "hours_worked"
47
- # }
48
- end
49
- end
@@ -1,73 +0,0 @@
1
- <%#
2
-
3
- Lesli
4
-
5
- Copyright (c) 2025, 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 LesliTech
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
- <script>
34
- function engineManager() {
35
- return {
36
- data: { engines: [] },
37
-
38
- init() {
39
- const stored = localStorage.getItem('engineData')
40
- this.data = stored ? JSON.parse(stored) : { engines: [] }
41
- },
42
-
43
- toggleEngine(engine) {
44
- const index = this.data.engines.indexOf(engine)
45
- if (index === -1) {
46
- this.data.engines.push(engine)
47
- } else {
48
- this.data.engines.splice(index, 1)
49
- }
50
- localStorage.setItem('engineData', JSON.stringify(this.data))
51
- }
52
- }
53
- }
54
- </script>
55
-
56
- <%= render LesliView::Layout::Container.new("admin-accounts") do %>
57
- <%= render LesliView::Components::Header.new("About") %>
58
-
59
- <div class="box" x-data="engineManager()">
60
- <% @lesli_engines.each do |engine| %>
61
- <div>
62
- <%= render(LesliView::Partials::EngineSpec.new(engine)) %>
63
- <hr class="mt-4 mb-4" />
64
- <button
65
- @click="toggleEngine('<%= engine[:path].gsub("/","") %>')"
66
- :class="data.engines.includes('<%= engine[:path].gsub("/","") %>') ? 'button is-small is-info' : 'button is-small is-danger'"
67
- x-text="data.engines.includes('<%= engine[:path].gsub("/","") %>') ? 'Activar módulo' : 'Desactivar módulo'">
68
- </button>
69
- </div>
70
- <hr class="my-6 has-background-grey">
71
- <% end %>
72
- </div>
73
- <% end %>
@@ -1,2 +0,0 @@
1
- <div id="<%= dom_id account %>">
2
- </div>
@@ -1,17 +0,0 @@
1
- <%= form_with(model: account) do |form| %>
2
- <% if account.errors.any? %>
3
- <div style="color: red">
4
- <h2><%= pluralize(account.errors.count, "error") %> prohibited this account from being saved:</h2>
5
-
6
- <ul>
7
- <% account.errors.each do |error| %>
8
- <li><%= error.full_message %></li>
9
- <% end %>
10
- </ul>
11
- </div>
12
- <% end %>
13
-
14
- <div>
15
- <%= form.submit %>
16
- </div>
17
- <% end %>
@@ -1,10 +0,0 @@
1
- <h1>Editing account</h1>
2
-
3
- <%= render "form", account: @account %>
4
-
5
- <br>
6
-
7
- <div>
8
- <%= link_to "Show this account", @account %> |
9
- <%= link_to "Back to accounts", accounts_path %>
10
- </div>