mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
date format solve
This commit is contained in:
@@ -6,6 +6,8 @@ import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ViewChild } from '@angular/core';
|
||||
import { Searchbar } from 'ionic-angular';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-attendee-modal',
|
||||
@@ -16,6 +18,7 @@ export class AttendeePage implements OnInit {
|
||||
|
||||
// Defined by the API
|
||||
contacts: EventPerson[];
|
||||
filterEmptyEmail: EventPerson[];
|
||||
showLoader: boolean = false;
|
||||
eventPersons: EventPerson[];
|
||||
inputFilter = ''
|
||||
@@ -30,6 +33,7 @@ export class AttendeePage implements OnInit {
|
||||
|
||||
@Input() taskParticipants:EventPerson[] = [];
|
||||
@Input() taskParticipantsCc:EventPerson[] = [];
|
||||
@Input() loggedAttendSon: boolean;
|
||||
|
||||
@Input() footer: boolean;
|
||||
|
||||
@@ -39,26 +43,34 @@ export class AttendeePage implements OnInit {
|
||||
|
||||
LtaskParticipants: EventPerson[] = [];
|
||||
LtaskParticipantsCc: EventPerson[] = [];
|
||||
loggeduser: LoginUserRespose;
|
||||
|
||||
constructor(
|
||||
private modalCtrl: ModalController,
|
||||
private contactsService: ContactsService,
|
||||
public ThemeService: ThemeService ) {
|
||||
|
||||
|
||||
|
||||
this.LtaskParticipants = removeDuplicate(this.taskParticipants);
|
||||
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||
this.loggeduser = SessionStore.user;
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
this.LtaskParticipants = removeDuplicate(this.taskParticipants);
|
||||
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||
console.log('PARTE PARTE',this.loggedAttendSon)
|
||||
}
|
||||
|
||||
currentPath = window.location.pathname;
|
||||
@Input() adding: "intervenient" | "CC";
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
setTimeout(() => {
|
||||
console.log('PARTE PARTE',this.loggedAttendSon)
|
||||
});
|
||||
|
||||
this.fetchContacts("");
|
||||
|
||||
if(this.LtaskParticipants == null || this.LtaskParticipants == undefined) {
|
||||
@@ -213,8 +225,20 @@ export class AttendeePage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
this.contacts = this.sort(result as any);
|
||||
if(this.loggedAttendSon) {
|
||||
this.contacts = this.sort(result as any);
|
||||
this.showLoader = false;
|
||||
} else {
|
||||
this.contacts = this.sort(result as any);
|
||||
console.log('Attendes Email',this.loggeduser.Email)
|
||||
let filterLoggedUserEmail = this.contacts.filter(item => item.EmailAddress.toLocaleLowerCase() != this.loggeduser.Email.toLocaleLowerCase())
|
||||
console.log('Attendes Email', filterLoggedUserEmail)
|
||||
let filterEmptyEmail = filterLoggedUserEmail.filter(item => item.EmailAddress.toLocaleLowerCase() != "")
|
||||
this.contacts = filterEmptyEmail;
|
||||
console.log('Attendes Email', this.contacts)
|
||||
this.showLoader = false;
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user