-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #729 from bitzesty/main
Staging < main
- Loading branch information
Showing
39 changed files
with
1,316 additions
and
248 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,5 +54,5 @@ $todo-black: #333; | |
} | ||
|
||
.govuk-notification-banner__heading { | ||
max-width: 700px | ||
max-width: 100% | ||
} |
20 changes: 9 additions & 11 deletions
20
app/controllers/admin/assessor_assignment_collections_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
23 changes: 23 additions & 0 deletions
23
app/controllers/admin/eligibility_assignment_collections_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,23 @@ | ||
class Admin::EligibilityAssignmentCollectionsController < Admin::BaseController | ||
def create | ||
@form = EligibilityAssignmentCollection.new(create_params) | ||
authorize @form, :create? | ||
|
||
@form.subject = current_subject | ||
|
||
if @form.save | ||
redirect_to admin_form_answers_path(year: params[:year], search_id: params[:search_id]), notice: @form.notice_message | ||
else | ||
# Ensure form_answer_ids is an array | ||
@form.form_answer_ids = @form.form_answer_ids.split(",") if @form.form_answer_ids.is_a?(String) | ||
render "admin/form_answers/bulk_assign_eligibility" | ||
end | ||
end | ||
|
||
private | ||
|
||
def create_params | ||
params.require(:eligibility_assignment_collection) | ||
.permit(:form_answer_ids, :state) | ||
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
26 changes: 11 additions & 15 deletions
26
app/controllers/admin/lieutenant_assignment_collections_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 |
---|---|---|
@@ -1,27 +1,23 @@ | ||
class Admin::LieutenantAssignmentCollectionsController < Admin::BaseController | ||
def create | ||
@lieutenant_assignment_collection = LieutenantAssignmentCollection.new(create_params) | ||
authorize @lieutenant_assignment_collection, :create? | ||
@form = LieutenantAssignmentCollection.new(create_params) | ||
authorize @form, :create? | ||
|
||
@lieutenant_assignment_collection.subject = current_subject | ||
@form.subject = current_subject | ||
|
||
@lieutenant_assignment_collection.save | ||
|
||
respond_to do |format| | ||
format.html do | ||
flash[:notice] = @lieutenant_assignment_collection.notice_message | ||
flash[:error] = @lieutenant_assignment_collection.errors.full_messages.to_sentence | ||
redirect_back(fallback_location: root_path) | ||
end | ||
if @form.save | ||
redirect_to admin_form_answers_path(year: params[:year], search_id: params[:search_id]), notice: @form.notice_message | ||
else | ||
# Ensure form_answer_ids is an array | ||
@form.form_answer_ids = @form.form_answer_ids.split(",") if @form.form_answer_ids.is_a?(String) | ||
render "admin/form_answers/bulk_assign_lieutenants" | ||
end | ||
end | ||
|
||
private | ||
|
||
def create_params | ||
params | ||
.require(:lieutenant_assignment_collection) | ||
.permit(:form_answer_ids, | ||
:ceremonial_county_id) | ||
params.require(:lieutenant_assignment_collection) | ||
.permit(:form_answer_ids, :ceremonial_county_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
Oops, something went wrong.