include fields for start and end dates on work statement report
This commit is contained in:
parent
e20feb5851
commit
527c2f445d
3 changed files with 20 additions and 3 deletions
|
@ -26,6 +26,7 @@ from cybertools.util.jeep import Jeep
|
||||||
from loops.expert.report import ReportInstance
|
from loops.expert.report import ReportInstance
|
||||||
from loops.organize.work.report import WorkRow
|
from loops.organize.work.report import WorkRow
|
||||||
from loops.organize.work.report import deadline, day, task, party, state
|
from loops.organize.work.report import deadline, day, task, party, state
|
||||||
|
from loops.organize.work.report import dayStart, dayEnd
|
||||||
from loops.organize.work.report import workTitle, workDescription
|
from loops.organize.work.report import workTitle, workDescription
|
||||||
from loops import util
|
from loops import util
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ class QualificationOverview(ReportInstance):
|
||||||
|
|
||||||
rowFactory = WorkRow
|
rowFactory = WorkRow
|
||||||
|
|
||||||
fields = Jeep((task, party, workTitle, day, state)) # +deadline?
|
fields = Jeep((task, party, workTitle, dayStart, dayEnd, state)) # +deadline?
|
||||||
|
|
||||||
defaultOutputFields = fields
|
defaultOutputFields = fields
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
|
|
||||||
<browser:page
|
<browser:page
|
||||||
name="work.html"
|
name="work.html"
|
||||||
for="loops.organize.interfaces.ITask"
|
for="loops.organize.interfaces.IConceptSchema"
|
||||||
class="loops.organize.work.report.WorkStatementView"
|
class="loops.organize.work.report.WorkStatementView"
|
||||||
permission="zope.View" />
|
permission="zope.View" />
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,14 @@ day = TrackDateField('day', u'Day',
|
||||||
description=u'The day the work was done.',
|
description=u'The day the work was done.',
|
||||||
cssClass='center',
|
cssClass='center',
|
||||||
executionSteps=['sort', 'output'])
|
executionSteps=['sort', 'output'])
|
||||||
|
dayStart = TrackDateField('dayStart', u'Start Day',
|
||||||
|
description=u'The day the unit of work was started.',
|
||||||
|
cssClass='center',
|
||||||
|
executionSteps=['sort', 'output'])
|
||||||
|
dayEnd = TrackDateField('dayEnd', u'End Day',
|
||||||
|
description=u'The day the unit of work was finished.',
|
||||||
|
cssClass='center',
|
||||||
|
executionSteps=['sort', 'output'])
|
||||||
timeStart = TrackTimeField('start', u'Start',
|
timeStart = TrackTimeField('start', u'Start',
|
||||||
description=u'The time the unit of work was started.',
|
description=u'The time the unit of work was started.',
|
||||||
executionSteps=['sort', 'output'])
|
executionSteps=['sort', 'output'])
|
||||||
|
@ -145,6 +153,12 @@ class WorkRow(BaseRow):
|
||||||
def getDay(self, attr):
|
def getDay(self, attr):
|
||||||
return self.context.timeStamp
|
return self.context.timeStamp
|
||||||
|
|
||||||
|
def getStart(self, attr):
|
||||||
|
return self.context.start
|
||||||
|
|
||||||
|
def getEnd(self, attr):
|
||||||
|
return self.context.end
|
||||||
|
|
||||||
def getDuration(self, attr):
|
def getDuration(self, attr):
|
||||||
value = self.context.data.get('duration')
|
value = self.context.data.get('duration')
|
||||||
if value is None:
|
if value is None:
|
||||||
|
@ -157,7 +171,9 @@ class WorkRow(BaseRow):
|
||||||
value = self.getDuration(attr)
|
value = self.getDuration(attr)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
attributeHandlers = dict(day=getDay, dayFrom=getDay, dayTo=getDay,
|
attributeHandlers = dict(day=getDay,
|
||||||
|
dayStart=getStart, dayEnd=getEnd,
|
||||||
|
dayFrom=getDay, dayTo=getDay,
|
||||||
duration=getDuration, effort=getEffort)
|
duration=getDuration, effort=getEffort)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue