CEC-4066 move date column (#314)
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import DateFnsUtils from '@date-io/date-fns';
|
||||
import { Button, CircularProgress, Grid, TableFooter, TablePagination, TableCell, Table, TableRow, TableBody} from "@material-ui/core";
|
||||
import { Button, CircularProgress, Grid, Table, TableBody, TableCell, TableFooter, TablePagination, TableRow } from "@material-ui/core";
|
||||
import { KeyboardDatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
||||
import clsx from "clsx";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { logger } from "../../../services/monitoring";
|
||||
import { DTCTimelineProvider, useDTCTimelineContext } from '../../Contexts/DTCTimelineContext';
|
||||
import { useStatusContext } from "../../Contexts/StatusContext";
|
||||
import { useUserContext } from "../../Contexts/UserContext";
|
||||
import { useLocalStorage } from "../../useLocalStorage";
|
||||
import clsx from "clsx";
|
||||
import TableHeaderSortable from "../../Table/HeaderSortable";
|
||||
import SearchField from '../../Controls/SearchField';
|
||||
import TableHeaderSortable from "../../Table/HeaderSortable";
|
||||
import { useLocalStorage } from "../../useLocalStorage";
|
||||
import useStyles from "../../useStyles";
|
||||
|
||||
const MainForm = ({ vin }) => {
|
||||
@@ -28,6 +28,10 @@ const MainForm = ({ vin }) => {
|
||||
const { setMessage } = useStatusContext();
|
||||
|
||||
const tableColumns = [
|
||||
{
|
||||
id: "epoch_usec",
|
||||
label: "Date",
|
||||
},
|
||||
{
|
||||
id: "id",
|
||||
label: "Id",
|
||||
@@ -48,10 +52,6 @@ const MainForm = ({ vin }) => {
|
||||
id: "status_byte",
|
||||
label: "Status Code",
|
||||
},
|
||||
{
|
||||
id: "epoch_usec",
|
||||
label: "Date",
|
||||
},
|
||||
];
|
||||
|
||||
const handleSort = (_event, property) => {
|
||||
@@ -189,6 +189,7 @@ const MainForm = ({ vin }) => {
|
||||
<TableBody>
|
||||
{(dtcData || []).map((dtc, index) => (
|
||||
<TableRow key={index}>
|
||||
<TableCell>{formatDate(dtc.epoch_usec)}</TableCell>
|
||||
<TableCell component="th" scope="row">
|
||||
{dtc.id}
|
||||
</TableCell>
|
||||
@@ -196,7 +197,6 @@ const MainForm = ({ vin }) => {
|
||||
<TableCell>{dtc.ecu_name}</TableCell>
|
||||
<TableCell>{dtc.trouble_code}</TableCell>
|
||||
<TableCell>{dtc.status_byte}</TableCell>
|
||||
<TableCell>{formatDate(dtc.epoch_usec)}</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
|
||||
Reference in New Issue
Block a user