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

[WIP] Convert chargeback assignment tabs to react #9043

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions app/controllers/chargeback_assignment_controller.rb
Original file line number Diff line number Diff line change
@@ -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] = []