Kirklees Council has given the go-ahead for a former betting shop in Heckmondwike to be turned into flats.