Blame view

src/pages/forgetpassword.vue 3.33 KB
93a68cfa1   Jatinder Singh   first commit
1
2
  <template>
    <v-app id="login">
07095d4d8   Jatinder Singh   regex
3
      <v-toolbar color="grey lighten">
93a68cfa1   Jatinder Singh   first commit
4
        <v-toolbar-items>
07095d4d8   Jatinder Singh   regex
5
         <img src="/static/ana@2x.png" height="36" alt="ana" />
93a68cfa1   Jatinder Singh   first commit
6
7
8
9
10
      </v-toolbar-items>
    </v-toolbar>
      <v-content>
        <v-container fluid fill-height>
          <v-layout align-center justify-center>
04e3fbc56   Jatinder Singh   minor fix
11
            <v-flex xs12 sm8 md6 lg6>
7e8044568   Jatinder Singh   table header changes
12
13
            <v-toolbar color="black" dark>
            <v-spacer></v-spacer>
93a68cfa1   Jatinder Singh   first commit
14
15
16
17
18
            
            <v-toolbar-title>Forget Password</v-toolbar-title>
            <v-spacer></v-spacer>
            
          </v-toolbar>
04e3fbc56   Jatinder Singh   minor fix
19
              <v-card class="elevation-1 pa-1">
93a68cfa1   Jatinder Singh   first commit
20
                <v-card-text>
07095d4d8   Jatinder Singh   regex
21
                 
04e3fbc56   Jatinder Singh   minor fix
22
23
                  <h5 class="text-md-center"> Not to Worry! Enter to your registered Email ID. </h5>
                  <h5 class="text-md-center"> We'll send you a reset.</h5>
7e8044568   Jatinder Singh   table header changes
24
                  <v-flex xs12 sm8 md6 lg6 offset-xs3>                           
4413a8d93   Jatinder Singh   changes
25
26
                  <v-form class="mt-4">
                  <div class="custom-input-align">
7e8044568   Jatinder Singh   table header changes
27
                  <v-text-field 
4413a8d93   Jatinder Singh   changes
28
29
                    class="text-md-center"
                    v-validate="'required|email'" 
c1fd43e24   Jatinder Singh   changes
30
                    v-model="userForgotPasswordcredentials.email" 
4413a8d93   Jatinder Singh   changes
31
32
33
                    :error-messages="errors.collect('email')" 
                    label="Enter Your email ID" 
                    data-vv-name="email" 
7e8044568   Jatinder Singh   table header changes
34
35
                    required>
                  </v-text-field>
4413a8d93   Jatinder Singh   changes
36
                  </div>
93a68cfa1   Jatinder Singh   first commit
37
                    
7e8044568   Jatinder Singh   table header changes
38
                </v-form></v-flex>
93a68cfa1   Jatinder Singh   first commit
39
40
                </v-card-text>
                <v-card-actions>
07095d4d8   Jatinder Singh   regex
41
                
93a68cfa1   Jatinder Singh   first commit
42
43
44
  
                  
                  <v-flex text-sm-center>
7e8044568   Jatinder Singh   table header changes
45
                    
e173bab21   Jatinder Singh   api
46
                  <v-btn round class="mt-1" color="black" dark large @click="reset">Send Request</v-btn></v-flex>
93a68cfa1   Jatinder Singh   first commit
47
                  </v-card-actions>
04e3fbc56   Jatinder Singh   minor fix
48
49
50
51
52
53
54
55
56
                  <v-snackbar
                   :timeout="timeout"
                   v-model="snackbar"
                   color="green"
                    >
                   {{ text }}
                <v-icon
                 flat
                 @click="snackbar = false"
7e8044568   Jatinder Singh   table header changes
57
                >
04e3fbc56   Jatinder Singh   minor fix
58
                close
7e8044568   Jatinder Singh   table header changes
59
60
                </v-icon>
                </v-snackbar>
93a68cfa1   Jatinder Singh   first commit
61
62
63
64
65
              </v-card>
            </v-flex>
          </v-layout>
        </v-container>
      </v-content>
04e3fbc56   Jatinder Singh   minor fix
66
    <v-footer class="pa-4" color="grey darken-2">
93a68cfa1   Jatinder Singh   first commit
67
68
69
70
71
    
    </v-footer>
    </v-app>
  </template>
  <script>
e173bab21   Jatinder Singh   api
72
  import axios from 'axios';
93a68cfa1   Jatinder Singh   first commit
73
74
  export default {
    data: () => ({
b34ed827a   Jatinder Singh   changes
75
      userForgotPasswordcredentials: {},
04e3fbc56   Jatinder Singh   minor fix
76
77
78
      text: 'Link send to your Email address',
      snackbar: false,
      timeout: 1000,
93a68cfa1   Jatinder Singh   first commit
79
      loading: false,
04e3fbc56   Jatinder Singh   minor fix
80
      email: ''
93a68cfa1   Jatinder Singh   first commit
81
82
83
    }),
  
    methods: {
e173bab21   Jatinder Singh   api
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
      reset () {
        var userdata = {
          "email":this.userForgotPasswordcredentials.email,
        }
        axios.post('http://18.208.28.55:3000/v1/adminForgotPassword',userdata)
          .then(response => {
              window.localStorage.setItem("value1", true);
            console.log("response=====>",response.data.data);
         }).catch(err => {
             console.log("err====>",err);
         })
      //  console.log('=clicked==', this.userForgotPasswordcredentials);
      //   this.loading = true;
      //   this.snackbar = true;
      //   setTimeout(() => {
      //     this.$router.push('/');
      //   }, 1000);
93a68cfa1   Jatinder Singh   first commit
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
      }
    }
  
  };
  </script>
  <style scoped lang="css">
    #login {
      height: 50%;
      width: 100%;
      position: absolute;
      top: 0;
      left: 0;
      content: "";
      z-index: 0;
    }
04e3fbc56   Jatinder Singh   minor fix
116
117
118
119
120
121
122
123
  img{
  position:absolute;
  top:13px;
  left:50px;
  }
  .v-btn--large {
      padding: 0px 74px;
  }
93a68cfa1   Jatinder Singh   first commit
124
  </style>