refactor: Changement des IconTextInput en TextInput, modification du composant step

This commit is contained in:
Luc SORIGNET
2025-01-27 11:20:44 +01:00
parent 6f1631a75b
commit a248898203
16 changed files with 270 additions and 127 deletions

View File

@ -8,6 +8,7 @@ import { createProfile, updateProfile } from '@/app/lib/authAction';
import useCsrfToken from '@/hooks/useCsrfToken';
import { DndProvider, useDrag, useDrop } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import InputText from '@/components/InputText';
const ItemTypes = {
SPECIALITY: 'speciality',
@ -158,7 +159,7 @@ const TeachersSection = ({ teachers, setTeachers, specialities, handleCreate, ha
const handleChange = (e) => {
const { name, value } = e.target;
let parsedValue = value;
if (editingTeacher) {
setFormData((prevData) => ({
...prevData,
@ -203,7 +204,7 @@ const TeachersSection = ({ teachers, setTeachers, specialities, handleCreate, ha
switch (column) {
case 'NOM':
return (
<InputTextIcon
<InputText
name="last_name"
value={currentData.last_name}
onChange={handleChange}
@ -213,7 +214,7 @@ const TeachersSection = ({ teachers, setTeachers, specialities, handleCreate, ha
);
case 'PRENOM':
return (
<InputTextIcon
<InputText
name="first_name"
value={currentData.first_name}
onChange={handleChange}
@ -223,7 +224,7 @@ const TeachersSection = ({ teachers, setTeachers, specialities, handleCreate, ha
);
case 'EMAIL':
return (
<InputTextIcon
<InputText
name="email"
value={currentData.email}
onChange={handleChange}