From 7768214b9e542127d26a034fc4bdb821c229dfc5 Mon Sep 17 00:00:00 2001
From: NithyaSanthanam <nithya.s@matriotsolutions.com>
Date: Thu, 16 Sep 2021 16:46:41 +0530
Subject: [PATCH] TMSS-1005: Addd WeekView in Sidebar and made Weekview as
 default start page

---
 SAS/TMSS/frontend/tmss_webapp/src/App.js                 | 9 ++++++++-
 SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_menu.scss | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/SAS/TMSS/frontend/tmss_webapp/src/App.js b/SAS/TMSS/frontend/tmss_webapp/src/App.js
index 5d09a9b26f6..0d96a80d336 100644
--- a/SAS/TMSS/frontend/tmss_webapp/src/App.js
+++ b/SAS/TMSS/frontend/tmss_webapp/src/App.js
@@ -49,7 +49,7 @@ class App extends Component {
         mobileMenuActive: localStorage.getItem('mobileMenuActive') === 'true' ? true : false,
         authenticated: true,
         findObjectPlaceholder: 'Sub Task',
-        redirect: window.location.pathname,
+        redirect: window.location.pathname === '/'? '/su/timelineview/week': window.location.pathname,
         isLogin: true
         };
         this.onWrapperClick = this.onWrapperClick.bind(this);
@@ -68,6 +68,7 @@ class App extends Component {
         {label: 'Scheduling Units', icon: 'pi pi-fw pi-calendar', to:'/schedulingunit',section: 'schedulingunit'},
         {label: 'Tasks', icon: 'pi pi-fw pi-check-square', to:'/task'},
         {label: 'Workflow', icon: 'pi pi-sitemap', to:'/su/workflow',section: 'workflow'},
+        {label: 'Week View', icon: 'fab fa fa-calendar-alt', to:'/su/timelineview/week',section: 'su/timelineview/week'},
         {label: 'Timeline', icon: 'pi pi-fw pi-clock', to:'/su/timelineview',section: 'su/timelineview'},
         {label: 'Reports', icon: 'pi pi-fw pi-chart-bar', to:'/reports',section: 'reports'},
     ];
@@ -183,6 +184,12 @@ class App extends Component {
         };
     }
 
+    componentDidUpdate(prevProps, prevState) {
+        if(window.location.pathname === '/'){
+            this.setState({redirect : '/su/timelineview/week'})
+        }
+    }
+
     onBackButtonEvent = (e) => {
         e.preventDefault();
         if (this.state.isEditDirty) {
diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_menu.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_menu.scss
index 6942fe6836f..df584fde615 100644
--- a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_menu.scss
+++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_menu.scss
@@ -18,6 +18,7 @@
             i {
                 font-size: 18px;
                 vertical-align: middle;
+                font-weight:lighter;
             }
 
             span {
-- 
GitLab