From 1b897e9c2beae44c3c1da51c2e7ffc6e6ca6beaa Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 28 Aug 2023 16:35:47 +0100 Subject: [PATCH] improve gitignore --- .gitignore | 3 ++- version/git-version.ts | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 5ba2467e5..ecc2ede3e 100644 --- a/.gitignore +++ b/.gitignore @@ -94,4 +94,5 @@ src/app/pipes/process.service.ts /.angular ./.angular -src/app/domain \ No newline at end of file +src/app/domain +_src/ \ No newline at end of file diff --git a/version/git-version.ts b/version/git-version.ts index 196b47275..f8cefeb0c 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "416b44851", - "SHA": "416b4485164c2b9784a53423aa433f67517fb99c", + "shortSHA": "539a36f41", + "SHA": "539a36f41f537395ddff8000098dfa19c4a505da", "branch": "developer-prod-2", "lastCommitAuthor": "'Peter Maquiran'", - "lastCommitTime": "'Mon Aug 28 16:07:06 2023 +0100'", - "lastCommitMessage": "filter pass dates", - "lastCommitNumber": "5218", - "change": "diff --git a/.gitignore b/.gitignore\nindex 5ba2467e5..ecc2ede3e 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -94,4 +94,5 @@ src/app/pipes/process.service.ts\n \n /.angular\n ./.angular\n-src/app/domain\n\\ No newline at end of file\n+src/app/domain\n+_src/\n\\ No newline at end of file\ndiff --git a/src/app/modals/add-note/add-note.page.scss b/src/app/modals/add-note/add-note.page.scss\nindex 45d2c6dd7..243d46be6 100644\n--- a/src/app/modals/add-note/add-note.page.scss\n+++ b/src/app/modals/add-note/add-note.page.scss\n@@ -7,12 +7,12 @@\n float: left;\n }\n \n-.header-title {\n- font-family: Roboto;\n- font-size: rem(25);\n- padding: 0;\n- color:#000;\n- float: left;\n+.header-title{\n+font-family: Roboto;\n+font-size: rem(25);\n+padding: 0;\n+color:#000;\n+float: left;\n }\n /* .content{\n overflow: auto !important; */\ndiff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts\nindex 9903032c1..d74926ef5 100644\n--- a/src/app/pages/agenda/agenda.page.ts\n+++ b/src/app/pages/agenda/agenda.page.ts\n@@ -588,6 +588,8 @@ export class AgendaPage implements OnInit {\n this.showLoader = true;\n const selectedCalendarIds = this.getSelectedAgendaCalendars();\n this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)\n+ // this.calendar.currentDate.setDate(1);\n+\n this.updateEventListBox()\n \n try {\ndiff --git a/src/app/pages/agenda/emend-message-modal/emend-message-modal.page.ts b/src/app/pages/agenda/emend-message-modal/emend-message-modal.page.ts\nindex 2b7d4caa7..4b40d1ec8 100644\n--- a/src/app/pages/agenda/emend-message-modal/emend-message-modal.page.ts\n+++ b/src/app/pages/agenda/emend-message-modal/emend-message-modal.page.ts\n@@ -26,11 +26,7 @@ export class EmendMessageModalPage implements OnInit {\n }\n \n save() {\n- if(this.emendMessage != '') {\n- this.modalController.dismiss({option:'save', note: this.emendMessage});\n- } else {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n- }\n+ this.modalController.dismiss({option:'save', note: this.emendMessage});\n \n }\n \ndiff --git a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts\nindex 2afa6d17f..c18a9cef6 100644\n--- a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts\n+++ b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts\n@@ -108,7 +108,6 @@ export class EventActionsPopoverPage implements OnInit {\n \n \n if(res.data.option == 'save') { \n- if(res.data.note !== '') {\n let body = { \"serialNumber\": this.serialNumber, \n \"action\": \"Emendar\",\n \"dataFields\": {\n@@ -130,10 +129,6 @@ export class EventActionsPopoverPage implements OnInit {\n finally {\n loader.remove()\n }\n- }\n- else {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n- }\n } else {\n \n }\ndiff --git a/src/app/pages/events/edit-event/edit-event.page.ts b/src/app/pages/events/edit-event/edit-event.page.ts\nindex c0861977a..c65f80a44 100644\n--- a/src/app/pages/events/edit-event/edit-event.page.ts\n+++ b/src/app/pages/events/edit-event/edit-event.page.ts\n@@ -129,8 +129,7 @@ export class EditEventPage implements OnInit {\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => { }\n- }, \n- {\n+ }, {\n text: 'Sim',\n handler: () => {\n this.Delete();\ndiff --git a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\nindex 572617754..76682aa1a 100644\n--- a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\n+++ b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\n@@ -195,39 +195,35 @@ export class ApproveEventModalPage implements OnInit {\n \n modal.onDidDismiss().then( async (res) => {\n if(res.data.option == 'save') { \n- if(res.data.note !== '') {\n- let body = { \n- \"serialNumber\": serialNumber, \n- \"action\": \"Emendar\",\n- \"dataFields\": {\n- \"ReviewUserComment\": res.data,\n- }\n+ \n+ let body = { \n+ \"serialNumber\": serialNumber, \n+ \"action\": \"Emendar\",\n+ \"dataFields\": {\n+ \"ReviewUserComment\": res.data,\n }\n+ }\n \n- //\n- const loader = this.toastService.loading()\n+ //\n+ const loader = this.toastService.loading()\n+ \n+ try {\n+ await this.processes.PostTaskAction(body).toPromise()\n+ this.router.navigate(['/home/gabinete-digital/event-list']);\n+ this.toastService._successMessage('Evento enviado para revisão');\n+ } catch (error) {\n+ if(error.status == 0) {\n+ this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')\n+ } else {\n \n- try {\n- await this.processes.PostTaskAction(body).toPromise()\n- this.router.navigate(['/home/gabinete-digital/event-list']);\n- this.toastService._successMessage('Evento enviado para revisão');\n- } catch (error) {\n- if(error.status == 0) {\n- this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')\n- } else {\n- \n- this.toastService._badRequest('Evento não enviado para revisão');\n- }\n- this.router.navigate(['/home/gabinete-digital/event-list']);\n- } \n- finally {\n- loader.remove()\n+ this.toastService._badRequest('Evento não enviado para revisão');\n }\n-\n- }\n- else {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n+ this.router.navigate(['/home/gabinete-digital/event-list']);\n+ } \n+ finally {\n+ loader.remove()\n }\n+\n }\n }, (error) => {\n console.log(error)\ndiff --git a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\nindex a241a4a00..d7343c06a 100644\n--- a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n+++ b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n@@ -190,37 +190,34 @@ export class ApproveEventPage implements OnInit {\n .then(async (res) => {\n \n if(res.data.option == 'save') { \n- if (res.data !== '') {\n- let body = {\n- \"serialNumber\": serialNumber,\n- \"action\": \"Emendar\",\n- \"dataFields\": {\n- \"ReviewUserComment\": res.data,\n- }\n- }\n- \n-\n- const loader = this.toastService.loading()\n-\n- try {\n- await this.processes.PostTaskAction(body).toPromise()\n- .catch(() => {\n- \n- this.offlineManager.storeRequestData('event-listRever', body);\n- });\n- this.httpErrorHandle.httpsSucessMessagge('Rever')\n- this.TaskService.loadEventosParaAprovacao();\n- this.goBack();\n- } catch (error) {\n- this.httpErrorHandle.httpStatusHandle(error)\n- } finally {\n- loader.remove()\n+ \n+ let body = {\n+ \"serialNumber\": serialNumber,\n+ \"action\": \"Emendar\",\n+ \"dataFields\": {\n+ \"ReviewUserComment\": res.data,\n }\n-\n }\n- else {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n+ \n+\n+ const loader = this.toastService.loading()\n+\n+ try {\n+ await this.processes.PostTaskAction(body).toPromise()\n+ .catch(() => {\n+ \n+ this.offlineManager.storeRequestData('event-listRever', body);\n+ });\n+ this.httpErrorHandle.httpsSucessMessagge('Rever')\n+ this.TaskService.loadEventosParaAprovacao();\n+ this.goBack();\n+ } catch (error) {\n+ this.httpErrorHandle.httpStatusHandle(error)\n+ } finally {\n+ loader.remove()\n }\n+\n+ \n }\n }, (error) => {\n console.log(error)\n@@ -307,33 +304,30 @@ export class ApproveEventPage implements OnInit {\n modal.onDidDismiss().then(async (res) => {\n \n if(res.data.option == 'save') {\n- if (res.data.note !== '') {\n- let body = {\n- \"serialNumber\": serialNumber,\n- \"action\": \"Emendar\",\n- \"dataFields\": {\n- \"ReviewUserComment\": res.data,\n- }\n- }\n- \n- \n- const loader = this.toastService.loading()\n- \n- try {\n- await this.processes.PostTaskAction(body).toPromise();\n- this.goBack();\n- this.httpErrorHandle.httpsSucessMessagge('Rever')\n- this.TaskService.loadEventosParaAprovacao();\n- } catch (error) {\n- this.httpErrorHandle.httpStatusHandle(error)\n- } finally {\n- loader.remove()\n+ \n+ let body = {\n+ \"serialNumber\": serialNumber,\n+ \"action\": \"Emendar\",\n+ \"dataFields\": {\n+ \"ReviewUserComment\": res.data,\n }\n- \n }\n- else {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n+ \n+\n+ const loader = this.toastService.loading()\n+\n+ try {\n+ await this.processes.PostTaskAction(body).toPromise();\n+ this.goBack();\n+ this.httpErrorHandle.httpsSucessMessagge('Rever')\n+ this.TaskService.loadEventosParaAprovacao();\n+ } catch (error) {\n+ this.httpErrorHandle.httpStatusHandle(error)\n+ } finally {\n+ loader.remove()\n }\n+\n+ \n } else {\n \n }\ndiff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html\nindex 1834588e7..f9a0d1615 100644\n--- a/src/app/pages/publications/publications.page.html\n+++ b/src/app/pages/publications/publications.page.html\n@@ -194,8 +194,8 @@\n *ngIf=\"desktopComponent.showAddNewPublication\"\n class=\"height-100 d-flex flex-column overflow-hidden background-white flex-grow-1\"\n [publicationType]=\"publicationType\"\n- [publication]=\"publication\"\n [folderId]=\"folderId\"\n+ [documentId]=\"documentId\"\n \n (closeDesktopComponent)=\"closeDesktopComponent($event)\"\n (goBacktoPublicationDetails)=\"goBacktoPublicationDetails()\"\ndiff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts\nindex 6ad6125a2..fe2c21fbb 100644\n--- a/src/app/pages/publications/publications.page.ts\n+++ b/src/app/pages/publications/publications.page.ts\n@@ -48,6 +48,7 @@ export class PublicationsPage implements OnInit {\n }\n \n folderId: string;\n+ documentId: any\n // data set from child component\n publicationType: any;\n publicationId: string;\n@@ -386,6 +387,7 @@ export class PublicationsPage implements OnInit {\n }\n \n this.publication = publication;\n+ this.documentId = publication?.DocumentId\n this.desktopComponent.showAddNewPublication = true;\n }\n \ndiff --git a/src/app/pages/publications/view-publications/view-publications.page.html b/src/app/pages/publications/view-publications/view-publications.page.html\nindex 71fb347f1..f99f84fb1 100644\n--- a/src/app/pages/publications/view-publications/view-publications.page.html\n+++ b/src/app/pages/publications/view-publications/view-publications.page.html\n@@ -39,7 +39,7 @@\n
\n \n
\n-
\n+
\n
\n
\n {{publication.Title}}\ndiff --git a/src/app/services/chat/chat-system.service.ts b/src/app/services/chat/chat-system.service.ts\nindex 3d9bec3ee..c19f5ea02 100644\n--- a/src/app/services/chat/chat-system.service.ts\n+++ b/src/app/services/chat/chat-system.service.ts\n@@ -102,7 +102,7 @@ export class ChatSystemService {\n \n \n document.addEventListener('resume', function () {\n- if(this._dm?.length == 0 || this._group?.length == 0) {\n+ if(this._dm?.length == 0 && this._group?.length == 0) {\n this.getAllRooms();\n }\n });\ndiff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts\nindex 589595ac2..88fdb6bcf 100644\n--- a/src/app/services/events.service.ts\n+++ b/src/app/services/events.service.ts\n@@ -851,12 +851,22 @@ export class EventsService {\n const puturl = environment.apiURL + 'calendar/PutEvent';\n let params = new HttpParams();\n \n+ // event.Organizer = {\n+ // \"Id\": SessionStore.user.UserId,\n+ // \"EmailAddress\": SessionStore.user.Email,\n+ // \"Name\": SessionStore.user.UserName,\n+ // \"IsRequired\": true,\n+ // \"UserType\": \"GD\"\n+ // }\n+ // params = params.set(\"notifyUsers\", true)\n+\n params = params.set(\"conflictResolutionMode\", conflictResolutionMode.toString());\n params = params.set(\"sendInvitationsOrCancellationsMode\", sendInvitationsOrCancellationsMode.toString());\n params.set('CalendarId', event.CalendarId)\n params.set('CalendarName', event.CalendarName)\n this.headers['CalendarId'] = event.CalendarId\n this.headers['CalendarName'] = event.CalendarName\n+ //params = params.set(\"CalendarName\", event.CalendarName);\n \n if (event.CalendarName == 'Oficial') {\n if (SessionStore.user.Profile == 'MDGPR') {\ndiff --git a/src/app/shared/agenda/approve-event/approve-event.page.ts b/src/app/shared/agenda/approve-event/approve-event.page.ts\nindex ec462226f..dec1f2a5a 100644\n--- a/src/app/shared/agenda/approve-event/approve-event.page.ts\n+++ b/src/app/shared/agenda/approve-event/approve-event.page.ts\n@@ -10,7 +10,7 @@ import { ToastService } from 'src/app/services/toast.service';\n import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';\n import { ThemeService } from 'src/app/services/theme.service';\n import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';\n-import { TaskService } from 'src/app/services/task.service';\n+import { TaskService } from 'src/app/services/task.service'\n \n \n @Component({\n@@ -109,6 +109,7 @@ export class ApproveEventPage implements OnInit {\n async rejectTask(serialNumber:string) {\n \n let body = { \"serialNumber\": serialNumber, \"action\": \"Descartar\" }\n+ \n \n const loader = this.toastService.loading()\n \n@@ -132,6 +133,8 @@ export class ApproveEventPage implements OnInit {\n } catch (error) {\n console.error('getAttchaments',error)\n }\n+ \n+\n }\n \n async viewDocument(DocId:string, Document) {\n@@ -193,33 +196,26 @@ export class ApproveEventPage implements OnInit {\n if(res.data.option == 'save') { \n \n \n- if(res.data.note !== '') {\n- let body = { \"serialNumber\": serialNumber,\n- \"action\": \"Emendar\",\n- \"dataFields\": {\n- \"ReviewUserComment\": res.data,\n- }\n- }\n- \n- const loader = this.toastService.loading();\n-\n- try {\n- await this.processes.PostTaskAction(body).toPromise();\n- this.httpErroHandle.httpsSucessMessagge('Rever')\n- this.TaskService.loadEventosParaAprovacao();\n- this.close();\n- } catch (error) {\n- this.httpErroHandle.httpStatusHandle(error)\n- } finally {\n- loader.remove()\n+\n+ let body = { \"serialNumber\": serialNumber,\n+ \"action\": \"Emendar\",\n+ \"dataFields\": {\n+ \"ReviewUserComment\": res.data,\n }\n }\n- else {\n- if(res.data.option == 'save') {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n- }\n+ \n+ const loader = this.toastService.loading();\n+\n+ try {\n+ await this.processes.PostTaskAction(body).toPromise();\n+ this.httpErroHandle.httpsSucessMessagge('Rever')\n+ this.TaskService.loadEventosParaAprovacao();\n+ this.close();\n+ } catch (error) {\n+ this.httpErroHandle.httpStatusHandle(error)\n+ } finally {\n+ loader.remove()\n }\n-\n \n } else {\n \ndiff --git a/src/app/shared/publication/new-publication/new-publication.page.html b/src/app/shared/publication/new-publication/new-publication.page.html\nindex c56c31771..b68341348 100644\n--- a/src/app/shared/publication/new-publication/new-publication.page.html\n+++ b/src/app/shared/publication/new-publication/new-publication.page.html\n@@ -12,6 +12,7 @@\n \n \n
\n+ \n \n
\n \n@@ -29,6 +30,11 @@\n
\n \n \n+ \n+ \n+\n \n
\n Fotografia Anexada\ndiff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts\nindex de1dc4cf2..425919d32 100644\n--- a/src/app/shared/publication/new-publication/new-publication.page.ts\n+++ b/src/app/shared/publication/new-publication/new-publication.page.ts\n@@ -32,6 +32,7 @@ export class NewPublicationPage implements OnInit {\n @Input() publication!: Publication;\n @Input() publicationType: string;\n @Input() folderId:string;\n+ @Input() documentId:string;\n \n @Output() closeDesktopComponent = new EventEmitter();\n @Output() openPublicationDetails = new EventEmitter();\n@@ -64,16 +65,45 @@ export class NewPublicationPage implements OnInit {\n \n \n setData() {\n- if(!this.publication) {\n+ if(!this.publicationType) {\n setTimeout(() => {\n this.setData()\n }, 500)\n } else {\n- this.pub = this.publication\n+ // this.pub = this.publication\n+ // this.publication = null\n+ this.getPublicationDetail()\n }\n }\n \n \n+ getPublicationDetail() {\n+\n+ if(this.publicationType != '2') { \n+ this.showLoader = true;\n+ this.publications.GetPublicationById(this.documentId).subscribe( res => {\n+ this.publication = {\n+ DateIndex: res.DateIndex,\n+ DocumentId: res.DocumentId,\n+ ProcessId:res.ProcessId,\n+ Title:res.Title,\n+ Message: res.Message,\n+ DatePublication: res.DatePublication,\n+ FileBase64: \"data:image/jpg;base64,\" + res.FileBase64,\n+ OriginalFileName: res.OriginalFileName,\n+ FileExtension: res.FileExtension,\n+ }\n+ this.pub = this.publication;\n+ this.showLoader = false;\n+ }, () => {\n+ this.showLoader = false;\n+ this.goBack() \n+ });\n+ }\n+\n+\n+ }\n+\n async takePicture() {\n const capturedImage = await Camera.getPhoto({\n quality: 50,\n@@ -130,6 +160,16 @@ export class NewPublicationPage implements OnInit {\n }\n \n if(this.publicationType == '3') {\n+\n+ if(!this.publication?.OriginalFileName || !this.pub.OriginalFileName) {\n+ \n+ if(this.pub?.OriginalFileName) {\n+ console.log('this.pub',this.pub)\n+ }\n+ throw('no this.publication.OriginalFileName')\n+ \n+ }\n+ \n const loader = this.toastService.loading()\n \n if(this.capturedImage != '') {\ndiff --git a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html\nindex c2bfb2b33..9242bb39d 100644\n--- a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html\n+++ b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html\n@@ -10,6 +10,7 @@\n

{{publication.DatePublication | date: 'dd-MM-yyyy | h:mm'}}

\n
\n
\n+ \n
\n
\n \ndiff --git a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\nindex 971d9ea34..9e5919de0 100644\n--- a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\n+++ b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\n@@ -70,10 +70,13 @@ export class PublicationDetailPage implements OnInit {\n const localPublication = this.publicationFolderService.getLocalPublication(folderId, this.publicationId);\n \n if(localPublication?.ProcessId) {\n+ console.log('console.log local storage')\n \n this.publication = localPublication\n \n } else {\n+\n+ console.log('API res')\n \n this.showLoader = true;\n this.publications.GetPublicationById(this.publicationId).subscribe(res => {\ndiff --git a/src/app/shared/publication/view-publications/view-publications.page.html b/src/app/shared/publication/view-publications/view-publications.page.html\nindex c536289f6..83c670c64 100644\n--- a/src/app/shared/publication/view-publications/view-publications.page.html\n+++ b/src/app/shared/publication/view-publications/view-publications.page.html\n@@ -43,7 +43,7 @@\n
\n \n
\n-
\n+
\n
\n
\n {{publication.Title}}", - "changeStatus": "On branch developer-prod-2\nYour branch is ahead of 'origin/developer-prod-2' by 1 commit.\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/store/eventoaprovacao-store.service.ts\n\nChanges not staged for commit:\n (use \"git add ...\" to update what will be committed)\n (use \"git restore ...\" to discard changes in working directory)\n\tmodified: .gitignore\n\tmodified: src/app/modals/add-note/add-note.page.scss\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/agenda/emend-message-modal/emend-message-modal.page.ts\n\tmodified: src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts\n\tmodified: src/app/pages/events/edit-event/edit-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n\tmodified: src/app/pages/publications/publications.page.html\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/services/chat/chat-system.service.ts\n\tmodified: src/app/services/events.service.ts\n\tmodified: src/app/shared/agenda/approve-event/approve-event.page.ts\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.html\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.ts\n\tmodified: src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html\n\tmodified: src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.html", + "lastCommitTime": "'Mon Aug 28 16:33:55 2023 +0100'", + "lastCommitMessage": "add filter", + "lastCommitNumber": "5219", + "change": "diff --git a/src/app/modals/add-note/add-note.page.scss b/src/app/modals/add-note/add-note.page.scss\nindex 45d2c6dd7..243d46be6 100644\n--- a/src/app/modals/add-note/add-note.page.scss\n+++ b/src/app/modals/add-note/add-note.page.scss\n@@ -7,12 +7,12 @@\n float: left;\n }\n \n-.header-title {\n- font-family: Roboto;\n- font-size: rem(25);\n- padding: 0;\n- color:#000;\n- float: left;\n+.header-title{\n+font-family: Roboto;\n+font-size: rem(25);\n+padding: 0;\n+color:#000;\n+float: left;\n }\n /* .content{\n overflow: auto !important; */\ndiff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts\nindex 9903032c1..d74926ef5 100644\n--- a/src/app/pages/agenda/agenda.page.ts\n+++ b/src/app/pages/agenda/agenda.page.ts\n@@ -588,6 +588,8 @@ export class AgendaPage implements OnInit {\n this.showLoader = true;\n const selectedCalendarIds = this.getSelectedAgendaCalendars();\n this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)\n+ // this.calendar.currentDate.setDate(1);\n+\n this.updateEventListBox()\n \n try {\ndiff --git a/src/app/pages/agenda/emend-message-modal/emend-message-modal.page.ts b/src/app/pages/agenda/emend-message-modal/emend-message-modal.page.ts\nindex 2b7d4caa7..4b40d1ec8 100644\n--- a/src/app/pages/agenda/emend-message-modal/emend-message-modal.page.ts\n+++ b/src/app/pages/agenda/emend-message-modal/emend-message-modal.page.ts\n@@ -26,11 +26,7 @@ export class EmendMessageModalPage implements OnInit {\n }\n \n save() {\n- if(this.emendMessage != '') {\n- this.modalController.dismiss({option:'save', note: this.emendMessage});\n- } else {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n- }\n+ this.modalController.dismiss({option:'save', note: this.emendMessage});\n \n }\n \ndiff --git a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts\nindex 2afa6d17f..c18a9cef6 100644\n--- a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts\n+++ b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts\n@@ -108,7 +108,6 @@ export class EventActionsPopoverPage implements OnInit {\n \n \n if(res.data.option == 'save') { \n- if(res.data.note !== '') {\n let body = { \"serialNumber\": this.serialNumber, \n \"action\": \"Emendar\",\n \"dataFields\": {\n@@ -130,10 +129,6 @@ export class EventActionsPopoverPage implements OnInit {\n finally {\n loader.remove()\n }\n- }\n- else {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n- }\n } else {\n \n }\ndiff --git a/src/app/pages/events/edit-event/edit-event.page.ts b/src/app/pages/events/edit-event/edit-event.page.ts\nindex c0861977a..c65f80a44 100644\n--- a/src/app/pages/events/edit-event/edit-event.page.ts\n+++ b/src/app/pages/events/edit-event/edit-event.page.ts\n@@ -129,8 +129,7 @@ export class EditEventPage implements OnInit {\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => { }\n- }, \n- {\n+ }, {\n text: 'Sim',\n handler: () => {\n this.Delete();\ndiff --git a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\nindex 572617754..76682aa1a 100644\n--- a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\n+++ b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\n@@ -195,39 +195,35 @@ export class ApproveEventModalPage implements OnInit {\n \n modal.onDidDismiss().then( async (res) => {\n if(res.data.option == 'save') { \n- if(res.data.note !== '') {\n- let body = { \n- \"serialNumber\": serialNumber, \n- \"action\": \"Emendar\",\n- \"dataFields\": {\n- \"ReviewUserComment\": res.data,\n- }\n+ \n+ let body = { \n+ \"serialNumber\": serialNumber, \n+ \"action\": \"Emendar\",\n+ \"dataFields\": {\n+ \"ReviewUserComment\": res.data,\n }\n+ }\n \n- //\n- const loader = this.toastService.loading()\n+ //\n+ const loader = this.toastService.loading()\n+ \n+ try {\n+ await this.processes.PostTaskAction(body).toPromise()\n+ this.router.navigate(['/home/gabinete-digital/event-list']);\n+ this.toastService._successMessage('Evento enviado para revisão');\n+ } catch (error) {\n+ if(error.status == 0) {\n+ this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')\n+ } else {\n \n- try {\n- await this.processes.PostTaskAction(body).toPromise()\n- this.router.navigate(['/home/gabinete-digital/event-list']);\n- this.toastService._successMessage('Evento enviado para revisão');\n- } catch (error) {\n- if(error.status == 0) {\n- this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')\n- } else {\n- \n- this.toastService._badRequest('Evento não enviado para revisão');\n- }\n- this.router.navigate(['/home/gabinete-digital/event-list']);\n- } \n- finally {\n- loader.remove()\n+ this.toastService._badRequest('Evento não enviado para revisão');\n }\n-\n- }\n- else {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n+ this.router.navigate(['/home/gabinete-digital/event-list']);\n+ } \n+ finally {\n+ loader.remove()\n }\n+\n }\n }, (error) => {\n console.log(error)\ndiff --git a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\nindex a241a4a00..d7343c06a 100644\n--- a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n+++ b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n@@ -190,37 +190,34 @@ export class ApproveEventPage implements OnInit {\n .then(async (res) => {\n \n if(res.data.option == 'save') { \n- if (res.data !== '') {\n- let body = {\n- \"serialNumber\": serialNumber,\n- \"action\": \"Emendar\",\n- \"dataFields\": {\n- \"ReviewUserComment\": res.data,\n- }\n- }\n- \n-\n- const loader = this.toastService.loading()\n-\n- try {\n- await this.processes.PostTaskAction(body).toPromise()\n- .catch(() => {\n- \n- this.offlineManager.storeRequestData('event-listRever', body);\n- });\n- this.httpErrorHandle.httpsSucessMessagge('Rever')\n- this.TaskService.loadEventosParaAprovacao();\n- this.goBack();\n- } catch (error) {\n- this.httpErrorHandle.httpStatusHandle(error)\n- } finally {\n- loader.remove()\n+ \n+ let body = {\n+ \"serialNumber\": serialNumber,\n+ \"action\": \"Emendar\",\n+ \"dataFields\": {\n+ \"ReviewUserComment\": res.data,\n }\n-\n }\n- else {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n+ \n+\n+ const loader = this.toastService.loading()\n+\n+ try {\n+ await this.processes.PostTaskAction(body).toPromise()\n+ .catch(() => {\n+ \n+ this.offlineManager.storeRequestData('event-listRever', body);\n+ });\n+ this.httpErrorHandle.httpsSucessMessagge('Rever')\n+ this.TaskService.loadEventosParaAprovacao();\n+ this.goBack();\n+ } catch (error) {\n+ this.httpErrorHandle.httpStatusHandle(error)\n+ } finally {\n+ loader.remove()\n }\n+\n+ \n }\n }, (error) => {\n console.log(error)\n@@ -307,33 +304,30 @@ export class ApproveEventPage implements OnInit {\n modal.onDidDismiss().then(async (res) => {\n \n if(res.data.option == 'save') {\n- if (res.data.note !== '') {\n- let body = {\n- \"serialNumber\": serialNumber,\n- \"action\": \"Emendar\",\n- \"dataFields\": {\n- \"ReviewUserComment\": res.data,\n- }\n- }\n- \n- \n- const loader = this.toastService.loading()\n- \n- try {\n- await this.processes.PostTaskAction(body).toPromise();\n- this.goBack();\n- this.httpErrorHandle.httpsSucessMessagge('Rever')\n- this.TaskService.loadEventosParaAprovacao();\n- } catch (error) {\n- this.httpErrorHandle.httpStatusHandle(error)\n- } finally {\n- loader.remove()\n+ \n+ let body = {\n+ \"serialNumber\": serialNumber,\n+ \"action\": \"Emendar\",\n+ \"dataFields\": {\n+ \"ReviewUserComment\": res.data,\n }\n- \n }\n- else {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n+ \n+\n+ const loader = this.toastService.loading()\n+\n+ try {\n+ await this.processes.PostTaskAction(body).toPromise();\n+ this.goBack();\n+ this.httpErrorHandle.httpsSucessMessagge('Rever')\n+ this.TaskService.loadEventosParaAprovacao();\n+ } catch (error) {\n+ this.httpErrorHandle.httpStatusHandle(error)\n+ } finally {\n+ loader.remove()\n }\n+\n+ \n } else {\n \n }\ndiff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html\nindex 1834588e7..f9a0d1615 100644\n--- a/src/app/pages/publications/publications.page.html\n+++ b/src/app/pages/publications/publications.page.html\n@@ -194,8 +194,8 @@\n *ngIf=\"desktopComponent.showAddNewPublication\"\n class=\"height-100 d-flex flex-column overflow-hidden background-white flex-grow-1\"\n [publicationType]=\"publicationType\"\n- [publication]=\"publication\"\n [folderId]=\"folderId\"\n+ [documentId]=\"documentId\"\n \n (closeDesktopComponent)=\"closeDesktopComponent($event)\"\n (goBacktoPublicationDetails)=\"goBacktoPublicationDetails()\"\ndiff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts\nindex 6ad6125a2..fe2c21fbb 100644\n--- a/src/app/pages/publications/publications.page.ts\n+++ b/src/app/pages/publications/publications.page.ts\n@@ -48,6 +48,7 @@ export class PublicationsPage implements OnInit {\n }\n \n folderId: string;\n+ documentId: any\n // data set from child component\n publicationType: any;\n publicationId: string;\n@@ -386,6 +387,7 @@ export class PublicationsPage implements OnInit {\n }\n \n this.publication = publication;\n+ this.documentId = publication?.DocumentId\n this.desktopComponent.showAddNewPublication = true;\n }\n \ndiff --git a/src/app/pages/publications/view-publications/view-publications.page.html b/src/app/pages/publications/view-publications/view-publications.page.html\nindex 71fb347f1..f99f84fb1 100644\n--- a/src/app/pages/publications/view-publications/view-publications.page.html\n+++ b/src/app/pages/publications/view-publications/view-publications.page.html\n@@ -39,7 +39,7 @@\n
\n \n
\n-
\n+
\n
\n
\n {{publication.Title}}\ndiff --git a/src/app/services/chat/chat-system.service.ts b/src/app/services/chat/chat-system.service.ts\nindex 3d9bec3ee..c19f5ea02 100644\n--- a/src/app/services/chat/chat-system.service.ts\n+++ b/src/app/services/chat/chat-system.service.ts\n@@ -102,7 +102,7 @@ export class ChatSystemService {\n \n \n document.addEventListener('resume', function () {\n- if(this._dm?.length == 0 || this._group?.length == 0) {\n+ if(this._dm?.length == 0 && this._group?.length == 0) {\n this.getAllRooms();\n }\n });\ndiff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts\nindex 589595ac2..88fdb6bcf 100644\n--- a/src/app/services/events.service.ts\n+++ b/src/app/services/events.service.ts\n@@ -851,12 +851,22 @@ export class EventsService {\n const puturl = environment.apiURL + 'calendar/PutEvent';\n let params = new HttpParams();\n \n+ // event.Organizer = {\n+ // \"Id\": SessionStore.user.UserId,\n+ // \"EmailAddress\": SessionStore.user.Email,\n+ // \"Name\": SessionStore.user.UserName,\n+ // \"IsRequired\": true,\n+ // \"UserType\": \"GD\"\n+ // }\n+ // params = params.set(\"notifyUsers\", true)\n+\n params = params.set(\"conflictResolutionMode\", conflictResolutionMode.toString());\n params = params.set(\"sendInvitationsOrCancellationsMode\", sendInvitationsOrCancellationsMode.toString());\n params.set('CalendarId', event.CalendarId)\n params.set('CalendarName', event.CalendarName)\n this.headers['CalendarId'] = event.CalendarId\n this.headers['CalendarName'] = event.CalendarName\n+ //params = params.set(\"CalendarName\", event.CalendarName);\n \n if (event.CalendarName == 'Oficial') {\n if (SessionStore.user.Profile == 'MDGPR') {\ndiff --git a/src/app/shared/agenda/approve-event/approve-event.page.ts b/src/app/shared/agenda/approve-event/approve-event.page.ts\nindex ec462226f..dec1f2a5a 100644\n--- a/src/app/shared/agenda/approve-event/approve-event.page.ts\n+++ b/src/app/shared/agenda/approve-event/approve-event.page.ts\n@@ -10,7 +10,7 @@ import { ToastService } from 'src/app/services/toast.service';\n import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';\n import { ThemeService } from 'src/app/services/theme.service';\n import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';\n-import { TaskService } from 'src/app/services/task.service';\n+import { TaskService } from 'src/app/services/task.service'\n \n \n @Component({\n@@ -109,6 +109,7 @@ export class ApproveEventPage implements OnInit {\n async rejectTask(serialNumber:string) {\n \n let body = { \"serialNumber\": serialNumber, \"action\": \"Descartar\" }\n+ \n \n const loader = this.toastService.loading()\n \n@@ -132,6 +133,8 @@ export class ApproveEventPage implements OnInit {\n } catch (error) {\n console.error('getAttchaments',error)\n }\n+ \n+\n }\n \n async viewDocument(DocId:string, Document) {\n@@ -193,33 +196,26 @@ export class ApproveEventPage implements OnInit {\n if(res.data.option == 'save') { \n \n \n- if(res.data.note !== '') {\n- let body = { \"serialNumber\": serialNumber,\n- \"action\": \"Emendar\",\n- \"dataFields\": {\n- \"ReviewUserComment\": res.data,\n- }\n- }\n- \n- const loader = this.toastService.loading();\n-\n- try {\n- await this.processes.PostTaskAction(body).toPromise();\n- this.httpErroHandle.httpsSucessMessagge('Rever')\n- this.TaskService.loadEventosParaAprovacao();\n- this.close();\n- } catch (error) {\n- this.httpErroHandle.httpStatusHandle(error)\n- } finally {\n- loader.remove()\n+\n+ let body = { \"serialNumber\": serialNumber,\n+ \"action\": \"Emendar\",\n+ \"dataFields\": {\n+ \"ReviewUserComment\": res.data,\n }\n }\n- else {\n- if(res.data.option == 'save') {\n- this.toastService._badRequest('É necessário adicionar uma nota');\n- }\n+ \n+ const loader = this.toastService.loading();\n+\n+ try {\n+ await this.processes.PostTaskAction(body).toPromise();\n+ this.httpErroHandle.httpsSucessMessagge('Rever')\n+ this.TaskService.loadEventosParaAprovacao();\n+ this.close();\n+ } catch (error) {\n+ this.httpErroHandle.httpStatusHandle(error)\n+ } finally {\n+ loader.remove()\n }\n-\n \n } else {\n \ndiff --git a/src/app/shared/publication/new-publication/new-publication.page.html b/src/app/shared/publication/new-publication/new-publication.page.html\nindex c56c31771..b68341348 100644\n--- a/src/app/shared/publication/new-publication/new-publication.page.html\n+++ b/src/app/shared/publication/new-publication/new-publication.page.html\n@@ -12,6 +12,7 @@\n \n \n
\n+ \n \n
\n \n@@ -29,6 +30,11 @@\n
\n \n \n+ \n+ \n+\n \n
\n Fotografia Anexada\ndiff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts\nindex de1dc4cf2..425919d32 100644\n--- a/src/app/shared/publication/new-publication/new-publication.page.ts\n+++ b/src/app/shared/publication/new-publication/new-publication.page.ts\n@@ -32,6 +32,7 @@ export class NewPublicationPage implements OnInit {\n @Input() publication!: Publication;\n @Input() publicationType: string;\n @Input() folderId:string;\n+ @Input() documentId:string;\n \n @Output() closeDesktopComponent = new EventEmitter();\n @Output() openPublicationDetails = new EventEmitter();\n@@ -64,16 +65,45 @@ export class NewPublicationPage implements OnInit {\n \n \n setData() {\n- if(!this.publication) {\n+ if(!this.publicationType) {\n setTimeout(() => {\n this.setData()\n }, 500)\n } else {\n- this.pub = this.publication\n+ // this.pub = this.publication\n+ // this.publication = null\n+ this.getPublicationDetail()\n }\n }\n \n \n+ getPublicationDetail() {\n+\n+ if(this.publicationType != '2') { \n+ this.showLoader = true;\n+ this.publications.GetPublicationById(this.documentId).subscribe( res => {\n+ this.publication = {\n+ DateIndex: res.DateIndex,\n+ DocumentId: res.DocumentId,\n+ ProcessId:res.ProcessId,\n+ Title:res.Title,\n+ Message: res.Message,\n+ DatePublication: res.DatePublication,\n+ FileBase64: \"data:image/jpg;base64,\" + res.FileBase64,\n+ OriginalFileName: res.OriginalFileName,\n+ FileExtension: res.FileExtension,\n+ }\n+ this.pub = this.publication;\n+ this.showLoader = false;\n+ }, () => {\n+ this.showLoader = false;\n+ this.goBack() \n+ });\n+ }\n+\n+\n+ }\n+\n async takePicture() {\n const capturedImage = await Camera.getPhoto({\n quality: 50,\n@@ -130,6 +160,16 @@ export class NewPublicationPage implements OnInit {\n }\n \n if(this.publicationType == '3') {\n+\n+ if(!this.publication?.OriginalFileName || !this.pub.OriginalFileName) {\n+ \n+ if(this.pub?.OriginalFileName) {\n+ console.log('this.pub',this.pub)\n+ }\n+ throw('no this.publication.OriginalFileName')\n+ \n+ }\n+ \n const loader = this.toastService.loading()\n \n if(this.capturedImage != '') {\ndiff --git a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html\nindex c2bfb2b33..9242bb39d 100644\n--- a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html\n+++ b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html\n@@ -10,6 +10,7 @@\n

{{publication.DatePublication | date: 'dd-MM-yyyy | h:mm'}}

\n
\n
\n+ \n
\n
\n \ndiff --git a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\nindex 971d9ea34..9e5919de0 100644\n--- a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\n+++ b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\n@@ -70,10 +70,13 @@ export class PublicationDetailPage implements OnInit {\n const localPublication = this.publicationFolderService.getLocalPublication(folderId, this.publicationId);\n \n if(localPublication?.ProcessId) {\n+ console.log('console.log local storage')\n \n this.publication = localPublication\n \n } else {\n+\n+ console.log('API res')\n \n this.showLoader = true;\n this.publications.GetPublicationById(this.publicationId).subscribe(res => {\ndiff --git a/src/app/shared/publication/view-publications/view-publications.page.html b/src/app/shared/publication/view-publications/view-publications.page.html\nindex c536289f6..83c670c64 100644\n--- a/src/app/shared/publication/view-publications/view-publications.page.html\n+++ b/src/app/shared/publication/view-publications/view-publications.page.html\n@@ -43,7 +43,7 @@\n
\n \n
\n-
\n+
\n
\n
\n {{publication.Title}}", + "changeStatus": "On branch developer-prod-2\nYour branch is ahead of 'origin/developer-prod-2' by 2 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: .gitignore\n\nChanges not staged for commit:\n (use \"git add ...\" to update what will be committed)\n (use \"git restore ...\" to discard changes in working directory)\n\tmodified: src/app/modals/add-note/add-note.page.scss\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/agenda/emend-message-modal/emend-message-modal.page.ts\n\tmodified: src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts\n\tmodified: src/app/pages/events/edit-event/edit-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n\tmodified: src/app/pages/publications/publications.page.html\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/services/chat/chat-system.service.ts\n\tmodified: src/app/services/events.service.ts\n\tmodified: src/app/shared/agenda/approve-event/approve-event.page.ts\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.html\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.ts\n\tmodified: src/app/shared/publication/view-publications/publication-detail/publication-detail.page.html\n\tmodified: src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.html", "changeAuthor": "peter.maquiran" } \ No newline at end of file