fix: attendance admin — add user_name to records, fix Czech diacritics in table headers
- listAttendance() now maps users.first_name + last_name to user_name - Fixed escaped Unicode in table headers (Zaměstnanec, Příchod, Poznámka) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -96,15 +96,15 @@ export default function AttendanceShiftTable({ records, onEdit, onDelete }: Atte
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Datum</th>
|
||||
<th>Zam\u011Bstnanec</th>
|
||||
<th>Zaměstnanec</th>
|
||||
<th>Typ</th>
|
||||
<th>P\u0159\u00EDchod</th>
|
||||
<th>Příchod</th>
|
||||
<th>Pauza</th>
|
||||
<th>Odchod</th>
|
||||
<th>Hodiny</th>
|
||||
<th>Projekt</th>
|
||||
<th>GPS</th>
|
||||
<th>Pozn\u00E1mka</th>
|
||||
<th>Poznámka</th>
|
||||
<th>Akce</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -725,8 +725,10 @@ export async function listAttendance(params: ListAttendanceParams) {
|
||||
...l,
|
||||
project_name: projectNameMap.get(l.project_id) || `Projekt #${l.project_id}`,
|
||||
}));
|
||||
const u = rec.users;
|
||||
return {
|
||||
...rec,
|
||||
user_name: u ? `${u.first_name} ${u.last_name}`.trim() : '',
|
||||
project_name: rec.project_id ? (projectNameMap.get(rec.project_id) || null) : null,
|
||||
project_logs: logs,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user