Refactor project and contract forms for improved UI and functionality

- Updated NewProjectPage to use PageContainer and PageHeader for better layout.
- Enhanced ProjectListPage to display project data in a responsive table format.
- Refactored ContractForm to use Card components and improved loading state handling.
- Refactored ProjectForm to use Card components, added loading state, and improved form structure and styling.
This commit is contained in:
Chop
2025-06-19 18:59:03 +02:00
parent 85f18825ad
commit 0acb203ef8
8 changed files with 1465 additions and 523 deletions

View File

@@ -1,10 +1,39 @@
import ContractForm from "@/components/ContractForm";
import PageContainer from "@/components/ui/PageContainer";
import PageHeader from "@/components/ui/PageHeader";
import Button from "@/components/ui/Button";
import Link from "next/link";
export default function NewContractPage() {
return (
<div className="p-4 max-w-2xl mx-auto">
<h1 className="text-xl font-bold mb-4">Nowa umowa</h1>
<ContractForm />
</div>
<PageContainer>
<PageHeader
title="Create New Contract"
description="Add a new contract to your portfolio"
action={
<Link href="/contracts">
<Button variant="outline" size="sm">
<svg
className="w-4 h-4 mr-2"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M15 19l-7-7 7-7"
/>
</svg>
Back to Contracts
</Button>
</Link>
}
/>
<div className="max-w-2xl">
<ContractForm />
</div>
</PageContainer>
);
}