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

MDA Lite Reporting #1536

Merged
merged 42 commits into from
Apr 13, 2021
Merged

MDA Lite Reporting #1536

merged 42 commits into from
Apr 13, 2021

Conversation

ciremusyoka
Copy link
Collaborator

@ciremusyoka ciremusyoka commented Mar 18, 2021

Part of #1494
Adds following views:

  1. MDA Lite plans list view
  2. Jurisdictions report view (From country level to ward level)
  3. Ward supervisors report view
  4. CDDs under a particular supervisor report view
  5. Wards map view

@ciremusyoka ciremusyoka added the WIP Work in Progress label Mar 18, 2021
@ciremusyoka ciremusyoka self-assigned this Mar 18, 2021
@coveralls
Copy link

coveralls commented Apr 9, 2021

Coverage Status

Coverage increased (+0.1%) to 90.71% when pulling bf55e0f on endfund-reports into 7d8945e on master.

@@ -288,6 +292,20 @@ export class HeaderComponent extends React.Component<HeaderProps, State> {
</DropdownItem>
</div>
)}

{ENABLE_MDA_LITE && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the enable/disable also work at the route level? i.e Can you access the route if the menu link is disabled?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the link will be accessible. Fixing that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kelvin-muchiri this is affecting all routes in reveal and have created an issue here to address it.

/** columns for mda Lite jurisdictions */
export const genderReportColumns = [
{
Header: 'Male',
Copy link
Contributor

@kelvin-muchiri kelvin-muchiri Apr 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to have this translated? plus the rest of the table columns

return <Loading />;
}
return (
<div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use React fragment <>...</> in this particular case instead of <div>....</div>

const tableProps = getCddTableProps(cddReportColumns, cddData, props);

if (loading) {
return <Loading />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we have this piece of code above the code that precedes it. i.e Why should we execute code then check for the loading status? In a case where loading is false, all that execution would be futile

const url = `${REPORT_MDA_LITE_CDD_REPORT_URL}/${original.plan_id}/${original.base_entity_id}/${original.id}`;
return <Link to={url}>{cell.value}</Link>;
},
Header: 'Name',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to translate this table column?

/** CDD columns */
export const cddReportColumns = [
{
Header: 'Name',
Copy link
Contributor

@kelvin-muchiri kelvin-muchiri Apr 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to translate these table columns?

// table props
const tableProps = getCddTableProps(supervisorColumns, supervisorData, props);

if (loading) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we have this piece of code above the code that precedes it. i.e Why should we execute code then check for the loading status? In a case where loading is false, all that execution would be futile

props: GenericJurisdictionProps & RouteComponentProps<RouteParams>
) => {
return (
<div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use react fragment instead of div?

const url = `${REPORT_MDA_LITE_CDD_REPORT_URL}/${original.plan_id}/${original.base_entity_id}`;
return <Link to={url}>{cell.value}</Link>;
},
Header: 'Name',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to translate the column name?

Copy link
Collaborator

@peterMuriuki peterMuriuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

reducerRegistry.register(genericPlanReducerName, GenericPlansReducer);
reducerRegistry.register(genericStructuresReducerName, genericStructuresReducer);

/** selectors */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hanging comment.

src/containers/pages/MDALite/map/index.tsx Outdated Show resolved Hide resolved
Comment on lines 20 to 22
Object {
"fetchPlans": [Function],
"history": Object {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am more of the opinion that we should use equality assertions for things like prop checks as opposed to snapshots.

src/containers/pages/MDALite/wardReports/index.tsx Outdated Show resolved Hide resolved
@peterMuriuki peterMuriuki merged commit c1c2bf2 into master Apr 13, 2021
@peterMuriuki peterMuriuki deleted the endfund-reports branch April 13, 2021 09:55
@Naima-Bashir Naima-Bashir added the QA- Failed QA label Apr 19, 2021
@Naima-Bashir
Copy link

Naima-Bashir commented Apr 19, 2021

#1554
bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA- Failed QA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants