feat: Update project and contract terminology for consistency in UI and translations
This commit is contained in:
@@ -177,7 +177,19 @@ export default function ContractsMainPage() {
|
|||||||
>
|
>
|
||||||
<Link href="/contracts/new">
|
<Link href="/contracts/new">
|
||||||
<Button variant="primary" size="lg">
|
<Button variant="primary" size="lg">
|
||||||
<span className="mr-2">➕</span>
|
<svg
|
||||||
|
className="w-5 h-5 mr-2"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
strokeWidth={2}
|
||||||
|
d="M12 4v16m8-8H4"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
{t('contracts.newContract')}
|
{t('contracts.newContract')}
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
@@ -232,7 +244,19 @@ export default function ContractsMainPage() {
|
|||||||
>
|
>
|
||||||
<Link href="/contracts/new">
|
<Link href="/contracts/new">
|
||||||
<Button variant="primary" size="lg">
|
<Button variant="primary" size="lg">
|
||||||
<span className="mr-2">➕</span>
|
<svg
|
||||||
|
className="w-5 h-5 mr-2"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
strokeWidth={2}
|
||||||
|
d="M12 4v16m8-8H4"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
{t('contracts.newContract')}
|
{t('contracts.newContract')}
|
||||||
</Button>
|
</Button>
|
||||||
</Link>{" "}
|
</Link>{" "}
|
||||||
|
|||||||
@@ -266,9 +266,9 @@ export default function ProjectViewPage() {
|
|||||||
{project.project_type === "design"
|
{project.project_type === "design"
|
||||||
? "Projektowanie (P)"
|
? "Projektowanie (P)"
|
||||||
: project.project_type === "construction"
|
: project.project_type === "construction"
|
||||||
? "Realizacja (R)"
|
? "Budowa (B)"
|
||||||
: project.project_type === "design+construction"
|
: project.project_type === "design+construction"
|
||||||
? "Projektowanie + Realizacja (P+R)"
|
? "Projektowanie + Budowa (P+B)"
|
||||||
: "Nieznany"}
|
: "Nieznany"}
|
||||||
</Badge>
|
</Badge>
|
||||||
</div>
|
</div>
|
||||||
@@ -301,7 +301,7 @@ 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">
|
||||||
Dzielnica
|
Jednostka ewidencyjna
|
||||||
</span>
|
</span>
|
||||||
<p className="text-gray-900 font-medium">
|
<p className="text-gray-900 font-medium">
|
||||||
{project.district || "N/A"}
|
{project.district || "N/A"}
|
||||||
@@ -309,7 +309,7 @@ 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">
|
||||||
Jednostka
|
Obręb
|
||||||
</span>
|
</span>
|
||||||
<p className="text-gray-900 font-medium">
|
<p className="text-gray-900 font-medium">
|
||||||
{project.unit || "N/A"}
|
{project.unit || "N/A"}
|
||||||
|
|||||||
@@ -467,7 +467,7 @@ export default function ProjectListPage() {
|
|||||||
<th className="text-left px-2 py-3 font-semibold text-xs text-gray-700 w-10">
|
<th className="text-left px-2 py-3 font-semibold text-xs text-gray-700 w-10">
|
||||||
{t('common.type') || 'Typ'}
|
{t('common.type') || 'Typ'}
|
||||||
</th>
|
</th>
|
||||||
<th className="text-left px-2 py-3 font-semibold text-xs text-gray-700 w-16 md:w-20">
|
<th className="text-left px-2 py-3 font-semibold text-xs text-gray-700 w-10">
|
||||||
{t('common.status') || 'Status'}
|
{t('common.status') || 'Status'}
|
||||||
</th>
|
</th>
|
||||||
<th className="text-left px-2 py-3 font-semibold text-xs text-gray-700 w-14 md:w-16">
|
<th className="text-left px-2 py-3 font-semibold text-xs text-gray-700 w-14 md:w-16">
|
||||||
@@ -483,8 +483,8 @@ export default function ProjectListPage() {
|
|||||||
index % 2 === 0 ? "bg-white" : "bg-gray-25"
|
index % 2 === 0 ? "bg-white" : "bg-gray-25"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<td className="px-2 py-3">
|
<td className="px-1 py-3">
|
||||||
<Badge variant="primary" size="sm" className="text-xs">
|
<Badge variant="secondary" size="sm" className="text-xs">
|
||||||
{project.project_number}
|
{project.project_number}
|
||||||
</Badge>
|
</Badge>
|
||||||
</td>
|
</td>
|
||||||
@@ -540,13 +540,25 @@ export default function ProjectListPage() {
|
|||||||
{project.project_type === "design"
|
{project.project_type === "design"
|
||||||
? "P"
|
? "P"
|
||||||
: project.project_type === "construction"
|
: project.project_type === "construction"
|
||||||
? "R"
|
? "B"
|
||||||
: project.project_type === "design+construction"
|
: project.project_type === "design+construction"
|
||||||
? "P+R"
|
? "P+B"
|
||||||
: "-"}
|
: "-"}
|
||||||
</td>
|
</td>
|
||||||
<td className="px-2 py-3 text-xs text-gray-600 truncate">
|
<td className="px-2 py-3 text-xs text-gray-600 flex justify-center items-center">
|
||||||
{getStatusLabel(project.project_status)}
|
{project.project_status === 'registered' ? (
|
||||||
|
<span className="text-red-500 font-bold text-sm" title={t('projectStatus.registered')}>N</span>
|
||||||
|
) : project.project_status === 'in_progress_design' ? (
|
||||||
|
<span className="inline-block w-3 h-3 bg-blue-500 rounded-full" title={t('projectStatus.in_progress_design')}></span>
|
||||||
|
) : project.project_status === 'in_progress_construction' ? (
|
||||||
|
<span className="inline-block w-3 h-3 bg-yellow-400 rounded-full" title={t('projectStatus.in_progress_construction')}></span>
|
||||||
|
) : project.project_status === 'fulfilled' ? (
|
||||||
|
<span className="inline-block w-3 h-3 bg-green-500 rounded-full" title={t('projectStatus.fulfilled')}></span>
|
||||||
|
) : project.project_status === 'cancelled' ? (
|
||||||
|
<span className="text-red-500 font-bold text-lg" title={t('projectStatus.cancelled')}>×</span>
|
||||||
|
) : (
|
||||||
|
<span title="Unknown status">-</span>
|
||||||
|
)}
|
||||||
</td>
|
</td>
|
||||||
<td className="px-2 py-3">
|
<td className="px-2 py-3">
|
||||||
<Link href={`/projects/${project.project_id}`}>
|
<Link href={`/projects/${project.project_id}`}>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ const translations = {
|
|||||||
projectStatus: {
|
projectStatus: {
|
||||||
registered: "Zarejestrowany",
|
registered: "Zarejestrowany",
|
||||||
in_progress_design: "W realizacji (projektowanie)",
|
in_progress_design: "W realizacji (projektowanie)",
|
||||||
in_progress_construction: "W realizacji (realizacja)",
|
in_progress_construction: "W realizacji (budowa)",
|
||||||
fulfilled: "Zakończony",
|
fulfilled: "Zakończony",
|
||||||
cancelled: "Wycofany",
|
cancelled: "Wycofany",
|
||||||
unknown: "Nieznany"
|
unknown: "Nieznany"
|
||||||
@@ -112,8 +112,8 @@ const translations = {
|
|||||||
// Project types
|
// Project types
|
||||||
projectType: {
|
projectType: {
|
||||||
design: "Projektowanie",
|
design: "Projektowanie",
|
||||||
construction: "Realizacja",
|
construction: "Budowa",
|
||||||
"design+construction": "Projektowanie + Realizacja"
|
"design+construction": "Projektowanie + Budowa"
|
||||||
},
|
},
|
||||||
|
|
||||||
// Task statuses
|
// Task statuses
|
||||||
|
|||||||
Reference in New Issue
Block a user