Skip to content

Commit

Permalink
[SPDBT-3207] - sex mandatory (#1617)
Browse files Browse the repository at this point in the history
# Description

This PR includes the following proposed change(s):

- SPDBT-3207 - sex mandatory
- Made 'contractedCompanyName' max length same as in Manual Submission
  • Loading branch information
carolcarpenter authored Oct 28, 2024
1 parent 219ec6d commit e37a61f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,13 @@ export interface ManualSubmissionBody {
</div>
<div class="col-xl-3 col-lg-6 col-md-12">
<mat-form-field>
<mat-label>Sex <span class="optional-label">(optional)</span></mat-label>
<mat-label>Sex</mat-label>
<mat-select formControlName="genderCode">
<mat-option *ngFor="let gdr of genderTypes" [value]="gdr.code">
{{ gdr.desc }}
</mat-option>
</mat-select>
<mat-error *ngIf="form.get('genderCode')?.hasError('required')">This is required</mat-error>
</mat-form-field>
</div>
<div class="col-xl-3 col-lg-6 col-md-12">
Expand Down Expand Up @@ -541,7 +542,7 @@ export class ManualSubmissionCommonComponent implements OnInit {
emailAddress: new FormControl('', [FormControlValidators.email]),
phoneNumber: new FormControl('', [Validators.required]),
driversLicense: new FormControl(''),
genderCode: new FormControl(''),
genderCode: new FormControl('', [Validators.required]),
dateOfBirth: new FormControl(null, [Validators.required]),
birthPlace: new FormControl('', [FormControlValidators.required]),
jobTitle: new FormControl('', [FormControlValidators.required]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ import { AppInviteOrgData, CrcFormStepComponent } from '../screening-application
</div>
<div class="col-lg-4 col-md-12 col-sm-12">
<mat-form-field>
<mat-label>Sex <span class="optional-label">(optional)</span></mat-label>
<mat-label>Sex</mat-label>
<mat-select formControlName="genderCode">
<mat-option *ngFor="let gdr of genderTypes" [value]="gdr.code">
{{ gdr.desc }}
</mat-option>
</mat-select>
<mat-error *ngIf="form.get('genderCode')?.hasError('required')">This is required</mat-error>
</mat-form-field>
</div>
</div>
Expand Down Expand Up @@ -97,7 +98,7 @@ export class SaPersonalInformationComponent implements CrcFormStepComponent {
Validators.required,
]),
employeeId: new FormControl(data.employeeId),
genderCode: new FormControl(data.genderCode),
genderCode: new FormControl(data.genderCode, [FormControlValidators.required]),
});
}
get orgData(): AppInviteOrgData | null {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ import { AppInviteOrgData, CrcFormStepComponent } from '../screening-application
<div class="col-xl-6 col-lg-12 col-md-12 col-sm-12">
<mat-form-field>
<mat-label>{{ companyFacilityLabel }}</mat-label>
<input matInput formControlName="contractedCompanyName" />
<input
matInput
formControlName="contractedCompanyName"
[errorStateMatcher]="matcher"
maxlength="100"
/>
<mat-hint>{{ companyFacilityHint }}</mat-hint>
<mat-error *ngIf="form.get('contractedCompanyName')?.hasError('required')"
>This is required</mat-error
Expand Down

0 comments on commit e37a61f

Please sign in to comment.