Skip to content

Commit

Permalink
Merge pull request #112 from vivienherq/fix-ui
Browse files Browse the repository at this point in the history
Final UI fixes
  • Loading branch information
hhchinh2002 authored Apr 19, 2024
2 parents 6f74134 + a1a6374 commit 9fef668
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions frontend/src/components/assignment/AssignmentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,22 @@ function AssignmentList({ assignments, userRole }: Props) {
className="bg-white shadow-md"
>
<CardHeader className="pb-0">
{assignment.isPublished ? (
<Chip color="success" className="text-white font-bold">
Published
</Chip>
) : (
<Chip>Unpublished</Chip>
)}
{userRole === "tutor" &&
(assignment.isPublished ? (
<Chip color="success" className="text-white font-bold mr-1">
Published
</Chip>
) : (
<Chip className="mr-1">Unpublished</Chip>
))}
{assignment.isPublished &&
(assignment.deadline < new Date().getTime() ? (
<Chip>Expired</Chip>
) : (
<Chip color="success" className="text-white font-bold">
Ongoing
</Chip>
))}
</CardHeader>
<CardBody className="pt-1">
<div className="flex justify-between items-start">
Expand Down

0 comments on commit 9fef668

Please sign in to comment.