mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
25 lines
539 B
TypeScript
25 lines
539 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
import { EventPerson } from 'src/app/models/eventperson.model'
|
|
|
|
@Pipe({
|
|
name: 'participants'
|
|
})
|
|
export class ParticipantsPipe implements PipeTransform {
|
|
|
|
transform(EventPerson: EventPerson[] = []): any {
|
|
let taskParticipants = [];
|
|
let taskParticipantsCc = [];
|
|
|
|
EventPerson.forEach(e =>{
|
|
if(e.IsRequired) {
|
|
taskParticipants.push(e);
|
|
} else {
|
|
taskParticipantsCc.push(e);
|
|
}
|
|
})
|
|
|
|
return {taskParticipants, taskParticipantsCc}
|
|
}
|
|
|
|
}
|