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

ROENROLL-1852 setup requests with real dars api

parent bfd42394
No related branches found
No related tags found
No related merge requests found
{
"/api/dars": {
"target": "https://wb30v3sls6.execute-api.us-east-1.amazonaws.com/dev",
"secure": false,
"changeOrigin": true,
"logLevel": "info",
"pathRewrite": {
"^/api/dars": ""
}
},
"/api": {
"target": "https://j5dg9sv034.execute-api.us-east-1.amazonaws.com/dev",
"target": "https://test.enroll.wisc.edu:8443",
"secure": false,
"changeOrigin": true,
"logLevel": "info"
......
<mat-card id="audit">
<mat-card id="audit" *ngIf="audit">
<header id="audit-header" class="no-horizontal-padding">
<div class="audit-metadata">
<div>
......
import { StartSendingAudit } from './../store/actions';
import { MediaMatcher } from '@angular/cdk/layout';
import { Component, OnInit } from '@angular/core';
import { AuditMetadata } from '../models/audit-metadata';
......@@ -50,7 +51,6 @@ export class DARSViewComponent implements OnInit {
this.whatIfMetadata$ = this.store.select(selectors.whatIfMetadata);
this.visibleAuditStatus$ = this.store.select(selectors.visibleAuditStatus);
// this.audit$ = this.store.select(selectors.visibleAudit);
this.audit$ = this.api.getAudit(3);
this.alerts$ = this.store.select(selectors.alerts);
}
......@@ -62,7 +62,14 @@ export class DARSViewComponent implements OnInit {
this.dialog
.open<any, any, NewDegreeAuditFields>(NewDegreeAuditDialogComponent)
.afterClosed()
.subscribe(event => console.log(event));
.subscribe(event =>
this.store.dispatch(
new StartSendingAudit({
darsInstitutionCode: 'L&S',
darsDegreeProgramCode: 'BA 608',
}),
),
);
}
public openWhatIfAuditDialog() {
......
......@@ -12,7 +12,7 @@ const degreeProgramsResponse: DegreePrograms = require('../../../assets/mock-dat
const HTTP_OPTIONS = {
headers: new HttpHeaders({
'Content-Type': 'applications/json',
'Content-Type': 'application/json',
}),
};
......@@ -66,9 +66,9 @@ export class DarsApiService {
* Get a single audit.
*/
public getAudit(reportId: number): Observable<Audit> {
// const url = `${environment.apiDarsUrl}/reports/${reportId}`;
// return this.http.get<any>(url, HTTP_OPTIONS);
return of(auditResponse);
const url = `${environment.apiDarsUrl}/auditresults?reportId=${reportId}`;
return this.http.get<any>(url, HTTP_OPTIONS);
// return of(auditResponse);
}
/**
......@@ -78,7 +78,7 @@ export class DarsApiService {
darsInstitutionCode: string,
darsDegreeProgramCode: string,
): Observable<AuditMetadata> {
const url = `${environment.apiDarsUrl}/single-audit-requests`;
const url = `${environment.apiDarsUrl}/auditrequest`;
return this.http.post<AuditMetadata>(
url,
{ darsInstitutionCode, darsDegreeProgramCode },
......
......@@ -355,7 +355,8 @@ export class DegreePlannerApiService {
public getStudentInfo() {
const url = `${environment.apiEnrollUrl}/studentInfo`;
return this.http.get<StudentInfo>(url, HTTP_OPTIONS);
// return this.http.get<StudentInfo>(url, HTTP_OPTIONS);
return of({});
}
/**
......
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