lesli_support 0.1.0 → 1.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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/lesli_support/support-logo.svg +1 -9
  3. data/app/assets/javascripts/lesli_support/application.js +1 -4998
  4. data/app/assets/stylesheets/lesli_support/application.css +3 -3
  5. data/app/controllers/lesli_support/catalog/items_controller.rb +60 -0
  6. data/app/controllers/lesli_support/item/discussions_controller.rb +6 -0
  7. data/app/controllers/lesli_support/item/tasks_controller.rb +6 -0
  8. data/app/controllers/lesli_support/ticket/activities_controller.rb +60 -0
  9. data/app/controllers/lesli_support/ticket/discussions_controller.rb +1 -2
  10. data/app/controllers/lesli_support/tickets_controller.rb +37 -56
  11. data/app/helpers/lesli_support/{options_helper.rb → catalog/items_helper.rb} +1 -1
  12. data/app/helpers/lesli_support/ticket/activities_helper.rb +4 -0
  13. data/app/models/lesli_support/account.rb +5 -8
  14. data/app/models/lesli_support/catalog/item.rb +4 -0
  15. data/app/models/lesli_support/catalog.rb +3 -12
  16. data/app/models/lesli_support/dashboard.rb +6 -10
  17. data/app/models/lesli_support/item/activity.rb +4 -0
  18. data/app/models/lesli_support/item/discussion.rb +6 -0
  19. data/app/models/lesli_support/item/task.rb +6 -0
  20. data/app/models/lesli_support/ticket/activity.rb +4 -0
  21. data/app/models/lesli_support/ticket/discussion.rb +3 -4
  22. data/app/models/lesli_support/ticket.rb +66 -7
  23. data/app/services/lesli_support/ticket_service.rb +37 -55
  24. data/app/views/lesli_support/catalog/items/_form.html.erb +17 -0
  25. data/app/views/lesli_support/catalog/items/_item.html.erb +2 -0
  26. data/app/views/lesli_support/catalog/items/edit.html.erb +12 -0
  27. data/app/views/lesli_support/catalog/items/index.html.erb +16 -0
  28. data/app/views/lesli_support/catalog/items/new.html.erb +11 -0
  29. data/app/views/lesli_support/catalog/items/show.html.erb +10 -0
  30. data/app/views/lesli_support/dashboards/_component-latest-tickets.html.erb +34 -0
  31. data/app/views/lesli_support/dashboards/_component-tickets-by-category.html.erb +17 -0
  32. data/app/views/lesli_support/dashboards/_component-tickets-created.html.erb +10 -0
  33. data/app/views/lesli_support/dashboards/_component-tickets-open.html.erb +5 -0
  34. data/app/views/lesli_support/tickets/_form.html.erb +27 -0
  35. data/app/views/lesli_support/tickets/index.html.erb +35 -4
  36. data/app/views/lesli_support/tickets/new.html.erb +31 -14
  37. data/app/views/lesli_support/tickets/show.html.erb +30 -15
  38. data/config/locales/translations.en.yml +1 -42
  39. data/config/locales/translations.es.yml +1 -42
  40. data/config/locales/translations.fr.yml +1 -42
  41. data/config/locales/translations.it.yml +1 -42
  42. data/config/locales/translations.pt.yml +1 -42
  43. data/config/routes.rb +5 -25
  44. data/db/migrate/v1/0702000110_create_lesli_support_accounts.rb +10 -8
  45. data/db/migrate/v1/0702002010_create_lesli_support_catalogs.rb +37 -0
  46. data/db/migrate/v1/0702100110_create_lesli_support_slas.rb +2 -6
  47. data/db/migrate/v1/0702110110_create_lesli_support_tickets.rb +18 -49
  48. data/db/seed/development.rb +43 -22
  49. data/db/seed/production.rb +7 -2
  50. data/db/seed/seeds.json +64 -0
  51. data/db/seed/test.rb +2 -2
  52. data/db/seeds.rb +6 -13
  53. data/db/{migrate/v1/0702000210_create_lesli_support_account_settings.rb → tables/0010009010_create_feedbacks.rb} +21 -11
  54. data/db/{migrate/v1 → tables}/0702010110_create_lesli_support_catalog_workspaces.rb +7 -7
  55. data/db/{migrate/v1 → tables}/0702010210_create_lesli_support_catalog_types.rb +6 -6
  56. data/db/{migrate/v1 → tables}/0702010310_create_lesli_support_catalog_categories.rb +7 -7
  57. data/db/{migrate/v1 → tables}/0702010410_create_lesli_support_catalog_priorities.rb +7 -7
  58. data/lib/lesli_support/version.rb +2 -2
  59. data/readme.md +77 -25
  60. metadata +37 -91
  61. data/app/controllers/lesli_support/catalog_categories_controller.rb +0 -60
  62. data/app/controllers/lesli_support/catalog_priorities_controller.rb +0 -60
  63. data/app/controllers/lesli_support/catalog_types_controller.rb +0 -60
  64. data/app/controllers/lesli_support/catalog_workspaces_controller.rb +0 -60
  65. data/app/controllers/lesli_support/dashboard/components_controller.rb +0 -92
  66. data/app/controllers/lesli_support/options_controller.rb +0 -23
  67. data/app/helpers/lesli_support/catalog_categories_helper.rb +0 -4
  68. data/app/helpers/lesli_support/catalog_priorities_helper.rb +0 -4
  69. data/app/helpers/lesli_support/catalog_types_helper.rb +0 -4
  70. data/app/helpers/lesli_support/catalog_workspaces_helper.rb +0 -4
  71. data/app/models/lesli_support/catalog_category.rb +0 -5
  72. data/app/models/lesli_support/catalog_priority.rb +0 -5
  73. data/app/models/lesli_support/catalog_type.rb +0 -5
  74. data/app/models/lesli_support/catalog_workspace.rb +0 -5
  75. data/app/models/lesli_support/dashboard/component.rb +0 -18
  76. data/app/models/lesli_support/option.rb +0 -4
  77. data/app/views/layouts/lesli_support/application.html.erb +0 -15
  78. data/app/views/lesli_support/catalog_categories/_catalog_category.html.erb +0 -2
  79. data/app/views/lesli_support/catalog_categories/_form.html.erb +0 -17
  80. data/app/views/lesli_support/catalog_categories/edit.html.erb +0 -10
  81. data/app/views/lesli_support/catalog_categories/index.html.erb +0 -14
  82. data/app/views/lesli_support/catalog_categories/new.html.erb +0 -9
  83. data/app/views/lesli_support/catalog_categories/show.html.erb +0 -10
  84. data/app/views/lesli_support/catalog_priorities/_catalog_priority.html.erb +0 -2
  85. data/app/views/lesli_support/catalog_priorities/_form.html.erb +0 -17
  86. data/app/views/lesli_support/catalog_priorities/edit.html.erb +0 -10
  87. data/app/views/lesli_support/catalog_priorities/index.html.erb +0 -14
  88. data/app/views/lesli_support/catalog_priorities/new.html.erb +0 -9
  89. data/app/views/lesli_support/catalog_priorities/show.html.erb +0 -10
  90. data/app/views/lesli_support/catalog_types/_catalog_type.html.erb +0 -2
  91. data/app/views/lesli_support/catalog_types/_form.html.erb +0 -17
  92. data/app/views/lesli_support/catalog_types/edit.html.erb +0 -10
  93. data/app/views/lesli_support/catalog_types/index.html.erb +0 -14
  94. data/app/views/lesli_support/catalog_types/new.html.erb +0 -9
  95. data/app/views/lesli_support/catalog_types/show.html.erb +0 -10
  96. data/app/views/lesli_support/catalog_workspaces/_catalog_workspace.html.erb +0 -2
  97. data/app/views/lesli_support/catalog_workspaces/_form.html.erb +0 -17
  98. data/app/views/lesli_support/catalog_workspaces/edit.html.erb +0 -10
  99. data/app/views/lesli_support/catalog_workspaces/index.html.erb +0 -14
  100. data/app/views/lesli_support/catalog_workspaces/new.html.erb +0 -9
  101. data/app/views/lesli_support/catalog_workspaces/show.html.erb +0 -10
  102. data/app/views/lesli_support/dashboards/edit.html.erb +0 -1
  103. data/app/views/lesli_support/dashboards/index.html.erb +0 -1
  104. data/app/views/lesli_support/dashboards/new.html.erb +0 -1
  105. data/app/views/lesli_support/dashboards/show.html.erb +0 -1
  106. data/app/views/lesli_support/options/_form.html.erb +0 -17
  107. data/app/views/lesli_support/options/_option.html.erb +0 -2
  108. data/app/views/lesli_support/options/edit.html.erb +0 -10
  109. data/app/views/lesli_support/options/index.html.erb +0 -14
  110. data/app/views/lesli_support/options/new.html.erb +0 -9
  111. data/app/views/lesli_support/options/show.html.erb +0 -10
  112. data/app/views/lesli_support/ticket/discussions/_discussion.html.erb +0 -2
  113. data/app/views/lesli_support/ticket/discussions/_form.html.erb +0 -17
  114. data/app/views/lesli_support/ticket/discussions/edit.html.erb +0 -10
  115. data/app/views/lesli_support/ticket/discussions/index.html.erb +0 -14
  116. data/app/views/lesli_support/ticket/discussions/new.html.erb +0 -9
  117. data/app/views/lesli_support/ticket/discussions/show.html.erb +0 -10
  118. data/app/views/lesli_support/tickets/edit.html.erb +0 -20
  119. data/db/migrate/v1/0702050110_create_lesli_support_dashboards.rb +0 -50
  120. data/db/migrate/v1/0702050210_create_lesli_support_dashboard_components.rb +0 -50
  121. data/db/migrate/v1/0702110510_create_lesli_support_ticket_discussions.rb +0 -52
  122. data/lib/scss/application.scss +0 -11
  123. data/lib/vue/application.js +0 -93
  124. data/lib/vue/apps/dashboard/components/engine-version.vue +0 -71
  125. data/lib/vue/apps/dashboard/components/my-tasks.vue +0 -77
  126. data/lib/vue/apps/tickets/components/assignments.vue +0 -93
  127. data/lib/vue/apps/tickets/components/form.vue +0 -305
  128. data/lib/vue/apps/tickets/components/internal-comments.vue +0 -107
  129. data/lib/vue/apps/tickets/components/sla-info.vue +0 -115
  130. data/lib/vue/apps/tickets/index.vue +0 -145
  131. data/lib/vue/apps/tickets/new.vue +0 -78
  132. data/lib/vue/apps/tickets/show.vue +0 -183
  133. data/lib/vue/stores/tickets.js +0 -276
  134. data/lib/vue/stores/translations.json +0 -272
  135. /data/app/views/lesli_support/partials/{_engine-navigation.html.erb → _navigation.html.erb} +0 -0
@@ -1,43 +1,2 @@
1
1
  ---
2
- :pt:
3
- lesli_support:
4
- tickets:
5
- column_started_at: ":lesli_support.tickets.column_started_at:"
6
- column_completed_at: ":lesli_support.tickets.column_completed_at:"
7
- column_tags: ":lesli_support.tickets.column_tags:"
8
- column_reference_url: ":lesli_support.tickets.column_reference_url:"
9
- column_type: ":lesli_support.tickets.column_type:"
10
- column_id: ":lesli_support.tickets.column_id:"
11
- column_subject: ":lesli_support.tickets.column_subject:"
12
- column_workspace: ":lesli_support.tickets.column_workspace:"
13
- column_hours_worked: ":lesli_support.tickets.column_hours_worked:"
14
- column_category: ":lesli_support.tickets.column_category:"
15
- column_priority: ":lesli_support.tickets.column_priority:"
16
- column_creator: ":lesli_support.tickets.column_creator:"
17
- column_status: ":lesli_support.tickets.column_status:"
18
- view_all_tickets: ":lesli_support.tickets.view_all_tickets:"
19
- view_active_tickets: ":lesli_support.tickets.view_active_tickets:"
20
- view_inactive_tickets: ":lesli_support.tickets.view_inactive_tickets:"
21
- tab_information: ":lesli_support.tickets.tab_information:"
22
- column_description: ":lesli_support.tickets.column_description:"
23
- column_deadline: ":lesli_support.tickets.column_deadline:"
24
- view_own_tickets: ":lesli_support.tickets.view_own_tickets:"
25
- lesli:
26
- shared:
27
- view_discussions: ":lesli.shared.view_discussions:"
28
- button_add_new: ":lesli.shared.button_add_new:"
29
- button_reload: ":lesli.shared.button_reload:"
30
- view_files: ":lesli.shared.view_files:"
31
- view_quick_actions: ":lesli.shared.view_quick_actions:"
32
- button_list: ":lesli.shared.button_list:"
33
- button_save: ":lesli.shared.button_save:"
34
- button_delete: ":lesli.shared.button_delete:"
35
- button_edit: ":lesli.shared.button_edit:"
36
- view_status_active: ":lesli.shared.view_status_active:"
37
- view_status_inactive: ":lesli.shared.view_status_inactive:"
38
- button_settings: ":lesli.shared.button_settings:"
39
- button_show: ":lesli.shared.button_show:"
40
- toolbar_search: ":lesli.shared.toolbar_search:"
41
- application:
42
- navigation_logout: ":lesli.application.navigation_logout:"
43
- navigation_my_profile: ":lesli.application.navigation_my_profile:"
2
+ :pt: {}
data/config/routes.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2026, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
20
  Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
22
+ Made with ♥ by LesliTech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
@@ -31,31 +31,11 @@ Building a better future, one line of code at a time.
31
31
  =end
32
32
 
33
33
  LesliSupport::Engine.routes.draw do
34
- namespace :ticket do
35
- resources :discussions
36
- end
37
-
38
- root to: "dashboards#show"
39
- resource :dashboard, only: [:show]
40
- resources :dashboards do
41
- collection do
42
- post "list" => :index
43
- get :options
44
- end
45
- scope module: :dashboard do
46
- resources :components
47
- end
48
- end
49
34
 
50
- resources :options, only: [:index]
51
- resources :catalog_workspaces
35
+ Lesli::Router.mount_lesli_engine_routes(self)
52
36
 
53
37
  resources :tickets, only: [:show, :index, :new, :create, :edit, :update] do
54
- collection do
55
- get :options
56
- end
57
- scope module: :ticket do
58
- resources :discussions, only: [:index, :create]
59
- end
38
+ resources :actions, module: :ticket, only: [:create, :update]
39
+ resources :discussions, module: :ticket, only: [:create]
60
40
  end
61
41
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
20
  Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
22
+ Made with ♥ by LesliTech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
@@ -32,11 +32,13 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  class CreateLesliSupportAccounts < ActiveRecord::Migration[7.0]
34
34
  def change
35
- create_table :lesli_support_accounts do |t|
36
- t.integer :status
37
- t.datetime :deleted_at, index: true
38
- t.timestamps
39
- end
40
- add_reference(:lesli_support_accounts, :account, foreign_key: { to_table: :lesli_accounts })
35
+ create_table_lesli_shared_account_10(:lesli_support)
36
+
37
+ create_table_lesli_item_tasks_10(:lesli_support)
38
+ create_table_lesli_item_activities_10(:lesli_support)
39
+ create_table_lesli_item_discussions_10(:lesli_support)
40
+ # create_table_lesli_item_subscribers_10(:lesli_support_tickets)
41
+ # create_table_lesli_item_attachments_10(:lesli_support_tickets)
42
+ # create_table_lesli_item_versions_10(:lesli_support_tickets)
41
43
  end
42
44
  end
@@ -0,0 +1,37 @@
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
+ class CreateLesliSupportCatalogs < ActiveRecord::Migration[6.1]
34
+ def change
35
+ create_table_lesli_shared_catalogs_10(:lesli_support)
36
+ end
37
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
20
  Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
22
+ Made with ♥ by LesliTech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
@@ -43,12 +43,8 @@ class CreateLesliSupportSlas < ActiveRecord::Migration[6.0]
43
43
  t.text :exceptions
44
44
  t.boolean :default, default: false
45
45
 
46
- # Main user
47
- t.bigint :user_main_id
48
-
49
46
  # acts_as_paranoid
50
47
  t.datetime :deleted_at, index: true
51
-
52
48
  t.timestamps
53
49
  end
54
50
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
20
  Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
22
+ Made with ♥ by LesliTech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
@@ -33,6 +33,7 @@ Building a better future, one line of code at a time.
33
33
  class CreateLesliSupportTickets < ActiveRecord::Migration[6.0]
34
34
  def change
35
35
  create_table :lesli_support_tickets do |t|
36
+ t.string :uid
36
37
  t.string :subject
37
38
  t.text :description
38
39
 
@@ -40,60 +41,28 @@ class CreateLesliSupportTickets < ActiveRecord::Migration[6.0]
40
41
  t.decimal :hours_worked
41
42
  t.string :reference_url
42
43
 
43
- t.datetime :deadline
44
- t.datetime :started_at
45
- t.datetime :completed_at
44
+ t.string :channel
45
+ t.datetime :opened_at, index: true
46
+ t.datetime :solved_at, index: true
47
+ t.datetime :closed_at, index: true
48
+ t.datetime :deadline_at, index: true
49
+ t.datetime :last_response_at, index: true
46
50
 
47
51
  t.datetime :deleted_at, index: true
48
52
  t.timestamps
49
53
  end
50
54
 
51
- add_reference(
52
- :lesli_support_tickets,
53
- :catalog_workspace,
54
- foreign_key: { to_table: :lesli_support_catalog_workspaces },
55
- index: { name: "support_tickets_catalog_workspaces" }
56
- )
55
+ add_index(:lesli_support_tickets, :uid, unique: true)
57
56
 
58
- add_reference(
59
- :lesli_support_tickets,
60
- :catalog_type,
61
- foreign_key: { to_table: :lesli_support_catalog_types},
62
- index: { name: "support_tickets_catalog_types" }
63
- )
57
+ add_reference(:lesli_support_tickets, :sla, foreign_key: { to_table: :lesli_support_slas })
58
+ add_reference(:lesli_support_tickets, :type, foreign_key: { to_table: :lesli_support_catalog_items })
59
+ #add_reference(:lesli_support_tickets, :status, foreign_key: { to_table: :lesli_support_workflow_statuses })
60
+ add_reference(:lesli_support_tickets, :category, foreign_key: { to_table: :lesli_support_catalog_items })
61
+ add_reference(:lesli_support_tickets, :priority, foreign_key: { to_table: :lesli_support_catalog_items })
62
+ add_reference(:lesli_support_tickets, :workspace, foreign_key: { to_table: :lesli_support_catalog_items })
64
63
 
65
- add_reference(
66
- :lesli_support_tickets,
67
- :catalog_category,
68
- foreign_key: { to_table: :lesli_support_catalog_categories },
69
- index: { name: "support_tickets_catalog_categories" }
70
- )
71
-
72
- add_reference(
73
- :lesli_support_tickets,
74
- :catalog_priority,
75
- foreign_key: { to_table: :lesli_support_catalog_priorities },
76
- index: { name: "support_tickets_catalog_priorities" }
77
- )
78
-
79
- =begin
80
- add_reference(
81
- :cloud_lesli_tickets,
82
- :status,
83
- foreign_key: { to_table: :cloud_help_workflow_statuses },
84
- index: { name: "help_tickets_workflow_statuses" }
85
- )
86
- add_reference(
87
- :cloud_lesli_tickets,
88
- :source,
89
- foreign_key: { to_table: :cloud_help_catalog_ticket_sources },
90
- index: { name: "help_tickets_catalog_ticket_sources" }
91
- )
92
- =end
93
-
94
- add_reference(:lesli_support_tickets, :slas, foreign_key: { to_table: :lesli_support_slas })
95
- add_reference(:lesli_support_tickets, :user, foreign_key: { to_table: :lesli_users }) # Assigned user
96
- add_reference(:lesli_support_tickets, :creator, foreign_key: { to_table: :lesli_users }) # Creator user
64
+ add_reference(:lesli_support_tickets, :user, foreign_key: { to_table: :lesli_users })
65
+ add_reference(:lesli_support_tickets, :owner, foreign_key: { to_table: :lesli_users })
97
66
  add_reference(:lesli_support_tickets, :account, foreign_key: { to_table: :lesli_support_accounts })
98
67
  end
99
68
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
20
  Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
22
+ Made with ♥ by LesliTech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
@@ -30,33 +30,54 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
+
34
+ # ·
35
+ require "json"
36
+
37
+ # ·
38
+ file = File.open(LesliSupport::Engine.root.join("db", "seed", "seeds.json")).read
39
+ seeds = JSON.parse(file)
40
+
33
41
  current_user = Lesli::User.first
34
42
 
35
- current_user.account.support.catalog_workspaces.find_or_create_by!(:name => "Default", :default => true)
43
+ catalog_types = current_user.account.support.catalogs.find_or_create_by!(:name => "Ticket Types")
44
+ catalog_types.items.find_or_create_by!(:name => "Development")
45
+ catalog_types.items.find_or_create_by!(:name => "Question")
46
+ catalog_types.items.find_or_create_by!(:name => "Bug")
47
+
48
+
49
+ catalog_categories = current_user.account.support.catalogs.find_or_create_by!(:name => "Ticket Categories")
50
+ catalog_categories.items.find_or_create_by!(:name => "User Management")
51
+ catalog_categories.items.find_or_create_by!(:name => "Role Management")
52
+ catalog_categories.items.find_or_create_by!(:name => "Account Management")
53
+
54
+ catalog_priorities = current_user.account.support.catalogs.find_or_create_by!(:name => "Ticket Priorities")
55
+ catalog_priorities.items.find_or_create_by!(:name => "Low", :order => 1)
56
+ catalog_priorities.items.find_or_create_by!(:name => "Medium", :order => 2)
57
+ catalog_priorities.items.find_or_create_by!(:name => "High", :order => 3)
58
+
36
59
 
37
- current_user.account.support.catalog_types.find_or_create_by!(:name => "development")
38
- current_user.account.support.catalog_types.find_or_create_by!(:name => "question")
39
- current_user.account.support.catalog_types.find_or_create_by!(:name => "bug")
40
60
 
41
- current_user.account.support.catalog_categories.find_or_create_by!(:name => "user_namagement")
42
- current_user.account.support.catalog_categories.find_or_create_by!(:name => "role_namagement")
43
- current_user.account.support.catalog_categories.find_or_create_by!(:name => "account_namagement")
61
+ seeds["tickets"].each_with_index do |ticket, index|
44
62
 
45
- current_user.account.support.catalog_priorities.find_or_create_by!(:name => "low", :weight => 1)
46
- current_user.account.support.catalog_priorities.find_or_create_by!(:name => "medium", :weight => 2)
47
- current_user.account.support.catalog_priorities.find_or_create_by!(:name => "high", :weight => 3)
63
+ # Determine which day this ticket belongs to
64
+ day = ((Math.sqrt(8 * index + 1) - 1) / 2).floor + 1
48
65
 
66
+ # Start from 10 days ago
67
+ ticket_date = day.days.ago
49
68
 
50
- 10.times do |index|
69
+ #
51
70
  current_user.account.support.tickets.create!({
52
- :subject => "Demo ticket ##{index}",
53
- :description => "My printer number #{index} is not working",
54
- :deadline => index.day.from_now,
55
- :user => current_user,
56
- :creator => current_user,
57
- :catalog_workspace => current_user.account.support.catalog_workspaces.first,
58
- :catalog_type => current_user.account.support.catalog_types.first,
59
- :catalog_category => current_user.account.support.catalog_categories.first,
60
- :catalog_priority => current_user.account.support.catalog_priorities.first
71
+ :subject => ticket["subject"],
72
+ :description => ticket["description"],
73
+ :deadline_at => ticket_date,
74
+ :owner => Lesli::User.first.account.users.sample,
75
+ :user => Lesli::User.first.account.users.sample,
76
+
77
+ #:catalog_workspace => current_user.account.support.catalog_workspaces.first,
78
+ :type => catalog_types.items.sample,
79
+ :category => catalog_categories.items.sample,
80
+ :priority => catalog_priorities.items.sample,
81
+ :created_at => ticket_date
61
82
  })
62
83
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
20
  Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
22
+ Made with ♥ by LesliTech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
@@ -29,3 +29,8 @@ Building a better future, one line of code at a time.
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
30
  // ·
31
31
  =end
32
+
33
+
34
+ if Lesli.config.demo
35
+ load LesliSupport::Engine.root.join("db", "seed", "development.rb")
36
+ end
@@ -0,0 +1,64 @@
1
+ {
2
+ "tickets": [{
3
+ "subject": "My printer is not working",
4
+ "description": "I am trying to print a couple of documents, but every time I try, I receive an error message that says 'no magenta.'"
5
+ }, {
6
+ "subject": "Unable to access email",
7
+ "description": "I cannot log into my email account. I keep getting an 'invalid credentials' error even though my password is correct."
8
+ }, {
9
+ "subject": "Wi-Fi connectivity issues",
10
+ "description": "The Wi-Fi in our office keeps disconnecting intermittently. It affects our work as we lose connection to the internet frequently."
11
+ }, {
12
+ "subject": "Software installation request",
13
+ "description": "I need the latest version of Photoshop installed on my computer for a project. Could you please assist with the installation?"
14
+ }, {
15
+ "subject": "Laptop overheating",
16
+ "description": "My laptop has been overheating a lot lately and shutting down unexpectedly. This is affecting my productivity. Please help."
17
+ }, {
18
+ "subject": "Monitor not displaying",
19
+ "description": "My external monitor is not displaying anything. I've checked the connections, but it's still not working."
20
+ }, {
21
+ "subject": "Keyboard not responding",
22
+ "description": "My keyboard has stopped responding. I have tried reconnecting it, but there is no change."
23
+ }, {
24
+ "subject": "VPN connection issues",
25
+ "description": "I am unable to connect to the VPN from home. I receive a 'connection timed out' error every time I try to connect."
26
+ }, {
27
+ "subject": "Mouse malfunctioning",
28
+ "description": "The left button on my mouse is not working. I have tried using a different USB port, but the issue persists."
29
+ }, {
30
+ "subject": "Request for new headset",
31
+ "description": "My current headset is broken and I need a new one for conference calls. Could you please provide a replacement?"
32
+ }, {
33
+ "subject": "Document recovery",
34
+ "description": "I accidentally deleted an important document from my desktop. Is there a way to recover it?"
35
+ }, {
36
+ "subject": "Email spam issue",
37
+ "description": "I am receiving a large number of spam emails in my inbox. Can you help set up filters to reduce this?"
38
+ }, {
39
+ "subject": "Software update required",
40
+ "description": "The accounting software on my system needs an update. Please assist with the update process."
41
+ }, {
42
+ "subject": "Printer jammed",
43
+ "description": "The office printer is jammed and we are unable to print any documents. Please assist in resolving this issue."
44
+ }, {
45
+ "subject": "Slow computer performance",
46
+ "description": "My computer has been running very slowly lately, making it difficult to complete tasks. Can you check it out?"
47
+ }, {
48
+ "subject": "Phone not working",
49
+ "description": "My office phone is not working. It has no dial tone and I am unable to make or receive calls."
50
+ }, {
51
+ "subject": "Network drive not accessible",
52
+ "description": "I cannot access the network drive from my computer. It says 'network path not found.'"
53
+ }, {
54
+ "subject": "Password reset request",
55
+ "description": "I forgot my password and am unable to log into my account. Could you please assist with a password reset?"
56
+ }, {
57
+ "subject": "Scanner not functioning",
58
+ "description": "The scanner connected to my computer is not working. It doesn't recognize any documents I try to scan."
59
+ }, {
60
+ "subject": "Application crashing",
61
+ "description": "The CRM application keeps crashing every time I try to open it. This is disrupting my work. Please help."
62
+ }]
63
+ }
64
+
data/db/seed/test.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
20
  Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
22
+ Made with ♥ by LesliTech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
data/db/seeds.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
20
  Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
22
+ Made with ♥ by LesliTech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
@@ -30,16 +30,9 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
+ L2.msg("LesliSupport", "Version: #{LesliSupport::VERSION}", "Build: #{LesliSupport::BUILD}")
33
34
 
34
- # IMPORTANT:
35
- # Seed files are only for development, if you need to create default resources for production
36
- # you must use the initializer method in the Engine account model
37
- if Rails.env.development?
38
- L2.msg(
39
- "LesliSupport",
40
- "Version: #{LesliSupport::VERSION}",
41
- "Build: #{LesliSupport::BUILD}")
42
-
43
- # · load specific environment seeds
44
- load LesliSupport::Engine.root.join("db", "seed", "#{ Rails.env.downcase }.rb")
35
+ # · load specific environment seeds
36
+ if Rails.env.development? || Lesli.config.demo
37
+ load(LesliSupport::Engine.root.join("db", "seed", "#{ Rails.env.downcase }.rb"))
45
38
  end
@@ -17,7 +17,7 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Ruby on Rails SaaS Development Framework.
20
+ Lesli · Ruby on Rails SaaS development platform.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
@@ -27,20 +27,30 @@ Building a better future, one line of code at a time.
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
30
+ // ·
31
31
  =end
32
32
 
33
- class CreateLesliSupportAccountSettings < ActiveRecord::Migration[6.1]
33
+ class CreateFeedbacks < ActiveRecord::Migration[6.1]
34
34
  def change
35
- create_table :lesli_support_account_settings do |t|
36
- t.string :key
37
- t.string :value
38
-
39
- t.datetime :deleted_at, index: true
35
+ create_table :feedbacks do |t|
36
+ # Contact info
37
+ t.string :email
38
+ t.string :telephone
39
+ t.string :company_name
40
+ t.string :first_name
41
+ t.string :last_name
42
+
43
+ # Relevant data
44
+ t.text :message
45
+ t.boolean :subscribed
46
+ t.string :category # contact_us, feedback, report_error, report_abuse, block_object, etc.
47
+ t.string :status # created, reviewed, solved, closed
48
+ t.string :source # where the issue was reported: web_page, email, call_center, etc.
49
+ t.string :reference # url of the website where the feedback were sent
50
+
51
+ t.datetime :deleted_at, index: true
40
52
  t.timestamps
41
53
  end
42
-
43
- add_reference(:lesli_support_account_settings, :account, foreign_key: { to_table: :lesli_support_accounts })
44
- add_reference(:lesli_support_account_settings, :user, foreign_key: { to_table: :lesli_users })
54
+ add_reference(:feedbacks, :account, foreign_key: { to_table: :accounts })
45
55
  end
46
56
  end
@@ -32,12 +32,12 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  class CreateLesliSupportCatalogWorkspaces < ActiveRecord::Migration[6.0]
34
34
  def change
35
- create_table :lesli_support_catalog_workspaces do |t|
36
- t.string :name
37
- t.boolean :default, default: false
38
- t.datetime :deleted_at, index: true
39
- t.timestamps
40
- end
41
- add_reference(:lesli_support_catalog_workspaces, :account, foreign_key: { to_table: :lesli_support_accounts })
35
+ # create_table :lesli_support_catalog_workspaces do |t|
36
+ # t.string :name
37
+ # t.boolean :default, default: false
38
+ # t.datetime :deleted_at, index: true
39
+ # t.timestamps
40
+ # end
41
+ # add_reference(:lesli_support_catalog_workspaces, :account, foreign_key: { to_table: :lesli_support_accounts })
42
42
  end
43
43
  end
@@ -32,11 +32,11 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  class CreateLesliSupportCatalogTypes < ActiveRecord::Migration[6.0]
34
34
  def change
35
- create_table :lesli_support_catalog_types do |t|
36
- t.string :name
37
- t.datetime :deleted_at, index: true
38
- t.timestamps
39
- end
40
- add_reference(:lesli_support_catalog_types, :account, foreign_key: { to_table: :lesli_support_accounts })
35
+ # create_table :lesli_support_catalog_types do |t|
36
+ # t.string :name
37
+ # t.datetime :deleted_at, index: true
38
+ # t.timestamps
39
+ # end
40
+ # add_reference(:lesli_support_catalog_types, :account, foreign_key: { to_table: :lesli_support_accounts })
41
41
  end
42
42
  end
@@ -32,12 +32,12 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  class CreateLesliSupportCatalogCategories < ActiveRecord::Migration[6.0]
34
34
  def change
35
- create_table :lesli_support_catalog_categories do |t|
36
- t.string :name
37
- t.string :ancestry, index: true
38
- t.datetime :deleted_at, index: true
39
- t.timestamps
40
- end
41
- add_reference(:lesli_support_catalog_categories, :account, foreign_key: { to_table: :lesli_support_accounts })
35
+ # create_table :lesli_support_catalog_categories do |t|
36
+ # t.string :name
37
+ # t.string :ancestry, index: true
38
+ # t.datetime :deleted_at, index: true
39
+ # t.timestamps
40
+ # end
41
+ # add_reference(:lesli_support_catalog_categories, :account, foreign_key: { to_table: :lesli_support_accounts })
42
42
  end
43
43
  end