This commit is contained in:
tiago.kayaya
2021-07-01 14:30:44 +01:00
parent c80db9f29a
commit 80b2b91539
3 changed files with 10 additions and 7 deletions
@@ -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')
}
}