IA-926 :feat(profile): Remove duplicate reset password flow and fix language/timezone preferences persistence
Summary
Two separate cleanup changes across the profile section: removes a redundant password reset button from the security page, and fixes language/timezone preferences so they persist across page refreshes.
Changes
security/pages.tsx
- Removed the "send reseted password" button and its associated
handleSendResetCodeflow from the password form — this logic is already fully handled by the "Mot de passe actuelle oublié" link which routes to the dedicated reset password page. - The OTP input card (
showOtpInput) and its handlers (handleSendResetCode,handleConfirmResetCode, OTP state, refs) are kept since they are still used by the forgot password flow triggered from the link.
languages/page.tsx
- Fixed
useEffectto load saved preferences from localStorage on mount (language, auto-detect toggle, manual timezone selection) so values survive page refresh. - Fixed auto-detect toggle: re-enabling it now snaps
selectedTimezoneback to the browser-detected timezone. - Fixed timezone info text to dynamically reflect the current state ("Détecté automatiquement" vs "Fuseau horaire sélectionné").
- Replaced
alert()with aSnackbar/Alertfor save confirmation. - Added
SnackbarandAlertto MUI imports. - Added
showAlertstate. - Added Casablanca to the timezones list.