mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge remote-tracking branch 'origin/feature/calendar' into developer
This commit is contained in:
@@ -20,14 +20,14 @@
|
||||
|
||||
<!-- Move forward one screen of the slides -->
|
||||
<h2 class="capitaliseText">{{ viewTitle }}</h2>
|
||||
<div class="drop-down">
|
||||
<!-- <div class="drop-down">
|
||||
<ion-icon slot="icon-only" class="arrow-down" src="assets/images/icons-arrow-arrow-down.svg"></ion-icon>
|
||||
<div class="drop-down-container">
|
||||
<ul>
|
||||
<li *ngFor="let month of monthList" (click)="dropDownChangeDate(month.id)" >{{ month.name }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Move forward one screen of the slides -->
|
||||
<div (click)="next()" class="arrow">
|
||||
<ion-icon slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
@@ -35,7 +35,10 @@
|
||||
|
||||
</ion-row>
|
||||
<ion-row class="ion-align-items-center">
|
||||
<ion-icon class="right-icons" name="add-circle-outline"></ion-icon>
|
||||
<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 (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>
|
||||
@@ -174,6 +177,17 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Calendar currente date -->
|
||||
<ion-row class="ion-justify-content-between ion-align-items-center currente-date-timelien">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -187,18 +201,6 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<!-- Calendar currente date -->
|
||||
|
||||
<ion-row class="ion-justify-content-between ion-align-items-center currente-date-timelien">
|
||||
<ion-row class="timeline-date">
|
||||
Hoje, {{ 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>
|
||||
|
||||
<!-- Timeline -->
|
||||
<div *ngIf="showTimeline">
|
||||
<mwl-demo-utils-calendar-header class="timeline"
|
||||
|
||||
@@ -389,19 +389,27 @@ label{
|
||||
|
||||
|
||||
.capitaliseText{
|
||||
min-width: 159px;
|
||||
min-width: 155px;
|
||||
text-align: center;
|
||||
font-weight: normal;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.arrow{
|
||||
padding: 0px 6px;
|
||||
padding: 0px 0px;
|
||||
}
|
||||
|
||||
.right-icons{
|
||||
padding: 0px 4px;
|
||||
padding: 0px 9px
|
||||
}
|
||||
|
||||
|
||||
.capitaliseText{
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
|
||||
.calendar-tool-tip{
|
||||
padding: 17px 10px 0px 10px;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ export class AgendaPage implements OnInit {
|
||||
};
|
||||
|
||||
selectedDate: Date;
|
||||
eventSelectedDate: Date;
|
||||
eventSelectedDate: Date = new Date();
|
||||
eventSelectedDate2: Date;
|
||||
rangeStartDate: Date;
|
||||
rangeEndDate: Date;
|
||||
@@ -173,6 +173,9 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
timelineIsCurrentDate(): Boolean {
|
||||
return formatDate(new Date(),'dd MMMM yyyy', 'pt') == formatDate(this.eventSelectedDate,'dd MMMM yyyy', 'pt');
|
||||
}
|
||||
|
||||
//Go to the next view of the calendar month/week/day
|
||||
next(){
|
||||
@@ -209,7 +212,6 @@ export class AgendaPage implements OnInit {
|
||||
} else {
|
||||
return 'calendar-event-type-'+(Object.keys(eventType))[0];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return "";
|
||||
@@ -230,13 +232,11 @@ export class AgendaPage implements OnInit {
|
||||
/* this.router.navigate(["/home/agenda", ev.event.EventId, 'agenda']); */
|
||||
}
|
||||
|
||||
|
||||
onCurrentChanged = (ev: Date) => {
|
||||
// timeline change date
|
||||
this.timelineDate = formatDate(ev,'dd MMMM yyyy', 'pt');
|
||||
this.viewDate = new Date(formatDate(ev,'yyyy-MM-dd', 'pt'));
|
||||
// calendar change date
|
||||
console.log('!!this!!')
|
||||
this.eventSelectedDate = new Date(ev);
|
||||
};
|
||||
|
||||
@@ -256,7 +256,6 @@ export class AgendaPage implements OnInit {
|
||||
onRangeChanged (ev: { startTime: Date, endTime: Date }) {
|
||||
this.rangeStartDate = ev.startTime;
|
||||
this.rangeEndDate = ev.endTime;
|
||||
console.log('!!!')
|
||||
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
};
|
||||
@@ -294,14 +293,14 @@ export class AgendaPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
timeLineTemplate(startTime: string, eventlocation: string, eventDiscription: any, calendarName: string): string{
|
||||
timeLineTemplate(startTime: string, eventlocation: string, eventDiscription: any, calendarName: string, subject: string): string{
|
||||
return `
|
||||
<div class="timeline-box timeline-box-${calendarName}">
|
||||
<div>
|
||||
<span class="timeline-start-time">${startTime}</span><span class="timeline-location">${eventlocation}</span>
|
||||
</div>
|
||||
<div class="timeline-event-discription">
|
||||
${eventDiscription.Text}
|
||||
${subject}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -339,11 +338,12 @@ export class AgendaPage implements OnInit {
|
||||
calendarName: element.CalendarName
|
||||
});
|
||||
|
||||
// timeline start
|
||||
const startHours = formatDate(new Date(element.StartDate), 'HH', 'pt');
|
||||
const EndHours = formatDate(new Date(element.EndDate), 'HH', 'pt');
|
||||
|
||||
this.events.push({
|
||||
title: this.timeLineTemplate(startHours, element.Location, element.Body, element.CalendarName),
|
||||
title: this.timeLineTemplate(startHours, element.Location, element.Body, element.CalendarName, element.Subject),
|
||||
start: setHours(setMinutes(new Date(element.StartDate), 0), parseInt(startHours)),
|
||||
end: setHours(setMinutes(new Date(element.EndDate), 0), parseInt(EndHours)),
|
||||
color: {
|
||||
@@ -352,6 +352,7 @@ export class AgendaPage implements OnInit {
|
||||
},
|
||||
id: element.EventId
|
||||
});
|
||||
// timeline end
|
||||
|
||||
});
|
||||
|
||||
@@ -374,12 +375,34 @@ export class AgendaPage implements OnInit {
|
||||
startTime: new Date(element.StartDate),
|
||||
endTime: new Date(element.EndDate),
|
||||
allDay: false,
|
||||
event: element
|
||||
event: element,
|
||||
calendarName: element.CalendarName
|
||||
});
|
||||
|
||||
// timeline start
|
||||
const startHours = formatDate(new Date(element.StartDate), 'HH', 'pt');
|
||||
const EndHours = formatDate(new Date(element.EndDate), 'HH', 'pt');
|
||||
|
||||
this.events.push({
|
||||
|
||||
title: this.timeLineTemplate(startHours, element.Location, element.Body, element.CalendarName, element.Subject),
|
||||
start: setHours(setMinutes(new Date(element.StartDate), 0), parseInt(startHours)),
|
||||
end: setHours(setMinutes(new Date(element.EndDate), 0), parseInt(EndHours)),
|
||||
color: {
|
||||
primary: 'white',
|
||||
secondary: 'white'
|
||||
},
|
||||
id: element.EventId
|
||||
});
|
||||
// timeline end
|
||||
|
||||
});
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -31,8 +31,6 @@ export class PublicationsPage implements OnInit {
|
||||
months: string[];
|
||||
days:string[];
|
||||
|
||||
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
|
||||
Reference in New Issue
Block a user