Skip to content

Commit

Permalink
hiding verify test results for lab officer
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony4m committed Aug 15, 2022
1 parent b780762 commit 76b64b5
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@
import de.symeda.sormas.api.sample.PathogenTestType;
import de.symeda.sormas.api.sample.SampleDto;
import de.symeda.sormas.api.sample.SamplePurpose;
import de.symeda.sormas.api.user.UserRole;
import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers;
import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers;
import de.symeda.sormas.ui.UserProvider;
import de.symeda.sormas.ui.utils.AbstractEditForm;
import de.symeda.sormas.ui.utils.CssStyles;
import de.symeda.sormas.ui.utils.DateComparisonValidator;
Expand Down Expand Up @@ -123,7 +125,6 @@ protected void addFields() {
if (sample == null) {
return;
}

pathogenTestHeadingLabel = new Label();
pathogenTestHeadingLabel.addStyleName(H3);
getContent().addComponent(pathogenTestHeadingLabel, PATHOGEN_TEST_HEADING_LOC);
Expand Down Expand Up @@ -170,11 +171,14 @@ protected void addFields() {
cqValueField.setConversionError(I18nProperties.getValidationError(Validations.onlyNumbersAllowed, cqValueField.getCaption()));
NullableOptionGroup testResultVerifiedField = addField(PathogenTestDto.TEST_RESULT_VERIFIED, NullableOptionGroup.class);
testResultVerifiedField.setRequired(true);
if (UserProvider.getCurrent().hasUserRole(UserRole.LAB_USER)) {
testResultVerifiedField.setRequired(false);
testResultVerifiedField.setVisible(false);
}
CheckBox fourFoldIncrease = addField(PathogenTestDto.FOUR_FOLD_INCREASE_ANTIBODY_TITER, CheckBox.class);
CssStyles.style(fourFoldIncrease, VSPACE_3, VSPACE_TOP_4);
fourFoldIncrease.setVisible(false);
fourFoldIncrease.setEnabled(false);

addField(PathogenTestDto.TEST_RESULT_TEXT, TextArea.class).setRows(6);
addField(PathogenTestDto.PRELIMINARY).addStyleName(CssStyles.VSPACE_4);

Expand Down

1 comment on commit 76b64b5

@Anthony4m
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message is very vague a little detail message will be appreciated

Please sign in to comment.