CaseDevicesContent(devices, caseID);
            })
            .catch(error => {
                console.error('Error refreshing case devices:', error);
                content.innerHTML = '<div class="rc-text-center rc-py-xl"><p class="rc-text-danger">Error loading devices</p></div>';
            });
    }

    function showSuccessMessage(message) {
        // Show a temporary success message
        const alertDiv = document.createElement('div');
        alertDiv.className = 'alert alert-success alert-di