mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
added warning message to meal plan if no type is given
This commit is contained in:
@@ -21,8 +21,6 @@
|
||||
{% block content %}
|
||||
|
||||
<div id="app">
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 offset-md-4">
|
||||
<div class="input-group" style="margin-top: 8px; margin-bottom: 8px">
|
||||
@@ -461,6 +459,10 @@
|
||||
for (let mte of this.meal_types_edit) {
|
||||
this.$set(mte, 'delete', false)
|
||||
}
|
||||
|
||||
if (this.meal_types.length === 0){
|
||||
this.makeToast(gettext('Information'), gettext('To use the meal plan please first create at least one meal plan type.'), 'warning')
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log("getPlanTypes error: ", err);
|
||||
this.makeToast(gettext('Error'), gettext('There was an error loading a resource!') + err.bodyText, 'danger')
|
||||
|
||||
Reference in New Issue
Block a user