partial updates for welsh in myportal

This commit is contained in:
2025-02-11 08:54:26 +00:00
parent 130102ad30
commit e23cdef338
5 changed files with 37 additions and 3 deletions
@@ -288,7 +288,10 @@ const AwaitingSubmissionFromBlob = (props) => {
</div> </div>
)} )}
<div className="cardModuleReference"> <div className="cardModuleReference">
<b>LPA:</b> <b>
{router.locale == "cy" ? "ACLl" : "LPA"}
:
</b>
{router.locale == "cy" {router.locale == "cy"
? jsonpath( ? jsonpath(
'$..[?(@.value=="' + '$..[?(@.value=="' +
+1 -1
View File
@@ -394,7 +394,7 @@ const TopThree = (props) => {
</div> </div>
)} )}
<div className="cardModuleReference"> <div className="cardModuleReference">
<b>LPA:</b> <b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
{router.locale == "cy" {router.locale == "cy"
? jsonpath( ? jsonpath(
'$..[?(@.value=="' + '$..[?(@.value=="' +
+1 -1
View File
@@ -313,7 +313,7 @@ const TopThree = (props) => {
{repRaisedDate(showTopThreeArr[key].repfile_name)} {repRaisedDate(showTopThreeArr[key].repfile_name)}
</div>{" "} </div>{" "}
<div className="cardModuleReference"> <div className="cardModuleReference">
<b>LPA:</b> <b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
{" "} {" "}
{router.locale == "cy" {router.locale == "cy"
+27
View File
@@ -8,6 +8,7 @@ import {
getPortalModuleDetails, getPortalModuleDetails,
} from "../../actions"; } from "../../actions";
import data from "../../data/collections.json"; import data from "../../data/collections.json";
import { useRouter } from "next/router";
import xpath from "xpath"; import xpath from "xpath";
@@ -644,3 +645,29 @@ export const updateLinks = (jsonObj) => {
return jsonObj; return jsonObj;
}; };
export const whichRepType = (props) => {
const router = useRouter();
const { locale } = router;
let repType;
let whichBaseType =
props.currentView?.caseReference.repDetails.representationType ||
formObj.representationForm.values.representationType;
switch (whichBaseType) {
case "Statement":
repType = router.locale == "cy" ? "Datganiad" : "Statment";
break;
case "Questionnaire":
repType = router.locale == "cy" ? "Holiadur" : "Questionnaire";
break;
case "Final comments":
repType =
router.locale == "cy" ? "Sylwadau terfynol" : "Final comments";
break;
default:
// code block
}
return repType;
};
+4
View File
@@ -611,6 +611,10 @@
{ {
"value": "Interested Party", "value": "Interested Party",
"value_cy": "Parti â Buddiant" "value_cy": "Parti â Buddiant"
},
{
"value": "LPA",
"value_cy": "ACLl"
} }
], ],
"representation-type": [ "representation-type": [