Merge branch 'frontend/kathy' into develop

This commit is contained in:
Katharina Will 2019-03-27 19:51:39 +01:00
commit 6233d89802
4 changed files with 171 additions and 166 deletions

View File

@ -62,7 +62,7 @@ module.exports = function (ctx) {
'QAvatar', 'QAvatar',
'QSpinnerPuff', 'QSpinnerPuff',
'QExpansionItem', 'QExpansionItem',
'QParallax', 'QParallax'
], ],
directives: [ directives: [

View File

@ -22,7 +22,8 @@
</q-header> </q-header>
<q-drawer <q-drawer
v-model="leftDrawerOpen" side="right"
v-model="rightDrawerOpen"
bordered bordered
show-if-above show-if-above
content-class=""> content-class="">

View File

@ -1,76 +1,79 @@
<template> <template>
<div class="q-pa-md"> <q-card>
<div class="q-gutter-y-md" style="max-width: 1200px"> <q-tab-panels v-model="tab" animated>
<q-tabs <q-tab-panel name="list">
v-model="tab" <q-table
dense title="Caches"
align="justify" :data="data"
class="bg-white text-green-8 shadow-2" :columns="columns"
:breakpoint="0" row-key="name"
> selection="multiple"
<q-tab name="table" icon="mail" /> :selected.sync="selected"
<q-tab name="map" icon="map" /> :filter="filter"
</q-tabs> grid
hide-header>
<template v-slot:top-right>
<q-input borderless dense debounce="300" v-model="filter" placeholder="Search">
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
</template>
<template> <template v-slot:item="props">
<div class="q-pa-md"> <div
<q-table class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3 grid-style-transition"
title="Caches" >
:data="data" <q-expansion-item
:columns="columns" expand-separator
row-key="name" :label="props.row.name"
selection="single" >
:selected.sync="selected" <q-card>
:filter="filter" <q-card-section>
grid <q-list dense>
hide-header <q-item v-for="col in props.cols.filter(col => col.name !== 'desc')" :key="col.name">
> <q-item-section>
<template v-slot:top-right> <q-item-label>{{ col.label }}</q-item-label>
<q-input borderless dense debounce="300" v-model="filter" placeholder="Search"> </q-item-section>
<template v-slot:append> <q-item-section side>
<q-icon name="search" /> <q-item-label caption>{{ col.value }}</q-item-label>
</template> </q-item-section>
</q-input> </q-item>
</template> </q-list>
</q-card-section>
<template v-slot:item="props"> </q-card>
<div </q-expansion-item>
class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3 grid-style-transition"
:style="props.selected ? 'transform: scale(0.95);' : ''"
>
<q-card :class="props.selected ? 'bg-grey-2' : ''">
<q-card-section>
<q-checkbox :dense="denseOn" v-model="props.selected" :label="props.row.name" />
</q-card-section>
<q-separator />
<q-list dense>
<q-item v-for="col in props.cols.filter(col => col.name !== 'desc')" :key="col.name">
<q-item-section>
<q-item-label>{{ col.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-item-label caption>{{ col.value }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-card>
</div>
</template>
</q-table>
</div> </div>
</template> </template>
</div> </q-table>
</div> </q-tab-panel>
<q-tab-panel name="map">
<img src="https://www.buga2019.de/we-bilder/3.Gartenausstellung/Gelaendeplan/190320_Gelaendeplan-quadratisch.jpg?m=1553094677" />
</q-tab-panel>
</q-tab-panels>
<q-separator />
<q-tabs
v-model="tab"
dense
class="bg-white text-green-8 shadow-2"
align="justify"
narrow-indicator
>
<q-tab name="list" icon="list" />
<q-tab name="map" icon="map" />
</q-tabs>
</q-card>
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
tab: 'mails', tab: 'list',
panel: 'mails',
denseOn: true,
filter: '', filter: '',
selected: [], selected: [],
columns: [ columns: [
@ -92,107 +95,107 @@ export default {
{ name: 'iron', label: 'Iron (%)', field: 'iron', sortable: true, sort: (a, b) => parseInt(a, 10) - parseInt(b, 10) } { name: 'iron', label: 'Iron (%)', field: 'iron', sortable: true, sort: (a, b) => parseInt(a, 10) - parseInt(b, 10) }
], ],
data: [ data: [
{ {
name: 'Frozen Yogurt', name: 'Frozen Yogurt',
calories: 159, calories: 159,
fat: 6.0, fat: 6.0,
carbs: 24, carbs: 24,
protein: 4.0, protein: 4.0,
sodium: 87, sodium: 87,
calcium: '14%', calcium: '14%',
iron: '1%' iron: '1%'
}, },
{ {
name: 'Ice cream sandwich', name: 'Ice cream sandwich',
calories: 237, calories: 237,
fat: 9.0, fat: 9.0,
carbs: 37, carbs: 37,
protein: 4.3, protein: 4.3,
sodium: 129, sodium: 129,
calcium: '8%', calcium: '8%',
iron: '1%' iron: '1%'
}, },
{ {
name: 'Eclair', name: 'Eclair',
calories: 262, calories: 262,
fat: 16.0, fat: 16.0,
carbs: 23, carbs: 23,
protein: 6.0, protein: 6.0,
sodium: 337, sodium: 337,
calcium: '6%', calcium: '6%',
iron: '7%' iron: '7%'
}, },
{ {
name: 'Cupcake', name: 'Cupcake',
calories: 305, calories: 305,
fat: 3.7, fat: 3.7,
carbs: 67, carbs: 67,
protein: 4.3, protein: 4.3,
sodium: 413, sodium: 413,
calcium: '3%', calcium: '3%',
iron: '8%' iron: '8%'
}, },
{ {
name: 'Gingerbread', name: 'Gingerbread',
calories: 356, calories: 356,
fat: 16.0, fat: 16.0,
carbs: 49, carbs: 49,
protein: 3.9, protein: 3.9,
sodium: 327, sodium: 327,
calcium: '7%', calcium: '7%',
iron: '16%' iron: '16%'
}, },
{ {
name: 'Jelly bean', name: 'Jelly bean',
calories: 375, calories: 375,
fat: 0.0, fat: 0.0,
carbs: 94, carbs: 94,
protein: 0.0, protein: 0.0,
sodium: 50, sodium: 50,
calcium: '0%', calcium: '0%',
iron: '0%' iron: '0%'
}, },
{ {
name: 'Lollipop', name: 'Lollipop',
calories: 392, calories: 392,
fat: 0.2, fat: 0.2,
carbs: 98, carbs: 98,
protein: 0, protein: 0,
sodium: 38, sodium: 38,
calcium: '0%', calcium: '0%',
iron: '2%' iron: '2%'
}, },
{ {
name: 'Honeycomb', name: 'Honeycomb',
calories: 408, calories: 408,
fat: 3.2, fat: 3.2,
carbs: 87, carbs: 87,
protein: 6.5, protein: 6.5,
sodium: 562, sodium: 562,
calcium: '0%', calcium: '0%',
iron: '45%' iron: '45%'
}, },
{ {
name: 'Donut', name: 'Donut',
calories: 452, calories: 452,
fat: 25.0, fat: 25.0,
carbs: 51, carbs: 51,
protein: 4.9, protein: 4.9,
sodium: 326, sodium: 326,
calcium: '2%', calcium: '2%',
iron: '22%' iron: '22%'
}, },
{ {
name: 'KitKat', name: 'KitKat',
calories: 518, calories: 518,
fat: 26.0, fat: 26.0,
carbs: 65, carbs: 65,
protein: 7, protein: 7,
sodium: 54, sodium: 54,
calcium: '12%', calcium: '12%',
iron: '6%' iron: '6%'
} }
] ]
} }
} }
} }

View File

@ -5,6 +5,7 @@ const routes = [
children: [{ path: "", component: () => import("pages/Index.vue") }] children: [{ path: "", component: () => import("pages/Index.vue") }]
}, },
{ {
path: "/overview/", path: "/overview/",
component: () => import("layouts/MyLayout.vue"), component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/Overview.vue") }] children: [{ path: "", component: () => import("pages/Overview.vue") }]