Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Elijah-Haeb committed Jan 8, 2024
2 parents 6481d42 + 2660c5e commit 5b88db9
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ const router = createRouter({
path: '/verleih/:id',
name: 'verleih-detail',
component: () => import('../views/VerleihDetailView.vue')
}, {
path: '/bar',
name: 'bar',
component: () => import('../views/BarListView.vue')
},
{
path: '/bar/:id',
name: 'bar-detail',
component: () => import('../views/BarDetailView.vue')
}
]
})
Expand Down
Empty file added src/views/BarDetailList.vue
Empty file.
65 changes: 65 additions & 0 deletions src/views/BarDetailView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<template>
<div v-if="bar">
<BBreadcrumb>
<BBreadcrumbItem to="/home"> Home </BBreadcrumbItem>
<BBreadcrumbItem to="/bar"> Bar </BBreadcrumbItem>
<BBreadcrumbItem :to="'/bar/' + bar.id" active> {{ bar.name }} </BBreadcrumbItem>
</BBreadcrumb>

<div>
<h1>{{ bar.name }}</h1>
<b-img :src="image" fluid-grow />


<h3>Anschrift</h3>
<address>
<span id="street">{{ bar.adresse }}</span><br />
<span id="zipCode">{{ bar.plz }}</span> <span id="city">{{ bar.ort }}</span>
</address>

<h4>Kontaktdaten</h4>
<contactDetails>
<p>Telefon: <span>{{ bar.telefon }}</span> </p>
<p>Email:<span>{{ bar.email }}</span> </p>
</contactDetails>

<h5>Öffnungszeiten</h5>
<openingHours>
<p>Öffnungstage<span>{{ bar.oeffnungstage }}</span></p>
<p>Öffnungszeit<span>{{ bar.oeffnungszeiten }}</span></p>
</openingHours>

<h6>Webseite</h6>
<website>
<span>{{ bar.webseite}}</span>
</website>


</div>
</div>
</template>
<script lang="ts">
import { mapState } from "pinia";
import { useBarItemStore } from '@/stores/barItem'
import { defineComponent } from 'vue'
import type BarItem from "@/models/BarItem"
export default defineComponent({
name: 'BarDetailView',
computed: {
...mapState(useBarItemStore, {
getById: (state) => state.getById,
imageById: (state) => state.imageById
}),
bar(): BarItem {
return this.getById(this.$route.params.id as string) as BarItem;
},
image() : string {
return this.imageById(this.$route.params.id as string) as string;
}
}
})
</script>
<style>
</style>
25 changes: 25 additions & 0 deletions src/views/BarListView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<script setup lang="ts">
import BarList from '../components/bar/BarList.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/BarListView.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/BarListView.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 5b88db9

Please sign in to comment.