From 890dd67b0efdc2cd5cdedf0d0f800c5a8f17e687 Mon Sep 17 00:00:00 2001 From: Tim Bernhard Date: Wed, 3 Jan 2024 10:01:53 +0100 Subject: [PATCH] Enable edititing exported --- .../java/edu/harvard/mcz/imagecapture/entity/Specimen.java | 5 ++--- .../mcz/imagecapture/ui/frame/SpecimenDetailsViewPane.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/harvard/mcz/imagecapture/entity/Specimen.java b/src/main/java/edu/harvard/mcz/imagecapture/entity/Specimen.java index e97e873..98af821 100644 --- a/src/main/java/edu/harvard/mcz/imagecapture/entity/Specimen.java +++ b/src/main/java/edu/harvard/mcz/imagecapture/entity/Specimen.java @@ -308,7 +308,7 @@ public Boolean isExported() { } public Boolean isEditable(Users user) { - boolean canEdit = !this.isExported() && !this.isStateDone(); + boolean canEdit = !this.isStateDone(); if (user != null) { canEdit = (user.isUserRole(Users.ROLE_FULL) || user.isUserRole(Users.ROLE_ADMINISTRATOR)) || @@ -1224,8 +1224,7 @@ public void setExternalHistory(Set externalHistory) { } public boolean isStateDone() { - return Objects.equals(this.workFlowStatus, WorkFlowStatus.STAGE_DONE) || - (this.nahimaExported != null && this.nahimaExported); + return Objects.equals(this.workFlowStatus, WorkFlowStatus.STAGE_DONE); } public String getLoadFlags() { diff --git a/src/main/java/edu/harvard/mcz/imagecapture/ui/frame/SpecimenDetailsViewPane.java b/src/main/java/edu/harvard/mcz/imagecapture/ui/frame/SpecimenDetailsViewPane.java index 510a3ec..03e5d85 100644 --- a/src/main/java/edu/harvard/mcz/imagecapture/ui/frame/SpecimenDetailsViewPane.java +++ b/src/main/java/edu/harvard/mcz/imagecapture/ui/frame/SpecimenDetailsViewPane.java @@ -856,7 +856,7 @@ private void setValues() { // getCitedInPublicationJTextField().setText(specimen.getCitedInPublication()); getQuestionsJTextField().setText(specimen.getQuestions()); getJComboBoxWorkflowStatus().setSelectedItem(specimen.getWorkFlowStatus()); - if (specimen.isStateDone()) { + if (specimen.isExported()) { getJTextFieldMigrationStatus().setText(WorkFlowStatus.STAGE_DONE); // "http://mczbase.mcz.harvard.edu/guid/MCZ:Ent:" + // specimen.getCatNum()); @@ -3265,7 +3265,7 @@ private JTextField getJTextFieldMigrationStatus() { // jLabelMigrationStatus.setBorder(null); jTextFieldMigrationStatus.setEditable(false); jTextFieldMigrationStatus.setText(""); - if (specimen.isStateDone()) { + if (specimen.isExported()) { // String uri = "http://mczbase.mcz.harvard.edu/guid/MCZ:Ent:" + // specimen.getCatNum(); // jTextFieldMigrationStatus.setText(uri);