refactor(actions): complete priority-1 consumer import migration pass
This commit is contained in:
@@ -12,8 +12,8 @@ import { sendGAEvent } from "@next/third-parties/google";
|
||||
import {
|
||||
getSearchDocumentDetails,
|
||||
getSearchDocumentDetailsPaged,
|
||||
getSearchDocumentTypes,
|
||||
} from "../../actions";
|
||||
getSearchDocumentTypes
|
||||
} from "../../actions/services/searchService";
|
||||
import { setCurrentPage } from "../../store/currentView/action";
|
||||
|
||||
import { setDocumentDetails } from "../../store/searchOutput/action";
|
||||
@@ -32,7 +32,7 @@ const DocumentDetails = (props) => {
|
||||
setDocumentDetails,
|
||||
setCurrentPage,
|
||||
docsOffline,
|
||||
showFilteredDocs,
|
||||
showFilteredDocs
|
||||
} = props;
|
||||
|
||||
const router = useRouter();
|
||||
@@ -57,7 +57,7 @@ const DocumentDetails = (props) => {
|
||||
|
||||
setCheckedItems((prev) => ({
|
||||
...prev,
|
||||
[name]: checked,
|
||||
[name]: checked
|
||||
}));
|
||||
setSelectAll(false);
|
||||
};
|
||||
@@ -132,7 +132,7 @@ const DocumentDetails = (props) => {
|
||||
? jsonpath({
|
||||
path: '$..[?(@ && @.value=="All")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: "All"}
|
||||
</option>
|
||||
@@ -151,7 +151,7 @@ const DocumentDetails = (props) => {
|
||||
item.pinswg_isharedocumentlocationsLabel +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item.pinswg_isharedocumentlocationsLabel ||
|
||||
t(
|
||||
@@ -298,7 +298,7 @@ const DocumentDetails = (props) => {
|
||||
incidentid +
|
||||
"')]",
|
||||
json: item,
|
||||
sanbox: {},
|
||||
sanbox: {}
|
||||
});
|
||||
detailsObj = item;
|
||||
return (
|
||||
@@ -330,7 +330,7 @@ const DocumentDetails = (props) => {
|
||||
}
|
||||
key={key}
|
||||
onClick={() => {
|
||||
toggleDownLoadLink(key),
|
||||
(toggleDownLoadLink(key),
|
||||
sendGAEvent(
|
||||
"event",
|
||||
"DownloadedFile",
|
||||
@@ -338,9 +338,9 @@ const DocumentDetails = (props) => {
|
||||
caseReference:
|
||||
props.caseReference,
|
||||
filename:
|
||||
detailsObj.pinswg_name,
|
||||
detailsObj.pinswg_name
|
||||
}
|
||||
);
|
||||
));
|
||||
}}
|
||||
>
|
||||
<span className="results-visually-hidden">
|
||||
@@ -388,7 +388,7 @@ const DocumentDetails = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -554,7 +554,7 @@ const DocumentDetails = (props) => {
|
||||
item.pinswg_isharedocumentlocationsLabel +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item.pinswg_isharedocumentlocationsLabel ||
|
||||
t(
|
||||
@@ -574,7 +574,7 @@ const DocumentDetails = (props) => {
|
||||
const data = [
|
||||
...document.querySelectorAll(
|
||||
".govuk-checkboxes__input:checked"
|
||||
),
|
||||
)
|
||||
].map((e) => e.value);
|
||||
setSelectedDocumentType(data);
|
||||
setCurrentPage(1);
|
||||
@@ -710,7 +710,7 @@ const DocumentDetails = (props) => {
|
||||
incidentid +
|
||||
"')]",
|
||||
json: item,
|
||||
eval: true,
|
||||
eval: true
|
||||
});
|
||||
detailsObj = item;
|
||||
return (
|
||||
@@ -827,7 +827,7 @@ const DocumentDetails = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -905,7 +905,7 @@ const DocumentDetails = (props) => {
|
||||
props.incidentid,
|
||||
selectedOption,
|
||||
selectedDocumentType,
|
||||
setDocumentDetails,
|
||||
setDocumentDetails
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1029,7 +1029,7 @@ const DocumentDetails = (props) => {
|
||||
orderByState,
|
||||
getDocumentTypes,
|
||||
getDocumentResults,
|
||||
lang,
|
||||
lang
|
||||
]);
|
||||
return (
|
||||
<div className="govuk-grid-row">
|
||||
@@ -1059,7 +1059,7 @@ const DocumentDetails = (props) => {
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
...state,
|
||||
...state
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1070,7 +1070,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
setCurrentPage: (currentPage) => {
|
||||
dispatch(setCurrentPage(currentPage));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user