import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
    name: 'checklessmoreallseat'
})
export class ChecklessmoreallseatPipe implements PipeTransform {

    transform(array: any): unknown {
        let isOK:any = false
        if(array){
            for (let i = 0; i < array.length; i++) {
                if (array[i].testing_seat_subjects.length !== 0){
                    for (let j = 0; j < array[i].testing_seat_subjects.length; j++) {
                        if (array[i].testing_seat_subjects[j].start_seat_no !== null && array[i].testing_seat_subjects[j].end_seat_no !== null){
                            if (array[i].testing_seat_subjects[j].start_seat_no > array[i].testing_seat_subjects[j].end_seat_no){
                                isOK = true;
                            }
                        }
                    }
                }
            }
        }
        return isOK
    }

}
