pg_rails 7.6.21.pre.8 → 7.6.21.pre.10
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.
- checksums.yaml +4 -4
- data/pg_engine/app/controllers/pg_engine/base_controller.rb +4 -2
- data/pg_engine/app/models/account.rb +1 -1
- data/pg_engine/app/models/current.rb +4 -0
- data/pg_engine/app/views/users/accounts/_form.html.slim +1 -1
- data/pg_engine/config/initializers/rollbar.rb +3 -1
- data/pg_engine/lib/pg_engine/configuracion.rb +6 -0
- data/pg_layout/app/javascript/application.js +12 -0
- data/pg_layout/app/views/devise/registrations/edit.html.erb +1 -1
- data/pg_rails/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61d8d262ef0d2d85da44e8c6580a6e52b07edf7e42ebd67043b2fab25a353734
|
4
|
+
data.tar.gz: 789617b6cd87d217773dde9556485e3352e1209c28f9ca3458544c251873bb84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cc7e58e50a5a168d317afda86b9cd7e024b990fef11469574b49ea42568729854baa2658f7d3d0da058fac667db93e2d35805d0d19fd0a92ae9f88a5a5479cb
|
7
|
+
data.tar.gz: d0ab03c2862046efbde505013c57296032b7d1ccd21d6daa08cd7b5b31288de68bb548b1b81c0b1c918cba906bbed986af30ddaf25212fc33fb40b728b626889
|
@@ -80,15 +80,17 @@ module PgEngine
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def no_tenant_set(error)
|
83
|
-
pg_debug(error)
|
84
83
|
return internal_error(error) if Current.user.blank?
|
85
84
|
|
86
85
|
active_user_accounts = ActsAsTenant.without_tenant do
|
87
86
|
Current.user.user_accounts.ua_active.to_a
|
88
87
|
end
|
89
88
|
if active_user_accounts.length == 1 && params[:tid].blank?
|
90
|
-
|
89
|
+
url = url_for(tid: active_user_accounts.first.to_param)
|
90
|
+
pg_warn(error, "redirected to #{url}")
|
91
|
+
redirect_to url
|
91
92
|
else
|
93
|
+
pg_warn(error, 'redirected to users_accounts_path')
|
92
94
|
redirect_to users_accounts_path
|
93
95
|
end
|
94
96
|
end
|
@@ -37,7 +37,7 @@ class Account < ApplicationRecord
|
|
37
37
|
has_many :audits, dependent: :nullify, class_name: 'Audited::Audit'
|
38
38
|
|
39
39
|
has_one_attached :logo do |attachable|
|
40
|
-
attachable.variant :thumb,
|
40
|
+
attachable.variant :thumb, resize_to_fill: [80, 80]
|
41
41
|
end
|
42
42
|
|
43
43
|
ransacker :search do |parent|
|
@@ -87,7 +87,9 @@ Rollbar.configure do |config|
|
|
87
87
|
[]
|
88
88
|
end
|
89
89
|
end
|
90
|
-
|
90
|
+
to_test = item[:level].to_sym
|
91
|
+
to_test = :warn if to_test == :warning
|
92
|
+
acceptable_levels.include?(to_test) ? 'gogoogogooo' : 'ignored'
|
91
93
|
end
|
92
94
|
end
|
93
95
|
end
|
@@ -31,6 +31,12 @@ module PgEngine
|
|
31
31
|
"#{key}__export": base + 80,
|
32
32
|
"#{key}__destroy": base + 100
|
33
33
|
)
|
34
|
+
|
35
|
+
return unless defined? UserAccount
|
36
|
+
|
37
|
+
UserAccount.class_eval do
|
38
|
+
enumerize :profiles, in: PgEngine.configuracion.user_profiles, multiple: true
|
39
|
+
end
|
34
40
|
end
|
35
41
|
|
36
42
|
def profile_groups_options
|
@@ -5,6 +5,7 @@ import './elements'
|
|
5
5
|
import { flashMessage } from './utils/utils'
|
6
6
|
|
7
7
|
import { Turbo } from '@hotwired/turbo-rails'
|
8
|
+
import { Rollbar } from 'rollbar'
|
8
9
|
|
9
10
|
import Trix from 'trix'
|
10
11
|
|
@@ -74,6 +75,17 @@ document.addEventListener('turbo:before-fetch-request', (ev) => {
|
|
74
75
|
ev.detail.fetchOptions.headers.Accept = 'text/html, application/xhtml+xml'
|
75
76
|
}
|
76
77
|
|
78
|
+
const linksToCurrentTid = ev.detail.url.pathname.match('/u/t/current')
|
79
|
+
|
80
|
+
if (linksToCurrentTid) {
|
81
|
+
if (document.querySelector('#tid') && document.querySelector('#tid').dataset.tid) {
|
82
|
+
const tid = document.querySelector('#tid').dataset.tid
|
83
|
+
ev.detail.url.pathname = ev.detail.url.pathname.replace('/u/t/current', '/u/t/' + tid)
|
84
|
+
} else {
|
85
|
+
Rollbar.error('No hay TID')
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
77
89
|
if (document.querySelector('.modal.show')) {
|
78
90
|
ev.detail.fetchOptions.headers['Modal-Opened'] = true
|
79
91
|
}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= f.input :email, required: true, autofocus: true %>
|
6
6
|
<%= f.input :nombre, required: true %>
|
7
7
|
<%= f.input :apellido, required: true %>
|
8
|
-
<%= f.input :avatar %>
|
8
|
+
<%= f.input :avatar, hint: 'Es recomendable que la imagen sea cuadrada' %>
|
9
9
|
|
10
10
|
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
11
11
|
<p><%= t(".currently_waiting_confirmation_for_email", email: resource.unconfirmed_email) %></p>
|
data/pg_rails/lib/version.rb
CHANGED