misc updates for filter and languages

This commit is contained in:
2022-05-17 09:56:42 +01:00
parent 477ce9c1e3
commit cba9446837
7 changed files with 102 additions and 22 deletions
+26 -5
View File
@@ -79,7 +79,14 @@ const DocumentDetails = (props) => {
id="showDocumentType"
name="showDocumentType"
>
<option value="all">All</option>
<option value="all">
{router.locale == "cy"
? jsonpath.query(
transLookup,
'$..[?(@.value=="All")].value_cy'
)
: "All"}
</option>
{documentTypes.map((item, key) => {
return (
<option
@@ -88,9 +95,17 @@ const DocumentDetails = (props) => {
item.pinswg_isharedocumentlocations
}
>
{
item.pinswg_isharedocumentlocationsLabel
}
{router.locale == "cy"
? jsonpath.query(
transLookup,
'$..[?(@.value=="' +
item.pinswg_isharedocumentlocationsLabel +
'")].value_cy'
)
: item.pinswg_isharedocumentlocationsLabel ||
t(
"case:summary-no-date-entered-label"
)}
</option>
);
})}
@@ -364,6 +379,7 @@ const DocumentDetails = (props) => {
selectedDocumentType,
fieldSortState,
orderByState,
getDocumentTypes,
getDocumentResults,
]);
@@ -390,7 +406,12 @@ const DocumentDetails = (props) => {
setShowSpinnerState(false);
});
},
[props.incidentid, selectedOption, selectedDocumentType]
[
props.incidentid,
selectedOption,
selectedDocumentType,
setDocumentDetails,
]
);
const getDocumentDetails = async () => {