condtional display of blocks
This commit is contained in:
@@ -165,7 +165,6 @@ let Login = (props) => {
|
|||||||
router.replace({
|
router.replace({
|
||||||
pathname:
|
pathname:
|
||||||
router.locale == "cy" ? "/fymhorth" : "/myportal",
|
router.locale == "cy" ? "/fymhorth" : "/myportal",
|
||||||
shallow: true,
|
|
||||||
}))
|
}))
|
||||||
: //setShowSpinnerState(false),
|
: //setShowSpinnerState(false),
|
||||||
setValidLoginID(false);
|
setValidLoginID(false);
|
||||||
|
|||||||
+32
-5
@@ -89,8 +89,18 @@ const MyPortal = (props) => {
|
|||||||
alt={router.locale == "cy" ? "Defnyddiwr" : "User"}
|
alt={router.locale == "cy" ? "Defnyddiwr" : "User"}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
<div className="serviceBanner_userDetails_name">
|
<div className="serviceBanner_userDetails_name">
|
||||||
{props.accountDetails.accountDetails.firstname}{" "}
|
<Link href="/account/personaldetails">
|
||||||
{props.accountDetails.accountDetails.lastname}
|
<a className="govuk-button-secondary">
|
||||||
|
{
|
||||||
|
props.accountDetails.accountDetails
|
||||||
|
.firstname
|
||||||
|
}{" "}
|
||||||
|
{
|
||||||
|
props.accountDetails.accountDetails
|
||||||
|
.lastname
|
||||||
|
}
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Link
|
<Link
|
||||||
@@ -117,16 +127,33 @@ const MyPortal = (props) => {
|
|||||||
<div className="flex-container grid-row govuk-body ">
|
<div className="flex-container grid-row govuk-body ">
|
||||||
<MakeNewAppeal />
|
<MakeNewAppeal />
|
||||||
<SearchCases />
|
<SearchCases />
|
||||||
|
{props.awaitingSubmission.awaitingSubmission[
|
||||||
|
"@odata.count"
|
||||||
|
] > 0 && (
|
||||||
<AwaitingSubmission
|
<AwaitingSubmission
|
||||||
awaitingSubmission={props.awaitingSubmission}
|
awaitingSubmission={
|
||||||
|
props.awaitingSubmission
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
{props.myCases.myCases["@odata.count"] > 0 && (
|
||||||
<MyCases myCases={props.myCases} />
|
<MyCases myCases={props.myCases} />
|
||||||
<WatchedCases watchedCases={props.watchedCases} />
|
)}
|
||||||
|
{props.watchedCases.watchedCases["@odata.count"] >
|
||||||
|
0 && (
|
||||||
|
<WatchedCases
|
||||||
|
watchedCases={props.watchedCases}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{props.myRepresentations.myRepresentations[
|
||||||
|
"@odata.count"
|
||||||
|
] > 0 && (
|
||||||
<MyRepresentations
|
<MyRepresentations
|
||||||
myRepresentations={props.myRepresentations}
|
myRepresentations={props.myRepresentations}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
<Dns />
|
<Dns />
|
||||||
<YourAccount />
|
{/* <YourAccount /> */}
|
||||||
{showFileUpload == "true" && <UploadFile />}
|
{showFileUpload == "true" && <UploadFile />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ const MyCases = (props) => {
|
|||||||
topThreeType={"myCases"}
|
topThreeType={"myCases"}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{props.myCases.myCases["@odata.count"] != 0 && (
|
{props.myCases.myCases["@odata.count"] > 3 && (
|
||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link href="/myportal/viewall" shallow>
|
<Link href="/myportal/viewall">
|
||||||
<a
|
<a
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -21,12 +21,15 @@ const MyRepresentations = (props) => {
|
|||||||
<div className="cardModuleContainer">
|
<div className="cardModuleContainer">
|
||||||
<TopThree
|
<TopThree
|
||||||
showTopThree={props.myRepresentations.myRepresentations}
|
showTopThree={props.myRepresentations.myRepresentations}
|
||||||
|
showDetails={
|
||||||
|
props.myRepresentations.myRepresentationsDetails
|
||||||
|
}
|
||||||
topThreeType={"myRepresentations"}
|
topThreeType={"myRepresentations"}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{props.myRepresentations.myRepresentations["@odata.count"] !=
|
{props.myRepresentations.myRepresentations["@odata.count"] >
|
||||||
0 && (
|
3 && (
|
||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link href="/myportal/viewall" shallow>
|
<Link href="/myportal/viewall" shallow>
|
||||||
<a
|
<a
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ const TopThree = (props) => {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{topThreeType != "awaitingSubmission" ? (
|
{/* {topThreeType != "awaitingSubmission" ? ( */}
|
||||||
<div className="carModuleAddress">
|
<div className="carModuleAddress">
|
||||||
<b>{t("myportal:case-address")}:</b>{" "}
|
<b>{t("myportal:case-address")}:</b>{" "}
|
||||||
{_.isEmpty(showDetails)
|
{_.isEmpty(showDetails)
|
||||||
@@ -243,11 +243,25 @@ const TopThree = (props) => {
|
|||||||
)
|
)
|
||||||
? t("myportal:case-address-not-entered")
|
? t("myportal:case-address-not-entered")
|
||||||
: showDetails[index].value[0]
|
: showDetails[index].value[0]
|
||||||
.pinswg_siteaddressline1}
|
.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>
|
</div>
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath.query(
|
||||||
transLookup,
|
transLookup,
|
||||||
|
|||||||
@@ -21,11 +21,12 @@ const WatchedCases = (props) => {
|
|||||||
<div className="cardModuleContainer">
|
<div className="cardModuleContainer">
|
||||||
<TopThree
|
<TopThree
|
||||||
showTopThree={props.watchedCases.watchedCases}
|
showTopThree={props.watchedCases.watchedCases}
|
||||||
|
showDetails={props.watchedCases.watchedCasesDetails}
|
||||||
topThreeType={"watchedCases"}
|
topThreeType={"watchedCases"}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{props.watchedCases.watchedCases["@odata.count"] != 0 && (
|
{props.watchedCases.watchedCases["@odata.count"] > 3 && (
|
||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link href="/myportal/viewall" shallow>
|
<Link href="/myportal/viewall" shallow>
|
||||||
<a
|
<a
|
||||||
|
|||||||
Reference in New Issue
Block a user