Fixed an issue due to which room is not getting blocked when booked from tab and refactored the code