feat: evaluation end date

This commit is contained in:
Jannat Patel
2023-11-29 17:36:34 +05:30
parent de60fbb25a
commit eef5bd6062
11 changed files with 49 additions and 16 deletions

View File

@@ -639,6 +639,7 @@
let courses = {{ course_list | json }};
const legends = {{ legends | json }};
const allow_future = {{ batch_info.allow_future }}
const evaluation_end_date = "{{ batch_info.evaluation_end_date if batch_info.evaluation_end_date else '' }}"
</script>
<link rel="stylesheet" href="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.css" />

View File

@@ -503,6 +503,7 @@ const remove_assessment = (e) => {
};
const open_evaluation_form = (e) => {
console.log(evaluation_end_date);
this.eval_form = new frappe.ui.Dialog({
title: __("Schedule Evaluation"),
fields: [
@@ -530,6 +531,9 @@ const open_evaluation_form = (e) => {
min_date: new Date(
frappe.datetime.add_days(frappe.datetime.get_today(), 1)
),
max_date: evaluation_end_date
? new Date(evaluation_end_date)
: "",
change: () => {
if (this.eval_form.get_value("date")) get_slots();
},

View File

@@ -43,6 +43,7 @@ def get_context(context):
"batch_details",
"published",
"allow_future",
"evaluation_end_date",
],
as_dict=True,
)