Skip to content
Browse files

adding incentives to person lookup page

  • Loading branch information...
1 parent 4c1e9a4 commit 10dabf6df2792a91ab4082269ea29b8b74ed7358 @aaronzirbes aaronzirbes committed Apr 23, 2012
Showing with 18 additions and 0 deletions.
  1. +9 −0 grails-app/controllers/edu/umn/ncs/PersonController.groovy
  2. +9 −0 grails-app/views/person/show.gsp
View
9 grails-app/controllers/edu/umn/ncs/PersonController.groovy
@@ -25,6 +25,14 @@ class PersonController {
def trackedItemInstanceList = TrackedItem.findAllByPerson(personInstance)
def appointmentInstanceList = Appointment.findAllByPerson(personInstance)
def subjectInstanceList = Subject.findAllByPerson(personInstance)
+
+ def incentiveInstanceList = Incentive.createCriteria().list {
+ trackedItem {
+ person {
+ idEq(personInstance.id)
+ }
+ }
+ }
def callInstanceList = Call.createCriteria().list {
items {
@@ -88,6 +96,7 @@ class PersonController {
householdInstanceList: householdInstanceList,
callInstanceList: callInstanceList,
eventReportInstanceList: eventReportInstanceList,
+ incentiveInstanceList : incentiveInstanceList,
resultHistoryList: resultHistoryList ]
}
View
9 grails-app/views/person/show.gsp
@@ -229,6 +229,15 @@
</fieldset>
<fieldset class="maroonBorder">
+ <legend class="m1">Incentives</legend>
+ <ul>
+ <g:each var="inc" in="${incentiveInstanceList}">
+ <li>${inc}</li>
+ </g:each>
+ </ul>
+ </fieldset>
+
+ <fieldset class="maroonBorder">
<legend class="m1">Items Generated</legend>
<g:if test="${ ! trackedItemInstanceList}">
No Items found

0 comments on commit 10dabf6

Please sign in to comment.
Something went wrong with that request. Please try again.