From fa176b0d4b4a3abfc9591b128498963f1bba1061 Mon Sep 17 00:00:00 2001 From: Gilbert Cherrie Date: Thu, 18 Jan 2024 13:21:49 -0500 Subject: [PATCH] Convert chargeback assignment tabs to react --- app/controllers/chargeback_assignment_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controllers/chargeback_assignment_controller.rb b/app/controllers/chargeback_assignment_controller.rb index 27469448942..546b8eaaf9e 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,6 +26,7 @@ def change_tab clear_flash_msg @tabform = params['uib-tab'] + tab_vars(params['uib-tab']) build_tabs set_form_vars render :action => "index" @@ -82,6 +84,12 @@ def build_tabs @tabs = [["Compute", _("Compute")], ["Storage", _("Storage")]] end + def tab_vars(current_tab) + @path = '/chargeback_assignment/change_tab/' + @current_tab = current_tab.to_s + @check_for_changes = true + end + # Set record vars for save def set_record_vars @edit[:set_assignments] = []