Added Navigate to

This commit is contained in:
Mitchell Magro 2025-06-25 16:10:43 +02:00
parent 6eba583e13
commit c9a56fe155
5 changed files with 79 additions and 11 deletions

View File

@ -1,2 +1,27 @@
# paymentIQ # 🛠️ Backoffice Admin Panel
Payment IQ Back Office
A modern backoffice admin panel built with [Next.js](https://nextjs.org/) and [React](https://react.dev), providing a scalable and maintainable foundation for managing internal tools, content, and operations.
---
## 🚀 Tech Stack
- [Next.js](https://nextjs.org/) App Router with SSR support
- [React](https://reactjs.org/)
- [TypeScript](https://www.typescriptlang.org/)
- [Material UI](https://mui.com/) UI component library
- [Axios](https://axios-http.com/) API client
- [Jest](https://jestjs.io/) / [React Testing Library](https://testing-library.com/) Unit & integration testing
- [ESLint](https://eslint.org/) / [Prettier](https://prettier.io/) Code quality & formatting
- [dotenv](https://github.com/motdotla/dotenv) Environment variable management
---
## 📦 Getting Started
```bash
git clone https://git.luckyigaming.com/Mitchell/payment-backoffice.git
cd backoffice
yarn run dev

View File

@ -0,0 +1,42 @@
import React from 'react';
import {
FormControl,
InputLabel,
Select,
MenuItem,
SelectChangeEvent,
ListItemIcon,
ListItemText,
} from '@mui/material';
import { SIDEBAR_LINKS } from '@/constants/SidebarLink.constants';
interface Props {
onChange?: (event: SelectChangeEvent<string>) => void;
}
export default function SidebarDropdown({ onChange }: Props) {
const [value, setValue] = React.useState('');
const handleChange = (event: SelectChangeEvent<string>) => {
setValue(event.target.value);
onChange?.(event);
};
return (
<FormControl fullWidth variant="outlined" sx={{ maxWidth: 200 }}>
<InputLabel id="sidebar-dropdown-label">Navigate To</InputLabel>
<Select
labelId="sidebar-dropdown-label"
value={value}
onChange={handleChange}
label="Navigate To"
>
{SIDEBAR_LINKS.map((link:any) => (
<MenuItem key={link.path} value={link.path}>
<ListItemText primary={link.title} />
</MenuItem>
))}
</Select>
</FormControl>
);
}

View File

@ -1,6 +1,7 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { AppBar, Toolbar, IconButton, Menu, MenuItem, Button } from '@mui/material'; import { AppBar, Toolbar, IconButton, Menu, MenuItem, Button } from '@mui/material';
import MenuIcon from '@mui/icons-material/Menu'; import MenuIcon from '@mui/icons-material/Menu';
import Dropdown from './DropDown';
const Header = () => { const Header = () => {
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null); const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
@ -15,6 +16,9 @@ const Header = () => {
setAnchorEl(null); setAnchorEl(null);
}; };
const handleChange = (e:any) => {
};
return ( return (
<AppBar position="sticky" color="transparent" elevation={0} sx={{ borderBottom: '1px solid #22242626' }}> <AppBar position="sticky" color="transparent" elevation={0} sx={{ borderBottom: '1px solid #22242626' }}>
<Toolbar> <Toolbar>
@ -24,9 +28,7 @@ const Header = () => {
</IconButton> </IconButton>
{/* Dropdown Button */} {/* Dropdown Button */}
<Button color="inherit" onClick={handleMenuClick}> <Dropdown onChange={handleChange}/>
Options
</Button>
{/* Dropdown Menu */} {/* Dropdown Menu */}
<Menu <Menu

View File

@ -38,7 +38,7 @@ const SideBar = () => {
return ( return (
<SideBarContainer> <SideBarContainer>
<SidebarHeader> <SidebarHeader>
PaymentIQ <IconSpacing fontSize="small" /> <span style={{color: '#fff'}}>Betrise cashir <IconSpacing fontSize="small" /></span>
</SidebarHeader> </SidebarHeader>
{SIDEBAR_LINKS.map((link) => ( {SIDEBAR_LINKS.map((link) => (
<SidebarLink <SidebarLink

View File

@ -1,11 +1,10 @@
'use client'; 'use client';
import React from 'react'; import React from 'react';
import { MainContent } from '../components/Dashboard/Layout/mainContent'; import { LayoutWrapper } from '../components/dashboard/layout/layoutWrapper';
import Header from '../components/Dashboard/Header/Header'; import { MainContent } from '../components/dashboard/layout/mainContent';
import { LayoutWrapper } from '../components/Dashboard/Layout/layoutWrapper'; import SideBar from '../components/dashboard/sidebar/Sidebar';
import SideBar from '../components/Dashboard/SideBar/Sidebar'; import Header from '../components/dashboard/header/Header';
const DashboardLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => { const DashboardLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
return ( return (