Skip to content

Commit

Permalink
Updated invoice status on mediator side
Browse files Browse the repository at this point in the history
  • Loading branch information
angel-torres committed Aug 23, 2019
1 parent bb31501 commit 4c62d3c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions client/src/components/UserInvoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import PayInvoiceButton from "./PayInvoiceButton";
import moment from "moment";
import { makeStyles } from "@material-ui/core/styles";
import Card from "@material-ui/core/Card";
import Button from "@material-ui/core/Button";
import CardContent from "@material-ui/core/CardContent";
import Typography from "@material-ui/core/Typography";

Expand Down Expand Up @@ -44,6 +45,18 @@ const useStyles = makeStyles(theme => ({
info: {
fontSize: "16px",
fontWeight: 500
},
invoiceStatus: {
margin: '0 auto',
padding: '10px',
color: '#5C90C1',
borderColor: "#5C90C1",
minWidth: "150px",
border: "1px solid #5C90C1",
textAlign: "center",
"&:hover": {
backgroundColor: "#FFFFFF"
}
}
}));

Expand Down Expand Up @@ -134,15 +147,14 @@ function UserInvoice(props) {
</div>

{localStorage.getItem("type") === "mediator" ? (
<strong>
Status:{" "}
<strong className={classes.invoiceStatus}>
{props.invoice.paid_at === null
? "Waiting for payment"
: "Paid"}
? "WAITING FOR PAYMENT"
: "PAID"}
</strong>
) : (
<PayInvoiceButton invoice={props.invoice} />
)}
<PayInvoiceButton invoice={props.invoice} />
)}
</div>
</CardContent>
</Card>
Expand Down
2 changes: 1 addition & 1 deletion client/src/views/NoMatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function NoMatch() {
<Link
style={{ color: "white" }}
className={classes.link}
to="/"
to={localStorage.getItem("type") === "mediator" ? "/mediator-cases" : "/cases"}
data-testid="link-returntomainpage"
>
<p
Expand Down

0 comments on commit 4c62d3c

Please sign in to comment.