Check if person exists before allowing add
This commit is contained in:
parent
4664cc96f3
commit
2ceaf3d923
1 changed files with 4 additions and 0 deletions
|
|
@ -99,6 +99,10 @@ export default {
|
|||
this.meal[list] = this.meal[list].filter(p => p.id !== person.id);
|
||||
},
|
||||
addPerson(list, person) {
|
||||
if (this.meal[list].find(p => p.id === person.id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.meal[list].push(person);
|
||||
},
|
||||
async saveMeal() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue