updated drop downs

This commit is contained in:
2021-10-29 16:29:04 +01:00
parent 73d98d2097
commit c1448b6ff6
16 changed files with 204 additions and 101 deletions
+16 -15
View File
@@ -24,21 +24,22 @@ const MyCases = (props) => {
topThreeType={"myCases"}
/>
</div>
<div className="cardVieAll">
<Link href="/myportal/viewall" shallow>
<a
onClick={() => {
setCurrentView({
"viewName": "My Cases",
"viewKey": "myCases",
});
}}
>
{t("myportal:viewall-link")}
</a>
</Link>
</div>
{props.myCases.myCases["@odata.count"] != 0 && (
<div className="cardVieAll">
<Link href="/myportal/viewall" shallow>
<a
onClick={() => {
setCurrentView({
"viewName": "My Cases",
"viewKey": "myCases",
});
}}
>
{t("myportal:viewall-link")}
</a>
</Link>
</div>
)}
</div>
</div>
);
+17 -14
View File
@@ -25,20 +25,23 @@ const MyRepresentations = (props) => {
/>
</div>
<div className="cardVieAll">
<Link href="/myportal/viewall">
<a
onClick={() => {
setCurrentView({
"viewName": "My Representations",
"viewKey": "myRepresentations",
});
}}
>
{t("myportal:viewall-link")}
</a>
</Link>
</div>
{props.myRepresentations.myRepresentations["@odata.count"] !=
0 && (
<div className="cardVieAll">
<Link href="/myportal/viewall" shallow>
<a
onClick={() => {
setCurrentView({
"viewName": "My Representations",
"viewKey": "myRepresentations",
});
}}
>
{t("myportal:viewall-link")}
</a>
</Link>
</div>
)}
</div>
</div>
);
+24 -1
View File
@@ -140,7 +140,30 @@ const TopThree = (props) => {
);
});
return <>{topthreeRow}</>;
let noRecordsLabel = "";
switch (topThreeType) {
case "watchedCases":
noRecordsLabel = "You are not watching any cases";
break;
case "myRepresentations":
noRecordsLabel = "You have no representations";
break;
case "myCases":
noRecordsLabel = "You have no cases";
break;
case "awaitingSubmission":
noRecordsLabel = "You have no awaiting submissions";
break;
}
return (
<>
{topthreeRow.length == 0 ? (
<div>{noRecordsLabel}</div>
) : (
topthreeRow
)}
</>
);
};
const mapDispatchToProps = (dispatch) => {
+16 -14
View File
@@ -25,20 +25,22 @@ const WatchedCases = (props) => {
/>
</div>
<div className="cardVieAll">
<Link href="/myportal/viewall">
<a
onClick={() => {
setCurrentView({
"viewName": "Watched Cases",
"viewKey": "watchedCases",
});
}}
>
{t("myportal:viewall-link")}
</a>
</Link>
</div>
{props.watchedCases.watchedCases["@odata.count"] != 0 && (
<div className="cardVieAll">
<Link href="/myportal/viewall" shallow>
<a
onClick={() => {
setCurrentView({
"viewName": "Watched Cases",
"viewKey": "watchedCases",
});
}}
>
{t("myportal:viewall-link")}
</a>
</Link>
</div>
)}
</div>
</div>
);