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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -203,6 +203,14 @@ export default function ClientReports() {
<section className="py-12">
<div className="container mx-auto max-w-6xl px-4">
<Tabs defaultValue="overview" className="space-y-6">
<TabsList className="bg-slate-800/50 border border-slate-700">
<TabsTrigger value="overview">Overview</TabsTrigger>
<TabsTrigger value="budget">Budget</TabsTrigger>
<TabsTrigger value="time">Time</TabsTrigger>
</TabsList>
<TabsContent value="overview" className="space-y-6">
{projects.length === 0 ? (
<Card className="bg-slate-800/30 border-slate-700">
<CardContent className="p-12 text-center">
<TrendingUp className="h-12 w-12 text-slate-600 mx-auto mb-4" />
@ -213,6 +221,13 @@ export default function ClientReports() {
variant="outline"
onClick={() => navigate("/hub/client")}
>
Back to Hub
</Button>
</CardContent>
</Card>
) : (
projects.map((project) => (
<Card key={project.id}>
<CardHeader>
<div className="flex items-start justify-between">
<div>
@ -319,6 +334,8 @@ export default function ClientReports() {
</TabsContent>
</Tabs>
</div>
</section>
</div>
</div>
</Layout>
);

View file

@ -284,6 +284,15 @@ export default function ClientSettings() {
<section className="py-12">
<div className="container mx-auto max-w-6xl px-4">
<Tabs defaultValue="profile" className="space-y-6">
<TabsList className="bg-slate-800/50 border border-slate-700">
<TabsTrigger value="profile">Profile</TabsTrigger>
<TabsTrigger value="team">Team</TabsTrigger>
<TabsTrigger value="notifications">Notifications</TabsTrigger>
<TabsTrigger value="billing">Billing</TabsTrigger>
<TabsTrigger value="security">Security</TabsTrigger>
</TabsList>
<TabsContent value="profile" className="space-y-6">
<Card className="bg-slate-800/30 border-slate-700">
<CardContent className="p-12 text-center">
<Settings className="h-12 w-12 text-slate-600 mx-auto mb-4" />
@ -556,6 +565,8 @@ export default function ClientSettings() {
</TabsContent>
</Tabs>
</div>
</section>
</div>
</div>
</Layout>
);

View file

@ -11,7 +11,7 @@ import {
} from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
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";
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 { Textarea } from "@/components/ui/textarea";
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";
interface Expense {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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