Blame view

src/pages/questions.vue 3.19 KB
04e3fbc56   Jatinder Singh   minor fix
1
  <template>
03dcbf0c1   Neeraj Sharma   fix all api and r...
2
   <v-flex>
f7979ec1a   Neeraj Sharma   add seach in heal...
3
     <app-toolbar class="app--toolbar"></app-toolbar>
04e3fbc56   Jatinder Singh   minor fix
4
5
    <v-card>
      <v-toolbar flat color="white">
a259e694f   Jatinder Singh   minor change
6
        <v-card-title>
c1fd43e24   Jatinder Singh   changes
7
8
9
        <h3 style="position:relative; left:px; top:-5px;"><b>Forum Questions</b></h3>
        <h5 style="position:relative; left:40px; top:-15px;">Select Category</h5>
        <span style="position:relative; left:-95px; top:10px;">
04e3fbc56   Jatinder Singh   minor fix
10

c17e4f0cd   Jatinder Singh   question changes
11
12
13
          <v-btn color="grey darken-2" v-on:click="component='suggestion' , activebtn('existing')" v-bind:class="{ activebtn: isActivebtn }" flat>Suggestion</v-btn>
  
          <v-btn color="grey darken-2" v-on:click="component='sex' , activebtn('new')" v-bind:class="{ activebtn: Activebtn1 }" flat>Sex</v-btn>
04e3fbc56   Jatinder Singh   minor fix
14

c17e4f0cd   Jatinder Singh   question changes
15
          <v-btn color="grey darken-2" v-on:click="component='health' , activebtn('new1')" v-bind:class="{ activebtn: Activebtn2 }" flat>Health</v-btn>
04e3fbc56   Jatinder Singh   minor fix
16

c17e4f0cd   Jatinder Singh   question changes
17
18
19
20
21
22
23
          <v-btn color="grey darken-2" v-on:click="component='skin' , activebtn('new2')" v-bind:class="{ activebtn: Activebtn3 }" flat>Skin & Beauty</v-btn>
  
          <v-btn color="grey darken-2" v-on:click="component='diet' , activebtn('new3')" v-bind:class="{ activebtn: Activebtn4 }" flat>Diet & Ex</v-btn>
  
        </span>
        </v-card-title>
        
04e3fbc56   Jatinder Singh   minor fix
24
      </v-toolbar>
c17e4f0cd   Jatinder Singh   question changes
25
      <component v-bind:is="component"></component>
03dcbf0c1   Neeraj Sharma   fix all api and r...
26
27
    </v-card>
    </v-flex> 
04e3fbc56   Jatinder Singh   minor fix
28
29
  </template>
  <script>
e173bab21   Jatinder Singh   api
30
  import axios from 'axios';
c17e4f0cd   Jatinder Singh   question changes
31
32
33
34
35
  import suggestion from '@/components/questions/suggestion.vue';
  import sex from '@/components/questions/sex.vue'; 
  import health from '@/components/questions/health.vue';
  import skin from '@/components/questions/skin.vue';
  import diet from '@/components/questions/diet.vue';
f7979ec1a   Neeraj Sharma   add seach in heal...
36
  import AppToolbar from '@/components/AppToolbar';
04e3fbc56   Jatinder Singh   minor fix
37
  export default {
c17e4f0cd   Jatinder Singh   question changes
38
39
40
41
42
43
    components: {
      'suggestion': suggestion,
      'sex': sex,
      'health': health,
      'skin': skin,
      'diet': diet,
f7979ec1a   Neeraj Sharma   add seach in heal...
44
       AppToolbar,
c17e4f0cd   Jatinder Singh   question changes
45
    },
04e3fbc56   Jatinder Singh   minor fix
46
    data: () => ({
c17e4f0cd   Jatinder Singh   question changes
47
48
49
50
51
52
      component: 'suggestion',
      isActivebtn: true,
      Activebtn1: false,
      Activebtn2: false,
      Activebtn3: false,
      Activebtn4: false,
04e3fbc56   Jatinder Singh   minor fix
53
    }),
04e3fbc56   Jatinder Singh   minor fix
54
    methods: {
c17e4f0cd   Jatinder Singh   question changes
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
      activebtn (type) {
        switch (type) {
          case 'existing':
            this.Activebtn4 = false;
            this.Activebtn3 = false;
            this.Activebtn2 = false;
            this.Activebtn1 = false;
            this.isActivebtn = true;
            break;
          case 'new':
            this.Activebtn4 = false;
            this.Activebtn3 = false;
            this.Activebtn2 = false;
            this.Activebtn1 = true;
            this.isActivebtn = false;
            break;
          case 'new1':
            this.Activebtn4 = false;
            this.Activebtn3 = false;
            this.Activebtn2 = true;
            this.Activebtn1 = false;
            this.isActivebtn = false;
            break;
          case 'new2':
            this.Activebtn4 = false;
            this.Activebtn3 = true;
            this.Activebtn2 = false;
            this.Activebtn1 = false;
            this.isActivebtn = false;
            break;
          default:
            this.Activebtn4 = true;
            this.Activebtn3 = false;
            this.Activebtn2 = false;
            this.Activebtn1 = false;
            this.isActivebtn = false;
            break;
04e3fbc56   Jatinder Singh   minor fix
92
        }
04e3fbc56   Jatinder Singh   minor fix
93
      },
c17e4f0cd   Jatinder Singh   question changes
94
    }
04e3fbc56   Jatinder Singh   minor fix
95
  };
269061695   Jatinder Singh   changes
96
  </script>
c17e4f0cd   Jatinder Singh   question changes
97
  <style scoped>
7e8044568   Jatinder Singh   table header changes
98
  #td{
269061695   Jatinder Singh   changes
99
100
      border: 1px solid #dddddd;
      text-align: left;
8fc85e8ec   Jatinder Singh   data table changes
101
      padding: 8px;
c17e4f0cd   Jatinder Singh   question changes
102
103
104
  }
  .activebtn {
    color: black !important;
269061695   Jatinder Singh   changes
105
106
  }
  </style>