generated from DFE-Digital/govuk-rails-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CPDNQT-2152] Resend outcome to api (#1822)
* [CPDNPQ-2152] Schedule resending outcomes to QTA QTA = Qualified Teachers API * [CPDNPQ-2152] Controller to resend api requests * [CPDNPQ-2152] Only allow resending latest outcome * [CPDNPQ-2152] Add resend link to outcomes table component * [CPDNPQ-2152] Feature spec for resending to api * [CPDNPQ-2152] Specs to check fields are nilified * [CPDNPQ-2152] Swap 'resend' action to http `POST` * [CPDNPQ-2152] Add caption text into outcomes component * [CPDNPQ-2152] Remove N+1 query Previously used when finding if declaration is latest
- Loading branch information
Showing
10 changed files
with
471 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
app/controllers/npq_separation/admin/participant_outcomes_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class NpqSeparation::Admin::ParticipantOutcomesController < NpqSeparation::AdminController | ||
def resend | ||
if participant_outcome.resend_to_qualified_teachers_api! | ||
flash[:success] = "Rescheduled for delivery to Teacher Services" | ||
else | ||
flash[:error] = "Not suitable for resending to Teacher Services" | ||
end | ||
|
||
redirect_to npq_separation_admin_application_path(participant_outcome.application_id) | ||
end | ||
|
||
private | ||
|
||
def participant_outcome | ||
@participant_outcome ||= ParticipantOutcome.find(params[:id]) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.