feat: init assignments UI and fix bugs

This commit is contained in:
swve 2024-07-12 21:28:50 +02:00
parent 10e9be1d33
commit 6a4e16ec29
16 changed files with 436 additions and 47 deletions

View file

@ -1,15 +1,16 @@
import { useCourse } from '@components/Contexts/CourseContext'
import { Book, ChevronRight, School, User, Users } from 'lucide-react'
'use client';
import { useOrg } from '@components/Contexts/OrgContext';
import { Backpack, Book, ChevronRight, School, User, Users } from 'lucide-react'
import Link from 'next/link'
import React from 'react'
type BreadCrumbsProps = {
type: 'courses' | 'user' | 'users' | 'org' | 'orgusers'
type: 'courses' | 'user' | 'users' | 'org' | 'orgusers' | 'assignments'
last_breadcrumb?: string
}
function BreadCrumbs(props: BreadCrumbsProps) {
const course = useCourse() as any
const org = useOrg() as any
return (
<div>
@ -25,6 +26,15 @@ function BreadCrumbs(props: BreadCrumbsProps) {
) : (
''
)}
{props.type == 'assignments' ? (
<div className="flex space-x-2 items-center">
{' '}
<Backpack className="text-gray" size={14}></Backpack>
<Link href="/dash/assignments">Assignments</Link>
</div>
) : (
''
)}
{props.type == 'user' ? (
<div className="flex space-x-2 items-center">
{' '}
@ -64,7 +74,6 @@ function BreadCrumbs(props: BreadCrumbsProps) {
</div>
</div>
</div>
<div className="h-2"></div>
</div>
)
}

View file

@ -3,7 +3,7 @@ import { useOrg } from '@components/Contexts/OrgContext'
import { signOut } from 'next-auth/react'
import ToolTip from '@components/StyledElements/Tooltip/Tooltip'
import LearnHouseDashboardLogo from '@public/dashLogo.png'
import { BookCopy, Home, LogOut, School, Settings, Users } from 'lucide-react'
import { Backpack, BookCopy, Home, LogOut, School, Settings, Users } from 'lucide-react'
import Image from 'next/image'
import Link from 'next/link'
import React, { useEffect } from 'react'
@ -96,6 +96,14 @@ function LeftMenu() {
<BookCopy size={18} />
</Link>
</ToolTip>
<ToolTip content={'Assignments'} slateBlack sideOffset={8} side="right">
<Link
className="bg-white/5 rounded-lg p-2 hover:bg-white/10 transition-all ease-linear"
href={`/dash/assignments`}
>
<Backpack size={18} />
</Link>
</ToolTip>
<ToolTip content={'Users'} slateBlack sideOffset={8} side="right">
<Link
className="bg-white/5 rounded-lg p-2 hover:bg-white/10 transition-all ease-linear"