pg_rails 7.6.24.pre.5 → 7.6.25
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/assets/stylesheets/nav_toolbar.scss +10 -0
- data/pg_engine/app/assets/stylesheets/{pg_rails_b5.scss → pg_engine.scss} +6 -3
- data/pg_engine/app/assets/stylesheets/tables.scss +29 -0
- data/pg_engine/app/assets/stylesheets/tom_select.scss +16 -0
- data/pg_engine/app/components/flash_container_component.rb +3 -1
- data/pg_engine/app/controllers/users/confirmations_controller.rb +1 -0
- data/pg_engine/app/controllers/users/registrations_controller.rb +7 -0
- data/pg_engine/app/lib/pg_form_builder.rb +6 -0
- data/pg_engine/app/models/user.rb +1 -1
- data/pg_engine/config/locales/es.yml +3 -3
- data/pg_engine/config/routes.rb +3 -0
- data/pg_engine/spec/system/signup_spec.rb +3 -12
- data/pg_layout/app/views/devise/registrations/_signup_info.html.slim +1 -0
- data/pg_layout/app/views/devise/registrations/new.html.erb +25 -23
- data/pg_rails/lib/version.rb +1 -1
- data/pg_rails/scss/pg_rails.scss +9 -60
- metadata +8 -4
- /data/{pg_rails/scss → pg_engine/app/assets/stylesheets}/border_radius.scss +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18003c61fd4e38fc6e7a70402aa0eaba4f335390e50061b1569bbea56c604a83
|
4
|
+
data.tar.gz: f2732b2e071e3672cc8e4b6d16e2e577f7b6bf3590a8a6c3d76ef45215bdb67f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9953c023fe35b70091a3ddc70b4a49f8cc7975476388835f1a0c7b286132afa68c4f5eaf35b6b1e80345fb2ff20251c35b9e238293b43cb217e445e226080598
|
7
|
+
data.tar.gz: 39911c247bdd17a3828a378478d03bb4027326b9c9b72d9ad5c0db1dc1b0e4d491dc6b2e37d899a02043a3446818feb304969c4a828b91dc3f7bf9a0adcf89c6
|
@@ -0,0 +1,10 @@
|
|
1
|
+
// Buttons border in nav toolbar
|
2
|
+
$warning-border-emphasis: shade-color($yellow, 60%);
|
3
|
+
.btn-toolbar .btn-warning {
|
4
|
+
border: 1px solid $warning-border-emphasis;
|
5
|
+
}
|
6
|
+
|
7
|
+
$light-border-emphasis: shade-color($light, 60%);
|
8
|
+
.btn-toolbar .btn-light {
|
9
|
+
border: 1px solid $light-border-emphasis;
|
10
|
+
}
|
@@ -1,8 +1,5 @@
|
|
1
1
|
@use 'sass:color';
|
2
2
|
|
3
|
-
@import 'notifications';
|
4
|
-
|
5
|
-
|
6
3
|
:root,
|
7
4
|
[data-bs-theme=light] {
|
8
5
|
--bs-form-invalid-color: #b50000;
|
@@ -19,6 +16,12 @@ nav[aria-label=breadcrumb] a {
|
|
19
16
|
display: inline-block;
|
20
17
|
}
|
21
18
|
|
19
|
+
// Signup
|
20
|
+
|
21
|
+
#form-signup .form-inputs abbr {
|
22
|
+
display: none;
|
23
|
+
}
|
24
|
+
|
22
25
|
// FORMS
|
23
26
|
|
24
27
|
// Radio buttons
|
@@ -0,0 +1,29 @@
|
|
1
|
+
// Column truncate
|
2
|
+
$values: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100;
|
3
|
+
|
4
|
+
@for $i from 1 through length($values) {
|
5
|
+
$value: nth($values, $i);
|
6
|
+
$perc: #{percenage($value)};
|
7
|
+
|
8
|
+
.column-truncate-#{$value} {
|
9
|
+
max-width: 0;
|
10
|
+
width: percentage($value * 0.01);
|
11
|
+
overflow: hidden;
|
12
|
+
text-overflow: ellipsis;
|
13
|
+
white-space: nowrap;
|
14
|
+
min-width: 30em * $value * 0.01;
|
15
|
+
|
16
|
+
// TODO: con css grid esto se debería poder hacer mejor
|
17
|
+
// además, el pg_asociable directamente se rompe
|
18
|
+
&:has(form) {
|
19
|
+
min-width: 28em;
|
20
|
+
overflow: initial;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
// Table row clickable
|
26
|
+
// .listado tr:has(td:hover):has(.bi-eye-fill) td {
|
27
|
+
// background-color: #f2f2f2;
|
28
|
+
// cursor: pointer;
|
29
|
+
// }
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Tom Select
|
2
|
+
.ts-control {
|
3
|
+
padding-top: 2px!important;
|
4
|
+
padding-bottom: 2px!important;
|
5
|
+
display: flex;
|
6
|
+
gap: 4px;
|
7
|
+
}
|
8
|
+
.input-group-sm > .ts-wrapper.multi.has-items .ts-control, .ts-wrapper.form-select-sm.multi.has-items .ts-control, .ts-wrapper.form-control-sm.multi.has-items .ts-control {
|
9
|
+
padding-top: 2px!important;
|
10
|
+
}
|
11
|
+
.ts-wrapper.multi .ts-control > div {
|
12
|
+
margin: 0!important;
|
13
|
+
}
|
14
|
+
.ts-control:not(.rtl) {
|
15
|
+
padding-right: 0.75rem !important;
|
16
|
+
}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
class FlashContainerComponent < ViewComponent::Base
|
2
|
+
# z-1 es para que no se superponga con el dropdown de la navbar,
|
3
|
+
# ya que sticky-top setea un z-index de 1020 y el del dropdown es de 1000
|
2
4
|
erb_template <<~HTML
|
3
|
-
<div id="flash-container" class="d-flex justify-content-around sticky-top">
|
5
|
+
<div id="flash-container" class="d-flex justify-content-around sticky-top z-1">
|
4
6
|
<div id="flash" class="flash position-relative w-100 d-flex justify-content-center">
|
5
7
|
<%= content || render(partial: 'pg_layout/flash') %>
|
6
8
|
</div>
|
@@ -4,6 +4,13 @@ module Users
|
|
4
4
|
authorize resource, nil, policy_class: UserRegistrationPolicy
|
5
5
|
end
|
6
6
|
|
7
|
+
# GET /resource/sign_up
|
8
|
+
def new
|
9
|
+
build_resource(accept_terms: true)
|
10
|
+
yield resource if block_given?
|
11
|
+
respond_with resource
|
12
|
+
end
|
13
|
+
|
7
14
|
def create
|
8
15
|
build_resource(sign_up_params)
|
9
16
|
|
@@ -23,6 +23,12 @@ class PgFormBuilder < SimpleForm::FormBuilder
|
|
23
23
|
def input(attribute_name, options = {}, &)
|
24
24
|
options[:error_prefix] ||= default_prefix(attribute_name)
|
25
25
|
|
26
|
+
# Bootstraps's floating labels require an empty placeholder attribute
|
27
|
+
merged_wrapper = self.options[:wrapper].to_s + options[:wrapper].to_s
|
28
|
+
if merged_wrapper.include?('floating')
|
29
|
+
options[:placeholder] = ''
|
30
|
+
end
|
31
|
+
|
26
32
|
super
|
27
33
|
end
|
28
34
|
|
@@ -66,7 +66,7 @@ class User < ApplicationRecord
|
|
66
66
|
|
67
67
|
has_many :notifications, as: :recipient, class_name: 'Noticed::Notification'
|
68
68
|
|
69
|
-
validates :nombre, :apellido, presence: true
|
69
|
+
# validates :nombre, :apellido, presence: true
|
70
70
|
|
71
71
|
has_one_attached :avatar do |attachable|
|
72
72
|
attachable.variant :thumb, resize_to_fill: [80, 80]
|
@@ -43,7 +43,7 @@ es:
|
|
43
43
|
confirmed_at: Fecha de confirmación
|
44
44
|
actualizado_por: Actualizado por
|
45
45
|
creado_por: Creado por
|
46
|
-
accept_terms: Acepto los <a href="/terminos_y_condiciones" target="_blank">
|
46
|
+
accept_terms: Acepto los <a href="/terminos_y_condiciones" target="_blank">términos y condiciones</a>
|
47
47
|
enumerize:
|
48
48
|
user_account:
|
49
49
|
membership_status:
|
@@ -117,7 +117,7 @@ es:
|
|
117
117
|
header: "Aceptar invitación"
|
118
118
|
submit_button: "Aceptar"
|
119
119
|
confirmations:
|
120
|
-
confirmed: ¡
|
120
|
+
confirmed: ¡Bien! Ahora tu cuenta está confirmada
|
121
121
|
sessions:
|
122
122
|
signed_in: ''
|
123
123
|
signed_out: ''
|
@@ -128,7 +128,7 @@ es:
|
|
128
128
|
unauthenticated: ''
|
129
129
|
invited: "Tenés una invitación pendiente en tu correo electrónico"
|
130
130
|
registrations:
|
131
|
-
signed_up_but_unconfirmed:
|
131
|
+
signed_up_but_unconfirmed: Por favor, revisá en tu bandeja de entrada las instrucciones para confirmar tu cuenta.
|
132
132
|
new:
|
133
133
|
sign_up: Crear una cuenta
|
134
134
|
passwords:
|
data/pg_engine/config/routes.rb
CHANGED
@@ -35,6 +35,9 @@ Rails.application.routes.draw do
|
|
35
35
|
root to: 'accounts#index'
|
36
36
|
end
|
37
37
|
|
38
|
+
# User root for devise's signed_in_root_path
|
39
|
+
get '/u', to: 'accounts#index', as: :user_root
|
40
|
+
|
38
41
|
namespace :tenant, path: 'u/t(/:tid)' do
|
39
42
|
pg_resource(:user_accounts, only: [:index, :show, :edit, :update, :destroy])
|
40
43
|
scope controller: 'inline_edit', path: 'inline', as: :inline do
|
@@ -18,10 +18,7 @@ describe 'Al Registrarse' do
|
|
18
18
|
perform_enqueued_jobs do
|
19
19
|
visit '/users/sign_up'
|
20
20
|
fill_in 'user_email', with: Faker::Internet.email
|
21
|
-
fill_in 'user_nombre', with: Faker::Name.name
|
22
|
-
fill_in 'user_apellido', with: Faker::Name.name
|
23
21
|
fill_in 'user_password', with: 'admin123'
|
24
|
-
fill_in 'user_password_confirmation', with: 'admin123'
|
25
22
|
|
26
23
|
accept_terms
|
27
24
|
|
@@ -31,7 +28,7 @@ describe 'Al Registrarse' do
|
|
31
28
|
|
32
29
|
context 'cuando acepta los términos' do
|
33
30
|
let(:accept_terms) do
|
34
|
-
|
31
|
+
nil
|
35
32
|
end
|
36
33
|
|
37
34
|
it 'guarda el user' do
|
@@ -39,13 +36,13 @@ describe 'Al Registrarse' do
|
|
39
36
|
ActsAsTenant.without_tenant do
|
40
37
|
expect(Account.last.owner).to eq User.last
|
41
38
|
end
|
42
|
-
expect(page).to have_text('
|
39
|
+
expect(page).to have_text('las instrucciones para confirmar')
|
43
40
|
end
|
44
41
|
end
|
45
42
|
|
46
43
|
context 'si no acepta los terms' do
|
47
44
|
let(:accept_terms) do
|
48
|
-
|
45
|
+
uncheck 'user_accept_terms'
|
49
46
|
end
|
50
47
|
|
51
48
|
it do
|
@@ -77,12 +74,6 @@ describe 'Al Registrarse' do
|
|
77
74
|
end
|
78
75
|
end
|
79
76
|
|
80
|
-
# drivers = %i[
|
81
|
-
# selenium_headless
|
82
|
-
# selenium_chrome_headless
|
83
|
-
# selenium_chrome_headless_notebook
|
84
|
-
# selenium_chrome_headless_iphone
|
85
|
-
# ]
|
86
77
|
drivers = %i[selenium_chrome_headless_iphone]
|
87
78
|
drivers = [ENV['DRIVER'].to_sym] if ENV['DRIVER'].present?
|
88
79
|
|
@@ -0,0 +1 @@
|
|
1
|
+
p Creá tu cuenta!
|
@@ -1,27 +1,29 @@
|
|
1
|
-
<
|
2
|
-
<div
|
3
|
-
|
4
|
-
|
5
|
-
<%= f.input :nombre, required: true, autofocus: true %>
|
6
|
-
<%= f.input :apellido, required: true %>
|
7
|
-
<%= f.input :email,
|
8
|
-
required: true,
|
9
|
-
input_html: { autocomplete: "email" }%>
|
10
|
-
<%= f.input :password,
|
11
|
-
required: true,
|
12
|
-
hint: (t('devise.shared.minimum_password_length', count: @minimum_password_length) if @minimum_password_length),
|
13
|
-
input_html: { autocomplete: "new-password" } %>
|
14
|
-
<%= f.input :password_confirmation,
|
15
|
-
required: true,
|
16
|
-
input_html: { autocomplete: "new-password" } %>
|
17
|
-
<%= f.input :accept_terms, as: :boolean, label: t('attributes.accept_terms').html_safe, error_prefix: '' %>
|
1
|
+
<div class="container mt-5" style="max-width: 80em">
|
2
|
+
<div class="row flex-wrap-reverse">
|
3
|
+
<div class="col-sm">
|
4
|
+
<%= render partial: 'signup_info' %>
|
18
5
|
</div>
|
6
|
+
<div class="col-sm">
|
7
|
+
<div class="position-sticky z-1" style="top: 0.5em">
|
8
|
+
<h1 class="mb-4">Creá tu cuenta</h1>
|
9
|
+
<%# #form-signup se reemplaza por el mensaje de revisar la bandeja de entrada %>
|
10
|
+
<div class="text-center" id="form-signup" data-controller="pg_form">
|
11
|
+
<%= pg_form_for(resource, as: resource_name, url: registration_path(resource_name), wrapper: :floating_labels_form) do |f| %>
|
12
|
+
<div class="form-inputs m-auto d-inline-block" style="max-width: 20em">
|
13
|
+
<%= f.input :email, label: 'Tu email', input_html: { class: 'form-control-lg', autocomplete: "email" }%>
|
14
|
+
<%= f.input :password, label: 'Elegí una contraseña',
|
15
|
+
input_html: { class: 'form-control-lg', autocomplete: "new-password" } %>
|
16
|
+
<%= f.input :accept_terms, as: :boolean, label: t('attributes.accept_terms').html_safe, error_prefix: '', wrapper_html: { class: 'justify-content-center' } %>
|
17
|
+
</div>
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
<div class="form-actions">
|
20
|
+
<%= f.button :submit, 'Registrarme' %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
24
23
|
|
25
|
-
|
24
|
+
<%= render "devise/shared/links" %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
26
29
|
</div>
|
27
|
-
|
data/pg_rails/lib/version.rb
CHANGED
data/pg_rails/scss/pg_rails.scss
CHANGED
@@ -4,71 +4,20 @@ $font-size-base: 0.9rem;
|
|
4
4
|
@import 'bootstrap_pre';
|
5
5
|
@import 'bootstrap_overrides';
|
6
6
|
@import 'bootstrap_post';
|
7
|
-
@import 'border_radius';
|
8
|
-
|
9
|
-
@import './../../pg_engine/app/assets/stylesheets/pg_rails_b5';
|
10
|
-
@import './../../pg_associable/app/assets/stylesheets/pg_associable';
|
11
|
-
@import './../../pg_layout/app/assets/stylesheets/sidebar';
|
12
|
-
@import './../../pg_layout/app/assets/stylesheets/animations';
|
13
7
|
|
14
8
|
@import 'bootstrap-icons/font/bootstrap-icons';
|
15
9
|
|
16
10
|
@import 'trix/dist/trix';
|
17
11
|
@import 'tom-select/dist/scss/tom-select.bootstrap5';
|
18
12
|
|
19
|
-
|
20
|
-
.ts-control {
|
21
|
-
padding-top: 2px!important;
|
22
|
-
padding-bottom: 2px!important;
|
23
|
-
display: flex;
|
24
|
-
gap: 4px;
|
25
|
-
}
|
26
|
-
.input-group-sm > .ts-wrapper.multi.has-items .ts-control, .ts-wrapper.form-select-sm.multi.has-items .ts-control, .ts-wrapper.form-control-sm.multi.has-items .ts-control {
|
27
|
-
padding-top: 2px!important;
|
28
|
-
}
|
29
|
-
.ts-wrapper.multi .ts-control > div {
|
30
|
-
margin: 0!important;
|
31
|
-
}
|
32
|
-
.ts-control:not(.rtl) {
|
33
|
-
padding-right: 0.75rem !important;
|
34
|
-
}
|
35
|
-
|
36
|
-
// Column truncate
|
37
|
-
$values: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100;
|
38
|
-
|
39
|
-
@for $i from 1 through length($values) {
|
40
|
-
$value: nth($values, $i);
|
41
|
-
$perc: #{percenage($value)};
|
42
|
-
|
43
|
-
.column-truncate-#{$value} {
|
44
|
-
max-width: 0;
|
45
|
-
width: percentage($value * 0.01);
|
46
|
-
overflow: hidden;
|
47
|
-
text-overflow: ellipsis;
|
48
|
-
white-space: nowrap;
|
49
|
-
min-width: 30em * $value * 0.01;
|
50
|
-
|
51
|
-
// TODO: con css grid esto se debería poder hacer mejor
|
52
|
-
// además, el pg_asociable directamente se rompe
|
53
|
-
&:has(form) {
|
54
|
-
min-width: 28em;
|
55
|
-
overflow: initial;
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
// Buttons border in nav toolbar
|
61
|
-
$warning-border-emphasis: shade-color($yellow, 60%);
|
62
|
-
.btn-toolbar .btn-warning {
|
63
|
-
border: 1px solid $warning-border-emphasis;
|
64
|
-
}
|
13
|
+
@import './../../pg_associable/app/assets/stylesheets/pg_associable';
|
65
14
|
|
66
|
-
|
67
|
-
|
68
|
-
border: 1px solid $light-border-emphasis;
|
69
|
-
}
|
15
|
+
@import './../../pg_layout/app/assets/stylesheets/sidebar';
|
16
|
+
@import './../../pg_layout/app/assets/stylesheets/animations';
|
70
17
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
18
|
+
@import './../../pg_engine/app/assets/stylesheets/pg_engine';
|
19
|
+
@import './../../pg_engine/app/assets/stylesheets/notifications';
|
20
|
+
@import './../../pg_engine/app/assets/stylesheets/border_radius';
|
21
|
+
@import './../../pg_engine/app/assets/stylesheets/tom_select';
|
22
|
+
@import './../../pg_engine/app/assets/stylesheets/tables';
|
23
|
+
@import './../../pg_engine/app/assets/stylesheets/nav_toolbar';
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.6.
|
4
|
+
version: 7.6.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -685,8 +685,12 @@ files:
|
|
685
685
|
- pg_engine/app/assets/javascripts/active_admin.js
|
686
686
|
- pg_engine/app/assets/stylesheets/actiontext.css
|
687
687
|
- pg_engine/app/assets/stylesheets/active_admin.scss
|
688
|
+
- pg_engine/app/assets/stylesheets/border_radius.scss
|
689
|
+
- pg_engine/app/assets/stylesheets/nav_toolbar.scss
|
688
690
|
- pg_engine/app/assets/stylesheets/notifications.scss
|
689
|
-
- pg_engine/app/assets/stylesheets/
|
691
|
+
- pg_engine/app/assets/stylesheets/pg_engine.scss
|
692
|
+
- pg_engine/app/assets/stylesheets/tables.scss
|
693
|
+
- pg_engine/app/assets/stylesheets/tom_select.scss
|
690
694
|
- pg_engine/app/components/alert_component.html.slim
|
691
695
|
- pg_engine/app/components/alert_component.rb
|
692
696
|
- pg_engine/app/components/asociable_modal_component.html.slim
|
@@ -1016,6 +1020,7 @@ files:
|
|
1016
1020
|
- pg_layout/app/views/devise/mailer/unlock_instructions.html.erb
|
1017
1021
|
- pg_layout/app/views/devise/passwords/edit.html.erb
|
1018
1022
|
- pg_layout/app/views/devise/passwords/new.html.erb
|
1023
|
+
- pg_layout/app/views/devise/registrations/_signup_info.html.slim
|
1019
1024
|
- pg_layout/app/views/devise/registrations/edit.html.erb
|
1020
1025
|
- pg_layout/app/views/devise/registrations/new.html.erb
|
1021
1026
|
- pg_layout/app/views/devise/sessions/new.html.erb
|
@@ -1065,7 +1070,6 @@ files:
|
|
1065
1070
|
- pg_rails/scss/bootstrap_overrides.scss
|
1066
1071
|
- pg_rails/scss/bootstrap_post.scss
|
1067
1072
|
- pg_rails/scss/bootstrap_pre.scss
|
1068
|
-
- pg_rails/scss/border_radius.scss
|
1069
1073
|
- pg_rails/scss/pg_rails.scss
|
1070
1074
|
- pg_scaffold/lib/generators/pg_active_record/model/model_generator.rb
|
1071
1075
|
- pg_scaffold/lib/generators/pg_active_record/model/templates/admin.rb
|
File without changes
|