      }
        })
        .catch(error => {
            console.error('Error deleting cable:', error);
            alert('Error deleting cable');
        });
    }

    // Utility Functions
    function loadCableTypes(selectId, selectedId = null) {
        const select = document.getElementById(selectId);
        select.innerHTML = '<option value="">Loading cable types...</option>';
        
        console.log(`loadCableTypes called: selectId=${selectId}, selectedId=${selectedId} (${typeof selectedId})`);