Updating max date for role when user presses back button.
Also refactored useRoleTypes-hook to make it similar to useOus-hook.