generateStats() {
    // buildLocationsStatsFromActivities() can handle activites
    // with multiple locations.
    // In this case, all will have the same location EXCEPT
    // if we found a multi-location activity. Hence the filtering.
    const globalStats = buildLocationsStatsFromActivities(
      this.activityDocs.filter(
        ({ location }) => location === this.locationName,
      ),
    );
    this.stats = globalStats[this.locationName];
  }
/**
   * Builds stats from *all* locations but
   * keeps only this location's status
   */
Builds stats from *all* locations but
keeps only this location's status
Builds stats from * all * locations but keeps only this location ' s status
generateStats() {
    const globalStats = buildLocationsStatsFromActivities(
      this.activityDocs.filter(
        ({ location }) => location === this.locationName,
      ),
    );
    this.stats = globalStats[this.locationName];
  }
generateStats ( ) { const globalStats = buildLocationsStatsFromActivities ( this . activityDocs . filter ( ( { location } ) => location === this . locationName , ) , ) ; this . stats = globalStats [ this . locationName ] ; }
Builds stats from *all* locations but
 keeps only this location's status
Builds stats from * all * locations but keeps only this location ' s status
// buildLocationsStatsFromActivities() can handle activites // with multiple locations. // In this case, all will have the same location EXCEPT // if we found a multi-location activity. Hence the filtering.