pg_rails 7.0.8.pre.alpha.111 → 7.0.8.pre.alpha.112

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: 633b510e33807a5146da15616442bc144c78a7abd86bd617c2234362745c9251
4
- data.tar.gz: a2d2830fedd674a54b8b527d4397c7035cec9be7dbeaf87dd2419a57b3b9103a
3
+ metadata.gz: 05fcca002b0d29dc6e54d625ebec851eddc239a858ebf6714019000a528e7d35
4
+ data.tar.gz: 8ce185225473246f30228ccde564466ccff35fb390c87006f3ee8c900a6f005c
5
5
  SHA512:
6
- metadata.gz: 6f4e654ad40febd8919fc9bac6886242590e6b591d9e412b03043199a37536ce5a11c10ed540fb46c0e26f21efb3f0b77cacbb0bc74b4f79acd90b235b11637a
7
- data.tar.gz: 6c91a9c7ff63cee85b00f041f9cbfa953c6ba49eae5eb447f90c2c45f4e43222ba54b2c4425407dab02b72d750b2d5da434861abb07d22f1dee50abfd144f3ee
6
+ metadata.gz: 93de11640c80585f58c9d5c6b69082efdd5151e9a164097aacf1ce7b1b528e8e4d5d4a873823ae2ec9bdf00fab688839300f5960802447078d1219a5ef454d75
7
+ data.tar.gz: 6751325594662bd3165fcb81516190e5645fb47295dcb0a465577c6cee2b44adde0fae49196dacf031cae228cc4c8ded14b0ab0bf67e57f62636456f65316953
@@ -15,6 +15,20 @@
15
15
  }
16
16
 
17
17
  // FORMS
18
+
19
+ // Radio buttons
20
+ .radio_buttons legend {
21
+ font-weight: bold;
22
+ }
23
+ .radio_buttons label {
24
+ font-weight: normal;
25
+ }
26
+
27
+ // Trix
28
+ .is-invalid trix-editor {
29
+ border: 1px solid $red;
30
+ }
31
+
18
32
  input[disabled] {
19
33
  background-color: #e9e9ed;
20
34
  color: black;
@@ -40,7 +54,7 @@ input[type=datetime-local], input[type=datetime] {
40
54
  background-color: #d5d5d5;
41
55
  }
42
56
 
43
- .form-control.is-invalid, .form-select.is-invalid {
57
+ .form-control.is-invalid, .form-select.is-invalid, .is-invalid trix-editor {
44
58
  background-color: #fff3f3;
45
59
  }
46
60
 
@@ -50,9 +64,13 @@ input[type=datetime-local], input[type=datetime] {
50
64
  padding: 0.25rem 1rem;
51
65
  }
52
66
  }
67
+ .listado td:has(.btn) {
68
+ display: flex;
69
+ justify-content: flex-end;
70
+ gap: 4px;
71
+ }
53
72
  .listado .btn-sm {
54
73
  padding: 0em 0.3em;
55
- margin-right: 4px;
56
74
  }
57
75
 
58
76
  // FILTROS
@@ -115,3 +133,32 @@ input[type=datetime-local], input[type=datetime] {
115
133
  #flash .alert {
116
134
  box-shadow: 0px 9px 13px -3px rgba(0, 0, 0, 0.5);
117
135
  }
136
+
137
+ // Full calendar
138
+ .fc-daygrid-day-top a {
139
+ text-decoration: none;
140
+ }
141
+ .fc-col-header-cell a {
142
+ text-decoration: none;
143
+ }
144
+ .fc-multimonth {
145
+ .fc-daygrid-day-events {
146
+ display: none;
147
+ }
148
+ .fc-daygrid-day-top {
149
+ display: inline-block;
150
+ height: 100%;
151
+ }
152
+ td, th {
153
+ vertical-align: middle;
154
+ text-align: center;
155
+ border: none;
156
+ }
157
+ td.fc-day-today {
158
+ border: 1px solid black;
159
+ }
160
+ .fc-daygrid-day-number {
161
+ cursor: default;
162
+ }
163
+ --fc-neutral-bg-color: none;
164
+ }
@@ -20,6 +20,7 @@ module Admin
20
20
 
21
21
  def create
22
22
  @user.skip_confirmation!
23
+ @user.user_accounts << UserAccount.new(account: Current.account)
23
24
  pg_respond_create
24
25
  end
25
26
 
@@ -4,13 +4,17 @@
4
4
 
5
5
  class UserPolicy < ApplicationPolicy
6
6
  class Scope < ApplicationPolicy::Scope
7
- # def resolve
8
- # if policy.acceso_total?
9
- # scope.all
10
- # else
11
- # scope.none
12
- # end
13
- # end
7
+ def resolve
8
+ if policy.acceso_total?
9
+ if Current.account.present?
10
+ scope.joins(:user_accounts).where('user_accounts.account_id': Current.account.id)
11
+ else
12
+ scope.none
13
+ end
14
+ else
15
+ scope.none
16
+ end
17
+ end
14
18
  end
15
19
 
16
20
  # def puede_editar?
@@ -25,7 +29,7 @@ class UserPolicy < ApplicationPolicy
25
29
  # acceso_total? && !record.readonly?
26
30
  # end
27
31
 
28
- # def acceso_total?
29
- # user.developer?
30
- # end
32
+ def acceso_total?
33
+ user.present?
34
+ end
31
35
  end
@@ -5,6 +5,8 @@ div style="max-width: 22em"
5
5
  = f.mensajes_de_error
6
6
 
7
7
  = hidden_field_tag :asociable, true if asociable
8
+ = f.input :nombre
9
+ = f.input :apellido
8
10
  = f.input :email
9
11
  = f.input :password, required: false, hint: 'Si se deja en blanco no se cambia'
10
12
  = f.input :developer
@@ -6,3 +6,25 @@ import './tooltips'
6
6
 
7
7
  import 'trix'
8
8
  import '@rails/actiontext'
9
+
10
+ function bindListingClick () {
11
+ document.body.onclick = (ev) => {
12
+ if (ev.target.closest('a')) return
13
+ if (ev.target.closest('.listado')) {
14
+ const row = ev.target.closest('tr')
15
+ if (row) {
16
+ const show = row.querySelector('.bi-eye-fill')
17
+ if (show) {
18
+ const link = show.closest('a')
19
+ if (link) {
20
+ link.click()
21
+ }
22
+ }
23
+ }
24
+ }
25
+ console.log('click')
26
+ }
27
+ }
28
+ bindListingClick()
29
+ document.addEventListener('turbo:load', bindListingClick)
30
+ document.addEventListener('turbo:render', bindListingClick)
@@ -57,7 +57,8 @@ html
57
57
  = render partial: 'pg_layout/navbar' if @navbar.present?
58
58
  div
59
59
  - if user_signed_in? && breadcrumbs.any?
60
- .d-flex.align-items-center.justify-content-between.px-3.py-1.d-print-none[
60
+ .d-flex.px-3.py-1.d-print-none[
61
+ class="bg-primary-subtle align-items-center justify-content-between"
61
62
  style="min-height: 2.5em;"]
62
63
  nav aria-label="breadcrumb"
63
64
  = render_breadcrumbs
@@ -14,12 +14,15 @@
14
14
  <%= render @notifications_bell %>
15
15
  <% end %>
16
16
  <%= @navbar.logo if @navbar.logo.present? %>
17
- <button class="btn btn-outline-light d-inline-block d-<%= @breakpoint_navbar_expand %>-none"
18
- type="button"
19
- data-bs-toggle="offcanvas"
20
- data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
21
- <i class="bi bi-list"></i>
22
- </button>
17
+ <% unless @sidebar == false %>
18
+ <button class="btn btn-outline-light d-inline-block
19
+ d-<%= @breakpoint_navbar_expand %>-none"
20
+ type="button"
21
+ data-bs-toggle="offcanvas"
22
+ data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
23
+ <i class="bi bi-list"></i>
24
+ </button>
25
+ <% end %>
23
26
  </div>
24
27
  </nav>
25
28
  <div class="collapse" id="notifications-collapse" data-controller="notifications">
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.111'
4
+ VERSION = '7.0.8-alpha.112'
5
5
  end
@@ -39,3 +39,13 @@ $alert-margin-bottom: 0.5rem;
39
39
  @import 'bootstrap-icons/font/bootstrap-icons';
40
40
 
41
41
  @import 'trix/dist/trix';
42
+
43
+ $warning-border-emphasis: shade-color($yellow, 60%);
44
+ .bg-primary-subtle .btn-warning {
45
+ border: 1px solid $warning-border-emphasis;
46
+ }
47
+
48
+ .listado tr:has(td:hover):has(.bi-eye-fill) td {
49
+ background-color: #f2f2f2;
50
+ cursor: pointer;
51
+ }
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.111
4
+ version: 7.0.8.pre.alpha.112
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-07-06 00:00:00.000000000 Z
11
+ date: 2024-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -556,440 +556,6 @@ dependencies:
556
556
  - - "~>"
557
557
  - !ruby/object:Gem::Version
558
558
  version: '2.3'
559
- - !ruby/object:Gem::Dependency
560
- name: vcr
561
- requirement: !ruby/object:Gem::Requirement
562
- requirements:
563
- - - "~>"
564
- - !ruby/object:Gem::Version
565
- version: 6.2.0
566
- type: :development
567
- prerelease: false
568
- version_requirements: !ruby/object:Gem::Requirement
569
- requirements:
570
- - - "~>"
571
- - !ruby/object:Gem::Version
572
- version: 6.2.0
573
- - !ruby/object:Gem::Dependency
574
- name: webmock
575
- requirement: !ruby/object:Gem::Requirement
576
- requirements:
577
- - - "~>"
578
- - !ruby/object:Gem::Version
579
- version: 3.20.0
580
- type: :development
581
- prerelease: false
582
- version_requirements: !ruby/object:Gem::Requirement
583
- requirements:
584
- - - "~>"
585
- - !ruby/object:Gem::Version
586
- version: 3.20.0
587
- - !ruby/object:Gem::Dependency
588
- name: letter_opener
589
- requirement: !ruby/object:Gem::Requirement
590
- requirements:
591
- - - "~>"
592
- - !ruby/object:Gem::Version
593
- version: 1.8.1
594
- type: :development
595
- prerelease: false
596
- version_requirements: !ruby/object:Gem::Requirement
597
- requirements:
598
- - - "~>"
599
- - !ruby/object:Gem::Version
600
- version: 1.8.1
601
- - !ruby/object:Gem::Dependency
602
- name: overcommit
603
- requirement: !ruby/object:Gem::Requirement
604
- requirements:
605
- - - "~>"
606
- - !ruby/object:Gem::Version
607
- version: 0.61.0
608
- type: :development
609
- prerelease: false
610
- version_requirements: !ruby/object:Gem::Requirement
611
- requirements:
612
- - - "~>"
613
- - !ruby/object:Gem::Version
614
- version: 0.61.0
615
- - !ruby/object:Gem::Dependency
616
- name: database_cleaner-active_record
617
- requirement: !ruby/object:Gem::Requirement
618
- requirements:
619
- - - "~>"
620
- - !ruby/object:Gem::Version
621
- version: 2.1.0
622
- type: :development
623
- prerelease: false
624
- version_requirements: !ruby/object:Gem::Requirement
625
- requirements:
626
- - - "~>"
627
- - !ruby/object:Gem::Version
628
- version: 2.1.0
629
- - !ruby/object:Gem::Dependency
630
- name: byebug
631
- requirement: !ruby/object:Gem::Requirement
632
- requirements:
633
- - - "~>"
634
- - !ruby/object:Gem::Version
635
- version: '11.1'
636
- type: :development
637
- prerelease: false
638
- version_requirements: !ruby/object:Gem::Requirement
639
- requirements:
640
- - - "~>"
641
- - !ruby/object:Gem::Version
642
- version: '11.1'
643
- - !ruby/object:Gem::Dependency
644
- name: annotate
645
- requirement: !ruby/object:Gem::Requirement
646
- requirements:
647
- - - "~>"
648
- - !ruby/object:Gem::Version
649
- version: 3.2.0
650
- type: :development
651
- prerelease: false
652
- version_requirements: !ruby/object:Gem::Requirement
653
- requirements:
654
- - - "~>"
655
- - !ruby/object:Gem::Version
656
- version: 3.2.0
657
- - !ruby/object:Gem::Dependency
658
- name: web-console
659
- requirement: !ruby/object:Gem::Requirement
660
- requirements:
661
- - - "~>"
662
- - !ruby/object:Gem::Version
663
- version: 4.2.1
664
- type: :development
665
- prerelease: false
666
- version_requirements: !ruby/object:Gem::Requirement
667
- requirements:
668
- - - "~>"
669
- - !ruby/object:Gem::Version
670
- version: 4.2.1
671
- - !ruby/object:Gem::Dependency
672
- name: stimulus-rails
673
- requirement: !ruby/object:Gem::Requirement
674
- requirements:
675
- - - "~>"
676
- - !ruby/object:Gem::Version
677
- version: 1.3.3
678
- type: :development
679
- prerelease: false
680
- version_requirements: !ruby/object:Gem::Requirement
681
- requirements:
682
- - - "~>"
683
- - !ruby/object:Gem::Version
684
- version: 1.3.3
685
- - !ruby/object:Gem::Dependency
686
- name: bullet
687
- requirement: !ruby/object:Gem::Requirement
688
- requirements:
689
- - - "~>"
690
- - !ruby/object:Gem::Version
691
- version: 7.1.6
692
- type: :development
693
- prerelease: false
694
- version_requirements: !ruby/object:Gem::Requirement
695
- requirements:
696
- - - "~>"
697
- - !ruby/object:Gem::Version
698
- version: 7.1.6
699
- - !ruby/object:Gem::Dependency
700
- name: rubocop
701
- requirement: !ruby/object:Gem::Requirement
702
- requirements:
703
- - - "~>"
704
- - !ruby/object:Gem::Version
705
- version: '1.64'
706
- type: :development
707
- prerelease: false
708
- version_requirements: !ruby/object:Gem::Requirement
709
- requirements:
710
- - - "~>"
711
- - !ruby/object:Gem::Version
712
- version: '1.64'
713
- - !ruby/object:Gem::Dependency
714
- name: rubocop-rails
715
- requirement: !ruby/object:Gem::Requirement
716
- requirements:
717
- - - "~>"
718
- - !ruby/object:Gem::Version
719
- version: '2.25'
720
- type: :development
721
- prerelease: false
722
- version_requirements: !ruby/object:Gem::Requirement
723
- requirements:
724
- - - "~>"
725
- - !ruby/object:Gem::Version
726
- version: '2.25'
727
- - !ruby/object:Gem::Dependency
728
- name: rubocop-rspec
729
- requirement: !ruby/object:Gem::Requirement
730
- requirements:
731
- - - "~>"
732
- - !ruby/object:Gem::Version
733
- version: '3.0'
734
- type: :development
735
- prerelease: false
736
- version_requirements: !ruby/object:Gem::Requirement
737
- requirements:
738
- - - "~>"
739
- - !ruby/object:Gem::Version
740
- version: '3.0'
741
- - !ruby/object:Gem::Dependency
742
- name: rubocop-capybara
743
- requirement: !ruby/object:Gem::Requirement
744
- requirements:
745
- - - "~>"
746
- - !ruby/object:Gem::Version
747
- version: '2.21'
748
- type: :development
749
- prerelease: false
750
- version_requirements: !ruby/object:Gem::Requirement
751
- requirements:
752
- - - "~>"
753
- - !ruby/object:Gem::Version
754
- version: '2.21'
755
- - !ruby/object:Gem::Dependency
756
- name: rubocop-factory_bot
757
- requirement: !ruby/object:Gem::Requirement
758
- requirements:
759
- - - "~>"
760
- - !ruby/object:Gem::Version
761
- version: '2.26'
762
- type: :development
763
- prerelease: false
764
- version_requirements: !ruby/object:Gem::Requirement
765
- requirements:
766
- - - "~>"
767
- - !ruby/object:Gem::Version
768
- version: '2.26'
769
- - !ruby/object:Gem::Dependency
770
- name: rubocop-rspec_rails
771
- requirement: !ruby/object:Gem::Requirement
772
- requirements:
773
- - - "~>"
774
- - !ruby/object:Gem::Version
775
- version: '2.30'
776
- type: :development
777
- prerelease: false
778
- version_requirements: !ruby/object:Gem::Requirement
779
- requirements:
780
- - - "~>"
781
- - !ruby/object:Gem::Version
782
- version: '2.30'
783
- - !ruby/object:Gem::Dependency
784
- name: slim_lint
785
- requirement: !ruby/object:Gem::Requirement
786
- requirements:
787
- - - "~>"
788
- - !ruby/object:Gem::Version
789
- version: 0.26.0
790
- type: :development
791
- prerelease: false
792
- version_requirements: !ruby/object:Gem::Requirement
793
- requirements:
794
- - - "~>"
795
- - !ruby/object:Gem::Version
796
- version: 0.26.0
797
- - !ruby/object:Gem::Dependency
798
- name: ruby-lint
799
- requirement: !ruby/object:Gem::Requirement
800
- requirements:
801
- - - "~>"
802
- - !ruby/object:Gem::Version
803
- version: 0.9.1
804
- type: :development
805
- prerelease: false
806
- version_requirements: !ruby/object:Gem::Requirement
807
- requirements:
808
- - - "~>"
809
- - !ruby/object:Gem::Version
810
- version: 0.9.1
811
- - !ruby/object:Gem::Dependency
812
- name: brakeman
813
- requirement: !ruby/object:Gem::Requirement
814
- requirements:
815
- - - "~>"
816
- - !ruby/object:Gem::Version
817
- version: '6.1'
818
- type: :development
819
- prerelease: false
820
- version_requirements: !ruby/object:Gem::Requirement
821
- requirements:
822
- - - "~>"
823
- - !ruby/object:Gem::Version
824
- version: '6.1'
825
- - !ruby/object:Gem::Dependency
826
- name: bundler-audit
827
- requirement: !ruby/object:Gem::Requirement
828
- requirements:
829
- - - "~>"
830
- - !ruby/object:Gem::Version
831
- version: 0.9.1
832
- type: :development
833
- prerelease: false
834
- version_requirements: !ruby/object:Gem::Requirement
835
- requirements:
836
- - - "~>"
837
- - !ruby/object:Gem::Version
838
- version: 0.9.1
839
- - !ruby/object:Gem::Dependency
840
- name: capybara
841
- requirement: !ruby/object:Gem::Requirement
842
- requirements:
843
- - - "~>"
844
- - !ruby/object:Gem::Version
845
- version: 3.40.0
846
- type: :development
847
- prerelease: false
848
- version_requirements: !ruby/object:Gem::Requirement
849
- requirements:
850
- - - "~>"
851
- - !ruby/object:Gem::Version
852
- version: 3.40.0
853
- - !ruby/object:Gem::Dependency
854
- name: selenium-webdriver
855
- requirement: !ruby/object:Gem::Requirement
856
- requirements:
857
- - - "~>"
858
- - !ruby/object:Gem::Version
859
- version: 4.17.0
860
- type: :development
861
- prerelease: false
862
- version_requirements: !ruby/object:Gem::Requirement
863
- requirements:
864
- - - "~>"
865
- - !ruby/object:Gem::Version
866
- version: 4.17.0
867
- - !ruby/object:Gem::Dependency
868
- name: simplecov
869
- requirement: !ruby/object:Gem::Requirement
870
- requirements:
871
- - - "~>"
872
- - !ruby/object:Gem::Version
873
- version: 0.22.0
874
- type: :development
875
- prerelease: false
876
- version_requirements: !ruby/object:Gem::Requirement
877
- requirements:
878
- - - "~>"
879
- - !ruby/object:Gem::Version
880
- version: 0.22.0
881
- - !ruby/object:Gem::Dependency
882
- name: simplecov-lcov
883
- requirement: !ruby/object:Gem::Requirement
884
- requirements:
885
- - - "~>"
886
- - !ruby/object:Gem::Version
887
- version: 0.8.0
888
- type: :development
889
- prerelease: false
890
- version_requirements: !ruby/object:Gem::Requirement
891
- requirements:
892
- - - "~>"
893
- - !ruby/object:Gem::Version
894
- version: 0.8.0
895
- - !ruby/object:Gem::Dependency
896
- name: undercover
897
- requirement: !ruby/object:Gem::Requirement
898
- requirements:
899
- - - "~>"
900
- - !ruby/object:Gem::Version
901
- version: 0.5.0
902
- type: :development
903
- prerelease: false
904
- version_requirements: !ruby/object:Gem::Requirement
905
- requirements:
906
- - - "~>"
907
- - !ruby/object:Gem::Version
908
- version: 0.5.0
909
- - !ruby/object:Gem::Dependency
910
- name: spring
911
- requirement: !ruby/object:Gem::Requirement
912
- requirements:
913
- - - "~>"
914
- - !ruby/object:Gem::Version
915
- version: 4.1.3
916
- type: :development
917
- prerelease: false
918
- version_requirements: !ruby/object:Gem::Requirement
919
- requirements:
920
- - - "~>"
921
- - !ruby/object:Gem::Version
922
- version: 4.1.3
923
- - !ruby/object:Gem::Dependency
924
- name: spring-commands-rspec
925
- requirement: !ruby/object:Gem::Requirement
926
- requirements:
927
- - - "~>"
928
- - !ruby/object:Gem::Version
929
- version: 1.0.4
930
- type: :development
931
- prerelease: false
932
- version_requirements: !ruby/object:Gem::Requirement
933
- requirements:
934
- - - "~>"
935
- - !ruby/object:Gem::Version
936
- version: 1.0.4
937
- - !ruby/object:Gem::Dependency
938
- name: rspec-rails
939
- requirement: !ruby/object:Gem::Requirement
940
- requirements:
941
- - - "~>"
942
- - !ruby/object:Gem::Version
943
- version: 6.0.4
944
- type: :development
945
- prerelease: false
946
- version_requirements: !ruby/object:Gem::Requirement
947
- requirements:
948
- - - "~>"
949
- - !ruby/object:Gem::Version
950
- version: 6.0.4
951
- - !ruby/object:Gem::Dependency
952
- name: factory_bot_rails
953
- requirement: !ruby/object:Gem::Requirement
954
- requirements:
955
- - - "~>"
956
- - !ruby/object:Gem::Version
957
- version: 6.4.3
958
- type: :development
959
- prerelease: false
960
- version_requirements: !ruby/object:Gem::Requirement
961
- requirements:
962
- - - "~>"
963
- - !ruby/object:Gem::Version
964
- version: 6.4.3
965
- - !ruby/object:Gem::Dependency
966
- name: rails-controller-testing
967
- requirement: !ruby/object:Gem::Requirement
968
- requirements:
969
- - - "~>"
970
- - !ruby/object:Gem::Version
971
- version: 1.0.5
972
- type: :development
973
- prerelease: false
974
- version_requirements: !ruby/object:Gem::Requirement
975
- requirements:
976
- - - "~>"
977
- - !ruby/object:Gem::Version
978
- version: 1.0.5
979
- - !ruby/object:Gem::Dependency
980
- name: faker
981
- requirement: !ruby/object:Gem::Requirement
982
- requirements:
983
- - - "~>"
984
- - !ruby/object:Gem::Version
985
- version: 3.2.3
986
- type: :development
987
- prerelease: false
988
- version_requirements: !ruby/object:Gem::Requirement
989
- requirements:
990
- - - "~>"
991
- - !ruby/object:Gem::Version
992
- version: 3.2.3
993
559
  description: Rails goodies.
994
560
  email:
995
561
  - mrosso10@gmail.com