Fix a typo
This commit is contained in:
		@@ -9,7 +9,7 @@
 | 
			
		||||
                        class="selection" (ngModelChange)="updateGroups($event)">
 | 
			
		||||
        <span *rbFormMultiSelectOption="let key">{{key.id}}</span>
 | 
			
		||||
    </rb-form-multi-select>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    <div id="divChart">
 | 
			
		||||
        <canvas id="myChart">
 | 
			
		||||
        </canvas>
 | 
			
		||||
 
 | 
			
		||||
@@ -188,9 +188,9 @@ export class SamplesComponent implements OnInit {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // set toPage to null to reload first page, queues calls
 | 
			
		||||
  loadSamples(options: LoadSamplesOptions = {}, event = null, categorie?) {
 | 
			
		||||
  loadSamples(options: LoadSamplesOptions = {}, event = null, category?) {
 | 
			
		||||
    if (event) {  // adjust active keys
 | 
			
		||||
      this.categories[categorie].forEach(key => {
 | 
			
		||||
      this.categories[category].forEach(key => {
 | 
			
		||||
        if (event.hasOwnProperty(key.id)) {
 | 
			
		||||
          key.active = event[key.id];
 | 
			
		||||
        }
 | 
			
		||||
@@ -271,8 +271,8 @@ export class SamplesComponent implements OnInit {
 | 
			
		||||
      query.push('key=' + this.d.d.userKey.key);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for (let categorie in this.categories) {
 | 
			
		||||
      this.categories[categorie].forEach(key => {
 | 
			
		||||
    for (let category in this.categories) {
 | 
			
		||||
      this.categories[category].forEach(key => {
 | 
			
		||||
        if (key.active && (options.export || (!options.export && key.id.indexOf('material.') < 0))) {
 | 
			
		||||
          query.push('fields[]=' + key.id);
 | 
			
		||||
        }
 | 
			
		||||
@@ -339,8 +339,8 @@ export class SamplesComponent implements OnInit {
 | 
			
		||||
 | 
			
		||||
  storePreferences() {
 | 
			
		||||
    let keys = [];
 | 
			
		||||
    for (let categorie in this.categories) {
 | 
			
		||||
      keys.push(...this.categories[categorie].map(e => pick(e, ['id', 'active'])));
 | 
			
		||||
    for (let category in this.categories) {
 | 
			
		||||
      keys.push(...this.categories[category].map(e => pick(e, ['id', 'active'])));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const store = {
 | 
			
		||||
@@ -366,10 +366,10 @@ export class SamplesComponent implements OnInit {
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      store.keys.forEach(key => {
 | 
			
		||||
        for (let categorie in this.categories) {
 | 
			
		||||
          const keyIndex = this.categories[categorie].findIndex(e => e.id === key.id);
 | 
			
		||||
        for (let category in this.categories) {
 | 
			
		||||
          const keyIndex = this.categories[category].findIndex(e => e.id === key.id);
 | 
			
		||||
          if (keyIndex >= 0) {
 | 
			
		||||
            this.categories[categorie][keyIndex].active = key.active;
 | 
			
		||||
            this.categories[category][keyIndex].active = key.active;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
@@ -395,8 +395,8 @@ export class SamplesComponent implements OnInit {
 | 
			
		||||
 | 
			
		||||
  updateActiveKeys() {  // array with all activeKeys
 | 
			
		||||
    this.activeKeys = [];
 | 
			
		||||
    for (let categorie in this.categories) {
 | 
			
		||||
      this.activeKeys.push(...this.categories[categorie].filter(e => e.active));
 | 
			
		||||
    for (let category in this.categories) {
 | 
			
		||||
      this.activeKeys.push(...this.categories[category].filter(e => e.active));
 | 
			
		||||
      this.filters.filters.forEach(filter => {  // disable filters of fields not displayed
 | 
			
		||||
        if (!this.isActiveKey[filter.field]) {
 | 
			
		||||
          filter.active = false;
 | 
			
		||||
@@ -406,8 +406,8 @@ export class SamplesComponent implements OnInit {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  calcFieldSelectKeys() {
 | 
			
		||||
    for (let categorie in this.categories) {
 | 
			
		||||
      this.categories[categorie].forEach(key => {
 | 
			
		||||
    for (let category in this.categories) {
 | 
			
		||||
      this.categories[category].forEach(key => {
 | 
			
		||||
        this.isActiveKey[key.id] = key.active;
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user