From 4db96a5912bb0aaf1e3e57acf7e848495ae83f85 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 22 Mar 2019 11:28:30 +0100 Subject: add date --- scraper/client/paper/paper.verify.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scraper/client/paper') 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) } -- cgit v1.2.3-70-g09d2