-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(components): unified user name positions to
[surname, ]<name>
Ticket: issue/Transversal-196 Reviewed-by: @MIGUELez11 Refs: #158
- Loading branch information
1 parent
f8c4f91
commit b9bf541
Showing
2 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
function getUserFullName(user) { | ||
return ( | ||
(user.name ? user.name : '') + | ||
(user.surnames ? ` ${user.surnames}` : '') + | ||
(user.secondSurname ? ` ${user.secondSurname}` : '') | ||
); | ||
return `${user.secondSurname ? `${user.secondSurname} ` : ''}${ | ||
user.surnames ? user.surnames : '' | ||
}${user.secondSurname || user.surnames ? ', ' : ''}${user.name}`; | ||
} | ||
|
||
export { getUserFullName }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters