This commit is contained in:
@@ -1,20 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-flex xs12 md4>
|
<v-flex xs12 md4>
|
||||||
<v-data-table
|
<v-data-table
|
||||||
|
v-model="selected"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
:items="Items"
|
:items="Items"
|
||||||
|
item-key="id"
|
||||||
:pagination.sync="pagination"
|
:pagination.sync="pagination"
|
||||||
:total-items="totalItems"
|
:total-items="totalItems"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
class="elevation-1"
|
class="elevation-1"
|
||||||
|
select-all
|
||||||
>
|
>
|
||||||
<template slot="items" slot-scope="props">
|
<template slot="items" slot-scope="props">
|
||||||
<td>{{ props.item.name }}</td>
|
<td>
|
||||||
<td class="text-xs-right">{{ props.item.serial }}</td>
|
<v-checkbox v-model="props.selected" color="secondary" hide-details></v-checkbox>
|
||||||
<td class="text-xs-right">{{ props.item.dollarAmount }}</td>
|
</td>
|
||||||
<td class="text-xs-right">{{ props.item.active }}</td>
|
<td>
|
||||||
<td class="text-xs-right">{{ props.item.roles }}</td>
|
<div style="width:200px;">{{ props.item.name }}</div>
|
||||||
<td class="text-xs-right">{{ props.item.startDate }}</td>
|
</td>
|
||||||
|
<td class="text-xs-left">{{ props.item.serial }}</td>
|
||||||
|
<td class="text-xs-left">{{ props.item.dollarAmount }}</td>
|
||||||
|
<td class="text-xs-left">{{ props.item.active }}</td>
|
||||||
|
<td class="text-xs-left">{{ props.item.roles }}</td>
|
||||||
|
<td class="text-xs-left">{{ props.item.startDate }}</td>
|
||||||
</template>
|
</template>
|
||||||
</v-data-table>
|
</v-data-table>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
@@ -31,10 +39,10 @@ export default {
|
|||||||
Items: [],
|
Items: [],
|
||||||
loading: true,
|
loading: true,
|
||||||
pagination: {},
|
pagination: {},
|
||||||
|
selected: [],
|
||||||
headers: [
|
headers: [
|
||||||
{
|
{
|
||||||
text: "Widget",
|
text: "Widget",
|
||||||
align: "left",
|
|
||||||
value: "name"
|
value: "name"
|
||||||
},
|
},
|
||||||
{ text: "Serial", value: "serial" },
|
{ text: "Serial", value: "serial" },
|
||||||
@@ -66,6 +74,10 @@ export default {
|
|||||||
this.getDataFromApi();
|
this.getDataFromApi();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toggleAll() {
|
||||||
|
if (this.selected.length) this.selected = [];
|
||||||
|
else this.selected = this.Items.slice();
|
||||||
|
},
|
||||||
getDataFromApi() {
|
getDataFromApi() {
|
||||||
var listOptions = {
|
var listOptions = {
|
||||||
Offset: 0,
|
Offset: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user