diff --git a/src/components/sites/manageOwnOrGroupExerciseComponents/listView.tsx b/src/components/sites/manageOwnOrGroupExerciseComponents/listView.tsx index fa379443959b0808f28fd48fc21fe67a49531f69..1531633d4ce0920f59b17672a013b5641a172af7 100644 --- a/src/components/sites/manageOwnOrGroupExerciseComponents/listView.tsx +++ b/src/components/sites/manageOwnOrGroupExerciseComponents/listView.tsx @@ -275,6 +275,47 @@ class TableView extends React.Component<Props, any> { } </span> </Table.HeaderCell> + <Table.HeaderCell sorted={ + isCurrentSortingColumnPaginated<EditableExercisePreviewFromBackend>(this.props.sortByKey, + 'createdAt', + this.props.sortDirection + ) + } + > + <span className="clickable" + onClick={() => { + if (this.props.groupId === null) { + const func = this.props.setSortByKey as (sortByKey: keyof EditableExercisePreviewFromBackend, + sortDirection: boolean | null + ) => void + func('createdAt', + rotateSorting<EditableExercisePreviewFromBackend>( + this.props.sortDirection, + this.props.sortByKey, + 'createdAt' + ) + ) + return + } + + const func = this.props.setSortByKey as (sortByKey: keyof EditableExercisePreviewFromBackend, + sortDirection: boolean | null, groupId: number + ) => void + func('createdAt', + rotateSorting<EditableExercisePreviewFromBackend>( + this.props.sortDirection, + this.props.sortByKey, + 'createdAt', + ), + this.props.groupId + ) + }} + > + { + getI18n(this.props.langId, 'Created at') + } + </span> + </Table.HeaderCell> <Table.HeaderCell sorted={ isCurrentSortingColumnPaginated<EditableExercisePreviewFromBackend>(this.props.sortByKey, 'solutions', @@ -621,6 +662,13 @@ class TableView extends React.Component<Props, any> { } </span> </Table.Cell> + <Table.Cell> + <span> + { + displayDateAndTime(exercisePreview.createdAt, -1) + } + </span> + </Table.Cell> <Table.Cell> <span>{exercisePreview.solutions}</span> diff --git a/src/constants.ts b/src/constants.ts index 7bafd5ce9019cefe34fbb02c09d0f682acf8d032..31fa023f73db22690c4702762e62f0f0f22f4cf8 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -13,7 +13,7 @@ import Logger from './helpers/logger' * y - breaking changes / new features * z - fixes, small changes */ -export const versionString = '2.9.13' +export const versionString = '2.9.14' export const supportMail = 'yapex@informatik.uni-halle.de' diff --git a/src/types/exercisePreview.ts b/src/types/exercisePreview.ts index 4056a45f95b4560439aab227a940f51aba225671..ac704e8c2c334637f9dd2af587c5f5623fb0e17e 100644 --- a/src/types/exercisePreview.ts +++ b/src/types/exercisePreview.ts @@ -140,6 +140,11 @@ export interface EditableExercisePreviewFromBackend { */ readonly isPermanentlyLocked: boolean + /** + * when the exercise was created + */ + readonly createdAt: Moment + /** * when the exercise was last updated */