feat(frontend): devices page in progress
This commit is contained in:
parent
9257e2073b
commit
93a3199f33
|
|
@ -43,7 +43,7 @@ const Page = () => (
|
||||||
name: 'Ekaterina Tankova'
|
name: 'Ekaterina Tankova'
|
||||||
},
|
},
|
||||||
createdAt: 1555016400000,
|
createdAt: 1555016400000,
|
||||||
status: 'Associando'
|
status: 'Associating'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '9eaa1c7dd4433f413c308ce2',
|
id: '9eaa1c7dd4433f413c308ce2',
|
||||||
|
|
@ -73,7 +73,7 @@ const Page = () => (
|
||||||
name: 'Anje Keizer'
|
name: 'Anje Keizer'
|
||||||
},
|
},
|
||||||
createdAt: 1554757200000,
|
createdAt: 1554757200000,
|
||||||
status: 'Associando'
|
status: 'Associating'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '9f974f239d29ede969367103',
|
id: '9f974f239d29ede969367103',
|
||||||
|
|
|
||||||
11
frontend/src/pages/devices/[id].js
Normal file
11
frontend/src/pages/devices/[id].js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { useRouter } from 'next/router'
|
||||||
|
|
||||||
|
const Page = () => {
|
||||||
|
const router = useRouter()
|
||||||
|
const { id } = router.query
|
||||||
|
|
||||||
|
return <p>Device: {id}</p>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export default Page;
|
||||||
|
|
@ -18,9 +18,10 @@ import {
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import { Scrollbar } from 'src/components/scrollbar';
|
import { Scrollbar } from 'src/components/scrollbar';
|
||||||
import { SeverityPill } from 'src/components/severity-pill';
|
import { SeverityPill } from 'src/components/severity-pill';
|
||||||
|
import { useRouter } from 'next/router';
|
||||||
|
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
Associando: 'warning',
|
Associating: 'warning',
|
||||||
Online: 'success',
|
Online: 'success',
|
||||||
Offline: 'error'
|
Offline: 'error'
|
||||||
};
|
};
|
||||||
|
|
@ -28,6 +29,8 @@ const statusMap = {
|
||||||
export const OverviewLatestOrders = (props) => {
|
export const OverviewLatestOrders = (props) => {
|
||||||
const { orders = [], sx } = props;
|
const { orders = [], sx } = props;
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card sx={sx}>
|
<Card sx={sx}>
|
||||||
<CardHeader title="Devices" />
|
<CardHeader title="Devices" />
|
||||||
|
|
@ -49,7 +52,7 @@ export const OverviewLatestOrders = (props) => {
|
||||||
Status
|
Status
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
Acessar
|
Access
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
|
|
@ -77,7 +80,7 @@ export const OverviewLatestOrders = (props) => {
|
||||||
</SeverityPill>
|
</SeverityPill>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<SvgIcon fontSize="small" sx={{cursor:'pointer'}}>
|
<SvgIcon fontSize="small" sx={{cursor:'pointer'}} onClick={()=>router.push("devices/"+order.id)}>
|
||||||
<ArrowTopRightOnSquareIcon />
|
<ArrowTopRightOnSquareIcon />
|
||||||
</SvgIcon>
|
</SvgIcon>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user