Skip to content

Commit

Permalink
Merge pull request #196 from icefoganalytics/test
Browse files Browse the repository at this point in the history
More info surfaced to portal
  • Loading branch information
datajohnson authored Nov 1, 2023
2 parents 465536b + 4c5fb1b commit 5968220
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ export default class StudentApplicationFundingRequestsService {
async getFundingRequests() {
const fundingRequests = await db("fundingRequest")
.where({ applicationId: this.#applicationId })
.innerJoin("requestType", "requestType.id", "fundingRequest.requestTypeId")
.leftJoin("status", "fundingRequest.statusId", "status.id")
.leftJoin("statusReason", "fundingRequest.statusReasonId", "status.id")
.select(
"fundingRequest.*",
"status.description as statusDescription",
"statusReason.description as reasonDescription"
);
)
.orderByRaw("COALESCE(funding_group_id, 4), CASE WHEN request_type_id = 2 THEN 1 ELSE 2 END, request_type_id");

await this.#injectRequestTypes(fundingRequests);
await this.#injectAssessments(fundingRequests);
Expand Down
16 changes: 14 additions & 2 deletions src/api/services/portal/students/student-applications-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,20 @@ export default class StudentApplicationsService {

getApplications() {
return db("application")
.select("id", "studentId", "academicYearId", "updatedAt", "onlineSubmitDate")
.where({ studentId: this.#studentId });
.innerJoin("institutionCampus", "institutionCampus.id", "application.institutionCampusId")
.innerJoin("institution", "institution.id", "institutionCampus.institutionId")
.select(
"application.id",
"studentId",
"academicYearId",
"updatedAt",
"onlineSubmitDate",
"institution.name AS institutionName",
"classesStartDate",
"classesEndDate"
)
.where({ studentId: this.#studentId })
.orderBy("academic_year_id", "desc");
}

async getApplication() {
Expand Down

0 comments on commit 5968220

Please sign in to comment.