mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
filter by recipe
This commit is contained in:
@@ -203,6 +203,15 @@ export class Models {
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
static MEAL_PLAN = {
|
||||
'name': i18n.t('Meal_Plan'),
|
||||
'apiName': 'MealPlan',
|
||||
'list': {
|
||||
'params': ['options'],
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -214,12 +214,23 @@ function formatParam(config, value) {
|
||||
case 'type':
|
||||
switch(v) {
|
||||
case 'string':
|
||||
if (value !== undefined){
|
||||
if (Array.isArray(value)) {
|
||||
let tmpValue = []
|
||||
value.forEach(x => tmpValue.push(String(x)))
|
||||
value = tmpValue
|
||||
} else if (value !== undefined) {
|
||||
value = String(value)
|
||||
}
|
||||
break;
|
||||
case 'integer':
|
||||
value = parseInt(value)
|
||||
if (Array.isArray(value)) {
|
||||
let tmpValue = []
|
||||
value.forEach(x => tmpValue.push(parseInt(x)))
|
||||
value = tmpValue
|
||||
} else if (value !== undefined) {
|
||||
value = parseInt(value)
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user