diff --git a/frontend/src/menuAside.ts b/frontend/src/menuAside.ts index 392484d..c358a51 100644 --- a/frontend/src/menuAside.ts +++ b/frontend/src/menuAside.ts @@ -33,12 +33,23 @@ const menuAside: MenuAsideItem[] = [ permissions: 'READ_PERMISSIONS' }, { - href: '/leads/leads-list', label: 'Leads', // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore icon: 'mdiAccountMultiple' in icon ? icon['mdiAccountMultiple' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable, - permissions: 'READ_LEADS' + permissions: 'READ_LEADS', + menu: [ + { + href: '/leads/list', + label: 'Leads List', + permissions: 'READ_LEADS', + }, + { + href: '/leads/kanban', + label: 'Kanban', + permissions: 'READ_LEADS', + }, + ], }, { href: '/projects/projects-list', diff --git a/frontend/src/pages/leads/kanban.tsx b/frontend/src/pages/leads/kanban.tsx new file mode 100644 index 0000000..82e0010 --- /dev/null +++ b/frontend/src/pages/leads/kanban.tsx @@ -0,0 +1,64 @@ +import { mdiChartTimelineVariant } from '@mdi/js' +import Head from 'next/head' +import React, { ReactElement } from 'react' +import CardBox from '../../components/CardBox' +import LayoutAuthenticated from '../../layouts/Authenticated' +import SectionMain from '../../components/SectionMain' +import SectionTitleLineWithButton from '../../components/SectionTitleLineWithButton' +import { getPageTitle } from '../../config' +import BaseButton from '../../components/BaseButton' +import { useAppSelector } from '../../stores/hooks' +import { hasPermission } from '../../helpers/userPermissions' +import KanbanBoard from '../../components/KanbanBoard/KanbanBoard' +import Link from 'next/link' +import { deleteItem, update } from '../../stores/leads/leadsSlice' + +const LeadsKanbanPage = () => { + const { currentUser } = useAppSelector((state) => state.auth) + const hasCreatePermission = currentUser && hasPermission(currentUser, 'CREATE_LEADS') + + const columns = [ + { id: 'New', label: 'New' }, + { id: 'Contacted', label: 'Contacted' }, + { id: 'Qualified', label: 'Qualified' }, + { id: 'Proposal', label: 'Proposal' }, + { id: 'Converted', label: 'Converted' }, + { id: 'Lost', label: 'Lost' }, + ] + + return ( + <> +
+