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

Replace loadData from ProfilePage with new parser #44

Open
nerocui opened this issue Sep 24, 2019 · 1 comment
Open

Replace loadData from ProfilePage with new parser #44

nerocui opened this issue Sep 24, 2019 · 1 comment
Assignees

Comments

@nerocui
Copy link
Owner

nerocui commented Sep 24, 2019

The current method use xlsx.utils.sheet_to_json() which misses data when the cell is empty.
The new parseSheet function accept a csv variable and returns rich data about the result. Using it also makes the ProfilePage more loosely coupled with parser logic.
In order to use it, have loadData call sheet_to_csv instead and pass the csv to parseSheet in recordParser.js. The result will be returned and should be passed to this.props.importRecords() to push to redux. Then navigate to '/preview'.

Helper methods will also needed to be implemented. parseHeader and parseCell in recordParser.js

@nerocui
Copy link
Owner Author

nerocui commented Sep 24, 2019

branch is feature-import-preview

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

No branches or pull requests

2 participants