Skip to content

Commit 494025e

Browse files
authored
feat: remove useless count function on load [CM-761] (#3553)
1 parent 3391c25 commit 494025e

1 file changed

Lines changed: 4 additions & 15 deletions

File tree

frontend/src/modules/member/pages/member-list-page.vue

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,6 @@ const fetchMembersToMergeCount = () => {
142142
const loading = ref(true);
143143
const tableLoading = ref(true);
144144
145-
const doGetMembersCount = () => {
146-
(
147-
MemberService.listMembers(
148-
{
149-
limit: 1,
150-
offset: 0,
151-
},
152-
true,
153-
) as Promise<any>
154-
).then(({ count }) => {
155-
membersCount.value = count;
156-
});
157-
};
158-
159145
const showLoading = (filter: any, body: any): boolean => {
160146
const saved: any = { ...savedFilterBody.value };
161147
delete saved.offset;
@@ -185,6 +171,10 @@ const fetch = ({
185171
limit: pagination.value.perPage,
186172
orderBy,
187173
},
174+
}).then((result) => {
175+
if (result && result.count !== undefined) {
176+
membersCount.value = result.count;
177+
}
188178
}).finally(() => {
189179
tableLoading.value = false;
190180
loading.value = false;
@@ -207,7 +197,6 @@ const onPaginationChange = ({
207197
208198
onMounted(() => {
209199
fetchMembersToMergeCount();
210-
doGetMembersCount();
211200
getMemberCustomAttributes();
212201
(window as any).analytics.page('Members');
213202
});

0 commit comments

Comments
 (0)