lesli 5.0.23 → 5.1.0

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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/lesli/application.css +1 -192
  3. data/app/controllers/lesli/abouts_controller.rb +1 -1
  4. data/app/controllers/lesli/{items → item}/activities_controller.rb +1 -1
  5. data/app/controllers/lesli/item/discussions_controller.rb +126 -0
  6. data/app/controllers/lesli/item/tasks_controller.rb +126 -0
  7. data/app/helpers/lesli/customization_helper.rb +1 -1
  8. data/app/helpers/lesli/html_helper.rb +1 -1
  9. data/app/models/concerns/lesli/item/activities.rb +106 -0
  10. data/app/models/concerns/lesli/item/discussions.rb +92 -0
  11. data/app/models/concerns/lesli/item/tasks.rb +95 -0
  12. data/app/models/lesli/account.rb +1 -0
  13. data/app/models/lesli/{items → item}/activity.rb +5 -13
  14. data/app/models/lesli/item/discussion.rb +10 -0
  15. data/{lib/lesli/r_spec.rb → app/models/lesli/item/task.rb} +9 -10
  16. data/app/views/lesli/partials/_application-lesli-header.html.erb +12 -0
  17. data/config/initializers/lesli_migration_helpers.rb +2 -2
  18. data/db/migrate/v1/0000000210_create_lesli_users.rb +1 -1
  19. data/lib/generators/lesli/base_generator.rb +172 -0
  20. data/lib/generators/lesli/controller/controller_generator.rb +40 -0
  21. data/lib/generators/lesli/controller/templates/controller.rb.tt +86 -0
  22. data/lib/generators/lesli/install/install_generator.rb +1 -1
  23. data/lib/generators/lesli/model/model_generator.rb +44 -0
  24. data/lib/generators/lesli/model/templates/model.rb.tt +16 -0
  25. data/lib/generators/lesli/scaffold/scaffold_generator.rb +47 -0
  26. data/lib/generators/lesli/service/service_generator.rb +40 -0
  27. data/lib/generators/lesli/service/templates/service.rb.tt +44 -0
  28. data/lib/generators/lesli/views/templates/_form.html.erb.tt +22 -0
  29. data/lib/generators/lesli/views/templates/index.html.erb.tt +17 -0
  30. data/lib/generators/lesli/views/templates/new.html.erb.tt +4 -0
  31. data/lib/generators/lesli/views/templates/show.html.erb.tt +22 -0
  32. data/lib/generators/lesli/views/views_generator.rb +106 -0
  33. data/lib/lesli/engine.rb +1 -23
  34. data/lib/lesli/router.rb +42 -43
  35. data/lib/lesli/version.rb +2 -2
  36. data/lib/migrate/common.rb +1 -1
  37. data/lib/migrate/items/activity_structure.rb +11 -5
  38. data/lib/migrate/items/discussion_structure.rb +9 -3
  39. data/lib/migrate/items/{action_structure.rb → task_structure.rb} +12 -6
  40. data/lib/migrate/shared/catalog_structure.rb +16 -0
  41. data/lib/tasks/lesli/db.rake +9 -0
  42. data/readme.md +1 -1
  43. metadata +58 -79
  44. data/app/assets/config/lesli_manifest.js +0 -42
  45. data/app/assets/images/lesli/brand/app-auth.svg +0 -9
  46. data/app/assets/images/lesli/brand/app-icon.svg +0 -48
  47. data/app/assets/images/lesli/brand/app-logo.png +0 -0
  48. data/app/assets/images/lesli/brand/app-logo.svg +0 -4
  49. data/app/assets/images/lesli/brand/favicon.png +0 -0
  50. data/app/assets/images/lesli/brand/favicon.svg +0 -61
  51. data/app/assets/images/lesli/brand/login-background.jpg +0 -0
  52. data/app/assets/images/lesli/brand/register-background.jpg +0 -0
  53. data/app/assets/javascripts/lesli/application.js +0 -1
  54. data/app/controllers/lesli/items/actions_controller.rb +0 -122
  55. data/app/controllers/lesli/items/discussions_controller.rb +0 -93
  56. data/app/models/lesli/items/action.rb +0 -15
  57. data/app/models/lesli/items/discussion.rb +0 -15
  58. data/config/importmap.rb +0 -1
  59. data/db/structure/00000000_locations.json +0 -32
  60. data/db/structure/00000020_catalogs.json +0 -0
  61. data/db/structure/00000201_workflows.json +0 -17
  62. data/db/structure/00000202_workflow_statuses.json +0 -24
  63. data/db/structure/00000203_workflow_associations.json +0 -14
  64. data/db/structure/00000204_workflow_actions.json +0 -39
  65. data/db/structure/00000205_workflow_checks.json +0 -27
  66. data/db/structure/00000300_custom_fields.json +0 -8
  67. data/db/structure/00000301_custom_fields.json +0 -38
  68. data/db/structure/00000401_custom_validations.json +0 -14
  69. data/db/structure/00000402_custom_validation_rules.json +0 -23
  70. data/db/structure/00000403_custom_validation_fields.json +0 -14
  71. data/lib/generators/application_lesli_generator_base.rb +0 -164
  72. data/lib/generators/lesli/spec/USAGE +0 -8
  73. data/lib/generators/lesli/spec/spec_generator.rb +0 -22
  74. data/lib/generators/lesli/spec/templates/spec-factory.template +0 -17
  75. data/lib/generators/lesli/spec/templates/spec-model.template +0 -70
  76. data/lib/generators/lesli/view/USAGE +0 -8
  77. data/lib/generators/lesli/view/templates/spec-factory.template +0 -17
  78. data/lib/generators/lesli/view/templates/spec-model.template +0 -70
  79. data/lib/generators/lesli/view/view_generator.rb +0 -22
  80. data/lib/scss/_apps.scss +0 -94
  81. data/lib/scss/application.scss +0 -34
  82. data/lib/tasks/lesli/docs.rake +0 -47
  83. data/lib/tasks/lesli/git.rake +0 -70
  84. data/lib/tasks/lesli/github.rake +0 -89
  85. data/lib/test/config.rb +0 -111
  86. data/lib/test/helpers/response_integration_helper.rb +0 -46
  87. data/lib/test/lesli.rb +0 -61
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.23
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
@@ -29,28 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '2.0'
32
+ version: 2.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '2.0'
40
- - !ruby/object:Gem::Dependency
41
- name: importmap-rails
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '2.2'
47
- type: :runtime
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '2.2'
39
+ version: 2.0.0
54
40
  - !ruby/object:Gem::Dependency
55
41
  name: acts_as_paranoid
56
42
  requirement: !ruby/object:Gem::Requirement
@@ -85,70 +71,84 @@ dependencies:
85
71
  requirements:
86
72
  - - "~>"
87
73
  - !ruby/object:Gem::Version
88
- version: '5.0'
74
+ version: 5.0.0
89
75
  type: :runtime
90
76
  prerelease: false
91
77
  version_requirements: !ruby/object:Gem::Requirement
92
78
  requirements:
93
79
  - - "~>"
94
80
  - !ruby/object:Gem::Version
95
- version: '5.0'
81
+ version: 5.0.0
96
82
  - !ruby/object:Gem::Dependency
97
83
  name: lesli_date
98
84
  requirement: !ruby/object:Gem::Requirement
99
85
  requirements:
100
86
  - - "~>"
101
87
  - !ruby/object:Gem::Version
102
- version: '0.1'
88
+ version: 1.1.0
103
89
  type: :runtime
104
90
  prerelease: false
105
91
  version_requirements: !ruby/object:Gem::Requirement
106
92
  requirements:
107
93
  - - "~>"
108
94
  - !ruby/object:Gem::Version
109
- version: '0.1'
95
+ version: 1.1.0
110
96
  - !ruby/object:Gem::Dependency
111
97
  name: lesli_view
112
98
  requirement: !ruby/object:Gem::Requirement
113
99
  requirements:
114
100
  - - "~>"
115
101
  - !ruby/object:Gem::Version
116
- version: 1.0.0
102
+ version: 1.1.0
117
103
  type: :runtime
118
104
  prerelease: false
119
105
  version_requirements: !ruby/object:Gem::Requirement
120
106
  requirements:
121
107
  - - "~>"
122
108
  - !ruby/object:Gem::Version
123
- version: 1.0.0
109
+ version: 1.1.0
124
110
  - !ruby/object:Gem::Dependency
125
111
  name: lesli_assets
126
112
  requirement: !ruby/object:Gem::Requirement
127
113
  requirements:
128
114
  - - "~>"
129
115
  - !ruby/object:Gem::Version
130
- version: '1.0'
116
+ version: 1.1.0
131
117
  type: :runtime
132
118
  prerelease: false
133
119
  version_requirements: !ruby/object:Gem::Requirement
134
120
  requirements:
135
121
  - - "~>"
136
122
  - !ruby/object:Gem::Version
137
- version: '1.0'
123
+ version: 1.1.0
138
124
  - !ruby/object:Gem::Dependency
139
125
  name: lesli_system
140
126
  requirement: !ruby/object:Gem::Requirement
141
127
  requirements:
142
128
  - - "~>"
143
129
  - !ruby/object:Gem::Version
144
- version: 1.0.0
130
+ version: 1.1.0
145
131
  type: :runtime
146
132
  prerelease: false
147
133
  version_requirements: !ruby/object:Gem::Requirement
148
134
  requirements:
149
135
  - - "~>"
150
136
  - !ruby/object:Gem::Version
151
- version: 1.0.0
137
+ version: 1.1.0
138
+ - !ruby/object:Gem::Dependency
139
+ name: termline
140
+ requirement: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: 1.1.0
145
+ type: :runtime
146
+ prerelease: false
147
+ version_requirements: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: 1.1.0
152
152
  - !ruby/object:Gem::Dependency
153
153
  name: L2
154
154
  requirement: !ruby/object:Gem::Requirement
@@ -163,8 +163,9 @@ dependencies:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0.6'
166
- description: "Lesli is a SaaS development framework designed to build highly scalable,
167
- \nsecure and customizable software products.\n"
166
+ description: |
167
+ Lesli is a Ruby on Rails framework that provides modular architecture
168
+ and reusable engines for building scalable business software.
168
169
  email:
169
170
  - hello@lesli.tech
170
171
  executables: []
@@ -172,26 +173,16 @@ extensions: []
172
173
  extra_rdoc_files: []
173
174
  files:
174
175
  - Rakefile
175
- - app/assets/config/lesli_manifest.js
176
- - app/assets/images/lesli/brand/app-auth.svg
177
- - app/assets/images/lesli/brand/app-icon.svg
178
- - app/assets/images/lesli/brand/app-logo.png
179
- - app/assets/images/lesli/brand/app-logo.svg
180
- - app/assets/images/lesli/brand/favicon.png
181
- - app/assets/images/lesli/brand/favicon.svg
182
- - app/assets/images/lesli/brand/login-background.jpg
183
- - app/assets/images/lesli/brand/register-background.jpg
184
176
  - app/assets/images/lesli/lesli-logo.svg
185
- - app/assets/javascripts/lesli/application.js
186
177
  - app/assets/stylesheets/lesli/application.css
187
178
  - app/controllers/lesli/abouts_controller.rb
188
179
  - app/controllers/lesli/application_controller.rb
189
180
  - app/controllers/lesli/application_devise_controller.rb
190
181
  - app/controllers/lesli/application_lesli_controller.rb
191
182
  - app/controllers/lesli/apps_controller.rb
192
- - app/controllers/lesli/items/actions_controller.rb
193
- - app/controllers/lesli/items/activities_controller.rb
194
- - app/controllers/lesli/items/discussions_controller.rb
183
+ - app/controllers/lesli/item/activities_controller.rb
184
+ - app/controllers/lesli/item/discussions_controller.rb
185
+ - app/controllers/lesli/item/tasks_controller.rb
195
186
  - app/controllers/lesli/resources_controller.rb
196
187
  - app/controllers/lesli/roles_controller.rb
197
188
  - app/controllers/lesli/shared/dashboards_controller.rb
@@ -209,12 +200,15 @@ files:
209
200
  - app/mailers/lesli/application_mailer.rb
210
201
  - app/models/concerns/lesli/account_initializer.rb
211
202
  - app/models/concerns/lesli/account_logs.rb
203
+ - app/models/concerns/lesli/item/activities.rb
204
+ - app/models/concerns/lesli/item/discussions.rb
205
+ - app/models/concerns/lesli/item/tasks.rb
212
206
  - app/models/concerns/lesli/user_extensions.rb
213
207
  - app/models/lesli/account.rb
214
208
  - app/models/lesli/application_lesli_record.rb
215
- - app/models/lesli/items/action.rb
216
- - app/models/lesli/items/activity.rb
217
- - app/models/lesli/items/discussion.rb
209
+ - app/models/lesli/item/activity.rb
210
+ - app/models/lesli/item/discussion.rb
211
+ - app/models/lesli/item/task.rb
218
212
  - app/models/lesli/resource.rb
219
213
  - app/models/lesli/role.rb
220
214
  - app/models/lesli/shared/catalog.rb
@@ -247,7 +241,6 @@ files:
247
241
  - app/views/lesli/shared/dashboards/edit.html.erb
248
242
  - app/views/lesli/shared/dashboards/show.html.erb
249
243
  - config/brakeman.yml
250
- - config/importmap.rb
251
244
  - config/initializers/devise.rb
252
245
  - config/initializers/lesli.rb
253
246
  - config/initializers/lesli_migration_helpers.rb
@@ -266,59 +259,42 @@ files:
266
259
  - db/seed/users.rb
267
260
  - db/seed/xyz.rb
268
261
  - db/seeds.rb
269
- - db/structure/00000000_locations.json
270
- - db/structure/00000020_catalogs.json
271
- - db/structure/00000201_workflows.json
272
- - db/structure/00000202_workflow_statuses.json
273
- - db/structure/00000203_workflow_associations.json
274
- - db/structure/00000204_workflow_actions.json
275
- - db/structure/00000205_workflow_checks.json
276
- - db/structure/00000300_custom_fields.json
277
- - db/structure/00000301_custom_fields.json
278
- - db/structure/00000401_custom_validations.json
279
- - db/structure/00000402_custom_validation_rules.json
280
- - db/structure/00000403_custom_validation_fields.json
281
- - lib/generators/application_lesli_generator_base.rb
262
+ - lib/generators/lesli/base_generator.rb
263
+ - lib/generators/lesli/controller/controller_generator.rb
264
+ - lib/generators/lesli/controller/templates/controller.rb.tt
282
265
  - lib/generators/lesli/install/USAGE
283
266
  - lib/generators/lesli/install/install_generator.rb
284
267
  - lib/generators/lesli/install/templates/lesli.rb
285
- - lib/generators/lesli/spec/USAGE
286
- - lib/generators/lesli/spec/spec_generator.rb
287
- - lib/generators/lesli/spec/templates/spec-factory.template
288
- - lib/generators/lesli/spec/templates/spec-model.template
289
- - lib/generators/lesli/view/USAGE
290
- - lib/generators/lesli/view/templates/spec-factory.template
291
- - lib/generators/lesli/view/templates/spec-model.template
292
- - lib/generators/lesli/view/view_generator.rb
268
+ - lib/generators/lesli/model/model_generator.rb
269
+ - lib/generators/lesli/model/templates/model.rb.tt
270
+ - lib/generators/lesli/scaffold/scaffold_generator.rb
271
+ - lib/generators/lesli/service/service_generator.rb
272
+ - lib/generators/lesli/service/templates/service.rb.tt
273
+ - lib/generators/lesli/views/templates/_form.html.erb.tt
274
+ - lib/generators/lesli/views/templates/index.html.erb.tt
275
+ - lib/generators/lesli/views/templates/new.html.erb.tt
276
+ - lib/generators/lesli/views/templates/show.html.erb.tt
277
+ - lib/generators/lesli/views/views_generator.rb
293
278
  - lib/lesli.rb
294
279
  - lib/lesli/configuration.rb
295
280
  - lib/lesli/courier.rb
296
281
  - lib/lesli/engine.rb
297
- - lib/lesli/r_spec.rb
298
282
  - lib/lesli/router.rb
299
283
  - lib/lesli/version.rb
300
284
  - lib/migrate/common.rb
301
- - lib/migrate/items/action_structure.rb
302
285
  - lib/migrate/items/activity_structure.rb
303
286
  - lib/migrate/items/attachment_structure.rb
304
287
  - lib/migrate/items/discussion_structure.rb
305
288
  - lib/migrate/items/subscriber_structure.rb
289
+ - lib/migrate/items/task_structure.rb
306
290
  - lib/migrate/items/version_structure.rb
307
291
  - lib/migrate/shared/account_structure.rb
308
292
  - lib/migrate/shared/catalog_structure.rb
309
- - lib/scss/_apps.scss
310
- - lib/scss/application.scss
311
293
  - lib/tasks/lesli/db.rake
312
294
  - lib/tasks/lesli/dev.rake
313
- - lib/tasks/lesli/docs.rake
314
295
  - lib/tasks/lesli/engine.rake
315
- - lib/tasks/lesli/git.rake
316
- - lib/tasks/lesli/github.rake
317
296
  - lib/tasks/lesli/resources.rake
318
297
  - lib/tasks/lesli_tasks.rake
319
- - lib/test/config.rb
320
- - lib/test/helpers/response_integration_helper.rb
321
- - lib/test/lesli.rb
322
298
  - license
323
299
  - readme.md
324
300
  homepage: https://www.lesli.dev/
@@ -338,7 +314,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
338
314
  requirements:
339
315
  - - ">="
340
316
  - !ruby/object:Gem::Version
341
- version: '3.2'
317
+ version: '3.0'
318
+ - - "<"
319
+ - !ruby/object:Gem::Version
320
+ version: '4.0'
342
321
  required_rubygems_version: !ruby/object:Gem::Requirement
343
322
  requirements:
344
323
  - - ">="
@@ -347,5 +326,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
347
326
  requirements: []
348
327
  rubygems_version: 3.7.1
349
328
  specification_version: 4
350
- summary: Ruby on Rails SaaS Development Framework.
329
+ summary: A modular framework for building business software with Ruby on Rails.
351
330
  test_files: []
@@ -1,42 +0,0 @@
1
- /*
2
- Lesli
3
-
4
- Copyright (c) 2023, Lesli Technologies, S. A.
5
-
6
- This program is free software: you can redistribute it and/or modify
7
- it under the terms of the GNU General Public License as published by
8
- the Free Software Foundation, either version 3 of the License, or
9
- (at your option) any later version.
10
-
11
- This program is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with this program. If not, see http://www.gnu.org/licenses/.
18
-
19
- Lesli · Ruby on Rails SaaS Development Framework.
20
-
21
- Made with ♥ by https://www.lesli.tech
22
- Building a better future, one line of code at a time.
23
-
24
- @contact hello@lesli.tech
25
- @website https://www.lesli.dev
26
- @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
-
28
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
- // ·
30
- */
31
-
32
-
33
- // · Engine images
34
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
35
- //= link_tree ../images/lesli .png
36
- //= link_tree ../images/lesli .jpg
37
- //= link_tree ../images/lesli .svg
38
-
39
- // · Engine styles and scripts
40
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
41
- //= link lesli/application.css
42
- //= link lesli/application.js
@@ -1,9 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" width="100" height="91.877" viewBox="0 0 100 91.877">
2
- <path fill="#214fbd" d="M19.697 45.94 34.85 72.18H65.15l15.147-26.24L65.15 19.698H34.85Z"/>
3
- <path fill="#214fbd" d="M34.596 39.395c10.878 0 19.697-8.82 19.697-19.698S45.474 0 34.596 0C23.717 0 14.898 8.819 14.898 19.697c0 10.879 8.819 19.698 19.698 19.698z"/>
4
- <path fill="#214fbd" d="M65.293 39.395c10.878 0 19.697-8.82 19.697-19.698S76.17 0 65.293 0C54.414 0 45.595 8.819 45.595 19.697c0 10.879 8.819 19.698 19.698 19.698zM34.596 91.877c10.878 0 19.697-8.819 19.697-19.697 0-10.879-8.819-19.698-19.697-19.698-10.879 0-19.698 8.819-19.698 19.698 0 10.878 8.819 19.697 19.698 19.697z"/>
5
- <path fill="#214fbd" d="M65.293 91.877c10.878 0 19.697-8.819 19.697-19.697 0-10.879-8.819-19.698-19.697-19.698-10.879 0-19.698 8.819-19.698 19.698 0 10.878 8.819 19.697 19.698 19.697z"/>
6
- <path fill="#214fbd" d="M80.303 65.638C91.18 65.638 100 56.82 100 45.941c0-10.879-8.819-19.697-19.697-19.697-10.879 0-19.698 8.818-19.698 19.697 0 10.878 8.82 19.697 19.698 19.697zM19.697 65.638c10.879 0 19.698-8.819 19.698-19.697 0-10.879-8.82-19.697-19.698-19.697S0 35.062 0 45.94c0 10.878 8.819 19.697 19.697 19.697Z"/>
7
- <path fill="#fff" d="M51.192 25.635h-6.06V65.03h6.06z"/>
8
- <path fill="#fff" d="M28.468 42.305v6.06h39.394v-6.06Z"/>
9
- </svg>
@@ -1,48 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg
3
- inkscape:version="1.4 (e7c3feb1, 2024-10-09)"
4
- height="792.88586"
5
- width="913.88531"
6
- sodipodi:docname="app-icon.svg"
7
- version="1.1"
8
- viewBox="0 0 913.88531 792.88586"
9
- data-name="Layer 1"
10
- id="Layer_1"
11
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
13
- xmlns="http://www.w3.org/2000/svg"
14
- xmlns:svg="http://www.w3.org/2000/svg">
15
- <sodipodi:namedview
16
- inkscape:current-layer="Layer_1"
17
- inkscape:window-maximized="0"
18
- inkscape:window-y="25"
19
- inkscape:window-x="0"
20
- inkscape:cy="396.13491"
21
- inkscape:cx="457.9763"
22
- inkscape:zoom="0.85703125"
23
- showgrid="false"
24
- id="namedview19"
25
- inkscape:window-height="996"
26
- inkscape:window-width="1792"
27
- inkscape:pageshadow="2"
28
- inkscape:pageopacity="0"
29
- guidetolerance="10"
30
- gridtolerance="10"
31
- objecttolerance="10"
32
- borderopacity="1"
33
- bordercolor="#666666"
34
- pagecolor="#ffffff"
35
- inkscape:showpageshadow="2"
36
- inkscape:pagecheckerboard="0"
37
- inkscape:deskcolor="#d1d1d1" />
38
- <defs
39
- id="defs12">
40
- <style
41
- id="style10">.cls-1{fill:#214FBD;}</style>
42
- </defs>
43
- <path
44
- style="stroke-width:1.32288"
45
- id="path16"
46
- d="M 820.53981,396.44304 A 143.16576,140.81379 0 0 0 702.2777,257.84649 143.1124,140.76129 0 0 0 456.54962,120.56192 143.07239,140.72194 0 0 0 210.86154,257.95145 a 143.1124,140.76129 0 0 0 0,276.98318 A 143.1124,140.76129 0 0 0 456.54962,672.32416 143.07239,140.72194 0 0 0 702.2777,535.03958 143.16576,140.81379 0 0 0 820.53981,396.44304 Z M 465.64669,508.53778 v 24.44202 h -44.01816 v -93.64846 a 25.984058,25.557183 0 0 0 -26.03741,-25.55718 h -95.21263 v -43.29502 h 95.21263 a 25.997396,25.570302 0 0 0 25.98405,-25.5703 v -93.6878 h 44.01816 v 93.63533 a 26.010735,25.583422 0 0 0 26.03742,25.5703 h 95.1993 v 43.29502 h -95.1993 a 25.997396,25.570302 0 0 0 -25.9974,25.55718 v 69.20644 z"
47
- class="cls-1" />
48
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="#0d52bf" data-name="Layer 1" viewBox="0 0 716.56 292.44">
2
- <path d="M214.181 204.066v40.883H105.328V59.095h42.48v144.97zM294.859 213.088c10.885 0 20.18-4.242 25.49-10.09l31.86 18.324c-13.014 18.051-32.656 27.346-57.916 27.346-45.404 0-73.546-30.535-73.546-70.092s28.756-70.099 70.685-70.099c38.762 0 67.44 30.005 67.44 70.099a77.279 77.279 0 0 1-1.59 15.93h-94.256c5.045 13.802 17.256 18.582 31.833 18.582zm24.422-48.321c-4.243-15.4-16.196-20.975-28.142-20.975-15.134 0-25.224 7.438-28.936 20.975zM476.476 205.126c0 30.528-26.515 43.542-55.222 43.542-26.515 0-46.751-10.09-57.085-31.596l34.519-19.649c3.447 10.09 10.885 15.665 22.566 15.665 9.56 0 14.332-2.917 14.332-8.227 0-14.604-65.312-6.908-65.312-52.836 0-28.943 24.423-43.548 52.04-43.548 21.506 0 40.625 9.56 51.776 28.414L440.1 155.207c-3.72-6.9-9.022-11.68-17.786-11.68-6.901 0-11.165 2.658-11.165 7.43.014 15.136 65.326 5.046 65.326 54.17zM493.725 51.134h39.823v193.815h-39.823zM560.091 112.196h39.83V244.95h-39.83z" class="cls-1"/>
3
- <circle cx="580.006" cy="69.932" r="25.322" class="cls-1"/>
4
- </svg>
@@ -1,61 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg
3
- xmlns:dc="http://purl.org/dc/elements/1.1/"
4
- xmlns:cc="http://creativecommons.org/ns#"
5
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
- xmlns:svg="http://www.w3.org/2000/svg"
7
- xmlns="http://www.w3.org/2000/svg"
8
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
- inkscape:version="1.0 (4035a4f, 2020-05-01)"
11
- height="792.88586"
12
- width="913.88531"
13
- sodipodi:docname="lesli-icon.svg"
14
- version="1.1"
15
- viewBox="0 0 913.88531 792.88586"
16
- data-name="Layer 1"
17
- id="Layer_1">
18
- <metadata
19
- id="metadata21">
20
- <rdf:RDF>
21
- <cc:Work
22
- rdf:about="">
23
- <dc:format>image/svg+xml</dc:format>
24
- <dc:type
25
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
26
- </cc:Work>
27
- </rdf:RDF>
28
- </metadata>
29
- <sodipodi:namedview
30
- inkscape:current-layer="Layer_1"
31
- inkscape:window-maximized="1"
32
- inkscape:window-y="23"
33
- inkscape:window-x="0"
34
- inkscape:cy="396.44301"
35
- inkscape:cx="456.948"
36
- inkscape:zoom="0.85703125"
37
- showgrid="false"
38
- id="namedview19"
39
- inkscape:window-height="940"
40
- inkscape:window-width="1680"
41
- inkscape:pageshadow="2"
42
- inkscape:pageopacity="0"
43
- guidetolerance="10"
44
- gridtolerance="10"
45
- objecttolerance="10"
46
- borderopacity="1"
47
- bordercolor="#666666"
48
- pagecolor="#ffffff" />
49
- <defs
50
- id="defs12">
51
- <style
52
- id="style10">.cls-1{fill:#3b6cff;}</style>
53
- </defs>
54
- <title
55
- id="title14">LESLI_LOGO_EDITABLE</title>
56
- <path
57
- style="stroke-width:1.6285"
58
- id="path16"
59
- d="M 913.8853,396.44306 A 179.92038,169.79974 0 0 0 765.26202,229.31696 179.85333,169.73645 0 0 0 456.44871,63.772899 179.80304,169.68899 0 0 0 147.68569,229.44353 a 179.85333,169.73645 0 0 0 0,333.99906 179.85333,169.73645 0 0 0 308.76302,165.67063 179.80304,169.68899 0 0 0 308.81331,-165.54406 179.92038,169.79974 0 0 0 148.62328,-167.1261 z m -446.00404,135.169 v 29.47331 H 412.56241 V 448.15975 A 32.654887,30.818028 0 0 0 379.84048,417.34173 H 260.18412 V 365.1346 h 119.65636 a 32.67165,30.833847 0 0 0 32.65488,-30.83385 V 221.32768 h 55.31885 v 112.9098 a 32.688413,30.849668 0 0 0 32.72194,30.83384 h 119.6396 v 52.20713 h -119.6396 a 32.67165,30.833847 0 0 0 -32.67165,30.81803 v 83.4523 z"
60
- class="cls-1" />
61
- </svg>
@@ -1 +0,0 @@
1
- import "@hotwired/turbo-rails";
@@ -1,122 +0,0 @@
1
- =begin
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
- =end
32
-
33
- module Lesli
34
- module Items
35
- class ActionsController < ApplicationLesliController
36
- before_action :set_action, only: [:create, :update]
37
-
38
- def create
39
- action = @parent_resource.actions.new({
40
- title: action_params['title'],
41
- done: action_params['done'] || false,
42
- user_id: current_user.id
43
- })
44
-
45
- if action.save
46
- respond_with_lesli(:turbo => [
47
- stream_notification_success("Action created"),
48
- stream_actions_component()
49
- ])
50
- else
51
- respond_with_lesli(
52
- :turbo => stream_notification_danger(action.errors.full_messages)
53
- )
54
- end
55
- end
56
-
57
- def update
58
-
59
- @resource.done = true
60
- @resource.save
61
-
62
- respond_with_lesli(:turbo => [
63
- stream_notification_success("Action updated"),
64
- stream_actions_component()
65
- ])
66
- end
67
-
68
- private
69
-
70
- def stream_actions_component
71
- turbo_stream.update("#{@action_parent_object}-actions") do
72
- LesliView::Items::Actions.new(
73
- @parent_resource,
74
- path_to_create:public_send(@action_path_string, @parent_resource),
75
- path_to_update:->(action) {
76
- public_send(@action_update_path_string, @parent_resource, action)
77
- }
78
- ).render_in(view_context)
79
- end
80
- end
81
-
82
- def set_action
83
-
84
- # Get the item model class, example: LesliSupport::Ticket::Discussion
85
- @action_model = self.class.name.gsub("Controller","").singularize.constantize
86
-
87
- # Get the parent model class, example: LesliSupport::Ticket
88
- @action_model_parent = @action_model.reflect_on_association(:item).klass
89
-
90
- # Get the row owner name, example: from LesliSupport::Ticket gets ticket
91
- @action_parent_object = "#{@action_model_parent.name.demodulize.underscore}"
92
-
93
- # Get the parent associations id, example: ticket_id
94
- @action_model_parent_id = "#{@action_parent_object}_id"
95
-
96
- # Get the local path method, example: ticket_discussions_path
97
- @action_path_string = "#{@action_parent_object}_actions_path"
98
-
99
- # Get the local path method, example: ticket_discussion_path
100
- @action_update_path_string = "#{@action_parent_object}_action_path"
101
-
102
- # Get the parent resource
103
- @parent_resource = @action_model_parent.find_by_id(
104
- params[@action_model_parent_id.to_sym]
105
- )
106
-
107
- @resource = @parent_resource.actions.find(params[:id]) if params[:id]
108
-
109
- end
110
-
111
- def action_params
112
- # Get the params key, example: ticket_action
113
- action_model_param_key = @action_model.model_name.param_key
114
- params.require(action_model_param_key.to_sym).permit(
115
- :title,
116
- :done,
117
- @action_model_parent_id
118
- )
119
- end
120
- end
121
- end
122
- end