fix: misc evaluation issues

This commit is contained in:
Jannat Patel
2025-06-10 10:58:03 +05:30
parent b726073a5b
commit 10829e2f00
6 changed files with 29 additions and 24 deletions

View File

@@ -76,8 +76,8 @@
</Button>
</div>
</div>
<Tabs :tabs="tabs" v-model="tabIndex" class="border-l w-1/2">
<template #default="{ tab }">
<Tabs :tabs="tabs" as="div" v-model="tabIndex" class="border-l w-1/2">
<template #tab-panel="{ tab }">
<div
v-if="tab.label == 'Evaluation'"
class="flex flex-col space-y-4 p-5"

View File

@@ -5,10 +5,7 @@
{{ __('Upcoming Evaluations') }}
</div>
<Button
v-if="
!upcoming_evals.data?.length ||
upcoming_evals.length == courses.length
"
v-if="upcoming_evals.data?.length != evaluationCourses.length"
@click="openEvalModal"
>
{{ __('Schedule Evaluation') }}
@@ -118,7 +115,7 @@ import {
HeadsetIcon,
EllipsisVertical,
} from 'lucide-vue-next'
import { inject, ref, getCurrentInstance } from 'vue'
import { inject, ref, getCurrentInstance, computed } from 'vue'
import { formatTime } from '../utils'
import { Button, createResource, call } from 'frappe-ui'
import EvaluationModal from '@/components/Modals/EvaluationModal.vue'
@@ -163,6 +160,12 @@ const openEvalCall = (evl) => {
window.open(evl.google_meet_link, '_blank')
}
const evaluationCourses = computed(() => {
return props.courses.filter((course) => {
return course.evaluator != ''
})
})
const cancelEvaluation = (evl) => {
$dialog({
title: __('Cancel this evaluation?'),