A transgender social worker has been awarded damages after a recruitment process forced him to reveal his former female names to colleagues.