Skip to content

Commit

Permalink
Remove console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
cKellyDesign committed Sep 20, 2019
1 parent 2dcc2fd commit 6a64820
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/containers/pages/InterventionPlan/IRS/report/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ class IrsReport extends React.Component<RouteComponentProps<RouteParams> & IrsRe

const topJurIdFromPlan: string | null | undefined =
planById && (planById as Plan).jurisdiction_root_parent_ids![0];
console.log('topJurIdFromPlan',topJurIdFromPlan)

const jurArr = topJurIdFromPlan ? getLocationTree(topJurIdFromPlan) || [] : [];
console.log('jurArr',jurArr)

const planJurArrParams = superset.getFormData(5000, [
{ comparator: planId, operator: '==', subject: 'plan_id' },
]);
Expand Down Expand Up @@ -190,21 +190,19 @@ class IrsReport extends React.Component<RouteComponentProps<RouteParams> & IrsRe
})
: []
);
console.log('planJurArr', planJurArr)

const planJurByIds = keyBy(planJurArr, j => j.jurisdiction_id);
console.log('planJurByIds', planJurByIds)
const jurisdictionsArray = jurArr.map(
(j: AnyJurisdiction) => planJurByIds[j.jurisdiction_id] || j
);
console.log('jurisdictionsArray', jurisdictionsArray)

fetchJurisdictionsActionCreator(jurisdictionsArray);

const jurisdictionsById = keyBy(jurisdictionsArray, j => j.jurisdiction_id);
console.log('jurisdictionsById', jurisdictionsById)

const childlessChildrenIds = getChildlessChildrenIds(jurisdictionsArray).filter(
j => j && planJurByIds[j]
);
console.log('childlessChildrenIds', childlessChildrenIds)

if (planById && childlessChildrenIds) {
// define ids of jurisdiction relevant to this plan - note: this is causing a delay when loading every time
Expand All @@ -213,7 +211,7 @@ class IrsReport extends React.Component<RouteComponentProps<RouteParams> & IrsRe
: getAncestorJurisdictionIds([...childlessChildrenIds], jurisdictionsArray).filter(
j => j && jurisdictionsById[j]
);
console.log('filteredJurisdictionIds', filteredJurisdictionIds)

if (!jurisdictionIdsByPlanId[planId]) {
fetchJurisdictionIdsByPlanIdActionCreator({ [planId]: [...filteredJurisdictionIds] });
}
Expand Down

0 comments on commit 6a64820

Please sign in to comment.