display user kinds verbatim

This commit is contained in:
Yisroel Baum 2026-08-14 09:54:43 +03:00
parent 2101ab50d2
commit 74feb38300
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
5 changed files with 28 additions and 50 deletions

View file

@ -15,12 +15,6 @@ onMounted(async () => {
await Promise.all([setsStore.fetchSets(), schedulesStore.fetchSchedules()])
})
function humanizeKind(kind: string): string {
const words = kind.replaceAll(/[_-]+/g, ' ')
return words.charAt(0).toUpperCase() + words.slice(1)
}
function formatDate(value: string): string {
return new Intl.DateTimeFormat('en', {
dateStyle: 'medium',
@ -73,7 +67,7 @@ function formatDate(value: string): string {
>
<article class="schedule-card">
<div class="schedule-card__heading">
<p>{{ humanizeKind(schedule.elementKind) }}</p>
<p class="schedule-card__kind">{{ schedule.elementKind }}</p>
<span>{{ schedule.assignmentCount }} assignments</span>
</div>
<h3>{{ schedule.set.name }}</h3>
@ -310,6 +304,10 @@ h1 {
margin: 0;
}
.schedule-card__kind {
text-transform: none;
}
.schedule-card h3 {
margin: 2rem 0 0;
font-family: Georgia, 'Times New Roman', serif;