A former nightclub is set to be transformed into flats and a retail unit after receiving planning permission.