Merge branch 'release/0.0.3'

This commit is contained in:
jwu-fisker
2023-02-19 21:07:10 -08:00
18 changed files with 317 additions and 110 deletions

View File

@@ -35,6 +35,10 @@ const tableColumns = [
id: "update_package_id",
label: "Name",
},
{
id: "",
label: "SUMS",
},
{
id: "username",
label: "Username",
@@ -164,14 +168,17 @@ const MainForm = ({ vin, token }) => {
onSortRequest={handleSort}
/>
<TableBody>
{carUpdates.map((row) => (
<TableRow key={row.id}>
{carUpdates.map((row, index) => (
<TableRow key={index}>
<TableCell align="center">{row.id}</TableCell>
<TableCell align="center">
<Link to={`/vehicle-status/${row.vin}/${row.id}`}>
{updateName(row)}
</Link>
</TableCell>
<TableCell align="center">
{row.updatemanifest?.sums}
</TableCell>
<TableCell align="center">
{row.username}
</TableCell>
@@ -206,11 +213,11 @@ const MainForm = ({ vin, token }) => {
<TableFooter>
<TableRow>
{totalCarUpdates === 0 ? (
<td>No Car Updates found</td>
<TableCell colSpan={7} align="center">No Car Updates</TableCell>
) : (
<TablePagination
rowsPerPageOptions={[5, 10, 25, 100]}
colSpan={6}
colSpan={7}
count={totalCarUpdates}
rowsPerPage={pageSize}
page={pageIndex}

View File

@@ -0,0 +1,25 @@
import { FormControl, InputLabel, Select } from "@material-ui/core";
export const DropDownList = ({data, label, value, labelField, valueField, onChange, classes, ...others}) => {
return (
<FormControl
variant="outlined"
margin="normal"
>
<InputLabel className={classes.whiteBackground}>
{label}
</InputLabel>
<Select
native
value={value}
variant="outlined"
onChange={onChange}
{...others}
>
{data && data.map((item, index) => (
<option key={index} value={item[valueField || "value"]}>{item[labelField || "label"]}</option>
))}
</Select>
</FormControl>
);
}