diff --git a/src/models/circle.ts b/src/models/circle.ts index b052bf892..66254039a 100644 --- a/src/models/circle.ts +++ b/src/models/circle.ts @@ -6,7 +6,7 @@ import Vue from 'vue' import Member from './member' -import { CircleConfigs, MemberLevels } from './constants' +import { CircleConfigs, MemberLevels, ROUTE_CIRCLE } from './constants' type MemberList = Record @@ -303,7 +303,7 @@ export default class Circle { get router() { return { name: 'circle', - params: { selectedCircle: this.id }, + params: { selectedCircle: this.id, selectedGroup: ROUTE_CIRCLE }, } } diff --git a/src/views/Contacts.vue b/src/views/Contacts.vue index edb5a63c8..b1adc63c2 100644 --- a/src/views/Contacts.vue +++ b/src/views/Contacts.vue @@ -146,6 +146,9 @@ export default { groups() { return this.$store.getters.getGroups }, + circles() { + return this.$store.getters.getCircles + }, orderKey() { return this.$store.getters.getOrderKey }, @@ -193,6 +196,8 @@ export default { return this.sortedContacts } else if (this.selectedGroup === GROUP_NO_GROUP_CONTACTS) { return this.ungroupedContacts.map(contact => this.sortedContacts.find(item => item.key === contact.key)) + } else if (this.selectedGroup === ROUTE_CIRCLE) { + return this.circles } const group = this.groups.filter(group => group.name === this.selectedGroup)[0] if (group) {