mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-16 20:40:38 +00:00
adding number of users and asset count on teams page (#230)
* adding number of users and assest count on teams page * minor chnage * minor changes
This commit is contained in:
parent
7aa88db51b
commit
d1c8f4ac26
@ -37,6 +37,7 @@ import Loader from '../../components/Loader/Loader';
|
||||
import FormModal from '../../components/Modals/FormModal';
|
||||
import { ModalWithMarkdownEditor } from '../../components/Modals/ModalWithMarkdownEditor/ModalWithMarkdownEditor';
|
||||
import { ERROR404 } from '../../constants/constants';
|
||||
import { countBackground } from '../../utils/styleconstant';
|
||||
import SVGIcons from '../../utils/SvgUtils';
|
||||
import AddUsersModal from './AddUsersModal';
|
||||
import Form from './Form';
|
||||
@ -142,6 +143,16 @@ const TeamsPage = () => {
|
||||
return tab === currentTab ? 'active' : '';
|
||||
};
|
||||
|
||||
const getCount = (count = 0) => {
|
||||
return (
|
||||
<span
|
||||
className=" tw-py-0.5 tw-px-1 tw-ml-1 tw-border tw-rounded tw-text-xs"
|
||||
style={{ background: countBackground }}>
|
||||
<span data-testid="filter-count">{count}</span>
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
const getTabs = () => {
|
||||
return (
|
||||
<div className="tw-mb-3 ">
|
||||
@ -152,6 +163,7 @@ const TeamsPage = () => {
|
||||
setCurrentTab(1);
|
||||
}}>
|
||||
Users
|
||||
{getCount(currentTeam?.users.length)}
|
||||
</button>
|
||||
<button
|
||||
className={`tw-pb-2 tw-px-4 tw-gh-tabs ${getActiveTabClass(2)}`}
|
||||
@ -159,6 +171,7 @@ const TeamsPage = () => {
|
||||
setCurrentTab(2);
|
||||
}}>
|
||||
Assets
|
||||
{getCount(currentTeam?.owns.length)}
|
||||
</button>
|
||||
</nav>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user