mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Publication page add go back to functionality
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -176,9 +176,24 @@ export class PublicationsPage implements OnInit {
|
||||
// open angular component
|
||||
this.folderId = folderId
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
@@ -203,6 +218,7 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async closeDesktopComponent (xx?: any){
|
||||
|
||||
this.desktopComponent = {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<ion-header class="ion-no-border background-white px-20 pt-25">
|
||||
<div class="title-content">
|
||||
<div class="title-content d-flex">
|
||||
<div class="back-icon">
|
||||
<ion-icon class="font-35" (click)="goBack()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
<ion-label class="title">{{publicationTitle}}</ion-label>
|
||||
</div>
|
||||
|
||||
@@ -39,6 +39,7 @@ export class NewPublicationPage implements OnInit {
|
||||
@Input() publicationType: string;
|
||||
@Input() folderId: string;
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@Output() goBacktoPublicationDetails = new EventEmitter();
|
||||
|
||||
|
||||
guestPicture:any;
|
||||
@@ -181,6 +182,11 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
async goBack(){
|
||||
|
||||
this.goBacktoPublicationDetails.emit();
|
||||
}
|
||||
|
||||
/* async openGallery() {
|
||||
const modal = await this.modalController.create({
|
||||
component: GalleryPage,
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@
|
||||
<div class="content-container">
|
||||
<div *ngIf="publication.Title != ''">
|
||||
<div class="title-content d-flex pl-20">
|
||||
<div class="back-icon d-md-none" >
|
||||
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<div class="back-icon " >
|
||||
<ion-icon (click)="goBack()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
<ion-label class="title"> {{publication.Title}}</ion-label>
|
||||
|
||||
+8
-1
@@ -17,6 +17,8 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
@Input() publicationId: string;
|
||||
@Output() addNewPublication = new EventEmitter<any>();
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@Output() goBackToViewPublications = new EventEmitter();
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -81,7 +83,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
console.log(res);
|
||||
|
||||
});
|
||||
this.close();
|
||||
this.closeDesktopComponent.emit();
|
||||
}
|
||||
|
||||
async editPost(publicationType:any) {
|
||||
@@ -122,4 +124,9 @@ export class PublicationDetailPage implements OnInit {
|
||||
}).then(modal => modal.present());
|
||||
}
|
||||
|
||||
async goBack(){
|
||||
|
||||
this.goBackToViewPublications.emit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="back-icon">
|
||||
<!-- <ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> -->
|
||||
<div class="back-icon" (click)="goBack()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
<ion-label class="title">{{item.Description}}</ion-label>
|
||||
|
||||
@@ -170,10 +170,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@media only screen and (min-width: 1366px) {
|
||||
.post-img{
|
||||
width: unset !important;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
@Input() folderId: string;
|
||||
@Output() addNewPublication = new EventEmitter<any>();
|
||||
@Output() openPublicationDetails= new EventEmitter<any>();
|
||||
@Output() goBackToViewPublications = new EventEmitter();
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@Output() goBacktoPublicationDetails = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private loadingController: LoadingService,
|
||||
@@ -56,7 +59,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}, 3000);
|
||||
}
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
this.closeDesktopComponent.emit();
|
||||
}
|
||||
getPublicationDetail(){
|
||||
this.publications.GetPublicationFolderById(this.folderId).subscribe(res=>{
|
||||
@@ -146,4 +149,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async goBack(){
|
||||
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
||||
this.goBacktoPublicationDetails.emit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user