condtional display of blocks
This commit is contained in:
@@ -24,9 +24,9 @@ const MyCases = (props) => {
|
||||
topThreeType={"myCases"}
|
||||
/>
|
||||
</div>
|
||||
{props.myCases.myCases["@odata.count"] != 0 && (
|
||||
{props.myCases.myCases["@odata.count"] > 3 && (
|
||||
<div className="cardVieAll">
|
||||
<Link href="/myportal/viewall" shallow>
|
||||
<Link href="/myportal/viewall">
|
||||
<a
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -21,12 +21,15 @@ const MyRepresentations = (props) => {
|
||||
<div className="cardModuleContainer">
|
||||
<TopThree
|
||||
showTopThree={props.myRepresentations.myRepresentations}
|
||||
showDetails={
|
||||
props.myRepresentations.myRepresentationsDetails
|
||||
}
|
||||
topThreeType={"myRepresentations"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{props.myRepresentations.myRepresentations["@odata.count"] !=
|
||||
0 && (
|
||||
{props.myRepresentations.myRepresentations["@odata.count"] >
|
||||
3 && (
|
||||
<div className="cardVieAll">
|
||||
<Link href="/myportal/viewall" shallow>
|
||||
<a
|
||||
|
||||
@@ -228,26 +228,40 @@ const TopThree = (props) => {
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
{topThreeType != "awaitingSubmission" ? (
|
||||
<div className="carModuleAddress">
|
||||
<b>{t("myportal:case-address")}:</b>{" "}
|
||||
{_.isEmpty(showDetails)
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(showDetails[index])
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(showDetails[index].value[0])
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(
|
||||
showDetails[index].value[0]
|
||||
.pinswg_siteaddressline1
|
||||
)
|
||||
? t("myportal:case-address-not-entered")
|
||||
: showDetails[index].value[0]
|
||||
.pinswg_siteaddressline1}
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{/* {topThreeType != "awaitingSubmission" ? ( */}
|
||||
<div className="carModuleAddress">
|
||||
<b>{t("myportal:case-address")}:</b>{" "}
|
||||
{_.isEmpty(showDetails)
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(showDetails[index])
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(showDetails[index].value[0])
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(
|
||||
showDetails[index].value[0]
|
||||
.pinswg_siteaddressline1
|
||||
)
|
||||
? t("myportal:case-address-not-entered")
|
||||
: showDetails[index].value[0]
|
||||
.pinswg_siteaddressline1 +
|
||||
(!_.isEmpty(
|
||||
showDetails[index].value[0]
|
||||
.pinswg_siteaddressline2
|
||||
)
|
||||
? ", " +
|
||||
showDetails[index].value[0]
|
||||
.pinswg_siteaddressline2
|
||||
: "") +
|
||||
(!_.isEmpty(
|
||||
showDetails[index].value[0]
|
||||
.pinswg_siteaddresstown
|
||||
)
|
||||
? ", " +
|
||||
showDetails[index].value[0]
|
||||
.pinswg_siteaddresstown
|
||||
: "")}
|
||||
</div>
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
|
||||
@@ -21,11 +21,12 @@ const WatchedCases = (props) => {
|
||||
<div className="cardModuleContainer">
|
||||
<TopThree
|
||||
showTopThree={props.watchedCases.watchedCases}
|
||||
showDetails={props.watchedCases.watchedCasesDetails}
|
||||
topThreeType={"watchedCases"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{props.watchedCases.watchedCases["@odata.count"] != 0 && (
|
||||
{props.watchedCases.watchedCases["@odata.count"] > 3 && (
|
||||
<div className="cardVieAll">
|
||||
<Link href="/myportal/viewall" shallow>
|
||||
<a
|
||||
|
||||
Reference in New Issue
Block a user