Added fallback UI when there are no incidents recorded
This commit is contained in:
1 parent
848ee60ca0
commit
f152f490e3
4 files changed
+26
-5
No files matched your search
@@ -107,7 +107,6 @@ const StepOne = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
<form noValidate spellCheck={false} onSubmit={onSubmit}>
|
<form noValidate spellCheck={false} onSubmit={onSubmit}>
|
||||||
<Box my={theme.gap.ml}>
|
|
||||||
<Field
|
<Field
|
||||||
id="register-lastname-input"
|
id="register-lastname-input"
|
||||||
label="Surname"
|
label="Surname"
|
||||||
@@ -118,7 +117,6 @@ const StepOne = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
error={errors.lastName}
|
error={errors.lastName}
|
||||||
/>
|
/>
|
||||||
</Box>
|
|
||||||
</form>
|
</form>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack direction="row" justifyContent="space-between">
|
<Stack direction="row" justifyContent="space-between">
|
||||||
@@ -267,7 +265,6 @@ const StepThree = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
<form noValidate spellCheck={false} onSubmit={onSubmit}>
|
<form noValidate spellCheck={false} onSubmit={onSubmit}>
|
||||||
<Box mt={theme.gap.ml}>
|
|
||||||
<Field
|
<Field
|
||||||
type="password"
|
type="password"
|
||||||
id="register-confirm-input"
|
id="register-confirm-input"
|
||||||
@@ -279,9 +276,8 @@ const StepThree = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
error={errors.confirm}
|
error={errors.confirm}
|
||||||
/>
|
/>
|
||||||
</Box>
|
|
||||||
</form>
|
</form>
|
||||||
<Stack gap={theme.gap.small} my={theme.gap.large}>
|
<Stack gap={theme.gap.small} mb={theme.gap.large}>
|
||||||
<Check
|
<Check
|
||||||
text="Must be at least 8 characters long"
|
text="Must be at least 8 characters long"
|
||||||
variant={
|
variant={
|
||||||
|
|||||||
@@ -135,6 +135,9 @@
|
|||||||
.auth .check span.MuiTypography-root {
|
.auth .check span.MuiTypography-root {
|
||||||
font-size: var(--env-var-font-size-medium);
|
font-size: var(--env-var-font-size-medium);
|
||||||
}
|
}
|
||||||
|
.auth form + form {
|
||||||
|
margin: var(--env-var-spacing-1-plus) 0;
|
||||||
|
}
|
||||||
|
|
||||||
.auth > .MuiStack-root:nth-of-type(1) {
|
.auth > .MuiStack-root:nth-of-type(1) {
|
||||||
height: var(--env-var-nav-bar-height);
|
height: var(--env-var-nav-bar-height);
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import {
|
|||||||
Pagination,
|
Pagination,
|
||||||
PaginationItem,
|
PaginationItem,
|
||||||
Paper,
|
Paper,
|
||||||
|
Typography,
|
||||||
|
Box,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
|
||||||
import ArrowBackRoundedIcon from "@mui/icons-material/ArrowBackRounded";
|
import ArrowBackRoundedIcon from "@mui/icons-material/ArrowBackRounded";
|
||||||
@@ -104,6 +106,18 @@ const IncidentTable = ({ monitors, selectedMonitor, filter }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
{checks?.length === 0 && selectedMonitor === "0" ? (
|
||||||
|
<Box>
|
||||||
|
<Typography textAlign="center">No incidents recorded yet.</Typography>
|
||||||
|
</Box>
|
||||||
|
) : checks?.length === 0 ? (
|
||||||
|
<Box>
|
||||||
|
<Typography textAlign="center">
|
||||||
|
The monitor you have selected, has no recorded incidents yet.
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
) : (
|
||||||
<>
|
<>
|
||||||
<TableContainer component={Paper}>
|
<TableContainer component={Paper}>
|
||||||
<Table>
|
<Table>
|
||||||
@@ -141,6 +155,8 @@ const IncidentTable = ({ monitors, selectedMonitor, filter }) => {
|
|||||||
</TableContainer>
|
</TableContainer>
|
||||||
{paginationComponent}
|
{paginationComponent}
|
||||||
</>
|
</>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,12 @@
|
|||||||
.incidents .MuiPagination-root {
|
.incidents .MuiPagination-root {
|
||||||
background-color: var(--env-var-color-8);
|
background-color: var(--env-var-color-8);
|
||||||
}
|
}
|
||||||
|
.incidents > .MuiBox-root {
|
||||||
|
background-color: var(--env-var-color-8);
|
||||||
|
border: solid 1px var(--env-var-color-6);
|
||||||
|
border-radius: var(--env-var-radius-1);
|
||||||
|
padding: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
/* remove later */
|
/* remove later */
|
||||||
.incidents .MuiSelect-select {
|
.incidents .MuiSelect-select {
|
||||||
|
|||||||
Reference in new issue
Block a user