no message

This commit is contained in:
Bernaldo Mihasi 2022-12-19 11:37:49 +02:00
parent 80fba7c655
commit 976d0221ce
1 changed files with 13 additions and 6 deletions

View File

@ -154,7 +154,8 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
.subscribe(
repos => {
this.depositRepos = repos;
});
},
error => this.depositRepos = []);
}
onFetchingDeletedCallbackError(redirectRoot: string) {
@ -649,13 +650,19 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
}
createDoiLink(doiModel: DoiModel): string {
if(doiModel.repositoryId == "Zenodo"){
const doiarr = doiModel.doi.split('.');
const id = doiarr[doiarr.length - 1];
return this.depositRepos.find(r => r.repositoryId == doiModel.repositoryId).repositoryRecordUrl + id;
const recordUrl = this.depositRepos.find(r => r.repositoryId == doiModel.repositoryId).repositoryRecordUrl;
if(typeof recordUrl !== "undefined"){
if(doiModel.repositoryId == "Zenodo"){
const doiarr = doiModel.doi.split('.');
const id = doiarr[doiarr.length - 1];
return this.depositRepos.find(r => r.repositoryId == doiModel.repositoryId).repositoryRecordUrl + id;
}
else{
return this.depositRepos.find(r => r.repositoryId == doiModel.repositoryId).repositoryRecordUrl + doiModel.doi;
}
}
else{
return this.depositRepos.find(r => r.repositoryId == doiModel.repositoryId).repositoryRecordUrl + doiModel.doi;
return "";
}
}