sajjad 3 years ago
parent 1ef558c880
commit d61c86dd1c

@ -23,9 +23,9 @@ export default class AuthRepository {
return response.data;
}
}
async forgetPassword(data) {
async forgotPassword(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)
}
async resetPassword(data) {

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

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

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

Loading…
Cancel
Save