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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 686c782a19dd3b86046c75ac7ec01619ebfe48f2034a78202187629d0b549109
4
- data.tar.gz: d37da087265f86e72e8eb35676da5b3d86f6c9054a607f34cba59287cd2fd17b
3
+ metadata.gz: b4f6156ab8c2dd7a84a7f7c05b79edd8a16117971770f240d9df6a2077520b41
4
+ data.tar.gz: 25e4cc0e8f236fd58eff011dfcd8552f2fd08fe65a141c41eda336a422e4cd48
5
5
  SHA512:
6
- metadata.gz: ee1e4d4612d52f2cb9e77e1bf622b6d9b0ce3a726356bf1093a0629f35d775a4f26ec19f74f6b9ec00ff8133cc69f98465bf2285e99f0cfa2bb9ede4a36d6b33
7
- data.tar.gz: aead26ec923a49105ccde5e242671f72dab206124a6ea56a98e55f5b0a70dc476659a2ae67ffaaab33d882379f2c8e31f7190f7df785794f5b9cb7b7f976541c
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 /_id\z/, ''
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
@@ -5,4 +5,4 @@
5
5
  h4 Gracias por tu mensaje
6
6
  p.m-0 Te responderemos a la brevedad
7
7
  .col-auto.fs-2
8
- = image_tag 'plantita-sm', width: '30px'
8
+ = image_tag 'plantita-sm.png', width: '30px'
@@ -2,7 +2,7 @@
2
2
 
3
3
  .d-none
4
4
  / Preload
5
- = image_tag 'plantita-sm'
5
+ = image_tag 'plantita-sm.png'
6
6
  .text-center
7
7
  #mensaje_contacto
8
8
  h2 Ponete en contacto
@@ -47,7 +47,7 @@ describe DummyBaseController do
47
47
 
48
48
  it do
49
49
  subject
50
- expect(response).to have_http_status(:ok)
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(:ok)
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(:ok)
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 con position absolute para los toasts
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;
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.70'
4
+ VERSION = '7.0.8-alpha.71'
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.0.8.pre.alpha.70
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