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