Eight of the flats will be affordable housing