fix: resolve broken auth imports and JSX tag mismatches
Some checks are pending
Build / build (push) Waiting to run
Deploy / deploy (push) Waiting to run
Lint & Type Check / lint (push) Waiting to run
Security Scan / semgrep (push) Waiting to run
Security Scan / dependency-check (push) Waiting to run
Test / test (18.x) (push) Waiting to run
Test / test (20.x) (push) Waiting to run

- Fix 14 files importing useAuth from nonexistent @/lib/auth or @/hooks/useAuth → @/contexts/AuthContext
- Fix ClientReports: Button wrapping Card content, add proper Tabs/TabsContent structure
- Fix ClientInvoices, ClientContracts: </div> → </section> tag mismatch
- Fix ClientSettings: orphaned </TabsContent>, add missing Tabs wrapper and profile tab
- Re-enable 12 disabled pages in App.tsx (hub + staff routes)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
AeThex 2026-04-08 01:39:46 +00:00
parent 58c1f539b9
commit c67ee049b6
23 changed files with 144 additions and 116 deletions

View file

@ -133,10 +133,10 @@ import MyApplications from "./pages/profile/MyApplications";
import ClientHub from "./pages/hub/ClientHub"; import ClientHub from "./pages/hub/ClientHub";
import ClientProjects from "./pages/hub/ClientProjects"; import ClientProjects from "./pages/hub/ClientProjects";
import ClientDashboard from "./pages/hub/ClientDashboard"; import ClientDashboard from "./pages/hub/ClientDashboard";
// import ClientInvoices from "./pages/hub/ClientInvoices"; import ClientInvoices from "./pages/hub/ClientInvoices";
// import ClientContracts from "./pages/hub/ClientContracts"; import ClientContracts from "./pages/hub/ClientContracts";
// import ClientReports from "./pages/hub/ClientReports"; import ClientReports from "./pages/hub/ClientReports";
// import ClientSettings from "./pages/hub/ClientSettings"; import ClientSettings from "./pages/hub/ClientSettings";
import Space1Welcome from "./pages/internal-docs/Space1Welcome"; import Space1Welcome from "./pages/internal-docs/Space1Welcome";
import Space1AxiomModel from "./pages/internal-docs/Space1AxiomModel"; import Space1AxiomModel from "./pages/internal-docs/Space1AxiomModel";
import Space1FindYourRole from "./pages/internal-docs/Space1FindYourRole"; import Space1FindYourRole from "./pages/internal-docs/Space1FindYourRole";
@ -161,14 +161,14 @@ import StaffAdmin from "./pages/StaffAdmin";
import StaffChat from "./pages/StaffChat"; import StaffChat from "./pages/StaffChat";
import StaffDocs from "./pages/StaffDocs"; import StaffDocs from "./pages/StaffDocs";
import StaffAchievements from "./pages/StaffAchievements"; import StaffAchievements from "./pages/StaffAchievements";
// import StaffAnnouncements from "./pages/staff/StaffAnnouncements"; import StaffAnnouncements from "./pages/staff/StaffAnnouncements";
// import StaffExpenseReports from "./pages/staff/StaffExpenseReports"; import StaffExpenseReports from "./pages/staff/StaffExpenseReports";
// import StaffInternalMarketplace from "./pages/staff/StaffInternalMarketplace"; import StaffInternalMarketplace from "./pages/staff/StaffInternalMarketplace";
// import StaffKnowledgeBase from "./pages/staff/StaffKnowledgeBase"; import StaffKnowledgeBase from "./pages/staff/StaffKnowledgeBase";
// import StaffLearningPortal from "./pages/staff/StaffLearningPortal"; import StaffLearningPortal from "./pages/staff/StaffLearningPortal";
// import StaffPerformanceReviews from "./pages/staff/StaffPerformanceReviews"; import StaffPerformanceReviews from "./pages/staff/StaffPerformanceReviews";
// import StaffProjectTracking from "./pages/staff/StaffProjectTracking"; import StaffProjectTracking from "./pages/staff/StaffProjectTracking";
// import StaffTeamHandbook from "./pages/staff/StaffTeamHandbook"; import StaffTeamHandbook from "./pages/staff/StaffTeamHandbook";
import DeveloperDashboard from "./pages/dev-platform/DeveloperDashboard"; import DeveloperDashboard from "./pages/dev-platform/DeveloperDashboard";
import ApiReference from "./pages/dev-platform/ApiReference"; import ApiReference from "./pages/dev-platform/ApiReference";
import QuickStart from "./pages/dev-platform/QuickStart"; import QuickStart from "./pages/dev-platform/QuickStart";
@ -513,7 +513,7 @@ const App = () => (
path="/staff/announcements" path="/staff/announcements"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <StaffAnnouncements />
</RequireAccess> </RequireAccess>
} }
/> />
@ -521,7 +521,7 @@ const App = () => (
path="/staff/expense-reports" path="/staff/expense-reports"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <StaffExpenseReports />
</RequireAccess> </RequireAccess>
} }
/> />
@ -529,7 +529,7 @@ const App = () => (
path="/staff/marketplace" path="/staff/marketplace"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <StaffInternalMarketplace />
</RequireAccess> </RequireAccess>
} }
/> />
@ -537,7 +537,7 @@ const App = () => (
path="/staff/knowledge-base" path="/staff/knowledge-base"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <StaffKnowledgeBase />
</RequireAccess> </RequireAccess>
} }
/> />
@ -545,7 +545,7 @@ const App = () => (
path="/staff/learning-portal" path="/staff/learning-portal"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <StaffLearningPortal />
</RequireAccess> </RequireAccess>
} }
/> />
@ -553,7 +553,7 @@ const App = () => (
path="/staff/performance-reviews" path="/staff/performance-reviews"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <StaffPerformanceReviews />
</RequireAccess> </RequireAccess>
} }
/> />
@ -561,7 +561,7 @@ const App = () => (
path="/staff/project-tracking" path="/staff/project-tracking"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <StaffProjectTracking />
</RequireAccess> </RequireAccess>
} }
/> />
@ -569,7 +569,7 @@ const App = () => (
path="/staff/team-handbook" path="/staff/team-handbook"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <StaffTeamHandbook />
</RequireAccess> </RequireAccess>
} }
/> />
@ -652,7 +652,7 @@ const App = () => (
path="/hub/client/invoices" path="/hub/client/invoices"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <ClientInvoices />
</RequireAccess> </RequireAccess>
} }
/> />
@ -660,7 +660,7 @@ const App = () => (
path="/hub/client/contracts" path="/hub/client/contracts"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <ClientContracts />
</RequireAccess> </RequireAccess>
} }
/> />
@ -668,7 +668,7 @@ const App = () => (
path="/hub/client/reports" path="/hub/client/reports"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <ClientReports />
</RequireAccess> </RequireAccess>
} }
/> />
@ -676,7 +676,7 @@ const App = () => (
path="/hub/client/settings" path="/hub/client/settings"
element={ element={
<RequireAccess> <RequireAccess>
<div>Coming Soon</div> <ClientSettings />
</RequireAccess> </RequireAccess>
} }
/> />

View file

@ -29,7 +29,7 @@ import {
ArrowUpRight, ArrowUpRight,
ArrowDownRight, ArrowDownRight,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/lib/auth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface Analytics { interface Analytics {

View file

@ -42,7 +42,7 @@ import {
Ban, Ban,
AlertCircle, AlertCircle,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/lib/auth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface Report { interface Report {

View file

@ -32,7 +32,7 @@ import {
XCircle, XCircle,
AlertCircle, AlertCircle,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/hooks/useAuth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";

View file

@ -40,7 +40,7 @@ import {
AlertTriangle, AlertTriangle,
ExternalLink, ExternalLink,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/hooks/useAuth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface Offer { interface Offer {

View file

@ -29,7 +29,7 @@ import {
Gift, Gift,
TrendingUp, TrendingUp,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/hooks/useAuth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface ProfileData { interface ProfileData {

View file

@ -37,7 +37,7 @@ import {
Save, Save,
CheckCircle2, CheckCircle2,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/hooks/useAuth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface WorkHistory { interface WorkHistory {

View file

@ -166,7 +166,7 @@ export default function ClientContracts() {
</CardContent> </CardContent>
</Card> </Card>
</div> </div>
</div> </section>
{/* Filters */} {/* Filters */}
<div className="flex flex-col md:flex-row gap-4"> <div className="flex flex-col md:flex-row gap-4">

View file

@ -210,7 +210,7 @@ export default function ClientInvoices() {
</CardContent> </CardContent>
</Card> </Card>
</div> </div>
</div> </section>
{/* Filters */} {/* Filters */}
<div className="flex flex-col md:flex-row gap-4"> <div className="flex flex-col md:flex-row gap-4">

View file

@ -203,61 +203,76 @@ export default function ClientReports() {
<section className="py-12"> <section className="py-12">
<div className="container mx-auto max-w-6xl px-4"> <div className="container mx-auto max-w-6xl px-4">
<Card className="bg-slate-800/30 border-slate-700"> <Tabs defaultValue="overview" className="space-y-6">
<CardContent className="p-12 text-center"> <TabsList className="bg-slate-800/50 border border-slate-700">
<TrendingUp className="h-12 w-12 text-slate-600 mx-auto mb-4" /> <TabsTrigger value="overview">Overview</TabsTrigger>
<p className="text-slate-400 mb-6"> <TabsTrigger value="budget">Budget</TabsTrigger>
Detailed project reports and analytics coming soon <TabsTrigger value="time">Time</TabsTrigger>
</p> </TabsList>
<Button <TabsContent value="overview" className="space-y-6">
variant="outline" {projects.length === 0 ? (
onClick={() => navigate("/hub/client")} <Card className="bg-slate-800/30 border-slate-700">
> <CardContent className="p-12 text-center">
<CardHeader> <TrendingUp className="h-12 w-12 text-slate-600 mx-auto mb-4" />
<div className="flex items-start justify-between"> <p className="text-slate-400 mb-6">
<div> Detailed project reports and analytics coming soon
<CardTitle>{project.title}</CardTitle> </p>
<CardDescription> <Button
{new Date(project.start_date).toLocaleDateString()} - {new Date(project.end_date).toLocaleDateString()} variant="outline"
</CardDescription> onClick={() => navigate("/hub/client")}
</div> >
<Badge className={project.status === "active" Back to Hub
? "bg-green-500/20 text-green-300" </Button>
: "bg-blue-500/20 text-blue-300" </CardContent>
}> </Card>
{project.status} ) : (
</Badge> projects.map((project) => (
</div> <Card key={project.id}>
</CardHeader> <CardHeader>
<CardContent> <div className="flex items-start justify-between">
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-4"> <div>
<div className="p-3 bg-black/30 rounded-lg"> <CardTitle>{project.title}</CardTitle>
<p className="text-xs text-gray-400">Progress</p> <CardDescription>
<p className="text-lg font-bold text-white">{project.progress}%</p> {new Date(project.start_date).toLocaleDateString()} - {new Date(project.end_date).toLocaleDateString()}
</div> </CardDescription>
<div className="p-3 bg-black/30 rounded-lg"> </div>
<p className="text-xs text-gray-400">Budget Spent</p> <Badge className={project.status === "active"
<p className="text-lg font-bold text-purple-400"> ? "bg-green-500/20 text-green-300"
${(project.budget_spent / 1000).toFixed(0)}k / ${(project.budget_total / 1000).toFixed(0)}k : "bg-blue-500/20 text-blue-300"
</p> }>
</div> {project.status}
<div className="p-3 bg-black/30 rounded-lg"> </Badge>
<p className="text-xs text-gray-400">Hours Logged</p> </div>
<p className="text-lg font-bold text-cyan-400"> </CardHeader>
{project.hours_logged} / {project.hours_estimated} <CardContent>
</p> <div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-4">
</div> <div className="p-3 bg-black/30 rounded-lg">
<div className="p-3 bg-black/30 rounded-lg"> <p className="text-xs text-gray-400">Progress</p>
<p className="text-xs text-gray-400">Team Size</p> <p className="text-lg font-bold text-white">{project.progress}%</p>
<p className="text-lg font-bold text-white">{project.team_size}</p> </div>
</div> <div className="p-3 bg-black/30 rounded-lg">
</div> <p className="text-xs text-gray-400">Budget Spent</p>
<Progress value={project.progress} className="h-2" /> <p className="text-lg font-bold text-purple-400">
</CardContent> ${(project.budget_spent / 1000).toFixed(0)}k / ${(project.budget_total / 1000).toFixed(0)}k
</Card> </p>
)) </div>
)} <div className="p-3 bg-black/30 rounded-lg">
</TabsContent> <p className="text-xs text-gray-400">Hours Logged</p>
<p className="text-lg font-bold text-cyan-400">
{project.hours_logged} / {project.hours_estimated}
</p>
</div>
<div className="p-3 bg-black/30 rounded-lg">
<p className="text-xs text-gray-400">Team Size</p>
<p className="text-lg font-bold text-white">{project.team_size}</p>
</div>
</div>
<Progress value={project.progress} className="h-2" />
</CardContent>
</Card>
))
)}
</TabsContent>
{/* Budget Analysis Tab */} {/* Budget Analysis Tab */}
<TabsContent value="budget" className="space-y-6"> <TabsContent value="budget" className="space-y-6">
@ -318,6 +333,8 @@ export default function ClientReports() {
</Card> </Card>
</TabsContent> </TabsContent>
</Tabs> </Tabs>
</div>
</section>
</div> </div>
</div> </div>
</Layout> </Layout>

View file

@ -284,24 +284,33 @@ export default function ClientSettings() {
<section className="py-12"> <section className="py-12">
<div className="container mx-auto max-w-6xl px-4"> <div className="container mx-auto max-w-6xl px-4">
<Card className="bg-slate-800/30 border-slate-700"> <Tabs defaultValue="profile" className="space-y-6">
<CardContent className="p-12 text-center"> <TabsList className="bg-slate-800/50 border border-slate-700">
<Settings className="h-12 w-12 text-slate-600 mx-auto mb-4" /> <TabsTrigger value="profile">Profile</TabsTrigger>
<p className="text-slate-400 mb-6"> <TabsTrigger value="team">Team</TabsTrigger>
Account settings and preferences coming soon <TabsTrigger value="notifications">Notifications</TabsTrigger>
</p> <TabsTrigger value="billing">Billing</TabsTrigger>
<Button <TabsTrigger value="security">Security</TabsTrigger>
variant="outline" </TabsList>
onClick={() => navigate("/hub/client")} <TabsContent value="profile" className="space-y-6">
> <Card className="bg-slate-800/30 border-slate-700">
Back to Portal <CardContent className="p-12 text-center">
</Button> <Settings className="h-12 w-12 text-slate-600 mx-auto mb-4" />
</CardContent> <p className="text-slate-400 mb-6">
</Card> Account settings and preferences coming soon
</TabsContent> </p>
<Button
variant="outline"
onClick={() => navigate("/hub/client")}
>
Back to Portal
</Button>
</CardContent>
</Card>
</TabsContent>
{/* Team Tab */} {/* Team Tab */}
<TabsContent value="team" className="space-y-6"> <TabsContent value="team" className="space-y-6">
<Card className="bg-slate-900/50 border-slate-700"> <Card className="bg-slate-900/50 border-slate-700">
<CardHeader> <CardHeader>
<CardTitle>Team Members</CardTitle> <CardTitle>Team Members</CardTitle>
@ -555,6 +564,8 @@ export default function ClientSettings() {
</Card> </Card>
</TabsContent> </TabsContent>
</Tabs> </Tabs>
</div>
</section>
</div> </div>
</div> </div>
</Layout> </Layout>

View file

@ -11,7 +11,7 @@ import {
} from "@/components/ui/card"; } from "@/components/ui/card";
import { Badge } from "@/components/ui/badge"; import { Badge } from "@/components/ui/badge";
import { Bell, Pin, Loader2, Eye, EyeOff } from "lucide-react"; import { Bell, Pin, Loader2, Eye, EyeOff } from "lucide-react";
import { useAuth } from "@/hooks/useAuth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface Announcement { interface Announcement {

View file

@ -10,7 +10,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog";
import { Textarea } from "@/components/ui/textarea"; import { Textarea } from "@/components/ui/textarea";
import { DollarSign, FileText, Calendar, CheckCircle, AlertCircle, Plus, Loader2 } from "lucide-react"; import { DollarSign, FileText, Calendar, CheckCircle, AlertCircle, Plus, Loader2 } from "lucide-react";
import { useAuth } from "@/hooks/useAuth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface Expense { interface Expense {

View file

@ -21,7 +21,7 @@ import {
Coins, Coins,
} from "lucide-react"; } from "lucide-react";
import { Input } from "@/components/ui/input"; import { Input } from "@/components/ui/input";
import { useAuth } from "@/lib/auth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
import { import {
Dialog, Dialog,

View file

@ -24,7 +24,7 @@ import {
ThumbsUp, ThumbsUp,
Eye, Eye,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/lib/auth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface KnowledgeArticle { interface KnowledgeArticle {

View file

@ -21,7 +21,7 @@ import {
CheckCircle, CheckCircle,
Loader2, Loader2,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/lib/auth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface Course { interface Course {

View file

@ -37,7 +37,7 @@ import {
ChevronUp, ChevronUp,
Trash2, Trash2,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/lib/auth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface KeyResult { interface KeyResult {

View file

@ -27,7 +27,7 @@ import {
Coffee, Coffee,
Loader2, Loader2,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/hooks/useAuth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface OnboardingData { interface OnboardingData {

View file

@ -27,7 +27,7 @@ import {
Briefcase, Briefcase,
Target, Target,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/hooks/useAuth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface ChecklistItem { interface ChecklistItem {

View file

@ -20,7 +20,7 @@ import {
Users, Users,
Loader2, Loader2,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/lib/auth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
import { import {
Dialog, Dialog,

View file

@ -19,7 +19,7 @@ import {
Plus, Plus,
Calendar, Calendar,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/lib/auth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
import { import {
Dialog, Dialog,

View file

@ -22,7 +22,7 @@ import {
ChevronDown, ChevronDown,
ChevronUp, ChevronUp,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/lib/auth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface HandbookSection { interface HandbookSection {

View file

@ -37,7 +37,7 @@ import {
Trash2, Trash2,
Edit, Edit,
} from "lucide-react"; } from "lucide-react";
import { useAuth } from "@/lib/auth"; import { useAuth } from "@/contexts/AuthContext";
import { aethexToast } from "@/components/ui/aethex-toast"; import { aethexToast } from "@/components/ui/aethex-toast";
interface Project { interface Project {