mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-17 13:00:56 +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 FormModal from '../../components/Modals/FormModal';
|
||||||
import { ModalWithMarkdownEditor } from '../../components/Modals/ModalWithMarkdownEditor/ModalWithMarkdownEditor';
|
import { ModalWithMarkdownEditor } from '../../components/Modals/ModalWithMarkdownEditor/ModalWithMarkdownEditor';
|
||||||
import { ERROR404 } from '../../constants/constants';
|
import { ERROR404 } from '../../constants/constants';
|
||||||
|
import { countBackground } from '../../utils/styleconstant';
|
||||||
import SVGIcons from '../../utils/SvgUtils';
|
import SVGIcons from '../../utils/SvgUtils';
|
||||||
import AddUsersModal from './AddUsersModal';
|
import AddUsersModal from './AddUsersModal';
|
||||||
import Form from './Form';
|
import Form from './Form';
|
||||||
@ -142,6 +143,16 @@ const TeamsPage = () => {
|
|||||||
return tab === currentTab ? 'active' : '';
|
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 = () => {
|
const getTabs = () => {
|
||||||
return (
|
return (
|
||||||
<div className="tw-mb-3 ">
|
<div className="tw-mb-3 ">
|
||||||
@ -152,6 +163,7 @@ const TeamsPage = () => {
|
|||||||
setCurrentTab(1);
|
setCurrentTab(1);
|
||||||
}}>
|
}}>
|
||||||
Users
|
Users
|
||||||
|
{getCount(currentTeam?.users.length)}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
className={`tw-pb-2 tw-px-4 tw-gh-tabs ${getActiveTabClass(2)}`}
|
className={`tw-pb-2 tw-px-4 tw-gh-tabs ${getActiveTabClass(2)}`}
|
||||||
@ -159,6 +171,7 @@ const TeamsPage = () => {
|
|||||||
setCurrentTab(2);
|
setCurrentTab(2);
|
||||||
}}>
|
}}>
|
||||||
Assets
|
Assets
|
||||||
|
{getCount(currentTeam?.owns.length)}
|
||||||
</button>
|
</button>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user