ItEr29S06CUAsignacionGrupoRecursosAPlanificacionItEr28S06: Now can edit the total hours for each row
This commit is contained in:
parent
5753c95ded
commit
2ae36fe13b
1 changed files with 17 additions and 1 deletions
|
|
@ -31,6 +31,7 @@ import java.util.List;
|
|||
import java.util.ListIterator;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
|
|
@ -437,6 +438,7 @@ class Row {
|
|||
@Override
|
||||
public void changeOnGlobal() {
|
||||
reloadAllHours();
|
||||
reloadHoursSameRowForDetailItems();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -484,16 +486,30 @@ class Row {
|
|||
if (isGroupingRow()) {
|
||||
return;
|
||||
}
|
||||
Intbox intbox = (Intbox) allHoursComponent;
|
||||
final Intbox intbox = (Intbox) allHoursComponent;
|
||||
intbox.addEventListener(Events.ON_CHANGE, new EventListener() {
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
Integer value = intbox.getValue();
|
||||
getAllocation().withPreviousAssociatedResources().onInterval(
|
||||
getAllocation().getStartDate(),
|
||||
getAllocation().getEndDate())
|
||||
.allocateHours(value);
|
||||
fireCellChanged();
|
||||
reloadHoursSameRowForDetailItems();
|
||||
reloadAllHours();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void reloadHoursSameRowForDetailItems() {
|
||||
for (Entry<DetailItem, Component> entry : componentsByDetailItem
|
||||
.entrySet()) {
|
||||
reloadHoursOnInterval(entry.getValue(), entry.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
private void reloadAllHours() {
|
||||
if (isGroupingRow()) {
|
||||
Label label = (Label) allHoursInput;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue