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