display user kinds verbatim
This commit is contained in:
parent
2101ab50d2
commit
74feb38300
5 changed files with 28 additions and 50 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue