diff --git a/src/app/contracts/[id]/page.js b/src/app/contracts/[id]/page.js index 43f1fa7..6685671 100644 --- a/src/app/contracts/[id]/page.js +++ b/src/app/contracts/[id]/page.js @@ -3,6 +3,12 @@ import { useEffect, useState } from "react"; import Link from "next/link"; import { useParams } from "next/navigation"; +import { Card, CardHeader, CardContent } from "@/components/ui/Card"; +import Button from "@/components/ui/Button"; +import Badge from "@/components/ui/Badge"; +import PageContainer from "@/components/ui/PageContainer"; +import PageHeader from "@/components/ui/PageHeader"; +import { LoadingState } from "@/components/ui/States"; export default function ContractDetailsPage() { const params = useParams(); @@ -41,166 +47,352 @@ export default function ContractDetailsPage() { fetchContractDetails(); } }, [contractId]); - if (loading) { return ( -
Contract not found.
+ + + +{contract.contract_number}
-{contract.contract_name}
-{contract.customer_contract_number}
-{contract.customer}
-{contract.investor}
-- {new Date(contract.date_signed).toLocaleDateString("pl-PL")} -
-- {new Date(contract.finish_date).toLocaleDateString("pl-PL")} -
-- Brak projektów przypisanych do tej umowy. -
- ) : ( -- {project.project_number} -
- {project.address && ( -- 📍 {project.address} -
- )} - {project.finish_date && ( -- ⏰ Termin:{" "} - {new Date(project.finish_date).toLocaleDateString( - "pl-PL" - )} -
- )} -+ {contract.contract_number} +
+ {contract.contract_name} +
++ {contract.customer_contract_number} +
++ {contract.customer} +
++ {contract.investor} +
++ {new Date(contract.date_signed).toLocaleDateString( + "en-US" + )} +
++ {new Date(contract.finish_date).toLocaleDateString( + "en-US" + )} +
++ Get started by creating your first project for this contract +
+ + + +Project not found.
+ + + ++ {project.city || "N/A"} +
++ {project.address || "N/A"} +
++ {project.plot || "N/A"} +
++ {project.district || "N/A"} +
++ {project.unit || "N/A"} +
++ {project.finish_date || "N/A"} +
++ {project.wp || "N/A"} +
++ {project.investment_number || "N/A"} +
+{project.contact}
++ {project.coordinates} +
+{project.notes}
++ {project.contract_number || "N/A"} +
++ {project.contract_name || "N/A"} +
++ {project.customer || "N/A"} +
++ {project.investor || "N/A"} +
+{project.city}
+{project.address}
-{project.plot}
-{project.district}
-{project.unit}
-{project.finish_date}
-{project.wp}
-{project.investment_number}
-{project.contact}
-{project.coordinates}
-{project.notes}
-- {project.project_type === "design" - ? "Projektowanie" - : project.project_type === "construction" - ? "Realizacja" - : project.project_type === "design+construction" - ? "Projektowanie + Realizacja" - : "-"} -
-{project.contract_number}
-{project.contract_name}
-{project.customer}
-{project.investor}
-No notes yet.
++ Add your first note using the form above. +
{n.note_date}
-{n.note}
+{n.note}