fix: courses cahce

This commit is contained in:
Jannat Patel
2023-12-13 11:57:18 +05:30
parent c50f2147fd
commit a1e06bf316
3 changed files with 4 additions and 3 deletions

View File

@@ -10,7 +10,7 @@
<div class="flex items-center mb-3">
<Users class="h-4 w-4 text-gray-700"/>
<span class="ml-1">
{{ course.data.enrollment_count }} {{ __("Enrolled") }}
{{ course.data.enrollment_count_formatted }} {{ __("Enrolled") }}
</span>
</div>
<div class="flex items-center mb-3">

View File

@@ -25,7 +25,7 @@
<div class="flex items-center">
<Users class="h-4 w-4 text-gray-700"/>
<span class="ml-1">
{{ course.data.enrollment_count }}
{{ course.data.enrollment_count_formatted }}
</span>
</div>
&middot;

View File

@@ -70,9 +70,10 @@ import { ref, computed } from 'vue'
const { isLoggedIn, getUser } = sessionStore()
const user = computed(() => isLoggedIn && getUser())
console.log(user)
const courses = createListResource({
type: 'list',
cache: "courses",
cache: ["courses", user.email],
doctype: 'LMS Course',
url: "lms.lms.utils.get_courses",
auto: true,