lesli_bell 0.1.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.
- checksums.yaml +4 -4
- data/app/assets/images/lesli_bell/bell-logo.svg +1 -0
- data/app/assets/javascripts/lesli_bell/application.js +1 -2835
- data/app/assets/javascripts/lesli_bell/application.js.LICENSE.txt +250 -0
- data/app/assets/stylesheets/lesli_bell/application.css +4 -15
- data/app/controllers/lesli_bell/announcements_controller.rb +16 -1
- data/app/controllers/lesli_bell/dashboards_controller.rb +26 -49
- data/app/controllers/lesli_bell/notifications_controller.rb +7 -8
- data/app/models/lesli_bell/announcement/user.rb +6 -0
- data/app/models/lesli_bell/announcement.rb +12 -2
- data/app/models/lesli_bell/dashboard.rb +38 -2
- data/app/models/lesli_bell/notification.rb +15 -16
- data/app/services/lesli_bell/announcement_service.rb +84 -0
- data/app/services/lesli_bell/notification_service.rb +46 -51
- data/app/views/lesli_bell/announcements/index.html.erb +30 -11
- data/app/views/lesli_bell/dashboards/edit.html.erb +30 -7
- data/app/views/lesli_bell/dashboards/show.html.erb +33 -1
- data/app/views/lesli_bell/notifications/index.html.erb +67 -3
- data/app/views/lesli_bell/notifications/new.html.erb +30 -6
- data/app/views/lesli_bell/partials/{_engine-navigation.html.erb → _navigation.html.erb} +2 -2
- data/config/locales/translations.en.yml +2 -0
- data/config/locales/translations.es.yml +2 -0
- data/config/locales/translations.fr.yml +2 -0
- data/config/locales/translations.it.yml +2 -0
- data/config/locales/translations.pt.yml +2 -0
- data/config/routes.rb +34 -3
- data/db/migrate/v1.0/0308000110_create_lesli_bell_accounts.rb +24 -15
- data/db/migrate/v1.0/0308003010_create_lesli_bell_dashboards.rb +37 -0
- data/db/migrate/v1.0/0308100110_create_lesli_bell_notifications.rb +24 -13
- data/db/migrate/v1.0/0308110110_create_lesli_bell_announcements.rb +26 -12
- data/db/migrate/v1.0/0308110310_create_lesli_bell_announcement_users.rb +6 -7
- data/db/seed/announcements.rb +47 -0
- data/db/seed/notifications.rb +53 -0
- data/db/seed/seeds.json +36 -0
- data/db/seeds.rb +30 -15
- data/lib/lesli_bell/version.rb +2 -2
- data/lib/vue/application.js +42 -20
- data/lib/vue/apps/announcements/index.vue +49 -28
- data/lib/vue/apps/notifications/components/notification-form.vue +45 -23
- data/lib/vue/apps/notifications/index.vue +55 -40
- data/lib/vue/apps/notifications/new.vue +32 -21
- data/lib/vue/stores/announcement.js +36 -31
- data/lib/vue/stores/notification.js +56 -23
- data/lib/vue/stores/translations.json +232 -0
- data/license +674 -0
- data/readme.md +75 -18
- metadata +38 -18
- data/app/views/lesli_bell/announcements/_announcement.html.erb +0 -2
- data/app/views/lesli_bell/announcements/_form.html.erb +0 -17
- data/app/views/lesli_bell/dashboards/_dashboard.html.erb +0 -2
- data/app/views/lesli_bell/dashboards/_form.html.erb +0 -17
- data/app/views/lesli_bell/dashboards/index.html.erb +0 -14
- data/app/views/lesli_bell/dashboards/new.html.erb +0 -9
- data/db/migrate/v1.0/0308100210_create_lesli_bell_notification_activities.rb +0 -17
- data/db/seed/development.rb +0 -36
- data/db/seed/test.rb +0 -0
- /data/{db/seed/production.rb → lib/scss/application.scss} +0 -0
data/readme.md
CHANGED
@@ -1,28 +1,85 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<div align="center" class="documentation-header">
|
2
|
+
<img width="100" alt="LesliBell logo" src="./app/assets/images/lesli_bell/bell-logo.svg" />
|
3
|
+
<h3 align="center">Notifications & Announcements System for the Lesli Framework.</h3>
|
4
|
+
</div>
|
3
5
|
|
4
|
-
## Usage
|
5
|
-
How to use my plugin.
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
<br />
|
8
|
+
<hr/>
|
9
9
|
|
10
|
-
|
11
|
-
|
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
|
+
|
22
|
+
<hr/>
|
23
|
+
<br />
|
24
|
+
|
25
|
+
|
26
|
+
### Quick start
|
27
|
+
|
28
|
+
```shell
|
29
|
+
# Add LesliBell engine gem
|
30
|
+
bundle add lesli_bell
|
12
31
|
```
|
13
32
|
|
14
|
-
|
15
|
-
|
16
|
-
|
33
|
+
```shell
|
34
|
+
# Setup & initialize the database
|
35
|
+
rake lesli:db:setup
|
17
36
|
```
|
18
37
|
|
19
|
-
|
20
|
-
|
21
|
-
|
38
|
+
```ruby
|
39
|
+
# Load LesliBell engine
|
40
|
+
Rails.application.routes.draw do
|
41
|
+
mount LesliBell::Engine => "/bell"
|
42
|
+
end
|
22
43
|
```
|
23
44
|
|
24
|
-
## Contributing
|
25
|
-
Contribution directions go here.
|
26
45
|
|
27
|
-
|
28
|
-
|
46
|
+
### Documentation
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
### Lesli Documentation
|
51
|
+
* [website](https://www.lesli.dev/)
|
52
|
+
* [documentation](https://www.lesli.dev/engines/bell/)
|
53
|
+
|
54
|
+
|
55
|
+
### Get in touch with Lesli
|
56
|
+
|
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)
|
60
|
+
|
61
|
+
|
62
|
+
### License
|
63
|
+
-------
|
64
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
65
|
+
|
66
|
+
This program is free software: you can redistribute it and/or modify
|
67
|
+
it under the terms of the GNU General Public License as published by
|
68
|
+
the Free Software Foundation, either version 3 of the License, or
|
69
|
+
(at your option) any later version.
|
70
|
+
|
71
|
+
This program is distributed in the hope that it will be useful,
|
72
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
73
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
74
|
+
GNU General Public License for more details.
|
75
|
+
|
76
|
+
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/.
|
78
|
+
|
79
|
+
<hr />
|
80
|
+
<br />
|
81
|
+
|
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>
|
85
|
+
</div>
|
metadata
CHANGED
@@ -1,16 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lesli_bell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
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:
|
12
|
-
dependencies:
|
13
|
-
|
11
|
+
date: 2025-07-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: lesli
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5'
|
27
|
+
description: Notifications & Announcements System for the Lesli Framework.
|
14
28
|
email:
|
15
29
|
- hello@lesli.tech
|
16
30
|
executables: []
|
@@ -19,7 +33,9 @@ extra_rdoc_files: []
|
|
19
33
|
files:
|
20
34
|
- Rakefile
|
21
35
|
- app/assets/config/lesli_bell_manifest.js
|
36
|
+
- app/assets/images/lesli_bell/bell-logo.svg
|
22
37
|
- app/assets/javascripts/lesli_bell/application.js
|
38
|
+
- app/assets/javascripts/lesli_bell/application.js.LICENSE.txt
|
23
39
|
- app/assets/stylesheets/lesli_bell/application.css
|
24
40
|
- app/controllers/lesli_bell/accounts_controller.rb
|
25
41
|
- app/controllers/lesli_bell/announcements_controller.rb
|
@@ -35,9 +51,11 @@ files:
|
|
35
51
|
- app/mailers/lesli_bell/application_mailer.rb
|
36
52
|
- app/models/lesli_bell/account.rb
|
37
53
|
- app/models/lesli_bell/announcement.rb
|
54
|
+
- app/models/lesli_bell/announcement/user.rb
|
38
55
|
- app/models/lesli_bell/application_record.rb
|
39
56
|
- app/models/lesli_bell/dashboard.rb
|
40
57
|
- app/models/lesli_bell/notification.rb
|
58
|
+
- app/services/lesli_bell/announcement_service.rb
|
41
59
|
- app/services/lesli_bell/notification_service.rb
|
42
60
|
- app/views/lesli_bell/accounts/_account.html.erb
|
43
61
|
- app/views/lesli_bell/accounts/_form.html.erb
|
@@ -45,37 +63,37 @@ files:
|
|
45
63
|
- app/views/lesli_bell/accounts/index.html.erb
|
46
64
|
- app/views/lesli_bell/accounts/new.html.erb
|
47
65
|
- app/views/lesli_bell/accounts/show.html.erb
|
48
|
-
- app/views/lesli_bell/announcements/_announcement.html.erb
|
49
|
-
- app/views/lesli_bell/announcements/_form.html.erb
|
50
66
|
- app/views/lesli_bell/announcements/edit.html.erb
|
51
67
|
- app/views/lesli_bell/announcements/index.html.erb
|
52
68
|
- app/views/lesli_bell/announcements/new.html.erb
|
53
69
|
- app/views/lesli_bell/announcements/show.html.erb
|
54
|
-
- app/views/lesli_bell/dashboards/_dashboard.html.erb
|
55
|
-
- app/views/lesli_bell/dashboards/_form.html.erb
|
56
70
|
- app/views/lesli_bell/dashboards/edit.html.erb
|
57
|
-
- app/views/lesli_bell/dashboards/index.html.erb
|
58
|
-
- app/views/lesli_bell/dashboards/new.html.erb
|
59
71
|
- app/views/lesli_bell/dashboards/show.html.erb
|
60
72
|
- app/views/lesli_bell/notifications/edit.html.erb
|
61
73
|
- app/views/lesli_bell/notifications/index.html.erb
|
62
74
|
- app/views/lesli_bell/notifications/new.html.erb
|
63
75
|
- app/views/lesli_bell/notifications/show.html.erb
|
64
|
-
- app/views/lesli_bell/partials/
|
76
|
+
- app/views/lesli_bell/partials/_navigation.html.erb
|
77
|
+
- config/locales/translations.en.yml
|
78
|
+
- config/locales/translations.es.yml
|
79
|
+
- config/locales/translations.fr.yml
|
80
|
+
- config/locales/translations.it.yml
|
81
|
+
- config/locales/translations.pt.yml
|
65
82
|
- config/routes.rb
|
66
83
|
- db/migrate/v1.0/0308000110_create_lesli_bell_accounts.rb
|
84
|
+
- db/migrate/v1.0/0308003010_create_lesli_bell_dashboards.rb
|
67
85
|
- db/migrate/v1.0/0308100110_create_lesli_bell_notifications.rb
|
68
|
-
- db/migrate/v1.0/0308100210_create_lesli_bell_notification_activities.rb
|
69
86
|
- db/migrate/v1.0/0308110110_create_lesli_bell_announcements.rb
|
70
87
|
- db/migrate/v1.0/0308110210_create_lesli_bell_announcement_activities.rb
|
71
88
|
- db/migrate/v1.0/0308110310_create_lesli_bell_announcement_users.rb
|
72
|
-
- db/seed/
|
73
|
-
- db/seed/
|
74
|
-
- db/seed/
|
89
|
+
- db/seed/announcements.rb
|
90
|
+
- db/seed/notifications.rb
|
91
|
+
- db/seed/seeds.json
|
75
92
|
- db/seeds.rb
|
76
93
|
- lib/lesli_bell.rb
|
77
94
|
- lib/lesli_bell/engine.rb
|
78
95
|
- lib/lesli_bell/version.rb
|
96
|
+
- lib/scss/application.scss
|
79
97
|
- lib/tasks/lesli_bell_tasks.rake
|
80
98
|
- lib/vue/application.js
|
81
99
|
- lib/vue/apps/announcements/components/form.vue
|
@@ -86,6 +104,8 @@ files:
|
|
86
104
|
- lib/vue/apps/notifications/new.vue
|
87
105
|
- lib/vue/stores/announcement.js
|
88
106
|
- lib/vue/stores/notification.js
|
107
|
+
- lib/vue/stores/translations.json
|
108
|
+
- license
|
89
109
|
- readme.md
|
90
110
|
homepage: https://www.lesli.dev/
|
91
111
|
licenses:
|
@@ -102,15 +122,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
122
|
requirements:
|
103
123
|
- - ">="
|
104
124
|
- !ruby/object:Gem::Version
|
105
|
-
version: '
|
125
|
+
version: '2.7'
|
106
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
127
|
requirements:
|
108
128
|
- - ">="
|
109
129
|
- !ruby/object:Gem::Version
|
110
130
|
version: '0'
|
111
131
|
requirements: []
|
112
|
-
rubygems_version: 3.
|
132
|
+
rubygems_version: 3.4.19
|
113
133
|
signing_key:
|
114
134
|
specification_version: 4
|
115
|
-
summary:
|
135
|
+
summary: Notifications & Announcements System for the Lesli Framework.
|
116
136
|
test_files: []
|
@@ -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,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,17 +0,0 @@
|
|
1
|
-
class CreateLesliBellNotificationActivities < ActiveRecord::Migration[7.0]
|
2
|
-
#def change
|
3
|
-
# table_base_structure = JSON.parse(File.read(Rails.root.join('db','structure','00000004_activities.json')))
|
4
|
-
# create_table :cloud_bell_notification_activities do |t|
|
5
|
-
# table_base_structure.each do |column|
|
6
|
-
# t.send(
|
7
|
-
# column["type"].parameterize.underscore.to_sym,
|
8
|
-
# column["name"].parameterize.underscore.to_sym
|
9
|
-
# )
|
10
|
-
# end
|
11
|
-
# t.timestamps
|
12
|
-
# end
|
13
|
-
|
14
|
-
# add_reference :cloud_bell_notification_activities, :cloud_bell_notifications, foreign_key: true, index: { name: "cloud_bell_activities_notifications" }
|
15
|
-
# add_foreign_key :cloud_bell_notification_activities, :users, column: :users_id
|
16
|
-
#end
|
17
|
-
end
|
data/db/seed/development.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
|
3
|
-
Copyright (c) 2022, all rights reserved.
|
4
|
-
|
5
|
-
All the information provided by this platform is protected by international laws related to
|
6
|
-
industrial property, intellectual property, copyright and relative international laws.
|
7
|
-
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
8
|
-
pictures and any other information belongs to the owner of this platform.
|
9
|
-
|
10
|
-
Without the written permission of the owner, any replication, modification,
|
11
|
-
transmission, publication is strictly forbidden.
|
12
|
-
|
13
|
-
For more information read the license file including with this software.
|
14
|
-
|
15
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
16
|
-
// ·
|
17
|
-
=end
|
18
|
-
|
19
|
-
current_user = ::Lesli::User.first
|
20
|
-
LesliBell::NotificationService.new(current_user).create("New notification created")
|
21
|
-
# Courier::Bell::Notification.new(current_user, "New notification created")
|
22
|
-
# Courier::Bell::Notification.new(current_user, "New info notification created", category: "info")
|
23
|
-
# Courier::Bell::Notification.new(current_user, "New success notification created", category: "success")
|
24
|
-
# Courier::Bell::Notification.new(current_user, "New warning notification created", category: "warning")
|
25
|
-
# Courier::Bell::Notification.new(current_user, "New danger notification created", category: "danger")
|
26
|
-
|
27
|
-
# 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.")
|
28
|
-
# 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")
|
29
|
-
# 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")
|
30
|
-
# 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")
|
31
|
-
# 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")
|
32
|
-
|
33
|
-
# 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")
|
34
|
-
# 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")
|
35
|
-
# 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")
|
36
|
-
# 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")
|
data/db/seed/test.rb
DELETED
File without changes
|
File without changes
|