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

[CPDNQT-2152] Resend outcome to api #1822

Merged
merged 9 commits into from
Oct 21, 2024
Merged

[CPDNQT-2152] Resend outcome to api #1822

merged 9 commits into from
Oct 21, 2024

Conversation

jebw
Copy link
Contributor

@jebw jebw commented Oct 16, 2024

Context

Ticket: CPDNPQ-2152

We want to allow admin users to reschedule delivery of outcomes to the qualified teachers API

Changes proposed in this pull request

  • Added logic for whether to allow rescheduling to the ParticipantOutcome model
  • Added a method to nil out the relevant ParticipantOutcome attributes, which will trigger rescheduling
  • Extended the ParticipantOutcomes component table to add a resend link
  • Shortened some of the other columns in ParticipantOutcomes table to make space for the Resend link
  • Added feature specs covering the above
  • Refactored the existing method to determine whether an Outcome is the most recent to work with relationships instead of doing a query directly, this allows it to benefit from eager loaded data. The number of outcomes per declaration should be low so this shouldn't result in significant data being loaded for the applications#show screen.
  • Extended the OutcomesTableComponent to include caption_text described the latest outcome
  • Swapped the OutcomesTableComponent to store strings in translations yaml file

Screenshots

image

@jebw jebw requested a review from a team as a code owner October 16, 2024 16:48
config/routes.rb Outdated
@@ -234,6 +234,10 @@
resources :courses, only: %i[index show]
resources :users, only: %i[index show]

resources :participant_outcomes, only: %i[] do
member { get :resend }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cwrw I've followed ECF and made this a GET but it feels like this should be a POST since its modifying data? Thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yea POST sounds better tbh 👍

Copy link
Collaborator

@cwrw cwrw left a comment

Choose a reason for hiding this comment

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

looks good just some minor comments

Base automatically changed from 2140-application-outcomes to main October 18, 2024 09:29
Copy link

@jebw jebw force-pushed the 2144-resend-outcome-to-api branch from e9d3838 to 1ab9805 Compare October 18, 2024 14:49
@jebw jebw changed the title [CPDNQT-2144] Resend outcome to api [CPDNQT-2152] Resend outcome to api Oct 18, 2024
Copy link

sonarcloud bot commented Oct 18, 2024

@jebw jebw requested a review from cwrw October 18, 2024 15:44
Copy link
Collaborator

@cwrw cwrw left a comment

Choose a reason for hiding this comment

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

🙌

@jebw jebw added this pull request to the merge queue Oct 21, 2024
Merged via the queue into main with commit 5ae5745 Oct 21, 2024
18 checks passed
@jebw jebw deleted the 2144-resend-outcome-to-api branch October 21, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants