Skip to content

Conversation

@ann-aot
Copy link
Contributor

@ann-aot ann-aot commented Jun 13, 2023

  • Added "available to change" UI ( used vuetify data table) and API.
  • Used @leftjoin to join the application.applicationOfferingChangeRequest and applicationOfferingChangeRequest as there will always be one in-progress item for an application at a time.
  • For pagination options in the controller, I have reused the same ApplicationStatusPaginationOptionsAPIInDTO used by the active application as it was exactly the same. let me know your thoughts.
  • Added migration to add application-offering-change-assessment-trigger-types and to add application-offering-change-to-assessment for the StudentAssessments table.
  • There was a issue, in the previous v-data table-server during the search. When we search for something on any other page other than the first one, there was an unexpected behavior - resolved

Screenshots
image
image
image
image

Next PRs

  1. In progress and completed tabs
  2. E2E tests

@ann-aot ann-aot self-assigned this Jun 13, 2023
@ann-aot ann-aot added Web Portal SIMS-Api SIMS-Api DB DB migration involved labels Jun 13, 2023
@ann-aot ann-aot changed the title #1953 - Request an Offering Change - PART 1 #1953 - Request an Offering Change - Part 2 Jun 15, 2023
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a comment

Choose a reason for hiding this comment

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

Great work, please take a look at the comments.

@Get(":locationId/active-applications/request-change")
async getEligibleApplicationOfferingChangeRecords(
@Param("locationId", ParseIntPipe) locationId: number,
@Query() pagination: ApplicationStatusPaginationOptionsAPIInDTO,
Copy link
Collaborator

Choose a reason for hiding this comment

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

May be or may not be part of the PR. ApplicationStatusPaginationOptionsAPIInDTO the DTO name and it's extended purpose aren't matching.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense, As mentioned in the description, I have reused the DTO. If devs are fine with the approach, I will rename the dto

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would not mind keeping these DTOs specific for the target endpoint.
@ann-aot just double-checking, the idea would be to reuse the same pagination DTO for multiple endpoints?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the extended pagination dto
image
as its the same @andrewsignori-aot

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as mentioned, created a separate one for the endpoint

})
.andWhere("application.isArchived = false");

if (paginationOptions.searchCriteria) {
Copy link
Collaborator

@dheepak-aot dheepak-aot Jun 19, 2023

Choose a reason for hiding this comment

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

if(paginationOptions.searchCriteria?.trim()) ? If search criteria becomes nothing after trim, we can avoid upfront.

Copy link
Contributor Author

@ann-aot ann-aot Jun 19, 2023

Choose a reason for hiding this comment

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

we have been using trim() inside the query search for all the pagination, that's the reason I was also following the same. let me know the way devs prefer @andrewsignori-aot @guru-aot @andrepestana-aot. open for suggestion

Copy link
Collaborator

@sh16011993 sh16011993 Jun 19, 2023

Choose a reason for hiding this comment

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

I agree with @dheepak-aot. There is no need to append the query with the searchCriteria if it is a bunch of white spaces and line terminator characters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so, we will need a ticket to update all the pagination query

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 @ann-aot 👍

Copy link
Contributor

@andrepestana-aot andrepestana-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 the changes and explanations. Looks good to me!

@@ -0,0 +1,35 @@
import { PaginationOptions } from "../types";
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot Jun 20, 2023

Choose a reason for hiding this comment

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

Please change to import from the index "@/types".
Same for the ApiClient.

@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 2 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.94% ( 2116 / 11792 )
Methods: 8.24% ( 124 / 1504 )
Lines: 20.73% ( 1854 / 8942 )
Branches: 10.25% ( 138 / 1346 )

@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 )

Copy link
Collaborator

@andrewsignori-aot andrewsignori-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, its look good 👍

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 49.71% ( 3475 / 6990 )
Methods: 44.58% ( 403 / 904 )
Lines: 54.97% ( 2869 / 5219 )
Branches: 23.41% ( 203 / 867 )

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 69.4% ( 390 / 562 )
Methods: 59.15% ( 42 / 71 )
Lines: 71.52% ( 344 / 481 )
Branches: 40% ( 4 / 10 )

Copy link
Contributor

@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 @ann-aot

@ann-aot ann-aot merged commit a06dc82 into main Jun 20, 2023
@ann-aot ann-aot temporarily deployed to DEV June 20, 2023 22:42 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 20, 2023 22:47 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 20, 2023 22:47 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 20, 2023 22:47 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 20, 2023 22:47 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 20, 2023 22:52 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 20, 2023 22:52 — with GitHub Actions Inactive
@ann-aot ann-aot deleted the feature/sims-1953/part-2 branch June 20, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DB DB migration involved SIMS-Api SIMS-Api

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants