mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
profile picture done
This commit is contained in:
+24
-28
@@ -195,39 +195,35 @@ export class ApproveEventModalPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
if(res.data.option == 'save') {
|
||||
if(res.data.note !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
const loader = this.toastService.loading()
|
||||
//
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
|
||||
@@ -190,37 +190,34 @@ export class ApproveEventPage implements OnInit {
|
||||
.then(async (res) => {
|
||||
|
||||
if(res.data.option == 'save') {
|
||||
if (res.data !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
.catch(() => {
|
||||
|
||||
this.offlineManager.storeRequestData('event-listRever', body);
|
||||
});
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
.catch(() => {
|
||||
|
||||
this.offlineManager.storeRequestData('event-listRever', body);
|
||||
});
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
@@ -307,33 +304,30 @@ export class ApproveEventPage implements OnInit {
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
if(res.data.option == 'save') {
|
||||
if (res.data.note !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.goBack();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.goBack();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user