From 4110081df9b392d190d53fd73ebd1550450fcb7e Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 8 Jan 2026 12:26:11 +0000 Subject: [PATCH] Auto commit: 2026-01-08T12:26:11.799Z --- frontend/src/menuAside.ts | 15 ++++- frontend/src/pages/leads/kanban.tsx | 64 +++++++++++++++++++ .../pages/leads/{leads-list.tsx => list.tsx} | 2 +- 3 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 frontend/src/pages/leads/kanban.tsx rename frontend/src/pages/leads/{leads-list.tsx => list.tsx} (98%) 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 ( + <> + + {getPageTitle('Leads Kanban')} + + + + {''} + + + + {hasCreatePermission && } +
+ Switch to List +
+
+ + +
+ + ) +} + +LeadsKanbanPage.getLayout = function getLayout(page: ReactElement) { + return {page} +} + +export default LeadsKanbanPage diff --git a/frontend/src/pages/leads/leads-list.tsx b/frontend/src/pages/leads/list.tsx similarity index 98% rename from frontend/src/pages/leads/leads-list.tsx rename to frontend/src/pages/leads/list.tsx index 1f0e07e..53df185 100644 --- a/frontend/src/pages/leads/leads-list.tsx +++ b/frontend/src/pages/leads/list.tsx @@ -117,7 +117,7 @@ const LeadsTablesPage = () => {
- Switch to Table + Switch to Kanban