Proposals to build a block of 45 apartments and 15 townhouses where a leisure centre once stood have been given the go ahead by the council.