diff --git a/frontend/index.html b/frontend/index.html index 7973f0a..f963658 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3421,9 +3421,6 @@ const [sort, setSort] = useState('last_name'); const [order, setOrder] = useState('asc'); const [selectedContact, setSelectedContact] = useState(null); - const [showForm, setShowForm] = useState(false); - const [formData, setFormData] = useState({ contact_type: 'prospect', status: 'active', source: '', linkedin_url: '', city: '', state: '', country: '', location_query: '' }); - const [formError, setFormError] = useState(''); const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); @@ -3452,29 +3449,6 @@ fetchContacts(); }, [token, tab, search, sort, order, contactsOffset]); - const handleAddContact = async (e) => { - e.preventDefault(); - setFormError(''); - - try { - await api('/api/contacts', { - method: 'POST', - body: JSON.stringify(formData) - }, token); - - setShowForm(false); - setFormData({ contact_type: 'prospect', status: 'active', source: '', linkedin_url: '', city: '', state: '', country: '', location_query: '' }); - - // Refresh list - const result = await api(`/api/contacts?search=${encodeURIComponent(search)}&type=${tabFilter}&sort=${sort}&order=${order}&limit=${CONTACTS_PAGE_SIZE}&offset=${contactsOffset}`, {}, token); - setContacts(result.data || []); - setContactsTotal(Number(result.total) || 0); - onShowToast('Contact created successfully', 'success'); - } catch (err) { - setFormError(err.message); - } - }; - const handleDeleteContact = async (id) => { setDeleting(id); try { @@ -3605,148 +3579,6 @@ )} - {showForm && ( -
-
-
Add New Contact
- {formError &&
{formError}
} -
-
- - setFormData({ ...formData, first_name: e.target.value })} - required - /> -
-
- - setFormData({ ...formData, last_name: e.target.value })} - required - /> -
-
- - setFormData({ ...formData, email: e.target.value })} - /> -
-
- - setFormData({ ...formData, phone: e.target.value })} - /> -
-
- - setFormData({ ...formData, title: e.target.value })} - /> -
-
- - setFormData({ ...formData, organization: e.target.value })} - /> -
-
- - setFormData({ ...formData, source: e.target.value })} - placeholder="Intro source, conference, referral, etc." - /> -
-
- - setFormData({ ...formData, linkedin_url: e.target.value })} - /> -
-
- - setFormData({ ...formData, city: e.target.value })} - /> -
-
- - setFormData({ ...formData, state: e.target.value })} - /> -
-
- - setFormData({ ...formData, country: e.target.value })} - /> -
-
- - -
-
- - -
-
- - -
-
-
-
- )} - {selectedContact && (