mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-19 04:18:52 +00:00
feat(admin dashboard): show createdAt
This commit is contained in:
parent
aaeca06c33
commit
d2cabea219
2 changed files with 13 additions and 0 deletions
|
|
@ -3,6 +3,14 @@
|
|||
import type { CandidatePreview } from '$lib/stores/candidate';
|
||||
|
||||
export let candidates: Array<CandidatePreview> = [];
|
||||
|
||||
const formatRustChronoDateTime = (date?: string) => {
|
||||
if (!date) return '';
|
||||
const [datePart, timePart] = date.split('T');
|
||||
const [_, month, day] = datePart.split('-');
|
||||
const [hour, minute, second] = timePart.split(':');
|
||||
return `${day}. ${month}. ${hour}:${minute}:${Number(second).toFixed(0).padStart(2, '0')}`;
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col">
|
||||
|
|
@ -16,6 +24,7 @@
|
|||
<th scope="col"> Obor </th>
|
||||
<th scope="col"> Rodné číslo </th>
|
||||
<th scope="col"> Link </th>
|
||||
<th scope="col"> Vytvořeno </th>
|
||||
<th scope="col" />
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -38,6 +47,9 @@
|
|||
<td class="text-gray-900">
|
||||
{candidate.relatedApplications?.filter((a) => a !== candidate.applicationId)}
|
||||
</td>
|
||||
<td class="text-gray-900">
|
||||
{formatRustChronoDateTime(candidate.createdAt)}
|
||||
</td>
|
||||
<td class="text-sm">
|
||||
<Delete id={candidate.applicationId} on:delete value="Odstranit" />
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ export interface CandidatePreview {
|
|||
surname?: string;
|
||||
email?: string;
|
||||
fieldOfStudy?: string;
|
||||
createdAt?: string;
|
||||
}
|
||||
|
||||
export interface CandidateLogin {
|
||||
|
|
|
|||
Loading…
Reference in a new issue