diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index b9193d04f..8620310bd 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -131,6 +131,8 @@ export class HomePage implements OnInit { ); }); */ + + } goto(url) { @@ -215,6 +217,19 @@ export class HomePage implements OnInit { if (!this.p.userPermission([this.p.permissionList.Gabinete.md_tasks]) && SessionStore.user.RoleID == this.RoleIdService.PV) { throw (`User doesn't has vice president permission but has roleId`); } + + + + (()=>{ + document.addEventListener('click', (e: any) => { + const closest = e.target.closest(".mat-datepicker-content"); + if(closest) { + e.preventDefault() + document.activeElement['blur'](); + } + + }) + })() }, 1000) } diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index 2418d316d..8c1b7c939 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -104,6 +104,7 @@ export class EventsPage implements OnInit { this.listToPresent = []; }) + this.agendaColor = this.sessoStore.user.Profile if(this.agendaColor != "PR") { this.agendaColor = "MDGPR" diff --git a/version/git-version.ts b/version/git-version.ts index 8122cf11b..c2c149a49 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "6f9eb09b1", - "SHA": "6f9eb09b1c271a8f32359b7baa6c6e53314056f6", + "shortSHA": "51a526644", + "SHA": "51a526644a23bae4c4a8bfd869df93ea72c7ddd6", "branch": "developer-prod", "lastCommitAuthor": "'Peter Maquiran'", - "lastCommitTime": "'Tue Aug 22 11:25:13 2023 +0100'", - "lastCommitMessage": "agendas order", - "lastCommitNumber": "5200", - "change": "diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts\nindex 2418d316d..8c1b7c939 100644\n--- a/src/app/pages/events/events.page.ts\n+++ b/src/app/pages/events/events.page.ts\n@@ -104,6 +104,7 @@ export class EventsPage implements OnInit {\n this.listToPresent = [];\n })\n \n+ this.agendaColor = this.sessoStore.user.Profile\n \n if(this.agendaColor != \"PR\") {\n this.agendaColor = \"MDGPR\"\ndiff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts\nindex edbbc4a99..1810a105a 100644\n--- a/src/app/pages/publications/new-publication/new-publication.page.ts\n+++ b/src/app/pages/publications/new-publication/new-publication.page.ts\n@@ -208,9 +208,12 @@ export class NewPublicationPage implements OnInit {\n if (this.Form.invalid) return false\n \n \n+ console.log('this.publication', this.publication)\n+ alert('asdfsadf')\n \n if (this.publicationType == '3') {\n \n+ // has captured image\n if (this.capturedImage != '') {\n this.publication = {\n DateIndex: this.publication.DateIndex,\n@@ -240,7 +243,8 @@ export class NewPublicationPage implements OnInit {\n }\n \n }\n- else if (!this.publication.OriginalFileName) {\n+ // no file names\n+ else if (!this.PublicationFolderService.PublicationHasImage(this.publication)) {\n \n this.publication = {\n DateIndex: this.publication.DateIndex,\n@@ -276,8 +280,8 @@ export class NewPublicationPage implements OnInit {\n Title: this.pub.Title,\n Message: this.pub.Message,\n DatePublication: this.publication.DatePublication,\n- OriginalFileName: this.capturedImageTitle,\n- FileBase64: this.capturedImage,\n+ OriginalFileName: this.publication.OriginalFileName,\n+ FileBase64: this.publication.FileBase64,\n FileExtension: 'jpeg',\n }\n \n@@ -345,8 +349,8 @@ export class NewPublicationPage implements OnInit {\n }\n \n clear() {\n- this.capturedImageTitle = '';\n- this.capturedImage = '';\n+ this.capturedImageTitle = null;\n+ this.capturedImage = null;\n }\n \n setTitle() {\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 4e1a59bee..1c4827837 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@@ -163,6 +163,9 @@ export class NewPublicationPage implements OnInit {\n \n }\n \n+ console.log('this.publication', this.publication)\n+ alert('asdfsadf')\n+ \n if(this.publicationType == '3') {\n \n if(this.capturedImage != '') {\ndiff --git a/src/app/store/publication-folder.service.ts b/src/app/store/publication-folder.service.ts\nindex a54700c33..9cbdac7f3 100644\n--- a/src/app/store/publication-folder.service.ts\n+++ b/src/app/store/publication-folder.service.ts\n@@ -196,6 +196,15 @@ export class PublicationFolderService {\n \n }\n \n+\n+ PublicationHasImage(Publication: Publication) {\n+ return Publication.FileBase64 != '' && Publication.FileBase64 != \"data:image/jpg;base64,null\"\n+ }\n+\n+ hasCapturedImage(Publication: Publication) {\n+ return Publication.FileBase64 != '' && Publication.FileBase64 != \"data:image/jpg;base64,null\"\n+ }\n+\n }", - "changeStatus": "On branch developer-prod\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/global.scss\n\tmodified: version/git-version.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: src/app/pages/events/events.page.ts\n\tmodified: src/app/pages/publications/new-publication/new-publication.page.ts\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.ts\n\tmodified: src/app/store/publication-folder.service.ts", + "lastCommitTime": "'Tue Aug 22 13:06:52 2023 +0100'", + "lastCommitMessage": "merge", + "lastCommitNumber": "5201", + "change": "diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts\nindex edbbc4a99..4b1165668 100644\n--- a/src/app/pages/publications/new-publication/new-publication.page.ts\n+++ b/src/app/pages/publications/new-publication/new-publication.page.ts\n@@ -211,6 +211,7 @@ export class NewPublicationPage implements OnInit {\n \n if (this.publicationType == '3') {\n \n+ // has captured image\n if (this.capturedImage != '') {\n this.publication = {\n DateIndex: this.publication.DateIndex,\n@@ -240,8 +241,8 @@ export class NewPublicationPage implements OnInit {\n }\n \n }\n- else if (!this.publication.OriginalFileName) {\n-\n+ // no file names\n+ else if (!this.PublicationFolderService.PublicationHasImage(this.publication)) {\n this.publication = {\n DateIndex: this.publication.DateIndex,\n DocumentId: this.publication.DocumentId,\n@@ -249,9 +250,9 @@ export class NewPublicationPage implements OnInit {\n Title: this.pub.Title,\n Message: this.pub.Message,\n DatePublication: this.publication.DatePublication,\n- // OriginalFileName: this.publication.OriginalFileName,\n- // FileBase64: this.publication.FileBase64,\n- // FileExtension: 'jpeg',\n+ OriginalFileName: \"\",\n+ FileBase64: \"\",\n+ FileExtension: \"\",\n }\n \n const loader = this.toastService.loading()\n@@ -276,8 +277,8 @@ export class NewPublicationPage implements OnInit {\n Title: this.pub.Title,\n Message: this.pub.Message,\n DatePublication: this.publication.DatePublication,\n- OriginalFileName: this.capturedImageTitle,\n- FileBase64: this.capturedImage,\n+ OriginalFileName: this.publication.OriginalFileName,\n+ FileBase64: this.publication.FileBase64,\n FileExtension: 'jpeg',\n }\n \n@@ -345,8 +346,8 @@ export class NewPublicationPage implements OnInit {\n }\n \n clear() {\n- this.capturedImageTitle = '';\n- this.capturedImage = '';\n+ this.capturedImageTitle = null;\n+ this.capturedImage = null;\n }\n \n setTitle() {\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 4e1a59bee..fe2c6bea1 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@@ -196,7 +196,8 @@ export class NewPublicationPage implements OnInit {\n }\n \n }\n- else if (!this.publication.OriginalFileName) { //\n+ else if (!this.PublicationFolderService.PublicationHasImage(this.publication)) { //\n+ \n this.publication = {\n DateIndex: this.publication.DateIndex,\n DocumentId:this.publication.DocumentId,\n@@ -204,10 +205,9 @@ export class NewPublicationPage implements OnInit {\n Title: this.pub.Title,\n Message: this.pub.Message,\n DatePublication: this.publication.DatePublication,\n- OriginalFileName: this.capturedImageTitle,\n- // OriginalFileName: this.publication.OriginalFileName,\n- // FileBase64: this.publication.FileBase64,\n- // FileExtension: 'jpeg',\n+ OriginalFileName: this.publication.OriginalFileName,\n+ FileBase64: \"\",\n+ FileExtension: this.publication.FileExtension,\n }\n const loader = this.toastService.loading()\n \ndiff --git a/src/app/store/publication-folder.service.ts b/src/app/store/publication-folder.service.ts\nindex a54700c33..9cbdac7f3 100644\n--- a/src/app/store/publication-folder.service.ts\n+++ b/src/app/store/publication-folder.service.ts\n@@ -196,6 +196,15 @@ export class PublicationFolderService {\n \n }\n \n+\n+ PublicationHasImage(Publication: Publication) {\n+ return Publication.FileBase64 != '' && Publication.FileBase64 != \"data:image/jpg;base64,null\"\n+ }\n+\n+ hasCapturedImage(Publication: Publication) {\n+ return Publication.FileBase64 != '' && Publication.FileBase64 != \"data:image/jpg;base64,null\"\n+ }\n+\n }", + "changeStatus": "On branch developer-prod\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/app/pages/events/events.page.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: src/app/pages/publications/new-publication/new-publication.page.ts\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.ts\n\tmodified: src/app/store/publication-folder.service.ts", "changeAuthor": "peter.maquiran" } \ No newline at end of file