ApartmentCapture.vue 1.07 KB
Newer Older
abergavenny's avatar
abergavenny committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<script setup>
import { ref } from 'vue'

import TabComponent from '@/components/TabComponent.vue'
import ApartmentHeatingForm from '@/components/forms/ApartmentHeatingForm.vue'
import WindowForm from '@/components/forms/WindowForm.vue'

const activeTab = ref('windows')

function setActiveTab(value) {
  activeTab.value = value
}
</script>

<template>
  <div class="apartment-capture">
    <TabComponent :active="activeTab" :tabs="[
      { key: 'windows', value: 'windows', name: 'Fenster' },
      { key: 'apartment', value: 'apartment', name: 'Wohnung' }
    ]" @on-tab-select="setActiveTab" />
    <div class="apartment-capture__content">
      <WindowForm v-if="activeTab === 'windows'" />
      <ApartmentHeatingForm v-else-if="activeTab === 'apartment'" />
    </div>
  </div>
</template>

<style scoped>
.apartment-capture {
  display: flex;
  flex-direction: column;
}

@media (min-width: 48em) {
  .apartment-capture {
    overflow: hidden;
    height: 100%;
  }
}

.apartment-capture__content {
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}
</style>