lesli_admin 0.6.0 → 0.6.1

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.
@@ -1,4 +1 @@
1
- /*!********************************************************************************************************************************************************!*\
2
- !*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-7.use[1]!./node_modules/sass-loader/dist/cjs.js!../LesliAdmin/lib/scss/application.scss ***!
3
- \********************************************************************************************************************************************************/
4
1
 
@@ -45,25 +45,25 @@ module LesliAdmin
45
45
  end
46
46
  end
47
47
 
48
- # GET /accounts/new
49
- def new
50
- end
48
+ # # GET /accounts/new
49
+ # def new
50
+ # end
51
51
 
52
- # GET /accounts/1/edit
53
- def edit
54
- end
52
+ # # GET /accounts/1/edit
53
+ # def edit
54
+ # end
55
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
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
67
 
68
68
  # PATCH/PUT /accounts/1
69
69
  # PATCH/PUT /accounts/1.json
@@ -77,15 +77,15 @@ module LesliAdmin
77
77
 
78
78
  # DELETE /accounts/1
79
79
  # DELETE /accounts/1.json
80
- def destroy
81
- return respond_with_not_found unless @account
80
+ # def destroy
81
+ # return respond_with_not_found unless @account
82
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 }
87
- end
88
- end
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 }
87
+ # end
88
+ # end
89
89
 
90
90
  private
91
91
 
@@ -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
@@ -34,6 +34,8 @@
34
34
  button_settings: Settings
35
35
  button_show: Show
36
36
  toolbar_search: Search...
37
+ message_operation_success: Operation completed successfully
38
+ message_operation_error: Operation failed. Please try again.
37
39
  application:
38
40
  navigation_logout: Logout
39
41
  navigation_my_profile: My profile
@@ -34,6 +34,8 @@
34
34
  button_settings: Configuración
35
35
  button_show: Ver
36
36
  toolbar_search: Buscar...
37
+ message_operation_success: Operacion realizada satisfactoriamente
38
+ message_operation_error: Operación fallida. Por favor, inténtelo de nuevo.
37
39
  application:
38
40
  navigation_logout: Cerrar sesión
39
41
  navigation_my_profile: Mi perfil
@@ -34,6 +34,8 @@
34
34
  button_settings: ":lesli.shared.button_settings:"
35
35
  button_show: ":lesli.shared.button_show:"
36
36
  toolbar_search: ":lesli.shared.toolbar_search:"
37
+ message_operation_success: ":lesli.shared.message_operation_success:"
38
+ message_operation_error: ":lesli.shared.message_operation_error:"
37
39
  application:
38
40
  navigation_logout: ":lesli.application.navigation_logout:"
39
41
  navigation_my_profile: ":lesli.application.navigation_my_profile:"
@@ -34,6 +34,8 @@
34
34
  button_settings: ":lesli.shared.button_settings:"
35
35
  button_show: ":lesli.shared.button_show:"
36
36
  toolbar_search: ":lesli.shared.toolbar_search:"
37
+ message_operation_success: ":lesli.shared.message_operation_success:"
38
+ message_operation_error: ":lesli.shared.message_operation_error:"
37
39
  application:
38
40
  navigation_logout: ":lesli.application.navigation_logout:"
39
41
  navigation_my_profile: ":lesli.application.navigation_my_profile:"
@@ -34,6 +34,8 @@
34
34
  button_settings: ":lesli.shared.button_settings:"
35
35
  button_show: ":lesli.shared.button_show:"
36
36
  toolbar_search: ":lesli.shared.toolbar_search:"
37
+ message_operation_success: ":lesli.shared.message_operation_success:"
38
+ message_operation_error: ":lesli.shared.message_operation_error:"
37
39
  application:
38
40
  navigation_logout: ":lesli.application.navigation_logout:"
39
41
  navigation_my_profile: ":lesli.application.navigation_my_profile:"
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) 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
@@ -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
 
@@ -1,4 +1,4 @@
1
1
  module LesliAdmin
2
- VERSION = "0.6.0"
3
- BUILD = "1713121383"
2
+ VERSION = "0.6.1"
3
+ BUILD = "1728877698"
4
4
  end
@@ -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
+ <lesli-application-component>
63
64
  <h6 class="title is-6 mb-2">
64
65
  {{ lesliVersion.name }}
65
66
  </h6>
66
67
  <p class="p-0 m-0">version: {{ lesliVersion.version }}</p>
67
68
  <p class="p-0 m-0">buid: {{ lesliVersion.build }}</p>
68
69
  <p class="p-0 m-0">path: {{ lesliVersion.path }}</p>
69
- </lesli-card>
70
+ </lesli-application-component>
70
71
  </div>
71
72
  </div>
72
73
  </lesli-application-container>
@@ -69,9 +69,9 @@ export const useAccount = defineStore("account", {
69
69
  this.http.patch(this.url.admin("account"), {
70
70
  account: this.account
71
71
  }).then(result => {
72
- this.msg.success(I18n.t("core.users.messages_success_operation"))
72
+ this.msg.success(i18n.t("lesli.shared.message_operation_success"))
73
73
  }).catch(error => {
74
- this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
74
+ this.msg.danger(i18n.t("lesli.shared.message_operation_error"))
75
75
  })
76
76
  },
77
77
  getOptions (){
@@ -20,6 +20,8 @@
20
20
  "button_save": "Save",
21
21
  "button_settings": "Settings",
22
22
  "button_show": "Show",
23
+ "message_operation_error": "Operation failed. Please try again.",
24
+ "message_operation_success": "Operation completed successfully",
23
25
  "toolbar_search": "Search...",
24
26
  "view_discussions": "Discussions",
25
27
  "view_files": "Files",
@@ -70,6 +72,8 @@
70
72
  "button_save": "Guardar",
71
73
  "button_settings": "Configuración",
72
74
  "button_show": "Ver",
75
+ "message_operation_error": "Operación fallida. Por favor, inténtelo de nuevo.",
76
+ "message_operation_success": "Operacion realizada satisfactoriamente",
73
77
  "toolbar_search": "Buscar...",
74
78
  "view_discussions": "Discusiones",
75
79
  "view_files": "Archivos",
@@ -120,6 +124,8 @@
120
124
  "button_save": ":lesli.shared.button_save:",
121
125
  "button_settings": ":lesli.shared.button_settings:",
122
126
  "button_show": ":lesli.shared.button_show:",
127
+ "message_operation_error": ":lesli.shared.message_operation_error:",
128
+ "message_operation_success": ":lesli.shared.message_operation_success:",
123
129
  "toolbar_search": ":lesli.shared.toolbar_search:",
124
130
  "view_discussions": ":lesli.shared.view_discussions:",
125
131
  "view_files": ":lesli.shared.view_files:",
@@ -170,6 +176,8 @@
170
176
  "button_save": ":lesli.shared.button_save:",
171
177
  "button_settings": ":lesli.shared.button_settings:",
172
178
  "button_show": ":lesli.shared.button_show:",
179
+ "message_operation_error": ":lesli.shared.message_operation_error:",
180
+ "message_operation_success": ":lesli.shared.message_operation_success:",
173
181
  "toolbar_search": ":lesli.shared.toolbar_search:",
174
182
  "view_discussions": ":lesli.shared.view_discussions:",
175
183
  "view_files": ":lesli.shared.view_files:",
@@ -220,6 +228,8 @@
220
228
  "button_save": ":lesli.shared.button_save:",
221
229
  "button_settings": ":lesli.shared.button_settings:",
222
230
  "button_show": ":lesli.shared.button_show:",
231
+ "message_operation_error": ":lesli.shared.message_operation_error:",
232
+ "message_operation_success": ":lesli.shared.message_operation_success:",
223
233
  "toolbar_search": ":lesli.shared.toolbar_search:",
224
234
  "view_discussions": ":lesli.shared.view_discussions:",
225
235
  "view_files": ":lesli.shared.view_files:",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-10 00:00:00.000000000 Z
11
+ date: 2024-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails