lesli_bell 0.2.0 → 1.0.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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/lesli_bell/application.js +1 -4337
  3. data/app/assets/stylesheets/lesli_bell/application.css +3 -3
  4. data/app/controllers/lesli_bell/announcements_controller.rb +16 -1
  5. data/app/controllers/lesli_bell/dashboards_controller.rb +26 -49
  6. data/app/controllers/lesli_bell/notifications_controller.rb +7 -12
  7. data/app/models/lesli_bell/announcement/user.rb +6 -0
  8. data/app/models/lesli_bell/announcement.rb +12 -2
  9. data/app/models/lesli_bell/dashboard.rb +38 -2
  10. data/app/models/lesli_bell/notification.rb +15 -16
  11. data/app/services/lesli_bell/announcement_service.rb +84 -0
  12. data/app/services/lesli_bell/notification_service.rb +46 -51
  13. data/app/views/lesli_bell/announcements/index.html.erb +30 -11
  14. data/app/views/lesli_bell/dashboards/edit.html.erb +30 -7
  15. data/app/views/lesli_bell/dashboards/show.html.erb +33 -1
  16. data/app/views/lesli_bell/notifications/index.html.erb +65 -1
  17. data/app/views/lesli_bell/partials/{_engine-navigation.html.erb → _navigation.html.erb} +1 -1
  18. data/config/locales/translations.en.yml +1 -26
  19. data/config/locales/translations.es.yml +1 -26
  20. data/config/locales/translations.fr.yml +1 -26
  21. data/config/locales/translations.it.yml +1 -26
  22. data/config/locales/translations.pt.yml +1 -26
  23. data/config/routes.rb +3 -4
  24. data/db/migrate/v1.0/0308000110_create_lesli_bell_accounts.rb +1 -6
  25. data/db/migrate/v1.0/0308003010_create_lesli_bell_dashboards.rb +37 -0
  26. data/db/migrate/v1.0/0308100110_create_lesli_bell_notifications.rb +0 -2
  27. data/db/migrate/v1.0/0308110110_create_lesli_bell_announcements.rb +2 -2
  28. data/db/migrate/v1.0/0308110310_create_lesli_bell_announcement_users.rb +6 -7
  29. data/db/seed/announcements.rb +47 -0
  30. data/db/seed/notifications.rb +53 -0
  31. data/db/seed/seeds.json +36 -0
  32. data/db/seeds.rb +7 -12
  33. data/lib/lesli_bell/version.rb +2 -2
  34. data/lib/vue/application.js +6 -6
  35. data/lib/vue/apps/announcements/index.vue +49 -28
  36. data/lib/vue/apps/notifications/index.vue +4 -8
  37. data/lib/vue/stores/announcement.js +36 -31
  38. data/lib/vue/stores/translations.json +55 -15
  39. data/readme.md +31 -17
  40. metadata +10 -27
  41. data/app/views/lesli_bell/announcements/_announcement.html.erb +0 -2
  42. data/app/views/lesli_bell/announcements/_form.html.erb +0 -17
  43. data/app/views/lesli_bell/dashboards/_dashboard.html.erb +0 -2
  44. data/app/views/lesli_bell/dashboards/_form.html.erb +0 -17
  45. data/app/views/lesli_bell/dashboards/index.html.erb +0 -14
  46. data/app/views/lesli_bell/dashboards/new.html.erb +0 -9
  47. data/db/seed/development.rb +0 -59
  48. data/db/seed/production.rb +0 -0
  49. data/db/seed/test.rb +0 -0
@@ -1,18 +1,32 @@
1
1
  /*
2
- Copyright (c) 2022, all rights reserved.
2
+ Lesli
3
3
 
4
- All the information provided by this platform is protected by international laws related to
5
- industrial property, intellectual property, copyright and relative international laws.
6
- All intellectual or industrial property rights of the code, texts, trade mark, design,
7
- pictures and any other information belongs to the owner of this platform.
4
+ Copyright (c) 2023, Lesli Technologies, S. A.
8
5
 
9
- Without the written permission of the owner, any replication, modification,
10
- transmission, publication is strictly forbidden.
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.
11
10
 
12
- For more information read the license file including with this software.
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.
13
15
 
14
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
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 LesliTech
22
+ Building a better future, one line of code at a time.
23
+
24
+ @contact hello@lesli.tech
25
+ @website https://www.lesli.tech
26
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
+
28
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // ·
16
30
  */
17
31
 
18
32
 
@@ -20,6 +34,8 @@ For more information read the license file including with this software.
20
34
  import { defineStore } from "pinia"
21
35
  import { useRouter } from 'vue-router'
22
36
 
37
+
38
+ // ·
23
39
  const translations = {
24
40
  core: {
25
41
  shared: I18n.t("core.shared")
@@ -33,6 +49,11 @@ const translations = {
33
49
  export const useBellAnnouncement = defineStore("bell.Announcement", {
34
50
  state: () => {
35
51
  return {
52
+ announcements: {
53
+ pagination: {},
54
+ records: []
55
+ },
56
+
36
57
  router: useRouter(),
37
58
  loading: false,
38
59
  users: [],
@@ -64,31 +85,22 @@ export const useBellAnnouncement = defineStore("bell.Announcement", {
64
85
  },
65
86
  actions: {
66
87
 
67
- /**
68
- * @description This action is used to add pagination to announcement index
69
- * @param {Integer} page the actual page showing in the index
70
- */
71
88
  paginate(page) {
72
- this.pagination.page = page
89
+ this.announcements.pagination.page = page
73
90
  this.fetch()
74
91
  },
75
92
 
76
- /**
77
- * @description This action is used to fetch all the announcements for the current user
78
- */
79
93
  fetch() {
80
94
  this.http.get(
81
95
  this.url.bell("announcements")
82
- .paginate(this.pagination.page)
96
+ .paginate(this.announcements.pagination.page)
83
97
  ).then(result => {
84
- this.pagination = result.pagination
85
- this.records = result.records
98
+ this.announcements = result
99
+ }).catch(error => {
100
+ console.log(error)
86
101
  })
87
102
  },
88
103
 
89
- /**
90
- * @description This action is used to create a new announcement
91
- */
92
104
  post() {
93
105
  this.loading = true
94
106
  this.http.post(this.url.bell("announcements"), {
@@ -110,9 +122,6 @@ export const useBellAnnouncement = defineStore("bell.Announcement", {
110
122
  })
111
123
  },
112
124
 
113
- /**
114
- * @description This action is used to get the list of users
115
- */
116
125
  getUsers() {
117
126
  this.loading = true
118
127
  this.http.get(this.url.admin('users/list')).then(result => {
@@ -124,9 +133,6 @@ export const useBellAnnouncement = defineStore("bell.Announcement", {
124
133
  })
125
134
  },
126
135
 
127
- /**
128
- * @description This action is used to get the list of roles
129
- */
130
136
  getRoles() {
131
137
  this.loading = true
132
138
  this.http.get(this.url.admin('roles/list')).then(result => {
@@ -137,6 +143,5 @@ export const useBellAnnouncement = defineStore("bell.Announcement", {
137
143
  this.loading = false
138
144
  })
139
145
  },
140
-
141
146
  }
142
147
  })
@@ -20,6 +20,8 @@
20
20
  "button_save": "Save",
21
21
  "button_settings": "Settings",
22
22
  "button_show": "Show",
23
+ "message_operation_error": "Operation failed. Please try again.",
24
+ "message_operation_success": "Operation completed successfully",
23
25
  "toolbar_search": "Search...",
24
26
  "view_discussions": "Discussions",
25
27
  "view_files": "Files",
@@ -29,10 +31,16 @@
29
31
  }
30
32
  },
31
33
  "lesli_bell": {
34
+ "announcements": {
35
+ "column_category": "Category",
36
+ "column_end_at": "End At",
37
+ "column_id": "ID",
38
+ "column_name": "Name",
39
+ "column_start_at": "Start At",
40
+ "column_url": "URL",
41
+ "view_title": "Announcements"
42
+ },
32
43
  "notifications": {
33
- "column_body": "Body",
34
- "column_subject": "Subject",
35
- "view_create_notification": "Create notification",
36
44
  "view_title": "Notifications"
37
45
  }
38
46
  }
@@ -58,6 +66,8 @@
58
66
  "button_save": "Guardar",
59
67
  "button_settings": "Configuración",
60
68
  "button_show": "Ver",
69
+ "message_operation_error": "Operación fallida. Por favor, inténtelo de nuevo.",
70
+ "message_operation_success": "Operacion realizada satisfactoriamente",
61
71
  "toolbar_search": "Buscar...",
62
72
  "view_discussions": "Discusiones",
63
73
  "view_files": "Archivos",
@@ -67,10 +77,16 @@
67
77
  }
68
78
  },
69
79
  "lesli_bell": {
80
+ "announcements": {
81
+ "column_category": ":lesli_bell.announcements.column_category:",
82
+ "column_end_at": ":lesli_bell.announcements.column_end_at:",
83
+ "column_id": ":lesli_bell.announcements.column_id:",
84
+ "column_name": ":lesli_bell.announcements.column_name:",
85
+ "column_start_at": ":lesli_bell.announcements.column_start_at:",
86
+ "column_url": ":lesli_bell.announcements.column_url:",
87
+ "view_title": "Anuncios"
88
+ },
70
89
  "notifications": {
71
- "column_body": "Contenido",
72
- "column_subject": "Asunto",
73
- "view_create_notification": "Crear notificación",
74
90
  "view_title": "Notificaciones"
75
91
  }
76
92
  }
@@ -96,6 +112,8 @@
96
112
  "button_save": ":lesli.shared.button_save:",
97
113
  "button_settings": ":lesli.shared.button_settings:",
98
114
  "button_show": ":lesli.shared.button_show:",
115
+ "message_operation_error": ":lesli.shared.message_operation_error:",
116
+ "message_operation_success": ":lesli.shared.message_operation_success:",
99
117
  "toolbar_search": ":lesli.shared.toolbar_search:",
100
118
  "view_discussions": ":lesli.shared.view_discussions:",
101
119
  "view_files": ":lesli.shared.view_files:",
@@ -105,10 +123,16 @@
105
123
  }
106
124
  },
107
125
  "lesli_bell": {
126
+ "announcements": {
127
+ "column_category": ":lesli_bell.announcements.column_category:",
128
+ "column_end_at": ":lesli_bell.announcements.column_end_at:",
129
+ "column_id": ":lesli_bell.announcements.column_id:",
130
+ "column_name": ":lesli_bell.announcements.column_name:",
131
+ "column_start_at": ":lesli_bell.announcements.column_start_at:",
132
+ "column_url": ":lesli_bell.announcements.column_url:",
133
+ "view_title": ":lesli_bell.announcements.view_title:"
134
+ },
108
135
  "notifications": {
109
- "column_body": ":lesli_bell.notifications.column_body:",
110
- "column_subject": ":lesli_bell.notifications.column_subject:",
111
- "view_create_notification": ":lesli_bell.notifications.view_create_notification:",
112
136
  "view_title": ":lesli_bell.notifications.view_title:"
113
137
  }
114
138
  }
@@ -134,6 +158,8 @@
134
158
  "button_save": ":lesli.shared.button_save:",
135
159
  "button_settings": ":lesli.shared.button_settings:",
136
160
  "button_show": ":lesli.shared.button_show:",
161
+ "message_operation_error": ":lesli.shared.message_operation_error:",
162
+ "message_operation_success": ":lesli.shared.message_operation_success:",
137
163
  "toolbar_search": ":lesli.shared.toolbar_search:",
138
164
  "view_discussions": ":lesli.shared.view_discussions:",
139
165
  "view_files": ":lesli.shared.view_files:",
@@ -143,10 +169,16 @@
143
169
  }
144
170
  },
145
171
  "lesli_bell": {
172
+ "announcements": {
173
+ "column_category": ":lesli_bell.announcements.column_category:",
174
+ "column_end_at": ":lesli_bell.announcements.column_end_at:",
175
+ "column_id": ":lesli_bell.announcements.column_id:",
176
+ "column_name": ":lesli_bell.announcements.column_name:",
177
+ "column_start_at": ":lesli_bell.announcements.column_start_at:",
178
+ "column_url": ":lesli_bell.announcements.column_url:",
179
+ "view_title": ":lesli_bell.announcements.view_title:"
180
+ },
146
181
  "notifications": {
147
- "column_body": ":lesli_bell.notifications.column_body:",
148
- "column_subject": ":lesli_bell.notifications.column_subject:",
149
- "view_create_notification": ":lesli_bell.notifications.view_create_notification:",
150
182
  "view_title": ":lesli_bell.notifications.view_title:"
151
183
  }
152
184
  }
@@ -172,6 +204,8 @@
172
204
  "button_save": ":lesli.shared.button_save:",
173
205
  "button_settings": ":lesli.shared.button_settings:",
174
206
  "button_show": ":lesli.shared.button_show:",
207
+ "message_operation_error": ":lesli.shared.message_operation_error:",
208
+ "message_operation_success": ":lesli.shared.message_operation_success:",
175
209
  "toolbar_search": ":lesli.shared.toolbar_search:",
176
210
  "view_discussions": ":lesli.shared.view_discussions:",
177
211
  "view_files": ":lesli.shared.view_files:",
@@ -181,10 +215,16 @@
181
215
  }
182
216
  },
183
217
  "lesli_bell": {
218
+ "announcements": {
219
+ "column_category": ":lesli_bell.announcements.column_category:",
220
+ "column_end_at": ":lesli_bell.announcements.column_end_at:",
221
+ "column_id": ":lesli_bell.announcements.column_id:",
222
+ "column_name": ":lesli_bell.announcements.column_name:",
223
+ "column_start_at": ":lesli_bell.announcements.column_start_at:",
224
+ "column_url": ":lesli_bell.announcements.column_url:",
225
+ "view_title": ":lesli_bell.announcements.view_title:"
226
+ },
184
227
  "notifications": {
185
- "column_body": ":lesli_bell.notifications.column_body:",
186
- "column_subject": ":lesli_bell.notifications.column_subject:",
187
- "view_create_notification": ":lesli_bell.notifications.view_create_notification:",
188
228
  "view_title": ":lesli_bell.notifications.view_title:"
189
229
  }
190
230
  }
data/readme.md CHANGED
@@ -1,30 +1,42 @@
1
- <p align="center">
2
- <img width="90" alt="LesliBell logo" src="./app/assets/images/lesli_bell/bell-logo.svg" />
1
+ <div align="center" class="documentation-header">
2
+ <img width="100" alt="LesliBell logo" src="./app/assets/images/lesli_bell/bell-logo.svg" />
3
3
  <h3 align="center">Notifications & Announcements System for the Lesli Framework.</h3>
4
- </p>
4
+ </div>
5
5
 
6
+
7
+ <br />
6
8
  <hr/>
7
- <p align="center">
8
- <a target="blank" href="https://rubygems.org/gems/lesli_bell">
9
- <img src="https://badge.fury.io/rb/lesli_bell.svg" alt="Gem Version" height="24">
10
- </a>
11
- </p>
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"/>
13
+ </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"/>
16
+ </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"/>
19
+ </a>
20
+ </div>
21
+
12
22
  <hr/>
23
+ <br />
24
+
13
25
 
14
26
  ### Quick start
15
27
 
16
28
  ```shell
17
- # Add LesliBell engine
29
+ # Add LesliBell engine gem
18
30
  bundle add lesli_bell
19
31
  ```
20
32
 
21
33
  ```shell
22
- # Setup database
34
+ # Setup & initialize the database
23
35
  rake lesli:db:setup
24
36
  ```
25
37
 
26
38
  ```ruby
27
- # Load LesliBell
39
+ # Load LesliBell engine
28
40
  Rails.application.routes.draw do
29
41
  mount LesliBell::Engine => "/bell"
30
42
  end
@@ -32,8 +44,11 @@ end
32
44
 
33
45
 
34
46
  ### Documentation
47
+
48
+
49
+
50
+ ### Lesli Documentation
35
51
  * [website](https://www.lesli.dev/)
36
- * [database](./docs/database.md)
37
52
  * [documentation](https://www.lesli.dev/engines/bell/)
38
53
 
39
54
 
@@ -46,7 +61,7 @@ end
46
61
 
47
62
  ### License
48
63
  -------
49
- Copyright (c) 2023, Lesli Technologies, S. A.
64
+ Copyright (c) 2025, Lesli Technologies, S. A.
50
65
 
51
66
  This program is free software: you can redistribute it and/or modify
52
67
  it under the terms of the GNU General Public License as published by
@@ -64,8 +79,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
64
79
  <hr />
65
80
  <br />
66
81
 
67
- <p align="center">
82
+ <div align="center" class="has-text-centered">
68
83
  <img width="200" alt="Lesli logo" src="https://cdn.lesli.tech/lesli/brand/app-logo.svg" />
69
- <h4 align="center">Ruby on Rails SaaS Development Framework.</h4>
70
- </p>
71
-
84
+ <h4 align="center" class="mt-0">Ruby on Rails SaaS Development Framework.</h4>
85
+ </div>
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli_bell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
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: 2024-05-10 00:00:00.000000000 Z
11
+ date: 2025-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rails
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 7.0.6
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 7.0.6
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: lesli
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -65,9 +51,11 @@ files:
65
51
  - app/mailers/lesli_bell/application_mailer.rb
66
52
  - app/models/lesli_bell/account.rb
67
53
  - app/models/lesli_bell/announcement.rb
54
+ - app/models/lesli_bell/announcement/user.rb
68
55
  - app/models/lesli_bell/application_record.rb
69
56
  - app/models/lesli_bell/dashboard.rb
70
57
  - app/models/lesli_bell/notification.rb
58
+ - app/services/lesli_bell/announcement_service.rb
71
59
  - app/services/lesli_bell/notification_service.rb
72
60
  - app/views/lesli_bell/accounts/_account.html.erb
73
61
  - app/views/lesli_bell/accounts/_form.html.erb
@@ -75,23 +63,17 @@ files:
75
63
  - app/views/lesli_bell/accounts/index.html.erb
76
64
  - app/views/lesli_bell/accounts/new.html.erb
77
65
  - app/views/lesli_bell/accounts/show.html.erb
78
- - app/views/lesli_bell/announcements/_announcement.html.erb
79
- - app/views/lesli_bell/announcements/_form.html.erb
80
66
  - app/views/lesli_bell/announcements/edit.html.erb
81
67
  - app/views/lesli_bell/announcements/index.html.erb
82
68
  - app/views/lesli_bell/announcements/new.html.erb
83
69
  - app/views/lesli_bell/announcements/show.html.erb
84
- - app/views/lesli_bell/dashboards/_dashboard.html.erb
85
- - app/views/lesli_bell/dashboards/_form.html.erb
86
70
  - app/views/lesli_bell/dashboards/edit.html.erb
87
- - app/views/lesli_bell/dashboards/index.html.erb
88
- - app/views/lesli_bell/dashboards/new.html.erb
89
71
  - app/views/lesli_bell/dashboards/show.html.erb
90
72
  - app/views/lesli_bell/notifications/edit.html.erb
91
73
  - app/views/lesli_bell/notifications/index.html.erb
92
74
  - app/views/lesli_bell/notifications/new.html.erb
93
75
  - app/views/lesli_bell/notifications/show.html.erb
94
- - app/views/lesli_bell/partials/_engine-navigation.html.erb
76
+ - app/views/lesli_bell/partials/_navigation.html.erb
95
77
  - config/locales/translations.en.yml
96
78
  - config/locales/translations.es.yml
97
79
  - config/locales/translations.fr.yml
@@ -99,13 +81,14 @@ files:
99
81
  - config/locales/translations.pt.yml
100
82
  - config/routes.rb
101
83
  - db/migrate/v1.0/0308000110_create_lesli_bell_accounts.rb
84
+ - db/migrate/v1.0/0308003010_create_lesli_bell_dashboards.rb
102
85
  - db/migrate/v1.0/0308100110_create_lesli_bell_notifications.rb
103
86
  - db/migrate/v1.0/0308110110_create_lesli_bell_announcements.rb
104
87
  - db/migrate/v1.0/0308110210_create_lesli_bell_announcement_activities.rb
105
88
  - db/migrate/v1.0/0308110310_create_lesli_bell_announcement_users.rb
106
- - db/seed/development.rb
107
- - db/seed/production.rb
108
- - db/seed/test.rb
89
+ - db/seed/announcements.rb
90
+ - db/seed/notifications.rb
91
+ - db/seed/seeds.json
109
92
  - db/seeds.rb
110
93
  - lib/lesli_bell.rb
111
94
  - lib/lesli_bell/engine.rb
@@ -146,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
129
  - !ruby/object:Gem::Version
147
130
  version: '0'
148
131
  requirements: []
149
- rubygems_version: 3.3.7
132
+ rubygems_version: 3.4.19
150
133
  signing_key:
151
134
  specification_version: 4
152
135
  summary: Notifications & Announcements System for the Lesli Framework.
@@ -1,2 +0,0 @@
1
- <div id="<%= dom_id announcement %>">
2
- </div>
@@ -1,17 +0,0 @@
1
- <%= form_with(model: announcement) do |form| %>
2
- <% if announcement.errors.any? %>
3
- <div style="color: red">
4
- <h2><%= pluralize(announcement.errors.count, "error") %> prohibited this announcement from being saved:</h2>
5
-
6
- <ul>
7
- <% announcement.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,2 +0,0 @@
1
- <div id="<%= dom_id dashboard %>">
2
- </div>
@@ -1,17 +0,0 @@
1
- <%= form_with(model: dashboard) do |form| %>
2
- <% if dashboard.errors.any? %>
3
- <div style="color: red">
4
- <h2><%= pluralize(dashboard.errors.count, "error") %> prohibited this dashboard from being saved:</h2>
5
-
6
- <ul>
7
- <% dashboard.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,14 +0,0 @@
1
- <p style="color: green"><%= notice %></p>
2
-
3
- <h1>Dashboards</h1>
4
-
5
- <div id="dashboards">
6
- <% @dashboards.each do |dashboard| %>
7
- <%= render dashboard %>
8
- <p>
9
- <%= link_to "Show this dashboard", dashboard %>
10
- </p>
11
- <% end %>
12
- </div>
13
-
14
- <%= link_to "New dashboard", new_dashboard_path %>
@@ -1,9 +0,0 @@
1
- <h1>New dashboard</h1>
2
-
3
- <%= render "form", dashboard: @dashboard %>
4
-
5
- <br>
6
-
7
- <div>
8
- <%= link_to "Back to dashboards", dashboards_path %>
9
- </div>
@@ -1,59 +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 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
-
34
- # ·
35
- ::Lesli::User.all.each do |current_user|
36
- next if current_user.notifications.length > 0
37
- LesliBell::NotificationService.new(current_user).create("New standard notification")
38
- LesliBell::NotificationService.new(current_user).create("New info notification created", category: "info")
39
- LesliBell::NotificationService.new(current_user).create("New success notification created", category: "success")
40
- LesliBell::NotificationService.new(current_user).create("New warning notification created", category: "warning")
41
- LesliBell::NotificationService.new(current_user).create("New danger notification created", category: "danger")
42
- end
43
-
44
- # Courier::Bell::Notification.new(current_user, "New notification created")
45
- # Courier::Bell::Notification.new(current_user, "New info notification created", category: "info")
46
- # Courier::Bell::Notification.new(current_user, "New success notification created", category: "success")
47
- # Courier::Bell::Notification.new(current_user, "New warning notification created", category: "warning")
48
- # Courier::Bell::Notification.new(current_user, "New danger notification created", category: "danger")
49
-
50
- # Courier::Bell::Notification.new(current_user, "New notification created with body", body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
51
- # Courier::Bell::Notification.new(current_user, "New notification info created with body", body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", category: "info")
52
- # Courier::Bell::Notification.new(current_user, "New notification success created with body", body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", category: "success")
53
- # Courier::Bell::Notification.new(current_user, "New notification warning created with body", body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", category: "warning")
54
- # Courier::Bell::Notification.new(current_user, "New notification danger created with body", body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", category: "danger")
55
-
56
- # Courier::Bell::Notification.new(current_user, "New notification created with body and link", body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", url:"/bell")
57
- # Courier::Bell::Notification.new(current_user, "New notification info created with body and link", body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", url:"/bell", category: "info")
58
- # Courier::Bell::Notification.new(current_user, "New notification success created with body and link", body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", url:"/bell", category: "success")
59
- # Courier::Bell::Notification.new(current_user, "New notification warning created with body and link", body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", url:"/bell", category: "warning")
File without changes
data/db/seed/test.rb DELETED
File without changes