fix: misc batch flow changes
This commit is contained in:
@@ -281,7 +281,6 @@ watch(submissionResource, () => {
|
|||||||
if (submissionResource.doc.answer) {
|
if (submissionResource.doc.answer) {
|
||||||
answer.value = submissionResource.doc.answer
|
answer.value = submissionResource.doc.answer
|
||||||
}
|
}
|
||||||
|
|
||||||
if (submissionResource.isDirty) {
|
if (submissionResource.isDirty) {
|
||||||
isDirty.value = true
|
isDirty.value = true
|
||||||
} else if (showUploader() && !submissionFile.value) {
|
} else if (showUploader() && !submissionFile.value) {
|
||||||
@@ -309,6 +308,7 @@ const submitAssignment = () => {
|
|||||||
submissionResource.setValue.submit(
|
submissionResource.setValue.submit(
|
||||||
{
|
{
|
||||||
...submissionResource.doc,
|
...submissionResource.doc,
|
||||||
|
assignment_attachment: submissionFile.value?.file_url,
|
||||||
evaluator: evaluator,
|
evaluator: evaluator,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -351,6 +351,7 @@ const addNewSubmission = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const saveSubmission = (file) => {
|
const saveSubmission = (file) => {
|
||||||
|
isDirty.value = true
|
||||||
submissionFile.value = file
|
submissionFile.value = file
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,6 +402,7 @@ const validateFile = (file) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const removeSubmission = () => {
|
const removeSubmission = () => {
|
||||||
|
isDirty.value = true
|
||||||
submissionFile.value = null
|
submissionFile.value = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{{ __('Statistics') }}
|
{{ __('Statistics') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-3 gap-5 mb-8">
|
<div class="grid grid-cols-4 gap-5 mb-8">
|
||||||
<div
|
<div
|
||||||
class="flex items-center border py-2 px-3 rounded-md text-ink-gray-7"
|
class="flex items-center border py-2 px-3 rounded-md text-ink-gray-7"
|
||||||
>
|
>
|
||||||
@@ -22,6 +22,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="flex items-center border py-2 px-3 rounded-md text-ink-gray-7"
|
||||||
|
>
|
||||||
|
<div class="p-2 rounded-md bg-surface-gray-2 mr-3">
|
||||||
|
<GraduationCap class="w-5 h-5 stroke-1.5" />
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center space-x-2">
|
||||||
|
<span class="font-semibold">
|
||||||
|
{{ certificationCount.data }}
|
||||||
|
</span>
|
||||||
|
<span class="">
|
||||||
|
{{ __('Certified') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex items-center border py-2 px-3 rounded-md text-ink-gray-7"
|
class="flex items-center border py-2 px-3 rounded-md text-ink-gray-7"
|
||||||
>
|
>
|
||||||
@@ -210,7 +226,7 @@ import {
|
|||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
import {
|
import {
|
||||||
BookOpen,
|
BookOpen,
|
||||||
Clipboard,
|
GraduationCap,
|
||||||
Plus,
|
Plus,
|
||||||
ShieldCheck,
|
ShieldCheck,
|
||||||
Trash2,
|
Trash2,
|
||||||
@@ -410,6 +426,18 @@ watch(students, () => {
|
|||||||
assessmentCount.value = Object.keys(students.data?.[0].assessments).length
|
assessmentCount.value = Object.keys(students.data?.[0].assessments).length
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const certificationCount = createResource({
|
||||||
|
url: "frappe.client.get_count",
|
||||||
|
params: {
|
||||||
|
doctype: "LMS Certificate",
|
||||||
|
filters: {
|
||||||
|
"batch_name": props.batch.name,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
auto: true
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.apexcharts-legend {
|
.apexcharts-legend {
|
||||||
|
|||||||
@@ -325,9 +325,17 @@
|
|||||||
{
|
{
|
||||||
"link_doctype": "LMS Batch Enrollment",
|
"link_doctype": "LMS Batch Enrollment",
|
||||||
"link_fieldname": "batch"
|
"link_fieldname": "batch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"link_doctype": "LMS Certificate Evaluation",
|
||||||
|
"link_fieldname": "batch_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"link_doctype": "LMS Certificate",
|
||||||
|
"link_fieldname": "batch_name"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2025-02-10 12:01:22.476325",
|
"modified": "2025-02-12 11:59:35.312487",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS Batch",
|
"name": "LMS Batch",
|
||||||
|
|||||||
Reference in New Issue
Block a user