diff --git a/src/views/admin/admin.vue b/src/views/admin/admin.vue index 1e6a6b142..8483f62ff 100644 --- a/src/views/admin/admin.vue +++ b/src/views/admin/admin.vue @@ -96,10 +96,13 @@ } }, watch: { - '$route' (to) { - this.isMenuCompressed = (to.params.collectionId != undefined); - this.activeRoute = to.name; - this.isRepositoryLevel = this.$route.params.collectionId == undefined; + '$route': { + handler(to) { + this.isMenuCompressed = (to.params.collectionId != undefined); + this.activeRoute = to.name; + this.isRepositoryLevel = this.$route.params.collectionId == undefined; + }, + deep: true } }, created() { diff --git a/src/views/admin/components/filter-types/autocomplete/Autocomplete.vue b/src/views/admin/components/filter-types/autocomplete/Autocomplete.vue index c4c08f0b7..749ea38e9 100644 --- a/src/views/admin/components/filter-types/autocomplete/Autocomplete.vue +++ b/src/views/admin/components/filter-types/autocomplete/Autocomplete.vue @@ -65,8 +65,11 @@ } }, watch: { - 'query'() { - this.updateSelectedValues(); + 'query': { + handler() { + this.updateSelectedValues(); + }, + deep: true } }, mounted() { diff --git a/src/views/admin/components/filter-types/date-interval/DateInterval.vue b/src/views/admin/components/filter-types/date-interval/DateInterval.vue index 175f4aac7..7dc5a0e43 100644 --- a/src/views/admin/components/filter-types/date-interval/DateInterval.vue +++ b/src/views/admin/components/filter-types/date-interval/DateInterval.vue @@ -79,8 +79,11 @@ if ( val && this.dateEnd === null) this.dateEnd = new Date(); }, - 'query'() { - this.updateSelectedValues(); + 'query': { + handler() { + this.updateSelectedValues(); + }, + deep: true } }, mounted() { diff --git a/src/views/admin/components/filter-types/date/Date.vue b/src/views/admin/components/filter-types/date/Date.vue index f4f01e11f..4e8a6a902 100644 --- a/src/views/admin/components/filter-types/date/Date.vue +++ b/src/views/admin/components/filter-types/date/Date.vue @@ -149,8 +149,11 @@ } }, watch: { - 'query'() { - this.updateSelectedValues(); + 'query': { + handler() { + this.updateSelectedValues(); + }, + deep: true, }, }, mounted() { diff --git a/src/views/admin/components/filter-types/numeric-interval/NumericInterval.vue b/src/views/admin/components/filter-types/numeric-interval/NumericInterval.vue index 389f5f296..8772b6d47 100644 --- a/src/views/admin/components/filter-types/numeric-interval/NumericInterval.vue +++ b/src/views/admin/components/filter-types/numeric-interval/NumericInterval.vue @@ -40,9 +40,12 @@ } }, watch: { - 'query'() { - this.updateSelectedValues(); - }, + 'query': { + handler() { + this.updateSelectedValues(); + }, + deep: true + } }, mounted() { this.updateSelectedValues(); diff --git a/src/views/admin/components/filter-types/numeric-list-interval/NumericListInterval.vue b/src/views/admin/components/filter-types/numeric-list-interval/NumericListInterval.vue index 633470b15..f194c4365 100644 --- a/src/views/admin/components/filter-types/numeric-list-interval/NumericListInterval.vue +++ b/src/views/admin/components/filter-types/numeric-list-interval/NumericListInterval.vue @@ -33,8 +33,11 @@ } }, watch: { - 'query'() { - this.updateSelectedValues(); + 'query': { + handler() { + this.updateSelectedValues(); + }, + deep: true } }, mounted() { diff --git a/src/views/admin/components/filter-types/numeric/Numeric.vue b/src/views/admin/components/filter-types/numeric/Numeric.vue index 83286e1e7..a80ba94fc 100644 --- a/src/views/admin/components/filter-types/numeric/Numeric.vue +++ b/src/views/admin/components/filter-types/numeric/Numeric.vue @@ -102,8 +102,11 @@ } }, watch: { - 'query'() { - this.updateSelectedValues(); + 'query': { + handler() { + this.updateSelectedValues(); + }, + deep: true } }, mounted() { diff --git a/src/views/admin/components/filter-types/taginput/Taginput.vue b/src/views/admin/components/filter-types/taginput/Taginput.vue index e8929c465..8d3a17219 100644 --- a/src/views/admin/components/filter-types/taginput/Taginput.vue +++ b/src/views/admin/components/filter-types/taginput/Taginput.vue @@ -76,8 +76,11 @@ } }, watch: { - 'query'() { - this.updateSelectedValues(); + 'query': { + handler() { + this.updateSelectedValues(); + }, + deep: true } }, created() { diff --git a/src/views/admin/components/filter-types/taxonomy/Taginput.vue b/src/views/admin/components/filter-types/taxonomy/Taginput.vue index 86c0ebb52..dc89558d7 100644 --- a/src/views/admin/components/filter-types/taxonomy/Taginput.vue +++ b/src/views/admin/components/filter-types/taxonomy/Taginput.vue @@ -67,8 +67,11 @@ }, immediate: true }, - 'query'() { - this.updateSelectedValues(); + 'query': { + handler() { + this.updateSelectedValues(); + }, + deep: true } }, created() { diff --git a/src/views/admin/components/lists/collection-metadata-list.vue b/src/views/admin/components/lists/collection-metadata-list.vue index 8063ab295..ed2fc59b2 100644 --- a/src/views/admin/components/lists/collection-metadata-list.vue +++ b/src/views/admin/components/lists/collection-metadata-list.vue @@ -569,7 +569,8 @@ export default { this.editMetadataSection(newQuery.sectionEdit); } }, - immediate: true + immediate: true, + deep: true }, collapseAll(isCollapsed) { this.activeMetadataSectionsList.forEach((metadataSection) => { @@ -581,8 +582,8 @@ export default { mounted() { this.cleanMetadataSections(); - this.$eventBusMetadataList.$on('addMetadatumViaButton', this.addMetadatumViaButton); - this.$eventBusMetadataList.$on('addMetadataSectionViaButton', this.addMetadataSectionViaButton); + this.$eventBusMetadataList.$emitter.$on('addMetadatumViaButton', this.addMetadatumViaButton); + this.$eventBusMetadataList.$emitter.$on('addMetadataSectionViaButton', this.addMetadataSectionViaButton); this.collectionId = this.$route.params.collectionId; this.isLoadingMetadataSections = true; @@ -600,8 +601,8 @@ export default { if (this.metadataSearchCancel != undefined) this.metadataSearchCancel.cancel('Metadata search Canceled.'); - this.$eventBusMetadataList.$off('addMetadatumViaButton', this.addMetadatumViaButton); - this.$eventBusMetadataList.$off('addMetadataSectionViaButton', this.addMetadataSectionViaButton); + this.$eventBusMetadataList.$emitter.$off('addMetadatumViaButton', this.addMetadatumViaButton); + this.$eventBusMetadataList.$emitter.$off('addMetadataSectionViaButton', this.addMetadataSectionViaButton); }, methods: { ...mapActions('metadata', [ diff --git a/src/views/admin/components/lists/collections-list.vue b/src/views/admin/components/lists/collections-list.vue index 122d8d621..48b3b808f 100644 --- a/src/views/admin/components/lists/collections-list.vue +++ b/src/views/admin/components/lists/collections-list.vue @@ -392,23 +392,29 @@ export default { } }, watch: { - collections() { - this.selectedCollections = []; - for (let i = 0; i < this.collections.length; i++) - this.selectedCollections.push(false); + collections: { + handler() { + this.selectedCollections = []; + for (let i = 0; i < this.collections.length; i++) + this.selectedCollections.push(false); + }, + deep: true }, - selectedCollections() { - let allSelected = true; - let isSelecting = false; - for (let i = 0; i < this.selectedCollections.length; i++) { - if (this.selectedCollections[i] == false) { - allSelected = false; - } else { - isSelecting = true; + selectedCollections: { + handler() { + let allSelected = true; + let isSelecting = false; + for (let i = 0; i < this.selectedCollections.length; i++) { + if (this.selectedCollections[i] == false) { + allSelected = false; + } else { + isSelecting = true; + } } - } - this.allCollectionsOnPageSelected = allSelected; - this.isSelectingCollections = isSelecting; + this.allCollectionsOnPageSelected = allSelected; + this.isSelectingCollections = isSelecting; + }, + deep: true } }, methods: { diff --git a/src/views/admin/components/lists/processes-list.vue b/src/views/admin/components/lists/processes-list.vue index 6000cab95..141073842 100644 --- a/src/views/admin/components/lists/processes-list.vue +++ b/src/views/admin/components/lists/processes-list.vue @@ -358,27 +358,33 @@ } }, watch: { - processes() { - this.selected = []; - for (let i = 0; i < this.processes.length; i++) - this.selected.push(false); - - this.collapses = []; - for (let i = 0; i < this.processes.length; i++) - this.collapses.push(false); + processes: { + handler() { + this.selected = []; + for (let i = 0; i < this.processes.length; i++) + this.selected.push(false); + + this.collapses = []; + for (let i = 0; i < this.processes.length; i++) + this.collapses.push(false); + }, + deep: true }, - selected() { - let allSelected = true; - let isSelecting = false; - for (let i = 0; i < this.selected.length; i++) { - if (this.selected[i] == false) { - allSelected = false; - } else { - isSelecting = true; + selected: { + handler() { + let allSelected = true; + let isSelecting = false; + for (let i = 0; i < this.selected.length; i++) { + if (this.selected[i] == false) { + allSelected = false; + } else { + isSelecting = true; + } } - } - this.allOnPageSelected = allSelected; - this.isSelecting = isSelecting; + this.allOnPageSelected = allSelected; + this.isSelecting = isSelecting; + }, + deep: true } }, mounted() { diff --git a/src/views/admin/components/lists/repository-metadata-list.vue b/src/views/admin/components/lists/repository-metadata-list.vue index 0d53bef1c..990cfd71a 100644 --- a/src/views/admin/components/lists/repository-metadata-list.vue +++ b/src/views/admin/components/lists/repository-metadata-list.vue @@ -329,7 +329,8 @@ export default { this.editMetadatum(this.activeMetadatumList[existingMetadataIndex]) } }, - immediate: true + immediate: true, + deep: true }, collapseAll(isCollapsed) { this.activeMetadatumList.forEach((metadatum) => Object.assign(this.collapses, { [metadatum.id]: isCollapsed })); @@ -338,7 +339,7 @@ export default { mounted() { this.cleanMetadata(); this.loadMetadata(); - this.$eventBusMetadataList.$on('addMetadatumViaButton', this.addMetadatumViaButton); + this.$eventBusMetadataList.$emitter.$on('addMetadatumViaButton', this.addMetadatumViaButton); }, beforeUnmount() { // Cancels previous Request diff --git a/src/views/admin/components/lists/taxonomies-list.vue b/src/views/admin/components/lists/taxonomies-list.vue index 59cf4306d..a722dcc1f 100644 --- a/src/views/admin/components/lists/taxonomies-list.vue +++ b/src/views/admin/components/lists/taxonomies-list.vue @@ -275,23 +275,28 @@ } }, watch: { - taxonomies() { - this.selected = []; - for (let i = 0; i < this.taxonomies.length; i++) - this.selected.push(false); + taxonomies: { + handler() { + this.selected = []; + for (let i = 0; i < this.taxonomies.length; i++) + this.selected.push(false); + } }, - selected() { - let allSelected = true; - let isSelecting = false; - for (let i = 0; i < this.selected.length; i++) { - if (this.selected[i] == false) { - allSelected = false; - } else { - isSelecting = true; + selected: { + handler() { + let allSelected = true; + let isSelecting = false; + for (let i = 0; i < this.selected.length; i++) { + if (this.selected[i] == false) { + allSelected = false; + } else { + isSelecting = true; + } } - } - this.allOnPageSelected = allSelected; - this.isSelecting = isSelecting; + this.allOnPageSelected = allSelected; + this.isSelecting = isSelecting; + }, + deep: true } }, methods: { diff --git a/src/views/admin/components/lists/terms-list-hierarchical.vue b/src/views/admin/components/lists/terms-list-hierarchical.vue index af5293e0d..0fe6efbfc 100644 --- a/src/views/admin/components/lists/terms-list-hierarchical.vue +++ b/src/views/admin/components/lists/terms-list-hierarchical.vue @@ -321,12 +321,12 @@ export default { }, created() { this.fetchTerms(); - this.$parent.$on('deleteSelectedTerms', this.deleteSelectedTerms); - this.$parent.$on('updateSelectedTermsParent', this.updateSelectedTermsParent); + this.$parent.$emitter.$on('deleteSelectedTerms', this.deleteSelectedTerms); + this.$parent.$emitter.$on('updateSelectedTermsParent', this.updateSelectedTermsParent); }, beforeUnmount() { - this.$parent.$off('deleteSelectedTerms', this.deleteSelectedTerms); - this.$parent.$off('updateSelectedTermsParent', this.updateSelectedTermsParent); + this.$parent.$emitter.$off('deleteSelectedTerms', this.deleteSelectedTerms); + this.$parent.$emitter.$off('updateSelectedTermsParent', this.updateSelectedTermsParent); }, methods: { ...mapActions('taxonomy', [ diff --git a/src/views/admin/components/metadata-types/compound/child-metadata-list.vue b/src/views/admin/components/metadata-types/compound/child-metadata-list.vue index 9efd2d167..4c499d2a6 100644 --- a/src/views/admin/components/metadata-types/compound/child-metadata-list.vue +++ b/src/views/admin/components/metadata-types/compound/child-metadata-list.vue @@ -279,7 +279,8 @@ this.editMetadatum(this.childrenMetadata[existingMetadataIndex]) } }, - immediate: true + immediate: true, + deep: true }, 'parent.metadata_type_options.children_objects': { handler(childrenObjects) { @@ -288,7 +289,8 @@ else this.childrenMetadata = []; }, - immediate: true + immediate: true, + deep: true }, collapseAll(isCollapsed) { this.childrenMetadata.forEach((metadatum) => Object.assign( this.collapses, { [metadatum.id]: isCollapsed })); diff --git a/src/views/admin/components/metadata-types/relationship/FormRelationship.vue b/src/views/admin/components/metadata-types/relationship/FormRelationship.vue index dad127bc3..dbe81657e 100644 --- a/src/views/admin/components/metadata-types/relationship/FormRelationship.vue +++ b/src/views/admin/components/metadata-types/relationship/FormRelationship.vue @@ -163,7 +163,7 @@ } }, watch:{ - collection( value ){ + collection( value ) { this.collection = value; if( value && value !== '' ) { this.fetchMetadataFromCollection(value); diff --git a/src/views/admin/components/metadata-types/taxonomy/Taxonomy.vue b/src/views/admin/components/metadata-types/taxonomy/Taxonomy.vue index cc67a9049..080fff97f 100644 --- a/src/views/admin/components/metadata-types/taxonomy/Taxonomy.vue +++ b/src/views/admin/components/metadata-types/taxonomy/Taxonomy.vue @@ -157,8 +157,11 @@ } }, watch: { - valueComponent( val ) { - this.$emit('input', val); + valueComponent: { + handler( val ) { + this.$emit('input', val); + }, + deep: true } }, created() { diff --git a/src/views/admin/components/metadata-types/taxonomy/TaxonomyTaginput.vue b/src/views/admin/components/metadata-types/taxonomy/TaxonomyTaginput.vue index 5188f3c7f..761f154af 100644 --- a/src/views/admin/components/metadata-types/taxonomy/TaxonomyTaginput.vue +++ b/src/views/admin/components/metadata-types/taxonomy/TaxonomyTaginput.vue @@ -76,11 +76,14 @@ } }, watch: { - selected() { - if (this.allowSelectToCreate && this.selected[0]) { - this.selected[0].label.includes(`(${this.$i18n.get('select_to_create')})`); - this.selected[0].label = this.selected[0].label.split('(')[0]; - } + selected: { + hanlder() { + if (this.allowSelectToCreate && this.selected[0]) { + this.selected[0].label.includes(`(${this.$i18n.get('select_to_create')})`); + this.selected[0].label = this.selected[0].label.split('(')[0]; + } + }, + deep: true } }, created() { diff --git a/src/views/admin/components/modals/activity-details-modal.vue b/src/views/admin/components/modals/activity-details-modal.vue index 9101aa4a0..8cf53b311 100644 --- a/src/views/admin/components/modals/activity-details-modal.vue +++ b/src/views/admin/components/modals/activity-details-modal.vue @@ -667,9 +667,12 @@ } }, watch: { - '$route' (to, from) { - if (to !== from) - this.$parent.close(); + '$route': { + hanlder(to, from) { + if (to !== from) + this.$parent.close(); + }, + deep: true } }, created() { diff --git a/src/views/admin/components/navigation/tainacan-collection-subheader.vue b/src/views/admin/components/navigation/tainacan-collection-subheader.vue index 3126c395b..dda84fbc9 100644 --- a/src/views/admin/components/navigation/tainacan-collection-subheader.vue +++ b/src/views/admin/components/navigation/tainacan-collection-subheader.vue @@ -146,11 +146,14 @@ export default { } }, watch: { - '$route' (to, from) { - if (to.path != from.path) { - this.activeRoute = to.name; - this.pageTitle = this.$route.meta.title; - } + '$route': { + handler(to, from) { + if (to.path != from.path) { + this.activeRoute = to.name; + this.pageTitle = this.$route.meta.title; + } + }, + deep: true } }, created() { diff --git a/src/views/admin/components/other/processes-popup.vue b/src/views/admin/components/other/processes-popup.vue index a8ecaec2a..5fd80e722 100644 --- a/src/views/admin/components/other/processes-popup.vue +++ b/src/views/admin/components/other/processes-popup.vue @@ -169,17 +169,23 @@ export default { } }, watch: { - updatedProcesses() { - if (this.updatedProcesses.length !== 0) { - for (let updatedProcess of this.updatedProcesses) { - let updatedProcessIndex = this.bgProcesses.findIndex((aProcess) => aProcess.ID == updatedProcess.ID); - if (updatedProcessIndex >= 0) - Object.assign(this.bgProcesses, { [updatedProcessIndex]: updatedProcess }); + updatedProcesses: { + handler() { + if (this.updatedProcesses.length !== 0) { + for (let updatedProcess of this.updatedProcesses) { + let updatedProcessIndex = this.bgProcesses.findIndex((aProcess) => aProcess.ID == updatedProcess.ID); + if (updatedProcessIndex >= 0) + Object.assign(this.bgProcesses, { [updatedProcessIndex]: updatedProcess }); + } } - } + }, + deep: true }, - bgProcesses(newBG) { - this.hasAnyProcessExecuting = newBG.some((element) => element.done <= 0); + bgProcesses: { + hanlder(newBG) { + this.hasAnyProcessExecuting = newBG.some((element) => element.done <= 0); + }, + deep: true } }, created() { diff --git a/src/views/admin/components/search/filters-tags-list.vue b/src/views/admin/components/search/filters-tags-list.vue index b257b462c..b2d0fb950 100644 --- a/src/views/admin/components/search/filters-tags-list.vue +++ b/src/views/admin/components/search/filters-tags-list.vue @@ -134,9 +134,12 @@ } }, watch: { - filterTags() { - if (typeof this.swiper.update == 'function') - this.swiper.update(); + filterTags: { + handler() { + if (typeof this.swiper.update == 'function') + this.swiper.update(); + }, + deep: true } }, mounted() { diff --git a/src/views/admin/pages/lists/filters-page.vue b/src/views/admin/pages/lists/filters-page.vue index baef997e1..51e197c7c 100644 --- a/src/views/admin/pages/lists/filters-page.vue +++ b/src/views/admin/pages/lists/filters-page.vue @@ -535,7 +535,8 @@ export default { this.editFilter(this.activeFiltersList[existingFilterIndex]) } }, - immediate: true + immediate: true, + deep: true } }, created() { diff --git a/src/views/admin/pages/singles/collection-page.vue b/src/views/admin/pages/singles/collection-page.vue index 112380a3e..e5166b6f7 100644 --- a/src/views/admin/pages/singles/collection-page.vue +++ b/src/views/admin/pages/singles/collection-page.vue @@ -37,24 +37,27 @@ export default { } }, watch: { - '$route' (to, from) { - if (!this.isRepositoryLevel && - (from != undefined) && - (from.path != undefined) && - (to.path != from.path) && - (this.collectionId != this.$route.params.collectionId) - ) { - this.isLoadingCollectionBasics = true; - this.collectionId = this.$route.params.collectionId; - this.fetchCollectionBasics({ collectionId: this.collectionId, isContextEdit: true }) - .then(() => { - this.isLoadingCollectionBasics = false; - }) - .catch((error) => { - this.$console.error(error); - this.isLoadingCollectionBasics = false; - }); - } + '$route': { + handler(to, from) { + if (!this.isRepositoryLevel && + (from != undefined) && + (from.path != undefined) && + (to.path != from.path) && + (this.collectionId != this.$route.params.collectionId) + ) { + this.isLoadingCollectionBasics = true; + this.collectionId = this.$route.params.collectionId; + this.fetchCollectionBasics({ collectionId: this.collectionId, isContextEdit: true }) + .then(() => { + this.isLoadingCollectionBasics = false; + }) + .catch((error) => { + this.$console.error(error); + this.isLoadingCollectionBasics = false; + }); + } + }, + deep: true } }, created() { diff --git a/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/components/view-mode-map.vue b/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/components/view-mode-map.vue index 7f61dd9c2..95bfbf663 100644 --- a/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/components/view-mode-map.vue +++ b/src/views/gutenberg-blocks/blocks/faceted-search/theme-search/components/view-mode-map.vue @@ -506,15 +506,18 @@ export default { } }, watch: { - itemsLocations() { - setTimeout(() => { - if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) { - if (this.itemsLocations.length == 1) - this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 }); - else - this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 }); - } - }, 500) + itemsLocations: { + handler() { + setTimeout(() => { + if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) { + if (this.itemsLocations.length == 1) + this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 }); + else + this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 }); + } + }, 500) + }, + deep: true }, selectedGeocoordinateMetadatum() { this.clearSelectedMarkers(); @@ -533,7 +536,8 @@ export default { else this.selectedGeocoordinateMetadatumId = this.$userPrefs.get(prefsGeocoordinateMetadatum); }, - immediate: true + immediate: true, + deep: true } }, methods: { diff --git a/src/views/reports/components/activities-block.vue b/src/views/reports/components/activities-block.vue index e2096d474..eb4a8a378 100644 --- a/src/views/reports/components/activities-block.vue +++ b/src/views/reports/components/activities-block.vue @@ -121,7 +121,8 @@ export default { if (this.chartData && this.chartData.totals) this.buildActivitiesChart(); }, - immediate: true + immediate: true, + deep: true }, }, methods: { diff --git a/src/views/reports/components/activities-per-user-block.vue b/src/views/reports/components/activities-per-user-block.vue index a23d49ae9..cd30bccde 100644 --- a/src/views/reports/components/activities-per-user-block.vue +++ b/src/views/reports/components/activities-per-user-block.vue @@ -54,6 +54,7 @@ export default { this.buildActivitiesPerUserChart(); }, immediate: true, + deep: true } }, methods: { diff --git a/src/views/reports/components/collections-list-block.vue b/src/views/reports/components/collections-list-block.vue index ff31bbf75..38057ae90 100644 --- a/src/views/reports/components/collections-list-block.vue +++ b/src/views/reports/components/collections-list-block.vue @@ -45,7 +45,8 @@ export default { handler() { this.buildCollectionsList(); }, - immediate: true + immediate: true, + deep: true } }, methods: { diff --git a/src/views/reports/components/items-per-term-block.vue b/src/views/reports/components/items-per-term-block.vue index 3af487ee6..0c054265b 100644 --- a/src/views/reports/components/items-per-term-block.vue +++ b/src/views/reports/components/items-per-term-block.vue @@ -171,7 +171,8 @@ export default { if (this.taxonomiesListArray && this.taxonomiesListArray.length) this.selectedTaxonomy = this.taxonomiesListArray[0]; }, - immediate: true + immediate: true, + deep: true }, selectedTaxonomy: { handler() { @@ -179,7 +180,8 @@ export default { if (this.selectedTaxonomy && this.selectedTaxonomy.id) this.loadTaxonomyTerms(); }, - immediate: true + immediate: true, + deep: true }, termsDisplayedPage() { this.buildTaxonomyTermsChart(); diff --git a/src/views/reports/components/items-per-term-collection-block.vue b/src/views/reports/components/items-per-term-collection-block.vue index dbb336a54..c07ec52b1 100644 --- a/src/views/reports/components/items-per-term-collection-block.vue +++ b/src/views/reports/components/items-per-term-collection-block.vue @@ -363,7 +363,8 @@ export default { if (this.metadataListArray && this.metadataListArray.length) this.selectedMetadatum = this.metadataListArray[0]; }, - immediate: true + immediate: true, + deep: true }, selectedMetadatum: { handler() { @@ -373,7 +374,8 @@ export default { this.loadMetadatumTerms(); } }, - immediate: true + immediate: true, + deep: true }, termsDisplayedPage() { this.buildMetadatumTermsChart(); @@ -389,10 +391,13 @@ export default { this.childTermsDisplayedPage = 1; this.buildMetadatumChildTermsChart(); }, - selectedParentTerm() { - if (this.selectedParentTerm[this.selectedParentTerm.length - 1] && this.selectedParentTerm[this.selectedParentTerm.length - 1].id) { - this.loadMetadatumChildTerms(); - } + selectedParentTerm: { + handler() { + if (this.selectedParentTerm[this.selectedParentTerm.length - 1] && this.selectedParentTerm[this.selectedParentTerm.length - 1].id) { + this.loadMetadatumChildTerms(); + } + }, + deep: true }, itemsPerTermChartMode() { this.termsDisplayedPage = 1; diff --git a/src/views/reports/components/metadata-distribution-block.vue b/src/views/reports/components/metadata-distribution-block.vue index e5766fbb8..f574e4a4d 100644 --- a/src/views/reports/components/metadata-distribution-block.vue +++ b/src/views/reports/components/metadata-distribution-block.vue @@ -36,6 +36,7 @@ export default { this.buildMetadataDistributionChart(); }, immediate: true, + deep: true } }, methods: { diff --git a/src/views/reports/components/metadata-types-block.vue b/src/views/reports/components/metadata-types-block.vue index d54b20063..3c90661bd 100644 --- a/src/views/reports/components/metadata-types-block.vue +++ b/src/views/reports/components/metadata-types-block.vue @@ -65,7 +65,8 @@ export default { if (this.chartData && this.chartData.totals) this.buildMetadataTypeChart(); }, - immediate: true + immediate: true, + deep: true } }, methods: { diff --git a/src/views/reports/components/number-block.vue b/src/views/reports/components/number-block.vue index f3fdb43e4..593a42199 100644 --- a/src/views/reports/components/number-block.vue +++ b/src/views/reports/components/number-block.vue @@ -198,8 +198,11 @@ export default { }) }, watch: { - totalByStatus() { - this.buildVisibilityChart(); + totalByStatus: { + handler() { + this.buildVisibilityChart(); + }, + deep: true } }, methods: { diff --git a/src/views/reports/components/terms-per-taxonomy-block.vue b/src/views/reports/components/terms-per-taxonomy-block.vue index 291c62497..ed3ad63e3 100644 --- a/src/views/reports/components/terms-per-taxonomy-block.vue +++ b/src/views/reports/components/terms-per-taxonomy-block.vue @@ -49,7 +49,8 @@ export default { handler() { this.buildTaxonomiesList(); }, - immediate: true + immediate: true, + deep: true } }, methods: { diff --git a/src/views/reports/pages/reports-list.vue b/src/views/reports/pages/reports-list.vue index c84523b19..497a946fa 100644 --- a/src/views/reports/pages/reports-list.vue +++ b/src/views/reports/pages/reports-list.vue @@ -334,7 +334,8 @@ export default { this.loadMetadataList(); } }, - immediate: true + immediate: true, + deep: true } }, created() {