if else in workers index action