feat: Introduce comprehensive course management features for admin, including recommended, pending, and detailed course views, and instructor course listing with a lesson preview component.
All checks were successful
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 46s
Build and Deploy Frontend Management to Dev Server / Deploy E-learning Frontend Management to Dev Server (push) Successful in 4s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 2s
All checks were successful
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 46s
Build and Deploy Frontend Management to Dev Server / Deploy E-learning Frontend Management to Dev Server (push) Successful in 4s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 2s
This commit is contained in:
parent
0f92f0d00c
commit
f26a94076c
6 changed files with 141 additions and 23 deletions
|
|
@ -212,12 +212,16 @@
|
|||
กรุณาระบุเหตุผลในการปฏิเสธคอร์ส "{{ course?.title.th }}"
|
||||
</p>
|
||||
<q-input
|
||||
ref="rejectInputRef"
|
||||
v-model="rejectReason"
|
||||
type="textarea"
|
||||
outlined
|
||||
rows="4"
|
||||
label="เหตุผล *"
|
||||
:rules="[val => !!val || 'กรุณาระบุเหตุผล']"
|
||||
:rules="[
|
||||
val => !!val || 'กรุณาระบุเหตุผล',
|
||||
val => (val && val.length >= 10) || 'ระบุเหตุผลอย่างน้อย 10 ตัวอักษร'
|
||||
]"
|
||||
hide-bottom-space
|
||||
lazy-rules="ondemand"
|
||||
/>
|
||||
|
|
@ -229,7 +233,6 @@
|
|||
label="ยืนยันการปฏิเสธ"
|
||||
color="negative"
|
||||
:loading="actionLoading"
|
||||
:disable="!rejectReason.trim()"
|
||||
@click="confirmReject"
|
||||
/>
|
||||
</q-card-actions>
|
||||
|
|
@ -239,7 +242,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useQuasar } from 'quasar';
|
||||
import { useQuasar, QInput } from 'quasar';
|
||||
import { adminService, type CourseDetailForReview } from '~/services/admin.service';
|
||||
|
||||
definePageMeta({
|
||||
|
|
@ -258,6 +261,7 @@ const error = ref('');
|
|||
const actionLoading = ref(false);
|
||||
const showRejectModal = ref(false);
|
||||
const rejectReason = ref('');
|
||||
const rejectInputRef = ref<QInput | null>(null);
|
||||
|
||||
// Computed
|
||||
const totalLessons = computed(() =>
|
||||
|
|
@ -415,7 +419,8 @@ const confirmApprove = () => {
|
|||
};
|
||||
|
||||
const confirmReject = async () => {
|
||||
if (!course.value || !rejectReason.value.trim()) return;
|
||||
rejectInputRef.value?.validate();
|
||||
if (rejectInputRef.value?.hasError || !course.value) return;
|
||||
|
||||
actionLoading.value = true;
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue