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

order CxResponses and deprecate CSCRM Data Collections #1692

Merged
merged 2 commits into from
Nov 13, 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
171 changes: 0 additions & 171 deletions app/controllers/admin/cscrm_data_collections2_controller.rb

This file was deleted.

161 changes: 0 additions & 161 deletions app/controllers/admin/cscrm_data_collections_controller.rb

This file was deleted.

4 changes: 2 additions & 2 deletions app/controllers/admin/cx_collections_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def create

respond_to do |format|
if @cx_collection.save
Event.log_event(Event.names[:collection_cx_created], @cx_collection.class.to_s, @cx_collection.id, "Collection #{@cx_collection.name} created at #{DateTime.now}", current_user.id)
Event.log_event(Event.names[:cx_collection_created], @cx_collection.class.to_s, @cx_collection.id, "Collection #{@cx_collection.name} created at #{DateTime.now}", current_user.id)
format.html { redirect_to admin_cx_collection_url(@cx_collection), notice: "CX Data Collection was successfully created." }
format.json { render :show, status: :created, location: @cx_collection }
else
Expand Down Expand Up @@ -137,7 +137,7 @@ def update

respond_to do |format|
if @cx_collection.update(cx_collection_params)
Event.log_event(Event.names[:collection_cx_updated], @cx_collection.class.to_s, @cx_collection.id, "Collection #{@cx_collection.name} updated at #{DateTime.now}", current_user.id)
Event.log_event(Event.names[:cx_collection_updated], @cx_collection.class.to_s, @cx_collection.id, "Collection #{@cx_collection.name} updated at #{DateTime.now}", current_user.id)
format.html { redirect_to admin_cx_collection_url(@cx_collection), notice: "CX Data Collection was successfully updated." }
format.json { render :show, status: :ok, location: @cx_collection }
else
Expand Down
1 change: 0 additions & 1 deletion app/controllers/admin/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ def user_params
:performance_manager,
:service_manager,
:registry_manager,
:cscrm_data_collection_manager,
:email,
:first_name,
:last_name,
Expand Down
1 change: 1 addition & 0 deletions app/controllers/api/v1/cx_responses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def index

cx_responses = CxResponse
.where(created_at: start_date.beginning_of_day..end_date.end_of_day)
.order(:id)
.page(page_number)
.per(page_size)

Expand Down
7 changes: 0 additions & 7 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,6 @@ def performance_manager_permissions?
current_user.performance_manager?
end

helper_method :cscrm_manager_permissions?
def cscrm_manager_permissions?
return true if admin_permissions?

current_user.cscrm_data_collection_manager?
end

helper_method :cx_collection_permissions?
def cx_collection_permissions?(cx_collection:)
return false if cx_collection.blank?
Expand Down
Loading