From 6833ff9c1fcfa42ee0cff3ab41164da9cff41b6c Mon Sep 17 00:00:00 2001
From: "jvanboxtel@wisc.edu" <jvanboxtel@wisc.edu>
Date: Fri, 29 Mar 2019 12:50:40 -0500
Subject: [PATCH] ROENROLL-1476 search term label safari

---
 .../course-search.component.html              |  3 +-
 .../degree-planner/services/api.service.ts    | 29 +++++++++++++++----
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/src/app/degree-planner/course-search/course-search.component.html b/src/app/degree-planner/course-search/course-search.component.html
index e40f73c..f13a69b 100644
--- a/src/app/degree-planner/course-search/course-search.component.html
+++ b/src/app/degree-planner/course-search/course-search.component.html
@@ -6,7 +6,8 @@
   fxLayoutAlign="space-around none"
   style="padding: 12px 22px;">
   <mat-form-field>
-    <mat-select placeholder="Term" aria-label="Term" formControlName="term">
+    <mat-label>Term</mat-label>
+    <mat-select placeholder="Term" aria-label="Term" [disableOptionCentering]="true" formControlName="term">
       <mat-option value="0000">All</mat-option>
       <mat-option
         *ngFor="let termCode of (activeTerms$ | async)"
diff --git a/src/app/degree-planner/services/api.service.ts b/src/app/degree-planner/services/api.service.ts
index 234251e..913e383 100644
--- a/src/app/degree-planner/services/api.service.ts
+++ b/src/app/degree-planner/services/api.service.ts
@@ -24,6 +24,16 @@ const HTTP_OPTIONS = {
   }),
 };
 
+// const HTTP_OPTIONS = {
+//   headers: new HttpHeaders({
+//     'Content-Type': 'application/json',
+//     'X-API-Key': '',
+//     uid: '',
+//     wisceduisisemplid: '',
+//     wiscedupvi: '',
+//   }),
+// };
+
 @Injectable({ providedIn: 'root' })
 export class DegreePlannerApiService {
   constructor(private http: HttpClient) {}
@@ -31,6 +41,7 @@ export class DegreePlannerApiService {
   public getSavedForLaterCourses(): Observable<SavedForLaterCourseBase[]> {
     return this.http.get<SavedForLaterCourseBase[]>(
       `${environment.apiPlannerUrl}/favorites`,
+      HTTP_OPTIONS,
     );
   }
 
@@ -46,29 +57,36 @@ export class DegreePlannerApiService {
   }
 
   public getAllDegreePlans(): Observable<DegreePlan[]> {
-    return this.http.get<DegreePlan[]>(this.degreePlanEndpoint());
+    return this.http.get<DegreePlan[]>(this.degreePlanEndpoint(), HTTP_OPTIONS);
   }
 
   public getPlan(roadmapId: number): Observable<DegreePlan> {
-    return this.http.get<DegreePlan>(this.degreePlanEndpoint(roadmapId));
+    return this.http.get<DegreePlan>(
+      this.degreePlanEndpoint(roadmapId),
+      HTTP_OPTIONS,
+    );
   }
 
   public getAllSubjects(): Observable<SubjectMapping> {
     return this.http.get<SubjectMapping>(
       this.searchEndpoint('subjectsMap/0000'),
+      HTTP_OPTIONS,
     );
   }
 
   public getAllSubjectDescriptions(): Observable<{}> {
-    return this.http.get(this.searchEndpoint('subjects'));
+    return this.http.get(this.searchEndpoint('subjects'), HTTP_OPTIONS);
   }
 
   public getActiveTerms(): Observable<Term[]> {
-    return this.http.get<Term[]>(this.searchEndpoint('terms'));
+    return this.http.get<Term[]>(this.searchEndpoint('terms'), HTTP_OPTIONS);
   }
 
   public getAllNotes(roadmapId: number): Observable<Note[]> {
-    return this.http.get<Note[]>(this.degreePlanEndpoint(roadmapId, 'notes'));
+    return this.http.get<Note[]>(
+      this.degreePlanEndpoint(roadmapId, 'notes'),
+      HTTP_OPTIONS,
+    );
   }
 
   getCourseDetails(
@@ -86,6 +104,7 @@ export class DegreePlannerApiService {
   ): Observable<{ termCode: string; courses: CourseBase[] }[]> {
     return this.http.get<{ termCode: string; courses: CourseBase[] }[]>(
       this.degreePlanEndpoint(roadmapId, 'termcourses'),
+      HTTP_OPTIONS,
     );
   }
 
-- 
GitLab