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

Track history on each controller #2020

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class ApplicationFormsController < BaseController
include HistoryTrackable

before_action only: %i[index apply_filters clear_filters] do
authorize %i[assessor_interface application_form]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentRecommendationAwardController < BaseController
include HistoryTrackable

before_action :ensure_can_award
before_action :load_assessment_and_application_form
before_action :load_important_notes, only: %i[edit update]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentRecommendationDeclineController < BaseController
include HistoryTrackable

before_action :ensure_can_decline
before_action :load_assessment_and_application_form

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentRecommendationReviewController < BaseController
include HistoryTrackable

before_action :ensure_can_review
before_action :load_assessment_and_application_form

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentRecommendationVerifyController < BaseController
include HistoryTrackable

before_action :ensure_can_verify
before_action :load_assessment_and_application_form

Expand Down Expand Up @@ -72,8 +74,8 @@ def update_verify_qualifications
redirect_to [
:qualification_requests,
:assessor_interface,
@application_form,
@assessment,
application_form,
assessment,
:assessment_recommendation_verify,
]
elsif (check_path = history_stack.last_path_if_check)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentSectionsController < BaseController
include HistoryTrackable

before_action { authorize [:assessor_interface, assessment_section] }

def show
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentsController < BaseController
include HistoryTrackable

before_action :load_assessment_and_application_form

before_action only: %i[edit update] do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessorAssignmentsController < BaseController
include HistoryTrackable

before_action { authorize %i[assessor_interface staff_assignment] }

def new
Expand Down
1 change: 0 additions & 1 deletion app/controllers/assessor_interface/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

class AssessorInterface::BaseController < ApplicationController
include AssessorCurrentNamespace
include HistoryTrackable
include StaffAuthenticatable

after_action :verify_authorized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module AssessorInterface
class DocumentsController < BaseController
include ActiveStorage::Streaming
include HistoryTrackable
include StreamedResponseAuthenticatable
include RescueActiveStorageErrors
include UploadHelper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class FurtherInformationRequestsController < BaseController
include HistoryTrackable

before_action only: %i[preview new create] do
authorize %i[assessor_interface further_information_request]
end
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/assessor_interface/notes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class NotesController < BaseController
include HistoryTrackable

before_action { authorize %i[assessor_interface note] }

def new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class ProfessionalStandingRequestsController < BaseController
include HistoryTrackable

before_action :set_variables

before_action do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class QualificationRequestsController < BaseController
include HistoryTrackable

before_action :set_collection_variables, only: %i[index consent_letter]
before_action :set_member_variables, except: %i[index consent_letter]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class ReferenceRequestsController < BaseController
include HistoryTrackable

before_action :set_individual_variables, except: :index

define_history_origin :index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class ReviewerAssignmentsController < BaseController
include HistoryTrackable

before_action { authorize %i[assessor_interface staff_assignment] }

def new
Expand Down
1 change: 1 addition & 0 deletions app/controllers/assessor_interface/uploads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module AssessorInterface
class UploadsController < BaseController
include ActiveStorage::Streaming
include HistoryTrackable
include StreamedResponseAuthenticatable
include RescueActiveStorageErrors
include UploadHelper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class WorkHistoriesController < BaseController
include HistoryTrackable

before_action { authorize [:assessor_interface, work_history] }

def edit
Expand Down
Loading