Merge branch 'hotfix/last-modules-ms-392' into develop

This commit is contained in:
Christian Cueni 2021-11-18 15:05:43 +01:00
commit eb348fd68d
1 changed files with 7 additions and 4 deletions

View File

@ -17,7 +17,7 @@
import SCROLL_TO_MUTATION from '@/graphql/gql/local/mutations/scrollTo.gql';
import meMixin from '@/mixins/me';
import MODULE_DETAILS_QUERY from '@/graphql/gql/queries/modules/moduleDetailsQuery';
import MODULE_DETAILS_QUERY from '@/graphql/gql/queries/modules/moduleDetailsQuery.gql';
import ME_QUERY from '@/graphql/gql/queries/meQuery.gql';
export default {
@ -36,6 +36,7 @@
created() {
this.$log.debug('**** module.vue created ****');
this.$log.debug(`||| module id ${this.module.id} |||`);
this.updateLastVisitedModule(this.module.id);
},
mounted() {
@ -54,8 +55,8 @@
return this.$getRidOfEdges(data).module || {};
},
// result({data: {module: {id}}}) {
// // this.$log.debug(`=== updating result for module ${id} ===`);
// // this.updateLastVisitedModule(id);
// this.$log.debug(`=== updating result for module ${id} ===`);
// this.updateLastVisitedModule(id);
// },
fetchPolicy: 'cache-first',
};
@ -72,10 +73,12 @@
this.$log.warn('no module id');
return;
}
if (this.me.lastModule.id === moduleId) {
if (this.me.lastModule && this.me.lastModule.id === moduleId) {
this.$log.debug('same module already set as last module');
return;
}
this.$apollo.mutate({
mutation: UPDATE_LAST_MODULE_MUTATION,
variables: {