From 59c4ef663202cb73216aff5a854b54ca9a96a704 Mon Sep 17 00:00:00 2001 From: Krao Hasanee Date: Fri, 27 Mar 2026 01:04:30 -0400 Subject: [PATCH] Remove Projects tab from company detail, fix pricing layout Co-Authored-By: Claude Sonnet 4.6 --- src/pages/team/CompanyDetail.jsx | 64 ++++---------------------------- 1 file changed, 7 insertions(+), 57 deletions(-) diff --git a/src/pages/team/CompanyDetail.jsx b/src/pages/team/CompanyDetail.jsx index 1db89d9..3bb575c 100644 --- a/src/pages/team/CompanyDetail.jsx +++ b/src/pages/team/CompanyDetail.jsx @@ -16,7 +16,7 @@ export default function CompanyDetail() { const [unassigned, setUnassigned] = useState([]); const [prices, setPrices] = useState([]); const [loading, setLoading] = useState(true); - const [tab, setTab] = useState('projects'); + const [tab, setTab] = useState('users'); const [savingPrice, setSavingPrice] = useState(null); const [assigning, setAssigning] = useState(false); @@ -144,7 +144,7 @@ export default function CompanyDetail() { {/* Tabs */}
- {['projects', 'users', 'pricing'].map(t => ( + {['users', 'pricing'].map(t => (
- {/* Projects Tab */} - {tab === 'projects' && projects.length === 0 && ( -
-

No projects yet

-

Projects will appear here when requests come in.

-
- )} - {tab === 'projects' && projects.length > 0 && ( -
- {projects.map(project => { - const projectTasks = tasks.filter(t => t.project_id === project.id); - const active = projectTasks.filter(t => t.status !== 'client_approved'); - return ( -
-
-
-
- {project.name} -
- {project.description &&
{project.description}
} -
- Started {new Date(project.created_at).toLocaleDateString()} · {projectTasks.length} job{projectTasks.length !== 1 ? 's' : ''} · {active.length} active -
-
-
- - View -
-
- {projectTasks.length > 0 && ( -
- {projectTasks.map(task => ( - - {task.title} - - - ))} -
- )} -
- ); - })} -
- )} - {/* Users Tab */} {tab === 'users' && (
@@ -295,9 +244,9 @@ export default function CompanyDetail() {

{serviceTypes.map(serviceType => ( -
-
{serviceType}
-
+
+
{serviceType}
+
$ handlePriceChange(serviceType, e.target.value)} - style={{ margin: 0 }} + style={{ margin: 0, width: 90 }} />