<commit_before>import {Component, OnInit, ViewChild} from '@angular/core';
import {Energiecontract} from './energiecontract';
import {LoadingIndicatorService} from '../loading-indicator/loading-indicator.service';
import {ErrorHandingService} from '../error-handling/error-handing.service';
import {EnergiecontractService} from './energiecontract.service';
import * as _ from 'lodash';
import {FormControl, FormGroup, Validators} from '@angular/forms';
import * as moment from 'moment';
import {Moment} from 'moment';
import {DatePickerDirective, IDatePickerConfig} from 'ng2-date-picker';
import {DecimalPipe} from '@angular/common';
import {isNullOrUndefined} from 'util';
import {NgbModal} from '@ng-bootstrap/ng-bootstrap';

const datePickerFormat = 'dddd DD-MM-YYYY';
const pricePattern = /^\d(,\d{1,6})*$/;

@Component({
  selector: 'home-energiecontract',
  templateUrl: './energiecontract.component.html',
  styleUrls: ['./energiecontract.component.scss']
})
export class EnergiecontractComponent implements OnInit {

  public energiecontracten: Energiecontract[];

  public form: FormGroup;

  public selectedDate: Moment;
  public datePickerConfiguration: IDatePickerConfig;
  public datePickerModel: String;

  public editMode = false;
  public selectedEnergiecontract: Energiecontract;

  constructor(private energiecontractService: EnergiecontractService,
              private loadingIndicatorService: LoadingIndicatorService,
              private errorHandlingService: ErrorHandingService,
              private decimalPipe: DecimalPipe,
              private modalService: NgbModal) {
  }

  @ViewChild('datePicker') datePicker: DatePickerDirective;

  public ngOnInit(): void {
    this.datePickerConfiguration = {
      format: datePickerFormat,
      max: moment()
    };
    this.createForm();
    setTimeout(() => this.getEnergieContracten());<commit_msg>Allow energycontract start dates in the future<commit_after>import {Component, OnInit, ViewChild} from '@angular/core';
import {Energiecontract} from './energiecontract';
import {LoadingIndicatorService} from '../loading-indicator/loading-indicator.service';
import {ErrorHandingService} from '../error-handling/error-handing.service';
import {EnergiecontractService} from './energiecontract.service';
import * as _ from 'lodash';
import {FormControl, FormGroup, Validators} from '@angular/forms';
import * as moment from 'moment';
import {Moment} from 'moment';
import {DatePickerDirective, IDatePickerConfig} from 'ng2-date-picker';
import {DecimalPipe} from '@angular/common';
import {isNullOrUndefined} from 'util';
import {NgbModal} from '@ng-bootstrap/ng-bootstrap';

const datePickerFormat = 'dddd DD-MM-YYYY';
const pricePattern = /^\d(,\d{1,6})*$/;

@Component({
  selector: 'home-energiecontract',
  templateUrl: './energiecontract.component.html',
  styleUrls: ['./energiecontract.component.scss']
})
export class EnergiecontractComponent implements OnInit {

  public energiecontracten: Energiecontract[];

  public form: FormGroup;

  public selectedDate: Moment;
  public datePickerConfiguration: IDatePickerConfig;
  public datePickerModel: String;

  public editMode = false;
  public selectedEnergiecontract: Energiecontract;

  constructor(private energiecontractService: EnergiecontractService,
              private loadingIndicatorService: LoadingIndicatorService,
              private errorHandlingService: ErrorHandingService,
              private decimalPipe: DecimalPipe,
              private modalService: NgbModal) {
  }

  @ViewChild('datePicker') datePicker: DatePickerDirective;

  public ngOnInit(): void {
    this.datePickerConfiguration = {
      format: datePickerFormat,
    };
    this.createForm();
    setTimeout(() => this.getEnergieContracten());
{'fraction_non_alphanumeric': 0.11335280063711176, 'fraction_numerical': 0.0015927794000530925, 'mean_word_length': 5.146818923327896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1794829', 'n_tokens_mistral': 1062, 'n_tokens_neox': 1057, 'n_words': 257}