Merged PR 1167: copied watchcase to search state so doesnt lose details
copied watchcase to search state so doesnt lose details Related work items: #11276
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
setCurrentLinkedCases,
|
setCurrentLinkedCases,
|
||||||
setCurrentReference,
|
setCurrentReference,
|
||||||
|
setCurrentView,
|
||||||
} from "../../store/currentView/action";
|
} from "../../store/currentView/action";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -539,7 +540,38 @@ const CaseSummary = (props) => {
|
|||||||
.pinswg_watchlistid,
|
.pinswg_watchlistid,
|
||||||
|
|
||||||
"watchedCases"
|
"watchedCases"
|
||||||
);
|
),
|
||||||
|
setCurrentView({
|
||||||
|
"viewName":
|
||||||
|
"Watched Cases",
|
||||||
|
"viewKey":
|
||||||
|
"watchedCases",
|
||||||
|
});
|
||||||
|
setCurrentReference({
|
||||||
|
"ticketnumber":
|
||||||
|
props
|
||||||
|
.currentView
|
||||||
|
.caseReference
|
||||||
|
.currentReference,
|
||||||
|
"currentReference":
|
||||||
|
props
|
||||||
|
.currentView
|
||||||
|
.caseReference
|
||||||
|
.currentReference,
|
||||||
|
"currentType":
|
||||||
|
"searchResultsObj",
|
||||||
|
"incidentid":
|
||||||
|
props
|
||||||
|
.currentView
|
||||||
|
.caseReference
|
||||||
|
.incidentid,
|
||||||
|
"appealType":
|
||||||
|
props
|
||||||
|
.currentView
|
||||||
|
.caseReference
|
||||||
|
.appealType,
|
||||||
|
"showMap": showMap,
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
title={t(
|
title={t(
|
||||||
"case:stop-watching-case-link"
|
"case:stop-watching-case-link"
|
||||||
@@ -1131,6 +1163,9 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
setWatchedCasesDetails: (watchedCasesDetails) => {
|
setWatchedCasesDetails: (watchedCasesDetails) => {
|
||||||
dispatch(setWatchedCasesDetails(watchedCasesDetails));
|
dispatch(setWatchedCasesDetails(watchedCasesDetails));
|
||||||
},
|
},
|
||||||
|
setCurrentView: (currentView) => {
|
||||||
|
dispatch(setCurrentView(currentView));
|
||||||
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ import {
|
|||||||
setAwaitingSubmissionDetails,
|
setAwaitingSubmissionDetails,
|
||||||
} from "../../store/awaitingSubmission/action";
|
} from "../../store/awaitingSubmission/action";
|
||||||
import { getFormCollectionByID } from "../../components/utils";
|
import { getFormCollectionByID } from "../../components/utils";
|
||||||
|
import {
|
||||||
|
setSearchDetails,
|
||||||
|
setSearchResults,
|
||||||
|
} from "../../store/searchOutput/action";
|
||||||
|
|
||||||
const TopThree = (props) => {
|
const TopThree = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -36,6 +40,8 @@ const TopThree = (props) => {
|
|||||||
setWatchedCasesDetails,
|
setWatchedCasesDetails,
|
||||||
setAwaitingSubmission,
|
setAwaitingSubmission,
|
||||||
setAwaitingSubmissionDetails,
|
setAwaitingSubmissionDetails,
|
||||||
|
setSearchResults,
|
||||||
|
setSearchDetails,
|
||||||
showLoginCheck,
|
showLoginCheck,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
@@ -198,6 +204,13 @@ const TopThree = (props) => {
|
|||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
data-id={index}
|
data-id={index}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
setSearchResults(
|
||||||
|
props.props.watchedCases.watchedCases
|
||||||
|
),
|
||||||
|
setSearchDetails(
|
||||||
|
props.props.watchedCases
|
||||||
|
.watchedCasesDetails
|
||||||
|
);
|
||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"ticketnumber":
|
"ticketnumber":
|
||||||
showTopThreeArr[key].ticketnumber,
|
showTopThreeArr[key].ticketnumber,
|
||||||
@@ -453,6 +466,12 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
setAwaitingSubmissionDetails: (awaitingSubmissionDetails) => {
|
setAwaitingSubmissionDetails: (awaitingSubmissionDetails) => {
|
||||||
dispatch(setAwaitingSubmissionDetails(awaitingSubmissionDetails));
|
dispatch(setAwaitingSubmissionDetails(awaitingSubmissionDetails));
|
||||||
},
|
},
|
||||||
|
setSearchResults: (searchResults) => {
|
||||||
|
dispatch(setSearchResults(searchResults));
|
||||||
|
},
|
||||||
|
setSearchDetails: (searchDetails) => {
|
||||||
|
dispatch(setSearchDetails(searchDetails));
|
||||||
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ const WatchedCases = (props) => {
|
|||||||
showLoginCheck={props.showLoginCheck}
|
showLoginCheck={props.showLoginCheck}
|
||||||
currentView={props.currentView}
|
currentView={props.currentView}
|
||||||
myReps={props.myReps}
|
myReps={props.myReps}
|
||||||
|
props={props}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
<labels>
|
<labels>
|
||||||
<label description="Agricultural holding" hint="newappeal:new-appeal-agricultural-hint" />
|
<label description="Agricultural holding" hint="newappeal:new-appeal-agricultural-hint" />
|
||||||
</labels>
|
</labels>
|
||||||
<control validation="[required]" id="pinswg_agriculturalholding" classid="{07FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}" datafieldcontent="[846040000|newappeal:new-appeal-agricultural-holding-option-yes,846040001|newappeal:new-appeal-agricultural-holding-option-no,846040002|newappeal:new-appeal-agricultural-holding-option-NA]" datafieldname="pinswg_agriculturalholding" disabled="false" />
|
<control validation="[required]" id="pinswg_agriculturalholding" classid="{07FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}" datafieldcontent="[846040002|newappeal:new-appeal-agricultural-holding-option-yes,846040001|newappeal:new-appeal-agricultural-holding-option-no,846040000|newappeal:new-appeal-agricultural-holding-option-NA]" datafieldname="pinswg_agriculturalholding" disabled="false" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<labels>
|
<labels>
|
||||||
|
|||||||
Reference in New Issue
Block a user