Skip to content

Commit

Permalink
Convert chargeback assignment tabs to react
Browse files Browse the repository at this point in the history
  • Loading branch information
GilbertCherrie committed Jan 18, 2024
1 parent 782516c commit fa176b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/controllers/chargeback_assignment_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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] = []
Expand Down

0 comments on commit fa176b0

Please sign in to comment.