From 1a683db822766213583a5144a6c6ff5abee91aeb Mon Sep 17 00:00:00 2001 From: Gilbert Cherrie Date: Wed, 17 Jan 2024 15:18:20 -0500 Subject: [PATCH] Convert chargeback assignment tabs to react --- app/controllers/chargeback_assignment_controller.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/controllers/chargeback_assignment_controller.rb b/app/controllers/chargeback_assignment_controller.rb index 27469448942a..1cbf8fa7cc17 100644 --- a/app/controllers/chargeback_assignment_controller.rb +++ b/app/controllers/chargeback_assignment_controller.rb @@ -15,6 +15,7 @@ def index assert_privileges("chargeback_assignments") @tabform = ChargebackRate::VALID_CB_RATE_TYPES.include?(params[:tab]) ? params[:tab] : "Compute" + tab_vars(@tabform) session[:changed] = @changed = false build_tabs set_form_vars @@ -25,11 +26,17 @@ def change_tab clear_flash_msg @tabform = params['uib-tab'] + tab_vars(params['uib-tab']) build_tabs set_form_vars render :action => "index" end + def tab_vars(current_tab) + @path = '/chargeback_assignment/change_tab/' + @current_tab = current_tab.to_s + end + # AJAX driven routine to check for changes in ANY field on the form def form_field_changed assert_privileges("chargeback_assignments")