diff options
author | 2020-04-02 15:33:12 +0530 | |
---|---|---|
committer | 2020-04-02 15:33:35 +0530 | |
commit | 552f2d06e9a61bb3d93989cb9faef02d1ba15512 (patch) | |
tree | f3b67641b940c58c809d6bde8ea26a4fd278c5bf /portal-FE-common/src/app/pages | |
parent | 36703953572a86f06db6c60285a3b3d358aa674c (diff) |
Set default value for first time user
Default user for first time user
Issue-ID: PORTAL-862
Change-Id: I671ffb2574d4fc05602f218aa625248d35e666f4
Signed-off-by: jz385p <jegadeesh.babu@att.com>
Diffstat (limited to 'portal-FE-common/src/app/pages')
-rw-r--r-- | portal-FE-common/src/app/pages/dashboard-application-catalog/dashboard-application-catalog.component.ts | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/portal-FE-common/src/app/pages/dashboard-application-catalog/dashboard-application-catalog.component.ts b/portal-FE-common/src/app/pages/dashboard-application-catalog/dashboard-application-catalog.component.ts index baaa4c49..ce373392 100644 --- a/portal-FE-common/src/app/pages/dashboard-application-catalog/dashboard-application-catalog.component.ts +++ b/portal-FE-common/src/app/pages/dashboard-application-catalog/dashboard-application-catalog.component.ts @@ -121,10 +121,15 @@ export class DashboardApplicationCatalogComponent implements OnInit { } - this.selectedSortType = this.sortOptions[resJson.index]; - //console.log(this.selectedSortType); - this.getAppCatalogService(data); + } + else { + resJson.index = 0; + } + this.selectedSortType = this.sortOptions[resJson.index]; + //console.log(this.selectedSortType); + this.getAppCatalogService(data); + }, error => { console.log('getUserAppsSortTypePreference Error Object' + error.message); }); @@ -152,6 +157,12 @@ export class DashboardApplicationCatalogComponent implements OnInit { getAppCatalogService(userAppSortTypePref: string) { //console.log("getAppCatalogServices called"); + if(!userAppSortTypePref) + { + userAppSortTypePref = "N"; + this.selectedSortType = this.sortOptions[0]; + //console.log("userAppSortTypePref"+userAppSortTypePref); + } this.applicationCatalogService.getAppsOrderBySortPref(userAppSortTypePref).subscribe(data => { //console.log("Response data" + data); this.appCatalogData = data; |