Test result table (#6747)

* Display error message if "pass test" button fails

* Remove error var
This commit is contained in:
Oliver 2024-03-19 10:00:52 +11:00 committed by GitHub
parent 0a67975f16
commit 46810fdbff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -191,7 +191,7 @@ export function FilterSelectDrawer({
> >
<Stack spacing="xs"> <Stack spacing="xs">
{tableState.activeFilters && {tableState.activeFilters &&
tableState.activeFilters.map((f) => ( tableState.activeFilters?.map((f) => (
<FilterItem key={f.name} flt={f} tableState={tableState} /> <FilterItem key={f.name} flt={f} tableState={tableState} />
))} ))}
{tableState.activeFilters && tableState.activeFilters.length > 0 && ( {tableState.activeFilters && tableState.activeFilters.length > 0 && (

View File

@ -277,6 +277,13 @@ export default function StockItemTestResultTable({
message: t`Test result has been recorded`, message: t`Test result has been recorded`,
color: 'green' color: 'green'
}); });
})
.catch(() => {
showNotification({
title: t`Error`,
message: t`Failed to record test result`,
color: 'red'
});
}); });
}, },
[itemId] [itemId]