When you have the flu and have recovered from the flu virus you may still experience coughing for 5 to 7 days after the virus has left your body.
It depends on how much mucus you have in your throat and lungs and you may be coughing up mucus for at least 5 days after the flu.
In my experience I usually continue coughing up mucus for 5 days after the flu and then I cough again for at least a few more days after that.
So sometimes for me the coughing after the flu may last for as long as 8 to 12 days after the flu has gone.
But after the flu is gone you're no longer contagious and can return to work but just always cover your mouth when you cough and spit up any mucus and wash your hands afterwards before touching a computer keyboard, mouse etc.
Wipe down the computer keyboard and mouse if you touch it especially if you're not the only one using it.