mirror of
https://github.com/frappe/lms.git
synced 2026-04-19 22:52:29 +03:00
@@ -29,14 +29,12 @@
|
||||
:label="__('Date')"
|
||||
:required="true"
|
||||
/>
|
||||
<Tooltip :text="__('Duration of the live class in minutes')">
|
||||
<FormControl
|
||||
type="number"
|
||||
v-model="liveClass.duration"
|
||||
:label="__('Duration')"
|
||||
:required="true"
|
||||
/>
|
||||
</Tooltip>
|
||||
<FormControl
|
||||
type="number"
|
||||
v-model="liveClass.duration"
|
||||
:label="__('Duration (in minutes)')"
|
||||
:required="true"
|
||||
/>
|
||||
</div>
|
||||
<div class="space-y-4">
|
||||
<Tooltip
|
||||
@@ -186,6 +184,7 @@ const submitLiveClass = (close) => {
|
||||
},
|
||||
onError(err) {
|
||||
toast.error(err.messages?.[0] || err)
|
||||
console.error(err)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -64,13 +64,13 @@
|
||||
</template>
|
||||
</Dropdown>
|
||||
</div>
|
||||
<div class="flex items-center mb-3">
|
||||
<div class="flex items-center mb-2">
|
||||
<Calendar class="w-4 h-4 stroke-1.5" />
|
||||
<span class="ml-2">
|
||||
{{ dayjs(evl.date).format('DD MMMM YYYY') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center mb-3">
|
||||
<div class="flex items-center mb-2">
|
||||
<Clock class="w-4 h-4 stroke-1.5" />
|
||||
<span class="ml-2">
|
||||
{{ formatTime(evl.start_time) }}
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user