Fix repositories list update after deposit
This commit is contained in:
parent
6924d82c80
commit
8b34d55706
|
@ -167,7 +167,7 @@
|
|||
<hr class="hr-line">
|
||||
</div>
|
||||
</div>
|
||||
<app-dmp-deposit-dropdown *ngIf="(hasDoi(dmp) || moreDeposit()) && isFinalizedDmp(dmp) && !this.isPublicView && isUserOwner" [inputRepos]="depositRepos" [dmp]="dmp" (outputReposEmitter)="afterDeposit($event)"></app-dmp-deposit-dropdown>
|
||||
<app-dmp-deposit-dropdown *ngIf="(hasDoi(dmp) || moreDeposit()) && isFinalizedDmp(dmp) && !this.isPublicView && isUserOwner" [inputRepos]="inputRepos" [dmp]="dmp" (outputReposEmitter)="afterDeposit($event)"></app-dmp-deposit-dropdown>
|
||||
<div *ngIf="isFinalizedDmp(dmp) && hasDoi(dmp) && !isPublishedDMP(dmp) && isUserOwner" (click)="reverse()" class="row ml-0 mr-0 pl-4 pb-3 d-flex align-items-center">
|
||||
<button mat-mini-fab class="frame-btn">
|
||||
<mat-icon class="mat-mini-fab-icon">unarchive</mat-icon>
|
||||
|
|
|
@ -508,12 +508,16 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
|||
|
||||
afterDeposit(result: DoiModel[]) {
|
||||
if (result.length > 0) {
|
||||
this.dmp.dois.push(...result);
|
||||
this.dmp.dois = result;
|
||||
this.selectedModel = this.dmp.dois[this.dmp.dois.length - 1];
|
||||
this.hasDOIToken = true;
|
||||
}
|
||||
}
|
||||
|
||||
get inputRepos() {
|
||||
return this.depositRepos.filter(repo => !this.dmp.dois.find(doi => doi.repositoryId === repo.repositoryId));
|
||||
}
|
||||
|
||||
moreDeposit(){
|
||||
return (this.dmp.dois.length < this.depositRepos.length);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue