rework ui

This commit is contained in:
verboomp
2026-01-29 15:22:05 +01:00
parent 0918185a6b
commit 71100353fa
7 changed files with 31 additions and 20 deletions

View File

@@ -15,13 +15,13 @@ import marketing.heyday.hartmann.fotodocumentation.core.model.Customer;
* created: 22 Jan 2026 * created: 22 Jan 2026
*/ */
@Schema(name = "Customer") @Schema(name = "Customer")
public record CustomerValue(Long id, String name, String customerNumber, List<PictureValue> pictures) { public record CustomerValue(Long id, String name, String customerNumber, String city, String zip, List<PictureValue> pictures) {
public static CustomerValue builder(Customer customer) { public static CustomerValue builder(Customer customer) {
if (customer == null) { if (customer == null) {
return null; return null;
} }
List<PictureValue> pictures = customer.getPictures().parallelStream().map(PictureValue::builder).filter(p -> p != null).toList(); List<PictureValue> pictures = customer.getPictures().parallelStream().map(PictureValue::builder).filter(p -> p != null).toList();
return new CustomerValue(customer.getCustomerId(), customer.getName(), customer.getCustomerNumber(), pictures); return new CustomerValue(customer.getCustomerId(), customer.getName(), customer.getCustomerNumber(), customer.getCity(), customer.getZip(), pictures);
} }
} }

View File

@@ -123,6 +123,6 @@ public class CustomerPictureResourceTest extends AbstractRestTest {
test.username = "adm"; test.username = "adm";
test.password = "x1t0e7Pb49"; test.password = "x1t0e7Pb49";
test.doAddCustomerPictureWrongJson(); test.doAddCustomerWithPicture();
} }
} }

File diff suppressed because one or more lines are too long

View File

@@ -2,6 +2,8 @@
"id": 1, "id": 1,
"name": "Müller Apotheke", "name": "Müller Apotheke",
"customerNumber": "1234", "customerNumber": "1234",
"city": "Hannover",
"zip": "12345",
"pictures": [ "pictures": [
{ {
"id": 1, "id": 1,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long