Publication page add go back to functionality

This commit is contained in:
Peter Maquiran
2021-03-17 09:01:24 +01:00
parent 60394dd2d6
commit 1a79741e2d
9 changed files with 59 additions and 19 deletions
@@ -76,15 +76,20 @@
class="height-100 d-flex flex-column overflow-hidden flex-grow-1"
(addNewPublication)="addNewPublication($event)"
(openPublicationDetails)="openPublicationDetails($event)"
(goBackToViewPublications)="goBackToViewPublications($event)"
(closeDesktopComponent)="closeDesktopComponent($event)"
>
</app-view-publications>
<app-new-publication *ngIf="desktopComponent.showAddNewPublication"
<app-new-publication
*ngIf="desktopComponent.showAddNewPublication"
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
[folderId]="folderId"
[publicationType]="publicationType"
[publication]="publication"
(closeDesktopComponent)="closeDesktopComponent($event)"
(goBacktoPublicationDetails)="goBacktoPublicationDetails($event)"
(goBackToViewPublications)="goBackToViewPublications($event)"
>
</app-new-publication>
@@ -94,6 +99,8 @@
[publicationId]="publicationId"
(addNewPublication)="addNewPublication($event)"
(closeDesktopComponent)="closeDesktopComponent($event)"
(goBacktoPublicationDetails)="goBacktoPublicationDetails($event)"
(goBackToViewPublications)="goBackToViewPublications($event)"
></app-publication-detail-shared>
<app-new-action
@@ -175,10 +175,25 @@ export class PublicationsPage implements OnInit {
} else {
// open angular component
this.folderId = folderId
this.desktopComponent.showViewPublication = true;
this.desktopComponent.showViewPublication = true;
}
}
// called from view publications
goBackToViewPublications(){
this.closeDesktopComponent();
this.desktopComponent.showViewPublication = true;
}
goBackToPubications(){
this.closeDesktopComponent();
this.desktopComponent.showViewPublication = true;
}
async goBacktoPublicationDetails(){
this.closeDesktopComponent();
this.desktopComponent.showPublicationDetail = true;
}
@@ -202,6 +217,7 @@ export class PublicationsPage implements OnInit {
this.desktopComponent.showPublicationDetail = true;
}
async closeDesktopComponent (xx?: any){