mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 04:39:54 -05:00
fixed step editor recipe selection
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- TODO label is not showing for some reason, for now in placeholder -->
|
||||
|
||||
<v-label class="mt-2" v-if="props.label" >{{props.label}}</v-label>
|
||||
<v-label class="mt-2" v-if="props.label">{{ props.label }}</v-label>
|
||||
<v-input :hint="props.hint" persistent-hint :label="props.label" :hide-details="props.hideDetails">
|
||||
<template #prepend v-if="$slots.prepend">
|
||||
<slot name="prepend"></slot>
|
||||
@@ -18,7 +18,7 @@
|
||||
:on-create="createObject"
|
||||
:createOption="props.allowCreate"
|
||||
:delay="300"
|
||||
:object="props.object"
|
||||
:object="true"
|
||||
:valueProp="itemValue"
|
||||
:label="itemLabel"
|
||||
:searchable="true"
|
||||
@@ -92,7 +92,7 @@ const props = defineProps({
|
||||
|
||||
mode: {type: String as PropType<'single' | 'multiple' | 'tags'>, default: 'single'},
|
||||
appendToBody: {type: Boolean, default: false},
|
||||
object: {type: Boolean, default: true},
|
||||
//object: {type: Boolean, default: true}, // TODO broken either fix or finally get other multiselect working
|
||||
|
||||
allowCreate: {type: Boolean, default: false},
|
||||
placeholder: {type: String, default: undefined},
|
||||
@@ -150,9 +150,7 @@ function search(query: string) {
|
||||
loading.value = true
|
||||
return modelClass.value.list({query: query, page: 1, pageSize: props.limit}).then((r: any) => {
|
||||
if (modelClass.value.model.isPaginated) {
|
||||
if (r.next) {
|
||||
hasMoreItems.value = true
|
||||
}
|
||||
hasMoreItems.value = !!r.next
|
||||
return r.results
|
||||
} else {
|
||||
hasMoreItems.value = false
|
||||
|
||||
@@ -47,10 +47,10 @@
|
||||
<v-number-input :label="$t('Time')" v-model="step.time" :min="0" :step="5" control-variant="split"></v-number-input>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6" v-if="showRecipe || step.stepRecipe != null">
|
||||
<model-select model="Recipe" v-model="step.stepRecipe" :object="false" append-to-body></model-select>
|
||||
<model-select model="Recipe" v-model="step.stepRecipeData" @update:modelValue="step.stepRecipe = (step.stepRecipeData != null) ? step.stepRecipeData.id! : null"></model-select>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6" v-if="showFile || step.file != null">
|
||||
<model-select model="UserFile" v-model="step.file" append-to-body></model-select>
|
||||
<model-select model="UserFile" v-model="step.file"></model-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user