Skip to content
Snippets Groups Projects
Commit 7c857b35 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

feat: Redirect to crop category only if not selected

parent edb2b172
Branches
No related tags found
No related merge requests found
......@@ -123,7 +123,6 @@
methods: {
/** Get user details from local storage */
getUserFromStorage() {
let strUser = localStorage.getItem(CommonUtil.CONST_STORAGE_USER_DETAIL);
if (strUser && strUser != 'undefined') {
let user = JSON.parse(strUser);
......@@ -135,7 +134,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) {
const cropCategorySelected = localStorage.getItem(CommonUtil.CONST_STORAGE_CROP_ID_LIST) !== null;
if(this.$root.sharedState.uuid && !cropCategorySelected) {
this.$router.push("/cropCategory");
}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment