diff --git a/Front-End/src/components/ProfileDirectory.js b/Front-End/src/components/ProfileDirectory.js
index 41226b3..0809644 100644
--- a/Front-End/src/components/ProfileDirectory.js
+++ b/Front-End/src/components/ProfileDirectory.js
@@ -1,9 +1,10 @@
import React, { useState } from 'react';
-import { Trash2, Eye, EyeOff, ToggleLeft, ToggleRight } from 'lucide-react';
+import { Trash2, Eye, EyeOff, ToggleLeft, ToggleRight, Info } from 'lucide-react';
import Table from '@/components/Table';
import Popup from '@/components/Popup';
import StatusLabel from '@/components/StatusLabel';
import SpecialityItem from '@/components/Structure/Configuration/SpecialityItem';
+import Tooltip from '@/components/Tooltip';
const roleTypeToLabel = (roleType) => {
switch (roleType) {
@@ -83,7 +84,12 @@ const ProfileDirectory = ({ profileRoles, handleActivateProfile, handleDeletePro
)
},
- { name: 'Utilisateur', transform: (row) => row.associated_person?.guardian_name },
+ { name: 'Utilisateur', transform: (row) => (
+
+ {row.associated_person?.guardian_name}
+
+ )
+ },
{ name: 'Elève(s) associé(s)', transform: (row) => (
{row.associated_person?.students?.map(student => (
@@ -133,22 +139,35 @@ const ProfileDirectory = ({ profileRoles, handleActivateProfile, handleDeletePro
)
},
- { name: 'Utilisateur', transform: (row) => row.associated_person?.teacher_name },
- { name: 'Classe(s) associée(s)', transform: (row) => (
-
- {row.associated_person?.classes?.map(classe => (
-
- {classe.name}
-
- ))}
-
- )
- },
- { name: 'Spécialités', transform: (row) => (
-
- {row.associated_person?.specialities?.map(speciality => (
-
- ))}
+ { name: 'Utilisateur', transform: (row) => (
+
+
{row.associated_person?.teacher_name}
+
+
+
Classes associées:
+
+ {row.associated_person?.classes?.map(classe => (
+
+ {classe.name}
+
+ ))}
+
+
+
+
Spécialités:
+
+ {row.associated_person?.specialities?.map(speciality => (
+
+ ))}
+
+
+
+ }>
+
+
)
},
@@ -176,7 +195,7 @@ const ProfileDirectory = ({ profileRoles, handleActivateProfile, handleDeletePro
];
return (
-
+
{parentProfiles.length === 0 ? (
diff --git a/Front-End/src/components/Tooltip.js b/Front-End/src/components/Tooltip.js
new file mode 100644
index 0000000..335c588
--- /dev/null
+++ b/Front-End/src/components/Tooltip.js
@@ -0,0 +1,30 @@
+import React, { useState } from 'react';
+import PropTypes from 'prop-types';
+
+const Tooltip = ({ content, children }) => {
+ const [visible, setVisible] = useState(false);
+
+ return (
+
+
setVisible(true)}
+ onMouseLeave={() => setVisible(false)}
+ className="cursor-pointer"
+ >
+ {children}
+
+ {visible && (
+
+ {content}
+
+ )}
+
+ );
+};
+
+Tooltip.propTypes = {
+ content: PropTypes.node.isRequired,
+ children: PropTypes.node.isRequired,
+};
+
+export default Tooltip;
\ No newline at end of file