import {Component, Input, OnInit} from '@angular/core';

@Component({
  selector: 'app-pgm-candidate-info',
  templateUrl: './pgm-candidate-info.component.html',
  styleUrls: ['./pgm-candidate-info.component.scss']
})
export class PgmCandidateInfoComponent implements OnInit {


  @Input() fullName: string;
  @Input() jobId: string;
  @Input() experienceLevel: string;

  constructor() { }

  ngOnInit() {

  }
  Initials(cString) {
    if(cString) {
      return cString.replace(/\W*(\w)\w*/g, '$1').toUpperCase()
    }
  }

  getSubstring(text){
    if(text) {
      return text.substring(0, 3);
    }
    else{
      return null;
    }
  }
}
