fix: batch lists
This commit is contained in:
@@ -108,13 +108,16 @@ const getCoursesColumns = () => {
|
|||||||
{
|
{
|
||||||
label: 'Title',
|
label: 'Title',
|
||||||
key: 'title',
|
key: 'title',
|
||||||
|
width: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Lessons',
|
label: 'Lessons',
|
||||||
key: 'lesson_count',
|
key: 'lesson_count',
|
||||||
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Enrollments',
|
label: 'Enrollments',
|
||||||
|
align: 'right',
|
||||||
key: 'enrollment_count',
|
key: 'enrollment_count',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -131,7 +134,6 @@ const removeCourse = createResource({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const removeCourses = (selections) => {
|
const removeCourses = (selections) => {
|
||||||
console.log(selections)
|
|
||||||
selections.forEach(async (course) => {
|
selections.forEach(async (course) => {
|
||||||
removeCourse.submit({ course })
|
removeCourse.submit({ course })
|
||||||
await setTimeout(1000)
|
await setTimeout(1000)
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ const getStudentColumns = () => {
|
|||||||
{
|
{
|
||||||
label: 'Full Name',
|
label: 'Full Name',
|
||||||
key: 'full_name',
|
key: 'full_name',
|
||||||
|
width: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Courses Done',
|
label: 'Courses Done',
|
||||||
|
|||||||
@@ -15,7 +15,14 @@
|
|||||||
<div class="grid gap-8 mt-10">
|
<div class="grid gap-8 mt-10">
|
||||||
<div v-for="(review, index) in reviews.data">
|
<div v-for="(review, index) in reviews.data">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<UserAvatar :user="review.owner_details" :size="'2xl'" />
|
<router-link
|
||||||
|
:to="{
|
||||||
|
name: 'Profile',
|
||||||
|
params: { username: review.owner_details.username },
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<UserAvatar :user="review.owner_details" :size="'2xl'" />
|
||||||
|
</router-link>
|
||||||
<div class="mx-4">
|
<div class="mx-4">
|
||||||
<router-link
|
<router-link
|
||||||
:to="{
|
:to="{
|
||||||
|
|||||||
@@ -14,7 +14,13 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #body-content>
|
<template #body-content>
|
||||||
<Link doctype="LMS Course" v-model="course" />
|
<Link doctype="LMS Course" v-model="course" :label="__('Course')" />
|
||||||
|
<Link
|
||||||
|
doctype="Course Evaluator"
|
||||||
|
v-model="evaluator"
|
||||||
|
:label="__('Evaluator')"
|
||||||
|
class="mt-4"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -26,6 +32,7 @@ import { showToast } from '@/utils'
|
|||||||
|
|
||||||
const show = defineModel()
|
const show = defineModel()
|
||||||
const course = ref(null)
|
const course = ref(null)
|
||||||
|
const evaluator = ref(null)
|
||||||
const courses = defineModel('courses')
|
const courses = defineModel('courses')
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -45,6 +52,7 @@ const createBatchCourse = createResource({
|
|||||||
parenttype: 'LMS Batch',
|
parenttype: 'LMS Batch',
|
||||||
parentfield: 'courses',
|
parentfield: 'courses',
|
||||||
course: course.value,
|
course: course.value,
|
||||||
|
evaluator: evaluator.value,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -58,6 +66,7 @@ const addCourse = (close) => {
|
|||||||
courses.value.reload()
|
courses.value.reload()
|
||||||
close()
|
close()
|
||||||
course.value = null
|
course.value = null
|
||||||
|
evaluator.value = null
|
||||||
},
|
},
|
||||||
onError(err) {
|
onError(err) {
|
||||||
showToast('Error', err.message[0] || err, 'x')
|
showToast('Error', err.message[0] || err, 'x')
|
||||||
|
|||||||
@@ -77,7 +77,6 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<CourseReviews
|
<CourseReviews
|
||||||
v-if="course.data.avg_rating"
|
|
||||||
:courseName="course.data.name"
|
:courseName="course.data.name"
|
||||||
:avg_rating="course.data.avg_rating"
|
:avg_rating="course.data.avg_rating"
|
||||||
:membership="course.data.membership"
|
:membership="course.data.membership"
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ const breadcrumbs = computed(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ce-toolbar__actions {
|
.ce-toolbar__actions {
|
||||||
right: 108%;
|
right: 108% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ce-block__content {
|
.ce-block__content {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import { Code } from "lucide-vue-next"
|
||||||
|
import { h, createApp } from "vue"
|
||||||
|
|
||||||
const DEFAULT_THEMES = ['light', 'dark'];
|
const DEFAULT_THEMES = ['light', 'dark'];
|
||||||
const COMMON_LANGUAGES = {
|
const COMMON_LANGUAGES = {
|
||||||
none: 'Auto-detect', apache: 'Apache', bash: 'Bash', cs: 'C#', cpp: 'C++', css: 'CSS', coffeescript: 'CoffeeScript', diff: 'Diff',
|
none: 'Auto-detect', apache: 'Apache', bash: 'Bash', cs: 'C#', cpp: 'C++', css: 'CSS', coffeescript: 'CoffeeScript', diff: 'Diff',
|
||||||
@@ -58,9 +61,16 @@ export class CodeBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get toolbox() {
|
static get toolbox() {
|
||||||
|
const app = createApp({
|
||||||
|
render: () => h(Code, { size: 24, strokeWidth: 2, color: 'black' }),
|
||||||
|
});
|
||||||
|
|
||||||
|
const div = document.createElement('div');
|
||||||
|
app.mount(div);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: 'CodeBox',
|
title: 'CodeBox',
|
||||||
icon: '<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.71,6.29a1,1,0,0,0-1.42,0l-5,5a1,1,0,0,0,0,1.42l5,5a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42L5.41,12l4.3-4.29A1,1,0,0,0,9.71,6.29Zm11,5-5-5a1,1,0,0,0-1.42,1.42L18.59,12l-4.3,4.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l5-5A1,1,0,0,0,20.71,11.29Z"/></svg>'
|
icon: div.innerHTML
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user