From dbc5dcf07b1dbb10c724c83a48e7e41b394afb0d Mon Sep 17 00:00:00 2001 From: Nicolas Pennec Date: Mon, 2 Oct 2023 21:49:33 +0200 Subject: [PATCH 1/7] [qa] remove undefined store mutation --- src/App.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index 51f57448f7..f780b08582 100644 --- a/src/App.vue +++ b/src/App.vue @@ -358,7 +358,6 @@ export default { 'person:delete'(eventData) { const person = this.personMap.get(eventData.person_id) if (person) { - this.$store.commit('DELETE_PEOPLE_START', person) this.$store.commit('DELETE_PEOPLE_END', person) } }, From a7b4e472d8cc0cfdcead231c6d2de919d7cd8f72 Mon Sep 17 00:00:00 2001 From: Nicolas Pennec Date: Mon, 2 Oct 2023 21:52:18 +0200 Subject: [PATCH 2/7] =?UTF-8?q?[qa]=C2=A0fix=20silent=20error=20on=20refre?= =?UTF-8?q?shMetadataDescriptor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index f780b08582..1e9b5085df 100644 --- a/src/App.vue +++ b/src/App.vue @@ -419,11 +419,15 @@ export default { }, 'metadata-descriptor:new'(eventData) { - this.refreshMetadataDescriptor(eventData.metadata_descriptor_id) + if (this.currentProduction?.id === eventData.project_id) { + this.refreshMetadataDescriptor(eventData.metadata_descriptor_id) + } }, 'metadata-descriptor:update'(eventData) { - this.refreshMetadataDescriptor(eventData.metadata_descriptor_id) + if (this.currentProduction?.id === eventData.project_id) { + this.refreshMetadataDescriptor(eventData.metadata_descriptor_id) + } }, 'metadata-descriptor:delete'(eventData) { From 34ff97aab3b6e2cc84a44f5ead9a896067a08a20 Mon Sep 17 00:00:00 2001 From: Nicolas Pennec Date: Tue, 3 Oct 2023 09:34:37 +0200 Subject: [PATCH 3/7] [qa] refactor code --- src/App.vue | 15 +++++---------- src/components/mixins/search.js | 8 -------- src/components/pages/Assets.vue | 8 +++++--- src/components/pages/Profile.vue | 1 - src/components/tops/Topbar.vue | 9 ++------- src/components/widgets/LightEntityThumbnail.vue | 5 +---- src/store/api/people.js | 6 +++--- src/store/modules/people.js | 1 - src/store/modules/productions.js | 17 ++++++----------- src/store/modules/user.js | 4 ++-- src/store/mutation-types.js | 3 --- 11 files changed, 24 insertions(+), 53 deletions(-) diff --git a/src/App.vue b/src/App.vue index 1e9b5085df..71cce46825 100644 --- a/src/App.vue +++ b/src/App.vue @@ -166,8 +166,7 @@ export default { 'sequence:new'(eventData) { if ( !this.sequenceMap.get(eventData.sequence_id) && - this.currentProduction && - this.currentProduction.id === eventData.project_id + this.currentProduction?.id === eventData.project_id ) { this.loadSequence(eventData.sequence_id) } @@ -188,8 +187,7 @@ export default { 'edit:new'(eventData) { if ( !this.editMap.get(eventData.edit_id) && - this.currentProduction && - this.currentProduction.id === eventData.project_id + this.currentProduction?.id === eventData.project_id ) { this.loadEdit(eventData.edit_id) } @@ -210,8 +208,7 @@ export default { 'episode:new'(eventData) { if ( !this.episodeMap.get(eventData.episode_id) && - this.currentProduction && - this.currentProduction.id === eventData.project_id + this.currentProduction?.id === eventData.project_id ) { this.loadEpisode(eventData.episode_id) } @@ -232,8 +229,7 @@ export default { 'shot:new'(eventData) { if ( !this.shotMap.get(eventData.shot_id) && - this.currentProduction && - this.currentProduction.id === eventData.project_id && + this.currentProduction?.id === eventData.project_id && (!this.isTVShow || this.currentEpisode.id === eventData.episode_id) ) { setTimeout(() => { @@ -257,8 +253,7 @@ export default { 'asset:new'(eventData) { if ( !this.assetMap.get(eventData.asset_id) && - this.currentProduction && - this.currentProduction.id === eventData.project_id + this.currentProduction?.id === eventData.project_id ) { setTimeout(() => { this.loadAsset(eventData.asset_id) diff --git a/src/components/mixins/search.js b/src/components/mixins/search.js index f74469735f..a2d720387c 100644 --- a/src/components/mixins/search.js +++ b/src/components/mixins/search.js @@ -3,14 +3,6 @@ * list. */ export const searchMixin = { - created() {}, - - mounted() {}, - - beforeDestroy() {}, - - computed: {}, - methods: { changeSearch(searchQuery) { this.searchField.setValue(searchQuery.search_query) diff --git a/src/components/pages/Assets.vue b/src/components/pages/Assets.vue index e40affa0bc..4f361df143 100644 --- a/src/components/pages/Assets.vue +++ b/src/components/pages/Assets.vue @@ -680,15 +680,16 @@ export default { this.loading.deleteAllTasks = true this.deleteAllAssetTasks({ projectId, taskTypeId, selectionOnly }) .then(() => { - this.loading.deleteAllTasks = false if (!selectionOnly) this.loadAssets() this.modals.isDeleteAllTasksDisplayed = false }) .catch(err => { console.error(err) - this.loading.deleteAllTasks = false this.errors.deleteAllTasks = true }) + .finally(() => { + this.loading.deleteAllTasks = false + }) }, confirmDeleteMetadata() { @@ -697,12 +698,13 @@ export default { this.deleteMetadataDescriptor(this.descriptorIdToDelete) .then(() => { this.errors.deleteMetadata = false - this.loading.deleteMetadata = false this.modals.isDeleteMetadataDisplayed = false }) .catch(err => { console.error(err) this.errors.deleteMetadata = true + }) + .finally(() => { this.loading.deleteMetadata = false }) }, diff --git a/src/components/pages/Profile.vue b/src/components/pages/Profile.vue index d3402c3ec6..5bbc1a60b5 100644 --- a/src/components/pages/Profile.vue +++ b/src/components/pages/Profile.vue @@ -288,7 +288,6 @@ /> diff --git a/src/components/tops/Topbar.vue b/src/components/tops/Topbar.vue index 6d979d4385..aee8030ed7 100644 --- a/src/components/tops/Topbar.vue +++ b/src/components/tops/Topbar.vue @@ -112,12 +112,8 @@