{"action":"created","comment":{"url":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/comments/146425887","pull_request_review_id":71365366,"id":146425887,"diff_hunk":"@@ -0,0 +1,107 @@\n+import React from 'react';\n+import { Button, Text, View } from 'react-native';\n+import { Form, InputField, PickerField,\n+         DatePickerField, TimePickerField } from 'react-native-form-generator';\n+import { APIRoutes } from '../../config/routes';\n+import PropTypes from 'prop-types';\n+\n+/**\n+ * @prop onCreateCourse - callback function when course create form is submitted\n+ */\n+class CreateCourseForm extends React.Component {\n+  constructor(props) {\n+    super(props);\n+    this._timeFormat = this._timeFormat.bind(this);\n+    this.state = {\n+      courseData: {}\n+    }\n+  }\n+\n+  _handleFormChange(courseData){\n+    //formData will be a json object that will contain refs of every field\n+    this.setState({courseData : courseData});\n+  }\n+\n+  _handleFormFocus(event, reactNode) {\n+   this.refs.scroll.scrollToFocusedInput(event, reactNode);\n+  }\n+\n+  /* Display time in HH:MM AM/PM format. */\n+  _timeFormat(date, mode) {\n+    if(!date) return \"\";\n+    let value=date.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});\n+    return value;\n+  }\n+\n+  render() {\n+    const today = new Date();\n+    const maxDate = new Date(today.getFullYear()+2, today.getMonth(), today.getDate());\n+    return (\n+      <View>\n+        <Form\n+          ref='registrationForm'\n+          onChange={this._handleFormChange.bind(this)}\n+          label=\"Personal Information\">\n+          <InputField\n+            ref='title'\n+            label='Course Title'\n+            placeholder='e.g. Montessori'/>\n+\n+          <InputField\n+            ref='teacher_1'\n+            label='Teacher ID 1'\n+            placeholder='e.g. 19322372'/>\n+\n+          <InputField\n+            ref='teacher_2'\n+            label='Teacher ID 2'\n+            placeholder='e.g. 12634669'/>\n+\n+          <PickerField\n+            ref='weekday'\n+            options={{\n+              'sun': 'Sunday',\n+              'mon': 'Monday',\n+              'tue': 'Tuesday',\n+              'wed': 'Wednesday',\n+              'thu': 'Thursday',\n+              'fri': 'Friday',\n+              'sat': 'Saturday',\n+            }}\n+            placeholder='Select Day'/>\n+\n+          <TimePickerField\n+            ref='start_time'\n+            dateTimeFormat={this._timeFormat}\n+            placeholder='Session Start'/>\n+\n+          <TimePickerField\n+            ref='end_time'\n+            dateTimeFormat={this._timeFormat}\n+            placeholder='Session End'/>\n+\n+          <DatePickerField\n+            ref='start_date'\n+            minimumDate={today}\n+            maximumDate={maxDate}\n+            mode=\"date\"\n+            placeholder='Start Date'/>\n+\n+          <DatePickerField\n+            ref='end_date'\n+            minimumDate={today}\n+            maximumDate={maxDate}\n+            mode='date'\n+            placeholder='End Date'/>\n+        </Form>\n+        <Button\n+          onPress={() => this.props.onCreateCourse(this.state.courseData)}","path":"components/Form/CreateCourseForm.js","position":98,"original_position":98,"commit_id":"979ff0edf35b92a92024b0e10e96dfcbc8710b27","original_commit_id":"979ff0edf35b92a92024b0e10e96dfcbc8710b27","user":{"login":"loischang","id":21254705,"avatar_url":"https://avatars1.githubusercontent.com/u/21254705?v=4","gravatar_id":"","url":"https://api.github.com/users/loischang","html_url":"https://github.com/loischang","followers_url":"https://api.github.com/users/loischang/followers","following_url":"https://api.github.com/users/loischang/following{/other_user}","gists_url":"https://api.github.com/users/loischang/gists{/gist_id}","starred_url":"https://api.github.com/users/loischang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loischang/subscriptions","organizations_url":"https://api.github.com/users/loischang/orgs","repos_url":"https://api.github.com/users/loischang/repos","events_url":"https://api.github.com/users/loischang/events{/privacy}","received_events_url":"https://api.github.com/users/loischang/received_events","type":"User","site_admin":false},"body":"Add field validations","created_at":"2017-10-24T00:08:52Z","updated_at":"2017-10-24T00:15:04Z","html_url":"https://github.com/calblueprint/dream-mobile/pull/5#discussion_r146425887","pull_request_url":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/5","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/comments/146425887"},"html":{"href":"https://github.com/calblueprint/dream-mobile/pull/5#discussion_r146425887"},"pull_request":{"href":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/5","id":148266049,"html_url":"https://github.com/calblueprint/dream-mobile/pull/5","diff_url":"https://github.com/calblueprint/dream-mobile/pull/5.diff","patch_url":"https://github.com/calblueprint/dream-mobile/pull/5.patch","issue_url":"https://api.github.com/repos/calblueprint/dream-mobile/issues/5","number":5,"state":"open","locked":false,"title":"Course screen","user":{"login":"caseytakahashi","id":10657390,"avatar_url":"https://avatars3.githubusercontent.com/u/10657390?v=4","gravatar_id":"","url":"https://api.github.com/users/caseytakahashi","html_url":"https://github.com/caseytakahashi","followers_url":"https://api.github.com/users/caseytakahashi/followers","following_url":"https://api.github.com/users/caseytakahashi/following{/other_user}","gists_url":"https://api.github.com/users/caseytakahashi/gists{/gist_id}","starred_url":"https://api.github.com/users/caseytakahashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseytakahashi/subscriptions","organizations_url":"https://api.github.com/users/caseytakahashi/orgs","repos_url":"https://api.github.com/users/caseytakahashi/repos","events_url":"https://api.github.com/users/caseytakahashi/events{/privacy}","received_events_url":"https://api.github.com/users/caseytakahashi/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-10-23T23:42:32Z","updated_at":"2017-10-24T00:15:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d52238dca02199c18ba2b0db2c5cde8f88f0f5f2","assignee":{"login":"caseytakahashi","id":10657390,"avatar_url":"https://avatars3.githubusercontent.com/u/10657390?v=4","gravatar_id":"","url":"https://api.github.com/users/caseytakahashi","html_url":"https://github.com/caseytakahashi","followers_url":"https://api.github.com/users/caseytakahashi/followers","following_url":"https://api.github.com/users/caseytakahashi/following{/other_user}","gists_url":"https://api.github.com/users/caseytakahashi/gists{/gist_id}","starred_url":"https://api.github.com/users/caseytakahashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseytakahashi/subscriptions","organizations_url":"https://api.github.com/users/caseytakahashi/orgs","repos_url":"https://api.github.com/users/caseytakahashi/repos","events_url":"https://api.github.com/users/caseytakahashi/events{/privacy}","received_events_url":"https://api.github.com/users/caseytakahashi/received_events","type":"User","site_admin":false},"assignees":[{"login":"caseytakahashi","id":10657390,"avatar_url":"https://avatars3.githubusercontent.com/u/10657390?v=4","gravatar_id":"","url":"https://api.github.com/users/caseytakahashi","html_url":"https://github.com/caseytakahashi","followers_url":"https://api.github.com/users/caseytakahashi/followers","following_url":"https://api.github.com/users/caseytakahashi/following{/other_user}","gists_url":"https://api.github.com/users/caseytakahashi/gists{/gist_id}","starred_url":"https://api.github.com/users/caseytakahashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseytakahashi/subscriptions","organizations_url":"https://api.github.com/users/caseytakahashi/orgs","repos_url":"https://api.github.com/users/caseytakahashi/repos","events_url":"https://api.github.com/users/caseytakahashi/events{/privacy}","received_events_url":"https://api.github.com/users/caseytakahashi/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/5/commits","review_comments_url":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/5/comments","review_comment_url":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/calblueprint/dream-mobile/issues/5/comments","statuses_url":"https://api.github.com/repos/calblueprint/dream-mobile/statuses/979ff0edf35b92a92024b0e10e96dfcbc8710b27","head":{"label":"calblueprint:course_screen","ref":"course_screen","sha":"979ff0edf35b92a92024b0e10e96dfcbc8710b27","user":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars0.githubusercontent.com/u/2729578?v=4","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"repo":{"id":105316473,"name":"dream-mobile","full_name":"calblueprint/dream-mobile","owner":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars0.githubusercontent.com/u/2729578?v=4","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/calblueprint/dream-mobile","description":null,"fork":false,"url":"https://api.github.com/repos/calblueprint/dream-mobile","forks_url":"https://api.github.com/repos/calblueprint/dream-mobile/forks","keys_url":"https://api.github.com/repos/calblueprint/dream-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calblueprint/dream-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calblueprint/dream-mobile/teams","hooks_url":"https://api.github.com/repos/calblueprint/dream-mobile/hooks","issue_events_url":"https://api.github.com/repos/calblueprint/dream-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/calblueprint/dream-mobile/events","assignees_url":"https://api.github.com/repos/calblueprint/dream-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/calblueprint/dream-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/calblueprint/dream-mobile/tags","blobs_url":"https://api.github.com/repos/calblueprint/dream-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calblueprint/dream-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calblueprint/dream-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/calblueprint/dream-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calblueprint/dream-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/calblueprint/dream-mobile/languages","stargazers_url":"https://api.github.com/repos/calblueprint/dream-mobile/stargazers","contributors_url":"https://api.github.com/repos/calblueprint/dream-mobile/contributors","subscribers_url":"https://api.github.com/repos/calblueprint/dream-mobile/subscribers","subscription_url":"https://api.github.com/repos/calblueprint/dream-mobile/subscription","commits_url":"https://api.github.com/repos/calblueprint/dream-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/calblueprint/dream-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/calblueprint/dream-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/calblueprint/dream-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/calblueprint/dream-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/calblueprint/dream-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calblueprint/dream-mobile/merges","archive_url":"https://api.github.com/repos/calblueprint/dream-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calblueprint/dream-mobile/downloads","issues_url":"https://api.github.com/repos/calblueprint/dream-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/calblueprint/dream-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/calblueprint/dream-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/calblueprint/dream-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calblueprint/dream-mobile/labels{/name}","releases_url":"https://api.github.com/repos/calblueprint/dream-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/calblueprint/dream-mobile/deployments","created_at":"2017-09-29T20:56:52Z","updated_at":"2017-09-29T21:47:16Z","pushed_at":"2017-10-23T23:42:32Z","git_url":"git://github.com/calblueprint/dream-mobile.git","ssh_url":"git@github.com:calblueprint/dream-mobile.git","clone_url":"https://github.com/calblueprint/dream-mobile.git","svn_url":"https://github.com/calblueprint/dream-mobile","homepage":null,"size":157,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"calblueprint:master","ref":"master","sha":"3c9dd5eb49fc2ab34afa21ed5e44027531b0c188","user":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars0.githubusercontent.com/u/2729578?v=4","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"repo":{"id":105316473,"name":"dream-mobile","full_name":"calblueprint/dream-mobile","owner":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars0.githubusercontent.com/u/2729578?v=4","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/calblueprint/dream-mobile","description":null,"fork":false,"url":"https://api.github.com/repos/calblueprint/dream-mobile","forks_url":"https://api.github.com/repos/calblueprint/dream-mobile/forks","keys_url":"https://api.github.com/repos/calblueprint/dream-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calblueprint/dream-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calblueprint/dream-mobile/teams","hooks_url":"https://api.github.com/repos/calblueprint/dream-mobile/hooks","issue_events_url":"https://api.github.com/repos/calblueprint/dream-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/calblueprint/dream-mobile/events","assignees_url":"https://api.github.com/repos/calblueprint/dream-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/calblueprint/dream-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/calblueprint/dream-mobile/tags","blobs_url":"https://api.github.com/repos/calblueprint/dream-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calblueprint/dream-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calblueprint/dream-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/calblueprint/dream-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calblueprint/dream-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/calblueprint/dream-mobile/languages","stargazers_url":"https://api.github.com/repos/calblueprint/dream-mobile/stargazers","contributors_url":"https://api.github.com/repos/calblueprint/dream-mobile/contributors","subscribers_url":"https://api.github.com/repos/calblueprint/dream-mobile/subscribers","subscription_url":"https://api.github.com/repos/calblueprint/dream-mobile/subscription","commits_url":"https://api.github.com/repos/calblueprint/dream-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/calblueprint/dream-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/calblueprint/dream-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/calblueprint/dream-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/calblueprint/dream-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/calblueprint/dream-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calblueprint/dream-mobile/merges","archive_url":"https://api.github.com/repos/calblueprint/dream-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calblueprint/dream-mobile/downloads","issues_url":"https://api.github.com/repos/calblueprint/dream-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/calblueprint/dream-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/calblueprint/dream-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/calblueprint/dream-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calblueprint/dream-mobile/labels{/name}","releases_url":"https://api.github.com/repos/calblueprint/dream-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/calblueprint/dream-mobile/deployments","created_at":"2017-09-29T20:56:52Z","updated_at":"2017-09-29T21:47:16Z","pushed_at":"2017-10-23T23:42:32Z","git_url":"git://github.com/calblueprint/dream-mobile.git","ssh_url":"git@github.com:calblueprint/dream-mobile.git","clone_url":"https://github.com/calblueprint/dream-mobile.git","svn_url":"https://github.com/calblueprint/dream-mobile","homepage":null,"size":157,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/5"},"html":{"href":"https://github.com/calblueprint/dream-mobile/pull/5"},"issue":{"href":"https://api.github.com/repos/calblueprint/dream-mobile/issues/5"},"comments":{"href":"https://api.github.com/repos/calblueprint/dream-mobile/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/calblueprint/dream-mobile/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/calblueprint/dream-mobile/statuses/979ff0edf35b92a92024b0e10e96dfcbc8710b27"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"loischang"}}