fix: changed certified members count based on filters

This commit is contained in:
Jannat Patel
2025-05-29 16:09:51 +05:30
parent f1bbd4eb13
commit 5ad89189c1
2 changed files with 21 additions and 9 deletions

View File

@@ -127,6 +127,7 @@ const memberCount = ref(0)
const dayjs = inject('$dayjs')
onMounted(() => {
getMemberCount()
updateParticipants()
})
@@ -138,11 +139,13 @@ const participants = createListResource({
pageLength: 30,
})
const count = call('lms.lms.api.get_count_of_certified_members').then(
(data) => {
const getMemberCount = () => {
call('lms.lms.api.get_count_of_certified_members', {
filters: filters.value,
}).then((data) => {
memberCount.value = data
}
)
})
}
const categories = createListResource({
doctype: 'LMS Certificate',
@@ -157,6 +160,7 @@ const categories = createListResource({
const updateParticipants = () => {
updateFilters()
getMemberCount()
participants.update({
filters: filters.value,
})