Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1954 - Request an Offering Change - Submit/View UI (Part 1) #2105

Merged
merged 10 commits into from
Jul 13, 2023

Conversation

andrewsignori-aot
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot commented Jul 11, 2023

  • Added a new endpoint to submit the request.
  • Added new endpoint to get the request details submitted: @Get(":applicationOfferingChangeRequestId")
  • Reused methods to load programs and offerings from PIR.
  • Created a component to display an offering summary to be used for the student offering change and with the potential to be used for scholastic standings and COE approvals.
  • Created a component to submit the requested change and visualize it.
    • Method getEligibleApplications was reused to also retrieve the "change request"/"application details" to allow the submission. In this way, the same query constraints are used to load the summary list and also to get more details for the same item that will be submitted. New endpoint added as @Get("available/application/:applicationId").

Request a new offering change from the available applications.

image

Required validations

image

Submitted application in read-only mode

image

Approved application with StudentAid BC notes

image

Fixes and UI refactors

  • Fixed query for available applications that was showing the application available to report a change when there was one already in progress and also completed.
  • Removed extra space from detail-header after the label. Instead of showing label : value it will now show label: value.
  • Replace the "vertical divider" in detail-header with a pipe ("|") as per Figma.
  • Fixed the body-header #status-chip that was being displayed in the second line.
    image

How the changed query looks like with the change.

SELECT
        "application"."id" AS "application_id",
        "application"."application_number" AS "application_application_number",
        "programYear"."id" AS "programYear_id",
        "currentAssessment"."id" AS "currentAssessment_id",
        "offering"."id" AS "offering_id",
        "offering"."study_start_date" AS "offering_study_start_date",
        "offering"."study_end_date" AS "offering_study_end_date",
        "offering"."offering_intensity" AS "offering_offering_intensity",
        "educationProgram"."id" AS "educationProgram_id",
        "student"."id" AS "student_id",
        "user"."first_name" AS "user_first_name",
        "user"."last_name" AS "user_last_name",
        "user"."id" AS "user_id"
FROM
        "sims"."applications" "application"
        INNER JOIN "sims"."program_years" "programYear" ON "programYear"."id" = "application"."program_year_id"
        INNER JOIN "sims"."student_assessments" "currentAssessment" ON "currentAssessment"."id" = "application"."current_assessment_id"
        INNER JOIN "sims"."education_programs_offerings" "offering" ON "offering"."id" = "currentAssessment"."offering_id"
        INNER JOIN "sims"."education_programs" "educationProgram" ON "educationProgram"."id" = "offering"."program_id"
        LEFT JOIN "sims"."application_offering_change_requests" "applicationOfferingChangeRequest" ON "applicationOfferingChangeRequest"."application_id" = "application"."id"
        AND (
                "applicationOfferingChangeRequest"."application_offering_change_request_status" IN ($ 1, $ 2)
        )
        INNER JOIN "sims"."students" "student" ON "student"."id" = "application"."student_id"
        INNER JOIN "sims"."users" "user" ON "user"."id" = "student"."user_id"
WHERE
        "applicationOfferingChangeRequest"."id" IS NULL
        AND "application"."location_id" = $ 3
        AND "application"."application_status" = $ 4
        AND "application"."is_archived" = false
ORDER BY
        "application_application_number" ASC
LIMIT
        10 -- PARAMETERS: ["In progress with SABC","In progress with student",12,"Completed"]

TODO

  • Centralize and apply similar validations from PIR.
  • Change tabs to allow routing navigation to allow the redirect to the "in progress" tab as per the AC.
  • E2E tests.

@andrewsignori-aot andrewsignori-aot added Institution Institution Features Web Portal SIMS-Api SIMS-Api labels Jul 11, 2023
@andrewsignori-aot andrewsignori-aot self-assigned this Jul 11, 2023
@Param("locationId", ParseIntPipe) locationId: number,
@Body() payload: CreateApplicationOfferingChangeRequestAPIInDTO,
): Promise<PrimaryIdentifierAPIOutDTO> {
// TODO: Apply the same validations from PIR.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -185,7 +185,7 @@ export class EducationProgramOfferingAESTController extends BaseController {
): Promise<EducationProgramOfferingAPIOutDTO> {
const offering = await this.programOfferingService.getOfferingById(
offeringId,
true,
{ isPrecedingOffering: true },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments

Copy link
Contributor

@ann-aot ann-aot Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just 2 more point when I was running the branch in local, I found below things,
1.
image
, is the search box expected this way, I remember u saying it in our dev call.
2. In progress and completed tabs, the end date is missing, in the study dates
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About number 1, I can create a common style to be applied to the search inputs in general and have a max-width associated with it. Thoughts? I will check to have it done maybe in an upcoming PR.

For item 2 I found an issue where the payload has an id property present it will replace the value. The fix was applied in the two tabs.

image

image

Copy link
Contributor

@ann-aot ann-aot Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iam good with it @andrewsignori-aot or else, as discussed we can create a small story for the style change

.leftJoin(
"application.applicationOfferingChangeRequest",
"applicationOfferingChangeRequest",
"applicationOfferingChangeRequest.applicationOfferingChangeRequestStatus IN (:...status)",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the point we discussed. 👍

*/
async getOfferingById(
offeringId: number,
options?: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please remove optional for options?. As the one reference that is using it use options.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is expected that the method will be consumed and also not provide the location id.
Please let me know if it would be considered a blocker.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO its not a blocker, I saw there was only one reference so suggested the change.

@@ -14,7 +14,7 @@ import { User } from "./user.model";
import { Note } from "./note.model";
import { ApplicationOfferingChangeRequestStatus } from "./application-offering-change-request-status.type";

const REASON_MAX_LENGTH = 500;
export const REASON_MAX_LENGTH = 500;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dheepak-aot
Copy link
Collaborator

Great work. Please have a look at the comments.

Copy link
Collaborator

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with a round of review, nice work @andrewsignori-aot

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing the changes 👍 Good work with the component and the submit

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 17.85% ( 2129 / 11927 )
Methods: 8.3% ( 126 / 1518 )
Lines: 20.64% ( 1865 / 9038 )
Branches: 10.07% ( 138 / 1371 )

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 71% ( 399 / 562 )
Methods: 61.97% ( 44 / 71 )
Lines: 72.97% ( 351 / 481 )
Branches: 40% ( 4 / 10 )

@github-actions
Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 49.81% ( 267 / 536 )
Methods: 41.56% ( 32 / 77 )
Lines: 55.33% ( 218 / 394 )
Branches: 26.15% ( 17 / 65 )

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 49.89% ( 3549 / 7113 )
Methods: 45.23% ( 417 / 922 )
Lines: 55.09% ( 2922 / 5304 )
Branches: 23.68% ( 210 / 887 )

Copy link
Collaborator

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,nice work @andrewsignori-aot

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes. 👍

Copy link
Collaborator

@sh16011993 sh16011993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. LGTM 👍 @andrewsignori-aot

@andrewsignori-aot andrewsignori-aot merged commit 8192320 into main Jul 13, 2023
@andrewsignori-aot andrewsignori-aot deleted the feature/#1954-offering-change-submit-ui branch July 13, 2023 18:22
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV July 13, 2023 18:32 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV July 13, 2023 18:33 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV July 13, 2023 18:33 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV July 13, 2023 18:33 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV July 13, 2023 18:33 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV July 13, 2023 18:35 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV July 13, 2023 18:35 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Institution Institution Features SIMS-Api SIMS-Api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants