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

#2116 - Request an Offering Change - Submit/View UI - Validations #2149

Merged
merged 12 commits into from
Aug 9, 2023

Conversation

ann-aot
Copy link
Contributor

@ann-aot ann-aot commented Jul 31, 2023

  • Added banner for the past end date.
  • Tabs are now router based and the page is redirected to the in-progress tab after successful submission.
  • Centralized PIR validation logic and used in application offering submission.
  • Error code and error msg in student-assessment.service.ts was incorrect and adjusted.
  • getApplicationInfo was retrieving assessment details with respect to student assessment in the application and then it was filtering, it is now taking from the current assessment.
  • sources/packages/web/src/components/generic/Banner.vue removed validator from property type and added type with PropType as there were some vue warnings in the console.

Screenshots
image
image
image
image
image

Next PR

  1. E2E tests

@ann-aot ann-aot marked this pull request as ready for review July 31, 2023 20:46
/**
* Offering does not belong to the location.
*/
export const OFFERING_DOES_NOT_BELONG_TO_LOCATION =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion: on the same context OFFERING_LOCATION_MISMATCH ?

Copy link
Contributor Author

@ann-aot ann-aot Aug 3, 2023

Choose a reason for hiding this comment

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

IMO @dheepak-aot MISMATCH is when there is a direct comparison between two values. So, keeping as it is

selectedOffering: number,
locationId: number,
options?: {
isPir: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

isPIR?

const offering = await this.offeringService.getOfferingLocationId(
selectedOffering,
);
if (offering?.institutionLocation.id !== locationId) {
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 we should check if offering exist before doing this validation? Because if the offeringId is not a valid one offering not found would be more accurate

}

/**
* Set of validations for existing application and newly
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a thought. As this class(ApplicationService) is having more than 1500 lines of code already, should we consider creating a service like ApplicationOfferingService and move this method there?

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 also had similar thought when I was doing this, but this validation is not specific to Application Offering change request, so I thought its better to do it in application.service

@@ -0,0 +1,20 @@
<template>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The file path has request-a-change.vue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @dheepak-aot . Nice catch

Copy link
Collaborator

Choose a reason for hiding this comment

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

Still wondering why request-a-change is repeated in the directory names
image

@@ -72,13 +37,37 @@ export default defineComponent({
},
setup(props) {
const { getLocationName } = useInstitutionState();
const tab = ref(ActiveRequestAChangeTab.AvailableToChangeTab);
const tabItems = ref([
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice to see the tabs implemented as routes 👍

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 and thanks for taking this forward. Please tale a look at the comments. There is one or another that maybe I am missing something and just need some clarification.

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. Minor comments left only.

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 17.87% ( 2141 / 11982 )
Methods: 8.25% ( 126 / 1528 )
Lines: 20.68% ( 1877 / 9077 )
Branches: 10.02% ( 138 / 1377 )

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 8, 2023

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.0% 0.0% Duplication

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, look good 👍

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 72.5% ( 406 / 560 )
Methods: 63.38% ( 45 / 71 )
Lines: 74.53% ( 357 / 479 )
Branches: 40% ( 4 / 10 )

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

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

github-actions bot commented Aug 8, 2023

E2E SIMS API Coverage Report

Totals Coverage
Statements: 52.44% ( 3765 / 7179 )
Methods: 49.14% ( 457 / 930 )
Lines: 57.56% ( 3082 / 5354 )
Branches: 25.25% ( 226 / 895 )

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

@dheepak-aot
Copy link
Collaborator

Thanks for doing the changes, Just one minor comment #2149 (comment)

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.

LGTM 👍Thanks for explaining the comment #2149 (comment)

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.

Thank You for doing the changes. Nice work 👍

@ann-aot ann-aot merged commit 4734765 into main Aug 9, 2023
@ann-aot ann-aot temporarily deployed to DEV August 9, 2023 16:37 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV August 9, 2023 16:38 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV August 9, 2023 16:38 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV August 9, 2023 16:38 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV August 9, 2023 16:38 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV August 9, 2023 16:40 — with GitHub Actions Inactive
@ann-aot ann-aot temporarily deployed to DEV August 9, 2023 16:40 — with GitHub Actions Inactive
@ann-aot ann-aot deleted the feature/sims-#2116 branch August 9, 2023 17:06
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.

5 participants