init frontend_management

This commit is contained in:
Missez 2026-01-12 16:49:58 +07:00
parent af58550f7f
commit 62812f2090
23 changed files with 13174 additions and 0 deletions

View file

@ -0,0 +1,74 @@
<template>
<div class="min-h-screen bg-gray-50">
<!-- Sidebar -->
<aside class="fixed left-0 top-0 h-screen w-64 bg-white shadow-lg">
<div class="p-6">
<h2 class="text-xl font-bold text-primary-600">E-Learning</h2>
<p class="text-sm text-gray-500">Instructor Panel</p>
</div>
<nav class="px-4">
<NuxtLink
to="/instructor"
class="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-primary-100 shadow-md transition mb-2"
active-class="bg-primary-500 text-white hover:bg-primary-600 "
>
<span>📊</span>
<span>Dashboard</span>
</NuxtLink>
<NuxtLink
to="/instructor/courses"
class="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-primary-200 shadow-md transition mb-2"
active-class="bg-primary-500 text-white hover:bg-primary-600"
>
<span>📚</span>
<span>หลกสตร</span>
</NuxtLink>
<NuxtLink
to="/instructor/announcements"
class="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-primary-200 shadow-md transition mb-2"
active-class="bg-primary-500 text-white hover:bg-primary-600"
>
<span>📢</span>
<span>ประกาศ</span>
</NuxtLink>
<NuxtLink
to="/instructor/reports"
class="flex items-center gap-3 px-4 py-3 rounded-lg hover:bg-primary-200 shadow-md transition mb-2"
active-class="bg-primary-500 text-white hover:bg-primary-600"
>
<span>📈</span>
<span>รายงาน</span>
</NuxtLink>
</nav>
<div class="absolute bottom-0 left-0 right-0 p-4 border-t">
<button
@click="handleLogout"
class="w-full flex items-center gap-3 px-4 py-3 text-red-600 hover:bg-red-50 rounded-lg transition"
>
<span>🚪</span>
<span>ออกจากระบบ</span>
</button>
</div>
</aside>
<!-- Main Content -->
<main class="ml-64 p-8">
<slot />
</main>
</div>
</template>
<script setup lang="ts">
const authStore = useAuthStore();
const router = useRouter();
const handleLogout = () => {
authStore.logout();
router.push('/login');
};
</script>