approval end-point added

This commit is contained in:
Eudes Inácio
2024-06-17 11:05:28 +01:00
parent 54cdf512c0
commit 45e659acd1
4 changed files with 7 additions and 3 deletions
@@ -64,7 +64,7 @@ export class EventActionsPopoverPage implements OnInit {
try {
/* await this.processes.PostTaskAction(body).toPromise() */
this.agendaDataRepository.eventToaprovalStatus(this.serialNumber, 'Approved').subscribe((value) => {
this.agendaDataRepository.approveEvent(this.serialNumber).subscribe((value) => {
console.log(value)
this.TaskService.loadEventosParaAprovacao()
this.httpErrorHandle.httpsSucessMessagge('Evento aprovação')
@@ -119,7 +119,7 @@ export class ApproveEventPage implements OnInit {
try {
this.AgendaDataRepositoryService.eventToaprovalStatus(serialNumber, 'Approved').subscribe(async (value) => {
this.AgendaDataRepositoryService.approveEvent(serialNumber).subscribe(async (value) => {
await this.processes.PostTaskAction(body).toPromise()
this.goBack();
@@ -228,4 +228,8 @@ export class AgendaDataRepositoryService {
async geCalendars() {
return await this.agendaLocalDataSourceService.geCalendars()
}
approveEvent(eventId) {
return this.agendaDataService.approveEvent(eventId);
}
}
@@ -100,7 +100,7 @@ export class ApproveEventPage implements OnInit {
const loader = this.toastService.loading()
try {
this.agendaDataRepository.eventToaprovalStatus(serialNumber, 'Approved').subscribe((value) => {
this.agendaDataRepository.approveEvent(serialNumber).subscribe((value) => {
console.log(value)
this.modalController.dismiss(serialNumber);
this.httpErroHandle.httpsSucessMessagge('Aprovar')