Merge with developer brunch

This commit is contained in:
Eudes Inácio
2021-02-10 10:37:13 +01:00
1735 changed files with 6305 additions and 250030 deletions
+11 -5
View File
@@ -54,8 +54,8 @@
</thead>
</table>
<calendar class="calendar-component"
<calendar
class="calendar-component"
[eventSource]="eventSource"
[calendarMode]="calendar.mode"
[currentDate]="calendar.currentDate"
@@ -118,7 +118,8 @@
</thead>
</table>
<calendar class="calendar-component"
<calendar
class="calendar-component"
[eventSource]="eventSource"
[calendarMode]="calendar.mode"
[currentDate]="calendar.currentDate"
@@ -183,7 +184,8 @@
</thead>
</table>
<calendar class="calendar-component"
<calendar
class="calendar-component"
[eventSource]="eventSource"
[calendarMode]="calendar.mode"
[currentDate]="calendar.currentDate"
@@ -217,7 +219,11 @@
<!-- Calendar currente date -->
<ion-row class="ion-justify-content-between ion-align-items-center currente-date-timelien">
<ion-row class="timeline-date">
<ion-row class="timeline-date align-center">
<!-- <ion-icon *ngIf="showCalendar" (click)="showCalendar=false" class="collaps" src="assets/images/icons-add-new-event.svg" >1</ion-icon>
<ion-icon *ngIf="!showCalendar" (click)="showCalendar=true" class="collaps" src="assets/images/icons-add-new-event.svg" >2</ion-icon> -->
<span *ngIf="timelineIsCurrentDate()">Hoje, &nbsp;</span> {{ timelineDate }}
</ion-row>
<ion-row class="filter ion-align-items-center">
+8 -1
View File
@@ -36,7 +36,6 @@ ion-slide{
.item{
/* background: red !important; */
text-transform: capitalize;
}
.input-wrapper{
border-left: red !important;
@@ -416,6 +415,10 @@ td.monthview-primary-with-event {
font-size: 15px;
font-weight: bold;
}
.collaps{
font-size: 28px;
padding-right: 8px;
}
.filter{
font-size: 15px;
font-weight: normal;
@@ -454,3 +457,7 @@ td.monthview-primary-with-event {
}
}
.showcalendar{
display: none;
}
+18 -18
View File
@@ -9,6 +9,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';
@@ -50,6 +51,10 @@ export class AgendaPage implements OnInit {
this.view = view;
}
// calendar
showCalendar: boolean;
// timeline
monthList = [
{ name: 'Janeiro', id: 'Jan' },
{ name: 'Fevereiro', id: 'Feb' },
@@ -65,13 +70,12 @@ export class AgendaPage implements OnInit {
{ name: 'Dezembro', id: 'Dec' }
]
showTimeline: boolean= false;
// for timeline
events: CalendarEvent[] = [];
// timeline filter
timelineFilterState: string = 'Todos';
showTimelineFilterState: boolean= false;
showTimelineFilterState: boolean;
showTimeline: boolean;
/* List of events of our calendar */
eventSource = [];
@@ -118,11 +122,8 @@ 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.showCalendar = true;
this.timelineDate = momentG(new Date(),'dd MMMM yyyy');
function setCookie(cname, cvalue, exdays) {
var d = new Date();
@@ -135,6 +136,8 @@ export class AgendaPage implements OnInit {
setCookie('searchModalAPPType','0', 99999999);
this.showLoader = false;
this.showTimelineFilterState = false;
this.showTimeline = false;
}
@@ -155,8 +158,6 @@ export class AgendaPage implements OnInit {
}
}
});
}
//Go to the next view of the calendar month/week/day
@@ -250,7 +251,6 @@ export class AgendaPage implements OnInit {
});
}
// for calendar
currentDayEventDisplayBorder(day: any, id: any){
@@ -412,9 +412,9 @@ export class AgendaPage implements OnInit {
//Inicializa o array eventSource
this.eventSource=[];
if(this.profile == "mdgpr"){
this.eventService.getAllMdEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).subscribe(
response => {
this.eventsList = response;
// loop
@@ -445,7 +445,7 @@ export class AgendaPage implements OnInit {
}
else{
this.eventService.getAllPrEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(
response => {
this.eventsList = response;
this.eventsList.forEach((element, eventIndex) => {
@@ -478,7 +478,7 @@ export class AgendaPage implements OnInit {
//Inicializa o array eventSource
this.eventSource=[];
if(this.profile == "mdgpr"){
this.eventService.getAllMdEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(response => {
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => {
this.eventsListPessoal = response.filter(data => data.CalendarName == "Pessoal");
this.eventsListPessoal.forEach(element => {
this.eventSource.push({
@@ -495,7 +495,7 @@ export class AgendaPage implements OnInit {
});
}
else{
this.eventService.getAllPrEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(response => {
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => {
this.eventsListPessoal = response.filter(data => data.CalendarName == "Pessoal");
this.eventsListPessoal.forEach(element => {
this.eventSource.push({
@@ -517,7 +517,7 @@ export class AgendaPage implements OnInit {
//Inicializa o array eventSource
this.eventSource=[];
if(this.profile == "mdgpr"){
this.eventService.getAllMdEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(res => {
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => {
this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial");
this.eventsListOficial.forEach(element => {
this.eventSource.push({
@@ -533,7 +533,7 @@ export class AgendaPage implements OnInit {
this.showLoader = false;
});
}else{
this.eventService.getAllPrEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(res => {
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => {
this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial");
this.eventsListOficial.forEach(element => {
this.eventSource.push({
@@ -31,7 +31,7 @@
<div class="content-details">
<ion-label>
<p>{{customDate}}</p>
<p>das {{loadedEvent.StartDate | date: 'hh:mm'}} às {{loadedEvent.EndDate | date: 'hh:mm'}}</p>
<p>das {{loadedEvent.StartDate | date: 'HH:mm'}} às {{loadedEvent.EndDate | date: 'HH:mm'}}</p>
<p *ngIf="!loadedEvent.IsRecurring">(Não se repete)</p>
<p *ngIf="loadedEvent.IsRecurring">Repete</p>
</ion-label>