Merged PR 2295: resolved lint warnings
resolved lint warnings Related work items: #22873
This commit is contained in:
@@ -353,8 +353,8 @@ const AwaitingSubmissionFromBlob = (props) => {
|
||||
<h3 className="heading-small card-heading">
|
||||
{t("myportal:awatitingsubmission-card-title")}
|
||||
</h3>
|
||||
|
||||
<TopThreeRow />
|
||||
|
||||
{props.awaitingSubmissionFromBlob["@odata.count"] > 1 && (
|
||||
<div className="cardVieAll">
|
||||
<Link
|
||||
|
||||
@@ -44,7 +44,7 @@ const MyRepresentations = (props) => {
|
||||
onClick={() => {
|
||||
setCurrentView({
|
||||
"viewName": "My Representations",
|
||||
"viewKey": "myRepresentations",
|
||||
"viewKey": "myRepresentations"
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -65,7 +65,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setCurrentView: (currentView) => {
|
||||
dispatch(setCurrentView(currentView));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ const MyRepresentations = (props) => {
|
||||
onClick={() => {
|
||||
setCurrentView({
|
||||
"viewName": "My Representations",
|
||||
"viewKey": "myRepresentations",
|
||||
"viewKey": "myRepresentations"
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -64,7 +64,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setCurrentView: (currentView) => {
|
||||
dispatch(setCurrentView(currentView));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -238,8 +238,12 @@ const TopThree = (props) => {
|
||||
? "/fymhorth/representation"
|
||||
: "/myportal/representation",
|
||||
query: {
|
||||
case: showTopThreeArr[key]
|
||||
.ticketnumber,
|
||||
case:
|
||||
showTopThreeArr[key]
|
||||
.ticketnumber ||
|
||||
showTopThreeArr[key].caseRef ||
|
||||
showTopThreeArr[key]
|
||||
.pinswg_name,
|
||||
state: "edit",
|
||||
created:
|
||||
showTopThreeArr[key]
|
||||
|
||||
@@ -4,7 +4,7 @@ import useTranslation from "next-translate/useTranslation";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { parseCookies } from "nookies";
|
||||
import { useCallback, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import {
|
||||
deleteAwaitingSubmissionsFromBlob,
|
||||
@@ -98,7 +98,7 @@ const ViewAllResults = (props) => {
|
||||
const isWatchedCases = currentViewKey === "watchedCases";
|
||||
const isMyCases = currentViewKey === "myCases";
|
||||
|
||||
var resultsArr = isAwaitingSubmissionDetails
|
||||
const resultsArr = isAwaitingSubmissionDetails
|
||||
? props["awaitingSubmission"].awaitingSubmissionDetails.case
|
||||
: isMySubmittedReps
|
||||
? props[currentViewKey][currentViewKey]
|
||||
@@ -286,7 +286,7 @@ const ViewAllResults = (props) => {
|
||||
}
|
||||
|
||||
setCurrentReference({
|
||||
"statuscode": item.statuscode,
|
||||
"statuscode": item.statuscode ?? null,
|
||||
ticketnumber: item.ticketnumber,
|
||||
currentReference: getCurrentReference(item),
|
||||
currentType: currentViewKey,
|
||||
@@ -452,10 +452,10 @@ const ViewAllResults = (props) => {
|
||||
const renderLineBreak = valueToDisplay && idx < 4; // Only insert <br> if it's not the last element
|
||||
|
||||
return (
|
||||
<>
|
||||
<span key={`${field}-${idx}`}>
|
||||
{valueToDisplay}
|
||||
{renderLineBreak && <br />}
|
||||
</>
|
||||
</span>
|
||||
);
|
||||
})}
|
||||
</dd>
|
||||
@@ -845,15 +845,12 @@ const ViewAllResults = (props) => {
|
||||
//setShowSpinnerState(true);
|
||||
};
|
||||
|
||||
const getSearchPageResults = useCallback(
|
||||
(pageNumber, orderBy, fieldSort) => {
|
||||
//console.log(advancedSearch, searchString, pageNumber);
|
||||
//console.log(pageNumber, orderBy, fieldSort);
|
||||
resultsArr.sort(dynamicSort(orderBy, fieldSort));
|
||||
//console.log(resultsArr);
|
||||
},
|
||||
[selectedOption]
|
||||
);
|
||||
const getSearchPageResults = (pageNumber, orderBy, fieldSort) => {
|
||||
//console.log(advancedSearch, searchString, pageNumber);
|
||||
//console.log(pageNumber, orderBy, fieldSort);
|
||||
resultsArr.sort(dynamicSort(orderBy, fieldSort));
|
||||
//console.log(resultsArr);
|
||||
};
|
||||
|
||||
function dynamicSort(property, order) {
|
||||
var sort_order = 1;
|
||||
|
||||
Reference in New Issue
Block a user