{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/cwsb_01/pulls/comments/86707013","pull_request_review_id":7350794,"id":86707013,"diff_hunk":"@@ -8,114 +8,133 @@\n   </div>\n </div>\n <% @venues.each_with_index do |venue, parent_index| %>\n-  <%= render \"header\", venue: venue %>\n-  <div class=\"block full\">\n-    <div class=\"block-title\">\n-      <div class=\"block-options pull-right\">\n-        <a href=\"javascript:\" class=\"btn btn-sm btn-alt btn-default\"\n-          data-toggle=\"tooltip\" title=\"<%= t \".title_toogle\" %>\">\n-          <i class=\"fa fa-times\"></i>\n-        </a>\n+  <%= hidden_field_tag \"total_of_venue\",\n+    @venues.length, id: \"total-of-venue\" %>\n+  <%= hidden_field_tag \"current_venue_id\",\n+    venue.id, id: \"current-venue-#{parent_index}\" %>\n+  <%= hidden_field_tag \"total_of_order_for_current_venue\",\n+    venue.orders.length, id: \"total-of-order-#{venue.id}\" %>\n+  <% if venue.orders.length != 0 %>\n+    <%= render \"header\", venue: venue %>\n+    <div class=\"block full\">\n+      <div class=\"block-title\">\n+        <div class=\"block-options pull-right\">\n+          <a href=\"javascript:\" class=\"btn btn-sm btn-alt btn-default\"\n+            data-toggle=\"tooltip\" title=\"<%= t \".title_toogle\" %>\">\n+            <i class=\"fa fa-times\"></i>\n+          </a>\n+        </div>\n+        <h2><strong><%= venue.name %></strong></h2>\n       </div>\n-      <h2><strong><%= venue.name %></strong></h2>\n-    </div>\n-    <div class=\"row block-section\">\n-      <div class=\"col-sm-12\">\n-        <h4> <%= venue.address.details %></h4>\n-        <address>\n-          <i class=\"fa fa-phone\"></i> <%= venue.phone_number %><br>\n-          <i class=\"fa fa-envelope-o\"></i>\n-          <a href=\"javascript:\"><%= venue.email %></a>\n-        </address>\n-      </div>\n-      <div class=\"request-all\">\n-        <%= button_tag t(\".accept_all\"), class: \"btn btn-danger check-all\",\n-          id: \"#{venue.id}\" %>\n+      <div class=\"row block-section\">\n+        <div class=\"col-sm-12\">\n+          <h4> <%= venue.address.details %></h4>\n+          <address>\n+            <i class=\"fa fa-phone\"></i> <%= venue.phone_number %><br>\n+            <i class=\"fa fa-envelope-o\"></i>\n+            <a href=\"javascript:\"><%= venue.email %></a>\n+          </address>\n+        </div>\n+        <div class=\"request-all\">\n+          <%= button_tag t(\".accept_all\"),\n+            class: \"btn btn-danger check-all\", id: \"#{venue.id}\" %>\n+        </div>\n       </div>\n-    </div>\n-    <div class=\"table-responsive\">\n-      <table class=\"table table-vcenter bookings-table\">\n-        <tbody>\n-          <% if venue.orders.length != 0 %>\n-            <% venue.orders.each_with_index do |order, index| %>\n-              <% order.bookings.each do |booking| %>\n-                <tr>\n-                  <td>\n-                    <h4><%= link_to booking.space.name %></h4>\n-                    <span class=\"label label-danger\">\n-                      <%= booking.user.name %>\n-                    </span>\n-                    <span class=\"label label-warning\">\n-                      <%= l booking.booking_from, format: :default %>\n-                    </span>\n-                    <span class=\"label label-primary\">\n-                      <i class=\"fa fa-clock-o\"></i>\n-                      <%= booking.duration %>\n-                      <%= booking.booking_type.name %>\n-                    </span>\n-                  </td>\n-                  <td class=\"text-center\">\n-                    <%= image_tag \"spaces/space1.jpg\", class: \"image_tag\" %>\n-                  </td>\n-                  <td class=\"text-center\">\n-                    <strong>x\n-                      <span class=\"badge\" id=\"quantity-<%= booking.id %>\">\n-                        <%= booking.quantity %>\n+      <div class=\"table-responsive\">\n+        <table class=\"table table-vcenter bookings-table\">\n+          <tbody>\n+              <% venue.orders.each_with_index do |order, index| %>\n+              <%= hidden_field_tag \"current_order_id\", order.id,\n+                id: \"current-order-#{venue.id}-#{index}\" %>\n+              <%= hidden_field_tag \"total_of_booking_for_current_order\",\n+                order.bookings.length, id: \"total-of-booking-#{order.id}\" %>\n+                <% order.bookings.each_with_index do |booking, booking_index| %>\n+                <%= hidden_field_tag \"current_booking\", booking.id,","path":"app/views/store_bookings/show.html.erb","position":96,"original_position":96,"commit_id":"b0792b2f6c2d7cef2e10ecfdd046ebef42e7ace0","original_commit_id":"b0792b2f6c2d7cef2e10ecfdd046ebef42e7ace0","user":{"login":"quyenguyengoc","id":22010913,"avatar_url":"https://avatars.githubusercontent.com/u/22010913?v=3","gravatar_id":"","url":"https://api.github.com/users/quyenguyengoc","html_url":"https://github.com/quyenguyengoc","followers_url":"https://api.github.com/users/quyenguyengoc/followers","following_url":"https://api.github.com/users/quyenguyengoc/following{/other_user}","gists_url":"https://api.github.com/users/quyenguyengoc/gists{/gist_id}","starred_url":"https://api.github.com/users/quyenguyengoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quyenguyengoc/subscriptions","organizations_url":"https://api.github.com/users/quyenguyengoc/orgs","repos_url":"https://api.github.com/users/quyenguyengoc/repos","events_url":"https://api.github.com/users/quyenguyengoc/events{/privacy}","received_events_url":"https://api.github.com/users/quyenguyengoc/received_events","type":"User","site_admin":false},"body":"ident","created_at":"2016-11-07T02:44:17Z","updated_at":"2016-11-07T02:44:59Z","html_url":"https://github.com/framgia/cwsb_01/pull/38#discussion_r86707013","pull_request_url":"https://api.github.com/repos/framgia/cwsb_01/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/comments/86707013"},"html":{"href":"https://github.com/framgia/cwsb_01/pull/38#discussion_r86707013"},"pull_request":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/cwsb_01/pulls/38","id":92492759,"html_url":"https://github.com/framgia/cwsb_01/pull/38","diff_url":"https://github.com/framgia/cwsb_01/pull/38.diff","patch_url":"https://github.com/framgia/cwsb_01/pull/38.patch","issue_url":"https://api.github.com/repos/framgia/cwsb_01/issues/38","number":38,"state":"open","locked":false,"title":"refactor_confirm_request","user":{"login":"NguyenHoangAnhDung","id":21093421,"avatar_url":"https://avatars.githubusercontent.com/u/21093421?v=3","gravatar_id":"","url":"https://api.github.com/users/NguyenHoangAnhDung","html_url":"https://github.com/NguyenHoangAnhDung","followers_url":"https://api.github.com/users/NguyenHoangAnhDung/followers","following_url":"https://api.github.com/users/NguyenHoangAnhDung/following{/other_user}","gists_url":"https://api.github.com/users/NguyenHoangAnhDung/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenHoangAnhDung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenHoangAnhDung/subscriptions","organizations_url":"https://api.github.com/users/NguyenHoangAnhDung/orgs","repos_url":"https://api.github.com/users/NguyenHoangAnhDung/repos","events_url":"https://api.github.com/users/NguyenHoangAnhDung/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenHoangAnhDung/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-06T16:17:45Z","updated_at":"2016-11-07T02:44:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43b62f7f5d52c934e4f12f290a2b8af125118722","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/cwsb_01/pulls/38/commits","review_comments_url":"https://api.github.com/repos/framgia/cwsb_01/pulls/38/comments","review_comment_url":"https://api.github.com/repos/framgia/cwsb_01/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/cwsb_01/issues/38/comments","statuses_url":"https://api.github.com/repos/framgia/cwsb_01/statuses/b0792b2f6c2d7cef2e10ecfdd046ebef42e7ace0","head":{"label":"NguyenHoangAnhDung:refactor_confirm_request","ref":"refactor_confirm_request","sha":"b0792b2f6c2d7cef2e10ecfdd046ebef42e7ace0","user":{"login":"NguyenHoangAnhDung","id":21093421,"avatar_url":"https://avatars.githubusercontent.com/u/21093421?v=3","gravatar_id":"","url":"https://api.github.com/users/NguyenHoangAnhDung","html_url":"https://github.com/NguyenHoangAnhDung","followers_url":"https://api.github.com/users/NguyenHoangAnhDung/followers","following_url":"https://api.github.com/users/NguyenHoangAnhDung/following{/other_user}","gists_url":"https://api.github.com/users/NguyenHoangAnhDung/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenHoangAnhDung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenHoangAnhDung/subscriptions","organizations_url":"https://api.github.com/users/NguyenHoangAnhDung/orgs","repos_url":"https://api.github.com/users/NguyenHoangAnhDung/repos","events_url":"https://api.github.com/users/NguyenHoangAnhDung/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenHoangAnhDung/received_events","type":"User","site_admin":false},"repo":{"id":69952040,"name":"cwsb_01","full_name":"NguyenHoangAnhDung/cwsb_01","owner":{"login":"NguyenHoangAnhDung","id":21093421,"avatar_url":"https://avatars.githubusercontent.com/u/21093421?v=3","gravatar_id":"","url":"https://api.github.com/users/NguyenHoangAnhDung","html_url":"https://github.com/NguyenHoangAnhDung","followers_url":"https://api.github.com/users/NguyenHoangAnhDung/followers","following_url":"https://api.github.com/users/NguyenHoangAnhDung/following{/other_user}","gists_url":"https://api.github.com/users/NguyenHoangAnhDung/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenHoangAnhDung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenHoangAnhDung/subscriptions","organizations_url":"https://api.github.com/users/NguyenHoangAnhDung/orgs","repos_url":"https://api.github.com/users/NguyenHoangAnhDung/repos","events_url":"https://api.github.com/users/NguyenHoangAnhDung/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenHoangAnhDung/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NguyenHoangAnhDung/cwsb_01","description":"Co-working space booking system - Danang Education's project","fork":true,"url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01","forks_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/forks","keys_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/teams","hooks_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/hooks","issue_events_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/issues/events{/number}","events_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/events","assignees_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/assignees{/user}","branches_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/branches{/branch}","tags_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/tags","blobs_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/git/refs{/sha}","trees_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/statuses/{sha}","languages_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/languages","stargazers_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/stargazers","contributors_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/contributors","subscribers_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/subscribers","subscription_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/subscription","commits_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/commits{/sha}","git_commits_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/git/commits{/sha}","comments_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/comments{/number}","issue_comment_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/issues/comments{/number}","contents_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/contents/{+path}","compare_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/merges","archive_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/downloads","issues_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/issues{/number}","pulls_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/pulls{/number}","milestones_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/milestones{/number}","notifications_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/labels{/name}","releases_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/releases{/id}","deployments_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/deployments","created_at":"2016-10-04T09:44:55Z","updated_at":"2016-10-04T03:49:56Z","pushed_at":"2016-11-07T02:38:41Z","git_url":"git://github.com/NguyenHoangAnhDung/cwsb_01.git","ssh_url":"git@github.com:NguyenHoangAnhDung/cwsb_01.git","clone_url":"https://github.com/NguyenHoangAnhDung/cwsb_01.git","svn_url":"https://github.com/NguyenHoangAnhDung/cwsb_01","homepage":null,"size":4639,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"7e782aec3b8cee33481571e0d9f0866951796978","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":69932509,"name":"cwsb_01","full_name":"framgia/cwsb_01","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/cwsb_01","description":"Co-working space booking system - Danang Education's project","fork":false,"url":"https://api.github.com/repos/framgia/cwsb_01","forks_url":"https://api.github.com/repos/framgia/cwsb_01/forks","keys_url":"https://api.github.com/repos/framgia/cwsb_01/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/cwsb_01/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/cwsb_01/teams","hooks_url":"https://api.github.com/repos/framgia/cwsb_01/hooks","issue_events_url":"https://api.github.com/repos/framgia/cwsb_01/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/cwsb_01/events","assignees_url":"https://api.github.com/repos/framgia/cwsb_01/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/cwsb_01/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/cwsb_01/tags","blobs_url":"https://api.github.com/repos/framgia/cwsb_01/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/cwsb_01/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/cwsb_01/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/cwsb_01/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/cwsb_01/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/cwsb_01/languages","stargazers_url":"https://api.github.com/repos/framgia/cwsb_01/stargazers","contributors_url":"https://api.github.com/repos/framgia/cwsb_01/contributors","subscribers_url":"https://api.github.com/repos/framgia/cwsb_01/subscribers","subscription_url":"https://api.github.com/repos/framgia/cwsb_01/subscription","commits_url":"https://api.github.com/repos/framgia/cwsb_01/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/cwsb_01/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/cwsb_01/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/cwsb_01/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/cwsb_01/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/cwsb_01/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/cwsb_01/merges","archive_url":"https://api.github.com/repos/framgia/cwsb_01/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/cwsb_01/downloads","issues_url":"https://api.github.com/repos/framgia/cwsb_01/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/cwsb_01/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/cwsb_01/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/cwsb_01/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/cwsb_01/labels{/name}","releases_url":"https://api.github.com/repos/framgia/cwsb_01/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/cwsb_01/deployments","created_at":"2016-10-04T03:49:56Z","updated_at":"2016-10-04T03:49:56Z","pushed_at":"2016-11-07T02:38:42Z","git_url":"git://github.com/framgia/cwsb_01.git","ssh_url":"git@github.com:framgia/cwsb_01.git","clone_url":"https://github.com/framgia/cwsb_01.git","svn_url":"https://github.com/framgia/cwsb_01","homepage":null,"size":4704,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":6,"forks":8,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/38"},"html":{"href":"https://github.com/framgia/cwsb_01/pull/38"},"issue":{"href":"https://api.github.com/repos/framgia/cwsb_01/issues/38"},"comments":{"href":"https://api.github.com/repos/framgia/cwsb_01/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/cwsb_01/statuses/b0792b2f6c2d7cef2e10ecfdd046ebef42e7ace0"}}}}
{"actor":{"display_login":"quyenguyengoc"}}