pg_rails 7.6.23 → 7.6.24.pre.3
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/pg_rails_b5.scss +0 -9
- data/pg_engine/app/components/inline_edit/inline_component.rb +1 -11
- data/pg_engine/app/helpers/pg_engine/index_helper.rb +17 -8
- data/pg_engine/app/views/layouts/_logo.html.slim +1 -0
- data/pg_engine/app/views/pg_engine/base/download.xlsx.axlsx +10 -4
- data/pg_engine/lib/pg_engine/test/dummy_brand.rb +3 -3
- data/pg_engine/spec/requests/resource_spec.rb +12 -0
- data/pg_layout/app/javascript/application.js +1 -1
- data/pg_layout/app/javascript/controllers/index-landing.js +19 -0
- data/pg_layout/app/javascript/landing.js +3 -0
- data/pg_layout/app/views/layouts/pg_layout/base.html.slim +1 -1
- data/pg_rails/js/landing.js +1 -0
- data/pg_rails/lib/version.rb +1 -1
- data/pg_rails/scss/bootstrap_pre.scss +34 -0
- data/pg_rails/scss/border_radius.scss +8 -0
- data/pg_rails/scss/pg_rails.scss +4 -32
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 515caff33953b3d9a058e092be6152c0e9da6ca0fe740075c5fca7833bc39644
|
4
|
+
data.tar.gz: 4ed2e3e33a0c6d39461c20f7a616c04f182c909f557125739bb065d4e92f58e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5715a8c111e862a1e560f1e095b4f601700f841a2bdb76dad9594c33774b9c5d369947a553a63d5a12ddd0240f2c09380f6e04baee3db28715ae56e5f2ffbccb
|
7
|
+
data.tar.gz: d96915a2c9aaf4210491829e80ecb0785d706375f9a3610e38676c9e1708dc01db22b89e5f8a4a6daad49ef934b6e3147a4b13a00cdabe4cd6f0adcbb23e9d1b
|
@@ -152,15 +152,6 @@ input[type=datetime-local], input[type=datetime] {
|
|
152
152
|
@extend .bg-primary;
|
153
153
|
}
|
154
154
|
|
155
|
-
// Root variables
|
156
|
-
:root {
|
157
|
-
--bs-border-radius-sm: 0.06rem;
|
158
|
-
--bs-border-radius: 0.1rem;
|
159
|
-
--bs-border-radius-lg: 0.25rem;
|
160
|
-
--bs-border-radius-xl: 0.45rem;
|
161
|
-
--bs-border-radius-xxl: 0.6rem;
|
162
|
-
--bs-border-color: #a7b7bb;
|
163
|
-
}
|
164
155
|
|
165
156
|
// Alerts
|
166
157
|
.alert-dismissible {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
class InlineComponent < ViewComponent::Base
|
2
|
+
include PgEngine::IndexHelper
|
2
3
|
def initialize(model, attribute)
|
3
4
|
@model = model
|
4
5
|
@attribute = attribute
|
@@ -7,15 +8,4 @@ class InlineComponent < ViewComponent::Base
|
|
7
8
|
|
8
9
|
super
|
9
10
|
end
|
10
|
-
|
11
|
-
SUFIJOS = %i[f text].freeze
|
12
|
-
def unsuffixed(attribute)
|
13
|
-
ret = attribute.to_s.dup
|
14
|
-
|
15
|
-
SUFIJOS.each do |sufijo|
|
16
|
-
ret.gsub!(/_#{sufijo}$/, '')
|
17
|
-
end
|
18
|
-
|
19
|
-
ret
|
20
|
-
end
|
21
11
|
end
|
@@ -8,20 +8,29 @@ module PgEngine
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
+
SUFIJOS = %i[f text].freeze
|
12
|
+
def unsuffixed(attribute, sufijos = SUFIJOS)
|
13
|
+
ret = attribute.to_s.dup
|
14
|
+
|
15
|
+
sufijos.each do |sufijo|
|
16
|
+
ret.gsub!(/_#{sufijo}$/, '')
|
17
|
+
end
|
18
|
+
|
19
|
+
ret
|
20
|
+
end
|
21
|
+
|
22
|
+
def unsuffixed_for_export(attribute)
|
23
|
+
unsuffixed(attribute, %i[f])
|
24
|
+
end
|
25
|
+
|
11
26
|
def encabezado(input, options = {})
|
12
27
|
if input.is_a? Array
|
13
|
-
campo = input.first
|
28
|
+
campo = unsuffixed(input.first)
|
14
29
|
sort_field = input.last
|
15
30
|
else
|
16
|
-
campo = sort_field = input
|
17
|
-
sort_field = sort_field.to_s.sub(/_f\z/, '')
|
18
|
-
sort_field = sort_field.to_s.sub(/_text\z/, '')
|
31
|
+
campo = sort_field = unsuffixed(input)
|
19
32
|
end
|
20
33
|
|
21
|
-
# Unsuffixed
|
22
|
-
campo = campo.to_s.sub(/_f\z/, '')
|
23
|
-
campo = campo.to_s.sub(/_text\z/, '')
|
24
|
-
|
25
34
|
clase = options[:clase] || @clase_modelo
|
26
35
|
|
27
36
|
human_name = scoped_human_attr_name(clase, campo, 'listado_header')
|
@@ -1,16 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
wb = xlsx_package.workbook
|
4
|
+
|
5
|
+
title = wb.styles.add_style(
|
6
|
+
b: true, sz: 13, bg_color: '1a172f', fg_color: 'ebebeb'
|
7
|
+
# alignment: { horizontal: :center, vertical: :center }
|
8
|
+
)
|
9
|
+
|
4
10
|
wb.add_worksheet(name: @clase_modelo.nombre_plural) do |sheet|
|
5
11
|
headers = atributos_para_listar.map { |a, _sort_by| @clase_modelo.human_attribute_name(a) }
|
6
|
-
headers.
|
7
|
-
sheet.add_row(headers)
|
12
|
+
headers.append 'ID interno'
|
13
|
+
sheet.add_row(headers, style: headers.map { title })
|
8
14
|
|
9
15
|
@collection.decorate.each do |object|
|
10
16
|
array = atributos_para_listar.map do |att, _sort_by|
|
11
|
-
object.send(att)
|
17
|
+
object.send(unsuffixed_for_export(att))
|
12
18
|
end
|
13
|
-
array.
|
19
|
+
array.append object.to_key
|
14
20
|
sheet.add_row array
|
15
21
|
end
|
16
22
|
end
|
@@ -7,9 +7,9 @@ module PgEngine
|
|
7
7
|
@default_site_brand = :factura
|
8
8
|
|
9
9
|
@options = {
|
10
|
-
landing_site_url: {
|
11
|
-
procura: 'https://bien.com.ar
|
12
|
-
factura: 'https://bien.com.ar
|
10
|
+
landing_site_url: { # Se usa en el footer de los mails
|
11
|
+
procura: 'https://procura.bien.com.ar',
|
12
|
+
factura: 'https://factura.bien.com.ar'
|
13
13
|
},
|
14
14
|
logo_navbar_url: {
|
15
15
|
procura: 'test/procura-logo-navbar-1.png',
|
@@ -80,4 +80,16 @@ describe 'Resources', :tpath_req do
|
|
80
80
|
expect { subject }.to change { cosa.reload.discarded_at }.to(be_nil)
|
81
81
|
end
|
82
82
|
end
|
83
|
+
|
84
|
+
describe '#download' do
|
85
|
+
subject do
|
86
|
+
get '/u/t/cosas.xlsx'
|
87
|
+
end
|
88
|
+
|
89
|
+
it do
|
90
|
+
subject
|
91
|
+
expect(response.content_type).to eq 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
92
|
+
expect(response).to be_successful
|
93
|
+
end
|
94
|
+
end
|
83
95
|
end
|
@@ -37,7 +37,7 @@ window.addEventListener('trix-file-accept', function (event) {
|
|
37
37
|
const maxFileSize = 1024 * 1024 * 10 // 10MB
|
38
38
|
if (event.file.size > maxFileSize) {
|
39
39
|
event.preventDefault()
|
40
|
-
flashMessage('
|
40
|
+
flashMessage('El tamaño máximo por archivo es de 10MB', 'warning')
|
41
41
|
}
|
42
42
|
})
|
43
43
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { application } from './application'
|
2
|
+
|
3
|
+
import NavbarController from './navbar_controller'
|
4
|
+
import FadeinOnloadController from './fadein_onload_controller'
|
5
|
+
import ClearTimeoutController from './clear_timeout_controller'
|
6
|
+
import SwitcherController from './switcher_controller'
|
7
|
+
import ThemeController from './theme_controller'
|
8
|
+
import TooltipController from './tooltip_controller'
|
9
|
+
import PopoverController from './popover_controller'
|
10
|
+
import PopoverTogglerController from './popover_toggler_controller'
|
11
|
+
|
12
|
+
application.register('navbar', NavbarController)
|
13
|
+
application.register('fadein_onload', FadeinOnloadController)
|
14
|
+
application.register('clear-timeout', ClearTimeoutController)
|
15
|
+
application.register('switcher', SwitcherController)
|
16
|
+
application.register('theme', ThemeController)
|
17
|
+
application.register('tooltip', TooltipController)
|
18
|
+
application.register('popover', PopoverController)
|
19
|
+
application.register('popover-toggler', PopoverTogglerController)
|
@@ -36,7 +36,7 @@ html
|
|
36
36
|
= action_cable_with_jwt_meta_tag
|
37
37
|
|
38
38
|
= stylesheet_link_tag 'application', 'data-turbo-track': 'reload'
|
39
|
-
= javascript_include_tag 'application', 'data-turbo-track': 'reload'
|
39
|
+
= javascript_include_tag 'application', 'data-turbo-track': 'reload'
|
40
40
|
meta(name="actioncable-protocol"
|
41
41
|
content="#{Rails.env.test? ? 'actioncable-v1-json' : 'actioncable-v1-ext-json'}")
|
42
42
|
- if @rollbar_token.present?
|
@@ -0,0 +1 @@
|
|
1
|
+
import './../../pg_layout/app/javascript/landing'
|
data/pg_rails/lib/version.rb
CHANGED
@@ -1,3 +1,37 @@
|
|
1
|
+
// Default bootstrap colours
|
2
|
+
$blue: #0d6efd !default;
|
3
|
+
$indigo: #6610f2 !default;
|
4
|
+
$purple: #6f42c1 !default;
|
5
|
+
$pink: #d63384 !default;
|
6
|
+
$red: #dc3545 !default;
|
7
|
+
$orange: #fd7e14 !default;
|
8
|
+
$yellow: #ffc107 !default;
|
9
|
+
$green: #198754 !default;
|
10
|
+
$teal: #20c997 !default;
|
11
|
+
$cyan: #0dcaf0 !default;
|
12
|
+
|
13
|
+
// Overriding some of the default colours
|
14
|
+
$yellow: #ffb401;
|
15
|
+
$orange: #e35b17;
|
16
|
+
$red: #a70101;
|
17
|
+
|
18
|
+
$warning: $yellow;
|
19
|
+
$info: #87accc;
|
20
|
+
|
21
|
+
$warning-text-emphasis: $orange;
|
22
|
+
$danger-text-emphasis: #910303;
|
23
|
+
|
24
|
+
$tooltip-opacity: 1;
|
25
|
+
$tooltip-bg: var(--bs-primary) !default;
|
26
|
+
$tooltip-color: var(--bs-light) !default;
|
27
|
+
|
28
|
+
$enable-validation-icons: false;
|
29
|
+
$focus-ring-width: .05rem;
|
30
|
+
$alert-padding-y: 0.5rem;
|
31
|
+
$alert-margin-bottom: 0.5rem;
|
32
|
+
|
33
|
+
$breadcrumb-margin-bottom: 0;
|
34
|
+
|
1
35
|
@import "bootstrap/scss/mixins/banner";
|
2
36
|
@include bsBanner("");
|
3
37
|
|
data/pg_rails/scss/pg_rails.scss
CHANGED
@@ -1,41 +1,10 @@
|
|
1
|
-
// Default bootstrap colours
|
2
|
-
$blue: #0d6efd !default;
|
3
|
-
$indigo: #6610f2 !default;
|
4
|
-
$purple: #6f42c1 !default;
|
5
|
-
$pink: #d63384 !default;
|
6
|
-
$red: #dc3545 !default;
|
7
|
-
$orange: #fd7e14 !default;
|
8
|
-
$yellow: #ffc107 !default;
|
9
|
-
$green: #198754 !default;
|
10
|
-
$teal: #20c997 !default;
|
11
|
-
$cyan: #0dcaf0 !default;
|
12
|
-
|
13
|
-
// Overriding some of the default colours
|
14
|
-
$yellow: #ffb401;
|
15
|
-
$orange: #e35b17;
|
16
|
-
$red: #a70101;
|
17
|
-
|
18
|
-
$warning: $yellow;
|
19
|
-
$info: #87accc;
|
20
|
-
|
21
|
-
$warning-text-emphasis: $orange;
|
22
|
-
$danger-text-emphasis: #910303;
|
23
|
-
|
24
|
-
$tooltip-opacity: 1;
|
25
|
-
$tooltip-bg: var(--bs-primary) !default;
|
26
|
-
$tooltip-color: var(--bs-light) !default;
|
27
1
|
|
28
2
|
$font-size-base: 0.9rem;
|
29
|
-
$enable-validation-icons: false;
|
30
|
-
$focus-ring-width: .05rem;
|
31
|
-
$alert-padding-y: 0.5rem;
|
32
|
-
$alert-margin-bottom: 0.5rem;
|
33
|
-
|
34
|
-
$breadcrumb-margin-bottom: 0;
|
35
3
|
|
36
4
|
@import 'bootstrap_pre';
|
37
5
|
@import 'bootstrap_overrides';
|
38
6
|
@import 'bootstrap_post';
|
7
|
+
@import 'border_radius';
|
39
8
|
|
40
9
|
@import './../../pg_engine/app/assets/stylesheets/pg_rails_b5';
|
41
10
|
@import './../../pg_associable/app/assets/stylesheets/pg_associable';
|
@@ -47,6 +16,7 @@ $breadcrumb-margin-bottom: 0;
|
|
47
16
|
@import 'trix/dist/trix';
|
48
17
|
@import 'tom-select/dist/scss/tom-select.bootstrap5';
|
49
18
|
|
19
|
+
// Tom Select
|
50
20
|
.ts-control {
|
51
21
|
padding-top: 2px!important;
|
52
22
|
padding-bottom: 2px!important;
|
@@ -63,6 +33,7 @@ $breadcrumb-margin-bottom: 0;
|
|
63
33
|
padding-right: 0.75rem !important;
|
64
34
|
}
|
65
35
|
|
36
|
+
// Column truncate
|
66
37
|
$values: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100;
|
67
38
|
|
68
39
|
@for $i from 1 through length($values) {
|
@@ -86,6 +57,7 @@ $values: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100;
|
|
86
57
|
}
|
87
58
|
}
|
88
59
|
|
60
|
+
// Buttons border in nav toolbar
|
89
61
|
$warning-border-emphasis: shade-color($yellow, 60%);
|
90
62
|
.btn-toolbar .btn-warning {
|
91
63
|
border: 1px solid $warning-border-emphasis;
|
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.24.pre.3
|
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:
|
11
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -986,6 +986,7 @@ files:
|
|
986
986
|
- pg_layout/app/javascript/controllers/embedded_frame_controller.js
|
987
987
|
- pg_layout/app/javascript/controllers/fadein_onload_controller.js
|
988
988
|
- pg_layout/app/javascript/controllers/filtros_controller.js
|
989
|
+
- pg_layout/app/javascript/controllers/index-landing.js
|
989
990
|
- pg_layout/app/javascript/controllers/index.js
|
990
991
|
- pg_layout/app/javascript/controllers/navbar_controller.js
|
991
992
|
- pg_layout/app/javascript/controllers/nested_controller.js
|
@@ -999,6 +1000,7 @@ files:
|
|
999
1000
|
- pg_layout/app/javascript/controllers/tooltip_controller.js
|
1000
1001
|
- pg_layout/app/javascript/elements/index.js
|
1001
1002
|
- pg_layout/app/javascript/elements/pg_event.js
|
1003
|
+
- pg_layout/app/javascript/landing.js
|
1002
1004
|
- pg_layout/app/javascript/utils/cookies.js
|
1003
1005
|
- pg_layout/app/javascript/utils/utils.ts
|
1004
1006
|
- pg_layout/app/lib/navbar.rb
|
@@ -1047,6 +1049,7 @@ files:
|
|
1047
1049
|
- pg_layout/lib/pg_layout/engine.rb
|
1048
1050
|
- pg_layout/spec/lib/navbar_spec.rb
|
1049
1051
|
- pg_rails/js/index.js
|
1052
|
+
- pg_rails/js/landing.js
|
1050
1053
|
- pg_rails/lib/pg_rails.rb
|
1051
1054
|
- pg_rails/lib/pg_rails/capybara_support.rb
|
1052
1055
|
- pg_rails/lib/pg_rails/current_attributes_support.rb
|
@@ -1062,6 +1065,7 @@ files:
|
|
1062
1065
|
- pg_rails/scss/bootstrap_overrides.scss
|
1063
1066
|
- pg_rails/scss/bootstrap_post.scss
|
1064
1067
|
- pg_rails/scss/bootstrap_pre.scss
|
1068
|
+
- pg_rails/scss/border_radius.scss
|
1065
1069
|
- pg_rails/scss/pg_rails.scss
|
1066
1070
|
- pg_scaffold/lib/generators/pg_active_record/model/model_generator.rb
|
1067
1071
|
- pg_scaffold/lib/generators/pg_active_record/model/templates/admin.rb
|