Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/3232 wccf committee api call #3233

Merged
merged 3 commits into from
Oct 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions fec/fec/static/js/widgets/contributions-by-state-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,13 @@ function ContributionsByState() {
// Where to find individual candidate details
this.basePath_candidatePath = ['candidate'];
// Where to find individual candidate details
this.basePath_candidateCommitteesPath = ['candidate', '000', 'committees'];
this.basePath_candidateCommitteesPath = [
'candidate',
'000', // candidate ID
'committees',
'history',
2020 // election year / cycle
];
// Where to find the highest-earning candidates:
this.basePath_highestRaising = ['candidates', 'totals'];
// Where to find the list of states:
Expand Down Expand Up @@ -381,12 +387,13 @@ ContributionsByState.prototype.loadCandidateCommitteeDetails = function() {

// Before we fetch, make sure the query path has the current candidate id
this.basePath_candidateCommitteesPath[1] = this.candidateDetails.candidate_id;
// and the current election year/cycle
this.basePath_candidateCommitteesPath[4] = this.baseStatesQuery.cycle;

let committeesQuery = Object.assign(
{},
{
per_page: 100,
cycle: this.baseStatesQuery.cycle,
election_full: true
}
);
Expand Down