Skip to content

Commit

Permalink
PIMS-1845 Bad Table Filters & Other Fixes (#2531)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarkowsky authored Jul 15, 2024
1 parent aa2ac65 commit 9c9c584
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion react-app/src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const Header: React.FC = () => {
<AppBrand />
<Box flexGrow={1}></Box>
<Box textAlign={'center'} alignItems={'center'} gap={'32px'} display={'flex'}>
{isAuthenticated && auth.pimsUser.data?.Status === 'Active' && (
{isAuthenticated && auth?.pimsUser?.data?.Status === 'Active' && (
<>
{user.client_roles?.includes(Roles.ADMIN) ? (
<>
Expand Down
2 changes: 1 addition & 1 deletion react-app/src/components/projects/AddProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const AddProject = () => {
Description: '',
Assessed: 0,
NetBook: 0,
Estimated: 0,
Market: 0,
Appraised: 0,
ProgramCost: 0,
SalesCost: 0,
Expand Down
2 changes: 1 addition & 1 deletion react-app/src/components/table/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export const FilterSearchDataGrid = (props: FilterSearchDataGridProps) => {
) {
// model.quickFilter = undefined;
const modelObj: GridFilterModel = {
items: undefined,
items: [],
quickFilterValues: undefined,
};
if (query.columnFilterName && query.columnFilterValue && query.columnFilterMode) {
Expand Down
3 changes: 3 additions & 0 deletions react-app/src/pages/ErrorFallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const ErrorFallback = ({ error, resetErrorBoundary }) => {
errorTracker.count > 0 &&
errorTracker.location === window.location.pathname
) {
// Removes existing cookie from this pathname. Mostly used for tables.
sessionStorage.removeItem(window.location.pathname.slice(1));
// Reset error tracker count.
sessionStorage.setItem(
'errorTracker',
JSON.stringify({
Expand Down

0 comments on commit 9c9c584

Please sign in to comment.