diff --git a/app/controllers/cor1440_gen/actividades_controller.rb b/app/controllers/cor1440_gen/actividades_controller.rb index 1f1204a..057263d 100644 --- a/app/controllers/cor1440_gen/actividades_controller.rb +++ b/app/controllers/cor1440_gen/actividades_controller.rb @@ -33,6 +33,10 @@ def atributos_show ] end + def registrar_en_bitacora + true + end + def otros_impedimentos_para_borrar_persona_ex_asistente(a) # Estar como víctima en un caso es impedimento if Sivel2Gen::Victima.where(persona_id: a.persona_id).count > 0 diff --git a/app/models/msip/persona.rb b/app/models/msip/persona.rb index 9e8a3e8..d9638f4 100644 --- a/app/models/msip/persona.rb +++ b/app/models/msip/persona.rb @@ -10,7 +10,9 @@ class Persona < ActiveRecord::Base foreign_key: "persona_id", validate: true, dependent: :destroy, - class_name: "::Aporte" + class_name: "::Aporte", + inverse_of: :persona + accepts_nested_attributes_for :aporte, allow_destroy: true, reject_if: :all_blank diff --git a/app/views/msip/personas/_aporte_campos.html.erb b/app/views/msip/personas/_aporte_campos.html.erb index 2d54b6e..315a294 100644 --- a/app/views/msip/personas/_aporte_campos.html.erb +++ b/app/views/msip/personas/_aporte_campos.html.erb @@ -44,6 +44,7 @@ class: 'btn btn-sm btn-danger', data: { turbo_frame: "aporte_#{f.index}", + turbo_method: :delete, disable_with: false } %> diff --git a/app/views/msip/personas/_campo_aportes.html.erb b/app/views/msip/personas/_campo_aportes.html.erb index 77857d2..db02404 100644 --- a/app/views/msip/personas/_campo_aportes.html.erb +++ b/app/views/msip/personas/_campo_aportes.html.erb @@ -21,9 +21,8 @@ <%= f.simple_fields_for :aporte, f.object.aporte.order([:anio,:mes]), child_index: params[:index] do |apo| %> - <%= render partial: "aporte_campos", - locals: {f: apo} - %> + x + <% end %> diff --git a/app/views/sivel2_gen/actos/_actos_tabla.html.erb b/app/views/sivel2_gen/actos/_actos_tabla.html.erb new file mode 100644 index 0000000..43fccfe --- /dev/null +++ b/app/views/sivel2_gen/actos/_actos_tabla.html.erb @@ -0,0 +1,46 @@ +<%= fields model: @caso do |form| %> +