mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
fixed search facets and sub recipe
This commit is contained in:
@@ -252,7 +252,6 @@
|
||||
select-label="{% trans 'Select' %}"
|
||||
:id="'id_step_' + step.id + '_recipe'"
|
||||
:custom-label="opt => recipes.find(x => x.id == opt).name"
|
||||
|
||||
:multiple="false"
|
||||
:loading="recipes_loading"
|
||||
@search-change="searchRecipes">
|
||||
@@ -615,6 +614,13 @@
|
||||
this.$http.get("{% url 'api:recipe-detail' recipe.pk %}").then((response) => {
|
||||
this.recipe = response.data;
|
||||
this.loading = false
|
||||
|
||||
//TODO workaround function until view is properly refactored, loads name of selected sub recipe so the input can find its label
|
||||
this.recipe.steps.forEach(s => {
|
||||
if (s.step_recipe != null) {
|
||||
this.recipes.push(s.step_recipe_data)
|
||||
}
|
||||
})
|
||||
}).catch((err) => {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
|
||||
Reference in New Issue
Block a user