notification.vue
2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<template>
<v-app id="login">
<app-toolbar class="app--toolbar">
</app-toolbar>
<v-toolbar color="white">
<h4 class="text-lg-left text"><b>Push Notification</b></h4>
<v-spacer></v-spacer>
<v-flex xs5 sm4 class="searchIcon">
<v-text-field justify-right
prepend-icon="search"
v-model="search"
label="Find your users"
single-line
hide-details
color="black"
class="mb-4"
>
</v-text-field>
</v-flex>
</v-toolbar>
<v-card>
<v-card-text>
<v-flex xs12>
<v-textarea
v-model="SendNotificationcredentials.message"
solo
name="input-7-4"
label="Hello Users!">
</v-textarea>
</v-flex>
</v-card-text>
<v-flex text-xs-right>
<div>
<v-btn large class="text-lg-right mr-4" :disabled="!selected[0]" @click="send" color="black" id="active">send</v-btn>
</div></v-flex>
<v-container grid-list-xl>
<v-card>
<v-data-table
:headers="headers"
:items="desserts"
:search="search"
v-model="selected"
item-key="Name"
select-all
class="text-xs-left"
:pagination.sync="pagination"
>
<template slot="items" slot-scope="props">
<th>
<v-checkbox
v-model="props.selected"
primary
hide-details
></v-checkbox>
</th>
<td>{{ props.item.Name }}</td>
</template>
</v-data-table>
</v-card>
</v-container>
</v-card>
</v-app>
</template>
<script>
import axios from 'axios';
import AppToolbar from '@/components/AppToolbar';
export default {
components: {
AppToolbar,
},
data () {
return {
message: '',
search: '',
selected: [],
SendNotificationcredentials: {},
pagination: {
rowsPerPage: 10,
},
headers: [
{
text: 'User List',
align: 'left',
sortable: false,
},
],
desserts: [
{
Name: 'ajay',
},
{
Name: 'amrit',
},
{
Name: 'Disant',
},
{
Name: 'Pardeep',
}
]
};
},
methods: {
send () {
console.log('=clicked==', this.SendNotificationcredentials);
}
}
};
</script>
<style>
#active{
color:white;
}
@media screen and (max-width: 769px){
.text{
font-size: 15px;
}
.searchIcon .v-icon {
font-size: 20px;
margin-left: 20px;
}
}
/* .v-btn--large {
padding: 0 50px;
} */
</style>