refactor callbacks in availabilities ctrl for toastr msgs