Merge branch 'hotfix/last-modules-ms-392' into develop
This commit is contained in:
commit
eb348fd68d
|
|
@ -17,7 +17,7 @@
|
||||||
import SCROLL_TO_MUTATION from '@/graphql/gql/local/mutations/scrollTo.gql';
|
import SCROLL_TO_MUTATION from '@/graphql/gql/local/mutations/scrollTo.gql';
|
||||||
|
|
||||||
import meMixin from '@/mixins/me';
|
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';
|
import ME_QUERY from '@/graphql/gql/queries/meQuery.gql';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
created() {
|
created() {
|
||||||
this.$log.debug('**** module.vue created ****');
|
this.$log.debug('**** module.vue created ****');
|
||||||
this.$log.debug(`||| module id ${this.module.id} |||`);
|
this.$log.debug(`||| module id ${this.module.id} |||`);
|
||||||
|
|
||||||
this.updateLastVisitedModule(this.module.id);
|
this.updateLastVisitedModule(this.module.id);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -54,8 +55,8 @@
|
||||||
return this.$getRidOfEdges(data).module || {};
|
return this.$getRidOfEdges(data).module || {};
|
||||||
},
|
},
|
||||||
// result({data: {module: {id}}}) {
|
// result({data: {module: {id}}}) {
|
||||||
// // this.$log.debug(`=== updating result for module ${id} ===`);
|
// this.$log.debug(`=== updating result for module ${id} ===`);
|
||||||
// // this.updateLastVisitedModule(id);
|
// this.updateLastVisitedModule(id);
|
||||||
// },
|
// },
|
||||||
fetchPolicy: 'cache-first',
|
fetchPolicy: 'cache-first',
|
||||||
};
|
};
|
||||||
|
|
@ -72,10 +73,12 @@
|
||||||
this.$log.warn('no module id');
|
this.$log.warn('no module id');
|
||||||
return;
|
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');
|
this.$log.debug('same module already set as last module');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$apollo.mutate({
|
this.$apollo.mutate({
|
||||||
mutation: UPDATE_LAST_MODULE_MUTATION,
|
mutation: UPDATE_LAST_MODULE_MUTATION,
|
||||||
variables: {
|
variables: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue