Permission for hundreds of homes and jobs at derelict fruit and veg market