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

#1953 - Request an Offering Change - Part 3 #2037

Merged
merged 6 commits into from
Jun 23, 2023
Merged

Conversation

ann-aot
Copy link
Contributor

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

  • Created In-progress and completed tabs for application offering change
  • A common service is created for in-progress and completed application offering change query.
  • StatusChipTypes was moved from components/ to types/.
  • Tooltip content was updated in the available to report tab, as there was a change.
  • AddeduseApplicationOfferingChange for the status.

Screenshots
image
image

Next PR

  1. E2E tests

@ann-aot ann-aot self-assigned this Jun 20, 2023
* @param statuses list of status that need to be included in the query.
* @returns list of requested application offering changes.
*/
async getRequestedSummary(
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO the method name getRequestedSummary is not reflecting what it does.
getApplicationOfferingChangeRequests or getApplicationOfferingChangeRequestSummary could be better.

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 I see the point about having ApplicationOfferingChange included in the method name but I am not sure if we need it since it is a dedicated service where the service name itself is already pretty explanatory.
That said, I would prefer something like getSummaryByStatus or similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this method is in application-offering-change-request.service.ts file, so, I thought instead of giving a lengthly name, this makes sense. let me know devs' thoughts.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with Ann.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ann-aot getSummaryByStatus suggested by @andrewsignori-aot seems fine to me.

components: { AvailableToChangeSummary },
components: {
AvailableToChangeSummary,
InprogressOfferingChangeSummary,
Copy link
Collaborator

Choose a reason for hiding this comment

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

The component name should be probably InProgressOfferingChangeSummary.

* @param paginationOptions options to execute the pagination.
* @returns list of completed application offering request changes.
*/
@HasLocationAccess("locationId")
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Get("completed")
async getCompletedApplications(
@Param("locationId", ParseIntPipe) locationId: number,
@Query() pagination: OfferingChangePaginationRequestedOptionsAPIInDTO,
Copy link
Collaborator

Choose a reason for hiding this comment

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

);
return {
results: offeringChange.results.map((eachOfferingChange) => {
const offering =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to check, line 140 - 150 is common for both controller methods. If there is some quick way to create a common method(private), we can do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it needed, since DTOs are different for both controller

export class InprogressApplicationOfferingChangesAPIOutDTO {
applicationNumber: string;
applicationId: number;
studyStartPeriod: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

the property name ending with period could be changed to date. studyStartDate ?

same for studyEndPeriod?

/**
* Inprogress application offering change details.
*/
export class InprogressApplicationOfferingChangesAPIOutDTO {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please rename it to InProgressApplicationOfferingChangesAPIOutDTO

@@ -6,7 +6,7 @@
</template>
<script lang="ts">
import { computed, defineComponent } from "vue";
import { StatusChipTypes } from "@/components/generic/StatusChip.models";
import { StatusChipTypes } from "@/types";
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -8,3 +10,28 @@ export class ApplicationOfferingChangeSummaryAPIOutDTO {
studyEndPeriod: string;
fullName: string;
}

/**
* Inprogress application offering change details.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please change it to "In progress" instead "Inprogress".

/**
* Extended pagination option for the inprogress and completed application offering change.
*/
export class OfferingChangePaginationRequestedOptionsAPIInDTO extends PaginationOptionsAPIInDTO {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see that OfferingChangePaginationRequestedOptionsAPIInDTO is shared between both API end points in-progress and completed. But we decided in previous PR to go with individual pagination DTO for an endpoint right?
Let me know if I am missing something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

here the service is same for both endpoints that use extended pagination dto. Do we need to create separated extended pagination DTO, even if the service is the same?

Copy link
Collaborator

Choose a reason for hiding this comment

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

In the previous conversation we were talking about the target endpoint precisely. Going by that, we can create seperate DTOs.
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

As discussed, we can ask other devs opinion and adjust if required in next PR.

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.

I will not have time right now to do a thorough review, but I did not have any blocker comments, hence approving it. Thanks for doing the changes.

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

* @param paginationOptions options to execute the pagination.
* @returns list of inprogress application offering request changes.
*/
async getInprogressApplications(
Copy link
Collaborator

Choose a reason for hiding this comment

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

getInProgressApplcations ?

return {
results: applications.results.map((eachApplication) => {
const offering = eachApplication.currentAssessment?.offering;
const offering = eachApplication.currentAssessment.offering;
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
Collaborator

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

Great work! I left some comments, please take a look.

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.

Great Work 👍 Thank You for making the changes.

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 going the changes 👍

@@ -134,7 +134,10 @@ export default defineComponent({

// Search table.
const searchApplicationOfferingChangeRecords = async () => {
// Fix for the search pagination issue.
// When search is happing in a page other than the first page,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor: "happening"

Copy link
Collaborator

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

Great work! Thanks for doing the changes! Left a comment about a typo.

@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 0 Code Smells

No Coverage information No Coverage information
0.2% 0.2% Duplication

@github-actions
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 17.93% ( 2116 / 11803 )
Methods: 8.23% ( 124 / 1506 )
Lines: 20.72% ( 1854 / 8950 )
Branches: 10.24% ( 138 / 1347 )

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

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 49.57% ( 3479 / 7018 )
Methods: 44.29% ( 403 / 910 )
Lines: 54.85% ( 2873 / 5238 )
Branches: 23.33% ( 203 / 870 )

@ann-aot ann-aot merged commit 0fdbe8f into main Jun 23, 2023
@ann-aot ann-aot temporarily deployed to DEV June 23, 2023 20:15 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 23, 2023 20:17 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 23, 2023 20:17 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 23, 2023 20:17 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 23, 2023 20:17 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 23, 2023 20:18 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV June 23, 2023 20:18 — with GitHub Actions Inactive
@ann-aot ann-aot deleted the feature/sims-1953/part-3 branch June 27, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SIMS-Api SIMS-Api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants