I just did some testing to figure this out myself. In short it appears that getting the bar full is sufficient and continuing to pursue objectives is pointless, but you should never leave early. I'm curious if you can leave early afterward, but that will take some more testing. Edit: leaving work early incurs a major penalty, even with the bar full. Plus you won't be paid for the hours.
In order to have a control, I saved the file at the very beginning of the work day with full needs and traits that would not affect his mood during a shift (noncommittal, art lover, and foodie). On the first day, the Sim got the bar full and stopped immediately. I parked him outside so that he would be just 'fine' from having no decoration moodlets as the work day came to a close. I then took a screenshot of the progress bar once he'd loaded up at home.
Reloaded, and stayed late for work, doing as many objectives as I could. I got it down to just one objective remaining and again put him outside so that mood couldn't factor in. This resulted in the exact same position on the performance bar.
Left work early and the bar barely moved, despite having filled the meter.
Did some further testing, and Ambitious didn't affect this at all.
I want to know if focused will help at all, because I've wondered what portion of the day a Sim needs to be in that emotion for it to count. Is it just at the end or beginning? I will try to clarify some of these things and put some information into the guide.