From 0e488855219d8dac76debbc0b33d6c39940bb2ae Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Sat, 26 Aug 2023 13:05:58 +0530 Subject: [PATCH] fix: added notes list and added in sidebar --- frappe-ui | 2 +- frontend/src/components/AppSidebar.vue | 6 ++ frontend/src/components/ListRowItem.vue | 19 ++++- frontend/src/pages/Notes.vue | 101 ++++++++++++++++++++++++ frontend/src/router.js | 5 ++ frontend/src/utils.js | 6 ++ 6 files changed, 136 insertions(+), 3 deletions(-) create mode 100644 frontend/src/pages/Notes.vue diff --git a/frappe-ui b/frappe-ui index 4f618ce2..91670575 160000 --- a/frappe-ui +++ b/frappe-ui @@ -1 +1 @@ -Subproject commit 4f618ce26fac8f32596a33d722ad79f415288567 +Subproject commit 9167057574f2650e83360beb05ae25f0b6478211 diff --git a/frontend/src/components/AppSidebar.vue b/frontend/src/components/AppSidebar.vue index de33b2ee..4076c6da 100644 --- a/frontend/src/components/AppSidebar.vue +++ b/frontend/src/components/AppSidebar.vue @@ -36,6 +36,7 @@ import LeadsIcon from '@/components/Icons/LeadsIcon.vue' import DealsIcon from '@/components/Icons/DealsIcon.vue' import ContactsIcon from '@/components/Icons/ContactsIcon.vue' import InboxIcon from '@/components/Icons/InboxIcon.vue' +import NoteIcon from '@/components/Icons/NoteIcon.vue' import DashboardIcon from '@/components/Icons/DashboardIcon.vue' import NavLinks from '@/components/NavLinks.vue' @@ -60,6 +61,11 @@ const navigations = [ icon: ContactsIcon, route: { name: 'Contacts' }, }, + { + name: 'Notes', + icon: NoteIcon, + route: { name: 'Notes' }, + }, { name: 'Dashboard', icon: DashboardIcon, diff --git a/frontend/src/components/ListRowItem.vue b/frontend/src/components/ListRowItem.vue index 5469c570..553101ad 100644 --- a/frontend/src/components/ListRowItem.vue +++ b/frontend/src/components/ListRowItem.vue @@ -1,5 +1,9 @@ diff --git a/frontend/src/pages/Notes.vue b/frontend/src/pages/Notes.vue new file mode 100644 index 00000000..1726f86d --- /dev/null +++ b/frontend/src/pages/Notes.vue @@ -0,0 +1,101 @@ + + + diff --git a/frontend/src/router.js b/frontend/src/router.js index 3d9c5758..92b84f89 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -34,6 +34,11 @@ const routes = [ name: 'Inbox', component: () => import('@/pages/Inbox.vue'), }, + { + path: '/notes', + name: 'Notes', + component: () => import('@/pages/Notes.vue'), + }, { path: '/contacts', name: 'Contacts', diff --git a/frontend/src/utils.js b/frontend/src/utils.js index 3e93f980..22ff8fcc 100644 --- a/frontend/src/utils.js +++ b/frontend/src/utils.js @@ -93,3 +93,9 @@ export function statusDropdownOptions(data, doctype) { export function openWebsite(url) { window.open(url, '_blank') } + +export function htmlToText(html) { + const div = document.createElement('div') + div.innerHTML = html + return div.textContent || div.innerText || '' +}