mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
add notification message
This commit is contained in:
@@ -111,7 +111,11 @@ export class EditActionPage implements OnInit {
|
||||
this.getActions.emit()
|
||||
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Não foi possivel atualizar a acção presidencial')
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
this.toastService._badRequest('Não foi possivel atualizar a acção presidencial')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -133,7 +133,12 @@ export class NewActionPage implements OnInit {
|
||||
|
||||
this.getActions.emit()
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Não foi possivel criar a acção presidencial')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -159,7 +159,11 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -188,7 +192,11 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -216,7 +224,11 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -247,7 +259,11 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
this.goBackToViewPublications.emit();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
+5
-1
@@ -90,7 +90,11 @@ export class PublicationDetailPage implements OnInit {
|
||||
this.toastService._successMessage("Publicação eliminado")
|
||||
this.goBackToViewPublications.emit();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest("Publicação não eliminado")
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
this.toastService._badRequest("Publicação não eliminado")
|
||||
}
|
||||
} finally {
|
||||
laoder.remove()
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
getpublication = [];
|
||||
error: any;
|
||||
|
||||
@Input() folderId: string;
|
||||
@Input() folderId: any;
|
||||
@Output() addNewPublication = new EventEmitter<any>();
|
||||
@Output() editPublication = new EventEmitter<any>();
|
||||
@Output() openPublicationDetails= new EventEmitter<any>();
|
||||
@@ -221,8 +221,13 @@ export class ViewPublicationsPage implements OnInit {
|
||||
try {
|
||||
await this.publications.DeletePresidentialAction(folderId).toPromise();
|
||||
this.toastService._successMessage()
|
||||
} catch (e) {
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('sem conexão ao servidor')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
|
||||
Reference in New Issue
Block a user