pg_rails 7.6.21.pre.9 → 7.6.21.pre.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63f1e288e7ae63d4dcbe6ad4f867e1dac603788f261936d8e4f824d8bb6f06c3
4
- data.tar.gz: 8a1d084833cb47974dd8e49afb43b6db481f02ecb5d2d4d1d824c94dba0d4c1c
3
+ metadata.gz: 61d8d262ef0d2d85da44e8c6580a6e52b07edf7e42ebd67043b2fab25a353734
4
+ data.tar.gz: 789617b6cd87d217773dde9556485e3352e1209c28f9ca3458544c251873bb84
5
5
  SHA512:
6
- metadata.gz: f98bc54a139f85bc9129134a77738c78eb4adc347398acbe5c4d12f93bddff5ad324479d87bdfcd4861d2ffcbbefb4c162636392d8a9c91837196635ebe71c55
7
- data.tar.gz: c3089b66fba022d22c4c876344ae0360291c090464f44fc3865fc74b7f434efd202687fe54be256909e1ced1f04a4d87cf3a10c2e55d39b6b66c337b1b0393a3
6
+ metadata.gz: 6cc7e58e50a5a168d317afda86b9cd7e024b990fef11469574b49ea42568729854baa2658f7d3d0da058fac667db93e2d35805d0d19fd0a92ae9f88a5a5479cb
7
+ data.tar.gz: d0ab03c2862046efbde505013c57296032b7d1ccd21d6daa08cd7b5b31288de68bb548b1b81c0b1c918cba906bbed986af30ddaf25212fc33fb40b728b626889
@@ -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, resize_and_pad: [80, 80]
40
+ attachable.variant :thumb, resize_to_fill: [80, 80]
41
41
  end
42
42
 
43
43
  ransacker :search do |parent|
@@ -17,6 +17,10 @@ class Current < ActiveSupport::CurrentAttributes
17
17
  active_user_account.to_param
18
18
  end
19
19
 
20
+ def tid!
21
+ tid || 'current'
22
+ end
23
+
20
24
  def active_user_profiles
21
25
  if active_user_account.present?
22
26
  active_user_account.profiles
@@ -2,6 +2,6 @@ div style="max-width: 22em"
2
2
  = pg_form_for(@account || object) do |f|
3
3
  = f.input :nombre
4
4
  / = f.input :plan
5
- = f.input :logo
5
+ = f.input :logo, hint: 'Es recomendable que la imagen sea cuadrada'
6
6
  .mt-2
7
7
  = f.button :submit
@@ -87,7 +87,9 @@ Rollbar.configure do |config|
87
87
  []
88
88
  end
89
89
  end
90
- acceptable_levels.include?(item[:level].to_sym) ? 'gogoogogooo' : 'ignored'
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>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.6.21-9'
4
+ VERSION = '7.6.21-10'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.6.21.pre.9
4
+ version: 7.6.21.pre.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso