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

Sj view ssr calendar bug #77

Merged
merged 2 commits into from
Feb 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion app/controllers/service_calendars_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ def table
@tab = params[:tab]
@review = params[:review] == 'true'
@portal = params[:portal] == 'true'
@admin = @portal && @sub_service_request.present?

if params[:admin]
@admin = params[:admin] == 'true'
else
@admin = @portal && @sub_service_request.present?
end

@merged = false
@consolidated = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
%th.col-sm-1.text-center{ rowspan: 2 }
= t(:calendars)[:pppv][:header_fields][:subject_count]
%th.col-sm-5.text-center.visit-group-select{ colspan: 5 }
= render 'service_calendars/master_calendar/pppv/visit_group_page_select', service_request: service_request, sub_service_request: sub_service_request, arm: arm, tab: tab, page: page, pages: pages, review: review, portal: portal
= render 'service_calendars/master_calendar/pppv/visit_group_page_select', service_request: service_request, sub_service_request: sub_service_request, arm: arm, tab: tab, page: page, pages: pages, review: review, portal: portal, admin: admin

- unless portal
%th.col-sm-1.text-center{ rowspan: 2 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
%th.col-sm-1.text-center{ rowspan: 2 }
= t(:calendars)[:pppv][:header_fields][:subject_count]
%th.col-sm-5.text-center.visit-group-select{ colspan: 5 }
= render 'service_calendars/master_calendar/pppv/visit_group_page_select', service_request: service_request, sub_service_request: sub_service_request, arm: arm, tab: tab, page: page, pages: pages, review: review, portal: portal
= render 'service_calendars/master_calendar/pppv/visit_group_page_select', service_request: service_request, sub_service_request: sub_service_request, arm: arm, tab: tab, page: page, pages: pages, review: review, portal: portal, admin: admin
%th.col-sm-1.text-center{ rowspan: 2 }
= t(:calendars)[:pppv][:header_fields][:total_per_patient]
%th.col-sm-1.text-center{ rowspan: 2 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
= render "service_calendars/master_calendar/pppv/#{tab}_header",
service_request: service_request, sub_service_request: sub_service_request,
arm: arm, tab: tab, pages: pages, page: page, review: review,
portal: portal, visit_groups: visit_groups
portal: portal, visit_groups: visit_groups, admin: admin
%tbody
= render "service_calendars/master_calendar/pppv/#{tab}_line_items",
service_request: service_request, sub_service_request: sub_service_request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
- unless portal
%th.col-sm-1.text-center{ rowspan: 2 }
= t(:calendars)[:pppv][:header_fields][:quantity_type]

%th.text-center{ class: portal ? 'col-sm-1' : 'subject-count-header', rowspan: 2 }
= t(:calendars)[:pppv][:header_fields][:subject_count]
%th.select-row-header{ rowspan: 2 }
%th.visit-group-select.col-sm-5.text-center{ colspan: 5 }
= render 'service_calendars/master_calendar/pppv/visit_group_page_select', service_request: service_request, sub_service_request: sub_service_request, arm: arm, tab: tab, page: page, pages: pages, review: review, portal: portal
= render 'service_calendars/master_calendar/pppv/visit_group_page_select', service_request: service_request, sub_service_request: sub_service_request, arm: arm, tab: tab, page: page, pages: pages, review: review, portal: portal, admin: admin

- unless portal
%th.col-sm-1.text-center{ rowspan: 2 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- path_method = method(:table_service_calendars_path)
- url_data = { sub_service_request_id: sub_service_request.try(:id), service_request_id: service_request.try(:id), pages: pages, arm_id: arm.id, tab: tab, portal: portal, format: :js }
- url_data = { sub_service_request_id: sub_service_request.try(:id), service_request_id: service_request.try(:id), pages: pages, arm_id: arm.id, tab: tab, portal: portal, admin: admin, format: :js }

.col-xs-2
.page-change-arrow.btn.btn-info.glyphicon.glyphicon-arrow-left{ title: t(:calendars)[:pppv][:header_fields][:page_select][:previous], type: 'button', disabled: page == 1 ? true : nil, role: 'button', aria: { label: t(:calendars)[:pppv][:header_fields][:page_select][:previous] }, data: { toggle: 'tooltip', animation: 'false', url: path_method.call(url_data.merge(page: page - 1)) } }
Expand Down