mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add file chuck upload, file validation, redirect to home page incase route doesnt exist and refresh token interceptor
This commit is contained in:
@@ -21,22 +21,22 @@ export class AttendeesPageModal implements OnInit {
|
||||
eventPersons: EventPerson[];
|
||||
adding: "intervenient" | "CC";
|
||||
currentPath = window.location.pathname;
|
||||
|
||||
|
||||
taskParticipants:EventPerson[] = [];
|
||||
taskParticipantsCc:EventPerson[] = [];
|
||||
loggeduser: LoginUserRespose;
|
||||
@Input() loggedAttendSon: boolean;
|
||||
taskType: any;
|
||||
|
||||
|
||||
|
||||
constructor(
|
||||
private modalCtrl: ModalController,
|
||||
private modalCtrl: ModalController,
|
||||
private contactsService: ContactsService,
|
||||
private navParams: NavParams,
|
||||
private modalController: ModalController,
|
||||
public ThemeService: ThemeService,
|
||||
private router: Router,) {
|
||||
|
||||
|
||||
this.adding = this.navParams.get('adding');
|
||||
this.taskParticipants = this.navParams.get('taskParticipants');
|
||||
this.taskParticipantsCc = this.navParams.get('taskParticipantsCc');
|
||||
@@ -48,7 +48,7 @@ export class AttendeesPageModal implements OnInit {
|
||||
ngOnInit() {
|
||||
console.log('Pesquisa de contactos current path2',this.router.url)
|
||||
this.fetchContacts("");
|
||||
|
||||
|
||||
if(this.taskParticipants == null || this.taskParticipants == undefined){
|
||||
this.taskParticipants = [];
|
||||
}
|
||||
@@ -56,9 +56,9 @@ export class AttendeesPageModal implements OnInit {
|
||||
if(this.taskParticipantsCc == null || this.taskParticipantsCc == undefined){
|
||||
this.taskParticipantsCc = [];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
ngOnChanges(event) {}
|
||||
|
||||
save(){
|
||||
@@ -80,16 +80,16 @@ export class AttendeesPageModal implements OnInit {
|
||||
filterSearchList(itm: EventPerson): boolean {
|
||||
|
||||
const result = this.taskParticipants.concat( this.taskParticipantsCc).find((contact, index)=>{
|
||||
|
||||
|
||||
if(contact.Name.toLocaleLowerCase() == itm.Name.toLocaleLowerCase() && contact.EmailAddress.toLocaleLowerCase() == itm.EmailAddress.toLocaleLowerCase()){
|
||||
index = index;
|
||||
return contact;
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
return undefined == result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
remove(itm: EventPerson){
|
||||
@@ -102,7 +102,7 @@ export class AttendeesPageModal implements OnInit {
|
||||
return contact;
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
});
|
||||
|
||||
} else if (this.adding == "CC") {
|
||||
@@ -113,7 +113,7 @@ export class AttendeesPageModal implements OnInit {
|
||||
return contact;
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ export class AttendeesPageModal implements OnInit {
|
||||
if(this.adding == "intervenient"){
|
||||
itm.IsRequired = true;
|
||||
this.taskParticipants.push(itm);
|
||||
|
||||
|
||||
} else if (this.adding == "CC") {
|
||||
itm.IsRequired = false;
|
||||
this.taskParticipantsCc.push(itm);
|
||||
@@ -141,7 +141,7 @@ export class AttendeesPageModal implements OnInit {
|
||||
const index: number = result.findIndex((cont) => {
|
||||
return cont.EmailAddress.toLocaleLowerCase() == attendee.EmailAddress.toLocaleLowerCase()
|
||||
});
|
||||
|
||||
|
||||
result.splice(index, 1);
|
||||
});
|
||||
}
|
||||
@@ -151,12 +151,12 @@ export class AttendeesPageModal implements OnInit {
|
||||
this.showLoader = false;
|
||||
} else {
|
||||
this.contacts = result;
|
||||
console.log('Attendes Email',this.loggeduser.Email)
|
||||
// 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)
|
||||
// console.log('Attendes Email', filterLoggedUserEmail)
|
||||
let filterEmptyEmail = filterLoggedUserEmail.filter(item => item.EmailAddress.toLocaleLowerCase() != "")
|
||||
this.contacts = filterEmptyEmail;
|
||||
console.log('Attendes Email', this.contacts)
|
||||
// console.log('Attendes Email', this.contacts)
|
||||
this.showLoader = false;
|
||||
|
||||
}
|
||||
@@ -164,4 +164,4 @@ export class AttendeesPageModal implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user