mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Messages
This commit is contained in:
@@ -47,9 +47,9 @@ export class NewActionPage implements OnInit {
|
||||
try {
|
||||
await this.publication.CreatePublicationFolder(this.folder).toPromise()
|
||||
this.close();
|
||||
this.successMessage()
|
||||
this.successMessage('Publicação criado')
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
this.badRequest('Publicação não criado')
|
||||
}
|
||||
|
||||
}
|
||||
@@ -103,7 +103,7 @@ export class NewActionPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
async badRequest(message?) {
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
@@ -135,7 +135,7 @@ export class NewActionPage implements OnInit {
|
||||
componentProps: {
|
||||
message: 'Processo não realizado com sucesso',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
cssClass: 'notification-modal'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
@@ -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()
|
||||
|
||||
+5
-5
@@ -80,7 +80,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
close(){
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
@@ -88,10 +88,10 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||
this.successMessage()
|
||||
this.successMessage("Publicação eliminado")
|
||||
this.goBackToViewPublications.emit();
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
this.badRequest("Publicação não eliminado")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -185,7 +185,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
async badRequest(message?) {
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
@@ -217,7 +217,7 @@ export class PublicationDetailPage 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