2 **********************************************************************
4 * Description: Nutritional Assessment App
5 * Author: Agnibho Mondal
6 * Website: http://code.agnibho.com
7 **********************************************************************
8 Copyright (c) 2016 Agnibho Mondal
10 **********************************************************************
11 This file is part of DietSurvey.
13 DietSurvey is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
18 DietSurvey is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with DietSurvey. If not, see <http://www.gnu.org/licenses/>.
25 **********************************************************************
28 <div class="panel panel-success">
29 <div class="panel-heading">
30 <div class="panel-title"><h3>Family Information</h3></div>
32 <div class="panel-body">
35 <div class="form-group">
36 <label>Head of the Family:</label>
37 <input class="form-control" type="text" placeholder="Enter full name"></div>
40 <template v-for="(m, i) in dataObj.family">
41 <member :data-index="i" :data-member="m" v-on:removeMember="removeMember"></member>
43 <button v-on:click="addNew" type="button" class="btn btn-success center-block" title="Add member"><span class="glyphicon glyphicon-plus"></span></button>
49 import Member from "./member.vue"
55 this.dataObj.family.push({name:"", age:"", month:"", sex:"", work:"sedentary", state:"npnl"});
57 removeMember:function(i){
58 this.dataObj.family.splice(i, 1);
62 this.dataObj.family.push({name:"", age:"", month:"", sex:"", work:"sedentary", state:"npnl"});
64 components:{"member":Member}