Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing validation input hint #1237

Merged
merged 7 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
<app-validation-hint-for-input
type = "requiredField"
[invalid] = "UserFormGroup.get('birthDay').invalid && UserFormGroup.get('birthDay').touched"
></app-validation-hint-for-input>

<label class="step-label">Стать<span class="step-required">*</span></label>
<mat-radio-group formControlName="gender" color="primary">
Expand All @@ -65,10 +61,7 @@
<mat-option value="1" class="dropdown-option"> Відсутня </mat-option>
</mat-select>
</mat-form-field>
<app-validation-hint-for-input
type = "requiredField"
[invalid] = "UserFormGroup.get('socialGroupId').invalid && UserFormGroup.get('socialGroupId').touched"
></app-validation-hint-for-input>


</form>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe('PersonCardComponent', () => {
],
declarations: [
PersonCardComponent,
MockValidationHintForInputComponent,
PhoneTransformPipe
]
})
Expand All @@ -57,18 +56,3 @@ describe('PersonCardComponent', () => {
expect(component).toBeTruthy();
});
});

@Component({
selector: 'app-validation-hint-for-input',
template: ''
})

class MockValidationHintForInputComponent {
@Input() type: string;
@Input() invalid: boolean;
@Input() isEmailCheck: boolean;
@Input() isEmptyCheck: boolean;
@Input() minLength: boolean;
@Input() minCharachters: number;
@Input() forbiddenCharacter: string;
}

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions src/app/shared/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { MapComponent } from './components/map/map.component';
import { ConfirmationModalWindowComponent } from './components/confirmation-modal-window/confirmation-modal-window.component';
import { PlaceholderFormDirective } from './directives/placeholder-styling.directive';
import { ValidationMessageStyling } from './directives/validation-message-styling.directive';
import { ValidationHintForInputComponent } from './components/validation-hint-for-input/validation-hint-for-input.component';
import { NavigationBarComponent } from './components/navigation-bar/navigation-bar.component';
import { WorkshopCheckboxDropdownComponent } from './components/workshop-checkbox-dropdown/workshop-checkbox-dropdown.component';
import { NavigationMobileBarComponent } from './components/navigation-mobile-bar/navigation-mobile-bar.component';
Expand Down Expand Up @@ -93,7 +92,6 @@ import { WorkingHoursFormWrapperComponent } from './components/working-hours-for
ConfirmationModalWindowComponent,
PlaceholderFormDirective,
ValidationMessageStyling,
ValidationHintForInputComponent,
NavigationBarComponent,
WorkshopCheckboxDropdownComponent,
NavigationMobileBarComponent,
Expand Down Expand Up @@ -164,7 +162,6 @@ import { WorkingHoursFormWrapperComponent } from './components/working-hours-for
ConfirmationModalWindowComponent,
PlaceholderFormDirective,
ValidationMessageStyling,
ValidationHintForInputComponent,
NavigationBarComponent,
NavigationMobileBarComponent,
WorkshopCheckboxDropdownComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ describe('AddClassFormComponent', () => {
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [
AddClassFormComponent,
MockValidationHintForInputComponent,
],
providers: [
{ provide: CdkStepper, }
Expand All @@ -54,17 +53,4 @@ describe('AddClassFormComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
});
@Component({
selector: 'app-validation-hint-for-input',
template: ''
})

class MockValidationHintForInputComponent {
@Input() type: string;
@Input() invalid: boolean;
@Input() minLength: boolean;
@Input() minCharachters: number;
@Input() forbiddenCharacter: string;
@Input() isEmptyCheck: boolean;
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ describe('ClassesCheckBoxListComponent', () => {
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [
ClassesCheckBoxListComponent,
MockValidationHintForInputComponent,
]
})
.compileComponents();
Expand All @@ -50,24 +49,4 @@ describe('ClassesCheckBoxListComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});

@Component({
selector: 'app-validation-hint-for-input',
template: ''
})

class MockValidationHintForInputComponent {
@Input() type: string;
@Input() invalid: boolean;
@Input() minLength: boolean;
@Input() minCharachters: number;
@Input() forbiddenCharacter: string;
@Input() isEmptyCheck: boolean;
@Input() direction: Direction;
@Input() department: Department;
@Input() directionFormGroup: FormGroup;
@Input() classFormGroup: FormGroup;
@Input() departmentFormGroup: FormGroup;
@Input() router: Router;
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe('NewClassFormComponent', () => {
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [
NewClassFormComponent,
MockValidationHintForInputComponent,
]
})
.compileComponents();
Expand All @@ -56,26 +55,4 @@ describe('NewClassFormComponent', () => {
it('should create', () => {
expect(Component).toBeTruthy();
});

@Component({
selector: 'app-validation-hint-for-input',
template: ''
})

class MockValidationHintForInputComponent {
@Input() type: string;
@Input() invalid: boolean;
@Input() minLength: boolean;
@Input() minCharachters: number;
@Input() forbiddenCharacter: string;
@Input() isEmptyCheck: boolean;
@Input() direction: Direction;
@Input() department: Department;
@Input() directionFormGroup: FormGroup;
@Input() classFormGroup: FormGroup;
@Input() departmentFormGroup: FormGroup;
@Input() router: Router;
@Input() formIndex: number;
@Input() classAmount;
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe('AddClassFormComponent', () => {
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [
AddDepartmentFormComponent,
MockValidationHintForInputComponent,
],
providers: [
{ provide: CdkStepper, }
Expand All @@ -60,23 +59,3 @@ describe('AddClassFormComponent', () => {
expect(component).toBeTruthy();
});
});
@Component({
selector: 'app-validation-hint-for-input',
template: ''
})

class MockValidationHintForInputComponent {
@Input() type: string;
@Input() invalid: boolean;
@Input() minLength: boolean;
@Input() minCharachters: number;
@Input() forbiddenCharacter: string;
@Input() isEmptyCheck: boolean;
@Input() direction: Direction;
@Input() department: Department;
@Input() directionFormGroup: FormGroup;
@Input() classFormGroup: FormGroup;
@Input() departmentFormGroup: FormGroup;
@Input() _stepper: CdkStepper;
@Input() router: Router;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe('AddClassFormComponent', () => {
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [
AddDirectionFormComponent,
MockValidationHintForInputComponent,
],
providers: [
{ provide: CdkStepper, }
Expand All @@ -60,24 +59,5 @@ describe('AddClassFormComponent', () => {
expect(component).toBeTruthy();
});
});
@Component({
selector: 'app-validation-hint-for-input',
template: ''
})

class MockValidationHintForInputComponent {
@Input() type: string;
@Input() invalid: boolean;
@Input() minLength: boolean;
@Input() minCharachters: number;
@Input() forbiddenCharacter: string;
@Input() isEmptyCheck: boolean;
@Input() direction: Direction;
@Input() department: Department;
@Input() directionFormGroup: FormGroup;
@Input() classFormGroup: FormGroup;
@Input() departmentFormGroup: FormGroup;
@Input() router: Router;
}


Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe('CreateDirectionComponent', () => {
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [
CreateDirectionComponent,
MockValidationHintForInputComponent,
MockAddDepartmentFormComponent,
MockAddDirectionFormComponent,
MockAddClassFormComponent
Expand All @@ -52,21 +51,6 @@ describe('CreateDirectionComponent', () => {
expect(component).toBeTruthy();
});
});
@Component({
selector: 'app-validation-hint-for-input',
template: ''
})

class MockValidationHintForInputComponent {
@Input() type: string;
@Input() invalid: boolean;
@Input() isEmptyCheck: boolean;
@Input() forbiddenCharacter: string;
@Input() directionFormGroup: FormGroup;
@Input() classFormGroup: FormGroup;
@Input() departmentFormGroup: FormGroup;
@Input() router: Router;
}
@Component({
selector: 'app-add-direction-form',
template: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ <h3 class="wrapper-title">ЗАЯВА НА ГУРТОК</h3>
</mat-option>
</mat-select>
</mat-form-field>
<app-validation-hint-for-input type="requiredField"
[invalid]="ChildFormControl.invalid && ChildFormControl.touched">
</app-validation-hint-for-input>
<app-validation-hint
[validationFormControl]="ChildFormControl">
</app-validation-hint>

<div fxLayout="column" fxLayoutAlign="center center">
<a [routerLink]="['/create-child', '']">
Expand Down
Loading