Adds an (optional) status check feature, plus some refactoring

This commit is contained in:
Alicia Sykes
2021-06-14 20:44:07 +01:00
parent 195d433f75
commit 0b1f66b7b7
8 changed files with 254 additions and 67 deletions

View File

@@ -28,6 +28,7 @@
:color="item.color"
:backgroundColor="item.backgroundColor"
:itemSize="newItemSize"
:enableStatusCheck="shouldEnableStatusCheck(item.statusCheck)"
@itemClicked="$emit('itemClicked')"
@triggerModal="triggerModal"
/>
@@ -49,6 +50,7 @@ import IframeModal from '@/components/LinkItems/IframeModal.vue';
export default {
name: 'ItemGroup',
inject: ['config'],
props: {
groupId: String,
title: String,
@@ -92,6 +94,10 @@ export default {
modalChanged(changedTo) {
this.$emit('change-modal-visibility', changedTo);
},
shouldEnableStatusCheck(itemPreference) {
const globalPreference = this.config.appConfig.statusCheck || false;
return itemPreference !== undefined ? itemPreference : globalPreference;
},
},
};
</script>