feat: chapter creation

This commit is contained in:
Jannat Patel
2024-03-04 22:10:51 +05:30
parent e863abe37c
commit 9ae96bd1fa
16 changed files with 4703 additions and 52 deletions

View File

@@ -16,7 +16,13 @@
</Button>
</div>
</header>
<div class="pb-5">
<div v-if="batches.data" class="pb-5">
<div
v-if="batches.data.length == 0 && batches.list.loading"
class="p-5 text-base text-gray-700"
>
{{ __('Loading Batches...') }}
</div>
<Tabs v-model="tabIndex" :tabs="tabs" tablistClass="overflow-x-visible">
<template #tab="{ tab, selected }">
<div>
@@ -69,13 +75,14 @@
</div>
</template>
<script setup>
import { createResource, Breadcrumbs, Button, Tabs, Badge } from 'frappe-ui'
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'
const user = inject('$user')
const batches = createResource({
const batches = createListResource({
doctype: 'LMS Batch',
url: 'lms.lms.utils.get_batches',
cache: ['batches', user?.data?.email],
auto: true,