mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
add keyword during url import
This commit is contained in:
@@ -190,6 +190,9 @@
|
|||||||
:hide-selected="true"
|
:hide-selected="true"
|
||||||
:preserve-search="true"
|
:preserve-search="true"
|
||||||
placeholder="{% trans 'Select one' %}"
|
placeholder="{% trans 'Select one' %}"
|
||||||
|
tag-placeholder="{% trans 'Add Keyword' %}"
|
||||||
|
:taggable="true"
|
||||||
|
@tag="addKeyword"
|
||||||
label="text"
|
label="text"
|
||||||
track-by="id"
|
track-by="id"
|
||||||
id="id_keywords"
|
id="id_keywords"
|
||||||
@@ -357,6 +360,10 @@
|
|||||||
this.units.push(new_unit.unit)
|
this.units.push(new_unit.unit)
|
||||||
this.recipe_data.recipeIngredient[index] = new_unit
|
this.recipe_data.recipeIngredient[index] = new_unit
|
||||||
},
|
},
|
||||||
|
addKeyword: function (tag) {
|
||||||
|
let new_keyword = {'text':tag,'id':null}
|
||||||
|
this.recipe_data.keywords.push(new_keyword)
|
||||||
|
},
|
||||||
openUnitSelect: function (id) {
|
openUnitSelect: function (id) {
|
||||||
let index = id.replace('unit_', '')
|
let index = id.replace('unit_', '')
|
||||||
if (this.recipe_data.recipeIngredient[index].unit !== null) {
|
if (this.recipe_data.recipeIngredient[index].unit !== null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user