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">
|
||||
<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')}
|
||||
</Button>
|
||||
</Link>
|
||||
@@ -232,7 +244,19 @@ export default function ContractsMainPage() {
|
||||
>
|
||||
<Link href="/contracts/new">
|
||||
<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')}
|
||||
</Button>
|
||||
</Link>{" "}
|
||||
|
||||
@@ -266,9 +266,9 @@ export default function ProjectViewPage() {
|
||||
{project.project_type === "design"
|
||||
? "Projektowanie (P)"
|
||||
: project.project_type === "construction"
|
||||
? "Realizacja (R)"
|
||||
? "Budowa (B)"
|
||||
: project.project_type === "design+construction"
|
||||
? "Projektowanie + Realizacja (P+R)"
|
||||
? "Projektowanie + Budowa (P+B)"
|
||||
: "Nieznany"}
|
||||
</Badge>
|
||||
</div>
|
||||
@@ -301,7 +301,7 @@ export default function ProjectViewPage() {
|
||||
</div>
|
||||
<div>
|
||||
<span className="text-sm font-medium text-gray-500 block mb-1">
|
||||
Dzielnica
|
||||
Jednostka ewidencyjna
|
||||
</span>
|
||||
<p className="text-gray-900 font-medium">
|
||||
{project.district || "N/A"}
|
||||
@@ -309,7 +309,7 @@ export default function ProjectViewPage() {
|
||||
</div>
|
||||
<div>
|
||||
<span className="text-sm font-medium text-gray-500 block mb-1">
|
||||
Jednostka
|
||||
Obręb
|
||||
</span>
|
||||
<p className="text-gray-900 font-medium">
|
||||
{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">
|
||||
{t('common.type') || 'Typ'}
|
||||
</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'}
|
||||
</th>
|
||||
<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"
|
||||
}`}
|
||||
>
|
||||
<td className="px-2 py-3">
|
||||
<Badge variant="primary" size="sm" className="text-xs">
|
||||
<td className="px-1 py-3">
|
||||
<Badge variant="secondary" size="sm" className="text-xs">
|
||||
{project.project_number}
|
||||
</Badge>
|
||||
</td>
|
||||
@@ -540,13 +540,25 @@ export default function ProjectListPage() {
|
||||
{project.project_type === "design"
|
||||
? "P"
|
||||
: project.project_type === "construction"
|
||||
? "R"
|
||||
? "B"
|
||||
: project.project_type === "design+construction"
|
||||
? "P+R"
|
||||
? "P+B"
|
||||
: "-"}
|
||||
</td>
|
||||
<td className="px-2 py-3 text-xs text-gray-600 truncate">
|
||||
{getStatusLabel(project.project_status)}
|
||||
<td className="px-2 py-3 text-xs text-gray-600 flex justify-center items-center">
|
||||
{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 className="px-2 py-3">
|
||||
<Link href={`/projects/${project.project_id}`}>
|
||||
|
||||
@@ -103,7 +103,7 @@ const translations = {
|
||||
projectStatus: {
|
||||
registered: "Zarejestrowany",
|
||||
in_progress_design: "W realizacji (projektowanie)",
|
||||
in_progress_construction: "W realizacji (realizacja)",
|
||||
in_progress_construction: "W realizacji (budowa)",
|
||||
fulfilled: "Zakończony",
|
||||
cancelled: "Wycofany",
|
||||
unknown: "Nieznany"
|
||||
@@ -112,8 +112,8 @@ const translations = {
|
||||
// Project types
|
||||
projectType: {
|
||||
design: "Projektowanie",
|
||||
construction: "Realizacja",
|
||||
"design+construction": "Projektowanie + Realizacja"
|
||||
construction: "Budowa",
|
||||
"design+construction": "Projektowanie + Budowa"
|
||||
},
|
||||
|
||||
// Task statuses
|
||||
|
||||
Reference in New Issue
Block a user