added searching by LPA application ref and criteria highlighting
This commit is contained in:
@@ -64,6 +64,54 @@ const RenderTextfield = ({
|
||||
</>
|
||||
);
|
||||
};
|
||||
const RenderLPATextfield = ({
|
||||
id,
|
||||
className,
|
||||
rows,
|
||||
datafieldname,
|
||||
name,
|
||||
label,
|
||||
input,
|
||||
hint1,
|
||||
hint2,
|
||||
hint3,
|
||||
meta: { touched, error },
|
||||
...custom
|
||||
}) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="govuk-form-group">
|
||||
<div id="basicSearch-hint" className="govuk-hint ">
|
||||
<label className="govuk-label" htmlFor="caseRef">
|
||||
{t("search:lpareference-label")}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input
|
||||
{...input}
|
||||
className={className}
|
||||
name={name}
|
||||
id={id}
|
||||
/>
|
||||
{touched && error && (
|
||||
<span
|
||||
id={id + "-error"}
|
||||
className="govuk-error-message govuk-form-group--error"
|
||||
>
|
||||
<span className="govuk-visually-hidden">
|
||||
Error:
|
||||
</span>{" "}
|
||||
{error}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const RenderCaseStatusList = ({
|
||||
name,
|
||||
@@ -489,6 +537,9 @@ let AdvancedSearch = (props) => {
|
||||
searchString +=
|
||||
values.caseRef != null ? "q=" + values.caseRef.trim() + "&" : "";
|
||||
|
||||
searchString +=
|
||||
values.lpaRef != null ? "lpaRef=" + values.lpaRef + "&" : "";
|
||||
|
||||
searchString +=
|
||||
values.lpaTypes != null ? "lpa=" + values.lpaTypes + "&" : "";
|
||||
|
||||
@@ -562,6 +613,31 @@ let AdvancedSearch = (props) => {
|
||||
)}
|
||||
/>
|
||||
|
||||
<Field
|
||||
validate={[
|
||||
minLength(
|
||||
t(
|
||||
"myportal:searchcases-validation-minlength"
|
||||
)
|
||||
),
|
||||
]}
|
||||
className="govuk-input govuk-!-width-two-thirds"
|
||||
component={RenderLPATextfield}
|
||||
id="lpaRef"
|
||||
name="lpaRef"
|
||||
type="text"
|
||||
aria-describedby="lpaRef-hint"
|
||||
hint1={t(
|
||||
"myportal:searchcases-card-search-hint"
|
||||
)}
|
||||
hint2={t(
|
||||
"myportal:searchcases-card-search-example-label-1"
|
||||
)}
|
||||
hint3={t(
|
||||
"myportal:searchcases-card-search-example-label-2"
|
||||
)}
|
||||
/>
|
||||
|
||||
<Field
|
||||
name="appealTypes"
|
||||
id="appealTypes"
|
||||
|
||||
Reference in New Issue
Block a user