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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/lesli_bell/bell-logo.svg +1 -0
  3. data/app/assets/javascripts/lesli_bell/application.js +1 -2835
  4. data/app/assets/javascripts/lesli_bell/application.js.LICENSE.txt +250 -0
  5. data/app/assets/stylesheets/lesli_bell/application.css +4 -15
  6. data/app/controllers/lesli_bell/announcements_controller.rb +16 -1
  7. data/app/controllers/lesli_bell/dashboards_controller.rb +26 -49
  8. data/app/controllers/lesli_bell/notifications_controller.rb +7 -8
  9. data/app/models/lesli_bell/announcement/user.rb +6 -0
  10. data/app/models/lesli_bell/announcement.rb +12 -2
  11. data/app/models/lesli_bell/dashboard.rb +38 -2
  12. data/app/models/lesli_bell/notification.rb +15 -16
  13. data/app/services/lesli_bell/announcement_service.rb +84 -0
  14. data/app/services/lesli_bell/notification_service.rb +46 -51
  15. data/app/views/lesli_bell/announcements/index.html.erb +30 -11
  16. data/app/views/lesli_bell/dashboards/edit.html.erb +30 -7
  17. data/app/views/lesli_bell/dashboards/show.html.erb +33 -1
  18. data/app/views/lesli_bell/notifications/index.html.erb +67 -3
  19. data/app/views/lesli_bell/notifications/new.html.erb +30 -6
  20. data/app/views/lesli_bell/partials/{_engine-navigation.html.erb → _navigation.html.erb} +2 -2
  21. data/config/locales/translations.en.yml +2 -0
  22. data/config/locales/translations.es.yml +2 -0
  23. data/config/locales/translations.fr.yml +2 -0
  24. data/config/locales/translations.it.yml +2 -0
  25. data/config/locales/translations.pt.yml +2 -0
  26. data/config/routes.rb +34 -3
  27. data/db/migrate/v1.0/0308000110_create_lesli_bell_accounts.rb +24 -15
  28. data/db/migrate/v1.0/0308003010_create_lesli_bell_dashboards.rb +37 -0
  29. data/db/migrate/v1.0/0308100110_create_lesli_bell_notifications.rb +24 -13
  30. data/db/migrate/v1.0/0308110110_create_lesli_bell_announcements.rb +26 -12
  31. data/db/migrate/v1.0/0308110310_create_lesli_bell_announcement_users.rb +6 -7
  32. data/db/seed/announcements.rb +47 -0
  33. data/db/seed/notifications.rb +53 -0
  34. data/db/seed/seeds.json +36 -0
  35. data/db/seeds.rb +30 -15
  36. data/lib/lesli_bell/version.rb +2 -2
  37. data/lib/vue/application.js +42 -20
  38. data/lib/vue/apps/announcements/index.vue +49 -28
  39. data/lib/vue/apps/notifications/components/notification-form.vue +45 -23
  40. data/lib/vue/apps/notifications/index.vue +55 -40
  41. data/lib/vue/apps/notifications/new.vue +32 -21
  42. data/lib/vue/stores/announcement.js +36 -31
  43. data/lib/vue/stores/notification.js +56 -23
  44. data/lib/vue/stores/translations.json +232 -0
  45. data/license +674 -0
  46. data/readme.md +75 -18
  47. metadata +38 -18
  48. data/app/views/lesli_bell/announcements/_announcement.html.erb +0 -2
  49. data/app/views/lesli_bell/announcements/_form.html.erb +0 -17
  50. data/app/views/lesli_bell/dashboards/_dashboard.html.erb +0 -2
  51. data/app/views/lesli_bell/dashboards/_form.html.erb +0 -17
  52. data/app/views/lesli_bell/dashboards/index.html.erb +0 -14
  53. data/app/views/lesli_bell/dashboards/new.html.erb +0 -9
  54. data/db/migrate/v1.0/0308100210_create_lesli_bell_notification_activities.rb +0 -17
  55. data/db/seed/development.rb +0 -36
  56. data/db/seed/test.rb +0 -0
  57. /data/{db/seed/production.rb → lib/scss/application.scss} +0 -0
@@ -1,12 +1,11 @@
1
1
  class CreateLesliBellAnnouncementUsers < ActiveRecord::Migration[7.0]
2
2
  def change
3
- # create_table :cloud_bell_announcement_users do |t|
4
- # t.string :status
5
- # t.timestamps
6
- # t.datetime :deleted_at, index: true
7
- # end
3
+ create_table :lesli_bell_announcement_users do |t|
4
+ t.timestamps
5
+ t.datetime :deleted_at, index: true
6
+ end
8
7
 
9
- # add_reference :cloud_bell_announcement_users, :users, foreign_key: true
10
- # add_reference :cloud_bell_announcement_users, :cloud_bell_announcements, foreign_key: true, index: { name: "cloud_bell_announcements_users" }
8
+ add_reference(:lesli_bell_announcement_users, :user, foreign_key: { to_table: :lesli_users })
9
+ add_reference :lesli_bell_announcement_users, :announcement, foreign_key: { to_table: :lesli_bell_announcements }, index: { name: "lesli_bell_announcements_users" }
11
10
  end
12
11
  end
@@ -0,0 +1,47 @@
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
+ file = File.open(LesliBell::Engine.root.join("db", "seed", "seeds.json")).read
35
+ seeds = JSON.parse(file)
36
+
37
+ current_user = Lesli::User.first
38
+
39
+ # ·
40
+ seeds["announcements"].each do |notification|
41
+ LesliBell::AnnouncementService.new(current_user).create({
42
+ name: notification["name"],
43
+ category: notification["category"],
44
+ message: notification["message"],
45
+ url: notification["url"]
46
+ }, send_to_user_ids: ::Lesli::User.all.pluck(:id))
47
+ end
@@ -0,0 +1,53 @@
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
+ file = File.open(LesliBell::Engine.root.join("db", "seed", "seeds.json")).read
35
+ seeds = JSON.parse(file)
36
+
37
+ # ·
38
+ current_user = Lesli::User.first
39
+
40
+ # ·
41
+ LesliBell::NotificationService.new(current_user).create_for_me({
42
+ subject: "Special notification created for me"
43
+ })
44
+
45
+ # ·
46
+ seeds["notifications"].each do |notification|
47
+ LesliBell::NotificationService.new(current_user).create({
48
+ subject: notification["message"],
49
+ category: notification["category"],
50
+ body: notification["body"],
51
+ url: notification["url"]
52
+ }, send_to_user_ids: ::Lesli::User.all.pluck(:id))
53
+ end
@@ -0,0 +1,36 @@
1
+ {
2
+ "notifications": [
3
+ { "message": "Welcome to our platform!", "category": "standard" },
4
+ { "message": "Welcome to our platform!", "category": "standard", "url": "https://example.com/welcome" },
5
+ { "message": "Welcome to our platform!", "category": "standard", "body": "We're excited to have you onboard." },
6
+ { "message": "Welcome to our platform!", "category": "standard", "body": "We're excited to have you onboard.", "url": "https://example.com/welcome" },
7
+
8
+ { "message": "System maintenance scheduled", "category": "info" },
9
+ { "message": "System maintenance scheduled", "category": "info", "url": "https://example.com/maintenance-info" },
10
+ { "message": "System maintenance scheduled", "category": "info", "body": "The system will be down for maintenance on Sunday at 2 AM." },
11
+ { "message": "System maintenance scheduled", "category": "info", "body": "The system will be down for maintenance on Sunday at 2 AM.", "url": "https://example.com/maintenance-info" },
12
+
13
+ { "message": "Your profile has been updated", "category": "success" },
14
+ { "message": "Your profile has been updated", "category": "success", "url": "https://example.com/profile" },
15
+ { "message": "Your profile has been updated", "category": "success", "body": "Your changes have been saved successfully." },
16
+ { "message": "Your profile has been updated", "category": "success", "body": "Your changes have been saved successfully.", "url": "https://example.com/profile" },
17
+
18
+ { "message": "Password expiring soon", "category": "warning" },
19
+ { "message": "Password expiring soon", "category": "warning", "url": "https://example.com/update-password" },
20
+ { "message": "Password expiring soon", "category": "warning", "body": "Your password will expire in 3 days. Please update it to avoid being locked out." },
21
+ { "message": "Password expiring soon", "category": "warning", "body": "Your password will expire in 3 days. Please update it to avoid being locked out.", "url": "https://example.com/update-password" },
22
+
23
+
24
+ { "message": "Unusual login attempt detected", "category": "danger" },
25
+ { "message": "Unusual login attempt detected", "category": "danger", "url": "https://example.com/security-alert" },
26
+ { "message": "Unusual login attempt detected", "category": "danger", "body": "We noticed a login attempt from an unfamiliar location. Please review your account security." },
27
+ { "message": "Unusual login attempt detected", "category": "danger", "body": "We noticed a login attempt from an unfamiliar location. Please review your account security.", "url": "https://example.com/security-alert" }
28
+ ],
29
+ "announcements": [
30
+ { "name": "standard", "message": "Exciting News: Welcome to our platform!", "category": "standard" },
31
+ { "name": "information", "message": "Upcoming Event: System Maintenance Scheduled", "category": "info", "url": "https://example.com/maintenance-info" },
32
+ { "name": "success", "message": "Success Update: Your Profile Has Been Updated!", "category": "success" },
33
+ { "name": "warning", "message": "Friendly Reminder: Password Expiring Soon", "category": "warning", "url": "https://example.com/update-password" },
34
+ { "name": "danger", "message": "Alert: Unusual Login Attempt Detected", "category": "danger" }
35
+ ]
36
+ }
data/db/seeds.rb CHANGED
@@ -1,25 +1,40 @@
1
1
  =begin
2
2
 
3
- Copyright (c) 2022, all rights reserved.
3
+ Lesli
4
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.
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
9
6
 
10
- Without the written permission of the owner, any replication, modification,
11
- transmission, publication is strictly forbidden.
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.
12
11
 
13
- For more information read the license file including with this software.
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.
14
16
 
15
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
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
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
16
30
  // ·
17
31
  =end
18
32
 
19
33
 
20
- # IMPORTANT: Seed files are only for development, if you need to create default resources for production
21
- # you must use the initializer method in the Engine account model
22
- if Rails.env.development?
23
- L2.msg("Loading seeds for CloudBell environment", "Version: #{LesliBell::VERSION}", "Build: #{LesliBell::BUILD}")
24
- load LesliBell::Engine.root.join("db", "seed", "#{ Rails.env.downcase }.rb")
25
- end
34
+ L2.msg("LesliBell", "Version: #{LesliBell::VERSION}", "Build: #{LesliBell::BUILD}")
35
+
36
+ # · load specific environment seeds
37
+ if Rails.env.development? || Lesli.config.demo
38
+ load LesliBell::Engine.root.join("db", "seed", "notifications.rb")
39
+ load LesliBell::Engine.root.join("db", "seed", "announcements.rb")
40
+ end
@@ -1,4 +1,4 @@
1
1
  module LesliBell
2
- VERSION = "0.1.0"
3
- BUILD = ""
2
+ VERSION = "1.0.0"
3
+ BUILD = "1752635550"
4
4
  end
@@ -1,42 +1,61 @@
1
1
  /*
2
2
 
3
- Copyright (c) 2022, all rights reserved.
3
+ Lesli
4
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.
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
9
6
 
10
- Without the written permission of the owner, any replication, modification,
11
- transmission, publication is strictly forbidden.
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.
12
11
 
13
- For more information read the license file including with this software.
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.
14
16
 
15
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
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
17
28
 
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
18
31
  */
19
32
 
20
33
 
21
- // · Import main app
22
- import application from "Lesli/application"
34
+ // · Import Lesli builders
35
+ import application from "Lesli/vue/application"
36
+ import translation from "Lesli/vue/translation"
37
+
38
+
39
+ // · Import engine translations
40
+ import translations from "LesliBell/vue/stores/translations.json"
23
41
 
24
42
 
25
43
  // · Import apps and components
26
44
  // import appDashboard from "Lesli/cloud-objects/dashboards/apps/show.vue"
27
45
 
28
- // import appNotificationsIndex from "./apps/notifications/index.vue"
29
- // import appNotificationsNew from "./apps/notifications/new.vue"
46
+ import appNotificationsIndex from "LesliBell/vue/apps/notifications/index.vue"
47
+ import appNotificationsNew from "LesliBell/vue/apps/notifications/new.vue"
30
48
 
31
- // import appAnnouncementsIndex from "./apps/announcements/index.vue"
49
+ import appAnnouncementsIndex from "LesliBell/vue/apps/announcements/index.vue"
32
50
  // import appAnnouncementsNew from "./apps/announcements/new.vue"
33
51
 
34
52
 
35
- // · Cloud app
36
- application("LesliBell", [/*{
37
- path: "/",
38
- component: appDashboard
39
- }, {
53
+ // · Buil Lesli translations
54
+ translation(translations)
55
+
56
+
57
+ // · Build a new Lesli application
58
+ application("LesliBell", [{
40
59
  path: "/notifications",
41
60
  component: appNotificationsIndex
42
61
  }, {
@@ -45,6 +64,9 @@ application("LesliBell", [/*{
45
64
  }, {
46
65
  path: "/announcements",
47
66
  component: appAnnouncementsIndex
67
+ }/*{
68
+ path: "/",
69
+ component: appDashboard
48
70
  }, {
49
71
  path: "/announcements/new",
50
72
  component: appAnnouncementsNew
@@ -1,19 +1,33 @@
1
1
  <script setup>
2
2
  /*
3
- Copyright (c) 2022, all rights reserved.
3
+ Lesli
4
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.
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
9
6
 
10
- Without the written permission of the owner, any replication, modification,
11
- transmission, publication is strictly forbidden.
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.
12
11
 
13
- For more information read the license file including with this software.
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.
14
16
 
15
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
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
+ // ·
17
31
  */
18
32
 
19
33
 
@@ -21,8 +35,10 @@ For more information read the license file including with this software.
21
35
  import { ref, reactive, onMounted, watch, computed, inject } from "vue"
22
36
  import { useRouter, useRoute } from 'vue-router'
23
37
 
38
+
24
39
  // · import lesli stores
25
- import { useBellAnnouncement } from "LesliBell/stores/announcement"
40
+ import { useBellAnnouncement } from "LesliBell/vue/stores/announcement"
41
+
26
42
 
27
43
  // · initialize/inject plugins
28
44
  const router = useRouter()
@@ -37,26 +53,34 @@ const storeAnnouncement = useBellAnnouncement()
37
53
 
38
54
  // ·
39
55
  const translations = {
56
+ lesli: i18n.t("lesli.shared"),
57
+ announcements: i18n.t("lesli_bell.announcements"),
58
+
59
+
40
60
  core: {
41
61
  shared: I18n.t("core.shared")
42
62
  },
43
63
  bell: {
44
- announcements: I18n.t("bell.announcements")
64
+ announcements: I18n.t("lesli_bell.announcements")
45
65
  }
46
66
  }
47
67
 
68
+ // ·
48
69
  const columns = [{
49
70
  field: "id",
50
- label: translations.bell.announcements.column_id
71
+ label: translations.announcements.column_id
51
72
  }, {
52
73
  field: "name",
53
- label: translations.bell.announcements.column_name
74
+ label: translations.announcements.column_name
75
+ }, {
76
+ field: "category",
77
+ label: translations.announcements.column_category
54
78
  }, {
55
79
  field: "start_at",
56
- label: translations.bell.announcements.column_start_at
80
+ label: translations.announcements.column_start_at
57
81
  }, {
58
82
  field: "end_at",
59
- label: translations.bell.announcements.column_end_at
83
+ label: translations.announcements.column_end_at
60
84
  }]
61
85
 
62
86
  // · initializing
@@ -66,8 +90,8 @@ onMounted(() => {
66
90
 
67
91
  </script>
68
92
  <template>
69
- <section class="application-component">
70
- <lesli-header :title="translations.bell.announcements.view_title_notifications">
93
+ <lesli-application-container>
94
+ <lesli-header :title="translations.announcements.view_title">
71
95
  <lesli-button :to="url.bell('announcements/new')" icon="add">
72
96
  {{ translations.core.shared.view_btn_add }}
73
97
  </lesli-button>
@@ -75,20 +99,18 @@ onMounted(() => {
75
99
 
76
100
  <lesli-table
77
101
  :columns="columns"
78
- :records="storeAnnouncement.records"
79
- :pagination="storeAnnouncement.pagination"
102
+ :records="storeAnnouncement.announcements.records"
103
+ :pagination="storeAnnouncement.announcements.pagination"
80
104
  @paginate="storeAnnouncement.paginate">
81
105
  <template #id="{ value, record }">
82
106
  <span :class="['tag', 'is-medium', 'is-' + record.category]">
83
107
  {{ value }}
84
108
  </span>
85
109
  </template>
86
- <template #subject="{ column, value, record }">
87
- <h4>{{ record.subject }}</h4>
88
- <p>{{ record.body }}</p>
89
- </template>
90
- <template #url="{ value }">
91
- <a :href="value" class="has-text-link hover">{{ value }}</a>
110
+ <template #category="{ value }">
111
+ <p :class="[`has-background-${value}-light`, 'px-2']">
112
+ {{ value }}
113
+ </p>
92
114
  </template>
93
115
  <template #start_at="{ value }">
94
116
  <p>
@@ -119,6 +141,5 @@ onMounted(() => {
119
141
  </p>
120
142
  </template>
121
143
  </lesli-table>
122
-
123
- </section>
144
+ </lesli-application-container>
124
145
  </template>
@@ -1,66 +1,88 @@
1
1
  <script setup>
2
2
  /*
3
- Copyright (c) 2022, all rights reserved.
3
+ Lesli
4
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.
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
9
6
 
10
- Without the written permission of the owner, any replication, modification,
11
- transmission, publication is strictly forbidden.
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.
12
11
 
13
- For more information read the license file including with this software.
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.
14
16
 
15
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
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
+ // ·
17
31
  */
18
32
 
33
+
19
34
  // · import vue tools
20
35
  import { onMounted, inject } from "vue"
21
36
 
37
+
22
38
  // · import store
23
- import { useBellNotification } from "LesliBell/stores/notification"
39
+ import { useBellNotification } from "LesliBell/vue/stores/notification"
40
+
24
41
 
25
42
  // · import vue router composable
26
43
  import { useRouter, useRoute } from "vue-router"
27
44
 
45
+
28
46
  // · implement store
29
47
  const notificationStore = useBellNotification()
30
48
 
49
+
31
50
  // . Defining translations
32
51
  const translations = {
33
- core: {
34
- shared: I18n.t("core.shared")
52
+ lesli: {
53
+ shared: i18n.t("lesli.shared")
35
54
  },
36
55
  bell: {
37
- notifications: I18n.t("bell.notifications")
56
+ notifications: i18n.t("lesli_bell.notifications")
57
+ },
58
+
59
+ core: {
60
+ shared: I18n.t("core.shared")
38
61
  }
39
62
  }
40
63
 
64
+
41
65
  // · initialize/inject plugins
42
66
  const router = useRouter()
43
67
 
68
+
44
69
  // · initializing
45
70
  onMounted(() => {
46
71
  notificationStore.getUsers()
47
72
  notificationStore.getRoles()
48
73
  })
49
74
 
50
- /**
51
- * @description This function is used to create a new notification
52
- */
53
- const onCreate = () => {
75
+
76
+ // ·
77
+ function onCreate() {
54
78
  notificationStore.createNotification().then(() => {
55
79
  router.push(notificationStore.url.bell('notifications').toString())
56
80
  })
57
81
  }
58
82
 
59
83
  </script>
60
-
61
84
  <template>
62
- <lesli-loading v-if="notificationStore.loading"></lesli-loading>
63
- <form @submit.prevent="onCreate" class="card py-4" v-else>
85
+ <lesli-form @submit="onCreate">
64
86
  <div class="columns is-marginless has-border-bottom">
65
87
  <div class="column is-4">
66
88
  <label class="label">
@@ -142,8 +164,8 @@ const onCreate = () => {
142
164
  type="submit"
143
165
  class="button is-fullwidth has-text-centered submit-button is-primary"
144
166
  >
145
- {{ translations.core.shared.view_btn_save }}
167
+ {{ translations.lesli.shared.button_save }}
146
168
  </button>
147
169
  </div>
148
- </form>
170
+ </lesli-form>
149
171
  </template>