diff --git a/app/(base)/projects/[projectId]/page.tsx b/app/(base)/projects/[projectId]/page.tsx index 01ccadb..0c4d1b4 100644 --- a/app/(base)/projects/[projectId]/page.tsx +++ b/app/(base)/projects/[projectId]/page.tsx @@ -4,7 +4,11 @@ import React, { useState } from "react"; import { RadarChart, AreaChart } from "@mantine/charts"; import GaugeChart from "@/components/GaugeChart"; import { useMutation, useQuery } from "@tanstack/react-query"; -import { deleteProjectById, updateFeedback } from "@/services/project"; +import { + deleteProjectById, + getProjectById, + updateFeedback, +} from "@/services/project"; import { useRouter } from "next/navigation"; import { getUserRole } from "@/services/user"; import { @@ -13,6 +17,7 @@ import { } from "@/services/sprintSurvey"; import ChevronDownIcon from "@/components/icons/ChevronDownIcon"; +import Loader from "@/components/Loader"; const Project = ({ params }: { params: { projectId: string } }) => { const router = useRouter(); @@ -34,6 +39,11 @@ const Project = ({ params }: { params: { projectId: string } }) => { queryFn: () => getUserRole(), }); + const { data: projectData, isLoading: isLoadingProjectData } = useQuery({ + queryKey: ["project-data", projectId], + queryFn: () => getProjectById(projectId), + }); + const { data: statistics, isLoading: isLoadingStatistics } = useQuery({ queryKey: ["project-overall-statistics", projectId], queryFn: () => getOverallStatistics(projectId), @@ -125,15 +135,23 @@ const Project = ({ params }: { params: { projectId: string } }) => { : []; const progressBarPercentage = 74; - if (isLoadingStatistics || isLoadingDetailedStatistics) { - return
Loading...
; + if ( + isLoadingStatistics || + isLoadingDetailedStatistics || + isLoadingProjectData + ) { + return ( +
+ +
+ ); } console.log(gaugeData); return (
-

Project 1

+

{projectData?.name}

{userRoleQuery.data && (userRoleQuery.data === "MANAGER" || userRoleQuery.data === "ADMIN") && ( diff --git a/components/Dashboard/DashboardEmotionsSection.tsx b/components/Dashboard/DashboardEmotionsSection.tsx index c4c970b..aee1e50 100644 --- a/components/Dashboard/DashboardEmotionsSection.tsx +++ b/components/Dashboard/DashboardEmotionsSection.tsx @@ -28,7 +28,7 @@ const DashboardEmotionsSection: React.FC = ({ {emotionsData.map((circle, index) => (
diff --git a/components/InfoToolTip.tsx b/components/InfoToolTip.tsx index dff245f..4fc5438 100644 --- a/components/InfoToolTip.tsx +++ b/components/InfoToolTip.tsx @@ -24,7 +24,7 @@ const InfoToolTip = ({ description, size }: InfoToolTipProps) => { } return ( -
+ /*
} position="left-start" @@ -41,7 +41,8 @@ const InfoToolTip = ({ description, size }: InfoToolTipProps) => { /> -
+
*/ +
); }; diff --git a/components/Profile/ProfileSection.tsx b/components/Profile/ProfileSection.tsx index 802080f..c75874a 100644 --- a/components/Profile/ProfileSection.tsx +++ b/components/Profile/ProfileSection.tsx @@ -39,7 +39,7 @@ const ProfileSection: React.FC = ({ }); return ( -
+

{title}

{showMore && ( diff --git a/components/ProjectCard.tsx b/components/ProjectCard.tsx index 92a1dba..1f824d9 100644 --- a/components/ProjectCard.tsx +++ b/components/ProjectCard.tsx @@ -30,15 +30,15 @@ export default function ProjectCard({ } return ( -
-
+
+

{name}

{date &&

{date}

} {description && (

{description}

)}

In progress

-
+
    {coworkersQuery.data.map((coworker, index) => (
  • diff --git a/components/ProjectsCarousel.tsx b/components/ProjectsCarousel.tsx index 86e7f62..0a4548b 100644 --- a/components/ProjectsCarousel.tsx +++ b/components/ProjectsCarousel.tsx @@ -26,7 +26,7 @@ export default function ProjectsCarousel({ userId }: { userId: string }) { } return ( -
      +
        {projectsQuery.data.map((project, index) => (
      • diff --git a/components/modals/ruler/RulerStepOne.tsx b/components/modals/ruler/RulerStepOne.tsx index 6b14278..1cfa730 100644 --- a/components/modals/ruler/RulerStepOne.tsx +++ b/components/modals/ruler/RulerStepOne.tsx @@ -149,10 +149,38 @@ const RulerStepOne = ({ data-testid="ruler-step-one" >

        How do you feel today?

        +
        +

        Low

        +
        +

        Energy

        +
        +
        +
        +
        +

        High

        +
        + +
        +

        Low

        +
        +

        Pleasentness

        +
        +
        +
        +
        +

        High

        +
        +
        -
        +
        {rulerEmotionsMatrix.map((row, rowIndex) => ( -
        +
        {row.map((emotion: Emotion, colIndex) => (