Add subcription feature 10
This commit is contained in:
@@ -546,7 +546,16 @@ const NewProfileSettingsPage: React.FC = () => {
|
||||
setIsLoading(true);
|
||||
|
||||
try {
|
||||
await updateProfileMutation.mutateAsync(profileData);
|
||||
// Map the form fields to the expected API format
|
||||
// The API expects 'full_name' instead of separate 'first_name' and 'last_name'
|
||||
const profileUpdateData = {
|
||||
full_name: `${profileData.first_name} ${profileData.last_name}`.trim(),
|
||||
phone: profileData.phone,
|
||||
language: profileData.language,
|
||||
timezone: profileData.timezone
|
||||
};
|
||||
|
||||
await updateProfileMutation.mutateAsync(profileUpdateData);
|
||||
|
||||
setIsEditing(false);
|
||||
showToast.success(t('profile.save_changes'));
|
||||
|
||||
@@ -169,12 +169,21 @@ const ProfilePage: React.FC = () => {
|
||||
|
||||
const handleSaveProfile = async () => {
|
||||
if (!validateProfile()) return;
|
||||
|
||||
|
||||
setIsLoading(true);
|
||||
|
||||
|
||||
try {
|
||||
await updateProfileMutation.mutateAsync(profileData);
|
||||
|
||||
// Map the form fields to the expected API format
|
||||
// The API expects 'full_name' instead of separate 'first_name' and 'last_name'
|
||||
const profileUpdateData = {
|
||||
full_name: `${profileData.first_name} ${profileData.last_name}`.trim(),
|
||||
phone: profileData.phone,
|
||||
language: profileData.language,
|
||||
timezone: profileData.timezone
|
||||
};
|
||||
|
||||
await updateProfileMutation.mutateAsync(profileUpdateData);
|
||||
|
||||
setIsEditing(false);
|
||||
showToast.success('Perfil actualizado correctamente');
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user