mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-09 16:18:00 -05:00
many editor improvements (and more)
This commit is contained in:
@@ -8,20 +8,51 @@
|
||||
|
||||
<!-- </v-table>-->
|
||||
|
||||
<v-data-table :items="ingredients" hide-default-footer hide-default-header :headers="tableHeaders" density="compact" v-if="ingredients.length > 0" @click:row="handleRowClick" items-per-page="0">
|
||||
<template v-slot:item.checked="{ item }">
|
||||
<v-checkbox-btn v-model="item.checked" color="success"></v-checkbox-btn>
|
||||
</template>
|
||||
<template v-slot:item.amount="{ item }">
|
||||
{{ item.amount * props.ingredientFactor }}
|
||||
</template>
|
||||
<!-- <v-data-table :items="ingredients" hide-default-footer hide-default-header :headers="tableHeaders" density="compact" v-if="ingredients.length > 0" @click:row="handleRowClick"-->
|
||||
<!-- items-per-page="0">-->
|
||||
<!-- <template v-slot:item.checked="{ item }">-->
|
||||
<!-- <v-checkbox-btn v-model="item.checked" color="success" v-if="!item.isHeader"></v-checkbox-btn>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:item.amount="{ item }">-->
|
||||
<!-- <template v-if="item.isHeader"><p style="width: 100px"><b>{{ item.note }}</b></p></template>-->
|
||||
<!-- <template v-else>{{ item.amount * props.ingredientFactor }}</template>-->
|
||||
<!-- </template>-->
|
||||
|
||||
<template v-slot:item.note="{ item }">
|
||||
<v-icon class="far fa-comment float-right" v-if="item.note != '' && item.note != undefined">
|
||||
<v-tooltip activator="parent" open-on-click location="start">{{ item.note }}</v-tooltip>
|
||||
</v-icon>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<!-- <template v-slot:item.note="{ item }">-->
|
||||
<!-- <v-icon class="far fa-comment float-right" v-if="item.note != '' && item.note != undefined">-->
|
||||
<!-- <v-tooltip activator="parent" open-on-click location="start">{{ item.note }}</v-tooltip>-->
|
||||
<!-- </v-icon>-->
|
||||
<!-- </template>-->
|
||||
<!-- </v-data-table>-->
|
||||
|
||||
<v-table density="compact">
|
||||
<tbody>
|
||||
|
||||
<tr v-for="i in ingredients" :key="i.id" @click="i.checked = !i.checked">
|
||||
<template v-if="i.isHeader">
|
||||
<td colspan="5" class="font-weight-bold">{{ i.note }}</td>
|
||||
</template>
|
||||
<template v-else>
|
||||
<td style="width: 1%; text-wrap: nowrap" class="pa-0">
|
||||
<v-checkbox-btn v-model="i.checked" color="success" v-if="!i.isHeader"></v-checkbox-btn>
|
||||
</td>
|
||||
<td style="width: 1%; text-wrap: nowrap" class="pr-1">{{ i.amount * props.ingredientFactor }}</td>
|
||||
<td style="width: 1%; text-wrap: nowrap" class="pr-1">
|
||||
<template v-if="i.unit"> {{ i.unit.name }}</template>
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="i.food"> {{ i.food.name }}</template>
|
||||
</td>
|
||||
|
||||
<td style="width: 1%; text-wrap: nowrap">
|
||||
<v-icon class="far fa-comment float-right" v-if="i.note != '' && i.note != undefined">
|
||||
<v-tooltip activator="parent" open-on-click location="start">{{ i.note }}</v-tooltip>
|
||||
</v-icon>
|
||||
</td>
|
||||
</template>
|
||||
</tr>
|
||||
</tbody>
|
||||
</v-table>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user