findDrivers(event, drivers) {
        let currentList = drivers;
        let newList = []
    
        if (event.target.value) {
            newList = currentList.filter(item => {
                let driverId = item.id;
                let fName = item.first_name.toLowerCase();
                let lName = item.last_name.toLowerCase();
                let fullName = fName + " " + lName 
                let formalName = lName + ", " + fName
                let phone = item.phone;
                let emp_status = item.employee_status.toLowerCase();
                const filter = event.target.value.toLowerCase();
                return driverId.toString().includes(filter) | fullName.includes(filter) 
                        | formalName.includes(filter) | phone.toString().includes(filter) 
                        | emp_status.includes(filter);
            });
        }
        else {
            newList = drivers;
        }
        return newList;
    }
/**
     * This method uses two parameters - an event object that is triggered 
     * when the user enters information into the Driver search field and 
     * the list of drivers stored in the database - to return a list of drivers
     * that have relevant field values matching the value entered in the 
     * search box.
     * @param {Object} event The event triggered when a user enters information 
     *                          into the Driver search field on the Data page.
     * @param {Array} drivers The list of drivers stored in the database.
     * @returns A list of drivers that have at least one data field matching 
     *          the value entered into the search box.
     */
This method uses two parameters - an event object that is triggered
when the user enters information into the Driver search field and
the list of drivers stored in the database - to return a list of drivers
that have relevant field values matching the value entered in the
search box.
@param {Object} event The event triggered when a user enters information
into the Driver search field on the Data page.
@param {Array} drivers The list of drivers stored in the database.
@returns A list of drivers that have at least one data field matching
the value entered into the search box.
This method uses two parameters - an event object that is triggered when the user enters information into the Driver search field and the list of drivers stored in the database - to return a list of drivers that have relevant field values matching the value entered in the search box . @param { Object } event The event triggered when a user enters information into the Driver search field on the Data page . @param { Array } drivers The list of drivers stored in the database . @returns A list of drivers that have at least one data field matching the value entered into the search box .
findDrivers(event, drivers) {
        let currentList = drivers;
        let newList = []
        if (event.target.value) {
            newList = currentList.filter(item => {
                let driverId = item.id;
                let fName = item.first_name.toLowerCase();
                let lName = item.last_name.toLowerCase();
                let fullName = fName + " " + lName 
                let formalName = lName + ", " + fName
                let phone = item.phone;
                let emp_status = item.employee_status.toLowerCase();
                const filter = event.target.value.toLowerCase();
                return driverId.toString().includes(filter) | fullName.includes(filter) 
                        | formalName.includes(filter) | phone.toString().includes(filter) 
                        | emp_status.includes(filter);
            });
        }
        else {
            newList = drivers;
        }
        return newList;
    }
findDrivers ( event , drivers ) { let currentList = drivers ; let newList = [ ] if ( event . target . value ) { newList = currentList . filter ( item => { let driverId = item . id ; let fName = item . first_name . toLowerCase ( ) ; let lName = item . last_name . toLowerCase ( ) ; let fullName = fName + " " + lName let formalName = lName + ", " + fName let phone = item . phone ; let emp_status = item . employee_status . toLowerCase ( ) ; const filter = event . target . value . toLowerCase ( ) ; return driverId . toString ( ) . includes ( filter ) | fullName . includes ( filter ) | formalName . includes ( filter ) | phone . toString ( ) . includes ( filter ) | emp_status . includes ( filter ) ; } ) ; } else { newList = drivers ; } return newList ; }
This method uses two parameters - an event object that is triggered
 when the user enters information into the Driver search field and
 the list of drivers stored in the database - to return a list of drivers
 that have relevant field values matching the value entered in the
 search box.
This method uses two parameters - an event object that is triggered when the user enters information into the Driver search field and the list of drivers stored in the database - to return a list of drivers that have relevant field values matching the value entered in the search box .