Feature: Tenant Short Name and Branding Implementation
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Has been skipped
Koori-ERP-Deploy-System / deploy-production (push) Successful in 49s

- Added short_name to Tenant model and controller
- Updated Landlord/Tenant pages (Create, Edit, Show, Index)
- Implemented branding customization (Favicon, Login Copyright, Sidebar Title)
- Updated HandleInertiaRequests to share branding data
This commit is contained in:
2026-01-29 16:28:34 +08:00
parent 746eeb6f01
commit 2e71a1cb29
10 changed files with 78 additions and 18 deletions

View File

@@ -19,6 +19,7 @@ class TenantController extends Controller
return [
'id' => $tenant->id,
'name' => $tenant->name ?? $tenant->id,
'short_name' => $tenant->short_name ?? null,
'email' => $tenant->email ?? null,
'is_active' => $tenant->is_active ?? true,
'created_at' => $tenant->created_at->format('Y-m-d H:i'),
@@ -47,6 +48,7 @@ class TenantController extends Controller
$validated = $request->validate([
'id' => ['required', 'string', 'max:50', 'alpha_dash', Rule::unique('tenants', 'id')],
'name' => ['required', 'string', 'max:100'],
'short_name' => ['nullable', 'string', 'max:50'],
'email' => ['nullable', 'email', 'max:100'],
'domain' => ['nullable', 'string', 'max:100'],
]);
@@ -54,6 +56,7 @@ class TenantController extends Controller
$tenant = Tenant::create([
'id' => $validated['id'],
'name' => $validated['name'],
'short_name' => $validated['short_name'] ?? null,
'email' => $validated['email'] ?? null,
'is_active' => true,
'branding' => [
@@ -85,6 +88,7 @@ class TenantController extends Controller
'tenant' => [
'id' => $tenant->id,
'name' => $tenant->name ?? $tenant->id,
'short_name' => $tenant->short_name ?? null,
'email' => $tenant->email ?? null,
'is_active' => $tenant->is_active ?? true,
'created_at' => $tenant->created_at->format('Y-m-d H:i'),
@@ -128,6 +132,7 @@ class TenantController extends Controller
'tenant' => [
'id' => $tenant->id,
'name' => $tenant->name ?? $tenant->id,
'short_name' => $tenant->short_name ?? null,
'email' => $tenant->email ?? null,
'is_active' => $tenant->is_active ?? true,
],
@@ -143,6 +148,7 @@ class TenantController extends Controller
$validated = $request->validate([
'name' => ['required', 'string', 'max:100'],
'short_name' => ['nullable', 'string', 'max:50'],
'email' => ['nullable', 'email', 'max:100'],
'is_active' => ['boolean'],
]);