diff --git a/LibraryTrackingApp/src/frontend/constants/adminSidebarItems.jsx b/LibraryTrackingApp/src/frontend/constants/adminSidebarItems.jsx
index 71a7d31..550977d 100644
--- a/LibraryTrackingApp/src/frontend/constants/adminSidebarItems.jsx
+++ b/LibraryTrackingApp/src/frontend/constants/adminSidebarItems.jsx
@@ -1,6 +1,8 @@
import { BsBook, BsBuilding, BsPeople } from "react-icons/bs";
import { FiHome, FiSettings } from "react-icons/fi";
import { BiSupport } from "react-icons/bi";
+import { IoCreateOutline } from "react-icons/io5";
+import { CiBoxList } from "react-icons/ci";
export const adminSidebarItems = [
{
@@ -13,6 +15,9 @@ export const adminSidebarItems = [
title: "Kullanıcı Yönetimi",
icon: ,
href: "/admin/users",
+ subItems: [
+
+ ],
target: "_self",
},
{
diff --git a/LibraryTrackingApp/src/frontend/constants/appSidebarItems.jsx b/LibraryTrackingApp/src/frontend/constants/appSidebarItems.jsx
new file mode 100644
index 0000000..35510b1
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/constants/appSidebarItems.jsx
@@ -0,0 +1,301 @@
+import {
+ FiHome,
+ FiSettings,
+ FiLogOut,
+ FiBook,
+ FiHelpCircle,
+} from "react-icons/fi";
+import {
+ BsArrowLeftRight,
+ BsBook,
+ BsBuilding,
+ BsPeople,
+ BsPeopleFill,
+ BsPerson,
+ BsTagFill,
+} from "react-icons/bs";
+import { FaBookOpen } from "react-icons/fa";
+import { BsFileEarmarkText, BsFillMicFill, BsNewspaper } from "react-icons/bs";
+import { FaGraduationCap } from "react-icons/fa";
+
+import { BiSupport } from "react-icons/bi";
+import { IoCreateOutline } from "react-icons/io5";
+
+import { CiBoxList } from "react-icons/ci";
+
+export const sidebarItems = [
+ {
+ title: "Ana Sayfa",
+ icon: ,
+ href: "/app",
+ target: "_self",
+ subItems: [],
+ },
+ {
+ title: "Kütüphane Yönetimi",
+ icon: ,
+ href: null,
+ target: "_self",
+ subItems: [
+ {
+ icon: ,
+ title: "Yeni Ekle",
+ href: "/app/library/new",
+ target: "_self",
+ },
+ {
+ icon: ,
+ title: "Listele",
+ href: "/app/library",
+ target: "_self",
+ },
+ ],
+ },
+ {
+ title: "Yazar Yönetimi",
+ icon: ,
+ href: null,
+ target: "_self",
+ subItems: [
+ {
+ icon: ,
+ title: "Yeni Ekle",
+ href: "/app/author/new",
+ target: "_self",
+ },
+ {
+ icon: ,
+ title: "Listele",
+ href: "/app/author",
+ target: "_self",
+ },
+ ],
+ },
+ {
+ title: "Eser Kataloğu",
+ icon: ,
+ href: null,
+ target: "_self",
+ subItems: [
+ {
+ icon: ,
+ title: "Yeni Ekle",
+ href: "/app/work-catalog/new",
+ target: "_self",
+ },
+ {
+ icon: ,
+ title: "Listele",
+ href: "/app/work-catalog",
+ target: "_self",
+ },
+ ],
+ },
+ {
+ title: "Eser Envanter",
+ icon: ,
+ href: null,
+ target: "_self",
+ subItems: [
+ {
+ title: "Basılı Kitap",
+ icon: ,
+ href: "/app/printed-books",
+ target: "_self",
+ },
+ {
+ title: "E-Kitap",
+ icon: ,
+ href: "/app/e-books",
+ target: "_self",
+ },
+ {
+ title: "Sesli Kitap",
+ icon: ,
+ href: "/app/audio-books",
+ target: "_self",
+ },
+ {
+ title: "Dergi",
+ icon: ,
+ href: "/app/magazines",
+ target: "_self",
+ },
+ {
+ title: "Tez",
+ icon: ,
+ href: "/app/thesis",
+ target: "_self",
+ },
+ ],
+ },
+ {
+ title: "Tür Yönetimi",
+ icon: ,
+ href: null,
+ target: "_self",
+ subItems: [
+ {
+ icon: ,
+ title: "Yeni Ekle",
+ href: "/app/genre/new",
+ target: "_self",
+ },
+ {
+ icon: ,
+ title: "Listele",
+ href: "/app/genre",
+ target: "_self",
+ },
+ ],
+ },
+ {
+ title: "Üye Yönetimi",
+ icon: ,
+ href: "/app/members",
+ target: "_self",
+ subItems: [
+ {
+ icon: ,
+ title: "Yeni Ekle",
+ href: "/app/members/new",
+ target: "_self",
+ },
+ {
+ icon: ,
+ title: "Listele",
+ href: "/app/members",
+ target: "_self",
+ },
+ ],
+ },
+ {
+ title: "Personel Yönetimi",
+ icon: ,
+ href: "/app/staff",
+ target: "_self",
+ subItems: [
+ {
+ icon: ,
+ title: "Yeni Ekle",
+ href: "/app/staff/new",
+ target: "_self",
+ },
+ {
+ icon: ,
+ title: "Listele",
+ href: "/app/staff",
+ target: "_self",
+ },
+ ],
+ },
+ {
+ title: "Ödünç Kitap Yönetimi",
+ icon: ,
+ href: null,
+ target: "_self",
+ subItems: [
+ {
+ icon: ,
+ title: "Ödünç Ver",
+ href: "/app/borrow/give",
+ target: "_self",
+ },
+ {
+ icon: ,
+ title: "İade Al/Teslim Al",
+ href: "/app/borrow/return",
+ target: "_self",
+ },
+ {
+ icon: ,
+ title: "Ödünç Kitapları Listele",
+ href: "/app/borrow",
+ target: "_self",
+ },
+ ],
+ },
+ {
+ title: "Kitap Etiket Yönetimi",
+ icon: ,
+ href: null,
+ target: "_self",
+ subItems: [
+ {
+ icon: ,
+ title: "Ödünç Ver",
+ href: 'book-tag/new',
+ target: "_self",
+ },
+ {
+ icon: ,
+ title: "Etiketleri Listele",
+ href: "book-tag",
+ target: "_self",
+ },
+ ],
+ },
+ {
+ title: "Ayarlar",
+ icon: ,
+ href: "/app/settings",
+ target: "_self",
+ },
+ {
+ title: "Geliştirici Belgeleri",
+ icon: ,
+ href: "/docs",
+ target: "_blank",
+ },
+ {
+ title: "Destek",
+ icon: ,
+ href: "/app/support",
+ target: "_self",
+ },
+ {
+ title: "Çıkış Yap",
+ icon: ,
+ href: "/app/logout",
+ target: "_self",
+ },
+];
+
+export const items = [
+ {
+ title: "Kütüphane",
+ description: "Kütüphane bilgilerini düzenleyin, yeni kütüphaneler ekleyin.",
+ link: "/app/library",
+ },
+ {
+ title: "Üyeler",
+ description: "Üyeleri yönetin, yeni üyeler ekleyin.",
+ link: "/app/member",
+ },
+ {
+ title: "Kitaplar",
+ description: "Kitapları düzenleyin, yeni kitaplar ekleyin.",
+ link: "/app/book",
+ },
+ {
+ title: "Personel",
+ description: "Personel bilgilerini yönetin, yeni personel ekleyin.",
+ link: "/app/staff",
+ },
+ {
+ title: "Ödünç Verme",
+ description: "Kitap ödünç verme işlemlerini yönetin.",
+ link: "/app/borrow",
+ },
+ {
+ title: "Kitap Türleri",
+ description: "Kitap türlerini düzenleyin, yeni türler ekleyin.",
+ link: "/app/genre",
+ },
+ {
+ title: "Kitap Etiketleri",
+ description:
+ "Arama terimlerini yönetin, popüler arama terimlerini görüntüleyin ve düzenleyin.",
+ link: "/app/book-tag",
+ },
+];
diff --git a/LibraryTrackingApp/src/frontend/constants/sidebarItems.jsx b/LibraryTrackingApp/src/frontend/constants/sidebarItems.jsx
deleted file mode 100644
index 8b78840..0000000
--- a/LibraryTrackingApp/src/frontend/constants/sidebarItems.jsx
+++ /dev/null
@@ -1,128 +0,0 @@
-import { FiHome, FiSettings, FiLogOut, FiBook, FiHelpCircle } from "react-icons/fi";
-import {
- BsArrowLeftRight,
- BsBook,
- BsBuilding,
- BsPeople,
- BsPeopleFill,
- BsPerson,
- BsTagFill,
-} from "react-icons/bs";
-import { FaBookOpen } from "react-icons/fa";
-
-import { BiSupport } from "react-icons/bi";
-
-export const sidebarItems = [
- {
- title: "Ana Sayfa",
- icon: ,
- href: "/app",
- target: "_self",
- },
- {
- title: "Kütüphane Yönetimi",
- icon: ,
- href: "/app/library",
- target: "_self",
- },
- {
- title: "Yazar Yönetimi",
- icon: ,
- href: "/app/author",
- target: "_self",
- },
- { title: "Kitaplar", icon: , href: "/app/book", target: "_self" },
- {
- title: "Kitap Tür Yönetimi",
- icon: ,
- href: "/app/genre",
- target: "_self",
- },
- {
- title: "Kütüphane Üye Yönetimi",
- icon: ,
- href: "/app/member",
- target: "_self",
- },
- {
- title: "Personel Yönetimi",
- icon: ,
- href: "/app/staff",
- target: "_self",
- },
- {
- title: "Ödünç Kitap Yönetimi",
- icon: ,
- href: "/app/borrow",
- target: "_self",
- },
- {
- title: "Kitap Etiket Yönetimi",
- icon: ,
- href: "/app/book-tag",
- target: "_self",
- },
- {
- title: "Ayarlar",
- icon: ,
- href: "/app/settings",
- target: "_self",
- },
- {
- title: "Geliştirici Belgeleri",
- icon: ,
- href: "/docs",
- target: "_blank",
- },
- {
- title: "Destek",
- icon: ,
- href: "/app/support",
- target: "_self",
- },
- {
- title: "Çıkış Yap",
- icon: ,
- href: "/app/logout",
- target: "_self",
- },
-];
-
-export const items = [
- {
- title: "Kütüphane",
- description: "Kütüphane bilgilerini düzenleyin, yeni kütüphaneler ekleyin.",
- link: "/app/library",
- },
- {
- title: "Üyeler",
- description: "Üyeleri yönetin, yeni üyeler ekleyin.",
- link: "/app/member",
- },
- {
- title: "Kitaplar",
- description: "Kitapları düzenleyin, yeni kitaplar ekleyin.",
- link: "/app/book",
- },
- {
- title: "Personel",
- description: "Personel bilgilerini yönetin, yeni personel ekleyin.",
- link: "/app/staff",
- },
- {
- title: "Ödünç Verme",
- description: "Kitap ödünç verme işlemlerini yönetin.",
- link: "/app/borrow",
- },
- {
- title: "Kitap Türleri",
- description: "Kitap türlerini düzenleyin, yeni türler ekleyin.",
- link: "/app/genre",
- },
- {
- title: "Kitap Etiketleri",
- description:
- "Arama terimlerini yönetin, popüler arama terimlerini görüntüleyin ve düzenleyin.",
- link: "/app/book-tag",
- },
-];
diff --git a/LibraryTrackingApp/src/frontend/layouts/Admin/components/Sidebar/index.jsx b/LibraryTrackingApp/src/frontend/layouts/Admin/components/Sidebar/index.jsx
index 1a41844..ad6c234 100644
--- a/LibraryTrackingApp/src/frontend/layouts/Admin/components/Sidebar/index.jsx
+++ b/LibraryTrackingApp/src/frontend/layouts/Admin/components/Sidebar/index.jsx
@@ -7,6 +7,7 @@ import {
Icon,
Button,
Divider,
+ Collapse,
} from "@chakra-ui/react";
import Link from "next/link";
@@ -14,7 +15,7 @@ import Link from "next/link";
import { CloseIcon } from "@chakra-ui/icons";
import { useRouter } from "next/router";
import { adminSidebarItems } from "@/constants/adminSidebarItems";
-import { useEffect } from "react";
+import { useEffect, useState } from "react";
function Sidebar({ isOpen, toggleSidebar }) {
const router = useRouter();
@@ -66,15 +67,14 @@ function Sidebar({ isOpen, toggleSidebar }) {
{adminSidebarItems.subItems && item.subItems.length > 0 && (
{item.subItems.map((subItem, subIndex) => (
-
+
))}
)}
@@ -85,21 +85,57 @@ function Sidebar({ isOpen, toggleSidebar }) {
);
}
-const SidebarItem = ({ icon, text, href, target, isActive }) => {
+const SidebarItem = ({ icon, text, href, target, isActive, subItems }) => {
+ const [isOpen, setIsOpen] = useState(false);
const color = isActive ? "#1468de" : "gray.100";
+ const router = useRouter();
+
+ const handleToggle = () => {
+ setIsOpen(!isOpen);
+ };
+
return (
-
+ <>
-
+
+
+
+ {subItems?.map((subItem, subIndex) => (
+
+ ))}
+
+
+ >
);
};
-
export default Sidebar;
diff --git a/LibraryTrackingApp/src/frontend/layouts/App/components/Sidebar/index.jsx b/LibraryTrackingApp/src/frontend/layouts/App/components/Sidebar/index.jsx
index 851dba7..e4c1ce7 100644
--- a/LibraryTrackingApp/src/frontend/layouts/App/components/Sidebar/index.jsx
+++ b/LibraryTrackingApp/src/frontend/layouts/App/components/Sidebar/index.jsx
@@ -10,20 +10,16 @@ import {
} from "@chakra-ui/react";
import Link from "next/link";
-
+import { Collapse } from "@chakra-ui/react";
import { CloseIcon } from "@chakra-ui/icons";
+import { ChevronDownIcon, ChevronUpIcon } from "@chakra-ui/icons";
import { useRouter } from "next/router";
-import { sidebarItems } from "@/constants/sidebarItems";
-import { useEffect } from "react";
+import { sidebarItems } from "@/constants/appSidebarItems";
+import { useState } from "react";
function Sidebar({ isOpen, toggleSidebar }) {
const router = useRouter();
- useEffect(()=>{
-
-
- },[])
-
return (
- {sidebarItems.subItems && item.subItems.length > 0 && (
-
- {item.subItems.map((subItem, subIndex) => (
-
- ))}
-
- )}
))}
@@ -85,20 +67,57 @@ function Sidebar({ isOpen, toggleSidebar }) {
);
}
-const SidebarItem = ({ icon, text, href, target, isActive }) => {
+const SidebarItem = ({ icon, text, href, target, isActive, subItems }) => {
+ const [isOpen, setIsOpen] = useState(false);
const color = isActive ? "#1468de" : "gray.100";
+ const router = useRouter();
+
+ const handleToggle = () => {
+ setIsOpen(!isOpen);
+ };
+
return (
-
+ <>
-
+
+
+
+ {subItems?.map((subItem, subIndex) => (
+
+ ))}
+
+
+ >
);
};
diff --git a/LibraryTrackingApp/src/frontend/pages/app/book/index.jsx b/LibraryTrackingApp/src/frontend/pages/app/audio-books/index.jsx
similarity index 100%
rename from LibraryTrackingApp/src/frontend/pages/app/book/index.jsx
rename to LibraryTrackingApp/src/frontend/pages/app/audio-books/index.jsx
diff --git a/LibraryTrackingApp/src/frontend/pages/app/book-tag/new.jsx b/LibraryTrackingApp/src/frontend/pages/app/book-tag/new.jsx
new file mode 100644
index 0000000..14b5e03
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/book-tag/new.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function NewTagPage() {
+ return (
+
NewTagPage
+ )
+}
+
+export default NewTagPage
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/borrow/give.jsx b/LibraryTrackingApp/src/frontend/pages/app/borrow/give.jsx
new file mode 100644
index 0000000..716ba2c
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/borrow/give.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function GiveBorrowPage() {
+ return (
+ GiveBorrowPage
+ )
+}
+
+export default GiveBorrowPage
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/borrow/return.jsx b/LibraryTrackingApp/src/frontend/pages/app/borrow/return.jsx
new file mode 100644
index 0000000..a21eaa8
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/borrow/return.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function TakeBorrowPage() {
+ return (
+ TakeBorrowPage
+ )
+}
+
+export default TakeBorrowPage
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/e-books/index.jsx b/LibraryTrackingApp/src/frontend/pages/app/e-books/index.jsx
new file mode 100644
index 0000000..feab21d
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/e-books/index.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function BooksPage() {
+ return (
+ BooksPage
+ )
+}
+
+export default BooksPage
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/genre/new.jsx b/LibraryTrackingApp/src/frontend/pages/app/genre/new.jsx
new file mode 100644
index 0000000..3c819de
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/genre/new.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function NewGenre() {
+ return (
+ NewGenre
+ )
+}
+
+export default NewGenre
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/index.jsx b/LibraryTrackingApp/src/frontend/pages/app/index.jsx
index 223622d..bc6d6e5 100644
--- a/LibraryTrackingApp/src/frontend/pages/app/index.jsx
+++ b/LibraryTrackingApp/src/frontend/pages/app/index.jsx
@@ -1,4 +1,4 @@
-import { items } from "@/constants/sidebarItems";
+import { items } from "@/constants/appSidebarItems";
import {
Flex,
Heading,
diff --git a/LibraryTrackingApp/src/frontend/pages/app/magazines/index.jsx b/LibraryTrackingApp/src/frontend/pages/app/magazines/index.jsx
new file mode 100644
index 0000000..feab21d
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/magazines/index.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function BooksPage() {
+ return (
+ BooksPage
+ )
+}
+
+export default BooksPage
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/member/index.jsx b/LibraryTrackingApp/src/frontend/pages/app/members/index.jsx
similarity index 100%
rename from LibraryTrackingApp/src/frontend/pages/app/member/index.jsx
rename to LibraryTrackingApp/src/frontend/pages/app/members/index.jsx
diff --git a/LibraryTrackingApp/src/frontend/pages/app/members/new.jsx b/LibraryTrackingApp/src/frontend/pages/app/members/new.jsx
new file mode 100644
index 0000000..2969473
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/members/new.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function NewMemberPage() {
+ return (
+ NewMemberPage
+ )
+}
+
+export default NewMemberPage
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/printed-books/index.jsx b/LibraryTrackingApp/src/frontend/pages/app/printed-books/index.jsx
new file mode 100644
index 0000000..feab21d
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/printed-books/index.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function BooksPage() {
+ return (
+ BooksPage
+ )
+}
+
+export default BooksPage
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/staff/new.jsx b/LibraryTrackingApp/src/frontend/pages/app/staff/new.jsx
new file mode 100644
index 0000000..b0bc0a9
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/staff/new.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function NewStaffPage() {
+ return (
+ NewStaffPage
+ )
+}
+
+export default NewStaffPage
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/thesis/index.jsx b/LibraryTrackingApp/src/frontend/pages/app/thesis/index.jsx
new file mode 100644
index 0000000..feab21d
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/thesis/index.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function BooksPage() {
+ return (
+ BooksPage
+ )
+}
+
+export default BooksPage
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/work-catalog/index.jsx b/LibraryTrackingApp/src/frontend/pages/app/work-catalog/index.jsx
new file mode 100644
index 0000000..38e7a96
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/work-catalog/index.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function BooksPage() {
+ return (
+ Eser Katalog
+ )
+}
+
+export default BooksPage
\ No newline at end of file
diff --git a/LibraryTrackingApp/src/frontend/pages/app/work-catalog/new.jsx b/LibraryTrackingApp/src/frontend/pages/app/work-catalog/new.jsx
new file mode 100644
index 0000000..739739d
--- /dev/null
+++ b/LibraryTrackingApp/src/frontend/pages/app/work-catalog/new.jsx
@@ -0,0 +1,9 @@
+import React from 'react'
+
+function WorkCatalogPage() {
+ return (
+ WorkCatalogPage
+ )
+}
+
+export default WorkCatalogPage
\ No newline at end of file