Plans to build 210 homes in Pontefract have been approved despite pleas to reject the scheme over potential flooding risks.