mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Update publication page
This commit is contained in:
@@ -24,7 +24,6 @@ import { LoadingService } from 'src/app/services/loading.service';
|
||||
})
|
||||
export class NewPublicationPage implements OnInit {
|
||||
showLoader: boolean;
|
||||
publication: Publication;
|
||||
pub: Publication = new Publication();
|
||||
image: Image = new Image();
|
||||
|
||||
@@ -36,6 +35,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
photo: SafeResourceUrl;
|
||||
|
||||
@Input() publication: Publication;
|
||||
@Input() publicationType: string;
|
||||
@Input() folderId: string;
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@@ -46,7 +46,6 @@ export class NewPublicationPage implements OnInit {
|
||||
capturedImage:any;
|
||||
capturedImageTitle:any;
|
||||
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
public photoService: PhotoService,
|
||||
@@ -121,7 +120,7 @@ export class NewPublicationPage implements OnInit {
|
||||
console.log('Edit change image');
|
||||
console.log(this.publication);
|
||||
this.publications.UpdatePublication(this.publication.ProcessId, this.publication);
|
||||
this.close();
|
||||
this.closeDesktopComponent.emit();
|
||||
}
|
||||
else{
|
||||
this.publication = {
|
||||
@@ -138,7 +137,7 @@ export class NewPublicationPage implements OnInit {
|
||||
console.log('Edit - keep image');
|
||||
console.log(this.publication);
|
||||
this.publications.UpdatePublication(this.publication.ProcessId, this.publication);
|
||||
this.close();
|
||||
this.closeDesktopComponent.emit();
|
||||
}
|
||||
}
|
||||
else{
|
||||
@@ -178,6 +177,7 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
else if(this.publicationType == '3'){
|
||||
this.publicationTitle = 'Editar Publicação';
|
||||
this.pub = this.publication;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+25
-14
@@ -16,7 +16,8 @@ export class PublicationDetailPage implements OnInit {
|
||||
publication: Publication;
|
||||
|
||||
@Input() publicationId: string;
|
||||
|
||||
@Output() addNewPublication = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private publications:PublicationsService,
|
||||
@@ -85,21 +86,31 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
async editPost(publicationType:any) {
|
||||
console.log(this.publication);
|
||||
const modal = await this.modalController.create({
|
||||
component: NewPublicationPage,
|
||||
componentProps:{
|
||||
|
||||
if(window.innerHeight >= 1024){
|
||||
const modal = await this.modalController.create({
|
||||
component: NewPublicationPage,
|
||||
componentProps:{
|
||||
publicationType: publicationType,
|
||||
publication: this.publication,
|
||||
},
|
||||
cssClass: 'new-publication',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(()=>{
|
||||
setTimeout(() => {
|
||||
this.getPublicationDetail();
|
||||
}, 5000);
|
||||
});
|
||||
} else {
|
||||
this.addNewPublication.emit({
|
||||
publicationType: publicationType,
|
||||
folderId: this.folderId,
|
||||
publication: this.publication,
|
||||
},
|
||||
cssClass: 'new-publication',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(()=>{
|
||||
setTimeout(() => {
|
||||
this.getPublicationDetail();
|
||||
}, 5000);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
openPreview(imageUrl:string){
|
||||
Reference in New Issue
Block a user