From daf65c13eef443c0272566b6697f115262cc6dd0 Mon Sep 17 00:00:00 2001 From: ademsuslu Date: Thu, 21 Nov 2024 02:01:36 +0300 Subject: [PATCH] feat:muktiple select add for task form --- app/(dashboard)/bussines/personal/page.tsx | 3 + components/app-sidebar.tsx | 85 ++--- components/icons.tsx | 37 ++ components/shared/DataTablePersonal.tsx | 2 +- components/shared/forms/task/task-form.tsx | 332 ++++++++++++++++++ components/ui/badge.tsx | 36 ++ components/ui/command.tsx | 152 +++++++++ components/ui/multi-select.tsx | 380 +++++++++++++++++++++ package-lock.json | 361 ++++++++++++++++++++ package.json | 1 + 10 files changed, 1338 insertions(+), 51 deletions(-) create mode 100644 components/icons.tsx create mode 100644 components/shared/forms/task/task-form.tsx create mode 100644 components/ui/badge.tsx create mode 100644 components/ui/command.tsx create mode 100644 components/ui/multi-select.tsx diff --git a/app/(dashboard)/bussines/personal/page.tsx b/app/(dashboard)/bussines/personal/page.tsx index d7550c8..bc533e2 100644 --- a/app/(dashboard)/bussines/personal/page.tsx +++ b/app/(dashboard)/bussines/personal/page.tsx @@ -1,4 +1,5 @@ import DataTablePersonal from "@/components/shared/DataTablePersonal" +import { TaskCreate } from "@/components/shared/forms/task/task-form" export default async function Employee() { const response = await fetch(`${'https://crm-backend-production-e80f.up.railway.app/api'}/employees`,{ @@ -7,5 +8,7 @@ export default async function Employee() { const data = await response.json() return
+ +
} \ No newline at end of file diff --git a/components/app-sidebar.tsx b/components/app-sidebar.tsx index a89417b..e6bfacf 100644 --- a/components/app-sidebar.tsx +++ b/components/app-sidebar.tsx @@ -12,7 +12,7 @@ import { SidebarGroup, SidebarGroupContent, SidebarGroupLabel, - + SidebarHeader, SidebarMenu, SidebarMenuButton, @@ -30,7 +30,7 @@ import Link from "next/link" const data = { versions: ["1.0.1", "1.1.0-alpha", "2.0.0-beta1"], navMain: [ - + { title: "Home", url: "/dashboard", @@ -93,47 +93,32 @@ const data = { { title: "Reminders", url: "/customer/reminder", - isActive:false + isActive: false }, { title: "Create", url: "/customer/create", - isActive:false + isActive: false }, - + ], }, { title: "Bussines", url: "/bussines", items: [ - { - title: "Personal", - url: "/bussines/personal", - isActive:false, - }, - { - title: "Create tasks", - url: "/bussines/create-task", - isActive:false, - }, - // { - // title: "Fast Refresh", - // url: "#", - // }, - // { - // title: "Next.js Compiler", - // url: "#", - // }, - // { - // title: "Supported Browsers", - // url: "#", - // }, - // { - // title: "Turbopack", - // url: "#", - // }, - ], + { + title: "Personal", + url: "/bussines/personal", + isActive: false, + }, + { + title: "Create tasks", + url: "/bussines/create-task", + isActive: false, + }, + + ], }, { title: "Opportunity", @@ -161,9 +146,9 @@ const data = { // }, // ], }, - { - title: "Settings", - url: "/settings", + { + title: "Settings", + url: "/settings", // items: [ // { // title: "Installation", @@ -174,7 +159,7 @@ const data = { // url: "#", // }, // ], - }, + }, ], } @@ -188,7 +173,7 @@ export function AppSidebar({ ...props }: React.ComponentProps) { /> */} - + @@ -206,9 +191,9 @@ export function AppSidebar({ ...props }: React.ComponentProps) { className="group/label text-sm text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground" > - - {item.title} - + + {item.title} + @@ -216,17 +201,17 @@ export function AppSidebar({ ...props }: React.ComponentProps) { {item?.items?.map((item) => { - - return - - - - {item.title} - - - + + return + + + + {item.title} + + + } - )} + )} diff --git a/components/icons.tsx b/components/icons.tsx new file mode 100644 index 0000000..c7de22b --- /dev/null +++ b/components/icons.tsx @@ -0,0 +1,37 @@ +import { + MoonIcon, + SunMedium, + LucideProps, + Cat, + Dog, + Fish, + Rabbit, + Turtle, + } from "lucide-react"; + + export const Icons = { + moonIcon: MoonIcon, + sunIcon: SunMedium, + cat: Cat, + dog: Dog, + fish: Fish, + rabbit: Rabbit, + turtle: Turtle, + gitHub: ({ ...props }: LucideProps) => ( + + ), + }; \ No newline at end of file diff --git a/components/shared/DataTablePersonal.tsx b/components/shared/DataTablePersonal.tsx index 90aa714..fab027e 100644 --- a/components/shared/DataTablePersonal.tsx +++ b/components/shared/DataTablePersonal.tsx @@ -217,7 +217,7 @@ const DataTablePersonal: React.FC = ({ data }) => {