Add total work column in work reports list
FEA: ItEr76S28UserDashboard
This commit is contained in:
parent
a6f8aae626
commit
4fd26c7a0c
2 changed files with 11 additions and 0 deletions
|
|
@ -23,6 +23,7 @@ package org.libreplan.web.workreports;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import org.libreplan.business.workingday.EffortDuration;
|
||||
import org.libreplan.business.workreports.entities.WorkReport;
|
||||
import org.libreplan.business.workreports.entities.WorkReportLine;
|
||||
import org.libreplan.business.workreports.entities.WorkReportType;
|
||||
|
|
@ -44,6 +45,8 @@ public class WorkReportDTO {
|
|||
if (workReportType.isMonthlyTimesheetsType()) {
|
||||
this.type += " - " + workReport.getResource().getShortDescription();
|
||||
}
|
||||
|
||||
this.hours = workReport.getTotalEffortDuration();
|
||||
}
|
||||
|
||||
private WorkReport workReport;
|
||||
|
|
@ -54,6 +57,8 @@ public class WorkReportDTO {
|
|||
|
||||
private String type;
|
||||
|
||||
private EffortDuration hours;
|
||||
|
||||
public WorkReport getWorkReport() {
|
||||
return workReport;
|
||||
}
|
||||
|
|
@ -122,4 +127,8 @@ public class WorkReportDTO {
|
|||
return workReport.getCode();
|
||||
}
|
||||
|
||||
public EffortDuration getHours() {
|
||||
return hours;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@
|
|||
<column id="columnDateStart" label="${i18n:_('Date Start')}" sort="auto(dateStart, dateFinish)" sortDirection="ascending"/>
|
||||
<column id="columnDateFinish" label="${i18n:_('Date Finish')}" sort="auto(dateFinish, dateStart)" sortDirection="ascending"/>
|
||||
<column label="${i18n:_('Type')}" sort="auto(type)"/>
|
||||
<column label="${i18n:_('Total work')}" sort="auto(hours)" />
|
||||
<column label="${i18n:_('Code')}" />
|
||||
<column label="${i18n:_('Actions')}" />
|
||||
</columns>
|
||||
|
|
@ -71,6 +72,7 @@
|
|||
<label value="@{workReportDTO.dateStart, converter='org.libreplan.web.common.typeconverters.DateConverter'}" />
|
||||
<label value="@{workReportDTO.dateFinish, converter='org.libreplan.web.common.typeconverters.DateConverter'}"/>
|
||||
<label value="@{workReportDTO.type}" />
|
||||
<label value="@{workReportDTO.hours.toFormattedString}" />
|
||||
<label value="@{workReportDTO.code}" />
|
||||
|
||||
<hbox>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue