Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3651369
refactor: move mutations hooks to dedicated directory
Noemie-Koelblen Apr 3, 2026
e0449fa
refactor: move types to dedicated directories
Noemie-Koelblen Apr 3, 2026
112711f
refactor: update import paths for entity types to improve organization
Noemie-Koelblen Apr 3, 2026
826aa2d
refactor: update import path for category types to improve organization
Noemie-Koelblen Apr 3, 2026
fb2d187
refactor: update favicon and title in index.html for project branding
Noemie-Koelblen Apr 7, 2026
04c8a25
WIP: add media management features including MediaDropZone and MediaL…
Noemie-Koelblen Apr 8, 2026
61ac14c
feat: Add admin pages for managing categories, coworkers, roles, stac…
Noemie-Koelblen Apr 11, 2026
75f360c
feat: Implement media management features including MediaDropZone, Me…
Noemie-Koelblen Apr 11, 2026
e3a947d
feat: Enhance media management with delete confirmation dialogs and i…
Noemie-Koelblen Apr 11, 2026
58f3eae
feat: Add height prop to CustomDialog and update Picture and SingleMe…
Noemie-Koelblen Apr 11, 2026
db21784
feat: Refactor SingleMediaDialog layout with ResponsiveStack for impr…
Noemie-Koelblen Apr 11, 2026
d297964
feat: Enhance media and stack management with bulk edit functionality…
Noemie-Koelblen Apr 11, 2026
aff54eb
feat: Simplify GraphQL mutations and queries by removing unnecessary …
Noemie-Koelblen Apr 13, 2026
069876f
feat: Remove unused context and hook files for Category, Media, Proje…
Noemie-Koelblen Apr 13, 2026
456b13e
feat: Remove unused context providers and simplify routing structure …
Noemie-Koelblen Apr 13, 2026
c04e6f9
feat: Add custom hooks for categories, coworkers, medias, projects, r…
Noemie-Koelblen Apr 13, 2026
7633357
feat: Refactor category, coworker, media, project, and role types by …
Noemie-Koelblen Apr 13, 2026
da963b8
feat: Remove unused mutation props and simplify type imports across e…
Noemie-Koelblen Apr 13, 2026
4ea795c
feat: Refactor mutation hooks for categories, coworkers, medias, proj…
Noemie-Koelblen Apr 13, 2026
ba2afb7
feat: Remove unused imports and types from roleTypes.ts to simplify c…
Noemie-Koelblen Apr 13, 2026
4b1bf41
feat: Add EntitiesContent component for managing entity lists with CR…
Noemie-Koelblen Apr 13, 2026
e042036
feat: Simplify EntitiesContentProps by removing unused types and prop…
Noemie-Koelblen Apr 13, 2026
6d37318
feat: Refactor admin pages to use EntitiesContent component and simpl…
Noemie-Koelblen Apr 13, 2026
fbdfe18
feat: Update form dialog components to handle editing and adding with…
Noemie-Koelblen Apr 13, 2026
adc66ce
feat: Replace CustomDialog with BulkEditFormDialog in CustomTable and…
Noemie-Koelblen Apr 13, 2026
4d24eab
feat: Update mutation signatures and dialog components to use structu…
Noemie-Koelblen Apr 13, 2026
526a63a
feat: integrate Apollo Client and refactor media management components
Noemie-Koelblen Apr 13, 2026
9c4d072
feat: refactor form dialog components to use structured input and han…
Noemie-Koelblen Apr 13, 2026
7edf08c
feat: update form dialog components to handle parent and category IDs…
Noemie-Koelblen Apr 14, 2026
acb90e1
feat: update SingleMediaDialog to handle media input structure and cl…
Noemie-Koelblen Apr 14, 2026
0eed88f
WIP: enhance media management components with new MediaPicker; update…
Noemie-Koelblen Apr 16, 2026
1845b84
feat: implement drag-and-drop functionality in MediaPicker; update me…
Noemie-Koelblen Apr 17, 2026
a4c1097
feat: enhance SortableMediaItem with improved drag-and-drop interacti…
Noemie-Koelblen Apr 17, 2026
58dd789
feat: enhance SortableMediaItem styling with improved transitions for…
Noemie-Koelblen Apr 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<link
rel="icon"
type="image/webp"
href="/src/assets/favicon/favicon.webp"
/>
<title>Onoko</title>
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
},
"dependencies": {
"@apollo/client": "^4.1.6",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@fontsource/roboto": "^5.2.10",
Expand Down
138 changes: 72 additions & 66 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import Home from "./pages/public/homePage";
import PublicLayout from "./layout/public/publicLayout";
import AdminLayout from "./layout/admin/adminLayout";
import Dashboard from "./pages/admin/dashboardPage";
import Account from "./pages/admin/accountPage";
import Login from "./pages/auth/loginPage";
import RequestResetPassword from "./pages/auth/requestResetPasswordPage";
import ResetPassword from "./pages/auth/resetPasswordPage";
import LogoutPage from "./pages/auth/logoutPage";
import RequireAuth from "./pages/admin/requireAuth";
import Home from "./pages/public/HomePage";
import PublicLayout from "./layout/public/PublicLayout";
import AdminLayout from "./layout/admin/AdminLayout";
import Dashboard from "./pages/admin/DashboardPage";
import Account from "./pages/admin/AccountPage";
import Login from "./pages/auth/LoginPage";
import RequestResetPassword from "./pages/auth/RequestResetPasswordPage";
import ResetPassword from "./pages/auth/ResetPasswordPage";
import LogoutPage from "./pages/auth/LogoutPage";
import RequireAuth from "./pages/admin/RequireAuth";
import { LOGIN_ROUTE } from "./constants/apiConstants";
import { AuthProvider } from "./context/AuthContext";
import Categories from "./pages/admin/categoriesPage";
import Categories from "./pages/admin/CategoriesPage";
import { GlobalStyles, useTheme } from "@mui/material";
import { CategoryProvider } from "./context/CategoryContext";
import Stacks from "./pages/admin/stackPage";
import Coworkers from "./pages/admin/coworkerPage";
import Roles from "./pages/admin/rolePage";
import { RoleProvider } from "./context/RoleContext";
import Stacks from "./pages/admin/StackPage";
import Coworkers from "./pages/admin/CoworkerPage";
import Roles from "./pages/admin/RolePage";
import Media from "./pages/admin/MediaPage";
import { ApolloProvider } from "@apollo/client/react";
import apolloClient from "./services/appolloClient";

export default function App() {
const theme = useTheme();
Expand All @@ -38,64 +39,69 @@ export default function App() {
},
"::-webkit-scrollbar-thumb:hover": {
background: theme.palette.text.secondary,
backgroundClip: "content-box",
},
"::-webkit-scrollbar-corner": {
background: theme.palette.background.paper,
background: "transparent",
},
}}
/>
<Router>
<AuthProvider>
<CategoryProvider>
<RoleProvider>
<Routes>
{/* Routes publiques */}
<Route
path="/*"
element={
<PublicLayout>
<Routes>
<Route path="/" element={<Home />} />
</Routes>
</PublicLayout>
}
/>
<ApolloProvider client={apolloClient}>
<AuthProvider>
<Routes>
{/* Routes publiques */}
<Route
path="/*"
element={
<PublicLayout>
<Routes>
<Route path="/" element={<Home />} />
</Routes>
</PublicLayout>
}
/>

{/* Routes d'authentification */}
<Route path={`/${LOGIN_ROUTE}`} element={<Login />} />
<Route path="/logout" element={<LogoutPage />} />
<Route
path="/request-reset-password"
element={<RequestResetPassword />}
/>
<Route
path="/request-reset-password"
element={<RequestResetPassword />}
/>
<Route path="/reset-password" element={<ResetPassword />} />
{/* Routes d'authentification */}
<Route path={`/${LOGIN_ROUTE}`} element={<Login />} />
<Route path="/logout" element={<LogoutPage />} />
<Route
path="/request-reset-password"
element={<RequestResetPassword />}
/>
<Route
path="/request-reset-password"
element={<RequestResetPassword />}
/>
<Route path="/reset-password" element={<ResetPassword />} />

{/* Routes admin */}
<Route
path="/admin/*"
element={
<RequireAuth>
<AdminLayout>
<Routes>
<Route path="/" element={<Dashboard />} />
<Route path="/account" element={<Account />} />
<Route path="/categories" element={<Categories />} />
<Route path="/stacks" element={<Stacks />} />
<Route path="/roles" element={<Roles />} />
<Route path="/coworkers" element={<Coworkers />} />
</Routes>
</AdminLayout>
</RequireAuth>
}
/>
</Routes>
</RoleProvider>
</CategoryProvider>
</AuthProvider>
{/* Routes admin */}
<Route
path="/admin/*"
element={
<RequireAuth>
<AdminLayout>
<Routes>
<Route path="/" element={<Dashboard />} />
<Route path="/account" element={<Account />} />
<Route path="/categories" element={<Categories />} />
<Route path="/stacks" element={<Stacks />} />
<Route path="/roles" element={<Roles />} />
<Route path="/coworkers" element={<Coworkers />} />
<Route path="/medias" element={<Media />} />
{/* <Route path="/projects" element={<Projects />} />
<Route
path="/project"
element={<ProjectForm />}
/> */}
</Routes>
</AdminLayout>
</RequireAuth>
}
/>
</Routes>
</AuthProvider>
</ApolloProvider>
</Router>
</>
);
Expand Down
Binary file added src/assets/favicon/favicon.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { mdiAccount, mdiAccountCog, mdiLogout } from "@mdi/js";
import Icon from "@mdi/react";
import { Button, ListItemIcon, ListItemText, MenuItem } from "@mui/material";
import CustomDialog from "../custom/customDialog";
import CustomDialog from "../custom/CustomDialog";
import { Link, useLocation } from "react-router";
import { useState } from "react";
import CustomMenu from "../custom/customMenu";
import ResponsiveBodyTypography from "../custom/responsiveBodyTypography";
import CustomMenu from "../custom/CustomMenu";
import ResponsiveBodyTypography from "../custom/ResponsiveBodyTypography";
import { useAuth } from "../../hooks/useAuth";
import { ResponsiveStack } from "../custom/responsiveLayout";
import CustomIconButton from "../custom/customIconButton";
import { ResponsiveStack } from "../custom/ResponsiveLayout";
import CustomIconButton from "../custom/CustomIconButton";

export default function AccountMenu() {
const [logoutConfirm, setLogoutConfirm] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NewPasswordFieldsProps } from "../../types/baseComponent";
import PasswordField from "../custom/passwordField";
import type { NewPasswordFieldsProps } from "../../types/components/baseComponentTypes";
import PasswordField from "../custom/PasswordField";

/**
* Composant pour les champs de saisie du nouveau mot de passe et de sa confirmation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link } from "@mui/material";
import ResponsiveBodyTypography from "../custom/responsiveBodyTypography";
import ResponsiveBodyTypography from "../custom/ResponsiveBodyTypography";

/**
* Composant de lien pour la réinitialisation du mot de passe.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { mdiHome } from "@mdi/js";
import { MenuItem } from "@mui/material";
import CustomMenu from "../custom/customMenu";
import CustomMenu from "../custom/CustomMenu";
import { Link } from "react-router";
import { useState } from "react";
import CustomIconButton from "../custom/customIconButton";
import CustomIconButton from "../custom/CustomIconButton";

export default function HomeMenu() {
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type SnackbarCloseReason } from "@mui/material";
import SnackbarAlert from "./snackbarAlert";
import type { ClosableSnackbarAlertProps } from "../../types/baseComponent";
import SnackbarAlert from "./SnackbarAlert";
import type { ClosableSnackbarAlertProps } from "../../types/components/baseComponentTypes";

/**
* Composant de snackbar personnalisée avec possibilité de fermeture manuelle ou automatique.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import {
DialogContent,
DialogContentText,
DialogTitle,
IconButton,
} from "@mui/material";
import { useResponsiveWidth } from "../../hooks/layout/useResponsiveWidth";
import type { CustomDialogProps } from "../../types/baseComponent";
import type { CustomDialogProps } from "../../types/components/baseComponentTypes";
import Icon from "@mdi/react";
import { mdiClose } from "@mdi/js";

/**
* Composant générique de dialogue personnalisé utilisant MUI Dialog
Expand All @@ -24,8 +27,11 @@ export default function CustomDialog({
titlePaddingBottom,
content,
actions,
width = 4,
height,
closeButton = false,
}: CustomDialogProps) {
const dialogWidth = useResponsiveWidth(4);
const dialogWidth = useResponsiveWidth(width);
return (
<Dialog
open={open}
Expand All @@ -34,9 +40,25 @@ export default function CustomDialog({
sx={{
"& .MuiDialog-paper": {
width: dialogWidth,
height: height,
paddingTop: closeButton ? "3rem" : undefined,
paddingX: closeButton ? "3rem" : undefined,
},
}}
>
{closeButton && (
<IconButton
aria-label="close"
onClick={onClose}
sx={{
position: "absolute",
right: 0,
top: 0,
}}
>
<Icon path={mdiClose} size={1} />
</IconButton>
)}
{title && (
<DialogTitle
sx={
Expand All @@ -48,7 +70,7 @@ export default function CustomDialog({
{title}
</DialogTitle>
)}
<DialogContent>
<DialogContent sx={{ overflowX: "hidden" }}>
{typeof content === "string" ? (
<DialogContentText>{content}</DialogContentText>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
InputLabel,
MenuItem,
Select,
type SelectProps,
type FormControlProps,
} from "@mui/material";
import type { CustomSelectProps } from "../../types/baseComponent";
import type { CustomSelectProps } from "../../types/components/baseComponentTypes";

export default function CustomSelect({
label,
Expand All @@ -14,16 +14,16 @@ export default function CustomSelect({
onChange,
options,
...props
}: CustomSelectProps & SelectProps) {
}: CustomSelectProps & FormControlProps) {
return (
<FormControl>
<FormControl fullWidth {...props}>
<InputLabel id={labelId}>{label}</InputLabel>
<Select
labelId={labelId}
label={label}
value={value}
onChange={onChange}
{...props}
multiple={Array.isArray(value) ? true : false}
>
<MenuItem value="">Aucune</MenuItem>
{options?.map((o: { id: string; label: string }) => (
Expand Down
Loading