This repository was archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from SELab-2/149-latest-group-submission
Latest group submissions
- Loading branch information
Showing
7 changed files
with
96 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"use client" | ||
|
||
import ListView from "@app/[locale]/components/ListView"; | ||
import React from "react"; | ||
import {useTranslation} from "react-i18next"; | ||
import GroupsIcon from '@mui/icons-material/Groups'; | ||
import CalendarMonthIcon from '@mui/icons-material/CalendarMonth'; | ||
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline'; | ||
|
||
|
||
const LatestSubmissionList = ({project_id, page_size = 5, search}: { | ||
project_id: number, | ||
page_size: number, | ||
search: string | ||
}) => { | ||
const {t} = useTranslation() | ||
const headers = [ | ||
<React.Fragment key="group_nr"><GroupsIcon style={{ fontSize: '20px', verticalAlign: 'middle', marginBottom: '3px' }}/>{" " + t('group_number')}</React.Fragment> | ||
, | ||
<React.Fragment key="submission_date"><CalendarMonthIcon style={{ fontSize: '20px', verticalAlign: 'middle', marginBottom: '3px' }}/>{" " + t('submission_date')}</React.Fragment> | ||
, | ||
<React.Fragment key="status"><CheckCircleOutlineIcon style={{ fontSize: '20px', verticalAlign: 'middle', marginBottom: '3px' }}/>{" " + t('Status')}</React.Fragment> | ||
, ""] | ||
const headers_backend = ["group_nr", "submission_date", "status", ""] | ||
const sortable = [true, true, false] | ||
|
||
return ( | ||
<ListView | ||
admin={true} | ||
headers={headers} | ||
headers_backend={headers_backend} | ||
get={'submissions_latest'} | ||
get_id={project_id} | ||
sortable={sortable} | ||
action_name={'download_submission'} | ||
page_size={page_size} | ||
search_text={search} | ||
/> | ||
) | ||
} | ||
|
||
export default LatestSubmissionList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters