From 693d9460cb614d194ece42cb29c0d1241d34c17d Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Fri, 15 May 2026 11:29:56 +0200 Subject: [PATCH] feat(contacts): add company field to free contacts Co-Authored-By: Claude Sonnet 4.6 --- client/src/pages/Contacts.tsx | 16 ++++++++++++++++ .../20260515_add_contacts_and_supplier_email.sql | 3 +++ server/storage.ts | 1 + shared/schema.ts | 1 + 4 files changed, 21 insertions(+) diff --git a/client/src/pages/Contacts.tsx b/client/src/pages/Contacts.tsx index bbfd04d..b3b726c 100644 --- a/client/src/pages/Contacts.tsx +++ b/client/src/pages/Contacts.tsx @@ -49,6 +49,7 @@ export default function Contacts() { const [formData, setFormData] = useState({ groupId: effectiveGroupId ?? 0, name: "", + company: "", role: "", phone: "", email: "", @@ -135,6 +136,7 @@ export default function Contacts() { setFormData({ groupId: effectiveGroupId ?? 0, name: "", + company: "", role: "", phone: "", email: "", @@ -148,6 +150,7 @@ export default function Contacts() { setFormData({ groupId: contact.groupId, name: contact.name, + company: (contact as any).company || "", role: contact.role || "", phone: contact.phone || "", email: contact.email || "", @@ -384,6 +387,9 @@ export default function Contacts() {

{contact.name}

+ {(contact as any).company && ( +

{(contact as any).company}

+ )} {contact.role && (

{contact.role}

)} @@ -485,6 +491,16 @@ export default function Contacts() { />
+
+ + setFormData((p) => ({ ...p, company: e.target.value }))} + placeholder="Nom de l'entreprise" + /> +
+