* CEC-4674: add bulk cancel updates (#386)

* add bulk cancel updates

* add permission check

* remove unused import

* make trigger multi-line

* CEC-4546: add ecu search (#391)

* CEC-4546: add ecu search

* CEC-4546: add checkbox to filter current

* add column

* set initial state to true for unique

* CEC-4745: add vins nullcheck for bulk actions bulk actions (#395)

* nullcheck bulk actions

* remove unused var

* update snapshots

* CEC-4772 - carsconnected takes VINs in req body

---------

Co-authored-by: Paul Adamsen <117673433+pauladamseniii@users.noreply.github.com>
Co-authored-by: Tristan Timblin <ttimblin@fiskerinc.com>
This commit is contained in:
Rafi Greenberg
2023-07-26 11:01:58 -08:00
committed by GitHub
parent a53a144411
commit 01d13a5cac
8 changed files with 192 additions and 12 deletions

View File

@@ -58,11 +58,15 @@ const tableColumns = [
id: "updated_at",
label: "Updated",
},
{
id: "epoch_usec",
label: "Epoch",
},
];
const PAGE_SIZE = "CAR_ECUS_TABLE_PAGE_SIZE";
const CarECUsTable = ({ vin, token, classes }) => {
const CarECUsTable = ({ vin, token, classes, search, unique }) => {
const [ecus, setECUs] = useState([]);
const [total, setTotal] = useState(0);
const [pageSize, setPageSize] = useLocalStorage(PAGE_SIZE, 10);
@@ -79,6 +83,8 @@ const CarECUsTable = ({ vin, token, classes }) => {
const result = await getECUs(
{
vin,
search,
unique,
limit: pageSize,
offset: pageSize * pageIndex,
order: `${orderBy} ${order}`,
@@ -93,7 +99,7 @@ const CarECUsTable = ({ vin, token, classes }) => {
}
})();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [vin, token, pageIndex, pageSize, orderBy, order]);
}, [vin, token, pageIndex, pageSize, orderBy, order, search, unique]);
const handleChangePageIndex = (event, newIndex) => {
setPageIndex(newIndex);