diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-03-22 11:28:30 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-03-22 11:28:30 +0100 |
| commit | 4db96a5912bb0aaf1e3e57acf7e848495ae83f85 (patch) | |
| tree | 519840d389a57a091021fd8fb3a6b2325aaabbcf /scraper/client/paper | |
| parent | 0f7c6e7088a4098097101449863d9411c5248d6e (diff) | |
add date
Diffstat (limited to 'scraper/client/paper')
| -rw-r--r-- | scraper/client/paper/paper.verify.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scraper/client/paper/paper.verify.js b/scraper/client/paper/paper.verify.js index a723052d..94bfc232 100644 --- a/scraper/client/paper/paper.verify.js +++ b/scraper/client/paper/paper.verify.js @@ -88,6 +88,13 @@ class PaperVerify extends Component { save() { console.log(this.state) + let date = new Date() + let mon = date.getMonth() + 1 + if (mon < 10) mon = "0" + mon + let day = date.getDate() + if (day < 10) day = "0" + day + let time = date.toTimeString().split(" ")[0] + let dateString = date.getFullYear() + '-' + mon + '-' + day + ' ' + time this.props.actions.postVerification({ paper_id: this.state.citation.id, title: this.state.citation.title, @@ -97,6 +104,7 @@ class PaperVerify extends Component { images_in_paper: this.state.images_in_paper, verified_by: this.state.verified_by, notes: this.state.notes, + date: dateString, }) this.next(false) } |
