lesli_admin 0.1.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/images/lesli_admin/admin-logo.svg +1 -0
- data/app/assets/javascripts/lesli_admin/application.js +2698 -219
- data/app/assets/stylesheets/lesli_admin/application.scss +33 -0
- data/app/assets/stylesheets/lesli_admin/users.scss +67 -0
- data/app/controllers/lesli_admin/profiles_controller.rb +56 -0
- data/app/controllers/lesli_admin/users_controller.rb +13 -19
- data/app/helpers/lesli_admin/profiles_helper.rb +4 -0
- data/app/models/lesli_admin/account.rb +3 -31
- data/app/services/lesli_admin/user_service.rb +17 -52
- data/app/views/lesli_admin/profiles/show.html.erb +1 -0
- data/app/views/lesli_admin/users/show.html.erb +1 -10
- data/config/locales/translations.en.yml +5 -0
- data/config/locales/translations.es.yml +5 -0
- data/config/routes.rb +4 -7
- data/db/migrate/0101000110_create_lesli_admin_accounts.rb +42 -0
- data/lib/lesli_admin/engine.rb +31 -0
- data/lib/lesli_admin/version.rb +2 -1
- data/lib/vue/application.js +15 -98
- data/lib/vue/apps/account/components/form-information.vue +1 -1
- data/lib/vue/apps/account/show.vue +3 -3
- data/lib/vue/apps/dashboard/show.vue +6 -9
- data/lib/vue/apps/profile/show.vue +29 -18
- data/lib/vue/apps/users/components/information-card.vue +4 -7
- data/lib/vue/apps/users/components/information-form.vue +4 -7
- data/lib/vue/apps/users/index.vue +9 -4
- data/lib/vue/apps/users/show.vue +25 -10
- data/lib/vue/stores/translations.json +38 -0
- data/lib/vue/stores/user.js +17 -5
- data/lib/vue/stores/users.js +25 -0
- data/readme.md +61 -18
- metadata +27 -12
- data/app/assets/stylesheets/lesli_admin/application.css +0 -15
- data/app/models/lesli_admin/dashboard.rb +0 -4
- data/app/models/lesli_admin/user.rb +0 -4
- data/lib/vue/stores/account.js +0 -113
- data/lib/vue/stores/descriptor.js +0 -116
- data/lib/vue/stores/descriptors.js +0 -167
- data/lib/vue/stores/integration.js +0 -103
- data/lib/vue/stores/role.js +0 -243
- data/lib/vue/stores/systemController.js +0 -67
- /data/lib/vue/stores/{accountSettings.js → account_settings.js} +0 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
/*
|
2
|
+
Lesli
|
3
|
+
|
4
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
5
|
+
|
6
|
+
This program is free software: you can redistribute it and/or modify
|
7
|
+
it under the terms of the GNU General Public License as published by
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
9
|
+
(at your option) any later version.
|
10
|
+
|
11
|
+
This program is distributed in the hope that it will be useful,
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
GNU General Public License for more details.
|
15
|
+
|
16
|
+
You should have received a copy of the GNU General Public License
|
17
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
18
|
+
|
19
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
20
|
+
|
21
|
+
Made with ♥ by https://www.lesli.tech
|
22
|
+
Building a better future, one line of code at a time.
|
23
|
+
|
24
|
+
@contact hello@lesli.tech
|
25
|
+
@website https://www.lesli.tech
|
26
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
27
|
+
|
28
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
29
|
+
// ·
|
30
|
+
*/
|
31
|
+
|
32
|
+
body.lesli-admin-users,
|
33
|
+
body.lesli-admin-profile { @import "users"; }
|
@@ -0,0 +1,67 @@
|
|
1
|
+
/*
|
2
|
+
Lesli
|
3
|
+
|
4
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
5
|
+
|
6
|
+
This program is free software: you can redistribute it and/or modify
|
7
|
+
it under the terms of the GNU General Public License as published by
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
9
|
+
(at your option) any later version.
|
10
|
+
|
11
|
+
This program is distributed in the hope that it will be useful,
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
GNU General Public License for more details.
|
15
|
+
|
16
|
+
You should have received a copy of the GNU General Public License
|
17
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
18
|
+
|
19
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
20
|
+
|
21
|
+
Made with ♥ by https://www.lesli.tech
|
22
|
+
Building a better future, one line of code at a time.
|
23
|
+
|
24
|
+
@contact hello@lesli.tech
|
25
|
+
@website https://www.lesli.tech
|
26
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
27
|
+
|
28
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
29
|
+
// ·
|
30
|
+
*/
|
31
|
+
|
32
|
+
|
33
|
+
// ·
|
34
|
+
.user-information-card {
|
35
|
+
figure {
|
36
|
+
display: flex;
|
37
|
+
align-items: center;
|
38
|
+
justify-content: center;
|
39
|
+
border-radius: 50%;
|
40
|
+
background-color: lesli-css-color(silver, 100);
|
41
|
+
border: 2px solid var(--lesli-color-primary, lesli-css-color(blue));
|
42
|
+
}
|
43
|
+
.alternative-avatar {
|
44
|
+
font-weight: 200;
|
45
|
+
font-size: 3rem;
|
46
|
+
color: var(--lesli-color-primary, lesli-css-color(blue));
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
form.information {
|
51
|
+
max-width: 80%;
|
52
|
+
}
|
53
|
+
|
54
|
+
// · roles management cards
|
55
|
+
.roles-types {
|
56
|
+
display: grid;
|
57
|
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
58
|
+
grid-auto-rows: minmax(198px, auto);
|
59
|
+
gap: 20px;
|
60
|
+
|
61
|
+
&-item {
|
62
|
+
width: 100%;
|
63
|
+
height: 135px;
|
64
|
+
border-radius: 8px;
|
65
|
+
margin: 5px;
|
66
|
+
}
|
67
|
+
}
|
@@ -0,0 +1,56 @@
|
|
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
|
+
module LesliAdmin
|
33
|
+
class ProfilesController < ApplicationController
|
34
|
+
before_action :set_profile, only: %i[ show ]
|
35
|
+
|
36
|
+
# GET /profiles/1
|
37
|
+
def show
|
38
|
+
respond_to do |format|
|
39
|
+
format.html
|
40
|
+
format.json { respond_with_successful(@profile.show) }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
# Use callbacks to share common setup or constraints between actions.
|
47
|
+
def set_profile
|
48
|
+
@profile = UserService.new(current_user, query).find(current_user.id)
|
49
|
+
end
|
50
|
+
|
51
|
+
# Only allow a list of trusted parameters through.
|
52
|
+
def profile_params
|
53
|
+
params.fetch(:profile, {})
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -31,7 +31,7 @@ Building a better future, one line of code at a time.
|
|
31
31
|
=end
|
32
32
|
|
33
33
|
module LesliAdmin
|
34
|
-
class UsersController <
|
34
|
+
class UsersController < Lesli::ApplicationLesliController
|
35
35
|
before_action :set_user, only: [
|
36
36
|
:show,
|
37
37
|
:update,
|
@@ -45,23 +45,25 @@ module LesliAdmin
|
|
45
45
|
# GET /users/list
|
46
46
|
def list
|
47
47
|
respond_to do |format|
|
48
|
-
format.json {
|
48
|
+
format.json {
|
49
|
+
respond_with_successful(UserService.new("current_user").list(query, params))
|
50
|
+
}
|
49
51
|
end
|
50
52
|
end
|
51
53
|
|
52
54
|
# GET /users
|
53
55
|
def index
|
54
56
|
respond_to do |format|
|
55
|
-
format.html
|
57
|
+
format.html
|
56
58
|
format.json {
|
57
|
-
return respond_with_pagination(UserService.new(
|
59
|
+
return respond_with_pagination(UserService.new(current_user, query).index(params))
|
58
60
|
}
|
59
61
|
end
|
60
62
|
end
|
61
63
|
|
62
64
|
def show
|
63
65
|
respond_to do |format|
|
64
|
-
format.html
|
66
|
+
format.html
|
65
67
|
format.json {
|
66
68
|
return respond_with_not_found unless @user.found?
|
67
69
|
return respond_with_successful(@user.show)
|
@@ -69,32 +71,29 @@ module LesliAdmin
|
|
69
71
|
end
|
70
72
|
end
|
71
73
|
|
72
|
-
def new; end
|
73
|
-
|
74
74
|
def create
|
75
|
-
|
76
75
|
user = UserService.new(current_user).create(user_params)
|
77
76
|
if user.successful?
|
78
77
|
respond_with_successful(user.result)
|
79
78
|
else
|
80
79
|
respond_with_error("Error creating user", user.errors)
|
81
80
|
end
|
82
|
-
|
83
81
|
end
|
84
82
|
|
85
83
|
def update
|
86
|
-
|
87
|
-
#
|
84
|
+
|
85
|
+
# check if the user trully exists
|
88
86
|
return respond_with_not_found unless @user.found?
|
89
|
-
|
87
|
+
|
88
|
+
# update the user information
|
90
89
|
@user.update(user_params)
|
91
|
-
|
90
|
+
|
91
|
+
# check saved
|
92
92
|
if @user.successful?
|
93
93
|
respond_with_successful(@user.result)
|
94
94
|
else
|
95
95
|
respond_with_error(@user.errors)
|
96
96
|
end
|
97
|
-
|
98
97
|
end
|
99
98
|
|
100
99
|
def destroy
|
@@ -235,10 +234,5 @@ module LesliAdmin
|
|
235
234
|
]
|
236
235
|
)
|
237
236
|
end
|
238
|
-
|
239
|
-
# Only allow a list of trusted parameters through.
|
240
|
-
def user_params
|
241
|
-
params.fetch(:user, {})
|
242
|
-
end
|
243
237
|
end
|
244
238
|
end
|
@@ -31,36 +31,8 @@ Building a better future, one line of code at a time.
|
|
31
31
|
=end
|
32
32
|
|
33
33
|
module LesliAdmin
|
34
|
-
class Account <
|
35
|
-
|
36
|
-
|
37
|
-
belongs_to :user, optional: true
|
38
|
-
|
39
|
-
# account resources
|
40
|
-
has_many :users
|
41
|
-
|
42
|
-
has_one :bell, class_name: "LesliBell::Account"
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
# account statuses
|
47
|
-
enum status: [
|
48
|
-
:registered,
|
49
|
-
:onboarding,
|
50
|
-
:active,
|
51
|
-
:suspended
|
52
|
-
]
|
53
|
-
|
54
|
-
|
55
|
-
# company region (GDPR)
|
56
|
-
enum region: {
|
57
|
-
latin_america: "latin_america",
|
58
|
-
united_states: "united_states",
|
59
|
-
european_union: "european_union"
|
60
|
-
}
|
61
|
-
|
62
|
-
|
63
|
-
# required a name for the lesli account
|
64
|
-
validates :company_name, :presence => true
|
34
|
+
class Account < ApplicationRecord
|
35
|
+
belongs_to :account, class_name: "Lesli::Account"
|
36
|
+
has_many :users, class_name: "Lesli::User"
|
65
37
|
end
|
66
38
|
end
|
@@ -33,43 +33,10 @@ Building a better future, one line of code at a time.
|
|
33
33
|
module LesliAdmin
|
34
34
|
class UserService < Lesli::ApplicationLesliService
|
35
35
|
|
36
|
-
|
37
|
-
# Return a list of users that belongs to the account of the current_user
|
38
|
-
# this list is meant to be used in selectors, autocomplets, etc
|
39
|
-
def list query=nil, params=nil
|
40
|
-
#users = current_user.account.users
|
41
|
-
users = Lesli::Account.first.users
|
42
|
-
|
43
|
-
if params[:role].present?
|
44
|
-
# add simple quotes to the roles so the sql can manage the query
|
45
|
-
roles = params[:role].split(",").map { |role| "'#{role}'" }.join(", ")
|
46
|
-
users = users.joins("
|
47
|
-
inner join (
|
48
|
-
select
|
49
|
-
ur.users_id, string_agg(r.\"name\", ', ') role_names
|
50
|
-
from user_roles ur
|
51
|
-
join roles r
|
52
|
-
on r.id = ur.role_id
|
53
|
-
and r.name in ( #{ roles } )
|
54
|
-
where ur.deleted_at is null
|
55
|
-
group by ur.users_id
|
56
|
-
) roles on roles.users_id = users.id
|
57
|
-
")
|
58
|
-
end
|
59
|
-
|
60
|
-
users.order(name: :asc).select(
|
61
|
-
:id,
|
62
|
-
:email,
|
63
|
-
"CONCAT_WS(' ', first_name, last_name) as name",
|
64
|
-
:alias
|
65
|
-
).as_json
|
66
|
-
end
|
67
|
-
|
68
|
-
|
69
36
|
# @return [Array] Paginated index of users.
|
70
37
|
# @description Return a paginated array of users, used mostly in frontend views
|
71
38
|
# TODO: Implement pg_search
|
72
|
-
def index
|
39
|
+
def index params
|
73
40
|
|
74
41
|
# sql string to join to user_roles and get all the roles assigned to a user
|
75
42
|
sql_string_for_user_roles = "left join (
|
@@ -129,22 +96,21 @@ module LesliAdmin
|
|
129
96
|
last_name: user[:last_name],
|
130
97
|
telephone: user[:telephone],
|
131
98
|
|
132
|
-
locale: user.settings.select(:value).find_by(:name => "locale"),
|
99
|
+
#locale: user.settings.select(:value).find_by(:name => "locale"),
|
133
100
|
|
134
|
-
roles: user.roles.map { |r| { id: r[:id], name: r[:name], permission_level: r[:object_level_permission]} },
|
101
|
+
#roles: user.roles.map { |r| { id: r[:id], name: r[:name], permission_level: r[:object_level_permission]} },
|
135
102
|
|
136
|
-
mfa_enabled: user.mfa_settings[:enabled],
|
137
|
-
mfa_method: user.mfa_settings[:method],
|
103
|
+
#mfa_enabled: user.mfa_settings[:enabled],
|
104
|
+
#mfa_method: user.mfa_settings[:method],
|
138
105
|
|
139
106
|
created_at: user[:created_at],
|
140
107
|
updated_at: user[:updated_at],
|
141
|
-
|
142
108
|
detail_attributes: {
|
143
|
-
title: user.detail[:title],
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
109
|
+
title: user.detail&[:title] || "",
|
110
|
+
# address: user.detail[:address],
|
111
|
+
# work_city: user.detail[:work_city],
|
112
|
+
# work_region: user.detail[:work_region],
|
113
|
+
# work_address: user.detail[:work_address]
|
148
114
|
}
|
149
115
|
}
|
150
116
|
end
|
@@ -235,16 +201,15 @@ module LesliAdmin
|
|
235
201
|
|
236
202
|
def update params
|
237
203
|
|
238
|
-
old_attributes = resource.detail.attributes.merge({
|
239
|
-
|
240
|
-
})
|
204
|
+
# old_attributes = resource.detail.attributes.merge({
|
205
|
+
# active: resource.active
|
206
|
+
# })
|
241
207
|
|
242
208
|
if resource.update(params)
|
243
|
-
new_attributes = resource.detail.attributes.merge({
|
244
|
-
|
245
|
-
})
|
246
|
-
|
247
|
-
resource.log_activity_update(current_user, resource, old_attributes, new_attributes)
|
209
|
+
# new_attributes = resource.detail.attributes.merge({
|
210
|
+
# active: resource.active
|
211
|
+
# })
|
212
|
+
#resource.log_activity_update(current_user, resource, old_attributes, new_attributes)
|
248
213
|
else
|
249
214
|
self.error(resource.errors.full_messages.to_sentence)
|
250
215
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<router-view></router-view>
|
@@ -1,10 +1 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
<%= render @user %>
|
4
|
-
|
5
|
-
<div>
|
6
|
-
<%= link_to "Edit this user", edit_user_path(@user) %> |
|
7
|
-
<%= link_to "Back to users", users_path %>
|
8
|
-
|
9
|
-
<%= button_to "Destroy this user", @user, method: :delete %>
|
10
|
-
</div>
|
1
|
+
<router-view></router-view>
|
data/config/routes.rb
CHANGED
@@ -1,13 +1,10 @@
|
|
1
1
|
LesliAdmin::Engine.routes.draw do
|
2
|
+
|
2
3
|
root to: "dashboards#show"
|
3
4
|
resource :dashboard, only: [:show]
|
4
5
|
|
5
|
-
resource :
|
6
|
-
resources :users, only: [:index, :show, :new, :update, :create, :destroy] do
|
6
|
+
resource :profile, only: [:show]
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
get :list
|
11
|
-
end
|
12
|
-
end
|
8
|
+
resource :account, only: [:show]
|
9
|
+
resources :users, only: [:index, :show, :new]
|
13
10
|
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 CreateLesliAdminAccounts < ActiveRecord::Migration[6.0]
|
34
|
+
def change
|
35
|
+
create_table :lesli_admin_accounts do |t|
|
36
|
+
t.integer :status
|
37
|
+
t.datetime :deleted_at, index: true
|
38
|
+
t.timestamps
|
39
|
+
end
|
40
|
+
add_reference(:lesli_admin_accounts, :account, foreign_key: { to_table: :lesli_accounts })
|
41
|
+
end
|
42
|
+
end
|
data/lib/lesli_admin/engine.rb
CHANGED
@@ -1,3 +1,34 @@
|
|
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
|
1
32
|
module LesliAdmin
|
2
33
|
class Engine < ::Rails::Engine
|
3
34
|
isolate_namespace LesliAdmin
|
data/lib/lesli_admin/version.rb
CHANGED
data/lib/vue/application.js
CHANGED
@@ -30,21 +30,28 @@ Building a better future, one line of code at a time.
|
|
30
30
|
*/
|
31
31
|
|
32
32
|
|
33
|
-
// ·
|
33
|
+
// · Import Lesli builders
|
34
34
|
import application from "Lesli/application"
|
35
|
+
import translation from "Lesli/translation"
|
35
36
|
|
36
37
|
|
37
|
-
// ·
|
38
|
+
// · Import engine translations
|
39
|
+
import translations from "LesliAdmin/stores/translations.json"
|
40
|
+
|
41
|
+
|
42
|
+
// · Import engine applications
|
38
43
|
import applicationDashboardShow from "LesliAdmin/apps/dashboard/show.vue"
|
39
44
|
import applicationAccountShow from "LesliAdmin/apps/account/show.vue"
|
40
|
-
|
41
|
-
//import applicationUsersProfile from "LesliApp/administration/apps/profile/show.vue"
|
42
45
|
import applicationUsersIndex from "LesliAdmin/apps/users/index.vue"
|
43
|
-
|
44
|
-
|
46
|
+
import applicationUsersShow from "LesliAdmin/apps/users/show.vue"
|
47
|
+
import applicationProfile from "LesliAdmin/apps/profile/show.vue"
|
45
48
|
|
46
49
|
|
47
|
-
// ·
|
50
|
+
// · Buil Lesli translations
|
51
|
+
translation(translations)
|
52
|
+
|
53
|
+
|
54
|
+
// · Build a new Lesli application
|
48
55
|
application("LesliAdmin", [{
|
49
56
|
path: "/dashboard",
|
50
57
|
component: applicationDashboardShow
|
@@ -54,100 +61,10 @@ application("LesliAdmin", [{
|
|
54
61
|
}, {
|
55
62
|
path: "/users",
|
56
63
|
component: applicationUsersIndex
|
57
|
-
}/*, {
|
58
|
-
path: "/users/new",
|
59
|
-
component: applicationUsersNew
|
60
|
-
}*/])
|
61
|
-
|
62
|
-
/*
|
63
|
-
// ·
|
64
|
-
import applicationAccountDashboard from "CloudAdmin/apps/accounts/dashboard.vue"
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
import applicationDescriptorsPrivileges from "LesliApp/administration/apps/descriptors/privileges.vue"
|
69
|
-
import applicationDescriptorsIndex from "LesliApp/administration/apps/descriptors/index.vue"
|
70
|
-
import applicationDescriptorsEdit from "LesliApp/administration/apps/descriptors/edit.vue"
|
71
|
-
import applicationDescriptorsShow from "LesliApp/administration/apps/descriptors/show.vue"
|
72
|
-
import applicationDescriptorsNew from "LesliApp/administration/apps/descriptors/new.vue"
|
73
|
-
|
74
|
-
import applicationRolesIndex from "LesliApp/administration/apps/roles/index.vue"
|
75
|
-
import applicationRolesShow from "LesliApp/administration/apps/roles/show.vue"
|
76
|
-
import applicationRolesEdit from "LesliApp/administration/apps/roles/edit.vue"
|
77
|
-
import applicationRolesNew from "LesliApp/administration/apps/roles/new.vue"
|
78
|
-
|
79
|
-
import applicationIntegrationsIndex from "LesliApp/administration/apps/integrations/index.vue"
|
80
|
-
import applicationIntegrationsNew from "LesliApp/administration/apps/integrations/new.vue"
|
81
|
-
import applicationSecurity from "LesliApp/administration/apps/security/index.vue"
|
82
|
-
import applicationDatetime from "LesliApp/administration/apps/date_time/index.vue"
|
83
|
-
import applicationBranding from "LesliApp/administration/apps/branding/index.vue"
|
84
|
-
import applicationTheme from "LesliApp/administration/apps/theme/index.vue"
|
85
|
-
import applicationAccountShow from "LesliApp/administration/apps/accounts/show.vue"
|
86
|
-
|
87
|
-
|
88
|
-
// ·
|
89
|
-
application("Lesli", [{
|
90
|
-
path: "/",
|
91
|
-
component: applicationAccountDashboard
|
92
|
-
}, {
|
93
|
-
path: "/account",
|
94
|
-
component: applicationAccountShow
|
95
64
|
}, {
|
96
65
|
path: "/users/:id",
|
97
66
|
component: applicationUsersShow
|
98
67
|
}, {
|
99
|
-
path: "/users/new",
|
100
|
-
component: applicationUsersNew
|
101
|
-
},{
|
102
68
|
path: "/profile",
|
103
|
-
component:
|
104
|
-
}, {
|
105
|
-
path: "/descriptors",
|
106
|
-
component: applicationDescriptorsIndex
|
107
|
-
}, {
|
108
|
-
path: "/descriptors/:id/edit",
|
109
|
-
component: applicationDescriptorsEdit
|
110
|
-
}, {
|
111
|
-
path: "/descriptors/:id",
|
112
|
-
component: applicationDescriptorsShow
|
113
|
-
}, {
|
114
|
-
path: "/descriptors/:id/privileges",
|
115
|
-
component: applicationDescriptorsPrivileges
|
116
|
-
}, {
|
117
|
-
path: "/descriptors/new",
|
118
|
-
component: applicationDescriptorsNew
|
119
|
-
}, {
|
120
|
-
path: "/roles",
|
121
|
-
component: applicationRolesIndex
|
122
|
-
}, {
|
123
|
-
path: "/roles/new",
|
124
|
-
component: applicationRolesNew
|
125
|
-
}, {
|
126
|
-
path: "/roles/:id",
|
127
|
-
component: applicationRolesShow
|
128
|
-
}, {
|
129
|
-
path: "/roles/:id/edit",
|
130
|
-
component: applicationRolesEdit
|
131
|
-
}, {
|
132
|
-
path: "/account/integrations",
|
133
|
-
component: applicationIntegrationsIndex
|
134
|
-
}, {
|
135
|
-
path: "/account/integrations/new",
|
136
|
-
component: applicationIntegrationsNew
|
137
|
-
}, {
|
138
|
-
path: "/account/settings/security",
|
139
|
-
component: applicationSecurity
|
140
|
-
}, {
|
141
|
-
path: "/account/settings/date_time",
|
142
|
-
component: applicationDatetime
|
143
|
-
}, {
|
144
|
-
path: "/account/settings/branding",
|
145
|
-
component: applicationBranding
|
146
|
-
}, {
|
147
|
-
path: "/account/settings/theme",
|
148
|
-
component: applicationTheme
|
149
|
-
}, {
|
150
|
-
path: "/account/settings/theme",
|
151
|
-
component: applicationTheme
|
69
|
+
component: applicationProfile
|
152
70
|
}])
|
153
|
-
*/
|