From bf0f0630f1593cc02bc3032c86fed4d00f4a5694 Mon Sep 17 00:00:00 2001
From: John Wu <76966357+jwu-fisker@users.noreply.github.com>
Date: Sat, 11 Feb 2023 09:53:56 -0800
Subject: [PATCH] CEC-3672 Add SUMS to car updates table (#280)
---
.../__snapshots__/CarUpdatesTab.test.jsx.snap | 13 +++++++++++--
src/components/Controls/CarUpdatesTable/index.jsx | 15 +++++++++++----
src/components/Table/HeaderSortable/index.jsx | 10 +++++-----
3 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/src/components/Cars/Status/__snapshots__/CarUpdatesTab.test.jsx.snap b/src/components/Cars/Status/__snapshots__/CarUpdatesTab.test.jsx.snap
index 62cdde9..95dda22 100644
--- a/src/components/Cars/Status/__snapshots__/CarUpdatesTab.test.jsx.snap
+++ b/src/components/Cars/Status/__snapshots__/CarUpdatesTab.test.jsx.snap
@@ -80,6 +80,12 @@ exports[`CarUpdatesTab Render 1`] = `
+
+ SUMS
+ |
- |
- No Car Updates found
+ |
diff --git a/src/components/Controls/CarUpdatesTable/index.jsx b/src/components/Controls/CarUpdatesTable/index.jsx
index 81d89eb..c8eef07 100644
--- a/src/components/Controls/CarUpdatesTable/index.jsx
+++ b/src/components/Controls/CarUpdatesTable/index.jsx
@@ -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}
/>
- {carUpdates.map((row) => (
-
+ {carUpdates.map((row, index) => (
+
{row.id}
{updateName(row)}
+
+ {row.updatemanifest?.sums}
+
{row.username}
@@ -206,11 +213,11 @@ const MainForm = ({ vin, token }) => {
{totalCarUpdates === 0 ? (
- No Car Updates found |
+ No Car Updates
) : (
{
const {
@@ -75,9 +75,9 @@ const HeaderSortable = (props) => {
/>
)}
- {columnData.map((column) => (
+ {columnData.map((column, index) => (