See above.

Also, we have repeated code here (not your fault). Can we abstract it out into a single function call that removes all classes in the set {"approved", "dashboard_red", "dashboard_blue", "unapproved"}, adds the correct classes (which depends on the function input), and adds the correct text? This isn't major though, since this only happens three times.