change(ui): dashboard list show created by
This commit is contained in:
parent
caa55de1b6
commit
b6c26bcf03
2 changed files with 9 additions and 7 deletions
|
|
@ -41,10 +41,10 @@ function DashboardList({ siteId }: { siteId: string }) {
|
|||
render: (date) => checkForRecent(date, 'LLL dd, yyyy, hh:mm a'),
|
||||
},
|
||||
{
|
||||
title: 'Modified By',
|
||||
dataIndex: 'updatedBy',
|
||||
title: 'Created By',
|
||||
dataIndex: 'ownerEmail',
|
||||
width: '16.67%',
|
||||
sorter: (a, b) => a.updatedBy.localeCompare(b.updatedBy),
|
||||
sorter: (a, b) => a.ownerEmail.localeCompare(b.ownerEmail),
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
},
|
||||
{
|
||||
|
|
@ -104,13 +104,13 @@ function DashboardList({ siteId }: { siteId: string }) {
|
|||
list.length === 0 && !dashboardStore.filter.showMine ? (
|
||||
<div className='flex justify-center text-center'>
|
||||
<Empty
|
||||
image={<AnimatedSVG name={emptyImage} size={imageDimensions.width} />}
|
||||
imageStyle={{
|
||||
width: imageDimensions.width,
|
||||
image={<AnimatedSVG name={emptyImage} size={imageDimensions.width} />}
|
||||
imageStyle={{
|
||||
width: imageDimensions.width,
|
||||
height: imageDimensions.height,
|
||||
margin: 'auto',
|
||||
padding: '2rem 0'
|
||||
}}
|
||||
}}
|
||||
description={emptyDescription}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ export default class Dashboard {
|
|||
currentWidget: Widget = new Widget()
|
||||
config: any = {}
|
||||
createdAt: number = new Date().getTime()
|
||||
ownerEmail: string = ""
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this)
|
||||
|
|
@ -65,6 +66,7 @@ export default class Dashboard {
|
|||
this.isPublic = json.isPublic
|
||||
this.key = json.dashboardId
|
||||
this.createdAt = DateTime.fromMillis(new Date(json.createdAt).getTime())
|
||||
this.ownerEmail = json.ownerEmail
|
||||
if (json.widgets) {
|
||||
const smallWidgets: any[] = json.widgets.filter(wi => wi.config.col === 1)
|
||||
const otherWidgets: any[] = json.widgets.filter(wi => wi.config.col !== 1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue