mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-11-03 03:37:45 +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",
|
"name": "ucentral-client",
|
||||||
"version": "2.8.0(4)",
|
"version": "2.8.0(5)",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.8.0(4)",
|
"version": "2.8.0(5)",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/icons": "^2.0.11",
|
"@chakra-ui/icons": "^2.0.11",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.8.0(4)",
|
"version": "2.8.0(5)",
|
||||||
"description": "",
|
"description": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "index.tsx",
|
"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.connected ? t('common.connected') : t('common.disconnected')
|
||||||
} ${device.restrictedDevice ? `- ${t('devices.restricted')}` : ''}`}
|
} ${device.restrictedDevice ? `- ${t('devices.restricted')}` : ''}`}
|
||||||
>
|
>
|
||||||
{ICONS[device.deviceType]}
|
{ICONS[device.deviceType] ?? ICONS.AP}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Box
|
<Box
|
||||||
w="0.65em"
|
w="0.65em"
|
||||||
|
|||||||
Reference in New Issue
Block a user