Add helper functions for processing real project and achievement data
cgen-3ea874af9b1b4e709a85751f0df92930
This commit is contained in:
parent
18539850fa
commit
9bbe6bb428
1 changed files with 28 additions and 0 deletions
|
|
@ -161,6 +161,34 @@ export default function Dashboard() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const getProgressPercentage = (project: any) => {
|
||||||
|
switch (project.status) {
|
||||||
|
case 'planning': return 20;
|
||||||
|
case 'in_progress': return 60;
|
||||||
|
case 'completed': return 100;
|
||||||
|
default: return 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const getPriorityFromTech = (technologies: string[]) => {
|
||||||
|
if (technologies.some(tech => tech.toLowerCase().includes('ai') || tech.toLowerCase().includes('blockchain'))) {
|
||||||
|
return 'High';
|
||||||
|
}
|
||||||
|
return 'Medium';
|
||||||
|
};
|
||||||
|
|
||||||
|
const getAchievementIcon = (iconName: string) => {
|
||||||
|
switch (iconName.toLowerCase()) {
|
||||||
|
case 'code': return Code;
|
||||||
|
case 'users': return Users;
|
||||||
|
case 'rocket': return Rocket;
|
||||||
|
case 'database': return Database;
|
||||||
|
case 'shield': return Shield;
|
||||||
|
case 'trophy': return Trophy;
|
||||||
|
default: return Star;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const quickActions = [
|
const quickActions = [
|
||||||
{
|
{
|
||||||
title: "Start New Project",
|
title: "Start New Project",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue