Planning permission has been granted for the demolition of a burnt-out Wolverhampton industrial unit to make way for 42 new apartments and a retail store.