mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-10-30 01:42:19 +00:00
[WIFI-11472] Fixed crash on missing device types
Signed-off-by: Charles <charles.bourque96@gmail.com>
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(4)",
|
||||
"version": "2.8.0(5)",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(4)",
|
||||
"version": "2.8.0(5)",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@chakra-ui/icons": "^2.0.11",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(4)",
|
||||
"version": "2.8.0(5)",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"main": "index.tsx",
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
import * as React from 'react';
|
||||
import { Badge, HStack, Stat, StatHelpText, StatLabel, StatNumber } from '@chakra-ui/react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import FormattedDate from 'components/InformationDisplays/FormattedDate';
|
||||
|
||||
const test = new Date().getTime() / 1000;
|
||||
|
||||
type Props = {
|
||||
date?: number;
|
||||
venue?: string;
|
||||
type?: string;
|
||||
hideStatus?: boolean;
|
||||
};
|
||||
const CompactTaskDisplay = ({ date, venue, type, hideStatus }: Props) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<HStack spacing={2}>
|
||||
{!hideStatus && <Badge colorScheme="green">{t('common.success')}</Badge>}
|
||||
<Stat>
|
||||
<StatLabel>
|
||||
<FormattedDate date={date ?? test} />
|
||||
</StatLabel>
|
||||
<StatNumber fontSize="xl">{type ?? 'Installation'}</StatNumber>
|
||||
<StatHelpText>{venue ?? 'Ally Detroit Center'}</StatHelpText>
|
||||
</Stat>
|
||||
</HStack>
|
||||
);
|
||||
};
|
||||
|
||||
export default CompactTaskDisplay;
|
||||
@@ -118,7 +118,7 @@ const DeviceListCard = () => {
|
||||
device.connected ? t('common.connected') : t('common.disconnected')
|
||||
} ${device.restrictedDevice ? `- ${t('devices.restricted')}` : ''}`}
|
||||
>
|
||||
{ICONS[device.deviceType]}
|
||||
{ICONS[device.deviceType] ?? ICONS.AP}
|
||||
</Tooltip>
|
||||
<Box
|
||||
w="0.65em"
|
||||
|
||||
Reference in New Issue
Block a user