Minor updates in dashboard and cards list views.
This commit is contained in:
parent
a0fa716f10
commit
0d22eb80f5
4 changed files with 30 additions and 27 deletions
|
|
@ -34,14 +34,6 @@ function DashboardList({ siteId }: { siteId: string }) {
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
render: (t) => <div className="link cap-first">{t}</div>,
|
||||
},
|
||||
{
|
||||
title: 'Last Modified',
|
||||
dataIndex: 'updatedAt',
|
||||
width: '16.67%',
|
||||
sorter: (a, b) => a.updatedAt.toMillis() - b.updatedAt.toMillis(),
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
render: (date) => checkForRecent(date, 'LLL dd, yyyy, hh:mm a'),
|
||||
},
|
||||
{
|
||||
title: 'Owner',
|
||||
dataIndex: 'owner',
|
||||
|
|
@ -50,6 +42,15 @@ function DashboardList({ siteId }: { siteId: string }) {
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
render: (owner) => <div className="cap-first">{owner}</div>,
|
||||
},
|
||||
{
|
||||
title: 'Last Modified',
|
||||
dataIndex: 'updatedAt',
|
||||
width: '16.67%',
|
||||
sorter: (a, b) => a.updatedAt.toMillis() - b.updatedAt.toMillis(),
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
render: (date) => checkForRecent(date, 'LLL dd, yyyy, hh:mm a'),
|
||||
},
|
||||
|
||||
{
|
||||
title: (
|
||||
<div className={'flex items-center justify-start gap-2'}>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function MetricTypeIcon({ type }: any) {
|
|||
|
||||
return (
|
||||
<Tooltip title={<div className="capitalize">{card.title}</div>}>
|
||||
<Avatar src={card.icon && <Icon name={card.icon} size="16" color="tealx" />} className="bg-tealx-lightest mr-2" />
|
||||
<Avatar src={card.icon && <Icon name={card.icon} size="16" color="tealx" />} size="small" className="bg-tealx-lightest mr-2" />
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ function MetricViewHeader({ siteId }: { siteId: string }) {
|
|||
<div className='flex items-center gap-6'>
|
||||
<ListViewToggler />
|
||||
|
||||
<Toggler
|
||||
{/* <Toggler
|
||||
label='My Cards'
|
||||
checked={filter.showMine}
|
||||
name='test'
|
||||
|
|
@ -72,7 +72,7 @@ function MetricViewHeader({ siteId }: { siteId: string }) {
|
|||
onChange={() =>
|
||||
metricStore.updateKey('filter', { ...filter, showMine: !filter.showMine })
|
||||
}
|
||||
/>
|
||||
/> */}
|
||||
</div>
|
||||
|
||||
<NewDashboardModal
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ const ListView: React.FC<Props> = (props: Props) => {
|
|||
dataIndex: 'name',
|
||||
key: 'title',
|
||||
className: 'cap-first',
|
||||
width: '35%',
|
||||
sorter: true,
|
||||
render: (text: string, metric: Metric) => (
|
||||
<MetricListItem
|
||||
|
|
@ -122,7 +121,7 @@ const ListView: React.FC<Props> = (props: Props) => {
|
|||
dataIndex: 'owner',
|
||||
key: 'owner',
|
||||
className: 'capitalize',
|
||||
width: '25%',
|
||||
width: '30%',
|
||||
sorter: true,
|
||||
render: (text: string, metric: Metric) => (
|
||||
<MetricListItem
|
||||
|
|
@ -138,6 +137,7 @@ const ListView: React.FC<Props> = (props: Props) => {
|
|||
dataIndex: 'lastModified',
|
||||
key: 'lastModified',
|
||||
sorter: true,
|
||||
width: '16.67%',
|
||||
render: (text: string, metric: Metric) => (
|
||||
<MetricListItem
|
||||
key={metric.metricId}
|
||||
|
|
@ -147,24 +147,25 @@ const ListView: React.FC<Props> = (props: Props) => {
|
|||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: 'Visibility',
|
||||
dataIndex: 'visibility',
|
||||
key: 'visibility',
|
||||
width: '10%',
|
||||
render: (text: string, metric: Metric) => (
|
||||
<MetricListItem
|
||||
key={metric.metricId}
|
||||
metric={metric}
|
||||
siteId={siteId}
|
||||
renderColumn="visibility"
|
||||
/>
|
||||
)
|
||||
},
|
||||
// {
|
||||
// title: 'Visibility',
|
||||
// dataIndex: 'visibility',
|
||||
// key: 'visibility',
|
||||
// width: '10%',
|
||||
// render: (text: string, metric: Metric) => (
|
||||
// <MetricListItem
|
||||
// key={metric.metricId}
|
||||
// metric={metric}
|
||||
// siteId={siteId}
|
||||
// renderColumn="visibility"
|
||||
// />
|
||||
// )
|
||||
// },
|
||||
{
|
||||
title: '',
|
||||
key: 'options',
|
||||
className: 'text-right',
|
||||
width: '5%',
|
||||
render: (text: string, metric: Metric) => (
|
||||
<MetricListItem
|
||||
key={metric.metricId}
|
||||
|
|
@ -182,6 +183,7 @@ const ListView: React.FC<Props> = (props: Props) => {
|
|||
dataSource={paginatedData}
|
||||
rowKey="metricId"
|
||||
onChange={handleTableChange}
|
||||
size='middle'
|
||||
rowSelection={
|
||||
!disableSelection
|
||||
? {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue