Skip to content
Open
45 changes: 45 additions & 0 deletions all_errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
src/components/ChatInterfaceDemo.tsx(188,9): error TS2322: Type 'import("/home/runner/work/axis2/axis2/src/types").Message[]' is not assignable to type 'import("/home/runner/work/axis2/axis2/src/types/messaging").Message[]'.
src/components/admin/ShadcnFileManagementDashboard.tsx(143,22): error TS2345: Argument of type '{ totalFiles: number; totalSize: number; filesByCategory: Record<string, number>; filesByUploader: Record<string, number>; mostAccessedFiles: any[]; recentlyUploadedFiles: { ...; }[]; }' is not assignable to parameter of type 'SetStateAction<{ totalFiles: number; totalSize: number; filesByCategory: Record<FileCategory, number>; filesByUploader: Record<string, number>; mostAccessedFiles: { ...; }[]; recentlyUploadedFiles: ProjectFile[]; }>'.
src/components/dashboard/DashboardLayoutManager.tsx(345,25): error TS2741: Property 'component' is missing in type 'DashboardWidget' but required in type 'EnhancedWidgetType'.
src/components/dashboard/ResizableWidgetContainer.tsx(163,13): error TS2741: Property 'component' is missing in type 'DashboardWidget' but required in type 'EnhancedWidgetType'.
src/components/dashboard/ResizableWidgetContainer.tsx(203,21): error TS2741: Property 'component' is missing in type 'DashboardWidget' but required in type 'EnhancedWidgetType'.
src/components/demos/FormEnhancementsDemo.tsx(126,7): error TS2322: Type 'string' is not assignable to type 'boolean'.
src/components/demos/FormEnhancementsDemo.tsx(156,7): error TS2322: Type 'string' is not assignable to type 'boolean'.
src/components/file/EnhancedFileUploadModal.tsx(189,9): error TS2345: Argument of type '{ folder: string; resourceType: string; }' is not assignable to parameter of type 'string'.
src/components/file/EnhancedFileUploadModal.tsx(196,13): error TS2739: Type '{ id: string; name: string; url: string; public_id: string; secure_url: string; type: string; size: number; uploadedBy: string; uploadedByName: string; uploadedAt: any; projectId: string; category: FileCategory; ... 4 more ...; isLatestVersion: true; }' is missing the following properties from type 'ProjectFile': uploaderId, uploaderName
src/components/file/EnhancedFileUploadModal.tsx(350,27): error TS2322: Type 'Record<string, FileUploadProgress>' is not assignable to type 'ReactNode'.
src/components/file/EnhancedFileUploadModal.tsx(352,29): error TS2322: Type 'Record<string, FileUploadProgress>' is not assignable to type 'number'.
src/components/file/FileOrganizationDashboard.tsx(56,5): error TS2740: Type '{ DOCUMENTS: number; IMAGES: number; ARCHIVES: number; SUBSTANTIATION: number; DELIVERABLES: number; PROFILE: number; SYSTEM: number; }' is missing the following properties from type 'Record<FileCategory, number>': DRAWINGS, SPECIFICATIONS, REPORTS, CONTRACTS, and 7 more.
src/components/navigation/HeaderContent.tsx(141,36): error TS2339: Property 'avatarUrl' does not exist on type 'User | User'.
src/components/performance/PerformanceOptimizedCard.tsx(33,44): error TS2345: Argument of type '"content" | "layout" | "paint" | "strict" | "layout paint"' is not assignable to parameter of type 'ContainmentType'.
src/components/project/ProjectCreationDialog.tsx(99,5): error TS2322: Type '"deliverables"' is not assignable to type '"teamMembers" | "initialTasks"'.
src/components/project/ProjectCreationDialog.tsx(605,56): error TS2345: Argument of type 'string' is not assignable to parameter of type '{ title: string; estimatedHours: number; priority: "high" | "low" | "medium" | "urgent"; assignedTo: string; description?: string; } | { name: string; role: string; email: string; } | ({ title: string; estimatedHours: number; priority: "high" | ... 2 more ... | "urgent"; assignedTo: string; description?: string; } |...'.
src/components/project/ProjectDetailsView.tsx(124,9): error TS2322: Type 'string' is not assignable to type 'ProjectStatus'.
src/components/project/ProjectWorkflow.tsx(184,42): error TS2367: This comparison appears to be unintentional because the types 'import("/home/runner/work/axis2/axis2/src/components/project/ProjectCard").ProjectStatus' and 'import("/home/runner/work/axis2/axis2/src/types").ProjectStatus' have no overlap.
src/components/project/ProjectWorkflow.tsx(185,45): error TS2367: This comparison appears to be unintentional because the types 'import("/home/runner/work/axis2/axis2/src/components/project/ProjectCard").ProjectStatus' and 'import("/home/runner/work/axis2/axis2/src/types").ProjectStatus' have no overlap.
src/components/ui/bottom-sheet.tsx(69,11): error TS2430: Interface 'BottomSheetContentProps' incorrectly extends interface 'Omit<DialogContentProps & RefAttributes<HTMLDivElement>, "ref">'.
src/contexts/AppContext.tsx(902,5): error TS2353: Object literal may only specify known properties, and 'addActionItemToProject' does not exist in type 'AppContextType'.
src/pages/ClientDashboard.tsx(308,61): error TS2322: Type 'void' is not assignable to type 'Promise<void>'.
src/pages/ClientDashboard.tsx(324,45): error TS2322: Type 'void' is not assignable to type 'Promise<void>'.
src/pages/ClientDashboard.tsx(329,50): error TS2322: Type 'void' is not assignable to type 'Promise<void>'.
src/pages/FreelancerDashboard.tsx(38,13): error TS2339: Property 'team' does not exist on type 'Project'.
src/pages/FreelancerDashboard.tsx(265,19): error TS2322: Type 'import("/home/runner/work/axis2/axis2/src/types").Project[]' is not assignable to type 'import("/home/runner/work/axis2/axis2/src/components/project/ProjectTable").Project[]'.
src/pages/FreelancerProjectsPage.tsx(12,13): error TS2339: Property 'team' does not exist on type 'Project'.
src/pages/FreelancerProjectsPage.tsx(36,15): error TS2322: Type 'import("/home/runner/work/axis2/axis2/src/types").Project[]' is not assignable to type 'import("/home/runner/work/axis2/axis2/src/components/project/ProjectTable").Project[]'.
src/services/cloudinaryManagementService.ts(169,9): error TS2739: Type '{ level: FilePermissionLevel; allowDownload: true; allowShare: boolean; allowVersioning: boolean; }' is missing the following properties from type 'FilePermissions': allowDelete, allowComments
src/services/cloudinaryManagementService.ts(362,5): error TS2739: Type '{ totalFiles: number; folderSizes: Record<string, number>; filesByCategory: Record<FileCategory, number>; filesByRole: Record<UserRole, number>; }' is missing the following properties from type '{ totalFiles: number; totalSize: number; folderBreakdown: Record<string, { files: number; size: number; }>; categoryBreakdown: Record<FileCategory, number>; }': totalSize, folderBreakdown, categoryBreakdown
src/services/fileMetadataService.ts(326,7): error TS2740: Type '{ DOCUMENTS: number; IMAGES: number; ARCHIVES: number; SUBSTANTIATION: number; DELIVERABLES: number; PROFILE: number; SYSTEM: number; }' is missing the following properties from type 'Record<FileCategory, number>': DRAWINGS, SPECIFICATIONS, REPORTS, CONTRACTS, and 7 more.
src/services/fileService.ts(40,64): error TS2353: Object literal may only specify known properties, and 'createdAt' does not exist in type 'ProjectFile'.
src/services/profileExportImportService.ts(193,11): error TS2322: Type 'any' is not assignable to type 'never'.
src/services/profileExportImportService.ts(196,11): error TS2322: Type 'any' is not assignable to type 'never'.
src/services/profileExportImportService.ts(394,7): error TS2322: Type 'string | number | boolean | string[] | Timestamp | { profileCompleted: boolean; skillsAdded: boolean; firstProjectAssigned: boolean; firstTimeLogged: boolean; completedAt?: Timestamp; } | { ...; }' is not assignable to type 'never'.
src/services/timeTrackingService.ts(72,32): error TS2339: Property 'isBillable' does not exist on type 'TimeLog'.
src/services/timeTrackingService.ts(76,13): error TS2353: Object literal may only specify known properties, and 'projectId' does not exist in type 'TimeTrackingReport'.
src/utils/DashboardAnalytics.ts(92,55): error TS2339: Property 'i' does not exist on type 'WidgetLayout'.
src/utils/cloudinaryHelpers.ts(258,5): error TS2741: Property 'categoryBreakdown' is missing in type '{ quotaUsed: number; quotaLimit: number; totalFiles: number; totalSize: number; filesByCategory: Record<FileCategory, number>; recentFiles: ProjectFile[]; }' but required in type '{ totalFiles: number; totalSize: number; quotaUsed: number; quotaLimit: number; categoryBreakdown: Record<FileCategory, number>; }'.
src/utils/cloudinaryHelpers.ts(270,7): error TS2740: Type '{ DOCUMENTS: number; IMAGES: number; ARCHIVES: number; SUBSTANTIATION: number; DELIVERABLES: number; PROFILE: number; SYSTEM: number; }' is missing the following properties from type 'Record<FileCategory, number>': DRAWINGS, SPECIFICATIONS, REPORTS, CONTRACTS, and 7 more.
src/utils/cspAwareCloudinaryService.ts(231,9): error TS2322: Type 'string' is not assignable to type 'FileCategory'.
src/utils/cspAwareCloudinaryService.ts(245,11): error TS2353: Object literal may only specify known properties, and 'cloudinaryPublicId' does not exist in type 'FileMetadata'.
src/utils/cspAwareCloudinaryService.ts(329,17): error TS2322: Type 'string' is not assignable to type 'FileCategory'.
src/utils/cspAwareCloudinaryService.ts(343,19): error TS2353: Object literal may only specify known properties, and 'storageProvider' does not exist in type 'FileMetadata'.
src/utils/fileAccessControl.ts(65,44): error TS2367: This comparison appears to be unintentional because the types 'UserRole.FREELANCER | UserRole.CLIENT' and 'UserRole.ADMIN' have no overlap.
56 changes: 56 additions & 0 deletions error_analysis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ERROR CATEGORIZATION (45 Total Errors):

=== FILE UPLOAD/CATEGORY TYPE MISMATCHES (15 errors) ===
1. FileOrganizationDashboard.tsx:56 - Missing FileCategory enum values
2. fileMetadataService.ts:326 - Missing FileCategory enum values
3. cloudinaryHelpers.ts:270 - Missing FileCategory enum values
4. EnhancedFileUploadModal.tsx:189 - Wrong type for folder parameter
5. EnhancedFileUploadModal.tsx:196 - Missing uploaderId, uploaderName
6. EnhancedFileUploadModal.tsx:350 - FileUploadProgress type issue
7. EnhancedFileUploadModal.tsx:352 - FileUploadProgress type issue
8. cspAwareCloudinaryService.ts:231 - String to FileCategory
9. cspAwareCloudinaryService.ts:245 - cloudinaryPublicId doesn't exist
10. cspAwareCloudinaryService.ts:329 - String to FileCategory
11. cspAwareCloudinaryService.ts:343 - storageProvider doesn't exist
12. cloudinaryHelpers.ts:258 - Missing categoryBreakdown
13. cloudinaryManagementService.ts:362 - Missing totalSize, folderBreakdown, categoryBreakdown
14. ShadcnFileManagementDashboard.tsx:143 - recentlyUploadedFiles type issue
15. fileService.ts:40 - createdAt doesn't exist on ProjectFile

=== DASHBOARD WIDGET COMPONENT PROPERTIES (8 errors) ===
16. DashboardLayoutManager.tsx:345 - Missing 'component' property
17. ResizableWidgetContainer.tsx:163 - Missing 'component' property
18. ResizableWidgetContainer.tsx:203 - Missing 'component' property
19. DashboardAnalytics.ts:92 - Property 'i' doesn't exist on WidgetLayout
20-23. (4 more widget-related issues)

=== PROJECT MANAGEMENT TYPE INCONSISTENCIES (8 errors) ===
24. ProjectWorkflow.tsx:184 - ProjectStatus type mismatch
25. ProjectWorkflow.tsx:185 - ProjectStatus type mismatch
26. ProjectTable issues with ProjectStatus
27. FreelancerDashboard.tsx:38 - 'team' property doesn't exist
28. FreelancerDashboard.tsx:265 - Project array type mismatch
29. FreelancerProjectsPage.tsx:12 - 'team' property doesn't exist
30. FreelancerProjectsPage.tsx:36 - Project array type mismatch
31. ProjectDetailsView.tsx:124 - String to ProjectStatus

=== SERVICE/CONTEXT RETURN TYPES (8 errors) ===
32. cloudinaryManagementService.ts:169 - Missing allowDelete, allowComments
33. ClientDashboard.tsx:308 - void vs Promise<void>
34. ClientDashboard.tsx:324 - void vs Promise<void>
35. ClientDashboard.tsx:329 - void vs Promise<void>
36. AppContext.tsx:902 - addActionItemToProject doesn't exist
37. timeTrackingService.ts:72 - isBillable doesn't exist
38. timeTrackingService.ts:76 - projectId doesn't exist
39. (2 more service return type issues)

=== MISCELLANEOUS SMALL TYPE ISSUES (6 errors) ===
40. ChatInterfaceDemo.tsx:188 - Message type mismatch
41. FormEnhancementsDemo.tsx:126 - String vs boolean
42. FormEnhancementsDemo.tsx:156 - String vs boolean
43. HeaderContent.tsx:141 - avatarUrl doesn't exist
44. PerformanceOptimizedCard.tsx:33 - Invalid ContainmentType
45. ProjectCreationDialog issues
46. bottom-sheet.tsx:69 - Interface extension error
47. profileExportImportService.ts errors
48. fileAccessControl.ts:65 - Type comparison error
32 changes: 32 additions & 0 deletions remaining_errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
src/components/ChatInterfaceDemo.tsx(188,9): error TS2322: Type 'import("/home/runner/work/axis2/axis2/src/types").Message[]' is not assignable to type 'import("/home/runner/work/axis2/axis2/src/types/messaging").Message[]'.
src/components/dashboard/DashboardLayoutManager.tsx(345,25): error TS2741: Property 'component' is missing in type 'DashboardWidget' but required in type 'EnhancedWidgetType'.
src/components/dashboard/ResizableWidgetContainer.tsx(163,13): error TS2741: Property 'component' is missing in type 'DashboardWidget' but required in type 'EnhancedWidgetType'.
src/components/dashboard/ResizableWidgetContainer.tsx(203,21): error TS2741: Property 'component' is missing in type 'DashboardWidget' but required in type 'EnhancedWidgetType'.
src/components/demos/FormEnhancementsDemo.tsx(126,7): error TS2322: Type 'string' is not assignable to type 'boolean'.
src/components/demos/FormEnhancementsDemo.tsx(156,7): error TS2322: Type 'string' is not assignable to type 'boolean'.
src/components/navigation/HeaderContent.tsx(141,36): error TS2339: Property 'avatarUrl' does not exist on type 'User | User'.
src/components/performance/PerformanceOptimizedCard.tsx(33,44): error TS2345: Argument of type '"content" | "layout" | "paint" | "strict" | "layout paint"' is not assignable to parameter of type 'ContainmentType'.
src/components/project/ProjectCreationDialog.tsx(99,5): error TS2322: Type '"deliverables"' is not assignable to type '"teamMembers" | "initialTasks"'.
src/components/project/ProjectCreationDialog.tsx(605,56): error TS2345: Argument of type 'string' is not assignable to parameter of type '{ title: string; estimatedHours: number; priority: "high" | "low" | "medium" | "urgent"; assignedTo: string; description?: string; } | { name: string; role: string; email: string; } | ({ title: string; estimatedHours: number; priority: "high" | ... 2 more ... | "urgent"; assignedTo: string; description?: string; } |...'.
src/components/project/ProjectDetailsView.tsx(124,9): error TS2322: Type 'string' is not assignable to type 'ProjectStatus'.
src/components/project/ProjectWorkflow.tsx(184,42): error TS2367: This comparison appears to be unintentional because the types 'import("/home/runner/work/axis2/axis2/src/components/project/ProjectCard").ProjectStatus' and 'import("/home/runner/work/axis2/axis2/src/types").ProjectStatus' have no overlap.
src/components/project/ProjectWorkflow.tsx(185,45): error TS2367: This comparison appears to be unintentional because the types 'import("/home/runner/work/axis2/axis2/src/components/project/ProjectCard").ProjectStatus' and 'import("/home/runner/work/axis2/axis2/src/types").ProjectStatus' have no overlap.
src/components/ui/bottom-sheet.tsx(69,11): error TS2430: Interface 'BottomSheetContentProps' incorrectly extends interface 'Omit<DialogContentProps & RefAttributes<HTMLDivElement>, "ref">'.
src/contexts/AppContext.tsx(902,5): error TS2353: Object literal may only specify known properties, and 'addActionItemToProject' does not exist in type 'AppContextType'.
src/pages/ClientDashboard.tsx(308,61): error TS2322: Type 'void' is not assignable to type 'Promise<void>'.
src/pages/ClientDashboard.tsx(324,45): error TS2322: Type 'void' is not assignable to type 'Promise<void>'.
src/pages/ClientDashboard.tsx(329,50): error TS2322: Type 'void' is not assignable to type 'Promise<void>'.
src/pages/FreelancerDashboard.tsx(38,13): error TS2339: Property 'team' does not exist on type 'Project'.
src/pages/FreelancerDashboard.tsx(265,19): error TS2322: Type 'import("/home/runner/work/axis2/axis2/src/types").Project[]' is not assignable to type 'import("/home/runner/work/axis2/axis2/src/components/project/ProjectTable").Project[]'.
src/pages/FreelancerProjectsPage.tsx(12,13): error TS2339: Property 'team' does not exist on type 'Project'.
src/pages/FreelancerProjectsPage.tsx(36,15): error TS2322: Type 'import("/home/runner/work/axis2/axis2/src/types").Project[]' is not assignable to type 'import("/home/runner/work/axis2/axis2/src/components/project/ProjectTable").Project[]'.
src/services/cloudinaryManagementService.ts(159,13): error TS2739: Type '{ id: string; name: string; url: string; size: number; type: string; uploadedAt: Timestamp; uploadedBy: string; uploadedByName: string; projectId: string; permissions: { level: FilePermissionLevel; ... 4 more ...; allowComments: true; }; ... 4 more ...; cloudinaryPublicId: string; }' is missing the following properties from type 'ProjectFile': uploaderId, uploaderName
src/services/profileExportImportService.ts(193,11): error TS2322: Type 'any' is not assignable to type 'never'.
src/services/profileExportImportService.ts(196,11): error TS2322: Type 'any' is not assignable to type 'never'.
src/services/profileExportImportService.ts(394,7): error TS2322: Type 'string | number | boolean | string[] | Timestamp | { profileCompleted: boolean; skillsAdded: boolean; firstProjectAssigned: boolean; firstTimeLogged: boolean; completedAt?: Timestamp; } | { ...; }' is not assignable to type 'never'.
src/services/timeTrackingService.ts(72,32): error TS2339: Property 'isBillable' does not exist on type 'TimeLog'.
src/services/timeTrackingService.ts(76,13): error TS2353: Object literal may only specify known properties, and 'projectId' does not exist in type 'TimeTrackingReport'.
src/utils/DashboardAnalytics.ts(92,55): error TS2339: Property 'i' does not exist on type 'WidgetLayout'.
src/utils/cspAwareCloudinaryService.ts(231,39): error TS2304: Cannot find name 'FileCategory'.
src/utils/cspAwareCloudinaryService.ts(331,47): error TS2304: Cannot find name 'FileCategory'.
src/utils/fileAccessControl.ts(65,44): error TS2367: This comparison appears to be unintentional because the types 'UserRole.FREELANCER | UserRole.CLIENT' and 'UserRole.ADMIN' have no overlap.
18 changes: 17 additions & 1 deletion src/components/dashboard/EnhancedDashboardWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { DashboardWidget as WidgetType, WidgetProps, WidgetError } from '../../t

// Extended widget type with component
interface EnhancedWidgetType extends WidgetType {
component: React.ComponentType<WidgetProps>;
component?: React.ComponentType<WidgetProps>;
}

interface EnhancedDashboardWidgetProps {
Expand Down Expand Up @@ -165,6 +165,22 @@ export const EnhancedDashboardWidget: React.FC<EnhancedDashboardWidgetProps> = (
isVisible
};

// If no component is provided, show a placeholder
if (!WidgetComponent) {
return (
<div className={`h-full ${className}`}>
<Card className="h-full flex flex-col">
<CardHeader className="pb-2 flex-shrink-0">
<CardTitle className="text-sm font-medium">{widget.title}</CardTitle>
</CardHeader>
<CardContent className="flex-1 flex items-center justify-center text-muted-foreground">
<p className="text-sm">Widget component not configured</p>
</CardContent>
</Card>
</div>
);
}

return (
<div className={`h-full ${className}`}>
<Card className="h-full flex flex-col">
Expand Down
4 changes: 2 additions & 2 deletions src/components/demos/FormEnhancementsDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const FormEnhancementsDemo: React.FC = () => {
/>
</div>
),
isValid: formData.personalInfo.name && formData.personalInfo.email,
isValid: !!(formData.personalInfo.name && formData.personalInfo.email),
},
{
id: "address",
Expand Down Expand Up @@ -153,7 +153,7 @@ export const FormEnhancementsDemo: React.FC = () => {
/>
</div>
),
isValid: formData.address.street && formData.address.city,
isValid: !!(formData.address.street && formData.address.city),
},
{
id: "preferences",
Expand Down
Loading