From c905effd928258ac275191d57059290b1005f7a1 Mon Sep 17 00:00:00 2001 From: Sebastian Pravda Date: Wed, 15 Feb 2023 15:53:57 +0100 Subject: [PATCH] feat: show createdAt only when chrono application table view --- .../src/lib/components/admin/table/Table.svelte | 13 +++++++++---- .../admin/(authenticated)/dashboard/+page.svelte | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/src/lib/components/admin/table/Table.svelte b/frontend/src/lib/components/admin/table/Table.svelte index 571a489..e4803b5 100644 --- a/frontend/src/lib/components/admin/table/Table.svelte +++ b/frontend/src/lib/components/admin/table/Table.svelte @@ -3,6 +3,7 @@ import type { CandidatePreview } from '$lib/stores/candidate'; export let candidates: Array = []; + export let showCreatedAt: boolean; const formatRustChronoDateTime = (date?: string) => { if (!date) return ''; @@ -24,7 +25,9 @@ Obor Rodné číslo Link - Vytvořeno + {#if showCreatedAt} + Vytvořeno + {/if} @@ -47,9 +50,11 @@ {candidate.relatedApplications?.filter((a) => a !== candidate.applicationId)} - - {formatRustChronoDateTime(candidate.createdAt)} - + {#if showCreatedAt} + + {formatRustChronoDateTime(candidate.createdAt)} + + {/if} diff --git a/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte b/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte index e001f35..f4eccb0 100644 --- a/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte +++ b/frontend/src/routes/(admin)/admin/(authenticated)/dashboard/+page.svelte @@ -155,7 +155,7 @@ {/if} - deleteCandidate(event.detail.id)} /> +
deleteCandidate(event.detail.id)} />