2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Logic fix for UI elements (#7657)

- Check for false, as !true includes undefined
- Prevents visual flashes due to short term rendering of elements
This commit is contained in:
Oliver 2024-07-16 09:16:50 +10:00 committed by GitHub
parent 25c91323c9
commit 12dfaaba9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ export function ServerInfoModal({
</OnlyStaff> </OnlyStaff>
</Table.Td> </Table.Td>
</Table.Tr> </Table.Tr>
{server.worker_running != true && ( {server?.worker_running == false && (
<Table.Tr> <Table.Tr>
<Table.Td> <Table.Td>
<Trans>Background Worker</Trans> <Trans>Background Worker</Trans>
@ -103,7 +103,7 @@ export function ServerInfoModal({
</Table.Td> </Table.Td>
</Table.Tr> </Table.Tr>
)} )}
{server.email_configured != true && ( {server?.email_configured == false && (
<Table.Tr> <Table.Tr>
<Table.Td> <Table.Td>
<Trans>Email Settings</Trans> <Trans>Email Settings</Trans>

View File

@ -49,7 +49,7 @@ export default function TaskManagementPanel() {
return ( return (
<> <>
{!taskInfo.is_running && ( {taskInfo?.is_running == false && (
<Alert title={t`Background Worker Not Running`} color="red"> <Alert title={t`Background Worker Not Running`} color="red">
<Text>{t`The background task manager service is not running. Contact your system administrator.`}</Text> <Text>{t`The background task manager service is not running. Contact your system administrator.`}</Text>
</Alert> </Alert>