Skip to content
Snippets Groups Projects
Commit 9eb1aed3 authored by jvanboxtel@wisc.edu's avatar jvanboxtel@wisc.edu
Browse files

ROENROLL-1818 stepper data load fix

parent 9158210c
No related branches found
No related tags found
No related merge requests found
......@@ -24,13 +24,13 @@
<mat-vertical-stepper linear #stepper formArrayName="formArray">
<mat-step class="audit-step" formGroupName="0" [stepControl]="formArray?.get([0])">
<ng-template matStepLabel>Choose audit type</ng-template>
<mat-radio-group class="audit-radio-group" formControlName="auditType">
<mat-radio-button [checked]="selectedAuditType === 'degree'" class="audit-radio-button" name="declared-audit-type" id="declared-audit-type" value="declaredMajorAudit" aria-label="Select run a degree audit with declared major">
<mat-radio-group [(ngModel)]="selectedAuditType" class="audit-radio-group" formControlName="auditType">
<mat-radio-button [checked]="selectedAuditType === 'declaredMajorAudit'" class="audit-radio-button" name="declared-audit-type" id="declared-audit-type" value="declaredMajorAudit" aria-label="Select run a degree audit with declared major">
<p>Run a degree audit with declared major <br />
<span class="sub-line">See the progress towards your current program of study.</span></p>
</mat-radio-button>
<mat-radio-button [checked]="selectedAuditType === 'whatif'" class="audit-radio-button" name="what-if-audit-type" id="what-if-audit-type" value="whatIfAudit" aria-label="Select run a what-if degree audit">
<mat-radio-button [checked]="selectedAuditType === 'whatIfAudit'" class="audit-radio-button" name="what-if-audit-type" id="what-if-audit-type" value="whatIfAudit" aria-label="Select run a what-if degree audit">
<p>Run a what-if degree audit <br />
<span class="sub-line">See the progress towards a new program of study and degree plans.</span></p>
</mat-radio-button>
......@@ -44,7 +44,7 @@
<ng-template matStepLabel>Select program of study</ng-template>
<mat-radio-group *ngIf="newAuditForm.value.formArray[0].auditType === 'declaredMajorAudit'" class="audit-radio-group" formControlName="darsDegreeProgram">
<mat-radio-button *ngFor="let program of studentDegreeProgram; let i = index" [value]="i" [checked]="i === 0" class="audit-radio-button" name="darsDegreeProgramCode" id="{{ program.darsDegreeProgramCode }}" aria-label="{{ program.darsDegreeProgramCode }}">
{{ program.darsDegreeProgramCode }}
{{ program.sisAcademicPlanDescription }}
</mat-radio-button>
</mat-radio-group>
......
......@@ -57,7 +57,7 @@ export class NewAuditOptionsComponent implements OnInit {
selectedAuditType: string;
},
) {
this.selectedAuditType = data.selectedAuditType;
this.selectedAuditType = 'declaredMajorAudit';
this.termsToInclude = [
{
name: 'Previous, current, future, and planned terms',
......@@ -111,7 +111,7 @@ export class NewAuditOptionsComponent implements OnInit {
this.fb.group({
honors: new FormControl('Keep current status'),
includeCoursesFrom: new FormControl(
this.selectedAuditType === 'degree'
this.selectedAuditType === 'declaredMajorAudit'
? this.termsToInclude[1]
: this.termsToInclude[0],
),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment