New: Improve empty list messaging

(cherry picked from commit ee843259bca2d9764a3919b123524a51a3a16cce)

Closes #3820
This commit is contained in:
Bogdan 2023-06-27 01:18:03 +03:00
parent 67e9ce909a
commit 9457fecb65
7 changed files with 30 additions and 21 deletions

View file

@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Alert from 'Components/Alert';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import FilterMenu from 'Components/Menu/FilterMenu';
import ConfirmModal from 'Components/Modal/ConfirmModal';
@ -190,16 +191,16 @@ class CutoffUnmet extends Component {
{
!isAnyFetching && error &&
<div>
<Alert kind={kinds.DANGER}>
Error fetching cutoff unmet
</div>
</Alert>
}
{
isAllPopulated && !error && !items.length &&
<div>
No cutoff unmet items
</div>
<Alert kind={kinds.INFO}>
{translate('NoCutoffUnmetItems')}
</Alert>
}
{

View file

@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Alert from 'Components/Alert';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import FilterMenu from 'Components/Menu/FilterMenu';
import ConfirmModal from 'Components/Modal/ConfirmModal';
@ -207,16 +208,16 @@ class Missing extends Component {
{
!isAnyFetching && error &&
<div>
<Alert kind={kinds.DANGER}>
Error fetching missing items
</div>
</Alert>
}
{
isAllPopulated && !error && !items.length &&
<div>
No missing items
</div>
<Alert kind={kinds.INFO}>
{translate('NoMissingItems')}
</Alert>
}
{