3412 TR Hide buttons when the report is submitted instead of only dimming them

This commit is contained in:
Andreas Svanberg 2024-10-16 09:35:29 +02:00
parent a6f38dbab8
commit df1410c612

@ -73,7 +73,7 @@ class ReflectionModalBodyPanel extends Panel {
super.onConfigure();
Reflection reflection = getModelObject();
boolean canRequestImprovements = reflection instanceof Reflection.Submitted;
setVisible(state == State.VIEWING && canRequestImprovements);
setVisible(state == State.VIEWING && canRequestImprovements && isEnabledInHierarchy());
}
});
@ -89,7 +89,7 @@ class ReflectionModalBodyPanel extends Panel {
super.onConfigure();
Reflection reflection = getModelObject();
boolean canEditReflection = reflection instanceof Reflection.Submitted || reflection instanceof Reflection.ImprovementsNeeded;
setVisible(state == State.VIEWING && canEditReflection);
setVisible(state == State.VIEWING && canEditReflection && isEnabledInHierarchy());
}
});
}