fix: misc batch issues

This commit is contained in:
Jannat Patel
2025-02-19 16:40:11 +05:30
parent a8690e41e6
commit 9311043190
6 changed files with 28 additions and 5 deletions

View File

@@ -69,7 +69,11 @@
name: batch.data.name,
},
}"
v-else-if="batch.data.paid_batch && batch.data.seats_left"
v-else-if="
batch.data.paid_batch &&
batch.data.seats_left > 0 &&
batch.data.accept_enrollments
"
>
<Button v-if="!isStudent" class="w-full mt-4" variant="solid">
<span>
@@ -80,7 +84,11 @@
<Button
variant="solid"
class="w-full mt-2"
v-else-if="batch.data.allow_self_enrollment && batch.data.seats_left"
v-else-if="
batch.data.allow_self_enrollment &&
batch.data.seats_left &&
batch.data.accept_enrollments
"
@click="enrollInBatch()"
>
{{ __('Enroll Now') }}
@@ -112,6 +120,7 @@ import { useRouter } from 'vue-router'
const router = useRouter()
const user = inject('$user')
const dayjs = inject('$dayjs')
const props = defineProps({
batch: {

View File

@@ -1,6 +1,6 @@
<template>
<div class="flex space-x-4 border rounded-md p-2">
<Avatar :image="job.company_logo" :label="job.job_title" size="2xl" />
<img :src="job.company_logo" class="size-10 rounded-full object-contain" />
<div class="flex flex-col space-y-2 flex-1">
<div class="flex items-center justify-between">
<span class="font-semibold text-ink-gray-9">

View File

@@ -25,7 +25,15 @@
<div class="mb-1.5 text-sm text-ink-gray-5">
{{ __('Date') }}
</div>
<FormControl type="date" v-model="evaluation.date" />
<FormControl
type="date"
v-model="evaluation.date"
:min="
dayjs()
.add(dayjs.duration({ days: 1 }))
.format('YYYY-MM-DD')
"
/>
</div>
<div v-if="slots.data?.length">
<div class="mb-1.5 text-sm text-ink-gray-5">

View File

@@ -176,6 +176,10 @@ def create_live_class(
class_details = frappe.get_doc(payload)
class_details.save()
return class_details
else:
frappe.throw(
_("Error creating live class. Please try again. {0}").format(response.text)
)
def authenticate():

View File

@@ -122,7 +122,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-01-17 11:57:02.859109",
"modified": "2025-02-19 16:26:05.902473",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Certificate",
@@ -156,6 +156,7 @@
"create": 1,
"email": 1,
"export": 1,
"if_owner": 1,
"print": 1,
"read": 1,
"report": 1,

View File

@@ -1233,6 +1233,7 @@ def get_batch_details(batch):
)
batch_details.instructors = get_instructors(batch)
batch_details.accept_enrollments = batch_details.start_date > getdate()
batch_details.courses = frappe.get_all(
"Batch Course", filters={"parent": batch}, fields=["course", "title", "evaluator"]