mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Add new component in agenda
This commit is contained in:
@@ -336,6 +336,8 @@
|
||||
[selectedDate]="eventSelectedDate"
|
||||
(onAddEvent)="openAddEventDismiss($event)"
|
||||
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||
[eventAttendees]="contacts"
|
||||
(clearContact)="clearContact()"
|
||||
|
||||
></app-new-event>
|
||||
<!-- Edit -->
|
||||
@@ -343,7 +345,7 @@
|
||||
[profile]="profile"
|
||||
[selectedSegment]="segment"
|
||||
[postEvent]="postEvent"
|
||||
(cloneAllmobileComponent)="cloneAllmobileComponent($event)"
|
||||
(cloneAllmobileComponent)="cloneAllmobileComponent()"
|
||||
></app-edit-event>
|
||||
|
||||
<!-- View -->
|
||||
@@ -365,7 +367,7 @@
|
||||
<app-approve-event class="d-flex flex-column" *ngIf="mobileComponent.showEventToApprove" [class.transparent]="mobileComponent.transparentEventToApprove"
|
||||
[serialNumber] = "eventToaprove.serialNumber"
|
||||
(cloneAllmobileComponent)="viewEventDetailDismiss($event)"
|
||||
(closeEventToApprove)="closeEventToApprove($event)"
|
||||
(closeEventToApprove)="closeEventToApprove()"
|
||||
(AproveEventEditEvent)="AproveEventEditEvent($event)"
|
||||
>
|
||||
|
||||
@@ -375,6 +377,8 @@
|
||||
class="d-flex flex-column height-100"
|
||||
*ngIf="mobileComponent.showAttendees"
|
||||
(openAttendeeModal)="openAttendeeModal()"
|
||||
[eventAttendees]="contacts"
|
||||
(openAddEvent)="openAddEvent($event)"
|
||||
>
|
||||
</app-attendees>
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import { Router, NavigationEnd } from '@angular/router';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { momentG } from 'src/plugin/momentG';
|
||||
import { DomSanitizer } from "@angular/platform-browser";
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
|
||||
|
||||
// showTimeline
|
||||
import { setHours, setMinutes } from 'date-fns';
|
||||
@@ -48,6 +50,8 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
timelineDate: string;
|
||||
|
||||
contacts: EventPerson[]
|
||||
|
||||
setView(view: CalendarView) {
|
||||
this.view = view;
|
||||
}
|
||||
@@ -382,7 +386,11 @@ export class AgendaPage implements OnInit {
|
||||
document.querySelectorAll('.fs-timeline .timeline-box').forEach(ele => {
|
||||
|
||||
if(ele.className.indexOf(`timeline-box-event-${eventIndex}`)>=0){
|
||||
ele.setAttribute('style',`height:${minutes}px`);
|
||||
|
||||
if(ele['offsetHeight'] <= minutes){
|
||||
ele.setAttribute('style',`height:${minutes}px`);
|
||||
}
|
||||
|
||||
}
|
||||
// this event has an contraction time
|
||||
// if(`timeline-box-event-${eventIndex}` == `timeline-box-event-3`){
|
||||
@@ -900,13 +908,26 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
// open component
|
||||
async openAttendeesComponent(data){
|
||||
console.log('open attendees component');
|
||||
|
||||
|
||||
if(Array.isArray(data)){
|
||||
if(data.length != 0){
|
||||
|
||||
console.log('save!!!',data.length);
|
||||
console.log(data);
|
||||
this.contacts = data ;
|
||||
}
|
||||
}
|
||||
|
||||
this.cloneAllmobileComponent();
|
||||
this.mobileComponent.showAttendees = true;
|
||||
|
||||
}
|
||||
|
||||
async clearContact(){
|
||||
this.contacts = [];
|
||||
}
|
||||
|
||||
async openAttendeeModal(){
|
||||
this.cloneAllmobileComponent();
|
||||
this.mobileComponent.showAttendeeModal = true;
|
||||
|
||||
Reference in New Issue
Block a user