fix: added get certified button on certified participants list

This commit is contained in:
Jannat Patel
2025-02-11 18:29:29 +05:30
parent e28fc3bee6
commit 74cd0a4d40
9 changed files with 40 additions and 45 deletions

View File

@@ -27,7 +27,7 @@
<div class="short-introduction text-sm text-ink-gray-7"> <div class="short-introduction text-sm text-ink-gray-7">
{{ batch.description }} {{ batch.description }}
</div> </div>
<div v-if="batch.amount" class="font-semibold mb-4"> <div v-if="batch.amount" class="font-semibold text-ink-gray-9 mb-4">
{{ batch.price }} {{ batch.price }}
</div> </div>
<div class="flex flex-col space-y-2 mt-auto"> <div class="flex flex-col space-y-2 mt-auto">

View File

@@ -1,20 +1,17 @@
<template> <template>
<div v-if="batch.data" class="border-2 rounded-md p-5 lg:w-72"> <div v-if="batch.data" class="border-2 rounded-md p-5 lg:w-72">
<Badge <div v-if="batch.data.seat_count && seats_left > 0" class="text-xs bg-green-200 text-green-800 float-right px-2 py-0.5 rounded-md">
v-if="batch.data.seat_count && seats_left > 0" {{ seats_left }}
theme="green" <span v-if="seats_left > 1">
class="self-start mb-2 float-right" {{ __('Seats Left') }}
> </span>
{{ seats_left }} <span v-if="seats_left > 1">{{ __('Seats Left') }}</span <span v-else-if="seats_left == 1">
><span v-else-if="seats_left == 1">{{ __('Seat Left') }}</span> {{ __('Seat Left') }}
</Badge> </span>
<Badge </div>
v-else-if="batch.data.seat_count && seats_left <= 0" <div v-else-if="batch.data.seat_count && seats_left <= 0" class="text-xs bg-red-200 text-red-900 float-right px-2 py-0.5 rounded-md">
theme="red"
class="self-start mb-2 float-right"
>
{{ __('Sold Out') }} {{ __('Sold Out') }}
</Badge> </div>
<div <div
v-if="batch.data.amount" v-if="batch.data.amount"
class="text-lg font-semibold mb-3 text-ink-gray-9" class="text-lg font-semibold mb-3 text-ink-gray-9"

View File

@@ -79,7 +79,7 @@
:progress="course.membership.progress" :progress="course.membership.progress"
/> />
<div v-if="user && course.membership" class="text-sm mt-2 mb-4"> <div v-if="user && course.membership" class="text-sm text-ink-gray-7 mt-2 mb-4">
{{ Math.ceil(course.membership.progress) }}% completed {{ Math.ceil(course.membership.progress) }}% completed
</div> </div>

View File

@@ -88,16 +88,16 @@
</Button> </Button>
</router-link> </router-link>
<div class="space-y-4"> <div class="space-y-4">
<div class="mt-8 font-medium text-ink-gray-7"> <div class="mt-8 font-medium text-ink-gray-9">
{{ __('This course has:') }} {{ __('This course has:') }}
</div> </div>
<div class="flex items-center text-ink-gray-7"> <div class="flex items-center text-ink-gray-9">
<BookOpen class="h-4 w-4 stroke-1.5" /> <BookOpen class="h-4 w-4 stroke-1.5" />
<span class="ml-2"> <span class="ml-2">
{{ course.data.lessons }} {{ __('Lessons') }} {{ course.data.lessons }} {{ __('Lessons') }}
</span> </span>
</div> </div>
<div class="flex items-center text-ink-gray-7"> <div class="flex items-center text-ink-gray-9">
<Users class="h-4 w-4 stroke-1.5" /> <Users class="h-4 w-4 stroke-1.5" />
<span class="ml-2"> <span class="ml-2">
{{ formatAmount(course.data.enrollments) }} {{ formatAmount(course.data.enrollments) }}
@@ -106,7 +106,7 @@
</div> </div>
<div <div
v-if="parseInt(course.data.rating) > 0" v-if="parseInt(course.data.rating) > 0"
class="flex items-center text-ink-gray-7" class="flex items-center text-ink-gray-9"
> >
<Star class="h-4 w-4 stroke-1.5 fill-orange-500 text-gray-50" /> <Star class="h-4 w-4 stroke-1.5 fill-orange-500 text-gray-50" />
<span class="ml-2"> <span class="ml-2">

View File

@@ -36,7 +36,7 @@
class="h-4 w-4 text-ink-gray-9 stroke-1" class="h-4 w-4 text-ink-gray-9 stroke-1"
/> />
<div <div
class="text-base text-left text-ink-gray-7 font-medium leading-5 ml-2" class="text-base text-left text-ink-gray-9 font-medium leading-5 ml-2"
@click="redirectToChapter(chapter)" @click="redirectToChapter(chapter)"
> >
{{ chapter.title }} {{ chapter.title }}

View File

@@ -1,7 +1,7 @@
<template> <template>
<div v-if="quiz.data"> <div v-if="quiz.data">
<div <div
class="bg-surface-blue-2 space-y-1 py-2 px-2 mb-4 rounded-md text-sm text-blue-800" class="bg-surface-blue-2 space-y-1 py-2 px-2 mb-4 rounded-md text-sm text-ink-blue-800"
> >
<div class="leading-5"> <div class="leading-5">
{{ {{

View File

@@ -3,12 +3,20 @@
class="sticky flex items-center justify-between top-0 z-10 border-b bg-surface-white px-3 py-2.5 sm:px-5" 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" /> <Breadcrumbs :items="breadcrumbs" />
<router-link :to="{ name: 'Batches' }">
<Button>
<template #prefix>
<GraduationCap class="h-4 w-4 stroke-1.5" />
</template>
{{ __('Get Certified') }}
</Button>
</router-link>
</header> </header>
<div class="p-5 lg:w-3/4 mx-auto"> <div class="p-5 lg:w-3/4 mx-auto">
<div <div
class="flex flex-col lg:flex-row lg:items-center space-y-4 lg:space-y-0 justify-between mb-5" class="flex flex-col lg:flex-row lg:items-center space-y-4 lg:space-y-0 justify-between mb-5"
> >
<div class="text-lg font-semibold"> <div class="text-lg text-ink-gray-9 font-semibold">
{{ __('All Certified Participants') }} {{ __('All Certified Participants') }}
</div> </div>
<div class="grid grid-cols-2 gap-2"> <div class="grid grid-cols-2 gap-2">
@@ -97,7 +105,7 @@ import {
} from 'frappe-ui' } from 'frappe-ui'
import { computed, onMounted, ref } from 'vue' import { computed, onMounted, ref } from 'vue'
import { updateDocumentTitle } from '@/utils' import { updateDocumentTitle } from '@/utils'
import { BookOpen } from 'lucide-vue-next' import { BookOpen, GraduationCap } from 'lucide-vue-next'
const currentCategory = ref('') const currentCategory = ref('')
const filters = ref({}) const filters = ref({})

View File

@@ -60,7 +60,7 @@
<Badge <Badge
theme="gray" theme="gray"
size="lg" size="lg"
class="mr-2" class="mr-2 text-ink-gray-9"
v-for="tag in course.data.tags" v-for="tag in course.data.tags"
> >
{{ tag }} {{ tag }}

View File

@@ -67,10 +67,8 @@
<div <div
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-10 gap-y-5 md:gap-y-5" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-10 gap-y-5 md:gap-y-5"
> >
<div class="flex items-center space-x-2"> <div class="flex items-center space-x-4">
<span class="p-4 bg-surface-green-1 rounded-full">
<Building2 class="h-4 w-4 text-ink-green-2" /> <Building2 class="h-4 w-4 text-ink-green-2" />
</span>
<div class="flex flex-col space-y-2 text-ink-gray-7"> <div class="flex flex-col space-y-2 text-ink-gray-7">
<span class="text-xs text-ink-gray-5 font-medium uppercase"> <span class="text-xs text-ink-gray-5 font-medium uppercase">
{{ __('Organisation') }} {{ __('Organisation') }}
@@ -80,10 +78,8 @@
</span> </span>
</div> </div>
</div> </div>
<div class="flex items-center space-x-2"> <div class="flex items-center space-x-4">
<span class="p-4 bg-surface-red-1 rounded-full"> <MapPin class="size-4 text-ink-red-3" />
<MapPin class="h-4 w-4 text-ink-red-3" />
</span>
<div class="flex flex-col space-y-2 text-ink-gray-7"> <div class="flex flex-col space-y-2 text-ink-gray-7">
<span class="text-xs font-medium uppercase"> <span class="text-xs font-medium uppercase">
{{ __('Location') }} {{ __('Location') }}
@@ -93,10 +89,8 @@
</span> </span>
</div> </div>
</div> </div>
<div class="flex items-center space-x-2"> <div class="flex items-center space-x-4">
<span class="p-4 bg-yellow-50 rounded-full">
<ClipboardType class="h-4 w-4 text-yellow-500" /> <ClipboardType class="h-4 w-4 text-yellow-500" />
</span>
<div class="flex flex-col space-y-2 text-ink-gray-7"> <div class="flex flex-col space-y-2 text-ink-gray-7">
<span class="text-xs font-medium uppercase"> <span class="text-xs font-medium uppercase">
{{ __('Category') }} {{ __('Category') }}
@@ -106,10 +100,8 @@
</span> </span>
</div> </div>
</div> </div>
<div class="flex items-center space-x-2"> <div class="flex items-center space-x-4">
<span class="p-4 bg-surface-blue-1 rounded-full">
<CalendarDays class="h-4 w-4 text-ink-blue-2" /> <CalendarDays class="h-4 w-4 text-ink-blue-2" />
</span>
<div class="flex flex-col space-y-2 text-ink-gray-7"> <div class="flex flex-col space-y-2 text-ink-gray-7">
<span class="text-xs font-medium uppercase"> <span class="text-xs font-medium uppercase">
{{ __('Posted on') }} {{ __('Posted on') }}
@@ -121,11 +113,9 @@
</div> </div>
<div <div
v-if="applicationCount.data" v-if="applicationCount.data"
class="flex items-center space-x-2" class="flex items-center space-x-4"
> >
<span class="p-4 bg-purple-50 rounded-full">
<SquareUserRound class="h-4 w-4 text-purple-500" /> <SquareUserRound class="h-4 w-4 text-purple-500" />
</span>
<div class="flex flex-col space-y-2 text-ink-gray-7"> <div class="flex flex-col space-y-2 text-ink-gray-7">
<span class="text-xs font-medium uppercase"> <span class="text-xs font-medium uppercase">
{{ __('Applications Received') }} {{ __('Applications Received') }}