 window.selectedDevicesForCase.includes(device.deviceID);
        const isUnavailable = !device.available;
        
        let statusBadge = '';
        if (device.status === 'free') {
            statusBadge = '<span class="device-status device-status-free">Free</span>';
        } else if (device.status === 'rented') {
            statusBadge = '<span class="device-status device-status-rented">Rented</span>';
        } else if (device.status === 'maintenance') {
            statusBadge = '<span class="dev