-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
...packages/web/src/components/institutions/request-a-change/CompletedOfferingChangeSummary.vue
Outdated
Show resolved
Hide resolved
...packages/web/src/components/institutions/request-a-change/CompletedOfferingChangeSummary.vue
Outdated
Show resolved
Hide resolved
...ation-offering-change-request/application-offering-change-request.institutions.controller.ts
Outdated
Show resolved
Hide resolved
...ation-offering-change-request/application-offering-change-request.institutions.controller.ts
Show resolved
Hide resolved
* @param statuses list of status that need to be included in the query. | ||
* @returns list of requested application offering changes. | ||
*/ | ||
async getRequestedSummary( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Ann.
There was a problem hiding this comment.
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.
.../services/application-offering-change-request/application-offering-change-request.service.ts
Outdated
Show resolved
Hide resolved
components: { AvailableToChangeSummary }, | ||
components: { | ||
AvailableToChangeSummary, | ||
InprogressOfferingChangeSummary, |
There was a problem hiding this comment.
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
.
.../services/application-offering-change-request/application-offering-change-request.service.ts
Outdated
Show resolved
Hide resolved
* @param paginationOptions options to execute the pagination. | ||
* @returns list of completed application offering request changes. | ||
*/ | ||
@HasLocationAccess("locationId") |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...ation-offering-change-request/application-offering-change-request.institutions.controller.ts
Outdated
Show resolved
Hide resolved
); | ||
return { | ||
results: offeringChange.results.map((eachOfferingChange) => { | ||
const offering = |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
...ation-offering-change-request/models/application-offering-change-request.institutions.dto.ts
Outdated
Show resolved
Hide resolved
export class InprogressApplicationOfferingChangesAPIOutDTO { | ||
applicationNumber: string; | ||
applicationId: number; | ||
studyStartPeriod: string; |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
...ation-offering-change-request/application-offering-change-request.institutions.controller.ts
Outdated
Show resolved
Hide resolved
...ation-offering-change-request/application-offering-change-request.institutions.controller.ts
Show resolved
Hide resolved
There was a problem hiding this 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.
There was a problem hiding this 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( |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this 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.
There was a problem hiding this 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.
There was a problem hiding this 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: "happening"
There was a problem hiding this 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.
Kudos, SonarCloud Quality Gate passed!
|
in-progress
andcompleted
application offering change query.StatusChipTypes
was moved fromcomponents/
totypes/
.available to report
tab, as there was a change.useApplicationOfferingChange
for the status.Screenshots


Next PR