Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIMSBIOHUB-334 UI Fixes #1164

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/contexts/observationsTableContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export const ObservationsTableContextProvider = (props: PropsWithChildren<Record
dialogContext.setSnackbar({
snackbarMessage: (
<Typography variant="body2" component="div">
Updated survey observations successfully.
Observations updated successfully.
</Typography>
),
open: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ObservationComponent = () => {
showSnackBar({
snackbarMessage: (
<Typography variant="body2" component="div">
Imported survey observations successfully.
Observations imported successfully.
</Typography>
)
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import ListItemText from '@mui/material/ListItemText';
import Menu, { MenuProps } from '@mui/material/Menu';
import MenuItem from '@mui/material/MenuItem';
import Paper from '@mui/material/Paper';
import Skeleton from '@mui/material/Skeleton';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
Expand All @@ -40,6 +41,7 @@
py: 1.5,
px: 2,
height: '52px',
background: '#fff',
borderBottom: '1px solid ' + grey[300]
}}>
<Skeleton sx={{ flex: '1 1 auto' }} />
Expand All @@ -58,7 +60,7 @@

useEffect(() => {
surveyContext.sampleSiteDataLoader.refresh(surveyContext.projectId, surveyContext.surveyId);
}, []);

Check warning on line 63 in app/src/features/surveys/observations/sampling-sites/SamplingSiteList.tsx

View workflow job for this annotation

GitHub Actions / Running Linter and Formatter

React Hook useEffect has missing dependencies: 'surveyContext.projectId', 'surveyContext.sampleSiteDataLoader', and 'surveyContext.surveyId'. Either include them or remove the dependency array

const [anchorEl, setAnchorEl] = useState<MenuProps['anchorEl']>(null);
const [selectedSampleSiteId, setSelectedSampleSiteId] = useState<number | undefined>();
Expand Down Expand Up @@ -213,11 +215,13 @@
background: grey[100],
zIndex: 2
}}>
<SampleSiteSkeleton />
<SampleSiteSkeleton />
<SampleSiteSkeleton />
<SampleSiteSkeleton />
<SampleSiteSkeleton />
<Paper elevation={0} sx={{ overflow: 'hidden' }}>
<SampleSiteSkeleton />
<SampleSiteSkeleton />
<SampleSiteSkeleton />
<SampleSiteSkeleton />
<SampleSiteSkeleton />
</Paper>
</Box>
</Fade>

Expand Down
8 changes: 3 additions & 5 deletions app/src/features/surveys/view/components/SurveyStudyArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,9 @@ const SurveyStudyArea = () => {
}, [biohubApi.spatial, surveyContext.surveyDataLoader.data?.surveyData?.locations]);

return (
<>
<Box component="dl">
<InferredLocationDetails layers={inferredLayersInfo} />
</Box>
</>
<Box component="dl">
<InferredLocationDetails layers={inferredLayersInfo} />
</Box>
);
};

Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/landing/LandingActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const LandingActions = () => {
const userIdentifier = authStateContext.simsUserWrapper.userIdentifier ?? '';

const hasPendingAccessRequest = authStateContext.simsUserWrapper.hasAccessRequest;
const isSystemUser = authStateContext.simsUserWrapper.systemUserId;
const isSystemUser = !!authStateContext.simsUserWrapper.systemUserId;

const hasAdministrativeRole = hasAtLeastOneValidValue(
[SYSTEM_ROLE.DATA_ADMINISTRATOR, SYSTEM_ROLE.SYSTEM_ADMIN],
Expand Down
2 changes: 0 additions & 2 deletions app/src/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import 'styles/fonts.scss';

.pageProgress {
position: fixed;
top: 50%;
Expand Down
Loading