refactor clock_in and clock_out today javascript