mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-30 07:53:45 -04:00
🐛Fix trial request onclick
This commit is contained in:
parent
198806bfc9
commit
9b37c9f18a
2 changed files with 6 additions and 6 deletions
app
|
@ -42,8 +42,8 @@ block content
|
||||||
td= trialRequest.get('properties').heardAbout
|
td= trialRequest.get('properties').heardAbout
|
||||||
td.status-cell
|
td.status-cell
|
||||||
if trialRequest.get('status') === 'submitted'
|
if trialRequest.get('status') === 'submitted'
|
||||||
button.btn.btn-xs.btn-success.btn-approve(data-trial-request=trialRequest) Approve
|
button.btn.btn-xs.btn-success.btn-approve(data-trial-request-id=trialRequest.id) Approve
|
||||||
button.btn.btn-xs.btn-danger.btn-deny(data-trial-request=trialRequest) Deny
|
button.btn.btn-xs.btn-danger.btn-deny(data-trial-request-id=trialRequest.id) Deny
|
||||||
else if trialRequest.get('prepaidCode')
|
else if trialRequest.get('prepaidCode')
|
||||||
span= trialRequest.get('prepaidCode')
|
span= trialRequest.get('prepaidCode')
|
||||||
else
|
else
|
||||||
|
|
|
@ -39,8 +39,8 @@ module.exports = class TrialRequestsView extends RootView
|
||||||
context
|
context
|
||||||
|
|
||||||
onClickApprove: (e) ->
|
onClickApprove: (e) ->
|
||||||
trialRequestData = $(e.target).data('trial-request')
|
trialRequestID = $(e.target).data('trial-request-id')
|
||||||
trialRequest = _.find @trialRequests.models, (a) -> a.get('_id') is trialRequestData._id
|
trialRequest = _.find @trialRequests.models, (a) -> a.id is trialRequestID
|
||||||
unless trialRequest
|
unless trialRequest
|
||||||
console.error 'Could not find trial request model for', trialRequestData
|
console.error 'Could not find trial request model for', trialRequestData
|
||||||
return
|
return
|
||||||
|
@ -52,8 +52,8 @@ module.exports = class TrialRequestsView extends RootView
|
||||||
@render?()
|
@render?()
|
||||||
|
|
||||||
onClickDeny: (e) ->
|
onClickDeny: (e) ->
|
||||||
trialRequestData = $(e.target).data('trial-request')
|
trialRequestID = $(e.target).data('trial-request-id')
|
||||||
trialRequest = _.find @trialRequests.models, (a) -> a.get('_id') is trialRequestData._id
|
trialRequest = _.find @trialRequests.models, (a) -> a.id is trialRequestID
|
||||||
unless trialRequest
|
unless trialRequest
|
||||||
console.error 'Could not find trial request model for', trialRequestData
|
console.error 'Could not find trial request model for', trialRequestData
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue