Skip to content

Commit

Permalink
[governance] Update agendas to show pending (#2013)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlyp committed Feb 5, 2019
1 parent be09f59 commit f6b1469
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
8 changes: 7 additions & 1 deletion app/components/views/GovernancePage/Blockchain/AgendaCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ const AgendaCard = ({
: ({ className: "agenda-card", onClick })
)}>
<div className="agenda-card-bottom">
<AgendaFinishedIndicator />
{agenda.finished ? (
<AgendaFinishedIndicator />
) : (
<div className="agenda-card-indicator-pending">
<T id="agenda.card.inProgressIndicator" m="In Progress" />
</div>
)}
<div className="agenda-card-bottom-cfg">
{agenda.getDescription()} <span className="agenda-card-bottom-cfg-last">
<T id="agenda.overview.idLabel" m="Agenda ID" />:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { AgendaFinishedIndicator } from "../helpers";
import "style/AgendaOverview.less";

const Overview = ({
isFinished,
agendaId,
agendaDescription,
choices,
Expand Down Expand Up @@ -62,7 +63,13 @@ const Overview = ({
</div>
<div className="agenda-bottom">
<div className="agenda-bottom-overview">
<AgendaFinishedIndicator />
{isFinished ? (
<AgendaFinishedIndicator />
) : (
<div className="agenda-card-indicator-pending">
<T id="agenda.overview.inProgressIndicator" m="In Progress" />
</div>
)}
</div>
<div className="agenda-bottom-options">
<KeyBlueButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class AgendaOverview extends React.Component {
const { selectedChoiceId, disabled } = this.state;
const { setSelecedChoiceId, updatePreferences } = this;
const activeChoiceId = this.props.selectedChoice;
const isFinished = agenda.finished;
const agendaId = agenda.getId();
const agendaDescription = agenda.getDescription();
const choices = agenda.getChoicesList().map(choice => ({
Expand All @@ -31,6 +32,7 @@ class AgendaOverview extends React.Component {
return (
<Overview
{...{
isFinished,
agendaId,
agendaDescription,
selectedChoiceId,
Expand Down

0 comments on commit f6b1469

Please sign in to comment.