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

JM - (SPARCFulfillment) Study Level Activity Export on Fulfillment Level #613

Merged
merged 1 commit into from
Dec 2, 2019
Merged
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
12 changes: 12 additions & 0 deletions app/views/documents/create.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ $('#doc_modal_errors').empty().append("<div class='alert alert-danger'><%= @erro
##Document is being added to Fulfillment
$("#modal_area").html("<%= escape_javascript(render(partial: 'study_level_activities/fulfillments_table', locals: {line_item: @document.documentable.line_item, header_text: 'Fulfillments List'})) %>")
$("#fulfillments-table").bootstrapTable()

$('.fulfillments-list li').find("[data-field='docs']").closest('li').hide()
$('.fulfillments-list li').find("[data-field='notes']").closest('li').hide()
$('.fulfillments-list li').find("[data-field='export_invoiced']").closest('li').hide()
exclude_from_export('fulfillments-table')

$('#fulfillments-table').on 'load-success.bs.table', () ->
$('input.invoice_toggle').bootstrapToggle()

$('#fulfillments-table').on 'column-switch.bs.table', (e, field, checked) ->
if field == 'invoiced' && checked == true
$('input.invoice_toggle').bootstrapToggle()
<% else %>
##Document is being added to Line Item
$('#study-level-activities-table').bootstrapTable('refresh', {silent: "true"})
Expand Down