welsh trans for questionnaire

This commit is contained in:
2023-11-02 10:14:32 +00:00
parent 1477ed74e4
commit 08552da757
9 changed files with 297 additions and 194 deletions
+1
View File
@@ -552,6 +552,7 @@ let MakeRepresentation = (props) => {
: isLPA
? "lpa"
: values.representationCapacity,
"locale": locale,
}));
console.log(values);
currentView.representationSubmit != true
@@ -123,7 +123,7 @@ export const RenderCondtionalRadioList = ({
...custom
}) => {
const required = (value) => (value ? undefined : "Required");
let { t } = useTranslation();
return (
<>
<div
@@ -195,32 +195,37 @@ export const RenderCondtionalRadioList = ({
{options[key]}
</label>
</div>
{value == "Yes" && options[key] == "Yes" && (
<div
className="govuk-radios__conditional "
id={"conditional-" + id}
>
{value ==
t("myrepresentations:questionnaire-yes") &&
options[key] ==
t(
"myrepresentations:questionnaire-yes"
) && (
<div
className="govuk-form-group"
key={"yes_group_" + key}
className="govuk-radios__conditional "
id={"conditional-" + id}
>
<label
className="govuk-label"
htmlFor={id + "_details"}
<div
className="govuk-form-group"
key={"yes_group_" + key}
>
Enter the name of the
company/group/organisation *
</label>
<Field
className="govuk-input govuk-!-width-one-half"
id={id + "_details"}
name={id + "_details"}
component="input"
type="text"
/>
<label
className="govuk-label"
htmlFor={id + "_details"}
>
Enter the name of the
company/group/organisation *
</label>
<Field
className="govuk-input govuk-!-width-one-half"
id={id + "_details"}
name={id + "_details"}
component="input"
type="text"
/>
</div>
</div>
</div>
)}
)}
</div>
))}
</div>
@@ -244,6 +249,8 @@ export const RenderLPACondtionalRadioList = ({
}) => {
const required = (value) => (value ? undefined : "Required");
console.log(error);
return (
<>
<div
@@ -302,7 +309,7 @@ export const RenderLPACondtionalRadioList = ({
type="radio"
className="govuk-radios__input"
value={options[key]}
validate={[required]}
validate={[eval(required)]}
/>
<label
className="govuk-label govuk-radios__label"
@@ -524,7 +531,7 @@ export const RenderDatePicker = ({
<DatePicker
{...custom}
locale={router.locale}
locale={custom.locale}
autoOk={true}
id={id}
dateFormat="dd/MM/yyyy"
@@ -323,13 +323,13 @@ let RepLPA = (props) => {
Next section
</a>
)}
{showQuestionnaireSection == 7 && (
{showQuestionnaireSection == 9 && (
<button
type="submit"
className="govuk-button"
data-module="govuk-button"
>
{t("common:continue-button")}
{t("common:continue-button")}ww
</button>
)}
{showQuestionnaireSection > 1 && (
@@ -23,8 +23,10 @@ import { select } from "xpath";
import jsonpath from "jsonpath";
import { getFormCollectionByID } from "../../../../components/utils";
let S78_Questionnaire = (props) => {
let { t } = useTranslation();
let S78_Questionnaire = async (props) => {
//let { t } = useTranslation();
let t = await getT(props.reqQuery.__nextLocale, "common");
const router = useRouter();
const { locale } = router;
@@ -953,7 +955,6 @@ let S78_Questionnaire = (props) => {
validate={[required]}
/>
</div>
<div className="govuk-form-group">
{onBehalfOfLPA}
<Field
@@ -974,11 +975,13 @@ let S78_Questionnaire = (props) => {
id="signedDate"
label={t("myrepresentations:s78-section-question-date")}
component={RenderDatePicker}
validate={[required]}
//validate={[required]}
errorMsg="Select a date"
dateStart="0"
dateEnd="1-y"
locale={locale}
/>
ss
</fieldset>
)}
</>