Skip to content

Commit

Permalink
Add text in case no data is shown in timetracking overview (#7736)
Browse files Browse the repository at this point in the history
* add text in case no data is shown in timetracking overview

* add changelog

* lint
  • Loading branch information
dieknolle3333 committed Apr 9, 2024
1 parent 56ab54d commit ab82fd2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed incorrect position of WEBKNOSSOS logo in screenshots. [#7726](https://github.com/scalableminds/webknossos/pull/7726)
- Fixed that invisible nodes could be selected when using the skeleton tool. [#7732](https://github.com/scalableminds/webknossos/pull/7732)
- Fixed a bug where users that have no team memberships were omitted from the user list. [#7721](https://github.com/scalableminds/webknossos/pull/7721)
- Added an appropriate placeholder to be rendered in case the timetracking overview is otherwise empty. [#7736](https://github.com/scalableminds/webknossos/pull/7736)

### Removed

Expand Down
12 changes: 12 additions & 0 deletions frontend/javascripts/admin/statistic/time_tracking_overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ function TimeTrackingOverview() {
{ label: "Last 30 Days", value: [dayjs().subtract(30, "d").startOf("day"), currentTime] },
];

const renderPlaceholder = () => {
return (
<p>
There is no user activity recorded for the selected time span. Please adjust the time range
and filters above.
</p>
);
};

return mayUserAccessView ? (
<Card
title={"Annotation Time per User"}
Expand Down Expand Up @@ -169,6 +178,9 @@ function TimeTrackingOverview() {
marginBottom: 30,
}}
pagination={false}
locale={{
emptyText: renderPlaceholder(),
}}
>
<Column
title="User"
Expand Down

0 comments on commit ab82fd2

Please sign in to comment.