copied watchcase to search state so doesnt lose details
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
import {
|
||||
setCurrentLinkedCases,
|
||||
setCurrentReference,
|
||||
setCurrentView,
|
||||
} from "../../store/currentView/action";
|
||||
|
||||
import {
|
||||
@@ -539,7 +540,38 @@ const CaseSummary = (props) => {
|
||||
.pinswg_watchlistid,
|
||||
|
||||
"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(
|
||||
"case:stop-watching-case-link"
|
||||
@@ -1131,6 +1163,9 @@ const mapDispatchToProps = (dispatch) => {
|
||||
setWatchedCasesDetails: (watchedCasesDetails) => {
|
||||
dispatch(setWatchedCasesDetails(watchedCasesDetails));
|
||||
},
|
||||
setCurrentView: (currentView) => {
|
||||
dispatch(setCurrentView(currentView));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -23,6 +23,10 @@ import {
|
||||
setAwaitingSubmissionDetails,
|
||||
} from "../../store/awaitingSubmission/action";
|
||||
import { getFormCollectionByID } from "../../components/utils";
|
||||
import {
|
||||
setSearchDetails,
|
||||
setSearchResults,
|
||||
} from "../../store/searchOutput/action";
|
||||
|
||||
const TopThree = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -36,6 +40,8 @@ const TopThree = (props) => {
|
||||
setWatchedCasesDetails,
|
||||
setAwaitingSubmission,
|
||||
setAwaitingSubmissionDetails,
|
||||
setSearchResults,
|
||||
setSearchDetails,
|
||||
showLoginCheck,
|
||||
} = props;
|
||||
|
||||
@@ -198,6 +204,13 @@ const TopThree = (props) => {
|
||||
className="govuk-link--no-underline"
|
||||
data-id={index}
|
||||
onClick={() => {
|
||||
setSearchResults(
|
||||
props.props.watchedCases.watchedCases
|
||||
),
|
||||
setSearchDetails(
|
||||
props.props.watchedCases
|
||||
.watchedCasesDetails
|
||||
);
|
||||
setCurrentReference({
|
||||
"ticketnumber":
|
||||
showTopThreeArr[key].ticketnumber,
|
||||
@@ -453,6 +466,12 @@ const mapDispatchToProps = (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}
|
||||
currentView={props.currentView}
|
||||
myReps={props.myReps}
|
||||
props={props}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
<labels>
|
||||
<label description="Agricultural holding" hint="newappeal:new-appeal-agricultural-hint" />
|
||||
</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>
|
||||
<labels>
|
||||
|
||||
Reference in New Issue
Block a user