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

SAW - New Request Popup Window Bug #2104

Merged
merged 1 commit into from
Dec 12, 2019
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
19 changes: 19 additions & 0 deletions app/assets/javascripts/service_requests.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@ $(document).ready ->
url: '/service_request/save_and_exit'
data: $('.milestone-field input').serialize() + "&srid=#{getSRId()}"

###################
### Add Service ###
###################

$(document).on 'click', '.add-service', ->
$(this).prop('disabled', true)
$this = $(this)
service_id = $(this).data('service-id')

$.ajax
method: 'POST'
dataType: 'script'
url: '/service_request/add_service'
data:
srid: getSRId()
service_id: service_id
complete: ->
$this.prop('disabled', false)

###############
### Catalog ###
###############
Expand Down
3 changes: 2 additions & 1 deletion app/views/catalogs/accordion/_services.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
- else
= service.display_service_name
.col-2.text-right
= link_to icon('fas', 'plus'), add_service_service_request_path(srid: service_request.id, service_id: service.id), method: :post, remote: true, class: 'btn btn-sm btn-sq btn-success add-service', title: t('proper.cart.add_service'), data: { toggle: 'tooltip', disable: true }
%button.btn.btn-sm.btn-sq.btn-success.add-service{ type: 'button', title: t('proper.cart.add_service'), data: { toggle: 'tooltip', service_id: service.id } }
= icon('fas', 'plus')
= cpt_code_text(service)
= eap_id_text(service)
= raw service_pricing_text(service)