|
|
|
@@ -34,15 +34,24 @@ const statusColors = {
|
|
|
|
approved: "bg-green-100 text-green-800",
|
|
|
|
approved: "bg-green-100 text-green-800",
|
|
|
|
pending: "bg-yellow-100 text-yellow-800",
|
|
|
|
pending: "bg-yellow-100 text-yellow-800",
|
|
|
|
in_progress: "bg-orange-100 text-orange-800",
|
|
|
|
in_progress: "bg-orange-100 text-orange-800",
|
|
|
|
|
|
|
|
in_progress_design: "bg-purple-100 text-purple-800",
|
|
|
|
|
|
|
|
in_progress_construction: "bg-indigo-100 text-indigo-800",
|
|
|
|
fulfilled: "bg-gray-100 text-gray-800",
|
|
|
|
fulfilled: "bg-gray-100 text-gray-800",
|
|
|
|
|
|
|
|
cancelled: "bg-red-100 text-red-800",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const statusTranslations = {
|
|
|
|
const getStatusTranslation = (status) => {
|
|
|
|
|
|
|
|
const translations = {
|
|
|
|
registered: "Zarejestrowany",
|
|
|
|
registered: "Zarejestrowany",
|
|
|
|
approved: "Zatwierdzony",
|
|
|
|
approved: "Zatwierdzony",
|
|
|
|
pending: "Oczekujący",
|
|
|
|
pending: "Oczekujący",
|
|
|
|
in_progress: "W trakcie",
|
|
|
|
in_progress: "W trakcie",
|
|
|
|
|
|
|
|
in_progress_design: "W realizacji (projektowanie)",
|
|
|
|
|
|
|
|
in_progress_construction: "W realizacji (realizacja)",
|
|
|
|
fulfilled: "Zakończony",
|
|
|
|
fulfilled: "Zakończony",
|
|
|
|
|
|
|
|
cancelled: "Wycofany",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
return translations[status] || status;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default function ProjectCalendarPage() {
|
|
|
|
export default function ProjectCalendarPage() {
|
|
|
|
@@ -232,8 +241,8 @@ export default function ProjectCalendarPage() {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const renderUpcomingView = () => {
|
|
|
|
const renderUpcomingView = () => {
|
|
|
|
const upcomingProjects = getUpcomingProjects();
|
|
|
|
const upcomingProjects = getUpcomingProjects().filter(project => project.project_status !== 'cancelled');
|
|
|
|
const overdueProjects = getOverdueProjects();
|
|
|
|
const overdueProjects = getOverdueProjects().filter(project => project.project_status !== 'cancelled');
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="space-y-6">
|
|
|
|
<div className="space-y-6">
|
|
|
|
@@ -266,7 +275,7 @@ export default function ProjectCalendarPage() {
|
|
|
|
{formatDate(project.finish_date)}
|
|
|
|
{formatDate(project.finish_date)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Badge className={statusColors[project.project_status] || statusColors.registered}>
|
|
|
|
<Badge className={statusColors[project.project_status] || statusColors.registered}>
|
|
|
|
{statusTranslations[project.project_status] || project.project_status}
|
|
|
|
{getStatusTranslation(project.project_status) || project.project_status}
|
|
|
|
</Badge>
|
|
|
|
</Badge>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@@ -311,7 +320,7 @@ export default function ProjectCalendarPage() {
|
|
|
|
za {daysUntilDeadline} dni
|
|
|
|
za {daysUntilDeadline} dni
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Badge className={statusColors[project.project_status] || statusColors.registered}>
|
|
|
|
<Badge className={statusColors[project.project_status] || statusColors.registered}>
|
|
|
|
{statusTranslations[project.project_status] || project.project_status}
|
|
|
|
{getStatusTranslation(project.project_status) || project.project_status}
|
|
|
|
</Badge>
|
|
|
|
</Badge>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|