Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvemts finish filtering#225 #229

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/app/categories/[categoryId]/project-ranking/done/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ const ProjectRankingDonePage = () => {
width={250}
height={250}
/>
<p className='mx-auto text-lg font-bold'>Filtering done!</p>
<p className='mx-auto text-[28px] font-bold'>
Fantastic job filtering
</p>
<p className='mx-auto text-ph'>
{' '}
Now let&apos;s find out which projects come out on top!
Expand All @@ -52,13 +54,13 @@ const ProjectRankingDonePage = () => {
// });
// }
router.push(
`${Routes.Categories}/${categoryId}/project-ranking/summary`,
`${Routes.Categories}/${categoryId}/pairwise-ranking`,
);
}}
// disabled={updateCategoryMarkFiltered.isPending}
className='w-full bg-primary'
>
Start Pairwise Assesment
Start Ranking
</Button>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/app/categories/[categoryId]/project-ranking/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const ProjectRankingEditPage = () => {
Not Selected ({excludedProjects?.length || 0})
</p>
{excludedProjects?.map(project => (
<div key={project.id} className='opacity-40'>
<div key={project.id}>
<CategoryEditProjectItem
project={project}
key={project.id}
Expand All @@ -190,9 +190,9 @@ const ProjectRankingEditPage = () => {
`${Routes.Categories}/${selectedCategory?.id}/project-ranking/summary`,
);
}}
className='w-full text-black shadow-md'
className='w-full text-black shadow-md'
>
Discard Changes
Discard
</Button>
<Button
onClick={handleSubmit}
Expand Down
2 changes: 1 addition & 1 deletion src/app/categories/[categoryId]/project-ranking/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const ProjectRankingPage = () => {
useEffect(() => {
if (backendCurrentIndex === -1) {
router.push(
`${Routes.Categories}/${categoryId}/project-ranking/done`,
`${Routes.Categories}/${categoryId}/project-ranking/summary`,
);
}
}, [backendCurrentIndex, router, categoryId]);
Expand Down
17 changes: 11 additions & 6 deletions src/app/categories/[categoryId]/project-ranking/summary/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,18 @@ const ProjectRankingSummaryPage = () => {
</div>
<div className='mx-4'>
<div className='mb-4 mt-6'>
<p className='font text-2xl font-bold'>
<p className='font text-[28px] font-bold leading-[34px]'>
{includedProjects?.length || 0} out of{' '}
{projects?.data.length || 0} projects selected
{projects?.data.length || 0}{' '}
<span className='text-[#636779]'>
projects selected
</span>
</p>
</div>
<p className='mb-6 text-lg'>{selectedCategory?.name}</p>
<p className='text-lg font-semibold'>
<p className='mb-6 text-lg font-semibold'>
{selectedCategory?.name}
</p>
<p className='text-lg font-bold'>
Selected ({includedProjects?.length || 0})
</p>
{includedProjects?.map(project => (
Expand Down Expand Up @@ -110,12 +115,12 @@ const ProjectRankingSummaryPage = () => {
data: { cid: +selectedCategoryId },
});
router.push(
`${Routes.Categories}/${selectedCategory?.id}/pairwise-ranking`,
`${Routes.Categories}/${categoryId}/project-ranking/done`,
);
}}
className='w-full bg-primary'
>
Start ranking
Finish Filtering
</Button>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/TopNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const TopNavigation = ({ link = '/', text }: ITopNavigationProps) => {
<Link href={link}>
<IconArrowLeft />
</Link>
<p>{text}</p>
<p className='font-bold'>{text}</p>
</div>
</div>
);
Expand Down