ItEr59S04ValidacionEProbasFuncionaisItEr58S04 : Fixing bug.
If the advance is reported by a quality form, the button to add new advance measurement and the button to remove a advance measurement are disabled.
This commit is contained in:
parent
5531357545
commit
3c6c3b76d5
1 changed files with 27 additions and 3 deletions
|
|
@ -658,7 +658,12 @@ public class ManageOrderElementAdvancesController extends
|
|||
}
|
||||
});
|
||||
|
||||
if (advance instanceof IndirectAdvanceAssignment) {
|
||||
if ((advance.getAdvanceType() != null)
|
||||
&& (advance.getAdvanceType().isQualityForm())) {
|
||||
addMeasurementButton.setDisabled(true);
|
||||
addMeasurementButton
|
||||
.setTooltiptext(_("Advances that are reported by quality forms can not be modified"));
|
||||
} else if (advance instanceof IndirectAdvanceAssignment) {
|
||||
addMeasurementButton.setDisabled(true);
|
||||
addMeasurementButton
|
||||
.setTooltiptext(_("Calculated advances can not be modified"));
|
||||
|
|
@ -680,7 +685,12 @@ public class ManageOrderElementAdvancesController extends
|
|||
}
|
||||
});
|
||||
|
||||
if (advance instanceof IndirectAdvanceAssignment) {
|
||||
if ((advance.getAdvanceType() != null)
|
||||
&& (advance.getAdvanceType().isQualityForm())) {
|
||||
removeButton.setDisabled(true);
|
||||
removeButton
|
||||
.setTooltiptext(_("Advances that are reported by quality forms can not be modified"));
|
||||
} else if (advance instanceof IndirectAdvanceAssignment) {
|
||||
removeButton.setDisabled(true);
|
||||
removeButton
|
||||
.setTooltiptext(_("Calculated advances can not be removed"));
|
||||
|
|
@ -1177,10 +1187,24 @@ public class ManageOrderElementAdvancesController extends
|
|||
}
|
||||
|
||||
private void appendRemoveButton(final Listitem listItem) {
|
||||
final AdvanceMeasurement advance = (AdvanceMeasurement) listItem
|
||||
|
||||
final AdvanceMeasurement measure = (AdvanceMeasurement) listItem
|
||||
.getValue();
|
||||
final Button removeButton = createRemoveButton();
|
||||
|
||||
DirectAdvanceAssignment advance = (DirectAdvanceAssignment) measure
|
||||
.getAdvanceAssignment();
|
||||
if ((advance.getAdvanceType() != null)
|
||||
&& (advance.getAdvanceType().isQualityForm())) {
|
||||
removeButton.setDisabled(true);
|
||||
removeButton
|
||||
.setTooltiptext(_("Advances measurements that are reported by quality forms can not be removed"));
|
||||
} else if (advance.isFake()) {
|
||||
removeButton.setDisabled(true);
|
||||
removeButton
|
||||
.setTooltiptext(_("Calculated advances measurement can not be removed"));
|
||||
}
|
||||
|
||||
removeButton.addEventListener(Events.ON_CLICK, new EventListener() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue