diff --git a/src/app/app.module.ts b/src/app/app.module.ts index f721322e2..21fd97ea0 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -13,7 +13,7 @@ import { HttpClientModule } from '@angular/common/http'; import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; -import { File } from '@ionic-native/File/ngx'; +//import { File } from '@ionic-native/File/ngx'; import { WebView } from '@ionic-native/ionic-webview/ngx'; import { FilePath } from '@ionic-native/file-path/ngx'; import { Camera } from '@ionic-native/camera/ngx'; @@ -35,7 +35,7 @@ import { IonicStorageModule } from '@ionic/storage'; { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }, InAppBrowser, Camera, - File, + //File, WebView, FilePath, ], 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 87a2e1782..66edc9c60 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -1,5 +1,7 @@ - - + + + + @@ -22,11 +24,16 @@ Acções - + - Presidente da República - - - - - - - - - - - Combinada - - - Oficial - - - Pessoal - - - + - + + -

{{customDate}}

+

{{customDate}}

+
+ +

{{totalEvent}} eventos agendados para hoje

- - - -
- - - - - - - -
- - -
-
-

{{event.StartDate | date: 'hh:mm'}}

-

{{event.EndDate | date: 'hh:mm'}}

-
-
-

{{event.Location}}

-

{{event.Subject}}

-
-
-
-
-
-
- - - -
- - -
-
-

{{event.StartDate | date: 'hh:mm'}}

-

{{event.EndDate | date: 'hh:mm'}}

-
-
-

{{event.Location}}

-

{{event.Subject}}

-
-
-
-
-
-
- - - -
- - -
-
-

{{event.StartDate | date: 'hh:mm'}}

-

{{event.EndDate | date: 'hh:mm'}}

-
-
-

{{event.Location}}

-

{{event.Subject}}

-
-
-
-
-
-
-
-
+
+
{{hoursMinutes}}
+
"{{currentEvent}}"
+
+ +
+
+
+
+ +
A sua Agenda
+
+ + +
+
+
    +
  • +
    +
    +
    {{event.StartDate | date: 'hh:mm'}}
    +
    {{event.EndDate | date: 'hh:mm'}}
    +
    +
    +
    {{event.Location}}
    +
    {{event.Subject}}
    +
    +
    +
  • + +
+ +
+
+ +
+
+
+ +
Correspondência por ler
+
+ + +
+
+
    +
  • +
    +
    +
    {{task.CreateDate | date: 'd/M/yy'}}
    +
    {{task.CreateDate | date: 'hh:mm'}}
    +
    +
    +
    {{ task.Remetente }}
    +
    {{ task.Folio }}
    +
    +
    +
  • + +
+
+
+
+ + + +
\ 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 cae4ec29a..5df488337 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; @@ -266,4 +268,215 @@ ion-toolbar{ bottom: 15px; right: 14px; color: #e16817; - } \ No newline at end of file + } + + + +// 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 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{ + width: 100%; + 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-date{ + width: 22%; + color: #797979 !important; + 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; +} + +.pointer{ + cursor: pointer; +} + +@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..002c690a9 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -12,6 +12,8 @@ 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'; +import { DailyWorkTask } from '../../models/dailyworktask.model'; @Component({ selector: 'app-events', @@ -35,6 +37,7 @@ export class EventsPage implements OnInit { /* Set segment variable */ segment:string; public profile:string; + currentEvent: any; eventsList: Event[]; officialeventsList: Event[]; @@ -46,8 +49,12 @@ export class EventsPage implements OnInit { combinedEvents: Event[]; customText = false; + totalEvent=0; + currentHoursMinutes: String; showLoader: boolean; + + taskslist:DailyWorkTask[]; constructor(private eventService: EventsService, private router: Router, @@ -55,8 +62,18 @@ export class EventsPage implements OnInit { public activatedRoute: ActivatedRoute, private alertController: AlertService, private modalController: ModalController, - private authService: AuthService) { + private authService: AuthService, + private processes:ProcessesService) { this.prEventList = null; + + // update hours and minutes + setInterval(()=> { + this.currentHoursMinutes = formatDate(new Date(), 'HH:MM', 'pt'); + }, 1000); + + // list + this.LoadList(); + } ngOnInit() { @@ -65,7 +82,22 @@ 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 HH:mm:ss', 'pt'), formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => { + this.eventsList = res; + console.log(this.eventsList); + this.totalEvent = this.eventsList.length; + }); + } + else{ + this.eventService.getAllPrEvents(formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss', 'pt'), formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => { + this.eventsList = res; + this.totalEvent = this.eventsList.length; + }); + + } */ this.showGreeting(); @@ -97,14 +129,18 @@ export class EventsPage implements OnInit { { case "Combinada": 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.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss', 'pt') /* + ' 00:00:00' */, formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => { this.eventsList = res; + this.currentEvent = res[0].Subject; + this.totalEvent = this.eventsList.length; this.showLoader = false; }); }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; console.log(this.eventsList); + this.currentEvent = res[0].Subject; + this.totalEvent = this.eventsList.length; this.showLoader = false; }); } @@ -201,5 +237,32 @@ export class EventsPage implements OnInit { return await modal.present(); } + + /** + * @returns time in format HH:MM + */ + get hoursMinutes():String { + + return this.currentHoursMinutes; + + } + + LoadList() + { + this.processes.GetTasksList("Expediente", false).subscribe(result => { + this.taskslist = new Array(); + result.forEach(element => { + let task: DailyWorkTask = { + "SerialNumber": element.serialNumber, + "Folio": element.workflowInstanceFolio, + "Senders": element.originator.email, + "CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'), + "DocumentURL": element.formURL, + "Remetente": element.workflowInstanceDataFields.Remetente + } + this.taskslist.push(task); + }); + }); + } } diff --git a/src/app/pages/search/search.page.html b/src/app/pages/search/search.page.html index 5742ae085..c47ea5e6c 100644 --- a/src/app/pages/search/search.page.html +++ b/src/app/pages/search/search.page.html @@ -1,15 +1,147 @@ - - - Pesquisa - + + + + +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
- - -