aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/model-information/model-information.service.ts
blob: 7c0a96b017637cd44149d0cfada418e698d73a17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import {Injectable} from "@angular/core";
import * as _ from 'lodash';
import {ModelInformationItem} from "./model-information.component";

@Injectable()
export class ModelInformationService {

  filterModelItems(_modelInformationItems: ModelInformationItem[]) {
    return _modelInformationItems.filter(x => x.mandatory || (
      !_.isEmpty(x.values)
      && !_.isNil(x.values[0])
      && x.values[0].toString().trim()!=""
      ));
  }
}