SUPPORT-9360: fix pages; fix user mapping
This commit is contained in:
parent
f56b9ac272
commit
8a3189e4e6
6 changed files with 30 additions and 30 deletions
|
|
@ -89,11 +89,9 @@ public class AccountGridLoadService extends Behavior implements GridService {
|
|||
gridRow.put("login", person.getLogin());
|
||||
gridRow.put("snils", person.getSnils());
|
||||
gridRow.put("personEnabled", !person.isBlocked());
|
||||
|
||||
String fullName = person.getFullName();
|
||||
if (fullName != null) {
|
||||
gridRow.putAll(StringUtils.splitFio(fullName));
|
||||
}
|
||||
gridRow.put("lastName", person.getLastName());
|
||||
gridRow.put("firstName", person.getFirstName());
|
||||
gridRow.put("middleName", person.getMiddleName());
|
||||
}
|
||||
|
||||
if (account.getDomain() != null && account.getDomain().getName() != null) {
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
package ru.micord.ervu.account_applications.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Adel Kalimullin
|
||||
*/
|
||||
public final class StringUtils {
|
||||
|
||||
private StringUtils() {
|
||||
}
|
||||
|
||||
public static Map<String, String> splitFio(String fio) {
|
||||
String[] parts = fio.trim().split(" ", 3);
|
||||
Map<String, String> result = new HashMap<>();
|
||||
result.put("lastName", parts.length > 0 ? parts[0] : "");
|
||||
result.put("firstName", parts.length > 1 ? parts[1] : "");
|
||||
result.put("middleName", parts.length > 2 ? parts[2] : "");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue