From 516e2e4f8b8c1eace5f322c922f3c9e6f2fd1d65 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 1 Feb 2021 15:27:12 +0100 Subject: [PATCH 1/3] Custom timeline coloring --- src/app/pages/agenda/agenda.page.html | 6 +- src/app/pages/agenda/agenda.page.scss | 2 +- src/app/pages/agenda/agenda.page.ts | 6 +- .../images/icons-profile-calendar-md.svg | 2 +- .../images/icons-profile-calendar-pr.svg | 6 +- src/global.scss | 68 ++++++++++++------- 6 files changed, 54 insertions(+), 36 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index f62298c2e..7fa578829 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -35,10 +35,8 @@ -
- - -
+ +
diff --git a/src/app/pages/agenda/agenda.page.scss b/src/app/pages/agenda/agenda.page.scss index 8976ca2d6..e6d46a248 100644 --- a/src/app/pages/agenda/agenda.page.scss +++ b/src/app/pages/agenda/agenda.page.scss @@ -400,7 +400,7 @@ label{ padding: 0px 0px; } -.right-icons{ +.right-icons, .calendar-profile{ padding: 0px 9px } diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 27f035eaa..1dca422d5 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -207,9 +207,9 @@ export class AgendaPage implements OnInit { eventTypeNum = (Object.keys(eventType)).length if (eventTypeNum == 2) { - return 'calendar-event-type-both'; + return `calendar-${this.profile}-event-type-both`; } else { - return 'calendar-event-type-'+(Object.keys(eventType))[0]; + return `calendar-${this.profile}-event-type-`+(Object.keys(eventType))[0]; } } @@ -292,7 +292,7 @@ export class AgendaPage implements OnInit { timeLineTemplate(startTime: string, eventlocation: string, eventDiscription: any, calendarName: string, subject: string): string{ return ` -
+
${startTime}${eventlocation}
diff --git a/src/assets/images/icons-profile-calendar-md.svg b/src/assets/images/icons-profile-calendar-md.svg index c00684e68..50467ae8d 100644 --- a/src/assets/images/icons-profile-calendar-md.svg +++ b/src/assets/images/icons-profile-calendar-md.svg @@ -1,6 +1,6 @@ - + diff --git a/src/assets/images/icons-profile-calendar-pr.svg b/src/assets/images/icons-profile-calendar-pr.svg index c377a04b7..4cd7a439d 100644 --- a/src/assets/images/icons-profile-calendar-pr.svg +++ b/src/assets/images/icons-profile-calendar-pr.svg @@ -1,6 +1,6 @@ - - - + + + diff --git a/src/global.scss b/src/global.scss index 2d929b05c..4bd338052 100644 --- a/src/global.scss +++ b/src/global.scss @@ -46,17 +46,19 @@ td.monthview-current{ justify-content: center; align-items: center; text-align: center; - color: white; + /* color: white; */ } } .monthview-secondary-with-event, .monthview-secondary-with-event[_ngcontent-dwf-c153] { background-color: white !important; + color: black !important; } +// selected date td.monthview-selected { background-color: #42b9fe30 !important; - color: black !important; + color: white !important; } .event-detail-container{ @@ -125,15 +127,27 @@ td.monthview-selected { } -.timeline-box-Pessoal{ +.timeline-pr-box-Pessoal{ + + border-left: 5px solid #99e47b !important; + height: 100%; +} +.timeline-pr-box-Oficial{ + + border-left: 5px solid #958bfc !important; + height: 100%; +} + + +.timeline-mdgpr-box-Oficial{ border-left: 5px solid #ffb703 !important; - height: 100%; } -.timeline-box-Oficial{ +.timeline-mdgpr-box-Pessoal{ border-left: 5px solid #f05d5e !important; - height: 100%; } + + .table-bordered, .table-bordered{ border: none !important; td, th { @@ -147,40 +161,46 @@ td.monthview-selected { .timeline-box-{} -.calendar-event-type-Oficial{ - border-right: 3px solid #f05d5e !important; +.calendar-event-border{ border-radius: 21px !important; color: black !important; margin: 0px auto !important; width: 35px !important; } - -.calendar-event-type-Pessoal{ +.calendar-mdgpr-event-type-Oficial{ + border-right: 3px solid #f05d5e !important; +} +.calendar-mdgpr-event-type-Pessoal{ border-left: 3px solid #ffb703 !important; - border-radius: 21px !important; - color: black !important; - margin: 0px auto !important; - width: 35px !important; +} +.calendar-mdgpr-event-type-both{ + border-left: 3px solid #ffb703 !important; + border-right: 3px solid #f05d5e !important; +} +.calendar-pr-event-type-both{ + border-left: 3px solid #99e47b !important; + border-right: 3px solid #958bfc !important; } -.calendar-event-type-both{ - border-radius: 21px !important; - border-left: 3px solid #ffb703 !important; - border-bottom: none !important; - border-right: 3px solid #f05d5e !important; - color: black !important; - margin: 0px auto !important; - width: 35px !important; +.calendar-pr-event-type-Oficial{ + border-left: 3px solid #99e47b !important; +} +.calendar-pr-event-type-Pessoal{ + border-left: 3px solid #958bfc !important; } .cal-hour-segment { border-bottom: none !important; } - - +// current day td.monthview-current{ border-bottom: 1px solid #3a87ad !important; + color: black !important; +} + +.calendar-profile{ + font-size: 36px } /* angular-cli file: src/styles.css */ From 394b006468ba4bb0d93886fa4d6b7ad04d6393a8 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 1 Feb 2021 17:00:01 +0100 Subject: [PATCH 2/3] Add timeline auto scroll --- src/app/pages/agenda/agenda.page.html | 6 ++--- src/app/pages/agenda/agenda.page.ts | 19 +++++++++++++++ src/app/shared/header/header.page.html | 3 ++- src/app/shared/header/header.page.ts | 10 +++++++- src/assets/images/icons-profile-pr-header.svg | 23 +++++++++++++++++++ 5 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 src/assets/images/icons-profile-pr-header.svg diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index 7fa578829..ffe4f797a 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -190,7 +190,7 @@
- + @@ -200,7 +200,7 @@ -
+
- +123123123123 \ No newline at end of file diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 1dca422d5..bf909a50b 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -150,6 +150,20 @@ export class AgendaPage implements OnInit { setCookie('searchModalAPPType','0', 99999999); this.showLoader = false; + + setTimeout(() => { + const timelineMarker = document.querySelector('.cal-current-time-marker'); + + const timelineContainer = document.querySelectorAll('ion-content')[2]; + const shadowRoot = timelineContainer.shadowRoot; + + const scrollContainer = shadowRoot.querySelector('main'); + + scrollContainer.scrollTop = timelineMarker['offsetTop'] - (window.screen.availHeight - (91 + 337 +56+140)); + + + }, 2000); + } ngOnInit() { @@ -498,6 +512,7 @@ export class AgendaPage implements OnInit { this.alertCrontroller.presentAlert("Funcionalidade em desenvolvimento."); } changeProfile(){ + if(this.profile == "mdgpr"){ console.log('pr'); this.profile ="pr"; @@ -508,6 +523,10 @@ export class AgendaPage implements OnInit { this.profile ="mdgpr"; this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); } + + // change header profile picture + window['header'](this.profile); + } async openAddEvent() { diff --git a/src/app/shared/header/header.page.html b/src/app/shared/header/header.page.html index bb8995fb1..679df1102 100644 --- a/src/app/shared/header/header.page.html +++ b/src/app/shared/header/header.page.html @@ -15,7 +15,8 @@
- + +
diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index 6ad2ac28a..bda88e1b1 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -9,7 +9,15 @@ import { SearchPage } from 'src/app/pages/search/search.page'; }) export class HeaderPage implements OnInit { - constructor(private modalController: ModalController) { } + profile: string = 'mdgpr'; + + constructor(private modalController: ModalController) { + + window['header'] = (profile:string) => { + this.profile = profile; + } + + } ngOnInit() { } diff --git a/src/assets/images/icons-profile-pr-header.svg b/src/assets/images/icons-profile-pr-header.svg new file mode 100644 index 000000000..44951d8f4 --- /dev/null +++ b/src/assets/images/icons-profile-pr-header.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + PR + + + + + + From 3155d85de8e1b3a9486050bb99fdbc9045b45980 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 1 Feb 2021 17:03:26 +0100 Subject: [PATCH 3/3] Remove namber --- src/app/pages/agenda/agenda.page.html | 2 -- src/app/pages/agenda/agenda.page.ts | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index ffe4f797a..0b83f0673 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -218,6 +218,4 @@
- -123123123123
\ No newline at end of file diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index bf909a50b..2c1f71193 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -151,6 +151,7 @@ export class AgendaPage implements OnInit { this.showLoader = false; + // auto scroll setTimeout(() => { const timelineMarker = document.querySelector('.cal-current-time-marker');