Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Elijah-Haeb committed Jan 15, 2024
2 parents 6c18659 + a501e02 commit acf54e3
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 29 deletions.
4 changes: 2 additions & 2 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ declare module 'vue' {
BPlaceholderWrapper: typeof import('bootstrap-vue-next')['BPlaceholderWrapper']
BRow: typeof import('bootstrap-vue-next')['BRow']
ContentItem: typeof import('./src/components/ContentItem.vue')['default']
EventItem: typeof import('./src/components/events/EventItem.vue')['default']
EventList: typeof import('./src/components/events/EventList.vue')['default']
EventItem: typeof import('./src/components/event/EventItem.vue')['default']
EventList: typeof import('./src/components/event/EventList.vue')['default']
FilterSidebar: typeof import('./src/components/FilterSidebar.vue')['default']
HomeContent: typeof import('./src/components/HomeContent.vue')['default']
LocaleeHeader: typeof import('./src/components/LocaleeHeader.vue')['default']
Expand Down
3 changes: 2 additions & 1 deletion src/components/HomeContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
</template>

<script setup lang="ts">
import EventList from './events/EventList.vue'
import VerleihList from './verleih/VerleihList.vue'
import BarList from './bar/BarList.vue'
import EventList from './event/EventList.vue'
const props = defineProps(['foundEntry', 'entries'])
Expand Down
33 changes: 33 additions & 0 deletions src/components/event/EventItem.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<template>
<b-card :img-src="image" img-top>
<b-card-title>{{ event.name }}</b-card-title>
<!-- <b-card-text>{{event.beschreibung}} </b-card-text> -->
</b-card>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { mapState } from "pinia";
import { useEventItemStore } from '@/stores/eventItem'
export default defineComponent({
name: 'EventItem',
props: {
event: {
type: Object,
required: true,
}
},
computed: {
...mapState(useEventItemStore, {
imageById: (state) => state.imageById
}),
image() : string {
return this.imageById(this.event.id) as string;
},
detailUrl () {
return '/event/' + this.event.id
}
}
})
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
</b-card-group>
</template>
<script lang="ts">
import type EventItem from '@/models/EventItem';
import { useEventItemStore } from '@/stores/eventItem';
import { useLoadingStore } from '@/stores/loading';
import type EventItem from '../../models/EventItem';
import { useEventItemStore } from '../../stores/eventItem';
import { useLoadingStore } from '../../stores/loading';
import { mapState } from 'pinia';
import { defineComponent } from 'vue';
Expand Down
20 changes: 0 additions & 20 deletions src/components/events/EventItem.vue

This file was deleted.

2 changes: 1 addition & 1 deletion src/models/EventItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default interface EventItem {
id: string;
name: string;
bild: any;
beschreinung: string;
beschreibung: string;
adresse: string;
ort: string;
plz: string;
Expand Down
10 changes: 10 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ const router = createRouter({
path: '/bar/:id',
name: 'bar-detail',
component: () => import('../views/BarDetailView.vue')
},
{
path: '/event',
name: 'event',
component: () => import('../views/EventListView.vue')
},
{
path: '/event/:id',
name: 'event-detail',
component: () => import('../views/EventDetailView.vue')
}
]
})
Expand Down
2 changes: 1 addition & 1 deletion src/services/event.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const eventService = {
id: partialRecord.id,
name: partialRecord.get('Name') as string,
bild: partialRecord.get('Bild') as any,
beschreinung: partialRecord.get('Beschreibung') as string,
beschreibung: partialRecord.get('Beschreibung') as string,
adresse: partialRecord.get('Adresse') as string,
ort: partialRecord.get('Ort') as string,
plz: partialRecord.get('PLZ') as string,
Expand Down
2 changes: 1 addition & 1 deletion src/views/EventDetailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div>
<h1>{{ events.name }}</h1>
<b-img :src="image" fluid-grow />
<p>{{ events.notes }}</p>


<h3>Adresse</h3>
<address>
Expand Down
25 changes: 25 additions & 0 deletions src/views/EventListView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<script setup lang="ts">
import EventList from '../components/event/EventList.vue'
</script>

<template>

<BContainer>
<BRow>
<!-- <BCol>
<FilterSidebar />
</BCol > -->
<!-- <BCol>
<SearchBar :searchQuery="searchQuery" @searchQuery="searchQuery = $event" />
</BCol> -->
<!-- <BCol>
icon
</BCol > -->
</BRow>
<BRow>
<HomeContent :entries="entries" :foundEntry="searchQuery" />

Check failure on line 21 in src/views/EventListView.vue

View workflow job for this annotation

GitHub Actions / build (18.x)

Property 'entries' does not exist on type '{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly<...>, never>; ... 10 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...ar...'.

Check failure on line 21 in src/views/EventListView.vue

View workflow job for this annotation

GitHub Actions / build (18.x)

Property 'searchQuery' does not exist on type '{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly<...>, never>; ... 10 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...ar...'.
</BRow>
</BContainer>

</template>

0 comments on commit acf54e3

Please sign in to comment.