From 979f663241bbc4030bee3af3267e55818c4e786d Mon Sep 17 00:00:00 2001 From: Kamil Piech Date: Tue, 13 Aug 2024 07:25:09 +0200 Subject: [PATCH 1/3] #46 - dashboard navigation (#111) * #46 - feat: added dynamic active atrribute for dashboard navigation * #46 - fix: code reivew fixes --- resources/js/Layouts/DashboardLayout.vue | 33 ++++++++++++------------ resources/js/Pages/Dashboard/Home.vue | 1 + 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/resources/js/Layouts/DashboardLayout.vue b/resources/js/Layouts/DashboardLayout.vue index bb94954..7fb4320 100644 --- a/resources/js/Layouts/DashboardLayout.vue +++ b/resources/js/Layouts/DashboardLayout.vue @@ -29,28 +29,28 @@ const navigation = [ { title: 'Ogólne', elements: [ - { name: 'Dashboard', href: '/dashboard', icon: HomeIcon, current: true }, - { name: 'Ustawienia', href: '/dashboard/settings', icon: Cog6ToothIcon, current: false }, - { name: 'Sekcje', href: '/dashboard/sections', icon: Square2StackIcon, current: false }, - { name: 'Aktualizacja hasła', href: '/dashboard/password', icon: LockOpenIcon, current: false }, - { name: 'Aktualności', href: '/dashboard/news', icon: NewspaperIcon, current: false }, - { name: 'FAQ', href: '/dashboard/faqs', icon: QuestionMarkCircleIcon, current: false }, - { name: 'Formy kontaktu', href: '/dashboard/contact-infos', icon: AtSymbolIcon, current: false }, + { name: 'Dashboard', href: '/dashboard', icon: HomeIcon, component: 'Dashboard/Home' }, + { name: 'Ustawienia', href: '/dashboard/settings', icon: Cog6ToothIcon, component: 'Dashboard/Setting' }, + { name: 'Sekcje', href: '/dashboard/sections', icon: Square2StackIcon, component: 'Dashboard/Section' }, + { name: 'Aktualizacja hasła', href: '/dashboard/password', icon: LockOpenIcon, component: 'Dashboard/PasswordUpdate' }, + { name: 'Aktualności', href: '/dashboard/news', icon: NewspaperIcon, component: 'Dashboard/News' }, + { name: 'FAQ', href: '/dashboard/faqs', icon: QuestionMarkCircleIcon, component: 'Dashboard/FAQ' }, + { name: 'Formy kontaktu', href: '/dashboard/contact-infos', icon: AtSymbolIcon, component: 'Dashboard/ContactInfo' }, ], }, { title: 'Uczelnia', elements: [ - { name: 'Studenci', href: '/dashboard/students', icon: UsersIcon, current: false }, - { name: 'Kursy w semestrze', href: '/dashboard/semester-courses', icon: BookmarkSquareIcon, current: false }, + { name: 'Studenci', href: '/dashboard/students', icon: UsersIcon, component: 'Dashboard/Student' }, + { name: 'Kursy w semestrze', href: '/dashboard/semester-courses', icon: BookmarkSquareIcon, component: 'Dashboard/CourseSemester' }, ], }, { title: 'Słowniki', elements: [ - { name: 'Kursy', href: '/dashboard/courses', icon: BriefcaseIcon, current: false }, - { name: 'Kierunki i specjalności', href: '/dashboard/fields', icon: MagnifyingGlassIcon, current: false }, - { name: 'Semestry', href: '/dashboard/semesters', icon: ClipboardIcon, current: false }, + { name: 'Kursy', href: '/dashboard/courses', icon: BriefcaseIcon, component: 'Dashboard/Course/' }, + { name: 'Kierunki i specjalności', href: '/dashboard/fields', icon: MagnifyingGlassIcon, component: 'Dashboard/Field' }, + { name: 'Semestry', href: '/dashboard/semesters', icon: ClipboardIcon, component: 'Dashboard/Semester' }, ], }, ] @@ -105,8 +105,8 @@ watch(() => props.flash, (flash) => {