mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Merge
This commit is contained in:
@@ -98,9 +98,9 @@ export class HomePage implements OnInit {
|
||||
PushNotifications.addListener(
|
||||
'pushNotificationActionPerformed',
|
||||
(notification: PushNotificationActionPerformed) => {
|
||||
let service = notification.notification.data.Service;
|
||||
let object = notification.notification.data.Object;
|
||||
let idObject = notification.notification.data.IdObject;
|
||||
let service = notification.notification.data.service;
|
||||
let object = notification.notification.data.object;
|
||||
let idObject = notification.notification.data.idObject;
|
||||
|
||||
console.log('Complete Object: ', notification )
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
export class TopSearch {
|
||||
|
||||
Documents: {
|
||||
Text: string;
|
||||
Hits: number;
|
||||
}[] = [];
|
||||
|
||||
}
|
||||
@@ -35,16 +35,27 @@
|
||||
|
||||
</ion-row>
|
||||
<ion-row class="ion-align-items-center">
|
||||
<div class="arrow">
|
||||
<ion-icon *ngIf="profile == 'mdgpr' " (click)="changeProfile()" class="right-icons" slot="icon-only"src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
|
||||
<ion-icon *ngIf="profile == 'pr' " (click)="changeProfile()" class="right-icons" slot="icon-only"src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
|
||||
</div>
|
||||
<ion-icon *ngIf="profile == 'mdgpr' " (click)="changeProfile()" class="right-icons" src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
|
||||
<ion-icon *ngIf="profile == 'pr' " (click)="changeProfile()" class="right-icons" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
|
||||
<ion-icon (click)="viewEventsToApprove()" class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon (click)="openAddEvent()" class="right-icons" src="assets/images/icons-add-new-event.svg" ></ion-icon>
|
||||
</ion-row>
|
||||
</ion-row>
|
||||
|
||||
<calendar
|
||||
|
||||
<table class="custom-calendar-header">
|
||||
<thead>
|
||||
<th>S</th>
|
||||
<th>T</th>
|
||||
<th>Q</th>
|
||||
<th>Q</th>
|
||||
<th>S</th>
|
||||
<th>S</th>
|
||||
<th>D</th>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
|
||||
<calendar class="calendar-component"
|
||||
[eventSource]="eventSource"
|
||||
[calendarMode]="calendar.mode"
|
||||
[currentDate]="calendar.currentDate"
|
||||
@@ -62,7 +73,7 @@
|
||||
[monthviewDisplayEventTemplate]="template"
|
||||
>
|
||||
</calendar>
|
||||
|
||||
|
||||
<!-- Adding a customized ng-template -->
|
||||
<ng-template #template let-view="view" let-row="row" let-col="col">
|
||||
<div [className]="currentDayEventDisplayBorder(view.dates, row*7+col)" [class.with-event]="view.dates[row*7+col].events.length">
|
||||
@@ -94,7 +105,20 @@
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<calendar
|
||||
|
||||
<table class="custom-calendar-header">
|
||||
<thead>
|
||||
<th>S</th>
|
||||
<th>T</th>
|
||||
<th>Q</th>
|
||||
<th>Q</th>
|
||||
<th>S</th>
|
||||
<th>S</th>
|
||||
<th>D</th>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<calendar class="calendar-component"
|
||||
[eventSource]="eventSource"
|
||||
[calendarMode]="calendar.mode"
|
||||
[currentDate]="calendar.currentDate"
|
||||
@@ -145,8 +169,21 @@
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<calendar
|
||||
|
||||
|
||||
<table class="custom-calendar-header">
|
||||
<thead>
|
||||
<th>S</th>
|
||||
<th>T</th>
|
||||
<th>Q</th>
|
||||
<th>Q</th>
|
||||
<th>S</th>
|
||||
<th>S</th>
|
||||
<th>D</th>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<calendar class="calendar-component"
|
||||
[eventSource]="eventSource"
|
||||
[calendarMode]="calendar.mode"
|
||||
[currentDate]="calendar.currentDate"
|
||||
@@ -183,16 +220,23 @@
|
||||
<ion-row class="timeline-date">
|
||||
<span *ngIf="timelineIsCurrentDate()">Hoje, </span> {{ timelineDate }}
|
||||
</ion-row>
|
||||
<!-- <ion-row class="filter ion-align-items-center">
|
||||
<div class="filter-name">Todos</div>
|
||||
<ion-icon class="arrow-down" src="assets/images/icons-arrow-arrow-down.svg"></ion-icon>
|
||||
</ion-row> -->
|
||||
<ion-row class="filter ion-align-items-center">
|
||||
<div class="filter-name">{{timelineFilterState}}</div>
|
||||
<!-- Icon -->
|
||||
<ion-icon (click)="showTimelineFilterState=true" class="arrow-down" src="assets/images/icons-arrow-arrow-down.svg"></ion-icon>
|
||||
<!-- List -->
|
||||
<ul *ngIf="showTimelineFilterState">
|
||||
<li [class.active]="timelineFilterState == 'Todos' " (click)="timelineFilter('Todos')">Todos</li>
|
||||
<li [class.active]="timelineFilterState == 'Oficial' " (click)="timelineFilter('Oficial')">Oficial</li>
|
||||
<li [class.active]="timelineFilterState == 'Pessoal' " (click)="timelineFilter('Pessoal')">Pessoal</li>
|
||||
</ul>
|
||||
</ion-row>
|
||||
</ion-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-content class="timeline">
|
||||
|
||||
<!-- Progress bar -->
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
@@ -202,7 +246,7 @@
|
||||
</ion-refresher>
|
||||
|
||||
<!-- Timeline -->
|
||||
<div *ngIf="showTimeline">
|
||||
<div class="timeline-container" *ngIf="showTimeline">
|
||||
<mwl-demo-utils-calendar-header class="timeline"
|
||||
[(view)]="view"
|
||||
[(viewDate)]="viewDate"
|
||||
@@ -220,6 +264,4 @@
|
||||
</mwl-calendar-day-view>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ion-content>
|
||||
@@ -1,8 +1,4 @@
|
||||
.indicator-container {
|
||||
padding-left: 0.5rem;
|
||||
padding-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
|
||||
.event-indicator {
|
||||
background: #333;
|
||||
width: 5px;
|
||||
@@ -11,17 +7,31 @@
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
ion-slide{
|
||||
td{
|
||||
div {
|
||||
padding-left: 7px;
|
||||
border-radius: 28px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
height: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:host ::ng-deep {
|
||||
.monthview-primary-with-event {
|
||||
background-color: white !important;
|
||||
/* background-color: white !important; */
|
||||
}
|
||||
|
||||
.monthview-current{
|
||||
background-color: red;
|
||||
/* background-color: red; */
|
||||
border-bottom: 1px solid lightskyblue !important;
|
||||
}
|
||||
.monthview-selected {
|
||||
background-color: lightskyblue !important;
|
||||
/* background-color: lightskyblue !important; */
|
||||
}
|
||||
.item{
|
||||
/* background: red !important; */
|
||||
@@ -35,16 +45,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.with-event {
|
||||
background-color: #fff;
|
||||
border-radius: 21px;
|
||||
border-left: 3px solid #ffb703;
|
||||
border-bottom: none;
|
||||
border-right: 3px solid #f05d5e;
|
||||
color: black;
|
||||
margin: 0px auto;
|
||||
width: 35px;
|
||||
}
|
||||
|
||||
.main-header{
|
||||
width: 100%; /* 400px */
|
||||
@@ -255,7 +255,9 @@ label{
|
||||
right: 14px;
|
||||
color: #e16817;
|
||||
}
|
||||
|
||||
td.monthview-primary-with-event {
|
||||
background-color: white !important;
|
||||
}
|
||||
.header-title{
|
||||
width: 300px;
|
||||
font-family: Roboto;
|
||||
@@ -334,31 +336,6 @@ label{
|
||||
|
||||
|
||||
|
||||
.currente-date-timelien{
|
||||
padding: 10px 20px;
|
||||
.timeline-date{
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.filter{
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
.filter-name{
|
||||
color: #0d89d1;
|
||||
}
|
||||
ion-icon{
|
||||
font-size: 35px;
|
||||
color: #0d89d1;
|
||||
}
|
||||
.filter-name{
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
margin-left: 10px;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.drop-down{
|
||||
@@ -400,7 +377,7 @@ label{
|
||||
padding: 0px 0px;
|
||||
}
|
||||
|
||||
.right-icons{
|
||||
.right-icons, .calendar-profile{
|
||||
padding: 0px 9px
|
||||
}
|
||||
|
||||
@@ -411,5 +388,69 @@ label{
|
||||
|
||||
|
||||
.calendar-tool-tip{
|
||||
padding: 17px 10px 0px 10px;
|
||||
}
|
||||
padding: 20px 10px 30px 10px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.custom-calendar-header{
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
thead{
|
||||
th{
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
color: rgba(52, 72, 94, 0.54);
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.currente-date-timelien{
|
||||
padding: 10px 20px;
|
||||
.timeline-date{
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.filter{
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
ion-icon{
|
||||
font-size: 35px;
|
||||
color: #0d89d1;
|
||||
}
|
||||
.filter-name{
|
||||
color: #0d89d1;
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
margin-right: 25px;
|
||||
}
|
||||
|
||||
ul{
|
||||
background-color: white !important;
|
||||
position: absolute;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
list-style: none;
|
||||
margin-top: 140px;
|
||||
padding: 0px;
|
||||
box-shadow: 0px 0px 10px gray !important;
|
||||
border-radius: 5px;
|
||||
width: 96px;
|
||||
z-index: 1000000;
|
||||
li{
|
||||
padding: 5px 10px;
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
}
|
||||
li.active{
|
||||
background-color: rgba(66, 185, 254, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Component, OnInit, ViewChild, Inject, LOCALE_ID } from '@angular/core';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
import { AlertController, ModalController } from '@ionic/angular';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { CalModalPage } from '../cal-modal/cal-modal.page';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { Event } from '../../models/event.model';
|
||||
@@ -9,6 +8,7 @@ import { Router, NavigationEnd } from '@angular/router';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { NewEventPage } from './new-event/new-event.page';
|
||||
import { ViewEventPage } from './view-event/view-event.page';
|
||||
import { momentG } from 'src/plugin/momentG'
|
||||
|
||||
// showTimeline
|
||||
import { setHours, setMinutes } from 'date-fns';
|
||||
@@ -119,10 +119,9 @@ export class AgendaPage implements OnInit {
|
||||
private alertCrontroller: AlertService
|
||||
) {
|
||||
|
||||
// timeline inicial date
|
||||
this.timelineDate = new Date().toLocaleString();
|
||||
|
||||
//this.timelineDate = formatDate(new Date,'dd MMMM yyyy', 'pt');
|
||||
|
||||
|
||||
this.timelineDate = momentG(new Date(),'dd MMMM yyyy');
|
||||
|
||||
|
||||
function setCookie(cname, cvalue, exdays) {
|
||||
@@ -190,7 +189,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
onCurrentChanged = (ev: Date) => {
|
||||
// timeline change date
|
||||
this.timelineDate = new Date(ev).toLocaleString();
|
||||
this.timelineDate = momentG(new Date(ev),'dd MMMM yyyy');
|
||||
this.viewDate = new Date(ev);
|
||||
// calendar change date
|
||||
this.eventSelectedDate = new Date(ev);
|
||||
@@ -201,15 +200,15 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
// changedate
|
||||
dropDownChangeDate(id: string){
|
||||
/* const currentCandarDayYear = formatDate(this.eventSelectedDate,'dd -- yyyy', 'pt');
|
||||
const currentCandarDayYear = momentG(this.eventSelectedDate,'dd -- yyyy', 'pt');
|
||||
const newDate = new Date(currentCandarDayYear.replace('--',id));
|
||||
this.onCurrentChanged(newDate); */
|
||||
this.onCurrentChanged(newDate);
|
||||
}
|
||||
|
||||
/* onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => {
|
||||
onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => {
|
||||
console.log('Selected time: ' + ev.selectedTime + ', hasEvents: ' + (ev.events !== undefined && ev.events.length !== 0));
|
||||
this.eventSelectedDate2 = ev.selectedTime;
|
||||
}; */
|
||||
};
|
||||
|
||||
onRangeChanged (ev: { startTime: Date, endTime: Date }) {
|
||||
this.rangeStartDate = ev.startTime;
|
||||
@@ -289,8 +288,12 @@ export class AgendaPage implements OnInit {
|
||||
const shadowRoot = timelineContainer.shadowRoot;
|
||||
|
||||
const scrollContainer = shadowRoot.querySelector('main');
|
||||
|
||||
scrollContainer.scrollTop = timelineMarker['offsetTop'] - ((scrollContainer.offsetHeight/2) - 60);
|
||||
try {
|
||||
scrollContainer.scrollTop = timelineMarker['offsetTop'] - ((scrollContainer.offsetHeight/2) - 60);
|
||||
} catch (error) {
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
}, timeout);
|
||||
}
|
||||
@@ -298,7 +301,7 @@ export class AgendaPage implements OnInit {
|
||||
// for timeline
|
||||
timelineIsCurrentDate(): Boolean {
|
||||
return true;
|
||||
//return formatDate(new Date(),'dd MMMM yyyy', 'pt') == formatDate(this.eventSelectedDate,'dd MMMM yyyy', 'pt');
|
||||
//return momentG(new Date(),'dd MMMM yyyy', 'pt') == momentG(this.eventSelectedDate,'dd MMMM yyyy', 'pt');
|
||||
}
|
||||
|
||||
// for timeline
|
||||
@@ -365,11 +368,11 @@ export class AgendaPage implements OnInit {
|
||||
this.eventsList.forEach((element, eventIndex) => {
|
||||
|
||||
// timeline start
|
||||
const startHours = new Date(element.StartDate).getHours().toLocaleString();
|
||||
const EndHours = new Date(element.EndDate).getHours().toLocaleString();
|
||||
const startHours = momentG(new Date(element.StartDate), 'HH', 'pt');
|
||||
const EndHours = momentG(new Date(element.EndDate), 'HH', 'pt');
|
||||
|
||||
const startHoursOtherFormate = new Date(element.StartDate).getHours().toLocaleString()+':'+new Date(element.StartDate).getMinutes().toLocaleString();
|
||||
const EndHoursOtherFormate = formatDate(new Date(element.EndDate), 'HH:mm', 'pt');
|
||||
const startHoursOtherFormate = momentG(new Date(element.StartDate), 'HH:mm', 'pt');
|
||||
const EndHoursOtherFormate = momentG(new Date(element.EndDate), 'HH:mm', 'pt');
|
||||
|
||||
if (element.CalendarName == calendarName) {
|
||||
this.events.push({
|
||||
@@ -431,7 +434,7 @@ export class AgendaPage implements OnInit {
|
||||
});
|
||||
});
|
||||
|
||||
// this.timelineFilter(this.timelineFilterState);
|
||||
this.timelineFilter(this.timelineFilterState);
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -461,7 +464,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
});
|
||||
|
||||
// this.timelineFilter(this.timelineFilterState);
|
||||
this.timelineFilter(this.timelineFilterState);
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select placeholder="Selecione tipo"
|
||||
[(ngModel)]="postEvent.EventType"
|
||||
selectedText="{{postEvent.EventType}}"
|
||||
[(ngModel)]="postEvent.Categories[0]"
|
||||
selectedText="{{postEvent.Categories[0]}}"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select placeholder="Selecione tipo"
|
||||
[(ngModel)]="postEvent.EventType"
|
||||
[(ngModel)]="postEvent.Categories[0]"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
||||
|
||||
@@ -62,7 +62,7 @@ export class NewEventPage implements OnInit {
|
||||
AppointmentState: 0,
|
||||
TimeZone: '',
|
||||
Organizer: '',
|
||||
Categories: null,
|
||||
Categories: ['Reunião'],
|
||||
HasAttachments: false,
|
||||
};
|
||||
}
|
||||
@@ -83,7 +83,7 @@ export class NewEventPage implements OnInit {
|
||||
AppointmentState: 0,
|
||||
TimeZone: '',
|
||||
Organizer: '',
|
||||
Categories: null,
|
||||
Categories: ['Reunião'],
|
||||
HasAttachments: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import { ExpedienteDetailPage } from '../gabinete-digital/expediente/expediente-
|
||||
export class EventsPage implements OnInit {
|
||||
/* Get current system date */
|
||||
today = new Date();
|
||||
todayEnd = new Date();
|
||||
|
||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
@@ -76,6 +77,8 @@ export class EventsPage implements OnInit {
|
||||
|
||||
// list
|
||||
this.LoadList();
|
||||
|
||||
this.todayEnd = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), 23, 59, 59);
|
||||
|
||||
}
|
||||
|
||||
@@ -141,7 +144,7 @@ export class EventsPage implements OnInit {
|
||||
{
|
||||
case "Combinada":
|
||||
if(this.profile == "mdgpr"){
|
||||
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.eventService.getAllMdEvents(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.eventsList = res;
|
||||
|
||||
if(res.length > 0){
|
||||
@@ -152,7 +155,7 @@ export class EventsPage implements OnInit {
|
||||
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.eventService.getAllPrEvents(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.eventsList = res;
|
||||
console.log(this.eventsList);
|
||||
console.log(res)
|
||||
@@ -166,12 +169,12 @@ export class EventsPage implements OnInit {
|
||||
break;
|
||||
case "Pessoal":
|
||||
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(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal");
|
||||
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.eventService.getAllPrEvents(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal");
|
||||
this.showLoader = false;
|
||||
});
|
||||
@@ -180,12 +183,12 @@ export class EventsPage implements OnInit {
|
||||
break;
|
||||
case "Oficial":
|
||||
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(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");;
|
||||
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.eventService.getAllPrEvents(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");;
|
||||
this.showLoader = false;
|
||||
});
|
||||
@@ -276,7 +279,7 @@ export class EventsPage implements OnInit {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceFolio,
|
||||
"Senders": element.originator.email,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"CreateDate": new Date(element.taskStartDate).toLocaleString(),
|
||||
"DocumentURL": element.formURL,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Token } from '../../models/token.model';
|
||||
|
||||
import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
|
||||
|
||||
const { PushNotifications } = Plugins;
|
||||
|
||||
/* import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
|
||||
*/
|
||||
/* const { PushNotifications } = Plugins;
|
||||
*/
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -80,7 +80,7 @@ export class LoginPage implements OnInit {
|
||||
|
||||
storeUserIdANdToken() {
|
||||
|
||||
(PushNotifications as any).requestPermission().then(result => {
|
||||
/* (PushNotifications as any).requestPermission().then(result => {
|
||||
PushNotifications.register();
|
||||
});
|
||||
|
||||
@@ -106,12 +106,12 @@ export class LoginPage implements OnInit {
|
||||
console.log('TOKEN USER MIDLE',data);
|
||||
})*/
|
||||
|
||||
});
|
||||
/* });
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
);
|
||||
); */
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
|
||||
<ion-toolbar>
|
||||
<ion-title>Remetentes</ion-title>
|
||||
<ion-title>Entidade Orgânica</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ export class OrganicEntityPage implements OnInit {
|
||||
this.OrganicEntityService.getOrganicEntity().subscribe(res=>{
|
||||
console.log(res)
|
||||
this.organicEntities = res;
|
||||
this.showOrganicEntities = res
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -95,13 +95,7 @@
|
||||
<!-- most searched word-->
|
||||
<div class="most-searched-words" *ngIf="!showDocuments">
|
||||
<p class="title ion-text-center">Palavras mais pesquisadas</p>
|
||||
<div>
|
||||
<angular-tag-cloud class="world-cloud"
|
||||
[data]="data"
|
||||
[width]=width
|
||||
[height]=height
|
||||
[overflow]=true>
|
||||
</angular-tag-cloud>
|
||||
<div class="most-searched-word-container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -197,6 +197,11 @@ ion-slide{
|
||||
text-align: center;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.most-searched-word-container{
|
||||
width: 441px;
|
||||
height: 400px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import { formatDate } from '@angular/common';
|
||||
import { CloudData, CloudOptions } from 'angular-tag-cloud-module';
|
||||
import { SenderPage } from 'src/app/pages/search/sender/sender.page';
|
||||
import { OrganicEntityPage } from 'src/app/pages/search/organic-entity/organic-entity.page';
|
||||
import WordCloud from 'src/plugin/wordcloud2.js'
|
||||
import { TopSearch } from 'src/app/models/top-search';
|
||||
|
||||
import { NgModel } from '@angular/forms';
|
||||
@Component({
|
||||
@@ -54,12 +56,40 @@ export class SearchPage implements OnInit {
|
||||
speed: 400,
|
||||
}
|
||||
|
||||
|
||||
list = []
|
||||
|
||||
constructor(private modalController: ModalController,
|
||||
private search: SearchService) {
|
||||
this.ordinance = "recent";
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.search.mostSeachWord("10").subscribe(res=>{
|
||||
|
||||
let list = []
|
||||
|
||||
res.forEach(element => {
|
||||
list.push(Object.values(element))
|
||||
});
|
||||
|
||||
this.list = list
|
||||
|
||||
const elem = document.documentElement.querySelector('.most-searched-word-container');
|
||||
|
||||
|
||||
WordCloud(
|
||||
elem,
|
||||
{
|
||||
list: this.list,
|
||||
Family: 'Times, serif',
|
||||
gridSize: 15
|
||||
},
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
|
||||
@@ -28,6 +28,7 @@ export class SenderPage implements OnInit {
|
||||
getSender(){
|
||||
this.ContactsService.getContacts("").subscribe(res=>{
|
||||
this.contacts = res;
|
||||
this.showContacts = res
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Event } from '../models/event.model';
|
||||
import { Observable } from 'rxjs';
|
||||
import { from, Observable } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { AuthService } from '../services/auth.service';
|
||||
import { User } from '../models/user.model';
|
||||
import { EventSearch } from "src/app/models/event-search";
|
||||
import { TopSearch } from 'src/app/models/top-search';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -52,4 +53,22 @@ export class SearchService {
|
||||
return this.http.get<EventSearch>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
mostSeachWord(size:string):Observable<any>{
|
||||
// Endpoint
|
||||
const geturl = environment.apiURL + 'search/top';
|
||||
// store params
|
||||
let params = new HttpParams();
|
||||
// set https params
|
||||
|
||||
params = params.set("size", size);
|
||||
|
||||
|
||||
const options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="div-profile">
|
||||
<ion-icon src='assets/images/icons-profile.svg'></ion-icon>
|
||||
<ion-icon *ngIf="profile == 'mdgpr' " src='assets/images/icons-profile.svg'></ion-icon>
|
||||
<ion-icon *ngIf="profile == 'pr' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@@ -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() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user