Skip to content

Commit 0ebb09b

Browse files
Merge pull request #1310 from TechnologyEnhancedLearning/Develop/Fixes/TD-5892-bug-fix
TD-5892: bug fix for the new resource creation
2 parents 61deccd + dc60cfd commit 0ebb09b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLocationTab.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,15 @@
8585
return new CatalogueModel({ nodeId: 0 });
8686
},
8787
resourceDescription(): string {
88-
return this.resourceDetails.description;
88+
return this.resourceDetails.description;
8989
},
9090
isDividerVisible(): boolean {
9191
return this.resourceDetails.resourceCatalogueId >= 0 && this.selectionInProgress;
9292
},
9393
allowCatalogueChange(): boolean {
94-
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)
95-
//this.resourceDetails.resourceCatalogueId === this.resourceDetails.nodeId) ||
94+
return (this.resourceDetails.resourceCatalogueId === this.resourceDetails.nodeId) || // allow if user is contributing into the catalogue root
95+
!Boolean(this.$route.query.initialCreate);
96+
// allow if user is contributing into the catalogue root // or if the user is editing an existing draft (initialCreate=false)
9697
},
9798
onChangeClick() {
9899
this.$emit('change-click');

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentCommon.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,11 @@
314314
return this.$store.state.userProviders;
315315
},
316316
resourceCatalogueCount(): number {
317-
if (!this.$store.state.userCatalogues) {
317+
if (!this.$store.state.userCatalogues) {
318318
return 0;
319319
} else {
320320
return this.$store.state.userCatalogues.length;
321-
}
321+
}
322322
},
323323
userIsAuthor(): boolean {
324324
return this.authors.filter(a => a.isContributor).length > 0;
@@ -333,9 +333,8 @@
333333
return this.$store.state.resourceDetail.resourceType;
334334
},
335335
showCatalogueSelect(): boolean {
336-
//return (this.resourceDetail.resourceCatalogueId === this.resourceDetail.nodeId) || // show if user is contributing into the catalogue root
337-
// !Boolean(this.$route.query.initialCreate); // or if the user is editing an existing draft (initialCreate=false)
338-
return (!Boolean(this.$route.query.initialCreate));
336+
return (this.resourceDetail.resourceCatalogueId === this.resourceDetail.nodeId) || // show if user is contributing into the catalogue root
337+
!Boolean(this.$route.query.initialCreate); // or if the user is editing an existing draft (initialCreate=false)
339338
},
340339
newKeywordTrimmed(): string {
341340
return this.newKeyword?.trim().replace(/ +(?= )/g, '');

0 commit comments

Comments
 (0)