Skip to content

Commit

Permalink
detailed billable handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Karolis Rusenas committed Aug 18, 2015
1 parent 8b288b7 commit d9c3443
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions handlers/web_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,3 +493,25 @@ def get(self):
}
return self.render('salesforce.html', data=data)


class SFHandlerBillDetailed(BaseHandler):
@web.authenticated
@allowed()
@cache(1)
@gen.coroutine
def get(self):
sf_obj = SFAccess(self.settings)
# checking whether report IDs were supplied
if "consultantBillability" not in self.settings:
return self.render('500.html',
code=500,
error="consultantBillability report ID was "
"not found in configuration")

consultant_bilability = \
yield sf_obj.get_billability_report(self.settings["consultantBillability"])

data = {
"consultant_bilability": consultant_bilability
}
return self.render('sf_billability_detailed.html', data=data)

0 comments on commit d9c3443

Please sign in to comment.