Bug of eliminate action solved

This commit is contained in:
Eudes Inácio
2024-02-02 12:07:09 +01:00
parent a5b29e330a
commit a873e192ee
2 changed files with 5 additions and 5 deletions
@@ -301,9 +301,6 @@ export class PublicationsPage implements OnInit {
const loader = this.toastService.loading();
try {
await this.publications.DeletePresidentialAction(id).toPromise();
if(window["refreshPublication"]) {
window["refreshPublication"]();
}
this.toastService._successMessage()
} catch (error) {
if(error.status == 0) {
@@ -314,11 +314,12 @@ export class ViewPublicationsPage implements OnInit {
},
});
modal.onDidDismiss().then((res) => {
modal.onDidDismiss().then(async (res) => {
if (res.data == 'Yes') {
const loader = this.toastService.loading();
try {
this.publications.DeletePresidentialAction(folderId).toPromise();
await this.publications.DeletePresidentialAction(folderId).toPromise();
window["refreshPublication"]();
this.httpErrorHandle.httpsSucessMessagge('Eliminar Acção')
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
@@ -328,6 +329,8 @@ export class ViewPublicationsPage implements OnInit {
}
this.close();
this.getActions.emit();
}
// Do nothing
});