diff --git a/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx b/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx index 9289e1376..7740ec10b 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx @@ -42,9 +42,9 @@ function DashboardList({ siteId }: { siteId: string }) { }, { title: 'Owner', - dataIndex: 'ownerEmail', + dataIndex: 'owner', width: '16.67%', - sorter: (a, b) => a.ownerEmail.localeCompare(b.ownerEmail), + sorter: (a, b) => a.owner.localeCompare(b.owner), sortDirections: ['ascend', 'descend'], }, { diff --git a/frontend/app/mstore/types/dashboard.ts b/frontend/app/mstore/types/dashboard.ts index cea9a26fe..a82702596 100644 --- a/frontend/app/mstore/types/dashboard.ts +++ b/frontend/app/mstore/types/dashboard.ts @@ -17,7 +17,7 @@ export default class Dashboard { currentWidget: Widget = new Widget() config: any = {} createdAt: number = new Date().getTime() - ownerEmail: string = "" + owner: string = "" constructor() { makeAutoObservable(this) @@ -66,7 +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 + this.owner = json.ownerName 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) diff --git a/frontend/app/mstore/types/widget.ts b/frontend/app/mstore/types/widget.ts index 0eb5411dc..12887b57f 100644 --- a/frontend/app/mstore/types/widget.ts +++ b/frontend/app/mstore/types/widget.ts @@ -155,7 +155,7 @@ export default class Widget { ? json.series.map((series: any) => new FilterSeries().fromJson(series)) : [new FilterSeries()]; this.dashboards = json.dashboards || []; - this.owner = json.ownerEmail; + this.owner = json.ownerName; this.lastModified = json.editedAt || json.createdAt ? DateTime.fromMillis(json.editedAt || json.createdAt)