From 228dd09f0f7dcaa5dc95b3aa5fd43876eee16b60 Mon Sep 17 00:00:00 2001
From: swapnamol-abraham
Date: Mon, 4 Aug 2025 17:42:21 +0100
Subject: [PATCH 1/3] TD-5892: Issue with the resources when try to edit and
republish which have been previously published under 'community contributio
---
.../vuesrc/contribute-resource/Contribute.vue | 2 +-
.../ContributeAssessmentSettings.vue | 4 +-
.../ContributeLocationTab.vue | 71 +++++++++++++------
.../components/CatalogueSelector.vue | 68 +++++++++++-------
.../components/CatalogueView.vue | 62 ++++++++--------
.../vuesrc/contribute/CatalogueSelect.vue | 15 ++--
.../vuesrc/contribute/ContentCommon.vue | 5 +-
.../vuesrc/contribute/contributeState.ts | 2 +-
8 files changed, 143 insertions(+), 86 deletions(-)
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/Contribute.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/Contribute.vue
index f25aa0b7f..56c01dce8 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/Contribute.vue
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/Contribute.vue
@@ -432,7 +432,7 @@
return this.resourceDetails.resourceLicenceId > 0;
},
locationTabComplete(): boolean {
- return this.resourceDetails.resourceCatalogueId > 0;
+ return this.resourceDetails.resourceCatalogueId > 1;
},
certificateTabComplete(): boolean {
return this.resourceDetails.certificateEnabled !== null;
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAssessmentSettings.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAssessmentSettings.vue
index 088f74c90..bc7de0277 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAssessmentSettings.vue
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAssessmentSettings.vue
@@ -74,9 +74,7 @@
+ :initialValue="endGuidance"/>
Tip
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue
index a66944a40..e81a30935 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue
@@ -7,33 +7,58 @@
Primary catalogue
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
No catalogue available.
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue
index 6d942b072..8754e4e0c 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue
@@ -26,7 +26,7 @@
A catalogue is a curated set of resources that has its own web page.
- You can contribute a resource as an editor of a catalogue.
+ You can contribute a resource as an editor of a catalogue.
You can manage all resources that you have contributed in the My contributions area.
@@ -45,9 +45,11 @@
-
- You have selected a hidden catalogue.
- If you publish this resource, learners will only be able to access it when the catalogue is made available by Learning Hub platform administrators.
+
+
+ You have selected a hidden catalogue.
+ If you publish this resource, learners will only be able to access it when the catalogue is made available by Learning Hub platform administrators.
+
@@ -87,9 +89,12 @@
},
},
created() {
- if (this.value > 0) {
+ if (this.value > 1) {
this.selectedCatalogue = this.userCatalogues.find(c => c.nodeId == this.value);
}
+ else {
+ this.selectedCatalogue = new CatalogueModel({ nodeId: 0 });
+ }
}
})
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentCommon.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentCommon.vue
index 11b2c7d8f..f62b7d784 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentCommon.vue
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentCommon.vue
@@ -333,8 +333,9 @@
return this.$store.state.resourceDetail.resourceType;
},
showCatalogueSelect(): boolean {
- return (this.resourceDetail.resourceCatalogueId === this.resourceDetail.nodeId) || // show if user is contributing into the catalogue root
- !Boolean(this.$route.query.initialCreate); // or if the user is editing an existing draft (initialCreate=false)
+ //return (this.resourceDetail.resourceCatalogueId === this.resourceDetail.nodeId) || // show if user is contributing into the catalogue root
+ // !Boolean(this.$route.query.initialCreate); // or if the user is editing an existing draft (initialCreate=false)
+ return (!Boolean(this.$route.query.initialCreate));
},
newKeywordTrimmed(): string {
return this.newKeyword?.trim().replace(/ +(?= )/g, '');
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/contributeState.ts b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/contributeState.ts
index e4bdf763a..0ccb4ce69 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/contributeState.ts
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/contributeState.ts
@@ -114,7 +114,7 @@ const setCommonContentState = function (state: State) {
&& state.resourceDetail.resourceAccessibilityEnum !== ResourceAccessibility.None
&& state.resourceDetail.description !== ''
&& (state.resourceDetail.resourceLicenceId > 0 || state.resourceDetail.resourceType === ResourceType.WEBLINK)
- && state.resourceDetail.resourceCatalogueId > 0
+ && state.resourceDetail.resourceCatalogueId > 1
&& state.resourceDetail.resourceAuthors.length > 0
&& state.resourceDetail.certificateEnabled !== null
&& state.resourceDetail.resourceKeywords.length > 0;
From f30f63fccdfee8ac407a8f97698372445f7aa738 Mon Sep 17 00:00:00 2001
From: swapnamol-abraham
Date: Tue, 5 Aug 2025 10:43:20 +0100
Subject: [PATCH 2/3] Removed text
---
.../vuesrc/contribute-resource/ContributeLocationTab.vue | 3 +--
.../vuesrc/contribute-resource/components/CatalogueView.vue | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue
index e81a30935..8af5f25c9 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue
@@ -27,8 +27,7 @@
-
-
No catalogue available.
+
{{catalogue.name}}
-
Please select a catalogue
+
No catalogue available.
Change
From dc60cfd8fcba61430489e8345ec4b2612a2e6e89 Mon Sep 17 00:00:00 2001
From: swapnamol-abraham
Date: Thu, 7 Aug 2025 12:45:46 +0100
Subject: [PATCH 3/3] TD-5892: bug fix for the new resource creation
---
.../vuesrc/contribute-resource/ContributeLocationTab.vue | 7 ++++---
.../Scripts/vuesrc/contribute/ContentCommon.vue | 9 ++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue
index 8af5f25c9..5cb06877d 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue
@@ -85,14 +85,15 @@
return new CatalogueModel({ nodeId: 0 });
},
resourceDescription(): string {
- return this.resourceDetails.description;
+ return this.resourceDetails.description;
},
isDividerVisible(): boolean {
return this.resourceDetails.resourceCatalogueId >= 0 && this.selectionInProgress;
},
allowCatalogueChange(): boolean {
- return (!Boolean(this.$route.query.initialCreate)); // allow if user is contributing into the catalogue root // or if the user is editing an existing draft (initialCreate=false)
- //this.resourceDetails.resourceCatalogueId === this.resourceDetails.nodeId) ||
+ return (this.resourceDetails.resourceCatalogueId === this.resourceDetails.nodeId) || // allow if user is contributing into the catalogue root
+ !Boolean(this.$route.query.initialCreate);
+ // allow if user is contributing into the catalogue root // or if the user is editing an existing draft (initialCreate=false)
},
onChangeClick() {
this.$emit('change-click');
diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentCommon.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentCommon.vue
index f62b7d784..1d4cf7f69 100644
--- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentCommon.vue
+++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentCommon.vue
@@ -314,11 +314,11 @@
return this.$store.state.userProviders;
},
resourceCatalogueCount(): number {
- if (!this.$store.state.userCatalogues) {
+ if (!this.$store.state.userCatalogues) {
return 0;
} else {
return this.$store.state.userCatalogues.length;
- }
+ }
},
userIsAuthor(): boolean {
return this.authors.filter(a => a.isContributor).length > 0;
@@ -333,9 +333,8 @@
return this.$store.state.resourceDetail.resourceType;
},
showCatalogueSelect(): boolean {
- //return (this.resourceDetail.resourceCatalogueId === this.resourceDetail.nodeId) || // show if user is contributing into the catalogue root
- // !Boolean(this.$route.query.initialCreate); // or if the user is editing an existing draft (initialCreate=false)
- return (!Boolean(this.$route.query.initialCreate));
+ return (this.resourceDetail.resourceCatalogueId === this.resourceDetail.nodeId) || // show if user is contributing into the catalogue root
+ !Boolean(this.$route.query.initialCreate); // or if the user is editing an existing draft (initialCreate=false)
},
newKeywordTrimmed(): string {
return this.newKeyword?.trim().replace(/ +(?= )/g, '');