Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add text in case no data is shown in timetracking overview #7736

Merged
merged 5 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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