feat: add customer contract number to project view and update project query

This commit is contained in:
2025-12-03 22:15:50 +01:00
parent 5abacdc8e1
commit 77f4c80a79
2 changed files with 12 additions and 2 deletions

View File

@@ -588,10 +588,19 @@ export default function ProjectViewPage() {
</div>
<div>
<span className="text-sm font-medium text-gray-500 block mb-1">
Nazwa umowy
Numer umowy klienta
</span>
<p className="text-gray-900 font-medium">
{project.contract_name || "N/A"}
{project.customer_contract_number ? (
<Link
href={`/contracts/${project.contract_id}`}
className="text-inherit hover:text-inherit no-underline"
>
{project.customer_contract_number}
</Link>
) : (
"N/A"
)}
</p>
</div>
<div>

View File

@@ -222,6 +222,7 @@ export function getProjectWithContract(id) {
p.*,
c.contract_number,
c.contract_name,
c.customer_contract_number,
c.customer,
c.investor,
creator.name as created_by_name,