2
Fork 0

Fix a typo

This commit is contained in:
Kai S. K. Engelbart 2021-01-08 13:25:35 +01:00
parent 8fd0ca1bd5
commit 2aad393c0d
2 changed files with 14 additions and 14 deletions

View File

@ -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>

View File

@ -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;
});
}