Skip to content

Commit

Permalink
chore : change to Lucide icon, lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
arunmathaisk committed May 2, 2024
1 parent 0c9fdc6 commit 4edaad5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 35 deletions.
10 changes: 3 additions & 7 deletions frontend/src/pages/CertifiedParticipants.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
size="md"
>
<template #prefix>
<FeatherIcon class="w-4" name="search" />
<Search class="w-4" name="search" />
</template>
</FormControl>
</div>
Expand Down Expand Up @@ -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('')
Expand Down
56 changes: 28 additions & 28 deletions lms/lms/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)

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
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

0 comments on commit 4edaad5

Please sign in to comment.