mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Messages
This commit is contained in:
@@ -159,11 +159,11 @@ export class NewPublicationPage implements OnInit {
|
||||
console.log(this.publication);
|
||||
|
||||
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
this.successMessage()
|
||||
this.successMessage("Publicação criado")
|
||||
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
this.badRequest("Publicação não criado")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -183,11 +183,11 @@ export class NewPublicationPage implements OnInit {
|
||||
try {
|
||||
console.log(this.publication);
|
||||
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
this.successMessage()
|
||||
this.successMessage("Publicação criado")
|
||||
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
this.badRequest("Publicação não criado")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -209,11 +209,11 @@ export class NewPublicationPage implements OnInit {
|
||||
try {
|
||||
console.log(this.publication);
|
||||
await this.publications.CreatePublication(this.folderId, this.publication).toPromise()
|
||||
this.successMessage()
|
||||
this.successMessage("Publicação criado")
|
||||
|
||||
this.goBackToViewPublications.emit();
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
this.badRequest("Publicação não criado")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -319,7 +319,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
async badRequest(message?) {
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
@@ -351,7 +351,7 @@ export class NewPublicationPage implements OnInit {
|
||||
componentProps: {
|
||||
message: 'Processo não realizado com sucesso',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
cssClass: 'notification-modal'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
Reference in New Issue
Block a user