Error fixed .
designation.title was accessing when it doesn't exist
same way department