{"action":"created","comment":{"url":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/comments/177532919","pull_request_review_id":107420805,"id":177532919,"diff_hunk":"@@ -0,0 +1,174 @@\n+import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';\n+import { ActivatedRoute, Route, Router } from '@angular/router';\n+import { ResourceService, ToasterService, RouterNavigationService, ServerResponse } from '@sunbird/shared';\n+import { Angular2Csv } from 'angular2-csv';\n+import { OrgManagementService } from '../../services/org-management/org-management.service';\n+import { NgForm, FormBuilder, Validators, FormGroup } from '@angular/forms';\n+\n+@Component({\n+  selector: 'app-user',\n+  templateUrl: './user-upload.component.html',\n+  styleUrls: ['./user-upload.component.css']\n+})\n+export class UserUploadComponent implements OnInit {\n+  @ViewChild('inputbtn') inputbtn: ElementRef;\n+  sampleUserCSV: Array<Object>;\n+  /**\n+* To call admin service which helps to upload csv file\n+*/\n+  public orgManagementService: OrgManagementService;\n+  /**\n+* Contains process id\n+*/\n+  processId: string;\n+  /**\n+* Used to display filename in html\n+*/\n+  fileName: string;\n+  /**\n+* Used to show/hide error message\n+*/\n+  bulkUploadError: boolean;\n+  /**\n+* Contains error message to show in html\n+*/\n+  bulkUploadErrorMessage: string;\n+  /**\n+* To show/hide loader\n+*/\n+  showLoader: boolean;\n+  /**\n+   * Upload org form name\n+   */\n+  uploadUserForm: FormGroup;\n+  /**\n+ * Contains reference of FormBuilder\n+ */\n+  sbFormBuilder: FormBuilder;\n+  /**\n+   * To call resource service which helps to use language constant\n+   */\n+  public resourceService: ResourceService;\n+  /**\n+ * To show toaster(error, success etc) after any API calls\n+ */\n+  private toasterService: ToasterService;\n+  /**\n+* Constructor to create injected service(s) object\n+*\n+* Default method of DetailsComponent class\n+*\n+* @param {ResourceService} resourceService To call resource service which helps to use language constant\n+*/\n+  constructor(orgManagementService: OrgManagementService, formBuilder: FormBuilder, toasterService: ToasterService, private router: Router,\n+    resourceService: ResourceService) {\n+    this.resourceService = resourceService;\n+    this.sbFormBuilder = formBuilder;\n+    this.orgManagementService = orgManagementService;\n+    this.toasterService = toasterService;\n+  }\n+  /**\n+ * This method initializes the user form and validates it,\n+ * also defines a csv format to be downloaded\n+ */\n+  ngOnInit() {\n+    this.uploadUserForm = this.sbFormBuilder.group({\n+      provider: ['', null],\n+      externalId: ['', null],\n+      organisationId: ['', null]\n+    });\n+    this.sampleUserCSV = [{\n+      firstName: 'firstName',\n+      lastName: 'lastName',\n+      phone: 'phone',\n+      email: 'email',\n+      userName: 'userName',\n+      password: 'password',\n+      provider: 'provider',\n+      phoneVerified: 'phoneVerified',\n+      emailVerified: 'emailVerified',\n+      roles: 'roles',\n+      position: 'position',\n+      grade: 'grade',\n+      location: 'location',\n+      dob: 'dob',\n+      gender: 'gender',\n+      language: 'language',\n+      profileSummary: 'profileSummary',\n+      subject: 'subject'\n+    }];\n+    this.showLoader = false;\n+  }\n+  /**\n+ * This method helps to redirect to the parent component\n+ * page, i.e, bulk upload page\n+ */\n+  public redirect() {\n+    this.fileName = '';\n+    this.processId = '';\n+    this.router.navigate(['bulkUpload']);\n+  }\n+  /**\n+ * This method helps to download a sample csv file\n+ */\n+  public downloadSample() {\n+    const options = {\n+      fieldSeparator: ',',\n+      quoteStrings: '\"',\n+      decimalseparator: '.',\n+      showLabels: true\n+    };\n+    // tslint:disable-next-line:no-unused-expression\n+    new Angular2Csv(this.sampleUserCSV, 'Sample_Users', options);\n+  }\n+  /**\n+ * This method helps to call uploadOrg method to upload a csv file\n+ */\n+  openImageBrowser(inputbtn) {\n+    console.log('inside openImageBrowser');","path":"src/app/migration/src/src/app/modules/org-management/components/user-upload/user-upload.component.ts","position":128,"original_position":128,"commit_id":"bafc9d7f26abe28049159fdc29e31c7d1e572621","original_commit_id":"bafc9d7f26abe28049159fdc29e31c7d1e572621","user":{"login":"anoophm","id":18601592,"avatar_url":"https://avatars0.githubusercontent.com/u/18601592?v=4","gravatar_id":"","url":"https://api.github.com/users/anoophm","html_url":"https://github.com/anoophm","followers_url":"https://api.github.com/users/anoophm/followers","following_url":"https://api.github.com/users/anoophm/following{/other_user}","gists_url":"https://api.github.com/users/anoophm/gists{/gist_id}","starred_url":"https://api.github.com/users/anoophm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anoophm/subscriptions","organizations_url":"https://api.github.com/users/anoophm/orgs","repos_url":"https://api.github.com/users/anoophm/repos","events_url":"https://api.github.com/users/anoophm/events{/privacy}","received_events_url":"https://api.github.com/users/anoophm/received_events","type":"User","site_admin":false},"body":"remove console","created_at":"2018-03-27T18:48:59Z","updated_at":"2018-03-27T18:49:00Z","html_url":"https://github.com/project-sunbird/sunbird-portal/pull/336#discussion_r177532919","pull_request_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/336","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/comments/177532919"},"html":{"href":"https://github.com/project-sunbird/sunbird-portal/pull/336#discussion_r177532919"},"pull_request":{"href":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/336"}}},"pull_request":{"url":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/336","id":177754466,"html_url":"https://github.com/project-sunbird/sunbird-portal/pull/336","diff_url":"https://github.com/project-sunbird/sunbird-portal/pull/336.diff","patch_url":"https://github.com/project-sunbird/sunbird-portal/pull/336.patch","issue_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/issues/336","number":336,"state":"open","locked":false,"title":"Issue #SB-2170 feat: Bulk upload feature","user":{"login":"vaishnavimanjunath","id":28885713,"avatar_url":"https://avatars1.githubusercontent.com/u/28885713?v=4","gravatar_id":"","url":"https://api.github.com/users/vaishnavimanjunath","html_url":"https://github.com/vaishnavimanjunath","followers_url":"https://api.github.com/users/vaishnavimanjunath/followers","following_url":"https://api.github.com/users/vaishnavimanjunath/following{/other_user}","gists_url":"https://api.github.com/users/vaishnavimanjunath/gists{/gist_id}","starred_url":"https://api.github.com/users/vaishnavimanjunath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaishnavimanjunath/subscriptions","organizations_url":"https://api.github.com/users/vaishnavimanjunath/orgs","repos_url":"https://api.github.com/users/vaishnavimanjunath/repos","events_url":"https://api.github.com/users/vaishnavimanjunath/events{/privacy}","received_events_url":"https://api.github.com/users/vaishnavimanjunath/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-27T14:14:29Z","updated_at":"2018-03-27T18:49:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f86b302b69a0858b442b0e1ca770b5815e44f6f3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/336/commits","review_comments_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/336/comments","review_comment_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/issues/336/comments","statuses_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/statuses/bafc9d7f26abe28049159fdc29e31c7d1e572621","head":{"label":"vaishnavimanjunath:portal-migration","ref":"portal-migration","sha":"bafc9d7f26abe28049159fdc29e31c7d1e572621","user":{"login":"vaishnavimanjunath","id":28885713,"avatar_url":"https://avatars1.githubusercontent.com/u/28885713?v=4","gravatar_id":"","url":"https://api.github.com/users/vaishnavimanjunath","html_url":"https://github.com/vaishnavimanjunath","followers_url":"https://api.github.com/users/vaishnavimanjunath/followers","following_url":"https://api.github.com/users/vaishnavimanjunath/following{/other_user}","gists_url":"https://api.github.com/users/vaishnavimanjunath/gists{/gist_id}","starred_url":"https://api.github.com/users/vaishnavimanjunath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaishnavimanjunath/subscriptions","organizations_url":"https://api.github.com/users/vaishnavimanjunath/orgs","repos_url":"https://api.github.com/users/vaishnavimanjunath/repos","events_url":"https://api.github.com/users/vaishnavimanjunath/events{/privacy}","received_events_url":"https://api.github.com/users/vaishnavimanjunath/received_events","type":"User","site_admin":false},"repo":{"id":124836201,"name":"sunbird-portal","full_name":"vaishnavimanjunath/sunbird-portal","owner":{"login":"vaishnavimanjunath","id":28885713,"avatar_url":"https://avatars1.githubusercontent.com/u/28885713?v=4","gravatar_id":"","url":"https://api.github.com/users/vaishnavimanjunath","html_url":"https://github.com/vaishnavimanjunath","followers_url":"https://api.github.com/users/vaishnavimanjunath/followers","following_url":"https://api.github.com/users/vaishnavimanjunath/following{/other_user}","gists_url":"https://api.github.com/users/vaishnavimanjunath/gists{/gist_id}","starred_url":"https://api.github.com/users/vaishnavimanjunath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaishnavimanjunath/subscriptions","organizations_url":"https://api.github.com/users/vaishnavimanjunath/orgs","repos_url":"https://api.github.com/users/vaishnavimanjunath/repos","events_url":"https://api.github.com/users/vaishnavimanjunath/events{/privacy}","received_events_url":"https://api.github.com/users/vaishnavimanjunath/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vaishnavimanjunath/sunbird-portal","description":"Web Portal for sunbird software. Provides the web interfaces for all functionality of Sunbird. Find the installation instructions at: http://www.sunbird.org/developer-docs/installation/","fork":true,"url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal","forks_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/forks","keys_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/teams","hooks_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/hooks","issue_events_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/issues/events{/number}","events_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/events","assignees_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/assignees{/user}","branches_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/branches{/branch}","tags_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/tags","blobs_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/languages","stargazers_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/stargazers","contributors_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/contributors","subscribers_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/subscribers","subscription_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/subscription","commits_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/contents/{+path}","compare_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/merges","archive_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/downloads","issues_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/issues{/number}","pulls_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/labels{/name}","releases_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/releases{/id}","deployments_url":"https://api.github.com/repos/vaishnavimanjunath/sunbird-portal/deployments","created_at":"2018-03-12T05:05:58Z","updated_at":"2018-03-12T05:06:03Z","pushed_at":"2018-03-27T14:13:35Z","git_url":"git://github.com/vaishnavimanjunath/sunbird-portal.git","ssh_url":"git@github.com:vaishnavimanjunath/sunbird-portal.git","clone_url":"https://github.com/vaishnavimanjunath/sunbird-portal.git","svn_url":"https://github.com/vaishnavimanjunath/sunbird-portal","homepage":"","size":190663,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"project-sunbird:angular-migration","ref":"angular-migration","sha":"6034d42aade05b818867f6ecd0b684d6e310c2ca","user":{"login":"project-sunbird","id":26705730,"avatar_url":"https://avatars1.githubusercontent.com/u/26705730?v=4","gravatar_id":"","url":"https://api.github.com/users/project-sunbird","html_url":"https://github.com/project-sunbird","followers_url":"https://api.github.com/users/project-sunbird/followers","following_url":"https://api.github.com/users/project-sunbird/following{/other_user}","gists_url":"https://api.github.com/users/project-sunbird/gists{/gist_id}","starred_url":"https://api.github.com/users/project-sunbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-sunbird/subscriptions","organizations_url":"https://api.github.com/users/project-sunbird/orgs","repos_url":"https://api.github.com/users/project-sunbird/repos","events_url":"https://api.github.com/users/project-sunbird/events{/privacy}","received_events_url":"https://api.github.com/users/project-sunbird/received_events","type":"Organization","site_admin":false},"repo":{"id":96121448,"name":"sunbird-portal","full_name":"project-sunbird/sunbird-portal","owner":{"login":"project-sunbird","id":26705730,"avatar_url":"https://avatars1.githubusercontent.com/u/26705730?v=4","gravatar_id":"","url":"https://api.github.com/users/project-sunbird","html_url":"https://github.com/project-sunbird","followers_url":"https://api.github.com/users/project-sunbird/followers","following_url":"https://api.github.com/users/project-sunbird/following{/other_user}","gists_url":"https://api.github.com/users/project-sunbird/gists{/gist_id}","starred_url":"https://api.github.com/users/project-sunbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-sunbird/subscriptions","organizations_url":"https://api.github.com/users/project-sunbird/orgs","repos_url":"https://api.github.com/users/project-sunbird/repos","events_url":"https://api.github.com/users/project-sunbird/events{/privacy}","received_events_url":"https://api.github.com/users/project-sunbird/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project-sunbird/sunbird-portal","description":"Web Portal for sunbird software. Provides the web interfaces for all functionality of Sunbird. Find the installation instructions at: http://www.sunbird.org/developer-docs/installation/","fork":false,"url":"https://api.github.com/repos/project-sunbird/sunbird-portal","forks_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/forks","keys_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/teams","hooks_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/hooks","issue_events_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/issues/events{/number}","events_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/events","assignees_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/assignees{/user}","branches_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/branches{/branch}","tags_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/tags","blobs_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/languages","stargazers_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/stargazers","contributors_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/contributors","subscribers_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/subscribers","subscription_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/subscription","commits_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/contents/{+path}","compare_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/merges","archive_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/downloads","issues_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/issues{/number}","pulls_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/labels{/name}","releases_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/releases{/id}","deployments_url":"https://api.github.com/repos/project-sunbird/sunbird-portal/deployments","created_at":"2017-07-03T14:47:48Z","updated_at":"2018-03-16T04:24:12Z","pushed_at":"2018-03-27T14:14:30Z","git_url":"git://github.com/project-sunbird/sunbird-portal.git","ssh_url":"git@github.com:project-sunbird/sunbird-portal.git","clone_url":"https://github.com/project-sunbird/sunbird-portal.git","svn_url":"https://github.com/project-sunbird/sunbird-portal","homepage":"","size":192252,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"open_issues_count":60,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":30,"open_issues":60,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/336"},"html":{"href":"https://github.com/project-sunbird/sunbird-portal/pull/336"},"issue":{"href":"https://api.github.com/repos/project-sunbird/sunbird-portal/issues/336"},"comments":{"href":"https://api.github.com/repos/project-sunbird/sunbird-portal/issues/336/comments"},"review_comments":{"href":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/336/comments"},"review_comment":{"href":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/project-sunbird/sunbird-portal/pulls/336/commits"},"statuses":{"href":"https://api.github.com/repos/project-sunbird/sunbird-portal/statuses/bafc9d7f26abe28049159fdc29e31c7d1e572621"}},"author_association":"NONE"}}
{"actor":{"display_login":"anoophm"}}