Skip to content

Commit 6b57535

Browse files
authored
Merge pull request #56 from No-Country-simulation/Benja-Dashboard-user-platform
Benja dashboard user platform
2 parents 4b921bb + 39b654f commit 6b57535

File tree

13 files changed

+190
-105
lines changed

13 files changed

+190
-105
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"git.ignoreLimitWarning": true
3+
}

frontend/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/admin/
2+
/landing/

frontend/platform/app/(authenticated)/dashboard/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import DashboardPage from '@/features/dashboard/Dashboard';
1+
import DashboardPage from "@/features/dashboard/Dashboard";
22

33
export default function DashboardRoute() {
44
return <DashboardPage />;
Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1-
'use client';
1+
"use client";
22

3-
import WelcomeHeader from './components/WelcomeHeader';
4-
import ResourceGrid from './components/ResourceGrid';
5-
import { useResourceCategories } from './hooks/useResourceCategories';
3+
import PageHeader from "@/shared/layout/sectionheader/pageHeader";
4+
import ResourceGrid from "./components/ResourceGrid";
5+
import { useResourceCategories } from "./hooks/useResourceCategories";
6+
import { useResourceExplore } from "./hooks/useResourceExplore";
7+
import ResourceExploreGrid from "./components/ResourceExploreGrid";
68

79
export default function DashboardPage() {
810
const resourceCategories = useResourceCategories();
11+
const resourceExplore = useResourceExplore();
912

1013
return (
11-
<div className='p-8'>
12-
<WelcomeHeader />
14+
<div className="px-7">
15+
<PageHeader sectionKey="dashboard" />
1316
<ResourceGrid categories={resourceCategories} />
17+
<div className="h-[23.2vh] flex flex-col justify-center">
18+
<h2 className="text-3xl font-bold mb-2">Contenido destacado</h2>
19+
<p className="text-gray-600 text-lg">
20+
Explora todos los recursos disponibles para mejorar tus habilidades
21+
cognitivas
22+
</p>
23+
</div>
24+
<ResourceExploreGrid categories={resourceExplore} />
1425
</div>
1526
);
1627
}

frontend/platform/features/dashboard/components/ResourceCard.jsx

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
1-
'use client';
1+
"use client";
22

3-
import Link from 'next/link';
3+
import Link from "next/link";
44
import {
55
Card,
66
CardContent,
77
CardDescription,
88
CardHeader,
9-
CardTitle
10-
} from '@/shared/ui/card';
9+
CardTitle,
10+
} from "@/shared/ui/card";
11+
import { Lightbulb } from "lucide-react";
1112

1213
export default function ResourceCard({ category }) {
1314
const { title, description, icon: Icon, path, color } = category;
1415

1516
return (
16-
<Card className='hover:shadow-md transition-shadow'>
17-
<CardHeader className='flex flex-row items-center gap-4 pb-2'>
18-
<div className={`p-2 rounded-full ${color}`}>
19-
<Icon className='h-5 w-5' />
20-
</div>
21-
<CardTitle className='text-xl'>{title}</CardTitle>
22-
</CardHeader>
23-
<CardContent>
24-
<CardDescription className='text-sm text-gray-500'>
17+
<Card className="hover:shadow-md transition-shadow !bg-[#E9E9F1] h-[12vh] w-[21.1vw] mr-7 flex border border-[#838394] rounded-sm">
18+
<div className={`w-20 flex items-center justify-center`}>
19+
<Lightbulb className="h-[50%] w-auto stroke-[#15032A] " />
20+
</div>
21+
<CardContent className="flex flex-col justify-center h-full w-full !p-0">
22+
<CardTitle className="text-xl text-[#15032A] mb-1">{title}</CardTitle>
23+
<CardDescription className="text-xs text-[#656573]-500">
2524
{description}
2625
</CardDescription>
27-
<Link
28-
href={path}
29-
className='inline-block mt-4 text-primary hover:underline'
30-
>
31-
Explorar →
32-
</Link>
3326
</CardContent>
3427
</Card>
3528
);
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
"use client";
2+
3+
import Link from "next/link";
4+
import {
5+
Card,
6+
CardContent,
7+
CardDescription,
8+
CardHeader,
9+
CardTitle,
10+
} from "@/shared/ui/card";
11+
12+
export default function ResourceExploreCard({ category }) {
13+
const { title, description, icon: Icon, path, color } = category;
14+
15+
return (
16+
<Card className="hover:shadow-md transition-shadow w-[13.8vw] h-[26.9vh] mr-4 p-4 border border-[#C6C6DA] rounded-sm flex flex-col ">
17+
<div className="bg-[#E9E9F1] p-1">
18+
<Icon className="h-5 w-5 stroke-[#15032A]" />
19+
</div>
20+
<CardHeader className="!p-0 mt-2">
21+
<CardTitle className="!text-[1rem]">{title}</CardTitle>
22+
</CardHeader>
23+
24+
<CardContent className={"!p-0 mt-2"}>
25+
<CardDescription className="text-xs text-[#A7A7BE] ">
26+
{description}
27+
</CardDescription>
28+
</CardContent>
29+
<Link
30+
href={path}
31+
className="inline-block text-[#15032A] hover:underline text-xs mt-auto"
32+
>
33+
<b>Explorar →</b>
34+
</Link>
35+
</Card>
36+
);
37+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"use client";
2+
3+
import ResourceExploreCard from "./ResourceExploreCard";
4+
5+
export default function ResourceExploreGrid({ categories }) {
6+
return (
7+
<div className="flex">
8+
{categories.map((category, index) => (
9+
<ResourceExploreCard key={index} category={category} />
10+
))}
11+
</div>
12+
);
13+
}

frontend/platform/features/dashboard/components/ResourceGrid.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'use client';
1+
"use client";
22

3-
import ResourceCard from './ResourceCard';
3+
import ResourceCard from "./ResourceCard";
44

55
export default function ResourceGrid({ categories }) {
66
return (
7-
<div className='grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6'>
7+
<div className="flex">
88
{categories.map((category, index) => (
99
<ResourceCard key={index} category={category} />
1010
))}

frontend/platform/features/dashboard/components/WelcomeHeader.jsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

frontend/platform/features/dashboard/hooks/useResourceCategories.js

Lines changed: 16 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -5,71 +5,32 @@ import {
55
Images,
66
PenTool,
77
MessageCircle,
8-
Settings
9-
} from 'lucide-react';
8+
Settings,
9+
} from "lucide-react";
1010

1111
export function useResourceCategories() {
1212
const resourceCategories = [
1313
{
14-
title: 'Material Educativo',
15-
description:
16-
'Documentos, presentaciones y guías para usar Play Attention.',
14+
title: "Enfoca tu atención",
15+
description: "Enfoca tu atención",
1716
icon: FileText,
18-
path: '/educational-material',
19-
color: 'bg-blue-100 text-blue-700'
17+
path: "/educational-material",
18+
color: "bg-blue-100 text-blue-700",
2019
},
2120
{
22-
title: 'Tutoriales',
23-
description: 'Videos paso a paso para la instalación y uso del sistema.',
24-
icon: Video,
25-
path: '/tutorials',
26-
color: 'bg-green-100 text-green-700'
27-
},
28-
{
29-
title: 'Artículos Médicos',
30-
description:
31-
'Contenido clínicamente validado sobre TDAH y mejora cognitiva.',
32-
icon: BookOpen,
33-
path: '/medical-articles',
34-
color: 'bg-purple-100 text-purple-700'
35-
},
36-
{
37-
title: 'Videos de Demostración',
38-
description: 'Demostraciones de ejercicios e historias de éxito.',
39-
icon: Video,
40-
path: '/demo-videos',
41-
color: 'bg-red-100 text-red-700'
42-
},
43-
{
44-
title: 'Material de Marketing',
45-
description: 'Banners, imágenes y folletos digitales para profesionales.',
46-
icon: Images,
47-
path: '/marketing-material',
48-
color: 'bg-yellow-100 text-yellow-700'
49-
},
50-
{
51-
title: 'Actividades',
52-
description:
53-
'Ejercicios interactivos complementarios para el entrenamiento cognitivo.',
54-
icon: PenTool,
55-
path: '/activities',
56-
color: 'bg-indigo-100 text-indigo-700'
21+
title: "Enfoca tu atención",
22+
description: "Enfoca tu atención",
23+
icon: FileText,
24+
path: "/educational-material",
25+
color: "bg-blue-100 text-blue-700",
5726
},
5827
{
59-
title: 'Soporte',
60-
description:
61-
'Chat en vivo, tickets y formularios de contacto para asistencia.',
62-
icon: MessageCircle,
63-
path: '/support',
64-
color: 'bg-cyan-100 text-cyan-700'
28+
title: "Enfoca tu atención",
29+
description: "Enfoca tu atención",
30+
icon: FileText,
31+
path: "/educational-material",
32+
color: "bg-blue-100 text-blue-700",
6533
},
66-
{
67-
title: 'Configuración',
68-
description: 'Administra tu cuenta y preferencias.',
69-
icon: Settings,
70-
path: '/settings',
71-
color: 'bg-gray-100 text-gray-700'
72-
}
7334
];
7435

7536
return resourceCategories;
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import {
2+
FileText,
3+
Video,
4+
BookOpen,
5+
Images,
6+
PenTool,
7+
MessageCircle,
8+
Settings,
9+
} from "lucide-react";
10+
11+
export function useResourceExplore() {
12+
const resourceExplore = [
13+
{
14+
title: "Material Educativo",
15+
description:
16+
"Documentos, presentaciones y guías para usar Play Attention.",
17+
icon: FileText,
18+
path: "/educational-material",
19+
},
20+
{
21+
title: "Tutoriales",
22+
description: "Videos paso a paso para la instalación y uso del sistema.",
23+
icon: Video,
24+
path: "/tutorials",
25+
},
26+
{
27+
title: "Artículos Médicos",
28+
description:
29+
"Contenido clínicamente validado sobre TDAH y mejora cognitiva.",
30+
icon: BookOpen,
31+
path: "/medical-articles",
32+
},
33+
{
34+
title: "Videos de Demostración",
35+
description: "Demostraciones de ejercicios e historias de éxito.",
36+
icon: Video,
37+
path: "/demo-videos",
38+
},
39+
40+
{
41+
title: "Actividades",
42+
description:
43+
"Ejercicios interactivos complementarios para el entrenamiento cognitivo.",
44+
icon: PenTool,
45+
path: "/activities",
46+
},
47+
];
48+
49+
return resourceExplore;
50+
}

frontend/platform/package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"use client";
2+
3+
const pageMetadata = {
4+
dashboard: {
5+
title: "Bienvenido a Play Attention",
6+
description:
7+
"Accede a recursos y materiales para mejorar las habilidades cognitivas y funciones ejecutivas.",
8+
},
9+
materialEducativo: {
10+
title: "Material Educativo",
11+
description:
12+
"Documentos, presentaciones y guías para usar Play Attention de manera efectiva.",
13+
},
14+
};
15+
16+
export default function PageHeader({ sectionKey }) {
17+
const { title, description } = pageMetadata[sectionKey] || {
18+
title: "Sección no encontrada",
19+
description: "",
20+
};
21+
22+
return (
23+
<div className=" h-[20vh] flex flex-col justify-center">
24+
<h1 className="text-4xl font-bold mb-2">{title}</h1>
25+
<p className="text-gray-600 text-lg">{description}</p>
26+
</div>
27+
);
28+
}

0 commit comments

Comments
 (0)