forked from slifty/openhmis-intake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As of this commit, the imported file is sitting in a JS array in the browser. We still need to check the SSN against the API for duplicates, and to POST each non-duplicate record via the API. I've done some of the parsing inside the controller, which may be bad form. I just split the csv so that the headers and footers aren't sent back to the browser. Then, in the client-client (as we're calling it), I use the MIT-licensed "PapaParse" library to transform the csv lines into a JS array. I also fixed a call in index.jade so that it refers to PapaParse instead of to a different jquery library that I decided not to use. I added papaparse.js so that we could use the library. It has a license header and I don't think we need any other files from that repo. They do offer a minified version, if we prefer.
- Loading branch information
1 parent
3484230
commit 5a8de1e
Showing
4 changed files
with
1,418 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
5a8de1e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment:
When adding a third-party library (PapaParse), include full provenance information either in the commit message or in a README or some other easily-findable doc near where we put the library. See commit 7ce43ec for an example of the first way, which would be fine here.
I don't have an example handy of the second way, but it would be like if you had a third-party/ directory and you had a third-party/README.md file explaining where everything came from, then you could put the provenance information in there instead of into the commit message (because now it would be part of the commit's diff itself, so it's still "in the commit", even though not in the commit message).
5a8de1e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kfogel Thank you! I wasn't sure how much information we needed about PapaParse. Thanks for pointing me to your commit.