From 8d7d17933c7ddf574236c194a33bedec0c0935a7 Mon Sep 17 00:00:00 2001 From: saschrad <saschrad@stud.ntnu.no> Date: Fri, 6 May 2022 10:25:30 +0200 Subject: [PATCH] Added redirect --- src/components/RentingComponents/ItemInfo.vue | 1 + src/components/RentingComponents/NewRent.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/RentingComponents/ItemInfo.vue b/src/components/RentingComponents/ItemInfo.vue index 33e0d65..beee721 100644 --- a/src/components/RentingComponents/ItemInfo.vue +++ b/src/components/RentingComponents/ItemInfo.vue @@ -161,6 +161,7 @@ export default { this.pushItem.toTime = this.rentingEndDate; this.pushItem.title = this.item.title; this.pushItem.price = this.totPrice; + this.pushItem.renterId = this.item.userID; }, async getItem() { let id = this.$router.currentRoute.value.params.id; diff --git a/src/components/RentingComponents/NewRent.vue b/src/components/RentingComponents/NewRent.vue index 7ced0d6..7134d12 100644 --- a/src/components/RentingComponents/NewRent.vue +++ b/src/components/RentingComponents/NewRent.vue @@ -151,7 +151,7 @@ export default { this.$router.go(0); }, routeToHome() { - this.$router.push("/"); + this.$router.push("/messages?userID=" + this.newRentBox.renterId); }, sendRent: async function () { const rent = { -- GitLab