Subjective and anecdotal experience: My most productive period was working with people that I got along really well with, as opposed to people I sort of just put up with.
At 14 I started my working life manning a deep fryer. I retired a couple of years ago at age 54. In between I waited tables, operated a fork lift, managed a framing shop, installed cabling plants, worked as a sysadmin, network engineer, solution architect, proposal manager, director of engineering, CTO and in retirement now manage a 215 acre horse farm and project manage the extensive restoration of a 1875 farm house on the property. I've left a few things off that list. My anecdotal experience is that during those 40 years my productivity wasn't tied to whether I liked the people I worked with. In fact some of my most productive periods were when I didn't.