pg_rails 7.0.8.pre.alpha.69 → 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: e761068c4438801df99438fc4420e4afad03320461ae0cef05dee8140c9b10f9
4
- data.tar.gz: af3175fe0c8ebb13f3462b2410d3008c9daa34136253ad337cebee295d3aa953
3
+ metadata.gz: b4f6156ab8c2dd7a84a7f7c05b79edd8a16117971770f240d9df6a2077520b41
4
+ data.tar.gz: 25e4cc0e8f236fd58eff011dfcd8552f2fd08fe65a141c41eda336a422e4cd48
5
5
  SHA512:
6
- metadata.gz: fbab7d3534ab2b8a8bec86b0fce534f556cf8383bc77c7edf6918ee1e6e39915b6182e2d4d8a9fdda3647fe606c8e461a820e5de450332640de18d675173743d
7
- data.tar.gz: 3304f09d8a1d1db68d93e7fa47f442c34c8f0acca8bbbc195a2c6878146e9da3cc55abadad849414055e051d9dce0e84b7e326be2abd1d39073abb3797c5f20d
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
@@ -49,7 +49,7 @@ export function flashMessage (message, flashType = 'warning', toast = false) {
49
49
 
50
50
  el.innerHTML = `
51
51
  <div class="alert alert-dismissible mt-2 d-flex align-items-center alert-${alertClassSuffix} ${toastClasses}"
52
- data-turbo-temporary="true" data-bs-autohide="false" aria-live="assertive" aria-atomic="true" role="alert">
52
+ data-turbo-temporary="true" data-bs-autohide="true" aria-live="assertive" aria-atomic="true" role="alert">
53
53
 
54
54
  <span class="${iconClasses}"></span>
55
55
  ${message}
@@ -1,3 +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
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.69'
4
+ VERSION = '7.0.8-alpha.71'
5
5
  end
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.0.8.pre.alpha.69
4
+ version: 7.0.8.pre.alpha.71
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: 2024-05-13 00:00:00.000000000 Z
11
+ date: 2024-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -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