Legislature approves bill overhauling ride-hailing rules