chore : change to Lucide icon, lint issues
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
size="md"
|
||||
>
|
||||
<template #prefix>
|
||||
<FeatherIcon class="w-4" name="search" />
|
||||
<Search class="w-4" name="search" />
|
||||
</template>
|
||||
</FormControl>
|
||||
</div>
|
||||
@@ -52,14 +52,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
Breadcrumbs,
|
||||
FormControl,
|
||||
FeatherIcon,
|
||||
createResource,
|
||||
} from 'frappe-ui'
|
||||
import { Breadcrumbs, FormControl, createResource } from 'frappe-ui'
|
||||
import { ref, computed } from 'vue'
|
||||
import UserAvatar from '@/components/UserAvatar.vue'
|
||||
import { Search } from 'lucide-vue-next'
|
||||
|
||||
const searchQuery = ref('')
|
||||
|
||||
|
||||
@@ -331,31 +331,31 @@ def get_evaluator_details(evaluator):
|
||||
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def get_certified_participants(search_query=""):
|
||||
LMSCertificate = DocType("LMS Certificate")
|
||||
participants = (
|
||||
frappe.qb.from_(LMSCertificate)
|
||||
.select(LMSCertificate.member)
|
||||
.distinct()
|
||||
.where(LMSCertificate.member_name.like(f"%{search_query}%"))
|
||||
.where(LMSCertificate.published == 1)
|
||||
.orderby(LMSCertificate.creation, order=frappe.qb.desc)
|
||||
.run(as_dict=1)
|
||||
)
|
||||
LMSCertificate = DocType("LMS Certificate")
|
||||
participants = (
|
||||
frappe.qb.from_(LMSCertificate)
|
||||
.select(LMSCertificate.member)
|
||||
.distinct()
|
||||
.where(LMSCertificate.member_name.like(f"%{search_query}%"))
|
||||
.where(LMSCertificate.published == 1)
|
||||
.orderby(LMSCertificate.creation, order=frappe.qb.desc)
|
||||
.run(as_dict=1)
|
||||
)
|
||||
|
||||
participant_details = []
|
||||
for participant in participants:
|
||||
details = frappe.db.get_value(
|
||||
"User",
|
||||
participant.member,
|
||||
["name", "full_name", "username", "user_image"],
|
||||
as_dict=True,
|
||||
)
|
||||
course_names = frappe.get_all(
|
||||
"LMS Certificate", {"member": participant.member}, pluck="course"
|
||||
)
|
||||
courses = []
|
||||
for course in course_names:
|
||||
courses.append(frappe.db.get_value("LMS Course", course, "title"))
|
||||
details["courses"] = courses
|
||||
participant_details.append(details)
|
||||
return participant_details
|
||||
participant_details = []
|
||||
for participant in participants:
|
||||
details = frappe.db.get_value(
|
||||
"User",
|
||||
participant.member,
|
||||
["name", "full_name", "username", "user_image"],
|
||||
as_dict=True,
|
||||
)
|
||||
course_names = frappe.get_all(
|
||||
"LMS Certificate", {"member": participant.member}, pluck="course"
|
||||
)
|
||||
courses = []
|
||||
for course in course_names:
|
||||
courses.append(frappe.db.get_value("LMS Course", course, "title"))
|
||||
details["courses"] = courses
|
||||
participant_details.append(details)
|
||||
return participant_details
|
||||
|
||||
Reference in New Issue
Block a user