lesli_admin 0.6.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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/lesli_admin/admin-logo.svg +1 -1
  3. data/app/assets/javascripts/lesli_admin/application.js +1 -5141
  4. data/app/assets/stylesheets/lesli_admin/application.css +594 -3
  5. data/app/controllers/lesli_admin/abouts_controller.rb +15 -6
  6. data/app/controllers/lesli_admin/accounts_controller.rb +11 -41
  7. data/app/models/lesli_admin/account.rb +1 -1
  8. data/app/services/lesli_admin/account_service.rb +3 -1
  9. data/app/views/lesli_admin/abouts/show.html.erb +82 -1
  10. data/app/views/lesli_admin/accounts/show.html.erb +14 -30
  11. data/app/views/lesli_admin/accounts/update.turbo_stream.erb +3 -0
  12. data/app/views/lesli_admin/dashboards/show.html.erb +4 -3
  13. data/config/locales/translations.en.yml +1 -38
  14. data/config/locales/translations.es.yml +1 -38
  15. data/config/locales/translations.fr.yml +1 -38
  16. data/config/locales/translations.it.yml +1 -38
  17. data/config/locales/translations.pt.yml +1 -38
  18. data/config/routes.rb +3 -16
  19. data/db/migrate/{0101050210_create_lesli_admin_dashboard_components.rb → v1/0101000110_create_lesli_admin_accounts.rb} +4 -20
  20. data/db/migrate/{0101000110_create_lesli_admin_accounts.rb → v1/0101003010_create_lesli_admin_dashboards.rb} +2 -7
  21. data/db/seeds.rb +4 -10
  22. data/lib/lesli_admin/version.rb +2 -2
  23. data/lib/scss/application.scss +4 -0
  24. data/lib/vue/apps/about/show.vue +10 -9
  25. data/lib/vue/apps/dashboards/components/lesli-version.vue +2 -0
  26. data/lib/vue/stores/account.js +2 -2
  27. data/lib/vue/stores/translations.json +10 -100
  28. data/readme.md +8 -8
  29. metadata +12 -27
  30. data/app/views/layouts/lesli_admin/application.html.erb +0 -15
  31. data/db/migrate/0101050110_create_lesli_admin_dashboards.rb +0 -51
  32. /data/app/views/lesli_admin/partials/{_engine-navigation.html.erb → _navigation.html.erb} +0 -0
@@ -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
@@ -34,59 +34,28 @@ module LesliAdmin
34
34
  class AccountsController < ApplicationController
35
35
  before_action :set_account, only: %i[show update]
36
36
 
37
- # GET /accounts/1
38
- # GET /accounts/1.json
39
37
  def show
40
38
  respond_to do |format|
41
- format.html {}
39
+ format.html do
40
+ @account = AccountService.new(current_user, query).show
41
+ end
42
42
  format.json do
43
43
  respond_with_successful(AccountService.new(current_user, query).show)
44
44
  end
45
45
  end
46
46
  end
47
47
 
48
- # GET /accounts/new
49
- def new
50
- end
51
-
52
- # GET /accounts/1/edit
53
- def edit
54
- end
55
-
56
- # POST /accounts
57
- # POST /accounts.json
58
- def create
59
- current_user.account.company_name = account_params[:company_name]
60
- current_user.account.status = 'active'
61
- current_user.account.save
62
- if current_user.account.errors.any?
63
- return respond_with_error(current_user.errors.full_messages.to_sentence)
64
- end
65
- respond_with_successful
66
- end
67
-
68
- # PATCH/PUT /accounts/1
69
- # PATCH/PUT /accounts/1.json
70
48
  def update
49
+
50
+ # check saved
71
51
  if @account.update(account_params)
72
- respond_with_successful(@account)
73
- else
74
- respond_with_error(@account)
75
- end
76
- end
77
-
78
- # DELETE /accounts/1
79
- # DELETE /accounts/1.json
80
- def destroy
81
- return respond_with_not_found unless @account
82
-
83
- @account.destroy
84
- respond_to do |format|
85
- format.html { redirect_to accounts_url, notice: 'Account was successfully destroyed.' }
86
- format.json { head :no_content }
52
+ success("Account updated successfully!")
53
+ else
54
+ #respond_with_error(@account.errors)
87
55
  end
88
56
  end
89
57
 
58
+
90
59
  private
91
60
 
92
61
  # Use callbacks to share common setup or constraints between actions.
@@ -99,6 +68,7 @@ module LesliAdmin
99
68
  params.require(:account).permit(
100
69
  :id,
101
70
  :name,
71
+ :email,
102
72
  detail_attributes: [
103
73
  :company_name_legal,
104
74
  :company_tagline
@@ -38,7 +38,7 @@ module LesliAdmin
38
38
  after_create :initialize_account
39
39
 
40
40
  def initialize_account
41
- Dashboard.initialize_account(self)
41
+ #Dashboard.initialize_account(self)
42
42
  end
43
43
  end
44
44
  end
@@ -35,13 +35,14 @@ module LesliAdmin
35
35
  def show
36
36
  account = Lesli::Account.left_joins(:detail)
37
37
  .where(:id => current_user.account.id)
38
- .select(:id, :email, :name, :company_name_legal, :company_tagline)
38
+ .select(:id, :email, :name, :status, :company_name_legal, :company_tagline)
39
39
  .first
40
40
 
41
41
  {
42
42
  id: account.id,
43
43
  name: account.name,
44
44
  email: account.email,
45
+ status: account.status,
45
46
  detail_attributes: {
46
47
  company_name_legal: account.company_name_legal,
47
48
  company_tagline: account.company_tagline
@@ -49,6 +50,7 @@ module LesliAdmin
49
50
  }
50
51
 
51
52
  #current_user.account.joins(:detail)
53
+ return account
52
54
  end
53
55
  end
54
56
  end
@@ -1 +1,82 @@
1
- <router-view></router-view>
1
+ <%#
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
+ %>
32
+
33
+ <script>
34
+ function engineManager() {
35
+ return {
36
+ data: { engines: [] },
37
+
38
+ init() {
39
+ const stored = localStorage.getItem('engineData')
40
+ this.data = stored ? JSON.parse(stored) : { engines: [] }
41
+ },
42
+
43
+ toggleEngine(engine) {
44
+ const index = this.data.engines.indexOf(engine)
45
+ if (index === -1) {
46
+ this.data.engines.push(engine)
47
+ } else {
48
+ this.data.engines.splice(index, 1)
49
+ }
50
+ localStorage.setItem('engineData', JSON.stringify(this.data))
51
+ }
52
+ }
53
+ }
54
+ </script>
55
+
56
+ <%= render LesliView::Layout::Container.new("admin-accounts") do %>
57
+ <%= render LesliView::Components::Header.new("About") %>
58
+
59
+ <div x-data="engineManager()">
60
+ <div class="columns is-multiline is-variable is-4 dashboard-components">
61
+ <% @lesli_engines.each do |engine| %>
62
+ <% next if engine[:code] == 'root' %>
63
+ <div class="column is-3" v-for="lesliVersion in lesliVersions">
64
+ <div class="box">
65
+ <h5 class="title is-size-5 mb-2"><%= engine[:name] %></h5>
66
+ <p class="p-0 m-0 has-text-grey-dark"><%= engine[:description] %></p>
67
+ <hr class="my-2" />
68
+ <p class="p-0 m-0 has-text-grey">Version: <%= engine[:version] %></p>
69
+ <p class="p-0 m-0 has-text-grey">Buid: <%= engine[:build] %></p>
70
+ <p class="p-0 m-0 has-text-grey">Path: <%= engine[:path] %></p>
71
+ <hr class="my-2" />
72
+ <button
73
+ @click="toggleEngine('<%= engine[:path].gsub("/","") %>')"
74
+ :class="data.engines.includes('<%= engine[:path].gsub("/","") %>') ? 'button is-small is-info' : 'button is-small is-danger'"
75
+ x-text="data.engines.includes('<%= engine[:path].gsub("/","") %>') ? 'Activar módulo' : 'Desactivar módulo'">
76
+ </button>
77
+ </div>
78
+ </div>
79
+ <% end %>
80
+ </div>
81
+ </div>
82
+ <% end %>
@@ -1,34 +1,18 @@
1
- <%
2
- =begin
3
1
 
4
- Lesli
2
+ <%= render(LesliView::Layout::Container.new("test")) do %>
5
3
 
6
- Copyright (c) 2023, Lesli Technologies, S. A.
4
+ <%= render(LesliView::Components::Header.new("Account information")) %>
7
5
 
8
- This program is free software: you can redistribute it and/or modify
9
- it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation, either version 3 of the License, or
11
- (at your option) any later version.
6
+ <%= render LesliView::Components::Tabs.new do |tabs| %>
12
7
 
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- GNU General Public License for more details.
17
-
18
- You should have received a copy of the GNU General Public License
19
- along with this program. If not, see http://www.gnu.org/licenses/.
20
-
21
- Lesli · Ruby on Rails SaaS development platform.
22
-
23
- Made with ♥ by https://www.lesli.tech
24
- Building a better future, one line of code at a time.
25
-
26
- @contact hello@lesli.tech
27
- @website https://www.lesli.tech
28
- @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
29
-
30
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
31
- // ·
32
- =end
33
- %>
34
- <router-view></router-view>
8
+ <% tabs.with_tab(title: "General Information", icon: "business") do %>
9
+ <%= form_with(model: @account, builder: LesliView::Forms::Builder) do |form| %>
10
+ <%= form.fieldset do %>
11
+ <%= form.field_control(:name, label: "Company name")%>
12
+ <%= form.field_control(:email, label: "Iva por pagar") %>
13
+ <%= form.field_control_submit %>
14
+ <% end %>
15
+ <% end %>
16
+ <% end %>
17
+ <% end %>
18
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <%= turbo_stream.replace "application-lesli-notifications" do %>
2
+ <%= render "lesli/partials/application-lesli-notifications" %>
3
+ <% 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,4 +29,5 @@ Building a better future, one line of code at a time.
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
30
  // ·
31
31
  %>
32
- <router-view></router-view>
32
+
33
+ <%= render("/lesli/shared/dashboards/show") %>
@@ -1,39 +1,2 @@
1
1
  ---
2
- :en:
3
- lesli_admin:
4
- accounts:
5
- view_title: Account information
6
- tab_general_information: General Information
7
- column_company_name: Company name
8
- column_company_name_legal: Legal name
9
- view_subtitle_social_media: Social media
10
- column_city: City
11
- column_tag_line: Slogan
12
- column_postal_code: Postal code
13
- column_region: Region
14
- tab_contact: Contact
15
- tab_address: Address
16
- column_country: Country
17
- column_address: Address
18
- column_public_email: Public email
19
- column_phone_number: Phonenumber
20
- column_website: Website
21
- lesli:
22
- shared:
23
- view_discussions: Discussions
24
- button_add_new: Add new
25
- button_reload: Reload
26
- view_files: Files
27
- view_quick_actions: Quick actions
28
- button_list: List
29
- button_save: Save
30
- button_delete: Delete
31
- button_edit: Edit
32
- view_status_active: Active
33
- view_status_inactive: Inactive
34
- button_settings: Settings
35
- button_show: Show
36
- toolbar_search: Search...
37
- application:
38
- navigation_logout: Logout
39
- navigation_my_profile: My profile
2
+ :en: {}
@@ -1,39 +1,2 @@
1
1
  ---
2
- :es:
3
- lesli_admin:
4
- accounts:
5
- view_title: Informacion de cuenta
6
- tab_general_information: Información General
7
- column_company_name: Nombre de Empresa
8
- column_company_name_legal: Razon social
9
- view_subtitle_social_media: Redes sociales
10
- column_city: Ciudad
11
- column_tag_line: Slogan
12
- column_postal_code: Código postal
13
- column_region: Región
14
- tab_contact: Contacto
15
- tab_address: Dirección
16
- column_country: País
17
- column_address: Dirección
18
- column_public_email: Email publico
19
- column_phone_number: Teléfono
20
- column_website: Sitio web
21
- lesli:
22
- shared:
23
- view_discussions: Discusiones
24
- button_add_new: Agregar nuevo
25
- button_reload: Recargar
26
- view_files: Archivos
27
- view_quick_actions: Acciones rapidas
28
- button_list: Lista
29
- button_save: Guardar
30
- button_delete: Eliminar
31
- button_edit: Editar
32
- view_status_active: Activo
33
- view_status_inactive: Inactivo
34
- button_settings: Configuración
35
- button_show: Ver
36
- toolbar_search: Buscar...
37
- application:
38
- navigation_logout: Cerrar sesión
39
- navigation_my_profile: Mi perfil
2
+ :es: {}
@@ -1,39 +1,2 @@
1
1
  ---
2
- :fr:
3
- lesli_admin:
4
- accounts:
5
- view_title: ":lesli_admin.accounts.view_title:"
6
- tab_general_information: ":lesli_admin.accounts.tab_general_information:"
7
- column_company_name: ":lesli_admin.accounts.column_company_name:"
8
- column_company_name_legal: ":lesli_admin.accounts.column_company_name_legal:"
9
- view_subtitle_social_media: ":lesli_admin.accounts.view_subtitle_social_media:"
10
- column_city: ":lesli_admin.accounts.column_city:"
11
- column_tag_line: ":lesli_admin.accounts.column_tag_line:"
12
- column_postal_code: ":lesli_admin.accounts.column_postal_code:"
13
- column_region: ":lesli_admin.accounts.column_region:"
14
- tab_contact: ":lesli_admin.accounts.tab_contact:"
15
- tab_address: ":lesli_admin.accounts.tab_address:"
16
- column_country: ":lesli_admin.accounts.column_country:"
17
- column_address: ":lesli_admin.accounts.column_address:"
18
- column_public_email: ":lesli_admin.accounts.column_public_email:"
19
- column_phone_number: ":lesli_admin.accounts.column_phone_number:"
20
- column_website: ":lesli_admin.accounts.column_website:"
21
- lesli:
22
- shared:
23
- view_discussions: ":lesli.shared.view_discussions:"
24
- button_add_new: ":lesli.shared.button_add_new:"
25
- button_reload: ":lesli.shared.button_reload:"
26
- view_files: ":lesli.shared.view_files:"
27
- view_quick_actions: ":lesli.shared.view_quick_actions:"
28
- button_list: ":lesli.shared.button_list:"
29
- button_save: ":lesli.shared.button_save:"
30
- button_delete: ":lesli.shared.button_delete:"
31
- button_edit: ":lesli.shared.button_edit:"
32
- view_status_active: ":lesli.shared.view_status_active:"
33
- view_status_inactive: ":lesli.shared.view_status_inactive:"
34
- button_settings: ":lesli.shared.button_settings:"
35
- button_show: ":lesli.shared.button_show:"
36
- toolbar_search: ":lesli.shared.toolbar_search:"
37
- application:
38
- navigation_logout: ":lesli.application.navigation_logout:"
39
- navigation_my_profile: ":lesli.application.navigation_my_profile:"
2
+ :fr: {}
@@ -1,39 +1,2 @@
1
1
  ---
2
- :it:
3
- lesli_admin:
4
- accounts:
5
- view_title: ":lesli_admin.accounts.view_title:"
6
- tab_general_information: ":lesli_admin.accounts.tab_general_information:"
7
- column_company_name: ":lesli_admin.accounts.column_company_name:"
8
- column_company_name_legal: ":lesli_admin.accounts.column_company_name_legal:"
9
- view_subtitle_social_media: ":lesli_admin.accounts.view_subtitle_social_media:"
10
- column_city: ":lesli_admin.accounts.column_city:"
11
- column_tag_line: ":lesli_admin.accounts.column_tag_line:"
12
- column_postal_code: ":lesli_admin.accounts.column_postal_code:"
13
- column_region: ":lesli_admin.accounts.column_region:"
14
- tab_contact: ":lesli_admin.accounts.tab_contact:"
15
- tab_address: ":lesli_admin.accounts.tab_address:"
16
- column_country: ":lesli_admin.accounts.column_country:"
17
- column_address: ":lesli_admin.accounts.column_address:"
18
- column_public_email: ":lesli_admin.accounts.column_public_email:"
19
- column_phone_number: ":lesli_admin.accounts.column_phone_number:"
20
- column_website: ":lesli_admin.accounts.column_website:"
21
- lesli:
22
- shared:
23
- view_discussions: ":lesli.shared.view_discussions:"
24
- button_add_new: ":lesli.shared.button_add_new:"
25
- button_reload: ":lesli.shared.button_reload:"
26
- view_files: ":lesli.shared.view_files:"
27
- view_quick_actions: ":lesli.shared.view_quick_actions:"
28
- button_list: ":lesli.shared.button_list:"
29
- button_save: ":lesli.shared.button_save:"
30
- button_delete: ":lesli.shared.button_delete:"
31
- button_edit: ":lesli.shared.button_edit:"
32
- view_status_active: ":lesli.shared.view_status_active:"
33
- view_status_inactive: ":lesli.shared.view_status_inactive:"
34
- button_settings: ":lesli.shared.button_settings:"
35
- button_show: ":lesli.shared.button_show:"
36
- toolbar_search: ":lesli.shared.toolbar_search:"
37
- application:
38
- navigation_logout: ":lesli.application.navigation_logout:"
39
- navigation_my_profile: ":lesli.application.navigation_my_profile:"
2
+ :it: {}
@@ -1,39 +1,2 @@
1
1
  ---
2
- :pt:
3
- lesli_admin:
4
- accounts:
5
- view_title: ":lesli_admin.accounts.view_title:"
6
- tab_general_information: ":lesli_admin.accounts.tab_general_information:"
7
- column_company_name: ":lesli_admin.accounts.column_company_name:"
8
- column_company_name_legal: ":lesli_admin.accounts.column_company_name_legal:"
9
- view_subtitle_social_media: ":lesli_admin.accounts.view_subtitle_social_media:"
10
- column_city: ":lesli_admin.accounts.column_city:"
11
- column_tag_line: ":lesli_admin.accounts.column_tag_line:"
12
- column_postal_code: ":lesli_admin.accounts.column_postal_code:"
13
- column_region: ":lesli_admin.accounts.column_region:"
14
- tab_contact: ":lesli_admin.accounts.tab_contact:"
15
- tab_address: ":lesli_admin.accounts.tab_address:"
16
- column_country: ":lesli_admin.accounts.column_country:"
17
- column_address: ":lesli_admin.accounts.column_address:"
18
- column_public_email: ":lesli_admin.accounts.column_public_email:"
19
- column_phone_number: ":lesli_admin.accounts.column_phone_number:"
20
- column_website: ":lesli_admin.accounts.column_website:"
21
- lesli:
22
- shared:
23
- view_discussions: ":lesli.shared.view_discussions:"
24
- button_add_new: ":lesli.shared.button_add_new:"
25
- button_reload: ":lesli.shared.button_reload:"
26
- view_files: ":lesli.shared.view_files:"
27
- view_quick_actions: ":lesli.shared.view_quick_actions:"
28
- button_list: ":lesli.shared.button_list:"
29
- button_save: ":lesli.shared.button_save:"
30
- button_delete: ":lesli.shared.button_delete:"
31
- button_edit: ":lesli.shared.button_edit:"
32
- view_status_active: ":lesli.shared.view_status_active:"
33
- view_status_inactive: ":lesli.shared.view_status_inactive:"
34
- button_settings: ":lesli.shared.button_settings:"
35
- button_show: ":lesli.shared.button_show:"
36
- toolbar_search: ":lesli.shared.toolbar_search:"
37
- application:
38
- navigation_logout: ":lesli.application.navigation_logout:"
39
- 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) 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,20 +32,7 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  LesliAdmin::Engine.routes.draw do
34
34
 
35
- # Dashboard alias
36
- root to: "dashboards#show"
37
-
38
- # Dashboard management
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
35
+ Lesli::Routing.mount_dashboard_for(LesliAdmin)
49
36
 
50
37
  resource :account, only: [:show, :update]
51
38
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2024, 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,24 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- class CreateLesliAdminDashboardComponents < ActiveRecord::Migration[6.1]
33
+ class CreateLesliAdminAccounts < ActiveRecord::Migration[6.0]
34
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_admin_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_admin_dashboard_components, :dashboard,
49
- foreign_key: { to_table: :lesli_admin_dashboards },
50
- index: { name: "lesli_admin_dashboard_components_dashboards" }
51
- )
35
+ create_table_lesli_shared_account_10(:lesli_admin)
52
36
  end
53
37
  end
@@ -30,13 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- class CreateLesliAdminAccounts < ActiveRecord::Migration[6.0]
33
+ class CreateLesliAdminDashboards < ActiveRecord::Migration[6.1]
34
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 })
35
+ create_table_lesli_shared_dashboards_10(:lesli_admin)
41
36
  end
42
37
  end
data/db/seeds.rb CHANGED
@@ -31,14 +31,8 @@ Building a better future, one line of code at a time.
31
31
  =end
32
32
 
33
33
 
34
- # IMPORTANT:
35
- # Seed files are only for development, if you need to create default resources
36
- # for production you must use the initializer method in the Engine account model
37
- L2.msg(
38
- "LesliAudit",
39
- "Version: #{LesliAdmin::VERSION}",
40
- "Build: #{LesliAdmin::BUILD}",
41
- "Env: #{Rails.env}")
42
- #load(LesliAdmin::Engine.root.join("db", "seed", "#{ Rails.env.downcase }.rb"))
43
-
34
+ L2.msg("LesliAdmin", "Version: #{LesliAdmin::VERSION}", "Build: #{LesliAdmin::BUILD}")
44
35
 
36
+ if Rails.env.development? || Lesli.config.demo
37
+ #load(LesliAdmin::Engine.root.join("db", "seed", "#{ Rails.env.downcase }.rb"))
38
+ end
@@ -1,4 +1,4 @@
1
1
  module LesliAdmin
2
- VERSION = "0.6.0"
3
- BUILD = "1713121383"
2
+ VERSION = "1.0.0"
3
+ BUILD = "1751336586"
4
4
  end
@@ -0,0 +1,4 @@
1
+
2
+ .lesli.dashboards {
3
+ @import "Lesli/scss/templates/dashboards";
4
+ }
@@ -33,11 +33,12 @@ Building a better future, one line of code at a time.
33
33
 
34
34
  // ·
35
35
  import { onMounted, inject, ref } from "vue"
36
-
36
+ const dayjs = require("dayjs")
37
37
 
38
38
  // ·
39
39
  const url = inject("url")
40
40
  const http = inject("http")
41
+ const date = inject("date")
41
42
 
42
43
 
43
44
  // ·
@@ -59,14 +60,14 @@ onMounted(() => {
59
60
  </lesli-header>
60
61
  <div class="columns is-multiline is-variable is-4 dashboard-components">
61
62
  <div class="column is-3" v-for="lesliVersion in lesliVersions">
62
- <lesli-card>
63
- <h6 class="title is-6 mb-2">
64
- {{ lesliVersion.name }}
65
- </h6>
66
- <p class="p-0 m-0">version: {{ lesliVersion.version }}</p>
67
- <p class="p-0 m-0">buid: {{ lesliVersion.build }}</p>
68
- <p class="p-0 m-0">path: {{ lesliVersion.path }}</p>
69
- </lesli-card>
63
+ <lesli-application-component>
64
+ <h5 class="title is-size-5 mb-2">{{ lesliVersion.name }}</h5>
65
+ <p class="p-0 m-0 has-text-grey has-text-weight-semibold">{{ lesliVersion.description }}</p>
66
+ <hr class="my-2" />
67
+ <p class="p-0 m-0 has-text-weight-medium">Version: {{ lesliVersion.version }}</p>
68
+ <p class="p-0 m-0 has-text-weight-medium">Buid: {{ lesliVersion.build }}</p>
69
+ <p class="p-0 m-0 has-text-weight-medium">Path: {{ lesliVersion.path }}</p>
70
+ </lesli-application-component>
70
71
  </div>
71
72
  </div>
72
73
  </lesli-application-container>