mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +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';
|
import type { CandidatePreview } from '$lib/stores/candidate';
|
||||||
|
|
||||||
export let candidates: Array<CandidatePreview> = [];
|
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>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
|
|
@ -16,6 +24,7 @@
|
||||||
<th scope="col"> Obor </th>
|
<th scope="col"> Obor </th>
|
||||||
<th scope="col"> Rodné číslo </th>
|
<th scope="col"> Rodné číslo </th>
|
||||||
<th scope="col"> Link </th>
|
<th scope="col"> Link </th>
|
||||||
|
<th scope="col"> Vytvořeno </th>
|
||||||
<th scope="col" />
|
<th scope="col" />
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -38,6 +47,9 @@
|
||||||
<td class="text-gray-900">
|
<td class="text-gray-900">
|
||||||
{candidate.relatedApplications?.filter((a) => a !== candidate.applicationId)}
|
{candidate.relatedApplications?.filter((a) => a !== candidate.applicationId)}
|
||||||
</td>
|
</td>
|
||||||
|
<td class="text-gray-900">
|
||||||
|
{formatRustChronoDateTime(candidate.createdAt)}
|
||||||
|
</td>
|
||||||
<td class="text-sm">
|
<td class="text-sm">
|
||||||
<Delete id={candidate.applicationId} on:delete value="Odstranit" />
|
<Delete id={candidate.applicationId} on:delete value="Odstranit" />
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ export interface CandidatePreview {
|
||||||
surname?: string;
|
surname?: string;
|
||||||
email?: string;
|
email?: string;
|
||||||
fieldOfStudy?: string;
|
fieldOfStudy?: string;
|
||||||
|
createdAt?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CandidateLogin {
|
export interface CandidateLogin {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue