diff --git a/frontend/src/pages/JobApplications.vue b/frontend/src/pages/JobApplications.vue
index cec1e2f8..7a66d22c 100644
--- a/frontend/src/pages/JobApplications.vue
+++ b/frontend/src/pages/JobApplications.vue
@@ -18,12 +18,8 @@
- {{ applications.data?.length || 0 }}
- {{
- applications.data?.length === 1
- ? __('Application')
- : __('Applications')
- }}
+ {{ applicationCount }}
+ {{ applicationCount === 1 ? __('Application') : __('Applications') }}
@@ -159,6 +155,7 @@ import {
Avatar,
Button,
Breadcrumbs,
+ call,
Dialog,
Dropdown,
FeatherIcon,
@@ -176,7 +173,7 @@ import {
toast,
} from 'frappe-ui'
import { RefreshCw } from 'lucide-vue-next'
-import { inject, ref, computed, reactive } from 'vue'
+import { computed, inject, onMounted, ref, reactive } from 'vue'
import { sessionStore } from '../stores/session'
import EmptyState from '@/components/EmptyState.vue'
@@ -184,6 +181,7 @@ const dayjs = inject('$dayjs')
const { brand } = sessionStore()
const showEmailModal = ref(false)
const selectedApplicant = ref(null)
+const applicationCount = ref(0)
const emailForm = reactive({
subject: '',
message: '',
@@ -197,6 +195,19 @@ const props = defineProps({
},
})
+onMounted(() => {
+ getApplicationCount()
+})
+
+const getApplicationCount = () => {
+ call('frappe.client.get_count', {
+ doctype: 'LMS Job Application',
+ filters: { job: props.job },
+ }).then((count) => {
+ applicationCount.value = count
+ })
+}
+
const applications = createListResource({
doctype: 'LMS Job Application',
fields: [
@@ -262,7 +273,6 @@ const sendEmail = (close) => {
}
const downloadResume = (resumeUrl) => {
- console.log(resumeUrl)
window.open(resumeUrl, '_blank')
}