only give link for published cases in my case card
This commit is contained in:
@@ -158,6 +158,13 @@ const TopThree = (props) => {
|
|||||||
<div className="cardModuleDetails">
|
<div className="cardModuleDetails">
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:case-reference")}:</b>
|
<b>{t("myportal:case-reference")}:</b>
|
||||||
|
{topThreeType == "myCases" &&
|
||||||
|
showTopThreeArr[key].pinswg_publishtoweb === false ? (
|
||||||
|
<span>
|
||||||
|
{showTopThreeArr[key].ticketnumber}{" "}
|
||||||
|
<b> - Pending</b>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
topThreeType == "awaitingSubmission" ||
|
topThreeType == "awaitingSubmission" ||
|
||||||
@@ -178,7 +185,8 @@ const TopThree = (props) => {
|
|||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_appealcasetype +
|
.pinswg_appealcasetype +
|
||||||
"&casereference=" +
|
"&casereference=" +
|
||||||
showTopThreeArr[key].pinswg_title +
|
showTopThreeArr[key]
|
||||||
|
.pinswg_title +
|
||||||
"&inid=" +
|
"&inid=" +
|
||||||
showTopThreeArr[key].incidentid
|
showTopThreeArr[key].incidentid
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
@@ -226,6 +234,7 @@ const TopThree = (props) => {
|
|||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]}{" "}
|
]}{" "}
|
||||||
</Link>
|
</Link>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
{/* {(topThreeType == "awaitingSubmission" ||
|
{/* {(topThreeType == "awaitingSubmission" ||
|
||||||
topThreeType == "watchedCases") && ( */}
|
topThreeType == "watchedCases") && ( */}
|
||||||
|
|||||||
@@ -78,11 +78,18 @@ const ViewAllResults = (props) => {
|
|||||||
resultsRowArr.push(
|
resultsRowArr.push(
|
||||||
<div className="govuk-summary-list__row" key={key}>
|
<div className="govuk-summary-list__row" key={key}>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 govuk-!-padding-left-2">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16 govuk-!-padding-left-2">
|
||||||
|
{currentView.viewKey == "myCases" &&
|
||||||
|
resultsArr[key].pinswg_publishtoweb === false ? (
|
||||||
|
<div className="cardModuleReference">
|
||||||
|
{resultsArr[key].ticketnumber} <b> Pending</b>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
currentView.viewKey == "myRepresentations"
|
currentView.viewKey == "myRepresentations"
|
||||||
? {
|
? {
|
||||||
pathname: "/myportal/representation",
|
pathname:
|
||||||
|
"/myportal/representation",
|
||||||
query: {
|
query: {
|
||||||
case: resultsArr[key].caseRef,
|
case: resultsArr[key].caseRef,
|
||||||
state: "edit",
|
state: "edit",
|
||||||
@@ -122,25 +129,29 @@ const ViewAllResults = (props) => {
|
|||||||
"ticketnumber":
|
"ticketnumber":
|
||||||
resultsArr[key].ticketnumber,
|
resultsArr[key].ticketnumber,
|
||||||
"currentReference":
|
"currentReference":
|
||||||
currentView.viewKey != "watchedCases"
|
currentView.viewKey !=
|
||||||
|
"watchedCases"
|
||||||
? currentView.viewKey ==
|
? currentView.viewKey ==
|
||||||
"myRepresentations"
|
"myRepresentations"
|
||||||
? resultsArr[key].caseRef
|
? resultsArr[key].caseRef
|
||||||
: resultsArr[key].ticketnumber
|
: resultsArr[key]
|
||||||
|
.ticketnumber
|
||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
],
|
||||||
|
|
||||||
"currentType": currentView.viewKey,
|
"currentType": currentView.viewKey,
|
||||||
"incidentid":
|
"incidentid":
|
||||||
currentView.viewKey != "watchedCases"
|
currentView.viewKey !=
|
||||||
|
"watchedCases"
|
||||||
? resultsArr[key].incidentid
|
? resultsArr[key].incidentid
|
||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
"_pinswg_watchedcase_value"
|
"_pinswg_watchedcase_value"
|
||||||
],
|
],
|
||||||
|
|
||||||
"appealType":
|
"appealType":
|
||||||
resultsArr[key].pinswg_appealcasetype,
|
resultsArr[key]
|
||||||
|
.pinswg_appealcasetype,
|
||||||
"repDetails":
|
"repDetails":
|
||||||
currentView.viewKey ==
|
currentView.viewKey ==
|
||||||
"myRepresentations" &&
|
"myRepresentations" &&
|
||||||
@@ -149,7 +160,9 @@ const ViewAllResults = (props) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
{t("search:searchresults-case-reference-label")}
|
{t(
|
||||||
|
"search:searchresults-case-reference-label"
|
||||||
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{currentView.viewKey != "watchedCases"
|
{currentView.viewKey != "watchedCases"
|
||||||
@@ -160,6 +173,7 @@ const ViewAllResults = (props) => {
|
|||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]}
|
]}
|
||||||
</Link>
|
</Link>
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantlastname,pinswg_appellantfirstname,pinswg_appellantagent,pinswg_agentfirstname,pinswg_agentlastname,pinswg_agentcompanyname&$expand=primarycontactid($select=fullname)&$filter=_customerid_value eq " +
|
"incidents?$select=modifiedon,pinswg_publishtoweb,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantlastname,pinswg_appellantfirstname,pinswg_appellantagent,pinswg_agentfirstname,pinswg_agentlastname,pinswg_agentcompanyname&$expand=primarycontactid($select=fullname)&$filter=_customerid_value eq " +
|
||||||
loggedInUserId +
|
loggedInUserId +
|
||||||
" and servicestage eq 0 and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true";
|
" and servicestage eq 0 and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user