2021-01-13 19:23:31 +01:00
import { Component , Input , ViewChild } from '@angular/core' ;
import { ActivatedRoute , Router } from "@angular/router" ;
import { Subscriber , Subscription } from "rxjs" ;
import { OrcidService } from "./orcid.service" ;
import { ResultLandingInfo } from "../utils/entities/resultLandingInfo" ;
import { ResultLandingService } from "../landingPages/result/resultLanding.service" ;
import { properties } from "../../../environments/environment" ;
2021-02-10 10:01:55 +01:00
import { Session } from "../login/utils/helper.class" ;
import { LoginErrorCodes } from "../login/utils/guardHelper.class" ;
import { ExternalIDV3_0 , WorkV3_0 } from "./orcidWork" ;
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
import { EnvProperties } from "../utils/properties/env-properties" ;
2022-04-12 13:36:31 +02:00
import { UserManagementService } from "../services/user-management.service" ;
2022-05-04 12:57:13 +02:00
import { OpenaireEntities } from "../utils/properties/searchFields" ;
2023-02-21 15:10:21 +01:00
import { FullScreenModalComponent } from "../utils/modal/full-screen-modal/full-screen-modal.component" ;
2021-01-13 19:23:31 +01:00
declare var UIkit : any ;
@Component ( {
selector : 'orcid-work' ,
template : `
2023-02-17 18:40:05 +01:00
< ng - container * ngIf = "pageType == 'landing' || pageType == 'search'" >
2021-02-10 10:01:55 +01:00
< span * ngIf = "!putCodes || putCodes.length == 0"
2023-07-27 14:28:40 +02:00
( click ) = "currentAction='add'; saveWorkPreparation();"
[ class . uk - disabled ] = "showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
[ class . clickable ] = "!showLoading && isLoggedIn && (pids || (identifiers && identifiers.size > 0))"
[ ngClass ] = "isMobile && pageType == 'landing' ? ' uk-width-1-1' : ''"
[ attr . uk - tooltip ] = "isMobile? 'cls: uk-invisible' : 'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
2023-05-19 13:37:23 +02:00
[ title ] = "((!pids && (!identifiers || identifiers.size == 0)) || !isLoggedIn) ? ((!pids && (!identifiers || identifiers.size == 0)) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd" >
2023-07-27 14:28:40 +02:00
< a class = "uk-flex uk-flex-middle uk-button-link"
[ ngClass ] = "isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''"
2023-02-21 15:10:21 +01:00
[ class . uk - text - bolder ] = "!(isMobile && pageType == 'landing')"
2023-05-19 13:37:23 +02:00
[ class . uk - text - muted ] = "showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
2023-02-17 18:40:05 +01:00
( mouseover ) = "hoverEvent($event)" ( mouseout ) = "hoverEvent($event)" >
2023-05-19 13:37:23 +02:00
< icon * ngIf = "!showLoading" [ class.text - orcid ] = " ! showLoading & & isLoggedIn & & ( pids | | identifiers ? .size > 0 ) "
2023-07-27 14:28:40 +02:00
[ class . uk - text - muted ] = "showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
name = "orcid_add" [ ratio ] = "(isMobile && pageType == 'search') ? 0.7 : 1" visuallyHidden = "add" > < / icon >
2023-05-19 13:37:23 +02:00
< span * ngIf = "showLoading" class = "uk-icon" > < loading
2023-07-27 14:28:40 +02:00
[ top_margin ] = "false" [ size ] = "'small'" > < / loading > < / span >
2023-02-21 16:07:23 +01:00
< span [ ngClass ] = " ( isMobile & & pageType = = ' landing ' ) ? ' uk - margin - small - left ' : ' uk - margin - xsmall - left ' " > Claim < / span >
2021-02-10 10:01:55 +01:00
< / a >
2023-07-27 14:28:40 +02:00
< div * ngIf = "isMobile && pageType == 'landing'" class = "uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
[ innerHTML ] = "((!pids && (!identifiers || identifiers.size == 0)) || !isLoggedIn) ? ((!pids && (!identifiers || identifiers.size == 0)) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd" > < / div >
2021-02-10 10:01:55 +01:00
< / span >
2023-02-17 18:40:05 +01:00
< span * ngIf = "putCodes && putCodes.length > 0"
2023-07-27 14:28:40 +02:00
( click ) = "currentAction='delete'; deleteWorks();"
[ class . uk - disabled ] = "showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
[ class . clickable ] = "!showLoading && isLoggedIn && (pids || (identifiers && identifiers.size > 0))"
[ ngClass ] = "isMobile && pageType == 'landing' ? ' uk-width-1-1' : ''"
[ attr . uk - tooltip ] = "isMobile? 'cls: uk-invisible' : 'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
2023-05-19 13:37:23 +02:00
[ title ] = "((!pids && (!identifiers || identifiers.size == 0)) || !isLoggedIn) ? ((!pids && (!identifiers || identifiers.size == 0)) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete" >
2023-07-27 14:28:40 +02:00
< a class = "uk-flex uk-flex-middle uk-button-link"
[ ngClass ] = "isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''"
2023-02-21 15:10:21 +01:00
[ class . uk - text - bolder ] = "!(isMobile && pageType == 'landing')"
2023-05-19 13:37:23 +02:00
[ class . uk - text - muted ] = "showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
2023-02-17 18:40:05 +01:00
( mouseover ) = "hoverEvent($event, 'delete')" ( mouseout ) = "hoverEvent($event, 'delete')" >
2023-05-19 13:37:23 +02:00
< icon * ngIf = "!showLoading" [ class.text - orcid ] = " ! showLoading & & isLoggedIn & & ( pids | | identifiers ? .size > 0 ) "
2023-07-27 14:28:40 +02:00
[ class . uk - text - muted ] = "showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
name = "orcid_bin" [ ratio ] = "(isMobile && pageType == 'search') ? 0.7 : 1" visuallyHidden = "delete" > < / icon >
2023-05-19 13:37:23 +02:00
< span * ngIf = "showLoading" class = "uk-icon" > < loading
[ top_margin ] = "false" [ size ] = "'small'" > < / loading > < / span >
2023-02-21 16:07:23 +01:00
< span [ ngClass ] = " ( isMobile & & pageType = = ' landing ' ) ? ' uk - margin - small - left ' : ' uk - margin - xsmall - left ' " > Remove < / span >
2023-01-13 07:32:16 +01:00
< / a >
2023-07-27 14:28:40 +02:00
< div * ngIf = "isMobile && pageType == 'landing'" class = "uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
[ innerHTML ] = "((!pids && (!identifiers || identifiers.size == 0)) || !isLoggedIn) ? ((!pids && (!identifiers || identifiers.size == 0)) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete" > < / div >
2023-01-13 07:32:16 +01:00
< / span >
2023-02-17 18:40:05 +01:00
<!-- Old 'remove' code -- >
2023-01-13 07:32:16 +01:00
<!-- < span * ngIf = "putCodes && putCodes.length > 0"
[ attr . uk - tooltip ] = "'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
[ title ] = "(!pids || !isLoggedIn) ? (!pids ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete" >
< a * ngIf = "!showLoading" ( click ) = " currentAction = 'delete' ; deleteWorks ( ) ; "
class = "uk-icon-button uk-icon landing-action-button landing-action-button-orcid"
[ class . uk - disabled ] = "showLoading || !isLoggedIn || !pids"
( mouseover ) = "hoverEvent($event, 'delete')" ( mouseout ) = "hoverEvent($event, 'delete')" >
2022-04-20 16:40:18 +02:00
< icon * ngIf = "!hoverDelete" name = "orcid_bin" ratio = "1.1" visuallyHidden = "delete" > < / icon >
< icon * ngIf = "hoverDelete" name = "delete_outline" class = "uk-text-danger" visuallyHidden = "delete" > < / icon >
2022-04-16 09:47:30 +02:00
< / a >
2022-07-17 15:01:39 +02:00
< span * ngIf = "showLoading" class = "uk-icon icon-button uk-icon-button-small" > < loading
2022-10-12 15:36:33 +02:00
[ top_margin ] = "false" [ size ] = "'small'" > < / loading > < / span >
2023-01-13 07:32:16 +01:00
< / span > -- >
2021-02-10 10:01:55 +01:00
< / n g - c o n t a i n e r >
2023-02-21 15:10:21 +01:00
< modal - alert * ngIf = "!isMobile" # grantModal [ overflowBody ] = false ( alertOutput ) = " openGrantWindow ( ) " >
2022-06-20 12:02:23 +02:00
< div >
2021-02-10 10:01:55 +01:00
< div > { { requestGrantMessage } } < / div >
2023-02-17 18:40:05 +01:00
<!-- < div class = "uk-margin-medium-top uk-align-right" > -- >
<!-- < button ( click ) = " closeGrantModal ( ) " type = "submit" - - >
<!-- class = "uk-button uk-padding-small uk-padding-remove-vertical uk-button-default" > -- >
<!-- < span > Cancel < / span > -- >
<!-- < / button > -- >
<!-- < button ( click ) = " openGrantWindow ( ) " type = "submit" - - >
<!-- class = "uk-button uk-padding-small uk-padding-remove-vertical uk-margin-left uk-button-primary" > -- >
<!-- < span > Grant OpenAIRE < / span > -- >
<!-- < / button > -- >
<!-- & lt ; ! & ndash ; < button ( click ) = " openGrantWindow ( ) " type = "submit" & ndash ; & gt ; - - >
<!-- & lt ; ! & ndash ; class = "uk-button uk-padding-small uk-padding-remove-vertical uk-margin-left orcid-button" > & ndash ; & gt ; -- >
<!-- & lt ; ! & ndash ; < img src = "assets/common-assets/common/ORCIDiD_icon16x16.png" alt = "" > { { " " } } & ndash ; & gt ; -- >
<!-- & lt ; ! & ndash ; < span > Create or Connect your ORCID iD < / span > & ndash ; & gt ; -- >
<!-- & lt ; ! & ndash ; < / button > & ndash ; & gt ; -- >
<!-- < / div > -- >
2021-02-10 10:01:55 +01:00
< / div >
< / m o d a l - a l e r t >
2023-02-21 15:10:21 +01:00
< fs - modal * ngIf = "isMobile" # grantFsModal classTitle = "uk-tile-default uk-border-bottom" >
< div > { { requestGrantMessage } } < / div >
< button class = "uk-margin-medium-top uk-button uk-button-primary uk-align-center" ( click ) = " openGrantWindow ( ) " >
Grant OpenAIRE
< / button >
< / f s - m o d a l >
2021-02-10 10:01:55 +01:00
< ng - container * ngIf = "pageType == 'my_search'" >
2023-08-09 10:52:30 +02:00
< ng - container * ngIf = "!showOnlyUpdateButton" >
< span class = "uk-margin-bottom uk-flex uk-flex-middle uk-flex-center" >
< span > ORCID & # 160 ; < / span >
< img src = "assets/common-assets/common/ORCIDiD_icon16x16.png" alt = "" loading = "lazy" >
< span > & # 160 ; ACTIONS < / span >
< / span >
< span [ attr.uk - tooltip ] = " ( ! putCodes | | putCodes.length = = 0 )
? 'This work is currently deleted.'
: 'View this work from your ORCID record' " >
< a ( click ) = " currentAction = 'get' ; getOrcidWorks ( ) "
[ class ] = "'uk-button uk-button-default action uk-flex uk-flex-middle '+ ((showLoading || !putCodes || putCodes.length == 0) ? 'uk-disabled' : '')" >
< icon * ngIf = "!showLoading || currentAction!='get'" name = "visibility" ratio = "1" flex = "true" > < / icon >
< span * ngIf = "showLoading && currentAction=='get'" class = "uk-icon icon-button" > < loading [ top_margin ] = " false "
[ size ] = "'small'" > < / loading > < / span >
< span class = "uk-margin-small-left" > View ORCID work < / span >
< / a >
< / span >
< / n g - c o n t a i n e r >
< ng - container * ngIf = "showUpdateButton" >
< span [ attr.uk - tooltip ] = " ( ! putCodes | | putCodes.length = = 0 )
? 'This work is currently deleted.'
: ( 'Update this work to your ORCID record' + ( ( properties . environment == 'beta' ) ? '. The action will affect your real ORCID iD.' : '' )
+ showUpdateDatesInTooltip ( ) ) " >
< a ( click ) = " currentAction = 'update' ; updateWorkPreparation ( ) "
[ class ] = "'uk-button uk-button-default action uk-margin-top uk-flex uk-flex-middle '+ ((showLoading || !putCodes || putCodes.length == 0) ? 'uk-disabled' : '')" >
< icon * ngIf = "!showLoading || currentAction!='update'" name = "refresh" ratio = "1" flex = "true" > < / icon >
< span * ngIf = "showLoading && currentAction=='update'" class = "uk-icon icon-button" > < loading [ top_margin ] = " false "
[ size ] = "'small'" > < / loading > < / span >
< span class = "uk-margin-small-left" > Update ORCID work < / span >
< / a >
< / span >
< / n g - c o n t a i n e r >
< ng - container * ngIf = "!showOnlyUpdateButton" >
< span * ngIf = "!putCodes || putCodes.length == 0"
[ attr . uk - tooltip ] = "tooltipAdd" >
< a ( click ) = " currentAction = 'add' ; saveWorkPreparation ( ) ; "
[ class ] = "'uk-button uk-button-default action uk-margin-top uk-flex uk-flex-middle '+ (showLoading ? 'uk-disabled' : '')" >
< icon * ngIf = "!showLoading || currentAction!='add'" name = "add" ratio = "1" flex = "true" > < / icon >
< span * ngIf = "showLoading && currentAction=='add'" class = "uk-icon icon-button" > < loading [ top_margin ] = " false "
[ size ] = "'small'" > < / loading > < / span >
< span class = "uk-margin-small-left" > Claim < / span >
< / a >
< / span >
2021-02-14 23:42:05 +01:00
2023-08-09 10:52:30 +02:00
< span * ngIf = "putCodes && putCodes.length > 0"
2022-04-12 13:36:31 +02:00
[ attr . uk - tooltip ] = "tooltipDelete" >
2021-02-14 23:42:05 +01:00
< a ( click ) = " currentAction = 'delete' ; deleteWorks ( ) ; "
2022-05-16 13:07:15 +02:00
[ class ] = "'uk-button uk-button-default action uk-margin-top uk-flex uk-flex-middle '+ (showLoading ? 'uk-disabled' : '')" >
2022-04-28 11:13:06 +02:00
< icon * ngIf = "!showLoading || currentAction!='delete'" name = "delete" ratio = "1" flex = "true" > < / icon >
2023-02-17 18:40:05 +01:00
< span * ngIf = "showLoading && currentAction=='delete'" class = "uk-icon icon-button" > < loading [ top_margin ] = " false "
[ size ] = "'small'" > < / loading > < / span >
2023-05-19 13:37:23 +02:00
< span class = "uk-margin-small-left" > Remove < / span >
2021-02-14 23:42:05 +01:00
< / a >
< / span >
2023-08-09 10:52:30 +02:00
< / n g - c o n t a i n e r >
2021-02-10 10:01:55 +01:00
< / n g - c o n t a i n e r >
2022-06-20 14:56:29 +02:00
< modal - alert # workModal large = "true" >
2022-04-20 16:40:18 +02:00
< div * ngIf = "orcidWorks" >
2022-06-20 15:55:05 +02:00
< div * ngFor = "let work of orcidWorks" >
< ng - container * ngIf = "work.work" >
< ng - container * ngTemplateOutlet = "orcidWorkPreview; context:{work: work['work']}" > < / n g - c o n t a i n e r >
< / n g - c o n t a i n e r >
2021-02-10 10:01:55 +01:00
< / div >
< / div >
< / m o d a l - a l e r t >
< ng - template # orcidWorkPreview let - work = "work" >
< div class = "uk-card uk-card-default uk-padding uk-card-hover" >
< div > { { work . title ? . title ? . value } } < / div >
< div > { { work . title ? . subtitle ? . value } } < / div >
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
< div class = "uk-text-uppercase" > { { work [ 'journal-title' ] ? . value } } < / div >
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
< div * ngIf = "work['publication-date'] || work['type']" class = "uk-text-small uk-margin-small-bottom" >
< span * ngIf = "work['publication-date']" >
< span * ngIf = "work['publication-date']['year'] && work['publication-date']['year'].value" >
{ { work [ 'publication-date' ] ? . year ? . value } }
< / span >
< span * ngIf = " work [ ' publication - date ' ] [ ' year ' ] & & work [ ' publication - date ' ] [ ' year ' ] .value
&& (
( work [ 'publication-date' ] [ 'month' ] && work [ 'publication-date' ] [ 'month' ] . value ) || ( work [ 'publication-date' ] [ 'day' ] && work [ 'publication-date' ] [ 'day' ] . value ) ) " >
-
< / span >
< span * ngIf = "work['publication-date']['month'] && work['publication-date']['month'].value" >
{ { work [ 'publication-date' ] ? . month ? . value } }
< / span >
< span * ngIf = " work [ ' publication - date ' ] [ ' month ' ] & & work [ ' publication - date ' ] [ ' month ' ] .value
&& ( work [ 'publication-date' ] [ 'day' ] && work [ 'publication-date' ] [ 'day' ] . value ) " >
-
< / span >
< span * ngIf = "work['publication-date']['day'] && work['publication-date']['day'].value" >
{ { work [ 'publication-date' ] ? . day ? . value } }
< / span >
< span * ngIf = "work['type']" > | < / span >
< / span >
< span > { { work [ 'type' ] } } < / span >
< / div >
<!-- Description -- >
< div * ngIf = "work['short-description']" class = "uk-margin-small-bottom multi-line-ellipsis lines-3" >
< p class = "uk-text-muted uk-text-small" >
{ { work [ 'short-description' ] } }
< / p >
< / div >
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
< div * ngIf = "work['external-ids'] && work['external-ids']['external-id']" class = "uk-margin-small-bottom" >
< showIdentifiers [ identifiers ] = " parseIdentifiers ( work [ ' external - ids ' ] [ ' external - id ' ] ) " > < / showIdentifiers >
< / div >
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
< div * ngIf = "work['contributors'] && work['contributors']['contributor']" >
< div * ngFor = "let contributor of work['contributors']['contributor']" >
< span * ngIf = "contributor['credit-name'] && contributor['credit-name'].value" >
{ { contributor [ 'credit-name' ] ? . value } }
< / span >
< span * ngIf = " ( contributor [ ' credit - name ' ] & & contributor [ ' credit - name ' ] .value ) & & (
( contributor [ 'contributor-attributes' ] && contributor [ 'contributor-attributes' ] [ 'contributor-role' ] )
||
( contributor [ 'contributor-attributes' ] && contributor [ 'contributor-attributes' ] [ 'contributor-sequence' ] )
2023-02-17 18:40:05 +01:00
||
2021-02-10 10:01:55 +01:00
( contributor [ 'contributor-orcid' ] && contributor [ 'contributor-orcid' ] [ 'path' ] )
) " >
(
< / span >
2023-02-17 18:40:05 +01:00
< span
* ngIf = "contributor['contributor-attributes'] && contributor['contributor-attributes']['contributor-role']" >
2021-02-10 10:01:55 +01:00
{ { contributor [ 'contributor-attributes' ] [ 'contributor-role' ] } }
< / span >
2023-02-17 18:40:05 +01:00
< span * ngIf = " ( contributor [ ' contributor - attributes ' ] & & contributor [ ' contributor - attributes ' ] [ ' contributor - role ' ] )
2021-02-10 10:01:55 +01:00
&& ( contributor [ 'contributor-attributes' ] [ 'contributor-sequence' ] || ( contributor [ 'contributor-orcid' ] && contributor [ 'contributor-orcid' ] [ 'path' ] ) ) " >
,
< / span >
2023-02-17 18:40:05 +01:00
< span
* ngIf = "contributor['contributor-attributes'] && contributor['contributor-attributes']['contributor-sequence']" >
2021-02-10 10:01:55 +01:00
{ { contributor [ 'contributor-attributes' ] [ 'contributor-sequence' ] } }
< / span >
2023-02-17 18:40:05 +01:00
< span * ngIf = " contributor [ ' contributor - attributes ' ] & & contributor [ ' contributor - attributes ' ] [ ' contributor - sequence ' ]
2021-02-10 10:01:55 +01:00
&& contributor [ 'contributor-orcid' ] && contributor [ 'contributor-orcid' ] [ 'path' ] " >
2023-02-17 18:40:05 +01:00
,
2021-02-10 10:01:55 +01:00
< / span >
< span * ngIf = "contributor['contributor-orcid'] && contributor['contributor-orcid']['path']" >
{ { contributor [ 'contributor-orcid' ] ? . path } }
< / span >
< span * ngIf = " ( contributor [ ' credit - name ' ] & & contributor [ ' credit - name ' ] .value ) & & (
( contributor [ 'contributor-attributes' ] && contributor [ 'contributor-attributes' ] [ 'contributor-role' ] )
||
( contributor [ 'contributor-attributes' ] && contributor [ 'contributor-attributes' ] [ 'contributor-sequence' ] )
||
( contributor [ 'contributor-orcid' ] && contributor [ 'contributor-orcid' ] [ 'path' ] )
) " >
)
< / span >
< / div >
< / div >
< / div >
< / n g - t e m p l a t e >
2022-04-20 16:40:18 +02:00
< modal - alert # propagationModal ( alertOutput ) = " confirmedPropagation ( ) " >
< div >
2023-02-17 18:40:05 +01:00
This { { openaireEntities . RESULT } } is the result of < span
class = "uk-text-bold" > merged { { openaireEntities . RESULTS } } in OpenAIRE < / span > .
2022-04-20 16:40:18 +02:00
< br > < br >
2023-02-17 18:40:05 +01:00
You have already added < span class = "uk-text-bold" > { { this . putCodes ? . length } } works < / span > in your ORCID record
related to the merged { { openaireEntities . RESULT } } .
2022-04-20 16:40:18 +02:00
< div * ngIf = "currentAction == 'delete'" >
If you continue with delete action , < span class = "uk-text-bold" > all these works will be deleted < / span > .
2021-02-10 10:01:55 +01:00
< / div >
2022-04-20 16:40:18 +02:00
< div * ngIf = "currentAction == 'update'" >
2023-02-17 18:40:05 +01:00
If you continue with update action , < span class = "uk-text-bold" > all these works will be deleted and a new merged work will be added < / span >
instead .
2021-02-10 10:01:55 +01:00
< / div >
< / div >
2022-04-20 16:40:18 +02:00
2023-02-17 18:40:05 +01:00
<!-- < div class = "uk-margin-medium-top uk-align-right" > -- >
<!-- < button ( click ) = " closePropagationModal ( ) " type = "submit" - - >
<!-- class = "uk-button uk-padding-small uk-padding-remove-vertical uk-button-default" > -- >
<!-- < span > Cancel < / span > -- >
<!-- < / button > -- >
<!-- < button ( click ) = " confirmedPropagation ( ) " type = "submit" - - >
<!-- class = "uk-button uk-padding-small uk-padding-remove-vertical uk-margin-left uk-button-primary" > -- >
<!-- < span > Continue < / span > -- >
<!-- < / button > -- >
<!-- < / div > -- >
2021-02-10 10:01:55 +01:00
< / m o d a l - a l e r t >
2023-02-21 15:10:21 +01:00
< fs - modal # propagationFsModal classTitle = "uk-tile-default uk-border-bottom" >
< div >
This { { openaireEntities . RESULT } } is the result of < span
class = "uk-text-bold" > merged { { openaireEntities . RESULTS } } in OpenAIRE < / span > .
< br > < br >
You have already added < span class = "uk-text-bold" > { { this . putCodes ? . length } } works < / span > in your ORCID record
related to the merged { { openaireEntities . RESULT } } .
< div * ngIf = "currentAction == 'delete'" >
If you continue with delete action , < span class = "uk-text-bold" > all these works will be deleted < / span > .
< / div >
< div * ngIf = "currentAction == 'update'" >
If you continue with update action , < span class = "uk-text-bold" > all these works will be deleted and a new merged work will be added < / span >
instead .
< / div >
< / div >
< button class = "uk-margin-medium-top uk-button uk-button-primary uk-align-center" ( click ) = " confirmedPropagation ( ) " >
Continue
< / button >
< / f s - m o d a l >
2021-01-13 19:23:31 +01:00
`
} )
export class OrcidWorkComponent {
2023-02-21 15:10:21 +01:00
@Input ( ) isMobile : boolean = false ;
2021-02-10 10:01:55 +01:00
@Input ( ) resultId : string = "" ;
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
@Input ( ) resultTitle : string = "" ;
2021-01-13 19:23:31 +01:00
@Input ( ) resultLandingInfo : ResultLandingInfo ;
@Input ( ) pids : string = "" ;
2021-02-10 10:01:55 +01:00
@Input ( ) identifiers : Map < string , string [ ] > ;
2021-01-13 19:23:31 +01:00
@Input ( ) type : string ;
2021-02-10 10:01:55 +01:00
@Input ( ) putCodes : string [ ] = [ ] ;
@Input ( ) creationDates : string [ ] = [ ] ;
@Input ( ) updateDates : string [ ] = [ ] ;
2021-01-13 19:23:31 +01:00
@Input ( ) givenPutCode : boolean = false ;
@Input ( ) pageType : string = "search" ;
2023-08-09 10:52:30 +02:00
//for myorcid links page
@Input ( ) showOnlyUpdateButton : boolean = false ;
@Input ( ) showUpdateButton : boolean = true ;
2021-01-13 19:23:31 +01:00
public subscriptions : Subscription [ ] = [ ] ;
@ViewChild ( 'workModal' ) workModal ;
2022-11-28 18:22:01 +01:00
// @ViewChild('saveWorkModal') saveWorkModal;
2021-01-13 19:23:31 +01:00
@ViewChild ( 'grantModal' ) grantModal ;
2023-02-21 15:10:21 +01:00
@ViewChild ( 'grantFsModal' ) grantFsModal : FullScreenModalComponent ;
2022-11-28 18:22:01 +01:00
// @ViewChild('messageModal') messageModal;
2021-02-10 10:01:55 +01:00
@ViewChild ( 'propagationModal' ) propagationModal ;
2023-02-21 15:10:21 +01:00
@ViewChild ( 'propagationFsModal' ) propagationFsModal ;
2021-01-13 19:23:31 +01:00
public requestGrant : boolean = false ;
2021-02-10 10:01:55 +01:00
public requestGrantMessage : string = "Please grant OpenAIRE to access and update your ORCID works." ;
2021-01-13 19:23:31 +01:00
private tokenUrl : string ;
public message : string = "" ;
public showLoading : boolean = false ;
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
public works : any [ ] = [ ] ;
2021-02-10 10:01:55 +01:00
public orcidWorks : any [ ] = [ ] ;
2021-01-13 19:23:31 +01:00
public window : any ;
2023-02-17 18:40:05 +01:00
2022-04-12 13:36:31 +02:00
public isLoggedIn : boolean = false ;
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
public currentAction : string = "" ;
2023-02-17 18:40:05 +01:00
2022-04-16 09:47:30 +02:00
public hoverAdd : boolean = false ;
public hoverDelete : boolean = false ;
2023-02-17 18:40:05 +01:00
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
public properties : EnvProperties = properties ;
2022-05-04 12:57:13 +02:00
public openaireEntities = OpenaireEntities ;
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
constructor ( private route : ActivatedRoute ,
private _router : Router ,
private orcidService : OrcidService ,
2022-04-12 13:36:31 +02:00
private resultLandingService : ResultLandingService ,
private userManagementService : UserManagementService ) {
2023-02-17 18:40:05 +01:00
if ( typeof document !== 'undefined' ) {
2021-02-24 21:33:37 +01:00
this . tokenUrl = properties . orcidTokenURL
2023-02-17 18:40:05 +01:00
+ "client_id=" + properties . orcidClientId
2021-01-13 19:23:31 +01:00
// + "&response_type=code&scope=/activities/update"
2021-02-10 10:01:55 +01:00
// + "&response_type=code&scope=/authenticate /activities/update /person/update /read-limited"
+ "&response_type=code&scope=/activities/update /read-limited"
2023-02-17 18:40:05 +01:00
+ "&redirect_uri=" + location . origin + "/orcid?source=openaire" ;
2021-01-13 19:23:31 +01:00
}
}
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
ngOnInit() {
2022-04-12 13:36:31 +02:00
this . subscriptions . push ( this . userManagementService . getUserInfo ( ) . subscribe ( user = > {
if ( user ) {
this . isLoggedIn = true ;
2023-02-17 18:40:05 +01:00
if ( ! this . givenPutCode ) {
2022-04-12 13:36:31 +02:00
this . getPutCode ( ) ;
}
} else {
this . isLoggedIn = false ;
}
} , error = > {
this . isLoggedIn = false ;
} ) ) ;
2021-01-13 19:23:31 +01:00
}
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
ngOnDestroy() {
this . subscriptions . forEach ( subscription = > {
if ( subscription instanceof Subscriber ) {
2021-02-10 10:01:55 +01:00
// console.debug("subscription closing...");
2021-01-13 19:23:31 +01:00
subscription . unsubscribe ( ) ;
}
} ) ;
}
2023-02-17 18:40:05 +01:00
2021-04-16 10:31:05 +02:00
public showUpdateDatesInTooltip() {
const monthNames = [ "Jan" , "Feb" , "Mar" , "Apr" , "May" , "Jun" , "Jul" , "Aug" , "Sep" , "Oct" , "Nov" , "Dec" ] ;
let response : string = "" ;
2023-02-17 18:40:05 +01:00
if ( this . updateDates != null && this . updateDates . length > 0 ) {
2021-04-16 10:31:05 +02:00
response += "<br><br> Last update in ORCID<br>" ;
2023-02-17 18:40:05 +01:00
for ( let i = 0 ; i < this . updateDates . length ; i ++ ) {
2021-04-16 10:31:05 +02:00
let date : Date = new Date ( this . updateDates [ i ] ) ;
2023-02-17 18:40:05 +01:00
response += "<span>" + date . getDate ( ) + " " + monthNames [ date . getMonth ( ) ] + " " + date . getFullYear ( ) ;
if ( i < this . updateDates . length - 1 ) {
2021-04-16 10:31:05 +02:00
response += "& " ;
}
response += "</span>" ;
}
}
return response ;
}
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
public parseIdentifiers ( identifiers : ExternalIDV3_0 [ ] ) : Map < string , string [ ] > {
let identifiersMap : Map < string , string [ ] > = new Map < string , string [ ] > ( ) ;
2023-02-17 18:40:05 +01:00
for ( let identifier of identifiers ) {
if ( ! identifiersMap . has ( identifier [ 'external-id-type' ] ) ) {
2021-02-10 10:01:55 +01:00
identifiersMap . set ( identifier [ 'external-id-type' ] , new Array < string > ( ) ) ;
}
identifiersMap . get ( identifier [ 'external-id-type' ] ) . push ( identifier [ 'external-id-value' ] ) ;
}
return identifiersMap ;
}
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
openGrantWindow() {
2023-02-17 18:40:05 +01:00
if ( ! Session . isLoggedIn ( ) ) {
2021-02-10 10:01:55 +01:00
//this.userValidMessage = "User session has expired. Please login again.";
2023-02-17 18:40:05 +01:00
this . _router . navigate ( [ '/user-info' ] , {
queryParams : {
"errorCode" : LoginErrorCodes . NOT_VALID ,
"redirectUrl" : this . _router . url
}
} ) ;
2021-02-10 10:01:55 +01:00
} else {
// this.tokenUrl = location.origin+"/orcid";
this . window = window . open ( this . tokenUrl , '_blank' ,
'location=yes,height=700,width=540,left=500,top=100,scrollbars=yes,status=yes' ) ;
// this.requestGrant = false;
this . closeGrantModal ( ) ;
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
let self = this ;
window . onmessage = function ( ev ) {
2022-06-20 14:56:29 +02:00
if ( ev . isTrusted && ev . origin == location . origin && ev . data == 'success' ) {
self . requestGrant = false ;
UIkit . notification ( {
message : 'Thank you for <strong>connecting your ORCID iD</strong> with OpenAIRE!' ,
status : 'success' ,
timeout : 6000 ,
pos : 'bottom-right'
} ) ;
if ( self . currentAction == "add" ) {
self . saveWorkPreparation ( ) ;
} else if ( self . currentAction == "delete" ) {
self . deleteWorks ( ) ;
} else if ( self . currentAction == "update" ) {
self . updateWorkPreparation ( ) ;
}
2021-02-10 10:01:55 +01:00
}
2022-06-20 14:56:29 +02:00
}
2021-02-10 10:01:55 +01:00
}
2021-01-13 19:23:31 +01:00
}
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
private getPutCode() {
this . subscriptions . push ( this . orcidService . getPutCode ( this . pids ) . subscribe (
putCodes = > {
this . putCodes = putCodes ;
} , error = > {
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
}
) )
}
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
private getResultLandingInfo ( action : string ) {
2022-09-06 15:28:51 +02:00
this . subscriptions . push ( this . resultLandingService . getResultLandingInfo ( this . resultId , null , this . type , null , properties ) . subscribe (
2021-02-10 10:01:55 +01:00
resultLandingInfo = > {
this . resultLandingInfo = resultLandingInfo ;
if ( this . resultLandingInfo && this . resultLandingInfo . identifiers ) {
let pidsArray : string [ ] = [ ] ;
for ( let key of Array . from ( this . resultLandingInfo . identifiers . keys ( ) ) ) {
pidsArray = pidsArray . concat ( this . resultLandingInfo . identifiers . get ( key ) ) ;
}
this . pids = pidsArray . join ( ) ;
}
2023-02-17 18:40:05 +01:00
if ( action == "save" ) {
2021-02-10 10:01:55 +01:00
this . saveWork ( ) ;
} else if ( action == "update" ) {
this . updateWork ( ) ;
}
} ,
error = > {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . handleError ( error ) ;
2021-02-10 10:01:55 +01:00
console . error ( "Error getting landing info: " , error ) ;
}
) )
}
2023-02-17 18:40:05 +01:00
2022-07-19 10:16:24 +02:00
public saveWorkPreparation() {
2023-02-17 18:40:05 +01:00
if ( ! Session . isLoggedIn ( ) ) {
2021-02-10 10:01:55 +01:00
//this.userValidMessage = "User session has expired. Please login again.";
2023-02-17 18:40:05 +01:00
this . _router . navigate ( [ '/user-info' ] , {
queryParams : {
"errorCode" : LoginErrorCodes . NOT_VALID ,
"redirectUrl" : this . _router . url
}
} ) ;
2021-01-13 19:23:31 +01:00
} else {
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
if ( this . requestGrant ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . openGrantModal ( "Add, delete or edit work in your ORCID record" ) ;
2021-01-13 19:23:31 +01:00
} else {
2021-02-10 10:01:55 +01:00
this . showLoading = true ;
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
if ( this . resultLandingInfo ) {
this . saveWork ( ) ;
} else {
this . getResultLandingInfo ( "save" ) ;
}
2021-01-13 19:23:31 +01:00
}
}
}
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
private saveWork() {
this . subscriptions . push ( this . orcidService . saveWork ( this . resultLandingInfo , this . pids ) . subscribe (
response = > {
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
// for testing only
2021-02-10 10:01:55 +01:00
// this.openGrantModal("Add work in your ORCID record");
2021-01-13 19:23:31 +01:00
// this.requestGrant = true;
// this.requestGrantMessage = "Please grant OpenAIRE to access and update your ORCID record and works.";
2023-02-17 18:40:05 +01:00
if ( response == null ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . handleError ( null ) ;
2021-01-13 19:23:31 +01:00
console . error ( "Error posting landing info: null" ) ;
} else {
2023-02-17 18:40:05 +01:00
this . putCodes . push ( "" + response [ 'put-code' ] ) ;
2021-02-10 10:01:55 +01:00
this . creationDates . push ( response [ 'created-date' ] [ 'value' ] ) ;
this . updateDates . push ( response [ 'last-modified-date' ] [ 'value' ] ) ;
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
// this.closeGrantModal();
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
// this.message = "You have successfully added work with pids: "+this.pids+" in your ORCID record!";
2023-02-17 18:40:05 +01:00
this . message = "You have successfully added work \"" + this . resultTitle + "\" in your ORCID record!" ;
2021-01-13 19:23:31 +01:00
// this.openMessageModal("Work added successfully");
2023-02-17 18:40:05 +01:00
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
// message: 'You have <strong>successfully added</strong> work with pids: <strong>'+this.pids+'</strong> in your ORCID record!',
2021-01-13 19:23:31 +01:00
UIkit . notification ( {
2023-02-17 18:40:05 +01:00
message : 'You have <strong>successfully added</strong> work "<strong>' + this . resultTitle + '</strong>" in your ORCID record!'
// +
// '<br><br><a class="uk-link" [href]="goToOrcidLinksPage()">Manager your ORCID links</a>'
2021-04-16 10:31:05 +02:00
,
2023-02-17 18:40:05 +01:00
// '<br><br><a class="uk-link" (click)="goToOrcidLinksPage()">Manager your ORCID links</a>',
// '<br><br><a class="uk-link" routerLinkActive="router-link-active" [routerLink]="myOrcidLinksPage">Manager your ORCID links</a>',
2021-01-13 19:23:31 +01:00
status : 'success' ,
timeout : 6000 ,
pos : 'bottom-right'
} ) ;
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
this . showLoading = false ;
}
} ,
error = > {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . handleError ( error ) ;
2021-01-13 19:23:31 +01:00
console . error ( "Error posting landing info" , error ) ;
}
) ) ;
}
2023-02-17 18:40:05 +01:00
2021-04-16 10:31:05 +02:00
goToOrcidLinksPage() {
this . _router . navigate ( [ this . properties . myOrcidLinksPage ] ) ;
}
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
private updateWorkPreparation() {
2023-02-17 18:40:05 +01:00
if ( ! Session . isLoggedIn ( ) ) {
this . _router . navigate ( [ '/user-info' ] , {
queryParams : {
"errorCode" : LoginErrorCodes . NOT_VALID ,
"redirectUrl" : this . _router . url
}
} ) ;
2021-02-10 10:01:55 +01:00
} else {
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
if ( this . requestGrant ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . openGrantModal ( "Add, delete or edit work in your ORCID record" ) ;
2023-02-17 18:40:05 +01:00
} else if ( this . putCodes . length > 1 ) {
2021-02-10 10:01:55 +01:00
this . openPropagationModal ( "Update ORCID work" ) ;
} else {
this . showLoading = true ;
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
if ( this . resultLandingInfo ) {
this . updateWork ( ) ;
2021-01-13 19:23:31 +01:00
} else {
2021-02-10 10:01:55 +01:00
this . getResultLandingInfo ( "update" ) ;
2021-01-13 19:23:31 +01:00
}
2021-02-10 10:01:55 +01:00
}
}
}
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
private updateWork() {
this . subscriptions . push ( this . orcidService . updateWork ( this . resultLandingInfo , this . pids , this . putCodes [ 0 ] ) . subscribe (
response = > {
2023-02-17 18:40:05 +01:00
if ( response ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . updateDates [ 0 ] = response [ 'last-modified-date' ] . value ;
2023-02-17 18:40:05 +01:00
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
// message: 'You have <strong>successfully updated</strong> work with pids: <strong>' + this.pids + '</strong> in your ORCID record!',
UIkit . notification ( {
2021-04-16 10:31:05 +02:00
message : 'You have <strong>successfully updated</strong> work "<strong>' + this . resultTitle + '</strong>" in your ORCID record!'
2023-02-17 18:40:05 +01:00
// +
// '<br><br><a routerLinkActive="router-link-active" [routerLink]="myOrcidLinksPage">Manager your ORCID links</a>'
2021-04-16 10:31:05 +02:00
,
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
status : 'success' ,
timeout : 6000 ,
pos : 'bottom-right'
} ) ;
}
2021-02-10 10:01:55 +01:00
this . showLoading = false ;
} ,
error = > {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . handleError ( error ) ;
2021-02-10 10:01:55 +01:00
console . error ( "Error updating landing info" , error ) ;
}
) ) ;
}
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
public confirmedPropagation() {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . propagationModal . cancel ( ) ;
2023-02-17 18:40:05 +01:00
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . deleteWorks ( true ) ;
//}
// if(this.currentAction == "update") {
// this.saveWork();
// }
2021-02-10 10:01:55 +01:00
}
2023-02-17 18:40:05 +01:00
2022-07-19 10:16:24 +02:00
public getOrcidWorks() {
2023-02-17 18:40:05 +01:00
if ( ! Session . isLoggedIn ( ) ) {
this . _router . navigate ( [ '/user-info' ] , {
queryParams : {
"errorCode" : LoginErrorCodes . NOT_VALID ,
"redirectUrl" : this . _router . url
}
} ) ;
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
} else {
this . showLoading = true ;
this . subscriptions . push ( this . orcidService . getOrcidWorks ( this . putCodes ) . subscribe (
2022-06-20 15:55:05 +02:00
( response ) = > {
let error : boolean = true ;
2023-02-17 18:40:05 +01:00
if ( response && response [ 'bulk' ] ) {
2022-06-20 15:55:05 +02:00
response = response [ 'bulk' ] . filter ( res = > {
return ( ! res . error && res . work ) ;
} ) ;
2023-02-17 18:40:05 +01:00
if ( response && response . length > 0 ) {
2022-06-20 15:55:05 +02:00
error = false ;
this . orcidWorks = response ;
this . openWorkModal ( ) ;
}
}
2023-02-17 18:40:05 +01:00
if ( error ) {
2022-06-20 14:56:29 +02:00
UIkit . notification ( {
message : 'There was an error getting this work. </br> Please make sure you have not deleted it from your ORCID iD.' ,
status : 'warning' ,
timeout : 6000 ,
pos : 'bottom-right'
} ) ;
}
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . showLoading = false ;
} ,
error = > {
this . handleError ( error ) ;
console . error ( "Error getting work" , error ) ;
}
) ) ;
}
2021-01-13 19:23:31 +01:00
}
2023-02-17 18:40:05 +01:00
2022-07-19 10:16:24 +02:00
public deleteWorks ( confirmed : boolean = false ) {
2023-02-17 18:40:05 +01:00
if ( ! Session . isLoggedIn ( ) ) {
this . _router . navigate ( [ '/user-info' ] , {
queryParams : {
"errorCode" : LoginErrorCodes . NOT_VALID ,
"redirectUrl" : this . _router . url
}
} ) ;
2021-01-13 19:23:31 +01:00
} else {
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
if ( this . requestGrant ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . openGrantModal ( "Add, delete or edit work in your ORCID record" ) ;
2023-02-17 18:40:05 +01:00
} else if ( this . putCodes . length > 1 && ! confirmed ) {
2021-02-10 10:01:55 +01:00
this . openPropagationModal ( "Delete ORCID work" ) ;
} else {
this . showLoading = true ;
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
if ( ! this . resultLandingInfo && this . identifiers ) {
let pidsArray : string [ ] = [ ] ;
for ( let key of Array . from ( this . identifiers . keys ( ) ) ) {
pidsArray = pidsArray . concat ( this . identifiers . get ( key ) ) ;
}
this . pids = pidsArray . join ( ) ;
}
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
this . subscriptions . push ( this . orcidService . deleteWorks ( this . putCodes ) . subscribe (
deletedPutCodes = > {
let deletedAll : boolean = true ;
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
if ( deletedPutCodes ) {
for ( let i = 0 ; i < deletedPutCodes . length ; i ++ ) {
let deletedPutCode = deletedPutCodes [ i ] ;
if ( deletedPutCode == null ) {
deletedAll = false ;
} else {
this . putCodes . splice ( i , 1 ) ;
this . creationDates . splice ( i , 1 ) ;
this . updateDates . splice ( i , 1 ) ;
// this.works.splice(i, 1);
}
2021-01-13 19:23:31 +01:00
}
2021-02-10 10:01:55 +01:00
} else {
deletedAll = false ;
2021-01-13 19:23:31 +01:00
}
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
if ( ! deletedAll ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . handleError ( null ) ;
2021-02-10 10:01:55 +01:00
console . error ( "Error deleting landing info: null" ) ;
} else {
2023-02-17 18:40:05 +01:00
if ( this . currentAction == "update" ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . saveWork ( ) ;
} else {
// this.closeGrantModal();
// this.message = "You have successfully deleted work with pids: " + this.pids + " from your ORCID record!";
this . message = "You have successfully deleted work \"" + this . resultTitle + "\" from your ORCID record!" ;
// this.openMessageModal("Work deleted successfully");
2023-02-17 18:40:05 +01:00
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
// message: 'You have <strong>successfully deleted</strong> work with pids: <strong>' + this.pids + '</strong> from your ORCID record!',
UIkit . notification ( {
2021-04-16 10:31:05 +02:00
message : 'You have <strong>successfully deleted</strong> work "<strong>' + this . resultTitle + '</strong>" from your ORCID record!'
2023-02-17 18:40:05 +01:00
// +
// '<br><br><a routerLinkActive="router-link-active" [routerLink]="myOrcidLinksPage">Manager your ORCID links</a>'
2021-04-16 10:31:05 +02:00
,
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
status : 'success' ,
timeout : 6000 ,
pos : 'bottom-right'
} ) ;
this . showLoading = false ;
}
2021-02-10 10:01:55 +01:00
}
} ,
error = > {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . handleError ( error ) ;
2021-02-10 10:01:55 +01:00
console . error ( "Error deleting work" , error ) ;
2021-01-13 19:23:31 +01:00
}
2021-02-10 10:01:55 +01:00
) ) ;
}
2021-01-13 19:23:31 +01:00
}
}
2023-02-17 18:40:05 +01:00
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
openGrantModal ( title : string ) {
2023-02-21 15:10:21 +01:00
if ( this . isMobile ) {
this . grantFsModal . okButton = false ;
this . grantFsModal . title = title ;
this . grantFsModal . open ( ) ;
} else {
this . grantModal . cancelButton = true ;
this . grantModal . okButton = true ;
this . grantModal . okButtonText = "Grant OpenAIRE" ;
this . grantModal . okButtonLeft = false ;
this . grantModal . alertTitle = title ;
this . grantModal . open ( ) ;
}
2021-02-10 10:01:55 +01:00
}
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
closeGrantModal() {
this . grantModal . cancel ( ) ;
}
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
openWorkModal() {
2021-01-13 19:23:31 +01:00
this . workModal . cancelButton = false ;
this . workModal . okButton = false ;
2021-02-10 10:01:55 +01:00
this . workModal . alertTitle = "Work in your ORCID record" ;
2021-01-13 19:23:31 +01:00
this . workModal . open ( ) ;
}
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
closeWorkModal() {
this . workModal . cancel ( ) ;
}
2023-02-17 18:40:05 +01:00
2022-11-28 18:22:01 +01:00
// openMessageModal(title: string) {
// this.messageModal.cancelButton = false;
// this.messageModal.okButton = false;
// this.messageModal.alertTitle = title;
// this.messageModal.open();
// }
//
// closeMessageModal() {
// this.messageModal.cancel();
// }
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
openPropagationModal ( title : string ) {
2023-02-21 15:10:21 +01:00
if ( this . isMobile ) {
this . propagationFsModal . okButton = false ;
this . propagationFsModal . title = title ;
this . propagationFsModal . open ( ) ;
} else {
this . propagationModal . cancelButton = true ;
this . propagationModal . okButton = true ;
this . propagationModal . okButtonText = "Continue" ;
this . propagationModal . okButtonLeft = false ;
this . propagationModal . alertTitle = title ;
this . propagationModal . open ( ) ;
}
2021-02-10 10:01:55 +01:00
}
2023-02-17 18:40:05 +01:00
2021-02-10 10:01:55 +01:00
closePropagationModal() {
this . propagationModal . cancel ( ) ;
}
2023-02-17 18:40:05 +01:00
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
handleError ( error ) {
2023-02-17 18:40:05 +01:00
if ( error && error . status == "401" ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . openGrantModal ( "Add, delete or edit work in your ORCID record" ) ;
2021-01-13 19:23:31 +01:00
this . requestGrant = true ;
2021-02-10 10:01:55 +01:00
this . requestGrantMessage = "Please grant OpenAIRE to access and update your ORCID record and works. " ;
2023-02-17 18:40:05 +01:00
// + "If you have already granted OpenAIRE, you just need to login again to ORCID!";
} else if ( error && error . status == "403" ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . openGrantModal ( "Add, delete or edit work in your ORCID record" ) ;
2021-01-13 19:23:31 +01:00
this . requestGrant = true ;
this . requestGrantMessage = "Please login again to ORCID."
// this.openGrantModal();
} else {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . message = "" ;
2023-02-17 18:40:05 +01:00
if ( error && error . status == "409" ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
this . message = "There is <span class='uk-text-bold'>already a work in your ORCID record</span> with the same information of the work you are trying to add now. <br><br>" ;
}
2023-02-17 18:40:05 +01:00
if ( this . currentAction == "get" ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
// this.message += "There was an <span class='uk-text-bold'>error getting</span> work with pids: <span class='uk-text-bold'>" + this.pids + "</span> from your ORCID record. <br> Please try again later.";
this . message += "There was an <span class='uk-text-bold'>error getting</span> work \"<span class='uk-text-bold'>" + this . resultTitle + "</span>\" from your ORCID record. <br> Please try again later." ;
2023-02-17 18:40:05 +01:00
} else if ( this . currentAction == "add" ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
// this.message += "There was an <span class='uk-text-bold'>error adding</span> work with pids: <span class='uk-text-bold'>"+this.pids+"</span> to your ORCID record. <br> Please try again later.";
2023-02-17 18:40:05 +01:00
this . message += "There was an <span class='uk-text-bold'>error adding</span> work with pids: \"<span class='uk-text-bold'>" + this . pids + "</span>\" to your ORCID record. <br> Please try again later." ;
} else if ( this . currentAction == "update" ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
// this.message += "There was an <span class='uk-text-bold'>error updating</span> work with pids: <span class='uk-text-bold'>"+this.pids+"</span> to your ORCID record. <br> Please try again later.";
2023-02-17 18:40:05 +01:00
this . message += "There was an <span class='uk-text-bold'>error updating</span> work \"<span class='uk-text-bold'>" + this . resultTitle + "</span>\" to your ORCID record. <br> Please try again later." ;
} else if ( this . currentAction == "delete" ) {
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
// this.message += "There was an <span class='uk-text-bold'>error deleting</span> work with pids: <span class='uk-text-bold'>"+this.pids+"</span> from your ORCID record. <br> Please try again later.";
2023-02-17 18:40:05 +01:00
this . message += "There was an <span class='uk-text-bold'>error deleting</span> work \"<span class='uk-text-bold'>" + this . resultTitle + "</span>\" from your ORCID record. <br> Please try again later." ;
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
} else {
this . message += "There was an error. Please try again later."
}
2023-02-17 18:40:05 +01:00
2021-01-13 19:23:31 +01:00
UIkit . notification ( {
2021-02-10 10:01:55 +01:00
message : this.message ,
[Trunk | Library]:
1. resultLanding.component.html & result-preview.component.html: Show orcid buttons in all environments (production too) | in <orcid-work> added "resultTitle" property.
2. myOrcidLinks.component.ts: Added "getPersonalDetails()" method and link to advanced research outcomes page, filtered by user's name (if personal details from ORCID fails, use name from AAI - getUserInfo).
3. searchMyOrcidResults.module.ts: Removed PagingModule and added NoLoadPaging.
4. searchMyOrcidResults.component.ts: Added method "totalPages()" to calculate pages in paging.
5. searchMyOrcidResults.component.html:
a. Added <no-load-paging> (instead of custom paging with <paging-no-load>).
b. In <orcid-work> added "resultTitle" property.
c. Fix widths of grid inside card for result preview and orcid buttons.
6. orcid-work.component.ts:
a. Added "resultTitle" @Input property, to show it in notifications, instead of pids.
b. Updated messages for errors and for multiple put-codes.
c. Use "danger" notifications instead of "warning" when an error occurs.
d. For search and my orcid links pages, in orcid buttons, use <icon> for icons | For landing page, updated icons in orcid buttons.
e. Added message "The action will affect your real ORCID iD." in tooltips, when environment == 'beta'.
f. Removed property "procedurePaused" and its usage replaced by "currentAction".
g. [Bug fix] For search pages, added "uk-align-right", in order orcid button not to take width for the whole line.
h. [Bug fix] In method "getOrcidWorks()" check "Session.isLoggedIn()" was missing.
7. orcid.component.ts: If personal details from ORCID fails, use name from AAI - getUserInfo.
8. orcid.module.ts: Added IconsModule and registered icons: add, remove, preview, refresh in IconsService.
9. searchResult.component.ts: Call "orcidService.getPutCodes()" in all environments (production too).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60619 d315682c-612b-4755-9ff5-7f18f6832af3
2021-03-11 02:40:53 +01:00
status : 'danger' ,
2021-01-13 19:23:31 +01:00
timeout : 6000 ,
pos : 'bottom-right'
} ) ;
// this.openMessageModal("An error occured");
}
this . showLoading = false ;
}
2023-02-17 18:40:05 +01:00
2022-04-12 13:36:31 +02:00
get tooltipAdd() {
return "Add this work to your <span class=\"text-orcid\">ORCID</span> record" + ( ( properties . environment == "beta" ) ? ". The action will affect your real ORCID iD." : "" ) ;
}
2023-02-17 18:40:05 +01:00
2022-04-12 13:36:31 +02:00
get tooltipDelete() {
return "Delete this work from your <span class=\"text-orcid\">ORCID</span> record" + ( ( properties . environment == "beta" ) ? ". The action will affect your real ORCID iD." : "" ) ;
}
2023-02-17 18:40:05 +01:00
2022-04-12 13:36:31 +02:00
get tooltipNoPid() {
2022-04-16 09:47:30 +02:00
return "Only resources with a PID (persistent identifier) like DOI, handle, PMID can be added or deleted from your <span class=\"text-orcid\">ORCID</span> record" ;
2022-04-12 13:36:31 +02:00
}
2023-02-17 18:40:05 +01:00
2022-04-12 13:36:31 +02:00
get tooltipNoLoggedInUser() {
2023-02-17 18:40:05 +01:00
return "Add or delete a work from your <span class=\"text-orcid\">ORCID</span> record. Please log in first."
2022-04-16 09:47:30 +02:00
}
2023-02-17 18:40:05 +01:00
2022-04-16 09:47:30 +02:00
hoverEvent ( $event , action : string = "add" ) {
2023-02-17 18:40:05 +01:00
if ( action == "add" ) {
2022-04-16 09:47:30 +02:00
this . hoverAdd = $event . type == "mouseover" ;
this . hoverDelete = false ;
2023-02-17 18:40:05 +01:00
} else if ( action == "delete" ) {
2022-04-16 09:47:30 +02:00
this . hoverDelete = $event . type == "mouseover" ;
this . hoverAdd = false ;
}
2022-04-12 13:36:31 +02:00
}
2021-03-11 14:27:30 +01:00
}