Refactoring eligible_to_work and related methods to consider shift fragments instead of whole shifts