|
|
|
<div id="app"> |
|
<h4 class="head"> Application</h4> |
|
<div class="container"> |
|
|
|
<!-- <div class="img-container"> |
|
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAA1VBMVEX///9BuIM1SV4lsncQMUxCvoU0PVtBu4Q1R10+t4E1RV05tn80QVw0Q1w0P1s0tX3x+vef2b54y6Tp9/G24s3i9OxPvozD59bb8ObP7N6s3seGz65cwpSV1Lc/oHxIvIlwyJ87e283UWI8g3I6bWs+mHlBr4E5Zmg8iXR/zalAqX84W2VZwZI+nnuc17tBsoI+kXc3VmMlO1TH09Pl7ex3jZNIZXANNU2fsLMeRFYTO1A6dG0Aq2kOIEhsgooCKkixwMHX4OA0Mlkil25adH2JnKFegISv2nx/AAAHGElEQVR4nO2ba1vUOhRGyww4FxhmRAVUUMQLCio3ARG8HfH8/590HvGAVHabld3dNpkn67M2TTMm27XfZFkikUgkEolEIpFIJBKJRCKRSCQSiUQikVCwet5F/Pg86+TrsdfQx1/dj/z8g73e+WrxOG/mZwhzL4YdJ7OHHhM8nHU/cPhiDr3d/OOSgSZd9IyZ3TvuF+qfeszwtO9+4OIue7nupGykR2P0kLnnI/cbHXzEE/x44H7c6DlbwvGj8rHYZ5rpdcBHPyn9mDeYnLif1u/04Ls5BnvIfqe9l4vuGQ6/wBl+Af+sF1+yGXYfukbbgJvNDljE2e9ogt/BNtPfgdvMhnO4e3ARt8lms4NmSD7WnW24hPfc463DRTwjm803MMFvZJs5g0u4Tj7peIAeNrPgfrHOJzDeJ/CcBfZKgzGZYHafnRi912CKBz+dw/0ES7jwmv1Gx/fRDLNltohzm2Sz+eAY7APZZjbZb3SwzCaYrcLN5h05MS4cg12Qk+Id3GZKCtI8S3Cz2SKLWF6ekoK0vwW3mSU6QVyevgInRmezdKh9clK8Yq9TXpDmuQvL02dVy1NUkD6DBeldPsEsG8ATYwgKypLyFBWkQ/Yqg3mfCWYr8MTYAyfG6KhwmCPwG1jYgyfF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DVhQwWGv9EoC5koNDowd9ou+pCht6IZn/M4gazNfBGNMPmBrM1UGgQWlcXMlBoENpXFzJQaLgJQV3IwBvRTkIqSPNAoeGcYBDqQgYKDQdhqAsZKDTKCUVdyEChUUYw6kKGCo2yJQxGXcjAG9HF2N9gtoYGiAtouZdGgEKjcAmDUhcyMEBcsITNxYD1QKEhE5q6kIEBYolGY8B6qNCQljA4dSEDhcZtQlQXMuo1bPvFMcryNOyCNA+8EZ2n1hvM1qjK09AL0jwKoRGuupCh/bZrguqlEbzL0xgK0jyw33a9hGH10gie5WkcBWke2G/7TXC9NIJXeRpLQZoH3oj+RVM3mK3BQiMCdSEDA8Ttx4D1QKERhbqQgf22UHtpBCQ0IlEXMujEiPOkuAL020LupRHAGrb9ihVxCo2Y1IWM40Z0CzeYrXEIjbjUhUxpgDikGLCeEqERnbqQKREa8akLmUKhEaG6kCkUGjGqC5kCoRGlupApKE/jLkjziP22eHppBEFoRKsuZAShEa+6kLkVIA40BqznltCIWV3I/NVvi62XRsgvYgg3mK3JCY3Y1YXMzQBxyDFgPTeERvzqQuY6QBx4DFjPtdCYBnUh87/QmA51IXMpNKZEXchcCo1pURcyy4PpURcyq90pUhcyS+PpURcyk/MpUhcyU/efpkQikUgkEolEIpFIJBKJROI3/wF1Frk+Hpt6CQAAAABJRU5ErkJggg==" class="" /> |
|
</div> --> |
|
|
|
<table class="table-responsive bordered highlight centered hoverable z-depth-2" v-show="persons.length"> |
|
<thead> |
|
<tr> |
|
<th v-for="column in columns"> |
|
{{column}} |
|
</th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<tr v-for="(person,index) in persons"> |
|
<td>{{index}}</td> |
|
<td> |
|
{{person.lname}} |
|
</td> |
|
<td> |
|
{{person.fname}} |
|
</td> |
|
<td> |
|
{{person.age}} years |
|
</td> |
|
<td> |
|
{{person.job}} |
|
</td> |
|
<td> |
|
{{person.address}} |
|
</td> |
|
<td style="width: 18%;"> |
|
<a href="#modal" @click="edit(index)" class="btn waves-effect waves-light yellow darken-2"><i class="material-icons">edit</i> |
|
</a> |
|
<a href="#!" class="btn waves-effect waves-light red darken-2" @click="archive(index)"><i class="material-icons">archive</i> |
|
</a> |
|
</td> |
|
</tr> |
|
<tr> |
|
<td colspan="2"> |
|
<div class="input-field"> |
|
<input placeholder="Placeholder" ref="lname" v-model="input.lname" id="lname" type="text"> |
|
<label for="lname">Last Name</label> |
|
</div> |
|
</td> |
|
<td> |
|
<div class="input-field"> |
|
<input placeholder="Placeholder" v-model="input.fname" id="fname" type="text"> |
|
<label for="fname">First Name</label> |
|
</div> |
|
</td> |
|
<td> |
|
<div class="input-field"> |
|
<input placeholder="Placeholder" v-model="input.age" id="age" type="text"> |
|
<label for="age">Age</label> |
|
</div> |
|
</td> |
|
<td> |
|
<div class="input-field"> |
|
<input placeholder="Placeholder" v-model="input.job" id="job" type="text"> |
|
<label for="job">Job</label> |
|
</div> |
|
</td> |
|
<td> |
|
<div class="input-field"> |
|
<input placeholder="Placeholder" v-model="input.address" id="address" type="text"> |
|
<label for="address">Address</label> |
|
</div> |
|
</td> |
|
<td><a href="#!" @click="add" class="btn btn-waves green darken-2"><i class="material-icons">add</i></a></td> |
|
</tr> |
|
</tbody> |
|
</table> |
|
|
|
<table class="table-responsive centered bordered striped highlight z-depth-1 hoverable" v-show="bin.length"> |
|
<thead> |
|
<tr> |
|
<th v-for="column in columns"> |
|
{{column}} |
|
</th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<tr v-for="(person,index) in bin"> |
|
<td>{{index}}</td> |
|
<td> |
|
{{person.lname}} |
|
</td> |
|
<td> |
|
{{person.fname}} |
|
</td> |
|
<td> |
|
{{person.age}} years |
|
</td> |
|
<td> |
|
{{person.job}} |
|
</td> |
|
<td> |
|
{{person.address}} |
|
</td> |
|
<td> |
|
<a href="#!" @click="restore(index)" class="btn waves-effect waves-light blue darken-2"><i class="material-icons">restore</i> |
|
</a> |
|
<a href="#!" @click="deplete(index)" class="btn waves-effect waves-light red darken-2"><i class="material-icons">delete</i> |
|
</a> |
|
</td> |
|
</tr> |
|
</tbody> |
|
</table> |
|
</div> |
|
|
|
<div id="modal" class="modal modal-fixed-footer"> |
|
<div class="modal-content"> |
|
<h4 class="center-align">Edit</h4> |
|
<p class="center-align">Edition form. Update informations</p> |
|
<div class="row"> |
|
<form class="col s12"> |
|
<div class="row"> |
|
<div class="input-field col s6"> |
|
<input placeholder="John" id="last_name" type="text" v-model="editInput.lname"> |
|
<label for="last_name">Last Name</label> |
|
</div> |
|
<div class="input-field col s6"> |
|
<input placeholder="Doe" id="first_name" type="text" v-model="editInput.fname"> |
|
<label for="first_name">First Name</label> |
|
</div> |
|
</div> |
|
<div class="row"> |
|
<div class="input-field col s6"> |
|
<input placeholder="26" id="edit_age" type="text" v-model="editInput.age"> |
|
<label for="edit_age">Age</label> |
|
</div> |
|
<div class="input-field col s6"> |
|
<input placeholder="Teacher" id="edit_job" type="text" v-model="editInput.job"> |
|
<label for="edit_job">Job</label> |
|
</div> |
|
</div> |
|
<div class="row"> |
|
<div class="input-field col s12"> |
|
<input placeholder="Address" id="edit_address" type="text" v-model="editInput.address"> |
|
<label for="edit_address">First Name</label> |
|
</div> |
|
</div> |
|
</form> |
|
</div> |
|
</div> |
|
<div class="modal-footer"> |
|
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">Close</a> |
|
<a href="#!" @click="update" class="btn waves-effect waves-light"><i class="material-icons">edit</i></a> |
|
</div> |
|
</div> |
|
</div> |