feat: Add admin user management page with user listing, search, filter, stats, and detail view, along with a Dockerfile for frontend deployment.
Some checks are pending
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Waiting to run
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Blocked by required conditions
Build and Deploy Frontend Learner / Notify Deployment Status (push) Blocked by required conditions
Build and Deploy Backend / Build Backend Docker Image (push) Successful in 18s
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 21s
Build and Deploy Backend / Deploy E-learning Backend 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 Backend / Notify Deployment Status (push) Successful in 1s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 2s
Some checks are pending
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Waiting to run
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Blocked by required conditions
Build and Deploy Frontend Learner / Notify Deployment Status (push) Blocked by required conditions
Build and Deploy Backend / Build Backend Docker Image (push) Successful in 18s
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 21s
Build and Deploy Backend / Deploy E-learning Backend 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 Backend / 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:
parent
0c67bb782e
commit
025084b2bf
2 changed files with 14 additions and 1 deletions
|
|
@ -45,4 +45,4 @@ 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"]
|
||||
|
|
|
|||
|
|
@ -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}" หรือไม่?`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue