Skip to content

Commit

Permalink
fix(breakfasts): move main action (summary) to the fab button and add…
Browse files Browse the repository at this point in the history
… missing toolbar tooltip
  • Loading branch information
pablolmedorado committed Oct 15, 2020
1 parent d2b5c22 commit 8732f4d
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions frontend/src/views/Breakfasts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,43 @@
custom-headers
selectable-rows
>
<template #toolbar="{ selectedItems }">
<v-btn icon :disabled="loading" :loading="loadingUserBreakfast" @click.stop="openFormDialog">
<v-icon>mdi-account</v-icon>
</v-btn>
<v-btn
icon
:disabled="!selectedItems.length"
@click.stop="$refs.breakfastsSummaryDialog.open(selectedItems)"
>
<v-icon>mdi-clipboard-list</v-icon>
</v-btn>
<template #toolbar>
<v-tooltip bottom>
<template #activator="{ attrs, on }">
<v-btn
icon
v-bind="attrs"
:disabled="loading"
:loading="loadingUserBreakfast"
v-on="on"
@click.stop="openFormDialog"
>
<v-icon>mdi-account</v-icon>
</v-btn>
</template>
<span>Mi desayuno</span>
</v-tooltip>
</template>

<template #item.user="{ value }">
<UserPill :user="value" />
</template>

<template #fab="{ selectedItems }">
<v-fab-transition>
<v-btn
v-show="selectedItems.length"
fab
fixed
bottom
right
color="secondary"
@click.stop="$refs.breakfastsSummaryDialog.open(selectedItems)"
>
<v-icon>mdi-clipboard-list</v-icon>
</v-btn>
</v-fab-transition>
</template>
</ItemIndex>
</v-col>
</v-row>
Expand Down

0 comments on commit 8732f4d

Please sign in to comment.