feat: Implement initial frontend for instructor and admin course management functionalities.
All checks were successful
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 4m21s
Build and Deploy Frontend Management to Dev Server / Deploy E-learning Frontend Management to Dev Server (push) Successful in 7s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 1s

This commit is contained in:
Missez 2026-02-27 14:00:04 +07:00
parent c8ef372d4e
commit 03f16cf2fd
15 changed files with 197 additions and 36 deletions

View file

@ -182,6 +182,7 @@
<script setup lang="ts">
import { adminService, type PendingCourse, type AuditLog } from '~/services/admin.service';
import { useQuasar } from 'quasar';
definePageMeta({
layout: 'admin',
@ -190,6 +191,7 @@ definePageMeta({
const authStore = useAuthStore();
const router = useRouter();
const $q = useQuasar();
// State
const loading = ref(true);
@ -207,8 +209,23 @@ const goToProfile = () => {
};
const handleLogout = () => {
authStore.logout();
router.push('/login');
$q.dialog({
title: 'ยืนยันการออกจากระบบ',
message: 'คุณต้องการออกจากระบบใช่หรือไม่?',
cancel: {
label: 'ยกเลิก',
flat: true,
color: 'grey-8'
},
ok: {
label: 'ออกจากระบบ',
color: 'negative'
},
persistent: true
}).onOk(() => {
authStore.logout();
router.push('/login');
});
};
// Data Fetching

View file

@ -171,7 +171,7 @@
</div>
<!-- Stats -->
<div class="grid grid-cols-3 gap-2">
<!-- <div class="grid grid-cols-3 gap-2">
<div class="bg-blue-50 p-2 rounded-lg text-center">
<div class="text-2xl font-bold text-blue-800">{{ selectedCourse.chapters_count || 0 }}</div>
<div class="text-blue-600 text-sm">Chapters</div>
@ -180,7 +180,7 @@
<div class="text-2xl font-bold text-purple-800">{{ selectedCourse.lessons_count || 0 }}</div>
<div class="text-purple-600 text-sm">Lessons</div>
</div>
</div>
</div> -->
</div>
</div>
@ -204,7 +204,7 @@
>
<q-icon name="article" color="primary" size="20px" />
<span class="text-gray-700">{{ lessonIndex + 1 }}. {{ lesson.title.th }}</span>
<span v-if="lesson.title.en" class="text-gray-400 text-xs ml-auto">{{ lesson.title.en }}</span>
<!-- <span v-if="lesson.title.en" class="text-gray-400 text-xs ml-auto">{{ lesson.title.en }}</span> -->
</div>
</div>
</q-expansion-item>

View file

@ -93,7 +93,7 @@
<q-icon v-else name="person" color="primary" />
</div>
<div>
<div class="font-medium text-primary-600 hover:underline cursor-pointer">
<div class="font-medium text-primary-600">
{{ getFullName(props.row) }}
</div>
<div class="text-sm text-gray-500">{{ props.row.email }}</div>