From 0cf5440e48b8a4c82fb087148ed355590c221f17 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 24 Oct 2019 17:19:22 +0530 Subject: [PATCH] fix: Focus first item on sidebar group click --- src/components/Sidebar.vue | 25 ++++++++++++------------- src/sidebarConfig.js | 7 +++++++ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index dcfe6e3c..db307128 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -9,20 +9,20 @@
{{ companyName }}
-
-
- +
+
+
- {{ group.title }} -
+ >{{ group.title }}
diff --git a/src/sidebarConfig.js b/src/sidebarConfig.js index 3fbfeb9b..cc7c36e3 100644 --- a/src/sidebarConfig.js +++ b/src/sidebarConfig.js @@ -7,6 +7,7 @@ import PurchasesIcon from './components/Icons/Purchases'; import ReportsIcon from './components/Icons/Reports'; import SettingsIcon from './components/Icons/Settings'; import theme from '@/theme'; +import router from './router'; const config = { getTitle: async () => { @@ -40,6 +41,9 @@ const config = { { title: _('Sales'), icon: SalesIcon, + action() { + router.push('/list/SalesInvoice') + }, items: [ { label: _('Invoice'), @@ -62,6 +66,9 @@ const config = { { title: _('Purchases'), icon: PurchasesIcon, + action() { + router.push('/list/PurchaseInvoice') + }, items: [ { label: _('Bill'),