diff --git a/src/pages/team/Companies.jsx b/src/pages/team/Companies.jsx
index f46b8e3..0af6362 100644
--- a/src/pages/team/Companies.jsx
+++ b/src/pages/team/Companies.jsx
@@ -11,7 +11,7 @@ export default function Companies() {
const [tasks, setTasks] = useState([]);
const [loading, setLoading] = useState(true);
const [showNew, setShowNew] = useState(false);
- const [newForm, setNewForm] = useState({ name: '', email: '', phone: '' });
+ const [newForm, setNewForm] = useState({ name: '', phone: '', address: '' });
const [saving, setSaving] = useState(false);
useEffect(() => {
@@ -38,8 +38,8 @@ export default function Companies() {
setSaving(true);
const { data } = await supabase.from('companies').insert({
name: newForm.name.trim(),
- email: newForm.email.trim(),
phone: newForm.phone.trim(),
+ address: newForm.address.trim(),
}).select().single();
setSaving(false);
if (data) {
@@ -88,15 +88,6 @@ export default function Companies() {
/>
View
diff --git a/src/pages/team/CompanyDetail.jsx b/src/pages/team/CompanyDetail.jsx
index d1313e2..1db89d9 100644
--- a/src/pages/team/CompanyDetail.jsx
+++ b/src/pages/team/CompanyDetail.jsx
@@ -110,10 +110,10 @@ export default function CompanyDetail() {
{company.name}
- {company.email && <>{company.email}>}
- {company.email && company.phone && ' · '}
{company.phone && <>{company.phone}>}
- {!company.email && !company.phone && 'No contact info'}
+ {company.phone && company.address && ' · '}
+ {company.address && <>{company.address}>}
+ {!company.phone && !company.address && 'No contact info'}
Company
diff --git a/supabase/schema.sql b/supabase/schema.sql
index 1e6a601..01ab27c 100755
--- a/supabase/schema.sql
+++ b/supabase/schema.sql
@@ -7,8 +7,8 @@
create table public.companies (
id uuid default gen_random_uuid() primary key,
name text not null,
- email text default '',
phone text default '',
+ address text default '',
created_at timestamptz default now() not null
);
alter table public.companies enable row level security;