cherry picking for lodash
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
button {
|
||||
rb-icon-button {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import {Component, ElementRef, isDevMode, OnInit, ViewChild} from '@angular/core';
|
||||
import {ApiService} from '../services/api.service';
|
||||
import {AutocompleteService} from '../services/autocomplete.service';
|
||||
import _ from 'lodash';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import pick from 'lodash/pick';
|
||||
import {SampleModel} from '../models/sample.model';
|
||||
|
||||
|
||||
@ -24,7 +25,6 @@ interface KeyInterface {
|
||||
})
|
||||
|
||||
|
||||
// TODO: check if custom-header.conf works, add headers from helmet https://docs.cloudfoundry.org/buildpacks/staticfile/index.html
|
||||
|
||||
export class SamplesComponent implements OnInit {
|
||||
|
||||
@ -214,7 +214,7 @@ export class SamplesComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
query.push(..._.cloneDeep(this.filters.filters)
|
||||
query.push(...cloneDeep(this.filters.filters)
|
||||
.map(e => {
|
||||
e.values = e.values.filter(el => el !== ''); // do not include empty values
|
||||
if (e.field === 'added') { // correct timezone
|
||||
@ -223,7 +223,7 @@ export class SamplesComponent implements OnInit {
|
||||
return e;
|
||||
})
|
||||
.filter(e => e.active && e.values.length > 0)
|
||||
.map(e => 'filters[]=' + encodeURIComponent(JSON.stringify(_.pick(e, ['mode', 'field', 'values']))))
|
||||
.map(e => 'filters[]=' + encodeURIComponent(JSON.stringify(pick(e, ['mode', 'field', 'values']))))
|
||||
);
|
||||
if (!options.export) {
|
||||
additionalTableKeys.forEach(key => {
|
||||
@ -269,7 +269,7 @@ export class SamplesComponent implements OnInit {
|
||||
.map(el => decodeURIComponent(el)));
|
||||
this.activeTemplateKeys.measurements = this.keys.filter(e => e.id.indexOf('measurements.') >= 0 && e.active)
|
||||
.map(e => e.id.split('.')
|
||||
.map(el => decodeURIComponent(el))); // TODO: glass fiber filter not working
|
||||
.map(el => decodeURIComponent(el)));
|
||||
}
|
||||
|
||||
calcFieldSelectKeys() {
|
||||
|
Reference in New Issue
Block a user