feat: Add bank account details to admin profile
- Add accountHolder, bankName, iban, bic fields to AppUser domain - Update UserOption, UserRow, UserMutation records in CatalogService - Update all AppUser constructor calls to include new fields - Add bank fields to frontend UserOption and UserRow types - Add bank account form section to AdminProfilePage
This commit is contained in:
@@ -19,6 +19,10 @@ public record AppUser(
|
||||
String city,
|
||||
String email,
|
||||
String phoneNumber,
|
||||
String accountHolder,
|
||||
String bankName,
|
||||
String iban,
|
||||
String bic,
|
||||
String passwordHash,
|
||||
boolean active,
|
||||
UserRole role,
|
||||
|
||||
@@ -436,6 +436,10 @@ public class CatalogService {
|
||||
adminManaged ? blankToNull(mutation.city()) : null,
|
||||
normalizeEmail(mutation.email()),
|
||||
adminManaged ? blankToNull(mutation.phoneNumber()) : null,
|
||||
adminManaged ? blankToNull(mutation.accountHolder()) : null,
|
||||
adminManaged ? blankToNull(mutation.bankName()) : null,
|
||||
adminManaged ? blankToNull(mutation.iban()) : null,
|
||||
adminManaged ? blankToNull(mutation.bic()) : null,
|
||||
encodeIfPresent(mutation.password()),
|
||||
mutation.active(),
|
||||
adminManaged ? normalizeManagedRole(mutation.role()) : UserRole.CUSTOMER,
|
||||
@@ -467,6 +471,10 @@ public class CatalogService {
|
||||
isPrimaryUser(existing) || actor.role() == UserRole.ADMIN ? blankToNull(mutation.city()) : existing.city(),
|
||||
normalizeEmail(mutation.email()),
|
||||
isPrimaryUser(existing) || actor.role() == UserRole.ADMIN ? blankToNull(mutation.phoneNumber()) : existing.phoneNumber(),
|
||||
isPrimaryUser(existing) || actor.role() == UserRole.ADMIN ? blankToNull(mutation.accountHolder()) : existing.accountHolder(),
|
||||
isPrimaryUser(existing) || actor.role() == UserRole.ADMIN ? blankToNull(mutation.bankName()) : existing.bankName(),
|
||||
isPrimaryUser(existing) || actor.role() == UserRole.ADMIN ? blankToNull(mutation.iban()) : existing.iban(),
|
||||
isPrimaryUser(existing) || actor.role() == UserRole.ADMIN ? blankToNull(mutation.bic()) : existing.bic(),
|
||||
isBlank(mutation.password()) ? existing.passwordHash() : passwordEncoder.encode(mutation.password()),
|
||||
mutation.active(),
|
||||
actor.role() == UserRole.ADMIN
|
||||
@@ -516,6 +524,10 @@ public class CatalogService {
|
||||
existing.city(),
|
||||
existing.email(),
|
||||
existing.phoneNumber(),
|
||||
existing.accountHolder(),
|
||||
existing.bankName(),
|
||||
existing.iban(),
|
||||
existing.bic(),
|
||||
passwordEncoder.encode(newPassword),
|
||||
existing.active(),
|
||||
existing.role(),
|
||||
@@ -580,6 +592,10 @@ public class CatalogService {
|
||||
city,
|
||||
normalizedEmail,
|
||||
phoneNumber,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
passwordEncoder.encode(mutation.password()),
|
||||
false,
|
||||
UserRole.CUSTOMER,
|
||||
@@ -600,6 +616,10 @@ public class CatalogService {
|
||||
created.city(),
|
||||
created.email(),
|
||||
created.phoneNumber(),
|
||||
created.accountHolder(),
|
||||
created.bankName(),
|
||||
created.iban(),
|
||||
created.bic(),
|
||||
created.passwordHash(),
|
||||
false,
|
||||
created.role(),
|
||||
@@ -708,6 +728,10 @@ public class CatalogService {
|
||||
user.city(),
|
||||
user.email(),
|
||||
user.phoneNumber(),
|
||||
user.accountHolder(),
|
||||
user.bankName(),
|
||||
user.iban(),
|
||||
user.bic(),
|
||||
user.active(),
|
||||
normalizeStoredRole(user.role()),
|
||||
user.updatedAt()
|
||||
@@ -743,6 +767,10 @@ public class CatalogService {
|
||||
user.city(),
|
||||
user.email(),
|
||||
user.phoneNumber(),
|
||||
user.accountHolder(),
|
||||
user.bankName(),
|
||||
user.iban(),
|
||||
user.bic(),
|
||||
normalizeStoredRole(user.role())
|
||||
);
|
||||
}
|
||||
@@ -835,6 +863,10 @@ public class CatalogService {
|
||||
user.city(),
|
||||
user.email(),
|
||||
user.phoneNumber(),
|
||||
user.accountHolder(),
|
||||
user.bankName(),
|
||||
user.iban(),
|
||||
user.bic(),
|
||||
user.passwordHash(),
|
||||
user.active(),
|
||||
normalizeStoredRole(user.role()),
|
||||
@@ -870,6 +902,10 @@ public class CatalogService {
|
||||
null,
|
||||
email,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
passwordEncoder.encode(rawPassword),
|
||||
true,
|
||||
role,
|
||||
@@ -997,6 +1033,10 @@ public class CatalogService {
|
||||
String city,
|
||||
String email,
|
||||
String phoneNumber,
|
||||
String accountHolder,
|
||||
String bankName,
|
||||
String iban,
|
||||
String bic,
|
||||
UserRole role
|
||||
) {
|
||||
}
|
||||
@@ -1066,6 +1106,10 @@ public class CatalogService {
|
||||
String city,
|
||||
String email,
|
||||
String phoneNumber,
|
||||
String accountHolder,
|
||||
String bankName,
|
||||
String iban,
|
||||
String bic,
|
||||
boolean active,
|
||||
UserRole role,
|
||||
LocalDateTime updatedAt
|
||||
@@ -1083,6 +1127,10 @@ public class CatalogService {
|
||||
String city,
|
||||
String email,
|
||||
String phoneNumber,
|
||||
String accountHolder,
|
||||
String bankName,
|
||||
String iban,
|
||||
String bic,
|
||||
String password,
|
||||
boolean active,
|
||||
UserRole role
|
||||
|
||||
Reference in New Issue
Block a user