Update admin trial requests page

Add role and phone number
Move notes to separate line
Display last 1000 reviewed instead of 100
This commit is contained in:
Matt Lott 2016-02-24 10:22:55 -08:00
parent 9a344d1a61
commit e74a77342c
2 changed files with 13 additions and 4 deletions

View file

@ -20,11 +20,12 @@ block content
th Location
th Age / Level
th Students
th How Found / Notes
th Role
th Phone
th Status
tbody
- var numReviewed = 0
- var maxReviewedShown = 100
- var maxReviewedShown = 1000
each trialRequest in trialRequests
if trialRequest.get('status') !== 'submitted'
- numReviewed++
@ -42,7 +43,8 @@ block content
td= props.location || trialRequest.locationString()
td= props.age || trialRequest.educationLevelString()
td= props.numStudents
td= props.heardAbout || props.notes
td= props.role
td= props.phoneNumber
td.status-cell
if trialRequest.get('status') === 'submitted'
button.btn.btn-xs.btn-success.btn-approve(data-trial-request-id=trialRequest.id) Approve
@ -51,3 +53,10 @@ block content
span= trialRequest.get('prepaidCode')
else
span= trialRequest.get('status')
if props.heardAbout || props.notes
tr
td(colspan=2)
td(colspan=7)
strong #{trialRequest.nameString()} notes:
div= props.heardAbout || props.notes
td

View file

@ -30,7 +30,7 @@ module.exports = class TrialRequestsView extends RootView
-1
else
1
@trialRequests = new CocoCollection([], { url: '/db/trial.request?conditions[sort]=-created&conditions[limit]=500', model: TrialRequest, comparator: sortRequests })
@trialRequests = new CocoCollection([], { url: '/db/trial.request?conditions[sort]=-created&conditions[limit]=1000', model: TrialRequest, comparator: sortRequests })
@supermodel.loadCollection(@trialRequests, 'trial-requests', {cache: false})
getRenderData: ->