Skip to content
This repository was archived by the owner on Jun 3, 2020. It is now read-only.

Reports Section: Filter reports according to disease - #296

Open
rheo-chiti wants to merge 1 commit into
scorelab:masterfrom
rheo-chiti:PR#19
Open

Reports Section: Filter reports according to disease #296
rheo-chiti wants to merge 1 commit into
scorelab:masterfrom
rheo-chiti:PR#19

Conversation

@rheo-chiti

Copy link
Copy Markdown

This fixes #295

In the Reports Section, users can report their disease by providing their name, description of the disease, symptoms, name of the disease. Users can also view reports worldwide as well as in their area.
The demo video

20200415_005433

Firstly all the unique diseases are loaded and stored and then displayed in the dropdown menu. On selecting any disease filter is applied and relevant reports are displayed.
For filtering this code is used:-
reports = this.state.reports
let newReports = []
for (let i = 0; i < reports.length; i++) {
if (reports[i].disease === value)
newReports.push(reports[i])
}
if (value === 'all')
newReports = reports
this.setState({ displayReports: newReports })

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reports Section(Feature Request): Filter reports according to disease

1 participant