From c7d1a13eb7825833fecb60a6e3a43513bfb928c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Tue, 14 Mar 2023 09:53:39 +0100 Subject: [PATCH] Changes made on event to aprove and added to diploma --- .../diplomas/diploma/diploma.page.html | 2 ++ .../approve-event/approve-event.page.ts | 33 ++++++------------- src/environments/environment.prod.ts | 2 +- src/environments/environment.ts | 2 +- version/git-version.ts | 12 +++---- 5 files changed, 20 insertions(+), 31 deletions(-) diff --git a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.html b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.html index c609faa13..b238b79bd 100644 --- a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.html +++ b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.html @@ -84,6 +84,8 @@
+ +
diff --git a/src/app/shared/agenda/approve-event/approve-event.page.ts b/src/app/shared/agenda/approve-event/approve-event.page.ts index a8a900846..302ab422f 100644 --- a/src/app/shared/agenda/approve-event/approve-event.page.ts +++ b/src/app/shared/agenda/approve-event/approve-event.page.ts @@ -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() } diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 38a854fa6..53f31b337 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -3,4 +3,4 @@ import { oaprProd } from './suport/oapr' import { doneITProd } from './suport/doneIt' -export const environment: Environment = doneITProd; \ No newline at end of file +export const environment: Environment = oaprProd; \ No newline at end of file diff --git a/src/environments/environment.ts b/src/environments/environment.ts index aaefbfe6d..8141263a4 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -3,4 +3,4 @@ import { oaprDev } from './suport/oapr' import { doneITDev } from './suport/doneIt' -export const environment: Environment = doneITDev; \ No newline at end of file +export const environment: Environment = oaprDev \ No newline at end of file diff --git a/version/git-version.ts b/version/git-version.ts index 48d723873..f9ee4b487 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "54e1f9bee", - "SHA": "54e1f9bee3acfcd0ab352b45affb0d84a503b69a", + "shortSHA": "08253646e", + "SHA": "08253646e6d133425af3b48b641a89b6bc437a0a", "branch": "no_bug_movemente", "lastCommitAuthor": "'Eudes Inácio'", - "lastCommitTime": "'Fri Mar 10 16:26:42 2023 +0100'", - "lastCommitMessage": "publcation moved getfromDB", - "lastCommitNumber": "4868", + "lastCommitTime": "'Fri Mar 10 16:31:12 2023 +0100'", + "lastCommitMessage": "pull made", + "lastCommitNumber": "4871", "change": "", - "changeStatus": "On branch no_bug_movemente\nYour branch and 'origin/no_bug_movemente' have diverged,\nand have 2 and 2 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/pages/publications/publications.page.ts\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.html\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.ts\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.html\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.ts", + "changeStatus": "On branch no_bug_movemente\nYour branch is ahead of 'origin/no_bug_movemente' by 3 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.html\n\tmodified: src/app/shared/agenda/approve-event/approve-event.page.ts\n\tmodified: src/environments/environment.prod.ts\n\tmodified: src/environments/environment.ts", "changeAuthor": "eudes.inacio" } \ No newline at end of file