CEC-3672 Add SUMS to car updates table (#280)
This commit is contained in:
@@ -80,6 +80,12 @@ exports[`CarUpdatesTab Render 1`] = `
|
|||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
|
<th
|
||||||
|
class="MuiTableCell-root MuiTableCell-head MuiTableCell-alignCenter"
|
||||||
|
scope="col"
|
||||||
|
>
|
||||||
|
SUMS
|
||||||
|
</th>
|
||||||
<th
|
<th
|
||||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-alignCenter"
|
class="MuiTableCell-root MuiTableCell-head MuiTableCell-alignCenter"
|
||||||
scope="col"
|
scope="col"
|
||||||
@@ -187,8 +193,11 @@ exports[`CarUpdatesTab Render 1`] = `
|
|||||||
<tr
|
<tr
|
||||||
class="MuiTableRow-root MuiTableRow-footer"
|
class="MuiTableRow-root MuiTableRow-footer"
|
||||||
>
|
>
|
||||||
<td>
|
<td
|
||||||
No Car Updates found
|
class="MuiTableCell-root MuiTableCell-footer MuiTableCell-alignCenter"
|
||||||
|
colspan="7"
|
||||||
|
>
|
||||||
|
No Car Updates
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ const tableColumns = [
|
|||||||
id: "update_package_id",
|
id: "update_package_id",
|
||||||
label: "Name",
|
label: "Name",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "",
|
||||||
|
label: "SUMS",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "username",
|
id: "username",
|
||||||
label: "Username",
|
label: "Username",
|
||||||
@@ -164,14 +168,17 @@ const MainForm = ({ vin, token }) => {
|
|||||||
onSortRequest={handleSort}
|
onSortRequest={handleSort}
|
||||||
/>
|
/>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{carUpdates.map((row) => (
|
{carUpdates.map((row, index) => (
|
||||||
<TableRow key={row.id}>
|
<TableRow key={index}>
|
||||||
<TableCell align="center">{row.id}</TableCell>
|
<TableCell align="center">{row.id}</TableCell>
|
||||||
<TableCell align="center">
|
<TableCell align="center">
|
||||||
<Link to={`/vehicle-status/${row.vin}/${row.id}`}>
|
<Link to={`/vehicle-status/${row.vin}/${row.id}`}>
|
||||||
{updateName(row)}
|
{updateName(row)}
|
||||||
</Link>
|
</Link>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
<TableCell align="center">
|
||||||
|
{row.updatemanifest?.sums}
|
||||||
|
</TableCell>
|
||||||
<TableCell align="center">
|
<TableCell align="center">
|
||||||
{row.username}
|
{row.username}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
@@ -206,11 +213,11 @@ const MainForm = ({ vin, token }) => {
|
|||||||
<TableFooter>
|
<TableFooter>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
{totalCarUpdates === 0 ? (
|
{totalCarUpdates === 0 ? (
|
||||||
<td>No Car Updates found</td>
|
<TableCell colSpan={7} align="center">No Car Updates</TableCell>
|
||||||
) : (
|
) : (
|
||||||
<TablePagination
|
<TablePagination
|
||||||
rowsPerPageOptions={[5, 10, 25, 100]}
|
rowsPerPageOptions={[5, 10, 25, 100]}
|
||||||
colSpan={6}
|
colSpan={7}
|
||||||
count={totalCarUpdates}
|
count={totalCarUpdates}
|
||||||
rowsPerPage={pageSize}
|
rowsPerPage={pageSize}
|
||||||
page={pageIndex}
|
page={pageIndex}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import React from "react";
|
|
||||||
import PropTypes from "prop-types";
|
|
||||||
import {
|
import {
|
||||||
Checkbox,
|
Checkbox,
|
||||||
TableCell,
|
TableCell,
|
||||||
TableHead,
|
TableHead,
|
||||||
TableRow,
|
TableRow,
|
||||||
TableSortLabel,
|
TableSortLabel
|
||||||
} from "@material-ui/core";
|
} from "@material-ui/core";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
const HeaderSortable = (props) => {
|
const HeaderSortable = (props) => {
|
||||||
const {
|
const {
|
||||||
@@ -75,9 +75,9 @@ const HeaderSortable = (props) => {
|
|||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
)}
|
)}
|
||||||
{columnData.map((column) => (
|
{columnData.map((column, index) => (
|
||||||
<TableCell
|
<TableCell
|
||||||
key={column.id}
|
key={index}
|
||||||
align={column.numeric ? "right" : "center"}
|
align={column.numeric ? "right" : "center"}
|
||||||
padding={column.disablePadding ? "none" : "normal"}
|
padding={column.disablePadding ? "none" : "normal"}
|
||||||
sortDirection={orderBy === column.id ? order : false}
|
sortDirection={orderBy === column.id ? order : false}
|
||||||
|
|||||||
Reference in New Issue
Block a user