2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 03:26:45 +00:00

Dashboard item rendering fixes (#9163)

This commit is contained in:
Oliver 2025-02-23 21:39:22 +11:00 committed by GitHub
parent c9666ff8ec
commit cfdafcd791
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,18 +72,24 @@ function QueryCountWidget({
[modelProperties, params]
);
// TODO: Improve visual styling
return (
<Group gap='xs' wrap='nowrap'>
<InvenTreeIcon icon={icon ?? modelProperties.icon} />
<Group gap='xs' wrap='nowrap' justify='space-between'>
<Group
gap='xs'
wrap='nowrap'
justify='space-between'
align='center'
style={{ height: '100%' }}
>
<Group gap='xs'>
<InvenTreeIcon icon={icon ?? modelProperties.icon} />
<StylishText size='md'>{title}</StylishText>
</Group>
<Group gap='xs' wrap='nowrap' justify='space-apart'>
<Group gap='xs' wrap='nowrap' justify='right'>
{query.isFetching ? (
<Loader size='sm' />
) : (
<StylishText size='sm'>{query.data?.count ?? '-'}</StylishText>
<StylishText size='md'>{query.data?.count ?? '-'}</StylishText>
)}
{modelProperties?.url_overview && (
<ActionIcon size='sm' variant='transparent' onClick={onFollowLink}>