handleAvailabilityChange(event) {
    let [value, name, id] = this.getEventValues(event);
    let checked = event.target.checked 
    this.setState(prevState => ({
            [name]: {
                 ...prevState[name],
                [id.toLowerCase()]: checked
            }    
        }
        ));
}
/**
 * Event handler that is called to update the component's state when
 * the user changes the values of the form fields associated with a 
 * driver's availability.
 * @param {Object} event The event that is triggered on a change of value
 *                          to the availability fields in the form.
 */
Event handler that is called to update the component's state when
the user changes the values of the form fields associated with a
driver's availability.
@param {Object} event The event that is triggered on a change of value
to the availability fields in the form.
Event handler that is called to update the component ' s state when the user changes the values of the form fields associated with a driver ' s availability . @param { Object } event The event that is triggered on a change of value to the availability fields in the form .
handleAvailabilityChange(event) {
    let [value, name, id] = this.getEventValues(event);
    let checked = event.target.checked 
    this.setState(prevState => ({
            [name]: {
                 ...prevState[name],
                [id.toLowerCase()]: checked
            }    
        }
        ));
}
handleAvailabilityChange ( event ) { let [ value , name , id ] = this . getEventValues ( event ) ; let checked = event . target . checked this . setState ( prevState => ( { [ name ] : { ... prevState [ name ] , [ id . toLowerCase ( ) ] : checked } } ) ) ; }
Event handler that is called to update the component's state when
 the user changes the values of the form fields associated with a
 driver's availability.
Event handler that is called to update the component ' s state when the user changes the values of the form fields associated with a driver ' s availability .