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>
<div> <div>
<span className="text-sm font-medium text-gray-500 block mb-1"> <span className="text-sm font-medium text-gray-500 block mb-1">
Nazwa umowy Numer umowy klienta
</span> </span>
<p className="text-gray-900 font-medium"> <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> </p>
</div> </div>
<div> <div>

View File

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