1
0

Add current state of the Vue frontend

This commit is contained in:
Tim Weber
2019-04-03 17:54:05 +02:00
parent 31aafd3b86
commit 8799cc86e9
17 changed files with 11630 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<template>
<div>
<div v-if="error">{{ error }}</div>
<EntityList :columns="['id', 'number', 'prefix']" link-column="id" :entities="customers" />
</div>
</template>
<script>
import HSAdmin from "../hsadmin";
import EntityList from "../components/EntityList";
export default {
name: "Customers",
components: {EntityList},
data () { return {
error: false,
customers: [],
}},
props: { hsadmin: HSAdmin },
created () { this.fetch() },
watch: { "$route": "fetch" },
methods: {
async fetch () {
const res = await this.hsadmin.get("customers");
this.customers = res.data;
}
},
}
</script>