client/public/elements/pages/grant/rp-page-grant.js
/**
   * @method _doAboutQuery
   * @param {String} id - The grant id of this page.
   * @description Retrieves the grant from the id given and saves description in this.about array
   * Called on AppStateUpdate
   * 

   */
@method _doAboutQuery
@param {String} id - The grant id of this page.
@description Retrieves the grant from the id given and saves description in this.about array
Called on AppStateUpdate
@method _doAboutQuery @param { String } id - The grant id of this page . @description Retrieves the grant from the id given and saves description in this . about array Called on AppStateUpdate
async _doAboutQuery(id){
    let data = await this.GrantModel.getGrant(id);
    let contributors = await this.GrantModel.getContributorsByRole(this.grant);
    let tmp = [];
    for( let label in contributors ) {
      tmp.push({label, contributors: contributors[label]});
    }
    this.contributor = await this._contributors(tmp);
    this.members["key"] = Object.keys(this.contributor[0].member); 
    this.members["value"] = Object.values(this.contributor[0].member); 
    this.others["key"] = Object.keys(this.contributor[1].others); 
    this.others["value"] = Object.values(this.contributor[1].others); 
    this.contributor = [this.members, this.others];
    for(let i = 0; i < this.others.value; i++);
    this.purpose = data.payload.description;
    sit amet, consectetur 
    this.grantAwardStatus = await this._grantAwardStatus();
    this.grantUrl = await this._grantUrl();
    this.grantAmount = await this._grantAmount();
    this.awardedByLabel = await this._awardedByLabel();
    this.grantNumber = await this._grantNumber();
    if (config.verbose) console.log("description:", data);
  }
async _doAboutQuery ( id ) { let data = await this . GrantModel . getGrant ( id ) ; let contributors = await this . GrantModel . getContributorsByRole ( this . grant ) ; let tmp = [ ] ; for ( let label in contributors ) { tmp . push ( { label , contributors : contributors [ label ] } ) ; } this . contributor = await this . _contributors ( tmp ) ; this . members [ "key" ] = Object . keys ( this . contributor [ 0 ] . member ) ; this . members [ "value" ] = Object . values ( this . contributor [ 0 ] . member ) ; this . others [ "key" ] = Object . keys ( this . contributor [ 1 ] . others ) ; this . others [ "value" ] = Object . values ( this . contributor [ 1 ] . others ) ; this . contributor = [ this . members , this . others ] ; for ( let i = 0 ; i < this . others . value ; i ++ ) ; this . purpose = data . payload . description ; this . grantAwardStatus = await this . _grantAwardStatus ( ) ; this . grantUrl = await this . _grantUrl ( ) ; this . grantAmount = await this . _grantAmount ( ) ; this . awardedByLabel = await this . _awardedByLabel ( ) ; this . grantNumber = await this . _grantNumber ( ) ; if ( config . verbose ) console . log ( "description:" , data ) ; }
@method _doAboutQuery
 @param {String} id - The grant id of this page.
@method _doAboutQuery @param { String } id - The grant id of this page .
//Add location of the description and add to array if there is none //delete this when description is added // if(!this.purpose){  //   this.purpose = `Lorem ipsum dolor sit amet, consectetur  //                 adipiscing elit, sed do eiusmod tempor  //                 incididunt ut labore et dolore magna aliqua.  //                 Ut enim ad minim veniam, quis nostrud  //                 exercitation ullamco laboris nisi ut aliquip  //                 ex ea commodo consequat.Lorem ipsum dolor  //                 sit amet, consectetur adipiscing elit, sed  //                 do eiusmod tempor incididunt ut labore et dolore magna aliqua.  //                 Ut enim ad minim veniam, quis nostrud  //                 exercitation ullamco laboris nisi ut aliquip  //                 ex ea commodo consequat.Lorem ipsum dolor sit amet, consectetur  //                 adipiscing elit, sed do eiusmod tempor  //                 incididunt ut labore et dolore magna aliqua.  //                 Ut enim ad minim veniam, quis nostrud  //                 exercitation ullamco laboris nisi ut aliquip  //                 ex ea commodo consequat.`; // } // this._toggleElements("about", this.about);