Merged PR 2442: remove lodash dependecies on _.has

Related work items: #23754
This commit is contained in:
Robert Bond
2026-06-29 13:08:06 +00:00
parent 7b6af58065
commit ff699735c7
85 changed files with 870 additions and 952 deletions
+13 -13
View File
@@ -12,7 +12,7 @@ import {
setSearchDetails
} from "../../../store/searchOutput/action";
import { getDetailsProxy, getSearchDetailsPaged } from "../../utils";
import { getDetailsProxy, getSearchDetailsPaged, hasOwn } from "../../utils";
import { getAdvancedSearchPaged } from "../../../actions/services/searchService";
import { getNewAppealsPage } from "../../../actions/services/adminService";
import {
@@ -306,7 +306,7 @@ function AppealsTab(props) {
)}
:
</span>
{_.has(
{hasOwn(
detailsObj,
"pinswg_projectlocation"
)
@@ -325,7 +325,7 @@ function AppealsTab(props) {
)[0]
: ""
: ""}
{_.has(
{hasOwn(
detailsObj,
"pinswg_siteaddressline1"
)
@@ -335,52 +335,52 @@ function AppealsTab(props) {
{/* {detailsObj.pinswg_siteaddressline1 !=
null && <br />} */}
{_.has(
{hasOwn(
detailsObj,
"pinswg_siteaddressline1"
) &&
detailsObj.pinswg_siteaddressline1 !=
null && <br />}
{_.has(
{hasOwn(
detailsObj,
"pinswg_siteaddressline1"
)
? detailsObj.pinswg_siteaddressline2
: ""}
{_.has(
{hasOwn(
detailsObj,
"pinswg_siteaddressline2"
) &&
detailsObj.pinswg_siteaddressline2 !=
null && <br />}
{_.has(
{hasOwn(
detailsObj,
"pinswg_siteaddresstown"
)
? detailsObj.pinswg_siteaddresstown
: ""}
{_.has(
{hasOwn(
detailsObj,
"pinswg_siteaddresstown"
) &&
detailsObj.pinswg_siteaddresstown !=
null && <br />}
{_.has(
{hasOwn(
detailsObj,
"pinswg_siteaddresscounty"
)
? detailsObj.pinswg_siteaddresscounty
: ""}
{_.has(
{hasOwn(
detailsObj,
"pinswg_siteaddresscounty"
) &&
detailsObj.pinswg_siteaddresscounty !=
null && <br />}
{_.has(
{hasOwn(
detailsObj,
"pinswg_siteaddresspostcode"
)
@@ -398,7 +398,7 @@ function AppealsTab(props) {
? item.pinswg_appellantfirstname +
" " +
item.pinswg_appellantlastname
: _.has(detailsObj, [
: hasOwn(detailsObj, [
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
])
? detailsObj[
@@ -413,7 +413,7 @@ function AppealsTab(props) {
)}
:
</span>
{_.has(item, [
{hasOwn(item, [
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
])
? router.locale == "cy"
+5 -5
View File
@@ -5,7 +5,7 @@ import { useRouter } from "next/router";
import { useCallback, useEffect, useRef, useState } from "react";
import { connect } from "react-redux";
import transLookup from "../../../data/lookuptranslations.json";
import { formatDates, getDocLink } from "../../utils";
import { formatDates, getDocLink, hasOwn } from "../../utils";
import PaginationControl from "../../../components/case/pagination";
import DocumentLink from "../../utils/downloads";
import { useDownloadQueue } from "../../utils/downloadmanager";
@@ -754,7 +754,7 @@ const DocumentsTab = (props) => {
// )}
// :
// </span>
// {_.has(
// {hasOwn(
// detailsObj,
// "pinswg_name"
// )
@@ -789,7 +789,7 @@ const DocumentsTab = (props) => {
)}
:
</span>
{_.has(
{hasOwn(
detailsObj,
"pinswg_name"
)
@@ -805,7 +805,7 @@ const DocumentsTab = (props) => {
)}
:
</span>
{_.has(
{hasOwn(
detailsObj,
"pinswg_name"
)
@@ -848,7 +848,7 @@ const DocumentsTab = (props) => {
:
</span>
{_.has(
{hasOwn(
detailsObj,
"createdon"
)