{"action":"created","comment":{"url":"https://api.github.com/repos/BrendaUga/uip-project/pulls/comments/175745750","pull_request_review_id":105323713,"id":175745750,"diff_hunk":"@@ -214,90 +431,442 @@\n             } else if (eventType === 'paymentOptionClicked') {\n                 $('.sidebar-button').on('click', function (e) {\n                     var paymentOption = e.target.dataset.option;\n-                    callback(paymentOption);\n+\n+                    var orders = document.querySelectorAll('.order-item__name');\n+                    var activeTab = $('.nav-tab.active').html();\n+                    callback(paymentOption, orders, activeTab);\n+                });\n+            } else if (eventType === 'markedAsDone') {\n+                $('.manager_button[data-option=\"done\"]').on('click', function () {\n+                    var checkedItems = [];\n+                    var checkboxes = $('.order-item__checkbox:checked');\n+                    checkboxes.each(function (index, element) {\n+                        checkedItems.push($(element).parent().parent().attr('data-index'));\n+                    });\n+                    callback(checkedItems);\n+                });\n+            } else if (eventType === 'undo') {\n+                $('.manager_button[data-option=\"undo\"]').on('click', function() {\n+                    callback();\n+                });\n+            } else if (eventType === 'redo') {\n+                $('.manager_button[data-option=\"redo\"]').on('click', function() {\n+                    callback();\n+                });\n+            } else if (eventType === 'restock') {\n+                $('.restock-button').on('click', function () {\n+                    View.renderModal('restockConfirmed');\n+                    var activeTab = $('.nav-tab.active').html();\n+                    callback(activeTab);\n                 });\n             }\n         },\n+\n+        /**\n+         * Listener for the login button\n+         * @author Guillermo Martinez\n+         */\n+        loginButtonListener: function(callback) {\n+            $('#login_button').on('click', function () {\n+                callback();\n+            });\n+        },\n+\n+        /**\n+         * Send the login information collected by the form\n+         * @author Guillermo Martinez\n+         */\n+        sendLogin: function(callback) {","path":"app.js","position":456,"original_position":456,"commit_id":"635b2de2c6c547a96bf300c54b878b458c6b6b45","original_commit_id":"635b2de2c6c547a96bf300c54b878b458c6b6b45","user":{"login":"BrendaUga","id":11429369,"avatar_url":"https://avatars1.githubusercontent.com/u/11429369?v=4","gravatar_id":"","url":"https://api.github.com/users/BrendaUga","html_url":"https://github.com/BrendaUga","followers_url":"https://api.github.com/users/BrendaUga/followers","following_url":"https://api.github.com/users/BrendaUga/following{/other_user}","gists_url":"https://api.github.com/users/BrendaUga/gists{/gist_id}","starred_url":"https://api.github.com/users/BrendaUga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrendaUga/subscriptions","organizations_url":"https://api.github.com/users/BrendaUga/orgs","repos_url":"https://api.github.com/users/BrendaUga/repos","events_url":"https://api.github.com/users/BrendaUga/events{/privacy}","received_events_url":"https://api.github.com/users/BrendaUga/received_events","type":"User","site_admin":false},"body":"Implement for manager view as well","created_at":"2018-03-20T12:24:52Z","updated_at":"2018-03-20T12:25:43Z","html_url":"https://github.com/BrendaUga/uip-project/pull/15#discussion_r175745750","pull_request_url":"https://api.github.com/repos/BrendaUga/uip-project/pulls/15","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/BrendaUga/uip-project/pulls/comments/175745750"},"html":{"href":"https://github.com/BrendaUga/uip-project/pull/15#discussion_r175745750"},"pull_request":{"href":"https://api.github.com/repos/BrendaUga/uip-project/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/BrendaUga/uip-project/pulls/15","id":174689778,"html_url":"https://github.com/BrendaUga/uip-project/pull/15","diff_url":"https://github.com/BrendaUga/uip-project/pull/15.diff","patch_url":"https://github.com/BrendaUga/uip-project/pull/15.patch","issue_url":"https://api.github.com/repos/BrendaUga/uip-project/issues/15","number":15,"state":"open","locked":false,"title":"Login page","user":{"login":"Vilhjalmr12","id":18303089,"avatar_url":"https://avatars2.githubusercontent.com/u/18303089?v=4","gravatar_id":"","url":"https://api.github.com/users/Vilhjalmr12","html_url":"https://github.com/Vilhjalmr12","followers_url":"https://api.github.com/users/Vilhjalmr12/followers","following_url":"https://api.github.com/users/Vilhjalmr12/following{/other_user}","gists_url":"https://api.github.com/users/Vilhjalmr12/gists{/gist_id}","starred_url":"https://api.github.com/users/Vilhjalmr12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vilhjalmr12/subscriptions","organizations_url":"https://api.github.com/users/Vilhjalmr12/orgs","repos_url":"https://api.github.com/users/Vilhjalmr12/repos","events_url":"https://api.github.com/users/Vilhjalmr12/events{/privacy}","received_events_url":"https://api.github.com/users/Vilhjalmr12/received_events","type":"User","site_admin":false},"body":"Login for VIPs and managers added. Once the manager view is pushed, the login should be edited so that when the manager logs in goes to the correct view. I added some minimal security like changing the tab when you log out, this way you are not allowed to take more special products.","created_at":"2018-03-13T15:06:35Z","updated_at":"2018-03-20T12:25:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eafd09d571ba51fd2fc15e618fc2b5e017433c34","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BrendaUga/uip-project/pulls/15/commits","review_comments_url":"https://api.github.com/repos/BrendaUga/uip-project/pulls/15/comments","review_comment_url":"https://api.github.com/repos/BrendaUga/uip-project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BrendaUga/uip-project/issues/15/comments","statuses_url":"https://api.github.com/repos/BrendaUga/uip-project/statuses/635b2de2c6c547a96bf300c54b878b458c6b6b45","head":{"label":"BrendaUga:Login-page","ref":"Login-page","sha":"635b2de2c6c547a96bf300c54b878b458c6b6b45","user":{"login":"BrendaUga","id":11429369,"avatar_url":"https://avatars1.githubusercontent.com/u/11429369?v=4","gravatar_id":"","url":"https://api.github.com/users/BrendaUga","html_url":"https://github.com/BrendaUga","followers_url":"https://api.github.com/users/BrendaUga/followers","following_url":"https://api.github.com/users/BrendaUga/following{/other_user}","gists_url":"https://api.github.com/users/BrendaUga/gists{/gist_id}","starred_url":"https://api.github.com/users/BrendaUga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrendaUga/subscriptions","organizations_url":"https://api.github.com/users/BrendaUga/orgs","repos_url":"https://api.github.com/users/BrendaUga/repos","events_url":"https://api.github.com/users/BrendaUga/events{/privacy}","received_events_url":"https://api.github.com/users/BrendaUga/received_events","type":"User","site_admin":false},"repo":{"id":121633697,"name":"uip-project","full_name":"BrendaUga/uip-project","owner":{"login":"BrendaUga","id":11429369,"avatar_url":"https://avatars1.githubusercontent.com/u/11429369?v=4","gravatar_id":"","url":"https://api.github.com/users/BrendaUga","html_url":"https://github.com/BrendaUga","followers_url":"https://api.github.com/users/BrendaUga/followers","following_url":"https://api.github.com/users/BrendaUga/following{/other_user}","gists_url":"https://api.github.com/users/BrendaUga/gists{/gist_id}","starred_url":"https://api.github.com/users/BrendaUga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrendaUga/subscriptions","organizations_url":"https://api.github.com/users/BrendaUga/orgs","repos_url":"https://api.github.com/users/BrendaUga/repos","events_url":"https://api.github.com/users/BrendaUga/events{/privacy}","received_events_url":"https://api.github.com/users/BrendaUga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BrendaUga/uip-project","description":"UI programming I project","fork":false,"url":"https://api.github.com/repos/BrendaUga/uip-project","forks_url":"https://api.github.com/repos/BrendaUga/uip-project/forks","keys_url":"https://api.github.com/repos/BrendaUga/uip-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BrendaUga/uip-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BrendaUga/uip-project/teams","hooks_url":"https://api.github.com/repos/BrendaUga/uip-project/hooks","issue_events_url":"https://api.github.com/repos/BrendaUga/uip-project/issues/events{/number}","events_url":"https://api.github.com/repos/BrendaUga/uip-project/events","assignees_url":"https://api.github.com/repos/BrendaUga/uip-project/assignees{/user}","branches_url":"https://api.github.com/repos/BrendaUga/uip-project/branches{/branch}","tags_url":"https://api.github.com/repos/BrendaUga/uip-project/tags","blobs_url":"https://api.github.com/repos/BrendaUga/uip-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BrendaUga/uip-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BrendaUga/uip-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/BrendaUga/uip-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BrendaUga/uip-project/statuses/{sha}","languages_url":"https://api.github.com/repos/BrendaUga/uip-project/languages","stargazers_url":"https://api.github.com/repos/BrendaUga/uip-project/stargazers","contributors_url":"https://api.github.com/repos/BrendaUga/uip-project/contributors","subscribers_url":"https://api.github.com/repos/BrendaUga/uip-project/subscribers","subscription_url":"https://api.github.com/repos/BrendaUga/uip-project/subscription","commits_url":"https://api.github.com/repos/BrendaUga/uip-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/BrendaUga/uip-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/BrendaUga/uip-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/BrendaUga/uip-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/BrendaUga/uip-project/contents/{+path}","compare_url":"https://api.github.com/repos/BrendaUga/uip-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BrendaUga/uip-project/merges","archive_url":"https://api.github.com/repos/BrendaUga/uip-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BrendaUga/uip-project/downloads","issues_url":"https://api.github.com/repos/BrendaUga/uip-project/issues{/number}","pulls_url":"https://api.github.com/repos/BrendaUga/uip-project/pulls{/number}","milestones_url":"https://api.github.com/repos/BrendaUga/uip-project/milestones{/number}","notifications_url":"https://api.github.com/repos/BrendaUga/uip-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BrendaUga/uip-project/labels{/name}","releases_url":"https://api.github.com/repos/BrendaUga/uip-project/releases{/id}","deployments_url":"https://api.github.com/repos/BrendaUga/uip-project/deployments","created_at":"2018-02-15T13:35:49Z","updated_at":"2018-03-20T09:05:38Z","pushed_at":"2018-03-20T09:05:37Z","git_url":"git://github.com/BrendaUga/uip-project.git","ssh_url":"git@github.com:BrendaUga/uip-project.git","clone_url":"https://github.com/BrendaUga/uip-project.git","svn_url":"https://github.com/BrendaUga/uip-project","homepage":null,"size":2019,"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,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"BrendaUga:master","ref":"master","sha":"e2482424df5204e920eea82300beecfcd483cb5b","user":{"login":"BrendaUga","id":11429369,"avatar_url":"https://avatars1.githubusercontent.com/u/11429369?v=4","gravatar_id":"","url":"https://api.github.com/users/BrendaUga","html_url":"https://github.com/BrendaUga","followers_url":"https://api.github.com/users/BrendaUga/followers","following_url":"https://api.github.com/users/BrendaUga/following{/other_user}","gists_url":"https://api.github.com/users/BrendaUga/gists{/gist_id}","starred_url":"https://api.github.com/users/BrendaUga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrendaUga/subscriptions","organizations_url":"https://api.github.com/users/BrendaUga/orgs","repos_url":"https://api.github.com/users/BrendaUga/repos","events_url":"https://api.github.com/users/BrendaUga/events{/privacy}","received_events_url":"https://api.github.com/users/BrendaUga/received_events","type":"User","site_admin":false},"repo":{"id":121633697,"name":"uip-project","full_name":"BrendaUga/uip-project","owner":{"login":"BrendaUga","id":11429369,"avatar_url":"https://avatars1.githubusercontent.com/u/11429369?v=4","gravatar_id":"","url":"https://api.github.com/users/BrendaUga","html_url":"https://github.com/BrendaUga","followers_url":"https://api.github.com/users/BrendaUga/followers","following_url":"https://api.github.com/users/BrendaUga/following{/other_user}","gists_url":"https://api.github.com/users/BrendaUga/gists{/gist_id}","starred_url":"https://api.github.com/users/BrendaUga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrendaUga/subscriptions","organizations_url":"https://api.github.com/users/BrendaUga/orgs","repos_url":"https://api.github.com/users/BrendaUga/repos","events_url":"https://api.github.com/users/BrendaUga/events{/privacy}","received_events_url":"https://api.github.com/users/BrendaUga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BrendaUga/uip-project","description":"UI programming I project","fork":false,"url":"https://api.github.com/repos/BrendaUga/uip-project","forks_url":"https://api.github.com/repos/BrendaUga/uip-project/forks","keys_url":"https://api.github.com/repos/BrendaUga/uip-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BrendaUga/uip-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BrendaUga/uip-project/teams","hooks_url":"https://api.github.com/repos/BrendaUga/uip-project/hooks","issue_events_url":"https://api.github.com/repos/BrendaUga/uip-project/issues/events{/number}","events_url":"https://api.github.com/repos/BrendaUga/uip-project/events","assignees_url":"https://api.github.com/repos/BrendaUga/uip-project/assignees{/user}","branches_url":"https://api.github.com/repos/BrendaUga/uip-project/branches{/branch}","tags_url":"https://api.github.com/repos/BrendaUga/uip-project/tags","blobs_url":"https://api.github.com/repos/BrendaUga/uip-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BrendaUga/uip-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BrendaUga/uip-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/BrendaUga/uip-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BrendaUga/uip-project/statuses/{sha}","languages_url":"https://api.github.com/repos/BrendaUga/uip-project/languages","stargazers_url":"https://api.github.com/repos/BrendaUga/uip-project/stargazers","contributors_url":"https://api.github.com/repos/BrendaUga/uip-project/contributors","subscribers_url":"https://api.github.com/repos/BrendaUga/uip-project/subscribers","subscription_url":"https://api.github.com/repos/BrendaUga/uip-project/subscription","commits_url":"https://api.github.com/repos/BrendaUga/uip-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/BrendaUga/uip-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/BrendaUga/uip-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/BrendaUga/uip-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/BrendaUga/uip-project/contents/{+path}","compare_url":"https://api.github.com/repos/BrendaUga/uip-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BrendaUga/uip-project/merges","archive_url":"https://api.github.com/repos/BrendaUga/uip-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BrendaUga/uip-project/downloads","issues_url":"https://api.github.com/repos/BrendaUga/uip-project/issues{/number}","pulls_url":"https://api.github.com/repos/BrendaUga/uip-project/pulls{/number}","milestones_url":"https://api.github.com/repos/BrendaUga/uip-project/milestones{/number}","notifications_url":"https://api.github.com/repos/BrendaUga/uip-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BrendaUga/uip-project/labels{/name}","releases_url":"https://api.github.com/repos/BrendaUga/uip-project/releases{/id}","deployments_url":"https://api.github.com/repos/BrendaUga/uip-project/deployments","created_at":"2018-02-15T13:35:49Z","updated_at":"2018-03-20T09:05:38Z","pushed_at":"2018-03-20T09:05:37Z","git_url":"git://github.com/BrendaUga/uip-project.git","ssh_url":"git@github.com:BrendaUga/uip-project.git","clone_url":"https://github.com/BrendaUga/uip-project.git","svn_url":"https://github.com/BrendaUga/uip-project","homepage":null,"size":2019,"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,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BrendaUga/uip-project/pulls/15"},"html":{"href":"https://github.com/BrendaUga/uip-project/pull/15"},"issue":{"href":"https://api.github.com/repos/BrendaUga/uip-project/issues/15"},"comments":{"href":"https://api.github.com/repos/BrendaUga/uip-project/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/BrendaUga/uip-project/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/BrendaUga/uip-project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BrendaUga/uip-project/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/BrendaUga/uip-project/statuses/635b2de2c6c547a96bf300c54b878b458c6b6b45"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"BrendaUga"}}