client/public/elements/pages/concept/rp-page-concept.js
/**
   * @method _doPubOverviewQuery
   * @param {String} id - The subject id of this page.
   * @description Retrieves number of each publication type for this subject.
   * Retrieves publications for each type by calling _doPubQuery.
   */
@method _doPubOverviewQuery
@param {String} id - The subject id of this page.
@description Retrieves number of each publication type for this subject.
Retrieves publications for each type by calling _doPubQuery.
@method _doPubOverviewQuery @param { String } id - The subject id of this page . @description Retrieves number of each publication type for this subject . Retrieves publications for each type by calling _doPubQuery .
async _doPubOverviewQuery(id) {
    let data = await this.SubjectModel.getPubOverview(id);
    if (data.state != 'loaded') {
      return;
    }
    if (config.verbose) console.log('pub overview:', data);
    let pubTypeCounts = data.payload.aggregations.facets['@type'];
    let pubTypes = [];
    for (const pubType of this.CollectionModel.subFacets.works) {
      if (!pubTypeCounts[pubType.es]) continue;
      pubTypes.push(pubType);
    }
    this.publications = {};
    pubTypes.map(pt => this._doPubQuery(pt));
    this._toggleElements("publications", pubTypes);
  }
async _doPubOverviewQuery ( id ) { let data = await this . SubjectModel . getPubOverview ( id ) ; if ( data . state != 'loaded' ) { return ; } if ( config . verbose ) console . log ( 'pub overview:' , data ) ; let pubTypeCounts = data . payload . aggregations . facets [ '@type' ] ; let pubTypes = [ ] ; for ( const pubType of this . CollectionModel . subFacets . works ) { if ( ! pubTypeCounts [ pubType . es ] ) continue ; pubTypes . push ( pubType ) ; } this . publications = { } ; pubTypes . map ( pt => this . _doPubQuery ( pt ) ) ; this . _toggleElements ( "publications" , pubTypes ) ; }
@method _doPubOverviewQuery
 @param {String} id - The subject id of this page.
@method _doPubOverviewQuery @param { String } id - The subject id of this page .