diff --git a/resources/views/tenants/create.blade.php b/resources/views/tenants/create.blade.php new file mode 100644 index 00000000..6df94dff --- /dev/null +++ b/resources/views/tenants/create.blade.php @@ -0,0 +1,192 @@ +@extends('layouts.app') + +@section('title', '테넌트 생성') + +@section('content') +
+ +
+

테넌트 생성

+ + ← 목록으로 + +
+ + +
+
+ + +
+

기본 정보

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+

회사 정보

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+

구독 정보

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+

관리자 메모

+ +
+ + +
+ + 취소 + + +
+
+
+
+@endsection + +@push('scripts') + + +@endpush \ No newline at end of file diff --git a/resources/views/tenants/edit.blade.php b/resources/views/tenants/edit.blade.php new file mode 100644 index 00000000..6e5ae4b0 --- /dev/null +++ b/resources/views/tenants/edit.blade.php @@ -0,0 +1,218 @@ +@extends('layouts.app') + +@section('title', '테넌트 수정') + +@section('content') +
+ +
+

테넌트 수정

+ + ← 목록으로 + +
+ + +
+
+ + +
+

기본 정보

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+

회사 정보

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+

구독 정보

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+

관리자 메모

+ +
+ + +
+

통계

+
+
+
{{ $tenant->users_count ?? 0 }}
+
사용자
+
+
+
{{ $tenant->departments_count ?? 0 }}
+
부서
+
+
+
{{ $tenant->menus_count ?? 0 }}
+
메뉴
+
+
+
{{ $tenant->roles_count ?? 0 }}
+
역할
+
+
+
+ + +
+ + 취소 + + +
+
+
+
+@endsection + +@push('scripts') + + +@endpush \ No newline at end of file diff --git a/resources/views/tenants/index.blade.php b/resources/views/tenants/index.blade.php new file mode 100644 index 00000000..eebf8b97 --- /dev/null +++ b/resources/views/tenants/index.blade.php @@ -0,0 +1,110 @@ +@extends('layouts.app') + +@section('title', '테넌트 관리') + +@section('content') +
+ +
+

테넌트 관리

+ + + 새 테넌트 + +
+ + +
+
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + + +
+
+ + +
+ +
+
+
+
+
+@endsection + +@push('scripts') + + +@endpush \ No newline at end of file diff --git a/resources/views/tenants/partials/table.blade.php b/resources/views/tenants/partials/table.blade.php new file mode 100644 index 00000000..b844aec7 --- /dev/null +++ b/resources/views/tenants/partials/table.blade.php @@ -0,0 +1,148 @@ +
+ + + + + + + + + + + + + + + + + + + @forelse($tenants as $tenant) + + + + + + + + + + + + + + + @empty + + + + @endforelse + +
ID회사명코드상태이메일전화번호사용자부서메뉴역할생성일액션
+ {{ $tenant->id }} + +
{{ $tenant->company_name }}
+ @if($tenant->ceo_name) +
대표: {{ $tenant->ceo_name }}
+ @endif +
+ {{ $tenant->code }} + + + {{ $tenant->status_label }} + + + {{ $tenant->email ?? '-' }} + + {{ $tenant->phone ?? '-' }} + + {{ $tenant->users_count ?? 0 }} + + {{ $tenant->departments_count ?? 0 }} + + {{ $tenant->menus_count ?? 0 }} + + {{ $tenant->roles_count ?? 0 }} + + {{ $tenant->created_at->format('Y-m-d') }} + + @if($tenant->deleted_at) + + + @if(auth()->user()?->is_super_admin) + + @endif + @else + + + 수정 + + + @endif +
+ 등록된 테넌트가 없습니다. +
+
+ + +@if($tenants->hasPages()) +
+
+
+ @if($tenants->onFirstPage()) + + 이전 + + @else + + @endif + + @if($tenants->hasMorePages()) + + @else + + 다음 + + @endif +
+ +
+
+@endif \ No newline at end of file diff --git a/routes/api.php b/routes/api.php new file mode 100644 index 00000000..80f7813e --- /dev/null +++ b/routes/api.php @@ -0,0 +1,30 @@ +prefix('admin')->name('api.admin.')->group(function () { + + // 테넌트 관리 API + Route::prefix('tenants')->name('tenants.')->group(function () { + Route::get('/', [TenantController::class, 'index'])->name('index'); + Route::post('/', [TenantController::class, 'store'])->name('store'); + Route::get('/{id}', [TenantController::class, 'show'])->name('show'); + Route::put('/{id}', [TenantController::class, 'update'])->name('update'); + Route::delete('/{id}', [TenantController::class, 'destroy'])->name('destroy'); + + // 추가 액션 + Route::post('/{id}/restore', [TenantController::class, 'restore'])->name('restore'); + Route::delete('/{id}/force', [TenantController::class, 'forceDestroy'])->name('forceDestroy'); + Route::get('/stats', [TenantController::class, 'stats'])->name('stats'); + }); +}); \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 9628af06..497ec248 100644 --- a/routes/web.php +++ b/routes/web.php @@ -27,7 +27,14 @@ // 테넌트 전환 Route::post('/tenant/switch', [TenantController::class, 'switch'])->name('tenant.switch'); - // 대시보드 (임시) + // 테넌트 관리 (Blade 화면만) + Route::prefix('tenants')->name('tenants.')->group(function () { + Route::get('/', [TenantController::class, 'index'])->name('index'); + Route::get('/create', [TenantController::class, 'create'])->name('create'); + Route::get('/{id}/edit', [TenantController::class, 'edit'])->name('edit'); + }); + + // 대시보드 Route::get('/dashboard', function () { return view('dashboard.index'); })->name('dashboard');