feat: 優化中央後台 UI (用語調整、移除連結) 與實作 RWD 支援
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 44s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped

This commit is contained in:
2026-01-16 10:14:59 +08:00
parent 8a9b8135bd
commit aa4143ccf1
6 changed files with 72 additions and 51 deletions

View File

@@ -19,7 +19,7 @@ interface DashboardProps {
export default function Dashboard({ totalTenants, activeTenants, recentTenants }: DashboardProps) {
const statsCards = [
{
title: "戶總數",
title: "戶總數",
value: totalTenants,
icon: Building2,
color: "bg-blue-500",
@@ -62,7 +62,7 @@ export default function Dashboard({ totalTenants, activeTenants, recentTenants }
{/* Recent Tenants */}
<div className="bg-white rounded-xl border border-slate-200 overflow-hidden">
<div className="px-6 py-4 border-b border-slate-200 flex items-center justify-between">
<h2 className="text-lg font-semibold text-slate-900"></h2>
<h2 className="text-lg font-semibold text-slate-900"></h2>
<Link
href="/landlord/tenants"
className="text-sm text-primary-main hover:underline"
@@ -73,7 +73,7 @@ export default function Dashboard({ totalTenants, activeTenants, recentTenants }
<div className="divide-y divide-slate-100">
{recentTenants.length === 0 ? (
<div className="px-6 py-8 text-center text-slate-500">
</div>
) : (
recentTenants.map((tenant) => (
@@ -87,8 +87,8 @@ export default function Dashboard({ totalTenants, activeTenants, recentTenants }
<div className="flex items-center gap-3">
<span
className={`px-2 py-1 rounded-full text-xs font-medium ${tenant.is_active
? "bg-green-100 text-green-700"
: "bg-slate-100 text-slate-600"
? "bg-green-100 text-green-700"
: "bg-slate-100 text-slate-600"
}`}
>
{tenant.is_active ? "啟用" : "停用"}

View File

@@ -16,17 +16,17 @@ export default function TenantCreate() {
};
return (
<LandlordLayout title="新增戶">
<LandlordLayout title="新增戶">
<div className="max-w-2xl">
<div className="mb-6">
<h1 className="text-2xl font-bold text-slate-900"></h1>
<p className="text-slate-500 mt-1"></p>
<h1 className="text-2xl font-bold text-slate-900"></h1>
<p className="text-slate-500 mt-1"></p>
</div>
<form onSubmit={handleSubmit} className="bg-white rounded-xl border border-slate-200 p-6 space-y-6">
<div>
<label className="block text-sm font-medium text-slate-700 mb-2">
ID <span className="text-red-500">*</span>
ID <span className="text-red-500">*</span>
</label>
<input
type="text"
@@ -41,7 +41,7 @@ export default function TenantCreate() {
<div>
<label className="block text-sm font-medium text-slate-700 mb-2">
<span className="text-red-500">*</span>
<span className="text-red-500">*</span>
</label>
<input
type="text"
@@ -88,7 +88,7 @@ export default function TenantCreate() {
disabled={processing}
className="bg-primary-main hover:bg-primary-dark text-white px-6 py-2 rounded-lg disabled:opacity-50 transition-colors"
>
{processing ? "處理中..." : "建立戶"}
{processing ? "處理中..." : "建立戶"}
</button>
<Link
href="/landlord/tenants"

View File

@@ -26,17 +26,17 @@ export default function TenantEdit({ tenant }: Props) {
};
return (
<LandlordLayout title="編輯戶">
<LandlordLayout title="編輯戶">
<div className="max-w-2xl">
<div className="mb-6">
<h1 className="text-2xl font-bold text-slate-900"></h1>
<p className="text-slate-500 mt-1"> {tenant.id} </p>
<h1 className="text-2xl font-bold text-slate-900"></h1>
<p className="text-slate-500 mt-1"> {tenant.id} </p>
</div>
<form onSubmit={handleSubmit} className="bg-white rounded-xl border border-slate-200 p-6 space-y-6">
<div>
<label className="block text-sm font-medium text-slate-700 mb-2">
ID
ID
</label>
<input
type="text"
@@ -44,12 +44,12 @@ export default function TenantEdit({ tenant }: Props) {
disabled
className="w-full px-4 py-2 border border-slate-200 rounded-lg bg-slate-50 text-slate-500"
/>
<p className="mt-1 text-sm text-slate-500"> ID </p>
<p className="mt-1 text-sm text-slate-500"> ID </p>
</div>
<div>
<label className="block text-sm font-medium text-slate-700 mb-2">
<span className="text-red-500">*</span>
<span className="text-red-500">*</span>
</label>
<input
type="text"
@@ -81,7 +81,7 @@ export default function TenantEdit({ tenant }: Props) {
onChange={(e) => setData("is_active", e.target.checked)}
className="w-4 h-4 rounded border-slate-300 text-primary-main focus:ring-primary-main"
/>
<span className="text-sm font-medium text-slate-700"></span>
<span className="text-sm font-medium text-slate-700"></span>
</label>
</div>

View File

@@ -37,20 +37,20 @@ export default function TenantIndex({ tenants }: Props) {
};
return (
<LandlordLayout title="戶管理">
<LandlordLayout title="戶管理">
<div className="space-y-6">
{/* Header */}
<div className="flex items-center justify-between">
<div>
<h1 className="text-2xl font-bold text-slate-900"></h1>
<p className="text-slate-500 mt-1"></p>
<h1 className="text-2xl font-bold text-slate-900"></h1>
<p className="text-slate-500 mt-1"></p>
</div>
<Link
href="/landlord/tenants/create"
className="bg-primary-main hover:bg-primary-dark text-white px-4 py-2 rounded-lg flex items-center gap-2 transition-colors"
>
<Plus className="w-4 h-4" />
</Link>
</div>
@@ -83,7 +83,7 @@ export default function TenantIndex({ tenants }: Props) {
{tenants.length === 0 ? (
<tr>
<td colSpan={6} className="px-6 py-12 text-center text-slate-500">
</td>
</tr>
) : (
@@ -120,8 +120,8 @@ export default function TenantIndex({ tenants }: Props) {
<td className="px-6 py-4">
<span
className={`px-2 py-1 rounded-full text-xs font-medium ${tenant.is_active
? "bg-green-100 text-green-700"
: "bg-slate-100 text-slate-600"
? "bg-green-100 text-green-700"
: "bg-slate-100 text-slate-600"
}`}
>
{tenant.is_active ? "啟用" : "停用"}
@@ -167,9 +167,9 @@ export default function TenantIndex({ tenants }: Props) {
<AlertDialog open={!!deleteTarget} onOpenChange={() => setDeleteTarget(null)}>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle></AlertDialogTitle>
<AlertDialogTitle></AlertDialogTitle>
<AlertDialogDescription>
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>

View File

@@ -45,7 +45,7 @@ export default function TenantShow({ tenant }: Props) {
};
return (
<LandlordLayout title="戶詳情">
<LandlordLayout title="戶詳情">
<div className="max-w-3xl space-y-6">
{/* Back Link */}
<Link
@@ -60,7 +60,7 @@ export default function TenantShow({ tenant }: Props) {
<div className="flex items-start justify-between">
<div>
<h1 className="text-2xl font-bold text-slate-900">{tenant.name}</h1>
<p className="text-slate-500 mt-1"> ID: {tenant.id}</p>
<p className="text-slate-500 mt-1"> ID: {tenant.id}</p>
</div>
<Link
href={`/landlord/tenants/${tenant.id}/edit`}
@@ -79,8 +79,8 @@ export default function TenantShow({ tenant }: Props) {
<dd className="mt-1">
<span
className={`px-2 py-1 rounded-full text-xs font-medium ${tenant.is_active
? "bg-green-100 text-green-700"
: "bg-slate-100 text-slate-600"
? "bg-green-100 text-green-700"
: "bg-slate-100 text-slate-600"
}`}
>
{tenant.is_active ? "啟用" : "停用"}