fix : redirect after change password

This commit is contained in:
zeinab.ashrafi
2025-05-07 14:26:33 +03:30
parent ae28fe2042
commit 4a15071d17
2 changed files with 7 additions and 5 deletions
+2 -4
View File
@@ -12,7 +12,7 @@
v-model="form.code"
label="Verify Code Number"
color="black"
></v-text-field>
/>
</v-flex>
</v-layout>
<v-layout row wrap class="px-3">
@@ -40,9 +40,7 @@ export default {
};
},
methods: {
...mapActions('auth', [
'verifyCodeSMS'
]),
...mapActions('auth', ['verifyCodeSMS']),
submitVerifyCode() {
if (this.form.code != '') {
this.verifyCodeSMS({form: this.form});
+5 -1
View File
@@ -50,7 +50,11 @@ export default {
var response = await ApiService.post(urls.changePassword, form);
if(response && response.status == 200 ) {
commit('modal/closeModal', {}, {root: true});
router.push({ name: `Dashboard` });
// router.push({ name: `Dashboard` });
const redirectPath = router.history.current.query.redirect || '/';
if (router.currentRoute.path !== redirectPath) {
router.push(redirectPath);
}
}
},