fix: swap order of nome and cognome in username generation across forms and auth controller
This commit is contained in:
parent
09479eb9f2
commit
70c1902a36
3 changed files with 3 additions and 3 deletions
|
|
@ -367,7 +367,7 @@ export const FormNewServizioAcquisto = ({
|
|||
email: fields.email,
|
||||
nome: fields.nome,
|
||||
telefono: fields.telefono.replace(/\s/g, ""),
|
||||
username: `${fields.nome.trim()} ${fields.cognome.trim()}`,
|
||||
username: `${fields.cognome.trim()} ${fields.nome.trim()}`,
|
||||
};
|
||||
mutate({
|
||||
anagrafica: a,
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ export const ProfileFormAccount = ({
|
|||
data: {
|
||||
...fields,
|
||||
telefono: fields.telefono?.replace(/\s/g, ""),
|
||||
username: `${fields.nome?.trim()} ${fields.cognome?.trim()}`,
|
||||
username: `${fields.cognome?.trim()} ${fields.nome?.trim()}`,
|
||||
isAdmin: fields.isAdmin || false,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export const createUserAdmin = async ({
|
|||
password: hashedPassword,
|
||||
salt,
|
||||
telefono,
|
||||
username: `${nome.trim()} ${cognome.trim()}`,
|
||||
username: `${cognome.trim()} ${nome.trim()}`,
|
||||
},
|
||||
db,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue