Add Ticket and a HeaderlessKeyValueTable

This commit is contained in:
Finn 2021-08-21 19:32:36 +02:00
parent a400c7210c
commit 81ae89697f
2 changed files with 57 additions and 0 deletions

23
src/Ticket.vue Normal file
View file

@ -0,0 +1,23 @@
<template>
<div class="single-ticket">
<h2>Ticket "ding"</h2>
<HeaderlessKeyValueTable :data-rows="{Name: 'Bernd', Status: 'Offen', Ablaufdatum: 'gestern'}" />
<br>
<label for="descripton">Beschreibung</label>
<textarea id="descripton" v-model="description" />
</div>
</template>
<script>
import HeaderlessKeyValueTable from './components/HeaderlessKeyValueTable'
export default {
name: 'Ticket',
components: { HeaderlessKeyValueTable },
}
</script>
<style scoped>
textarea {
width: 100%;
}
</style>

View file

@ -0,0 +1,34 @@
<template>
<table>
<tr v-for="(value, key, i) in dataRows" :key="i">
<td>{{ key }}</td>
<td>{{ value }}</td>
</tr>
</table>
</template>
<script>
export default {
name: 'HeaderlessKeyValueTable',
props: {
dataRows: {
type: Object,
default: () => ({}),
},
},
}
</script>
<style scoped>
table {
width: 100%;
}
td {
border-bottom: solid #000 1px;
}
tr:nth-child(2n) {
background: #f0f0f0;
}
</style>