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

Other methods in ServiceCalendarsController needed @service_request initialized. [#136963065] #855

Merged
merged 3 commits into from
Jan 4, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/controllers/service_calendars_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def update
end

def table
initialize_service_request
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I added the procs to the before filters was that this was causing an issue before with authorization errors in the Dashboard. Instead, you can assign @service_request in the before_filter "authorize_dashboard_access", or more specifically I think, "authorize_protocol"

@tab = params[:tab]
@review = params[:review] == 'true'
@portal = params[:portal] == 'true'
Expand All @@ -89,6 +90,7 @@ def table
end

def merged_calendar
initialize_service_request
@tab = params[:tab]
@review = params[:review] == 'true'
@portal = params[:portal] == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
.schedule-tabs{ role: 'tabpanel' }
%ul.nav.nav-tabs.nav-justified{ role: 'tablist' }
%li.other_tab.custom-tab.ss_tab{ role: 'presentation', class: cookies['admin-ss-tab'] ? (cookies['admin-ss-tab'] == 'template_tab' ? 'active' : '') : 'active' }
= link_to t(:calendars)[:tabs][:template], '#template-calendar', id: 'template_tab', data: { toggle: 'tab', url: table_service_calendars_path(sub_service_request_id: sub_service_request.id, tab: 'template', review: false, portal: true) }, role: 'tab', 'aria-controls' => 'template-calendar', target: '#template-calendar'
= link_to t(:calendars)[:tabs][:template], '#template-calendar', id: 'template_tab', data: { toggle: 'tab', url: table_service_calendars_path(service_request_id: service_request.id, sub_service_request_id: sub_service_request.id, tab: 'template', review: false, portal: true) }, role: 'tab', 'aria-controls' => 'template-calendar', target: '#template-calendar'
%li.other_tab.custom-tab.ss_tab{ role: 'presentation', class: cookies['admin-ss-tab'] == 'billing_strategy_tab' ? 'active' : '' }
= link_to t(:calendars)[:tabs][:billing], '#billing-strategy-calendar', id: 'billing_strategy_tab', data: { toggle: 'tab', url: table_service_calendars_path(sub_service_request_id: sub_service_request.id, tab: 'billing_strategy', review: false, portal: true) }, role: 'tab', 'aria-controls' => 'billing-strategy-calendar', target: '#billing-strategy-calendar'
= link_to t(:calendars)[:tabs][:billing], '#billing-strategy-calendar', id: 'billing_strategy_tab', data: { toggle: 'tab', url: table_service_calendars_path(service_request_id: service_request.id, sub_service_request_id: sub_service_request.id, tab: 'billing_strategy', review: false, portal: true) }, role: 'tab', 'aria-controls' => 'billing-strategy-calendar', target: '#billing-strategy-calendar'
%li.pricing_tab.custom-tab.ss_tab{ role: 'presentation', class: cookies['admin-ss-tab'] == 'calendar_tab' ? 'active' : '' }
= link_to t(:calendars)[:tabs][:pricing], '#consolidated-request-calendar', id: 'calendar_tab', data: { toggle: 'tab', url: merged_calendar_service_calendars_path(sub_service_request_id: sub_service_request.id, tab: 'calendar', review: false, portal: true) }, role: 'tab', 'aria-controls' => 'consolidated-request-calendar', target: '#consolidated-request-calendar'
= link_to t(:calendars)[:tabs][:pricing], '#consolidated-request-calendar', id: 'calendar_tab', data: { toggle: 'tab', url: merged_calendar_service_calendars_path(service_request_id: service_request.id, sub_service_request_id: sub_service_request.id, tab: 'calendar', review: false, portal: true) }, role: 'tab', 'aria-controls' => 'consolidated-request-calendar', target: '#consolidated-request-calendar'
.move-visits
.tab-content
.tab-pane#template-calendar{ role: 'tabpanel', class: cookies['admin-ss-tab'] ? (cookies['admin-ss-tab'] == 'template_tab' ? 'active' : '') : 'active' }
Expand Down