diff --git a/lang/en/projects.php b/lang/en/projects.php
index 8d65c43..2303c1e 100644
--- a/lang/en/projects.php
+++ b/lang/en/projects.php
@@ -8,6 +8,11 @@
'title' => '',
'activity' => '',
'comments' => '',
+ 'tabs' => [
+ 'equipo' => 'Team',
+ 'actividad' => 'Activity',
+ 'comentarios' => 'Comments',
+ ],
],
'dashboard' => [
'title' => '',
diff --git a/lang/es/projects.php b/lang/es/projects.php
index f998be2..952c5f0 100644
--- a/lang/es/projects.php
+++ b/lang/es/projects.php
@@ -8,6 +8,11 @@
'title' => 'Proyecto',
'activity' => 'Actividad del proyecto',
'comments' => 'Comentarios',
+ 'tabs' => [
+ 'equipo' => 'Equipo',
+ 'actividad' => 'Actividad',
+ 'comentarios' => 'Comentarios',
+ ],
],
'dashboard' => [
'title' => 'Dashboard',
diff --git a/resources/js/components/ui/proyectos/ProjectRoles.tsx b/resources/js/components/ui/proyectos/ProjectRoles.tsx
index cdf5d6a..45138c7 100644
--- a/resources/js/components/ui/proyectos/ProjectRoles.tsx
+++ b/resources/js/components/ui/proyectos/ProjectRoles.tsx
@@ -439,6 +439,41 @@ export default function ProjectRoles({
/>
)}
+
+ {/* Team members */}
+ {(() => {
+ const members = roles.flatMap((role) =>
+ role.volunteers.map((v) => ({ ...v, roleTitle: role.title })),
+ )
+ if (members.length === 0) return null
+ return (
+
+
{t('projects.team.title')}
+
+
+ )
+ })()}
('equipo');
const [commentsList, setCommentsList] = useState(null);
const [commentsLoading, setCommentsLoading] = useState(false);
@@ -113,11 +116,19 @@ export default function ProyectoShow({
};
useEffect(() => {
- loadComments().catch(() => {
- setCommentsLoading(false);
- setCommentsList([]);
- });
- }, []);
+ if (activeTab === 'comentarios') {
+ loadComments().catch(() => {
+ setCommentsLoading(false);
+ setCommentsList([]);
+ });
+ }
+ }, [activeTab]);
+
+ const tabs: { id: TabId; labelKey: string }[] = [
+ { id: 'equipo', labelKey: 'projects.show.tabs.equipo' },
+ { id: 'actividad', labelKey: 'projects.show.tabs.actividad' },
+ { id: 'comentarios', labelKey: 'projects.show.tabs.comentarios' },
+ ];
return (
@@ -171,71 +182,94 @@ export default function ProyectoShow({
isOwner={isOwner}
projectId={project.id}
/>
+
- {/* Progress (with stage transition actions for owner) */}
-
-
- {isOwner &&
- project.allowedTransitions.length > 0 && (
-
- )}
-
-
+ {/* Tab navigation */}
+
+
+
- {/* Roles */}
-
+
+ {/* Tab: Equipo */}
+ {activeTab === 'equipo' && (
+
+ {/* Progress (with stage transition actions for owner) */}
+
+ {isOwner &&
+ project.allowedTransitions.length > 0 && (
+
+ )}
+
- {/* Team */}
-
-
- {/* Timeline */}
-
-
- {t('projects.show.activity')}
-
-
-
+ {/* Roles buscados */}
+
- {/* Comments */}
-
-
- {t('projects.show.comments')}
-
- {commentsLoading ? (
-
- ) : commentsList !== null ? (
-
+
+ )}
+
+ {/* Tab: Actividad */}
+ {activeTab === 'actividad' && (
+
+ )}
+
+ {/* Tab: Comentarios */}
+ {activeTab === 'comentarios' && (
+
+ {commentsLoading ? (
+
+ ) : commentsList !== null ? (
-
- ) : null}
-
+ ) : null}
+
+ )}
diff --git a/tests/Browser/ProjectTimelineComposerTest.php b/tests/Browser/ProjectTimelineComposerTest.php
index d6843a6..c446e49 100644
--- a/tests/Browser/ProjectTimelineComposerTest.php
+++ b/tests/Browser/ProjectTimelineComposerTest.php
@@ -22,6 +22,7 @@
->press('Iniciar sesión');
visit("/projects/{$post->id}")
+ ->click('Actividad')
->click('Actualización')
->fill('body', 'shipping the timeline composer')
->press('Publicar')