pg_rails 7.0.8.pre.alpha.70 → 7.0.8.pre.alpha.71
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pg_engine/app/controllers/pg_engine/base_controller.rb +4 -3
- data/pg_engine/app/lib/pg_form_builder.rb +1 -1
- data/pg_engine/app/views/public/mensaje_contactos/_gracias.html.slim +1 -1
- data/pg_engine/app/views/public/mensaje_contactos/new.html.slim +1 -1
- data/pg_engine/spec/controllers/pg_engine/base_controller_spec.rb +3 -3
- data/pg_layout/app/views/pg_layout/_flash_container.html.slim +2 -1
- data/pg_rails/dist/types/pg_associable/app/javascript/asociable_controller.d.ts +17 -0
- data/pg_rails/dist/types/pg_layout/app/javascript/utils/utils.d.ts +7 -0
- data/pg_rails/lib/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4f6156ab8c2dd7a84a7f7c05b79edd8a16117971770f240d9df6a2077520b41
|
4
|
+
data.tar.gz: 25e4cc0e8f236fd58eff011dfcd8552f2fd08fe65a141c41eda336a422e4cd48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e0b041666082f62e83941c080ecbf2f6a558d8917ebca54e95bbc7d7668189417a347670cb516ef60f38fbbdefe49b3332d3be94787cca8cdbd84c6c8798b52
|
7
|
+
data.tar.gz: ebf99d77235eab17311d11c90b173b5b3ec9e8c15e0250dec98b6211f834e6452d9c0b7f30f426e529ee6be8ba62ef50853c6be44c918d20fab73a012bd33713
|
@@ -33,11 +33,12 @@ module PgEngine
|
|
33
33
|
|
34
34
|
respond_to do |format|
|
35
35
|
format.html do
|
36
|
-
render 'pg_layout/error', layout: 'pg_layout/containerized'
|
36
|
+
render 'pg_layout/error', layout: 'pg_layout/containerized', status: :internal_server_error
|
37
37
|
end
|
38
38
|
format.turbo_stream do
|
39
39
|
flash.now[:critical] = self.class.render(partial: 'pg_layout/default_error_message')
|
40
|
-
render turbo_stream: (turbo_stream.remove_all('.modal') + render_turbo_stream_flash_messages)
|
40
|
+
render turbo_stream: (turbo_stream.remove_all('.modal') + render_turbo_stream_flash_messages),
|
41
|
+
status: :internal_server_error
|
41
42
|
end
|
42
43
|
end
|
43
44
|
end
|
@@ -101,7 +102,7 @@ module PgEngine
|
|
101
102
|
if request.path == root_path
|
102
103
|
# TODO!: renderear un 500.html y pg_err
|
103
104
|
sign_out(Current.user) if Current.user.present?
|
104
|
-
render plain: 'Acceso no autorizado'
|
105
|
+
render plain: 'Acceso no autorizado', status: :unprocessable_entity
|
105
106
|
else
|
106
107
|
go_back('Acceso no autorizado')
|
107
108
|
end
|
@@ -5,7 +5,7 @@ class PgFormBuilder < SimpleForm::FormBuilder
|
|
5
5
|
include PgEngine::ErrorHelper
|
6
6
|
|
7
7
|
def default_prefix(attribute_name)
|
8
|
-
attribute_name = attribute_name.to_s.sub
|
8
|
+
attribute_name = attribute_name.to_s.sub(/_id\z/, '')
|
9
9
|
at_name_human = object.class.human_attribute_name(attribute_name).downcase
|
10
10
|
"#{articulo(attribute_name)} #{at_name_human}"
|
11
11
|
end
|
@@ -47,7 +47,7 @@ describe DummyBaseController do
|
|
47
47
|
|
48
48
|
it do
|
49
49
|
subject
|
50
|
-
expect(response).to have_http_status(:
|
50
|
+
expect(response).to have_http_status(:internal_server_error)
|
51
51
|
expect(response.body).to include 'Ocurrió algo inesperado'
|
52
52
|
expect(response.body).to include '<html'
|
53
53
|
expect(response.content_type).to include 'text/html'
|
@@ -60,7 +60,7 @@ describe DummyBaseController do
|
|
60
60
|
|
61
61
|
it do
|
62
62
|
subject
|
63
|
-
expect(response).to have_http_status(:
|
63
|
+
expect(response).to have_http_status(:internal_server_error)
|
64
64
|
expect(response.content_type).to include 'text/vnd.turbo-stream.html'
|
65
65
|
expect(response.body).to include 'Ocurrió algo inesperado'
|
66
66
|
expect(response.body).to include '<turbo-stream action="remove" targets=".modal">'
|
@@ -93,7 +93,7 @@ describe DummyBaseController do
|
|
93
93
|
|
94
94
|
it do
|
95
95
|
subject
|
96
|
-
expect(response).to have_http_status(:
|
96
|
+
expect(response).to have_http_status(:unprocessable_entity)
|
97
97
|
expect(response.body).to eq 'Acceso no autorizado'
|
98
98
|
expect(controller).not_to be_user_signed_in
|
99
99
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
#flash-wrapper.d-flex.justify-content-around
|
2
2
|
#flash.flash.position-relative.w-100.d-flex.justify-content-center
|
3
3
|
= render partial: 'pg_layout/flash'
|
4
|
-
/ TODO: si hay varios flashes toast, se superponen. habría que hacer un container
|
4
|
+
/ TODO: si hay varios flashes toast, se superponen. habría que hacer un container
|
5
|
+
con position absolute para los toasts
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Controller } from '@hotwired/stimulus'
|
2
|
+
export default class extends Controller {
|
3
|
+
static outlets: string[]
|
4
|
+
lastValue: any
|
5
|
+
subWrapper: any
|
6
|
+
elemId: any
|
7
|
+
input: any
|
8
|
+
connect(): void;
|
9
|
+
resetResultados(): void;
|
10
|
+
setMaxHeight(): void;
|
11
|
+
crearItem(): void;
|
12
|
+
escribiAlgo(): void;
|
13
|
+
buscando(): void;
|
14
|
+
selectItem(e: any): void;
|
15
|
+
doSearch(force?: boolean): void;
|
16
|
+
completarCampo(object: any): void;
|
17
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export declare function round(value: any): number;
|
2
|
+
export declare function printCurrency(value: any, simboloMoneda?: string): string;
|
3
|
+
export declare function showPercentage(value: any): string;
|
4
|
+
export declare function numberWithDots(x: any): any;
|
5
|
+
export declare function flashMessage(message: any, flashType?: string, toast?: boolean): void;
|
6
|
+
export declare function fadeOut(e: any): void;
|
7
|
+
export declare function fadeIn(e: any): void;
|
data/pg_rails/lib/version.rb
CHANGED
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.0.8.pre.alpha.
|
4
|
+
version: 7.0.8.pre.alpha.71
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
@@ -1102,6 +1102,8 @@ files:
|
|
1102
1102
|
- pg_layout/lib/pg_layout.rb
|
1103
1103
|
- pg_layout/lib/pg_layout/engine.rb
|
1104
1104
|
- pg_layout/spec/lib/navbar_spec.rb
|
1105
|
+
- pg_rails/dist/types/pg_associable/app/javascript/asociable_controller.d.ts
|
1106
|
+
- pg_rails/dist/types/pg_layout/app/javascript/utils/utils.d.ts
|
1105
1107
|
- pg_rails/js/index.js
|
1106
1108
|
- pg_rails/lib/pg_rails.rb
|
1107
1109
|
- pg_rails/lib/pg_rails/capybara_support.rb
|