diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue index 8af5f25c..5cb06877 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 f62b7d78..1d4cf7f6 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, '');