chore(lint): unblock next lint and fix current eslint errors
This commit is contained in:
@@ -727,11 +727,11 @@ const RepCompleteSubmit = (props) => {
|
||||
{" "}
|
||||
</strong>
|
||||
</div>{" "}
|
||||
<a className="govuk-link" href="/">
|
||||
<Link className="govuk-link" href="/">
|
||||
{t(
|
||||
"myrepresentations:return-to-myportal-link"
|
||||
)}
|
||||
</a>
|
||||
</Link>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
export function capitalizeFirstLetter(val) {
|
||||
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
||||
@@ -44,11 +43,9 @@ export function hasOwnPropertyAndNotNull(obj, property) {
|
||||
return obj.hasOwnProperty(property) && obj[property] !== null;
|
||||
}
|
||||
|
||||
export function linkedCasesList(linkedCasesReference) {
|
||||
export function linkedCasesList(linkedCasesReference, locale) {
|
||||
//console.log(linkedCasesReference);
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
linkedCasesReference = linkedCasesReference.value || [];
|
||||
|
||||
return (
|
||||
@@ -59,7 +56,7 @@ export function linkedCasesList(linkedCasesReference) {
|
||||
<li key={key}>
|
||||
<Link
|
||||
href={
|
||||
router.locale == "cy"
|
||||
locale == "cy"
|
||||
? "/canlyniadauchwilio?q=" +
|
||||
item.title +
|
||||
"&lk=1"
|
||||
|
||||
@@ -18,7 +18,7 @@ const GoogleMapComponent = (props) => {
|
||||
let marker = new maps.Marker({
|
||||
position: { lat: dataArray[i].lat, lng: dataArray[i].lng },
|
||||
map,
|
||||
label: dataArray[i].id,
|
||||
label: dataArray[i].id
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -78,7 +78,7 @@ const GoogleMapComponent = (props) => {
|
||||
}
|
||||
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
||||
width={"100%"}
|
||||
maxheight={"400px"}
|
||||
style={{ maxHeight: "400px" }}
|
||||
height={"500px"}
|
||||
className={"mappingFrame"}
|
||||
></iframe>
|
||||
|
||||
@@ -351,9 +351,9 @@ let BuildCheckSection = (props) => {
|
||||
{" "}
|
||||
</strong>
|
||||
</div>{" "}
|
||||
<a className="govuk-link" href="/">
|
||||
<Link className="govuk-link" href="/">
|
||||
{t("newappeal:return-to-myportal-link")}
|
||||
</a>
|
||||
</Link>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
|
||||
@@ -975,7 +975,7 @@ const DNSSearchResults = (props) => {
|
||||
}
|
||||
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
||||
width={"100%"}
|
||||
maxheight={"400px"}
|
||||
style={{ maxHeight: "400px" }}
|
||||
height={"500px"}
|
||||
className={"mappingFrame"}
|
||||
></iframe>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import _ from "lodash";
|
||||
import Link from "next/link";
|
||||
|
||||
const RepsOnResults = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -46,9 +47,9 @@ const RepsOnResults = (props) => {
|
||||
.pinswg_speacialistcaseprocess == 846040000 && isLPA
|
||||
? true
|
||||
: props.searchDetailsObj[0].value[0]
|
||||
.pinswg_speacialistcaseprocess == 846040001
|
||||
? true
|
||||
: false;
|
||||
.pinswg_speacialistcaseprocess == 846040001
|
||||
? true
|
||||
: false;
|
||||
|
||||
return shouldShow;
|
||||
|
||||
@@ -155,7 +156,7 @@ const RepsOnResults = (props) => {
|
||||
)
|
||||
: formatDates(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
),
|
||||
)
|
||||
}
|
||||
)}
|
||||
<br />{" "}
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
getPortalModuleDetails
|
||||
} from "../../actions/services/caseService";
|
||||
import data from "../../data/collections.json";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
import xpath from "xpath";
|
||||
|
||||
@@ -775,9 +774,7 @@ export const updateLinks = (input) => {
|
||||
return updated;
|
||||
};
|
||||
|
||||
export const whichRepType = (props) => {
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
export const whichRepType = (props, locale) => {
|
||||
let repType;
|
||||
let whichBaseType =
|
||||
props.currentView?.caseReference.repDetails.representationType ||
|
||||
@@ -785,14 +782,13 @@ export const whichRepType = (props) => {
|
||||
|
||||
switch (whichBaseType) {
|
||||
case "Statement":
|
||||
repType = router.locale == "cy" ? "Datganiad" : "Statment";
|
||||
repType = locale == "cy" ? "Datganiad" : "Statment";
|
||||
break;
|
||||
case "Questionnaire":
|
||||
repType = router.locale == "cy" ? "Holiadur" : "Questionnaire";
|
||||
repType = locale == "cy" ? "Holiadur" : "Questionnaire";
|
||||
break;
|
||||
case "Final comments":
|
||||
repType =
|
||||
router.locale == "cy" ? "Sylwadau terfynol" : "Final comments";
|
||||
repType = locale == "cy" ? "Sylwadau terfynol" : "Final comments";
|
||||
break;
|
||||
default:
|
||||
// code block
|
||||
|
||||
Generated
+468
-612
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -100,8 +100,8 @@
|
||||
"@react-pdf/pdfkit": "3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^9.11.1",
|
||||
"eslint-config-next": "^15.0.3",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-next": "^14.2.28",
|
||||
"eslint-plugin-jsdoc": "^48.2.3",
|
||||
"prisma": "^5.0.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user