ajax working for flash message and icon switch when an RA goes on duty