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