added warning message to meal plan if no type is given

This commit is contained in:
vabene1111
2021-01-19 20:55:51 +01:00
parent b52c3d6bd4
commit a0741f6ad3

View File

@@ -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')