remove unused imports

This commit is contained in:
2024-06-19 06:32:38 +01:00
parent e4a1903b48
commit b0e2bb6e14
263 changed files with 1458 additions and 2693 deletions
+17 -67
View File
@@ -1,18 +1,18 @@
import Link from "next/link";
import { useRouter } from "next/router";
import { useState, useEffect, useRef } from "react";
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
import useTranslation from "next-translate/useTranslation";
import { JSONPath as jsonpath } from "jsonpath-plus";
import _ from "lodash";
import useTranslation from "next-translate/useTranslation";
import Link from "next/link";
import { useRouter } from "next/router";
import { useEffect } from "react";
import { connect } from "react-redux";
import transLookup from "../../data/lookuptranslations.json";
import {
getLinkedCases,
createWatchedCases,
getWatchedCasesProxy,
getPortalModuleDetailsProxy,
deleteWatchedCases,
getLinkedCases,
getPortalModuleDetailsProxy,
getWatchedCasesProxy,
} from "../../actions";
import {
setCurrentLinkedCases,
@@ -25,9 +25,9 @@ import {
setWatchedCasesDetails,
} from "../../store/watchedCases/action";
import { getFormCollectionByID } from "../utils";
import { getSession, useSession, signIn } from "next-auth/react";
import { parseCookies, setCookie, destroyCookie } from "nookies";
import { signIn, useSession } from "next-auth/react";
import { destroyCookie, parseCookies, setCookie } from "nookies";
import { getFormCollectionByID, getDetailsProxy } from "../utils";
import Pinswg_advertsid from "./summaryTypes/pinswg_advertsid";
import Pinswg_callinss77id from "./summaryTypes/pinswg_callinss77id";
@@ -106,45 +106,13 @@ const CaseSummary = (props) => {
.then(() => {
getWatchedCasesProxy(loggedInUser).then((data) => {
setWatchedCases(data),
getDetails(data, "myWatchedCases").then((data) => {
getDetailsProxy(data, "myWatchedCases").then((data) => {
setWatchedCasesDetails(data);
});
});
});
};
const getDetails = (resultsObj, detailsType) => {
//console.log(resultsObj);
let detailsArr = [];
resultsObj = resultsObj.value;
const detailsObj = resultsObj.map((searchDetail, index) => {
if (searchDetail.pinswg_appealcasetype == null) {
console.log(
detailsType != "myWatchedCases"
? searchDetail.ticketnumber
: searchDetail[
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
]
);
} else {
detailsArr.push(
getPortalModuleDetailsProxy(
getFormCollectionByID(
searchDetail.pinswg_appealcasetype
).LogicalCollectionName,
detailsType != "myWatchedCases"
? searchDetail.ticketnumber
: searchDetail[
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
]
)
);
}
});
//console.log(detailsArr);
return Promise.all(detailsArr);
};
const isWatchedCase = (whichIncident) => {
let isWatched = jsonpath(
"$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]",
@@ -162,9 +130,11 @@ const CaseSummary = (props) => {
.then(() => {
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
setWatchedCases(data),
getDetails(data, "myWatchedCases").then((data) => {
setWatchedCasesDetails(data);
});
getDetailsProxy(data, "myWatchedCases").then(
(data) => {
setWatchedCasesDetails(data);
}
);
});
});
};
@@ -513,26 +483,6 @@ const CaseSummary = (props) => {
),
}
)}
{/* The
representation
period for
this appeal
is between{" "}
{formatDates(
detailsObj.pinswg_startdate
)}{" "}
and{" "}
{props
.currentView
.caseReference
.appealType ==
846040019
? formatDates(
detailsObj.pinswg_statementduedate
)
: formatDates(
detailsObj.pinswg_finalcommentsduedate
)} */}
<br />{" "}
{t(
"case:representation-date-passed-additional-label"