/**
* @file Project Add Modal
*/
+import { isNullOrUndefined } from 'util';
import { Component, Injector, Input, OnInit } from '@angular/core';
import { AbstractControl, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ProjectService } from 'ProjectService';
import { RestService } from 'RestService';
import { SharedService } from 'SharedService';
-import { isNullOrUndefined } from 'util';
/**
* Creating component
message: 'Done'
};
this.sharedService.cleanForm(this.projectForm);
+ for (const data of this.quotaItems) {
+ if (this.getFormControl(data.value).value > data.maxValue) {
+ this.notifierService.notify('error', this.translateService.instant('PAGE.PROJECT.QUOTALIMIT'));
+ break;
+ }
+ }
if (!this.projectForm.invalid) {
if (userType === 'Add') {
this.createProject();
/** Used to get the AbstractControl of controlName passed @private */
private getFormControl(controlName: string): AbstractControl {
+ // eslint-disable-next-line security/detect-object-injection
return this.projectForm.controls[controlName];
}