Fix up a ton of pages, settings/help/wiki need improvements, report generation needs slight updates. Otherwise completed

This commit is contained in:
Ra
2025-08-25 02:08:21 -07:00
parent 1ed3e16ff6
commit df7020cdd4
29 changed files with 3671 additions and 4684 deletions

View File

@@ -1,4 +1,4 @@
import { Employee, Report, Submission, FaqItem, CompanyReport } from './types';
import { Employee, EmployeeReport, Submission, FaqItem, CompanyReport } from './types';
// URL Configuration - reads from environment variables with fallbacks
export const SITE_URL = import.meta.env.VITE_SITE_URL || 'http://localhost:5173';
@@ -24,7 +24,7 @@ if (import.meta.env.DEV) {
export const EMPLOYEES: Employee[] = [];
// DEPRECATED: Sample report data - real reports should be generated via /generateEmployeeReport API
export const REPORT_DATA: Report = {
export const REPORT_DATA: EmployeeReport = {
employeeId: 'sample',
department: 'Sample Department',
role: 'Sample Role',
@@ -45,11 +45,14 @@ export const REPORT_DATA: Report = {
weaknesses: [
{ isCritical: false, description: 'Sample data - use AI-generated reports' }
],
opportunities: {
roleAdjustment: 'Sample data',
accountabilitySupport: 'Sample data',
},
opportunities: [
{
roleAdjustment: 'Sample data',
accountabilitySupport: 'Sample data',
}
],
risks: ['Sample data - use AI-generated reports'],
recommendations: ['Sample recommendation - use AI-generated reports'],
recommendation: {
action: 'Keep',
details: ['Sample data - use AI-generated reports'],
@@ -109,22 +112,159 @@ export const SAMPLE_COMPANY_REPORT: CompanyReport = {
id: 'placeholder-report',
createdAt: Date.now(),
overview: {
totalEmployees: 0,
departmentBreakdown: [],
submissionRate: 0,
totalEmployees: 8,
departmentBreakdown: [
{ department: 'Campaigns', count: 3 },
{ department: 'Social Media', count: 2 },
{ department: 'Creative', count: 2 },
{ department: 'Tech', count: 1 }
],
submissionRate: 87.5,
lastUpdated: Date.now(),
averagePerformanceScore: 0,
averagePerformanceScore: 8.2,
riskLevel: 'Low'
},
gradingBreakdown: [],
weaknesses: [
{ title: 'Lack of Structure', description: 'People are confused about their roles. No one knows who\'s responsible.' },
{ title: 'Communication Gaps', description: 'Information doesn\'t flow effectively between departments.' }
],
gradingBreakdown: {
departmentNameShort: 'Campaigns',
departmentName: 'Campaigns Department',
lead: 'Sarah Johnson',
support: 'Mike Chen',
departmentGrade: 'A',
executiveSummary: 'Campaigns team shows exceptional performance with strong collaboration and innovative approaches to client work.',
teamScores: [
{
employeeName: 'Sarah Johnson',
grade: 'A+',
reliability: 9,
roleFit: 10,
scalability: 8,
output: 9,
initiative: 9
},
{
employeeName: 'Mike Chen',
grade: 'A',
reliability: 8,
roleFit: 9,
scalability: 7,
output: 8,
initiative: 8
},
{
employeeName: 'Lisa Wong',
grade: 'B+',
reliability: 7,
roleFit: 8,
scalability: 6,
output: 7,
initiative: 7
},
{
employeeName: 'Alex Rivera',
grade: 'A',
reliability: 8,
roleFit: 9,
scalability: 7,
output: 8,
initiative: 8
},
{
employeeName: 'Jamie Park',
grade: 'B',
reliability: 6,
roleFit: 7,
scalability: 6,
output: 6,
initiative: 7
},
{
employeeName: 'Taylor Smith',
grade: 'A',
reliability: 9,
roleFit: 9,
scalability: 8,
output: 9,
initiative: 8
},
{
employeeName: 'Jordan Lee',
grade: 'B+',
reliability: 7,
roleFit: 8,
scalability: 7,
output: 8,
initiative: 7
},
{
employeeName: 'Casey Johnson',
grade: 'A+',
reliability: 10,
roleFit: 9,
scalability: 9,
output: 10,
initiative: 9
}
]
},
operatingPlan: { nextQuarterGoals: [], keyInitiatives: [], resourceNeeds: [], riskMitigation: [] },
personnelChanges: { newHires: [], promotions: [], departures: [] },
personnelChanges: {
newHires: [
{ name: 'Emma Wilson', department: 'Creative', role: 'Graphic Designer', impact: 'Will strengthen visual design capabilities' }
],
promotions: [
{ name: 'Sarah Johnson', fromRole: 'Campaign Manager', toRole: 'Senior Campaign Manager', impact: 'Will lead larger client accounts' }
],
departures: []
},
keyPersonnelChanges: [],
immediateHiringNeeds: [],
forwardOperatingPlan: {
quarterlyGoals: [],
resourceNeeds: [],
riskMitigation: []
immediateHiringNeeds: [
{ department: 'Tech', role: 'Frontend Developer', priority: 'High', reasoning: 'Need to expand web development capacity for growing client demands' },
{ department: 'Social Media', role: 'Content Creator', priority: 'Medium', reasoning: 'Additional support needed for video content production' }
],
recommendations: [
'Hire additional frontend developer for tech team expansion',
'Implement cross-departmental collaboration sessions',
'Develop leadership training program for senior staff',
'Establish mentorship program for junior employees'
],
forwardOperatingPlan: [
{
title: 'Q1 Client Growth Initiative',
details: ['Expand campaign team by 2 members', 'Implement new project management system', 'Launch client referral program']
},
{
title: 'Technology Infrastructure',
details: ['Upgrade development tools', 'Implement automated testing', 'Enhance security protocols']
}
],
strengths: [
'Strong creative vision and execution across all projects',
'Excellent client satisfaction ratings (4.8/5)',
'Highly collaborative team culture',
'Innovative approach to campaign development',
'Reliable project delivery within deadlines'
],
organizationalImpactSummary: {
missionCritical: [
{ employeeName: 'Sarah Johnson', impact: 'Lead Campaign Manager', description: 'Manages top-tier client relationships and drives 40% of company revenue' },
{ employeeName: 'Casey Johnson', impact: 'Tech Infrastructure', description: 'Maintains all technical systems and client delivery platforms' }
],
highlyValuable: [
{ employeeName: 'Alex Rivera', impact: 'Social Media Strategy', description: 'Develops social strategies that increase client engagement by 150%' },
{ employeeName: 'Taylor Smith', impact: 'Creative Director', description: 'Ensures brand consistency and award-winning creative output' }
],
coreSupport: [
{ employeeName: 'Mike Chen', impact: 'Campaign Support', description: 'Reliable execution of campaign tasks and client communication' },
{ employeeName: 'Jordan Lee', impact: 'Design Support', description: 'Produces high-quality visual assets and maintains design standards' }
],
lowCriticality: [
{ employeeName: 'Jamie Park', impact: 'Content Assistant', description: 'Supports content creation with room for skill development' },
{ employeeName: 'Morgan Davis', impact: 'Administrative Support', description: 'Handles routine operations and documentation' }
]
},
organizationalStrengths: [],
organizationalRisks: [],