diff --git a/src/items/itemsTable.component.tsx b/src/items/itemsTable.component.tsx index 1e6955156..69d744719 100644 --- a/src/items/itemsTable.component.tsx +++ b/src/items/itemsTable.component.tsx @@ -66,7 +66,7 @@ export function ItemsTable(props: ItemTableProps) { const [tableRows, setTableRows] = React.useState([]); - const noResultsTxt = + const noResultsText = 'No results found: Try adding an item by using the Add Item button on the top left of your screen'; const { data: itemsData, isLoading: isLoadingItems } = useGetItems( undefined, @@ -198,7 +198,7 @@ export function ItemsTable(props: ItemTableProps) { accessorFn: (row) => row.item.warranty_end_date ? new Date(row.item.warranty_end_date) - : null, + : '', id: 'item.warranty_end_date', filterVariant: COLUMN_FILTER_VARIANTS.date, filterFn: COLUMN_FILTER_FUNCTIONS.date, @@ -217,7 +217,7 @@ export function ItemsTable(props: ItemTableProps) { header: 'Delivered Date', Header: TableHeaderOverflowTip, accessorFn: (row) => - row.item.delivered_date ? new Date(row.item.delivered_date) : null, + row.item.delivered_date ? new Date(row.item.delivered_date) : '', id: 'item.delivered_date', filterVariant: COLUMN_FILTER_VARIANTS.date, filterFn: COLUMN_FILTER_FUNCTIONS.date, @@ -434,7 +434,7 @@ export function ItemsTable(props: ItemTableProps) { localization: { ...MRT_Localization_EN, ...MRT_Functions_Localisation, - noRecordsToDisplay: noResultsTxt, + noRecordsToDisplay: noResultsText, }, //State initialState: { diff --git a/src/systems/__snapshots__/systemItemsTable.component.test.tsx.snap b/src/systems/__snapshots__/systemItemsTable.component.test.tsx.snap index 3b2e75aaa..37fc153a7 100644 --- a/src/systems/__snapshots__/systemItemsTable.component.test.tsx.snap +++ b/src/systems/__snapshots__/systemItemsTable.component.test.tsx.snap @@ -238,7 +238,7 @@ exports[`SystemItemsTable > SystemItemsTable (normal) > renders correctly 1`] = > SystemItemsTable (normal) > renders correctly 1`] = class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-jk1t0h-MuiFormControl-root-MuiTextField-root" >
+
+ + ​ + + + + +
+ +
SystemItemsTable (normal) > renders correctly 1`] =
+

+ +

@@ -656,14 +727,51 @@ exports[`SystemItemsTable > SystemItemsTable (normal) > renders correctly 1`] = class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-jk1t0h-MuiFormControl-root-MuiTextField-root" >
+
+ + ​ + + + + +
SystemItemsTable (normal) > renders correctly 1`] =
+

+ +

@@ -833,14 +949,51 @@ exports[`SystemItemsTable > SystemItemsTable (normal) > renders correctly 1`] = class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1blq8rz-MuiFormControl-root-MuiTextField-root" >
+
+ + ​ + + + + +
SystemItemsTable (normal) > renders correctly 1`] =
+

+ +

SystemItemsTable (normal) > renders correctly 1`] = aria-label="Max" autocomplete="new-password" class="MuiInputBase-input MuiInput-input MuiInputBase-inputAdornedEnd css-929hxt-MuiInputBase-input-MuiInput-input" - id=":rq:" + id=":ru:" inputmode="text" placeholder="Max" title="Max" @@ -1053,14 +1214,51 @@ exports[`SystemItemsTable > SystemItemsTable (normal) > renders correctly 1`] = class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1blq8rz-MuiFormControl-root-MuiTextField-root" >
+
+ + ​ + + + + +
SystemItemsTable (normal) > renders correctly 1`] =
+

+ +

SystemItemsTable (normal) > renders correctly 1`] = aria-label="Max" autocomplete="new-password" class="MuiInputBase-input MuiInput-input MuiInputBase-inputAdornedEnd css-929hxt-MuiInputBase-input-MuiInput-input" - id=":r32:" + id=":r3b:" inputmode="text" placeholder="Max" title="Max" @@ -1273,14 +1479,51 @@ exports[`SystemItemsTable > SystemItemsTable (normal) > renders correctly 1`] = class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1blq8rz-MuiFormControl-root-MuiTextField-root" >
+
+ + ​ + + + + +
SystemItemsTable (normal) > renders correctly 1`] =
+

+ +

SystemItemsTable (normal) > renders correctly 1`] = aria-label="Max" autocomplete="new-password" class="MuiInputBase-input MuiInput-input MuiInputBase-inputAdornedEnd css-929hxt-MuiInputBase-input-MuiInput-input" - id=":r12:" + id=":r17:" inputmode="text" placeholder="Max" title="Max" @@ -1487,56 +1738,76 @@ exports[`SystemItemsTable > SystemItemsTable (normal) > renders correctly 1`] = class="MuiCollapse-wrapperInner MuiCollapse-vertical css-9l5vo-MuiCollapse-wrapperInner" >
+ + +
+ -
+
@@ -1667,58 +1938,123 @@ exports[`SystemItemsTable > SystemItemsTable (normal) > renders correctly 1`] = class="MuiCollapse-wrapperInner MuiCollapse-vertical css-9l5vo-MuiCollapse-wrapperInner" >
- -
+ ​ + + + +
+ + + +
+ + + +
+

+ +

@@ -1873,7 +2209,7 @@ exports[`SystemItemsTable > SystemItemsTable (normal) > renders correctly 1`] = data-index="6" > @@ -3032,14 +3439,51 @@ exports[`SystemItemsTable > SystemItemsTable (usageStatus) > renders correctly 1 class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-jk1t0h-MuiFormControl-root-MuiTextField-root" >
+
+ + ​ + + + + +
SystemItemsTable (usageStatus) > renders correctly 1
+

+ +

@@ -3544,7 +3996,7 @@ exports[`SystemItemsTable > SystemItemsTable (usageStatus) > renders correctly 1 class="MuiInputBase-root MuiInput-root MuiInputBase-colorPrimary css-1mmm5cp-MuiInputBase-root-MuiInput-root-MuiSelect-root" >