use ticket not title/ref/pinswg_name
This commit is contained in:
@@ -207,11 +207,11 @@ const TopThree = (props) => {
|
||||
showTopThreeArr[key].incidentid
|
||||
: router.locale == "cy"
|
||||
? "/fymhorth/achos/" +
|
||||
showTopThreeArr[key].pinswg_title +
|
||||
showTopThreeArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
topThreeType
|
||||
: "/myportal/case/" +
|
||||
showTopThreeArr[key].pinswg_title +
|
||||
showTopThreeArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
topThreeType
|
||||
}
|
||||
@@ -239,9 +239,8 @@ const TopThree = (props) => {
|
||||
: showTopThreeArr[key][
|
||||
"_pinswg_case_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: showTopThreeArr[key][
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
: showTopThreeArr[key]
|
||||
.ticketnumber,
|
||||
"currentType": topThreeType,
|
||||
|
||||
"incidentid": getIncidentId(
|
||||
@@ -255,7 +254,8 @@ const TopThree = (props) => {
|
||||
});
|
||||
}}
|
||||
>
|
||||
{topThreeType != "watchedCases"
|
||||
{showTopThreeArr[key].pinswg_title}
|
||||
{/* {topThreeType != "watchedCases"
|
||||
? topThreeType != "myRepresentations"
|
||||
? showTopThreeArr[key].ticketnumber
|
||||
: showTopThreeArr[key][
|
||||
@@ -263,7 +263,7 @@ const TopThree = (props) => {
|
||||
]
|
||||
: showTopThreeArr[key][
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
]}{" "}
|
||||
]}{" "} */}
|
||||
</Link>
|
||||
)}
|
||||
{topThreeType == "watchedCases" && !props.myReps && (
|
||||
|
||||
@@ -247,8 +247,8 @@ const SearchResults = (props) => {
|
||||
resultsArrPaged.map((item, key) => {
|
||||
let detailsObj = jsonpath({
|
||||
path:
|
||||
'$..value[?(@ && @.pinswg_name=="' +
|
||||
item.pinswg_name +
|
||||
'$..value[?(@ && @.ticketnumber=="' +
|
||||
item.ticketnumber +
|
||||
'")]',
|
||||
|
||||
json: searchDetailsObj,
|
||||
|
||||
@@ -31,6 +31,8 @@ import {
|
||||
setWatchedCasesDetails,
|
||||
} from "../../store/watchedCases/action";
|
||||
import { getDetailsProxy, getSearchDetailsPaged } from "../utils";
|
||||
import RepsOnResults from "./repsonresults";
|
||||
import { signIn, useSession } from "next-auth/react";
|
||||
|
||||
const DNSSearchResults = (props) => {
|
||||
const {
|
||||
@@ -48,11 +50,13 @@ const DNSSearchResults = (props) => {
|
||||
setWatchedCases,
|
||||
setWatchedCasesDetails,
|
||||
showMap,
|
||||
showLoginCheck,
|
||||
} = props;
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const { data: session } = useSession();
|
||||
|
||||
var resultsArr = searchResultsObj.value || [];
|
||||
|
||||
@@ -299,8 +303,8 @@ const DNSSearchResults = (props) => {
|
||||
resultsArr.map((item, key) => {
|
||||
let detailsObj = jsonpath({
|
||||
path:
|
||||
'$..value[?(@ && @.pinswg_name=="' +
|
||||
item.title +
|
||||
'$..value[?(@ && @.ticketnumber=="' +
|
||||
item.ticketnumber +
|
||||
'")]',
|
||||
json: searchDetailsObj,
|
||||
eval: true,
|
||||
@@ -339,6 +343,8 @@ const DNSSearchResults = (props) => {
|
||||
"appealType":
|
||||
item.pinswg_appealcasetype,
|
||||
"showMap": showMap,
|
||||
"showLoginCheck":
|
||||
props.showLoginCheck,
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -350,6 +356,9 @@ const DNSSearchResults = (props) => {
|
||||
</span>
|
||||
{item.title}
|
||||
</Link>
|
||||
<RepsOnResults
|
||||
detailsObj={detailsObj}
|
||||
/>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
@@ -553,6 +562,51 @@ const DNSSearchResults = (props) => {
|
||||
)}
|
||||
</dd>
|
||||
)}
|
||||
|
||||
{(showLoginCheck == "true" ||
|
||||
showLoginCheck == true) &&
|
||||
!session && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
||||
<span className="results-visually-hidden">
|
||||
{t(
|
||||
"case:watch-this-case-link"
|
||||
)}
|
||||
</span>
|
||||
<button
|
||||
className="govuk-summary-list__actionLink watchLink"
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:trying-to-watch-case-label"
|
||||
) +
|
||||
item.title +
|
||||
"\n\n" +
|
||||
t(
|
||||
"case:trying-to-watch-case-redirect-label"
|
||||
)
|
||||
) &&
|
||||
// signIn("email");
|
||||
signIn(
|
||||
undefined,
|
||||
{
|
||||
callbackUrl:
|
||||
"/myportal/searchresults?q=" +
|
||||
searchString +
|
||||
"&toWatch=" +
|
||||
item.incidentid +
|
||||
"_" +
|
||||
item.pinswg_appealcasetype,
|
||||
}
|
||||
);
|
||||
}}
|
||||
title={t(
|
||||
"case:watch-this-case-link"
|
||||
)}
|
||||
>
|
||||
<span className="eye"></span>
|
||||
</button>
|
||||
</dd>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
|
||||
@@ -244,8 +244,8 @@ const SearchResults = (props) => {
|
||||
resultsArr.map((item, key) => {
|
||||
let detailsObj = jsonpath({
|
||||
path:
|
||||
'$..value[?(@ && @.pinswg_name=="' +
|
||||
item.title +
|
||||
'$..value[?(@ && @.ticketnumber=="' +
|
||||
item.ticketnumber +
|
||||
'")]',
|
||||
json: searchDetailsObj,
|
||||
eval: true,
|
||||
|
||||
Reference in New Issue
Block a user