We should also lock and unlock the modal while deleting the resource.