mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
SPRINT-12: added 'multi statitistics' widget
This commit is contained in:
@ -29,6 +29,7 @@ import MDBox from "qqq/components/Temporary/MDBox";
|
||||
import MDTypography from "qqq/components/Temporary/MDTypography";
|
||||
import BarChart from "qqq/pages/dashboards/Widgets/BarChart";
|
||||
import LineChart from "qqq/pages/dashboards/Widgets/LineChart";
|
||||
import MultiStatisticsCard from "qqq/pages/dashboards/Widgets/MultiStatisticsCard";
|
||||
import QuickSightChart from "qqq/pages/dashboards/Widgets/QuickSightChart";
|
||||
import TableCard from "qqq/pages/dashboards/Widgets/TableCard";
|
||||
import QClient from "qqq/utils/QClient";
|
||||
@ -100,6 +101,8 @@ function DashboardWidgets({widgetNameList, entityPrimaryKey}: Props): JSX.Elemen
|
||||
|
||||
const widgetCount = widgets ? widgets.length : 0;
|
||||
|
||||
console.log(widgets);
|
||||
|
||||
return (
|
||||
widgetCount > 0 ? (
|
||||
<Grid item xs={12} lg={12}>
|
||||
@ -112,6 +115,7 @@ function DashboardWidgets({widgetNameList, entityPrimaryKey}: Props): JSX.Elemen
|
||||
<TableCard
|
||||
color="info"
|
||||
title={widget.title}
|
||||
noRowsFoundHTML={widget.noRowsFoundHTML}
|
||||
data={widget}
|
||||
dropdownOptions={widget.dropdownOptions}
|
||||
dropdownOnChange={handleDropdownOnChange}
|
||||
@ -135,6 +139,15 @@ function DashboardWidgets({widgetNameList, entityPrimaryKey}: Props): JSX.Elemen
|
||||
</MDBox>
|
||||
)
|
||||
}
|
||||
{
|
||||
widget.type === "multiStatistics" && (
|
||||
<MultiStatisticsCard
|
||||
color="info"
|
||||
title={widget.title}
|
||||
data={widget}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</Grid>
|
||||
))
|
||||
}
|
||||
|
Reference in New Issue
Block a user