12 Added notes and colours to customers

This commit is contained in:
2025-07-23 15:35:19 +02:00
parent 84d43f0dac
commit 541b181c87
17 changed files with 362 additions and 20 deletions

View File

@@ -41,7 +41,10 @@ class ReservationsController < ApplicationController
# POST /reservations or /reservations.json
def create
@reservation = @company.reservations.new(
reservation_params.except(:customer_id, :customer_birth_year)
reservation_params.except(
:customer_id, :customer_first_name, :customer_surname,
:customer_original_phone, :customer_birth_year, :customer_composite_key
)
)
# Find or create customer based on submitted attributes
@@ -68,7 +71,7 @@ class ReservationsController < ApplicationController
customer_attrs = build_customer_attributes # Use existing helper
reservation_attrs = reservation_params.except(
:customer_id, :customer_first_name, :customer_surname,
:customer_original_phone, :customer_birth_year
:customer_original_phone, :customer_birth_year, :customer_composite_key
)
# Find the customer identified by the submitted name/phone
@@ -144,6 +147,7 @@ class ReservationsController < ApplicationController
:customer_surname,
:customer_original_phone,
:customer_birth_year,
:customer_composite_key,
:customer_id # Allow this if select still sends it sometimes
)
end