diff --git a/src/app/modals/add-note/add-note.page.scss b/src/app/modals/add-note/add-note.page.scss index 45d2c6dd7..243d46be6 100644 --- a/src/app/modals/add-note/add-note.page.scss +++ b/src/app/modals/add-note/add-note.page.scss @@ -7,12 +7,12 @@ float: left; } -.header-title { - font-family: Roboto; - font-size: rem(25); - padding: 0; - color:#000; - float: left; +.header-title{ +font-family: Roboto; +font-size: rem(25); +padding: 0; +color:#000; +float: left; } /* .content{ overflow: auto !important; */ diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 9903032c1..d74926ef5 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -588,6 +588,8 @@ export class AgendaPage implements OnInit { this.showLoader = true; const selectedCalendarIds = this.getSelectedAgendaCalendars(); this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds) + // this.calendar.currentDate.setDate(1); + this.updateEventListBox() try { diff --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 index 2b7d4caa7..4b40d1ec8 100644 --- 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 @@ -26,11 +26,7 @@ export class EmendMessageModalPage implements OnInit { } save() { - if(this.emendMessage != '') { - this.modalController.dismiss({option:'save', note: this.emendMessage}); - } else { - this.toastService._badRequest('É necessário adicionar uma nota'); - } + this.modalController.dismiss({option:'save', note: this.emendMessage}); } diff --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 index 2afa6d17f..c18a9cef6 100644 --- 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 @@ -108,7 +108,6 @@ export class EventActionsPopoverPage implements OnInit { if(res.data.option == 'save') { - if(res.data.note !== '') { let body = { "serialNumber": this.serialNumber, "action": "Emendar", "dataFields": { @@ -130,10 +129,6 @@ export class EventActionsPopoverPage implements OnInit { finally { loader.remove() } - } - else { - this.toastService._badRequest('É necessário adicionar uma nota'); - } } else { } diff --git a/src/app/pages/events/edit-event/edit-event.page.ts b/src/app/pages/events/edit-event/edit-event.page.ts index c0861977a..c65f80a44 100644 --- a/src/app/pages/events/edit-event/edit-event.page.ts +++ b/src/app/pages/events/edit-event/edit-event.page.ts @@ -129,8 +129,7 @@ export class EditEventPage implements OnInit { role: 'cancel', cssClass: 'secondary', handler: () => { } - }, - { + }, { text: 'Sim', handler: () => { this.Delete(); diff --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 index 572617754..76682aa1a 100644 --- 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 @@ -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) diff --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 index a241a4a00..d7343c06a 100644 --- 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 @@ -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 { } diff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html index 1834588e7..f9a0d1615 100644 --- a/src/app/pages/publications/publications.page.html +++ b/src/app/pages/publications/publications.page.html @@ -194,8 +194,8 @@ *ngIf="desktopComponent.showAddNewPublication" class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1" [publicationType]="publicationType" - [publication]="publication" [folderId]="folderId" + [documentId]="documentId" (closeDesktopComponent)="closeDesktopComponent($event)" (goBacktoPublicationDetails)="goBacktoPublicationDetails()" diff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts index 6ad6125a2..fe2c21fbb 100644 --- a/src/app/pages/publications/publications.page.ts +++ b/src/app/pages/publications/publications.page.ts @@ -48,6 +48,7 @@ export class PublicationsPage implements OnInit { } folderId: string; + documentId: any // data set from child component publicationType: any; publicationId: string; @@ -386,6 +387,7 @@ export class PublicationsPage implements OnInit { } this.publication = publication; + this.documentId = publication?.DocumentId this.desktopComponent.showAddNewPublication = true; } diff --git a/src/app/pages/publications/view-publications/view-publications.page.html b/src/app/pages/publications/view-publications/view-publications.page.html index 71fb347f1..f99f84fb1 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.html +++ b/src/app/pages/publications/view-publications/view-publications.page.html @@ -39,7 +39,7 @@
-
+
{{publication.Title}} diff --git a/src/app/services/chat/chat-system.service.ts b/src/app/services/chat/chat-system.service.ts index 3d9bec3ee..c19f5ea02 100644 --- a/src/app/services/chat/chat-system.service.ts +++ b/src/app/services/chat/chat-system.service.ts @@ -102,7 +102,7 @@ export class ChatSystemService { document.addEventListener('resume', function () { - if(this._dm?.length == 0 || this._group?.length == 0) { + if(this._dm?.length == 0 && this._group?.length == 0) { this.getAllRooms(); } }); diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts index 589595ac2..88fdb6bcf 100644 --- a/src/app/services/events.service.ts +++ b/src/app/services/events.service.ts @@ -851,12 +851,22 @@ export class EventsService { const puturl = environment.apiURL + 'calendar/PutEvent'; let params = new HttpParams(); + // event.Organizer = { + // "Id": SessionStore.user.UserId, + // "EmailAddress": SessionStore.user.Email, + // "Name": SessionStore.user.UserName, + // "IsRequired": true, + // "UserType": "GD" + // } + // params = params.set("notifyUsers", true) + params = params.set("conflictResolutionMode", conflictResolutionMode.toString()); params = params.set("sendInvitationsOrCancellationsMode", sendInvitationsOrCancellationsMode.toString()); params.set('CalendarId', event.CalendarId) params.set('CalendarName', event.CalendarName) this.headers['CalendarId'] = event.CalendarId this.headers['CalendarName'] = event.CalendarName + //params = params.set("CalendarName", event.CalendarName); if (event.CalendarName == 'Oficial') { if (SessionStore.user.Profile == 'MDGPR') { 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 ec462226f..dec1f2a5a 100644 --- a/src/app/shared/agenda/approve-event/approve-event.page.ts +++ b/src/app/shared/agenda/approve-event/approve-event.page.ts @@ -10,7 +10,7 @@ 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 { HttpErrorHandle } from 'src/app/services/http-error-handle.service'; -import { TaskService } from 'src/app/services/task.service'; +import { TaskService } from 'src/app/services/task.service' @Component({ @@ -109,6 +109,7 @@ export class ApproveEventPage implements OnInit { async rejectTask(serialNumber:string) { let body = { "serialNumber": serialNumber, "action": "Descartar" } + const loader = this.toastService.loading() @@ -132,6 +133,8 @@ export class ApproveEventPage implements OnInit { } catch (error) { console.error('getAttchaments',error) } + + } async viewDocument(DocId:string, Document) { @@ -193,33 +196,26 @@ export class ApproveEventPage implements OnInit { if(res.data.option == 'save') { - if(res.data.note !== '') { - let body = { "serialNumber": serialNumber, - "action": "Emendar", - "dataFields": { - "ReviewUserComment": res.data, - } - } - - const loader = this.toastService.loading(); - try { - await this.processes.PostTaskAction(body).toPromise(); - this.httpErroHandle.httpsSucessMessagge('Rever') - this.TaskService.loadEventosParaAprovacao(); - this.close(); - } catch (error) { - this.httpErroHandle.httpStatusHandle(error) - } finally { - loader.remove() - } - } - else { - if(res.data.option == 'save') { - this.toastService._badRequest('É necessário adicionar uma nota'); + let body = { "serialNumber": serialNumber, + "action": "Emendar", + "dataFields": { + "ReviewUserComment": res.data, } } + + const loader = this.toastService.loading(); + try { + await this.processes.PostTaskAction(body).toPromise(); + this.httpErroHandle.httpsSucessMessagge('Rever') + this.TaskService.loadEventosParaAprovacao(); + this.close(); + } catch (error) { + this.httpErroHandle.httpStatusHandle(error) + } finally { + loader.remove() + } } else { diff --git a/src/app/shared/publication/new-publication/new-publication.page.html b/src/app/shared/publication/new-publication/new-publication.page.html index c56c31771..b68341348 100644 --- a/src/app/shared/publication/new-publication/new-publication.page.html +++ b/src/app/shared/publication/new-publication/new-publication.page.html @@ -12,6 +12,7 @@
+
@@ -29,6 +30,11 @@
+ + +
Fotografia Anexada diff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts index de1dc4cf2..425919d32 100644 --- a/src/app/shared/publication/new-publication/new-publication.page.ts +++ b/src/app/shared/publication/new-publication/new-publication.page.ts @@ -32,6 +32,7 @@ export class NewPublicationPage implements OnInit { @Input() publication!: Publication; @Input() publicationType: string; @Input() folderId:string; + @Input() documentId:string; @Output() closeDesktopComponent = new EventEmitter(); @Output() openPublicationDetails = new EventEmitter(); @@ -64,16 +65,45 @@ export class NewPublicationPage implements OnInit { setData() { - if(!this.publication) { + if(!this.publicationType) { setTimeout(() => { this.setData() }, 500) } else { - this.pub = this.publication + // this.pub = this.publication + // this.publication = null + this.getPublicationDetail() } } + getPublicationDetail() { + + if(this.publicationType != '2') { + this.showLoader = true; + this.publications.GetPublicationById(this.documentId).subscribe( res => { + this.publication = { + DateIndex: res.DateIndex, + DocumentId: res.DocumentId, + ProcessId:res.ProcessId, + Title:res.Title, + Message: res.Message, + DatePublication: res.DatePublication, + FileBase64: "data:image/jpg;base64," + res.FileBase64, + OriginalFileName: res.OriginalFileName, + FileExtension: res.FileExtension, + } + this.pub = this.publication; + this.showLoader = false; + }, () => { + this.showLoader = false; + this.goBack() + }); + } + + + } + async takePicture() { const capturedImage = await Camera.getPhoto({ quality: 50, @@ -130,6 +160,16 @@ export class NewPublicationPage implements OnInit { } if(this.publicationType == '3') { + + if(!this.publication?.OriginalFileName || !this.pub.OriginalFileName) { + + if(this.pub?.OriginalFileName) { + console.log('this.pub',this.pub) + } + throw('no this.publication.OriginalFileName') + + } + const loader = this.toastService.loading() if(this.capturedImage != '') { diff --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 index c2bfb2b33..9242bb39d 100644 --- 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 @@ -10,6 +10,7 @@

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

+
diff --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 index 971d9ea34..9e5919de0 100644 --- 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 @@ -70,10 +70,13 @@ export class PublicationDetailPage implements OnInit { const localPublication = this.publicationFolderService.getLocalPublication(folderId, this.publicationId); if(localPublication?.ProcessId) { + console.log('console.log local storage') this.publication = localPublication } else { + + console.log('API res') this.showLoader = true; this.publications.GetPublicationById(this.publicationId).subscribe(res => { diff --git a/src/app/shared/publication/view-publications/view-publications.page.html b/src/app/shared/publication/view-publications/view-publications.page.html index c536289f6..83c670c64 100644 --- a/src/app/shared/publication/view-publications/view-publications.page.html +++ b/src/app/shared/publication/view-publications/view-publications.page.html @@ -43,7 +43,7 @@
-
+
{{publication.Title}} diff --git a/version/git-version.ts b/version/git-version.ts index f8cefeb0c..c2ad68382 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "539a36f41", - "SHA": "539a36f41f537395ddff8000098dfa19c4a505da", - "branch": "developer-prod-2", + "shortSHA": "1b897e9c2", + "SHA": "1b897e9c2beae44c3c1da51c2e7ffc6e6ca6beaa", + "branch": "developer-prod", "lastCommitAuthor": "'Peter Maquiran'", - "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", + "lastCommitTime": "'Mon Aug 28 16:35:47 2023 +0100'", + "lastCommitMessage": "improve gitignore", + "lastCommitNumber": "5220", + "change": "", + "changeStatus": "On branch developer-prod\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\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\n\nUntracked files:\n (use \"git add ...\" to include in what will be committed)\n\t-src/", "changeAuthor": "peter.maquiran" } \ No newline at end of file