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

ROENROLL-1476 search term label safari

parent 1a0d9341
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
fxLayoutAlign="space-around none" fxLayoutAlign="space-around none"
style="padding: 12px 22px;"> style="padding: 12px 22px;">
<mat-form-field> <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 value="0000">All</mat-option>
<mat-option <mat-option
*ngFor="let termCode of (activeTerms$ | async)" *ngFor="let termCode of (activeTerms$ | async)"
......
...@@ -24,6 +24,16 @@ const HTTP_OPTIONS = { ...@@ -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' }) @Injectable({ providedIn: 'root' })
export class DegreePlannerApiService { export class DegreePlannerApiService {
constructor(private http: HttpClient) {} constructor(private http: HttpClient) {}
...@@ -31,6 +41,7 @@ export class DegreePlannerApiService { ...@@ -31,6 +41,7 @@ export class DegreePlannerApiService {
public getSavedForLaterCourses(): Observable<SavedForLaterCourseBase[]> { public getSavedForLaterCourses(): Observable<SavedForLaterCourseBase[]> {
return this.http.get<SavedForLaterCourseBase[]>( return this.http.get<SavedForLaterCourseBase[]>(
`${environment.apiPlannerUrl}/favorites`, `${environment.apiPlannerUrl}/favorites`,
HTTP_OPTIONS,
); );
} }
...@@ -46,29 +57,36 @@ export class DegreePlannerApiService { ...@@ -46,29 +57,36 @@ export class DegreePlannerApiService {
} }
public getAllDegreePlans(): Observable<DegreePlan[]> { 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> { 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> { public getAllSubjects(): Observable<SubjectMapping> {
return this.http.get<SubjectMapping>( return this.http.get<SubjectMapping>(
this.searchEndpoint('subjectsMap/0000'), this.searchEndpoint('subjectsMap/0000'),
HTTP_OPTIONS,
); );
} }
public getAllSubjectDescriptions(): Observable<{}> { public getAllSubjectDescriptions(): Observable<{}> {
return this.http.get(this.searchEndpoint('subjects')); return this.http.get(this.searchEndpoint('subjects'), HTTP_OPTIONS);
} }
public getActiveTerms(): Observable<Term[]> { 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[]> { 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( getCourseDetails(
...@@ -86,6 +104,7 @@ export class DegreePlannerApiService { ...@@ -86,6 +104,7 @@ export class DegreePlannerApiService {
): Observable<{ termCode: string; courses: CourseBase[] }[]> { ): Observable<{ termCode: string; courses: CourseBase[] }[]> {
return this.http.get<{ termCode: string; courses: CourseBase[] }[]>( return this.http.get<{ termCode: string; courses: CourseBase[] }[]>(
this.degreePlanEndpoint(roadmapId, 'termcourses'), this.degreePlanEndpoint(roadmapId, 'termcourses'),
HTTP_OPTIONS,
); );
} }
......
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