feat: Add assigned user initial to project details and update translations
This commit is contained in:
@@ -471,7 +471,7 @@ export default function ProjectListPage() {
|
||||
{t('common.status') || 'Status'}
|
||||
</th>
|
||||
<th className="text-left px-2 py-3 font-semibold text-xs text-gray-700 dark:text-gray-300 w-14 md:w-16">
|
||||
Placeholder
|
||||
{t('projects.assigned') || 'Przypisany'}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -563,7 +563,15 @@ export default function ProjectListPage() {
|
||||
</div>
|
||||
</td>
|
||||
<td className="px-2 py-3">
|
||||
<span className="text-xs text-gray-500">Placeholder</span>
|
||||
{project.assigned_to_initial ? (
|
||||
<div className="flex items-center justify-center">
|
||||
<span className="inline-flex items-center justify-center w-8 h-8 bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full text-xs font-semibold">
|
||||
{project.assigned_to_initial}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<span className="text-xs text-gray-400">-</span>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
|
||||
@@ -165,6 +165,7 @@ const translations = {
|
||||
createFirstProject: "Utwórz pierwszy projekt",
|
||||
noMatchingResults: "Brak projektów pasujących do kryteriów wyszukiwania. Spróbuj zmienić wyszukiwane frazy.",
|
||||
showingResults: "Wyświetlono {shown} z {total} projektów",
|
||||
assigned: "Przypisany",
|
||||
deleteConfirm: "Czy na pewno chcesz usunąć ten projekt?",
|
||||
deleteSuccess: "Projekt został pomyślnie usunięty",
|
||||
createSuccess: "Projekt został pomyślnie utworzony",
|
||||
@@ -719,6 +720,7 @@ const translations = {
|
||||
createFirstProject: "Create first project",
|
||||
noMatchingResults: "No projects match the search criteria. Try changing your search terms.",
|
||||
showingResults: "Showing {shown} of {total} projects",
|
||||
assigned: "Assigned",
|
||||
deleteConfirm: "Are you sure you want to delete this project?",
|
||||
deleteSuccess: "Project deleted successfully",
|
||||
createSuccess: "Project created successfully",
|
||||
|
||||
@@ -11,7 +11,8 @@ export function getAllProjects(contractId = null) {
|
||||
creator.name as created_by_name,
|
||||
creator.username as created_by_username,
|
||||
assignee.name as assigned_to_name,
|
||||
assignee.username as assigned_to_username
|
||||
assignee.username as assigned_to_username,
|
||||
assignee.initial as assigned_to_initial
|
||||
FROM projects p
|
||||
LEFT JOIN contracts c ON p.contract_id = c.contract_id
|
||||
LEFT JOIN users creator ON p.created_by = creator.id
|
||||
@@ -37,7 +38,8 @@ export function getProjectById(id) {
|
||||
creator.name as created_by_name,
|
||||
creator.username as created_by_username,
|
||||
assignee.name as assigned_to_name,
|
||||
assignee.username as assigned_to_username
|
||||
assignee.username as assigned_to_username,
|
||||
assignee.initial as assigned_to_initial
|
||||
FROM projects p
|
||||
LEFT JOIN users creator ON p.created_by = creator.id
|
||||
LEFT JOIN users assignee ON p.assigned_to = assignee.id
|
||||
|
||||
Reference in New Issue
Block a user