Update angular irish monitor with the latest changes from develop #32

Closed
k.triantafyllou wants to merge 108 commits from develop into angular-16-irish-monitor
1 changed files with 6 additions and 1 deletions
Showing only changes of commit f5ca757771 - Show all commits

View File

@ -21,7 +21,7 @@ export class RangeFilterComponent {
@Input() yearMax: number = Dates.yearMax;
@Input() mandatoryRange:boolean = false;
public currentYear: number = Dates.currentYear;
public yearValidators = [StringUtils.inValidYearValidator(this.yearMin, this.yearMax)];
public yearValidators;
public formValidators = [StringUtils.fromYearAfterToYearValidator];
public rangeForm: UntypedFormGroup;
public yearRange: YearRange = {
@ -41,6 +41,11 @@ export class RangeFilterComponent {
constructor(private _router: Router, private route: ActivatedRoute, private _fb: UntypedFormBuilder) {}
ngOnInit() {
this.yearValidators = [StringUtils.inValidYearValidator(this.yearMin, this.yearMax)];
this.yearRange = {
from: {control: 'yearFrom', placeholder: this.yearMin.toString()},
to: {control: 'yearTo', placeholder: this.yearMax.toString()}
}
if(this.mandatoryRange) {
this.formValidators.push(StringUtils.rangeRequired(this.mandatoryRange));
}