From 9c2bebb3d921453e9aa9e57dd055c03b72c1b490 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Fri, 21 Jun 2024 13:08:58 +0530 Subject: [PATCH] feat: timezone in batches --- frontend/src/components/BatchCard.vue | 10 ++- frontend/src/components/BatchOverlay.vue | 10 ++- frontend/src/pages/Batch.vue | 9 ++- frontend/src/pages/BatchCreation.vue | 70 +++++++++++++++---- lms/lms/doctype/lms_batch/lms_batch.json | 13 +++- .../certificate_request_creation.html | 2 +- .../certificate_request_reminder.html | 2 +- .../certificate_request_reminder.json | 6 +- lms/lms/utils.py | 1 + lms/public/frontend/index.html | 2 +- lms/www/lms.py | 8 +++ 11 files changed, 104 insertions(+), 29 deletions(-) diff --git a/frontend/src/components/BatchCard.vue b/frontend/src/components/BatchCard.vue index f5525858..f187d0b2 100644 --- a/frontend/src/components/BatchCard.vue +++ b/frontend/src/components/BatchCard.vue @@ -36,19 +36,25 @@ :endDate="batch.end_date" class="mb-3" /> -
+
{{ formatTime(batch.start_time) }} - {{ formatTime(batch.end_time) }}
+
+ + + {{ batch.timezone }} + +
+ diff --git a/lms/www/lms.py b/lms/www/lms.py index 4f92c88f..6a75ce06 100644 --- a/lms/www/lms.py +++ b/lms/www/lms.py @@ -82,6 +82,14 @@ def get_meta(app_path): if re.match(r"^batches/.*$", app_path): batch_name = app_path.split("/")[1] + if "new/edit" in app_path: + return { + "title": _("New Batch"), + "image": frappe.db.get_single_value("Website Settings", "banner_image"), + "description": "Create a new batch", + "keywords": "New Batch, Create Batch", + "link": "/lms/batches/new/edit", + } batch = frappe.db.get_value( "LMS Batch", batch_name,