diff --git a/components/case/representation/index.js b/components/case/representation/index.js index f4134a93..c694ea84 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -479,6 +479,8 @@ let MakeRepresentation = (props) => { />; break; case "appellant": + case "apelydd": + case "Apelydd": case t( "myrepresentations:capacity-options-arr-appellant" ).toLocaleLowerCase(): @@ -543,6 +545,8 @@ let MakeRepresentation = (props) => { ); break; case "agent": + case "Asiant": + case "asiant": case t( "myrepresentations:capacity-options-arr-agent" ).toLowerCase(): @@ -873,7 +877,7 @@ let MakeRepresentation = (props) => { useSaveStatus && router.replace( router.locale != "en" - ? router.locale + "/myportal" + ? "/" + router.locale + "/fymhorth" : "/myportal" )) : useSaveStatus @@ -884,7 +888,7 @@ let MakeRepresentation = (props) => { uploadRepresentationFiles(values), router.replace( router.locale != "en" - ? router.locale + "/myportal" + ? "/" + router.locale + "/fymhorth" : "/myportal" )) : Object.assign(values, { @@ -1188,6 +1192,7 @@ let MakeRepresentation = (props) => {
+ www {whichControl()}
diff --git a/components/case/representation/representationAgent.js b/components/case/representation/representationAgent.js index f29115e2..c5c39db2 100644 --- a/components/case/representation/representationAgent.js +++ b/components/case/representation/representationAgent.js @@ -132,9 +132,10 @@ const RepAgent = (props) => { )} component={RenderCondtionalRadioList} validate={[required]} - legend={ - "Are you acting on behalf of a company, group or organisation?" - } + legend={t("case:representation-onbehalfof")} + hint={t( + "myrepresentations:representation-onbehalfof-hint" + )} />
diff --git a/components/case/representation/representationCompleteSubmit.js b/components/case/representation/representationCompleteSubmit.js index 5be1e836..52bc71c8 100644 --- a/components/case/representation/representationCompleteSubmit.js +++ b/components/case/representation/representationCompleteSubmit.js @@ -220,7 +220,12 @@ const RepCompleteSubmit = (props) => { function showRepsEnded(endDate) { let date = new Date(); date = new Date(date.toDateString()); - const end = new Date(endDate); + let end = new Date(endDate); + end.setUTCHours(23); + end.setUTCMinutes(59); + end.setUTCSeconds(59); + end.toISOString(); + return end > date ? false : true; } diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js index 93c75517..6057b18d 100644 --- a/components/case/representation/representationElements.js +++ b/components/case/representation/representationElements.js @@ -301,8 +301,7 @@ export const RenderCondtionalRadioList = ({
- e.g. "Owners of Numbers 1-5 High Street", or "Mr and Mrs - Smith" or "The executors of Mr Evans' estate" + {custom.hint}
{Object.keys(options).map((key, index) => ( @@ -325,44 +324,46 @@ export const RenderCondtionalRadioList = ({ className="govuk-label govuk-radios__label" htmlFor={id + "_" + index} > - {options[key]} + {options[key] == "Yes" + ? t( + "myrepresentations:questionnaire-yes" + ) + : t( + "myrepresentations:questionnaire-no" + )}
- {value == - t("myrepresentations:questionnaire-yes") && - options[key] == - t( - "myrepresentations:questionnaire-yes" - ) && ( + {value == "Yes" && options[key] == "Yes" && ( +
-
- - -
+ {t( + "myrepresentations:representation-onbehalfof-label" + )} + +
- )} +
+ )} ))} @@ -540,6 +541,13 @@ export const RenderPickList = ({ : optionsArr[key] == "Final comments" ? "Sylwadau terfynol" + : optionsArr[key] == + "Written representations" + ? "Sylwadau ysgrifenedig" + : optionsArr[key] == "Inquiry" + ? "Ymchwiliad" + : optionsArr[key] == "Hearing" + ? "Gwrandawiad" : optionsArr[key] : optionsArr[key]} @@ -1211,13 +1219,20 @@ export const RenderFileUpload = (field) => { {uploadCountMessage > 0 && completedUploadFiles == false && (
- Uploading {uploadCountMessage} files{" "} + {t("home:uploading-files-label", { + number: uploadCountMessage, + })}
)} {completedUploadFiles > 0 && uploadCountMessage > 0 && (
- {uploadCountMessage} files uploaded{" "} + {t( + "home:completed-uploading-files-label", + { + number: uploadCountMessage, + } + )}
)} @@ -1261,7 +1276,9 @@ export const RenderFileUpload = (field) => {

) : (

- Uploading... + {t( + "home:uploading-files-progress-label" + )}

)} @@ -1290,7 +1307,7 @@ export const RenderFileUpload = (field) => { blob.path.split("/")[1] ); }} - title="Remove this file" + title={t("home:remove-this-file-label")} > − diff --git a/components/case/representation/representationInterestedPartyPerson.js b/components/case/representation/representationInterestedPartyPerson.js index 3649b418..6967c61d 100644 --- a/components/case/representation/representationInterestedPartyPerson.js +++ b/components/case/representation/representationInterestedPartyPerson.js @@ -127,7 +127,12 @@ const RepInterestedPartyPerson = (props) => { name="representationOnBehalfOf" datafieldname="representationOnBehalfOf" // label="In what capacity do you wish to make representations on this case?" - options={["Yes", "No"]} + options={[ + t( + "myrepresentations:questionnaire-yes" + ), + t("myrepresentations:questionnaire-no"), + ]} id="representationOnBehalfOf" className="govuk-radios__input" errorMsg={t( @@ -135,9 +140,10 @@ const RepInterestedPartyPerson = (props) => { )} component={RenderCondtionalRadioList} validate={[required]} - legend={ - "Are you acting on behalf of a company, group or organisation?" - } + legend={t("case:representation-onbehalfof")} + hint={t( + "myrepresentations:representation-onbehalfof-hint" + )} /> diff --git a/components/case/representation/representationLPA.js b/components/case/representation/representationLPA.js index 5646ee95..477d5c9d 100644 --- a/components/case/representation/representationLPA.js +++ b/components/case/representation/representationLPA.js @@ -225,7 +225,8 @@ let RepLPA = (props) => { {!_.has( formObj["representationForm"], ["values", "representationType"] || - typeof props.representationType != "undefined" + typeof props.currentView.caseReference.repDetails != + "undefined" ) ? ( <>