- |
- 0">
-
-
+ 0">
+
+
+
|
@@ -115,10 +116,10 @@ public selectedCategoryId:string ="0";
public query = '';
public filteredList = [];
-public communities:string[];
+public communities:any;
public selectedCommunityLabel:string = "Community:";
-public categories:string[];
+public categories:any;
public selectedCategoryLabel:string ="Category:";
public concepts = [];
public conceptsClass = [];
@@ -158,7 +159,7 @@ isSelected(id):boolean{
this.selectedList.push(context);
UIkit.notification({
- message : 'A context is selected.',
+ message : 'A new concept is selected.',
status : 'info',
timeout : 1000,
pos : 'top-center'
@@ -166,7 +167,7 @@ isSelected(id):boolean{
}else{
UIkit.notification({
- message : 'The context is already on your list.',
+ message : 'The concept is already on your list.',
status : 'warning',
timeout : 1000,
pos : 'top-center'
@@ -301,22 +302,26 @@ getCommunities () {
console.log(this.selectedCommunityId +" ");
this.warningMessage = "";
this.infoMessage = "";
- if(this.selectedCommunityId != communityId){
- this.selectedCommunityId = communityId;
- this.selectedCommunityLabel = communityLabel;
- this.getCategories();
+ for(var i = 0; i< this.communities.length; i++){
+ if(this.communities[i].id==this.selectedCommunityId){
+ this.selectedCommunityLabel = this.communities[i].label;
+ break;
+ }
}
-
+ this.selectedCategoryId = "0";
+ this.selectedCategoryLabel="Select Category:";
+ this.getCategories();
}
- categoryChanged(categoryId:string, categoryLabel:string){
+ categoryChanged(){
this.warningMessage = "";
this.infoMessage = "";
- if(this.selectedCategoryId != categoryId){
- this.selectedCategoryId = categoryId;
- this.selectedCategoryLabel = categoryLabel;
- this.getConcepts();
+ for(var i = 0; i< this.categories.length; i++){
+ if(this.categories[i].id==this.selectedCategoryId){
+ this.selectedCategoryLabel = this.categories[i].label;
+ break;
+ }
}
-
+ this.getConcepts();
}
addCommunityInConcepts(){
this.concepts.push({"id":this.selectedCommunityId, "label":this.selectedCommunityLabel});
diff --git a/portal-2/src/app/claims/claim-utils/claimProjectSearchForm.component.ts b/portal-2/src/app/claims/claim-utils/claimProjectSearchForm.component.ts
index 617748f1..d6a7c1fb 100644
--- a/portal-2/src/app/claims/claim-utils/claimProjectSearchForm.component.ts
+++ b/portal-2/src/app/claims/claim-utils/claimProjectSearchForm.component.ts
@@ -2,7 +2,7 @@ import {Component, Input,Output, ElementRef, EventEmitter, ViewChild} from '@ang
import {Observable} from 'rxjs/Observable';
import {SearchProjectsService} from '../../services/searchProjects.service';
import {ProjectService} from '../../landingPages/project/project.service';
-import {ModalLoading} from '../../utils/modal/loading.component';
+// import {ModalLoading} from '../../utils/modal/loading.component';
import { Subject } from 'rxjs/Subject';
import {ClaimProject} from './claimEntities.class';
declare var UIkit:any;
@@ -12,20 +12,20 @@ declare var UIkit:any;
template: `
| |