From 9eb1aed3e9314f8c0e6393396cd41037e7d190d8 Mon Sep 17 00:00:00 2001 From: "jvanboxtel@wisc.edu" <jvanboxtel@wisc.edu> Date: Wed, 19 Jun 2019 13:19:36 -0500 Subject: [PATCH] ROENROLL-1818 stepper data load fix --- .../new-audit-options/new-audit-options.component.html | 8 ++++---- .../dars/new-audit-options/new-audit-options.component.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/dars/new-audit-options/new-audit-options.component.html b/src/app/dars/new-audit-options/new-audit-options.component.html index 4b9dcd7..9eaf3cf 100644 --- a/src/app/dars/new-audit-options/new-audit-options.component.html +++ b/src/app/dars/new-audit-options/new-audit-options.component.html @@ -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> diff --git a/src/app/dars/new-audit-options/new-audit-options.component.ts b/src/app/dars/new-audit-options/new-audit-options.component.ts index f6cad8d..6b88eac 100644 --- a/src/app/dars/new-audit-options/new-audit-options.component.ts +++ b/src/app/dars/new-audit-options/new-audit-options.component.ts @@ -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], ), -- GitLab