From 1f16faf5f2776e68cb0796aec708b363153f5bff Mon Sep 17 00:00:00 2001
From: lewa <lene.wasskog@nibio.no>
Date: Mon, 29 Apr 2024 11:25:02 +0200
Subject: [PATCH] feat: Redirect to crop category selection after login

---
 src/components/LoginSystem.vue | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/components/LoginSystem.vue b/src/components/LoginSystem.vue
index 24b4afb..246a695 100644
--- a/src/components/LoginSystem.vue
+++ b/src/components/LoginSystem.vue
@@ -135,9 +135,8 @@
 					this.userLoggedInName = this.$root.sharedState.user.firstName + " " + this.$root.sharedState.user.lastName;
 				}
 				/** Show the observation list instead of welcome page if user is logged in */
-				if(this.$root.sharedState.uuid)
-				{
-					this.$router.push("/");
+				if(this.$root.sharedState.uuid) {
+					this.$router.push("/cropCategory");
 				}
 			},
 
@@ -241,8 +240,8 @@
 										this.$refs.Sync.isSyncOnewayNeeded(loggedUser);
 										this.$refs.Sync.syncTwoWayAtLogin();
 										localStorage.setItem(CommonUtil.CONST_STORAGE_UUID, uuid);
-                    if (this.$router.currentRoute.path != "/") {
-											this.$router.push('/')
+                    if (this.$router.currentRoute.path !== "/cropCategory") {
+                      this.$router.push("/cropCategory");
 										}
 									}
 
-- 
GitLab