fix: misc ui issues
This commit is contained in:
@@ -266,7 +266,8 @@ const students = createResource({
|
||||
onSuccess(data) {
|
||||
chartData.value = getChartData()
|
||||
showProgressChart.value =
|
||||
data.length && (props.batch?.data?.courses?.length || assessmentCount.value)
|
||||
data.length &&
|
||||
(props.batch?.data?.courses?.length || assessmentCount.value)
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -92,7 +92,10 @@
|
||||
{{ option.label }}
|
||||
</div>
|
||||
<div
|
||||
v-if="option.description && option.description != option.label"
|
||||
v-if="
|
||||
option.description &&
|
||||
option.description != option.label
|
||||
"
|
||||
class="text-xs text-ink-gray-7"
|
||||
v-html="option.description"
|
||||
></div>
|
||||
|
||||
@@ -25,21 +25,23 @@
|
||||
v-model="assessment"
|
||||
:doctype="assessmentType"
|
||||
:label="__('Assessment')"
|
||||
:onCreate="(value, close) => {
|
||||
close()
|
||||
if (assessmentType === 'LMS Quiz') {
|
||||
router.push({
|
||||
name: 'QuizForm',
|
||||
params: {
|
||||
quizID: 'new',
|
||||
},
|
||||
})
|
||||
} else if (assessmentType === 'LMS Assignment') {
|
||||
router.push({
|
||||
name: 'Assignments'
|
||||
})
|
||||
:onCreate="
|
||||
(value, close) => {
|
||||
close()
|
||||
if (assessmentType === 'LMS Quiz') {
|
||||
router.push({
|
||||
name: 'QuizForm',
|
||||
params: {
|
||||
quizID: 'new',
|
||||
},
|
||||
})
|
||||
} else if (assessmentType === 'LMS Assignment') {
|
||||
router.push({
|
||||
name: 'Assignments',
|
||||
})
|
||||
}
|
||||
}
|
||||
}"
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -19,15 +19,17 @@
|
||||
v-model="course"
|
||||
:label="__('Course')"
|
||||
:required="true"
|
||||
:onCreate="(value, close) => {
|
||||
close()
|
||||
router.push({
|
||||
name: 'CourseForm',
|
||||
params: {
|
||||
courseName: 'new'
|
||||
}
|
||||
})
|
||||
}"
|
||||
:onCreate="
|
||||
(value, close) => {
|
||||
close()
|
||||
router.push({
|
||||
name: 'CourseForm',
|
||||
params: {
|
||||
courseName: 'new',
|
||||
},
|
||||
})
|
||||
}
|
||||
"
|
||||
/>
|
||||
<Link
|
||||
doctype="Course Evaluator"
|
||||
|
||||
@@ -14,7 +14,13 @@
|
||||
<div class="text-xl font-semibold">
|
||||
{{ student.full_name }}
|
||||
</div>
|
||||
<Badge v-if="Object.keys(student.assessments).length || Object.keys(student.courses).length" :theme="student.progress === 100 ? 'green' : 'red'">
|
||||
<Badge
|
||||
v-if="
|
||||
Object.keys(student.assessments).length ||
|
||||
Object.keys(student.courses).length
|
||||
"
|
||||
:theme="student.progress === 100 ? 'green' : 'red'"
|
||||
>
|
||||
{{ student.progress }}% {{ __('Complete') }}
|
||||
</Badge>
|
||||
</div>
|
||||
@@ -26,7 +32,10 @@
|
||||
|
||||
<div class="space-y-8">
|
||||
<!-- Assessments -->
|
||||
<div v-if="Object.keys(student.assessments).length" class="space-y-2 text-sm">
|
||||
<div
|
||||
v-if="Object.keys(student.assessments).length"
|
||||
class="space-y-2 text-sm"
|
||||
>
|
||||
<div class="flex items-center border-b pb-1 font-medium">
|
||||
<span class="flex-1">
|
||||
{{ __('Assessment') }}
|
||||
@@ -73,7 +82,10 @@
|
||||
</div>
|
||||
|
||||
<!-- Courses -->
|
||||
<div v-if="Object.keys(student.courses).length" class="space-y-2 text-sm">
|
||||
<div
|
||||
v-if="Object.keys(student.courses).length"
|
||||
class="space-y-2 text-sm"
|
||||
>
|
||||
<div class="flex items-center border-b pb-1 font-medium">
|
||||
<span class="flex-1">
|
||||
{{ __('Courses') }}
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
doctype="User"
|
||||
v-model="student"
|
||||
:filters="{ ignore_user_type: 1 }"
|
||||
:onCreate="(value, close) => {
|
||||
openSettings('Members', close)
|
||||
}"
|
||||
:onCreate="
|
||||
(value, close) => {
|
||||
openSettings('Members', close)
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -358,9 +358,8 @@ watch(tabIndex, () => {
|
||||
const canMakeAnnouncement = () => {
|
||||
if (readOnlyMode) return false
|
||||
|
||||
if (!batch.data?.students?.length)
|
||||
return false
|
||||
|
||||
if (!batch.data?.students?.length) return false
|
||||
|
||||
return user.data?.is_moderator || user.data?.is_evaluator
|
||||
}
|
||||
|
||||
|
||||
@@ -499,8 +499,6 @@ const validateFile = (file) => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const breadcrumbs = computed(() => {
|
||||
let crumbs = [
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
class="sticky flex items-center justify-between top-0 z-10 border-b bg-surface-white px-3 py-2.5 sm:px-5"
|
||||
>
|
||||
<Breadcrumbs :items="breadcrumbs" />
|
||||
<router-link :to="{ name: 'Batches', query: { 'certification': true } }">
|
||||
<router-link :to="{ name: 'Batches', query: { certification: true } }">
|
||||
<Button>
|
||||
<template #prefix>
|
||||
<GraduationCap class="h-4 w-4 stroke-1.5" />
|
||||
|
||||
@@ -29,9 +29,7 @@
|
||||
v-if="jobCount"
|
||||
class="flex flex-col lg:flex-row space-y-4 lg:space-y-0 lg:items-center justify-between w-full md:w-4/5 mx-auto p-5"
|
||||
>
|
||||
<div
|
||||
class="text-xl font-semibold text-ink-gray-7 mb-4 md:mb-0"
|
||||
>
|
||||
<div class="text-xl font-semibold text-ink-gray-7 mb-4 md:mb-0">
|
||||
{{ __('{0} Open Jobs').format(jobCount) }}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -558,4 +558,4 @@ export const openSettings = (category, close) => {
|
||||
close()
|
||||
settingsStore.activeTab = category
|
||||
settingsStore.isSettingsOpen = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user