Skip to content
Open
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
12 changes: 7 additions & 5 deletions src/dataEntryApp/components/SubjectVoided.jsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
import { styled } from "@mui/material/styles";
import { Paper, Grid, Button, Typography } from "@mui/material";
import { useTranslation } from "react-i18next";

const StyledPaper = styled(Paper)({
padding: 20,
marginBottom: 10,
elevation: 2
elevation: 2,
});

const StyledGrid = styled(Grid)({
alignItems: "flex-start"
alignItems: "flex-start",
});

const StyledTypography = styled(Typography)(({ theme }) => ({
color: theme.palette.error.main,
marginBottom: 8
marginBottom: 8,
}));

const SubjectVoided = ({ onUnVoid, showUnVoid }) => {
const { t } = useTranslation();
return (
<StyledPaper>
<StyledGrid container direction="column">
<StyledGrid>
<StyledTypography variant="h4">
{"THE SUBJECT HAS BEEN VOIDED"}
{t("THE SUBJECT HAS BEEN VOIDED")}
</StyledTypography>
</StyledGrid>
<StyledGrid>
{showUnVoid && (
<Button onClick={onUnVoid} color="primary">
{"Unvoid"}
{t("Unvoid")}
</Button>
)}
</StyledGrid>
Expand Down
22 changes: 11 additions & 11 deletions src/dataEntryApp/views/GlobalSearch/BasicForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import {
Grid,
FormGroup,
FormControlLabel,
Checkbox
Checkbox,
} from "@mui/material";
import { useTranslation } from "react-i18next";
import { find } from "lodash";
import AddressLevelsByType from "../../../common/components/AddressLevelsByType";

const StyledContainer = styled(Grid)({
marginTop: "1%",
marginBottom: "1%"
marginBottom: "1%",
});

const StyledLabel = styled(Typography)({
marginBottom: 10,
color: "rgba(0, 0, 0, 0.54)"
color: "rgba(0, 0, 0, 0.54)",
});

function BasicForm({
Expand All @@ -30,7 +30,7 @@ function BasicForm({
selectedGender,
enterValue,
addressLevelIds,
setAddressLevelIds
setAddressLevelIds,
}) {
const { t } = useTranslation();

Expand All @@ -52,7 +52,7 @@ function BasicForm({
);
}

const isFilterConfigured = !!find(searchFilterForms, sff => sff.type);
const isFilterConfigured = !!find(searchFilterForms, (sff) => sff.type);

return isFilterConfigured ? (
<Fragment>
Expand All @@ -76,7 +76,7 @@ function BasicForm({
</Grid>
) : (
""
)
),
)}

{searchFilterForms.map((searchFilterForm, index) =>
Expand All @@ -98,13 +98,13 @@ function BasicForm({
</Grid>
) : (
""
)
),
)}

{searchFilterForms.map((searchFilterForm, index) =>
searchFilterForm.type === "SearchAll"
? renderSearchAll(index, searchFilterForm.titleKey)
: ""
: "",
)}
</StyledContainer>
<StyledContainer container spacing={3}>
Expand All @@ -125,7 +125,7 @@ function BasicForm({
: false
}
onChange={onGenderChange}
name={gender.uuid}
name={t(gender.uuid)}
color="primary"
/>
}
Expand All @@ -137,7 +137,7 @@ function BasicForm({
</Grid>
) : (
""
)
),
)}
</StyledContainer>

Expand All @@ -153,7 +153,7 @@ function BasicForm({
</Grid>
) : (
""
)
),
)}
</StyledContainer>
</Fragment>
Expand Down
Loading