mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -127,6 +127,7 @@
|
||||
[folderId]="folderId"
|
||||
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
|
||||
(closeDesktopComponent)="closeDesktopComponent($event)"
|
||||
(updateDesktopComponent)="updateDesktopComponent($event)"
|
||||
>
|
||||
</app-edit-action>
|
||||
|
||||
|
||||
@@ -266,6 +266,10 @@ export class PublicationsPage implements OnInit {
|
||||
this.desktopComponent.showPublicationDetail = true;
|
||||
|
||||
}
|
||||
|
||||
async updateDesktopComponent(e?:any){
|
||||
this.getActions();
|
||||
}
|
||||
|
||||
|
||||
async closeDesktopComponent (xx?: any){
|
||||
@@ -317,11 +321,7 @@ export class PublicationsPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res =>{
|
||||
if(res['data']=='edit'){
|
||||
//this.closeDesktopComponent();
|
||||
this.desktopComponent.showViewPublication = false,
|
||||
this.desktopComponent.showAddNewPublication = false,
|
||||
this.desktopComponent.showPublicationDetail = false,
|
||||
this.desktopComponent.showAddActions = false,
|
||||
this.closeDesktopComponent();
|
||||
this.desktopComponent.showEditActions = true;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -13,6 +13,7 @@ export class EditActionPage implements OnInit {
|
||||
folder: PublicationFolder;
|
||||
@Input() folderId: string;
|
||||
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||
@Output() updateDesktopComponent= new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private publicationsService: PublicationsService,
|
||||
@@ -49,9 +50,10 @@ export class EditActionPage implements OnInit {
|
||||
try {
|
||||
await this.publicationsService.UpdatePresidentialAction(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage('Acção presidencial criada')
|
||||
this.updateDesktopComponent.emit();
|
||||
this.toastService.successMessage('Acção presidencial atualizada')
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Não foi possivel criar a acção presidencial')
|
||||
this.toastService.badRequest('Não foi possivel atualizar a acção presidencial')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user