Skip to content

Commit

Permalink
Merge pull request #26 from wevote/add_office_name
Browse files Browse the repository at this point in the history
Add office display name to candidate page
  • Loading branch information
DaleMcGrew committed Feb 13, 2016
2 parents 60d69f6 + 1fc56f4 commit 662e317
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/routes/Ballot/Candidate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class Candidate extends Component {
</div>
</div>
<div className="col-xs-8">
<div>Running for US House - District 12</div>
<div>{ candidate.office_display_name }</div>
<ItemActionBar2 we_vote_id={candidate.we_vote_id}
is_support={candidate.is_support} is_oppose={candidate.is_oppose}
supportCount={candidate.supportCount} opposeCount={candidate.opposeCount} />
Expand Down
2 changes: 2 additions & 0 deletions src/js/stores/BallotStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ const BallotStore = createStore({
BallotAPIWorker
.candidatesRetrieve ( we_vote_id )
.then( (response) => {
var office_display_name = _ballot_store[response.office_we_vote_id]['ballot_item_display_name'];
var cand_list = _ballot_store [
response.office_we_vote_id
] . candidate_list = [];
Expand All @@ -235,6 +236,7 @@ const BallotStore = createStore({
var { we_vote_id: candidate_we_vote_id } = candidate;
cand_list . push (candidate_we_vote_id);
_ballot_store [ candidate_we_vote_id ] = shallowClone( candidate );
_ballot_store [ candidate_we_vote_id ].office_display_name = office_display_name;

promiseQueue
.push (
Expand Down

0 comments on commit 662e317

Please sign in to comment.