diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index d08ad6d08..51c35d4f1 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -8,7 +8,7 @@ import { HomePageRoutingModule } from './home-routing.module'; import { HomePage } from './home.page'; /* import { IonicSelectableModule } from 'ionic-selectable'; */ - +import { SharedModule } from 'src/app/shared/shared.module'; @NgModule({ imports: [ @@ -16,6 +16,7 @@ import { HomePage } from './home.page'; FormsModule, IonicModule, HomePageRoutingModule, + SharedModule ], declarations: [HomePage] }) diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 1b249bcbc..e0f8ab9d8 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -1,5 +1,7 @@ - - + + + + diff --git a/src/app/home/home.page.scss b/src/app/home/home.page.scss index 9d05f7947..57a1ccc35 100644 --- a/src/app/home/home.page.scss +++ b/src/app/home/home.page.scss @@ -25,4 +25,12 @@ ion-badge {/* */ white-space: nowrap; vertical-align: baseline; */ +} + + +.tab{ + .bottoms{ + display: flex; + justify-content: space-around; + } } \ No newline at end of file diff --git a/src/app/pages/events/events.page.html b/src/app/pages/events/events.page.html index 26b2e750b..8bd61abe9 100644 --- a/src/app/pages/events/events.page.html +++ b/src/app/pages/events/events.page.html @@ -6,15 +6,96 @@ -

{{customDate}}

+

{{customDate}}

-

5 eventtos agendados para hoje

+

{{totalEvent}} eventos agendados para hoje

-
08:30
+
{{hoursMinutes}}
Reunião de Conselho de Ministros no Palácio Presidencial
+
+
+
+
+ +
A sua Agenda
+
+ + +
+
+
    +
  • +
    +
    +
    {{event.StartDate | date: 'hh:mm'}}
    +
    {{event.EndDate | date: 'hh:mm'}}
    +
    +
    +
    {{event.Location}}
    +
    {{event.Subject}}
    +
    +
    +
  • + +
+
+
+ Resumo para Amnahã +
+
4 eventos ageandados para amanhã
+
08:30 "Reunião Staff" no Palácio Presidencial
+
+
+
+ +
+
+
+ +
Correspondência por ler
+
+ + +
+
+
    +
  • + +
    +
    Reunião de Conselho de Ministros
    +
    MINEC, MINFIN
    +
    +
  • +
  • + +
    +
    Reunião de Conselho de Ministros
    +
    MINEC, MINFIN
    +
    +
  • +
  • +
    +
    Reunião de Conselho de Ministros
    +
    MINEC, MINFIN
    +
    +
  • +
  • +
    +
    Reunião de Conselho de Ministros
    +
    MINEC, MINFIN
    +
    +
  • +
+
+
+
+ + + \ No newline at end of file diff --git a/src/app/pages/events/events.page.scss b/src/app/pages/events/events.page.scss index 07435b4d8..858fc79a8 100644 --- a/src/app/pages/events/events.page.scss +++ b/src/app/pages/events/events.page.scss @@ -1,3 +1,5 @@ +@import '~src/function.scss'; + /* HEADER */ .bg-blue{ --background:#0782c9; @@ -269,8 +271,202 @@ ion-toolbar{ } + +// new +.main{ + padding: 0px em(20px); +} + +.event-number{ + color: white; + font-family: Roboto; + font-size: 15px; + color: var(--white); + + bold{ + font-family: Roboto; + font-size: 25px; + text-align: right; + color: var(--white); + } +} +.time{ + font-family: Roboto; + font-size: 30px; + text-align: center; + color: var(--white); + line-height: unset; +} + .next-meeting{ display: flex; justify-content: center; - margin: 0px auto; + margin: 0px 20px; + margin-top: 15px; + + .meeting-time { + font-size: em(25px); + font-family: Roboto; + font-weight: 300; + color: var(--white); + margin-right: 7px; + } + + .meeting-description { + margin-top: 2px; + font-family: Roboto; + font-size: 15px; + color: var(--white); + } +} + +.conteiner-box { + display: flex; + flex-wrap: wrap; + justify-content: center; +} +.schedule { + max-width: 400px; + font-family: Roboto; + margin: 10px 0px; + padding: 20px; + background-color: white; + box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07); + border: solid 1px #e9e9e9; + margin-bottom: 20px; + border-radius: 25px; + .schedule-header{ + display: flex; + margin-bottom: 20px; + justify-content: space-between; + .title { + display: flex; + align-items: center; + .icon{ + color: #e8e8e8; + height: 35px; + width: 35px; + margin-right: 10px; + } + .text{ + font-family: Roboto; + font-size: 20px; + color: black; + } + } + .icon-next { + color: #e8e8e8; + height: 35px; + width: 35px; + font-size: 35px; + font-size: 35px; + } + } + .content{ + ul{ + padding: 0px; + margin: 0px; + .d-flex{ + height: 40px; + display: flex; + justify-content: space-between; + align-items: center; + } + li{ + padding-bottom: 5px; + margin-top: 5px; + border-bottom: 1px solid #ebebeb; + display: flex; + justify-content: space-between; + align-items: center; + .schedule-time{ + margin-right: 10px; + .time-start{ + color: #797979 !important; + font-family: Roboto; + font-size: 13px; + } + .time-end{ + color: #797979 !important; + font-family: Roboto; + font-size: 13px; + } + } + .schedule-details{ + display: flex; + flex-wrap: wrap; + align-items: center; + width: 100%; + .location{ + font-family: Roboto; + font-size: 13px; + color: black; + width: 100%; + + } + .description{ + font-family: Roboto; + font-size: 15px; + font-weight: bold; + color: #0d89d1; + } + } + .color{ + width: 5px; + height: 40px; + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + background-color: #f05d5e; + } + } + li:last-child{ + //border-bottom: unset !important; + //padding-bottom: unset !important; + } + } + + } + + .resume{ + .title{ + font-family: Roboto; + font-size: 15px; + font-weight: 500; + color: #797979; + margin-bottom: 5px; + margin-top: 10px; + } + .event-num, .first-event-time{ + font-family: Roboto; + font-size: 15px; + display: block; + color: black; + } + } + +} + +.d-flex { + display: flex; +} + +@media only screen and (min-width: 804px) { + + .schedule:first-child { + margin-right: 2%; + + } +} + +@media only screen and (min-width: 478px) { + .schedule{ + width: 400px; + } +} + + +@media only screen and (max-width: 478px) { + .schedule{ + width: 360px; + } } \ No newline at end of file diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index 70921673c..807d05627 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -12,6 +12,7 @@ import { AuthConnstants } from 'src/app/config/auth-constants'; import { ModalController } from '@ionic/angular'; import { EventDetailPage } from './event-detail/event-detail.page'; import { EventDetailModalPage } from './event-detail-modal/event-detail-modal.page'; +import { ProcessesService } from '../../services/processes.service'; @Component({ selector: 'app-events', @@ -46,6 +47,8 @@ export class EventsPage implements OnInit { combinedEvents: Event[]; customText = false; + totalEvent=0; + currentHoursMinutes: String; showLoader: boolean; @@ -57,6 +60,15 @@ export class EventsPage implements OnInit { private modalController: ModalController, private authService: AuthService) { this.prEventList = null; + + // update hours and time + setInterval(()=> { + let d = new Date(); + let n = d.toLocaleTimeString(); + this.currentHoursMinutes = n.slice(0,5); + }, 1000); + + } ngOnInit() { @@ -65,7 +77,21 @@ export class EventsPage implements OnInit { //Initialize profile as mdgpr this.profile = "mdgpr"; console.log(this.profile); - + + // set event list + if(this.profile == "mdgpr"){ + this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => { + this.eventsList = res; + this.totalEvent = this.eventsList.length; + }); + } + else{ + this.eventService.getAllPrEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => { + this.eventsList = res; + this.totalEvent = this.eventsList.length; + }); + + } this.showGreeting(); @@ -201,5 +227,15 @@ export class EventsPage implements OnInit { return await modal.present(); } + + /** + * @returns time in format HH:MM:SS + */ + get hoursMinutes():String { + + return this.currentHoursMinutes; + + } + } diff --git a/src/app/shared/header/header.page.scss b/src/app/shared/header/header.page.scss index 59eae0c69..d18475831 100644 --- a/src/app/shared/header/header.page.scss +++ b/src/app/shared/header/header.page.scss @@ -25,7 +25,8 @@ } .div-profile{ font-size: 45px; - float: right; - margin-right: em(10px); + margin-right: 10px; + justify-content: flex-end; + display: flex; } } \ No newline at end of file diff --git a/src/assets/images/icons-arrow-circle-arrow-right.svg b/src/assets/images/icons-arrow-circle-arrow-right.svg new file mode 100644 index 000000000..9d054aedf --- /dev/null +++ b/src/assets/images/icons-arrow-circle-arrow-right.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/assets/images/icons-nav-agenda-active.svg b/src/assets/images/icons-nav-agenda-active.svg new file mode 100644 index 000000000..0ffb2f94b --- /dev/null +++ b/src/assets/images/icons-nav-agenda-active.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +