-
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.
feat: admin event mobile view and other fixes
- Loading branch information
Showing
7 changed files
with
129 additions
and
69 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<script setup lang="ts"> | ||
import { f7, f7Block, f7BlockTitle, f7Icon, f7Link, f7List, f7ListItem, f7NavLeft, f7NavTitle, f7Navbar, f7Page, f7Panel, f7Tab, f7Tabs, f7Toolbar } from 'framework7-vue' | ||
import type { Router } from 'framework7/types' | ||
const props = defineProps<{ | ||
route: Router.Route | ||
}>() | ||
const selectedPath = ref(props.route.path) | ||
const menuLinks = [ | ||
{ | ||
title: 'Events', | ||
icon: 'material:today', | ||
path: '/admin', | ||
}, | ||
{ | ||
title: 'Members', | ||
icon: 'material:account_circle', | ||
path: '/admin/members', | ||
}, | ||
{ | ||
title: 'Settings', | ||
icon: 'material:settings', | ||
path: '/admin/settings', | ||
}, | ||
] | ||
</script> | ||
|
||
<template> | ||
<f7Panel left reveal> | ||
<f7Page> | ||
<f7List menu-list strong-ios outline-ios> | ||
<f7ListItem v-for="link in menuLinks" :key="link.path" :link="link.path" :selected="selectedPath === link.path" :title="link.title" @click="selectedPath = link.path"> | ||
<template #media> | ||
<f7Icon :md="link.icon" /> | ||
</template> | ||
</f7ListItem> | ||
</f7List> | ||
</f7Page> | ||
</f7Panel> | ||
</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,44 +1,70 @@ | ||
<script setup lang="ts"> | ||
import dayjs from 'dayjs' | ||
import { f7Button, f7Card, f7CardContent, f7CardFooter, f7CardHeader, f7Chip } from 'framework7-vue' | ||
const { data: events } = useEvents() | ||
</script> | ||
|
||
<template> | ||
<div class="data-table data-table-init card"> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th class="label-cell"> | ||
Name | ||
</th> | ||
<th class="label-cell"> | ||
Start date | ||
</th> | ||
<th class="label-cell"> | ||
End date | ||
</th> | ||
<th class="numeric-label"> | ||
Participants | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr v-for="event in events" :key="event.id"> | ||
<td class="label-cell"> | ||
{{ event.name }} | ||
</td> | ||
<td class="label-cell"> | ||
{{ dayjs(event.startDateTime).format('DD-MM-YYYY hh:mm') }} | ||
</td> | ||
<td class="label-cell"> | ||
{{ dayjs(event.endDateTime).format('DD-MM-YYYY hh:mm') }} | ||
</td> | ||
<td class="numeric-cell"> | ||
{{ event.attendees.length }} | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<div> | ||
<div class="md:hidden"> | ||
<f7Card v-for="event in events" :key="event.id"> | ||
<f7CardHeader> | ||
<div class="flex flex-col items-start space-y-4"> | ||
<f7Chip outline :text="`0 / ${event.attendees.length}`" /> | ||
<span> | ||
{{ event.name }} | ||
</span> | ||
</div> | ||
</f7CardHeader> | ||
<f7CardContent> | ||
{{ event.description }} | ||
</f7CardContent> | ||
<f7CardFooter> | ||
<f7Button tonal> | ||
Open | ||
</f7Button> | ||
</f7CardFooter> | ||
</f7Card> | ||
</div> | ||
|
||
<div class="hidden md:inline"> | ||
<div class="data-table data-table-init card"> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th class="label-cell"> | ||
Name | ||
</th> | ||
<th class="label-cell"> | ||
Start date | ||
</th> | ||
<th class="label-cell"> | ||
End date | ||
</th> | ||
<th class="numeric-label"> | ||
Participants | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr v-for="event in events" :key="event.id"> | ||
<td class="label-cell"> | ||
{{ event.name }} | ||
</td> | ||
<td class="label-cell"> | ||
{{ dayjs(event.startDateTime).format('DD-MM-YYYY hh:mm') }} | ||
</td> | ||
<td class="label-cell"> | ||
{{ dayjs(event.endDateTime).format('DD-MM-YYYY hh:mm') }} | ||
</td> | ||
<td class="numeric-cell"> | ||
{{ event.attendees.length }} | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</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
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
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
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
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