Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
71ed824
Merge pull request #286 from TechnologyEnhancedLearning/RC
binon Apr 15, 2024
fc75b25
TD-1325: Reverted the changes as it is causing some LMS server issues
Swapnamol Apr 17, 2024
904086b
Merge pull request #298 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol Apr 17, 2024
6cb0c53
TD-4052 bugfix
OluwatobiAwe Apr 18, 2024
88fa9f8
Merge pull request #299 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe Apr 18, 2024
fa11301
TD3828 - Configured Case and assessment to use AMS flag
binon Apr 18, 2024
9123b77
TD-3828, updated the way the popup works in caseassesment vue page
binon Apr 19, 2024
497c23d
TD-4057: Limited the characters to 3000 to findwise
sarathlal-sarangadharan Apr 19, 2024
8979d3a
Replace search button text to Search. Correct catalogue alt name. Rem…
akdalin-hee Apr 19, 2024
390de0f
Merge pull request #302 from TechnologyEnhancedLearning/TD-3162-TD-31…
akdalin-hee Apr 19, 2024
da05f67
Merge pull request #300 from TechnologyEnhancedLearning/Develop/Featu…
binon Apr 19, 2024
4944fb5
TD-3023 move deleted case resource files to archive
OluwatobiAwe Apr 22, 2024
1b4752c
Merge pull request #301 from TechnologyEnhancedLearning/Develop/Featu…
sarathlal-sarangadharan Apr 22, 2024
27b2cb9
Correct Skipped headiing issue for catalogue folders
akdalin-hee Apr 22, 2024
56208e5
Merge pull request #303 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe Apr 22, 2024
6a809bc
TD-4057: Re-introduced the label with "Only the first 3,000 character…
sarathlal-sarangadharan Apr 22, 2024
fc906f5
TD-3285, fixed the "case/assessment resources - disable uploading vid…
binon Apr 22, 2024
f300e25
Merge pull request #304 from TechnologyEnhancedLearning/TD-3162-TD-31…
akdalin-hee Apr 22, 2024
aad3163
Merge pull request #306 from TechnologyEnhancedLearning/Develop/Featu…
binon Apr 22, 2024
5283591
Merge pull request #307 from TechnologyEnhancedLearning/RC
binon Apr 22, 2024
0f379dd
TD-4058: Assessment - Submit answers results in unknown error
Swapnamol Apr 22, 2024
4109822
Fixed the style cop issues
Swapnamol Apr 22, 2024
9208610
Merge pull request #305 from TechnologyEnhancedLearning/TD-4057-Limit…
sarathlal-sarangadharan Apr 22, 2024
30edd5a
Merge pull request #308 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol Apr 22, 2024
5495653
TD-3023 Delete files associated with resources without older versions
OluwatobiAwe Apr 23, 2024
532b947
Merge pull request #309 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe Apr 23, 2024
9a87e59
TD-3023 Azureshareclient bugfix and logic to revalidate input directory
OluwatobiAwe Apr 23, 2024
beec087
TD-3828, Moved the waring banner at the top of resource type and reve…
binon Apr 23, 2024
2341115
Merge pull request #311 from TechnologyEnhancedLearning/Develop/Featu…
binon Apr 23, 2024
782c95e
Merge pull request #310 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe Apr 23, 2024
27be6bc
Merge pull request #312 from TechnologyEnhancedLearning/RC
binon Apr 23, 2024
4769386
TD-3828 Added extra validation on video file contributemediapublished…
binon Apr 23, 2024
ba3315a
Merge pull request #313 from TechnologyEnhancedLearning/Develop/Featu…
binon Apr 23, 2024
6241d1e
TD-2954: Issues with audio,video,assessment resolved. Also handled du…
sarathlal-sarangadharan Apr 23, 2024
7263b3a
Merge pull request #314 from TechnologyEnhancedLearning/Develop/Featu…
sarathlal-sarangadharan Apr 23, 2024
a496243
TD3828- Publish view, the vue store doesnt popultate the warning vie,…
binon Apr 24, 2024
d5688f9
Merge pull request #315 from TechnologyEnhancedLearning/Develop/Featu…
binon Apr 24, 2024
90d5a04
TD-4057: Description limit moved to apsettings
sarathlal-sarangadharan Apr 24, 2024
7724118
Merge pull request #316 from TechnologyEnhancedLearning/Develop/Featu…
sarathlal-sarangadharan Apr 24, 2024
361b9b5
TD-3023 Delete folder after copying folder and content to another sto…
OluwatobiAwe Apr 24, 2024
7d63dc3
Merge pull request #317 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe Apr 24, 2024
9abcc77
TD-4058: Assessment - Submit answers results in unknown error
Swapnamol Apr 24, 2024
923ea8b
Merge pull request #318 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol Apr 24, 2024
126a875
TD-4057: Findwise limit varies when update,show catalogue setting iss…
sarathlal-sarangadharan Apr 24, 2024
329993b
Merge pull request #319 from TechnologyEnhancedLearning/Develop/Featu…
sarathlal-sarangadharan Apr 25, 2024
31354ff
TD-4105: Issue with the assessments showing the 'Too many attempts' e…
Swapnamol Apr 25, 2024
58c0b5e
TD-4067: Issue in elearning when multiple version is available has be…
sarathlal-sarangadharan Apr 25, 2024
acf5321
Merge pull request #320 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol Apr 25, 2024
a5056db
Merge pull request #321 from TechnologyEnhancedLearning/Develop/Fixes…
sarathlal-sarangadharan Apr 25, 2024
44a9d01
TD-3023 refactor Case and assessment blockcollection obsolete file re…
OluwatobiAwe Apr 26, 2024
8aee4f3
TD-3023
OluwatobiAwe Apr 26, 2024
b7be45b
TD-3023 video filepath update
OluwatobiAwe Apr 29, 2024
b48bb8c
Merge pull request #322 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe Apr 29, 2024
9307479
TD-4106: Issue with Formal assessments learning record showing as '0%…
sarathlal-sarangadharan Apr 29, 2024
1b3eafd
Merge pull request #323 from TechnologyEnhancedLearning/Develop/Fixes…
sarathlal-sarangadharan Apr 29, 2024
4c0dfc6
TD-4108: Certificate issue for assessment and audio/video has been re…
sarathlal-sarangadharan Apr 30, 2024
067d659
Merge pull request #328 from TechnologyEnhancedLearning/Develop/Fixes…
sarathlal-sarangadharan Apr 30, 2024
774d3c7
TD-4106: Doplicate record for assessment with dafault date issue reso…
sarathlal-sarangadharan Apr 30, 2024
1109d49
Merge pull request #329 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol Apr 30, 2024
8b6871d
TD-4108:Certficate issue for assessments resolved. Failed record not …
sarathlal-sarangadharan May 1, 2024
1c42658
Merge pull request #332 from TechnologyEnhancedLearning/Develop/Fixes…
sarathlal-sarangadharan May 1, 2024
c31cb98
TD-4108: Fixed the issue with the certificate visibility
Swapnamol May 2, 2024
f441366
Merge pull request #333 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 2, 2024
6de6bb0
TD-4115 - Issues on showing statuses on 'My accessed Learning'
Swapnamol May 2, 2024
4ac87fc
Merge pull request #334 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 2, 2024
e2c475f
TD-4115: Issue 3 - Contributed to ‘Formal assessment’ slide viewer im…
Swapnamol May 2, 2024
7119a81
Modified
Swapnamol May 2, 2024
d3430a2
Merge pull request #335 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 2, 2024
b00b63d
TD-4016: Issue with informal assessment duplicate record while searching
Swapnamol May 2, 2024
976b8ae
Merge pull request #336 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 2, 2024
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 @@ -138,6 +138,7 @@
<div class="col-12">
<label for="Description">Description</label>
<textarea asp-for="Description" class="form-control"></textarea>
<small id="with-hint-info" class="pt-2">Only the first 3,000 characters of the description will be used by search</small>
<span asp-validation-for="Description"></span>
</div>
</div>
Expand Down
271 changes: 269 additions & 2 deletions LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions LearningHub.Nhs.WebUI/Controllers/Api/ScormController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,6 @@ private async Task<bool> Commit(SCO scoObject)
try
{
var activeContent = this.userService.GetActiveContentAsync().Result;
////if (activeContent.Count == 0)
////{
//// return false;
////}

if (!activeContent.Any(ac => ac.ScormActivityId == scoObject.InstanceId))
{
throw new Exception($"User does not have ActiveContent for ScormActivityId={scoObject.InstanceId}");
Expand Down Expand Up @@ -265,10 +260,6 @@ private async Task<bool> Commit(SCO scoObject)

// Persist update.
await this.activityService.UpdateScormActivityAsync(scoObject);
////if (scoObject.LessonStatusId == ScormLessionStatus.ActivityStatusId(ScormLessionStatus.Completed) || scoObject.LessonStatusId == ScormLessionStatus.ActivityStatusId(ScormLessionStatus.Passed))
////{
//// await this.activityService.CompleteScormActivity(scoObject);
////}

return true;
}
Expand Down
4 changes: 2 additions & 2 deletions LearningHub.Nhs.WebUI/Helpers/ViewActivityHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public static string GetActivityStatusText(this ActivityDetailedItemViewModel ac
/// <returns>The <see cref="bool"/>.</returns>
public static bool CanShowScore(this ActivityDetailedItemViewModel activityDetailedItemViewModel)
{
if ((activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Scorm && (activityDetailedItemViewModel.MasteryScore > 0 || activityDetailedItemViewModel.MasteryScore == null) && ((activityDetailedItemViewModel.ScorePercentage > 0 && activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Passed) || activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Failed)) || ((activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Assessment || activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Case) && activityDetailedItemViewModel.Complete))
if ((activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Scorm && (activityDetailedItemViewModel.MasteryScore > 0 || activityDetailedItemViewModel.MasteryScore == null) && ((activityDetailedItemViewModel.ScorePercentage > 0 && activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Passed) || activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Failed)) || (activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Assessment && (activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Completed || activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Passed || activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Failed)) || (activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Case && activityDetailedItemViewModel.Complete))
{
return true;
}
Expand All @@ -241,7 +241,7 @@ public static bool CanShowScore(this ActivityDetailedItemViewModel activityDetai
/// <returns>The <see cref="bool"/>bool.</returns>
public static bool CanViewPercentage(this ActivityDetailedItemViewModel activityDetailedItemViewModel)
{
if (((activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Video || activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Audio) && activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.InProgress) || (activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Assessment && activityDetailedItemViewModel.Complete == false))
if (((activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Video || activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Audio) && activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.InProgress) || (activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Assessment && activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.InProgress))
{
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
:characterLimit="60"
:isH3="true"></EditSaveFieldWithCharacterCount>
<h3 class="my-0"
v-else>{{ block.title }}</h3>
v-else>
{{ block.title }}
</h3>
<Tick :complete="block.isReadyToPublish()"
class="pl-10"></Tick>
</div>
Expand All @@ -50,7 +52,8 @@
ariaLabel="Move section down"
class="contribute-block-component-button"></IconButton>
</div>
<IconButton v-if="!canBeDuplicated"
<IconButton v-if="!canBeDuplicated && !contributeResourceAVFlag && block.blockType === BlockTypeEnum.Media"></IconButton>
<IconButton v-else
@click="duplicateBlock"
iconClasses="fa-regular fa-clone"
ariaLabel="Duplicate section"
Expand Down Expand Up @@ -131,6 +134,7 @@
import ContributeImageCarouselBlock from "./ContributeImageCarouselBlock.vue";
import { QuestionBlockModel } from "../models/contribute-resource/blocks/questionBlockModel";
import { EventBus } from './contributeResourceEvents';
import { resourceData } from '../data/resource';

export default Vue.extend({
components: {
Expand Down Expand Up @@ -162,10 +166,12 @@
discardBlockModalOpen: false,
BlockTypeEnum: BlockTypeEnum,
isOpen: true,
contributeResourceAVFlag: true
};
},
created() {
this.isOpen = true;
this.getContributeResAVResourceFlag();
},
watch: {
isOpen(newVal, oldVal) {
Expand All @@ -180,6 +186,11 @@
event.target.blur();
event.target.parentElement.blur();
this.$emit('duplicate');
},
getContributeResAVResourceFlag() {
resourceData.getContributeAVResourceFlag().then(response => {
this.contributeResourceAVFlag = response;
});
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<div class="contribute-case-component lh-padding-fluid">
<div class="lh-container-xl py-15">
<div class="py-10 text-center placeholder-text"
v-if="!hasContentOnPage">You have not added any content to this page yet
v-if="!hasContentOnPage">
You have not added any content to this page yet
</div>
<template v-else>
<FilteredBlockCollectionView
:resourceType="resourceType"
:blockCollection="blockCollection"
:selection="blockCollection => blockCollection.getBlocksByPage(page).filter(block => block.blockType !== BlockTypeEnum.Question)"
:can-be-duplicated="duplicatingBlocks"
:blocksToDuplicate="blocksToDuplicate"
@annotateWholeSlideImage="showSlideWithAnnotations"
@duplicateBlock="blockId => $emit('duplicateBlock', blockId)"/>
<FilteredBlockCollectionView :resourceType="resourceType"
:blockCollection="blockCollection"
:selection="blockCollection => blockCollection.getBlocksByPage(page).filter(block => block.blockType !== BlockTypeEnum.Question)"
:can-be-duplicated="duplicatingBlocks"
:blocksToDuplicate="blocksToDuplicate"
@annotateWholeSlideImage="showSlideWithAnnotations"
@duplicateBlock="blockId => $emit('duplicateBlock', blockId)" />
</template>

<ContributeAddContentBlock @add="choosingNewContentBlock = true"></ContributeAddContentBlock>
Expand All @@ -25,13 +25,19 @@
ref="addMediaInput"
multiple
@change="uploadNewMediaFiles"
class="visually-hidden"/>
class="visually-hidden" />

<Modal v-if="avUnavailableMessage">
<div v-html="audioVideoUnavailableView"></div>
<button type="button" class="nhsuk-button nhsuk-button--secondary mt-2 col-4 col-sm-3 col-md-2" @click="cancelAVUnavailModal">Cancel</button>
</Modal>
</div>
</div>
</template>

<script lang="ts">
import Vue, { PropOptions } from 'vue';
import { resourceData } from '../data/resource';
import ContributeBlock from './ContributeBlock.vue';
import ContributeAddContentBlock from './ContributeAddContentBlock.vue';
import ContributeChooseContentBlockType from './ContributeChooseContentBlockType.vue';
Expand All @@ -40,11 +46,14 @@
import {
FileUploadType,
getAllowedFileExtensionsInAcceptFormat,
startUploadsFromFileElement
startUploadsFromFileElement,
getMediaTypeFromFileExtension
} from '../helpers/fileUpload';
import FilteredBlockCollectionView from './components/questions/FilteredBlockCollectionView.vue';
import { WholeSlideImageModel } from "../models/contribute-resource/blocks/wholeSlideImageModel";
import { ResourceType } from "../constants";
import { MediaTypeEnum } from '../models/contribute-resource/blocks/mediaTypeEnum';
import Modal from '../globalcomponents/Modal.vue';

export default Vue.extend({
props: {
Expand All @@ -59,16 +68,25 @@
ContributeAddContentBlock,
ContributeChooseContentBlockType,
FilteredBlockCollectionView,
Modal,
},
data() {
return {
choosingNewContentBlock: false,
BlockTypeEnum,
contributeResourceAVFlag: true,
avUnavailableMessage: false
};
},
created() {
this.getContributeResAVResourceFlag();
},
computed: {
hasContentOnPage(): boolean {
return this.blockCollection?.getBlocksByPage(this.page)?.filter(block => block.blockType !== BlockTypeEnum.Question).length > 0;
},
audioVideoUnavailableView(): string {
return this.$store.state.getAVUnavailableView;
}
},
methods: {
Expand All @@ -90,14 +108,42 @@
}
},
async uploadNewMediaFiles(event: any): Promise<void> {
startUploadsFromFileElement(
event.target as HTMLInputElement,
(fileId, mediaType) => this.blockCollection.addMediaBlock(fileId, mediaType, this.page)
);
var targetItem = event.target as HTMLInputElement;
var startUpload = true;

if (targetItem.value !== '') {
for (let i = 0; i < targetItem.files.length; i++) {
const file = targetItem.files[i] as File;
const fileExtension = file.name.split('.').pop();
const mediaType = getMediaTypeFromFileExtension(`.${fileExtension}`);

if (!this.contributeResourceAVFlag && (mediaType === MediaTypeEnum.Video)) {
startUpload = false;
this.avUnavailableMessage = true;
}
else { startUpload = true; }
}
}

if (startUpload) {
startUploadsFromFileElement(
event.target as HTMLInputElement,
(fileId, mediaType) => this.blockCollection.addMediaBlock(fileId, mediaType, this.page)
);
}
targetItem.value = '';
},
showSlideWithAnnotations(wholeSlideImageToShow: WholeSlideImageModel) {
this.$emit('annotateWholeSlideImage', wholeSlideImageToShow, false);
},
cancelAVUnavailModal() {
this.avUnavailableMessage = false;
},
getContributeResAVResourceFlag() {
resourceData.getContributeAVResourceFlag().then(response => {
this.contributeResourceAVFlag = response;
});
}
},
});
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@
<div class="mx-5">
<h3 class="nhsuk-heading-l nhsuk-u-margin-bottom-2">{{title}}</h3>
<div>{{description}}</div>
<div v-if="!contributeResourceAVFlag && title === 'File' && !isSelected" class="align-self-center">
<div v-html="audioVideoUnavailableView"></div>
</div>
</div>
<div v-if="isSelected" class="align-self-center select_resource_type_component_tick_wrapper">
<Tick class="select_resource_type_component_tick" complete></Tick>
</div>
<div v-if="!isSelected" class="align-self-center">
<Button v-on:click="onSelectClick">Select</Button>
</div>
<div v-if="isSelected" class="align-self-center select_resource_type_component_tick_wrapper">
<Tick class="select_resource_type_component_tick" complete></Tick>
</div>
</div>
</template>

<script lang="ts">
import Vue, { PropOptions } from 'vue';
import { commonlib } from '../common';
import { resourceData } from '../data/resource';
import Button from '../globalcomponents/Button.vue';
import Tick from '../globalcomponents/Tick.vue';
import { ResourceType } from '../constants';
Expand All @@ -37,14 +33,6 @@
resourceType: { type: Number } as PropOptions<ResourceType>,
resourceDetails: { type: Object } as PropOptions<ContributeResourceDetailModel>,
},
data() {
return {
contributeResourceAVFlag: true
};
},
created() {
this.getContributeResAVResourceFlag();
},
computed: {
title(): String {
return commonlib.getResourceTypeText(this.resourceType);
Expand All @@ -57,17 +45,9 @@
},
isSelected(): boolean {
return this.resourceDetails.resourceType === this.resourceType;
},
audioVideoUnavailableView(): string {
return this.$store.state.getAVUnavailableView;
}
},
methods: {
getContributeResAVResourceFlag() {
resourceData.getContributeAVResourceFlag().then(response => {
this.contributeResourceAVFlag = response;
});
},
getResourceTypeDescription(resourceType: ResourceType): string {
switch (resourceType) {
case ResourceType.ARTICLE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<div class="lh-padding-fluid">
<div class="lh-container-xl">
<h2 id="title-label" class="nhsuk-heading-l">Select a resource type</h2>
<div v-if="!contributeResourceAVFlag" class="align-self-center">
<div v-html="audioVideoUnavailableView"></div>
</div>
<SelectResourceType :resourceType="resourceType.GENERICFILE" v-bind:resourceDetails="resourceDetails"></SelectResourceType>
<SelectResourceType :resourceType="resourceType.WEBLINK" v-bind:resourceDetails="resourceDetails"></SelectResourceType>
<SelectResourceType :resourceType="resourceType.ARTICLE" v-bind:resourceDetails="resourceDetails"></SelectResourceType>
Expand All @@ -18,6 +21,7 @@
import SelectResourceType from './SelectResourceType.vue';
import { ResourceType } from '../constants';
import { ContributeResourceDetailModel } from '../models/contribute/contributeResourceModel';
import { resourceData } from '../data/resource';

export default Vue.extend({
props: {
Expand All @@ -28,8 +32,24 @@
},
data() {
return {
resourceType: ResourceType
resourceType: ResourceType,
contributeResourceAVFlag: true
}
},
created() {
this.getContributeResAVResourceFlag();
},
computed: {
audioVideoUnavailableView(): string {
return this.$store.state.getAVUnavailableView;
}
},
methods: {
getContributeResAVResourceFlag() {
resourceData.getContributeAVResourceFlag().then(response => {
this.contributeResourceAVFlag = response;
});
},
}
});
</script>
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<template>
<div class="contribute-add-content-block-component-option">
<div class="contribute-add-content-block-component-option--icon">
<img v-bind:src="imgSrc" class="flexible-image"/>
<img v-bind:src="imgSrc" class="flexible-image" />
</div>
<div class="contribute-add-content-block-component-option--description">
<h5>{{blockTypeName}}</h5>
<p>{{blockDescription}}</p>
<div v-if="!contributeResourceAVFlag && blockTypeName === 'Media'">
<div v-html="audioVideoUnavailableView"></div>
</div>
</div>
<Button v-on:click="$emit('choose')">Select</Button>
</div>
</template>

<script lang="ts">
import Vue, { PropOptions } from 'vue';
import { resourceData } from '../../../data/resource';

import Button from "../../../globalcomponents/Button.vue";

Expand All @@ -27,6 +31,26 @@
blockTypeName: String,
blockDescription: String,
},
data() {
return {
contributeResourceAVFlag: true
}
},
created() {
this.getContributeResAVResourceFlag();
},
computed: {
audioVideoUnavailableView(): string {
return this.$store.state.getAVUnavailableView;
},
},
methods: {
getContributeResAVResourceFlag() {
resourceData.getContributeAVResourceFlag().then(response => {
this.contributeResourceAVFlag = response;
});
}
}
})
</script>

Expand Down
Loading