import { Link, useForm } from '@inertiajs/react'; import { Management, Field, control, button } from '../management/shared'; import { leadStates } from './types'; type Contact = { id: string; full_name: string; email: string | null; phone: string | null; }; function ContactForm({ contact, investorId, }: { contact: Contact; investorId: string; }) { const form = useForm({ full_name: contact.full_name, email: contact.email ?? '', phone: contact.phone ?? '', }); return (
); } export default function InvestorDetail({ investor, contacts, leads, }: { investor: { id: string; legal_name: string; investor_type: string; status: string; }; contacts: Contact[]; leads: { id: string; title: string; status: string }[]; }) { const form = useForm({ legal_name: investor.legal_name, investor_type: investor.investor_type, status: investor.status, }); return (Um contacto pode representar vários investidores. Alterações ao contacto são partilhadas entre essas relações.
{contacts.map((contact) => ({lead.title} {' '} · {leadStates[lead.status]}
))}