#82 fix user abbreviate

merge-requests/45/head
Anton Romanov 5 years ago
parent 91d2168012
commit 54edeb0559

@ -24,7 +24,7 @@ import java.util.Set;
@Entity
@Table(name = "users")
public class User extends BaseEntity {
private final static String USER_ABBREVIATE_TEMPLATE = "%s %s %s";
private final static String USER_ABBREVIATE_TEMPLATE = "%s %s%s";
@NotNull
@Pattern(regexp = Constants.LOGIN_REGEX)
@ -192,7 +192,7 @@ public class User extends BaseEntity {
public String getUserAbbreviate() {
return String.format(USER_ABBREVIATE_TEMPLATE,
lastName == null ? "" : lastName,
firstName == null ? "" : firstName.substring(0, 1),
patronymic == null ? "" : patronymic.substring(0, 1));
firstName == null ? "" : firstName.substring(0, 1) + ".",
patronymic == null ? "" : patronymic.substring(0, 1) + ".");
}
}

Loading…
Cancel
Save