Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
Done tassk (#551)
Browse files Browse the repository at this point in the history
Co-authored-by: Cảnh Huỳnh <61925916+canhuyh@users.noreply.github.com>
  • Loading branch information
buihuyhoang1107 and canhuyh authored Aug 7, 2021
1 parent 9cabfc5 commit e29dba3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,19 @@ const ClassworkAssignmentDetail: FC<ClassworkAssignmentDetailProps> = () => {
</SectionCard>
</Grid>
<SectionCard
maxContentHeight={false}
gridItem={{ xs: 3 }}
title="Sinh viên đã nộp"
title="Học viên đã nộp"
fullHeight={false}
action={[
<>
<InfoBlock label="Số lượng nộp:">
<Typography align="right">
{' '}
{classworkSubmissions?.length}
</Typography>
</InfoBlock>
</>,
]}
>
<CardContent>
{classworkSubmissions?.length ? (
Expand All @@ -385,6 +394,7 @@ const ClassworkAssignmentDetail: FC<ClassworkAssignmentDetailProps> = () => {
)}
>
<AccountDisplayName
style={{ cursor: 'pointer' }}
accountId={classworkSubmission.createdByAccountId}
/>
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ const DetailContentClassworkAssignment: FC<DetailContentClassworkAssignmentProps

const classworkAssignment = useMemo(() => data?.classworkAssignment, [data])

const { data: submit } = useFindOneClassworkSubmissionQuery({
variables: { ClassworkAssignment: classworkAssignment?.id as ANY },
})
const { data: submit, loading: loadingSubmit } =
useFindOneClassworkSubmissionQuery({
variables: { ClassworkAssignment: classworkAssignment?.id as ANY },
})

const classworkAssignmentSubmit = useMemo(
() => submit?.findOneClassworkSubmission,
Expand Down Expand Up @@ -116,6 +117,9 @@ const DetailContentClassworkAssignment: FC<DetailContentClassworkAssignmentProps
if (loading && !data) {
return <PageContainerSkeleton maxWidth="md" />
}
if (loadingSubmit) {
return <PageContainerSkeleton maxWidth="md" />
}

if (!classworkAssignment) {
return (
Expand Down

1 comment on commit e29dba3

@vercel
Copy link

@vercel vercel bot commented on e29dba3 Aug 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.