Add salutation field to contacts #13

This commit is contained in:
2025-10-29 13:53:08 +01:00
parent a34226c6a9
commit 59c2b9c28c
10 changed files with 26 additions and 13 deletions
+3 -1
View File
@@ -12,6 +12,7 @@ public function index()
return [
'id' => $contact->id,
'customerId' => $contact->customer_id,
'salutation' => $contact->salutation,
'firstName' => $contact->first_name,
'lastName' => $contact->last_name,
'email' => $contact->email,
@@ -36,6 +37,7 @@ public function show($id)
return [
'id' => $contact->id,
'customerId' => $contact->customer_id,
'salutation' => $contact->salutation,
'firstName' => $contact->first_name,
'lastName' => $contact->last_name,
'email' => $contact->email,
@@ -51,4 +53,4 @@ public function show($id)
] : null,
];
}
}
}
@@ -344,6 +344,7 @@ public function store(Request $request)
'billingData.billingAddress.city' => 'nullable|string',
'billingData.billingAddress.postalCode' => 'nullable|string',
'billingData.billingAddress.countryCode' => 'nullable|string',
'billingData.contactSalutation' => 'nullable|string',
'billingData.contactFirstName' => 'nullable|string',
'billingData.contactLastName' => 'nullable|string',
'billingData.paymentTerms' => 'nullable|array',
@@ -428,6 +429,7 @@ public function update(Request $request, $id)
'billingData.billingAddress.city' => 'nullable|string',
'billingData.billingAddress.postalCode' => 'nullable|string',
'billingData.billingAddress.countryCode' => 'nullable|string',
'billingData.contactSalutation' => 'nullable|string',
'billingData.contactFirstName' => 'nullable|string',
'billingData.contactLastName' => 'nullable|string',
'billingData.paymentTerms' => 'nullable|array',
+1
View File
@@ -11,6 +11,7 @@ class Contact extends Model
protected $fillable = [
'customer_id',
'salutation',
'first_name',
'last_name',
'email',