-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a2e22e
commit 4337bf0
Showing
13 changed files
with
420 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
<script setup lang="ts"> | ||
import { f7Link, f7NavLeft, f7NavTitle, f7Navbar, f7Page } from 'framework7-vue' | ||
import { f7NavTitle, f7Navbar, f7Page } from 'framework7-vue' | ||
import type { Router } from 'framework7/types' | ||
const props = defineProps<{ | ||
f7route: Router.Route | ||
f7route: Router.Route | ||
}>() | ||
const { data: user } = useUser() | ||
const { data: event } = useEvent(props.f7route.params.id!) | ||
const showForbidden = computed(() => { | ||
if (!user.value) // Should load placeholder data | ||
return false | ||
return user.value.memberType !== 'exco' | ||
if (!user.value) // Should load placeholder data | ||
return false | ||
return user.value.memberType !== 'exco' | ||
}) | ||
</script> | ||
|
||
<template> | ||
<f7Page> | ||
<f7Navbar back-link="Back"> | ||
<f7NavTitle> | ||
Event Details | ||
</f7NavTitle> | ||
</f7Navbar> | ||
<f7Page> | ||
<f7Navbar back-link="Back"> | ||
<f7NavTitle> | ||
Event Details | ||
</f7NavTitle> | ||
</f7Navbar> | ||
|
||
<LazyAdminHomeForbidden v-if="showForbidden" /> | ||
<LazyAdminHomeForbidden v-if="showForbidden" /> | ||
|
||
<template v-else> | ||
<AdminEventInformation :event="event" /> | ||
<template v-else> | ||
<AdminEventInformation :event="event" /> | ||
|
||
<AdminEventUploadAttendees :event="event" /> | ||
<AdminEventUploadAttendees :event="event" /> | ||
|
||
<AdminEventCheckedinUsers :event="event" /> | ||
</template> | ||
</f7Page> | ||
<AdminEventCheckedinUsers :event="event" /> | ||
</template> | ||
</f7Page> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<script setup lang="ts"> | ||
import { f7List, f7ListItem, f7Card, f7CardContent, f7CardHeader } from 'framework7-vue'; | ||
const props = defineProps(["event"]) | ||
import { f7Card, f7CardContent, f7CardHeader, f7List, f7ListItem } from 'framework7-vue' | ||
const props = defineProps(['event']) | ||
</script> | ||
|
||
<template> | ||
<f7Card> | ||
<f7CardHeader> | ||
<span class="font-semibold text-2xl">Attendees</span> | ||
</f7CardHeader> | ||
<f7CardContent> | ||
<f7List v-for="attendee in props.event.attendees" media-list dividers-ios strong inset> | ||
<f7ListItem :title="attendee.name" :subtitle="`ID: ${attendee.id}`"> | ||
</f7ListItem> | ||
</f7List> | ||
</f7CardContent> | ||
</f7Card> | ||
</template> | ||
<f7Card> | ||
<f7CardHeader> | ||
<span class="font-semibold text-2xl">Attendees</span> | ||
</f7CardHeader> | ||
<f7CardContent> | ||
<f7List v-for="attendee in props.event.attendees" :key="attendee.id" media-list dividers-ios strong inset> | ||
<f7ListItem :title="attendee.name" :subtitle="`ID: ${attendee.id}`" /> | ||
</f7List> | ||
</f7CardContent> | ||
</f7Card> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,53 @@ | ||
<script setup lang="ts"> | ||
import { f7Card, f7CardHeader, f7Chip, f7CardContent } from 'framework7-vue'; | ||
import { f7Card, f7CardContent } from 'framework7-vue' | ||
const props = defineProps(["event"]) | ||
const props = defineProps(['event']) | ||
function convertEpochToSGT(epochTime: number) { | ||
const date = new Date(epochTime * 1000); | ||
date.setUTCHours(date.getUTCHours() + 8); | ||
const date = new Date(epochTime * 1000) | ||
date.setUTCHours(date.getUTCHours() + 8) | ||
const formattedDate = date.toLocaleDateString('en-SG', { | ||
day: '2-digit', | ||
month: '2-digit', | ||
year: 'numeric', | ||
}); | ||
const formattedDate = date.toLocaleDateString('en-SG', { | ||
day: '2-digit', | ||
month: '2-digit', | ||
year: 'numeric', | ||
}) | ||
const formattedTime = date.toLocaleTimeString('en-SG', { | ||
hour: '2-digit', | ||
minute: '2-digit', | ||
}); | ||
const formattedTime = date.toLocaleTimeString('en-SG', { | ||
hour: '2-digit', | ||
minute: '2-digit', | ||
}) | ||
return `${formattedDate} | ${formattedTime}`; | ||
return `${formattedDate} | ${formattedTime}` | ||
} | ||
</script> | ||
|
||
<template> | ||
<f7Card> | ||
<f7CardContent class="p-0! lg-rounded!"> | ||
<div class="relative"> | ||
<img :src="props.event.badgeImage" class="object-cover w-full max-h-60 object-top lg-rounded!"> | ||
<div class="p-10 absolute z-10 inset-0 flex flex-col bg-gray-800/[0.3] space-y-6 backdrop-blur-sm lg-rounded!"> | ||
<div class="space-y-3 flex flex-col"> | ||
<span class="font-bold text-3xl md:text-4xl">{{ props.event.name }}</span> | ||
<div> | ||
<div class="flex-inline shrink grow-0 p-1 px-4 border border-solid b-rounded-3"> | ||
{{ `0 / ${event.attendees.length} Attendees Checked-In` }} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="text-lg flex flex-col"> | ||
<span><b>{{ convertEpochToSGT(props.event.startDateTime) }}</b> to <b>{{ convertEpochToSGT(props.event.endDateTime) }}</b></span> | ||
<span><b>Location:</b> {{ props.event.location }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="p-6 pb-3 pt-2"> | ||
<span class="text-xl font-bold">Description</span> | ||
<p class="text-md mt-2">{{ props.event.description }}</p> | ||
<f7Card> | ||
<f7CardContent class="p-0! lg-rounded!"> | ||
<div class="relative"> | ||
<img :src="props.event.badgeImage" class="object-cover w-full max-h-60 object-top lg-rounded!"> | ||
<div class="p-10 absolute z-10 inset-0 flex flex-col bg-gray-800/[0.3] space-y-6 backdrop-blur-sm lg-rounded!"> | ||
<div class="space-y-3 flex flex-col"> | ||
<span class="font-bold text-3xl md:text-4xl">{{ props.event.name }}</span> | ||
<div> | ||
<div class="flex-inline shrink grow-0 p-1 px-4 border border-solid b-rounded-3"> | ||
{{ `0 / ${event.attendees.length} Attendees Checked-In` }} | ||
</div> | ||
</div> | ||
</f7CardContent> | ||
</f7Card> | ||
</template> | ||
</div> | ||
<div class="text-lg flex flex-col"> | ||
<span><b>{{ convertEpochToSGT(props.event.startDateTime) }}</b> to <b>{{ convertEpochToSGT(props.event.endDateTime) }}</b></span> | ||
<span><b>Location:</b> {{ props.event.location }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="p-6 pb-3 pt-2"> | ||
<span class="text-xl font-bold">Description</span> | ||
<p class="text-md mt-2"> | ||
{{ props.event.description }} | ||
</p> | ||
</div> | ||
</f7CardContent> | ||
</f7Card> | ||
</template> |
Oops, something went wrong.