lesli 5.1.13 → 5.1.14

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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/lesli/application_lesli_controller.rb +27 -0
  3. data/app/controllers/lesli/items/attachments_controller.rb +3 -3
  4. data/app/controllers/lesli/items/discussions_controller.rb +2 -2
  5. data/app/controllers/lesli/items/tasks_controller.rb +2 -2
  6. data/app/controllers/lesli/roles_controller.rb +1 -6
  7. data/app/controllers/lesli/users_controller.rb +1 -5
  8. data/app/helpers/lesli/announcements_helper.rb +14 -0
  9. data/app/helpers/lesli/navigation_helper.rb +1 -1
  10. data/app/interfaces/lesli/responder_interface.rb +11 -4
  11. data/app/models/concerns/lesli/account_initializer.rb +5 -45
  12. data/app/models/concerns/lesli/user_extensions.rb +4 -2
  13. data/app/models/lesli/items/attachment.rb +3 -3
  14. data/app/models/lesli/role.rb +14 -2
  15. data/app/models/lesli/user.rb +7 -0
  16. data/app/operators/lesli/account_operator.rb +84 -0
  17. data/app/operators/lesli/resource_operator.rb +123 -0
  18. data/app/services/lesli/application_lesli_service.rb +33 -116
  19. data/app/services/lesli/resource_service.rb +12 -159
  20. data/app/services/lesli/role_service.rb +11 -229
  21. data/app/services/lesli/user_service.rb +37 -117
  22. data/app/views/lesli/layouts/application-lesli.html.erb +1 -1
  23. data/app/views/lesli/partials/_application-lesli-announcements.html.erb +28 -0
  24. data/app/views/lesli/partials/_application-lesli-header.html.erb +3 -2
  25. data/app/views/lesli/partials/_application-lesli-turbo.html.erb +5 -0
  26. data/config/initializers/lesli.rb +7 -2
  27. data/config/locales/translations.en.yml +57 -48
  28. data/config/locales/translations.es.yml +55 -45
  29. data/db/migrate/v1/0000000210_create_lesli_users.rb +1 -0
  30. data/db/seed/xyz.rb +1 -3
  31. data/lib/generators/lesli/base_generator.rb +41 -3
  32. data/lib/generators/lesli/controller/controller_generator.rb +1 -1
  33. data/lib/generators/lesli/controller/templates/controller.rb.tt +12 -7
  34. data/lib/generators/lesli/model/model_generator.rb +1 -1
  35. data/lib/generators/lesli/resource/resource_generator.rb +290 -0
  36. data/lib/generators/lesli/resource/templates/controller.rb.tt +99 -0
  37. data/lib/generators/lesli/resource/templates/locale.en.yml.tt +13 -0
  38. data/lib/generators/lesli/resource/templates/migration.rb.tt +28 -0
  39. data/lib/generators/lesli/resource/templates/model.rb.tt +38 -0
  40. data/lib/generators/lesli/resource/templates/operator.rb.tt +15 -0
  41. data/lib/generators/lesli/resource/templates/service.rb.tt +52 -0
  42. data/lib/generators/lesli/resource/templates/tests/controller_test.rb.tt +14 -0
  43. data/lib/generators/lesli/resource/templates/tests/model_test.rb.tt +24 -0
  44. data/lib/generators/lesli/resource/templates/tests/operator_test.rb.tt +15 -0
  45. data/lib/generators/lesli/resource/templates/tests/service_test.rb.tt +17 -0
  46. data/lib/generators/lesli/resource/templates/views/_form.html.erb.tt +17 -0
  47. data/lib/generators/lesli/resource/templates/views/edit.html.erb.tt +4 -0
  48. data/lib/generators/lesli/resource/templates/views/index.html.erb.tt +22 -0
  49. data/lib/generators/lesli/resource/templates/views/new.html.erb.tt +4 -0
  50. data/lib/generators/lesli/resource/templates/views/show.html.erb.tt +17 -0
  51. data/lib/generators/lesli/scaffold/scaffold_generator.rb +4 -39
  52. data/lib/generators/lesli/service/service_generator.rb +1 -1
  53. data/lib/generators/lesli/service/templates/service.rb.tt +15 -7
  54. data/lib/generators/lesli/views/views_generator.rb +1 -1
  55. data/lib/generators/lesli_generator.rb +11 -0
  56. data/lib/lesli/courier.rb +66 -34
  57. data/lib/lesli/database_tasks.rb +145 -0
  58. data/lib/lesli/version.rb +2 -2
  59. data/lib/tasks/lesli/db.rake +16 -93
  60. data/lib/tasks/lesli/resources.rake +1 -1
  61. data/readme.md +3 -1
  62. metadata +24 -3
  63. data/app/views/lesli/partials/_application-lesli-sidebar.html.erb +0 -50
@@ -1,50 +0,0 @@
1
- <%
2
- =begin
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 · Ruby on Rails SaaS development platform.
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://www.lesli.tech
28
- @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
29
-
30
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
31
- // ·
32
- =end
33
- %>
34
-
35
- <%# check if custom navigation partial exists, getting the path from application helper %>
36
- <% custom_sidebar_path = "#{lesli_engine.dig(:code)}/partials/sidebar" %>
37
-
38
- <%# validate the path to be sure the partial exists when trying to render it %>
39
- <% custom_sidebar_exists = lookup_context.exists?(custom_sidebar_path, nil, true) %>
40
-
41
- <%# render navigation partial %>
42
- <% if custom_sidebar_exists %>
43
- <aside class="flex w-[50px] shrink-0 flex-col pt-12 pl-12 transition-all duration-200 ease-linear min-[769px]:w-[100px] min-[1024px]:w-[200px] min-[1216px]:w-[225px] min-[1408px]:w-[328px]">
44
- <nav class="overflow-y-scroll rounded-lg bg-white pt-[.8rem] pb-4 pl-4 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" aria-label="Module navigation">
45
- <ul>
46
- <%= render partial: custom_sidebar_path %>
47
- </ul>
48
- </nav>
49
- </aside>
50
- <% end %>