closeAll function is now calling the API closeAllModal method