feat: add Dockerfile for frontend management and implement an admin page for user management.
All checks were successful
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Successful in 35s
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 34s
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Successful in 3s
Build and Deploy Frontend Management to Dev Server / Deploy E-learning Frontend Management to Dev Server (push) Successful in 3s
Build and Deploy Frontend Learner / Notify Deployment Status (push) Successful in 1s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 2s

This commit is contained in:
Missez 2026-02-10 16:56:34 +07:00
parent 9c52abcfd9
commit e57630ac05
2 changed files with 14 additions and 2 deletions

View file

@ -44,5 +44,4 @@ ENV PORT=3001
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3001
# Start the application using preview command
CMD ["npm", "run", "preview"]
CMD ["node", ".output/server/index.mjs"]

View file

@ -217,6 +217,7 @@
<script setup lang="ts">
import { useQuasar } from 'quasar';
import { adminService, type AdminUserResponse } from '~/services/admin.service';
import { useAuthStore } from '~/stores/auth';
definePageMeta({
layout: 'admin',
@ -367,7 +368,19 @@ const changeRole = (user: AdminUserResponse) => {
});
};
const authStore = useAuthStore();
const confirmDelete = (user: AdminUserResponse) => {
// Prevent deleting own account
if (authStore.user && Number(authStore.user.id) === user.id) {
$q.notify({
type: 'warning',
message: 'ไม่สามารถลบบัญชีของตัวเองได้',
position: 'top'
});
return;
}
$q.dialog({
title: 'ยืนยันการลบ',
message: `คุณต้องการลบผู้ใช้ "${user.profile.first_name} ${user.profile.last_name}" หรือไม่?`,