{"action":"created","comment":{"url":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/comments/190031909","pull_request_review_id":122325103,"id":190031909,"diff_hunk":"@@ -0,0 +1,57 @@\n+window.addEventListener('load', () => {\n+    let tables = document.getElementsByClassName('js-table-container')\n+\n+\n+    for (let table of tables) {\n+        let tableObj = Table(table)\n+        tableObj.initializeButton()\n+        table.table = tableObj\n+    }\n+\n+})\n+\n+\n+let Table = (tableContainer) => ({\n+    tableContainer: tableContainer,\n+    tableBody: tableContainer.getElementsByTagName('tbody').item(0),\n+    novoElForm: tableContainer.getElementsByClassName('js-novo-elemento').item(0),\n+\n+    appendRow(row) {\n+        this.tableBody.insertBefore(row, this.novoElForm)\n+    },\n+\n+    initializeButton() {\n+        tableContainer.getElementsByClassName('js-add').item(0).addEventListener('click', () => {\n+            let novoMedicamento = this.novoElForm.getElementsByClassName('js-novo-medicamento').item(0).value\n+            let novoVia = this.novoElForm.getElementsByClassName('js-novo-via').item(0).value\n+            let novoIntervalo = this.novoElForm.getElementsByClassName('js-novo-intervalo').item(0).value\n+            let novoFormaFarmaceutica = this.novoElForm.getElementsByClassName('js-novo-forma-farmaceutica').item(0).value\n+            this.appendRow(this.createRow(novoMedicamento.toUpperCase(), novoVia.toUpperCase(), novoIntervalo.toUpperCase(), novoFormaFarmaceutica.toUpperCase()))\n+\n+        let clearMed = document.getElementsByClassName('js-novo-medicamento')\n+        clearMed[0].value = \"\"\n+\n+        let clearVia = document.getElementsByClassName('js-novo-via')\n+        clearVia[0].value = \"\"\n+\n+        let clearInter = document.getElementsByClassName('js-novo-intervalo')\n+        clearInter[0].value = \"\"\n+\n+        let clearForma = document.getElementsByClassName('js-novo-forma-farmaceutica')\n+        clearForma[0].value = \"\"\n+        })\n+    },\n+\n+    createRow(novoMedicamento, novoVia, novoIntervalo, novoFormaFarmaceutica) {\n+        let row = document.createElement('tr')\n+\n+        for (let arg of arguments) {\n+            let td = document.createElement('td')\n+            td.innerHTML = arg\n+            row.appendChild(td)\n+        }\n+\n+        return row;","path":"public/js/tableFunctions.js","position":54,"original_position":54,"commit_id":"ceaacfde28fe4582dd3d9fd7d47cc12220ab126e","original_commit_id":"ceaacfde28fe4582dd3d9fd7d47cc12220ab126e","user":{"login":"luizfetrindade","id":31622170,"avatar_url":"https://avatars0.githubusercontent.com/u/31622170?v=4","gravatar_id":"","url":"https://api.github.com/users/luizfetrindade","html_url":"https://github.com/luizfetrindade","followers_url":"https://api.github.com/users/luizfetrindade/followers","following_url":"https://api.github.com/users/luizfetrindade/following{/other_user}","gists_url":"https://api.github.com/users/luizfetrindade/gists{/gist_id}","starred_url":"https://api.github.com/users/luizfetrindade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luizfetrindade/subscriptions","organizations_url":"https://api.github.com/users/luizfetrindade/orgs","repos_url":"https://api.github.com/users/luizfetrindade/repos","events_url":"https://api.github.com/users/luizfetrindade/events{/privacy}","received_events_url":"https://api.github.com/users/luizfetrindade/received_events","type":"User","site_admin":false},"body":"Não usamos `;` no resto do código.","created_at":"2018-05-22T19:53:39Z","updated_at":"2018-05-22T19:54:03Z","html_url":"https://github.com/aceleradora-TW/prescare/pull/16#discussion_r190031909","pull_request_url":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/16","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/comments/190031909"},"html":{"href":"https://github.com/aceleradora-TW/prescare/pull/16#discussion_r190031909"},"pull_request":{"href":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/16","id":189772316,"html_url":"https://github.com/aceleradora-TW/prescare/pull/16","diff_url":"https://github.com/aceleradora-TW/prescare/pull/16.diff","patch_url":"https://github.com/aceleradora-TW/prescare/pull/16.patch","issue_url":"https://api.github.com/repos/aceleradora-TW/prescare/issues/16","number":16,"state":"open","locked":false,"title":"Tabela de prescrições com abas dinâmicas","user":{"login":"luizfetrindade","id":31622170,"avatar_url":"https://avatars0.githubusercontent.com/u/31622170?v=4","gravatar_id":"","url":"https://api.github.com/users/luizfetrindade","html_url":"https://github.com/luizfetrindade","followers_url":"https://api.github.com/users/luizfetrindade/followers","following_url":"https://api.github.com/users/luizfetrindade/following{/other_user}","gists_url":"https://api.github.com/users/luizfetrindade/gists{/gist_id}","starred_url":"https://api.github.com/users/luizfetrindade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luizfetrindade/subscriptions","organizations_url":"https://api.github.com/users/luizfetrindade/orgs","repos_url":"https://api.github.com/users/luizfetrindade/repos","events_url":"https://api.github.com/users/luizfetrindade/events{/privacy}","received_events_url":"https://api.github.com/users/luizfetrindade/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-22T19:47:36Z","updated_at":"2018-05-22T19:54:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6aae89eeee51ec52af8d892dde2a00531e5682ee","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/16/commits","review_comments_url":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/16/comments","review_comment_url":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aceleradora-TW/prescare/issues/16/comments","statuses_url":"https://api.github.com/repos/aceleradora-TW/prescare/statuses/ceaacfde28fe4582dd3d9fd7d47cc12220ab126e","head":{"label":"aceleradora-TW:prescricao-em-abas","ref":"prescricao-em-abas","sha":"ceaacfde28fe4582dd3d9fd7d47cc12220ab126e","user":{"login":"aceleradora-TW","id":18720656,"avatar_url":"https://avatars0.githubusercontent.com/u/18720656?v=4","gravatar_id":"","url":"https://api.github.com/users/aceleradora-TW","html_url":"https://github.com/aceleradora-TW","followers_url":"https://api.github.com/users/aceleradora-TW/followers","following_url":"https://api.github.com/users/aceleradora-TW/following{/other_user}","gists_url":"https://api.github.com/users/aceleradora-TW/gists{/gist_id}","starred_url":"https://api.github.com/users/aceleradora-TW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aceleradora-TW/subscriptions","organizations_url":"https://api.github.com/users/aceleradora-TW/orgs","repos_url":"https://api.github.com/users/aceleradora-TW/repos","events_url":"https://api.github.com/users/aceleradora-TW/events{/privacy}","received_events_url":"https://api.github.com/users/aceleradora-TW/received_events","type":"Organization","site_admin":false},"repo":{"id":131876032,"name":"prescare","full_name":"aceleradora-TW/prescare","owner":{"login":"aceleradora-TW","id":18720656,"avatar_url":"https://avatars0.githubusercontent.com/u/18720656?v=4","gravatar_id":"","url":"https://api.github.com/users/aceleradora-TW","html_url":"https://github.com/aceleradora-TW","followers_url":"https://api.github.com/users/aceleradora-TW/followers","following_url":"https://api.github.com/users/aceleradora-TW/following{/other_user}","gists_url":"https://api.github.com/users/aceleradora-TW/gists{/gist_id}","starred_url":"https://api.github.com/users/aceleradora-TW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aceleradora-TW/subscriptions","organizations_url":"https://api.github.com/users/aceleradora-TW/orgs","repos_url":"https://api.github.com/users/aceleradora-TW/repos","events_url":"https://api.github.com/users/aceleradora-TW/events{/privacy}","received_events_url":"https://api.github.com/users/aceleradora-TW/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aceleradora-TW/prescare","description":"prescricao eletronica Menino Jesus de Praga","fork":false,"url":"https://api.github.com/repos/aceleradora-TW/prescare","forks_url":"https://api.github.com/repos/aceleradora-TW/prescare/forks","keys_url":"https://api.github.com/repos/aceleradora-TW/prescare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aceleradora-TW/prescare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aceleradora-TW/prescare/teams","hooks_url":"https://api.github.com/repos/aceleradora-TW/prescare/hooks","issue_events_url":"https://api.github.com/repos/aceleradora-TW/prescare/issues/events{/number}","events_url":"https://api.github.com/repos/aceleradora-TW/prescare/events","assignees_url":"https://api.github.com/repos/aceleradora-TW/prescare/assignees{/user}","branches_url":"https://api.github.com/repos/aceleradora-TW/prescare/branches{/branch}","tags_url":"https://api.github.com/repos/aceleradora-TW/prescare/tags","blobs_url":"https://api.github.com/repos/aceleradora-TW/prescare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aceleradora-TW/prescare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aceleradora-TW/prescare/git/refs{/sha}","trees_url":"https://api.github.com/repos/aceleradora-TW/prescare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aceleradora-TW/prescare/statuses/{sha}","languages_url":"https://api.github.com/repos/aceleradora-TW/prescare/languages","stargazers_url":"https://api.github.com/repos/aceleradora-TW/prescare/stargazers","contributors_url":"https://api.github.com/repos/aceleradora-TW/prescare/contributors","subscribers_url":"https://api.github.com/repos/aceleradora-TW/prescare/subscribers","subscription_url":"https://api.github.com/repos/aceleradora-TW/prescare/subscription","commits_url":"https://api.github.com/repos/aceleradora-TW/prescare/commits{/sha}","git_commits_url":"https://api.github.com/repos/aceleradora-TW/prescare/git/commits{/sha}","comments_url":"https://api.github.com/repos/aceleradora-TW/prescare/comments{/number}","issue_comment_url":"https://api.github.com/repos/aceleradora-TW/prescare/issues/comments{/number}","contents_url":"https://api.github.com/repos/aceleradora-TW/prescare/contents/{+path}","compare_url":"https://api.github.com/repos/aceleradora-TW/prescare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aceleradora-TW/prescare/merges","archive_url":"https://api.github.com/repos/aceleradora-TW/prescare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aceleradora-TW/prescare/downloads","issues_url":"https://api.github.com/repos/aceleradora-TW/prescare/issues{/number}","pulls_url":"https://api.github.com/repos/aceleradora-TW/prescare/pulls{/number}","milestones_url":"https://api.github.com/repos/aceleradora-TW/prescare/milestones{/number}","notifications_url":"https://api.github.com/repos/aceleradora-TW/prescare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aceleradora-TW/prescare/labels{/name}","releases_url":"https://api.github.com/repos/aceleradora-TW/prescare/releases{/id}","deployments_url":"https://api.github.com/repos/aceleradora-TW/prescare/deployments","created_at":"2018-05-02T16:13:09Z","updated_at":"2018-05-22T19:39:20Z","pushed_at":"2018-05-22T19:47:37Z","git_url":"git://github.com/aceleradora-TW/prescare.git","ssh_url":"git@github.com:aceleradora-TW/prescare.git","clone_url":"https://github.com/aceleradora-TW/prescare.git","svn_url":"https://github.com/aceleradora-TW/prescare","homepage":null,"size":894,"stargazers_count":5,"watchers_count":5,"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":5,"license":null,"forks":0,"open_issues":5,"watchers":5,"default_branch":"master"}},"base":{"label":"aceleradora-TW:master","ref":"master","sha":"72235121c61a2d920d683250289e6c9e276fab3a","user":{"login":"aceleradora-TW","id":18720656,"avatar_url":"https://avatars0.githubusercontent.com/u/18720656?v=4","gravatar_id":"","url":"https://api.github.com/users/aceleradora-TW","html_url":"https://github.com/aceleradora-TW","followers_url":"https://api.github.com/users/aceleradora-TW/followers","following_url":"https://api.github.com/users/aceleradora-TW/following{/other_user}","gists_url":"https://api.github.com/users/aceleradora-TW/gists{/gist_id}","starred_url":"https://api.github.com/users/aceleradora-TW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aceleradora-TW/subscriptions","organizations_url":"https://api.github.com/users/aceleradora-TW/orgs","repos_url":"https://api.github.com/users/aceleradora-TW/repos","events_url":"https://api.github.com/users/aceleradora-TW/events{/privacy}","received_events_url":"https://api.github.com/users/aceleradora-TW/received_events","type":"Organization","site_admin":false},"repo":{"id":131876032,"name":"prescare","full_name":"aceleradora-TW/prescare","owner":{"login":"aceleradora-TW","id":18720656,"avatar_url":"https://avatars0.githubusercontent.com/u/18720656?v=4","gravatar_id":"","url":"https://api.github.com/users/aceleradora-TW","html_url":"https://github.com/aceleradora-TW","followers_url":"https://api.github.com/users/aceleradora-TW/followers","following_url":"https://api.github.com/users/aceleradora-TW/following{/other_user}","gists_url":"https://api.github.com/users/aceleradora-TW/gists{/gist_id}","starred_url":"https://api.github.com/users/aceleradora-TW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aceleradora-TW/subscriptions","organizations_url":"https://api.github.com/users/aceleradora-TW/orgs","repos_url":"https://api.github.com/users/aceleradora-TW/repos","events_url":"https://api.github.com/users/aceleradora-TW/events{/privacy}","received_events_url":"https://api.github.com/users/aceleradora-TW/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aceleradora-TW/prescare","description":"prescricao eletronica Menino Jesus de Praga","fork":false,"url":"https://api.github.com/repos/aceleradora-TW/prescare","forks_url":"https://api.github.com/repos/aceleradora-TW/prescare/forks","keys_url":"https://api.github.com/repos/aceleradora-TW/prescare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aceleradora-TW/prescare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aceleradora-TW/prescare/teams","hooks_url":"https://api.github.com/repos/aceleradora-TW/prescare/hooks","issue_events_url":"https://api.github.com/repos/aceleradora-TW/prescare/issues/events{/number}","events_url":"https://api.github.com/repos/aceleradora-TW/prescare/events","assignees_url":"https://api.github.com/repos/aceleradora-TW/prescare/assignees{/user}","branches_url":"https://api.github.com/repos/aceleradora-TW/prescare/branches{/branch}","tags_url":"https://api.github.com/repos/aceleradora-TW/prescare/tags","blobs_url":"https://api.github.com/repos/aceleradora-TW/prescare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aceleradora-TW/prescare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aceleradora-TW/prescare/git/refs{/sha}","trees_url":"https://api.github.com/repos/aceleradora-TW/prescare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aceleradora-TW/prescare/statuses/{sha}","languages_url":"https://api.github.com/repos/aceleradora-TW/prescare/languages","stargazers_url":"https://api.github.com/repos/aceleradora-TW/prescare/stargazers","contributors_url":"https://api.github.com/repos/aceleradora-TW/prescare/contributors","subscribers_url":"https://api.github.com/repos/aceleradora-TW/prescare/subscribers","subscription_url":"https://api.github.com/repos/aceleradora-TW/prescare/subscription","commits_url":"https://api.github.com/repos/aceleradora-TW/prescare/commits{/sha}","git_commits_url":"https://api.github.com/repos/aceleradora-TW/prescare/git/commits{/sha}","comments_url":"https://api.github.com/repos/aceleradora-TW/prescare/comments{/number}","issue_comment_url":"https://api.github.com/repos/aceleradora-TW/prescare/issues/comments{/number}","contents_url":"https://api.github.com/repos/aceleradora-TW/prescare/contents/{+path}","compare_url":"https://api.github.com/repos/aceleradora-TW/prescare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aceleradora-TW/prescare/merges","archive_url":"https://api.github.com/repos/aceleradora-TW/prescare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aceleradora-TW/prescare/downloads","issues_url":"https://api.github.com/repos/aceleradora-TW/prescare/issues{/number}","pulls_url":"https://api.github.com/repos/aceleradora-TW/prescare/pulls{/number}","milestones_url":"https://api.github.com/repos/aceleradora-TW/prescare/milestones{/number}","notifications_url":"https://api.github.com/repos/aceleradora-TW/prescare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aceleradora-TW/prescare/labels{/name}","releases_url":"https://api.github.com/repos/aceleradora-TW/prescare/releases{/id}","deployments_url":"https://api.github.com/repos/aceleradora-TW/prescare/deployments","created_at":"2018-05-02T16:13:09Z","updated_at":"2018-05-22T19:39:20Z","pushed_at":"2018-05-22T19:47:37Z","git_url":"git://github.com/aceleradora-TW/prescare.git","ssh_url":"git@github.com:aceleradora-TW/prescare.git","clone_url":"https://github.com/aceleradora-TW/prescare.git","svn_url":"https://github.com/aceleradora-TW/prescare","homepage":null,"size":894,"stargazers_count":5,"watchers_count":5,"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":5,"license":null,"forks":0,"open_issues":5,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/16"},"html":{"href":"https://github.com/aceleradora-TW/prescare/pull/16"},"issue":{"href":"https://api.github.com/repos/aceleradora-TW/prescare/issues/16"},"comments":{"href":"https://api.github.com/repos/aceleradora-TW/prescare/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aceleradora-TW/prescare/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/aceleradora-TW/prescare/statuses/ceaacfde28fe4582dd3d9fd7d47cc12220ab126e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"luizfetrindade"}}