Project

General

Profile

« Previous | Next » 

Revision 44846

Change SearchFields class format- apply changes to all search pages

View differences:

test.component.ts
9 9

  
10 10
import {ISVocabulariesService} from '../services/ISVocabularies.service';
11 11
import {Dates} from '../utils/string-utils.class';
12

  
13
import {SearchFields} from '../utils/properties/searchFields';
14

  
12 15
@Component({
13 16
    selector: 'test',
14 17
    template: `
......
104 107

  
105 108
        }
106 109
    );
110
    console.info("do the test");
111
    this.test();
112
    console.info("after the test");
113

  
107 114
  }
115
  test(){
116
    var  sf:SearchFields  = new SearchFields();
117
    console.info("~~~RESULT");
118

  
119
    this.checktables(sf.RESULT_REFINE_FIELDS,sf.RESULT_FIELDS,sf.RESULT_FIELDS);
120
    this.checktables(sf.RESULT_ADVANCED_FIELDS,sf.RESULT_FIELDS,sf.RESULT_FIELDS);
121
    console.info("~~~PR");
122

  
123
    this.checktables(sf.PROJECT_REFINE_FIELDS,sf.PROJECT_FIELDS,sf.PROJECT_FIELDS);
124
    this.checktables(sf.PROJECT_ADVANCED_FIELDS,sf.PROJECT_FIELDS,sf.PROJECT_FIELDS);
125
    console.info("~~~DATAPR");
126

  
127
    this.checktables(sf.DATASOURCE_REFINE_FIELDS,sf.DATASOURCE_FIELDS,sf.DATASOURCE_FIELDS);
128
    this.checktables(sf.DATASOURCE_ADVANCED_FIELDS,sf.DATASOURCE_FIELDS,sf.DATASOURCE_FIELDS);
129

  
130
    console.info("~~~ORG");
131
    this.checktables(sf.ORGANIZATION_REFINE_FIELDS,sf.ORGANIZATION_FIELDS,sf.ORGANIZATION_FIELDS);
132
    this.checktables(sf.ORGANIZATION_ADVANCED_FIELDS,sf.ORGANIZATION_FIELDS,sf.ORGANIZATION_FIELDS);
133
    console.info("~~~PERSON");
134

  
135
    this.checktables(sf.PERSON_REFINE_FIELDS,sf.PERSON_FIELDS,sf.PERSON_FIELDS);
136
    this.checktables(sf.PERSON_ADVANCED_FIELDS,sf.PERSON_FIELDS,sf.PERSON_FIELDS);
137
 }
138
  checktables(fields,fieldsDetails,fieldsParam){
139
 for(var i =0; i < fields.length; i++){
140
   if(!fieldsDetails[fields[i]]){
141
     console.info("!!!!"+fields[i]+ "field has to details");
142
   }
143
   }
144

  
145
 }
146
  
108 147
  login(){
109 148
    localStorage.setItem("email",this.user.email);
110 149
    localStorage.setItem("password",this.user.password);

Also available in: Unified diff