refactor(actions): complete priority-1 consumer import migration pass
This commit is contained in:
@@ -15,177 +15,177 @@ import { sendGAEvent } from "@next/third-parties/google";
|
||||
import {
|
||||
getSearchDocumentDetails,
|
||||
getSearchDocumentDetailsPaged,
|
||||
getSearchDocumentTypes,
|
||||
getNewDocumentsPaged,
|
||||
} from "../../../actions";
|
||||
getSearchDocumentTypes
|
||||
} from "../../../actions/services/searchService";
|
||||
import { getNewDocumentsPaged } from "../../../actions/services/adminService";
|
||||
import { setCurrentPage } from "../../../store/currentView/action";
|
||||
|
||||
import { setDocumentDetails } from "../../../store/searchOutput/action";
|
||||
const getDocumentTypes = [
|
||||
{
|
||||
"Value": 846040009,
|
||||
"Label": "Main Party - Pre-Submission Docs",
|
||||
"Label": "Main Party - Pre-Submission Docs"
|
||||
},
|
||||
{
|
||||
"Value": 846040000,
|
||||
"Label": "Main Party - Submission Document",
|
||||
"Label": "Main Party - Submission Document"
|
||||
},
|
||||
{
|
||||
"Value": 846040001,
|
||||
"Label": "Main Party - Questionnaire",
|
||||
"Label": "Main Party - Questionnaire"
|
||||
},
|
||||
{
|
||||
"Value": 846040002,
|
||||
"Label": "Main Party - Statements",
|
||||
"Label": "Main Party - Statements"
|
||||
},
|
||||
{
|
||||
"Value": 846040003,
|
||||
"Label": "Main Party - Comments",
|
||||
"Label": "Main Party - Comments"
|
||||
},
|
||||
{
|
||||
"Value": 846040004,
|
||||
"Label": "Main Party - Written Statements of Evidence",
|
||||
"Label": "Main Party - Written Statements of Evidence"
|
||||
},
|
||||
{
|
||||
"Value": 846040010,
|
||||
"Label": "Main Party - Environmental Statements",
|
||||
"Label": "Main Party - Environmental Statements"
|
||||
},
|
||||
{
|
||||
"Value": 846040005,
|
||||
"Label": "Interested Party Representations",
|
||||
"Label": "Interested Party Representations"
|
||||
},
|
||||
{
|
||||
"Value": 846040006,
|
||||
"Label": "Correspondence",
|
||||
"Label": "Correspondence"
|
||||
},
|
||||
{
|
||||
"Value": 846040008,
|
||||
"Label": "Inspector Notes",
|
||||
"Label": "Inspector Notes"
|
||||
},
|
||||
{
|
||||
"Value": 846040007,
|
||||
"Label": "Final Decision/Report",
|
||||
"Label": "Final Decision/Report"
|
||||
},
|
||||
{
|
||||
"Value": 846040011,
|
||||
"Label": "Post Decision Correspondence",
|
||||
"Label": "Post Decision Correspondence"
|
||||
},
|
||||
{
|
||||
"Value": 846040012,
|
||||
"Label": "High Court Challenge Correspondence",
|
||||
"Label": "High Court Challenge Correspondence"
|
||||
},
|
||||
{
|
||||
"Value": 846040013,
|
||||
"Label": "Event - Correspondence",
|
||||
"Label": "Event - Correspondence"
|
||||
},
|
||||
{
|
||||
"Value": 846040014,
|
||||
"Label": "Event - Documents",
|
||||
"Label": "Event - Documents"
|
||||
},
|
||||
{
|
||||
"Value": 846040015,
|
||||
"Label": "Pre-Application - General",
|
||||
"Label": "Pre-Application - General"
|
||||
},
|
||||
{
|
||||
"Value": 846040016,
|
||||
"Label": "Pre-Application - EIA Screening",
|
||||
"Label": "Pre-Application - EIA Screening"
|
||||
},
|
||||
{
|
||||
"Value": 846040017,
|
||||
"Label": "Pre-Application - EIA Scoping",
|
||||
"Label": "Pre-Application - EIA Scoping"
|
||||
},
|
||||
{
|
||||
"Value": 846040018,
|
||||
"Label": "EIA Screening",
|
||||
"Label": "EIA Screening"
|
||||
},
|
||||
{
|
||||
"Value": 846040019,
|
||||
"Label": "EIA Scoping",
|
||||
"Label": "EIA Scoping"
|
||||
},
|
||||
{
|
||||
"Value": 846040020,
|
||||
"Label": "Pre-Application Services Documents",
|
||||
"Label": "Pre-Application Services Documents"
|
||||
},
|
||||
{
|
||||
"Value": 846040021,
|
||||
"Label": "Notification",
|
||||
"Label": "Notification"
|
||||
},
|
||||
{
|
||||
"Value": 846040022,
|
||||
"Label":
|
||||
"Submission - Environmental Statement - written statement and NTS",
|
||||
"Submission - Environmental Statement - written statement and NTS"
|
||||
},
|
||||
{
|
||||
"Value": 846040023,
|
||||
"Label": "Submission - Environmental Statement - Appendices",
|
||||
"Label": "Submission - Environmental Statement - Appendices"
|
||||
},
|
||||
{
|
||||
"Value": 846040024,
|
||||
"Label": "Submission - Environmental Statement - Figures",
|
||||
"Label": "Submission - Environmental Statement - Figures"
|
||||
},
|
||||
{
|
||||
"Value": 846040025,
|
||||
"Label": "Submission - Draft Infrastructure Consent Orders",
|
||||
"Label": "Submission - Draft Infrastructure Consent Orders"
|
||||
},
|
||||
{
|
||||
"Value": 846040026,
|
||||
"Label": "Submission - Compulsory Acquisition Information",
|
||||
"Label": "Submission - Compulsory Acquisition Information"
|
||||
},
|
||||
{
|
||||
"Value": 846040027,
|
||||
"Label": "Submission - Application Documents",
|
||||
"Label": "Submission - Application Documents"
|
||||
},
|
||||
{
|
||||
"Value": 846040028,
|
||||
"Label": "Examination Notices",
|
||||
"Label": "Examination Notices"
|
||||
},
|
||||
{
|
||||
"Value": 846040029,
|
||||
"Label": "Local/Marine Impact Reports",
|
||||
"Label": "Local/Marine Impact Reports"
|
||||
},
|
||||
{
|
||||
"Value": 846040030,
|
||||
"Label": "Submission - Further Information",
|
||||
"Label": "Submission - Further Information"
|
||||
},
|
||||
{
|
||||
"Value": 846040031,
|
||||
"Label": "Formal Variation requests",
|
||||
"Label": "Formal Variation requests"
|
||||
},
|
||||
{
|
||||
"Value": 846040032,
|
||||
"Label": "Further Information - Interested Party Representations",
|
||||
"Label": "Further Information - Interested Party Representations"
|
||||
},
|
||||
{
|
||||
"Value": 846040033,
|
||||
"Label": "Hearing Statements",
|
||||
"Label": "Hearing Statements"
|
||||
},
|
||||
{
|
||||
"Value": 846040034,
|
||||
"Label": "Events - Recordings",
|
||||
"Label": "Events - Recordings"
|
||||
},
|
||||
{
|
||||
"Value": 846040035,
|
||||
"Label": "Internal Correspondence",
|
||||
"Label": "Internal Correspondence"
|
||||
},
|
||||
{
|
||||
"Value": 846040036,
|
||||
"Label": "Consultation Response",
|
||||
},
|
||||
"Label": "Consultation Response"
|
||||
}
|
||||
];
|
||||
|
||||
const getOrigin = [
|
||||
{
|
||||
"Value": 846040000,
|
||||
"Label": "MDU",
|
||||
"Label": "MDU"
|
||||
},
|
||||
{
|
||||
"Value": 846040001,
|
||||
"Label": "Portal",
|
||||
"Label": "Portal"
|
||||
},
|
||||
{
|
||||
"Value": 846040002,
|
||||
"Label": "Manual",
|
||||
},
|
||||
"Label": "Manual"
|
||||
}
|
||||
];
|
||||
|
||||
const DocumentsTab = (props) => {
|
||||
@@ -200,7 +200,7 @@ const DocumentsTab = (props) => {
|
||||
setDocumentDetails,
|
||||
setCurrentPage,
|
||||
docsOffline,
|
||||
showFilteredDocs,
|
||||
showFilteredDocs
|
||||
} = props;
|
||||
|
||||
const router = useRouter();
|
||||
@@ -236,7 +236,7 @@ const DocumentsTab = (props) => {
|
||||
|
||||
setCheckedItems((prev) => ({
|
||||
...prev,
|
||||
[name]: checked,
|
||||
[name]: checked
|
||||
}));
|
||||
setSelectAll(false);
|
||||
};
|
||||
@@ -246,7 +246,7 @@ const DocumentsTab = (props) => {
|
||||
|
||||
setCheckedOriginItems((prev) => ({
|
||||
...prev,
|
||||
[name]: checked,
|
||||
[name]: checked
|
||||
}));
|
||||
setSelectOriginAll(false);
|
||||
};
|
||||
@@ -404,7 +404,7 @@ const DocumentsTab = (props) => {
|
||||
item.Label +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item.Label ||
|
||||
t(
|
||||
@@ -477,7 +477,7 @@ const DocumentsTab = (props) => {
|
||||
item.Label +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item.Label ||
|
||||
t(
|
||||
@@ -496,7 +496,7 @@ const DocumentsTab = (props) => {
|
||||
const checkedValues = [
|
||||
...document.querySelectorAll(
|
||||
".govuk-checkboxes__input:checked"
|
||||
),
|
||||
)
|
||||
].map((e) => e.value);
|
||||
|
||||
const origins = checkedValues
|
||||
@@ -697,7 +697,7 @@ const DocumentsTab = (props) => {
|
||||
incidentid +
|
||||
"')]",
|
||||
json: item,
|
||||
eval: true,
|
||||
eval: true
|
||||
});
|
||||
detailsObj = item;
|
||||
return (
|
||||
@@ -831,7 +831,7 @@ const DocumentsTab = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -946,7 +946,7 @@ const DocumentsTab = (props) => {
|
||||
selectedDocumentType,
|
||||
selectedWeeks,
|
||||
selectedDocumentOrigin,
|
||||
props.setDocumentDetails,
|
||||
props.setDocumentDetails
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1081,7 +1081,7 @@ const DocumentsTab = (props) => {
|
||||
getOrigin,
|
||||
getDocumentResults,
|
||||
lang,
|
||||
selectedWeeks,
|
||||
selectedWeeks
|
||||
]);
|
||||
|
||||
function countFieldValue(obj, field, targetValue) {
|
||||
@@ -1166,7 +1166,7 @@ const DocumentsTab = (props) => {
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
...state,
|
||||
...state
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1177,7 +1177,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
setCurrentPage: (currentPage) => {
|
||||
dispatch(setCurrentPage(currentPage));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user