{"action":"created","comment":{"url":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/comments/147881902","pull_request_review_id":73035017,"id":147881902,"diff_hunk":"@@ -66,20 +54,128 @@ kintone.events.on('app.record.index.show', (event) => {\n       // プロフィール画像取得\n       for (const o of optRecords) {\n         if (r.mail.value === o.mail.value) {\n-          const fileKey = o.profile_img.value.length > 0 ? o.profile_img.value[0].fileKey : undefined;\n+          const fileKey = o.profile_img.value.length > 0 ? o.profile_img.value[0].fileKey : false;\n           if (fileKey) {\n             fileDownload(fileKey, i);\n           }\n         }\n-      };\n+      }\n+      // レコード作成者以外は編集不可\n+      if (r.作成者.value.code === user.code) {\n+        r.editable = true;\n+      }\n+      else {\n+        r.editable = false;\n+      }\n       return r;\n     });\n \n     new Vue({\n       // Vueを適用するelement\n       el: '#customize_view',\n+      methods: {\n+        showDetail: function (record, rowIndex) {\n+          if (isModify) {\n+            if (!confirm(\"変更を破棄しますか？\")) {\n+              return;\n+            }\n+          }\n+          // 行選択表示\n+          const rows = document.querySelectorAll('.list_row');\n+          rows.forEach(function (row, i) {\n+            if (i == rowIndex) {\n+              row.classList.add('row_selected');\n+            }\n+            else {\n+              row.classList.remove('row_selected');\n+            }\n+          });\n+          // 内部メモは作成者以外見えない、かつ更新不可\n+          const memo_elem = document.getElementById('memo_area');\n+          const updateButtons = document.querySelectorAll('form button');\n+          if (user.code === record.作成者.value.code) {\n+            document.getElementById('memo').value = record.memo.value;\n+            memo_elem.style.display = \"inherit\";\n+            for (const button of updateButtons) {\n+              button.style.display = \"inherit\";\n+            }\n+          }\n+          else {\n+            memo_elem.style.display = \"none\";\n+            const buttons = document.querySelectorAll('form button');\n+            for (const button of updateButtons) {\n+              button.style.display = \"none\";\n+            }\n+          }\n+          document.getElementById('id').value = record.レコード番号.value;\n+          document.getElementById('feedback').value = record.feedback.value;\n+          document.getElementById('y').value = record.comment_y.value;\n+          document.getElementById('w').value = record.comment_w.value;\n+          document.getElementById('t').value = record.comment_t.value;\n+          isModify = false;\n+        },\n+        edit: function (record) {\n+          location.href = \"/k/3/edit?record=\" + record.レコード番号.value;\n+        },\n+        update: function () {\n+          if (!isModify) {\n+            return;\n+          }\n+          const id = document.getElementById('id').value;\n+          if (!id) {\n+            return;\n+          }\n+          const memo = document.getElementById('memo').value;\n+          const feedback = document.getElementById('feedback').value;\n+          const comment_y = document.getElementById('y').value;\n+          const comment_w = document.getElementById('w').value;\n+          const comment_t = document.getElementById('t').value;\n+          const record = {\n+            memo: {\n+              value: memo\n+            },\n+            feedback: {\n+              value: feedback\n+            },\n+            comment_y: {\n+              value: comment_y\n+            },\n+            comment_w: {\n+              value: comment_w\n+            },\n+            comment_t: {\n+              value: comment_t\n+            },\n+          };\n+          kintoneUtility.rest.putRecord({\n+            app: kintone.app.getId(),\n+            id: id,\n+            record: record\n+          }).then(function (response) {\n+            // ローカルデータに反映\n+            for (const rec of records) {\n+              if (rec.レコード番号.value === id) {\n+                rec.memo.value = memo;\n+                rec.feedback.value = feedback;\n+                rec.comment_y.value = comment_y;\n+                rec.comment_w.value = comment_w;\n+                rec.comment_t.value = comment_t;\n+                break;\n+              }\n+            }\n+            isModify = false;\n+            alert(\"変更を保存しました．\");\n+          }).catch(function (error) {\n+            alert(\"変更の保存に失敗しました．¥n\" + JSON.stringify(error));","path":"src/ywtListView.js","position":169,"original_position":169,"commit_id":"94a27d1562699c653efefd838c15174287d60691","original_commit_id":"94a27d1562699c653efefd838c15174287d60691","user":{"login":"tkawa","id":562433,"avatar_url":"https://avatars1.githubusercontent.com/u/562433?v=4","gravatar_id":"","url":"https://api.github.com/users/tkawa","html_url":"https://github.com/tkawa","followers_url":"https://api.github.com/users/tkawa/followers","following_url":"https://api.github.com/users/tkawa/following{/other_user}","gists_url":"https://api.github.com/users/tkawa/gists{/gist_id}","starred_url":"https://api.github.com/users/tkawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkawa/subscriptions","organizations_url":"https://api.github.com/users/tkawa/orgs","repos_url":"https://api.github.com/users/tkawa/repos","events_url":"https://api.github.com/users/tkawa/events{/privacy}","received_events_url":"https://api.github.com/users/tkawa/received_events","type":"User","site_admin":false},"body":"【typo】\r\n`¥n` は `\\n` ？","created_at":"2017-10-31T02:20:52Z","updated_at":"2017-10-31T02:32:37Z","html_url":"https://github.com/tanaka-kazu/ywt/pull/1#discussion_r147881902","pull_request_url":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/comments/147881902"},"html":{"href":"https://github.com/tanaka-kazu/ywt/pull/1#discussion_r147881902"},"pull_request":{"href":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/1","id":149365609,"html_url":"https://github.com/tanaka-kazu/ywt/pull/1","diff_url":"https://github.com/tanaka-kazu/ywt/pull/1.diff","patch_url":"https://github.com/tanaka-kazu/ywt/pull/1.patch","issue_url":"https://api.github.com/repos/tanaka-kazu/ywt/issues/1","number":1,"state":"open","locked":false,"title":"コードレビュー 20171030","user":{"login":"tkawa","id":562433,"avatar_url":"https://avatars1.githubusercontent.com/u/562433?v=4","gravatar_id":"","url":"https://api.github.com/users/tkawa","html_url":"https://github.com/tkawa","followers_url":"https://api.github.com/users/tkawa/followers","following_url":"https://api.github.com/users/tkawa/following{/other_user}","gists_url":"https://api.github.com/users/tkawa/gists{/gist_id}","starred_url":"https://api.github.com/users/tkawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkawa/subscriptions","organizations_url":"https://api.github.com/users/tkawa/orgs","repos_url":"https://api.github.com/users/tkawa/repos","events_url":"https://api.github.com/users/tkawa/events{/privacy}","received_events_url":"https://api.github.com/users/tkawa/received_events","type":"User","site_admin":false},"body":"- First commit https://github.com/tanaka-kazu/ywt/commit/af41f651fd2a00108202fefe8f2c79c50275414e\r\n- テストコードを削除 https://github.com/tanaka-kazu/ywt/commit/a1d76117b7dc431fb7d18ad2f40c6bd2194904f2\r\n\r\nは含みません。","created_at":"2017-10-29T03:07:51Z","updated_at":"2017-10-31T02:32:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58ce11faf423da0c4550d9dcd68dcb305f85ad64","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/1/commits","review_comments_url":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/1/comments","review_comment_url":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tanaka-kazu/ywt/issues/1/comments","statuses_url":"https://api.github.com/repos/tanaka-kazu/ywt/statuses/94a27d1562699c653efefd838c15174287d60691","head":{"label":"tanaka-kazu:master","ref":"master","sha":"94a27d1562699c653efefd838c15174287d60691","user":{"login":"tanaka-kazu","id":26683622,"avatar_url":"https://avatars1.githubusercontent.com/u/26683622?v=4","gravatar_id":"","url":"https://api.github.com/users/tanaka-kazu","html_url":"https://github.com/tanaka-kazu","followers_url":"https://api.github.com/users/tanaka-kazu/followers","following_url":"https://api.github.com/users/tanaka-kazu/following{/other_user}","gists_url":"https://api.github.com/users/tanaka-kazu/gists{/gist_id}","starred_url":"https://api.github.com/users/tanaka-kazu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanaka-kazu/subscriptions","organizations_url":"https://api.github.com/users/tanaka-kazu/orgs","repos_url":"https://api.github.com/users/tanaka-kazu/repos","events_url":"https://api.github.com/users/tanaka-kazu/events{/privacy}","received_events_url":"https://api.github.com/users/tanaka-kazu/received_events","type":"User","site_admin":false},"repo":{"id":107866430,"name":"ywt","full_name":"tanaka-kazu/ywt","owner":{"login":"tanaka-kazu","id":26683622,"avatar_url":"https://avatars1.githubusercontent.com/u/26683622?v=4","gravatar_id":"","url":"https://api.github.com/users/tanaka-kazu","html_url":"https://github.com/tanaka-kazu","followers_url":"https://api.github.com/users/tanaka-kazu/followers","following_url":"https://api.github.com/users/tanaka-kazu/following{/other_user}","gists_url":"https://api.github.com/users/tanaka-kazu/gists{/gist_id}","starred_url":"https://api.github.com/users/tanaka-kazu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanaka-kazu/subscriptions","organizations_url":"https://api.github.com/users/tanaka-kazu/orgs","repos_url":"https://api.github.com/users/tanaka-kazu/repos","events_url":"https://api.github.com/users/tanaka-kazu/events{/privacy}","received_events_url":"https://api.github.com/users/tanaka-kazu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tanaka-kazu/ywt","description":null,"fork":false,"url":"https://api.github.com/repos/tanaka-kazu/ywt","forks_url":"https://api.github.com/repos/tanaka-kazu/ywt/forks","keys_url":"https://api.github.com/repos/tanaka-kazu/ywt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tanaka-kazu/ywt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tanaka-kazu/ywt/teams","hooks_url":"https://api.github.com/repos/tanaka-kazu/ywt/hooks","issue_events_url":"https://api.github.com/repos/tanaka-kazu/ywt/issues/events{/number}","events_url":"https://api.github.com/repos/tanaka-kazu/ywt/events","assignees_url":"https://api.github.com/repos/tanaka-kazu/ywt/assignees{/user}","branches_url":"https://api.github.com/repos/tanaka-kazu/ywt/branches{/branch}","tags_url":"https://api.github.com/repos/tanaka-kazu/ywt/tags","blobs_url":"https://api.github.com/repos/tanaka-kazu/ywt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tanaka-kazu/ywt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tanaka-kazu/ywt/git/refs{/sha}","trees_url":"https://api.github.com/repos/tanaka-kazu/ywt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tanaka-kazu/ywt/statuses/{sha}","languages_url":"https://api.github.com/repos/tanaka-kazu/ywt/languages","stargazers_url":"https://api.github.com/repos/tanaka-kazu/ywt/stargazers","contributors_url":"https://api.github.com/repos/tanaka-kazu/ywt/contributors","subscribers_url":"https://api.github.com/repos/tanaka-kazu/ywt/subscribers","subscription_url":"https://api.github.com/repos/tanaka-kazu/ywt/subscription","commits_url":"https://api.github.com/repos/tanaka-kazu/ywt/commits{/sha}","git_commits_url":"https://api.github.com/repos/tanaka-kazu/ywt/git/commits{/sha}","comments_url":"https://api.github.com/repos/tanaka-kazu/ywt/comments{/number}","issue_comment_url":"https://api.github.com/repos/tanaka-kazu/ywt/issues/comments{/number}","contents_url":"https://api.github.com/repos/tanaka-kazu/ywt/contents/{+path}","compare_url":"https://api.github.com/repos/tanaka-kazu/ywt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tanaka-kazu/ywt/merges","archive_url":"https://api.github.com/repos/tanaka-kazu/ywt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tanaka-kazu/ywt/downloads","issues_url":"https://api.github.com/repos/tanaka-kazu/ywt/issues{/number}","pulls_url":"https://api.github.com/repos/tanaka-kazu/ywt/pulls{/number}","milestones_url":"https://api.github.com/repos/tanaka-kazu/ywt/milestones{/number}","notifications_url":"https://api.github.com/repos/tanaka-kazu/ywt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tanaka-kazu/ywt/labels{/name}","releases_url":"https://api.github.com/repos/tanaka-kazu/ywt/releases{/id}","deployments_url":"https://api.github.com/repos/tanaka-kazu/ywt/deployments","created_at":"2017-10-22T13:04:32Z","updated_at":"2017-10-22T13:05:11Z","pushed_at":"2017-10-29T06:34:19Z","git_url":"git://github.com/tanaka-kazu/ywt.git","ssh_url":"git@github.com:tanaka-kazu/ywt.git","clone_url":"https://github.com/tanaka-kazu/ywt.git","svn_url":"https://github.com/tanaka-kazu/ywt","homepage":null,"size":54,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"tanaka-kazu:review-20171030","ref":"review-20171030","sha":"a1d76117b7dc431fb7d18ad2f40c6bd2194904f2","user":{"login":"tanaka-kazu","id":26683622,"avatar_url":"https://avatars1.githubusercontent.com/u/26683622?v=4","gravatar_id":"","url":"https://api.github.com/users/tanaka-kazu","html_url":"https://github.com/tanaka-kazu","followers_url":"https://api.github.com/users/tanaka-kazu/followers","following_url":"https://api.github.com/users/tanaka-kazu/following{/other_user}","gists_url":"https://api.github.com/users/tanaka-kazu/gists{/gist_id}","starred_url":"https://api.github.com/users/tanaka-kazu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanaka-kazu/subscriptions","organizations_url":"https://api.github.com/users/tanaka-kazu/orgs","repos_url":"https://api.github.com/users/tanaka-kazu/repos","events_url":"https://api.github.com/users/tanaka-kazu/events{/privacy}","received_events_url":"https://api.github.com/users/tanaka-kazu/received_events","type":"User","site_admin":false},"repo":{"id":107866430,"name":"ywt","full_name":"tanaka-kazu/ywt","owner":{"login":"tanaka-kazu","id":26683622,"avatar_url":"https://avatars1.githubusercontent.com/u/26683622?v=4","gravatar_id":"","url":"https://api.github.com/users/tanaka-kazu","html_url":"https://github.com/tanaka-kazu","followers_url":"https://api.github.com/users/tanaka-kazu/followers","following_url":"https://api.github.com/users/tanaka-kazu/following{/other_user}","gists_url":"https://api.github.com/users/tanaka-kazu/gists{/gist_id}","starred_url":"https://api.github.com/users/tanaka-kazu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanaka-kazu/subscriptions","organizations_url":"https://api.github.com/users/tanaka-kazu/orgs","repos_url":"https://api.github.com/users/tanaka-kazu/repos","events_url":"https://api.github.com/users/tanaka-kazu/events{/privacy}","received_events_url":"https://api.github.com/users/tanaka-kazu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tanaka-kazu/ywt","description":null,"fork":false,"url":"https://api.github.com/repos/tanaka-kazu/ywt","forks_url":"https://api.github.com/repos/tanaka-kazu/ywt/forks","keys_url":"https://api.github.com/repos/tanaka-kazu/ywt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tanaka-kazu/ywt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tanaka-kazu/ywt/teams","hooks_url":"https://api.github.com/repos/tanaka-kazu/ywt/hooks","issue_events_url":"https://api.github.com/repos/tanaka-kazu/ywt/issues/events{/number}","events_url":"https://api.github.com/repos/tanaka-kazu/ywt/events","assignees_url":"https://api.github.com/repos/tanaka-kazu/ywt/assignees{/user}","branches_url":"https://api.github.com/repos/tanaka-kazu/ywt/branches{/branch}","tags_url":"https://api.github.com/repos/tanaka-kazu/ywt/tags","blobs_url":"https://api.github.com/repos/tanaka-kazu/ywt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tanaka-kazu/ywt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tanaka-kazu/ywt/git/refs{/sha}","trees_url":"https://api.github.com/repos/tanaka-kazu/ywt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tanaka-kazu/ywt/statuses/{sha}","languages_url":"https://api.github.com/repos/tanaka-kazu/ywt/languages","stargazers_url":"https://api.github.com/repos/tanaka-kazu/ywt/stargazers","contributors_url":"https://api.github.com/repos/tanaka-kazu/ywt/contributors","subscribers_url":"https://api.github.com/repos/tanaka-kazu/ywt/subscribers","subscription_url":"https://api.github.com/repos/tanaka-kazu/ywt/subscription","commits_url":"https://api.github.com/repos/tanaka-kazu/ywt/commits{/sha}","git_commits_url":"https://api.github.com/repos/tanaka-kazu/ywt/git/commits{/sha}","comments_url":"https://api.github.com/repos/tanaka-kazu/ywt/comments{/number}","issue_comment_url":"https://api.github.com/repos/tanaka-kazu/ywt/issues/comments{/number}","contents_url":"https://api.github.com/repos/tanaka-kazu/ywt/contents/{+path}","compare_url":"https://api.github.com/repos/tanaka-kazu/ywt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tanaka-kazu/ywt/merges","archive_url":"https://api.github.com/repos/tanaka-kazu/ywt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tanaka-kazu/ywt/downloads","issues_url":"https://api.github.com/repos/tanaka-kazu/ywt/issues{/number}","pulls_url":"https://api.github.com/repos/tanaka-kazu/ywt/pulls{/number}","milestones_url":"https://api.github.com/repos/tanaka-kazu/ywt/milestones{/number}","notifications_url":"https://api.github.com/repos/tanaka-kazu/ywt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tanaka-kazu/ywt/labels{/name}","releases_url":"https://api.github.com/repos/tanaka-kazu/ywt/releases{/id}","deployments_url":"https://api.github.com/repos/tanaka-kazu/ywt/deployments","created_at":"2017-10-22T13:04:32Z","updated_at":"2017-10-22T13:05:11Z","pushed_at":"2017-10-29T06:34:19Z","git_url":"git://github.com/tanaka-kazu/ywt.git","ssh_url":"git@github.com:tanaka-kazu/ywt.git","clone_url":"https://github.com/tanaka-kazu/ywt.git","svn_url":"https://github.com/tanaka-kazu/ywt","homepage":null,"size":54,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/1"},"html":{"href":"https://github.com/tanaka-kazu/ywt/pull/1"},"issue":{"href":"https://api.github.com/repos/tanaka-kazu/ywt/issues/1"},"comments":{"href":"https://api.github.com/repos/tanaka-kazu/ywt/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tanaka-kazu/ywt/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/tanaka-kazu/ywt/statuses/94a27d1562699c653efefd838c15174287d60691"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"tkawa"}}