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
+28 -60
View File
@@ -1,3 +1,4 @@
import { JSONPath as jsonpath } from "jsonpath-plus";
import useTranslation from "next-translate/useTranslation";
import Link from "next/link";
import { useRouter } from "next/router";
@@ -5,35 +6,31 @@ import { parseCookies } from "nookies";
import { connect } from "react-redux";
import {
deleteAwaitingSubmissions,
deleteMyRepresentationsFromBlob,
deleteWatchedCases,
getAwaitingSubmissionProxy,
getPortalModuleDetailsProxy,
getWatchedCasesProxy,
deleteMyRepresentationsFromBlob,
getRepsFromBlobProxy,
getWatchedCasesProxy,
} from "../../actions";
import transLookup from "../../data/lookuptranslations.json";
import {
setAwaitingSubmission,
setAwaitingSubmissionDetails,
} from "../../store/awaitingSubmission/action";
import {
setWatchedCases,
setWatchedCasesDetails,
} from "../../store/watchedCases/action";
import { getFormCollectionByID } from "../utils";
import { JSONPath as jsonpath } from "jsonpath-plus";
import transLookup from "../../data/lookuptranslations.json";
import {
setMyRepresentations,
setMyRepresentationsDetails,
setMySubmittedReps,
setMySubmittedRepsDetails,
} from "../../store/myRepresentations/action";
import {
setCurrentLinkedCases,
setCurrentReference,
setCurrentView,
} from "../../store/currentView/action";
import {
setMyRepresentations,
setMyRepresentationsDetails,
} from "../../store/myRepresentations/action";
import {
setWatchedCases,
setWatchedCasesDetails,
} from "../../store/watchedCases/action";
import { getFormCollectionByID, getDetailsProxy } from "../utils";
const TopThree = (props) => {
let { t } = useTranslation();
@@ -78,9 +75,11 @@ const TopThree = (props) => {
.then(() => {
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
setWatchedCases(data),
getDetails(data, "myWatchedCases").then((data) => {
setWatchedCasesDetails(data);
});
getDetailsProxy(data, "myWatchedCases").then(
(data) => {
setWatchedCasesDetails(data);
}
);
});
});
@@ -93,15 +92,16 @@ const TopThree = (props) => {
getAwaitingSubmissionProxy(cookies.pinsUser).then(
(data) => {
setAwaitingSubmission(data),
getDetails(data, "awaitingSubmission").then(
(data) => {
//console.log(
// "submission get details:",
// data
// );
setAwaitingSubmissionDetails(data);
}
);
getDetailsProxy(
data,
"awaitingSubmission"
).then((data) => {
//console.log(
// "submission get details:",
// data
// );
setAwaitingSubmissionDetails(data);
});
}
);
});
@@ -134,38 +134,6 @@ const TopThree = (props) => {
});
};
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 getIncidentId = (topThreeType, objArr) => {
switch (topThreeType) {
case "myCases":