Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/admin/src/apis/controller/user/deleteUser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { $api } from '@apis';

const deleteUser = () => {
return $api.useMutation('delete', '/api/admin/user/{id}');
};

export default deleteUser;
13 changes: 13 additions & 0 deletions apps/admin/src/apis/controller/user/getUserById.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { $api } from '@apis';

const getUserById = (id: number) => {
return $api.useQuery('get', '/api/admin/user/{id}', {
params: {
path: {
id,
},
},
});
};

export default getUserById;
7 changes: 7 additions & 0 deletions apps/admin/src/apis/controller/user/getUserList.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { $api } from '@apis';

const getUserList = () => {
return $api.useQuery('get', '/api/admin/user');
};

export default getUserList;
6 changes: 5 additions & 1 deletion apps/admin/src/apis/controller/user/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import deleteUser from './deleteUser';
import getUserById from './getUserById';
import getUserList from './getUserList';
import postUser from './postUser';
import putUser from './putUser';

export { postUser };
export { deleteUser, getUserById, getUserList, postUser, putUser };
7 changes: 7 additions & 0 deletions apps/admin/src/apis/controller/user/putUser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { $api } from '@apis';

const putUser = () => {
return $api.useMutation('put', '/api/admin/user/{id}');
};

export default putUser;
20 changes: 16 additions & 4 deletions apps/admin/src/components/common/GNB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Package,
ChartNoAxesCombined,
Users,
ShieldCheck,
Megaphone,
Tags,
MessageCircle,
Expand Down Expand Up @@ -98,7 +99,7 @@ const GNB = () => {
return (
<div
className={`fixed top-0 left-0 z-40 h-screen bg-white shadow-xl shadow-gray-200/50 transition-all duration-300 ease-in-out ${isCollapsed ? 'w-20' : 'w-80'}`}>
<div className='flex h-full flex-col'>
<div className='flex h-full min-h-0 flex-col'>
{/* Header */}
<div className='mb-3.5 flex items-center justify-between pt-4 pl-4'>
<div className='flex items-center gap-3'>
Expand All @@ -123,8 +124,8 @@ const GNB = () => {
</div>

{/* Navigation */}
<nav className='flex flex-1 flex-col justify-between px-4 pb-4'>
<div className='flex-1'>
<nav className='flex min-h-0 flex-1 flex-col px-4 pb-4'>
<div className='min-h-0 flex-1 overflow-y-auto pr-1'>
{/* Student Management Section */}
<div className=''>
<SectionTitle isCollapsed={isCollapsed}>학생 관리</SectionTitle>
Expand Down Expand Up @@ -274,9 +275,20 @@ const GNB = () => {
isCollapsed={isCollapsed}
/>
</div>

<div className='space-y-1'>
<SectionTitle isCollapsed={isCollapsed}>운영 관리</SectionTitle>
<NavItem
to='/admin-user'
icon={<ShieldCheck className='h-5 w-5' />}
label='관리자 계정'
isCollapsed={isCollapsed}
/>
</div>
</div>

<div
className={`relative mb-1 flex h-12 w-full cursor-pointer items-center gap-3.5 overflow-hidden rounded-2xl px-3.5 text-gray-700 transition-all duration-300 hover:bg-black/5`}
className={`mt-3 flex h-12 w-full flex-shrink-0 cursor-pointer items-center gap-3.5 overflow-hidden rounded-2xl px-3.5 text-gray-700 transition-all duration-300 hover:bg-black/5`}
onClick={toggleCollapse}>
<div
className={`flex h-5 w-5 flex-shrink-0 items-center justify-center transition-transform duration-300`}>
Expand Down
Loading
Loading