-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from NotMash/latest-frontend
IT frontend done, started with consultant css
- Loading branch information
Showing
34 changed files
with
506 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@mobiscroll:registry=https://npm.mobiscroll.com | ||
//npm.mobiscroll.com/:_authToken=Z3wUMGnDn9hmehCR5EjAbfNjHkZ/+EbRmtfQZEG6dnx9yFa+ja9VAdxqHXzLYsn0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
.mbsc-windows-dark.mbsc-selected .mbsc-calendar-cell-inner { | ||
background: #bfff0015; | ||
} | ||
|
||
.mbsc-windows-dark.mbsc-calendar-today { | ||
color: #bfff00e4; | ||
} | ||
|
||
.mbsc-windows-dark.mbsc-eventcalendar { | ||
background: hsla(0, 0%, 6%, 0); | ||
} | ||
|
||
.mbsc-windows-dark.mbsc-calendar-slide { | ||
background: #10101000; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { Eventcalendar, getJson, setOptions, Toast } from '@mobiscroll/react'; | ||
import { useCallback, useEffect, useMemo, useState } from 'react'; | ||
import '@mobiscroll/react/dist/css/mobiscroll.min.css'; | ||
import "./Calendar.css"; | ||
|
||
setOptions({ | ||
theme: 'windows', | ||
themeVariant: 'dark' | ||
}); | ||
|
||
function Calendar() { | ||
const [myEvents, setEvents] = useState([]); | ||
const [isToastOpen, setToastOpen] = useState(false); | ||
const [toastText, setToastText] = useState(); | ||
|
||
const handleToastClose = useCallback(() => { | ||
setToastOpen(false); | ||
}, []); | ||
|
||
const handleEventClick = useCallback((args) => { | ||
setToastText(args.event.title); | ||
setToastOpen(true); | ||
}, []); | ||
|
||
const myView = useMemo(() => ({ calendar: { labels: true } }), []); | ||
|
||
useEffect(() => { | ||
// Define your own events data array | ||
const events = [ | ||
{ | ||
id: 1, | ||
start: new Date(2024, 3, 1, 10), // Year, Month (0-11), Day, Hour (24-hour format) | ||
end: new Date(2024, 3, 1, 12), | ||
title: 'Approved', | ||
color: '#378006' // Optional: specify a color for the event | ||
}, | ||
{ | ||
id: 2, | ||
start: new Date(2024, 3, 5, 14), | ||
end: new Date(2024, 3, 5, 15, 30), | ||
title: 'Pending', | ||
color: '#d4810b' | ||
}, | ||
// Add more events as needed | ||
]; | ||
|
||
// Set the events data | ||
setEvents(events); | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<Eventcalendar | ||
clickToCreate={false} | ||
dragToCreate={false} | ||
dragToMove={false} | ||
dragToResize={false} | ||
eventDelete={false} | ||
data={myEvents} | ||
view={myView} | ||
onEventClick={handleEventClick} | ||
/> | ||
<Toast message={toastText} isOpen={isToastOpen} onClose={handleToastClose} /> | ||
</> | ||
); | ||
} | ||
|
||
export default Calendar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,6 @@ | |
|
||
.logoutText{ | ||
margin-left: 0.5rem; | ||
color: #1e1e1e; | ||
font-size: 12pt; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,47 @@ | ||
import { Link } from 'react-router-dom' | ||
import styles from './Navbar.module.css' | ||
import Logout from '../Global/LogoutButton' | ||
import { Link } from 'react-router-dom'; | ||
import { useEffect, useState } from 'react'; // Import useEffect and useState | ||
import styles from './Navbar.module.css'; | ||
import Logout from '../Global/LogoutButton'; | ||
|
||
export default function Navbar(props) { | ||
let linksArray = props.links | ||
console.log(linksArray) | ||
const [prevScrollPos, setPrevScrollPos] = useState(0); | ||
|
||
return(<nav className={styles.navbar}> | ||
<ul className={styles.navContainer}> | ||
<li className={styles.navElement}> | ||
<Link className={styles.navLink} to={props.homePageLink}> | ||
<img className={styles.icon} src="./Home_Page_Icons/house-solid.svg"/> | ||
<p className={styles.navText} href="/">{props.homePageTitle}</p> | ||
useEffect(() => { | ||
const handleScroll = () => { | ||
const currentScrollPos = window.pageYOffset; | ||
if (prevScrollPos > currentScrollPos) { | ||
document.getElementById("navbar").style.top = "0"; | ||
} else { | ||
document.getElementById("navbar").style.top = "-100px"; // Adjust based on your navbar height | ||
} | ||
setPrevScrollPos(currentScrollPos); | ||
}; | ||
|
||
window.addEventListener('scroll', handleScroll); | ||
return () => window.removeEventListener('scroll', handleScroll); | ||
}, [prevScrollPos]); | ||
|
||
let linksArray = props.links; | ||
|
||
return ( | ||
<nav id="navbar" className={styles.navbar}> | ||
<ul className={styles.navContainer}> | ||
<Link className={styles.navElement} to={props.homePageLink}> | ||
<Link className={styles.navLink} to={props.homePageLink}> | ||
<p className={styles.navText} href="/">{props.homePageTitle}</p> | ||
</Link> | ||
</Link> | ||
</li> | ||
{linksArray.map( (navElement, index) =>( | ||
<li key={index} className={styles.navElement}> | ||
<Link className={styles.navLink} to={navElement.pageLink}> | ||
<img className={styles.icon} src={navElement.iconPath}/> | ||
<p className={styles.navText}>{navElement.pageName}</p> | ||
{linksArray.map((navElement, index) => ( | ||
<Link key={index} className={styles.navElement} to={navElement.pageLink}> | ||
<Link className={styles.navLink} to={navElement.pageLink}> | ||
<p className={styles.navText}>{navElement.pageName}</p> | ||
</Link> | ||
</Link> | ||
))} | ||
<li className={styles.navElement}> | ||
<Logout /> | ||
</li> | ||
))} | ||
|
||
</ul> | ||
<div className={styles.logoutButton}> | ||
<Logout/> | ||
</div> | ||
</nav>) | ||
} | ||
</ul> | ||
</nav> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.