Controllo dei dati di: <%= organization.descrizione %>
Elenco dei soci con dati inconsistenti:
<% count_errors = 0 %>
<% memberships = Membership.belong_to_organization(organization.id).still_active_today %>
<%= view_table_open %>
<%= view_table_head_open %>
<%= view_table_row_open %>
<%= view_table_head_cell ('Controllo?') %>
<%= view_table_head_cell ('Dettaglio') %>
<%= view_table_head_cell (link_to('Persona', people_path )) %>
<%= view_table_head_cell (link_to('Associazione', organizations_path)) %>
<%= view_table_head_cell ('Data iscrizione') %>
<%= view_table_head_cell ('Data delibera iscrizione') %>
<%= view_table_head_cell ('Data recesso') %>
<%= view_table_head_cell ('Data delibera recesso') %>
<%= view_table_head_cell ('Tessera') %>
<%= view_table_head_cell (link_to('Ruolo associativo', membership_types_path) ) %>
<%= view_table_head_cell ('Data stampa') %>
<%= view_table_head_cell ('Data archiviazione') %>
<%= view_table_row_close %>
<%= view_table_head_close %>
<% memberships.each do |membership| %>
<% if membership.exist_membership_data_inconsistency %>
<% count_errors += 1 %>
<%= view_table_row_open %>
<%= view_table_cell ( iconbutton_alert membership, nil) %>
<%= view_table_cell ( membership.errors.full_messages.join("
") ) %>
<%= view_table_cell ( link_to( membership.person.dh_person_name, person_path(membership.person) ) ) %>
<%= view_table_cell ( link_to(membership.organization.format_for_formselect, organization_path(membership.organization_id)) ) %>
<%= view_table_cell ( membership.data_iscrizione ? membership.data_iscrizione.to_dmy : nil) %>
<%= view_table_cell ( membership.data_deliberaiscrizione ? membership.data_deliberaiscrizione.to_dmy : nil) %>
<%= view_table_cell ( membership.data_recesso ? membership.data_recesso.to_dmy : nil) %>
<%= view_table_cell ( membership.data_deliberarecesso ? membership.data_deliberarecesso.to_dmy : nil) %>
<%= view_table_cell ( membership.tessera) %>
<%= view_table_cell ( link_to(membership.membership_type.descrizione, membership_type_path(membership.membership_type_id)) ) %>
<%= view_table_cell ( membership.data_stampa) %>
<%= view_table_cell ( membership.data_archiviazione) %>
<%= view_table_row_close %>
<% end %>
<% end %>
<%= view_table_close %>
<% if count_errors == 0 %>
Non risultano soci con dati inconsistenti.
<% else %>
Risultano <%= count_errors %> soci con dati inconsistenti.
<% end %>