From 64e0760e62ceed30deb8022c7a95cbc831193e81 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Wed, 14 Jun 2023 13:44:26 +0100 Subject: [PATCH] select calendar by default --- src/app/services/task.service.ts | 4 +--- version/git-version.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/app/services/task.service.ts b/src/app/services/task.service.ts index b81a5a647..531f6703f 100644 --- a/src/app/services/task.service.ts +++ b/src/app/services/task.service.ts @@ -377,9 +377,7 @@ export class TaskService { let diplomasAssinados: any = depachoAPI.filter(data => data.activityInstanceName == "Diploma Assinado"); diplomasAssinados = diplomasAssinados.map((element) => this.expedienteTaskPipe.transform(element)) this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados) - } catch (error) { - - } + } catch (error) {} } diff --git a/version/git-version.ts b/version/git-version.ts index 2821a715f..8a8e5e77c 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "f023501d9", - "SHA": "f023501d9ebf0d058430f9feaa43f47ab131bde5", + "shortSHA": "d307e5fd1", + "SHA": "d307e5fd1bd1b9c139fc60f6a5d1866a216189eb", "branch": "feature/gabinete-search", "lastCommitAuthor": "'Peter Maquiran'", - "lastCommitTime": "'Tue Jun 13 20:37:23 2023 +0100'", - "lastCommitMessage": "fix issues", - "lastCommitNumber": "5013", + "lastCommitTime": "'Wed Jun 14 11:06:06 2023 +0100'", + "lastCommitMessage": "select calendar by default", + "lastCommitNumber": "5014", "change": "diff --git a/src/app/pages/gabinete-digital/event-list/event-list.page.ts b/src/app/pages/gabinete-digital/event-list/event-list.page.ts\nindex 8fc46150d..0f7a466d0 100644\n--- a/src/app/pages/gabinete-digital/event-list/event-list.page.ts\n+++ b/src/app/pages/gabinete-digital/event-list/event-list.page.ts\n@@ -62,20 +62,25 @@ export class EventListPage implements OnInit {\n if(window.location.pathname.includes('gabinete-digital')) {\n this.showFilter = true\n }\n- \n- if(!this.segment) {\n- if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n- this.segment = 'Meu calendario';\n- } else {\n- this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ \n+\n+ this.eventService.onCalendarFinishLoad.subscribe(() => {\n+ if(!this.segment) {\n+ if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n+ this.segment = 'Meu calendario';\n+ } else {\n+ this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ }\n+ \n+ // select pr by default\n+ const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n+ if(pr) {\n+ this.segment = pr.OwnerUserId\n+ }\n }\n+ })\n+\n \n- // select pr by default\n- // const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n- // if(pr) {\n- // this.segment = pr.OwnerUserId\n- // }\n- }\n \n const location = window.location\n const pathname = location.pathname + location.search\ndiff --git a/src/app/shared/agenda/event-list/event-list.page.ts b/src/app/shared/agenda/event-list/event-list.page.ts\nindex 7e283262c..1913a9636 100644\n--- a/src/app/shared/agenda/event-list/event-list.page.ts\n+++ b/src/app/shared/agenda/event-list/event-list.page.ts\n@@ -49,18 +49,21 @@ export class EventListPage implements OnInit {\n }\n \n ngAfterViewInit(): void {\n- if(!this.segment) {\n- if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n- this.segment = 'Meu calendario';\n- } else {\n- this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ this.eventService.onCalendarFinishLoad.subscribe(() => {\n+ if(!this.segment) {\n+ if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n+ this.segment = 'Meu calendario';\n+ } else {\n+ this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ }\n+ \n+ // select pr by default\n+ const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n+ if(pr) {\n+ this.segment = pr.OwnerUserId\n+ }\n }\n-\n- // const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n- // if(pr) {\n- // this.segment = pr.OwnerUserId\n- // }\n- }\n+ })\n }\n \n ngOnInit() {\ndiff --git a/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts b/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\nindex 7aae316e9..60e63ef1b 100644\n--- a/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n+++ b/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n@@ -62,18 +62,23 @@ export class EventsToApprovePage implements OnInit {\n {}\n \n ngOnInit() {\n- if(!this.segment) {\n- if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n- this.segment = 'Meu calendario';\n- } else {\n- this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ \n+ this.eventService.onCalendarFinishLoad.subscribe(() => {\n+ if(!this.segment) {\n+ if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n+ this.segment = 'Meu calendario';\n+ } else {\n+ this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ }\n+ \n+ // select pr by default\n+ const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n+ if(pr) {\n+ this.segment = pr.OwnerUserId\n+ }\n }\n+ })\n \n- // const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n- // if(pr) {\n- // this.segment = pr.OwnerUserId\n- // }\n- }\n this.LoadToApproveEvents()\n \n this.listSubscription = this.eventoaprovacaostore.registerCallback({", - "changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/services/events.service.ts\n\tnew file: src/app/services/subcribe.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/gabinete-digital/event-list/event-list.page.ts\n\tmodified: src/app/shared/agenda/event-list/event-list.page.ts\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts", + "changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/services/task.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: src/app/pages/gabinete-digital/event-list/event-list.page.ts\n\tmodified: src/app/shared/agenda/event-list/event-list.page.ts\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts", "changeAuthor": "peter.maquiran" } \ No newline at end of file