sajjad 3 years ago
parent 1ef558c880
commit d61c86dd1c

@ -23,9 +23,9 @@ export default class AuthRepository {
return response.data; return response.data;
} }
} }
async forgetPassword(data) { async forgotPassword(data) {
let json = setData(data); let json = setData(data);
let response = await axios.post(url("forgetPassword"), json); let response = await axios.post(url("forgotPassword"), json);
return getJson(response.data.data) return getJson(response.data.data)
} }
async resetPassword(data) { async resetPassword(data) {

@ -72,7 +72,8 @@ export default {
id: 4, id: 4,
text: "programs", text: "programs",
link: "programs", link: "programs",
active: this.$route.name === "programs", active:
this.$route.name === "programs" || this.$route.name === "addProgram",
}, },
{ {
id: 5, id: 5,
@ -84,13 +85,14 @@ export default {
id: 6, id: 6,
text: "products", text: "products",
link: "products", link: "products",
active: this.$route.name === "products", active: this.$route.name === "products" || this.$route.name === "addProduct",
}, },
{ {
id: 7, id: 7,
text: "workouts", text: "workouts",
link: "workouts", link: "workouts",
active: this.$route.name === "workouts", active:
this.$route.name === "workouts" || this.$route.name === "addWorkout",
}, },
]) ])
: this.type === "trainer" : this.type === "trainer"

@ -4,7 +4,7 @@ const urls = {
// authentication // authentication
login: "auth/login", login: "auth/login",
register: "auth/register", register: "auth/register",
forgetPassword: "auth/forget-password", forgotPassword: "auth/forget-password",
logout: "auth/logout", logout: "auth/logout",
// programs // programs
indexProgram: "admin/courses", indexProgram: "admin/courses",

@ -9,13 +9,11 @@
<auth-basic text="we're here to help"> <auth-basic text="we're here to help">
<template #auth> <template #auth>
<v-col cols="6" class="px-10 pt-4"> <v-col cols="6" class="px-10 pt-4">
<div class="text-uppercase wa__f__ta auth__title"> <div class="text-uppercase wa__f__ta auth__title">forgot password</div>
forgot password
</div>
<div class="auth__subtitle text-uppercase mb-2"> <div class="auth__subtitle text-uppercase mb-2">
please provide us this information please provide us this information
</div> </div>
<form> <v-form @submit.prevent="forgotPassword">
<v-row> <v-row>
<v-col cols="12"> <v-col cols="12">
<v-text-field <v-text-field
@ -35,7 +33,7 @@
height="25" height="25"
:text-mode="true" :text-mode="true"
text="send the code" text="send the code"
@click.native="resetPassword" type="submit"
/> />
</v-col> </v-col>
<v-col cols="12" class="pt-0"> <v-col cols="12" class="pt-0">
@ -51,7 +49,7 @@
</div> </div>
</v-col> </v-col>
</v-row> </v-row>
</form> </v-form>
</v-col> </v-col>
</template> </template>
</auth-basic> </auth-basic>
@ -74,9 +72,10 @@ export default {
form: {}, form: {},
}), }),
methods: { methods: {
async resetPassword() { async forgotPassword() {
let repository = new AuthRepository(); let repository = new AuthRepository();
await repository.resetPassword(this.form); await repository.forgotPassword(this.form);
this.$router.push({ name: "login" });
}, },
}, },
}; };

Loading…
Cancel
Save