mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Changes made on event to aprove and added to diploma
This commit is contained in:
@@ -8,7 +8,8 @@ import { EmendMessageModalPage } from 'src/app/pages/agenda/emend-message-modal/
|
||||
import { EventActionsPopoverPage } from 'src/app/pages/agenda/event-actions-popover/event-actions-popover.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event',
|
||||
@@ -46,7 +47,8 @@ export class ApproveEventPage implements OnInit {
|
||||
private attachmentsService: AttachmentsService,
|
||||
private popoverController: PopoverController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
) {
|
||||
// Event to approve list
|
||||
|
||||
@@ -87,14 +89,9 @@ export class ApproveEventPage implements OnInit {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.modalController.dismiss(serialNumber);
|
||||
this.toastService._successMessage('Evento aprovar')
|
||||
this.httpErroHandle.httpsSucessMessagge('Aprovar')
|
||||
} 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 aprovar')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
this.close()
|
||||
loader.remove()
|
||||
@@ -111,14 +108,9 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.toastService._successMessage('Evento rejeitado')
|
||||
this.httpErroHandle.httpsSucessMessagge('Rejeitar');
|
||||
} 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 rejeitado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
|
||||
} finally {
|
||||
loader.remove()
|
||||
@@ -203,15 +195,10 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.httpErroHandle.httpsSucessMessagge('Rever')
|
||||
this.close();
|
||||
} 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.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user