273 lines
10 KiB
TypeScript
273 lines
10 KiB
TypeScript
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';
|
|
|
|
// API Base URL - auto-detect development vs production
|
|
const isLocalhost = typeof window !== 'undefined' &&
|
|
(window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1');
|
|
|
|
// Use Firebase Functions emulator in development, production functions in production
|
|
export const API_URL = isLocalhost
|
|
? 'http://127.0.0.1:5002/auditly-c0027/us-central1' // Firebase Functions Emulator
|
|
: 'https://us-central1-auditly-c0027.cloudfunctions.net'; // Production Firebase Functions
|
|
|
|
// Log URL configuration in development
|
|
if (import.meta.env.DEV) {
|
|
console.log('🌐 Frontend URL Configuration:');
|
|
console.log(` SITE_URL: ${SITE_URL}`);
|
|
console.log(` API_URL: ${API_URL}`);
|
|
}
|
|
|
|
// DEPRECATED: These are legacy sample data that should not be used in production
|
|
// Real data should be generated via AI backend calls or user input
|
|
export const EMPLOYEES: Employee[] = [];
|
|
|
|
// DEPRECATED: Sample report data - real reports should be generated via /generateEmployeeReport API
|
|
export const REPORT_DATA: EmployeeReport = {
|
|
employeeId: 'sample',
|
|
department: 'Sample Department',
|
|
role: 'Sample Role',
|
|
roleAndOutput: {
|
|
responsibilities: 'This is sample data. Real reports are generated via AI.',
|
|
clarityOnRole: 'Sample data',
|
|
selfRatedOutput: 'Sample data',
|
|
recurringTasks: 'Sample data',
|
|
},
|
|
insights: {
|
|
personalityTraits: 'Sample data - use AI-generated reports',
|
|
psychologicalIndicators: ['Sample data'],
|
|
selfAwareness: 'Sample data',
|
|
emotionalResponses: 'Sample data',
|
|
growthDesire: 'Sample data',
|
|
},
|
|
strengths: ['Sample data - use AI-generated reports'],
|
|
weaknesses: [
|
|
{ isCritical: false, description: 'Sample data - use AI-generated reports' }
|
|
],
|
|
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'],
|
|
},
|
|
grading: [],
|
|
};
|
|
|
|
// DEPRECATED: Sample submission data - real submissions come from employee questionnaires
|
|
export const SUBMISSIONS_DATA: Submission = {
|
|
employeeId: 'sample',
|
|
answers: [
|
|
{
|
|
question: 'Sample question',
|
|
answer: 'Sample answer - real data comes from employee questionnaires',
|
|
}
|
|
],
|
|
};
|
|
|
|
export const FAQ_DATA: FaqItem[] = [
|
|
{
|
|
question: "What is the process for submitting a support ticket?",
|
|
answer: "Team members will undergo evaluations every three months, focusing on their performance, teamwork, and communication skills. Role advancements will be considered at these intervals."
|
|
},
|
|
{
|
|
question: "How can I reset my password?",
|
|
answer: "You can reset your password by clicking the 'Forgot Password' link on the login page. An email will be sent to you with instructions."
|
|
},
|
|
{
|
|
question: "What are the criteria for performance reviews?",
|
|
answer: "Performance reviews are based on a combination of self-assessment, peer feedback, and manager evaluation. Key criteria include goal achievement, collaboration, and contribution to company values."
|
|
},
|
|
{
|
|
question: "How can I access the company's training resources?",
|
|
answer: "All training resources are available in the 'Company Wiki' section of the platform. You can find documents, videos, and links to external courses."
|
|
},
|
|
{
|
|
question: "What should I do if I encounter a technical issue?",
|
|
answer: "For any technical issues, please submit a ticket through the 'Help & Support' page. Our IT team will get back to you within 24 hours."
|
|
},
|
|
{
|
|
question: "How do I provide feedback on team projects?",
|
|
answer: "Feedback can be provided directly within the project management tool or during scheduled team retrospectives. We encourage open and constructive communication."
|
|
}
|
|
];
|
|
|
|
export const CHAT_STARTERS = [
|
|
"Summarize the latest employee reports.",
|
|
"What are the company's organizational strengths?",
|
|
"Identify any risks in our current workforce.",
|
|
"Which employees should be considered for promotion?",
|
|
"What are our immediate hiring needs?",
|
|
"How can we improve team performance?"
|
|
];
|
|
|
|
// DEPRECATED: This should not be used in production - real company reports are AI-generated
|
|
export const SAMPLE_COMPANY_REPORT: CompanyReport = {
|
|
id: 'placeholder-report',
|
|
createdAt: Date.now(),
|
|
overview: {
|
|
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: 8.2,
|
|
riskLevel: 'Low'
|
|
},
|
|
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: [
|
|
{ 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: [
|
|
{ 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: [],
|
|
gradingOverview: {},
|
|
executiveSummary: `Welcome to Auditly! Generate your first AI-powered company report by inviting employees and completing the onboarding process.`
|
|
}; |