diff --git a/frontend/src/components/Modals/LiveClassModal.vue b/frontend/src/components/Modals/LiveClassModal.vue index ac2ee3fe..74a3fc74 100644 --- a/frontend/src/components/Modals/LiveClassModal.vue +++ b/frontend/src/components/Modals/LiveClassModal.vue @@ -29,14 +29,12 @@ :label="__('Date')" :required="true" /> - - - +
{ }, onError(err) { toast.error(err.messages?.[0] || err) + console.error(err) }, }) } diff --git a/frontend/src/components/UpcomingEvaluations.vue b/frontend/src/components/UpcomingEvaluations.vue index 86385b50..973340b6 100644 --- a/frontend/src/components/UpcomingEvaluations.vue +++ b/frontend/src/components/UpcomingEvaluations.vue @@ -64,13 +64,13 @@
-
+
{{ dayjs(evl.date).format('DD MMMM YYYY') }}
-
+
{{ formatTime(evl.start_time) }} diff --git a/frontend/src/pages/Batches/BatchForm.vue b/frontend/src/pages/Batches/BatchForm.vue index d10424e9..aa71bedb 100644 --- a/frontend/src/pages/Batches/BatchForm.vue +++ b/frontend/src/pages/Batches/BatchForm.vue @@ -419,9 +419,16 @@ watch( () => batchDetail.doc, () => { if (!batchDetail.doc) return - getMetaInfo('batches', batchDetail.doc?.name, meta) + + if (originalDoc.value) { + isDirty.value = + JSON.stringify(batchDetail.doc) !== JSON.stringify(originalDoc.value) + } + updateBatchData() - } + getMetaInfo('batches', batchDetail.doc?.name, meta) + }, + { deep: true } ) const updateBatchData = () => { @@ -499,17 +506,6 @@ const updateBatch = () => { ) } -watch( - () => batchDetail.doc, - () => { - if (originalDoc.value) { - isDirty.value = - JSON.stringify(batchDetail.doc) !== JSON.stringify(originalDoc.value) - } - }, - { deep: true } -) - const deleteBatch = () => { $dialog({ title: __('Confirm your action to delete'), diff --git a/frontend/src/pages/Batches/components/NewBatchModal.vue b/frontend/src/pages/Batches/components/NewBatchModal.vue index 9402a1ca..2b331cae 100644 --- a/frontend/src/pages/Batches/components/NewBatchModal.vue +++ b/frontend/src/pages/Batches/components/NewBatchModal.vue @@ -180,10 +180,12 @@ const onInstructorCreated = (user: any) => { const validateFields = () => { batch.value.description = sanitizeHTML(batch.value.description) + batch.value.batch_details = sanitizeHTML(batch.value.batch_details) Object.keys(batch.value).forEach((key) => { if ( key != 'description' && + key != 'batch_details' && typeof batch.value[key as keyof Batch] === 'string' ) { batch.value[key as keyof Batch] = escapeHTML( diff --git a/frontend/src/pages/Profile.vue b/frontend/src/pages/Profile.vue index 608e0ae2..303f6853 100644 --- a/frontend/src/pages/Profile.vue +++ b/frontend/src/pages/Profile.vue @@ -149,6 +149,7 @@ import { createResource, TabButtons, Tooltip, + toast, usePageMeta, } from 'frappe-ui' import { computed, inject, watch, ref, onMounted, watchEffect } from 'vue' @@ -279,11 +280,17 @@ const getTabButtons = () => { } const reloadUser = () => { - call('frappe.sessions.clear').then(() => { - $user.reload().then(() => { - profile.reload() + call('frappe.sessions.clear') + .then(() => { + $user.reload().then(() => { + profile.reload() + toast.success(__('Session refreshed successfully')) + }) + }) + .catch((err) => { + toast.error(__('Failed to refresh session')) + console.error(err) }) - }) } const navigateTo = (url) => {