ItEr24S08CUAsignacionGrupoRecursosAPlanificacionItEr23S10: [FixBug] Added Cancel operation
This commit is contained in:
parent
e62f1f51bd
commit
c4acadced6
5 changed files with 26 additions and 2 deletions
|
|
@ -79,6 +79,10 @@ public class Task extends TaskElement {
|
|||
resourceAllocations.remove(resourceAllocation);
|
||||
}
|
||||
|
||||
public void clearResourceAllocations() {
|
||||
resourceAllocations.clear();
|
||||
}
|
||||
|
||||
public Boolean getFixedDuration() {
|
||||
return fixedDuration;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,4 +137,9 @@ public interface IResourceAllocationModel {
|
|||
*/
|
||||
void updateGenericPercentages(BigDecimal totalPercentage);
|
||||
|
||||
/**
|
||||
* Cancel operation
|
||||
*/
|
||||
void cancel();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ public class ResourceAllocationController extends GenericForwardComposer {
|
|||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
messagesForUser = new MessagesForUser(messagesContainer);
|
||||
this.window = (Window) comp;
|
||||
messagesForUser = new MessagesForUser(messagesContainer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -216,6 +216,16 @@ public class ResourceAllocationController extends GenericForwardComposer {
|
|||
return resourceAllocationRenderer;
|
||||
}
|
||||
|
||||
public void cancel() {
|
||||
clear();
|
||||
self.setVisible(false);
|
||||
resourceAllocationModel.cancel();
|
||||
}
|
||||
|
||||
private void clear() {
|
||||
genericResourceAllocationPercentage.setValue(null);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Renders a {@link SpecificResourceAllocation} item
|
||||
|
|
|
|||
|
|
@ -301,4 +301,9 @@ public class ResourceAllocationModel implements IResourceAllocationModel {
|
|||
ganttTask.setEndDate(task.getEndDate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel() {
|
||||
task.clearResourceAllocations();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
|
||||
<hbox>
|
||||
<button label="${i18n:_('Save')}" />
|
||||
<button label="${i18n:_('Cancel')}" />
|
||||
<button label="${i18n:_('Cancel')}" onClick="allocationController.cancel()" />
|
||||
<button label="${i18n:_('Search resources...')}"
|
||||
onClick="allocationController.showSearchResources()" />
|
||||
<button label="${i18n:_('Advance allocation')}" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue