{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fgoal-android/pulls/comments/233745325","pull_request_review_id":175230622,"id":233745325,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzc0NTMyNQ==","diff_hunk":"@@ -0,0 +1,139 @@\n+package com.framgia.fgoal.screen.createobjective;\n+\n+import com.framgia.fgoal.data.model.Objective;\n+import com.framgia.fgoal.data.model.Unit;\n+import com.framgia.fgoal.data.source.remote.api.error.BaseException;\n+import com.framgia.fgoal.data.source.remote.api.error.RequestError;\n+import com.framgia.fgoal.data.source.remote.api.response.BaseResponse;\n+import com.framgia.fgoal.data.source.repository.ObjectiveRepository;\n+import com.framgia.fgoal.data.source.repository.UnitRepository;\n+import com.framgia.fgoal.util.Constant;\n+import com.framgia.fgoal.util.StringUtils;\n+import com.framgia.fgoal.util.rx.BaseSchedulerProvider;\n+\n+import java.util.List;\n+\n+import io.reactivex.disposables.CompositeDisposable;\n+import io.reactivex.disposables.Disposable;\n+import io.reactivex.functions.Consumer;\n+\n+/**\n+ * Created by quangnv on 14/11/2018\n+ */\n+\n+public class CreateObjectivePresenter implements CreateObjectiveContract.Presenter {\n+    /**\n+     * Default unit is percent, id is 1. We'll update in next version\n+     */\n+    private static final int DEFAULT_UNIT_ID = 1;\n+\n+    private CreateObjectiveContract.View mView;\n+    private CompositeDisposable mCompositeDisposable;\n+    private BaseSchedulerProvider mScheduler;\n+    private ObjectiveRepository mObjectiveRepository;\n+    private UnitRepository mUnitRepository;\n+\n+    public CreateObjectivePresenter(CompositeDisposable compositeDisposable,\n+                                    BaseSchedulerProvider scheduler,\n+                                    ObjectiveRepository objectiveRepository,\n+                                    UnitRepository unitRepository) {\n+        mCompositeDisposable = compositeDisposable;\n+        mScheduler = scheduler;\n+        mObjectiveRepository = objectiveRepository;\n+        mUnitRepository = unitRepository;\n+    }\n+\n+    @Override\n+    public void createObjective(String quarterId, String groupId, String objectiveTitle,\n+                                String objectiveWeight, Unit unit) {\n+\n+        if (StringUtils.isBlank(objectiveTitle)) {","path":"app/src/main/java/com/framgia/fgoal/screen/createobjective/CreateObjectivePresenter.java","position":50,"original_position":50,"commit_id":"660f82a634894e6629970142d1f2948c672be022","original_commit_id":"660f82a634894e6629970142d1f2948c672be022","user":{"login":"DoanVanToan","id":21195010,"node_id":"MDQ6VXNlcjIxMTk1MDEw","avatar_url":"https://avatars3.githubusercontent.com/u/21195010?v=4","gravatar_id":"","url":"https://api.github.com/users/DoanVanToan","html_url":"https://github.com/DoanVanToan","followers_url":"https://api.github.com/users/DoanVanToan/followers","following_url":"https://api.github.com/users/DoanVanToan/following{/other_user}","gists_url":"https://api.github.com/users/DoanVanToan/gists{/gist_id}","starred_url":"https://api.github.com/users/DoanVanToan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoanVanToan/subscriptions","organizations_url":"https://api.github.com/users/DoanVanToan/orgs","repos_url":"https://api.github.com/users/DoanVanToan/repos","events_url":"https://api.github.com/users/DoanVanToan/events{/privacy}","received_events_url":"https://api.github.com/users/DoanVanToan/received_events","type":"User","site_admin":false},"body":"e tách riêng cho a 1 hàm validate data nhé","created_at":"2018-11-15T08:17:17Z","updated_at":"2018-11-15T08:18:15Z","html_url":"https://github.com/framgia/fgoal-android/pull/312#discussion_r233745325","pull_request_url":"https://api.github.com/repos/framgia/fgoal-android/pulls/312","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/framgia/fgoal-android/pulls/comments/233745325"},"html":{"href":"https://github.com/framgia/fgoal-android/pull/312#discussion_r233745325"},"pull_request":{"href":"https://api.github.com/repos/framgia/fgoal-android/pulls/312"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fgoal-android/pulls/312","id":231043226,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMDQzMjI2","html_url":"https://github.com/framgia/fgoal-android/pull/312","diff_url":"https://github.com/framgia/fgoal-android/pull/312.diff","patch_url":"https://github.com/framgia/fgoal-android/pull/312.patch","issue_url":"https://api.github.com/repos/framgia/fgoal-android/issues/312","number":312,"state":"open","locked":false,"title":"Create screen: new objective, enable weight objective","user":{"login":"nvquangth","id":22972057,"node_id":"MDQ6VXNlcjIyOTcyMDU3","avatar_url":"https://avatars3.githubusercontent.com/u/22972057?v=4","gravatar_id":"","url":"https://api.github.com/users/nvquangth","html_url":"https://github.com/nvquangth","followers_url":"https://api.github.com/users/nvquangth/followers","following_url":"https://api.github.com/users/nvquangth/following{/other_user}","gists_url":"https://api.github.com/users/nvquangth/gists{/gist_id}","starred_url":"https://api.github.com/users/nvquangth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvquangth/subscriptions","organizations_url":"https://api.github.com/users/nvquangth/orgs","repos_url":"https://api.github.com/users/nvquangth/repos","events_url":"https://api.github.com/users/nvquangth/events{/privacy}","received_events_url":"https://api.github.com/users/nvquangth/received_events","type":"User","site_admin":false},"body":"\r\n![2](https://user-images.githubusercontent.com/22972057/48538392-f24c2a00-e8e6-11e8-96af-62e9255b05c4.png)\r\n\r\n\r\n### Summary:\r\n-[Feature]\r\nTạo mới màn hình tạo ojbjective, bổ sung thêm weight cho objective.\r\n\r\n### Why need create this PR:\r\n- Tối ưu code \r\n\r\n### Effect:\r\n\r\n### Link Issue:\r\nhttps://edu-redmine.framgia.vn/issues/2918","created_at":"2018-11-15T01:57:46Z","updated_at":"2018-11-15T08:18:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44b4c8b19823dc4a2f5b233edc173036239bc83e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fgoal-android/pulls/312/commits","review_comments_url":"https://api.github.com/repos/framgia/fgoal-android/pulls/312/comments","review_comment_url":"https://api.github.com/repos/framgia/fgoal-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fgoal-android/issues/312/comments","statuses_url":"https://api.github.com/repos/framgia/fgoal-android/statuses/660f82a634894e6629970142d1f2948c672be022","head":{"label":"nvquangth:2918_enable_weight_objective","ref":"2918_enable_weight_objective","sha":"660f82a634894e6629970142d1f2948c672be022","user":{"login":"nvquangth","id":22972057,"node_id":"MDQ6VXNlcjIyOTcyMDU3","avatar_url":"https://avatars3.githubusercontent.com/u/22972057?v=4","gravatar_id":"","url":"https://api.github.com/users/nvquangth","html_url":"https://github.com/nvquangth","followers_url":"https://api.github.com/users/nvquangth/followers","following_url":"https://api.github.com/users/nvquangth/following{/other_user}","gists_url":"https://api.github.com/users/nvquangth/gists{/gist_id}","starred_url":"https://api.github.com/users/nvquangth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvquangth/subscriptions","organizations_url":"https://api.github.com/users/nvquangth/orgs","repos_url":"https://api.github.com/users/nvquangth/repos","events_url":"https://api.github.com/users/nvquangth/events{/privacy}","received_events_url":"https://api.github.com/users/nvquangth/received_events","type":"User","site_admin":false},"repo":{"id":150381618,"node_id":"MDEwOlJlcG9zaXRvcnkxNTAzODE2MTg=","name":"fgoal-android","full_name":"nvquangth/fgoal-android","private":false,"owner":{"login":"nvquangth","id":22972057,"node_id":"MDQ6VXNlcjIyOTcyMDU3","avatar_url":"https://avatars3.githubusercontent.com/u/22972057?v=4","gravatar_id":"","url":"https://api.github.com/users/nvquangth","html_url":"https://github.com/nvquangth","followers_url":"https://api.github.com/users/nvquangth/followers","following_url":"https://api.github.com/users/nvquangth/following{/other_user}","gists_url":"https://api.github.com/users/nvquangth/gists{/gist_id}","starred_url":"https://api.github.com/users/nvquangth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvquangth/subscriptions","organizations_url":"https://api.github.com/users/nvquangth/orgs","repos_url":"https://api.github.com/users/nvquangth/repos","events_url":"https://api.github.com/users/nvquangth/events{/privacy}","received_events_url":"https://api.github.com/users/nvquangth/received_events","type":"User","site_admin":false},"html_url":"https://github.com/nvquangth/fgoal-android","description":null,"fork":true,"url":"https://api.github.com/repos/nvquangth/fgoal-android","forks_url":"https://api.github.com/repos/nvquangth/fgoal-android/forks","keys_url":"https://api.github.com/repos/nvquangth/fgoal-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nvquangth/fgoal-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nvquangth/fgoal-android/teams","hooks_url":"https://api.github.com/repos/nvquangth/fgoal-android/hooks","issue_events_url":"https://api.github.com/repos/nvquangth/fgoal-android/issues/events{/number}","events_url":"https://api.github.com/repos/nvquangth/fgoal-android/events","assignees_url":"https://api.github.com/repos/nvquangth/fgoal-android/assignees{/user}","branches_url":"https://api.github.com/repos/nvquangth/fgoal-android/branches{/branch}","tags_url":"https://api.github.com/repos/nvquangth/fgoal-android/tags","blobs_url":"https://api.github.com/repos/nvquangth/fgoal-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nvquangth/fgoal-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nvquangth/fgoal-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/nvquangth/fgoal-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nvquangth/fgoal-android/statuses/{sha}","languages_url":"https://api.github.com/repos/nvquangth/fgoal-android/languages","stargazers_url":"https://api.github.com/repos/nvquangth/fgoal-android/stargazers","contributors_url":"https://api.github.com/repos/nvquangth/fgoal-android/contributors","subscribers_url":"https://api.github.com/repos/nvquangth/fgoal-android/subscribers","subscription_url":"https://api.github.com/repos/nvquangth/fgoal-android/subscription","commits_url":"https://api.github.com/repos/nvquangth/fgoal-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/nvquangth/fgoal-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/nvquangth/fgoal-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/nvquangth/fgoal-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/nvquangth/fgoal-android/contents/{+path}","compare_url":"https://api.github.com/repos/nvquangth/fgoal-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nvquangth/fgoal-android/merges","archive_url":"https://api.github.com/repos/nvquangth/fgoal-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nvquangth/fgoal-android/downloads","issues_url":"https://api.github.com/repos/nvquangth/fgoal-android/issues{/number}","pulls_url":"https://api.github.com/repos/nvquangth/fgoal-android/pulls{/number}","milestones_url":"https://api.github.com/repos/nvquangth/fgoal-android/milestones{/number}","notifications_url":"https://api.github.com/repos/nvquangth/fgoal-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nvquangth/fgoal-android/labels{/name}","releases_url":"https://api.github.com/repos/nvquangth/fgoal-android/releases{/id}","deployments_url":"https://api.github.com/repos/nvquangth/fgoal-android/deployments","created_at":"2018-09-26T06:53:26Z","updated_at":"2018-09-26T06:53:29Z","pushed_at":"2018-11-15T08:01:53Z","git_url":"git://github.com/nvquangth/fgoal-android.git","ssh_url":"git@github.com:nvquangth/fgoal-android.git","clone_url":"https://github.com/nvquangth/fgoal-android.git","svn_url":"https://github.com/nvquangth/fgoal-android","homepage":null,"size":1252,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"framgia:develop","ref":"develop","sha":"f134f1f0bfe7279a47eb9f66780922015bb42cf7","user":{"login":"framgia","id":2322183,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjIxODM=","avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","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":134523792,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ1MjM3OTI=","name":"fgoal-android","full_name":"framgia/fgoal-android","private":false,"owner":{"login":"framgia","id":2322183,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjIxODM=","avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","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},"html_url":"https://github.com/framgia/fgoal-android","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/fgoal-android","forks_url":"https://api.github.com/repos/framgia/fgoal-android/forks","keys_url":"https://api.github.com/repos/framgia/fgoal-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fgoal-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fgoal-android/teams","hooks_url":"https://api.github.com/repos/framgia/fgoal-android/hooks","issue_events_url":"https://api.github.com/repos/framgia/fgoal-android/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fgoal-android/events","assignees_url":"https://api.github.com/repos/framgia/fgoal-android/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fgoal-android/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fgoal-android/tags","blobs_url":"https://api.github.com/repos/framgia/fgoal-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fgoal-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fgoal-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fgoal-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fgoal-android/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fgoal-android/languages","stargazers_url":"https://api.github.com/repos/framgia/fgoal-android/stargazers","contributors_url":"https://api.github.com/repos/framgia/fgoal-android/contributors","subscribers_url":"https://api.github.com/repos/framgia/fgoal-android/subscribers","subscription_url":"https://api.github.com/repos/framgia/fgoal-android/subscription","commits_url":"https://api.github.com/repos/framgia/fgoal-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fgoal-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fgoal-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fgoal-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fgoal-android/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fgoal-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fgoal-android/merges","archive_url":"https://api.github.com/repos/framgia/fgoal-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fgoal-android/downloads","issues_url":"https://api.github.com/repos/framgia/fgoal-android/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fgoal-android/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fgoal-android/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fgoal-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fgoal-android/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fgoal-android/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fgoal-android/deployments","created_at":"2018-05-23T06:28:59Z","updated_at":"2018-11-15T07:37:32Z","pushed_at":"2018-11-15T08:01:54Z","git_url":"git://github.com/framgia/fgoal-android.git","ssh_url":"git@github.com:framgia/fgoal-android.git","clone_url":"https://github.com/framgia/fgoal-android.git","svn_url":"https://github.com/framgia/fgoal-android","homepage":null,"size":1238,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":108,"license":null,"forks":14,"open_issues":108,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fgoal-android/pulls/312"},"html":{"href":"https://github.com/framgia/fgoal-android/pull/312"},"issue":{"href":"https://api.github.com/repos/framgia/fgoal-android/issues/312"},"comments":{"href":"https://api.github.com/repos/framgia/fgoal-android/issues/312/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fgoal-android/pulls/312/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fgoal-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fgoal-android/pulls/312/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fgoal-android/statuses/660f82a634894e6629970142d1f2948c672be022"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"DoanVanToan"}}