terminer
This commit is contained in:
parent
124d0eeead
commit
e5b4933076
@ -101,20 +101,19 @@ async function loginUsers(username, password) {
|
|||||||
* @param {String} username
|
* @param {String} username
|
||||||
* @param {String} email
|
* @param {String} email
|
||||||
* @param {String} password
|
* @param {String} password
|
||||||
* @param {String} roles
|
|
||||||
* @param {Number} id
|
* @param {Number} id
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
*/
|
*/
|
||||||
async function updateUser(username, email, password, roles, id) {
|
async function updateUser(username, email, password, id) {
|
||||||
let sql, params
|
let sql, params
|
||||||
|
|
||||||
if (password !== null) {
|
if (password !== null || password !== '') {
|
||||||
const hashedPassword = await bcrypt.hash(password, 10)
|
const hashedPassword = await bcrypt.hash(password, 10)
|
||||||
sql = `UPDATE users SET username = ?, email = ?, password = ?, roles = ? WHERE id = ?`
|
sql = `UPDATE users SET username = ?, email = ?, password = ? WHERE id = ?`
|
||||||
params = [username, email, hashedPassword, roles, id]
|
params = [username, email, hashedPassword, id]
|
||||||
} else {
|
} else {
|
||||||
sql = `UPDATE users SET username = ?, email = ?, roles = ? WHERE id = ?`
|
sql = `UPDATE users SET username = ?, email = ? WHERE id = ?`
|
||||||
params = [username, email, roles, id]
|
params = [username, email, id]
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -126,10 +125,12 @@ async function updateUser(username, email, password, roles, id) {
|
|||||||
message: 'Utilisateur non trouvé ou aucune modification effectuée.'
|
message: 'Utilisateur non trouvé ou aucune modification effectuée.'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const [rows] = await pool.query('SELECT * FROM users WHERE id = ?', [id])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
message: 'Utilisateur mis à jour avec succès.'
|
message: 'Utilisateur mis à jour avec succès.',
|
||||||
|
users: rows[0]
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return { success: false, error: 'Erreur veullez réeseyer' }
|
return { success: false, error: 'Erreur veullez réeseyer' }
|
||||||
|
|||||||
@ -272,7 +272,7 @@ async function getNessesarytable() {
|
|||||||
try {
|
try {
|
||||||
const sql = 'SELECT * FROM nessesaryTable'
|
const sql = 'SELECT * FROM nessesaryTable'
|
||||||
const [rows] = await pool.query(sql)
|
const [rows] = await pool.query(sql)
|
||||||
return rows
|
return rows[0]
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return error
|
return error
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ database
|
|||||||
.then(() => database.insertStatusesIfNotExist())
|
.then(() => database.insertStatusesIfNotExist())
|
||||||
.catch(console.error)
|
.catch(console.error)
|
||||||
|
|
||||||
const { loginUsers } = require('../../database/Models/Users')
|
const { loginUsers, insertUser, updateUser } = require('../../database/Models/Users')
|
||||||
const { createConfigIp, updateIPConfig } = require('../../database/Models/IpConfig')
|
const { createConfigIp, updateIPConfig } = require('../../database/Models/IpConfig')
|
||||||
const { importFileToDatabase } = require('../../database/import/Etudiants')
|
const { importFileToDatabase } = require('../../database/import/Etudiants')
|
||||||
const {
|
const {
|
||||||
@ -78,9 +78,9 @@ const {
|
|||||||
showMoyenRepech
|
showMoyenRepech
|
||||||
} = require('../../database/Models/NoteRepechage')
|
} = require('../../database/Models/NoteRepechage')
|
||||||
const {
|
const {
|
||||||
updateCurrentYears
|
updateCurrentYears,
|
||||||
// updateStudents,
|
updateStudents,
|
||||||
// updateNessesaryTable
|
updateNessesaryTable
|
||||||
} = require('../../database/function/System')
|
} = require('../../database/function/System')
|
||||||
const { autoUpdater } = require('electron-updater')
|
const { autoUpdater } = require('electron-updater')
|
||||||
const { URL } = require('../../database/api/Config')
|
const { URL } = require('../../database/api/Config')
|
||||||
@ -98,7 +98,7 @@ const {
|
|||||||
let mainWindow
|
let mainWindow
|
||||||
let tray = null
|
let tray = null
|
||||||
updateCurrentYears()
|
updateCurrentYears()
|
||||||
// updateStudents()
|
updateStudents()
|
||||||
|
|
||||||
autoUpdater.setFeedURL({
|
autoUpdater.setFeedURL({
|
||||||
provider: 'generic',
|
provider: 'generic',
|
||||||
@ -299,6 +299,23 @@ ipcMain.handle('login', async (event, credentials) => {
|
|||||||
|
|
||||||
return response
|
return response
|
||||||
})
|
})
|
||||||
|
|
||||||
|
ipcMain.handle('insertUser', async (event, credentials) => {
|
||||||
|
const { username, email, password, roles } = credentials
|
||||||
|
|
||||||
|
const users = await insertUser(username, email, password, roles)
|
||||||
|
|
||||||
|
return users
|
||||||
|
})
|
||||||
|
|
||||||
|
ipcMain.handle('updateUsers', async (event, credentials) => {
|
||||||
|
const { username, email, password, id } = credentials
|
||||||
|
|
||||||
|
const update = await updateUser(username, email, password, id)
|
||||||
|
|
||||||
|
return update
|
||||||
|
})
|
||||||
|
|
||||||
// event for insert etudiants
|
// event for insert etudiants
|
||||||
ipcMain.handle('insertEtudiant', async (event, credentials) => {
|
ipcMain.handle('insertEtudiant', async (event, credentials) => {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@ -54,12 +54,13 @@ const Admin = () => {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const response = await window.allUser.insertUsers(formData)
|
const response = await window.allUser.insertUsers(formData)
|
||||||
console.log(response)
|
console.log(response)
|
||||||
if (response.changes) {
|
if (response.success) {
|
||||||
setOpen(true)
|
setOpen(true)
|
||||||
setFormData({
|
setFormData({
|
||||||
username: '',
|
username: '',
|
||||||
email: '',
|
email: '',
|
||||||
password: ''
|
password: '',
|
||||||
|
roles: 'Enseignant'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,17 +1,15 @@
|
|||||||
import React, { useRef, useState } from 'react'
|
import { useState } from 'react'
|
||||||
import classe from '../assets/AllStyleComponents.module.css'
|
import classe from '../assets/AllStyleComponents.module.css'
|
||||||
import img from '../assets/para.png'
|
import img from '../assets/para.png'
|
||||||
import classeHome from '../assets/Home.module.css'
|
import classeHome from '../assets/Home.module.css'
|
||||||
import { Box, Button, InputAdornment, TextField, Grid, Modal, Typography } from '@mui/material'
|
import { Box, Button, InputAdornment, TextField, Grid, Modal, Typography } from '@mui/material'
|
||||||
import classeAdd from '../assets/AddStudent.module.css'
|
import classeAdd from '../assets/AddStudent.module.css'
|
||||||
import { useAuthContext } from '../contexts/AuthContext'
|
import { useAuthContext } from '../contexts/AuthContext'
|
||||||
import bcrypt from 'bcryptjs'
|
|
||||||
import { FaEnvelope, FaLock, FaUser } from 'react-icons/fa'
|
import { FaEnvelope, FaLock, FaUser } from 'react-icons/fa'
|
||||||
import validationSetting from './validation/Setting'
|
|
||||||
import svgSuccess from '../assets/success.svg'
|
import svgSuccess from '../assets/success.svg'
|
||||||
import svgError from '../assets/error.svg'
|
import svgError from '../assets/error.svg'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import { GrConfigure } from "react-icons/gr";
|
import { GrConfigure } from 'react-icons/gr'
|
||||||
import IpConfig from './IpConfig'
|
import IpConfig from './IpConfig'
|
||||||
|
|
||||||
const Setting = () => {
|
const Setting = () => {
|
||||||
@ -19,42 +17,13 @@ const Setting = () => {
|
|||||||
|
|
||||||
const userInfo = JSON.parse(token)
|
const userInfo = JSON.parse(token)
|
||||||
|
|
||||||
const [isUsername, setIsUsername] = useState(true)
|
|
||||||
|
|
||||||
const changeUsernameRef = useRef()
|
|
||||||
const changeEmailRef = useRef()
|
|
||||||
|
|
||||||
const changeEmail = (e) => {
|
|
||||||
if (changeEmailRef.current.checked) {
|
|
||||||
setIsUsername(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const changeUsername = (e) => {
|
|
||||||
if (changeUsernameRef.current.checked) {
|
|
||||||
setIsUsername(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
username: userInfo.username,
|
username: userInfo.username,
|
||||||
newUsername: '',
|
|
||||||
email: userInfo.email,
|
email: userInfo.email,
|
||||||
newEmail: '',
|
|
||||||
passwordVerif: '',
|
|
||||||
password: '',
|
password: '',
|
||||||
id: userInfo.id
|
id: userInfo.id
|
||||||
})
|
})
|
||||||
|
|
||||||
const usernameRef = useRef()
|
|
||||||
const emailRef = useRef()
|
|
||||||
const passwordRef = useRef()
|
|
||||||
const passwordChangeRef = useRef()
|
|
||||||
const usernameError = useRef()
|
|
||||||
const emailError = useRef()
|
|
||||||
const passwordError = useRef()
|
|
||||||
const passwordChangeError = useRef()
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function to set the data in state
|
* function to set the data in state
|
||||||
* @param {*} e
|
* @param {*} e
|
||||||
@ -70,79 +39,23 @@ const Setting = () => {
|
|||||||
const handleSubmit = async (e) => {
|
const handleSubmit = async (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
// Handle form submission logic
|
// Handle form submission logic
|
||||||
let validation = validationSetting(
|
const response = await window.allUser.updateUsers(formData)
|
||||||
usernameRef.current,
|
console.log(response)
|
||||||
emailRef.current,
|
if (response.success) {
|
||||||
passwordRef.current,
|
setOpen(true)
|
||||||
passwordChangeRef.current,
|
setCode(200)
|
||||||
usernameError.current,
|
setToken(JSON.stringify(response.users))
|
||||||
emailError.current,
|
setFormData({
|
||||||
passwordError.current,
|
username: response.username,
|
||||||
passwordChangeError.current
|
email: response.email,
|
||||||
)
|
password: '',
|
||||||
|
id: userInfo.id
|
||||||
if (validation) {
|
})
|
||||||
if (formData.username === formData.newUsername) {
|
} else {
|
||||||
if (usernameError.current) {
|
setCode(422)
|
||||||
usernameError.current.textContent =
|
setOpen(true)
|
||||||
"Le nom d'utilisateur doit être différent de l'original"
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (usernameError.current) {
|
|
||||||
usernameError.current.textContent = '' // Clear the username error if condition is not met
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (formData.email === formData.newEmail) {
|
|
||||||
if (emailError.current) {
|
|
||||||
emailError.current.textContent = "Email doit être différent de l'original"
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (emailError.current) {
|
|
||||||
emailError.current.textContent = '' // Clear the email error if condition is not met
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (formData.email !== formData.newEmail && formData.username !== formData.newUsername) {
|
|
||||||
// Password verification
|
|
||||||
bcrypt.compare(formData.passwordVerif, userInfo.password, async function (err, result) {
|
|
||||||
if (result) {
|
|
||||||
// Clear password error if password matches
|
|
||||||
if (passwordError.current) {
|
|
||||||
passwordError.current.textContent = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update user information if password is verified
|
|
||||||
const response = await window.allUser.updateUsers(formData)
|
|
||||||
if (response.id) {
|
|
||||||
setOpen(true)
|
|
||||||
setToken(JSON.stringify(response))
|
|
||||||
setFormData({
|
|
||||||
passwordVerif: '',
|
|
||||||
username: response.username,
|
|
||||||
newUsername: '',
|
|
||||||
email: response.email,
|
|
||||||
newEmail: '',
|
|
||||||
password: '',
|
|
||||||
id: userInfo.id
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle specific response code for errors
|
|
||||||
if (response.code) {
|
|
||||||
setCode(422)
|
|
||||||
setOpen(true)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Set error message if password verification fails
|
|
||||||
if (passwordError.current) {
|
|
||||||
passwordError.current.textContent = 'mot de passe ne correspond pas'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hook to open modal
|
* hook to open modal
|
||||||
*/
|
*/
|
||||||
@ -264,173 +177,67 @@ const Setting = () => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<form onSubmit={handleSubmit} style={{ marginTop: '5%' }}>
|
<form onSubmit={handleSubmit} style={{ marginTop: '5%' }}>
|
||||||
<Grid container spacing={2} sx={{ marginBottom: '30px' }}>
|
{/* */}
|
||||||
<Grid
|
|
||||||
item
|
|
||||||
xs={12}
|
|
||||||
sm={12}
|
|
||||||
sx={{
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
gap: '20px'
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<label htmlFor="usernameBlock">
|
|
||||||
<input
|
|
||||||
type="radio"
|
|
||||||
name="option"
|
|
||||||
id="usernameBlock"
|
|
||||||
ref={changeUsernameRef}
|
|
||||||
onClick={changeUsername}
|
|
||||||
/>
|
|
||||||
Username
|
|
||||||
</label>
|
|
||||||
<label htmlFor="emailBlock">
|
|
||||||
<input
|
|
||||||
type="radio"
|
|
||||||
name="option"
|
|
||||||
id="emailBlock"
|
|
||||||
onClick={changeEmail}
|
|
||||||
ref={changeEmailRef}
|
|
||||||
/>
|
|
||||||
Email
|
|
||||||
</label>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
{isUsername === true ? (
|
|
||||||
<Grid container spacing={2}>
|
|
||||||
{/* username*/}
|
|
||||||
<Grid item xs={12} sm={6}>
|
|
||||||
<TextField
|
|
||||||
label="Nom d'utilisateur"
|
|
||||||
name="username"
|
|
||||||
color="warning"
|
|
||||||
fullWidth
|
|
||||||
disabled
|
|
||||||
value={formData.username}
|
|
||||||
onChange={handleInputChange}
|
|
||||||
InputProps={{
|
|
||||||
startAdornment: (
|
|
||||||
<InputAdornment position="start">
|
|
||||||
<FaUser />
|
|
||||||
</InputAdornment>
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
sx={{
|
|
||||||
'& .MuiOutlinedInput-root': {
|
|
||||||
'&:hover fieldset': {
|
|
||||||
borderColor: '#ff9800' // Set the border color on hover
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Grid>
|
|
||||||
<Grid item xs={12} sm={6}>
|
|
||||||
<TextField
|
|
||||||
label="Nouveau nom d'utilisateur"
|
|
||||||
name="newUsername"
|
|
||||||
color="warning"
|
|
||||||
fullWidth
|
|
||||||
value={formData.newUsername}
|
|
||||||
onChange={handleInputChange}
|
|
||||||
InputProps={{
|
|
||||||
startAdornment: (
|
|
||||||
<InputAdornment position="start">
|
|
||||||
<FaUser />
|
|
||||||
</InputAdornment>
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
inputRef={usernameRef}
|
|
||||||
sx={{
|
|
||||||
'& .MuiOutlinedInput-root': {
|
|
||||||
'&:hover fieldset': {
|
|
||||||
borderColor: '#ff9800' // Set the border color on hover
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
className="text-danger"
|
|
||||||
ref={usernameError}
|
|
||||||
style={{ fontSize: '13px' }}
|
|
||||||
></span>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
) : (
|
|
||||||
<Grid container spacing={2}>
|
|
||||||
{/* email */}
|
|
||||||
<Grid item xs={12} sm={6}>
|
|
||||||
<TextField
|
|
||||||
label="Email"
|
|
||||||
name="email"
|
|
||||||
fullWidth
|
|
||||||
color="warning"
|
|
||||||
value={formData.email}
|
|
||||||
disabled
|
|
||||||
onChange={handleInputChange}
|
|
||||||
InputProps={{
|
|
||||||
startAdornment: (
|
|
||||||
<InputAdornment position="start">
|
|
||||||
<FaEnvelope />
|
|
||||||
</InputAdornment>
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
sx={{
|
|
||||||
'& .MuiOutlinedInput-root': {
|
|
||||||
'&:hover fieldset': {
|
|
||||||
borderColor: '#ff9800' // Set the border color on hover
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Grid>
|
|
||||||
<Grid item xs={12} sm={6}>
|
|
||||||
<TextField
|
|
||||||
label="Nouveau email"
|
|
||||||
name="newEmail"
|
|
||||||
fullWidth
|
|
||||||
color="warning"
|
|
||||||
value={formData.newEmail}
|
|
||||||
onChange={handleInputChange}
|
|
||||||
InputProps={{
|
|
||||||
startAdornment: (
|
|
||||||
<InputAdornment position="start">
|
|
||||||
<FaEnvelope />
|
|
||||||
</InputAdornment>
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
inputRef={emailRef}
|
|
||||||
sx={{
|
|
||||||
'& .MuiOutlinedInput-root': {
|
|
||||||
'&:hover fieldset': {
|
|
||||||
borderColor: '#ff9800' // Set the border color on hover
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
className="text-danger"
|
|
||||||
ref={emailError}
|
|
||||||
style={{ fontSize: '13px' }}
|
|
||||||
></span>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
)}
|
|
||||||
<Grid item xs={12} sm={12}>
|
|
||||||
<p>
|
|
||||||
<b>Insérer le mot de passe pour confirmer le changement</b>
|
|
||||||
</p>
|
|
||||||
</Grid>
|
|
||||||
{/* matieres Mecanique general */}
|
|
||||||
<Grid item xs={12} sm={6}>
|
<Grid item xs={12} sm={6}>
|
||||||
<TextField
|
<TextField
|
||||||
label="Mot de passe"
|
label="Nom d'utilisateur"
|
||||||
name="passwordVerif"
|
name="username"
|
||||||
fullWidth
|
|
||||||
color="warning"
|
color="warning"
|
||||||
value={formData.passwordVerif}
|
fullWidth
|
||||||
|
value={formData.username}
|
||||||
|
onChange={handleInputChange}
|
||||||
|
required
|
||||||
|
InputProps={{
|
||||||
|
startAdornment: (
|
||||||
|
<InputAdornment position="start">
|
||||||
|
<FaUser />
|
||||||
|
</InputAdornment>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
sx={{
|
||||||
|
'& .MuiOutlinedInput-root': {
|
||||||
|
'&:hover fieldset': {
|
||||||
|
borderColor: '#ff9800' // Set the border color on hover
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12} sm={6}>
|
||||||
|
<TextField
|
||||||
|
label="Email"
|
||||||
|
name="email"
|
||||||
|
fullWidth
|
||||||
|
required
|
||||||
|
color="warning"
|
||||||
|
value={formData.email}
|
||||||
|
onChange={handleInputChange}
|
||||||
|
InputProps={{
|
||||||
|
startAdornment: (
|
||||||
|
<InputAdornment position="start">
|
||||||
|
<FaEnvelope />
|
||||||
|
</InputAdornment>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
sx={{
|
||||||
|
'& .MuiOutlinedInput-root': {
|
||||||
|
'&:hover fieldset': {
|
||||||
|
borderColor: '#ff9800' // Set the border color on hover
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
{/* matieres Mecanique general */}
|
||||||
|
<Grid item xs={12} sm={12}>
|
||||||
|
<TextField
|
||||||
|
label="Mot de passe"
|
||||||
|
name="password"
|
||||||
|
fullWidth
|
||||||
|
helperText="À laisser vide si vous ne voulez pas le modifier"
|
||||||
|
color="warning"
|
||||||
|
value={formData.password}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
startAdornment: (
|
startAdornment: (
|
||||||
@ -439,7 +246,6 @@ const Setting = () => {
|
|||||||
</InputAdornment>
|
</InputAdornment>
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
inputRef={passwordRef}
|
|
||||||
sx={{
|
sx={{
|
||||||
'& .MuiOutlinedInput-root': {
|
'& .MuiOutlinedInput-root': {
|
||||||
'&:hover fieldset': {
|
'&:hover fieldset': {
|
||||||
@ -448,40 +254,8 @@ const Setting = () => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<span
|
|
||||||
className="text-danger"
|
|
||||||
ref={passwordError}
|
|
||||||
style={{ fontSize: '13px' }}
|
|
||||||
></span>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
{/* Matieres Resistance Materiaux */}
|
{/* Matieres Resistance Materiaux */}
|
||||||
<Grid item xs={12} sm={6}>
|
|
||||||
<TextField
|
|
||||||
label="Changer le mot de passe ?"
|
|
||||||
name="password"
|
|
||||||
fullWidth
|
|
||||||
color="warning"
|
|
||||||
placeholder="Nouveau mot de passe"
|
|
||||||
value={formData.password}
|
|
||||||
onChange={handleInputChange}
|
|
||||||
InputProps={{
|
|
||||||
startAdornment: <InputAdornment position="start"></InputAdornment>
|
|
||||||
}}
|
|
||||||
inputRef={passwordChangeRef}
|
|
||||||
sx={{
|
|
||||||
'& .MuiOutlinedInput-root': {
|
|
||||||
'&:hover fieldset': {
|
|
||||||
borderColor: '#ff9800' // Set the border color on hover
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
className="text-danger"
|
|
||||||
ref={passwordChangeError}
|
|
||||||
style={{ fontSize: '13px' }}
|
|
||||||
></span>
|
|
||||||
</Grid>
|
|
||||||
{/* Submit Button */}
|
{/* Submit Button */}
|
||||||
<Grid
|
<Grid
|
||||||
item
|
item
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user