feat: lesson creation

This commit is contained in:
Jannat Patel
2024-03-05 23:07:58 +05:30
parent b9f6a23412
commit 0ce7c74778
11 changed files with 409 additions and 155 deletions

View File

@@ -8,7 +8,7 @@
:items="[{ label: __('All Batches'), route: { name: 'Batches' } }]"
/>
<div class="flex">
<Button variant="solid">
<Button variant="solid" @click="openBatchModal()">
<template #prefix>
<Plus class="h-4 w-4" />
</template>
@@ -73,14 +73,18 @@
</Tabs>
</div>
</div>
<BatchCreation v-model="showBatchModal" />
</template>
<script setup>
import { createListResource, Breadcrumbs, Button, Tabs, Badge } from 'frappe-ui'
import { Plus } from 'lucide-vue-next'
import BatchCard from '@/components/BatchCard.vue'
import { inject, ref, computed } from 'vue'
import BatchCreation from '@/components/Modals/BatchCreation.vue'
const user = inject('$user')
const showBatchModal = ref(false)
const batches = createListResource({
doctype: 'LMS Batch',
url: 'lms.lms.utils.get_batches',
@@ -116,4 +120,8 @@ if (user.data) {
count: computed(() => batches.data?.enrolled?.length),
})
}
const openBatchModal = () => {
showBatchModal.value = true
}
</script>