Templates serve as a brand shield (showing the platform facilitates all kinds of messaging), not as a compose-flow form control. Remove them from the data model and compose page. Templates will live as branding elements on the landing page in a future commit. Backend: - Remove template field from Order entity (getter/setter removed) - Remove template from CreateOrderRequest DTO - Remove template from OrderResponse DTO - Remove template param from OrderService.createOrder() - Remove template passthrough in OrderController - Remove /api/templates permitAll from SecurityConfig - Edit V5 migration: remove template column from orders table - Edit V6 migration: remove template from seed data - Update OrderControllerTest (remove template from assertions/requests) - Update OrderServiceTest (remove template from createOrder calls) Frontend: - Remove template from Order interface in api/orders.ts - Remove template param from createOrder() function - Remove template display from OrdersPage.vue cards - Rewrite ComposePage.vue: remove template selector, keep textarea + preview + submit - Update ComposePage.spec.ts (remove template tests, add preview/GDPR tests) - Update OrdersPage.spec.ts (remove template from mock data and display test) - Update compose.spec.ts E2E (remove template selector interactions) - Update order-history.spec.ts E2E (remove template names test) - Fix unused import in Router.spec.ts - Also includes minor Prettier formatting in AppHeader.spec.ts, AdminPage.vue, authStore.ts
15 lines
536 B
Java
15 lines
536 B
Java
package se.bilhalsning.dto;
|
|
|
|
import jakarta.validation.constraints.NotBlank;
|
|
import jakarta.validation.constraints.Pattern;
|
|
import jakarta.validation.constraints.Size;
|
|
|
|
public record CreateOrderRequest(
|
|
@NotBlank(message = "Registreringsnummer krävs")
|
|
@Pattern(regexp = "^[A-Za-z]{3}\\d{2}[A-Za-z0-9]$", message = "Ogiltigt registreringsnummer")
|
|
String plate,
|
|
|
|
@NotBlank(message = "Brevtext krävs")
|
|
@Size(min = 1, max = 1000, message = "Brevtexten måste vara mellan 1 och 1000 tecken")
|
|
String letterText
|
|
) {}
|