{{publication.DatePublication | date: 'dd-MM-yyyy | h:mm'}}
\ndiff --git a/src/app/shared/chat/group-messages/group-messages.page.ts b/src/app/shared/chat/group-messages/group-messages.page.ts index af1b72227..0cd590d03 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.ts +++ b/src/app/shared/chat/group-messages/group-messages.page.ts @@ -435,15 +435,14 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe if (recordData?.value?.recordDataBase64.includes('data:audio')) { this.audioRecorded = recordData?.value?.recordDataBase64; } - else if(recordData?.value?.mimeType && recordData?.value?.recordDataBase64) { + else if (recordData?.value?.mimeType && recordData?.value?.recordDataBase64) { this.audioRecorded = `data:${recordData.value.mimeType};base64,${recordData?.value?.recordDataBase64}`; } - //Converting base64 to blob const encodedData = btoa(this.audioRecorded); const blob = this.fileService.base64toBlob(encodedData, recordData.value.mimeType) - + const formData = new FormData(); formData.append("blobFile", blob); @@ -460,7 +459,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe }], temporaryData: formData, attachmentsModelData: { - fileBase64: await this.fileService.blobToBase64(blob), + fileBase64: encodedData, } }) @@ -715,12 +714,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe resultType: CameraResultType.Base64, source: CameraSource.Camera }); - - //const imageData = await this.fileToBase64Service.convert(file) - // - const response = await fetch('data:image/jpeg;base64,' + file.base64String!); - const blob = await response.blob(); + const imageBase64 = 'data:image/jpeg;base64,' + file.base64String + const blob = this.dataURItoBlob(imageBase64) + + console.log(imageBase64) const formData = new FormData(); formData.append("blobFile", blob); @@ -738,22 +736,39 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe "title_link_download": false, }], attachmentsModelData: { - fileBase64: await this.fileService.blobToBase64(blob), + fileBase64: imageBase64, } }) } async takePicture() { + // const roomId = this.roomId + + // const image = await this.CameraService.takePicture(); + // await this.fileService.saveImage(image) + // const lastphoto: any = await this.fileService.loadFiles(); + // const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto); + + // const base64 = await fetch(capturedImage); + // const blob = await base64.blob(); + // const formData = new FormData(); + // formData.append("blobFile", blob); + const roomId = this.roomId - const image = await this.CameraService.takePicture(); - await this.fileService.saveImage(image) - const lastphoto: any = await this.fileService.loadFiles(); - const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto); + const file = await Camera.getPhoto({ + quality: 90, + // allowEditing: true, + resultType: CameraResultType.Base64, + source: CameraSource.Camera + }); + + const imageBase64 = 'data:image/jpeg;base64,' + file.base64String + const blob = this.dataURItoBlob(imageBase64) + + console.log(imageBase64) - const base64 = await fetch(capturedImage); - const blob = await base64.blob(); const formData = new FormData(); formData.append("blobFile", blob); @@ -763,13 +778,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe "guid": '' }, attachments: [{ - "title": capturedImageTitle, + "title": 'file.jpg', "text": "description", "title_link_download": false, }], temporaryData: formData, attachmentsModelData: { - fileBase64: await this.fileService.blobToBase64(blob), + fileBase64: imageBase64, } }) @@ -837,14 +852,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe quality: 90, // allowEditing: true, resultType: CameraResultType.Base64, - source: CameraSource.Photos + source: CameraSource.Camera }); - - //const imageData = await this.fileToBase64Service.convert(file) - // - const response = await fetch('data:image/jpeg;base64,' + file.base64String!); - const blob = await response.blob(); + const imageBase64 = 'data:image/jpeg;base64,' + file.base64String + const blob = this.dataURItoBlob(imageBase64) + + console.log(imageBase64) const formData = new FormData(); formData.append("blobFile", blob); @@ -862,7 +876,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe "title_link_download": false, }], attachmentsModelData: { - fileBase64: await this.fileService.blobToBase64(blob), + fileBase64: imageBase64, } }) @@ -874,6 +888,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe const roomId = this.roomId const file: any = await this.fileService.getFileFromDevice(types); + if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") { @@ -884,8 +899,10 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe const blob = this.fileService.base64toBlob(encodedData, file.type) + const fileBase64 = await this._getBase64(file) + const formData = new FormData(); - formData.append("blobFile", blob); + formData.append('blobFile', blob); this.ChatSystemService.getGroupRoom(roomId).send({ file: { @@ -901,7 +918,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe }], temporaryData: formData, attachmentsModelData: { - fileBase64: await this.fileService.blobToBase64(blob), + fileBase64: fileBase64, } }) @@ -1123,5 +1140,45 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe } else { } } + + dataURItoBlob(dataURI) { + // convert base64 to raw binary data held in a string + // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this + var byteString = atob(dataURI.split(',')[1]); + + // separate out the mime component + var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0] + + // write the bytes of the string to an ArrayBuffer + var ab = new ArrayBuffer(byteString.length); + + // create a view into the buffer + var ia = new Uint8Array(ab); + + // set the bytes of the buffer to the correct values + for (var i = 0; i < byteString.length; i++) { + ia[i] = byteString.charCodeAt(i); + } + + // write the ArrayBuffer to a blob, and you're done + var blob = new Blob([ab], {type: mimeString}); + return blob; + + } + + + + _getBase64(file) { + return new Promise((resolve, reject)=>{ + var reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = function () { + resolve(reader.result) + }; + reader.onerror = function (error) { + console.log('Error: ', error); + }; + }) + } } diff --git a/src/app/shared/chat/messages/messages.page.ts b/src/app/shared/chat/messages/messages.page.ts index 9f6703d1b..09fcaf046 100644 --- a/src/app/shared/chat/messages/messages.page.ts +++ b/src/app/shared/chat/messages/messages.page.ts @@ -645,8 +645,10 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy source: CameraSource.Camera }); - const base64 = 'data:image/jpeg;base64,' + file.base64String - const blob = this.dataURItoBlob(base64) + const imageBase64 = 'data:image/jpeg;base64,' + file.base64String + const blob = this.dataURItoBlob(imageBase64) + + console.log(imageBase64) const formData = new FormData(); formData.append("blobFile", blob); @@ -665,7 +667,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy "title_link_download": false, }], attachmentsModelData: { - fileBase64: await this.fileService.blobToBase64(blob), + fileBase64: imageBase64, } }) @@ -675,13 +677,18 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy const roomId = this.roomId - const image = await this.CameraService.takePicture(); - await this.fileService.saveImage(image); - const lastphoto: any = await this.fileService.loadFiles(); - const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto); - const base64 = await fetch(capturedImage); + const file = await Camera.getPhoto({ + quality: 90, + // allowEditing: true, + resultType: CameraResultType.Base64, + source: CameraSource.Camera + }); + + const imageBase64 = 'data:image/jpeg;base64,' + file.base64String + const blob = this.dataURItoBlob(imageBase64) + + console.log(imageBase64) - const blob = await base64.blob(); const formData = new FormData(); formData.append("blobFile", blob); @@ -693,13 +700,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy }, temporaryData: formData, attachments: [{ - "title": capturedImageTitle, - "image_url": capturedImage, + "title": "file.jpg", "text": "description", "title_link_download": false, }], attachmentsModelData: { - fileBase64: await this.fileService.blobToBase64(blob), + fileBase64: imageBase64, } }) @@ -770,10 +776,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy //const imageData = await this.fileToBase64Service.convert(file) // - - const response = await fetch('data:image/jpeg;base64,' + file.base64String!); + const imageBase64 = 'data:image/jpeg;base64,' + file.base64String + const response = await fetch(imageBase64); const blob = await response.blob(); + console.log(imageBase64) + const formData = new FormData(); formData.append("blobFile", blob); @@ -790,7 +798,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy "title_link_download": false, }], attachmentsModelData: { - fileBase64: await this.fileService.blobToBase64(blob), + fileBase64: imageBase64, } }) @@ -805,6 +813,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy const file: any = await this.fileService.getFileFromDevice(types); + if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") { const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch ((error) => { @@ -812,9 +821,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy }))); const blob = this.fileService.base64toBlob(encodedData, file.type) + const fileBase64 = await this._getBase64(file) const formData = new FormData(); - formData.append("blobFile", blob); + formData.append('blobFile', blob); + this.ChatSystemService.getDmRoom(roomId).send({ file: { @@ -830,7 +841,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy }], temporaryData: formData, attachmentsModelData: { - fileBase64: await this.fileService.blobToBase64(blob), + fileBase64: fileBase64, } }) @@ -841,6 +852,18 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy } + _getBase64(file) { + return new Promise((resolve, reject)=>{ + var reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = function () { + resolve(reader.result) + }; + reader.onerror = function (error) { + console.log('Error: ', error); + }; + }) + } getFileReader(): FileReader { const fileReader = new FileReader(); const zoneOriginalInstance = (fileReader as any)["__zone_symbol__originalInstance"]; diff --git a/version/git-version.ts b/version/git-version.ts index 5ab7ca304..196e652d3 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "3451e74c9", - "SHA": "3451e74c90fe8c3346bf27fe75b00e30a29cf608", + "shortSHA": "774178108", + "SHA": "774178108c3ea080fafd62157123fb523470ed03", "branch": "developer-prod-2", - "lastCommitAuthor": "'Eudes Inácio'", - "lastCommitTime": "'Thu Aug 24 18:39:31 2023 +0100'", - "lastCommitMessage": "prepare for presantation", - "lastCommitNumber": "5213", - "change": "", - "changeStatus": "On branch developer-prod-2\nYour branch is up to date with 'origin/developer-prod-2'.\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/modals/profile/edit-profile/edit-profile.page.html\n\tmodified: src/app/modals/view-media/view-media.page.html\n\tmodified: src/app/modals/view-media/view-media.page.scss\n\tmodified: src/app/pages/publications/new-publication/new-publication.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/publication-detail/publication-detail.page.scss\n\tmodified: src/app/pages/publications/view-publications/publication-detail/publication-detail.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.scss\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.ts\n\tmodified: src/app/pipes/publication.pipe.ts\n\tmodified: src/app/services/functions/file.service.ts\n\tmodified: src/app/shared/header/header.page.html\n\tmodified: src/app/shared/header/header.page.scss\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.scss\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\tmodified: src/app/shared/publication/view-publications/view-publications.page.scss\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.ts\n\tmodified: src/app/store/publication-folder.service.ts\n\tnew file: src/assets/images/camera.png", + "lastCommitAuthor": "'Peter Maquiran'", + "lastCommitTime": "'Thu Aug 24 22:25:33 2023 +0100'", + "lastCommitMessage": "merge", + "lastCommitNumber": "5216", + "change": "diff --git a/gabinete-digital-fo.code-workspace b/gabinete-digital-fo.code-workspace\nindex 45d87704e..16326e81e 100644\n--- a/gabinete-digital-fo.code-workspace\n+++ b/gabinete-digital-fo.code-workspace\n@@ -2,18 +2,6 @@\n \t\"folders\": [\n \t\t{\n \t\t\t\"path\": \".\"\n-\t\t},\n-\t\t{\n-\t\t\t\"path\": \"../beast-ORM-v0\"\n-\t\t},\n-\t\t{\n-\t\t\t\"path\": \"../new-doc\"\n-\t\t},\n-\t\t{\n-\t\t\t\"path\": \"../IDOC\"\n-\t\t},\n-\t\t{\n-\t\t\t\"path\": \"../sih\"\n \t\t}\n \t],\n \t\"settings\": {\ndiff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts\nindex 9903032c1..fcda04875 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/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
{{publication.DatePublication | date: 'dd-MM-yyyy | h:mm'}}
\n