several small fixes to new components

This commit is contained in:
vabene1111
2021-09-04 18:01:44 +02:00
parent cb8dc98de4
commit d70f1f9fc7
3 changed files with 61 additions and 61 deletions

View File

@ -12,8 +12,7 @@
:list_name="this_model.name"
@reset="resetList"
@get-list="getItems"
@item-action="startAction"
>
@item-action="startAction">
<template v-slot:cards-left>
<generic-horizontal-card
v-for="i in items_left" v-bind:key="i.id"
@ -22,8 +21,7 @@
:draggable="true"
:merge="true"
:move="true"
@item-action="startAction($event, 'left')"
>
@item-action="startAction($event, 'left')">
<!-- foods can also be a recipe, show link to the recipe if it exists -->
<template v-slot:upper-right>
<b-button v-if="i.recipe" v-b-tooltip.hover :title="i.recipe.name"
@ -38,8 +36,7 @@
:draggable="true"
:merge="true"
:move="true"
@item-action="startAction($event, 'right')"
>
@item-action="startAction($event, 'right')">
<!-- foods can also be a recipe, show link to the recipe if it exists -->
<template v-slot:upper-right>
<b-button v-if="i.recipe" v-b-tooltip.hover :title="i.recipe.name"
@ -50,7 +47,6 @@
</generic-split-lists>
</div>
</template>
@ -273,7 +269,10 @@ export default {
this.clearState()
return
}
this.genericAPI(this.this_model, this.Actions.MERGE, {'source': source_id, 'target': target_id}).then((result) => {
this.genericAPI(this.this_model, this.Actions.MERGE, {
'source': source_id,
'target': target_id
}).then((result) => {
this.items_left = this.destroyCard(source_id, this.items_left)
this.items_right = this.destroyCard(source_id, this.items_right)
this.refreshThis(target_id)

View File

@ -1,5 +1,5 @@
<template>
<div row>
<div row style="margin: 4px">
<b-card no-body d-flex flex-column :class="{'border border-primary' : over, 'shake': isError}"
style="height: 10vh;" :style="{'cursor:grab' : draggable}"
@dragover.prevent

View File

@ -12,6 +12,7 @@
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
:placeholder="modelName">
</generic-multiselect>
</b-form-group>
</div>
</template>