All files / app/pages/book-gym book-gym.component.ts

100% Statements 9/9
50% Branches 1/2
100% Functions 2/2
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35                          1x 1x     1x     1x       1x   1x 1x   1x     1x    
import {Component} from '@angular/core';
import {FormBuilder, Validators} from '@angular/forms';
import {BreakpointObserver} from '@angular/cdk/layout';
import {StepperOrientation} from '@angular/material/stepper';
import {DateTime} from "luxon";
import {Observable} from 'rxjs';
import {map} from 'rxjs/operators';
 
@Component({
  selector: 'app-book-gym',
  templateUrl: './book-gym.component.html',
  styleUrls: ['./book-gym.component.css']
})
export class BookGymComponent {
  firstFormGroup = this._formBuilder.group({
    firstCtrl: ['', Validators.required],
  });
  secondFormGroup = this._formBuilder.group({
    secondCtrl: ['', Validators.required],
  });
  thirdFormGroup = this._formBuilder.group({
    thirdCtrl: ['', Validators.required],
  });
  stepperOrientation: Observable<StepperOrientation>;
  selected_date: DateTime = DateTime.now();
 
  constructor(private _formBuilder: FormBuilder, breakpointObserver: BreakpointObserver) {
    this.stepperOrientation = breakpointObserver
      .observe('(min-width: 800px)')
      .pipe(map(({matches}) => (matches ? 'horizontal' : 'vertical')));
  }
 
  protected readonly DateTime = DateTime;
}