SPRINT-18: minor style change on inputs for padding, updated for statistics titles to come from widget meta data

This commit is contained in:
Tim Chamberlain
2023-01-12 20:08:21 -06:00
parent 08def2353e
commit f3cf89cf1c
3 changed files with 17 additions and 3 deletions

View File

@ -271,7 +271,7 @@ function DashboardWidgets({widgetMetaDataList, tableName, entityPrimaryKey, omit
widgetMetaData.type === "simpleStatistics" && (
widgetData && widgetData[i] && (
<SimpleStatisticsCard
title={widgetData[i]?.title}
title={widgetMetaData.label}
data={widgetData[i]}
increaseIsGood={widgetData[i].increaseIsGood}
isCurrency={widgetData[i].isCurrency}
@ -283,6 +283,7 @@ function DashboardWidgets({widgetMetaDataList, tableName, entityPrimaryKey, omit
widgetMetaData.type === "statistics" && (
widgetData && widgetData[i] && (
<StatisticsCard
title={widgetMetaData.label}
color={colors.info.main}
icon={widgetMetaData.icon}
data={widgetData[i]}

View File

@ -42,6 +42,7 @@ export interface StatisticsCardData
/////////////////////////
interface Props
{
title: string
data: StatisticsCardData;
color?: "primary" | "secondary" | "info" | "success" | "warning" | "error" | "light" | "dark";
icon: ReactNode;
@ -60,9 +61,9 @@ StatisticsCard.defaultProps = {
increaseIsGood: true
};
function StatisticsCard({data, color, icon, increaseIsGood}: Props): JSX.Element
function StatisticsCard({title, data, color, icon, increaseIsGood}: Props): JSX.Element
{
const {title, count, percentageAmount, percentageLabel} = data;
const {count, percentageAmount, percentageLabel} = data;
let percentageString = "";
if (percentageAmount)

View File

@ -105,6 +105,18 @@
font-size: .875rem !important;
}
.MuiInput-input, .MuiInputLabel-root
{
padding-left: 8px !important;
padding-right: 8px !important;
}
.MuiInputLabel-shrink
{
padding-top: 2px !important;
padding-left: 2px !important;
}
.MuiDataGrid-toolbarContainer .selectionTool
{
margin-left: 40px;