updated language fix and proxy config

This commit is contained in:
2021-09-29 16:45:56 +01:00
parent bca85d36bc
commit c2aea1e9d8
14 changed files with 214 additions and 82 deletions
+18 -5
View File
@@ -4,6 +4,7 @@ import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import { useState, useEffect, useRef } from "react";
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
import transLookup from "../../data/lookuptranslations.json";
import {
getBasicSearch,
@@ -111,11 +112,22 @@ const DocumentDetails = (props) => {
{t("case:documents-doc-type-label")}
:
</span>
{
detailsObj[
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
]
}
{router.locale == "cy"
? jsonpath.query(
transLookup,
'$..[?(@.value=="' +
detailsObj[
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy'
)
: detailsObj[
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
</dd>
<dd className="govuk-summary-list__value govuk-!-font-size-14">
<span className="results-visually-hidden">
@@ -156,6 +168,7 @@ const DocumentDetails = (props) => {
const docDetailsObj = async () => {
let docObj = await getSearchDocumentDetails1(incidentid)
.then((data) => {
console.log(data);
setDocumentDetails(data);
return data;
})