Skip to content

Commit

Permalink
add email property to Complaint (#3716)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitek-rostislav authored Jan 13, 2025
2 parents 3fafd15 + 990e253 commit 095fcea
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Model/Complaint/ComplaintDataApiFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public function createFromComplaintInputArgument(
$complaintData->customerUser = $customerUser;
$complaintData->complaintItems = $complaintItems;

$complaintData->email = $input['email'];

$delivery = $input['deliveryAddress'];
$complaintData->deliveryFirstName = $delivery['firstName'];
$complaintData->deliveryLastName = $delivery['lastName'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ ComplaintDecorator:
order:
type: "Order!"
description: "Order for which the complaint was created"
email:
type: "String!"
description: "The customer's email address"
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@ ComplaintInputDecorator:
type: "[ComplaintItemInput!]!"
description: "All items in the complaint"
validation: cascade
email:
type: "String!"
description: "The customer's email address"
validation:
- NotBlank:
message: "Please enter email"
- Email:
message: "Please enter valid email"
- Length:
max: 255
maxMessage: "Email cannot be longer than {{ limit }} characters"

0 comments on commit 095fcea

Please sign in to comment.