client/public/elements/pages/work/rp-page-work.js
/**
   * @method _doMainQuery
   * @param {String} id
   * @description Performs primary browse/search query for the work model based on url path and parameters
   * 
   * @returns {Promise}
   */
@method _doMainQuery
@param {String} id
@description Performs primary browse/search query for the work model based on url path and parameters

@returns {Promise}
@method _doMainQuery @param { String } id @description Performs primary browse / search query for the work model based on url path and parameters @returns { Promise }
async _doMainQuery(id){
    let data = await this.WorkModel.getWork(id);
    if( data.state === 'error' ) {
      return this.AppStateModel.show404Page(data);
    }
    this.workStatus = data.state;
    if (data.state != 'loaded') {
      return false;
    }
    this.work = data.payload;
    this.authors = this.WorkModel.getAuthors(this.work);
    console.log("AUTHORS:", this.authors);
    this.isOwnWork = this.WorkModel.isUsersWork(this.work);
    this.hasOtherAuthors = this.WorkModel.hasNonInstitutionAuthors(this.work);
    this.workType = this.WorkModel.getWorkType(this.work);
    this.publishedArray = this.WorkModel.getPublishedArray(this.work);
    this.subjects = this.WorkModel.getSubjects(this.work);
    this.fullTextLinks = this.WorkModel.getFullTextLinks(this.work);
    this._doAuthorQuery(id, this.authors);
    return false;
  }
async _doMainQuery ( id ) { let data = await this . WorkModel . getWork ( id ) ; if ( data . state === 'error' ) { return this . AppStateModel . show404Page ( data ) ; } this . workStatus = data . state ; if ( data . state != 'loaded' ) { return false ; } this . work = data . payload ; this . authors = this . WorkModel . getAuthors ( this . work ) ; console . log ( "AUTHORS:" , this . authors ) ; this . isOwnWork = this . WorkModel . isUsersWork ( this . work ) ; this . hasOtherAuthors = this . WorkModel . hasNonInstitutionAuthors ( this . work ) ; this . workType = this . WorkModel . getWorkType ( this . work ) ; this . publishedArray = this . WorkModel . getPublishedArray ( this . work ) ; this . subjects = this . WorkModel . getSubjects ( this . work ) ; this . fullTextLinks = this . WorkModel . getFullTextLinks ( this . work ) ; this . _doAuthorQuery ( id , this . authors ) ; return false ; }
@method _doMainQuery
 @param {String} id
 @description Performs primary browse/search query for the work model based on url path and parameters
@method _doMainQuery @param { String } id @description Performs primary browse / search query for the work model based on url path and parameters