@@ -58,12 +58,6 @@ export default {
5858 },
5959 },
6060
61- data () {
62- return {
63- loadingList: false ,
64- }
65- },
66-
6761 computed: {
6862 // store variables
6963 circles () {
@@ -82,25 +76,10 @@ export default {
8276 return Object .values (this .circle ? .members || [])
8377 },
8478
85- /**
86- * Is the current circle empty
87- *
88- * @return {boolean}
89- */
90- isEmptyCircle () {
91- return this .members .length === 0
92- },
93-
9479 ... mapStores (useUserGroupStore),
9580 },
9681
9782 watch: {
98- circle (newCircle ) {
99- if (newCircle? .id ) {
100- this .fetchCircleMembers (newCircle .id )
101- }
102- },
103-
10483 userGroup (newUserGroup ) {
10584 if (newUserGroup? .id ) {
10685 this .fetchUserGroupMembers (newUserGroup .id )
@@ -109,40 +88,18 @@ export default {
10988 },
11089
11190 beforeMount () {
112- if (this .circle ? .id ) {
113- this .fetchCircleMembers (this .circle .id )
114- }
115-
11691 if (this .userGroup ? .id ) {
11792 this .fetchUserGroupMembers (this .userGroup .id )
11893 }
11994 },
12095
12196 methods: {
122- async fetchCircleMembers (circleId ) {
123- this .loadingList = true
124- this .logger .debug (' Fetching members for' , { circleId })
125-
126- try {
127- await this .$store .dispatch (' getCircleMembers' , circleId)
128- } catch (error) {
129- console .error (error)
130- showError (t (' contacts' , ' There was an error fetching the member list' ))
131- } finally {
132- this .loadingList = false
133- }
134- },
135-
13697 async fetchUserGroupMembers (userGroupId ) {
137- this .loadingList = true
138-
13998 try {
14099 await this .userGroupStore .getUserGroupMembers (userGroupId)
141100 } catch (error) {
142101 console .error (error)
143102 showError (t (' contacts' , ' There was an error fetching the member list' ))
144- } finally {
145- this .loadingList = false
146103 }
147104 },
148105 },
0 commit comments