Show crew on event cards when logged in as crew
This commit is contained in:
parent
529d640a0e
commit
89b1d2a547
2 changed files with 7 additions and 0 deletions
|
@ -31,6 +31,10 @@
|
|||
<template v-if="slot.interested">
|
||||
({{ slot.interested }} interested)
|
||||
</template>
|
||||
<p v-if="slot.assigned">
|
||||
Crew:
|
||||
{{ slot.assigned.map(id => idToAccount.get(id)?.name).join(", ") }}
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
@ -48,6 +52,8 @@ const runtimeConfig = useRuntimeConfig();
|
|||
const { data: session, refresh: refreshSession } = await useAccountSession();
|
||||
const interestedIds = computed(() => new Set(session.value?.account.interestedIds ?? []));
|
||||
const timezone = computed(() => session.value?.account?.timezone ?? runtimeConfig.public.defaultTimezone);
|
||||
const { data: accounts } = await useAccounts();
|
||||
const idToAccount = computed(() => new Map(accounts.value?.map(a => [a.id, a])));
|
||||
|
||||
function formatTime(time: string) {
|
||||
return DateTime.fromISO(time, { zone: timezone.value }).toFormat("yyyy-LL-dd HH:mm");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue