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,
|
email: fields.email,
|
||||||
nome: fields.nome,
|
nome: fields.nome,
|
||||||
telefono: fields.telefono.replace(/\s/g, ""),
|
telefono: fields.telefono.replace(/\s/g, ""),
|
||||||
username: `${fields.nome.trim()} ${fields.cognome.trim()}`,
|
username: `${fields.cognome.trim()} ${fields.nome.trim()}`,
|
||||||
};
|
};
|
||||||
mutate({
|
mutate({
|
||||||
anagrafica: a,
|
anagrafica: a,
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ export const ProfileFormAccount = ({
|
||||||
data: {
|
data: {
|
||||||
...fields,
|
...fields,
|
||||||
telefono: fields.telefono?.replace(/\s/g, ""),
|
telefono: fields.telefono?.replace(/\s/g, ""),
|
||||||
username: `${fields.nome?.trim()} ${fields.cognome?.trim()}`,
|
username: `${fields.cognome?.trim()} ${fields.nome?.trim()}`,
|
||||||
isAdmin: fields.isAdmin || false,
|
isAdmin: fields.isAdmin || false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ export const createUserAdmin = async ({
|
||||||
password: hashedPassword,
|
password: hashedPassword,
|
||||||
salt,
|
salt,
|
||||||
telefono,
|
telefono,
|
||||||
username: `${nome.trim()} ${cognome.trim()}`,
|
username: `${cognome.trim()} ${nome.trim()}`,
|
||||||
},
|
},
|
||||||
db,
|
db,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue