From bf505947ba9d7ad99897e6d169eea52366cac77c Mon Sep 17 00:00:00 2001
From: mlm483 <128052931+mlm483@users.noreply.github.com>
Date: Fri, 29 Sep 2023 13:06:04 -0400
Subject: [PATCH 1/2] [BI-1805] - conditionally hide edit form and buttons
hide edit form fields and save and cancel buttons for in-use breeding methods
---
src/components/forms/DataForm.vue | 3 +
.../expandableTable/ExpandableTable.vue | 28 +++++-
src/views/germplasm/BreedingMethods.vue | 95 ++++++++++---------
3 files changed, 77 insertions(+), 49 deletions(-)
diff --git a/src/components/forms/DataForm.vue b/src/components/forms/DataForm.vue
index 5bedfcfa8..7531159a3 100644
--- a/src/components/forms/DataForm.vue
+++ b/src/components/forms/DataForm.vue
@@ -24,6 +24,7 @@
-
-
-
-
-
+
+
-
@@ -597,6 +600,10 @@ export default class BreedingMethods extends ProgramsBase {
return false;
}
+ showButtons(row: TableRow
) {
+ return !this.isMethodInUse(row.data);
+ }
+
filterByScope(row: TableRow, input: string) {
if(input === 'SYSTEM') {
return row.data.programId === undefined;
From 58d209491f880e8a17ec368d74157b3486ccc7d2 Mon Sep 17 00:00:00 2001
From: mlm483 <128052931+mlm483@users.noreply.github.com>
Date: Wed, 4 Oct 2023 11:32:22 -0400
Subject: [PATCH 2/2] [BI-1805] - removed console.log
---
src/components/tables/expandableTable/ExpandableTable.vue | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/components/tables/expandableTable/ExpandableTable.vue b/src/components/tables/expandableTable/ExpandableTable.vue
index d228a95e5..d517c7100 100644
--- a/src/components/tables/expandableTable/ExpandableTable.vue
+++ b/src/components/tables/expandableTable/ExpandableTable.vue
@@ -257,7 +257,6 @@ export default class ExpandableTable extends Mixins(ValidationMixin) {
isSaveButtonVisible(row: any) {
// Visible by default, evaluate saveButtonVisible on row if provided.
- console.log(typeof this.saveButtonVisible);
return ((typeof this.saveButtonVisible === "function") ? this.saveButtonVisible(row) : true);
}