app/dao/team_stats_dao.rb
# Add federation data to team stats with total items sync

Add federation data to team stats with total items sync
Add federation data to team stats with total items sync
def add_federation_data( name, federation_data )
    @federations[name]  = federation_data
    @summary.affiliations_count += federation_data.affiliations_count
    @summary.meetings_count     += federation_data.meetings_count
    @summary.first_meeting_dao  = federation_data.first_meeting_dao if @summary.first_meeting_dao.nil? || federation_data.first_meeting_dao.meeting_date < @summary.first_meeting_dao.meeting_date
    @summary.last_meeting_dao   = federation_data.last_meeting_dao if @summary.last_meeting_dao.nil? || federation_data.last_meeting_dao.meeting_date > @summary.last_meeting_dao.meeting_date
    @summary.max_updated_at     = federation_data.max_updated_at if @summary.max_updated_at == 0 || federation_data.max_updated_at > @summary.max_updated_at
    @summary.individuals.meters_swam       += federation_data.individuals.meters_swam
    @summary.individuals.time_swam         += federation_data.individuals.time_swam
    @summary.individuals.disqualifications += federation_data.individuals.disqualifications
    @summary.relays.meters_swam       += federation_data.relays.meters_swam
    @summary.relays.time_swam         += federation_data.relays.time_swam
    @summary.relays.disqualifications += federation_data.relays.disqualifications
  end
def add_federation_data ( name , federation_data ) @federations [ name ] = federation_data @summary . affiliations_count += federation_data . affiliations_count @summary . meetings_count += federation_data . meetings_count @summary . first_meeting_dao = federation_data . first_meeting_dao if @summary . first_meeting_dao . nil? || federation_data . first_meeting_dao . meeting_date < @summary . first_meeting_dao . meeting_date @summary . last_meeting_dao = federation_data . last_meeting_dao if @summary . last_meeting_dao . nil? || federation_data . last_meeting_dao . meeting_date > @summary . last_meeting_dao . meeting_date @summary . max_updated_at = federation_data . max_updated_at if @summary . max_updated_at == 0 || federation_data . max_updated_at > @summary . max_updated_at @summary . individuals . meters_swam += federation_data . individuals . meters_swam @summary . individuals . time_swam += federation_data . individuals . time_swam @summary . individuals . disqualifications += federation_data . individuals . disqualifications @summary . relays . meters_swam += federation_data . relays . meters_swam @summary . relays . time_swam += federation_data . relays . time_swam @summary . relays . disqualifications += federation_data . relays . disqualifications end
Add federation data to team stats with total items sync
Add federation data to team stats with total items sync
# Sets federation data detail
 # Individual results
 # Relay results

name
<not_specific>
federation_data
<not_specific>