Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>
<div class="mx-5">
<h3 class="nhsuk-heading-l nhsuk-u-margin-bottom-2">{{title}}</h3>
<div>{{description}}</div>
<div>{{description}}</div>
<div v-if="!contributeResourceAVFlag && title === 'File' && !isSelected" class="align-self-center">
<div v-html="audioVideoUnavailableView"></div>
</div>
Expand Down Expand Up @@ -39,7 +39,7 @@
},
data() {
return {
contributeResourceAVFlag: false
contributeResourceAVFlag: true
};
},
created() {
Expand All @@ -57,18 +57,17 @@
},
isSelected(): boolean {
return this.resourceDetails.resourceType === this.resourceType;
},
},
audioVideoUnavailableView(): string {
var view = this.$store.state.getAVUnavailableView;
return this.$store.state.getAVUnavailableView;
}
},
methods: {
getContributeResAVResourceFlag() {
resourceData.getContributeAVResourceFlag().then(response => {
this.contributeResourceAVFlag = response;
resourceData.getContributeAVResourceFlag().then(response => {
this.contributeResourceAVFlag = response;
});
},
},
getResourceTypeDescription(resourceType: ResourceType): string {
switch (resourceType) {
case ResourceType.ARTICLE:
Expand Down
10 changes: 7 additions & 3 deletions LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
uploadingFile: null as File,
uploadingTranscriptFile: null as File,
uploadingCaptionsFile: null as File,
contributeResourceAVFlag: true
};
},
computed: {
Expand All @@ -120,15 +121,13 @@
fileUpdated(): ResourceFileModel {
return this.$store.state.fileUpdated;
},
contributeResourceAVFlag(): boolean {
return this.$store.state.contributeAVResourceFlag;
},
audioVideoUnavailableView(): string {
return this.$store.state.getAVUnavailableView;
},
},
created() {
this.setInitialValues();
this.getContributeResAVResourceFlag();
EventBus.$on('deleteFile', (fileTypeToBeDeleted: number) => {
this.processDeleteFile(fileTypeToBeDeleted);
});
Expand All @@ -142,6 +141,11 @@
changeFile() {
this.$emit('filechanged');
},
getContributeResAVResourceFlag() {
resourceData.getContributeAVResourceFlag().then(response => {
this.contributeResourceAVFlag = response;
});
},
changeTranscriptFile() {
$('#transcriptFileUpload').val(null);
$('#transcriptFileUpload').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<script lang="ts">
import Vue, { PropOptions } from 'vue';
import { resourceData } from '../data/resource';
import { ResourceType, UploadResourceType } from '../constants';
import { ContributeSettingsModel } from '../models/contribute/contributeSettingsModel';

Expand All @@ -33,22 +34,30 @@
data() {
return {
uploadResourceType: UploadResourceType,
contributeResourceAVFlag: true
}
},
created() {
this.getContributeResAVResourceFlag();
},
computed: {
contributeSettings(): ContributeSettingsModel {
return this.$store.state.contributeSettings;
},
fileAccept(): string {
return this.$store.state.resourceDetail.resourceType == ResourceType.HTML ? '.zip,.rar,.7zip' : ''
},
contributeResourceAVFlag(): boolean {
return this.$store.state.contributeAVResourceFlag;
},
audioVideoUnavailableView(): string {
return this.$store.state.getAVUnavailableView;
},
},
methods: {
getContributeResAVResourceFlag() {
resourceData.getContributeAVResourceFlag().then(response => {
this.contributeResourceAVFlag = response;
});
},
}
});
</script>

Expand Down