Skip to content

Commit

Permalink
#3313 - Content: Ministry: Accounts (#4269)
Browse files Browse the repository at this point in the history
- Revised "Requests accounts" to "Pending account requests"
- Revised "Make a determination....." to "Basic BCeID account requests
that require ministry review."
- Added search input box
- Revised "Name" to "Given name"
- Added "Last name"
- Added "Date of birth"
- Organized order to align with mock up

Screenshot of the updated page

![image](https://github.com/user-attachments/assets/9f3a4255-9ea8-4ea0-9eb9-3dac15660e67)
  • Loading branch information
lewischen-aot authored Jan 21, 2025
1 parent 5db8dc8 commit ce6d4e0
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export class CreateStudentAccountApplicationAPIInDTO {

export class StudentAccountApplicationSummaryAPIOutDTO {
id: number;
fullName: string;
lastName: string;
givenNames: string;
dateOfBirth: string;
submittedDate: Date;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import {
StudentAccountApplicationApprovalAPIInDTO,
StudentAccountApplicationSummaryAPIOutDTO,
} from "./models/student-account-application.dto";
import { getUserFullName } from "../../utilities";
import { CustomNamedError } from "@sims/utilities";
import { IUserToken } from "../../auth/userToken.interface";
import {
Expand Down Expand Up @@ -79,7 +78,9 @@ export class StudentAccountApplicationAESTController extends BaseController {
await this.studentAccountApplicationsService.getPendingStudentAccountApplications();
return accountApplications.map((accountApplication) => ({
id: accountApplication.id,
fullName: getUserFullName(accountApplication.user),
lastName: accountApplication.user.lastName,
givenNames: accountApplication.user.firstName,
dateOfBirth: accountApplication.submittedData.dateOfBirth,
submittedDate: accountApplication.submittedDate,
}));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { User } from "@sims/sims-db";
import { StudentInfo } from "../student/student.service.models";

/**
Expand Down Expand Up @@ -33,3 +34,14 @@ export type StudentAccountApplicationApprovalModel = StudentInfo &
export interface AccountApplicationSubmittedData {
sinConsent: boolean;
}

/**
* Data needed to obtain a list of student account applications
* waiting to be assessed by the Ministry.
*/
export interface StudentAccountApplicationSummary {
id: number;
user: User;
submittedData: { dateOfBirth?: string };
submittedDate: Date;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
AccountApplicationSubmittedData,
StudentAccountApplicationApprovalModel,
StudentAccountApplicationCreateModel,
StudentAccountApplicationSummary,
} from "./student-account-applications.models";
import { StudentService } from "../student/student.service";
import { CustomNamedError } from "@sims/utilities";
Expand Down Expand Up @@ -49,12 +50,13 @@ export class StudentAccountApplicationsService extends RecordDataModelService<St
* @returns list of pending student account applications.
*/
async getPendingStudentAccountApplications(): Promise<
StudentAccountApplication[]
StudentAccountApplicationSummary[]
> {
return this.repo.find({
select: {
id: true,
submittedDate: true,
submittedData: true as unknown,
user: { firstName: true, lastName: true },
},
relations: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export interface CreateStudentAccountApplicationAPIInDTO {

export interface StudentAccountApplicationSummaryAPIOutDTO {
id: number;
fullName: string;
lastName: string;
givenNames: string;
dateOfBirth: string;
submittedDate: Date;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<header-navigator title="Student requests" subTitle="Accounts" />
</template>
<body-header
title="Requested accounts"
subTitle="Make a determination for students requesting to login with a Basic BCeID."
title="Pending account requests"
subTitle="Basic BCeID account requests that require ministry review."
:recordsCount="accountApplications?.length"
>
</body-header>
Expand All @@ -25,7 +25,13 @@
}}</span>
</template>
</Column>
<Column header="Name" field="fullName" bodyClass="w-100"></Column>
<Column header="Given names" field="givenNames"></Column>
<Column header="Last name" field="lastName"></Column>
<Column header="Date of birth" headerClass="text-no-wrap"
><template #body="slotProps">
<span>{{ dateOnlyLongString(slotProps.data.dateOfBirth) }}</span>
</template>
</Column>
<Column header="Action">
<template #body="slotProps">
<v-btn
Expand Down

0 comments on commit ce6d4e0

Please sign in to comment.