Blame view

src/pages/Dashboard/dashboard.vue 5.66 KB
a17c68a03   Neeraj Sharma   implement two rou...
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
  <template>
    <v-app id="pages-dasboard">
      <div>
        <full-calendar
          ref="calendar"
          :event-sources="eventSources"
          @event-selected="eventSelected"
          @event-created="eventCreated"
          :config="config"
        ></full-calendar>
      </div>
      <v-dialog v-model="dialog" max-width="500">
        <v-card color="grey lighten-4" flat>
          <v-toolbar dark color="fixcolors">
            <v-toolbar-side-icon></v-toolbar-side-icon>
            <v-toolbar-title class="white--text">Title</v-toolbar-title>
            <v-spacer></v-spacer>
            <v-btn icon @click="dialog= false">
              <v-icon>close</v-icon>
            </v-btn>
          </v-toolbar>
          <v-flex class="py-4">
            <v-list-tile>
              <v-list-tile-action>
                <v-icon>edit</v-icon>
8bb178441   Neeraj Sharma   implemnt api in s...
26
27
              </v-list-tile-action>
              <v-list-tile-content>
a17c68a03   Neeraj Sharma   implement two rou...
28
                <v-list-tile-title>{{ selected.title }}</v-list-tile-title>
8bb178441   Neeraj Sharma   implemnt api in s...
29
30
              </v-list-tile-content>
            </v-list-tile>
a17c68a03   Neeraj Sharma   implement two rou...
31
32
33
34
35
36
37
38
39
40
41
42
            <v-list-tile>
              <v-list-tile-action>
                <v-icon>access_time</v-icon>
              </v-list-tile-action>
              <v-list-tile-content>
                <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title>
                <v-list-tile-sub-title>{{ date(selected.end) }}</v-list-tile-sub-title>
              </v-list-tile-content>
            </v-list-tile>
          </v-flex>
        </v-card>
      </v-dialog>
8bb178441   Neeraj Sharma   implemnt api in s...
43
44
45
46
47
48
49
50
51
      <div class="loader" v-if="showLoader">
        <v-progress-circular indeterminate color="white"></v-progress-circular>
      </div>
    </v-app>
  </template>
  
  <script>
  import http from "@/Services/http.js";
  import Util from "@/util";
a17c68a03   Neeraj Sharma   implement two rou...
52
  import moment from "moment";
8bb178441   Neeraj Sharma   implemnt api in s...
53
54
  
  export default {
a17c68a03   Neeraj Sharma   implement two rou...
55
56
57
58
59
60
61
62
63
64
    data() {
      return {
        showLoader: false,
        dialog: false,
        events: [
          {
            id: 1,
            title:
              "property to add transparency to a button transparency,property to add transparency to a button transparency",
            start: "2019-09-04 09:30:26.123"
8bb178441   Neeraj Sharma   implemnt api in s...
65
          },
a17c68a03   Neeraj Sharma   implement two rou...
66
67
68
69
70
          {
            id: 2,
            title: "event2",
            start: "2019-09-06 09:30:26.123",
            end: "2019-09-07 09:31:26.123",
8bb178441   Neeraj Sharma   implemnt api in s...
71
          },
a17c68a03   Neeraj Sharma   implement two rou...
72
73
74
75
76
          {
            id: 3,
            title: "event3",
            start: "2019-09-08 09:30:26.123",
            end: "2019-09-09 09:35:26.123",
8bb178441   Neeraj Sharma   implemnt api in s...
77
          }
a17c68a03   Neeraj Sharma   implement two rou...
78
79
80
81
82
        ],
        config: {
          eventClick: event => {
            this.selected = event;
            this.dialog = true;
8bb178441   Neeraj Sharma   implemnt api in s...
83
84
          }
        },
a17c68a03   Neeraj Sharma   implement two rou...
85
86
87
        selected: {},
      };
    },
8bb178441   Neeraj Sharma   implemnt api in s...
88
    methods: {
a17c68a03   Neeraj Sharma   implement two rou...
89
90
      date: function(date) {
        return moment(date).format("MMMM DD, YYYY  HH:mm:ss");
8bb178441   Neeraj Sharma   implemnt api in s...
91
      },
a17c68a03   Neeraj Sharma   implement two rou...
92
93
94
95
96
97
98
99
100
101
102
103
      refreshEvents() {
        this.$refs.calendar.$emit("refetch-events");
      },
      removeEvent() {
        this.$refs.calendar.$emit("remove-event", this.selected);
        this.selected = {};
      },
      eventSelected(event) {
        this.selected = event;
      },
      eventCreated(...test) {
        console.log(test);
8bb178441   Neeraj Sharma   implemnt api in s...
104
      },
8bb178441   Neeraj Sharma   implemnt api in s...
105
106
    },
    computed: {
a17c68a03   Neeraj Sharma   implement two rou...
107
108
109
110
111
112
113
114
115
116
117
      eventSources() {
        const self = this;
        return [
          {
            events(start, end, timezone, callback) {
              setTimeout(() => {
                callback(self.events.filter(() => Math.random() > 0.5));
              }, 1000);
            }
          }
        ];
8bb178441   Neeraj Sharma   implemnt api in s...
118
      }
8bb178441   Neeraj Sharma   implemnt api in s...
119
120
121
    }
  };
  </script>
8bb178441   Neeraj Sharma   implemnt api in s...
122
  <style>
a17c68a03   Neeraj Sharma   implement two rou...
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
  @import "fullcalendar/dist/fullcalendar.css";
  .fc button {
    background: #39b982 !important;
    border: none;
    border-radius: 4px;
    color: white;
    padding: 6px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 18px;
    margin: 8px 2px !important;
    cursor: pointer;
    -webkit-transition-duration: 0.4s;
    transition-duration: 0.4s;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  }
  .v-tabs__div {
    text-transform: none;
  }
  .v-input__prepend-outer {
    margin-right: 0px !important;
  }
  .v-card__actions .v-btn {
    margin: 0 15px;
    min-width: 120px;
  }
  .primary {
    background-color: #aaa !important;
    border-color: #aaa !important;
  }
  h4 {
    background-repeat: no-repeat;
    padding: 8px;
    margin: auto;
    font-size: 25px;
  }
  #name {
    position: absolute;
    left: 100px;
    top: 17px;
  }
  #icon {
    position: absolute;
    right: 8px;
    top: 8px;
  }
  #m {
    position: relative;
    left: 135px;
    top: -15px;
  }
  #G {
    position: absolute;
    top: 38px;
    color: white;
  }
  #bt {
    position: relative;
    top: -20px;
    left: 115px;
  }
  #e {
    position: relative;
    top: 5px;
    right: -30px;
    height: 17px;
    cursor: pointer;
  }
  #d {
    position: relative;
    top: 5px;
    right: -70px;
    height: 17px;
    cursor: pointer;
  }
  #indexId {
    padding: 0 0px !important;
  }
  #td {
    border: 1px solid #dddddd;
    text-align: left;
    padding: 8px;
  }
  #dialog {
    height: 550px;
  }
  .active {
    background-color: black;
    color: white !important;
  }
  .activebtn {
    color: black !important;
  }
  #flex {
    height: 300px;
  }
  .top {
    margin-top: 100px;
  }
  .v-tabs__item a {
    font-size: 16px !important;
  }
  @media screen and (max-width: 769px) {
    .top {
      margin-top: 0 !important;
    }
    .userSearch .v-icon {
      font-size: 20px !important;
      margin-left: 20px;
    }
  }
  @media screen and (max-width: 380px) {
    .pl-3 {
      padding-left: 0px !important;
    }
    .right {
      float: none !important;
    }
    .subheading {
      font-size: 14px !important;
    }
    .v-card__actions .v-btn {
      margin: 0 0px;
      min-width: 100px;
    }
    .subheading {
      font-size: 12px !important;
    }
    h5 {
      font-size: 13px;
    }
  }
  .v-icon {
    font-size: 30px;
  }
  @media screen and (min-width: 1270px) {
    .hide {
      display: none;
    }
  }
  @media screen and (max-width: 420px) {
    .userSearch .v-text-field .v-label {
      line-height: 24px !important;
    }
    .userSearch .v-label {
      font-size: 13px !important;
    }
    .v-list__tile {
      font-size: 14px;
      padding: 0 10px;
    }
    .name {
      font-size: 15px;
    }
8bb178441   Neeraj Sharma   implemnt api in s...
278
  }
a17c68a03   Neeraj Sharma   implement two rou...
279
  </style>