Feature: Tenant Short Name and Branding Implementation
- 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:
@@ -5,6 +5,7 @@ import { FormEvent } from "react";
|
||||
interface Tenant {
|
||||
id: string;
|
||||
name: string;
|
||||
short_name: string | null;
|
||||
email: string | null;
|
||||
is_active: boolean;
|
||||
}
|
||||
@@ -16,6 +17,7 @@ interface Props {
|
||||
export default function TenantEdit({ tenant }: Props) {
|
||||
const { data, setData, put, processing, errors } = useForm({
|
||||
name: tenant.name,
|
||||
short_name: tenant.short_name || "",
|
||||
email: tenant.email || "",
|
||||
is_active: tenant.is_active,
|
||||
});
|
||||
@@ -62,6 +64,19 @@ export default function TenantEdit({ tenant }: Props) {
|
||||
{errors.name && <p className="mt-1 text-sm text-red-500">{errors.name}</p>}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-slate-700 mb-2">
|
||||
客戶簡稱
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
value={data.short_name}
|
||||
onChange={(e) => setData("short_name", e.target.value)}
|
||||
className="w-full px-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-primary-main focus:border-primary-main"
|
||||
/>
|
||||
<p className="mt-1 text-sm text-slate-500">選填</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-slate-700 mb-2">
|
||||
聯絡信箱
|
||||
|
||||
Reference in New Issue
Block a user