diff --git a/src/locales/de-DE/messages.po b/src/locales/de-DE/messages.po index b84cf06b..ac0be5f0 100644 --- a/src/locales/de-DE/messages.po +++ b/src/locales/de-DE/messages.po @@ -240,7 +240,7 @@ msgstr "Der Zugriff auf Ihr Konto ist unterbrochen" msgid "Account" msgstr "Konto" -#: src/pages/panel/shared/utils/HeatmapCard.tsx:39 +#: src/pages/panel/shared/utils/HeatmapCard.tsx:38 msgid "Account: {0}" msgstr "Konto: {0}" @@ -508,7 +508,7 @@ msgstr "" msgid "Benchmark" msgstr "Benchmark" -#: src/pages/panel/shared/utils/HeatmapCard.tsx:42 +#: src/pages/panel/shared/utils/HeatmapCard.tsx:41 msgid "Benchmark: {0}" msgstr "Benchmark: {0}" diff --git a/src/locales/en-US/messages.po b/src/locales/en-US/messages.po index 6bbb2c09..7045d7ea 100644 --- a/src/locales/en-US/messages.po +++ b/src/locales/en-US/messages.po @@ -240,7 +240,7 @@ msgstr "Access to your account is broken" msgid "Account" msgstr "Account" -#: src/pages/panel/shared/utils/HeatmapCard.tsx:39 +#: src/pages/panel/shared/utils/HeatmapCard.tsx:38 msgid "Account: {0}" msgstr "Account: {0}" @@ -508,7 +508,7 @@ msgstr "below" msgid "Benchmark" msgstr "Benchmark" -#: src/pages/panel/shared/utils/HeatmapCard.tsx:42 +#: src/pages/panel/shared/utils/HeatmapCard.tsx:41 msgid "Benchmark: {0}" msgstr "Benchmark: {0}" diff --git a/src/pages/panel/shared/utils/HeatmapCard.tsx b/src/pages/panel/shared/utils/HeatmapCard.tsx index 20011345..95c0081c 100644 --- a/src/pages/panel/shared/utils/HeatmapCard.tsx +++ b/src/pages/panel/shared/utils/HeatmapCard.tsx @@ -27,13 +27,12 @@ export const HeatmapCard = ({ data }: HeatmapCardProps) => { data: data.benchmarks.map((benchmark) => ({ title: benchmark.title, titleHref: `/benchmark/${benchmark.id}`, - cells: data.accounts - .filter((account) => (benchmark.account_summary[account.id]?.score ?? -1) >= 0) - .map((account) => ({ - name: account.name ?? account.id, - value: benchmark.account_summary[account.id]?.score ?? -1, - title: benchmark.account_summary[account.id]?.score ?? -1, - tooltip: ( + cells: data.accounts.map((account) => ({ + name: account.name ?? account.id, + value: benchmark.account_summary[account.id]?.score ?? -1, + title: benchmark.account_summary[account.id]?.score ?? -1, + tooltip: + (benchmark.account_summary[account.id]?.score ?? -1) >= 0 ? ( Account: {account.name ? `${account.name} (${account.id})` : account.id} @@ -44,14 +43,14 @@ export const HeatmapCard = ({ data }: HeatmapCardProps) => { - ), - href: `/benchmark/${benchmark.id}/${account.id}`, - })), + ) : undefined, + href: `/benchmark/${benchmark.id}/${account.id}`, + })), })), } }, [data, locale, navigate]) diff --git a/src/shared/charts/Heatmap.tsx b/src/shared/charts/Heatmap.tsx index 5c030b27..8345653c 100644 --- a/src/shared/charts/Heatmap.tsx +++ b/src/shared/charts/Heatmap.tsx @@ -29,7 +29,7 @@ const HeatmapCell = ({ title, value, tooltip, href }: HeatmapData) => { let comp = ( = 0 ? getColors(Math.floor(value / (100 / NUMBER_OF_COLORS))) : undefined} + bgcolor={value >= 0 ? getColors(Math.floor(value / (100 / NUMBER_OF_COLORS))) : '#e6e6e6'} width={CELL_WIDTH} height={CELL_WIDTH} alignItems="center" @@ -37,7 +37,7 @@ const HeatmapCell = ({ title, value, tooltip, href }: HeatmapData) => { component={href ? ButtonBase : 'div'} sx={{ textDecoration: 'none' }} > - {value >= 0 ? title : '-'} + {value >= 0 ? title : ''} ) if (href) {