lesli_dashboard 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/lesli_dashboard/application.js +4483 -1
- data/app/assets/stylesheets/lesli_dashboard/application.css +3 -0
- data/app/controllers/lesli_dashboard/dashboard/components_controller.rb +60 -0
- data/app/controllers/lesli_dashboard/dashboards_controller.rb +36 -0
- data/app/models/lesli_dashboard/account.rb +44 -0
- data/app/models/lesli_dashboard/dashboard/component.rb +50 -0
- data/app/models/lesli_dashboard/dashboard.rb +58 -0
- data/app/views/lesli_dashboard/dashboards/edit.html.erb +32 -0
- data/app/views/lesli_dashboard/dashboards/index.html.erb +32 -0
- data/app/views/lesli_dashboard/dashboards/new.html.erb +32 -0
- data/app/views/lesli_dashboard/dashboards/show.html.erb +32 -0
- data/config/locales/translations.en.yml +1 -0
- data/config/locales/translations.es.yml +1 -0
- data/config/locales/translations.fr.yml +21 -0
- data/config/locales/translations.it.yml +21 -0
- data/config/locales/translations.pt.yml +21 -0
- data/config/routes.rb +13 -1
- data/db/migrate/0306000110_create_lesli_dashboard_accounts.rb +42 -0
- data/db/migrate/0306050110_create_lesli_dashboard_dashboards.rb +51 -0
- data/db/migrate/0306050210_create_lesli_dashboard_dashboard_components.rb +53 -0
- data/lib/lesli_dashboard/engine.rb +6 -0
- data/lib/lesli_dashboard/version.rb +2 -2
- data/lib/vue/application.js +25 -0
- data/lib/vue/apps/assistant/show.vue +8 -5
- data/lib/vue/stores/translations.json +104 -0
- metadata +18 -11
- data/app/controllers/lesli_dashboard/assistants_controller.rb +0 -60
- data/app/helpers/lesli_dashboard/assistants_helper.rb +0 -4
- data/app/models/lesli_dashboard/assistant.rb +0 -4
- data/app/views/lesli_dashboard/assistants/edit.html.erb +0 -10
- data/app/views/lesli_dashboard/assistants/index.html.erb +0 -14
- data/app/views/lesli_dashboard/assistants/new.html.erb +0 -9
- data/app/views/lesli_dashboard/assistants/show.html.erb +0 -1
- data/db/migrate/20240303035734_create_lesli_dashboard_assistants.rb +0 -8
- /data/app/assets/images/lesli_dashboard/{engine-dashboard.svg → dashboard-logo.svg} +0 -0
@@ -1 +1,4 @@
|
|
1
|
+
/*!*************************************************************************************************************************************************************!*\
|
2
|
+
!*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-27.use[1]!./node_modules/sass-loader/dist/cjs.js!../LesliDashboard/lib/scss/application.scss ***!
|
3
|
+
\*************************************************************************************************************************************************************/
|
1
4
|
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module LesliDashboard
|
2
|
+
class Dashboard::ComponentsController < ApplicationController
|
3
|
+
before_action :set_dashboard_component, only: %i[ show edit update destroy ]
|
4
|
+
|
5
|
+
# GET /dashboard/components
|
6
|
+
def index
|
7
|
+
@dashboard_components = Dashboard::Component.all
|
8
|
+
end
|
9
|
+
|
10
|
+
# GET /dashboard/components/1
|
11
|
+
def show
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /dashboard/components/new
|
15
|
+
def new
|
16
|
+
@dashboard_component = Dashboard::Component.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# GET /dashboard/components/1/edit
|
20
|
+
def edit
|
21
|
+
end
|
22
|
+
|
23
|
+
# POST /dashboard/components
|
24
|
+
def create
|
25
|
+
@dashboard_component = Dashboard::Component.new(dashboard_component_params)
|
26
|
+
|
27
|
+
if @dashboard_component.save
|
28
|
+
redirect_to @dashboard_component, notice: "Component was successfully created."
|
29
|
+
else
|
30
|
+
render :new, status: :unprocessable_entity
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# PATCH/PUT /dashboard/components/1
|
35
|
+
def update
|
36
|
+
if @dashboard_component.update(dashboard_component_params)
|
37
|
+
redirect_to @dashboard_component, notice: "Component was successfully updated.", status: :see_other
|
38
|
+
else
|
39
|
+
render :edit, status: :unprocessable_entity
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# DELETE /dashboard/components/1
|
44
|
+
def destroy
|
45
|
+
@dashboard_component.destroy
|
46
|
+
redirect_to dashboard_components_url, notice: "Component was successfully destroyed.", status: :see_other
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
# Use callbacks to share common setup or constraints between actions.
|
51
|
+
def set_dashboard_component
|
52
|
+
@dashboard_component = Dashboard::Component.find(params[:id])
|
53
|
+
end
|
54
|
+
|
55
|
+
# Only allow a list of trusted parameters through.
|
56
|
+
def dashboard_component_params
|
57
|
+
params.fetch(:dashboard_component, {})
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,36 @@
|
|
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 https://www.lesli.tech
|
23
|
+
Building a better future, one line of code at a time.
|
24
|
+
|
25
|
+
@contact hello@lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
|
+
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
31
|
+
=end
|
32
|
+
|
33
|
+
module LesliDashboard
|
34
|
+
class DashboardsController < Lesli::Shared::DashboardsController
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,44 @@
|
|
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 https://www.lesli.tech
|
23
|
+
Building a better future, one line of code at a time.
|
24
|
+
|
25
|
+
@contact hello@lesli.tech
|
26
|
+
@website https://www.lesli.dev
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
|
+
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
31
|
+
=end
|
32
|
+
|
33
|
+
module LesliDashboard
|
34
|
+
class Account < ApplicationRecord
|
35
|
+
belongs_to :account, class_name: "Lesli::Account"
|
36
|
+
has_many :users, class_name: "Lesli::User"
|
37
|
+
|
38
|
+
after_create :initialize_account
|
39
|
+
|
40
|
+
def initialize_account
|
41
|
+
Dashboard.initialize_account(self)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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 https://www.lesli.tech
|
23
|
+
Building a better future, one line of code at a time.
|
24
|
+
|
25
|
+
@contact hello@lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
|
+
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
31
|
+
=end
|
32
|
+
|
33
|
+
module LesliDashboard
|
34
|
+
class Dashboard::Component < ApplicationRecord
|
35
|
+
|
36
|
+
belongs_to :dashboard, inverse_of: :components
|
37
|
+
|
38
|
+
def self.component_ids
|
39
|
+
["version"]
|
40
|
+
end
|
41
|
+
# components_ids: {
|
42
|
+
# list_new_tickets: "list_new_tickets",
|
43
|
+
# list_my_tickets: "list_my_tickets",
|
44
|
+
# list_unassigned_tickets: "list_unassigned_tickets",
|
45
|
+
# chart_tickets_by_type: "chart_tickets_by_type",
|
46
|
+
# chart_tickets_by_category: "chart_tickets_by_category",
|
47
|
+
# hours_worked: "hours_worked"
|
48
|
+
# }
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,58 @@
|
|
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 https://www.lesli.tech
|
23
|
+
Building a better future, one line of code at a time.
|
24
|
+
|
25
|
+
@contact hello@lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
|
+
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
31
|
+
=end
|
32
|
+
|
33
|
+
module LesliDashboard
|
34
|
+
class Dashboard < Lesli::Shared::Dashboard
|
35
|
+
self.table_name = "lesli_dashboard_dashboards"
|
36
|
+
belongs_to :account
|
37
|
+
|
38
|
+
has_many :components, inverse_of: :dashboard, autosave: true, dependent: :destroy
|
39
|
+
accepts_nested_attributes_for :components, allow_destroy: true
|
40
|
+
|
41
|
+
def self.initialize_account(account)
|
42
|
+
self.create_with(
|
43
|
+
default: true,
|
44
|
+
main: false,
|
45
|
+
components_attributes: [{
|
46
|
+
name: "Lesli version",
|
47
|
+
component_id: "admin-lesli-version",
|
48
|
+
layout: 3,
|
49
|
+
query_configuration: {},
|
50
|
+
custom_configuration: {}
|
51
|
+
}]
|
52
|
+
).find_or_create_by!(
|
53
|
+
account: account,
|
54
|
+
name: "Admin Default Dashboard"
|
55
|
+
)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<%#
|
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 https://www.lesli.tech
|
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
|
+
%>
|
32
|
+
<router-view></router-view>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<%#
|
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 https://www.lesli.tech
|
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
|
+
%>
|
32
|
+
<router-view></router-view>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<%#
|
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 https://www.lesli.tech
|
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
|
+
%>
|
32
|
+
<router-view></router-view>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<%#
|
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 https://www.lesli.tech
|
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
|
+
%>
|
32
|
+
<router-view></router-view>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
:fr:
|
3
|
+
lesli:
|
4
|
+
shared:
|
5
|
+
view_discussions: ":lesli.shared.view_discussions:"
|
6
|
+
button_add_new: ":lesli.shared.button_add_new:"
|
7
|
+
button_reload: ":lesli.shared.button_reload:"
|
8
|
+
view_files: ":lesli.shared.view_files:"
|
9
|
+
view_quick_actions: ":lesli.shared.view_quick_actions:"
|
10
|
+
button_list: ":lesli.shared.button_list:"
|
11
|
+
button_save: ":lesli.shared.button_save:"
|
12
|
+
button_delete: ":lesli.shared.button_delete:"
|
13
|
+
button_edit: ":lesli.shared.button_edit:"
|
14
|
+
view_status_active: ":lesli.shared.view_status_active:"
|
15
|
+
view_status_inactive: ":lesli.shared.view_status_inactive:"
|
16
|
+
button_settings: ":lesli.shared.button_settings:"
|
17
|
+
button_show: ":lesli.shared.button_show:"
|
18
|
+
toolbar_search: ":lesli.shared.toolbar_search:"
|
19
|
+
application:
|
20
|
+
navigation_logout: ":lesli.application.navigation_logout:"
|
21
|
+
navigation_my_profile: ":lesli.application.navigation_my_profile:"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
:it:
|
3
|
+
lesli:
|
4
|
+
shared:
|
5
|
+
view_discussions: ":lesli.shared.view_discussions:"
|
6
|
+
button_add_new: ":lesli.shared.button_add_new:"
|
7
|
+
button_reload: ":lesli.shared.button_reload:"
|
8
|
+
view_files: ":lesli.shared.view_files:"
|
9
|
+
view_quick_actions: ":lesli.shared.view_quick_actions:"
|
10
|
+
button_list: ":lesli.shared.button_list:"
|
11
|
+
button_save: ":lesli.shared.button_save:"
|
12
|
+
button_delete: ":lesli.shared.button_delete:"
|
13
|
+
button_edit: ":lesli.shared.button_edit:"
|
14
|
+
view_status_active: ":lesli.shared.view_status_active:"
|
15
|
+
view_status_inactive: ":lesli.shared.view_status_inactive:"
|
16
|
+
button_settings: ":lesli.shared.button_settings:"
|
17
|
+
button_show: ":lesli.shared.button_show:"
|
18
|
+
toolbar_search: ":lesli.shared.toolbar_search:"
|
19
|
+
application:
|
20
|
+
navigation_logout: ":lesli.application.navigation_logout:"
|
21
|
+
navigation_my_profile: ":lesli.application.navigation_my_profile:"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
:pt:
|
3
|
+
lesli:
|
4
|
+
shared:
|
5
|
+
view_discussions: ":lesli.shared.view_discussions:"
|
6
|
+
button_add_new: ":lesli.shared.button_add_new:"
|
7
|
+
button_reload: ":lesli.shared.button_reload:"
|
8
|
+
view_files: ":lesli.shared.view_files:"
|
9
|
+
view_quick_actions: ":lesli.shared.view_quick_actions:"
|
10
|
+
button_list: ":lesli.shared.button_list:"
|
11
|
+
button_save: ":lesli.shared.button_save:"
|
12
|
+
button_delete: ":lesli.shared.button_delete:"
|
13
|
+
button_edit: ":lesli.shared.button_edit:"
|
14
|
+
view_status_active: ":lesli.shared.view_status_active:"
|
15
|
+
view_status_inactive: ":lesli.shared.view_status_inactive:"
|
16
|
+
button_settings: ":lesli.shared.button_settings:"
|
17
|
+
button_show: ":lesli.shared.button_show:"
|
18
|
+
toolbar_search: ":lesli.shared.toolbar_search:"
|
19
|
+
application:
|
20
|
+
navigation_logout: ":lesli.application.navigation_logout:"
|
21
|
+
navigation_my_profile: ":lesli.application.navigation_my_profile:"
|
data/config/routes.rb
CHANGED
@@ -31,5 +31,17 @@ Building a better future, one line of code at a time.
|
|
31
31
|
=end
|
32
32
|
|
33
33
|
LesliDashboard::Engine.routes.draw do
|
34
|
-
root to: "
|
34
|
+
root to: "dashboards#show"
|
35
|
+
|
36
|
+
# Dashboard management
|
37
|
+
resource :dashboard, only: [:show]
|
38
|
+
resources :dashboards do
|
39
|
+
collection do
|
40
|
+
post "list" => :index
|
41
|
+
get :options
|
42
|
+
end
|
43
|
+
scope module: :dashboard do
|
44
|
+
resources :components
|
45
|
+
end
|
46
|
+
end
|
35
47
|
end
|
@@ -0,0 +1,42 @@
|
|
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 https://www.lesli.tech
|
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 CreateLesliDashboardAccounts < ActiveRecord::Migration[6.0]
|
34
|
+
def change
|
35
|
+
create_table :lesli_dashboard_accounts do |t|
|
36
|
+
t.integer :status
|
37
|
+
t.datetime :deleted_at, index: true
|
38
|
+
t.timestamps
|
39
|
+
end
|
40
|
+
add_reference(:lesli_dashboard_accounts, :account, foreign_key: { to_table: :lesli_accounts })
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,51 @@
|
|
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 https://www.lesli.tech
|
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 CreateLesliDashboardDashboards < ActiveRecord::Migration[6.1]
|
34
|
+
def change
|
35
|
+
gem_path = Lesli::System.engine("Lesli", "dir")
|
36
|
+
table_base_structure = JSON.parse(File.read(File.join(gem_path, "db", "structure", "00000501_dashboards.json")))
|
37
|
+
create_table :lesli_dashboard_dashboards do |t|
|
38
|
+
table_base_structure.each do |column|
|
39
|
+
t.send(
|
40
|
+
column["type"].parameterize.underscore.to_sym,
|
41
|
+
column["name"].parameterize.underscore.to_sym
|
42
|
+
)
|
43
|
+
end
|
44
|
+
t.timestamps
|
45
|
+
end
|
46
|
+
|
47
|
+
add_reference(:lesli_dashboard_dashboards, :account, foreign_key: { to_table: :lesli_dashboard_accounts })
|
48
|
+
add_reference(:lesli_dashboard_dashboards, :user, foreign_key: { to_table: :lesli_users })
|
49
|
+
#add_reference(:lesli_admin_dashboards, :role, foreign_key: { to_table: :roles })
|
50
|
+
end
|
51
|
+
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 https://www.lesli.tech
|
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 CreateLesliDashboardDashboardComponents < ActiveRecord::Migration[6.1]
|
34
|
+
def change
|
35
|
+
gem_path = Lesli::System.engine("Lesli", "dir")
|
36
|
+
table_base_structure = JSON.parse(File.read(File.join(gem_path, "db", "structure", "00000502_dashboard_components.json")))
|
37
|
+
create_table :lesli_dashboard_dashboard_components do |t|
|
38
|
+
table_base_structure.each do |column|
|
39
|
+
t.send(
|
40
|
+
column["type"].parameterize.underscore.to_sym,
|
41
|
+
column["name"].parameterize.underscore.to_sym
|
42
|
+
)
|
43
|
+
end
|
44
|
+
t.timestamps
|
45
|
+
end
|
46
|
+
|
47
|
+
add_reference(
|
48
|
+
:lesli_dashboard_dashboard_components, :dashboard,
|
49
|
+
foreign_key: { to_table: :lesli_dashboard_dashboards },
|
50
|
+
index: { name: "lesli_dashboard_dashboard_components_dashboards" }
|
51
|
+
)
|
52
|
+
end
|
53
|
+
end
|
@@ -39,6 +39,12 @@ module LesliDashboard
|
|
39
39
|
# register assets manifest
|
40
40
|
config.assets.precompile += %w[lesli_dashboard_manifest.js]
|
41
41
|
|
42
|
+
# register engine migrations path
|
43
|
+
unless app.root.to_s.match root.to_s
|
44
|
+
config.paths["db/migrate"].expanded.each do |expanded_path|
|
45
|
+
app.config.paths["db/migrate"] << expanded_path
|
46
|
+
end
|
47
|
+
end
|
42
48
|
end
|
43
49
|
end
|
44
50
|
end
|