From df3dd5cd0cf99a819cdfeaddac4db571d03c3920 Mon Sep 17 00:00:00 2001 From: yingfeng Date: Wed, 2 Oct 2024 11:07:28 -0400 Subject: [PATCH 1/3] AMP-3401: fix batch ingest error --- src/components/batch/BatchIngest.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/batch/BatchIngest.vue b/src/components/batch/BatchIngest.vue index 419e9a7..39e6630 100644 --- a/src/components/batch/BatchIngest.vue +++ b/src/components/batch/BatchIngest.vue @@ -76,7 +76,7 @@ class="form-control-file btn btn-light btn-lg" id="exampleFormControlFile1" ref="inputFile" - value="Upload batch manifest" + :disabled="inProgress || unitName.length === 0" accept=".csv" @change=" From 28d610050d8606d12fa7060df8b3c3876d0fabb6 Mon Sep 17 00:00:00 2001 From: yingfeng Date: Tue, 15 Oct 2024 23:13:41 -0400 Subject: [PATCH 2/3] AMP-3402/AMP-3399 - SelectWorkflow: fix b-form-group v-slot issue - SupplementList and other components: fix window.location.hash issue --- src/components/entity/EntityList.vue | 16 ++++++++-------- src/components/entity/ItemFiles.vue | 2 +- src/components/supplement/SupplementList.vue | 11 +++++++++-- src/components/workflow/SelectWorkflow.vue | 7 ++----- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/components/entity/EntityList.vue b/src/components/entity/EntityList.vue index c66c07e..cbd72eb 100644 --- a/src/components/entity/EntityList.vue +++ b/src/components/entity/EntityList.vue @@ -972,30 +972,30 @@ export default { configProperties: sync("configProperties"), baseUrl() { const self = this; - if (window.location.hash.toLowerCase().indexOf("unit") > -1) { + if (window.location.href.toLowerCase().indexOf("unit") > -1) { return "unit"; - } else if (window.location.hash.toLowerCase().indexOf("file") > -1) { + } else if (window.location.href.toLowerCase().indexOf("file") > -1) { return "file"; } else if ( - window.location.hash.toLowerCase().indexOf("collection") > -1 && - window.location.hash.toLowerCase().indexOf("item") === -1 + window.location.href.toLowerCase().indexOf("collection") > -1 && + window.location.href.toLowerCase().indexOf("item") === -1 ) { this.getItemsConfig(); return "collection"; - } else if (window.location.hash.toLowerCase().indexOf("item") > -1) { + } else if (window.location.href.toLowerCase().indexOf("item") > -1) { return "item"; } return ""; }, purpose() { - return window.location.hash.toLowerCase().indexOf("details") > -1 + return window.location.href.toLowerCase().indexOf("details") > -1 ? "details" : ""; }, isCreatePage() { return ( - window.location.hash.toLowerCase().indexOf("create") > -1 || - window.location.hash.toLowerCase().indexOf("add-item") > -1 + window.location.href.toLowerCase().indexOf("create") > -1 || + window.location.href.toLowerCase().indexOf("add-item") > -1 ); }, listOfTaskManager() { diff --git a/src/components/entity/ItemFiles.vue b/src/components/entity/ItemFiles.vue index 8c1aa11..2f3bd2b 100644 --- a/src/components/entity/ItemFiles.vue +++ b/src/components/entity/ItemFiles.vue @@ -180,7 +180,7 @@ export default { selectedFile: sync("selectedFile"), accessControl: sync("accessControl"), isCreatePage() { - return window.location.hash.toLowerCase().indexOf("add-item") > -1; + return window.location.href.toLowerCase().indexOf("add-item") > -1; }, }, methods: { diff --git a/src/components/supplement/SupplementList.vue b/src/components/supplement/SupplementList.vue index 3343ab8..f34974e 100644 --- a/src/components/supplement/SupplementList.vue +++ b/src/components/supplement/SupplementList.vue @@ -144,15 +144,19 @@ export default { acActions: sync("acActions"), baseUrl() { const self = this; + console.log("url:" + window.location); if ( - window.location.hash.toLowerCase().indexOf("supplemental-files/") > -1 + window.location.href.toLowerCase().indexOf("supplemental-files/") > -1 ) { + console.log("supplement file"); return "supplement"; } else if ( - window.location.hash.toLowerCase().indexOf("supplemental-files") > -1 + window.location.href.toLowerCase().indexOf("supplemental-files") > -1 ) { + console.log("supplement list"); return "list-supplement"; } + console.log("invalid path"); return ""; }, }, @@ -188,6 +192,7 @@ export default { async getSupplementData() { const self = this; self.showLoader = true; + console.log("getSupplementData ..."); const supplementalFilesResponse = await self.getSupplementalFiles(self); if (supplementalFilesResponse) { @@ -241,6 +246,7 @@ export default { async getData() { const self = this; if (self.baseUrl === "list-supplement") { + console.log("getSupplementData..."); self.getSupplementData(); } }, @@ -267,6 +273,7 @@ export default { }, }, mounted() { + console.log("SupplementList.mounted"); this.getData(); }, }; diff --git a/src/components/workflow/SelectWorkflow.vue b/src/components/workflow/SelectWorkflow.vue index 6d1b91e..e8740ed 100644 --- a/src/components/workflow/SelectWorkflow.vue +++ b/src/components/workflow/SelectWorkflow.vue @@ -288,17 +288,14 @@